/* ═══════════════════════════════════════════════════════════════════════
   Astra Remake — Design System CSS
   Source: docs/remake/ui_design/common.css (expanded + augmented)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  --bg: #070B14;
  --bg-soft: #0A1020;
  --sidebar: #080D18;
  --panel: #0D1321;
  --panel-2: #111A2E;
  --panel-3: #162039;
  --border: #22304A;
  --border-soft: rgba(148,163,184,.16);
  --text: #F4F7FB;
  --text-2: #AAB4C5;
  --muted: #6F7B91;
  --text-3: #8793A8;
  --blue: #4F7DFF;
  --blue-2: #2F5FD6;
  --purple: #8B5CF6;
  --cyan: #22D3EE;
  --red: #EF4444;
  --green: #22C55E;
  --amber: #F59E0B;
  --danger: #FB7185;
  --shadow: 0 24px 80px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.03) inset;
  --radius: 18px;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, monospace;
  --sans: "Inter", "SF Pro Display", "PingFang SC", "Microsoft Yahei", Arial, sans-serif;
  --font-title: 20px;
  --font-section: 15px;
  --font-metric: 23px;
  --font-body: 14px;
  --font-meta: 12px;
  --font-caption: 12px;
  /* Flat interaction system: shared by every V3 page. */
  --ui-button-radius: 7px;
  --ui-button-primary: #2F62E0;
  --ui-button-primary-hover: #376CE8;
  --ui-button-primary-border: #4B78E5;
  --ui-button-surface: rgba(255,255,255,.035);
  --ui-button-surface-hover: rgba(255,255,255,.065);
  --ui-button-border: rgba(148,163,184,.20);
  /* ── Color scales (lighter variants for tags/labels/borders) ── */
  --green-2: #4ade80;          /* tag.green / .down-bg highlight */
  --red-2: #f87171;            /* tag.red / .up-bg highlight */
  --line-2: rgba(79,125,255,.32); /* blue accent border (tag.blue, .cal-card.hot, etc.) */
  --up-color: var(--red);      /* 默认红涨绿跌；可由 html[data-price-colors] 覆盖 */
  --down-color: var(--green);
  --up-color-2: var(--red-2);
  --down-color-2: var(--green-2);
  --up-bg: rgba(239, 68, 68, .14);
  --down-bg: rgba(34, 197, 94, .14);
}

html[data-price-colors="green_up"] {
  --up-color: var(--green);
  --down-color: var(--red);
  --up-color-2: var(--green-2);
  --down-color-2: var(--red-2);
  --up-bg: rgba(34, 197, 94, .14);
  --down-bg: rgba(239, 68, 68, .14);
}

/* ── Reset & Base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ── Utility ──────────────────────────────────────────────────────────── */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up, .pos, .gain { color: var(--up-color); }
.down, .neg, .loss { color: var(--down-color); }
.warn { color: var(--amber); }
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }

/* ── App Shell ────────────────────────────────────────────────────────── */
/* .app 已废除 — V3 页面外壳由 layout_v3.css 的 .v3-bg / .v3-shell 提供 */

/* ── Sidebar (V3 视觉由 layout_v3.css 提供；V2 分组 nav 保留供老页用) ── */
.nav-group { display: flex; flex-direction: column; gap: 5px; }
.nav-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em;
  padding: 0 10px 5px;
}
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 12px;
  color: #9BA8BE; border: 1px solid transparent;
}
.nav-item span:first-child { display: flex; align-items: center; gap: 9px; }
.nav-item .ico { flex: 0 0 auto; display: inline-flex; width: 17px; height: 17px; }
.nav-item .ico svg { width: 100%; height: 100%; }
.nav-item.active, .nav-item:hover {
  background: rgba(79,125,255,.16);
  border-color: rgba(79,125,255,.26); color: #fff;
}
.nav-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--blue); box-shadow: 0 0 12px var(--blue);
}
.sidebar-foot {
  margin-top: auto; border-top: 1px solid var(--border-soft);
  padding: 14px 8px; color: var(--muted); font-size: 12px;
}
.sidebar-regime + .sidebar-foot { margin-top: 10px; }
.market-open { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin-bottom: 7px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(34,197,94,.12); }


