/* ==========================================================================
   showcase.css · 对外数据驾驶舱（展示页 · 只读）
   布局铁律：**不再用 transform: scale() 缩放**（全屏投屏会失真/发虚），
   全部改成 vh / vw / clamp() 流式自适应，任何分辨率下都是原生像素渲染。
   面板一律实色（不叠半透明），保证投影、电视、大屏上的颜色稳定。
   ========================================================================== */

.sc-page {
  --ink: #EAF0FF;
  --ink-2: #A8BCDF;
  --dim: #7A8FB4;
  --line: rgba(110, 155, 255, .18);
  --line-2: rgba(130, 175, 255, .38);
  --panel: #0A1226;
  --panel-2: #0E1730;
  --blue: #4C7DFF;
  --cyan: #35E0F0;
  --violet: #9B7BFF;
  --gold: #F7B955;
  --green: #3DDC97;
  --rose: #FF6B8A;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(1200px 700px at 50% -8%, #17265C 0%, #0A1124 46%, #060A16 100%);
  color: var(--ink);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sc-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 165, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 165, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 72%);
  pointer-events: none;
}

/* ---------- 流式骨架 ---------- */
.sc-shell {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, .9vh, 16px);
  padding: clamp(10px, 1.6vh, 22px) clamp(12px, 1.4vw, 30px) clamp(8px, 1.2vh, 18px);
}

/* ---------- 顶栏 ---------- */
.sc-head { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; }
.sc-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.sc-brand svg { width: clamp(28px, 2vw, 38px); height: clamp(28px, 2vw, 38px); }
.sc-brand-name { font-family: 'Space Grotesk', sans-serif; font-size: clamp(14px, 1.05vw, 21px); font-weight: 600; letter-spacing: .02em; color: #fff; }
.sc-brand-name small { display: block; font-family: 'Noto Sans SC', sans-serif; font-size: clamp(9px, .55vw, 11px); font-weight: 400; color: var(--dim); letter-spacing: .16em; margin-top: -1px; }

.sc-title { flex: 1; text-align: center; position: relative; }
.sc-title h1 {
  font-size: clamp(17px, 1.62vw, 31px);
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 18px rgba(76, 125, 255, .55);
}
.sc-title .sub { margin-top: 3px; font-size: clamp(8px, .6vw, 11.5px); letter-spacing: .3em; color: #6E86B4; }
.sc-title::before, .sc-title::after {
  content: ''; position: absolute; top: 42%; width: clamp(60px, 10vw, 190px); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 165, 255, .6));
}
.sc-title::before { left: 0; }
.sc-title::after { right: 0; transform: scaleX(-1); }

