/* ==========================================================================
   成绩查询与分析平台 · 设计系统
   深墨蓝 + 钴蓝强调色，克制的商业界面风格
   ========================================================================== */

:root {
    --bg: #f2f4f8;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #edf0f6;
    --ink: #0b1220;
    --ink-2: #354055;
    --muted: #77809a;
    --line: #e3e7f0;
    --line-strong: #cfd6e4;

    --brand: #2253e6;
    --brand-dark: #1a3fb8;
    --brand-soft: #e9eeff;
    --accent: #c98a22;
    --accent-soft: #fbf2df;
    --danger: #c4473f;
    --danger-soft: #fceded;
    --teal: #0e8fa3;
    --teal-soft: #e5f6f8;

    --navy: #0a1020;
    --navy-2: #101a33;
    --navy-3: #1a2540;

    --radius-lg: 18px;
    --radius: 12px;
    --radius-sm: 9px;

    --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
    --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 18px 40px -32px rgba(11, 18, 32, .45);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }

::selection { background: rgba(34, 83, 230, .16); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 9px 14px; border-radius: 8px;
    background: var(--ink); color: #fff; font-size: 12px;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- 工具类 */
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num,
.table-num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.pos { color: var(--brand); }
.neg { color: var(--danger); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

/* ---------------------------------------------------------------- 应用框架 */
.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    background: var(--navy);
    border-right: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
    padding: 22px 16px 18px;
    z-index: 60;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 20px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand);
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2.5px;
    padding: 9px 8px;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.brand-mark span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #fff;
}
.brand-mark span:nth-child(1) { height: 7px; opacity: .62; }
.brand-mark span:nth-child(2) { height: 12px; opacity: .82; }
.brand-mark span:nth-child(3) { height: 16px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 14.5px; letter-spacing: .02em; color: #fff; font-weight: 600; }
.brand-text small {
    font-size: 8px; letter-spacing: .18em; color: #64708c; margin-top: 4px;
    font-family: var(--mono);
}

.exam-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 16px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .03);
    font-size: 11.5px;
    color: #a7b1c7;
}
.exam-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #5b7cff; flex: 0 0 auto;
    box-shadow: 0 0 0 3px rgba(91, 124, 255, .16);
}

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.nav-label {
    margin: 16px 10px 7px;
    font-size: 9.5px;
    letter-spacing: .18em;
    color: #5c6884;
    text-transform: uppercase;
    font-family: var(--mono);
}
.nav-label:first-child { margin-top: 2px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    color: #a7b1c7;
    font-size: 13px;
    transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 500; }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 2px;
    background: #5b7cff;
}
.nav-item .icon { width: 17px; height: 17px; flex: 0 0 auto; opacity: .78; }
.nav-item.active .icon { opacity: 1; color: #93a9ff; }

.nav-badge {
    margin-left: auto;
    font-size: 9px;
    font-family: var(--mono);
    letter-spacing: .05em;
    color: #93a9ff;
    border: 1px solid rgba(147, 169, 255, .3);
    border-radius: 999px;
    padding: 1px 6px;
}

.sidebar-foot { padding-top: 14px; }
.user-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .035);
}
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(91, 124, 255, .18);
    color: #b9c8ff;
    font-weight: 600;
    display: grid;
    place-items: center;
    font-size: 14px;
    flex: 0 0 auto;
}
.user-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.user-card-text strong { font-size: 12.5px; font-weight: 600; color: #fff; }
.user-card-text span {
    font-size: 10px; color: #7b87a3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .icon-btn { color: #7b87a3; }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.icon-btn {
    border: 0; background: transparent; color: var(--muted);
    width: 30px; height: 30px; border-radius: 7px;
    display: inline-grid; place-items: center; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn .icon { width: 16px; height: 16px; }

.side-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    transition: background .15s;
}
.side-login:hover { background: var(--brand-dark); }
.side-login .icon { width: 16px; height: 16px; opacity: .8; }
.sidebar-note { margin: 12px 4px 0; font-size: 10px; color: #5c6884; line-height: 1.6; }

.main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    height: 62px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px;
    background: rgba(242, 244, 248, .86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.menu-btn { display: none; }
.crumbs {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--muted); white-space: nowrap;
    min-width: 0;
}
.crumbs span:first-child { overflow: hidden; text-overflow: ellipsis; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--line-strong); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-chip {
    font-size: 10.5px; color: var(--ink-2);
    padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    font-family: var(--mono);
    letter-spacing: .02em;
}
.topbar-user { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.topbar-user em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 5px; }
.topbar-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: none; place-items: center;
    background: var(--brand-soft); color: var(--brand);
    font-size: 12px; font-weight: 600;
}
.topbar-login { color: var(--brand); }
.topbar-admin {
    font-size: 11px; color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 3px 9px; background: var(--surface);
}
.topbar-admin:hover { color: var(--brand); border-color: var(--brand); }

.content { width: 100%; max-width: 1220px; margin: 0 auto; padding: 30px 30px 56px; flex: 1; }
.content.wide { max-width: 1340px; }

.site-footer {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 18px 30px 24px;
    font-size: 10.5px; color: var(--muted);
    border-top: 1px solid var(--line);
    max-width: 1220px; width: 100%; margin: 0 auto;
}

.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 55;
    background: rgba(6, 11, 24, .5);
    backdrop-filter: blur(2px);
}

/* 移动端底部导航（桌面隐藏） */
.tabbar { display: none; }

