/* ============================================================
   AutoAero AI Platform — 设计系统 V3
   风格：深蓝深灰 · 简洁 · 科技 · 未来 · 高端奢华
   （基于 V2 结构，融合 V1 深色主题，保留奢华元素）
   ============================================================ */
:root {
  --bg-0: #0a1220;          /* 页面底：深黑蓝 */
  --bg-1: #0e1930;          /* 侧边栏/顶栏 */
  --bg-2: #12203c;          /* 面板 */
  --bg-3: #182a4e;          /* 面板内嵌块 / hover */
  --bg-4: #1f3560;          /* 强 hover / 选中 */
  --line: #23375f;          /* 分隔线 */
  --line-soft: #1a2b4d;
  --txt-1: #e8eefb;         /* 主文字：浅白 */
  --txt-2: #9fb2d6;         /* 次文字 */
  --txt-3: #64779f;         /* 弱文字 */
  --brand: #4da3ff;         /* 主品牌 · 亮科技蓝 */
  --brand-2: #2f7ef0;
  --brand-dim: rgba(77,163,255,.14);
  --gold: #d4a84b;          /* 奢华点缀 · 暗香槟金（深色适配） */
  --gold-dim: rgba(212,168,75,.12);
  --ok: #34d399;
  --ok-dim: rgba(52,211,153,.14);
  --warn: #fbbf24;
  --warn-dim: rgba(251,191,36,.14);
  --danger: #f87171;
  --danger-dim: rgba(248,113,113,.15);
  --violet: #a78bfa;
  --violet-dim: rgba(167,139,250,.14);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34,211,238,.12);
  --radius: 13px;
  --radius-sm: 8px;
  --shadow: 0 16px 44px rgba(2,8,20,.55);
  --shadow-soft: 0 2px 12px rgba(2,8,20,.25);
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg-0);
  color: var(--txt-1);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
}
::selection { background: rgba(77,163,255,.14); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #24385f; border-radius: 5px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #1a3055; }
::-webkit-scrollbar-track { background: transparent; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

/* ---------- 启动屏 ---------- */
.boot-splash { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.boot-logo { font-size: 30px; font-weight: 700; letter-spacing: 1.5px; color: var(--txt-1); }
.boot-logo span { background: linear-gradient(90deg, var(--brand), #6d8dff); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.boot-sub { color: var(--txt-3); font-size: 13px; letter-spacing: .5px; }

/* ---------- 布局骨架 ---------- */
#app { height: 100vh; }
.layout { display: grid; grid-template-columns: 216px 1fr; grid-template-rows: 54px 1fr; height: 100vh; }
.topbar {
  grid-column: 1 / 3; display: flex; align-items: center; gap: 16px;
  background: var(--bg-1); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 0 18px; z-index: 20; position: relative;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--gold) 22%, transparent 46%);
  opacity: .35; pointer-events: none;
}
.topbar .proj-pill:hover { border-color: rgba(212,168,75,.45); box-shadow: 0 4px 14px rgba(212,168,75,.12); }
.topbar .logo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: 1px; min-width: 200px; }
.topbar .logo .mark {
  width: 27px; height: 27px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, #10141f 0%, #2f7ef0 130%);
  box-shadow: 0 4px 12px rgba(77,163,255,.25);
}
.topbar .logo em { color: var(--gold); font-style: normal; font-weight: 500; letter-spacing: 1.5px; }
.topbar .proj-pill {
  display: flex; align-items: center; gap: 8px; background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--txt-2); cursor: default; box-shadow: var(--shadow-soft);
}
.topbar .proj-pill b { color: var(--txt-1); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .env-tag { font-size: 11px; color: var(--warn); background: var(--warn-dim); border: 1px solid rgba(251,191,36,.22); padding: 2px 10px; border-radius: 4px; letter-spacing: .5px; }
.topbar .user { display: flex; align-items: center; gap: 8px; color: var(--txt-2); font-size: 12px; }

.sidenav { background: var(--bg-1); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 24px; }
.sidenav .group-label { font-size: 10.5px; color: var(--txt-3); letter-spacing: 1.5px; padding: 16px 10px 6px; font-weight: 600; }
.sidenav .nav-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--txt-2); cursor: pointer; font-size: 12.5px; margin-bottom: 1px; border: 1px solid transparent;
  user-select: none; white-space: nowrap; transition: .12s;
}
.sidenav .nav-item:hover { background: var(--bg-3); color: var(--txt-1); }
.sidenav .nav-item.active { background: var(--brand-dim); color: var(--brand); border-color: rgba(77,163,255,.18); font-weight: 600; }
.sidenav .nav-item.disabled { opacity: .42; cursor: not-allowed; }
.sidenav .nav-item .ico { width: 16px; height: 16px; flex: none; display: inline-flex; }
.sidenav .nav-item .ico svg { width: 16px; height: 16px; }
.sidenav .nav-item .sub { margin-left: auto; font-size: 10px; color: var(--txt-3); }

