/* =============================================================
   聆析AI · 班班有歌声 AI在线测评平台
   设计系统 —— 深蓝黑底 + 品牌金 + 光谱蓝紫（Choirvana Dark）
   ============================================================= */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* 底色与层次 */
  --bg:            #070A1A;
  --bg-2:          #0B1030;
  --bg-3:          #140E33;
  --surface:       rgba(255, 255, 255, 0.03);
  --surface-2:     rgba(255, 255, 255, 0.055);
  --surface-solid: #0D1230;
  --input-bg:      #0A0F28;
  --line:          rgba(148, 163, 255, 0.14);
  --line-soft:     rgba(148, 163, 255, 0.08);
  --line-strong:   rgba(148, 163, 255, 0.22);

  /* 品牌与语义色 */
  --gold:          #E8B14F;
  --gold-deep:     #C99635;
  --gold-ink:      #1A1405;
  --blue:          #5B8CFF;
  --blue-lite:     #7FA6FF;
  --purple:        #9B6BFF;
  --purple-lite:   #B18CFF;
  --green:         #34D399;
  --orange:        #F5A524;
  --red:           #F45B69;
  --bronze:        #D99A6C;
  --silver:        #C9D2F2;

  /* 文字 */
  --text:          #F2F5FF;
  --text-2:        #C9D2F2;
  --text-sub:      #9AA4C7;
  --text-weak:     #5C6488;

  /* 形状 */
  --r-card: 16px;
  --r-ctl: 10px;
  --r-pill: 999px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, .45);
  --glow-gold: 0 0 24px rgba(232, 177, 79, .35);

  /* 布局 */
  --sidebar-w: 224px;
  --topbar-h: 60px;
  --maxw: 1560px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Noto Sans SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "Helvetica Neue", "Segoe UI", ui-sans-serif, var(--font);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: var(--blue-lite); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
img, svg, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid rgba(232, 177, 79, .8); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(232, 177, 79, .28); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 255, .18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 255, .32); }

/* ---------- 3. 全局氛围背景 ---------- */
.app-bg {
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 86% -12%, rgba(155, 107, 255, .16), transparent 62%),
    radial-gradient(1000px 520px at -10% 108%, rgba(91, 140, 255, .12), transparent 62%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  background-attachment: fixed;
}

/* ---------- 4. 排版工具 ---------- */
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.gold { color: var(--gold); }
.blue { color: var(--blue-lite); }
.purple { color: var(--purple-lite); }
.green { color: var(--green); }
.orange { color: var(--orange); }
.red { color: var(--red); }
.t2 { color: var(--text-2); }
.sub { color: var(--text-sub); }
.weak { color: var(--text-weak); }
.f10 { font-size: 10px; } .f11 { font-size: 11px; } .f12 { font-size: 12px; }
.f13 { font-size: 13px; } .f16 { font-size: 16px; } .f18 { font-size: 18px; }
.f20 { font-size: 20px; } .f24 { font-size: 24px; } .f32 { font-size: 32px; }
.b { font-weight: 700; } .sb { font-weight: 600; } .med { font-weight: 500; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- 5. 布局工具 ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row-top { display: flex; align-items: flex-start; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.push { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.shrink0 { flex-shrink: 0; }
.stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-1 { grid-template-columns: 1fr 1fr; }
.g-side { grid-template-columns: 288px minmax(0, 1fr); }
.g-detail { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
.hide { display: none !important; }

/* ---------- 6. 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card.solid { background: rgba(13, 18, 48, .92); border-color: var(--line-strong); }
.card.flush { padding: 0; overflow: hidden; }
.card.tight { padding: 14px; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-title {
  font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}
.card-title.plain::before { display: none; }
.card-sub { font-size: 11px; color: var(--text-weak); }

/* 指标卡 */
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 15px 16px;
}
.stat::after {
  content: ""; position: absolute; right: -28px; top: -28px;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 177, 79, .14), transparent 70%);
}
.stat.blue-tint::after { background: radial-gradient(circle, rgba(91, 140, 255, .16), transparent 70%); }
.stat.green-tint::after { background: radial-gradient(circle, rgba(52, 211, 153, .14), transparent 70%); }
.stat.purple-tint::after { background: radial-gradient(circle, rgba(155, 107, 255, .16), transparent 70%); }
.stat-label { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.stat-val { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.stat-val b { font-family: var(--font-num); font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1.05; }
.stat-val span { font-size: 12px; color: var(--text-sub); }
.stat-sub { margin-top: 5px; font-size: 11px; color: var(--text-weak); }
.stat.blue-tint .stat-val b { color: var(--blue-lite); }
.stat.green-tint .stat-val b { color: var(--green); }
.stat.purple-tint .stat-val b { color: var(--purple-lite); }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-ctl); padding: 8px 14px; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; transition: all .16s ease; white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none !important; }
.btn svg { flex-shrink: 0; }

.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--gold-ink); font-weight: 600; }
.btn-gold:hover:not(:disabled) { filter: brightness(1.08); box-shadow: var(--glow-gold); }
.btn-ghost { border-color: rgba(232, 177, 79, .38); color: var(--gold); }
.btn-ghost:hover:not(:disabled) { background: rgba(232, 177, 79, .1); }
.btn-blue { border-color: rgba(91, 140, 255, .4); color: var(--blue-lite); }
.btn-blue:hover:not(:disabled) { background: rgba(91, 140, 255, .12); }
.btn-quiet { border-color: var(--line); color: var(--text-sub); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); color: var(--text-2); }
.btn-danger { border-color: rgba(244, 91, 105, .4); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: rgba(244, 91, 105, .12); }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* 分段控件 */
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg button {
  padding: 5px 13px; font-size: 12.5px; border-radius: 9px; color: var(--text-sub); transition: all .15s;
}
.seg button:hover { color: var(--text-2); background: var(--surface-2); }
.seg button.on { background: rgba(232, 177, 79, .14); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232, 177, 79, .35); }

