/* ===================================================================
   CE RBC — NIKE-FLAVORED DESIGN TOKENS
   Stark black/white foundation + Volt (#D8FF00) hero accent + Infrared.
   Hero accent = black on light (Nike black), volt on dark.
   =================================================================== */
:root {
  /* Nike light: white surfaces, black ink, volt as the energetic pop */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --border: #e6e6e6;
  --text: #0a0a0a;
  --muted: #595959;          /* ~7:1 on white — WCAG AA */
  --muted-2: #6b6b6b;          /* bumped from #737373 (4.75:1) → ~5.3:1 on white, safer AA */
  --focus: #0a0a0a;
  --primary: #0a0a0a;        /* Nike signature black button */
  --primary-dark: #000000;
  --accent: #0a0a0a;         /* hero accent on light = black */
  --accent-ink: #ffffff;      /* text sitting on accent fill */
  --volt: #d8ff00;           /* Nike Volt — fills / chips / underlines */
  --infrared: #e3000f;        /* Nike Infrared — impact / energy */
  /* semantic status */
  --ok: #0a7d4b;   --ok-bg: #ecfdf3;   --ok-border: #b7e4cd;
  --err: #c2162a;  --err-bg: #fef2f2;  --err-border: #fecaca;     /* text-safe red on light */
  --warn: #92680b; --warn-bg: #fffbeb; --warn-border: #fde68a;
  /* chart tokens — light (synced via cc() in app.js) */
  --chart-axis: #595959;
  --chart-text: #1a1a1a;
  --chart-split: #ececec;
  --chart-pie-border: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
  --radius: 12px;
  --radius-sm: 8px;
  /* season (货品生命周期) colors — distinct slice of the 12-scale (indices 7/6/12/9),
     never collide with region 0-3; mirrors app.js SEASON_SCALE_IDX for single-source truth */
  --season-spring: #639922; --season-summer: #D85A30; --season-autumn: #BA7517; --season-winter: #85B7EB;
  /* ---------- Unified categorical scale — SINGLE SOURCE OF TRUTH ----------
   * Mirrors app.js SCALE_LIGHT / SCALE_DARK. Regions take the first 4 hues;
   * the full 12-color ramp is exposed as --cat-1..12 for any CSS categorical
   * surface. volt/infrared stay reserved for metric semantics (amount/qty).
   * -d suffixed tokens are the brighter dark-theme counterparts. */
  --r-cejs: #378ADD;  --r-cejz: #7F77DD;  --r-cesh: #1D9E75;  --r-cesw: #EF9F27;
  --cat-1:#378ADD; --cat-2:#7F77DD; --cat-3:#1D9E75; --cat-4:#EF9F27; --cat-5:#D4537E; --cat-6:#D85A30; --cat-7:#639922; --cat-8:#5F5E5A; --cat-9:#85B7EB; --cat-10:#AFA9EC; --cat-11:#5DCAA5; --cat-12:#BA7517;
  --r-cejs-d:#6FB1FF; --r-cejz-d:#A99FF2; --r-cesh-d:#4FD3A8; --r-cesw-d:#FFC14D;
  --cat-1-d:#6FB1FF; --cat-2-d:#A99FF2; --cat-3-d:#4FD3A8; --cat-4-d:#FFC14D; --cat-5-d:#F07CA6; --cat-6-d:#F5845C; --cat-7-d:#8FD14A; --cat-8-d:#B5B3AC; --cat-9-d:#AFD2F7; --cat-10-d:#CFC9F5; --cat-11-d:#8FE3C9; --cat-12-d:#E0B45E;

  /* ---- Fluid type scale (responsive typography, 2026) ---- */
  --fs-hero: clamp(28px, 4.4vw, 46px);   /* north-star KPI number */
  --fs-kpi:  clamp(22px, 2.6vw, 30px);   /* standard KPI number   */
  --fs-h1:   clamp(16px, 1.3vw, 20px);   /* brand wordmark        */
  --fs-h3:   clamp(14px, 1.05vw, 16px);  /* card / section titles */
  --fs-kick: 10.5px;                       /* uppercase eyebrow / kicker labels (legibility floor) */
  --tracking-kick: .16em;                  /* single-source tracked-label rhythm */
}

/* ---------- Nike dark: pure-black canvas, volt as the hero ---------- */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #161616;
  --surface-2: #1f1f1f;
  --border: #2e2e2e;
  --text: #ffffff;
  --muted: #a8a8a8;          /* ~7:1 on #161616 — WCAG AA */
  --muted-2: #8a8a8a;
  --focus: #d8ff00;
  --primary: #d8ff00;        /* volt button on dark */
  --primary-dark: #b9db00;
  --accent: #d8ff00;         /* hero accent on dark = volt */
  --accent-ink: #0a0a0a;     /* black text on volt fill */
  --volt: #d8ff00;
  --infrared: #ff4632;
  --ok: #34d399;   --ok-bg: rgba(52, 211, 153, .12);  --ok-border: rgba(52, 211, 153, .35);
  --err: #ff5a5a;  --err-bg: rgba(255, 90, 90, .12);  --err-border: rgba(255, 90, 90, .35);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .12); --warn-border: rgba(251, 191, 36, .35);
  --chart-axis: #8a8a8a;
  --chart-text: #ffffff;
  --chart-split: rgba(255, 255, 255, .08);
  --chart-pie-border: #161616;
  --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

/* ---------- Accessibility: visible focus for keyboard users (WCAG 2.4.7) ---------- */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
th:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
body {
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(216, 255, 0, .05), transparent 60%),
    radial-gradient(900px 520px at -10% 0%, rgba(10, 10, 10, .03), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;  /* guarantee tabular + lining figures + kerning everywhere */
  transition: background-color .3s ease, color .3s ease;
}
[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(216, 255, 0, .10), transparent 60%),
    radial-gradient(900px 520px at -10% 0%, rgba(255, 255, 255, .02), transparent 55%),
    var(--bg);
}
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; line-height: 1.14; text-wrap: balance; }

/* ---------- Nike athletic kickers (uppercase English tags) ----------
 * Color flips per theme for AA contrast: black on light, volt on dark. */
.kicker, .nav-kicker, .card-kicker, .kpi-kick, .filter-label {
  font-family: "Archivo", sans-serif;
  text-transform: uppercase;
  letter-spacing: var(--tracking-kick);
  font-weight: 800;
  font-size: var(--fs-kick);
  color: var(--text);
  font-feature-settings: "cpsp" 1, "tnum" 1, "lnum" 1;
}
.nav-kicker { display: block; font-size: var(--fs-kick); letter-spacing: var(--tracking-kick); margin-bottom: 2px; color: var(--muted); }
.card-kicker { display: block; font-size: var(--fs-kick); letter-spacing: var(--tracking-kick); margin-bottom: 3px; opacity: .9; }
.kpi-kick { display: block; font-size: var(--fs-kick); letter-spacing: var(--tracking-kick); margin-bottom: 2px; }
[data-theme="dark"] .kicker,
[data-theme="dark"] .nav-kicker,
[data-theme="dark"] .card-kicker,
[data-theme="dark"] .kpi-kick { color: var(--volt); }
.brand-kicker {
  display: block; font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick);
  text-transform: uppercase; color: var(--text);
}
[data-theme="dark"] .brand-kicker { color: var(--volt); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px;
  /* Selective glassmorphism on the nav layer (glass on nav, solid on content) */
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 2px solid var(--text);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
  transition: background-color .3s ease;
}
[data-theme="dark"] .topbar { background: rgba(10, 10, 10, .72); border-bottom-color: var(--volt); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--primary); color: var(--accent-ink);
  font-weight: 900; font-size: 16px; letter-spacing: -.5px;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--volt) inset;
}
.brand-text h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -.02em; line-height: 1.04; text-wrap: balance; }
.brand-kicker {
  display: block; font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick);
  text-transform: uppercase; color: var(--text);
}
.subtitle { color: var(--muted); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.data-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
  max-width: min(50ch, 360px); overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  transition: background .5s ease, border-color .5s ease, color .5s ease;
}
.data-status b { color: var(--text); font-weight: 700; }
.data-status.ok { color: var(--ok); border-color: var(--ok-border); background: var(--ok-bg); }
.data-status.warn { color: var(--warn); border-color: var(--warn-border); background: var(--warn-bg); }

/* ---------- 新鲜度信号 (机会点④) ---------- */
.freshness {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.freshness-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); }
.freshness-text { font-variant-numeric: tabular-nums; }
.freshness-text b { color: var(--text); font-weight: 700; }
.freshness.pulse { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.freshness.pulse .freshness-dot { animation: freshPulse 1.4s ease-out 2; }
@keyframes freshPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 0%, transparent); }
}
@media (max-width: 720px) {
  .freshness { display: none; } /* keep topbar uncluttered on mobile; data-status remains */
}

/* 数据置信度 chip (机会点⑥) */
.data-confidence {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; white-space: nowrap;
  padding: 4px 12px 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); cursor: default;
}
.data-confidence .dc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.data-confidence .dc-body { display: inline-flex; flex-direction: column; line-height: 1.05; }
.data-confidence .dc-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.data-confidence .dc-score { font-size: 14px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.data-confidence .dc-sub { font-size: 11px; font-weight: 600; opacity: .85; padding-left: 8px; border-left: 1px solid var(--border); margin-left: 2px; }
.data-confidence.dc-high { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.data-confidence.dc-high .dc-dot { background: var(--ok); }
.data-confidence.dc-mid { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn); }
.data-confidence.dc-mid .dc-dot { background: var(--warn); }
.data-confidence.dc-low { border-color: var(--err-border); background: var(--err-bg); color: var(--err); }
.data-confidence.dc-low .dc-dot { background: var(--err); }

.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--accent-ink); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); font-weight: 700; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #eef1f6; }
[data-theme="dark"] .btn-ghost:hover { background: #232c3d; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary:active { background: var(--primary-dark); }

/* ---------- Layout ---------- */
.layout { display: flex; align-items: flex-start; }
.sidebar {
  width: 190px; flex: 0 0 190px;
  padding: 18px 12px; position: sticky; top: 65px;
  display: flex; flex-direction: column; gap: 4px;
  /* With the section sub-nav expanded the rail can outgrow a short viewport — let it
     scroll internally instead of clipping the last entries. */
  max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  padding: 11px 13px; border: none; background: transparent;
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--primary); color: var(--accent-ink); box-shadow: var(--shadow); }

/* Section sub-nav — jump list for the active tab's analytical phases.
   Only rendered when the tab has 2+ .insight-divider markers (today: 洞察). */
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 3px 0 5px 20px; padding-left: 9px; border-left: 1px solid var(--border); }
.nav-sub[hidden] { display: none; }
.nav-sub-item {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  padding: 5px 7px; border: none; background: transparent; border-radius: 6px;
  color: var(--muted); font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-sub-item .ns-idx {
  flex: none; width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
  background: var(--border); color: var(--muted-2); transition: all .15s;
}
.nav-sub-item .ns-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub-item:hover { background: var(--surface-2); color: var(--text); }
.nav-sub-item.is-active { color: var(--text); background: var(--surface-2); }
.nav-sub-item.is-active .ns-idx { background: var(--accent); color: var(--accent-ink); }
.nav-sub-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.content { flex: 1; min-width: 0; padding: 20px; }

/* ---------- Filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.filter-group select {
  appearance: none; padding: 9px 30px 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 550; cursor: pointer; min-width: 140px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.filter-hint { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* ---------- Tabs ---------- */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panelIn .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -.01em; }
.card-sub { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .01em; line-height: 1.4; text-align: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 18px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: stretch; }
.kpi.feature { grid-column: span 2; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, background-color .3s ease;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted-2); }
.kpi.feature::before { background: var(--volt); width: 6px; }
.kpi:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
/* Bento "north-star" emphasis on the primary metric */
.kpi.feature {
  background: linear-gradient(135deg, color-mix(in srgb, var(--volt) 12%, var(--surface)), color-mix(in srgb, var(--volt) 3%, var(--surface)));
  border-color: color-mix(in srgb, var(--volt) 45%, var(--border));
}
.kpi.feature .kpi-value { font-size: var(--fs-hero); color: var(--text); }
[data-theme="dark"] .kpi.feature { background: linear-gradient(135deg, rgba(216, 255, 0, .18), rgba(216, 255, 0, .04)); }
[data-theme="dark"] .kpi.feature .kpi-value { color: var(--volt); }
/* Diagnostic / derived-metric cards — distinct volt left rail to signal "analytical layer" */
.kpi.diag::before { background: linear-gradient(180deg, var(--volt), color-mix(in srgb, var(--volt) 25%, transparent)); width: 4px; }
.kpi.diag { border-top: 1px solid color-mix(in srgb, var(--volt) 30%, var(--border)); }
.kpi.diag .kpi-label { color: var(--accent); }
.kpi .kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .kpi-value { font-size: var(--fs-kpi); font-weight: 800; margin-top: 0; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums lining-nums; text-wrap: auto; }
.kpi-num { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; font-size: var(--fs-kpi); min-width: 0; }
.kpi-value { min-width: 0; }
.unit { font-size: max(10.5px, .8em); font-weight: 600; color: var(--muted); letter-spacing: 0; font-variant-numeric: normal; }
[data-theme="dark"] .unit { color: var(--muted-2); }
.kpi .kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
/* Delta as a punchy stat chip (Nike-style).
 * Semantic coloring: .good = green (change is good for business), .bad = red (change is bad).
 * Arrow still shows real direction (▲/▼) so direction and valuation are never confused.
 * Base volt = neutral brand fallback for callers that don't pass a semantic class. */
.kpi .kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; background: var(--volt); color: #0a0a0a; }
.kpi .kpi-delta.good { background: var(--ok-bg); color: var(--ok); border: 0.5px solid var(--ok-border); }
.kpi .kpi-delta.bad { background: var(--err-bg); color: var(--err); border: 0.5px solid var(--err-border); }
.kpi .kpi-delta.down { background: var(--err-bg); color: var(--err); }
.kpi .kpi-delta .arrow { font-size: 10.5px; line-height: 1; }
/* Inline 11-week sparkline (data storytelling) */
.kpi-spark { display: block; width: 100%; height: 36px; margin-top: 12px; }
.kpi-spark .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.kpi-spark .area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
[data-theme="dark"] .kpi-spark .area { fill: rgba(216, 255, 0, .18); }

.chart { width: 100%; height: 340px; }
.grid-2 .chart { height: 320px; }

/* ---------- Tables ---------- */
.table-tools { display: flex; gap: 10px; align-items: center; }
.table-tools input {
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); font-size: 13px; min-width: 180px;
}
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.data-table th, .data-table td { padding: 9px 11px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.data-table th:first-child, .data-table td:first-child,
.data-table th:nth-child(2), .data-table td:nth-child(2) { text-align: left; }
.data-table thead th {
  position: sticky; top: 0; background: var(--surface-2); cursor: pointer;
  color: var(--muted); font-weight: 650; user-select: none; z-index: 1;
}
.data-table thead th:hover { color: var(--accent); }
.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
/* Distinct row-hover: a soft accent tint that reads clearly over both zebra stripes.
   Sticky label cells get the same tint so the highlight doesn't break at the freeze edge. */
.data-table tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.data-table--elevated tbody tr:hover > td.col-sticky,
.data-table--elevated tbody tr:hover > td.col-sticky-c2 { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.data-table tbody tr:hover .heat-bg { background: transparent; }
.data-table tr.total-row td { font-weight: 800; background: color-mix(in srgb, var(--volt) 14%, var(--surface)); border-top: 2px solid var(--volt); }
.data-table .cat-cell { font-weight: 700; }
.data-table .dept-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: var(--volt); color: #0a0a0a;
}
.data-table .empty-row td { text-align: center; color: var(--muted); padding: 26px; font-size: 13px; font-weight: 600; }
.num-pos { color: var(--ok); }
.num-neg { color: var(--err); }
.muted-2 { color: var(--muted-2); }
.opp-h { color: var(--err); }
.adv-h { color: var(--ok); }

/* ---------- Insights page header (mirrors dt-head pattern) ---------- */
.insights-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 4px 4px 18px; margin-bottom: 14px; position: relative; border-bottom: 1px solid var(--border);
}
.insights-head::after {
  content: ""; position: absolute; left: 4px; bottom: -1px; width: 64px; height: 3px;
  background: var(--volt); border-radius: 2px;
}
.insights-head .ih-left { min-width: 0; flex: 1; }
.insights-head .ih-kicker {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .14em;
  font-size: 10.5px; font-weight: 800; color: var(--accent);
}
[data-theme="light"] .insights-head .ih-kicker { color: var(--ok); }
.insights-head .ih-title {
  margin: 6px 0 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; letter-spacing: -.03em;
  line-height: 1.06; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.insights-head .ih-title em { font-style: normal; color: var(--muted); font-weight: 700; letter-spacing: -.01em; }
[data-theme="dark"] .insights-head .ih-title em { color: var(--muted-2); }
.insights-head .ih-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border-radius: 10px;
}
[data-theme="light"] .insights-head .ih-ic { color: var(--ok); }
.insights-head .ih-sub { margin: 9px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .015em; }