.main { overflow-y: auto; position: relative; }
.page { padding: 20px 26px 44px; max-width: 1560px; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 260px; }
.page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: .8px; }
.page-head .desc { color: var(--txt-3); font-size: 12px; margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 通用组件 ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.panel .panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.panel .panel-head h3 { font-size: 13px; font-weight: 650; letter-spacing: .4px; position: relative; padding-left: 11px; }
.panel .panel-head h3::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), var(--gold)); }
.panel .panel-head .hint { color: var(--txt-3); font-size: 11px; }
.panel .panel-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel .panel-body { padding: 16px; }
.panel .panel-body.flush { padding: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-3); color: var(--txt-1);
  padding: 6px 14px; font-size: 12px; cursor: pointer; transition: .13s; white-space: nowrap; box-shadow: var(--shadow-soft);
}
.btn:hover { background: var(--bg-4); border-color: #2c4779; }
.btn.primary { background: linear-gradient(135deg, var(--brand) 0%, #3d8aff 100%); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(77,163,255,.24); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--danger); border-color: rgba(248,113,113,.28); background: var(--danger-dim); box-shadow: none; }
.btn.sm { padding: 3px 10px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 10px; font-size: 11px; border: 1px solid transparent; white-space: nowrap; font-weight: 500; }
.badge.blue { color: var(--brand); background: var(--brand-dim); border-color: rgba(77,163,255,.2); }
.badge.green { color: var(--ok); background: var(--ok-dim); border-color: rgba(52,211,153,.22); }
.badge.amber { color: var(--warn); background: var(--warn-dim); border-color: rgba(251,191,36,.22); }
.badge.red { color: var(--danger); background: var(--danger-dim); border-color: rgba(248,113,113,.22); }
.badge.violet { color: var(--violet); background: var(--violet-dim); border-color: rgba(167,139,250,.22); }
.badge.cyan { color: var(--cyan); background: var(--cyan-dim); border-color: rgba(34,211,238,.22); }
.badge.gray { color: var(--txt-2); background: rgba(159,178,214,.1); border-color: rgba(159,178,214,.25); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 11px; color: var(--txt-2); background: var(--bg-3); border: 1px solid var(--line-soft); margin: 0 4px 4px 0; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-soft);
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--brand) 0%, var(--gold) 55%, transparent 90%); opacity: .5; }
.stat-card .label { color: var(--txt-3); font-size: 11.5px; letter-spacing: .4px; }
.stat-card .value {
  font-size: 26px; font-weight: 700; margin: 3px 0 2px; font-family: var(--mono); letter-spacing: -.5px;
  color: var(--txt-1);
}
.stat-card .value small { font-size: 12px; color: var(--txt-3); font-weight: 400; margin-left: 3px; }
.stat-card .trend { font-size: 11px; color: var(--txt-3); }
.stat-card .trend.up { color: var(--ok); } .stat-card .trend.down { color: var(--danger); }
.stat-card .glow { position: absolute; right: -34px; top: -34px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(77,163,255,.08), transparent 70%); }