/* ---------- 8. 表单 ---------- */
.field { display: block; }
.field > label, .lbl {
  display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-sub);
}
.req { color: var(--red); margin-left: 2px; }
.inp, select.inp, textarea.inp {
  width: 100%; padding: 9px 11px; font-size: 13.5px;
  background: var(--input-bg); color: var(--text);
  border: 1px solid rgba(148, 163, 255, .18); border-radius: var(--r-ctl);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: var(--text-weak); }
.inp:focus { border-color: rgba(232, 177, 79, .6); box-shadow: 0 0 0 3px rgba(232, 177, 79, .12); }
.inp:disabled { opacity: .55; cursor: not-allowed; }
textarea.inp { resize: vertical; min-height: 90px; line-height: 1.7; }
select.inp {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239AA4C7' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
select.inp option { background: #0A0F28; color: var(--text); }
.inp-sm { padding: 6px 9px; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12.5px; color: var(--text-sub); }
.check input { width: 15px; height: 15px; accent-color: var(--gold); cursor: pointer; }

/* 选项卡片组（如学校类型选择） */
.pickers { display: flex; gap: 8px; flex-wrap: wrap; }
.pickers button {
  flex: 1; min-width: 76px; padding: 9px 10px; font-size: 13px; border-radius: var(--r-ctl);
  border: 1px solid var(--line); color: var(--text-sub); transition: all .15s;
}
.pickers button:hover { background: var(--surface-2); }
.pickers button.on { border-color: rgba(232, 177, 79, .6); background: rgba(232, 177, 79, .1); color: var(--gold); }

/* ---------- 9. 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 2px 9px; border-radius: var(--r-pill); font-size: 11.5px; line-height: 1.7;
  border: 1px solid transparent;
}
.bd-gold   { color: var(--gold);      border-color: rgba(232, 177, 79, .5);  background: rgba(232, 177, 79, .1); }
.bd-blue   { color: var(--blue-lite); border-color: rgba(91, 140, 255, .42); background: rgba(91, 140, 255, .1); }
.bd-purple { color: var(--purple-lite); border-color: rgba(155, 107, 255, .42); background: rgba(155, 107, 255, .1); }
.bd-green  { color: var(--green);     border-color: rgba(52, 211, 153, .42); background: rgba(52, 211, 153, .1); }
.bd-orange { color: var(--orange);    border-color: rgba(245, 165, 36, .42); background: rgba(245, 165, 36, .1); }
.bd-red    { color: var(--red);       border-color: rgba(244, 91, 105, .42); background: rgba(244, 91, 105, .1); }
.bd-silver { color: var(--silver);    border-color: rgba(201, 210, 242, .4);  background: rgba(255, 255, 255, .05); }
.bd-bronze { color: var(--bronze);    border-color: rgba(217, 154, 108, .45); background: rgba(217, 154, 108, .1); }
.bd-grey   { color: var(--text-sub);  border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); }
.bd-glow   { box-shadow: 0 0 14px rgba(232, 177, 79, .4); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* 旋转 loader */
.spin {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid currentColor; border-top-color: transparent;
  animation: spin .9s linear infinite; display: inline-block;
}
.spin-lg { width: 30px; height: 30px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .28s ease both; }

/* ---------- 10. 表格 ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; min-width: 100%; }
.tbl th {
  padding: 9px 11px; text-align: left; font-size: 11.5px; font-weight: 500;
  color: var(--text-sub); white-space: nowrap; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015); position: sticky; top: 0; z-index: 1;
  backdrop-filter: blur(8px);
}
.tbl td {
  padding: 9px 11px; font-size: 13px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .028); }
.tbl tbody tr:nth-child(even) { background: rgba(255, 255, 255, .014); }
.tbl tbody tr:nth-child(even):hover { background: rgba(255, 255, 255, .034); }
.tbl .acts { display: flex; gap: 5px; flex-wrap: nowrap; align-items: center; }
@media (max-width: 767px) { .tbl .acts { flex-wrap: wrap; } }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--gold); }
.tbl-empty td { padding: 44px 12px; text-align: center; color: var(--text-weak); font-size: 13px; }
.rank-1, .rank-2, .rank-3 { font-size: 15px; }

/* 排行前三行底色 */
tr.top1 { background: linear-gradient(90deg, rgba(232, 177, 79, .13), transparent 55%) !important; }
tr.top2 { background: linear-gradient(90deg, rgba(201, 210, 242, .1), transparent 55%) !important; }
tr.top3 { background: linear-gradient(90deg, rgba(217, 154, 108, .1), transparent 55%) !important; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 12px 4px 2px; flex-wrap: wrap; }
.pager button {
  min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); font-size: 12px; color: var(--text-sub); transition: all .14s;
}
.pager button:hover:not(:disabled) { background: var(--surface-2); color: var(--text-2); }
.pager button.on { background: rgba(232, 177, 79, .14); border-color: rgba(232, 177, 79, .4); color: var(--gold); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 11. 应用外壳 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--topbar-h);
  border-bottom: 1px solid rgba(148, 163, 255, .12);
  background: rgba(7, 10, 26, .86); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-in { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--gold-ink); font-weight: 700; font-size: 17px;
  box-shadow: 0 0 18px rgba(232, 177, 79, .3);
}
.brand-txt > b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.brand-txt > span { display: block; font-size: 10px; color: var(--text-weak); line-height: 1.3; white-space: nowrap; }
@media (max-width: 640px) { .brand-txt > span { display: none; } }
.icon-btn { padding: 7px; border-radius: 9px; color: var(--text-sub); display: inline-flex; }
.topbar [data-drawer] { display: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.who { text-align: right; line-height: 1.3; }
.who b { display: block; font-size: 12.5px; font-weight: 500; }
.who span { display: block; font-size: 10px; color: var(--text-weak); }
.bell { position: relative; }
.bell-dot {
  position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

.shell { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 40px; display: flex; gap: 20px; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: calc(var(--topbar-h) + 18px); align-self: flex-start; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; }
.side-group { margin: 12px 4px 6px; font-size: 10px; letter-spacing: .18em; color: var(--text-weak); }
.side-group:first-child { margin-top: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 11px; font-size: 13.5px; color: var(--text-sub);
  transition: all .15s; text-align: left; border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-2); }
.nav-item.on {
  background: rgba(232, 177, 79, .1); border-color: rgba(232, 177, 79, .34); color: var(--gold);
}
.nav-item.on::before {
  content: ""; position: absolute; left: -1px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--gold);
  box-shadow: 0 0 10px rgba(232, 177, 79, .8);
}
.nav-item .nav-badge { margin-left: auto; font-size: 10px; padding: 0 6px; border-radius: 999px; background: rgba(244, 91, 105, .18); color: var(--red); }
.main { flex: 1; min-width: 0; }
.page-hd { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-hd h1 { font-size: 21px; font-weight: 700; letter-spacing: .01em; }
.page-hd p { margin-top: 3px; font-size: 11.5px; color: var(--text-weak); }
.crumb { font-size: 11.5px; color: var(--text-weak); display: flex; gap: 6px; align-items: center; }
.crumb b { color: var(--text-sub); font-weight: 400; }

/* 抽屉（移动端导航） */
.drawer-mask { position: fixed; inset: 0; z-index: 90; background: rgba(3, 5, 15, .7); backdrop-filter: blur(3px); }
.drawer {
  width: 262px; height: 100%; padding: 14px; overflow-y: auto;
  background: #0A0E24; border-right: 1px solid var(--line);
  animation: slideIn .22s ease both;
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }

/* 班级端底部 Tab */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  border-top: 1px solid rgba(148, 163, 255, .12);
  background: rgba(7, 10, 26, .94); backdrop-filter: blur(14px);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { display: grid; }
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; font-size: 10px; color: var(--text-weak);
}
.tabbar button.on { color: var(--gold); }

