/* ==========================================================================
   SHOW DOMO · 兰州轨道交通多媒体运营资管平台
   style.css — 浅色主题，轨道交通蓝 + 运营橙
   ========================================================================== */

:root {
  --bg: #f2f5f9;
  --bg-2: #e9eef5;
  --panel: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #8a97ab;
  --line: #e2e8f0;
  --line-2: #d3dbe6;

  --blue: #1668dc;
  --blue-d: #0d4fa8;
  --blue-l: #e8f1fd;
  --violet: #6d4aff;
  --teal: #0d9488;
  --teal-l: #e2f7f4;
  --amber: #e8963c;
  --amber-l: #fdf1e3;
  --rose: #d8484f;
  --rose-l: #fdecec;
  --green: #2f9e6f;
  --green-l: #e6f6ee;
  --slate: #5b7fb8;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow: 0 2px 4px rgba(16, 24, 40, .04), 0 8px 20px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
  --r: 12px;
  --r-sm: 8px;
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  height: 62px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #1668dc, #0b3f8f);
  color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.5px; box-shadow: 0 3px 10px rgba(22, 104, 220, .35);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px;
  background: #f5a623; border-radius: 2px;
}
.brand-txt b { display: block; font-size: 15px; letter-spacing: .3px; line-height: 1.2; }
.brand-txt span { font-size: 11px; color: var(--ink-3); letter-spacing: .2px; }