.insights-head .ih-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.insights-head .ih-stat {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 12px; border-radius: 10px; min-width: 76px;
  background: var(--surface); border: 1px solid var(--border);
}
.insights-head .ih-stat-kick {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .12em;
  font-size: 10.5px; font-weight: 800; color: var(--muted);
}
.insights-head .ih-stat-val {
  font-family: "Archivo", sans-serif; font-weight: 900; font-size: 14px;
  letter-spacing: -.015em; color: var(--text); line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}
.insights-head .ih-stat-val.accent { color: var(--accent); }
[data-theme="dark"] .insights-head .ih-stat-val.accent { color: var(--volt); }

/* Section divider — bridges two halves of the tab visually */
.insight-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 34px 0 14px; padding: 0 4px;
  position: relative;
  scroll-margin-top: 130px; /* clear the sticky topbar when jumped to from the section nav */
}
.insight-divider::before, .insight-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.dash-section {
  scroll-margin-top: 130px; /* clear the sticky topbar when jumped to from the section nav */
}
.insight-divider .id-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
[data-theme="light"] .insight-divider .id-ic { color: var(--ok); }
.insight-divider .id-title {
  font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text);
}
.insight-divider .id-sub {
  font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .015em;
}

/* ---------- 洞察页分段折叠 (P1 互动) ----------
 * Each .insight-section = divider (header, always visible) + .insight-body (collapsible).
 * A chevron sits at the right edge of the divider; collapsed sections hide their body.
 * Charts in a hidden body re-render automatically via their ResizeObserver on expand. */
.insight-section { margin: 0; }
.insight-section .insight-body { /* visible by default */ }
.insight-section.collapsed .insight-body { display: none; }
.insight-divider.is-collapsible { cursor: pointer; user-select: none; }
.insight-divider.is-collapsible:hover .id-title { color: var(--accent); }
.insight-divider .id-chev {
  position: absolute; right: 6px; top: 50%; margin-top: -10px;
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; color: var(--muted);
  background: var(--bg); border-radius: 4px;
  transition: transform .18s ease, color .15s ease;
}
.insight-divider .id-chev::before { content: "▾"; }
.insight-section.collapsed .id-chev { transform: rotate(-90deg); }
.insight-divider.is-collapsible:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 720px) {
  .insights-head { flex-direction: column; align-items: flex-start; }
  .insights-head .ih-stats { width: 100%; }
  .insight-divider .id-sub { display: none; }
}