/* ---------- 12. 弹窗 / Toast ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(3, 5, 15, .72); backdrop-filter: blur(5px);
  animation: fadeUp .18s ease both;
}
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: rgba(13, 18, 48, .97); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow-card);
}
.modal.wide { max-width: 820px; }
.modal.xwide { max-width: 1040px; }
.modal-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-hd h3 { font-size: 16px; font-weight: 600; }
.modal-hd p { font-size: 11.5px; color: var(--text-weak); margin-top: 3px; }
.modal-x { padding: 4px 8px; border-radius: 8px; color: var(--text-sub); font-size: 15px; }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal-ft { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.toast-host {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: center; gap: 9px; padding: 9px 15px;
  border-radius: 12px; font-size: 13px; box-shadow: var(--shadow-card);
  background: rgba(13, 18, 48, .96); border: 1px solid var(--line-strong);
  animation: fadeUp .22s ease both;
}
.toast.ok { border-color: rgba(52, 211, 153, .45); color: var(--green); }
.toast.err { border-color: rgba(244, 91, 105, .45); color: var(--red); }
.toast.info { border-color: rgba(91, 140, 255, .45); color: var(--blue-lite); }

/* 提示条 */
.alert {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px;
  border-radius: 11px; font-size: 12.5px; line-height: 1.7; border: 1px solid;
}
.alert-info { border-color: rgba(91, 140, 255, .32); background: rgba(91, 140, 255, .08); color: var(--blue-lite); }
.alert-ok { border-color: rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .08); color: var(--green); }
.alert-warn { border-color: rgba(245, 165, 36, .32); background: rgba(245, 165, 36, .08); color: var(--orange); }
.alert-err { border-color: rgba(244, 91, 105, .35); background: rgba(244, 91, 105, .08); color: var(--red); }
.note { padding: 11px 13px; border-radius: 11px; background: var(--surface); font-size: 12px; line-height: 1.85; color: var(--text-sub); }