table.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.dt th { text-align: left; color: var(--txt-3); font-weight: 550; font-size: 11.5px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: rgba(10,18,32,.35); white-space: nowrap; letter-spacing: .4px; }
table.dt td { padding: 9px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.dt tr:last-child td { border-bottom: none; }
table.dt tbody tr:hover { background: rgba(24,42,78,.45); }
table.dt td .mono { font-family: var(--mono); font-size: 11.5px; color: var(--txt-2); }

.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-row label { font-size: 11.5px; color: var(--txt-3); }
.input, select.input, textarea.input {
  background: var(--bg-0); border: 1px solid var(--line); color: var(--txt-1);
  border-radius: var(--radius-sm); padding: 7px 11px; font-size: 12.5px; outline: none; width: 100%;
  font-family: inherit; transition: .13s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77,163,255,.1); }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .ico { position: absolute; left: 10px; color: var(--txt-3); display: flex; }
.search-wrap .input { padding-left: 32px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs .tab { padding: 8px 16px; font-size: 12.5px; color: var(--txt-2); cursor: pointer; border-bottom: 2px solid transparent; user-select: none; }
.tabs .tab:hover { color: var(--txt-1); }
.tabs .tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.seg { display: inline-flex; background: var(--bg-0); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.seg .seg-item { padding: 4px 12px; font-size: 11.5px; color: var(--txt-2); border-radius: 5px; cursor: pointer; user-select: none; white-space: nowrap; transition: .12s; }
.seg .seg-item.active { background: var(--bg-4); color: var(--txt-1); font-weight: 600; box-shadow: 0 1px 4px rgba(2,8,20,.25); }

.empty { text-align: center; color: var(--txt-3); padding: 40px 20px; font-size: 12.5px; }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* ---------- 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(4,9,18,.34); z-index: 100; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; width: min(560px, 92vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { width: min(880px, 94vw); }
.modal .m-head { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.modal .m-head h3 { font-size: 14px; font-weight: 650; }
.modal .m-head .x { margin-left: auto; cursor: pointer; color: var(--txt-3); font-size: 16px; padding: 2px 6px; border-radius: 5px; }
.modal .m-head .x:hover { background: var(--bg-3); color: var(--txt-1); }
.modal .m-body { padding: 18px 20px; overflow-y: auto; }
.modal .m-foot { padding: 13px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }

.drawer-mask { position: fixed; inset: 0; background: rgba(4,9,18,.28); z-index: 100; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 94vw); background: var(--bg-1); border-left: 1px solid var(--line); z-index: 101; display: flex; flex-direction: column; box-shadow: -16px 0 48px rgba(2,8,20,.55); animation: slideIn .18s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .d-head { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.drawer .d-head h3 { font-size: 14px; font-weight: 650; }
.drawer .d-head .x { margin-left: auto; cursor: pointer; color: var(--txt-3); padding: 2px 6px; border-radius: 5px; }
.drawer .d-head .x:hover { background: var(--bg-3); color: var(--txt-1); }
.drawer .d-body { padding: 18px 20px; overflow-y: auto; flex: 1; }

#toast-root { position: fixed; top: 64px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-3); border: 1px solid var(--line); border-left: 3px solid var(--brand); padding: 10px 16px; border-radius: var(--radius-sm); font-size: 12.5px; box-shadow: var(--shadow); animation: slideIn .18s ease; max-width: 360px; }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.err { border-left-color: var(--danger); }

/* ---------- 资产卡片 ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 14px; }
.asset-card { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .16s; position: relative; box-shadow: var(--shadow-soft); }
.asset-card:hover { border-color: rgba(77,163,255,.35); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(2,8,20,.30); }
.asset-card .thumb { height: 128px; background: linear-gradient(165deg, #101d38, #0b1526); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; border-bottom: 1px solid var(--line-soft); }
.asset-card .thumb svg, .asset-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-card .thumb .fmt { position: absolute; left: 8px; top: 8px; font-size: 10px; font-family: var(--mono); background: rgba(4,9,18,.72); color: var(--txt-2); padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); }
.asset-card .thumb .sec-badge { position: absolute; right: 8px; top: 8px; }
.asset-card .meta { padding: 10px 12px 12px; }
.asset-card .meta .name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card .meta .sub { color: var(--txt-3); font-size: 11px; margin-top: 2px; display: flex; gap: 8px; }
.asset-card .meta .foot { margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asset-card .score { position: absolute; right: 8px; bottom: 64px; background: rgba(4,9,18,.8); border: 1px solid rgba(77,163,255,.3); color: var(--brand); font-size: 10.5px; padding: 1px 7px; border-radius: 4px; font-family: var(--mono); font-weight: 600; }

/* ---------- 时间线 ---------- */
.tl { position: relative; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1.5px; background: var(--line); }
.tl .tl-item { position: relative; padding: 0 0 16px 12px; }
.tl .tl-item::before { content: ""; position: absolute; left: -17px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); border: 2px solid var(--txt-3); }
.tl .tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl .tl-item.active::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(77,163,255,.12); }
.tl .tl-item .t-title { font-size: 12.5px; font-weight: 600; }
.tl .tl-item .t-sub { color: var(--txt-3); font-size: 11.5px; margin-top: 2px; }

/* ---------- 3D 视口 ---------- */
.viewer-layout { display: grid; grid-template-columns: 1fr 320px; gap: 14px; height: calc(100vh - 175px); min-height: 520px; }
.viewport { position: relative; background: radial-gradient(1200px 500px at 50% 120%, #14264a 0%, #0a1220 60%); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.viewport canvas { display: block; }
.viewport .vp-toolbar { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 5; flex-wrap: wrap; }
.viewport .vp-hint { position: absolute; bottom: 10px; left: 12px; color: var(--txt-3); font-size: 11px; z-index: 5; background: rgba(4,9,18,.55); padding: 3px 10px; border-radius: 4px; border: 1px solid var(--line-soft); }
.viewport .vp-badges { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.anno-pin { position: absolute; width: 22px; height: 22px; border-radius: 50% 50% 50% 4px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -100%) rotate(0deg); cursor: pointer; border: 2px solid #fff3; box-shadow: 0 3px 8px rgba(2,8,20,.45); z-index: 6; }
.anno-pin.resolved { background: var(--ok); }

/* ---------- 评审 / 看板 ---------- */
.review-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.k-col { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px; }
.k-col h4 { font-size: 12px; color: var(--txt-2); display: flex; align-items: center; gap: 7px; padding: 2px 4px 10px; font-weight: 600; }
.k-card { background: var(--bg-3); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; font-size: 12px; cursor: pointer; box-shadow: var(--shadow-soft); transition: .13s; }
.k-card:hover { border-color: rgba(77,163,255,.35); }
.k-card .kc-meta { display: flex; gap: 6px; margin-top: 7px; align-items: center; flex-wrap: wrap; color: var(--txt-3); font-size: 11px; }

/* ---------- 门径 ---------- */
.gate-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 14px; }
.gate-node { min-width: 210px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; position: relative; cursor: pointer; transition: .15s; box-shadow: var(--shadow-soft); }
.gate-node:hover { border-color: rgba(77,163,255,.4); }
.gate-node.passed { border-color: rgba(52,211,153,.35); }
.gate-node.current { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77,163,255,.1), var(--shadow-soft); }
.gate-node.locked { opacity: .55; }
.gate-arrow { display: flex; align-items: center; color: var(--txt-3); padding: 0 10px; font-size: 16px; flex: none; }
.gate-node .g-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.gate-node .g-date { color: var(--txt-3); font-size: 11px; font-family: var(--mono); }
.gate-node .g-stats { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 差异对比条 ---------- */
.diff-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-0); border: 1px solid var(--line-soft); }
.diff-bar i { display: block; height: 100%; }

/* ---------- 迷你图表 ---------- */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 42px; }
.spark i { flex: 1; background: linear-gradient(180deg, var(--brand), rgba(77,163,255,.28)); border-radius: 2px 2px 0 0; min-width: 6px; }
.bar-list .bl-row { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 12px; }
.bar-list .bl-row .bl-label { color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-list .bl-row .bl-track { background: var(--bg-0); border-radius: 4px; height: 8px; overflow: hidden; }
.bar-list .bl-row .bl-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-2), var(--cyan)); }
.bar-list .bl-row .bl-val { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--txt-2); }