/* ── Main ─────────────────────────────────────────────────────────────── */
/* .topbar / .search / .tools / .tool / .search .kbd 由 layout_v3.css 提供（V3 共享） */
.main { min-width: 0; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(13,19,33,.96); border: 1px solid var(--border-soft);
  border-radius: 13px; max-height: 260px; overflow-y: auto;
  z-index: 60; display: none;
}
.search-dropdown.open { display: block; }
.search-dropdown .dd-item {
  padding: 10px 13px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; border-bottom: 1px solid var(--border-soft);
}
.search-dropdown .dd-item:hover { background: rgba(79,125,255,.12); }
.search-dropdown .dd-item:last-child { border-bottom: none; }
.kbd {
  font-family: var(--mono); font-size: 11px; color: #C9D5EA;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px; padding: 2px 6px; margin-left: auto;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.icon-btn, .btn {
  height: 36px; border-radius: var(--ui-button-radius);
  border: 1px solid var(--ui-button-border); background: var(--ui-button-surface);
  color: var(--text-2); display: inline-flex; align-items: center;
  gap: 8px; padding: 0 13px; font-weight: 650; cursor: pointer;
  text-decoration: none; box-shadow: none; background-image: none;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.icon-btn:hover, .btn:hover {
  color: #fff; border-color: rgba(148,163,184,.34); background: var(--ui-button-surface-hover);
}
.btn.primary {
  background: var(--ui-button-primary); border-color: var(--ui-button-primary-border); color: #fff;
}
.btn.primary:hover { background: var(--ui-button-primary-hover); border-color: #5A84E8; }
.btn.danger { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.25); color: #FCA5B5; }
.btn.danger:hover { background: rgba(251,113,133,.18); border-color: rgba(251,113,133,.42); color: #FFD0D9; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; border-radius: var(--ui-button-radius); font-size: 12px; padding: 0 10px; }
.decision-card-actions { align-items: center; gap: 8px; }
.decision-card-actions .btn { min-height: 36px; height: 36px; }
.decision-more { position: relative; }
.decision-more > summary {
  list-style: none; cursor: pointer; min-height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 650;
}
.decision-more > summary::-webkit-details-marker { display: none; }
.decision-more-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 8;
  min-width: 120px; padding: 6px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.decision-more-menu a {
  padding: 8px 10px; border-radius: 8px; font-size: 12px; color: var(--text-2);
}
.decision-more-menu a:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* ── Content ──────────────────────────────────────────────────────────── */
.content { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.layout-2-1 { grid-template-columns: minmax(0,2fr) minmax(320px,1fr); }
.layout-3-2 { grid-template-columns: minmax(0,3fr) minmax(360px,2fr); }

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: rgba(255,255,255,.08);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.card-title {
  font-size: var(--font-section); font-weight: 800; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; width: 3px; height: 15px; border-radius: 99px;
  background: var(--blue);
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  border-radius: 24px; padding: 24px;
  background: var(--panel-2);
  border: 1px solid rgba(111,160,255,.24);
  box-shadow: 0 30px 90px rgba(15,23,42,.55);
  position: relative; overflow: hidden;
}
.hero::after {
  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: 34px 34px;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  color: #DDE8FF; font-size: 12px; margin-bottom: 14px;
}
.hero h2 { font-size: 28px; line-height: 1.22; letter-spacing: -.04em; max-width: 860px; }
.hero p { color: #C7D2EA; max-width: 850px; margin-top: 10px; font-size: 14px; }

/* ── Compact page summary: secondary pages should start with a decision, not a poster ── */
.page-summary {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px;
  padding: 15px 18px; border-radius: 15px;
  background: var(--panel-2);
  border: 1px solid rgba(111,160,255,.2); box-shadow: 0 14px 42px rgba(5,10,20,.28);
}
.page-summary-copy { min-width: 0; }
.page-summary-label { font-size: 10.5px; color: #9BBcff; font-weight: 750; letter-spacing: .04em; margin-bottom: 5px; }
.page-summary h2 { font-size: 18px; line-height: 1.35; letter-spacing: -.02em; margin: 0; }
.page-summary p { margin: 5px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.page-summary-metrics { display: flex; align-items: stretch; gap: 7px; }
.page-summary-metric {
  min-width: 104px; padding: 9px 11px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid var(--border-soft);
}
.page-summary-metric .k { font-size: 10.5px; color: var(--muted); }
.page-summary-metric .v { margin-top: 4px; font-size: 18px; font-weight: 850; line-height: 1.1; }
.page-summary-metric .s { margin-top: 3px; font-size: 10px; color: var(--text-3); }
.compact-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.compact-filters { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.data-state {
  display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border-radius:6px;
  font-size:var(--font-caption); color:var(--text-2); background:rgba(148,163,184,.08); border:1px solid var(--border-soft);
}
.data-state.stale { color:#fbbf24; background:rgba(245,158,11,.08); border-color:rgba(245,158,11,.18); }
.data-state.fresh { color:#86efac; background:rgba(34,197,94,.07); border-color:rgba(34,197,94,.17); }
.data-state-dot,.source-dot { width:6px; height:6px; border-radius:50%; background:currentColor; flex:0 0 6px; }
.source-badge {
  display:inline-flex; align-items:center; gap:5px; min-height:22px; padding:2px 7px;
  border-radius:6px; font-size:var(--font-caption); font-weight:700; white-space:nowrap;
  color:#cbd5e1; background:rgba(148,163,184,.08); border:1px solid rgba(148,163,184,.16);
}
.source-badge.ai { color:#c4b5fd; background:rgba(139,92,246,.09); border-color:rgba(139,92,246,.2); }
.source-badge.rule { color:#93c5fd; background:rgba(59,130,246,.08); border-color:rgba(59,130,246,.18); }
.source-badge.human { color:#86efac; background:rgba(34,197,94,.08); border-color:rgba(34,197,94,.18); }

/* Readability baseline: secondary information must remain legible on dark surfaces. */
.hint,.card-sub,.page-meta { line-height:1.5; }
.decision-desc,.decision-risk,.decision-next { line-height:1.5; }

@media (max-width: 900px) {
  .page-summary { grid-template-columns: 1fr; }
  .page-summary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-summary-metric { min-width:0; }
}

/* ── Metric ───────────────────────────────────────────────────────────── */
.metric {
  background: rgba(255,255,255,.035); border: 1px solid var(--border-soft);
  border-radius: 15px; padding: 14px;
}
.metric .label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.metric .value { font-size: var(--font-metric); font-weight: 850; letter-spacing: -.04em; }
.metric .hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ── Effectiveness: resonance comparison ─────────────────────────────── */
.effectiveness-comparison .card-head { align-items: center; }
.effectiveness-verdict {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 22px; padding: 16px 18px;
  border: 1px solid var(--border-soft); border-radius: 14px;
  background: rgba(148,163,184,.055);
}
.effectiveness-verdict.positive {
  border-color: rgba(34,197,94,.26);
  background: rgba(34,197,94,.10);
}
.effectiveness-verdict.negative {
  border-color: rgba(239,68,68,.26);
  background: rgba(239,68,68,.10);
}
.verdict-kicker {
  margin-bottom: 3px; color: var(--muted);
  font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
}
.verdict-title { font-size: 20px; font-weight: 850; letter-spacing: -.025em; }
.verdict-delta {
  flex: 0 0 auto; font-size: 34px; line-height: 1; font-weight: 900; letter-spacing: -.05em;
}
.verdict-delta small {
  margin-left: 3px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: 0;
}
.effectiveness-bars {
  padding: 2px 2px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.effectiveness-bar-row {
  display: grid; grid-template-columns: 86px minmax(160px,1fr) 54px 54px;
  align-items: center; gap: 12px; margin: 13px 0;
}
.effectiveness-bar-row .bar-label { font-weight: 750; }
.bar-track {
  position: relative; height: 12px; overflow: hidden;
  border-radius: 99px; background: rgba(148,163,184,.11);
}
.bar-fill {
  position: relative; z-index: 1; height: 100%; min-width: 2px;
  border-radius: inherit;
}
.bar-fill.resonance { background: var(--blue); }
.bar-fill.single { background: #64748B; }
.bar-baseline {
  position: absolute; z-index: 2; top: -3px; bottom: -3px; left: 50%;
  width: 1px; background: rgba(244,247,251,.72); pointer-events: none;
}
.bar-value { text-align: right; font-size: 15px; }
.bar-sample { color: var(--muted); text-align: right; font-size: 11px; }
.bar-axis {
  display: flex; justify-content: space-between;
  margin: -4px 120px 0 98px; color: var(--muted); font-size: 10px;
}
.effectiveness-detail { margin-top: 8px; }
.detail-row {
  display: grid; grid-template-columns: minmax(140px,1fr) repeat(3, minmax(82px,.6fr));
  align-items: center; gap: 12px; min-height: 42px;
  border-bottom: 1px solid rgba(148,163,184,.09);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row > :not(:first-child) { text-align: right; }
.detail-head {
  min-height: 34px; color: var(--muted);
  font-size: 11px; font-weight: 750; letter-spacing: .04em;
}
.effectiveness-action {
  margin-top: 14px; padding: 11px 13px;
  border-radius: 10px; background: rgba(79,125,255,.08);
  color: var(--text-2); font-size: 12px; line-height: 1.55;
}
.effectiveness-action strong { color: #C8D6FF; }

/* ── Badge ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 5px 9px;
  font-size: 11.5px; font-weight: 750; border: 1px solid transparent;
}
.badge.blue { background: rgba(79,125,255,.13); border-color: rgba(79,125,255,.25); color: #AFC4FF; }
.badge.purple { background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.28); color: #D5C7FF; }
.badge.red { background: rgba(239,68,68,.13); border-color: rgba(239,68,68,.26); color: #FCA5A5; }
.badge.green { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.26); color: #86EFAC; }
.badge.amber { background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.28); color: #FCD38A; }
.badge.gray { background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.18); color: #CBD5E1; }

/* ── AI Insight ───────────────────────────────────────────────────────── */
.ai-box {
  border: 1px solid rgba(139,92,246,.28);
  background: rgba(139,92,246,.14);
  border-radius: 16px; padding: 15px;
}
.ai-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px; }

/* ── Stock ────────────────────────────────────────────────────────────── */
.avatar {
  width: 38px; height: 38px; border-radius: 13px;
  background: #223B87;
  display: grid; place-items: center; font-weight: 900; color: #fff;
}
img.avatar { width: 38px; height: 38px; border-radius: 13px; object-fit: contain; display: block; background: #fff; }
.stock-row { display: flex; align-items: center; gap: 12px; }
.stock-symbol { font-weight: 850; font-size: 15px; }
.stock-name { font-size: 12px; color: var(--muted); }

/* ── Progress ─────────────────────────────────────────────────────────── */
.progress { height: 8px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.progress.red > span { background: var(--red); }
.progress.green > span { background: var(--green); }

/* ── DecisionCard（驾驶舱 / 报告共用） ─────────────────────────────── */
.decision-stack { display: flex; flex-direction: column; gap: 10px; }
.decision-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.decision-card:hover { border-color: rgba(79, 125, 255, 0.42); }
.decision-card.tone-danger {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(239, 68, 68, 0.08);
}
.decision-card.tone-warn {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.07);
}
.decision-card.tone-up {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.07);
}
.decision-card.tone-blue {
  border-color: rgba(79, 125, 255, 0.28);
  background: rgba(79, 125, 255, 0.08);
}
.decision-ic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}
.decision-ic.red { background: rgba(239, 68, 68, 0.18); color: #f87171; }
.decision-ic.yellow { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.decision-ic.green { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.decision-ic.blue { background: rgba(79, 125, 255, 0.18); color: #93b4ff; }
.decision-body { flex: 1; min-width: 0; }
.decision-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.decision-title { font-size: 13px; font-weight: 750; }
.decision-body-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 6px;
}
.decision-section { margin-top: 6px; }
.decision-k {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 2px;
}
.decision-k.warn { color: #fbbf24; }
.decision-list {
  margin: 0;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
}
.decision-list li { margin: 1px 0; }
.decision-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

/* 驾驶舱窄栏：对齐原 action_card 密度，避免徽章/列表把布局撑破 */
.decision-card.is-compact {
  padding: 8px 10px;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}
.decision-card.is-compact .decision-top {
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 2px;
}
.decision-card.is-compact .decision-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.decision-card.is-compact .badge {
  flex: 0 0 auto;
  font-size: 9.5px;
  padding: 1px 6px;
  line-height: 1.35;
}
.decision-card.has-actions {
  flex-direction: column;
  gap: 8px;
}
.decision-card-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.decision-card-actions {
  margin: 0;
  gap: 6px;
  flex-wrap: wrap;
}
.decision-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.decision-meta-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
  font-size: 10px;
  color: var(--muted);
}
.decision-risk {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fbbf24;
}
.decision-conf {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.mini-bars { display: flex; align-items: end; gap: 4px; height: 46px; }
.mini-bars span { flex: 1; border-radius: 5px 5px 0 0; background: var(--blue); min-height: 7px; }

/* ── Table ────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; padding: 0 10px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.025); }

/* ── Matrix ───────────────────────────────────────────────────────────── */
.matrix {
  position: relative; border: 1px solid var(--border-soft);
  border-radius: 18px; min-height: 330px; overflow: hidden;
  background: var(--panel);
}
.matrix::before, .matrix::after { content: ""; position: absolute; background: rgba(255,255,255,.08); }
.matrix::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.matrix::after { top: 50%; left: 0; right: 0; height: 1px; }
.axis { position: absolute; color: var(--muted); font-size: 11px; }
.axis.y { top: 12px; left: 14px; }
.axis.x { right: 14px; bottom: 12px; }
.bubble {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 850;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.bubble.red { background: rgba(239,68,68,.8); }
.bubble.blue { background: rgba(79,125,255,.84); }
.bubble.purple { background: rgba(139,92,246,.84); }
.bubble.green { background: rgba(34,197,94,.72); }

/* ── Timeline ─────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 82px 1fr; gap: 12px; }
.timeline-time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.timeline-body { border-left: 2px solid rgba(79,125,255,.4); padding-left: 13px; }

/* ── Chart ────────────────────────────────────────────────────────────── */
.chart {
  height: 280px; border-radius: 18px;
  border: 1px solid var(--border-soft);
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255,255,255,.045) 48px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(255,255,255,.035) 60px);
  position: relative; overflow: hidden;
}
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── Heatmap ──────────────────────────────────────────────────────────── */
.heatmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.heat { border-radius: 13px; padding: 13px; min-height: 76px; border: 1px solid rgba(255,255,255,.08); }
.heat.hot { background: rgba(239,68,68,.20); }
.heat.warm { background: rgba(245,158,11,.16); }
.heat.cool { background: rgba(34,197,94,.15); }
.heat.neutral { background: rgba(79,125,255,.12); }

/* ── Layout Helpers ───────────────────────────────────────────────────── */
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border-soft); margin: 12px 0; }

/* ── State: Skeleton ──────────────────────────────────────────────────── */
.skeleton {
  height: 14px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton.wide { width: 100%; }
.skeleton.narrow { width: 60%; }
.skeleton.tall { height: 24px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── State: Auth Expired ──────────────────────────────────────────────── */
.auth-expired { text-align: center; padding: 40px 20px; }
.auth-expired .icon { font-size: 42px; }
.auth-expired h3 { margin-top: 8px; }

/* ── Mobile sidebar toggle (stopgap until P3 bottom tabs) ─────────────── */
.mobile-menu-btn {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 44px; height: 44px; border-radius: var(--ui-button-radius);
  background: rgba(13,19,33,.92); border: 1px solid var(--border-soft);
  color: var(--text-2); cursor: pointer;
  box-shadow: none; background-image: none;
  backdrop-filter: blur(18px);
  transition: left .18s ease, background .18s ease;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .v3-shell { grid-template-columns: 1fr; }
  .v3-shell .sidebar { display: none; }
  .v3-shell .sidebar.open {
    display: flex; position: fixed; inset: 0 auto 0 0; z-index: 200;
    width: min(286px, 86vw); height: 100dvh; max-height: 100dvh;
    border-radius: 0; overflow: hidden;
    box-shadow: 24px 0 70px rgba(0,0,0,.5);
  }
  .sidebar-overlay.open { display: block; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; z-index: 210; }
  .mobile-menu-btn.open { left: min(230px, calc(86vw - 56px)); background: rgba(24,31,48,.96); }
  .main { padding: 18px; }
  .search { max-width: none; }
  .cols-4, .cols-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .layout-2-1, .layout-3-2, .cols-3 { grid-template-columns: 1fr; }
  .search { width: 230px; }
  .copilot { position: static; width: auto; margin-top: 18px; }
  .topbar { height: auto; align-items: flex-start; gap: 14px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 680px) {
  .cols-2, .cols-4, .cols-5 { grid-template-columns: 1fr; }
  .main { padding: 14px; }
  .hero h2 { font-size: 22px; }
  .page-title { font-size: 21px; }
  .topbar { flex-direction: column; }
  .search { width: 100%; }
  .metric .value { font-size: 20px; }
  .table { font-size: 12px; }
  .hide-sm { display: none; }
  .effectiveness-comparison .card-head { align-items: flex-start; }
  .effectiveness-verdict { align-items: flex-end; padding: 14px; }
  .verdict-title { font-size: 17px; }
  .verdict-delta { font-size: 28px; }
  .effectiveness-bar-row {
    grid-template-columns: 72px minmax(90px,1fr) 46px;
    gap: 8px;
  }
  .effectiveness-bar-row .bar-sample {
    grid-column: 2 / 4; margin-top: -5px; text-align: left;
  }
  .bar-axis { margin-right: 54px; margin-left: 80px; }
  .detail-row { grid-template-columns: minmax(100px,1fr) repeat(3, minmax(58px,.55fr)); gap: 7px; }
}

/* ═══ Phase 5: Command Palette ═══════════════════════════════════════ */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.cmdk-overlay.open { display: flex; }
.cmdk-box {
  width: 560px; max-width: 92vw; background: rgba(13,19,33,.96);
  border: 1px solid var(--border-soft); border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0,0,0,.5); overflow: hidden;
}
.cmdk-input {
  width: 100%; height: 54px; background: transparent; border: 0;
  border-bottom: 1px solid var(--border-soft); color: var(--text);
  font-size: 16px; padding: 0 20px; outline: none;
}
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.cmdk-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 10px; cursor: pointer; color: var(--text-2);
}
.cmdk-item:hover, .cmdk-item.active { background: rgba(79,125,255,.14); color: #fff; }
.cmdk-item .cmdk-icon { width: 20px; text-align: center; opacity: .8; }
.cmdk-item .cmdk-label { flex: 1; }
.cmdk-item .cmdk-hint { font-size: 11px; color: var(--muted); }
.cmdk-section { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 10px 14px 4px; }

/* ═══ Phase 5: Toast ════════════════════════════════════════════════ */
.toast-wrap {
  position: fixed; top: 20px; right: 20px; z-index: 1100;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.toast {
  background: rgba(13,19,33,.96); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--blue); border-radius: 12px;
  padding: 12px 16px; color: var(--text); font-size: 13px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  animation: toast-in .25s ease; display: flex; align-items: center; gap: 10px;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast .toast-close { margin-left: auto; cursor: pointer; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ═══ Phase 5: Mobile Bottom Tab ═════════════════════════════════════ */
.mobile-tabbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: rgba(8,13,24,.94); border-top: 1px solid var(--border-soft);
  backdrop-filter: blur(18px); padding: 6px 4px env(safe-area-inset-bottom);
  justify-content: space-around;
}
.mobile-tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; font-size: 10px; color: var(--muted); border-radius: 10px;
}
.mobile-tabbar a.active { color: var(--blue); }
.mobile-tabbar a .tab-icon { font-size: 18px; }
@media (max-width: 1100px) {
  .mobile-tabbar { display: flex; }
  .main { padding-bottom: 72px; }
}

/* ═══ Dashboard V3 · AI Cockpit ═══════════════════════════════════════ */
.cockpit { display: flex; flex-direction: column; gap: 10px; }
.cockpit-row {
  display: grid; gap: 10px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.cockpit-row > * { min-width: 0; }
.ck-span-3 { grid-column: span 3; }
.ck-span-4 { grid-column: span 4; }
.ck-span-5 { grid-column: span 5; }
.ck-span-6 { grid-column: span 6; }
.ck-span-8 { grid-column: span 8; }

.cockpit .card {
  background: rgba(13,19,33,.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148,163,184,.14);
}
.cockpit-brief {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px; border-radius: var(--radius);
  background: rgba(13,19,33,.8);
  border: 1px solid rgba(79,125,255,.22);
  position: relative; overflow: hidden;
}
.cockpit-brief-bot {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 20px;
  background: #4F7DFF;
  box-shadow: 0 0 28px rgba(79,125,255,.45);
  display: grid; place-items: center; font-size: 34px;
}
.cockpit-brief h2 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 8px; }
.cockpit-brief .regime-pill,
.sidebar-regime .regime-pill,
.regime-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(34,197,94,.14); color: #4ade80; border: 1px solid rgba(34,197,94,.28);
}
.regime-pill.off { background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.28); }
.regime-pill.neutral { background: rgba(148,163,184,.12); color: var(--text-2); border-color: var(--border-soft); }
.cockpit-brief .regime-pill.off,
.sidebar-regime .regime-pill.off { background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.28); }
.cockpit-brief .regime-pill.neutral,
.sidebar-regime .regime-pill.neutral { background: rgba(148,163,184,.12); color: var(--text-2); border-color: var(--border-soft); }
.cockpit-brief p { color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.cockpit-brief .brief-link { color: var(--blue); font-size: 12px; font-weight: 650; margin-top: 10px; display: inline-block; }

/* action / asset / health 细节由 dashboardV3.css 按设计稿覆盖 */
.period-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.period-tabs span,
.period-tabs button {
  padding: 4px 8px; border-radius: 8px; font-size: 11px; color: var(--muted);
  border: 1px solid transparent; cursor: pointer;
  background: transparent; font-family: inherit; line-height: 1.2;
}
.period-tabs span.active,
.period-tabs button.active { color: #fff; background: rgba(79,125,255,.22); border-color: rgba(79,125,255,.35); }
.period-tabs button:hover { color: var(--text-2); border-color: rgba(148,163,184,.25); }
.period-tabs button:disabled { opacity: .55; cursor: wait; }

.index-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.index-tabs span,
.index-tabs button {
  padding: 3px 8px; border-radius: 7px; font-size: 11px; color: var(--text-2);
  background: rgba(255,255,255,.03); border: 1px solid var(--border-soft);
  cursor: pointer; font-family: inherit; line-height: 1.2;
}
.index-tabs span.active,
.index-tabs button.active { color: #fff; background: rgba(79,125,255,.2); border-color: rgba(79,125,255,.35); }
.index-tabs button:hover { color: #fff; border-color: rgba(79,125,255,.35); }
.index-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
/* 市场概览 Tab 面板：避免默认 5 列把卡片压扁（dashboardV3 未加载时的兜底） */
.index-grid.mkt-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}
@media (min-width: 1200px) {
  .index-grid.mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.index-card {
  padding: 7px 8px; border-radius: 10px; background: rgba(255,255,255,.03);
  border: 1px solid var(--border-soft);
}
.index-card .idx-label { font-size: 10.5px; color: var(--muted); }
.index-card .idx-price { font-size: 13px; font-weight: 750; margin: 2px 0 1px; }
.index-card .cockpit-spark { width: 100%; height: 16px; margin-top: 3px; flex: 0 0 16px; }
.cockpit-spark.up { color: var(--up-color); }
.cockpit-spark.down { color: var(--down-color); }
.cockpit-spark:not(.up):not(.down) { color: var(--blue); }

.treemap {
  display: flex; flex-wrap: wrap; gap: 3px; min-height: 120px; align-content: stretch;
}
.tm-cell {
  border-radius: 8px; padding: 7px; min-width: 64px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid rgba(255,255,255,.06); min-height: 48px;
}
.tm-cell .tm-name { font-size: 11px; font-weight: 700; }
.tm-cell .tm-chg { font-size: 13px; font-weight: 800; font-family: var(--mono); margin-top: 2px; }

/* 行业板块热力图 + 健康度图标兜底（|动量| 加权 treemap） */
.sector-heat {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin-top: 2px;
}
.sector-heat .heat-cell {
  position: absolute;
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  box-sizing: border-box;
}
.sector-heat .heat-cell .n {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.sector-heat .heat-cell .p { font-size: 11px; font-weight: 700; margin-top: 2px; line-height: 1.15; flex-shrink: 0; }
.sector-heat .heat-cell.heat-md { justify-content: flex-end; padding: 8px 9px; }
.sector-heat .heat-cell.heat-lg { padding: 10px 12px; }
.sector-heat .heat-cell.heat-lg .n { font-size: 13px; white-space: normal; text-overflow: unset; }
.sector-heat .heat-cell.heat-lg .p { font-size: 13px; }
.sector-heat .heat-cell.heat-sm {
  flex-direction: column; align-items: stretch; justify-content: flex-end; padding: 5px 6px;
}
.sector-heat .heat-inline {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 4px; width: 100%; min-width: 0;
}
.sector-heat .heat-inline .n { flex: 1; min-width: 0; font-size: 10.5px; margin: 0; }
.sector-heat .heat-inline .p { flex: 0 0 auto; margin: 0; font-size: 10.5px; }

.health-dim {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.health-dim-ico {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  color: #8B97AD;
  display: block;
  flex-shrink: 0;
}

.flow-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.flow-row { display: grid; grid-template-columns: 90px 1fr 56px; gap: 8px; align-items: center; font-size: 12px; }
.flow-bar-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.05); overflow: hidden; }
.flow-bar { height: 100%; border-radius: 99px; }
.flow-bar.up { background: var(--up-color); }
.flow-bar.down { background: var(--down-color); }
.flow-note { font-size: 10px; color: var(--muted); margin-top: 8px; }

.donut-wrap { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.donut { width: 100px; height: 100px; flex-shrink: 0; }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

.signal-feed, .news-feed { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.signal-row, .news-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px;
}
.signal-row:last-child, .news-row:last-child { border-bottom: none; }
.signal-row .sig-sym { font-weight: 800; width: 48px; }
.signal-row .sig-score { margin-left: auto; font-family: var(--mono); color: var(--text-2); }
.signal-row .sig-time { color: var(--muted); font-size: 11px; width: 40px; text-align: right; }
.news-row { align-items: flex-start; }
.news-row .news-body { flex: 1; min-width: 0; }
.news-row .news-head { font-weight: 650; line-height: 1.35; }
.news-row .news-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }

.ai-hint-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(79,125,255,.08); border: 1px solid rgba(79,125,255,.2);
  font-size: 11.5px; color: var(--text-2);
}
.ai-hint-bar .hint-ico {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  background: var(--blue);
  display: grid; place-items: center; font-size: 13px;
}
.ai-hint-bar a { color: var(--blue); font-weight: 650; margin-left: auto; white-space: nowrap; }

/* Sidebar regime widget */
.sidebar-regime {
  margin-top: auto; padding: 12px;
  border-radius: 14px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.03);
}
.sidebar-regime .sr-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.sidebar-regime .sr-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px;
}
.sidebar-regime .sr-metrics div { text-align: center; }
.sidebar-regime .sr-metrics .lbl { font-size: 9px; color: var(--muted); }
.sidebar-regime .sr-metrics .val { font-size: 11px; font-weight: 700; font-family: var(--mono); }
.sidebar-regime .cockpit-spark { width: 100%; height: 22px; color: #4ade80; }

/* Copilot panel */
.cockpit-copilot {
  display: flex; flex-direction: column; height: 100%; min-height: 0;
}
.copilot-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; max-height: 140px; padding-right: 4px; }
.copilot-bubble {
  padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5;
  max-width: 95%;
}
.copilot-bubble.user {
  align-self: flex-end; background: rgba(79,125,255,.22); border: 1px solid rgba(79,125,255,.3);
}
.copilot-bubble.ai {
  align-self: flex-start; background: rgba(255,255,255,.04); border: 1px solid var(--border-soft);
}
.copilot-bubble.ai ul { margin: 6px 0 0 16px; color: var(--text-2); }
.copilot-input-row {
  display: flex; gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.copilot-input-row input {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 9px 12px; color: var(--text); outline: none; font-size: 12.5px;
}
.copilot-input-row input:focus { border-color: rgba(79,125,255,.45); }
.copilot-input-row button {
  width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
}
.copilot-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.copilot-quick button {
  font-size: 11px; padding: 4px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-soft); color: var(--text-2);
}
.copilot-quick button:hover { border-color: rgba(79,125,255,.4); color: #fff; }

/* ═══ Global Copilot Drawer ════════════════════════════════════════ */
.copilot-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 92vw);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: var(--panel, #0D1321);
  border-left: 1px solid var(--border-soft, #22304A);
  box-shadow: none;
  transform: translateX(105%);
  transition: transform .22s ease;
  padding: 14px 14px 16px;
}
.copilot-drawer.open { transform: translateX(0); }
.copilot-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.copilot-drawer-title {
  font-size: 15px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text, #F4F7FB);
}
.copilot-drawer-sub { font-size: 11px; color: var(--muted, #6F7B91); margin-top: 2px; }
.copilot-icon-btn {
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,.04);
  color: var(--text-2); font-size: 18px; line-height: 1;
}
.copilot-drawer .copilot-msgs {
  flex: 1; max-height: none; min-height: 0; overflow-y: auto;
  margin-bottom: 8px;
}
.copilot-drawer .copilot-input-row { margin-top: auto; }
.copilot-backdrop {
  position: fixed; inset: 0; z-index: 1190;
  background: rgba(0,0,0,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.copilot-backdrop.open { opacity: 1; pointer-events: auto; }
.copilot-fab {
  position: fixed;
  right: 18px; bottom: 72px;
  width: 48px; height: 48px; border-radius: 16px;
  border: 1px solid rgba(139,92,246,.35);
  background: rgba(139,92,246,.18);
  color: #C4B5FD;
  font-size: 18px; font-weight: 800;
  cursor: pointer; z-index: 1100;
  display: none;
}
.btn.copilot-ask {
  border-color: rgba(139,92,246,.35);
  color: #C4B5FD;
  background: rgba(139,92,246,.12);
}
.btn.copilot-ask:hover { border-color: rgba(139,92,246,.55); color: #fff; }

@media (max-width: 900px) {
  .copilot-fab { display: grid; place-items: center; }
  .copilot-drawer {
    width: 100vw;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
    top: auto; height: min(78vh, 640px);
    border-radius: 16px 16px 0 0;
    transform: translateY(110%);
  }
  .copilot-drawer.open { transform: translateY(0); }
}
@media (min-width: 901px) {
  .copilot-fab { display: none; }
}

.greeting-block .page-title { font-size: 20px; }
.greeting-block .breadcrumb { margin-bottom: 2px; }

@media (max-width: 1280px) {
  .index-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ck-span-3 { grid-column: span 6; }
  .ck-span-4 { grid-column: span 6; }
  .ck-span-5 { grid-column: span 6; }
}
@media (max-width: 1100px) {
  .cockpit-row { grid-template-columns: 1fr; }
  .ck-span-3, .ck-span-4, .ck-span-5, .ck-span-6, .ck-span-8 { grid-column: span 1; }
  .index-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ═══ Market Radar — 一屏填满（对齐驾驶舱视口策略） ═══════════════ */
.v3-shell:has(.radar-page) {
  height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
}
.v3-shell:has(.radar-page) .sidebar {
  min-height: 0;
  overflow: hidden;
}
.v3-shell .main:has(.radar-page) {
  padding: 10px 12px 10px;
  gap: 8px;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
  box-sizing: border-box;
}
.main:has(.radar-page) > .topbar {
  margin-bottom: 0;
  flex: 0 0 auto;
}
.main:has(.radar-page) > .content {
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.radar-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 0;
  overflow: hidden;
}
.radar-page .radar-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  min-height: 0;
}
.radar-page .radar-row--top { flex: 1.4 1 0; }
.radar-page .radar-row--mid { flex: 1.05 1 0; }
.radar-page .radar-row--bot { flex: 0.78 1 0; }
.radar-page .radar-row > [class*="ck-span"] {
  display: flex;
  min-width: 0;
  min-height: 0;
}
.radar-page .radar-row .card {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  overflow: hidden;
}
.radar-page .card-head { margin-bottom: 6px; gap: 6px; flex: 0 0 auto; }
.radar-page .card-title { font-size: 12.5px; }
.radar-page .card-sub {
  font-size: 10.5px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-geo-map {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin-top: 2px;
  border-radius: 10px;
  background: rgba(8,12,22,.55);
  border: 1px solid rgba(148,163,184,.1);
}
.radar-geo-fallback { margin-top: 6px; overflow: auto; flex: 1; min-height: 0; }
.radar-geo-fallback-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
}
.radar-geo-fallback-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border-left: 3px solid #94a3b8;
  font-size: 11px;
}
.radar-geo-fallback-item b { font-size: 12px; }

.radar-regime-body {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 8px;
  margin-top: 4px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.radar-gauge { position: relative; text-align: center; align-self: center; }
.radar-gauge svg { width: 100%; max-width: 140px; height: auto; }
.radar-gauge-score { margin-top: -4px; }
.radar-gauge-score .n { font-size: 24px; font-weight: 900; line-height: 1; }
.radar-gauge-score .d { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.radar-gauge--sm svg { max-width: 110px; }
.radar-gauge--sm .radar-gauge-score .n { font-size: 20px; }
.radar-macro-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.radar-macro-row {
  display: grid;
  grid-template-columns: minmax(72px, 1.15fr) minmax(0,1fr) 48px 34px;
  gap: 4px;
  align-items: center;
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(148,163,184,.08);
}
.radar-macro-row .k {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}
.radar-macro-row .k-cn {
  color: var(--text-2);
  font-weight: 650;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radar-macro-row .k-en {
  font-size: 9px;
  color: var(--muted);
  opacity: .85;
  white-space: nowrap;
}
.radar-macro-row .v { font-weight: 700; text-align: right; }
.radar-macro-row .c { font-size: 10px; text-align: right; }
.radar-macro-row .lvl {
  font-size: 9px; text-align: center; padding: 1px 3px; border-radius: 4px;
  background: rgba(148,163,184,.12); color: var(--text-2);
}

/* 市场状态卡：复用 health_gauge，略压缩以塞进一屏 */
.radar-regime-card .health-panel { gap: 6px; flex: 1; min-height: 0; }
.radar-regime-card .health-main {
  gap: 4px 10px;
  grid-template-columns: minmax(100px, 0.95fr) minmax(0, 1.15fr);
}
.radar-regime-card .health-gauge { max-width: 118px; }
.radar-regime-card .health-gauge-score .n { font-size: 22px; }
.radar-regime-card .health-tag { font-size: 11px; }
.radar-regime-card .health-dims { gap: 4px; overflow: auto; min-height: 0; }
.radar-regime-card .health-dim { gap: 6px; font-size: 11px; }
.radar-regime-card .health-dim .v { font-size: 11.5px; }
.radar-regime-card .radar-ai-box { margin-top: 6px; }

.radar-ai-box {
  margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  background: rgba(79,125,255,.08); border: 1px solid rgba(79,125,255,.2);
  flex: 0 0 auto;
}
.radar-ai-box .ai-title { font-size: 10px; font-weight: 700; color: #93c5fd; margin-bottom: 3px; }
.radar-ai-box p {
  margin: 0; font-size: 11px; line-height: 1.4; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.radar-perf-card .mkt-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 6px; flex: 0 0 auto;
}
.radar-perf-card .mkt-tabs button {
  padding: 2px 8px; border-radius: 6px; font-size: 10.5px; color: var(--text-2);
  background: rgba(255,255,255,.03); border: 1px solid var(--border-soft);
  cursor: pointer; font-family: inherit;
}
.radar-perf-card .mkt-tabs button.active {
  color: #fff; background: rgba(79,125,255,.2); border-color: rgba(79,125,255,.35);
}
.radar-perf-card .radar-perf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
  flex: 1;
  min-height: 0;
  align-content: start;
  overflow: auto;
}
.radar-perf-card .mkt-item {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(148,163,184,.12);
  min-height: 0;
}
.radar-perf-card .mkt-item .idx-label { font-size: 10px; color: var(--muted); }
.radar-perf-card .mkt-item .idx-price { font-size: 13px; font-weight: 750; margin-top: 1px; }
.radar-perf-card .mkt-item .idx-chg { font-size: 11px; margin-top: 1px; }
.radar-perf-card .mkt-item .cockpit-spark {
  width: 100%; height: 22px; margin-top: 4px; display: block;
  /* 多日走势形状用中性色；日涨跌红绿只在 .idx-chg */
  color: var(--blue);
}
.radar-perf-card .market-tab-panel[hidden] { display: none !important; }

.radar-heat {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 4px;
}
.radar-flow-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 6px; flex: 1; min-height: 0; overflow: auto;
}
.radar-flow-row {
  display: grid; grid-template-columns: 52px 1fr 58px; gap: 6px;
  align-items: center; font-size: 11px;
}
.radar-flow-row .name {
  color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radar-flow-track {
  position: relative; height: 7px; border-radius: 99px;
  background: rgba(255,255,255,.04); overflow: hidden;
}
.radar-flow-mid {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: rgba(148,163,184,.35);
}
.radar-flow-bar { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.radar-flow-bar.in { background: #ef4444; }
.radar-flow-bar.out { background: #22c55e; }
.radar-sent-wrap { margin-top: 4px; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.radar-sent-spark { margin-top: 6px; flex: 1; min-height: 0; }
.radar-sent-svg { width: 100%; height: 100%; min-height: 36px; max-height: 48px; color: #60a5fa; }
.radar-cal {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 6px; flex: 1; min-height: 0; overflow: auto;
}
.radar-cal-item { display: flex; gap: 8px; align-items: flex-start; }
.radar-cal-dot { display: flex; gap: 2px; padding-top: 4px; flex-shrink: 0; }
.radar-cal-dot i {
  width: 4px; height: 4px; border-radius: 50%; background: rgba(148,163,184,.35);
}
.radar-cal-dot.high i { background: #ef4444; }
.radar-cal-dot.medium i { background: #f59e0b; }
.radar-cal-dot.low i { background: #64748b; }
.radar-cal-body .t { font-size: 11.5px; font-weight: 650; }
.radar-cal-body .m { font-size: 10.5px; margin-top: 1px; }
.radar-insight-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px; margin-top: 6px; flex: 1; min-height: 0;
}
.radar-insight {
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.12);
  min-height: 0;
  overflow: hidden;
}
.radar-insight .kicker {
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase;
}
.radar-insight .title { font-size: 12px; font-weight: 750; margin: 3px 0 4px; }
.radar-insight .body {
  font-size: 11px; line-height: 1.35; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.radar-insight.tone-blue { border-color: rgba(79,125,255,.28); background: rgba(79,125,255,.08); }
.radar-insight.tone-warn { border-color: rgba(245,158,11,.28); background: rgba(245,158,11,.08); }
.radar-insight.tone-up { border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.08); }
.radar-insight.tone-teal { border-color: rgba(45,212,191,.28); background: rgba(45,212,191,.08); }
.radar-score-list {
  display: flex; flex-direction: column; gap: 0;
  margin-top: 4px; flex: 1; min-height: 0; overflow: auto;
}
.radar-score-row {
  display: grid; grid-template-columns: 1fr auto 64px; gap: 6px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(148,163,184,.08);
}
.radar-score-row .lab { font-size: 11.5px; font-weight: 700; }
.radar-score-row .score { font-size: 16px; font-weight: 900; }
.radar-score-row .hint { font-size: 10px; }
.radar-ix-spark { width: 64px; height: 22px; color: var(--blue); }
.radar-fab { display: none; }

@media (max-width: 1280px) {
  /* 覆盖全局 ck-span 半宽规则，保持雷达一屏三列/四列 */
  .radar-page .ck-span-3 { grid-column: span 3; }
  .radar-page .ck-span-4 { grid-column: span 4; }
  .radar-page .ck-span-8 { grid-column: span 8; }
  .radar-regime-body { grid-template-columns: 1fr; }
  .radar-insight-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .v3-shell:has(.radar-page),
  .v3-shell .main:has(.radar-page),
  .main:has(.radar-page) > .content {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .radar-page {
    flex: none;
    overflow: visible;
    gap: 12px;
    padding-bottom: 20px;
  }
  .radar-page .radar-row,
  .radar-page .radar-row--top,
  .radar-page .radar-row--mid,
  .radar-page .radar-row--bot {
    flex: none;
    grid-template-columns: 1fr;
  }
  .radar-page .radar-row .ck-span-3,
  .radar-page .radar-row .ck-span-4,
  .radar-page .radar-row .ck-span-8 {
    grid-column: span 1;
  }
  .radar-page .radar-row .card { overflow: visible; }
  .radar-geo-map { min-height: 220px; height: 240px; flex: none; }
  .radar-insight-grid { grid-template-columns: 1fr; }
  .radar-score-row { grid-template-columns: 1fr auto; }
  .radar-ix-spark { display: none; }
  .radar-ai-box p,
  .radar-insight .body { -webkit-line-clamp: unset; display: block; }
}

/* ═══ Stock Center (PR 1) ═══════════════════════════════════════ */

.sc-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.sc-top .btn { white-space: nowrap; }

.sc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }

.sc-tab { padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); background: transparent; border: 1px solid transparent; border-bottom: none; cursor: pointer; }

.sc-tab:hover { color: var(--text-2); background: rgba(255,255,255,.03); }

.sc-tab.active { color: #fff; background: rgba(79,125,255,.18); border-color: rgba(79,125,255,.32); }

.sc-tab-panel { display: none; }

.sc-tab-panel.active { display: block; }

.sc-tab-panel .card-head { margin-bottom: 10px; gap: 10px; }
.sc-tab-panel .card-title { font-size: 13px; }
.sc-tab-panel .card-title::before { height: 12px; }
.sc-tab-panel .row-actions { flex-wrap: wrap; gap: 4px; }

/* ── 总览：全宽 Banner ───────────────────────── */
.sc-banner {
  display: grid;
  grid-template-columns: minmax(410px, 1.4fr) minmax(330px, 1.35fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin-bottom: 12px;
}
.sc-banner-main { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: center; gap: 18px; min-width: 0; }
.sc-banner-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sc-snapshot-meta { min-width: 0; }
.sc-banner-id .sc-snapshot-logo { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.sc-banner-id .name { font-size: 15px; line-height: 1.3; color: var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sc-banner-id .name b { font-size: 16px; }
.sc-banner-id .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sc-banner-price { display: flex; flex-direction: column; gap: 4px; flex: none; }
.sc-price-row-inline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sc-banner-price .sc-price-big { font-size: 30px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.sc-banner-price .sc-price-chg { font-size: 14px; font-weight: 700; }
.sc-market-clock {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; font-size: 11px; color: var(--muted);
}
.sc-market-clock .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #64748b;
}
.sc-market-clock.open .dot { background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.sc-market-clock.open .lbl { color: #86EFAC; font-weight: 700; }
.sc-banner-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.sc-banner-pager { display: flex; flex-direction: column; gap: 4px; }
.sc-banner-pager .btn { font-size: 11px; padding: 0 8px; height: 24px; }

.sc-kpi {
  padding: 10px 12px;
  border-right: 1px solid var(--border-soft);
  background: transparent;
}
.sc-kpi:last-child { border-right: none; }
.sc-kpi.highlight { background: rgba(79,125,255,.08); }
.sc-kpi .lbl { font-size: 10px; color: var(--muted); margin-bottom: 3px; letter-spacing: .02em; }
.sc-kpi .val { font-size: 14px; font-weight: 800; }

/* ── 总览：双洞察卡 ──────────────────────────── */
.sc-insight-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}
.sc-insight-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}
.sc-conclusion-headline {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.sc-conclusion-body {
  margin: 8px 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sc-decision-path { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0 0 14px; }
.sc-decision-step { padding:9px 10px; border-radius:9px; background:rgba(255,255,255,.025); border:1px solid var(--border-soft); }
.sc-decision-step.action { background:rgba(79,125,255,.07); border-color:rgba(79,125,255,.2); }
.sc-decision-step .k { font-size:10px; color:var(--muted); font-weight:700; }
.sc-decision-step .v { margin-top:4px; font-size:11.5px; line-height:1.4; color:var(--text-1); }
.sc-meter { margin-bottom: 12px; }
.sc-meter-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--muted); margin-bottom: 6px;
}
.sc-coverage-bar.cov > i { background: #60A5FA; }
.sc-insight-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: auto; padding-top: 4px;
}
.sc-text-link {
  background: none; border: none; padding: 0;
  color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit;
}
.sc-text-link:hover { color: var(--blue); }

.sc-risk-card .sc-risk-grid { margin-top: 16px; margin-bottom: 0; flex: 1; }
.sc-risk-tile {
  padding: 14px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-soft);
  text-align: left;
}
.sc-risk-tile .label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.sc-risk-tile .value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sc-risk-tile.ok { background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.22); }
.sc-risk-tile.over { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); }
.sc-risk-tile.over .value { color: #FCA5A5; }
.sc-risk-foot { margin-top: 14px; font-size: 12px; }

/* ── 总览：全宽图表 ──────────────────────────── */
.sc-chart-card { padding: 14px 16px; margin-bottom: 12px; }
.sc-chart-legend {
  display: flex; gap: 14px; margin-top: 4px; font-size: 12px; color: var(--muted);
}
.sc-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sc-chart-legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.sc-chart-legend .lg-nvda i { background: #22C55E; }
.sc-chart-legend .lg-soxx i { background: #4F7DFF; }
.sc-chart-legend b.up { color: var(--up-color); }
.sc-chart-legend b.down { color: var(--down-color); }
.sc-chart-wrap { position: relative; }
.sc-event-chips {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3;
}
.sc-event-chip {
  position: absolute; top: 10px; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent; backdrop-filter: blur(4px);
}
.sc-event-chip.amber { background: rgba(245,158,11,.18); color: #FCD38A; border-color: rgba(245,158,11,.35); }
.sc-event-chip.purple { background: rgba(139,92,246,.18); color: #C4B5FD; border-color: rgba(139,92,246,.35); }
.sc-event-chip.blue { background: rgba(79,125,255,.18); color: #93C5FD; border-color: rgba(79,125,255,.35); }
.sc-event-chip.green { background: rgba(34,197,94,.18); color: #86EFAC; border-color: rgba(34,197,94,.35); }
.sc-event-marker-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle;
}
.sc-event-marker-legend .dot.amber { background: #F59E0B; }
.sc-event-marker-legend .dot.purple { background: #8B5CF6; }
.sc-event-marker-legend .dot.blue { background: #4F7DFF; }
.sc-event-marker-legend .dot.green { background: #22C55E; }

/* ── 总览：三底卡 ────────────────────────────── */
.sc-bottom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.sc-mini-insight { padding: 16px 18px; position: relative; min-height: 148px; }
.sc-mini-insight-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sc-mini-insight-head .ico {
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.sc-mini-insight.evidence .ico { background: rgba(34,197,94,.15); color: #86EFAC; }
.sc-mini-insight.risk .ico { background: rgba(245,158,11,.15); color: #FCD38A; }
.sc-mini-insight.next-ev .ico { background: rgba(139,92,246,.15); color: #C4B5FD; }
.sc-mini-insight ul {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: flex; flex-direction: column; gap: 8px;
}
.sc-mini-insight li {
  font-size: 13px; line-height: 1.45;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.sc-more {
  position: absolute; right: 16px; bottom: 14px;
  font-size: 12px; color: var(--blue); text-decoration: none; font-weight: 600;
}
.sc-more:hover { text-decoration: underline; }
.sc-next-ev-title { font-size: 16px; font-weight: 800; margin-top: 4px; }
.sc-next-ev-sub { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.sc-countdown {
  display: inline-block; margin-top: 14px; margin-bottom: 28px;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25);
  color: #C4B5FD; font-size: 12px; font-weight: 700;
}

/* Tabs：更贴近效果图下划线态 */
.sc-tabs { gap: 2px; border-bottom-color: rgba(148,163,184,.15); }
.sc-tab {
  border-radius: 0; border: none; background: transparent;
  padding: 10px 14px; position: relative;
}
.sc-tab.active {
  color: #fff; background: transparent;
  box-shadow: inset 0 -2px 0 #4F7DFF;
}

@media (max-width: 1100px) {
  .sc-banner { grid-template-columns: 1fr; }
  .sc-banner-main { flex-wrap: wrap; }
  .sc-banner-kpis { grid-template-columns: repeat(3, 1fr); }
  .sc-insight-row, .sc-bottom-row { grid-template-columns: 1fr; }
  .sc-banner-pager { flex-direction: row; }
}
@media (max-width: 700px) {
  .sc-banner-kpis { grid-template-columns: repeat(2, 1fr); }
  .sc-banner-main, .sc-decision-path { grid-template-columns: 1fr; }
}

/* legacy helpers still used by other tabs / modals */
.sc-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .sc-grid { grid-template-columns: 1fr; } }

.sc-snapshot-main {
  display: grid;
  grid-template-columns: 36px minmax(140px, 1fr) auto minmax(360px, 1.3fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 10px;
}
.sc-snapshot-main .sc-snapshot-logo { width: 36px; height: 36px; border-radius: 8px; font-size: 15px; }
.sc-snapshot-main .name { font-size: 14px; line-height: 1.3; }
.sc-snapshot-main .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sc-snapshot-price { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.sc-price-big { font-size: 22px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.sc-price-chg { font-size: 12px; font-weight: 700; }
.sc-snapshot-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.sc-hold-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin-bottom: 10px;
  background: rgba(79,125,255,.08); border: 1px solid rgba(79,125,255,.18);
  border-radius: 8px; font-size: 12px;
}
.sc-hold-strip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.sc-pager-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.sc-pager-row .row-actions { gap: 4px; }
.sc-pager-row .btn { font-size: 11px; padding: 0 8px; height: 24px; }

.sc-card-subline { font-size: 12px; color: var(--text-2); margin-top: 2px; flex: 1; min-width: 0; }
.sc-verdict-label { font-weight: 700; color: var(--text); }

.sc-radar-axes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sc-radar-axis-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sc-radar-axis-row .lbl { width: 80px; color: var(--text-2); }
.sc-radar-axis-row .bar { flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.sc-radar-axis-row .bar > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.sc-radar-axis-row .val { width: 36px; text-align: right; font-weight: 700; }
.sc-radar-axis-row .tone { width: 56px; text-align: right; font-size: 11px; }

.sc-snapshot-head { display: flex; align-items: center; gap: 14px; }

.sc-snapshot-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: #fff; flex: none; }
img.sc-snapshot-logo { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

.sc-snapshot-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.sc-snapshot-meta .name { font-size: 14px; color: var(--text-2); }

.sc-snapshot-meta .sub { font-size: 12px; color: var(--muted); }

.sc-price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }

.sc-coverage-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }

.sc-coverage-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }

.sc-coverage-bar > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .3s ease; }

.sc-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.sc-mini { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border-soft); }

.sc-mini .lbl { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

.sc-mini .val { font-size: 18px; font-weight: 800; }

.sc-chart-range { display: flex; gap: 4px; }

.sc-chart-range .ma-tab { cursor: pointer; padding: 4px 10px; border-radius: 7px; font-size: 11px; color: var(--muted); }

.sc-chart-range .ma-tab.active { background: rgba(79,125,255,.2); color: #fff; }

.sc-event-marker-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

.sc-risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }

.sc-risk-remaining { padding: 12px; border-radius: 10px; background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.22); }

.sc-risk-remaining.over { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); }

.sc-ai-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }

@media (max-width: 900px) { .sc-ai-cols { grid-template-columns: 1fr; } .sc-mini-grid { grid-template-columns: 1fr; } .sc-risk-grid { grid-template-columns: 1fr; } }

.sc-ai-col h4 { font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }

.sc-ai-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.sc-ai-col li { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.03); font-size: 13px; line-height: 1.4; }

.sc-warn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.22); color: #FCD38A; font-size: 12px; margin-top: 10px; }

.sc-next-actions { display: flex; flex-direction: column; gap: 8px; }

.sc-action-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--border-soft); cursor: pointer; text-decoration: none; color: var(--text); }

.sc-action-row:hover { background: rgba(79,125,255,.08); }

.sc-action-row .ico { width: 28px; height: 28px; border-radius: 7px; background: rgba(79,125,255,.18); display: flex; align-items: center; justify-content: center; color: var(--blue); }

.sc-action-row .body { flex: 1; min-width: 0; }

.sc-action-row .body b { display: block; font-size: 13px; }

.sc-action-row .body span { font-size: 11px; color: var(--muted); }

.sc-event-timeline { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 14px; scroll-snap-type: x mandatory; }

.sc-event-card { flex: 0 0 200px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--border-soft); scroll-snap-align: start; }

.sc-event-card .date { font-size: 12px; color: var(--muted); }

.sc-event-card .title { font-size: 13px; font-weight: 700; margin-top: 6px; }

.sc-event-card.empty { color: var(--muted); font-style: italic; display: flex; align-items: center; justify-content: center; min-height: 80px; }

.sc-modal { position: fixed; inset: 0; background: rgba(7,11,20,.78); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; }

.sc-modal.open { display: flex; }

.sc-modal-box { width: min(420px, 90vw); padding: 20px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border-soft); box-shadow: var(--shadow); }

.sc-modal-box h3 { margin: 0 0 8px; font-size: 16px; }

.sc-modal-box label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }

.sc-modal-box input, .sc-modal-box textarea, .sc-modal-box select { width: 100%; padding: 8px 10px; border-radius: 7px; background: var(--panel); border: 1px solid var(--border-soft); color: var(--text); font-size: 13px; font-family: inherit; }

.sc-modal-box textarea { resize: vertical; min-height: 80px; }

.sc-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.sc-toast { position: fixed; bottom: 24px; right: 24px; padding: 10px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border-soft); box-shadow: var(--shadow); font-size: 13px; z-index: 200; opacity: 0; transform: translateY(8px); transition: all .2s; }

.sc-toast.show { opacity: 1; transform: translateY(0); }

.sc-toast.ok { border-color: rgba(34,197,94,.32); color: #86EFAC; }

.sc-toast.err { border-color: rgba(239,68,68,.32); color: #FCA5A5; }