/* 空状态 */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 16px; text-align: center; }
.empty p { font-size: 13px; color: var(--text-weak); }

/* ---------- 13. 组织树 ---------- */
.tree { font-size: 13.5px; }
.tree-node {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px;
  border-radius: 9px; color: var(--text-2); text-align: left; transition: all .14s;
}
.tree-node:hover { background: var(--surface-2); }
.tree-node.on { background: rgba(232, 177, 79, .1); color: var(--gold); }
.tree-node .cnt { margin-left: auto; font-size: 10px; color: var(--text-weak); }
.tree-child { margin-left: 16px; width: calc(100% - 16px); font-size: 12.5px; padding: 5px 9px; }
.tree-child.on { background: rgba(91, 140, 255, .15); color: var(--blue-lite); }
.tree-caret { transition: transform .18s; flex-shrink: 0; }
.tree-caret.open { transform: rotate(90deg); }

/* ---------- 14. 上传区 ---------- */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; aspect-ratio: 16 / 10; padding: 16px; text-align: center;
  border: 2px dashed rgba(148, 163, 255, .26); border-radius: 14px;
  transition: all .18s; background: rgba(255, 255, 255, .012);
}
.drop:hover, .drop.hover { border-color: rgba(232, 177, 79, .55); background: rgba(232, 177, 79, .05); }
.drop.ok { border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .05); }
.drop.err { border-color: rgba(244, 91, 105, .5); background: rgba(244, 91, 105, .05); }
.drop b { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.drop span { font-size: 11px; color: var(--text-weak); }

.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .3s ease; }
.bar.blue > i { background: linear-gradient(90deg, #3D6BE0, var(--blue)); }
.bar.green > i { background: linear-gradient(90deg, #17A97A, var(--green)); }

/* 七维条形 */
.dimrow { display: flex; align-items: center; gap: 11px; }
.dimrow .nm { width: 104px; flex-shrink: 0; font-size: 12px; color: var(--text-sub); }
.dimrow .vl { width: 44px; flex-shrink: 0; font-size: 13.5px; font-weight: 600; text-align: right; }
.dimrow .bar { flex: 1; }

/* 流水线步骤 */
.pipe { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pipe-step { display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line); color: var(--text-weak); }
.pipe-step.done { border-color: rgba(52, 211, 153, .4); color: var(--green); background: rgba(52, 211, 153, .07); }
.pipe-step.active { border-color: rgba(91, 140, 255, .5); color: var(--blue-lite); background: rgba(91, 140, 255, .09); }
.pipe-arrow { color: var(--text-weak); font-size: 11px; }

/* ---------- 15. AI 标注播放器 ---------- */
.player { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: #000; }
.player-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; user-select: none; overflow: hidden; }
.player-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(620px 320px at 50% 84%, rgba(91, 140, 255, .2), transparent 70%),
              linear-gradient(180deg, #0A0E24, #04060E);
}
.wavebars { display: flex; align-items: flex-end; gap: 5px; height: 104px; }
.wavebars i { width: 6px; border-radius: 999px; transition: height .12s linear; display: block; }
.ovl { position: absolute; pointer-events: none; }
.ovl-radar { left: 10px; top: 10px; width: 148px; height: 148px; border-radius: 14px; padding: 4px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); border: 1px solid rgba(155, 107, 255, .3); }
.ovl-radar .cap { position: absolute; left: 8px; top: 5px; font-size: 9px; color: var(--purple-lite); letter-spacing: .06em; }
.ovl-score {
  right: 10px; top: 10px; display: flex; align-items: baseline; gap: 8px;
  padding: 6px 15px; border-radius: 999px; background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(232, 177, 79, .7); box-shadow: 0 0 20px rgba(232, 177, 79, .45);
  backdrop-filter: blur(4px);
}
.ovl-score b { font-family: var(--font-num); font-size: 21px; font-weight: 700; color: var(--gold); }
.ovl-score span { font-size: 10.5px; color: rgba(232, 177, 79, .85); }
.ovl-dims { left: 0; right: 0; bottom: 44px; display: flex; gap: 7px; padding: 0 12px; overflow: hidden; }
.ovl-dim { flex-shrink: 0; padding: 5px 9px; border-radius: 9px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.ovl-dim em { display: block; font-style: normal; font-size: 9px; color: rgba(255, 255, 255, .6); }
.ovl-dim b { font-family: var(--font-num); font-size: 13.5px; }
.ovl-staff { left: 12px; right: 12px; bottom: 24px; display: flex; align-items: center; gap: 3px; height: 14px; }
.ovl-staff i { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .13); transition: all .12s; }
.ovl-staff i.on { background: var(--gold); box-shadow: 0 0 9px rgba(232, 177, 79, .85); height: 9px; }
.ovl-lyric {
  left: 50%; transform: translateX(-50%); bottom: 84px; padding: 5px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, .5); font-size: 13px; color: #fff; letter-spacing: .08em; backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .1);
}
.ovl-flag {
  padding: 3px 9px; border-radius: 8px; font-size: 10.5px; backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, .55); border: 1px solid;
}
.play-hit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.play-orb {
  width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); border: 1.5px solid rgba(232, 177, 79, .65); backdrop-filter: blur(4px);
  transition: transform .16s;
}
.play-hit:hover .play-orb { transform: scale(1.08); box-shadow: var(--glow-gold); }
.player-ctl { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #0A0E20; }
.scrub { flex: 1; height: 5px; border-radius: 999px; appearance: none; cursor: pointer; }
.scrub::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(232, 177, 79, .8); cursor: pointer; }
.scrub::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: var(--gold); cursor: pointer; }