/* ---------- Lens ① Health Check (诊断·健康体检) ---------- */
.hc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; padding: 16px;
}
.hc-card {
  position: relative; overflow: hidden;
  background: var(--surface-2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, transform .12s ease;
}
.hc-card:hover { transform: translateY(-1px); }
.hc-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); opacity: 0; transition: opacity .15s ease;
}
.hc-card.tone-ok .hc-card-accent { background: var(--ok); opacity: 1; }
.hc-card.tone-warn .hc-card-accent { background: var(--warn); opacity: 1; }
.hc-card.tone-bad .hc-card-accent { background: var(--err); opacity: 1; }
.hc-card.tone-up .hc-card-accent { background: var(--ok); opacity: 1; }
.hc-top { display: flex; align-items: center; gap: 8px; }
.hc-ic { display: inline-flex; width: 16px; height: 16px; }
.hc-ic svg { width: 16px; height: 16px; }
.hc-name { font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--text); }
.hc-val { font-size: 26px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.hc-badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; letter-spacing: .02em;
}
.hc-badge.tone-ok { background: var(--ok-bg); color: var(--ok); border: 0.5px solid var(--ok-border); }
.hc-badge.tone-warn { background: var(--warn-bg); color: var(--warn); border: 0.5px solid var(--warn-border); }
.hc-badge.tone-bad { background: var(--err-bg); color: var(--err); border: 0.5px solid var(--err-border); }
.hc-badge.tone-up { background: var(--ok-bg); color: var(--ok); border: 0.5px solid var(--ok-border); }
.hc-bench { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.hc-action {
  font-size: 12px; color: var(--text); line-height: 1.45;
  padding-top: 8px; margin-top: 2px; border-top: 0.5px dashed var(--border);
}
.hc-action::before { content: "行动 · "; color: var(--accent); font-weight: 700; }
[data-theme="light"] .hc-action::before { color: var(--ok); }

/* ---------- Insights ---------- */
.insight-note {
  background: var(--warn-bg); border-left: 4px solid var(--volt); border-top: 1px solid var(--warn-border); border-right: 1px solid var(--warn-border); border-bottom: 1px solid var(--warn-border);
  color: var(--text); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 16px;
}
.insight-note .ins-note-ic { display: inline-flex; vertical-align: -3px; margin-right: 4px; color: var(--volt); }
[data-theme="light"] .insight-note .ins-note-ic { color: var(--ok); }

/* 部门级 hero banner：左侧部门标识，右侧汇总 */
.insight-dept { margin-bottom: 26px; }
.ins-dept-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; margin-bottom: 14px;
  background: linear-gradient(94deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border); border-left: 3px solid var(--volt); border-radius: var(--radius-sm);
}
.ins-dept-head-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ins-dept-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: color-mix(in srgb, var(--volt) 14%, transparent);
  color: var(--volt);
}
[data-theme="light"] .ins-dept-ic { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ins-dept-name { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.ins-dept-meta { font-size: 11.5px; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--border); }
.ins-dept-head-r { display: flex; gap: 22px; align-items: center; flex-shrink: 0; }
.ins-dept-kpi { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ins-dept-kpi b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; color: var(--text); }
.ins-dept-kpi span { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.ins-dept-kpi.ins-dept-top b { color: var(--accent); }
@media (max-width: 720px) {
  .ins-dept-head { flex-direction: column; align-items: flex-start; }
  .ins-dept-head-r { gap: 14px; flex-wrap: wrap; }
  .ins-dept-kpi { align-items: flex-start; }
}

/* 区域卡片网格 */
.ins-reg { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 14px; margin-bottom: 18px; }

/* 区域卡本体 —— "信号型" */
.ins-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 14px 12px; background: var(--surface);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ins-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--text) 22%, var(--border)); }
.ins-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.ins-card.tone-warn .ins-card-accent { background: linear-gradient(90deg, var(--err) 0%, color-mix(in srgb, var(--err) 60%, #fff) 100%); }
.ins-card.tone-ok .ins-card-accent { background: linear-gradient(90deg, var(--ok) 0%, color-mix(in srgb, var(--ok) 60%, #fff) 100%); }
.ins-card.tone-neutral .ins-card-accent { background: linear-gradient(90deg, var(--muted-2) 0%, color-mix(in srgb, var(--muted-2) 60%, #fff) 100%); }

.ins-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 12px; }
.ins-card-name { font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.ins-card-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.ins-card-tag.tone-warn-tag { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.ins-card-tag.tone-ok-tag { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ins-card-tag.tone-neutral-tag { background: color-mix(in srgb, var(--muted-2) 16%, transparent); color: var(--muted); }

/* KPI 4 列网格 */
.ins-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 4px 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border); }
.kpi-c { display: flex; flex-direction: column; align-items: center; line-height: 1.2; min-width: 0; }
.kpi-c b { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; letter-spacing: -0.01em; }
.kpi-c span { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; white-space: nowrap; }
.kpi-up { color: var(--ok) !important; }
.kpi-dn { color: var(--err) !important; }

/* 机会 / 优势 分组 —— 标题栏内嵌 SVG */
.ins-card .opp, .ins-card .adv { padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 8px; border-left: 3px solid var(--border); }
.ins-card .opp { background: color-mix(in srgb, var(--err) 6%, transparent); border-left-color: var(--err); }
.ins-card .adv { background: color-mix(in srgb, var(--ok) 6%, transparent); border-left-color: var(--ok); margin-bottom: 0; }
.opp-h, .adv-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; margin-bottom: 6px; }
.opp-h { color: var(--err); }
.adv-h { color: var(--ok); }
.opp-h svg, .adv-h svg { display: block; }
.ins-card ul { margin: 0; padding-left: 14px; font-size: 12.5px; color: var(--text); line-height: 1.55; }
.ins-card li { margin: 3px 0; }
.ins-card li::marker { color: var(--muted-2); }

.ins-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.ins-summary h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ins-summary .ins-sum-ic { display: inline-flex; color: var(--accent); }
[data-theme="light"] .ins-summary .ins-sum-ic { color: var(--ok); }
.ins-summary ul { margin: 0; padding-left: 18px; }
.ins-summary li { margin: 6px 0; font-size: 13px; }

/* ---------- Footer ---------- */
.footer { color: var(--muted); font-size: 12px; padding: 8px 4px 24px; text-align: center; }
/* Prevent orphan/widow lines in longer copy (2026 typographic polish) */
.card-sub, .subtitle, .insight-note, .ins-card, .confirm-card p, .drop-card p, .footer { text-wrap: pretty; }

/* ---------- Skeleton loading ---------- */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-kpi { height: 88px; border-radius: var(--radius); }
.skeleton-chart { height: 340px; border-radius: var(--radius); }
.grid-2 .skeleton-chart { height: 320px; }

/* ---------- Spinner ---------- */
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 4px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Confirm overlay (replaces native alert) ---------- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(16, 24, 40, .35);
}
.confirm-overlay.show { display: flex; }
.confirm-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px 24px; max-width: 400px; width: calc(100% - 40px); text-align: center;
}
.confirm-card p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--text); }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-card .drop-icon { font-size: 34px; margin-bottom: 6px; }

/* ---------- Glossary overlay (指标口径说明) ---------- */
.glossary-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 20px 22px; max-width: 760px; width: calc(100% - 40px);
  max-height: 84vh; overflow: auto; text-align: left;
}
.glossary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.glossary-head h3 { margin: 0; font-size: 17px; }
.glossary-intro { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.glossary-intro code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }
.glossary-table { display: grid; grid-template-columns: 122px 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.glossary-row { display: contents; }
.glossary-key { padding: 9px 12px; font-weight: 700; font-size: 13px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.glossary-val { padding: 9px 12px; font-size: 12.5px; line-height: 1.55; border-bottom: 1px solid var(--border); }
.glossary-val .formula { display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text); background: var(--surface-2); padding: 3px 6px; border-radius: 5px; }
.glossary-val .glossary-src { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.glossary-row:last-child .glossary-key,
.glossary-row:last-child .glossary-val { border-bottom: none; }

/* ---------- Caliber alert banner (data contract gate) ---------- */
.caliber-banner {
  display: none; align-items: flex-start; gap: 12px;
  margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 13px;
}
.caliber-banner[hidden] { display: none; }
.caliber-banner:not([hidden]) { display: flex; }
.caliber-banner.has-errors { background: color-mix(in srgb, var(--err) 12%, var(--surface)); border-color: var(--err); }
.caliber-banner.has-warnings { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-color: var(--warn); }
.caliber-banner-icon { font-size: 18px; line-height: 1.35; }
.caliber-banner-body { flex: 1; min-width: 0; }
.caliber-banner-title { font-weight: 700; margin-bottom: 4px; }
.caliber-banner.has-errors .caliber-banner-title { color: var(--err); }
.caliber-banner.has-warnings .caliber-banner-title { color: var(--warn); }
.caliber-banner-list { color: var(--muted); line-height: 1.55; font-size: 12px; }
.caliber-banner-list div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caliber-banner-close {
  flex: 0 0 auto; border: none; background: transparent; color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.caliber-banner-close:hover { color: var(--text); background: var(--surface-2); }

/* ---------- Business anomaly banner (机会点⑤) ----------
   Deliberately distinct from .caliber-banner (data-quality gate):
   caliber = red/amber (data is dirty); biz = accent/info tone (business off-track).
   Uses --accent (volt) as the signal color so users never conflate the two. */
.biz-alert {
  display: none; align-items: flex-start; gap: 12px;
  margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  font-size: 13px;
}
.biz-alert[hidden] { display: none; }
.biz-alert:not([hidden]) { display: flex; }
.biz-alert.is-clean {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--border));
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}
.biz-alert-icon { font-size: 18px; line-height: 1.35; }
.biz-alert-body { flex: 1; min-width: 0; }
.biz-alert-title { font-weight: 700; margin-bottom: 4px; color: var(--accent); }
.biz-alert.is-clean .biz-alert-title { color: var(--ok); }
.biz-alert-list { color: var(--muted); line-height: 1.55; font-size: 12px; }
.biz-alert-list div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-alert-list b { color: var(--text); font-weight: 700; }
.biz-alert-action {
  flex: none; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap;
  color: #0a0a0a; background: var(--accent); border: 1px solid var(--accent);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- Stale-data banner (机会点④增强，全局常驻) ---------- */
.stale-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 16px; margin: 0;
  border-bottom: 1px solid transparent;
  font-size: 13px;
}
.stale-banner[hidden] { display: none; }
.stale-banner.is-amber { background: color-mix(in srgb, var(--warn-bg, #fff6e6) 92%, var(--surface)); border-left: 3px solid var(--warn, #e8a33d); }
.stale-banner.is-amber .stale-title { color: var(--warn, #e8a33d); }
.stale-banner.is-red { background: color-mix(in srgb, var(--err-bg, #ffe9e9) 92%, var(--surface)); border-left: 3px solid var(--err, #e3504a); }
.stale-banner.is-red .stale-title { color: var(--err, #e3504a); }
.stale-icon { font-size: 18px; line-height: 1.2; }
.stale-body { flex: 1; min-width: 0; }
.stale-title { font-weight: 800; letter-spacing: .01em; }
.stale-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.stale-close { background: transparent; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 2px 4px; line-height: 1; }
.stale-close:hover { color: var(--text); }

/* ---------- Data extensions (Section C · 待接入数据源) ---------- */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ext-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.ext-icon { font-size: 22px; line-height: 1.2; flex: none; }
.ext-body { min-width: 0; }
.ext-title { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.ext-badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; vertical-align: middle; letter-spacing: .2px;
  border: 1px solid transparent;
}
.ext-badge.is-off { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); border-color: color-mix(in srgb, var(--muted) 30%, transparent); }
.ext-badge.is-ready { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.ext-badge.is-on { color: var(--ok, #1d9e75); background: color-mix(in srgb, var(--ok, #1d9e75) 16%, transparent); border-color: color-mix(in srgb, var(--ok, #1d9e75) 38%, transparent); }
.ext-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.ext-desc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  background: color-mix(in srgb, var(--text) 8%, transparent); padding: 1px 5px; border-radius: 4px;
  color: var(--text); word-break: break-all;
}
/* 流量/转化 tab 的「待接入」骨架态（gated loader 无数据时） */
.ext-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 56px 24px; margin: 8px 0;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}
.ext-empty-ico { font-size: 40px; opacity: .8; }
.ext-empty h3 { font-size: 17px; margin: 0; }
.ext-empty p { font-size: 13px; color: var(--muted); margin: 0; max-width: 560px; line-height: 1.6; }
.ext-empty pre {
  margin: 4px 0; padding: 10px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--border); max-width: 560px; overflow-x: auto;
}
.ext-empty code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text);
}
.ext-empty-s { font-size: 12px !important; }

/* ===== 销存决策 · VM 诊断 模块样式 ===== */
/* 决策语义色（与全站 --ok/--warn/--infrared 对齐） */
.dec-urgent { color: var(--infrared); }
.dec-warn   { color: var(--warn); }
.dec-ok     { color: var(--ok); }
.dec-watch  { color: #b07d18; }
[data-theme="dark"] .dec-watch { color: #e4c463; }
.t-urgent { color: var(--infrared); font-weight: 800; }
.t-warn   { color: var(--warn); font-weight: 800; }
.t-ok     { color: var(--ok); font-weight: 800; }

/* 周指令条 */
.dec-mandate-bar {
  padding: 14px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--border); line-height: 1.7; font-size: 14.5px;
}

/* 决策变化 WoW */
.dec-delta-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 11px 16px; margin-top: 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); font-size: 13px;
}
.dec-delta-bar .dd {
  padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px;
  border: 1px solid var(--border);
}
.dec-delta-bar .dd.new { color: var(--infrared); background: color-mix(in srgb, var(--infrared) 12%, transparent); }
.dec-delta-bar .dd.ok  { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.dec-delta-bar .dd.up  { color: #b07d18; background: color-mix(in srgb, var(--warn) 14%, transparent); }
.dec-delta-bar .dd.down{ color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.dec-delta-bar .dd.same{ color: var(--muted); }
.dec-delta-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dec-delta-list .dd-item {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--border);
}
.dec-delta-list .dd-item.dec-urgent { color: var(--infrared); background: color-mix(in srgb, var(--infrared) 12%, transparent); }
.dec-delta-list .dd-item.dec-warn   { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.dec-delta-list .dd-item.dec-ok     { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.dec-delta-list .dd-item.dec-watch  { color: #b07d18; background: color-mix(in srgb, var(--warn) 10%, transparent); }

/* 决策矩阵（品类 × 区域） */
.dec-matrix-tbl { width: 100%; border-collapse: separate; border-spacing: 6px; }
.dec-matrix-tbl th {
  font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 6px;
}
.dec-matrix-tbl td.dec-cat {
  font-size: 12.5px; font-weight: 700; text-align: left; white-space: nowrap; color: var(--text);
}
.dec-matrix-tbl td.dec-cell {
  text-align: center; border-radius: 8px; padding: 8px 6px; vertical-align: middle;
  border: 1px solid var(--border); min-width: 88px;
}
.dec-matrix-tbl td.dec-cell.empty { color: var(--muted); background: color-mix(in srgb, var(--text) 3%, transparent); }
.dec-matrix-tbl td.dec-cell.dec-urgent { background: color-mix(in srgb, var(--infrared) 14%, transparent); border-color: color-mix(in srgb, var(--infrared) 40%, transparent); }
.dec-matrix-tbl td.dec-cell.dec-warn   { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.dec-matrix-tbl td.dec-cell.dec-ok     { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.dec-matrix-tbl td.dec-cell.dec-watch  { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.dec-cell-verb { font-size: 12px; font-weight: 700; line-height: 1.3; }
.dec-cell-sug  { font-size: 11px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* 周一行动清单 */
.dec-actions { display: flex; flex-direction: column; gap: 8px; }
.dec-action {
  display: grid; grid-template-columns: 10px 150px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px;
}
.dec-action-dot { width: 10px; height: 10px; border-radius: 50%; }
.dec-action.dec-urgent .dec-action-dot { background: var(--infrared); }
.dec-action.dec-warn   .dec-action-dot { background: var(--warn); }
.dec-action.dec-ok     .dec-action-dot { background: var(--ok); }
.dec-action.dec-watch  .dec-action-dot { background: #b07d18; }
.dec-action-key { font-weight: 700; white-space: nowrap; }
.dec-action-verb { font-weight: 700; }
.dec-action.dec-urgent .dec-action-verb { color: var(--infrared); }
.dec-action.dec-warn   .dec-action-verb { color: var(--warn); }
.dec-action.dec-ok     .dec-action-verb { color: var(--ok); }
.dec-action-sug { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.dec-action-conf { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.dec-action-conf.conf-高 { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.dec-action-conf.conf-中 { color: #b07d18; border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.dec-action-conf.conf-低 { color: var(--muted); }
.dec-action-rat { grid-column: 2 / -1; font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.dec-action-none { padding: 24px; text-align: center; color: var(--ok); font-weight: 700; }

/* 明细表行着色 */
.dec-row-urgent td:first-child { box-shadow: inset 3px 0 0 var(--infrared); }
.dec-row-warn   td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.dec-row-ok     td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.dec-row-watch  td:first-child { box-shadow: inset 3px 0 0 #b07d18; }
.dec-badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.dec-badge.dec-urgent { color: var(--infrared); background: color-mix(in srgb, var(--infrared) 14%, transparent); }
.dec-badge.dec-warn   { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.dec-badge.dec-ok     { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.dec-badge.dec-watch  { color: #b07d18; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.conf-高 { color: var(--ok); font-weight: 700; }
.conf-中 { color: #b07d18; font-weight: 700; }
.conf-低 { color: var(--muted); font-weight: 700; }
[data-theme="dark"] .conf-中 { color: #e4c463; }
/* 门店明细表：转化率热力单元格 */
.heat-cell {
  display: inline-block; min-width: 52px; padding: 2px 8px; border-radius: 6px;
  font-weight: 700; font-variant-numeric: tabular-nums; text-align: center;
}
.biz-alert-action:hover { filter: brightness(1.08); }
.biz-alert-close {
  flex: none; color: var(--muted); background: transparent; border: none;
  font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.biz-alert-close:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 720px) {
  .biz-alert { flex-wrap: wrap; }
  .biz-alert-action { order: 3; }
}

/* ---------- Access gate (password) ---------- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: radial-gradient(1100px 560px at 50% -12%, rgba(216, 255, 0, .06), transparent 60%), var(--bg);
  backdrop-filter: blur(6px);
}
.gate-overlay.show { display: flex; animation: gateIn .25s ease; }
.gate-overlay.gone { display: none !important; }
@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }
.gate-card {
  width: min(380px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 24px;
  text-align: center;
}
[data-theme="dark"] .gate-card { border-color: var(--volt); }
.gate-logo {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--bg); color: var(--volt);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; letter-spacing: .02em;
  border: 1px solid var(--volt); margin-bottom: 14px;
}
.gate-title { font-family: 'Archivo', system-ui, sans-serif; font-size: 20px; font-weight: 800; margin: 0 0 4px; color: var(--text); }
.gate-sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.gate-row { display: flex; gap: 8px; }
.gate-input {
  flex: 1; min-width: 0;
  padding: 11px 13px; font-size: 14px; font-family: 'Archivo', system-ui, sans-serif;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 9px;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.gate-input:focus { border-color: var(--volt); box-shadow: 0 0 0 3px rgba(216, 255, 0, .15); }
.gate-input::placeholder { color: var(--muted); }
.gate-err { min-height: 16px; margin: 10px 0 0; font-size: 12px; color: var(--err); opacity: 0; transition: opacity .15s ease; }
.gate-err.show { opacity: 1; }
.gate-hint { margin: 16px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }


/* ---------- Mobile tabs ---------- */
.mobile-tabs { display: none; }

/* ---------- Drop overlay ---------- */
.drop-overlay {
  position: fixed; inset: 0; background: rgba(47, 109, 240, .12); backdrop-filter: blur(2px);
  z-index: 200; display: none; align-items: center; justify-content: center;
}
.drop-overlay.show { display: flex; }
.drop-card {
  background: var(--surface); border: 2px dashed var(--primary); border-radius: 18px;
  padding: 34px 48px; text-align: center; box-shadow: var(--shadow-lg);
}
.drop-icon { font-size: 38px; }
.drop-card p { margin: 10px 0 4px; font-weight: 650; font-size: 16px; }
.drop-card small { color: var(--muted); }

/* ---------- Forecast module ---------- */
.fc-controls { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.fc-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.fc-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; position: relative; overflow: hidden;
}
.fc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.fc-card .fc-kick { font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: var(--tracking-kick); font-weight: 800; font-size: var(--fs-kick); color: var(--muted); }
.fc-card .fc-val { font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(18px, 2.4vw, 24px); letter-spacing: -.02em; margin-top: 4px; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.fc-card .fc-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.fc-card.up .fc-val { color: var(--ok); }
.fc-card.down .fc-val { color: var(--err); }
.fc-card.accent .fc-val { color: var(--accent); }

.model-cmp { font-size: 13px; }
.model-cmp table { width: 100%; border-collapse: collapse; }
.model-cmp th, .model-cmp td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.model-cmp th:first-child, .model-cmp td:first-child { text-align: left; }
.model-cmp thead th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.model-cmp tbody tr.chosen { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.model-cmp tbody tr.chosen td:first-child { color: var(--accent); font-weight: 700; }
.model-cmp .badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; }
.model-cmp .up { color: var(--ok); }
.model-cmp .down { color: var(--err); }
.model-cmp .ok { color: var(--ok); font-weight: 600; }
.model-cmp .err { color: var(--err); font-weight: 600; }

.method-note { padding: 4px 2px; color: var(--text); font-size: 13px; line-height: 1.7; }
.method-note p { margin: 0 0 10px; }
.method-note .mn-kick { font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: var(--tracking-kick); font-weight: 800; font-size: var(--fs-kick); color: var(--muted); display: block; margin-bottom: 3px; }
.method-note ul { margin: 0; padding-left: 18px; }
.method-note li { margin-bottom: 6px; }
.method-note b { color: var(--accent); }
.method-note .cite { color: var(--muted); font-size: 12px; font-style: italic; }

/* ---------- Forecast extension: silo mix + signals (dark/volt discipline) ---------- */
.silo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg-btn { appearance: none; border: 0; background: transparent; color: var(--muted); font-family: "Archivo", sans-serif; font-weight: 700; font-size: 13px; padding: 6px 18px; border-radius: 999px; cursor: pointer; transition: all var(--transition-fast, 150ms ease); }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 40%, transparent); }
#chartSiloMix { height: 280px; }
.silo-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 2px 0; }
.sw-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }

/* Silo Analysis (维度解析) — additive Δ-decomposition bars + concentration read */
.silo-contrib { display: flex; flex-direction: column; gap: 8px; margin: 14px 2px 2px; }
.contrib-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.contrib-name { display: inline-flex; align-items: center; gap: 7px; min-width: 84px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.contrib-track { flex: 1; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.contrib-bar { display: block; height: 100%; border-radius: 999px; transition: width var(--transition-normal, 300ms ease); }
.contrib-bar.pos { background: var(--ok); }
.contrib-bar.neg { background: var(--err); }
.contrib-val { min-width: 54px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.contrib-val.pos { color: var(--ok); }
.contrib-val.neg { color: var(--err); }

.signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.signal-card { position: relative; display: flex; gap: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding: 14px 16px 14px 18px; }
.signal-card .sev-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.signal-card.sev-info .sev-bar { background: var(--accent); }
.signal-card.sev-risk .sev-bar { background: var(--err); }
.signal-card.sev-watch .sev-bar { background: var(--muted); }
.signal-body { flex: 1; }
.signal-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.signal-kick { font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: var(--tracking-kick); font-weight: 800; font-size: var(--fs-kick); color: var(--muted); }
.signal-card.sev-info .signal-kick { color: var(--accent); }
.signal-card.sev-risk .signal-kick { color: var(--err); }
.signal-title { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 15px; letter-spacing: -.01em; color: var(--text); }
.signal-text { margin: 7px 0 8px; font-size: 13px; line-height: 1.6; color: var(--text); opacity: .92; }
.signal-text b { color: var(--accent); }
.signal-card.sev-risk .signal-text b { color: var(--err); }
.signal-rec { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.signal-rec b { color: var(--text); }
.signal-empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- Forecast extension: insight + guidance (two new dimensions) ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.insight-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; position: relative; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.insight-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.insight-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.insight-tile .it-label { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.insight-tile .it-val { font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.02em; margin-top: 6px; line-height: 1.04; font-variant-numeric: tabular-nums lining-nums; }
.insight-tile .it-sub { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.4; font-variant-numeric: tabular-nums lining-nums; }
.insight-tile.up .it-val { color: var(--ok); }
.insight-tile.down .it-val { color: var(--err); }
.insight-tile.accent .it-val { color: var(--accent); }

/* Scenario cone (next-week decision cone): lo95 — lo80 — point — hi80 — hi95 */
.scenario { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 18px; }
.scenario-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.scenario-title { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 13px; color: var(--text); }
.scenario-meta { font-size: 11px; color: var(--muted); }
.scenario-track { position: relative; height: 36px; margin: 24px 2px 4px; }
.scenario-band-95 { position: absolute; top: 12px; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.scenario-band-80 { position: absolute; top: 9px; height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 55%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent); }
.scenario-mark { position: absolute; top: 2px; width: 2px; height: 32px; background: var(--muted); }
.scenario-mark.point { width: 3px; background: var(--accent); top: 0; height: 36px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.scenario-ptlabel { position: absolute; top: -21px; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-family: "Archivo", sans-serif; font-weight: 800; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 40%, transparent); }
.scenario-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 8px; }
.scenario-legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.scenario-legend span { display: inline-flex; align-items: center; gap: 6px; }
.scenario-legend i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- Forecast scenario comparison (optimistic / baseline / pessimistic) ---------- */
.fc-scn-wrap { display: grid; grid-template-columns: 268px 1fr; gap: 18px; padding: 8px 2px; align-items: start; }
.fc-scn-controls { display: flex; flex-direction: column; gap: 16px; }
.fc-scn-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.fc-scn-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; }
.fc-scn-tile.tone-opt { border-left: 3px solid var(--ok); }
.fc-scn-tile.tone-base { border-left: 3px solid var(--accent); }
.fc-scn-tile.tone-pess { border-left: 3px solid var(--err); }
.fc-scn-tile-label { font-size: 11px; color: var(--muted); letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.fc-scn-tile-val { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.fc-scn-tile-sub { font-size: 11.5px; color: var(--muted); }
.fc-scn-tile-sub .kpi-up { color: var(--ok); font-weight: 700; }
.fc-scn-tile-sub .kpi-dn { color: var(--err); font-weight: 700; }
.fc-scn-tile-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.fc-scn-tile.tone-opt .fc-scn-tile-dot { background: var(--ok); }
.fc-scn-tile.tone-base .fc-scn-tile-dot { background: var(--accent); }
.fc-scn-tile.tone-pess .fc-scn-tile-dot { background: var(--err); }
.fc-scn-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); line-height: 1.55; padding: 9px 11px; background: var(--surface-2); border-radius: 8px; }

/* Guidance: ranked, evidence-linked actionable playbook */
.guidance-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.guidance-item { position: relative; display: flex; gap: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding: 14px 16px 14px 18px; }
.guidance-item .prio-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.guidance-item.prio-high .prio-bar { background: var(--accent); }
.guidance-item.prio-mid .prio-bar { background: var(--ok); }
.guidance-item.prio-low .prio-bar { background: var(--muted); }
.guidance-body { flex: 1; }
.guidance-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guidance-rank { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 16px; line-height: 1; color: var(--muted); opacity: .45; min-width: 22px; font-variant-numeric: tabular-nums lining-nums; }
.prio-tag { font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; }
.guidance-item.prio-high .prio-tag { background: var(--accent); color: var(--accent-ink); }
.guidance-item.prio-mid .prio-tag { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.guidance-item.prio-low .prio-tag { background: color-mix(in srgb, var(--muted) 22%, transparent); color: var(--muted); }
.guidance-kick { font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: var(--tracking-kick); font-weight: 800; font-size: var(--fs-kick); color: var(--muted); }
.guidance-title { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 15px; letter-spacing: -.01em; color: var(--text); }
.guidance-text { margin: 7px 0 8px; font-size: 13px; line-height: 1.6; color: var(--text); opacity: .92; }
.guidance-text b { color: var(--accent); }
.guidance-action { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.guidance-action b { color: var(--text); }
.guidance-empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .fc-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .layout { flex-direction: column; align-items: stretch; }
  .mobile-tabs {
    display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto;
    width: 100%; max-width: 100%;
    position: sticky; top: 65px; z-index: 40; background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .mobile-tabs .nav-item { flex: 0 0 auto; width: auto; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); }
  .mobile-tabs .nav-item.active { background: var(--primary); color: var(--accent-ink); border-color: var(--primary); }
  .content { padding: 14px; }
  .filters { gap: 10px; }
  .filter-group select { min-width: 120px; }
  .filter-hint { margin-left: 0; width: 100%; }
  .topbar { flex-wrap: wrap; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .chart { height: 300px; }
  .fc-summary { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Small phones ---------- */
@media (max-width: 520px) {
  .content { padding: 12px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi.feature { grid-column: span 1; }
  .filter-group { width: 100%; }
  .filter-group select { min-width: 100%; width: 100%; }
  .grid-2 { gap: 14px; }
  .fc-summary { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .fc-scn-wrap { grid-template-columns: 1fr; }
  .fc-scn-summary { grid-template-columns: 1fr; }
}

/* ---------- Respect reduced-motion preference (WCAG 2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================================================================
   UI/UX ELEVATION — beautification, typography & layout polish
   (Nike athletic language: stark B/W + Volt hero + Infrared energy)
   =================================================================== */

/* ---------- Subtle film-grain atmosphere (texture, not flat color) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
[data-theme="dark"] body::after { opacity: .05; mix-blend-mode: soft-light; }

/* Promote the main canvas above the grain texture (so the grain mutes only
 * the background canvas, not filled surfaces like the volt active nav). */
.layout { position: relative; z-index: 1; }

/* ---------- Brand wordmark: display treatment + volt swoosh ---------- */
.brand-text h1 {
  position: relative; display: inline-block;
  font-weight: 900; letter-spacing: -.035em; text-wrap: balance;
}
.brand-text h1::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, var(--volt), transparent);
  border-radius: 2px;
}
.brand-logo {
  box-shadow: 0 0 0 2px var(--volt) inset, 0 6px 18px rgba(216, 255, 0, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand-logo:hover { transform: scale(1.04) rotate(-2deg); }
[data-theme="dark"] .brand-logo { box-shadow: 0 0 0 2px var(--volt) inset, 0 6px 22px rgba(216, 255, 0, .28); }

/* ---------- Sidebar nav: icons + volt active rail + grouping ---------- */
.nav-section {
  display: block; font-family: "Archivo", sans-serif;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 800; color: var(--muted-2); padding: 8px 13px 4px;
}
.nav-item { position: relative; overflow: hidden; }
.nav-item .nav-ico {
  width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted);
  display: inline-flex; transition: color .15s ease, transform .15s ease;
}
.nav-item .nav-ico svg { width: 18px; height: 18px; }
.nav-item .nav-txt { display: flex; flex-direction: column; line-height: 1.16; }
.nav-item .nav-kicker { margin-bottom: 1px; }
.nav-item:hover .nav-ico { color: var(--accent); transform: scale(1.1); }
.nav-item.active .nav-ico { color: var(--accent-ink); }
/* Volt rail slides in on the active item */
.nav-item::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 56%;
  width: 3px; background: var(--volt); border-radius: 0 3px 3px 0;
  transform: translateY(-50%) scaleY(0); transform-origin: center;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1);
}
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
[data-theme="dark"] .nav-item.active::before { box-shadow: 0 0 10px rgba(216, 255, 0, .6); }

/* ---------- KPI cards: icon badge + staggered entrance ---------- */
.kpi { display: flex; flex-direction: column; }
.kpi-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent); margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
  transition: transform .2s ease, background-color .2s ease;
}
.kpi-ico svg { width: 18px; height: 18px; }
.kpi:hover .kpi-ico { transform: translateY(-2px) scale(1.04); }
.kpi.feature .kpi-ico {
  background: color-mix(in srgb, var(--volt) 22%, transparent);
  color: #0a0a0a; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--volt) 45%, transparent);
}
[data-theme="dark"] .kpi.feature .kpi-ico { color: var(--volt); }
.kpi.diag .kpi-ico {
  background: color-mix(in srgb, var(--volt) 16%, transparent);
  color: var(--volt); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--volt) 32%, transparent);
}
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
/* Orchestrated entrance — re-fires on every render (filter/theme change).
 * `backwards` fill (not `both`) so the delayed start shows the hidden state,
 * but the hover lift still works after the animation ends. */
@keyframes kpiIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.kpi { animation: kpiIn .55s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Card headers: volt mark + refined caption ---------- */
.card { position: relative; }
.card-head .card-kicker { position: relative; padding-left: 15px; }
.card-head .card-kicker::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; background: var(--volt); border-radius: 2px;
}
.card-head h3 { letter-spacing: -.015em; }
.card-sub {
  font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .015em;
  line-height: 1.45; text-align: right; max-width: 62%;
}

/* ---------- Hero masthead (editorial header on Overview) ---------- */
.hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 4px 4px 18px; margin-bottom: 18px; position: relative;
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: ""; position: absolute; left: 4px; bottom: -1px; width: 64px; height: 3px;
  background: var(--volt); border-radius: 2px;
}
.hero-kick {
  display: block; font-family: "Archivo", sans-serif; text-transform: uppercase;
  letter-spacing: var(--tracking-kick); font-weight: 800; font-size: var(--fs-kick); color: var(--muted); margin-bottom: 7px;
}
.hero-title {
  font-size: clamp(22px, 3vw, 34px); font-weight: 900; letter-spacing: -.03em; line-height: 1.04;
}
.hero-title em { font-style: normal; color: var(--muted); font-weight: 700; letter-spacing: -.01em; }
[data-theme="dark"] .hero-title em { color: var(--muted-2); }
.hero-sub { margin: 9px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.hero-meta { flex: 0 0 auto; }
.hero-badge {
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding: 8px 15px; border-radius: 12px;
  background: color-mix(in srgb, var(--volt) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--volt) 38%, var(--border));
}
.hero-badge-k {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .16em;
  font-size: 10.5px; font-weight: 800; color: var(--muted);
}
.hero-badge-v {
  font-family: "Archivo", sans-serif; font-weight: 900; font-size: 20px;
  letter-spacing: -.02em; color: var(--accent); line-height: 1;
}
[data-theme="dark"] .hero-badge-v { color: var(--volt); }

/* ---------- Filters: volt dot on labels ---------- */
.filter-group label { position: relative; }
.filter-group label::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--volt); border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.filter-group select:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

/* ---------- Mobile nav icons ---------- */
.mobile-tabs .nav-ico { width: 16px; height: 16px; }
.mobile-tabs .nav-ico svg { width: 16px; height: 16px; }
.mobile-tabs .nav-item { gap: 7px; }

/* ===================================================================
   DETAIL TAB — Pivot matrix view (differentiated UI/UX)
   Editorial header → mode tabs → facet chips → tools → matrix
   =================================================================== */

/* ---------- Editorial header strip ---------- */
.dt-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 4px 4px 18px; margin-bottom: 14px; position: relative; border-bottom: 1px solid var(--border);
}
.dt-head::after {
  content: ""; position: absolute; left: 4px; bottom: -1px; width: 64px; height: 3px;
  background: var(--volt); border-radius: 2px;
}
.dt-head-left { min-width: 0; flex: 1; }
.dt-title { margin: 6px 0 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; letter-spacing: -.03em; line-height: 1.06; }
.dt-title em { font-style: normal; color: var(--muted); font-weight: 700; letter-spacing: -.01em; }
[data-theme="dark"] .dt-title em { color: var(--muted-2); }
.dt-sub { margin: 9px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .015em; }
/* Region-focus badge (shown after a chart / matrix drill-down) */
.dt-focus {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 2px;
  padding: 2px 4px 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--text); font-weight: 700;
}
.dt-focus b { color: var(--accent); }
.dt-focus-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent);
  font-size: 13px; line-height: 1; font-weight: 800; transition: background .12s;
}
.dt-focus-x:hover { background: var(--accent); color: #fff; }
/* Region-rank charts are clickable (drill to Detail tab) — signal with a pointer cursor */
.reg-rank-chart { cursor: pointer; }

/* Head-right KPI strip (mini chips) */
.dt-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.dt-stat {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 12px; border-radius: 10px; min-width: 76px;
  background: var(--surface); border: 1px solid var(--border);
}
.dt-stat-kick {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .12em;
  font-size: 10.5px; font-weight: 800; color: var(--muted);
}
.dt-stat-val {
  font-family: "Archivo", sans-serif; font-weight: 900; font-size: 14px;
  letter-spacing: -.015em; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.dt-stat-val.accent { color: var(--accent); }
[data-theme="dark"] .dt-stat-val.accent { color: var(--volt); }

/* ---------- Mode selector (segmented control) ---------- */
.dt-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.dt-modes {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 80%, var(--surface));
  border: 1px solid var(--border);
}
.dt-mode {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 9px;
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  color: var(--muted); font-family: inherit;
  transition: background-color .18s ease, color .18s ease, transform .12s ease;
}
.dt-mode:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.dt-mode:active { transform: scale(.97); }
.dt-mode-k {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .14em;
  font-size: 10.5px; font-weight: 800; line-height: 1;
}
.dt-mode-zh { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.dt-mode.active {
  background: var(--volt); color: #0a0a0a;
  box-shadow: 0 4px 14px rgba(216, 255, 0, .22);
}
[data-theme="dark"] .dt-mode.active {
  box-shadow: 0 4px 18px rgba(216, 255, 0, .32);
}

/* ---------- Facet chips (department + metric) ---------- */
.dt-chips {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.chip-kick {
  font-family: "Archivo", sans-serif; font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 800; color: var(--muted-2);
  padding-right: 4px;
}
.chip {
  position: relative;
  font-family: inherit; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.chip:active { transform: scale(.97); }
.chip.active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
}
[data-theme="dark"] .chip.active { color: var(--volt); }
.chip.active::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  width: 5px; height: 5px; background: var(--volt); border-radius: 50%;
}
.chip-sep {
  display: inline-block; width: 1px; height: 18px; background: var(--border); margin: 0 4px;
}

/* ---------- Sub-tools: search, toggles, export ---------- */
.dt-tools {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.dt-search {
  position: relative; flex: 1; min-width: 220px; max-width: 360px;
}
.dt-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.dt-search input {
  width: 100%; padding: 8px 12px 8px 38px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  font: inherit; font-size: 13px; color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dt-search input::placeholder { color: var(--muted-2); }
.dt-search input:focus { outline: 0; border-color: var(--volt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--volt) 22%, transparent); }

.dt-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .015em;
  user-select: none;
}
.dt-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.dt-toggle-track {
  position: relative; display: inline-block; width: 34px; height: 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  transition: background-color .2s ease, border-color .2s ease;
}
.dt-toggle-track::after {
  content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--muted);
  transition: left .2s cubic-bezier(.2, .7, .2, 1), background-color .2s ease;
}
.dt-toggle input:checked + .dt-toggle-track {
  background: color-mix(in srgb, var(--volt) 38%, var(--surface-2));
  border-color: var(--volt);
}
.dt-toggle input:checked + .dt-toggle-track::after {
  left: 18px; background: var(--volt);
}
.dt-toggle input:focus-visible + .dt-toggle-track {
  box-shadow: 0 0 0 2px var(--volt);
}
.dt-toggle-label { white-space: nowrap; }
.dt-toggle:hover .dt-toggle-label { color: var(--text); }

.dt-divider { display: inline-block; width: 1px; height: 18px; background: var(--border); }
.dt-tools .btn { display: inline-flex; align-items: center; gap: 6px; }
.dt-tools .btn svg { width: 14px; height: 14px; }

/* ---------- The pivot table itself ---------- */
.dt-card { padding: 0; overflow: hidden; }
.dt-card .table-wrap { max-height: min(78vh, 880px); overflow: auto; background: var(--surface); }

.data-table--elevated {
  width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0;
  font-size: 12.5px; line-height: 1.45; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums lining-nums;
}
.data-table--elevated thead { position: sticky; top: 0; z-index: 3; }
.data-table--elevated thead tr.row-region th {
  padding: 10px 12px 8px; border-bottom: 1px solid var(--border);
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: var(--tracking-kick);
  font-size: 10.5px; font-weight: 800; color: var(--muted);
  text-align: center; background: var(--surface-2);
  position: sticky; top: 0;
}
.data-table--elevated thead tr.row-region th[colspan] { text-align: center; }
.data-table--elevated thead tr.row-region th.col-sticky,
.data-table--elevated thead tr.row-metric th.col-sticky { left: 0; z-index: 5; background: var(--surface-2); }
.data-table--elevated thead tr.row-region th.col-sticky-c2 { left: var(--sticky-w, 60px); z-index: 5; }
.data-table--elevated thead tr.row-metric th.col-sticky-c2 { left: var(--sticky-w, 60px); z-index: 5; }

/* Region color bands - use accent borders to delineate without overwhelming.
 * Colors come from the unified --r-* tokens (mirror app.js SCALE_LIGHT). */
.data-table--elevated thead tr.row-region th.region-cejs { background: color-mix(in srgb, var(--r-cejs) 14%, var(--surface-2)); color: var(--r-cejs); border-bottom-color: var(--r-cejs); }
.data-table--elevated thead tr.row-region th.region-cejz { background: color-mix(in srgb, var(--r-cejz) 14%, var(--surface-2)); color: var(--r-cejz); border-bottom-color: var(--r-cejz); }
.data-table--elevated thead tr.row-region th.region-cesh { background: color-mix(in srgb, var(--r-cesh) 14%, var(--surface-2)); color: var(--r-cesh); border-bottom-color: var(--r-cesh); }
.data-table--elevated thead tr.row-region th.region-cesw { background: color-mix(in srgb, var(--r-cesw) 14%, var(--surface-2)); color: var(--r-cesw); border-bottom-color: var(--r-cesw); }
[data-theme="dark"] .data-table--elevated thead tr.row-region th.region-cejs { color: var(--r-cejs-d); }
[data-theme="dark"] .data-table--elevated thead tr.row-region th.region-cejz { color: var(--r-cejz-d); }
[data-theme="dark"] .data-table--elevated thead tr.row-region th.region-cesh { color: var(--r-cesh-d); }
[data-theme="dark"] .data-table--elevated thead tr.row-region th.region-cesw { color: var(--r-cesw-d); }

.data-table--elevated thead tr.row-metric th {
  padding: 7px 12px; border-bottom: 2px solid var(--volt);
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-align: right; background: var(--surface-2);
  cursor: pointer; user-select: none; position: sticky; top: 30px;
  transition: color .15s ease;
}
.data-table--elevated thead tr.row-metric th:first-child,
.data-table--elevated thead tr.row-metric th.col-text { text-align: left; }
.data-table--elevated thead tr.row-metric th:hover { color: var(--text); }
.data-table--elevated thead tr.row-metric th.sorted { color: var(--accent); }
[data-theme="dark"] .data-table--elevated thead tr.row-metric th.sorted { color: var(--volt); }
.data-table--elevated thead .sort-arrow {
  display: inline-block; margin-left: 4px; opacity: .35;
  font-size: 10.5px; vertical-align: middle; transition: opacity .15s ease, transform .15s ease;
}
.data-table--elevated thead th.sorted .sort-arrow { opacity: 1; }
.data-table--elevated thead th.sorted.desc .sort-arrow { transform: rotate(180deg); }

/* Cell types */
.data-table--elevated tbody td {
  padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  text-align: right; white-space: nowrap; color: var(--text);
  transition: background-color .15s ease;
}
.data-table--elevated tbody td.col-text { text-align: left; }
.data-table--elevated tbody td.col-sticky,
.data-table--elevated tbody td.col-sticky-c2 { position: sticky; background: var(--surface); }
.data-table--elevated tbody td.col-sticky { left: 0; z-index: 1; }
.data-table--elevated tbody td.col-sticky-c2 { left: var(--sticky-w, 60px); z-index: 1; }

/* Numeric hierarchy */
.data-table--elevated tbody td.col-amount { font-weight: 700; color: var(--text); }
.data-table--elevated tbody td.col-qty     { color: var(--muted); }
.data-table--elevated tbody td.col-onhand  { color: var(--muted-2); font-size: 12px; }
.data-table--elevated tbody td.col-share   { color: var(--accent); font-weight: 700; font-size: 11px; }
[data-theme="dark"] .data-table--elevated tbody td.col-share { color: var(--volt); }

/* Heat tint by relative magnitude (column-normalized) */
.dt-heat { position: relative; }
.dt-heat .heat-bg {
  position: absolute; left: 0; top: 0; bottom: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--accent-soft, transparent), var(--accent-soft, transparent));
  z-index: 0;
}
.dt-heat > span.num, .dt-heat > span.share, .dt-heat > span.unit { position: relative; z-index: 1; }

/* Dept section divider row */
.data-table--elevated tbody tr.dept-section td {
  padding: 14px 12px 9px; border-top: 2px solid var(--volt);
  background: color-mix(in srgb, var(--volt) 6%, var(--surface));
  font-family: "Archivo", sans-serif; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: var(--tracking-kick); font-weight: 800; color: var(--muted);
  text-align: left;
}
.data-table--elevated tbody tr.dept-section .dt-dept-tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  background: var(--volt); color: #0a0a0a; margin-right: 10px;
  font-size: 10.5px; letter-spacing: .12em;
}
.data-table--elevated tbody tr.dept-section .dt-dept-kpi {
  float: right; font-size: 11px; letter-spacing: .02em; color: var(--muted); font-weight: 600;
  text-transform: none;
}
.data-table--elevated tbody tr.dept-section .dt-dept-kpi b { color: var(--accent); font-weight: 800; }
[data-theme="dark"] .data-table--elevated tbody tr.dept-section .dt-dept-kpi b { color: var(--volt); }

/* Category row */
.data-table--elevated tbody tr.row-cat td.col-cat { font-weight: 700; letter-spacing: -.01em; }
.data-table--elevated tbody tr.row-cat .dt-rank {
  display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px;
  border-radius: 5px; background: var(--volt); color: #0a0a0a;
  font-family: "Archivo", sans-serif; font-size: 10.5px; font-weight: 900; text-align: center; line-height: 18px;
}
.data-table--elevated tbody tr.row-cat:hover td { background: color-mix(in srgb, var(--volt) 4%, var(--surface)); }
.data-table--elevated tbody tr.row-cat:hover .dt-rank { transform: rotate(-4deg) scale(1.06); transition: transform .2s ease; }

/* Grand TOTAL row */
.data-table--elevated tbody tr.dt-total td {
  padding: 12px 12px; font-weight: 800;
  border-top: 2px solid var(--volt);
  background: color-mix(in srgb, var(--volt) 14%, var(--surface));
  color: #0a0a0a; /* explicit dark — overrides var(--text) which may resolve to light under dark theme */
}
.data-table--elevated tbody tr.dt-total td .num,
.data-table--elevated tbody tr.dt-total td .unit,
.data-table--elevated tbody tr.dt-total td .share { color: #0a0a0a; }
.data-table--elevated tbody tr.dt-total td .data-table-dept-tag {
  background: #0a0a0a; color: var(--volt);
}
.data-table--elevated tbody tr.dt-total td:first-child {
  font-family: "Archivo", sans-serif; text-transform: uppercase; letter-spacing: .14em;
  font-size: 10.5px; color: #0a0a0a;
}
.data-table--elevated tbody tr.dt-total td .total-tag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  background: #0a0a0a; color: var(--volt); margin-right: 8px;
  font-size: 10.5px; letter-spacing: .14em;
}

/* Matrix mode: compact, all metric chips visible */
.data-table--elevated.mode-matrix tbody td, .data-table--elevated.mode-matrix thead th { padding: 7px 12px; }
.data-table--elevated.mode-matrix thead tr.row-metric th { top: 30px; }

/* Empty state */
.dt-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.dt-empty-ico {
  display: inline-grid; place-items: center; width: 64px; height: 64px;
  border-radius: 50%; background: color-mix(in srgb, var(--volt) 8%, var(--surface-2));
  margin-bottom: 14px;
}
.dt-empty-ico svg { width: 28px; height: 28px; color: var(--accent); }
[data-theme="dark"] .dt-empty-ico svg { color: var(--volt); }
.dt-empty-h { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.dt-empty-s { display: block; margin: 6px 0 14px; font-size: 12.5px; color: var(--muted); }

/* Mini horizontal bar (relative magnitude) */
.dt-minibar {
  display: inline-block; width: 38px; height: 3px; vertical-align: 2px;
  background: color-mix(in srgb, var(--border) 70%, transparent); border-radius: 2px;
  overflow: hidden; margin-right: 7px;
}
.dt-minibar > i {
  display: block; height: 100%; background: var(--accent); border-radius: 2px;
  transition: width .3s cubic-bezier(.2, .7, .2, 1);
}
[data-theme="dark"] .dt-minibar > i { background: var(--volt); }

/* Sticky column shadow when scrolled horizontally - subtle right edge */
.data-table--elevated tbody td.col-sticky { box-shadow: 1px 0 0 var(--border); }
.data-table--elevated tbody td.col-sticky-c2 { box-shadow: 1px 0 0 var(--border); }

/* Sticky first column wider on mode-grouped to fit dept tag */
.dt-card.mode-grouped .data-table--elevated { --sticky-w: 110px; }
.dt-card.mode-grouped .col-sticky { min-width: 96px; }
.dt-card.mode-grouped .col-sticky-c2 { min-width: 168px; }

/* Responsive — Detail tab */
@media (max-width: 1000px) {
  .dt-head { flex-direction: column; align-items: flex-start; }
  .dt-controls { flex-direction: column; align-items: stretch; }
  .dt-chips { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .dt-stats { width: 100%; }
  .dt-tools { padding: 10px; }
  .dt-search { max-width: none; width: 100%; }
  .data-table--elevated { min-width: 880px; font-size: 12px; }
}
@media (max-width: 520px) {
  .dt-tools .dt-toggle-label { display: none; }
  .dt-mode { padding: 6px 10px; }
  .dt-mode-zh { font-size: 12px; }
}

/* Reduced motion — kill the mini-bar transition */
@media (prefers-reduced-motion: reduce) {
  .dt-minibar > i { transition: none; }
}

/* ---------- Heat tints (column-normalized magnitude) ---------- */
.data-table--elevated .dt-heat { position: relative; }
.data-table--elevated .dt-heat .heat-bg {
  position: absolute; left: 4%; top: 8%; bottom: 8%; width: 92%;
  background: var(--accent); opacity: 0; border-radius: 4px;
  z-index: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.data-table--elevated .dt-heat.heat-1 .heat-bg { opacity: .07; }
.data-table--elevated .dt-heat.heat-2 .heat-bg { opacity: .12; }
.data-table--elevated .dt-heat.heat-3 .heat-bg { opacity: .18; }
.data-table--elevated .dt-heat.heat-4 .heat-bg { opacity: .26; }
.data-table--elevated .dt-heat.heat-5 .heat-bg { opacity: .36; }
[data-theme="dark"] .data-table--elevated .dt-heat .heat-bg { background: var(--volt); }
[data-theme="dark"] .data-table--elevated .dt-heat.heat-1 .heat-bg { opacity: .08; }
[data-theme="dark"] .data-table--elevated .dt-heat.heat-2 .heat-bg { opacity: .13; }
[data-theme="dark"] .data-table--elevated .dt-heat.heat-3 .heat-bg { opacity: .20; }
[data-theme="dark"] .data-table--elevated .dt-heat.heat-4 .heat-bg { opacity: .30; }
[data-theme="dark"] .data-table--elevated .dt-heat.heat-5 .heat-bg { opacity: .42; }
.data-table--elevated .dt-heat > * { position: relative; z-index: 1; }

/* Override: GRAND TOTAL row cells should NOT show heat tint behind text —
 * the row already has a volt background, and stacking heat on top hides text. */
.data-table--elevated tbody tr.dt-total td.dt-heat .heat-bg { display: none; }

/* Muted metric columns (when one metric is selected) */
.data-table--elevated .dt-heat.muted-col { opacity: .4; }
.data-table--elevated .dt-heat.muted-col .heat-bg { display: none; }

/* Dept pill in cells */
.data-table-dept-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-family: "Archivo", sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
}
[data-theme="dark"] .data-table-dept-tag { color: var(--volt); }


/* =====================================================================
 *  DASHBOARD · 双段式数据看板 (累计 / 当周)
 *  Editorial section grouping, hero metric lift, region-share strip,
 *  category-top strip, period chip.
 *  Build on existing .kpi / .kpi-num / .kpi-delta classes — wrap with
 *  `.dash-*` containers for layout, density, hierarchy.
 * ===================================================================== */

/* Reset the dash container away from auto-fit grid → vertical stack of sections */
.kpi-grid--dashboard {
  display: block;
  margin-bottom: 24px;
}

/* ---------- Period chip (Section B selector) ---------- */
.dash-period {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 4px 18px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dash-period-label {
  font-family: "Archivo", sans-serif;
  font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick); text-transform: uppercase;
  color: var(--muted);
}
.dash-period-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.dash-chip {
  appearance: none; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px;
  font-family: "Archivo", sans-serif; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  padding: 6px 11px; line-height: 1;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.dash-chip:hover { color: var(--text); border-color: var(--accent); }
.dash-chip:active { transform: translateY(1px); }
.dash-chip.is-active {
  background: var(--volt); color: #0a0a0a; border-color: var(--volt);
}
[data-theme="dark"] .dash-chip.is-active { background: var(--volt); color: #0a0a0a; }

/* ---------- Section wrapper ---------- */
.dash-section {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
  margin-bottom: 18px;
  overflow: hidden;
}
.dash-section:last-child { margin-bottom: 0; }
.dash-section::before {
  /* Editorial top accent rail */
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--volt) 0%, color-mix(in srgb, var(--volt) 35%, transparent) 60%, transparent 100%);
}
.dash-section-head {
  display: grid; gap: 4px; margin-bottom: 16px;
  padding: 0 0 14px;
  border-bottom: 1px dashed var(--border);
}
.dash-section-eyebrow {
  font-family: "Archivo", sans-serif;
  font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick); text-transform: uppercase;
  color: var(--accent);
}
[data-theme="dark"] .dash-section-eyebrow { color: var(--volt); }
.dash-section-title {
  margin: 0;
  font-family: "Archivo", sans-serif;
  font-size: 20px; font-weight: 800;
  letter-spacing: -.01em; line-height: 1.15;
  color: var(--text);
}
.dash-section-title em {
  font-style: normal; font-weight: 600; color: var(--muted);
  letter-spacing: 0; margin-left: 6px;
}
.dash-section-sub {
  margin: 4px 0 0; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Generic row (primary KPI grid + sub strips) ---------- */
.dash-row { margin-bottom: 16px; }
.dash-row:last-child { margin-bottom: 0; }

.dash-row--primary {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
}
.dash-row--primary.with-four {
  grid-template-columns: 1.4fr repeat(4, 1fr);
}

.dash-row-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 6px 4px 10px;
}
.dash-row-kick {
  font-family: "Archivo", sans-serif;
  font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick); text-transform: uppercase;
  color: var(--muted);
}
.dash-row-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}

/* ---------- Hero KPI (re-uses .kpi.feature) ---------- */
.dash-row--primary .kpi.feature { /* keep current visual, neutralize grid-column span */
  grid-column: auto;
  container-type: inline-size;
  container-name: heroKpi;
  min-width: 0;
}
.dash-row--primary .kpi.feature .kpi-spark { height: 64px; margin-top: 14px; }
.dash-row--primary .kpi.feature .kpi-value { font-size: clamp(22px, 9.5cqi, 46px); }
.dash-row--primary .kpi.feature .kpi-foot { margin-top: 12px; }
.dash-row--primary .kpi.feature .kpi-num { min-width: 0; }
.dash-row--primary .kpi.feature .kpi-value { min-width: 0; }
/* Tighten further on narrow hero so the long ¥-amount never overflows the card */
@container heroKpi (max-width: 320px) {
  .dash-row--primary .kpi.feature .kpi-value { font-size: clamp(18px, 11cqi, 28px); }
}

/* ---------- Mini tiles ---------- */
.kpi.mini {
  padding: 14px 16px;
  /* Subtle differentiation from the hero */
  background: var(--surface-2);
}
.kpi.mini::before {
  /* keep muted rail — section already shows via the section accent line */
  background: linear-gradient(180deg, var(--muted-2), transparent);
  width: 3px;
}
.kpi.mini .kpi-label { font-size: 11.5px; }
.kpi.mini .kpi-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.kpi.mini .kpi-spark { height: 28px; margin-top: 10px; }
.kpi.mini .kpi-foot { margin-top: 6px; }
.kpi.mini .kpi-foot .kpi-sub { font-size: 10.5px; }
.kpi.mini .kpi-delta { font-size: 10.5px; padding: 1.5px 6px; }

/* ---------- Region share strip (4 columns) ---------- */
.dash-region-share {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.dash-rs-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow: hidden;
  transition: border-color .18s ease, transform .12s ease;
}
.dash-rs-card:hover { border-color: var(--accent); }
.dash-rs-card[data-region="CEJS"] { box-shadow: inset 3px 0 0 var(--r-cejs); }
.dash-rs-card[data-region="CEJZ"] { box-shadow: inset 3px 0 0 var(--r-cejz); }
.dash-rs-card[data-region="CESH"] { box-shadow: inset 3px 0 0 var(--r-cesh); }
.dash-rs-card[data-region="CESW"] { box-shadow: inset 3px 0 0 var(--r-cesw); }
[data-theme="dark"] .dash-rs-card[data-region="CEJS"] { box-shadow: inset 3px 0 0 var(--r-cejs-d); }
[data-theme="dark"] .dash-rs-card[data-region="CEJZ"] { box-shadow: inset 3px 0 0 var(--r-cejz-d); }
[data-theme="dark"] .dash-rs-card[data-region="CESH"] { box-shadow: inset 3px 0 0 var(--r-cesh-d); }
[data-theme="dark"] .dash-rs-card[data-region="CESW"] { box-shadow: inset 3px 0 0 var(--r-cesw-d); }
.dash-rs-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.dash-rs-name {
  font-family: "Archivo", sans-serif;
  font-size: 11px; font-weight: 800; letter-spacing: var(--tracking-kick); text-transform: uppercase;
  color: var(--text);
}
.dash-rs-share {
  font-family: "Archivo", sans-serif;
  font-size: 11px; font-weight: 800; letter-spacing: .03em;
  color: var(--accent); font-variant-numeric: tabular-nums lining-nums;
}
[data-theme="dark"] .dash-rs-share { color: var(--volt); }
.dash-rs-amount {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); font-variant-numeric: tabular-nums lining-nums; line-height: 1.1;
}
.dash-rs-unit { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.dash-rs-bar {
  height: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 25%, transparent);
  margin-top: 10px; overflow: hidden;
}
.dash-rs-bar-fill {
  height: 100%;
  background: currentColor;
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.dash-rs-card[data-region="CEJS"] .dash-rs-bar-fill { background: var(--r-cejs); }
.dash-rs-card[data-region="CEJZ"] .dash-rs-bar-fill { background: var(--r-cejz); }
.dash-rs-card[data-region="CESH"] .dash-rs-bar-fill { background: var(--r-cesh); }
.dash-rs-card[data-region="CESW"] .dash-rs-bar-fill { background: var(--r-cesw); }
[data-theme="dark"] .dash-rs-card[data-region="CEJS"] .dash-rs-bar-fill { background: var(--r-cejs-d); }
[data-theme="dark"] .dash-rs-card[data-region="CEJZ"] .dash-rs-bar-fill { background: var(--r-cejz-d); }
[data-theme="dark"] .dash-rs-card[data-region="CESH"] .dash-rs-bar-fill { background: var(--r-cesh-d); }
[data-theme="dark"] .dash-rs-card[data-region="CESW"] .dash-rs-bar-fill { background: var(--r-cesw-d); }
.dash-rs-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-size: 10.5px; color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Region card · department breakdown strip ---------- */
.dash-rs-dept-strip {
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-rs-dept-strip-kick {
  font-family: "Archivo", sans-serif;
  font-size: 10.5px; font-weight: 800; letter-spacing: var(--tracking-kick);
  color: var(--muted);
  text-transform: uppercase;
}
.dash-rs-dept-bar {
  display: flex;
  height: 4px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--muted-2) 18%, transparent);
}
.dash-rs-dept-seg { display: block; height: 100%; transition: flex .25s ease; }
.dash-rs-dept-seg[data-dept="MEN"]  { background: #5b8ff9; }
.dash-rs-dept-seg[data-dept="WMS"]  { background: #ff8c42; }
.dash-rs-dept-seg[data-dept="KIDS"] { background: #c97cff; }
.dash-rs-depts {
  margin-top: 6px;
  display: flex; flex-direction: column; gap: 3px;
}
.dash-rs-dept {
  display: grid;
  grid-template-columns: 10px 34px 1fr 30px;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 10.5px;
}
.dash-rs-dept-dot {
  width: 8px; height: 8px; border-radius: 999px; display: block;
  background: var(--muted);
}
.dash-rs-dept-dot[data-dept="MEN"]  { background: #5b8ff9; }
.dash-rs-dept-dot[data-dept="WMS"]  { background: #ff8c42; }
.dash-rs-dept-dot[data-dept="KIDS"] { background: #c97cff; }
.dash-rs-dept-code { font-weight: 800; color: var(--text); font-family: "Archivo", sans-serif; letter-spacing: .04em; }
.dash-rs-dept-amt  { color: var(--text); text-align: right; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-rs-dept-pct  { color: var(--muted); text-align: right; font-weight: 700; }

/* ---------- Silo sales cross-grid (region × dept heat matrix) ---------- */
.silo-grid-wrap { overflow-x: auto; }
.silo-grid {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr)) auto;
  gap: 5px;
  font-variant-numeric: tabular-nums lining-nums;
}
.silo-hcell, .silo-cell {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  min-width: 0;
}
.silo-hcell {
  display: flex; align-items: center;
  font-family: "Archivo", sans-serif;
}
.silo-corner {
  color: var(--muted);
  font-size: 10.5px; font-weight: 800; letter-spacing: var(--tracking-kick);
  text-transform: uppercase;
  white-space: nowrap;
}
.silo-col-head {
  justify-content: center;
  gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: .03em;
  color: var(--text);
}
.silo-col-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex: none; }
.silo-row-head {
  justify-content: flex-start;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  color: var(--text);
  white-space: nowrap;
}
.silo-cell {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  transition: background .4s ease, color .4s ease;
}
.silo-cell .silo-amt {
  font-size: 14px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15;
}
.silo-cell .silo-pct {
  font-size: 10.5px; font-weight: 700; opacity: .8; margin-top: 2px;
}
.silo-cell.is-empty .silo-amt { color: var(--muted); font-weight: 600; }
.silo-cell.is-empty { background: color-mix(in srgb, var(--muted-2) 12%, transparent); }
.silo-total {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}
.silo-total .silo-amt { color: var(--accent); }
[data-theme="dark"] .silo-total .silo-amt { color: var(--volt); }
.silo-rowtotal, .silo-coltotal { color: var(--accent); }
[data-theme="dark"] .silo-rowtotal, [data-theme="dark"] .silo-coltotal { color: var(--volt); }
.silo-grand {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}
.silo-grand .silo-amt { color: var(--accent); }
[data-theme="dark"] .silo-grand .silo-amt { color: var(--volt); }
.silo-grid-foot {
  margin: 10px 4px 2px;
  font-size: 10.5px; color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
}
@media (max-width: 760px) {
  .silo-grid { gap: 3px; }
  .silo-hcell, .silo-cell { padding: 7px 6px; }
  .silo-cell .silo-amt { font-size: 12px; }
  .silo-cell .silo-pct { font-size: 10.5px; }
  .silo-row-head { font-size: 11px; }
  .silo-col-head { font-size: 10.5px; gap: 4px; }
  .silo-col-dot { width: 7px; height: 7px; }
}

/* ---------- Silo detail strip (per-silo totals, share, within-silo region split) ---------- */
.silo-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.silo-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  min-width: 0;
}
.silo-tile-head { display: flex; align-items: center; gap: 7px; }
.silo-tile-name {
  font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 800;
  letter-spacing: .03em; color: var(--text);
}
.silo-tile-share {
  margin-left: auto;
  font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 800;
  color: var(--accent); font-variant-numeric: tabular-nums lining-nums;
}
[data-theme="dark"] .silo-tile-share { color: var(--volt); }
.silo-tile-amt {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.1; margin-top: 6px;
}
.silo-tile-bar {
  height: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 25%, transparent);
  margin-top: 8px; overflow: hidden;
}
.silo-tile-bar span { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.silo-tile-split {
  display: flex; height: 6px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--muted-2) 18%, transparent);
  margin-top: 10px;
}
.silo-split-seg { display: block; height: 100%; transition: width .3s ease; }
.silo-tile-sub {
  margin-top: 8px; font-size: 10.5px; color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.silo-tile-sub b { color: var(--text); font-weight: 800; }
@media (max-width: 880px) { .silo-breakdown { grid-template-columns: 1fr; } }

/* ---------- Category (商品) qty heat + global rank (Draft 3) ---------- */
.cat-qty-heat { /* container, inherits strip padding */ }
.cat-d3 { display: grid; grid-template-columns: 1.4fr 0.82fr; gap: 26px; align-items: start; }
.cat-d3-left { min-width: 0; }
.cat-d3-right { min-width: 0; }
.cat-heat-axis { display: grid; grid-template-columns: 68px repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.cat-heat-axis div { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.cat-heat-corner { }
.cat-heat { display: grid; grid-template-columns: 68px repeat(4, 1fr); gap: 8px; align-items: stretch; }
.cat-rlabel { display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: default; }
.cat-hcell {
  border-radius: var(--radius-sm); min-height: 68px; padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-variant-numeric: tabular-nums lining-nums; transition: background .4s ease, color .4s ease, transform .15s ease, box-shadow .15s ease;
  border: 1px solid var(--border);
}
.cat-hcell:hover { transform: translateY(-2px); box-shadow: var(--shadow); z-index: 1; }
.cat-hcell.is-zero { opacity: .55; background: transparent; }
.cat-hqty { font-size: 15px; font-weight: 800; line-height: 1.05; }
.cat-hcat { font-size: 10.5px; opacity: .9; line-height: 1.1; text-align: center; font-weight: 600; }
.cat-hshare { font-size: 10.5px; opacity: .75; line-height: 1; text-align: center; font-weight: 600; }
.cat-rank-head { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; text-align: center; margin: 0 0 9px; padding: 2px 0; }
.cat-rank-list { display: flex; flex-direction: column; gap: 8px; }
.cat-rank-row { display: flex; align-items: stretch; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); min-height: 52px; transition: transform .15s ease, box-shadow .15s ease; }
.cat-rank-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); z-index: 1; }
.cat-rank-row.is-zero { opacity: .55; background: transparent; }
.cat-rank-n { width: 18px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.cat-rank-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; text-align: center; }
.cat-rank-qty { font-size: 15px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; }
.cat-rank-name { font-size: 10.5px; font-weight: 600; opacity: .9; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-rank-meta { font-size: 10.5px; font-weight: 600; opacity: .75; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.cat-grid-foot { margin: 10px 4px 2px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
@media (max-width: 760px) {
  .cat-d3 { grid-template-columns: 1fr; gap: 18px; }
  .cat-heat-axis, .cat-heat { grid-template-columns: 52px repeat(4, 1fr); gap: 6px; }
  .cat-rlabel { font-size: 10.5px; padding-right: 6px; }
  .cat-hcell { min-height: 56px; padding: 8px 2px; }
  .cat-hqty { font-size: 13px; }
  .cat-hcat { font-size: 10.5px; }
  .cat-rank-row { min-height: 48px; padding: 6px 8px; }
  .cat-rank-qty { font-size: 13px; }
  .cat-rank-name { font-size: 10.5px; }
  .cat-rank-meta { font-size: 10.5px; }
}

/* ---------- Category top strip (5 rows) ---------- */
.dash-cat-top {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.dash-ct {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0; /* allow grid to honor column width */
}
.dash-ct-rank {
  font-family: "Archivo", sans-serif;
  font-size: 10.5px; font-weight: 800; letter-spacing: var(--tracking-kick);
  color: var(--muted);
}
.dash-ct-rank strong {
  display: inline-block;
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent); margin-right: 6px;
  font-size: 10.5px; letter-spacing: 0;
}
.dash-ct[data-rank="1"] .dash-ct-rank strong {
  background: var(--volt); color: #0a0a0a;
}
[data-theme="dark"] .dash-ct[data-rank="1"] .dash-ct-rank strong {
  background: var(--volt); color: #0a0a0a;
}
.dash-ct-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.005em;
}
.dash-ct-amount {
  font-size: 14px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); font-variant-numeric: tabular-nums lining-nums;
}
.dash-ct-bar {
  height: 3px; border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 25%, transparent);
  overflow: hidden;
}
.dash-ct-bar-fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
[data-theme="dark"] .dash-ct-bar-fill { background: var(--volt); }
.dash-ct-foot {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-variant-numeric: tabular-nums lining-nums;
  color: var(--muted);
  margin-top: 2px;
}
.dash-ct-foot .delta { font-weight: 800; }
.dash-ct-foot .delta.up { color: var(--accent); }
.dash-ct-foot .delta.down { color: var(--err); }
[data-theme="dark"] .dash-ct-foot .delta.up { color: var(--volt); }
.dash-ct-foot .delta.flat { color: var(--muted); }

/* ---------- Empty state ---------- */
.kpi-grid--dashboard .skeleton.kpi-mini { height: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dash-row--primary,
  .dash-row--primary.with-four {
    grid-template-columns: 1fr 1fr;
  }
  .dash-row--primary .kpi.feature {
    grid-column: 1 / -1;
  }
  .dash-region-share { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-cat-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash-section { padding: 16px 14px 18px; }
  .dash-section-title { font-size: 17px; }
  .dash-row--primary,
  .dash-row--primary.with-four { grid-template-columns: 1fr; }
  .dash-region-share { grid-template-columns: 1fr 1fr; }
  .dash-cat-top { grid-template-columns: 1fr 1fr; }
  .dash-period { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 520px) {
  .dash-region-share, .dash-cat-top { grid-template-columns: 1fr; }
  .dash-row--primary .kpi.feature .kpi-spark { height: 44px; }
}

/* ---------- Category top · dept pill (单列垂直堆叠：避免窄卡横向换行挤压) ---------- */
.dash-ct-dept {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  margin-top: 4px;
}
.dash-ct-dept-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-family: "Archivo", sans-serif;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--text);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.dash-ct-dept-pill[data-dept="MEN"]  { background: color-mix(in srgb, #5b8ff9 14%, var(--surface)); border-color: color-mix(in srgb, #5b8ff9 28%, var(--border)); }
.dash-ct-dept-pill[data-dept="WMS"]  { background: color-mix(in srgb, #ff8c42 14%, var(--surface)); border-color: color-mix(in srgb, #ff8c42 28%, var(--border)); }
.dash-ct-dept-pill[data-dept="KIDS"] { background: color-mix(in srgb, #c97cff 14%, var(--surface)); border-color: color-mix(in srgb, #c97cff 28%, var(--border)); }
.dash-ct-dept-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--muted); display: block; }
.dash-ct-dept-dot[data-dept="MEN"]  { background: #5b8ff9; }
.dash-ct-dept-dot[data-dept="WMS"]  { background: #ff8c42; }
.dash-ct-dept-dot[data-dept="KIDS"] { background: #c97cff; }
/* ---------- Category top · trend chart (累计 Top5 周度走势) ---------- */
.dash-ct-trend {
  margin-top: 6px;
  height: 34px;
  width: 100%;
  position: relative;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: 4px;
  overflow: hidden;
}
.dash-ct-trend-svg { display: block; width: 100%; height: 100%; }
.dash-ct-trend .trend-line { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dash-ct-trend .trend-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.dash-ct-trend .trend-dot { fill: var(--accent); }
[data-theme="dark"] .dash-ct-trend .trend-line { stroke: var(--volt); }
[data-theme="dark"] .dash-ct-trend .trend-area { fill: rgba(216, 255, 0, .18); }
[data-theme="dark"] .dash-ct-trend .trend-dot { fill: var(--volt); }
/* ---------- Owner chip (shared across region strip + category cards) ---------- */
.owner-chip-ic { width: 12px; height: 12px; flex: 0 0 auto; opacity: .8; }
.owner-chip-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Region-tab owner strip — one editable chip per region */
.owner-strip {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.owner-strip-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 8%, var(--surface));
  border: 1px solid var(--border);
  font-size: 11px; font-variant-numeric: tabular-nums lining-nums;
}
.owner-strip-item .owner-dot { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; }
.owner-strip-item .owner-region { font-family: "Archivo", sans-serif; font-weight: 800; letter-spacing: .04em; color: var(--text); }
.owner-strip-item .owner-name { color: var(--text); font-weight: 700; }
.owner-strip-item .owner-edit {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 0 2px; line-height: 1;
  transition: color .15s ease;
}
.owner-strip-item .owner-edit:hover { color: var(--accent); }

/* Category top card — owner chip (dominant dept responsibility) */
.dash-ct-owner {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 2px; padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 10.5px; font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
  width: fit-content;
}

/* ---------- Category Insights card ---------- */
.cat-insight-card { display: flex; flex-direction: column; }
.cat-insight-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cat-insight {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--muted-2);
  transition: border-color .15s ease, transform .15s ease;
}
.cat-insight:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); transform: translateX(2px); }
.cat-insight.up { border-left-color: var(--volt); }
.cat-insight.down { border-left-color: var(--err); }
.cat-insight.ok { border-left-color: var(--accent); }
.cat-insight.warn { border-left-color: var(--warn); }
.cat-insight.err { border-left-color: var(--err); }
.cat-insight-rank {
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 13px;
  color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.45;
  text-align: center; padding-top: 3px;
}
.cat-insight-body { min-width: 0; }
.cat-insight-tag {
  display: inline-block;
  font-family: "Archivo", sans-serif; font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 5px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 2px 8px; border-radius: 999px;
}
.cat-insight-text { font-size: 13px; line-height: 1.6; color: var(--text); }
.cat-insight-text b { color: var(--volt); font-weight: 800; }
[data-theme="light"] .cat-insight-text b { color: var(--ok); }

/* ---------- Region Rank: 小区横向多指标对比 ---------- */
.card--wide { grid-column: 1 / -1; }
.reg-rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.reg-rank-chart {
  min-width: 0;
  height: 184px;
  padding: 6px 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.reg-rank-foot {
  margin: 14px 2px 2px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  text-wrap: pretty;
}
.reg-rank-foot b { color: var(--volt); font-weight: 800; }
[data-theme="light"] .reg-rank-foot b { color: var(--ok); }
.reg-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 2px 0 4px;
}
.reg-meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.reg-meta-up { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: color-mix(in srgb, var(--ok) 8%, var(--surface-2)); }
.reg-meta-down { color: var(--err); border-color: color-mix(in srgb, var(--err) 32%, var(--border)); background: color-mix(in srgb, var(--err) 7%, var(--surface-2)); }
.reg-meta-bench { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }

/* ---------- 区域页增强 (P1) · 区域×品类下钻矩阵 ---------- */
.reg-cat-matrix {
  display: flex; flex-direction: column; padding: 14px 16px 6px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
  overflow-x: auto;
}
.rcm-head, .rcm-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) repeat(4, minmax(96px, 1fr)) minmax(110px, 1fr); gap: 6px; align-items: stretch; }
.rcm-head { position: sticky; top: 0; z-index: 2; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.rcm-corner { font-size: var(--fs-kick); font-weight: 800; letter-spacing: var(--tracking-kick); text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.rcm-col { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; letter-spacing: .03em; padding: 4px 6px; }
.rcm-col.rcm-tot { color: var(--muted); justify-content: flex-end; }
.rcm-coltot { margin-left: auto; font-weight: 700; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rcm-row { padding: 4px 0; }
.rcm-cat { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--text); padding: 6px; background: var(--surface); border-radius: var(--radius-sm); }
.rcm-cattot { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rcm-cell {
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 6px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--text); text-align: right;
  display: flex; align-items: center; justify-content: flex-end; min-height: 34px;
  transition: transform .1s ease, box-shadow .12s ease, outline-color .12s ease; outline: 2px solid transparent;
}
.rcm-cell:hover { transform: translateY(-1px); box-shadow: var(--shadow); outline-color: var(--accent); }
.rcm-v { font-variant-numeric: tabular-nums; }
.rcm-rowtot, .rcm-gtot { background: var(--surface); color: var(--muted); font-weight: 800; cursor: default; }
.rcm-rowtot:hover, .rcm-gtot:hover { transform: none; box-shadow: none; outline-color: transparent; }
.rcm-grand { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.rcm-gtotal { color: var(--text); }
.reg-cat-foot { margin: 10px 16px 14px; font-size: 11.5px; color: var(--muted); }

/* ---------- 区域页增强 (P1) · 区域贡献排行（横向对比条） ---------- */
.reg-contrib { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.rc-row { display: grid; grid-template-columns: 26px 132px 1fr 116px 56px; gap: 12px; align-items: center; }
.rc-rank { width: 24px; height: 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); font-weight: 800; font-size: 12px; color: var(--muted); }
.rc-row.rc-lead .rc-rank { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rc-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--text); }
.rc-dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 auto; }
.rc-star { font-size: 10.5px; font-weight: 800; color: var(--volt); background: #0a0a0a; padding: 1px 7px; border-radius: 999px; letter-spacing: .04em; }
[data-theme="light"] .rc-star { color: #0a0a0a; background: var(--volt); }
.rc-bar { height: 16px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rc-bar-fill { height: 100%; border-radius: 999px; transition: width .4s cubic-bezier(.2,.7,.3,1); min-width: 3px; }
.rc-val { text-align: right; font-weight: 700; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.rc-pct { text-align: right; font-weight: 800; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-row.rc-lead .rc-pct { color: var(--accent); }

/* ---------- Seasonal & holiday insight card ---------- */
.season-insight { display: flex; flex-direction: column; gap: 18px; padding: 4px 2px; }
.si-window { font-size: 13px; color: var(--muted); line-height: 1.6; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.si-window b { color: var(--text); font-weight: 700; }
.si-block { }
.si-h { font-size: var(--fs-kick); font-weight: 700; letter-spacing: var(--tracking-kick); text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.si-row { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.si-row:last-child { border-bottom: none; }
.si-wk { font-weight: 700; color: var(--text); }
.si-wk em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 4px; }
.si-val { color: var(--text); font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.si-dev { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.si-dev.ok { color: var(--muted); }
.si-dev.over { color: var(--ok); }
.si-dev.under { color: var(--err); }
.si-holiday { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; }
.si-h-badge { background: var(--volt); color: #0a0a0a; font-weight: 800; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.si-h-note { color: var(--muted); }
.si-h-stat { color: var(--text); font-weight: 600; }
.si-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.si-s-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; transition: border-color .15s ease; }
.si-s-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.si-s-item b { display: block; color: var(--text); font-weight: 700; margin-bottom: 6px; font-size: 13px; letter-spacing: -.005em; }
.insight-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

/* seasonal-intensity toggle + data-driven reversal banner + attribution */
.si-toggle { display: inline-flex; gap: 4px; margin-left: 12px; align-self: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.si-toggle button { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px; cursor: pointer; letter-spacing: .02em; }
.si-toggle button:hover { color: var(--text); }
.si-toggle button.active { background: var(--volt); color: #0a0a0a; }
.si-reversal { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; border: 1px solid var(--border); background: var(--surface-2); border-left-width: 3px; border-left-style: solid; }
.si-reversal::before { content: "→"; font-size: 14px; opacity: .75; font-weight: 700; }
.si-reversal.over::before { content: "↗"; }
.si-reversal.under::before { content: "↘"; }
.si-reversal b { font-weight: 800; letter-spacing: -.01em; }
.si-reversal.over { color: var(--ok); border-left-color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent) color-mix(in srgb, var(--ok) 35%, transparent) color-mix(in srgb, var(--ok) 35%, transparent) var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface-2)); }
.si-reversal.under { color: var(--err); border-left-color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent) color-mix(in srgb, var(--err) 30%, transparent) color-mix(in srgb, var(--err) 30%, transparent) var(--err); background: color-mix(in srgb, var(--err) 7%, var(--surface-2)); }
.si-reversal.ok { color: var(--muted); border-left-color: var(--muted); }
.si-attr { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.si-attr-title { margin-bottom: 2px; }
.si-attr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.si-attr-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.si-attr-row { display: grid; grid-template-columns: 1fr 60px 64px; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.si-attr-row:last-child { border-bottom: none; }
.si-attr-head { color: var(--muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 7px !important; border-bottom: 1px solid color-mix(in srgb, var(--text) 18%, transparent); margin-bottom: 2px; }
.si-attr-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-attr-dev { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.si-attr-dev.ok { color: var(--muted); }
.si-attr-dev.over { color: var(--ok); }
.si-attr-dev.under { color: var(--err); }
.si-attr-note { font-size: 11.5px; color: var(--muted); line-height: 1.55; padding-top: 4px; }

/* AW pre-heat forecast card (assumption-driven) */
.aw-badge { margin-left: 12px; align-self: center; background: var(--infrared); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; letter-spacing: .04em; }
.aw-preheat { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
.aw-signal { font-size: 13.5px; color: var(--text); line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--volt); border-radius: var(--radius-sm); padding: 12px 14px; }
.aw-signal b { color: var(--text); }
.aw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.aw-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; transition: border-color .15s ease; }
.aw-item:hover { border-color: color-mix(in srgb, var(--volt) 30%, var(--border)); }
.aw-item b { display: block; color: var(--text); font-weight: 700; margin-bottom: 6px; font-size: 13px; letter-spacing: -.005em; }
.aw-note { font-size: 11.5px; color: var(--muted); line-height: 1.55; border-top: 1px dashed var(--border); padding-top: 10px; }

/* ---------- Momentum tiles (insights · 周环比动能) ---------- */
.momentum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 4px 2px 2px; }
.momentum-tile { position: relative; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px 12px 17px; }
.momentum-tile .mt-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.momentum-tile .mt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.momentum-tile .mt-name { font-weight: 800; font-size: 14px; letter-spacing: .3px; }
.momentum-tile .mt-arrow { font-size: 17px; font-weight: 900; line-height: 1; }
.momentum-tile.tone-up .mt-arrow { color: var(--ok); }
.momentum-tile.tone-down .mt-arrow { color: var(--err); }
.momentum-tile.tone-flat .mt-arrow { color: var(--muted); }
.momentum-tile .mt-delta { font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums lining-nums; line-height: 1.1; }
.momentum-tile .mt-amt { margin-top: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.momentum-tile .mt-prev { opacity: .72; }
.momentum-tile .mt-bar { margin-top: 9px; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.momentum-tile .mt-bar-fill { display: block; height: 100%; border-radius: 999px; }
.momentum-tile.tone-up .mt-bar-fill { background: var(--ok); }
.momentum-tile.tone-down .mt-bar-fill { background: var(--err); }
.momentum-tile.tone-flat .mt-bar-fill { background: var(--muted); }
.momentum-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* ============ Lens ② 决策 · 机会与权衡 ============ */
.bcg-wrap { display: grid; grid-template-columns: 1fr 230px; gap: 14px; align-items: start; }
#chartBcg { min-height: 320px; }
.bcg-legend { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.bcg-leg-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
.bcg-leg-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

.recovery-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.recov-head, .recov-row { display: grid; grid-template-columns: 28px 1.2fr 1fr 0.9fr 1.1fr 1.6fr; gap: 10px; align-items: center; }
.recov-head { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.recov-row { padding: 9px 10px; border-radius: 8px; font-size: 12.5px; border: 1px solid transparent; }
.recov-row:hover { background: var(--surface-2); border-color: var(--border); }
.recov-row.tone-warn { border-left: 3px solid var(--warn); }
.recov-row.tone-ok { border-left: 3px solid var(--ok); }
.recov-c-rec { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.recov-c-key { font-weight: 800; }
.recov-c-amt, .recov-c-stk, .recov-c-recov { font-variant-numeric: tabular-nums; text-align: right; }
.recov-c-recov { font-weight: 700; color: var(--warn); }
.recov-c-act { color: var(--text); }
.recov-note, .whatif-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.recovery-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* ============ Lens ③ 行动 · 推演与落地 ============ */
.whatif-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 2px; }
.whatif-controls { display: flex; flex-direction: column; gap: 16px; }
.wi-ctrl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wi-ctrl-label { font-size: 13px; font-weight: 700; color: var(--text); }
.wi-ctrl-val { font-size: 13px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.wi-ctrl input[type="range"] { width: 100%; accent-color: var(--accent); }
.wi-ctrl-hint { margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.whatif-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start; }
.wi-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.wi-tile-label { font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.wi-tile-now { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.wi-tile-delta { font-size: 12px; font-weight: 700; }
.wi-tile-delta .kpi-up { color: var(--ok); }
.wi-tile-delta .kpi-dn { color: var(--err); }

/* tunable prescription params button (Lens ②③) */
.tune-btn { font: inherit; font-size: 12px; cursor: pointer; margin-top: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--accent); border-radius: 8px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.tune-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }


/* ---------- OTB 可买额度护栏 (Lens ③) ---------- */
.otb-wrap { display: flex; flex-direction: column; gap: 12px; }
.otb-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.otb-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.otb-tile-label { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.otb-tile-val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.otb-tone-total .otb-tile-val { color: var(--accent); }
.otb-tone-grow .otb-tile-val { color: var(--ok); }
.otb-tone-band .otb-tile-val { color: var(--text); }
.otb-tile.otb-tone-total { border-left: 3px solid var(--accent); }
.otb-table { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.otb-head, .otb-row { display: grid; grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr 1.1fr 1.5fr; gap: 10px; align-items: center; padding: 9px 12px; min-width: 0; }
.otb-head { background: var(--surface-2); font-size: var(--fs-kick); color: var(--muted); letter-spacing: var(--tracking-kick); text-transform: uppercase; border-bottom: 1px solid var(--border); }
.otb-row { font-size: 13px; border-bottom: 1px solid var(--border); }
.otb-row:last-child { border-bottom: none; }
.otb-c-key { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otb-c-qty, .otb-c-need, .otb-c-onh, .otb-c-otb { font-variant-numeric: tabular-nums; text-align: right; }
.otb-c-otb { font-weight: 700; }
.otb-c-advice { font-size: 12px; color: var(--muted); }
.otb-row.tone-grow { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.otb-row.tone-grow .otb-c-otb { color: var(--ok); }
.otb-row.tone-liq { background: color-mix(in srgb, var(--err) 8%, transparent); }
.otb-row.tone-liq .otb-c-otb { color: var(--muted); }
.otb-row.tone-hold { background: transparent; }
.otb-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.otb-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* ---------- Lens ③ RACI action cards ---------- */
.raci-list { display: flex; flex-direction: column; gap: 10px; }
.raci-card {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: stretch;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); border-left: 3px solid var(--muted-2);
}
.raci-card.tone-warn { border-left-color: var(--err); }
.raci-card.tone-act { border-left-color: var(--accent); }
.raci-rank {
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 16px;
  color: var(--muted); background: color-mix(in srgb, var(--muted-2) 10%, var(--surface));
  border-radius: var(--radius-sm); min-width: 30px;
}
.raci-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.raci-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.raci-key { font-weight: 800; font-size: 14px; }
.raci-impact { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.raci-impact b { color: var(--ok); font-size: 14px; }
.raci-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.raci-owner {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 10%, var(--surface)); border: 1px solid var(--border);
  font-weight: 700; color: var(--text); cursor: pointer;
}
.raci-owner:hover { border-color: var(--accent); color: var(--accent); }
.raci-action { color: var(--text); font-weight: 600; }
.raci-due { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.raci-due::before { content: "⏱ "; }
.raci-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.raci-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }
@media (max-width: 620px) {
  .raci-due { margin-left: 0; }
  .raci-meta { gap: 8px; }
}

/* 决策处方 (Lens ②) — signal → diagnosis → action → owner → ¥ impact → due */
.rx-head, .rx-row { display: grid; grid-template-columns: 92px 1.1fr 1.5fr 1.7fr 0.9fr 1fr 64px; gap: 10px; align-items: center; }
.rx-head { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.rx-row { padding: 9px 10px; border-radius: 8px; font-size: 12.5px; border: 1px solid transparent; border-left: 3px solid var(--border); }
.rx-row:hover { background: var(--surface-2); border-color: var(--border); }
.rx-row.tone-err { border-left-color: var(--err); }
.rx-row.tone-warn { border-left-color: var(--warn); }
.rx-sig { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 11.5px; }
.rx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rx-row.tone-err .rx-dot { background: var(--err); }
.rx-row.tone-warn .rx-dot { background: var(--warn); }
.rx-scope { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-dx { color: var(--text); }
.rx-act { color: var(--muted); }
.rx-owner { color: var(--text); cursor: pointer; white-space: nowrap; }
.rx-owner:hover { color: var(--accent); }
.rx-impact { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.rx-impact.impact-err { color: var(--err); }
.rx-impact.impact-warn { color: var(--warn); }
.rx-due { color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.rx-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.rx-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* ---------- 品类排行 (Lens ②) ---------- */
.crk-focus { display: flex; flex-wrap: wrap; gap: 14px; margin: 2px 0 14px; }
.crk-pill-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crk-pill-k { font-size: var(--fs-kick); font-weight: 800; text-transform: uppercase; letter-spacing: var(--tracking-kick); color: var(--muted); margin-right: 2px; }
.crk-pill { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.crk-pill b { font-weight: 800; }
.crk-pill.good { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.crk-pill.bad { background: color-mix(in srgb, var(--err) 14%, transparent); border-color: color-mix(in srgb, var(--err) 40%, transparent); color: var(--err); }
.crk-list { display: flex; flex-direction: column; gap: 4px; }
.crk-row { display: grid; grid-template-columns: 26px 1.4fr 2fr 0.9fr 56px; align-items: center; gap: 10px; padding: 5px 4px; border-bottom: 1px solid var(--line-faint); }
.crk-row:last-child { border-bottom: none; }
.crk-rank { font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.crk-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crk-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.crk-bar { position: relative; height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.crk-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, var(--ok)), var(--accent)); }
.crk-val { font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.crk-tagwrap { display: flex; justify-content: flex-end; }
.crk-tag { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.crk-tag.good { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.crk-tag.bad { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.crk-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 8px; }

/* ── 本周责任总览 strip (Insights top) ── */
.resp-strip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.resp-strip-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.resp-strip-ic { color: var(--accent); display: inline-flex; }
.resp-strip-title { font-weight: 800; font-size: var(--fs-kick); letter-spacing: var(--tracking-kick); text-transform: uppercase; color: var(--text); }
.resp-strip-sub { color: var(--muted); font-size: 12px; }
.resp-strip-sub b { color: var(--text); }
.resp-strip-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.resp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: 10px; padding: 8px 12px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.resp-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 12%, transparent); }
.resp-chip.tone-err { border-left-color: var(--err); }
.resp-chip.tone-warn { border-left-color: var(--warn); }
.resp-chip.tone-ok { border-left-color: var(--ok); }
.resp-chip-owner { font-weight: 600; color: var(--text); font-size: 13px; white-space: nowrap; }
.resp-chip-metrics { color: var(--muted); font-size: 12px; white-space: nowrap; }
.resp-chip-metrics b { color: var(--text); font-variant-numeric: tabular-nums; }
.resp-chip-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, transparent); }

@media (max-width: 880px) {
  .rx-head, .rx-row { grid-template-columns: 72px 1fr 0.9fr; }
  .rx-c-dx, .rx-dx, .rx-c-act, .rx-act, .rx-c-owner, .rx-owner, .rx-c-due, .rx-due { display: none; }
}

@media (max-width: 880px) {
  .bcg-wrap { grid-template-columns: 1fr; }
  .whatif-wrap { grid-template-columns: 1fr; }
  .recov-head, .recov-row { grid-template-columns: 22px 1fr 0.8fr 1fr; }
  .recov-c-amt, .recov-c-stk { display: none; }
  .otb-head, .otb-row { grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr; }
  .otb-c-qty, .otb-c-need { display: none; }
}

/* ---- 经营机会点 · Executive Summary (②决策 capstone) ---- */
.opp-summary-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.opp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opp-tile { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius-sm); padding: 13px 12px 11px; }
.opp-tile.kind-rev { border-left-color: var(--ok); }
.opp-tile.kind-cash { border-left-color: var(--warn); }
.opp-pri { position: absolute; top: 9px; right: 9px; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 5px; letter-spacing: .03em; }
.pri-P0 .opp-pri { background: var(--volt); color: #0a0a0a; }
.pri-P1 .opp-pri { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.pri-P2 .opp-pri { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.opp-val { font-size: 18px; font-weight: 700; line-height: 1.15; margin-top: 2px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind-rev .opp-val { color: var(--ok); }
.kind-cash .opp-val { color: var(--warn); }
.opp-lbl { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--text); line-height: 1.25; }
.opp-note { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.opp-acts { display: flex; flex-direction: column; gap: 7px; }
.opp-act { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid var(--border); }
.opp-act.pri-P0 { border-left-color: var(--volt); }
.opp-act.pri-P1 { border-left-color: var(--warn); }
.opp-act.pri-P2 { border-left-color: var(--muted); }
.opp-pri.small { position: static; font-size: 10.5px; }
.opp-act-t { font-size: 12.5px; color: var(--text); }
.opp-act-v { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.opp-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
@media (max-width: 1000px) {
  .opp-summary-body { grid-template-columns: 1fr; }
  .opp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opp-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 760px) { .opp-tiles { grid-template-columns: 1fr; } .opp-acts { grid-template-columns: 1fr; } }

/* Compact insights tab cards so the dense diagnosis / decision / action modules fit better */
#tab-insights .card { padding: 14px 16px; margin-bottom: 14px; }
#tab-insights .card-head { margin-bottom: 10px; padding-bottom: 8px; }
#tab-insights .card-head h3 { font-size: 15px; }
#tab-insights .card-sub { font-size: 11px; }
#tab-insights .insight-divider { margin: 18px 0 14px; }



/* ===================================================================
   CE RBC — 经营诊断 · 五维落地 (M0 数据质量 / M1 CESW 量价 / M2 库存现金)
   =================================================================== */
/* M0 — 数据质量告警条 (顶部 banner) */
.data-quality-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: color-mix(in srgb, var(--warn-bg) 92%, var(--surface));
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px;
}
.data-quality-banner[hidden] { display: none; }
.dqb-icon { font-size: 18px; line-height: 1.2; }
.dqb-body { flex: 1; min-width: 0; }
.dqb-title { font-size: 13px; font-weight: 800; color: var(--warn); letter-spacing: .01em; }
.dqb-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.dqb-item { font-size: 12px; color: var(--text); line-height: 1.5; }
.dqb-item b { color: var(--warn); font-weight: 800; }
.dqb-item .dqb-num { font-variant-numeric: tabular-nums lining-nums; font-weight: 700; }
.dqb-close { background: transparent; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.dqb-close:hover { color: var(--text); }

/* M1 — CESW 量价拆解瀑布 */
.diag-cesw { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 2px; }
.diag-cesw-head { display: flex; flex-wrap: wrap; gap: 22px; align-items: baseline; }
.diag-cesw-head .dc-kpi { display: flex; flex-direction: column; }
.diag-cesw-head .dc-kpi b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.diag-cesw-head .dc-kpi span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.diag-cesw-head .dc-kpi.gap b { color: var(--infrared); }
.diag-cesw-head .dc-kpi.peer b { color: var(--ok); }
.diag-wf { display: flex; align-items: stretch; height: 46px; border-radius: var(--radius-sm); overflow: hidden; }
.diag-wf .wf-seg { display: flex; flex-direction: column; justify-content: center; padding: 0 12px; color: #0a0a0a; min-width: 0; }
.diag-wf .wf-seg .wf-v { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.diag-wf .wf-seg .wf-l { font-size: 10.5px; font-weight: 600; opacity: .85; white-space: nowrap; }
.diag-wf .wf-base { background: var(--volt); }
.diag-wf .wf-vol { background: color-mix(in srgb, var(--ok) 78%, #fff); }
.diag-wf .wf-price { background: color-mix(in srgb, var(--ok) 50%, #fff); }
.diag-wf .wf-target { background: color-mix(in srgb, var(--ok) 26%, var(--surface)); display: flex; align-items: center; }
.diag-wf .wf-target .wf-v { color: var(--ok); }
.diag-cesw-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; color: var(--muted); align-items: center; }
.diag-cesw-foot .dc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.diag-cesw-foot .dc-pill.vol { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.diag-cesw-foot .dc-pill.price { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); color: var(--muted-2); }
.diag-cesw-note { font-size: 12px; color: var(--text); line-height: 1.55; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.diag-cesw-note b { color: var(--infrared); }

/* M2 — 库存现金陷阱排行 */
.diag-cash { display: flex; flex-direction: column; gap: 9px; padding: 4px 2px 2px; }
.diag-cash-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 4px; }
.cash-row { display: grid; grid-template-columns: 132px 1fr 96px; align-items: center; gap: 10px; }
.cash-row .cr-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-row .cr-bar { height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--muted-2) 20%, transparent); overflow: hidden; }
.cash-row .cr-bar > span { display: block; height: 100%; border-radius: 6px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.cash-row.best .cr-bar > span { background: var(--infrared); }
.cash-row.mid .cr-bar > span { background: var(--warn); }
.cash-row.dead .cr-bar > span { background: var(--accent); }
[data-theme="dark"] .cash-row.best .cr-bar > span { background: var(--err); }
[data-theme="dark"] .cash-row.mid .cr-bar > span { background: var(--warn); }
.cash-row .cr-val { text-align: right; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.cash-row.best .cr-val { color: var(--infrared); }
.cash-row.dead .cr-val { color: var(--accent); }
[data-theme="dark"] .cash-row.best .cr-val { color: var(--err); }
.cash-row .cr-tag { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; margin-top: 1px; }
.cash-row.best .cr-tag { color: var(--infrared); }
.cash-row.mid .cr-tag { color: var(--warn); }
.cash-row.dead .cr-tag { color: var(--muted-2); }
.diag-cash-foot { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.diag-cash-foot b { color: var(--infrared); }
@media (max-width: 760px) {
  .cash-row { grid-template-columns: 96px 1fr 78px; gap: 8px; }
  .cash-row .cr-name { font-size: 11px; }
}

/* ── Bridge · 增长归因：瀑布图 + 贡献排行双栏 ─────────────────────────── */
.bridge-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: stretch; }
/* Chart height follows the taller of (baseline 340px, contribution list) so the two columns
   always end flush. The chart is absolutely positioned inside its wrapper so it never feeds
   its own height back into grid row sizing (otherwise the row would ratchet up and never
   shrink when switching from 品类 back to 区域). ECharts picks the new box up via the
   shared ResizeObserver. */
.bridge-chart-wrap { position: relative; min-width: 0; min-height: 340px; }
.bridge-chart { position: absolute; inset: 0; width: auto; height: auto; }
.bridge-list {
  min-width: 0; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 12px 10px;
}
/* KPI strip: 上周 → 本周 → 净增量 */
.bridge-kpi { display: grid; grid-template-columns: 1fr auto 1fr 1.15fr; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.bk-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-cell .bk-l { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted-2); white-space: nowrap; }
.bk-cell b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; color: var(--text); white-space: nowrap; }
.bk-arrow { font-size: 13px; color: var(--muted-2); padding: 0 2px; align-self: end; padding-bottom: 2px; }
.bk-net { padding-left: 10px; border-left: 1px solid var(--border); }
.bk-net b em { font-style: normal; font-size: 11px; font-weight: 700; margin-left: 5px; opacity: .85; }
.bk-net.up b { color: var(--ok); }
.bk-net.down b { color: var(--infrared); }
[data-theme="dark"] .bk-net.down b { color: var(--err); }
/* Column header */
.bridge-list-head {
  display: grid; grid-template-columns: 22px minmax(58px, 1fr) 1.5fr 74px 46px; gap: 8px; align-items: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted-2);
  text-transform: uppercase; padding: 0 2px;
}
.bridge-list-head span:nth-child(4), .bridge-list-head span:nth-child(5) { text-align: right; }
.bridge-groups { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
/* Group header: 拉动 / 拖累 / 持平 */
.bridge-group { display: flex; flex-direction: column; gap: 2px; }
.bg-head { display: flex; align-items: center; gap: 6px; padding: 3px 2px 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.bg-head .bg-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.bg-head .bg-n { font-size: 10.5px; font-weight: 700; color: var(--muted-2); }
.bg-head .bg-sum { margin-left: auto; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.bridge-group.is-up .bg-dot { background: var(--ok); }
.bridge-group.is-up .bg-t, .bridge-group.is-up .bg-sum { color: var(--ok); }
.bridge-group.is-down .bg-dot { background: var(--infrared); }
.bridge-group.is-down .bg-t, .bridge-group.is-down .bg-sum { color: var(--infrared); }
[data-theme="dark"] .bridge-group.is-down .bg-dot { background: var(--err); }
[data-theme="dark"] .bridge-group.is-down .bg-t, [data-theme="dark"] .bridge-group.is-down .bg-sum { color: var(--err); }
.bridge-group.is-flat .bg-dot { background: var(--muted-2); }
.bridge-group.is-flat .bg-t, .bridge-group.is-flat .bg-sum { color: var(--muted-2); }
/* Contribution rows */
.bridge-row {
  display: grid; grid-template-columns: 22px minmax(58px, 1fr) 1.5fr 74px 46px; gap: 8px; align-items: center;
  padding: 5px 2px; border-radius: 6px; transition: background .15s ease;
}
.bridge-row:hover { background: var(--surface); }
.br-rank { font-size: 10.5px; font-weight: 800; color: var(--muted-2); text-align: center; font-variant-numeric: tabular-nums lining-nums; }
.br-name { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-bar { display: block; height: 7px; border-radius: 4px; background: var(--border); overflow: hidden; }
.br-bar > i { display: block; height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.br-delta { text-align: right; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.br-pct { text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.bridge-row.up .br-delta { color: var(--ok); }
.bridge-row.down .br-delta { color: var(--infrared); }
[data-theme="dark"] .bridge-row.down .br-delta { color: var(--err); }
.bridge-row.flat .br-delta, .bridge-row.flat .br-name { color: var(--muted-2); }
.bridge-foot { font-size: 10.5px; color: var(--muted-2); line-height: 1.5; padding-top: 8px; border-top: 1px dashed var(--border); margin-top: auto; }
.bridge-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; font-size: 12px; color: var(--muted-2); }
@media (max-width: 1080px) {
  .bridge-layout { grid-template-columns: 1fr; }
  .bridge-chart-wrap { min-height: 300px; }
}
@media (max-width: 560px) {
  .bridge-kpi { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .bk-arrow { display: none; }
  .bk-net { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 8px; }
  .bridge-list-head, .bridge-row { grid-template-columns: 20px minmax(50px, 1fr) 66px 44px; }
  .bridge-list-head span:nth-child(3), .bridge-row .br-bar { display: none; }
}

/* ---------- chart fullscreen + PNG export (P0) ---------- */
.chart-fs-btn {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .55; transition: opacity .15s ease, background .15s ease;
}
.chart-fs-btn:hover, .chart-fs-btn:focus { opacity: 1; background: var(--surface-2); }
.chart-fs-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.chart-fs-overlay[hidden] { display: none; }
.chart-fs-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.chart-fs-panel {
  position: relative; width: min(1100px, 92vw); height: min(760px, 90vh);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg); transform: scale(.98); opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.chart-fs-overlay.show .chart-fs-panel { transform: scale(1); opacity: 1; }
.chart-fs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chart-fs-title { font-weight: 600; font-size: 15px; }
.chart-fs-actions { display: flex; gap: 8px; }
.chart-fs-canvas { flex: 1; width: 100%; }

/* ===================== 全年货品周期 · 区域×Silo 阶段矩阵 (v4) ===================== */
.lc-root { display: flex; flex-direction: column; gap: 22px; padding: 4px 0 40px; }

/* ① 状态横幅 */
.lc-banner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lc-banner-cell { background: var(--surface); padding: 16px 18px; }
.lc-banner-kick { font-size: var(--fs-kick); letter-spacing: var(--tracking-kick); text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lc-banner-val { font-size: 18px; font-weight: 700; margin-top: 6px; line-height: 1.3; }
.lc-banner-val .accent { color: var(--volt); }
.lc-banner-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* ① 动态「重点跟进」警示条（自动锁定最弱区域） */
.lc-banner-flag { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 18px; background: var(--warn-bg); border-bottom: 1px solid var(--warn-border); color: var(--warn); }
.lc-banner-flag .lc-flag-ico { font-size: 16px; line-height: 1; flex: none; }
.lc-banner-flag .lc-flag-txt { font-size: 13px; line-height: 1.45; }
.lc-banner-flag b { font-weight: 800; }


/* ② 生命周期曲线 */
.lc-life { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.lc-life svg { width: 100%; height: auto; display: block; }
.lc-life-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ② 阶段徽章（chip）— 按业务语义区分视觉 + 动效
   五种阶段：导入期 launch ▶ / 导入预热 warmup ◐ / 成熟期 mature ◆ / 衰退期 decline ▽ / 常态 steady ●
   设计原则：动效频率与业务节奏成正比（导入最急 → 衰退最缓 → 常态几乎无感） */
.lc-chip { transition: opacity .25s ease; }
.lc-chip-bg { transition: stroke .25s ease, stroke-opacity .25s ease, stroke-width .25s ease, stroke-dasharray .25s ease; }

/* 导入期：实心粗边 + 心跳脉冲 + volt 光晕（高能爆发） */
.lc-chip-launch .lc-chip-bg {
  stroke-width: 1.4;
  stroke-opacity: 1;
  animation: lc-launch-glow 1.6s ease-in-out infinite;
}
.lc-chip-launch { animation: lc-launch-pulse 1.6s ease-in-out infinite; }
@keyframes lc-launch-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}
@keyframes lc-launch-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 3px var(--volt)); }
}

/* 导入预热：虚线边框 marching ants 流动 + 弱呼吸（蓄势待发） */
.lc-chip-warmup .lc-chip-bg {
  stroke-width: 1;
  stroke-dasharray: 3 2;
  animation: lc-warmup-march 1.2s linear infinite;
}
.lc-chip-warmup { animation: lc-warmup-breath 2.4s ease-in-out infinite; }
@keyframes lc-warmup-march {
  to { stroke-dashoffset: -10; }
}
@keyframes lc-warmup-breath {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

/* 成熟期：稳态，无动效（巅峰稳定） */
.lc-chip-mature { /* 默认样式，不加动画 */ }

/* 衰退期：边弱化 + 慢渐隐（渐行渐远） */
.lc-chip-decline .lc-chip-bg {
  stroke-opacity: 0.55;
}
.lc-chip-decline { animation: lc-decline-fade 4.5s ease-in-out infinite; }
@keyframes lc-decline-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 常态：点状边框 + 极慢呼吸（永远在线） */
.lc-chip-steady .lc-chip-bg {
  stroke-opacity: 0.55;
  stroke-dasharray: 1 2;
}
.lc-chip-steady { animation: lc-steady-breath 7s ease-in-out infinite; }
@keyframes lc-steady-breath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

/* ② 阶段 chip 图例（HTML 镜像，保留同一组动效 class） */
.lc-chip-legend { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; font-size: 11px; color: var(--muted); }
.lc-chip-legend-title { font-weight: 700; color: var(--text); margin-right: 4px; }
.lc-chip-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px; background: var(--surface); border: 0.8px solid var(--text); font-weight: 800; color: var(--text); line-height: 1.4; }
.lc-chip-pill.lc-chip-launch  { border-width: 1.4px; border-color: var(--text); }
.lc-chip-pill.lc-chip-warmup  { border-style: dashed; }
.lc-chip-pill.lc-chip-mature  { /* 默认 */ }
.lc-chip-pill.lc-chip-decline { opacity: 0.55; }
.lc-chip-pill.lc-chip-steady  { border-style: dotted; opacity: 0.7; }
.lc-chip-legend-hint { color: var(--muted-2); font-style: italic; }
/* ② Silo 行 hover 高亮 + 浮层 tooltip */
.lc-silo-row { cursor: pointer; }
.lc-row-hl { fill: transparent; pointer-events: all; transition: fill .12s ease; }
.lc-silo-row.is-hover .lc-row-hl { fill: var(--volt); fill-opacity: 0.10; }
.lc-silo-row.is-hover { filter: drop-shadow(0 0 2.5px rgba(0,0,0,.28)); }
.lc-tip { position: fixed; z-index: 9999; max-width: 260px; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.24); font-size: 12px; line-height: 1.55; pointer-events: none; }
.lc-tip[hidden] { display: none; }
.lc-tip-h { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.lc-tip-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.lc-tip-row { display: flex; justify-content: space-between; gap: 14px; }
.lc-tip-row b { font-weight: 800; }
.lc-tip-row .pos { color: var(--ok); }
.lc-tip-row .neg { color: var(--infrared); }

/* ③ 区域 × Silo 矩阵 */
.lc-matrix { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.lc-region { display: grid; grid-template-columns: 150px 1fr 132px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.lc-region:last-child { border-bottom: none; }
/* 最弱区域高亮标记 */
.lc-region.is-flag { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-left: 4px solid var(--warn); border-radius: var(--radius-sm); padding-left: 12px; }
.lc-region-flag { font-size: 10px; font-weight: 800; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-border); padding: 2px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.lc-region-head { display: flex; flex-direction: column; gap: 4px; }
.lc-region-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.lc-region-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lc-region-idx { font-size: 12px; color: var(--muted); }
.lc-region-idx b { font-size: 14px; }
.lc-weekbars { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.lc-weekbar { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s ease, transform .15s ease; cursor: pointer; position: relative; }
.lc-weekbar:hover { transform: translateY(-2px); filter: brightness(1.06); }
.lc-weekbar.is-cur { box-shadow: 0 0 0 2px var(--volt); }
.lc-weekbar.is-selected { box-shadow: 0 0 0 2.5px var(--volt), 0 4px 8px rgba(216,255,0,0.18); transform: translateY(-2px); }
.lc-weekbar.is-selected::after { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; border-radius: 2px; background: var(--volt); box-shadow: 0 0 6px rgba(216,255,0,0.5); }
.lc-week-axis { display: flex; gap: 3px; margin-top: 4px; }
.lc-week-axis span { flex: 1; text-align: center; font-size: 9px; color: var(--muted); transition: color .15s ease; }
.lc-week-axis span.is-cur { color: var(--volt); font-weight: 700; }
.lc-week-axis span.is-selected { color: var(--volt); font-weight: 800; background: color-mix(in srgb, var(--volt) 14%, transparent); border-radius: 3px; }
.lc-reset-btn { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--volt); background: color-mix(in srgb, var(--volt) 12%, var(--surface)); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; vertical-align: baseline; }
.lc-reset-btn:hover { background: color-mix(in srgb, var(--volt) 24%, var(--surface)); transform: translateX(-1px); }
.lc-reset-btn:active { transform: translateX(-1px) scale(0.98); }
.lc-season { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.lc-season-row { display: grid; grid-template-columns: 72px 1fr 200px; gap: 10px; align-items: center; padding: 5px 0; }
.lc-season-name { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.lc-season-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.lc-season-track { position: relative; height: 11px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.lc-season-fill { display: block; height: 100%; border-radius: 6px; transition: width .25s ease; }
.lc-season-track::after { content: "▏"; position: absolute; right: -1px; top: -3px; font-size: 11px; line-height: 1; color: color-mix(in srgb, var(--text) 45%, transparent); pointer-events: none; opacity: .6; }
.lc-season-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: stretch; gap: 0; line-height: 1.15; }
.lc-mc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 4px; text-align: center; min-width: 0; border-right: 1px solid color-mix(in srgb, var(--text) 12%, var(--border)); }
.lc-mc:last-child { border-right: none; }
.lc-mc-num { font-size: 13px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.lc-mc-cap { font-size: 9.5px; color: var(--muted); font-weight: 600; letter-spacing: .03em; line-height: 1.1; margin-top: 2px; white-space: nowrap; }
.lc-mc-num.pos { color: var(--ok); }
.lc-mc-num.warn { color: var(--warn); }
.lc-mc-num.neg { color: var(--infrared); }
.lc-matrix-note { font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 12px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lc-matrix-note b { color: var(--text); }
.lc-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.lc-legend-sep { color: var(--border); margin: 0 2px; }
.lc-metric-toggle { position: absolute; top: 0; right: 0; font-size: 11px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.lc-metric-toggle select { font: inherit; font-size: 11px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px 8px; cursor: pointer; }
.dash-section-head { position: relative; }
.lc-badge { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.lc-badge.ok { color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-border); }
.lc-badge.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-border); }
.lc-badge.idle { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.lc-region-gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lc-gauge-num { font-size: 20px; font-weight: 800; }
.lc-gauge-num.pos { color: var(--ok); }
.lc-gauge-num.warn { color: var(--warn); }
.lc-gauge-num.neg { color: var(--infrared); }
.lc-gauge-lbl { font-size: 10px; color: var(--muted); text-align: center; }

/* ④ 行动建议 */
.lc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lc-action { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; border-top: 3px solid var(--volt); }
.lc-action h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.lc-action .lc-action-stage { font-size: 11px; color: var(--muted); }
.lc-action p { margin: 6px 0 0; font-size: 12.5px; color: var(--text); }
.lc-action .lc-action-kpi { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ⑤ 整体 Silo 汇总 */
.lc-seasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lc-seasoncard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.lc-seasoncard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-seasoncard h4 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.lc-seasoncard .lc-stage { font-size: 11px; color: var(--muted); margin-top: 4px; }
.lc-seasoncard .lc-prog { margin-top: 10px; }
.lc-seasoncard .lc-prog-track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.lc-seasoncard .lc-prog-fill { height: 100%; border-radius: 6px; }
.lc-seasoncard .lc-prog-num { font-size: 12px; color: var(--muted); margin-top: 6px; }
.lc-insight { margin-top: 16px; background: color-mix(in srgb, var(--volt) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--volt) 40%, var(--border)); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.6; }
.lc-insight b { color: var(--volt); }

/* ⑤ 阶段分布摘要条 */
.lc-stage-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 16px; }
.lc-stage-chip { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); }
.lc-stage-chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.lc-stage-chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.lc-stage-chip.idle { color: var(--muted); background: var(--surface-2); }
.lc-stage-total { font-size: 12px; color: var(--muted); margin-left: auto; }

/* ⑥ 重点跟进下钻 · 部门贡献 */
.lc-drill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lc-drill-row { display: grid; grid-template-columns: 110px 1fr 52px 56px; gap: 12px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); }
.lc-drill-row.is-drag { background: color-mix(in srgb, var(--infrared) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--infrared) 45%, var(--border)); }
.lc-drill-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lc-drill-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lc-drill-track { height: 16px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.lc-drill-fill { height: 100%; border-radius: 8px; }
.lc-drill-share { font-size: 13px; font-weight: 700; text-align: right; }
.lc-drill-ratio { font-size: 12px; font-weight: 800; text-align: right; }
.lc-drill-ratio.pos { color: var(--ok); }
.lc-drill-ratio.neg { color: var(--infrared); }
.lc-drill-note { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.lc-drill-note b { color: var(--infrared); }

.lc-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.lc-section-head .lc-idx { font-size: 12px; font-weight: 800; color: var(--volt); }
.lc-section-head h3 { margin: 0; font-size: var(--fs-h3); font-weight: 800; }
.lc-section-head .lc-sub { font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .lc-banner, .lc-actions, .lc-seasons { grid-template-columns: repeat(2, 1fr); }
  .lc-region { grid-template-columns: 110px 1fr; }
  .lc-region-gauge { display: none; }
}


