:root {
    --primary-color: #3b82f6; /* blue-500 */
    --primary-hover: #2563eb;
    --bg-color: #f8fafc; /* slate-50 */
    --sidebar-bg: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a; /* slate-900 */
    --text-secondary: #64748b; /* slate-500 */
    --border-color: rgba(226, 232, 240, 0.6); /* slate-200/60 */
    
    /* 辅助色 */
    --bg-blue-light: rgba(59, 130, 246, 0.1);
    --bg-amber-light: rgba(245, 158, 11, 0.1);
    --text-amber: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 288px; /* w-72 */
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 30;
}

.sidebar-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    max-width: 100%;
    max-height: 32px;
    object-fit: contain;
}

.sidebar-menu-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.menu-group {
    margin-bottom: 32px;
}

.menu-title {
    padding: 0 12px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8; /* slate-400 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569; /* slate-600 */
}

.nav-item:hover {
    background-color: rgba(241, 245, 249, 0.8); /* slate-100 */
    color: var(--text-main);
}

.nav-item.active {
    background-color: rgba(241, 245, 249, 0.8);
    color: var(--text-main);
    font-weight: 500;
}

.icon-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.nav-item:hover .icon-wrapper {
    transform: scale(1.1);
}

.bg-blue { background-color: var(--bg-blue-light); color: var(--primary-color); }
.bg-amber { background-color: var(--bg-amber-light); color: var(--text-amber); }

.nav-item .text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

/* 主内容包裹区 */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* 防止内容溢出 */
}

/* 顶部导航栏 */
.main-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.page-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e0e7ff; /* indigo-100 */
    border: 1px solid #c7d2fe; /* indigo-200 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5; /* indigo-600 */
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

/* 内容区域样式 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.content-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-header {
    margin-bottom: 32px;
}

.section-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Agent 卡片网格 */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.agent-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.08);
    border-color: transparent;
}

.agent-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.enter-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #10b981; /* 绿色 */
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.agent-card:hover .enter-btn {
    opacity: 1;
    transform: translateX(0);
}

.agent-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.agent-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}