/* ---------- 布局工具 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-31 { display: grid; grid-template-columns: 2.2fr 1fr; gap: 14px; }
.grid-13 { display: grid; grid-template-columns: 1fr 2.2fr; gap: 14px; }
@media (max-width: 1200px) { .grid-2, .grid-3, .grid-31, .grid-13 { grid-template-columns: 1fr; } .viewer-layout { grid-template-columns: 1fr; height: auto; } .viewport { height: 60vh; } }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.muted { color: var(--txt-3); } .small { font-size: 11.5px; } .mono { font-family: var(--mono); }
.flex { display: flex; align-items: center; gap: 8px; } .flex-wrap { flex-wrap: wrap; } .ml-auto { margin-left: auto; }
.hr { border: none; border-top: 1px solid var(--line-soft); margin: 12px 0; }

/* ---------- 水印遮罩（外发预览用） ---------- */
.watermark-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: .55; }

/* ---------- 滑杆 ---------- */
.sld { margin-bottom: 14px; }
.sld-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.sld-label { font-size: 12px; color: var(--txt-2); }
.sld-val { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--brand); }
.sld-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px; background: var(--line); outline: none; }
.sld-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); cursor: pointer; box-shadow: 0 2px 6px rgba(77,163,255,.35); border: 2px solid var(--bg-0); }
.sld-range::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--brand); cursor: pointer; border: 2px solid var(--bg-0); }