.sc-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.sc-clock { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: clamp(9px, .62vw, 12.5px); color: var(--ink-2); line-height: 1.45; }
.sc-clock b { display: block; font-size: clamp(12px, .92vw, 18px); color: #fff; font-weight: 500; letter-spacing: .04em; }

.sc-btn {
  height: clamp(26px, 2.4vh, 36px);
  padding: 0 clamp(8px, .7vw, 15px);
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: #12203F; color: #D2E0FF;
  font-size: clamp(10px, .68vw, 13px); cursor: pointer;
  white-space: nowrap; transition: .18s;
}
.sc-btn:hover { background: #1B2E58; border-color: rgba(150, 190, 255, .6); color: #fff; }
.sc-btn.on { background: #1E3A78; border-color: #4C7DFF; color: #fff; }
.sc-btn svg { width: clamp(12px, .85vw, 16px); height: clamp(12px, .85vw, 16px); }

/* ---------- KPI ---------- */
.sc-kpis { flex: 0 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(7px, .62vw, 14px); }
.sc-kpi {
  position: relative;
  padding: clamp(7px, .95vh, 15px) clamp(9px, .8vw, 17px);
  border-radius: 11px;
  background: linear-gradient(165deg, #16233F 0%, #0C142A 100%);
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: .22s;
}
.sc-kpi:hover { border-color: var(--c, var(--blue)); transform: translateY(-2px); }
.sc-kpi.sel { border-color: var(--c, var(--blue)); box-shadow: inset 0 0 0 1px rgba(120, 165, 255, .35), 0 8px 24px rgba(4, 10, 26, .6); }
.sc-kpi.sel::before, .sc-kpi:hover::before { opacity: 1; }
.sc-kpi::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: .22s;
  background: linear-gradient(165deg, rgba(76, 125, 255, .18), transparent 60%);
  pointer-events: none;
}
.sc-kpi::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c, var(--blue)), transparent); }
.sc-kpi .k-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sc-kpi .k-label { font-size: clamp(10px, .72vw, 13px); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-kpi .k-ic { flex: 0 0 auto; width: clamp(18px, 1.4vw, 25px); height: clamp(18px, 1.4vw, 25px); border-radius: 7px; display: grid; place-items: center; background: rgba(76, 125, 255, .16); color: var(--c, var(--blue)); }
.sc-kpi .k-ic svg { width: clamp(11px, .8vw, 15px); height: clamp(11px, .8vw, 15px); }
.sc-kpi .k-val { margin-top: clamp(4px, .7vh, 10px); font-family: 'Space Grotesk', sans-serif; font-size: clamp(19px, 1.78vw, 34px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.sc-kpi .k-val i { font-style: normal; font-size: clamp(9px, .68vw, 14px); color: var(--ink-2); margin-left: 4px; font-weight: 400; }
.sc-kpi .k-foot { margin-top: clamp(3px, .55vh, 8px); display: flex; align-items: center; gap: 7px; font-size: clamp(8.5px, .58vw, 11.5px); color: var(--dim); white-space: nowrap; overflow: hidden; }
.sc-kpi .k-delta { display: inline-flex; align-items: center; gap: 3px; color: var(--green); }
.sc-kpi .k-delta.down { color: var(--rose); }
.sc-kpi .k-delta svg { width: 9px; height: 9px; }

/* ---------- 主区 ---------- */
.sc-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.75fr) minmax(240px, 1fr); gap: clamp(8px, .7vw, 16px); min-height: 0; }
.sc-col { display: flex; flex-direction: column; gap: clamp(8px, .7vw, 16px); min-height: 0; }
.sc-panel {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #0E1730 0%, #0A1226 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.sc-panel::before { content: ''; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(130, 175, 255, .55), transparent); }
.sc-panel > .p-head { flex: 0 0 auto; height: clamp(28px, 3.1vh, 42px); display: flex; align-items: center; gap: 8px; padding: 0 clamp(8px, .75vw, 16px); }
.sc-panel > .p-head .p-bar { width: 3px; height: clamp(9px, .95vh, 14px); border-radius: 2px; background: linear-gradient(180deg, #7CA6FF, #3D6BFF); }
.sc-panel > .p-head h3 { font-size: clamp(11px, .82vw, 15px); font-weight: 600; letter-spacing: .07em; margin: 0; color: #DEEAFF; white-space: nowrap; }
.sc-panel > .p-head .p-tag { margin-left: auto; font-size: clamp(8.5px, .58vw, 11.5px); color: var(--dim); white-space: nowrap; }
.sc-panel > .p-body { flex: 1 1 auto; min-height: 0; padding: 0 clamp(8px, .7vw, 14px) clamp(6px, .9vh, 12px); position: relative; }
.sc-panel > .p-body.flush { padding: 0; }

/* 时间维度切换 */
.sc-segs { display: flex; gap: 4px; margin-left: auto; }
.sc-seg { padding: 2px clamp(5px, .5vw, 10px); border-radius: 6px; border: 1px solid var(--line); background: #10203E; color: #93A9D2; font-size: clamp(8.5px, .58vw, 11.5px); cursor: pointer; transition: .16s; white-space: nowrap; }
.sc-seg:hover { color: #fff; border-color: var(--line-2); }
.sc-seg.on { background: #1E3A78; border-color: #4C7DFF; color: #fff; }

/* 城市排行（地图旁） */
.sc-rank { display: flex; flex-direction: column; justify-content: space-evenly; height: 100%; padding: clamp(2px, .5vh, 8px) clamp(2px, .3vw, 6px); }
.sc-rank .rk {
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px;
  padding: clamp(2px, .5vh, 7px) clamp(4px, .5vw, 9px); border-radius: 7px; cursor: pointer; transition: .16s;
  border: 1px solid transparent;
}
.sc-rank .rk:hover, .sc-rank .rk.on { background: rgba(76, 125, 255, .14); border-color: rgba(76, 125, 255, .38); }
.sc-rank .rk i { font-style: normal; font-family: 'Space Grotesk', sans-serif; font-size: clamp(9px, .62vw, 12px); color: #6E86B4; text-align: center; }
.sc-rank .rk.on i { color: #F7B955; }
.sc-rank .rk .nm { font-size: clamp(10px, .7vw, 13px); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-rank .rk .vl { font-family: 'Space Grotesk', sans-serif; font-size: clamp(10px, .72vw, 13.5px); color: #fff; font-variant-numeric: tabular-nums; }

/* 地图 */
.sc-map { position: relative; width: 100%; height: 100%; min-height: 200px; }
.sc-map .map-canvas { position: absolute; inset: 0; }
.sc-map .map-veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 10, 22, .34), rgba(6, 10, 22, .14) 45%, rgba(6, 10, 22, .5)); }
.sc-map .map-tip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: 7px 11px; border-radius: 8px; background: rgba(8, 15, 32, .97); border: 1px solid var(--line-2);
  font-size: clamp(9.5px, .66vw, 12.5px); color: #E4EDFF; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transform: translate(-50%, -128%); opacity: 0; transition: opacity .15s;
}
.sc-map .map-tip.on { opacity: 1; }
.sc-map .map-tip b { color: #fff; font-size: clamp(10px, .7vw, 13px); }
.sc-map .map-tip .row { margin-top: 3px; color: #9FB6E0; }
.sc-map .map-tip .row span { color: #F7B955; font-family: 'Space Grotesk', sans-serif; }
.sc-map-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--dim); font-size: clamp(10px, .68vw, 13px); line-height: 1.8; }
.sc-map-fallback b { color: #F7B955; }

/* 环形 + 图例 */
.sc-hero { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(140px, .95fr); align-items: center; gap: 4px; height: 100%; padding: clamp(2px, .6vh, 10px) clamp(6px, .8vw, 16px) clamp(4px, .8vh, 12px); }
.sc-donut { position: relative; display: grid; place-items: center; }
.sc-donut svg { display: block; max-width: 100%; height: auto; }
.sc-donut circle { transition: opacity .2s; cursor: pointer; }
.sc-donut circle.dim { opacity: .16; }
.sc-donut .mid { position: absolute; text-align: center; }
.sc-donut .mid .n { font-family: 'Space Grotesk', sans-serif; font-size: clamp(18px, 1.9vw, 36px); font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-donut .mid .t { margin-top: 4px; font-size: clamp(8.5px, .58vw, 11.5px); color: var(--ink-2); letter-spacing: .16em; }
.sc-legend { display: flex; flex-direction: column; gap: clamp(5px, .9vh, 12px); }
.sc-legend .lg { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 6px; border-radius: 6px; transition: .16s; }
.sc-legend .lg:hover { background: rgba(76, 125, 255, .12); }
.sc-legend .lg.dim { opacity: .35; }
.sc-legend .lg i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.sc-legend .lg .nm { font-size: clamp(10px, .7vw, 13px); color: var(--ink-2); flex: 1; }
.sc-legend .lg .vl { font-family: 'Space Grotesk', sans-serif; font-size: clamp(11px, .82vw, 15px); color: #fff; font-variant-numeric: tabular-nums; }
.sc-legend .lg .pc { font-size: clamp(8.5px, .58vw, 11px); color: var(--dim); width: 38px; text-align: right; }

/* 行业条 */
.sc-hbars { display: flex; flex-direction: column; justify-content: space-around; height: 100%; padding: clamp(2px, .6vh, 10px) 2px; }
.sc-hbar { display: grid; grid-template-columns: clamp(52px, 5vw, 78px) 1fr clamp(40px, 3.6vw, 56px); align-items: center; gap: 9px; cursor: pointer; padding: 3px 5px; border-radius: 7px; transition: .16s; border: 1px solid transparent; }
.sc-hbar:hover { background: rgba(76, 125, 255, .1); }
.sc-hbar.on { background: rgba(76, 125, 255, .16); border-color: rgba(76, 125, 255, .4); }
.sc-hbar .nm { font-size: clamp(10px, .68vw, 13px); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-hbar.on .nm { color: #fff; }
.sc-hbar .track { display: block; height: clamp(5px, .6vh, 8px); border-radius: 4px; background: rgba(102, 146, 255, .12); overflow: hidden; }
.sc-hbar .fill { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.22, .68, 0, 1); }
.sc-hbar .vl { font-family: 'Space Grotesk', sans-serif; font-size: clamp(10px, .72vw, 13.5px); color: #DCE7FF; text-align: right; font-variant-numeric: tabular-nums; }

/* 代理商 */
.sc-agents { display: flex; flex-direction: column; gap: clamp(5px, .7vh, 11px); height: 100%; padding: clamp(2px, .6vh, 10px) 2px; }
.sc-agent {
  flex: 1; display: flex; align-items: center; gap: 11px; padding: 0 clamp(7px, .7vw, 14px);
  border-radius: 10px; cursor: pointer; transition: .18s;
  background: linear-gradient(90deg, rgba(76, 125, 255, .13), rgba(76, 125, 255, .03));
  border: 1px solid rgba(102, 146, 255, .16);
}
.sc-agent:hover { border-color: var(--c, var(--blue)); background: linear-gradient(90deg, rgba(76, 125, 255, .22), rgba(76, 125, 255, .06)); }
.sc-agent.on { border-color: var(--c, var(--blue)); box-shadow: inset 0 0 0 1px rgba(120, 165, 255, .3); }
.sc-agent .rk { width: clamp(18px, 1.4vw, 25px); height: clamp(18px, 1.4vw, 25px); border-radius: 6px; display: grid; place-items: center; font-family: 'Space Grotesk', sans-serif; font-size: clamp(9px, .62vw, 12px); font-weight: 700; color: #04101F; background: var(--c, var(--blue)); }
.sc-agent .info { flex: 1; min-width: 0; }
.sc-agent .info .n { display: block; font-size: clamp(10px, .74vw, 13.5px); font-weight: 600; color: #E4EDFF; }
.sc-agent .info .s { display: block; font-size: clamp(8.5px, .56vw, 11px); color: #8296BC; margin-top: 2px; }
.sc-agent .num { text-align: right; }
.sc-agent .num b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: clamp(13px, 1.15vw, 21px); font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.sc-agent .num span { display: block; font-size: clamp(8px, .55vw, 10.5px); color: #8296BC; margin-top: 1px; }

/* 底部播报 */
.sc-ticker { flex: 0 0 auto; height: clamp(28px, 4.2vh, 48px); display: flex; align-items: center; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(90deg, #14264C, #0A1226 45%); overflow: hidden; }
.sc-ticker .tag { flex: 0 0 auto; height: 100%; display: flex; align-items: center; gap: 7px; padding: 0 clamp(8px, .9vw, 18px); font-size: clamp(10px, .68vw, 12.5px); letter-spacing: .08em; color: #CFDDFF; background: rgba(76, 125, 255, .18); border-right: 1px solid var(--line); }
.sc-ticker .tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: sc-blink 1.8s infinite; }
.sc-ticker .rail { flex: 1; overflow: hidden; height: 100%; position: relative; }
.sc-ticker .rail .row { display: flex; align-items: center; height: 100%; gap: clamp(20px, 3vw, 52px); white-space: nowrap; will-change: transform; animation: sc-marquee 48s linear infinite; }
.sc-ticker .rail:hover .row { animation-play-state: paused; }
.sc-ticker .item { font-size: clamp(10px, .7vw, 13px); color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: .16s; }
.sc-ticker .item:hover { color: #fff; }
.sc-ticker .item b { color: #DCE7FF; font-weight: 500; }
.sc-ticker .item .t { color: #6E86B4; font-family: 'JetBrains Mono', monospace; font-size: clamp(9px, .6vw, 11px); }
@keyframes sc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sc-blink { 0%, 100% { opacity: 1; } 50% { opacity: .22; } }

/* 图表 */
.sc-chart { width: 100%; height: 100%; display: block; overflow: visible; }
.sc-chart text { font-family: 'JetBrains Mono', monospace; font-size: 10px; fill: #7A8FB4; }
.sc-chart .axis { stroke: rgba(120, 165, 255, .13); stroke-width: 1; }
.sc-chart .dot { fill: #0A1226; stroke-width: 2; }
.sc-chart .hit { fill: transparent; cursor: pointer; }
.sc-chart .hit:hover { fill: rgba(120, 165, 255, .1); }
.sc-chart .bar { cursor: pointer; transition: opacity .15s; }
.sc-chart .bar:hover { opacity: 1 !important; }

/* tooltip */
.sc-tip {
  position: fixed; z-index: 60; pointer-events: none;
  padding: 8px 12px; border-radius: 9px; background: rgba(8, 15, 32, .97);
  border: 1px solid var(--line-2); color: #E4EDFF;
  font-size: clamp(10px, .68vw, 13px); line-height: 1.65;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  opacity: 0; transform: translate(-50%, -118%); transition: opacity .13s;
}
.sc-tip.on { opacity: 1; }
.sc-tip b { font-family: 'Space Grotesk', sans-serif; }
.sc-tip .k { color: #9FB6E0; margin-right: 6px; }

/* 自动轮播指示 */
.sc-auto { display: inline-flex; align-items: center; gap: 5px; font-size: clamp(8.5px, .58vw, 11.5px); color: var(--dim); }
.sc-auto .d { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: sc-blink 1.4s infinite; }
.sc-auto.off .d { background: #55637F; animation: none; }

/* toast */
.sc-toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); background: #12203F; border: 1px solid var(--line-2); color: #DCE7FF; font-size: 13px; padding: 11px 20px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .26s; z-index: 120; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.sc-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 窄屏降级 */
@media (max-width: 1180px), (max-height: 560px) {
  .sc-page { position: static; min-height: 100vh; overflow: visible; }
  .sc-shell { height: auto; }
  .sc-kpis { grid-template-columns: repeat(2, 1fr); }
  .sc-main { grid-template-columns: 1fr; }
  .sc-panel { min-height: 300px; }
  .sc-map { min-height: 320px; }
  .sc-title::before, .sc-title::after { display: none; }
}
