/* 文件位置: static/css/style.css */
:root {
    --primary: #2563EB;        /* 品牌蓝 */
    --primary-hover: #1D4ED8;
    --bg-body: #F3F4F6;        /* 网页背景浅灰 */
    --bg-sidebar: #0F172A;     /* 侧边栏深蓝黑 */
    --text-main: #111827;
    --text-sub: #6B7280;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* 全局重置 */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden; /* 只有内容区滚动 */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* === 布局系统 (Layout) === */
.layout-container { display: flex; height: 100vh; width: 100vw; }

/* 1. 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: 0.3s;
}
.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand span { color: #3B82F6; margin-left: 6px; }

.menu { flex: 1; padding: 16px 12px; overflow-y: auto; }
.menu-label {
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
    margin: 20px 0 10px 12px; font-weight: 600; opacity: 0.6;
}
.nav-item {
    display: flex; align-items: center; padding: 12px 16px;
    border-radius: var(--radius); margin-bottom: 4px; cursor: pointer;
    color: #CBD5E1; transition: 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.nav-item.active { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.nav-icon { width: 20px; height: 20px; margin-right: 12px; fill: currentColor; }

/* 2. 主体区域 */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* 3. 顶部导航 */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}
.breadcrumb { color: var(--text-sub); font-size: 14px; }
.user-profile { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.avatar { width: 36px; height: 36px; background: #E0E7FF; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* 4. 内容中心 */
.content-area {
    flex: 1; overflow-y: auto; padding: 32px;
    background: var(--bg-body);
}
.page-header { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-main); }

/* === UI 组件库 === */
.card {
    background: var(--white); border-radius: 12px; padding: 24px;
    box-shadow: var(--shadow-card); margin-bottom: 24px; border: 1px solid var(--border);
}

/* 登录页专用样式 (Split Layout) */
.auth-container {
    display: flex; height: 100vh; width: 100vw; background: var(--white);
}
.auth-left {
    flex: 1; background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    color: white; padding: 40px; position: relative; overflow: hidden;
}
/* 装饰圆圈 */
.circle-bg { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1); }
.c1 { width: 300px; height: 300px; top: -50px; left: -50px; }
.c2 { width: 500px; height: 500px; bottom: -100px; right: -100px; }

.auth-right {
    width: 500px; display: flex; align-items: center; justify-content: center; padding: 40px;
    background: var(--white);
}
.auth-box { width: 100%; max-width: 360px; }

.input-group { margin-bottom: 20px; position: relative; }
.input-label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: #374151; }
.input-control {
    width: 100%; padding: 12px 16px; border: 1px solid #D1D5DB; border-radius: 8px;
    font-size: 14px; transition: 0.2s; background: #F9FAFB;
}
.input-control:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.btn-block {
    width: 100%; padding: 12px; background: var(--primary); color: white; border: none;
    border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; transition: 0.2s;
}
.btn-block:hover { background: var(--primary-hover); transform: translateY(-1px); }
.auth-switch { margin-top: 24px; text-align: center; color: var(--text-sub); }
.auth-switch a { color: var(--primary); font-weight: 600; cursor: pointer; }

/* 响应式适配 */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; z-index: 100; height: 100%; }
    .sidebar.open { left: 0; }
    .auth-left { display: none; }
    .auth-right { width: 100%; }
}