/* ---------- 分组柱状图 ---------- */
.gbars-wrap { width: 100%; overflow-x: auto; }
.gbars { width: 100%; min-width: 420px; display: block; }
.gbars-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding-left: 6px; }
.gbars-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--txt-2); }
.gbars-legend i { width: 11px; height: 11px; border-radius: 3px; }

/* ---------- 层总览：域卡片网格 ---------- */
.layer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.layer-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px;
  cursor: pointer; transition: .16s; box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
}
.layer-card:hover { border-color: rgba(77,163,255,.35); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(2,8,20,.28); }
.layer-card-hero { background: linear-gradient(160deg, var(--bg-2) 60%, #0f1d38); border-color: rgba(77,163,255,.28); }
.layer-card-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--brand), var(--gold)); }
.layer-card .lyc-top { display: flex; align-items: center; justify-content: space-between; }
.layer-card .lyc-top .ico { width: 22px; height: 22px; color: var(--brand); }
.layer-card .lyc-top .ico svg { width: 22px; height: 22px; }
.layer-card .lyc-name { font-size: 13.5px; font-weight: 650; color: var(--txt-1); letter-spacing: .3px; }
.layer-card .lyc-metric { font-family: var(--mono); font-size: 23px; font-weight: 700; color: var(--txt-1); letter-spacing: -.5px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.layer-card .lyc-metric small { font-size: 12px; color: var(--txt-3); font-weight: 400; }
.layer-card .lyc-metric-label { font-size: 11px; color: var(--txt-3); font-family: var(--sans); font-weight: 400; margin-left: 4px; }
.layer-card .lyc-foot { font-size: 11px; color: var(--txt-3); display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; border-top: 1px solid var(--line-soft); padding-top: 9px; }
.layer-card .lyc-go { color: var(--brand); font-weight: 600; white-space: nowrap; opacity: 0; transition: .16s; }
.layer-card:hover .lyc-go { opacity: 1; }

/* ============================================================
   登录封面 · English Luxury Cover
   ============================================================ */
.login-cover {
  position: fixed; inset: 0; background: var(--bg-0); z-index: 50;
  display: flex; flex-direction: column; overflow: hidden;
  animation: lcFade .7s ease; transition: opacity .4s ease, transform .4s ease;
}
.login-cover.lc-leave { opacity: 0; transform: scale(1.015); }
@keyframes lcFade { from { opacity: 0; } to { opacity: 1; } }
.lc-arcs { position: absolute; inset: 0; pointer-events: none; }
.lc-arcs svg { width: 100%; height: 100%; }
.lc-orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; animation: lcDrift 14s ease-in-out infinite alternate; }
.lc-orb-a { width: 520px; height: 520px; right: -140px; top: -180px; background: radial-gradient(circle, rgba(77,163,255,.10), transparent 65%); }
.lc-orb-b { width: 460px; height: 460px; left: -160px; bottom: -180px; background: radial-gradient(circle, rgba(212,168,75,.12), transparent 65%); animation-delay: -7s; }
@keyframes lcDrift { from { transform: translate(0, 0); } to { transform: translate(-30px, 24px); } }