/* 报告 */
.score-hero { text-align: center; padding: 6px 0 2px; }
.score-hero .big {
  font-family: var(--font-num); font-size: 58px; font-weight: 700; color: var(--gold); line-height: 1.05;
  text-shadow: 0 0 34px rgba(232, 177, 79, .42);
}
.score-hero .big i { font-style: normal; font-size: 17px; color: var(--text-weak); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.kv:last-child { border-bottom: none; }
.kv > span { color: var(--text-sub); }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.tri > div > b { display: block; font-family: var(--font-num); font-size: 12px; color: var(--text-2); }
.tri > div > span { display: block; font-size: 10px; color: var(--text-weak); margin-top: 2px; }
.hl-item { padding: 8px 11px; border-radius: 10px; font-size: 12px; line-height: 1.75; color: var(--text-2); border: 1px solid; }
.hl-good { border-color: rgba(52, 211, 153, .26); background: rgba(52, 211, 153, .06); }
.hl-warn { border-color: rgba(245, 165, 36, .26); background: rgba(245, 165, 36, .06); }
.quote {
  padding: 14px 16px; border-radius: 12px; border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, .03); font-size: 13.5px; line-height: 1.95; color: var(--text-2);
}
.timeline-mark { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; align-items: flex-start; }
.timeline-mark:last-child { border-bottom: none; }
.timeline-mark .tm { font-family: var(--font-num); color: var(--gold); flex-shrink: 0; width: 46px; }

