/* 全国铁路态势与动态 — 全局样式（本地化，无外部资源） */
:root {
  --bg: #061a30;
  --panel: #0b2a47;
  --panel2: #08213a;
  --line: rgba(77, 151, 255, .28);
  --txt: #e8f2ff;
  --sub: #a8c6e8;
  --green: #2ecc71;
  --gold: #ffd166;
  --red: #e74c3c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #0d3a66 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--txt);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 1420px; margin: 0 auto; padding: 12px 18px 30px; }

/* ===== 顶栏 ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .logo { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: linear-gradient(135deg, #2ecc71, #4d97ff); box-shadow: 0 4px 14px rgba(46, 204, 113, .35); }
.topbar h1 { font-size: 22px; letter-spacing: 3px; background: linear-gradient(90deg, #fff, #9cc8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar .sub { font-size: 11px; color: var(--sub); letter-spacing: 4px; margin-top: 2px; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--sub); }
.topbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
#clock { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 600; letter-spacing: 1px; }

/* ===== KPI 卡片 ===== */
#kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--green), transparent); opacity: .7; }
.kpi-icon { font-size: 28px; }
.kpi-val { display: flex; align-items: baseline; gap: 5px; }
.kpi-num { font-size: 26px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(77, 151, 255, .55); }
.kpi-unit { font-size: 11px; color: var(--sub); }
.kpi-label { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* ===== 面板 ===== */
.panel { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head .t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.panel-head .t::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, var(--green), #4d97ff); }
.panel-head .more { font-size: 11px; color: var(--sub); }
.panel-body { padding: 12px 16px; }
.grid2 { display: grid; grid-template-columns: 1.9fr 1fr; gap: 14px; }
.grid2 .panel { margin-bottom: 0; }

/* ===== 地图 ===== */
#map-svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
#map-legend { display: flex; justify-content: flex-end; padding: 0 10px 6px; }
.tag { cursor: pointer; }

/* ===== 表格 ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { color: var(--sub); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px dashed rgba(77, 151, 255, .14); white-space: nowrap; }
.tbl tbody tr { transition: background .2s; cursor: default; }
.tbl tbody tr:hover { background: rgba(77, 151, 255, .08); }
.rkg { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; font-weight: 700; font-size: 12px; background: rgba(77, 151, 255, .15); color: #9cc8ff; }
.rkg.r1 { background: linear-gradient(135deg, #f9d976, #f39c12); color: #3d2800; }
.rkg.r2 { background: linear-gradient(135deg, #d8d8d8, #95a5a6); color: #26333d; }
.rkg.r3 { background: linear-gradient(135deg, #f0b27a, #b06a3b); color: #3d1f00; }
.rkg.rkg-top { background: linear-gradient(135deg, #a8e6a1, #2ecc71); color: #0a2b12; }
.flowbar { width: 110px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); display: inline-block; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.flowbar i { display: block; height: 100%; border-radius: 3px; }
.tag { background: rgba(77, 151, 255, .10); color: #9cc8ff; border: 1px solid rgba(77, 151, 255, .35); border-radius: 999px; padding: 3px 12px; font-size: 11px; margin: 0 6px 6px 0; transition: all .2s; }
.tag:hover { background: rgba(77, 151, 255, .2); }
.tag.on { background: rgba(46, 204, 113, .18); border-color: var(--green); color: #b8f2d0; }

/* ===== 技术图谱与供应商 ===== */
.tech-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.tech-grid .panel { margin-bottom: 0; }
#tech-svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.vname { font-weight: 600; color: #fff; }
.vfield { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(46, 204, 113, .12); color: #b8f2d0; border: 1px solid rgba(46, 204, 113, .4); }
.vbar { width: 150px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-bottom: 4px; }
.vbar i { display: block; height: 100%; width: 0; transition: width .8s cubic-bezier(.22, 1, .36, 1); }
.vshare { font-size: 11px; color: var(--sub); }
.vnote { color: var(--sub); font-size: 11.5px; }

/* ===== 行情播报 ===== */
.ticker-wrap { overflow: hidden; border-top: 1px solid var(--line); background: rgba(8, 33, 58, .92); position: sticky; bottom: 0; z-index: 5; }
.ticker-label { position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; padding: 0 14px; background: linear-gradient(90deg, #0b2a47 60%, rgba(11, 42, 71, 0)); font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 2px; }
#ticker { display: inline-flex; white-space: nowrap; padding: 9px 0 9px 110px; will-change: transform; }
.tk-item { font-size: 12.5px; color: #cde4ff; margin-right: 8px; }
.tk-item em { font-style: normal; color: var(--green); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(77, 151, 255, .3); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  #kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .tech-grid { grid-template-columns: 1fr; }
}