/* ---------------------------------------------------------------- 通用组件 */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; margin-bottom: 24px;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    margin: 0 0 8px; font-size: 10px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--brand); font-weight: 600;
    font-family: var(--mono);
}
.eyebrow::before {
    content: ""; width: 14px; height: 1px; background: var(--brand); opacity: .6;
}
.page-head h1 {
    margin: 0; font-size: 28px; line-height: 1.25;
    letter-spacing: -.025em; font-weight: 650;
}
.page-desc { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; max-width: 720px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 16px;
}
.card-title { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-sub { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.card-tools { font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-grid.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.kpi {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px 14px;
    display: flex; flex-direction: column; gap: 3px;
    position: relative; overflow: hidden;
    transition: border-color .16s ease;
}
.kpi:hover { border-color: var(--line-strong); }
.kpi-label { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.kpi-value {
    font-size: 26px; font-weight: 650; line-height: 1.25;
    letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { font-size: 10.5px; color: var(--muted); }
.kpi.tone-gold .kpi-value { color: var(--accent); }
.kpi.tone-brand .kpi-value { color: var(--brand); }
.kpi.tone-danger .kpi-value { color: var(--danger); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 12.5px; font-weight: 500;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.btn:hover { border-color: #b9c2d4; background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #16213a; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); padding: 0 6px; }
.btn-ghost:hover { background: var(--brand-soft); border-color: transparent; }
.btn .icon { width: 15px; height: 15px; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 11.5px; }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 6px;
    font-size: 10.5px; line-height: 1.75;
    background: var(--surface-3); color: var(--ink-2);
    white-space: nowrap;
    font-weight: 500;
}
.chip-green { background: var(--brand-soft); color: var(--brand-dark); }
.chip-gold { background: var(--accent-soft); color: #8a5d13; }
.chip-red { background: var(--danger-soft); color: var(--danger); }
.chip-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 400; }
.chip-blue { background: var(--teal-soft); color: #0a7283; }

.bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--brand); }
.bar-fill.gold { background: var(--accent); }
.bar-fill.red { background: var(--danger); }

.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin: 30px 0 14px;
}
.section-head h2 {
    margin: 0; font-size: 16px; letter-spacing: -.015em; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
    content: ""; width: 3px; height: 13px; border-radius: 2px;
    background: var(--brand);
}
.section-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.section-head a { font-size: 11.5px; color: var(--brand); white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
    text-align: left; font-weight: 500; font-size: 10.5px; color: var(--muted);
    letter-spacing: .05em; padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    white-space: nowrap;
}
.table td {
    padding: 11px 12px; border-bottom: 1px solid var(--line);
    vertical-align: middle; white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfe; }
.table tbody tr.me td { background: var(--brand-soft); }
.table tbody tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.table .name-cell { font-weight: 600; }
.table .sub { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.table-num { text-align: right; font-variant-numeric: tabular-nums; }
.table-center { text-align: center; }
.table-compact td, .table-compact th { padding: 8px 10px; }

.rank-pill {
    display: inline-grid; place-items: center;
    min-width: 27px; height: 23px; padding: 0 6px;
    border-radius: 6px;
    background: var(--surface-3); color: var(--ink-2);
    font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rank-pill.r1 { background: #f6ecd2; color: #8a5d13; }
.rank-pill.r2 { background: #e9edf5; color: #4d5871; }
.rank-pill.r3 { background: #f7e8de; color: #8a4f2c; }

/* ---------------------------------------------------------------- 筛选/表单 */
.filter-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 13px 15px; margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: flex; align-items: center; gap: 7px; }
.field label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.input, .select {
    height: 34px; padding: 0 11px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); font-size: 12.5px; min-width: 112px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(34, 83, 230, .1);
}
.input::placeholder { color: #a6aec1; }
.filter-spacer { flex: 1; }

.tabs {
    display: flex; gap: 3px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px; overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    position: relative; padding: 9px 14px 11px; font-size: 12.5px; color: var(--muted);
    white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------------------------------------------------------- 登录页 */
.auth {
    min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
    background: var(--bg);
}
.auth-aside {
    position: relative; overflow-x: hidden; overflow-y: auto;
    background: var(--navy);
    color: #eef2fb;
    padding: 42px 54px 30px;
    display: flex; flex-direction: column;
    min-height: 100vh;
    scrollbar-width: thin;
}
.auth-aside::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.12) 72%, transparent);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.12) 72%, transparent);
    pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand .brand-mark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.auth-brand strong { font-size: 14px; letter-spacing: .02em; color: #fff; }
.auth-brand small {
    display: block; font-size: 8px; letter-spacing: .18em;
    color: #64708c; margin-top: 4px; font-family: var(--mono);
}

.auth-copy { margin: auto 0 0; padding: 46px 0 24px; max-width: 470px; }
.auth-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 10px; letter-spacing: .1em; color: #a9b6d4;
    border: 1px solid rgba(255, 255, 255, .14);
    padding: 5px 11px; border-radius: 999px;
    font-family: var(--mono);
}
.auth-kicker i {
    width: 5px; height: 5px; border-radius: 50%;
    background: #5b7cff; display: block;
    box-shadow: 0 0 0 3px rgba(91, 124, 255, .18);
}
.auth-copy h1 {
    margin: 22px 0 14px;
    font-size: 42px; line-height: 1.24; font-weight: 650;
    letter-spacing: -.035em;
}
.auth-copy h1 em {
    font-style: normal; color: #93a9ff;
    border-bottom: 2px solid rgba(91, 124, 255, .45);
    padding-bottom: 1px;
}
.auth-copy p { margin: 0; color: #9aa6c2; font-size: 13px; line-height: 1.85; max-width: 400px; }

.auth-metrics {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px; background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px; overflow: hidden;
    margin-top: 30px;
}
.auth-metric { background: #0d1528; padding: 14px 16px; }
.auth-metric span { display: block; font-size: 10px; color: #7f8ba7; letter-spacing: .04em; }
.auth-metric strong {
    display: block; margin-top: 2px;
    font-size: 22px; font-weight: 600; letter-spacing: -.02em;
    font-variant-numeric: tabular-nums; color: #fff;
}
.auth-metric strong small { font-size: 10.5px; font-weight: 400; color: #7f8ba7; margin-left: 3px; }

.auth-visual {
    position: relative;
    margin-top: 18px;
    height: 186px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: #070c19;
    overflow: hidden;
    flex: 0 0 auto;
}
.auth-visual canvas { display: block; width: 100%; height: 100%; }
.auth-visual-head {
    position: absolute; left: 14px; right: 14px; top: 12px;
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 9.5px; letter-spacing: .1em; color: #64708c;
    font-family: var(--mono); pointer-events: none; z-index: 2;
}
.auth-visual-head strong { color: #93a9ff; font-weight: 500; }
.auth-fallback {
    position: absolute; inset: 0;
    display: none; flex-direction: column; justify-content: flex-end;
    padding: 44px 14px 12px;
}
.auth-visual.no3d .auth-fallback { display: flex; }
.auth-visual.no3d canvas { display: none; }
.auth-fallback svg { width: 100%; height: 112px; display: block; }
.auth-fallback-label {
    display: flex; justify-content: space-between;
    margin-top: 6px; font-size: 9px; color: #64708c; font-family: var(--mono);
}

.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 7vw; }
.auth-form { width: 100%; max-width: 364px; margin: 0 auto; }
.auth-mobile-head { display: none; width: 100%; max-width: 364px; margin: 0 auto; }
.auth-mobile-brand { display: flex; align-items: center; gap: 11px; }
.auth-mobile-brand strong { display: block; font-size: 14px; letter-spacing: .02em; color: var(--ink); }
.auth-mobile-brand small {
    display: block; font-size: 8px; letter-spacing: .18em; color: var(--muted);
    margin-top: 3px; font-family: var(--mono);
}
.auth-mobile-kicker {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 18px; padding: 5px 10px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: 9.5px; letter-spacing: .06em; color: var(--muted);
    font-family: var(--mono);
}
.auth-mobile-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.auth-form h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; font-weight: 650; }
.auth-form > p { margin: 7px 0 26px; color: var(--muted); font-size: 12.5px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.auth-input {
    width: 100%; height: 50px; padding: 0 15px;
    border: 1px solid var(--line-strong); border-radius: 10px;
    background: var(--surface); font-size: 15px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(34, 83, 230, .09);
}
.auth-submit {
    width: 100%; height: 50px; margin-top: 6px;
    border: 0; border-radius: 10px;
    background: var(--brand); color: #fff;
    font-size: 13.5px; font-weight: 500; letter-spacing: .04em;
    transition: background .15s;
}
.auth-submit:hover { background: var(--brand-dark); }
.auth-note { margin-top: 13px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.auth-error {
    margin-bottom: 16px; padding: 10px 13px;
    border: 1px solid #f0cfcb; background: var(--danger-soft);
    color: var(--danger); border-radius: var(--radius-sm); font-size: 12px;
}
.auth-links { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 24px; font-size: 11.5px; color: var(--muted); }
.auth-links a { border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.auth-links a:hover { color: var(--brand); border-color: var(--brand); }
.auth-foot { margin-top: 40px; font-size: 10px; color: #a6aec1; }

.match-list { margin-top: 18px; border-top: 1px solid var(--line); }
.match-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 4px; border-bottom: 1px solid var(--line);
    background: transparent; border-left: 0; border-right: 0; border-top: 0;
    width: 100%; text-align: left; font-size: 13px;
    transition: background .15s;
}
.match-item:hover { background: var(--surface-2); }
.match-item strong { font-weight: 600; }
.match-item span { font-size: 10.5px; color: var(--muted); }
.match-item .icon { width: 15px; height: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- 首页 */
.welcome-bar {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; margin-bottom: 20px;
}
.welcome-bar h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; font-weight: 650; }
.welcome-bar p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.welcome-date { font-size: 11px; color: var(--muted); font-family: var(--mono); }

.home-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.25fr 1fr;
    gap: 0;
    background: var(--navy);
    color: #eef2fb;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, .06);
    margin-bottom: 16px;
}
.home-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(120deg, rgba(0,0,0,.8), transparent 72%);
    -webkit-mask-image: linear-gradient(120deg, rgba(0,0,0,.8), transparent 72%);
    pointer-events: none;
}
.home-hero-main { position: relative; z-index: 1; padding: 28px 30px 26px; }
.home-hero-label {
    font-size: 9.5px; letter-spacing: .16em; color: #7f8ba7;
    text-transform: uppercase; font-family: var(--mono);
}
.home-score { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0 4px; }
.home-score strong {
    font-size: 62px; line-height: 1; font-weight: 650;
    letter-spacing: -.055em; font-variant-numeric: tabular-nums;
}
.home-score span { font-size: 12.5px; color: #93a0bd; padding-bottom: 8px; }
.home-meta { font-size: 11.5px; color: #93a0bd; }
.home-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.home-tags .chip { background: rgba(255, 255, 255, .07); color: #c2cce4; }
.home-tags .chip.chip-green { background: rgba(91, 124, 255, .2); color: #c3d1ff; }

.home-hero-side {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: rgba(255, 255, 255, .07);
    border-left: 1px solid rgba(255, 255, 255, .07);
}
.home-stat { background: #0c1324; padding: 17px 18px; display: flex; flex-direction: column; justify-content: center; }
.home-stat span { font-size: 10px; color: #7f8ba7; letter-spacing: .03em; }
.home-stat strong {
    font-size: 20px; font-weight: 600; margin-top: 2px;
    font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: #fff;
}
.home-stat strong small { font-size: 9.5px; color: #7f8ba7; font-weight: 400; margin-left: 2px; }

.hero-link {
    position: absolute; right: 26px; top: 24px; z-index: 2;
    font-size: 11px; color: #b9c8ff;
    border-bottom: 1px solid rgba(185, 200, 255, .35); padding-bottom: 2px;
}
.hero-link:hover { color: #fff; border-color: #fff; }

.line-mini-list { display: flex; flex-direction: column; gap: 11px; }
.line-mini {
    display: grid; grid-template-columns: 56px 1fr 78px; align-items: center; gap: 10px;
    font-size: 11.5px;
}
.line-mini .label { color: var(--ink-2); }
.line-mini .track { height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.line-mini .track i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.line-mini .track i.gold { background: var(--accent); }
.line-mini .track i.muted { background: #c9cfdc; }
.line-mini .val { text-align: right; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.line-mini .val.ok { color: var(--brand); font-weight: 600; }

.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subject-card {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 13px 14px; background: var(--surface);
    display: flex; flex-direction: column; gap: 6px;
    transition: border-color .15s;
}
.subject-card:hover { border-color: var(--line-strong); }
.subject-card .top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.subject-card .name { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.subject-card .score { font-size: 23px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.subject-card .score small { font-size: 9.5px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.subject-card .foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.subject-card .bar { margin-top: 1px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick-card:hover {
    border-color: #b9c8ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.quick-card .icon-wrap {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
}
.quick-card .icon { width: 16px; height: 16px; }
.quick-card strong { font-size: 12.5px; font-weight: 600; }
.quick-card span { font-size: 10.5px; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------- 成绩报告 */
.report-hero {
    display: grid; grid-template-columns: 1.1fr .9fr;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
}
.report-identity { padding: 24px 26px; border-right: 1px solid var(--line); }
.report-identity .eyebrow { color: var(--brand); }
.report-name { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.report-name h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; font-weight: 650; }
.report-name span { font-size: 11.5px; color: var(--muted); }
.report-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.report-score {
    padding: 24px 26px; display: flex; flex-direction: column; justify-content: center;
    background: var(--surface-2);
}
.report-score .label {
    font-size: 9.5px; color: var(--muted);
    letter-spacing: .12em; text-transform: uppercase; font-family: var(--mono);
}
.report-score .value { display: flex; align-items: flex-end; gap: 8px; margin-top: 3px; }
.report-score .value strong {
    font-size: 52px; line-height: 1; letter-spacing: -.05em;
    font-weight: 650; font-variant-numeric: tabular-nums;
}
.report-score .value span { font-size: 11.5px; color: var(--muted); padding-bottom: 6px; }
.report-score .raw { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.report-ranks {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; margin-bottom: 16px;
}
.report-rank { background: var(--surface); padding: 14px 18px; }
.report-rank span { display: block; font-size: 10px; color: var(--muted); }
.report-rank strong {
    display: block; margin-top: 2px;
    font-size: 20px; font-weight: 650;
    font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.report-rank strong small { font-size: 9.5px; color: var(--muted); font-weight: 400; margin-left: 2px; }

.line-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.line-card {
    position: relative; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); display: flex; flex-direction: column; gap: 4px;
}
.line-card.ok { border-color: #bdd0ff; background: #f7f9ff; }
.line-card.ok::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand); border-radius: 3px 0 0 3px;
}
.line-card .line-name {
    font-size: 10.5px; color: var(--muted);
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.line-card .line-score { font-size: 19px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.line-card .line-gap { font-size: 10.5px; color: var(--danger); }
.line-card.ok .line-gap { color: var(--brand); font-weight: 500; }
.line-card .check { color: var(--brand); font-size: 10.5px; }

.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.insight {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); padding: 17px 18px;
    display: flex; flex-direction: column; gap: 4px;
}
.insight-label {
    font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted); font-family: var(--mono);
    display: flex; align-items: center; gap: 6px;
}
.insight-label::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.insight-value { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.insight-value small { font-size: 10.5px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.insight-text { font-size: 11px; color: var(--muted); line-height: 1.65; }
.insight.good .insight-label::before { background: var(--brand); }
.insight.warn .insight-label::before { background: var(--accent); }
.insight.risk .insight-label::before { background: var(--danger); }

.subject-report-table .score-main { font-weight: 650; font-variant-numeric: tabular-nums; }
.subject-report-table .raw-note { font-size: 9.5px; color: var(--muted); }
.subject-report-table .bar { width: 72px; }

.chart { width: 100%; height: 300px; }
.chart-sm { height: 240px; }
.chart-lg { height: 350px; }

.position-note {
    display: flex; gap: 12px; padding: 12px 15px;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-sm); font-size: 11.5px; color: var(--ink-2);
}
.position-note strong { color: var(--ink); }

/* 逐题得分 */
.q-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.q-tab {
    padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line-strong);
    background: var(--surface); font-size: 11.5px; color: var(--ink-2);
    transition: border-color .15s, background .15s, color .15s;
}
.q-tab:hover { border-color: var(--brand); color: var(--brand); }
.q-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.q-panel { display: none; }
.q-panel.active { display: block; }
.q-summary { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
.q-summary strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.q-legend { display: flex; gap: 16px; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.q-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }

/* ---------------------------------------------------------------- 排行榜 */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.podium-card {
    position: relative; padding: 19px 20px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); overflow: hidden;
}
.podium-card.top1 { border-color: #e4c98d; background: #fffdf7; }
.podium-card .place {
    font-size: 9.5px; letter-spacing: .14em; color: var(--muted);
    text-transform: uppercase; font-family: var(--mono);
}
.podium-card .who { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.podium-card .who strong { font-size: 20px; letter-spacing: -.015em; }
.podium-card .who span { font-size: 10.5px; color: var(--muted); }
.podium-card .score-line { display: flex; align-items: flex-end; gap: 6px; margin-top: 7px; }
.podium-card .score-line strong {
    font-size: 31px; line-height: 1; font-weight: 650;
    letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.podium-card .score-line span { font-size: 10px; color: var(--muted); padding-bottom: 4px; }
.podium-card .medal {
    position: absolute; right: 16px; top: 16px;
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 10.5px; font-weight: 600;
    background: var(--surface-3); color: var(--ink-2);
}
.podium-card.top1 .medal { background: #f6ecd2; color: #8a5d13; }
.podium-card.top2 .medal { background: #e9edf5; color: #4d5871; }
.podium-card.top3 .medal { background: #f7e8de; color: #8a4f2c; }
.my-rank-note {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 16px; border: 1px solid #c5d3ff; background: #f5f8ff;
    border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 12px;
    flex-wrap: wrap;
}
.my-rank-note strong { color: var(--brand-dark); font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 班级 */
.class-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.class-card {
    display: flex; flex-direction: column; gap: 11px;
    padding: 18px 19px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.class-card:hover {
    border-color: #b9c8ff; box-shadow: var(--shadow); transform: translateY(-2px);
}
.class-card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.class-card .class-name {
    font-size: 19px; font-weight: 650; letter-spacing: -.02em;
    display: flex; align-items: center; gap: 8px;
}
.class-card .class-name i {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
    font-size: 11px; font-style: normal; font-weight: 600;
    font-family: var(--mono);
}
.class-card .class-rank { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.class-card .class-rank strong { color: var(--accent); font-size: 13px; }
.class-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.class-metric span { display: block; font-size: 9.5px; color: var(--muted); }
.class-metric strong { display: block; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.class-card .bar-row { display: flex; align-items: center; gap: 9px; font-size: 10px; color: var(--muted); }
.class-card .bar-row .bar { flex: 1; }
.class-card .foot {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 10.5px; color: var(--muted);
    border-top: 1px solid var(--line); padding-top: 10px;
}
.class-card .foot a { color: var(--brand); }

.class-hero {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    padding: 24px 26px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); margin-bottom: 16px;
}
.class-hero h1 { margin: 0; font-size: 30px; letter-spacing: -.035em; font-weight: 650; }
.class-hero p { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); }
.class-hero .hero-metrics { display: flex; gap: 28px; flex-wrap: wrap; }
.class-hero .hero-metrics span { display: block; font-size: 9.5px; color: var(--muted); }
.class-hero .hero-metrics strong { display: block; font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.critical-list { display: flex; flex-direction: column; }
.critical-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px;
}
.critical-row:last-child { border-bottom: 0; }
.critical-row .who { display: flex; align-items: center; gap: 9px; }
.critical-row .diff { font-size: 10.5px; color: var(--danger); font-variant-numeric: tabular-nums; }
.critical-row .diff.ok { color: var(--brand); }

/* ---------------------------------------------------------------- 分析页 */
.compare-row { display: grid; grid-template-columns: 76px 1fr 60px; align-items: center; gap: 10px; font-size: 11.5px; }
.compare-row .name { color: var(--ink-2); }
.compare-row .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-bar-pair { display: flex; flex-direction: column; gap: 3px; }
.mini-bar-pair .track { height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.mini-bar-pair .track i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.mini-bar-pair .track.city i { background: #b9c2d4; }
.legend { display: flex; gap: 14px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }

.data-note { font-size: 10.5px; color: var(--muted); line-height: 1.85; }
.data-note strong { color: var(--ink-2); }
.data-note code { font-family: var(--mono); font-size: 10px; background: var(--surface-3); padding: 1px 4px; border-radius: 4px; }

/* ---------------------------------------------------------------- 一分一段 */
.score-check {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    padding: 0; overflow: hidden; margin-bottom: 16px;
}
.score-check-form { padding: 24px 26px; border-right: 1px solid var(--line); }
.score-check-form h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.score-check-form p { margin: 4px 0 16px; font-size: 11px; color: var(--muted); }
.score-input-row { display: flex; gap: 8px; }
.score-input-row .input {
    flex: 1; height: 46px; font-size: 18px; font-weight: 600;
    font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.score-input-row .btn { height: 46px; padding: 0 20px; }
.score-input-hint { margin-top: 9px; font-size: 10px; color: var(--muted); }
.score-result {
    padding: 24px 26px; background: var(--surface-2);
    display: flex; flex-direction: column; justify-content: center;
}
.score-result-label {
    font-size: 9.5px; letter-spacing: .12em; color: var(--muted);
    text-transform: uppercase; font-family: var(--mono);
}
.score-result-rank {
    display: flex; align-items: baseline; gap: 8px; margin: 3px 0 2px;
}
.score-result-rank strong {
    font-size: 46px; line-height: 1; font-weight: 650;
    letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--brand);
}
.score-result-rank span { font-size: 11.5px; color: var(--muted); }
.score-result-meta { font-size: 11.5px; color: var(--muted); }
.score-result-lines { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.score-result-empty {
    padding: 24px 26px; background: var(--surface-2);
    display: flex; flex-direction: column; justify-content: center;
    font-size: 11.5px; color: var(--muted); line-height: 1.8;
}
.score-result-empty strong { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 2px; font-weight: 600; }

/* ---------------------------------------------------------------- 分页 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 16px 2px 0; }
.pager-btn, .pager-num {
    display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px;
    border: 1px solid var(--line-strong); border-radius: 7px;
    font-size: 11px; color: var(--ink-2); background: var(--surface);
}
.pager-num { min-width: 30px; padding: 0; }
.pager-btn:hover, .pager-num:hover { border-color: var(--brand); color: var(--brand); }
.pager-num.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-btn.disabled { opacity: .4; pointer-events: none; }
.pager-dots { font-size: 11px; color: var(--muted); padding: 0 2px; }
.pager-info { margin-left: auto; font-size: 10px; color: var(--muted); }

/* ---------------------------------------------------------------- 空状态 */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.empty strong { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }

/* ---------------------------------------------------------------- 管理后台 */
.admin-body { background: var(--bg); }
.admin-login { max-width: 400px; margin: 10vh auto; padding: 0 20px; }
.admin-login .card { padding: 30px; }
.admin-login .brand-text strong { color: var(--ink); }
.admin-login .brand-text small { color: var(--muted); }
.admin-login h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.025em; font-weight: 650; }
.admin-login p { margin: 0 0 22px; color: var(--muted); font-size: 11.5px; }
.admin-form .field { display: block; margin-bottom: 14px; }
.admin-form label { display: block; font-size: 11.5px; color: var(--ink-2); margin-bottom: 6px; }
.admin-form .input { width: 100%; height: 42px; }
.admin-form .btn { width: 100%; height: 44px; margin-top: 6px; }
.admin-back { display: inline-block; margin-top: 18px; font-size: 11.5px; color: var(--muted); }
.admin-back:hover { color: var(--brand); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-grid.g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .line-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-hero { grid-template-columns: 1.15fr 1fr; }
}

@media (max-width: 1024px) {
    .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .insight-grid .insight:last-child { grid-column: span 2; }
    .score-check { grid-template-columns: 1fr; }
    .score-check-form { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
    body { padding-bottom: 64px; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform .24s cubic-bezier(.2, .7, .3, 1);
        box-shadow: 24px 0 60px rgba(6, 11, 24, .28);
        width: 266px;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-grid; }
    .topbar { padding: 0 18px; }
    .content { padding: 22px 18px 36px; }
    .site-footer { padding: 16px 18px 22px; flex-direction: column; gap: 4px; }

    .tabbar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar a {
        display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 4px 0 3px; border-radius: 8px;
        font-size: 9.5px; color: var(--muted);
        min-height: 48px; justify-content: center;
    }
    .tabbar a .icon { width: 19px; height: 19px; }
    .tabbar a.active { color: var(--brand); }
    .tabbar a.active .icon { color: var(--brand); }

    .auth { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { padding: 52px 24px; min-height: 100vh; justify-content: flex-start; }
    .auth-mobile-head { display: block; margin-bottom: 38px; }
    .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-2, .span-3, .span-4 { grid-column: span 1; }
    .home-hero { grid-template-columns: 1fr; }
    .home-hero-side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .07); grid-template-columns: repeat(4, 1fr); }
    .hero-link { top: 20px; right: 20px; }
}

@media (max-width: 760px) {
    .report-hero { grid-template-columns: 1fr; }
    .report-identity { border-right: 0; border-bottom: 1px solid var(--line); }
    .report-score { align-items: flex-start; }
    .class-hero { flex-direction: column; align-items: flex-start; }
    .class-hero .hero-metrics { gap: 20px; }
    .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .line-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero-side { grid-template-columns: repeat(2, 1fr); }
    .topbar-chip { display: none; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-head h1 { font-size: 24px; }
    .kpi-grid, .kpi-grid.g-3, .kpi-grid.g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-2 { grid-template-columns: 1fr; }
    .podium { grid-template-columns: 1fr; }
    .podium-card .score-line strong { font-size: 27px; }

    /* 表格转卡片 */
    .table--stack thead { display: none; }
    .table--stack,
    .table--stack tbody,
    .table--stack tr,
    .table--stack td { display: block; width: 100%; }
    .table--stack tbody tr {
        border: 1px solid var(--line);
        border-radius: 11px;
        background: var(--surface);
        margin: 0 0 9px;
        padding: 5px 0;
        overflow: hidden;
    }
    .table--stack tbody tr:last-child { margin-bottom: 0; }
    .table--stack tbody tr:hover td { background: transparent; }
    .table--stack tbody tr.me { border-color: #b9c8ff; background: #f7f9ff; }
    .table--stack tbody tr.me td:first-child { box-shadow: none; }
    .table--stack td {
        display: flex; align-items: center; justify-content: space-between; gap: 14px;
        border: 0; padding: 6px 14px; white-space: normal; text-align: right;
        min-height: 32px;
    }
    .table--stack td::before {
        content: attr(data-label);
        flex: 0 0 40%;
        text-align: left;
        font-size: 10.5px;
        font-weight: 400;
        color: var(--muted);
        white-space: nowrap;
    }
    .table--stack td:first-child {
        padding-top: 9px;
        padding-bottom: 9px;
        background: var(--surface-2);
        margin-bottom: 2px;
        border-bottom: 1px solid var(--line);
    }
    .table--stack td:first-child::before { display: none; }
    .table--stack td:first-child .rank-pill { margin-right: auto; }
    .table--stack td.name-cell { display: flex; }
    .table--stack td.name-cell::before { display: none; }
    .table--stack td.name-cell { font-size: 14px; }
    .table--stack td.name-cell { justify-content: flex-start; }
    .table--stack td[colspan]::before { display: none; }
    .table--stack td[colspan] { display: block; text-align: center; }
    .table--stack .table-wrap { padding: 12px; }
    .card.flush > .table-wrap { padding: 12px; }
    .table--stack { border-collapse: separate; }
    .table--stack tr:not(.me) { box-shadow: 0 1px 1px rgba(11, 18, 32, .03); }
}

@media (max-width: 560px) {
    .content { padding: 18px 14px 32px; }
    .topbar { height: 56px; padding: 0 14px; }
    .topbar-user { display: none; }
    .topbar-avatar { display: grid; }
    .crumbs { font-size: 11.5px; }
    .page-head h1 { font-size: 22px; }
    .page-desc { font-size: 11.5px; }
    .card { padding: 16px; }
    .card.flush { padding: 0; }
    .kpi { padding: 13px 14px 12px; }
    .kpi-value { font-size: 23px; }
    .section-head { margin: 24px 0 12px; align-items: flex-start; flex-direction: column; gap: 6px; }
    .home-hero-main { padding: 22px 20px; }
    .home-score strong { font-size: 50px; }
    .home-stat { padding: 13px 14px; }
    .home-stat strong { font-size: 17px; }
    .auth-copy h1 { font-size: 34px; }
    .auth-main { padding: 42px 20px; }
    .auth-form { max-width: 100%; }
    .report-identity, .report-score { padding: 20px; }
    .report-name h1 { font-size: 24px; }
    .report-score .value strong { font-size: 44px; }
    .report-rank { padding: 12px 14px; }
    .report-rank strong { font-size: 17px; }
    .line-card { padding: 12px 13px; }
    .subject-grid { gap: 8px; }
    .subject-card { padding: 11px 12px; }
    .subject-card .score { font-size: 20px; }
    .quick-grid { grid-template-columns: 1fr; }
    .class-grid { grid-template-columns: 1fr; }
    .insight-grid { grid-template-columns: 1fr; }
    .insight-grid .insight:last-child { grid-column: span 1; }
    .kpi-grid, .kpi-grid.g-3, .kpi-grid.g-5 { gap: 8px; }
    .filter-bar { padding: 11px 12px; gap: 8px; }
    .filter-bar .field { flex: 1 1 44%; }
    .filter-bar .input, .filter-bar .select { width: 100%; min-width: 0; }
    .filter-spacer { display: none; }
    .score-check-form, .score-result, .score-result-empty { padding: 18px; }
    .score-input-row .input { height: 44px; font-size: 17px; }
    .score-result-rank strong { font-size: 40px; }
    .chart { height: 250px; }
    .chart-lg { height: 290px; }
    .chart-sm { height: 210px; }
    .line-mini { grid-template-columns: 48px 1fr 72px; }
    .q-tab { padding: 6px 10px; }
    .podium-card { padding: 16px; }
    .class-hero { padding: 20px; }
    .data-note { font-size: 10px; }
    .site-footer { font-size: 9.5px; }
}

@media (max-height: 850px) {
    .auth-aside { padding-top: 30px; padding-bottom: 24px; }
    .auth-copy { padding: 26px 0 16px; }
    .auth-copy h1 { font-size: 36px; margin: 16px 0 10px; }
    .auth-copy p { font-size: 12px; line-height: 1.75; }
    .auth-metrics { margin-top: 20px; }
    .auth-metric { padding: 11px 14px; }
    .auth-visual { height: 158px; margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    body { background: #fff; padding-bottom: 0; }
    .sidebar, .topbar, .site-footer, .page-actions, .no-print,
    .sidebar-overlay, .pager, .q-tabs, .tabbar { display: none !important; }
    .main { margin: 0; }
    .content { max-width: none; padding: 0; }
    .card, .report-hero, .kpi, .line-card { box-shadow: none; border-color: #d8dbe2; break-inside: avoid; }
    .chart { height: 230px; }
    .report-hero, .line-card, .card, .insight { page-break-inside: avoid; }
    .home-hero { background: #fff !important; color: var(--ink) !important; border-color: #d8dbe2; }
    .home-hero::before { display: none; }
    .home-stat { background: #fff !important; }
}

/* ==========================================================================
   2.0 扩展组件：多考试 / 命令面板 / AI / 数据大屏
   ========================================================================== */

/* ---------------- 侧栏考试切换 ---------------- */
.exam-switch { padding: 6px 9px; gap: 7px; cursor: pointer; }
.exam-switch select {
    flex: 1; min-width: 0; width: 100%;
    background: transparent; border: 0; outline: 0;
    color: #c3cde4; font-size: 11px; line-height: 1.4;
    appearance: none; -webkit-appearance: none;
    padding: 3px 16px 3px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237b87a3' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    text-overflow: ellipsis;
}
.exam-switch select option { background: #101a33; color: #e8edf9; }
.exam-switch:hover { border-color: rgba(147, 169, 255, .3); background: rgba(255, 255, 255, .05); }

/* ---------------- 登录页：考试切换 / 同名卡片 ---------------- */
.match-meta {
    display: inline-block; margin: 3px 0 1px;
    font-size: 10px; color: var(--brand);
    background: var(--brand-soft); border-radius: 4px; padding: 1px 6px;
}
.exam-pills {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 16px 0 4px; align-items: center;
}
.exam-pills-label {
    width: 100%; font-size: 9.5px; letter-spacing: .14em;
    color: var(--muted); text-transform: uppercase; font-family: var(--mono);
}
.exam-pill {
    font-size: 10.5px; padding: 5px 10px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    color: var(--ink-2); background: var(--surface);
    transition: border-color .15s, color .15s, background .15s;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.exam-pill:hover { border-color: var(--brand); color: var(--brand); }
.exam-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------------- 顶栏：搜索 / AI ---------------- */
.topbar-search {
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 8px 0 10px;
    border: 1px solid var(--line-strong); border-radius: 8px;
    background: rgba(255, 255, 255, .72); color: var(--muted);
    font-size: 11.5px; transition: border-color .15s, color .15s, background .15s;
}
.topbar-search:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.topbar-search .icon { width: 15px; height: 15px; }
.topbar-search kbd {
    font-family: var(--mono); font-size: 9.5px; line-height: 1;
    padding: 3px 5px; border-radius: 4px;
    border: 1px solid var(--line-strong); background: var(--surface-2);
    color: var(--muted);
}
.topbar-ai {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: 8px;
    background: linear-gradient(135deg, #1a3fb8, #2253e6);
    color: #fff; font-size: 11.5px; font-weight: 500;
    box-shadow: 0 6px 16px -10px rgba(34, 83, 230, .8);
    transition: transform .15s, box-shadow .15s;
}
.topbar-ai:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(34, 83, 230, .9); }
.topbar-ai .icon { width: 14px; height: 14px; }

/* ---------------- 命令面板 ---------------- */
body.cmdk-open { overflow: hidden; }
.cmdk {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 12vh 20px 20px;
}
.cmdk[hidden] { display: none; }
.cmdk-backdrop {
    position: absolute; inset: 0;
    background: rgba(6, 11, 24, .5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: cmdkFade .16s ease;
}
.cmdk-box {
    position: relative; width: min(620px, 100%);
    background: var(--surface); border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .4);
    box-shadow: 0 40px 90px -30px rgba(6, 11, 24, .55);
    overflow: hidden;
    animation: cmdkIn .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
.cmdk-input-row {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.cmdk-input-row .icon { width: 18px; height: 18px; color: var(--muted); }
.cmdk-input-row input {
    flex: 1; border: 0; outline: 0; background: transparent;
    font-size: 15px; color: var(--ink);
}
.cmdk-input-row input::placeholder { color: #a4acbf; }
.cmdk-input-row kbd, .cmdk-foot kbd {
    font-family: var(--mono); font-size: 9px; line-height: 1;
    padding: 4px 6px; border-radius: 4px;
    border: 1px solid var(--line-strong); background: var(--surface-2);
    color: var(--muted);
}
.cmdk-results { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.cmdk-group {
    margin: 8px 10px 4px; font-size: 9.5px; letter-spacing: .14em;
    color: var(--muted); text-transform: uppercase; font-family: var(--mono);
}
.cmdk-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px; border-radius: 8px;
    transition: background .12s;
}
.cmdk-item.active, .cmdk-item:hover { background: var(--brand-soft); }
.cmdk-item-icon { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; }
.cmdk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .55; }
.cmdk-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--navy); color: #cdd9ff; font-size: 11px;
}
.cmdk-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.4; }
.cmdk-item-text strong { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cmdk-item-text small {
    font-size: 10.5px; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmdk-item-enter { opacity: 0; font-size: 11px; color: var(--brand); }
.cmdk-item.active .cmdk-item-enter { opacity: 1; }
.cmdk-empty { padding: 32px 16px; text-align: center; font-size: 12px; color: var(--muted); }
.cmdk-foot {
    display: flex; gap: 16px; align-items: center;
    padding: 9px 16px; border-top: 1px solid var(--line);
    font-size: 10px; color: var(--muted); background: var(--surface-2);
}
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot [data-cmdk-tip] { margin-left: auto; }

/* ---------------- AI 助手页 ---------------- */
.ai-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px; align-items: start;
}
.ai-chat { padding: 0; display: flex; flex-direction: column; min-height: 620px; }
.ai-chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.ai-chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-chat-title > div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.ai-chat-title strong { font-size: 13px; font-weight: 600; }
.ai-chat-title span { font-size: 10.5px; color: var(--muted); }
.ai-orb {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #1a3fb8, #2253e6 60%, #5b7cff);
    color: #fff; box-shadow: 0 8px 18px -10px rgba(34, 83, 230, .9);
}
.ai-orb .icon { width: 18px; height: 18px; }
.ai-model { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.ai-model select {
    border: 1px solid var(--line); border-radius: 6px;
    background: var(--surface-2); color: var(--ink-2);
    font-size: 10.5px; padding: 4px 6px; max-width: 168px;
}
.ai-chat-body {
    flex: 1; overflow-y: auto; padding: 20px;
    max-height: 64vh; min-height: 320px;
    scroll-behavior: smooth;
}
.ai-welcome { text-align: center; padding: 14px 10px 6px; }
.ai-welcome-orb {
    width: 52px; height: 52px; margin: 0 auto 12px;
    border-radius: 15px; display: grid; place-items: center;
    background: linear-gradient(135deg, #e9eeff, #dce6ff);
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(34, 83, 230, .12);
}
.ai-welcome-orb .icon { width: 24px; height: 24px; }
.ai-welcome h2 { font-size: 17px; letter-spacing: -.02em; font-weight: 600; }
.ai-welcome p {
    max-width: 460px; margin: 6px auto 18px;
    font-size: 11.5px; color: var(--muted); line-height: 1.75;
}
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ai-suggest-item {
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--ink-2);
    font-size: 11px; padding: 6px 12px;
    transition: border-color .15s, color .15s, background .15s;
}
.ai-suggest-item:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.ai-msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.ai-msg--user { flex-direction: row-reverse; }
.ai-msg-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
    display: grid; place-items: center;
    font-size: 10.5px; font-weight: 600;
    background: var(--surface-3); color: var(--ink-2);
}
.ai-msg--assistant .ai-msg-avatar { background: var(--navy); color: #c9d7ff; }
.ai-msg-body {
    max-width: 84%; padding: 10px 13px; border-radius: 12px;
    font-size: 12.5px; line-height: 1.78; color: var(--ink-2);
    background: var(--surface-2); border: 1px solid var(--line);
    overflow-wrap: anywhere;
}
.ai-msg--user .ai-msg-body {
    background: var(--brand); border-color: var(--brand); color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-msg--assistant .ai-msg-body { border-bottom-left-radius: 4px; }
.ai-msg-body p { margin: 0 0 8px; }
.ai-msg-body p:last-child { margin-bottom: 0; }
.ai-msg-body h3, .ai-msg-body h4, .ai-msg-body h5, .ai-msg-body h6 {
    margin: 10px 0 5px; font-size: 12.5px; font-weight: 650; color: var(--ink);
}
.ai-msg-body ul { margin: 4px 0 8px; padding-left: 18px; }
.ai-msg-body li { margin: 2px 0; }
.ai-msg-body strong { color: var(--ink); font-weight: 650; }
.ai-msg-body code {
    font-family: var(--mono); font-size: 11px;
    background: rgba(34, 83, 230, .08); color: var(--brand-dark);
    padding: 1px 4px; border-radius: 4px;
}
.ai-msg--user .ai-msg-body code { background: rgba(255, 255, 255, .18); color: #fff; }
.ai-table-wrap { overflow-x: auto; margin: 8px 0 10px; }
.ai-msg-body table, .ai-report-content table {
    width: 100%; border-collapse: collapse; font-size: 11.5px;
    background: var(--surface);
}
.ai-msg-body th, .ai-msg-body td,
.ai-report-content th, .ai-report-content td {
    border: 1px solid var(--line); padding: 5px 8px; text-align: left;
    white-space: nowrap;
}
.ai-msg-body th, .ai-report-content th {
    background: var(--surface-3); font-weight: 600; color: var(--ink);
}
.ai-msg-body tr:nth-child(even) td, .ai-report-content tr:nth-child(even) td { background: rgba(247, 249, 252, .7); }
.ai-msg-body hr, .ai-report-content hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.ai-typing .ai-msg-body { display: flex; gap: 4px; align-items: center; min-height: 38px; }
.ai-typing .ai-msg-body span {
    width: 5px; height: 5px; border-radius: 50%; background: #9aa7c7;
    animation: aiDot 1.1s infinite ease-in-out;
}
.ai-typing .ai-msg-body span:nth-child(2) { animation-delay: .15s; }
.ai-typing .ai-msg-body span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ai-composer { border-top: 1px solid var(--line); padding: 12px 14px 14px; background: var(--surface); }
.ai-composer textarea {
    width: 100%; resize: none; border: 1px solid var(--line-strong);
    border-radius: 10px; padding: 10px 12px;
    font-size: 12.5px; line-height: 1.65; outline: 0;
    background: var(--surface-2); color: var(--ink);
    transition: border-color .15s, background .15s;
}
.ai-composer textarea:focus { border-color: var(--brand); background: #fff; }
.ai-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.ai-hint { font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.ai-composer .btn { flex: 0 0 auto; }
.btn.loading { opacity: .7; pointer-events: none; }

.ai-side { display: grid; gap: 12px; align-content: start; }
.ai-context { padding: 16px; }
.ai-context-head { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ai-context-icon {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
}
.ai-context-icon .icon { width: 17px; height: 17px; }
.ai-context-head div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.ai-context-head strong { font-size: 12px; font-weight: 600; }
.ai-context-head span { font-size: 10px; color: var(--muted); }
.ai-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; padding: 12px 0; }
.ai-context-grid div { display: flex; flex-direction: column; }
.ai-context-grid span { font-size: 9.5px; color: var(--muted); }
.ai-context-grid strong { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ai-me { border-top: 1px dashed var(--line); padding-top: 11px; }
.ai-me-score { display: flex; align-items: baseline; justify-content: space-between; }
.ai-me-score span { font-size: 10px; color: var(--muted); }
.ai-me-score strong { font-size: 24px; color: var(--brand); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ai-me-ranks { display: flex; gap: 14px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.ai-me-ranks strong { color: var(--ink-2); }
.ai-login-tip {
    display: block; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line);
    font-size: 10.5px; color: var(--brand);
}
.ai-capabilities { padding: 16px; }
.ai-capabilities h3 { font-size: 11.5px; font-weight: 600; margin-bottom: 10px; }
.ai-capabilities ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ai-capabilities li { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--ink-2); }
.ai-capabilities li span {
    width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
    display: grid; place-items: center; background: var(--surface-2); color: var(--brand);
    border: 1px solid var(--line);
}
.ai-capabilities .icon { width: 13px; height: 13px; }
.ai-privacy { padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); }
.ai-privacy-icon { color: var(--muted); margin-top: 1px; }
.ai-privacy-icon .icon { width: 15px; height: 15px; }
.ai-privacy strong { font-size: 10.5px; display: block; }
.ai-privacy p { font-size: 9.5px; color: var(--muted); line-height: 1.65; margin-top: 2px; }
.ai-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 4px 10px; background: var(--surface);
}
.ai-status i { width: 6px; height: 6px; border-radius: 50%; background: #9aa7c7; }
.ai-status.on i { background: #1fa97a; box-shadow: 0 0 0 3px rgba(31, 169, 122, .14); }
.ai-status.off i { background: var(--danger); }

/* ---------------- 报告页 AI 诊断 ---------------- */
.ai-insight { padding: 0; overflow: hidden; }
.ai-insight-intro {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px;
    background: linear-gradient(120deg, rgba(233, 238, 255, .7), rgba(255, 255, 255, .2));
}
.ai-insight-intro > div { flex: 1; min-width: 0; }
.ai-insight-intro h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.ai-insight-intro p { font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 3px; }
.ai-insight-output { padding: 18px 20px 20px; border-top: 1px solid var(--line); }
.ai-report-content { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.ai-report-content h3, .ai-report-content h4, .ai-report-content h5 {
    margin: 14px 0 6px; font-size: 13px; color: var(--ink); font-weight: 650;
}
.ai-report-content h3:first-child, .ai-report-content h4:first-child { margin-top: 0; }
.ai-report-content p { margin: 0 0 8px; }
.ai-report-content ul { margin: 4px 0 10px; padding-left: 18px; }
.ai-report-content li { margin: 3px 0; }
.ai-report-content strong { color: var(--ink); font-weight: 650; }
.ai-report-foot { margin-top: 12px; font-size: 9.5px; color: var(--muted); }
.ai-report-error { font-size: 11.5px; color: var(--danger); background: var(--danger-soft); border-radius: 8px; padding: 10px 12px; }
.ai-report-loading { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.ai-report-loading span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
    animation: aiDot 1.1s infinite ease-in-out;
}
.ai-report-loading span:nth-child(2) { animation-delay: .15s; }
.ai-report-loading span:nth-child(3) { animation-delay: .3s; }
.ai-report-loading em { font-style: normal; margin-left: 6px; }

/* ---------------- 考试列表 ---------------- */
.exam-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.exam-card {
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--surface); padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
    position: relative; overflow: hidden;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.exam-card:hover { border-color: #b9c8ff; box-shadow: 0 24px 50px -40px rgba(11, 18, 32, .6); transform: translateY(-2px); }
.exam-card.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px rgba(34, 83, 230, .25); }
.exam-card.active::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #2253e6, #5b7cff);
}
.exam-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.exam-card-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 3px 0 2px; }
.exam-card-date { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.exam-card-metrics {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 11px 0;
}
.exam-card-metrics div { display: flex; flex-direction: column; gap: 1px; }
.exam-card-metrics span { font-size: 9px; color: var(--muted); }
.exam-card-metrics strong { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.exam-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exam-card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.exam-card-foot form { margin: 0; }
.exam-current-note { flex: 1; font-size: 10.5px; color: var(--brand); }

/* ---------------- 数据大屏 ---------------- */
.screen-body {
    margin: 0; background: #060b18; color: #dbe6ff;
    font-family: var(--font); min-height: 100vh;
    overflow-x: hidden;
}
.screen {
    min-height: 100vh; display: flex; flex-direction: column;
    padding: 16px 20px 12px;
    background:
        radial-gradient(1100px 520px at 8% -10%, rgba(34, 83, 230, .26), transparent 62%),
        radial-gradient(900px 460px at 96% 0%, rgba(14, 143, 163, .16), transparent 60%),
        linear-gradient(180deg, #060b18, #081126 60%, #060b18);
    gap: 12px;
}
.screen-top {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 16px; padding: 6px 8px 14px; border-bottom: 1px solid rgba(90, 130, 255, .16);
}
.screen-brand { display: flex; align-items: center; gap: 10px; }
.screen-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.screen-brand strong { font-size: 14px; letter-spacing: .04em; color: #eef4ff; }
.screen-brand span { font-size: 8.5px; letter-spacing: .2em; color: #5b6f96; font-family: var(--mono); }
.screen-title { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.screen-kicker {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    font-size: 15px; font-weight: 600; letter-spacing: .02em; color: #f2f6ff;
}
.screen-kicker i {
    width: 6px; height: 6px; border-radius: 50%; background: #4f8cff;
    box-shadow: 0 0 0 4px rgba(79, 140, 255, .16);
}
.screen-sub { font-size: 9.5px; color: #6d80a8; letter-spacing: .12em; font-family: var(--mono); }
.screen-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.screen-clock {
    font-family: var(--mono); font-size: 13px; color: #9fb3dd;
    letter-spacing: .08em; margin-right: 4px;
}
.screen-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid rgba(90, 130, 255, .22); border-radius: 7px;
    background: rgba(20, 34, 66, .5); color: #b9c9ea;
    font-size: 10.5px; padding: 6px 10px;
    transition: border-color .15s, color .15s, background .15s;
}
.screen-btn:hover { border-color: rgba(120, 160, 255, .5); color: #fff; background: rgba(34, 83, 230, .22); }
.screen-btn .icon { width: 13px; height: 13px; }

.screen-main {
    flex: 1; display: grid;
    grid-template-columns: 1.05fr 1fr .8fr;
    grid-template-rows: auto minmax(280px, 1.2fr) minmax(240px, 1fr);
    gap: 12px; min-height: 0;
}
.screen-stats {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-self: start;
}
.screen-stat {
    border: 1px solid rgba(90, 130, 255, .16);
    border-radius: 12px; padding: 12px 16px;
    background: linear-gradient(150deg, rgba(20, 36, 72, .72), rgba(10, 20, 42, .4));
    display: flex; flex-direction: column; gap: 1px;
    position: relative; overflow: hidden;
}
.screen-stat::after {
    content: ""; position: absolute; right: -20px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, .16), transparent 70%);
}
.screen-stat span { font-size: 10px; color: #8598bd; }
.screen-stat strong {
    font-size: 30px; line-height: 1.15; font-weight: 650;
    color: #f4f8ff; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.screen-stat em { font-size: 8px; letter-spacing: .18em; color: #4f6288; font-style: normal; font-family: var(--mono); }
.screen-stat.muted strong { color: #63769c; }

.screen-panel {
    border: 1px solid rgba(90, 130, 255, .16);
    border-radius: 12px; background: rgba(11, 21, 43, .55);
    padding: 12px 14px; display: flex; flex-direction: column; min-height: 0;
    overflow: hidden;
}
.screen-panel--wide { grid-column: span 2; }
.screen-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-bottom: 8px;
}
.screen-panel-head > div { display: flex; align-items: baseline; gap: 8px; }
.screen-panel-head h2 { font-size: 12.5px; font-weight: 600; color: #dce8ff; letter-spacing: .02em; }
.screen-panel-head span { font-size: 8px; letter-spacing: .18em; color: #4f6288; font-family: var(--mono); }
.screen-chip {
    font-size: 9px; color: #8fa6d6; padding: 2px 8px;
    border: 1px solid rgba(90, 130, 255, .24); border-radius: 999px;
}
.screen-link { font-size: 9.5px; color: #6f9bff; }
.screen-chart { flex: 1; min-height: 150px; }

.screen-top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; overflow-y: auto; }
.screen-top-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 4px; border-bottom: 1px solid rgba(90, 130, 255, .08);
}
.screen-top-list li:last-child { border-bottom: 0; }
.screen-rank {
    width: 20px; height: 20px; border-radius: 5px; flex: 0 0 auto;
    display: grid; place-items: center;
    font-size: 10px; font-family: var(--mono); color: #7d90b8;
    background: rgba(90, 130, 255, .1);
}
.screen-rank.r1 { background: #c98a22; color: #1a1204; }
.screen-rank.r2 { background: #97a6c4; color: #0b1020; }
.screen-rank.r3 { background: #a86a3c; color: #fff; }
.screen-top-name { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.screen-top-name strong { font-size: 11.5px; font-weight: 600; color: #e4ecff; }
.screen-top-name span { font-size: 9px; color: #63769c; }
.screen-top-score {
    font-family: var(--mono); font-size: 13px; color: #8fb2ff;
    font-variant-numeric: tabular-nums;
}
.screen-foot {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 10px 8px 2px; border-top: 1px solid rgba(90, 130, 255, .12);
    font-size: 9px; color: #55688e; letter-spacing: .04em;
}

/* ---------------- 表格与卡片细节增强 ---------------- */
.card { transition: border-color .18s, box-shadow .18s; }
.quick-card { transition: border-color .18s, transform .18s, box-shadow .18s; }
.quick-card:hover { border-color: #b9c8ff; transform: translateY(-2px); box-shadow: 0 22px 44px -38px rgba(11, 18, 32, .7); }
.insight { transition: transform .18s; }
.insight:hover { transform: translateY(-1px); }

/* ---------------- 响应式补充 ---------------- */
@media (max-width: 1180px) {
    .ai-layout { grid-template-columns: 1fr; }
    .ai-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-side .ai-privacy { grid-column: span 2; }
    .screen-main { grid-template-columns: 1fr 1fr; }
    .screen-panel--wide { grid-column: span 2; }
}
@media (max-width: 960px) {
    .topbar-search span, .topbar-search kbd { display: none; }
    .topbar-search { padding: 0 8px; }
    .topbar-ai span { display: none; }
    .topbar-ai { padding: 0 9px; }
    .exam-cards { grid-template-columns: 1fr; }
    .screen { padding: 12px; }
    .screen-top { grid-template-columns: 1fr; gap: 8px; text-align: center; }
    .screen-brand, .screen-actions { justify-content: center; }
    .screen-main { grid-template-columns: 1fr; }
    .screen-panel--wide { grid-column: span 1; }
    .screen-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .screen-stat strong { font-size: 24px; }
}
@media (max-width: 760px) {
    .ai-insight-intro { flex-wrap: wrap; }
    .ai-insight-intro .btn { width: 100%; }
    .ai-side { grid-template-columns: 1fr; }
    .ai-side .ai-privacy { grid-column: span 1; }
    .ai-chat { height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 480px; }
    .ai-chat-body { max-height: none; flex: 1; min-height: 0; overflow-y: auto; }
    .ai-model span { display: none; }
    .ai-model select { max-width: 140px; }
    .cmdk { padding: 8vh 12px 12px; }
    .screen-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .screen-actions .screen-clock { display: none; }
}
@media (max-width: 560px) {
    .ai-msg-body { max-width: 92%; }
    .exam-card-metrics strong { font-size: 14px; }
    .exam-card { padding: 16px; }
    .ai-hint { display: none; }
    .cmdk-foot { gap: 10px; }
    .cmdk-foot [data-cmdk-tip] { display: none; }
}