.topbar-nav { display: flex; gap: 4px; margin-left: 12px; }
.nav-btn {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); transition: .16s;
}
.nav-btn.on, .nav-btn:hover { background: var(--blue-l); color: var(--blue-d); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.role-box {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.rb-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rb-client { background: var(--amber-l); color: #b06a17; }
.rb-admin { background: var(--blue-l); color: var(--blue-d); }
.role-meta { line-height: 1.25; }
.role-meta b { display: block; font-size: 12.5px; }
.role-meta span { font-size: 11px; color: var(--ink-3); }
.role-switch {
  padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: var(--ink); color: #fff; transition: .16s;
}
.role-switch:hover { background: var(--blue-d); }
.switch-hint { font-weight: 400; opacity: .62; font-size: 11px; }

/* ---------------- 容器 ---------------- */
.wrap { max-width: 1560px; margin: 0 auto; padding: 22px 26px 60px; }
.view { display: block; }

/* ---------------- Hero ---------------- */
.hero {
  display: flex; align-items: center; gap: 30px;
  background: linear-gradient(120deg, #0d3f8f 0%, #1668dc 52%, #2f86e8 100%);
  color: #fff; border-radius: 16px; padding: 26px 32px;
  box-shadow: 0 10px 30px rgba(13, 63, 143, .22);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -80px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.13), transparent 68%);
}
.hero-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  opacity: .82; margin-bottom: 8px; text-transform: uppercase;
}
.hero h1 { font-size: 26px; letter-spacing: -.4px; }
.hero-sub { margin: 8px 0 0; font-size: 13px; opacity: .85; max-width: 720px; }
.hero-r { margin-left: auto; display: flex; gap: 34px; position: relative; z-index: 1; }
.hero-stat b { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.6px; }
.hero-stat span { font-size: 11.5px; opacity: .78; }

/* ---------------- KPI ---------------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; position: relative; box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.kpi-ic {
  position: absolute; right: 14px; top: 12px;
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.k-blue .kpi-ic { background: var(--blue-l); color: var(--blue); }
.k-violet .kpi-ic { background: #f0ebff; color: var(--violet); }
.k-teal .kpi-ic { background: var(--teal-l); color: var(--teal); }
.k-amber .kpi-ic { background: var(--amber-l); color: var(--amber); }
.k-rose .kpi-ic { background: var(--rose-l); color: var(--rose); }
.kpi-k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kpi-v { font-size: 27px; font-weight: 800; letter-spacing: -.6px; margin: 3px 0 2px; }
.kpi-v em { font-size: 12px; font-weight: 600; font-style: normal; color: var(--ink-3); margin-left: 3px; }
.kpi-s { font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 工具栏 ---------------- */
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.seg { display: inline-flex; background: var(--bg-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-btn {
  padding: 6px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); transition: .15s; white-space: nowrap;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: #fff; color: var(--blue-d); box-shadow: var(--shadow-sm); }
.seg.small .seg-btn { padding: 5px 10px; font-size: 12px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.search {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-2); border-radius: 9px; padding: 0 12px; height: 34px;
  border: 1px solid transparent; transition: .15s; min-width: 210px;
}
.search:focus-within { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.search span { color: var(--ink-3); font-size: 15px; }
.search input { border: none; background: none; outline: none; width: 100%; font-size: 13px; color: var(--ink); }
.search.sm { height: 30px; min-width: 0; }
.search.sm input { font-size: 12px; }
.legend-inline { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--ink-2); }
.legend-inline i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 4px; }

/* ---------------- 面板 ---------------- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  margin-bottom: 16px; overflow: hidden;
}
.panel-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.panel-hd h3 { font-size: 14px; }
.panel-hint { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

/* ---------------- 线网总览 ---------------- */
.lineboard { padding: 16px 18px 18px; overflow-x: auto; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.lb-tag {
  flex: 0 0 52px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800; color: #fff;
}
.lb-l1 { background: #1668dc; }
.lb-l2 { background: #d8484f; }
.lb-track {
  display: flex; align-items: center; gap: 0; position: relative;
  padding: 4px 0; flex: 1; min-width: max-content;
}
.lb-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 3px; background: var(--line-2); border-radius: 2px; z-index: 0;
}
.lb-node {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 4px 7px; min-width: 56px;
  border-radius: 8px; transition: .15s;
}
.lb-node:hover { background: var(--blue-l); }
.lb-dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: conic-gradient(var(--green) var(--w), var(--line-2) 0);
  border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px var(--line-2);
}
.lb-node.is-transfer .lb-dot { box-shadow: 0 0 0 2px var(--violet); }
.lb-name { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.lb-num { font-size: 9.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------------- 主体两栏 ---------------- */
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; }

/* ---------------- 站点卡片 ---------------- */
.station-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 13px; padding: 16px;
}
.station-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px; cursor: pointer; transition: .18s; position: relative;
  overflow: hidden;
}
.station-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue); opacity: 0; transition: .18s;
}
.station-card:hover {
  border-color: var(--blue); box-shadow: 0 6px 22px rgba(22, 104, 220, .13);
  transform: translateY(-2px);
}
.station-card:hover::before { opacity: 1; }
.station-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sc-hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.sc-title { min-width: 0; }
.sc-title h4 { font-size: 15px; margin-bottom: 5px; }
.sc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  background: var(--bg-2); color: var(--ink-2);
}
.tag-l1 { background: #e4eefc; color: #1257b8; }
.tag-l2 { background: #fce8e9; color: #b83b42; }
.tag-tr { background: #f0ebff; color: #5b3fd6; }
.sc-rate { margin-left: auto; text-align: right; flex-shrink: 0; }
.sc-rate b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.sc-rate span { font-size: 10px; color: var(--ink-3); }
.sc-rate.good b { color: var(--green); }
.sc-rate.mid b { color: var(--amber); }
.sc-rate.low b { color: var(--rose); }
.sc-bar { height: 5px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin-bottom: 11px; }
.sc-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2f9e6f, #46b98a); }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 9px; }
.sc-stats div { text-align: center; }
.sc-stats b { display: block; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-stats span { font-size: 10px; color: var(--ink-3); }
.c-rented { color: var(--green); }
.c-vacant { color: var(--amber); }
.sc-foot {
  display: flex; justify-content: space-between; font-size: 11px;
  color: var(--ink-3); padding: 8px 0; border-top: 1px dashed var(--line);
}
.sc-vac { color: var(--amber); font-weight: 600; }
.client-note { color: var(--ink-3); }
.sc-cta {
  margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--blue);
  display: flex; justify-content: space-between; align-items: center;
}
.sc-cta span { transition: .18s; }
.station-card:hover .sc-cta span { transform: translateX(4px); }

/* ---------------- 侧栏图表 ---------------- */
.mini-chart { padding: 14px 18px 16px; }
.tchart { display: flex; flex-direction: column; gap: 8px; }
.tc-row { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 9px; font-size: 11.5px; }
.tc-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-bar { position: relative; height: 15px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.tc-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #3b82f6; border-radius: 4px; }
.tc-bar b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); opacity: .92; border-radius: 4px 0 0 4px; }
.tc-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.chart-legend { display: flex; gap: 14px; margin-top: 11px; font-size: 11px; color: var(--ink-3); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }

.expire-list, .vacant-list { padding: 8px 14px 14px; }
.exp-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px;
  border-radius: 8px; cursor: pointer; transition: .15s;
}
.exp-row:hover { background: var(--bg); }
.exp-main { min-width: 0; flex: 1; }
.exp-main b { display: block; font-size: 12.5px; }
.exp-main span { font-size: 11px; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-d { text-align: right; flex-shrink: 0; }
.exp-d b { display: block; font-size: 15px; font-weight: 800; }
.exp-d span { font-size: 9.5px; color: var(--ink-3); }
.exp-d.crit b { color: var(--rose); }
.exp-d.warn b { color: var(--amber); }
.exp-d.norm b { color: var(--ink-2); }

.vl-row { display: grid; grid-template-columns: 80px 1fr 48px; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; cursor: pointer; font-size: 11.5px; }
.vl-row:hover { background: var(--bg); }
.vl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.vl-bar { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.vl-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), #f0b571); border-radius: 3px; }
.vl-val { text-align: right; font-weight: 700; color: var(--amber); font-size: 11px; }

.lock-panel { padding: 26px 22px; text-align: center; }
.lock-ic { font-size: 26px; margin-bottom: 8px; }
.lock-panel h4 { font-size: 14px; margin-bottom: 7px; }
.lock-panel p { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin: 0 0 14px; }
.lock-panel p b { color: var(--ink-2); }
.empty { padding: 26px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  padding: 8px 16px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: var(--bg-2); color: var(--ink); transition: .15s;
  border: 1px solid transparent;
}
.btn:hover { background: var(--line-2); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(22, 104, 220, .28); }
.btn-primary:hover { background: var(--blue-d); }
.btn-accent { background: var(--amber); color: #fff; box-shadow: 0 2px 8px rgba(232, 150, 60, .3); }
.btn-accent:hover { background: #d4822c; }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }

/* ==========================================================================
   站点详情页
   ========================================================================== */
.st-hero {
  background: linear-gradient(120deg, #0d3f8f, #1a6fd8);
  color: #fff; border-radius: 16px; padding: 20px 26px;
  display: flex; align-items: center; gap: 24px; margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(13, 63, 143, .2); position: relative; overflow: hidden;
}
.st-hero::after {
  content: ''; position: absolute; right: -40px; bottom: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.back-btn {
  color: #fff; font-size: 12.5px; font-weight: 600; opacity: .9;
  padding: 7px 13px; border-radius: 8px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2); transition: .15s; flex-shrink: 0;
}
.back-btn:hover { background: rgba(255,255,255,.24); opacity: 1; }
.st-hero-main { min-width: 0; }
.st-h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-h1 h1 { font-size: 23px; }
.st-hero .tag { background: rgba(255,255,255,.2); color: #fff; }
.st-hero .tag-tr { background: rgba(180,150,255,.42); }
.st-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; opacity: .84; margin-top: 7px; }
.st-hero-kpi { margin-left: auto; display: flex; gap: 26px; position: relative; z-index: 1; }
.st-hero-kpi div { text-align: right; }
.st-hero-kpi b { display: block; font-size: 19px; font-weight: 800; }
.st-hero-kpi span { font-size: 10.5px; opacity: .76; }

/* ---------------- VR 布局 ---------------- */
.vr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }

.vr-main {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden;
}
.vr-toolbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.vr-scene-tabs { display: flex; gap: 4px; }
.vt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); transition: .15s;
}
.vt i { font-style: normal; opacity: .65; }
.vt:hover { background: var(--bg); }
.vt.on { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(22,104,220,.25); }
.vt.on i { opacity: 1; }
.vr-tools { margin-left: auto; display: flex; gap: 6px; }
.vtool {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 7px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: var(--bg); transition: .15s;
}
.vtool:hover { background: var(--line); }
.vtool.on { background: var(--blue-l); color: var(--blue-d); }
.vtool span { font-size: 13px; }

.vr-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #101828; overflow: hidden;
}
.vr-stage:fullscreen { aspect-ratio: auto; height: 100vh; }
#vrCanvas { width: 100%; height: 100%; display: block; }
.vr-overlay-vr {
  position: absolute; left: 14px; top: 13px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 16, 28, .68); backdrop-filter: blur(8px);
  color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; pointer-events: none;
}
.rec-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f;
  box-shadow: 0 0 0 0 rgba(255, 77, 79, .6); animation: rec 2s infinite;
}
@keyframes rec {
  0% { box-shadow: 0 0 0 0 rgba(255,77,79,.55); }
  70% { box-shadow: 0 0 0 7px rgba(255,77,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); }
}
.vr-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(10, 16, 28, .66); backdrop-filter: blur(8px);
  color: rgba(255,255,255,.9); font-size: 11.5px;
  padding: 6px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