/* 事件流 */
.feed-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 7px 6px; border-radius: 10px; text-align: left; transition: background .13s; }
.feed-item:hover { background: var(--surface-2); }
.feed-item .fdot { margin-top: 6px; }
.feed-item .ftx { flex: 1; min-width: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.feed-item .ftm { font-size: 10px; color: var(--text-weak); }

/* ---------- 16. 图表容器 ---------- */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-sub); }

/* ---------- 17. 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-grid { width: 100%; max-width: 1060px; display: grid; grid-template-columns: 1.16fr 1fr; gap: 22px; }
.login-brand {
  display: flex; flex-direction: column; justify-content: center; padding: 40px;
  border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, rgba(91, 140, 255, .09), rgba(155, 107, 255, .12));
  border: 1px solid var(--line);
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
}
.login-brand > * { position: relative; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .3em; color: var(--gold); }
.login-brand h1 { margin-top: 16px; font-size: 46px; font-weight: 700; line-height: 1.08; }
.login-brand h2 { margin-top: 12px; font-size: 18px; font-weight: 500; color: var(--text-2); line-height: 1.55; }
.login-brand .slogan { margin-top: 10px; font-size: 13px; color: var(--text-sub); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { padding: 4px 12px; border-radius: 999px; font-size: 11.5px; color: var(--gold); border: 1px solid rgba(232, 177, 79, .4); }
.login-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; max-width: 460px; }
.login-kpi b { display: block; font-family: var(--font-num); font-size: 25px; font-weight: 700; color: var(--gold); }
.login-kpi span { display: block; font-size: 10.5px; color: var(--text-weak); margin-top: 2px; }
.login-form {
  display: flex; flex-direction: column; justify-content: center; padding: 32px;
  background: rgba(13, 18, 48, .9); border: 1px solid var(--line-strong);
  border-radius: 20px; backdrop-filter: blur(10px);
}
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-card {
  padding: 9px 11px; border-radius: 12px; text-align: left; border: 1px solid var(--line);
  transition: all .15s;
}
.demo-card:hover { background: var(--surface-2); border-color: rgba(232, 177, 79, .4); }
.demo-card.on { border-color: rgba(232, 177, 79, .6); background: rgba(232, 177, 79, .08); }
.demo-card b { display: block; font-size: 12px; font-weight: 600; color: var(--gold); }
.demo-card span { display: block; margin-top: 2px; font-size: 10px; line-height: 1.5; color: var(--text-weak); }

/* ---------- 18. 数据大屏 ---------- */
.screen { min-height: 100vh; padding: 18px 22px 22px; }
.screen-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.screen-hd h1 { font-size: 27px; font-weight: 700; letter-spacing: .08em; }
.screen-hd h1 em { font-style: normal; color: var(--gold); }
.screen-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.screen-panel { background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.screen-panel h3 { font-size: 12.5px; letter-spacing: .1em; color: var(--gold); margin-bottom: 10px; }
.big-num { font-family: var(--font-num); font-size: 40px; font-weight: 700; color: var(--gold); line-height: 1.05; }

/* ---------- 19. 打印（PDF 报告视图） ---------- */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #14161f !important; }
  .app-bg { background: #fff !important; }
  .topbar, .sidebar, .tabbar, .no-print, .toast-host, .page-hd,
  .player-ctl, .play-hit, .modal-mask, .drawer-mask { display: none !important; }
  .shell { display: block; padding: 0; max-width: none; }
  .main { padding: 0 !important; }
  .card, .stat, .player { break-inside: avoid; page-break-inside: avoid; }
  .card { border-color: #d6dbe8 !important; background: #fff !important; box-shadow: none !important; }
  .card-title, .t2, .sub, .kv > span, .stat-label { color: #3b4255 !important; }
  .weak, .stat-sub, .card-sub { color: #6a7185 !important; }
  .quote, .note, .hl-item { background: #f6f7fb !important; color: #1f2430 !important; }
  .badge { background: #fff !important; border-color: #c3cadc !important; color: #3b4255 !important; }
  .gold, .bd-gold, .score-hero .big { color: #8A5A00 !important; text-shadow: none !important; }
  .green, .bd-green { color: #0F7A55 !important; }
  .orange, .bd-orange { color: #A35F00 !important; }
  .red, .bd-red { color: #B1263A !important; }
  .blue, .bd-blue { color: #2A4FA8 !important; }
  .purple, .bd-purple { color: #5A3AA8 !important; }
  .bar { background: #e6e9f2 !important; }
  .bar > i { background: #8A5A00 !important; }
  .g-detail { grid-template-columns: 1fr 1fr; }
  .print-only { display: block !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-only { display: none; }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1400px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  :root { --sidebar-w: 200px; }
  .g-detail { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .topbar [data-drawer] { display: inline-flex !important; }
  .shell { padding: 14px 12px 40px; }
  .g-side, .g-2-1, .g-1-1, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-grid { grid-template-columns: 1fr; max-width: 520px; }
  .login-brand { padding: 28px; }
  .login-brand h1 { font-size: 36px; }
  .login-kpi { grid-template-columns: repeat(4, 1fr); }
  .screen-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  body { font-size: 13.5px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-in { padding: 0 10px; gap: 8px; }
  .who, [data-scope-chip] { display: none !important; }
  .page-hd .crumb { display: none; }
  .grid { gap: 14px; }
  .stack > * + * { margin-top: 14px; }
  .card { padding: 15px; border-radius: 14px; }
  .page-hd h1 { font-size: 18px; }
  .stat-val b { font-size: 25px; }
  .score-hero .big { font-size: 46px; }
  .ovl-radar { width: 104px; height: 104px; }
  .ovl-score { padding: 4px 10px; }
  .ovl-score b { font-size: 16px; }
  .ovl-dims { bottom: 38px; }
  .tabbar.show { display: block; }
  .main { padding-bottom: 64px; }
  .demo-grid { grid-template-columns: 1fr; }
  .login-kpi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .modal { padding: 17px; }
  .dimrow .nm { width: 78px; font-size: 11px; }
}
@media (max-width: 400px) {
  .stat { padding: 12px; }
}