.lc-top { display: flex; align-items: center; gap: 12px; padding: 26px 42px; position: relative; z-index: 2; }
.lc-mark {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, #10141f 0%, #2f7ef0 130%); box-shadow: 0 6px 16px rgba(77,163,255,.25);
}
.lc-word { font-weight: 700; letter-spacing: 5px; font-size: 13px; color: var(--txt-1); }
.lc-toplink { font-size: 11px; letter-spacing: 2px; color: var(--gold); border: 1px solid rgba(212,168,75,.35); padding: 3px 12px; border-radius: 20px; }

.lc-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 2; padding: 0 24px; text-align: center; }
.lc-eyebrow { font-size: 11px; letter-spacing: 5px; color: var(--gold); margin-bottom: 22px; font-weight: 600; }
.lc-title { font-size: clamp(34px, 5vw, 58px); font-weight: 250; letter-spacing: 1px; color: var(--txt-1); line-height: 1.14; }
.lc-title span {
  font-weight: 700;
  background: linear-gradient(95deg, #e8eefb 15%, #4da3ff 60%, #7d9bff 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lc-subtitle { margin-top: 16px; font-size: clamp(14px, 1.6vw, 18px); color: var(--txt-2); letter-spacing: 1.2px; font-weight: 300; }
.lc-subtitle b { font-weight: 650; color: var(--txt-1); }
.lc-card {
  margin-top: 42px; width: min(400px, 92vw); background: rgba(14,25,48,.86); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(2,8,20,.45);
  padding: 26px 28px 20px; text-align: left; position: relative; overflow: hidden;
}
.lc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--brand), var(--gold) 60%, transparent); }
.lc-field { margin-bottom: 14px; }
.lc-field label { display: block; font-size: 10px; letter-spacing: 2.5px; color: var(--txt-3); margin-bottom: 6px; font-weight: 600; }
.lc-input {
  width: 100%; background: var(--bg-0); border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px;
  font-size: 13px; color: var(--txt-1); outline: none; font-family: inherit; transition: .15s;
}
.lc-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77,163,255,.10); }
.lc-btn {
  width: 100%; margin-top: 6px; border: none; cursor: pointer; border-radius: 10px; padding: 12px 16px;
  font-size: 13.5px; font-weight: 650; letter-spacing: 1.5px; color: #fff; font-family: inherit;
  background: linear-gradient(135deg, #2f7ef0 0%, #4da3ff 100%); box-shadow: 0 10px 26px rgba(77,163,255,.30);
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: .15s;
}
.lc-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.lc-btn-arrow { transition: transform .18s; }
.lc-btn:hover .lc-btn-arrow { transform: translateX(4px); }
.lc-alt { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 15px; font-size: 11.5px; color: var(--txt-3); }
.lc-alt span { cursor: pointer; letter-spacing: .5px; }
.lc-alt span:hover { color: var(--brand); }
.lc-alt i { width: 1px; height: 11px; background: var(--line); }

.lc-foot { display: flex; align-items: center; gap: 9px; padding: 22px 42px; font-size: 11px; color: var(--txt-3); position: relative; z-index: 2; letter-spacing: .4px; }
.lc-foot .lc-dot { opacity: .5; }
.lc-demo-tag { font-size: 10px; letter-spacing: 2px; color: var(--warn); }