.vr-compass {
  position: absolute; right: 14px; top: 13px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 16, 28, .6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 800; pointer-events: none;
}
.vr-compass::before {
  content: ''; position: absolute; top: 3px;
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 7px solid #f5a623;
  transform: rotate(var(--rot, 0deg)); transform-origin: 50% 18px;
}
.vr-compass span { transform: rotate(var(--rot, 0deg)); display: inline-block; }
.vr-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #101828; color: #fff; font-size: 13px; transition: opacity .4s;
}
.vr-legend {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2);
}
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.lg-rented { background: #2f9e6f; }
.lg-vacant { background: #e8963c; }
.lg-expiring { background: #d8484f; }
.lg-self { background: #5b7fb8; }
.vr-tip { margin-left: auto; color: var(--ink-3); }

/* ---------------- 侧栏展位列表 ---------------- */
.vr-side {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 130px); position: sticky; top: 78px;
}
.side-hd { display: flex; align-items: center; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.side-hd h3 { font-size: 14px; }
.side-count { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.side-filter { padding: 10px 14px; display: flex; gap: 8px; flex-direction: column; border-bottom: 1px solid var(--line); }
.media-list { overflow-y: auto; flex: 1; padding: 8px; }
.mrow {
  display: grid; grid-template-columns: 8px 1fr auto auto; align-items: center; gap: 9px;
  width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px;
  transition: .14s; border: 1px solid transparent;
}
.mrow:hover { background: var(--bg); }
.mrow.sel { background: var(--blue-l); border-color: var(--blue); }
.mrow-dot { width: 8px; height: 8px; border-radius: 50%; }
.mrow-main { min-width: 0; }
.mrow-main b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-main span { font-size: 10.5px; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-size { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow-quote { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.mrow-quote em { font-style: normal; font-size: 9.5px; color: var(--ink-3); font-weight: 500; }

/* ---------------- 详情面板 ---------------- */
.detail-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  margin-top: 16px; padding: 20px 22px; min-height: 96px;
}
.dp-empty { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 22px 0; }
.dp-hd { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.dp-thumb {
  width: 76px; height: 94px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); flex-shrink: 0; background: var(--bg-2);
}
.dp-thumb canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.dp-titles { min-width: 0; flex: 1; }
.dp-tagline { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); margin-bottom: 4px; }
.dp-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); font-size: 11px; }
.dp-titles h3 { font-size: 17px; }
.dp-titles p { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); }
.dp-close {
  width: 28px; height: 28px; border-radius: 7px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); cursor: pointer; transition: .15s; flex-shrink: 0;
}
.dp-close:hover { background: var(--rose-l); color: var(--rose); }

.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.dp-cell {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px;
}
.dp-cell label { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 3px; }
.dp-cell b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.dp-cell b em { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.dp-cell span { font-size: 10.5px; color: var(--ink-3); }
.dp-quote { background: linear-gradient(135deg, #fff8ec, #fff); border-color: #f3ddb8; }
.dp-quote b { color: #b06a17; }
.dp-locked { background: repeating-linear-gradient(45deg, #f7f9fb, #f7f9fb 8px, #f1f4f8 8px, #f1f4f8 16px); }
.c-mask { color: var(--ink-3) !important; letter-spacing: 2px !important; }
.dp-tenant { font-size: 13px !important; }
.dp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px !important; }
.c-danger { color: var(--rose); }
.dp-ops { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.dp-note {
  margin-top: 12px; font-size: 11.5px; color: var(--ink-3);
  background: var(--amber-l); border-left: 3px solid var(--amber);
  padding: 9px 13px; border-radius: 0 8px 8px 0; line-height: 1.65;
}

/* ---------------- 弹窗 / Toast ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(16, 24, 40, .5); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal.on { display: flex; }
.modal-card {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  max-width: 560px; width: 100%; max-height: 86vh; overflow: auto;
  animation: rise .22s cubic-bezier(.2,.9,.3,1);
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-hd { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-hd h3 { font-size: 15px; }
.modal-x { margin-left: auto; cursor: pointer; color: var(--ink-3); font-size: 15px; }
.modal-x:hover { color: var(--rose); }
.contract-body { padding: 18px 20px; }
.ct-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 0;
  border-bottom: 1px dashed var(--line); font-size: 12.5px;
}
.ct-row span { color: var(--ink-3); flex-shrink: 0; }
.ct-row b { text-align: right; font-weight: 600; }
.ct-terms { margin-top: 14px; font-size: 11px; color: var(--ink-3); background: var(--bg); padding: 10px 12px; border-radius: 8px; }
.modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); text-align: right; }

#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 18px);
  background: rgba(16, 24, 40, .94); color: #fff;
  padding: 11px 22px; border-radius: 10px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: .26s; z-index: 200; max-width: 80vw; text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 移动端底部标签栏 ---------------- */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 7px 0 6px; color: var(--ink-3);
  font-size: 10.5px; font-weight: 600; transition: .15s;
}
.tab svg { width: 21px; height: 21px; fill: currentColor; }
.tab.on { color: var(--blue); }
.tab:active { opacity: .6; }

/* ==========================================================================
   响应式 —— 平板 / 桌面
   ========================================================================== */
@media (max-width: 1280px) {
  .dash-main { grid-template-columns: 1fr; }
  .vr-layout { grid-template-columns: 1fr; }
  .vr-side { position: static; max-height: 560px; }
  .dash-right { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
  .dash-right .panel { margin-bottom: 0; }
}

/* ==========================================================================
   移动端 —— 手机优先（≤ 860px）
   ========================================================================== */
@media (max-width: 860px) {
  body { font-size: 13.5px; }

  /* --- 顶栏：压缩为单行，权限切换改为图标按钮 --- */
  .topbar {
    padding: 0 12px; height: 54px; gap: 10px;
    position: sticky; top: 0;
  }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; font-size: 11px; }
  .brand-txt, .topbar-nav { display: none; }
  .topbar-right { gap: 6px; min-width: 0; }
  .role-box {
    padding: 4px 5px 4px 8px; gap: 6px; border-radius: 8px;
    flex-shrink: 0;
  }
  .role-badge { padding: 3px 7px; font-size: 10.5px; white-space: nowrap; }
  .role-meta { display: none; }
  .role-switch {
    padding: 7px 9px; font-size: 11px; border-radius: 7px;
    max-width: 96px; line-height: 1.25; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; flex-shrink: 1;
  }
  .role-switch .switch-hint { display: none; }

  .wrap { padding: 12px 11px 76px; }

  /* --- 底部标签栏 --- */
  .tabbar { display: flex; }
  .tab { display: flex; }

  /* --- Hero --- */
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 18px; border-radius: 14px; }
  .hero-tag { font-size: 9.5px; letter-spacing: 1.4px; }
  .hero h1 { font-size: 19px; line-height: 1.35; }
  .hero-sub { font-size: 11.5px; margin-top: 6px; }
  .hero-r { margin-left: 0; gap: 0; width: 100%; justify-content: space-between; }
  .hero-stat b { font-size: 20px; }
  .hero-stat span { font-size: 10px; }

  /* --- KPI 横向滑动卡片 --- */
  .kpi-row {
    display: flex; overflow-x: auto; gap: 10px;
    margin: 12px -11px 14px; padding: 0 11px 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .kpi-row::-webkit-scrollbar { display: none; }
  .kpi {
    flex: 0 0 168px; scroll-snap-align: start;
    padding: 13px 14px;
  }
  .kpi-ic { width: 28px; height: 28px; font-size: 13px; right: 11px; top: 10px; }
  .kpi-v { font-size: 21px; }
  .kpi-s { font-size: 10px; }

  /* --- 工具栏 --- */
  .toolbar { padding: 9px 11px; gap: 8px; border-radius: 12px; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .toolbar .seg::-webkit-scrollbar { display: none; }
  .seg-btn { padding: 6px 11px; font-size: 12px; }
  .tb-right { margin-left: 0; width: 100%; gap: 10px; }
  .search { min-width: 0; flex: 1; height: 32px; }
  .legend-inline { display: none; }

  /* --- 线网 --- */
  .lineboard { padding: 12px 12px 14px; }
  .lb-row { gap: 8px; }
  .lb-tag { flex: 0 0 42px; height: 21px; font-size: 10.5px; }
  .lb-node { min-width: 48px; padding: 4px 5px; }
  .lb-dot { width: 13px; height: 13px; }
  .lb-name { font-size: 9.5px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
  .lb-num { font-size: 8.5px; }

  /* --- 面板 --- */
  .panel-hd { padding: 11px 13px; }
  .panel-hd h3 { font-size: 13.5px; }
  .station-grid { grid-template-columns: 1fr; gap: 10px; padding: 11px; }
  .sc-title h4 { font-size: 14.5px; }
  .sc-rate b { font-size: 17px; }
  .sc-stats b { font-size: 13.5px; }
  .sc-stats span { font-size: 9.5px; }

  .dash-right { grid-template-columns: 1fr; }
  .mini-chart { padding: 12px 13px 14px; }
  .tc-row { grid-template-columns: 68px 1fr 30px; font-size: 11px; }

  /* --- 站点详情头部 --- */
  .st-hero { flex-direction: column; align-items: flex-start; gap: 13px; padding: 15px 16px; border-radius: 14px; }
  .st-h1 h1 { font-size: 19px; }
  .st-meta { gap: 10px 14px; font-size: 11px; }
  .st-hero-kpi { margin-left: 0; width: 100%; gap: 0; justify-content: space-between; }
  .st-hero-kpi div { text-align: left; }
  .st-hero-kpi b { font-size: 15px; }

  /* --- VR 视口：手机竖屏用更高画幅 --- */
  .vr-toolbar { padding: 8px 10px; gap: 8px; }
  .vr-scene-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .vr-scene-tabs::-webkit-scrollbar { display: none; }
  .vt { padding: 7px 11px; font-size: 12px; white-space: nowrap; }
  .vr-tools { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .vr-tools::-webkit-scrollbar { display: none; }
  .vtool { padding: 6px 9px; font-size: 11.5px; white-space: nowrap; }
  .vtool span { font-size: 12px; }

  .vr-stage { aspect-ratio: 4 / 3; }
  .vr-overlay-vr { left: 9px; top: 9px; font-size: 10px; padding: 5px 9px; }
  .vr-compass { width: 34px; height: 34px; right: 9px; top: 9px; font-size: 9.5px; }
  .vr-compass::before { transform-origin: 50% 14px; }
  .vr-hint { font-size: 10px; padding: 5px 10px; bottom: 9px; max-width: 92%; white-space: normal; text-align: center; }
  .vr-legend { padding: 8px 11px; gap: 10px 14px; font-size: 10.5px; }
  .vr-tip { margin-left: 0; width: 100%; }

  /* --- 展位列表：手机端折叠为紧凑面板 --- */
  .vr-side { max-height: none; border-radius: 12px; }
  .side-hd { padding: 11px 13px 8px; }
  .side-filter { padding: 8px 11px; gap: 7px; }
  .media-list { max-height: 340px; padding: 6px; }
  .mrow { padding: 10px 9px; grid-template-columns: 8px 1fr auto; row-gap: 2px; }
  .mrow-size { display: none; }
  .mrow-quote { font-size: 12.5px; }
  .mrow-main b { font-size: 12.5px; }

  /* --- 展位详情 --- */
  .detail-panel { padding: 15px 14px; border-radius: 12px; margin-top: 12px; }
  .dp-hd { gap: 11px; margin-bottom: 13px; }
  .dp-thumb { width: 58px; height: 72px; }
  .dp-titles h3 { font-size: 15px; }
  .dp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dp-cell { padding: 9px 10px; }
  .dp-cell b { font-size: 13px; }
  .dp-cell label { font-size: 10px; }
  .dp-cell span { font-size: 9.5px; }
  .dp-ops { gap: 7px; }
  .dp-ops .btn { flex: 1 1 auto; text-align: center; padding: 9px 10px; font-size: 12px; }

  /* --- 弹窗 --- */
  .modal { padding: 14px; }
  .contract-body { padding: 14px 15px; }
  .ct-row { flex-direction: column; gap: 2px; }
  .ct-row b { text-align: left; }

  #toast { bottom: 20px; font-size: 12px; padding: 10px 16px; max-width: 88vw; }
}

/* 超小屏 */
@media (max-width: 400px) {
  .hero h1 { font-size: 17px; }
  .kpi { flex: 0 0 152px; }
  .dp-grid { grid-template-columns: 1fr; }
  .vr-stage { aspect-ratio: 1 / 1; }
}

/* 触屏设备：去掉 hover 位移，避免点击时误触 */
@media (hover: none) {
  .station-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .station-card:hover::before { opacity: 0; }
  .sc-cta span { transform: none; }
}
