:root {
  --blue: #1552d8;
  --blue-deep: #0c2a63;
  --blue-soft: #eaf1ff;
  --cyan: #2ba8ff;
  --gold: #f2b90d;
  --gold-deep: #805400;
  --ink: #0f2a5c;
  --muted: #4e648a;
  --line: rgba(21, 82, 216, .18);
  --panel: rgba(255, 255, 255, .84);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: #eef3fb; color: var(--ink); overflow: hidden; }
.backdrop {
  position: fixed; inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0) 74%, rgba(255,255,255,.86) 86%, #ffffff 93%),
    #fff url('../assets/universe-bg.webp') center/cover no-repeat;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0) 74%, rgba(255,255,255,.86) 86%, #ffffff 93%),
    url('../assets/universe-bg-2x.webp');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-color: #fff;
}

/* 流光：沿标题外框与两侧线路游走的光点 / 光段 */
.ambient { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.amb-frame-halo {
  fill: none; stroke: #59b8ff; stroke-width: 5; opacity: .3;
  filter: url(#amb-blur-lg);
  animation: frameBreath 5.6s ease-in-out infinite;
}
.amb-frame-halo-soft { stroke: #ffd75e; stroke-width: 2.4; opacity: .2; animation-delay: -2.4s; }
@keyframes frameBreath { 0%,100% { opacity: .16; } 50% { opacity: .42; } }
.amb-frame-run {
  fill: none; stroke: url(#amb-spark); stroke-width: 2.6; stroke-linecap: round;
  filter: url(#amb-blur-sm);
  stroke-dasharray: 96 1852;
  animation: frameRun 12s linear infinite;
}
.amb-frame-run-lg { stroke-width: 7; opacity: .55; filter: url(#amb-blur-lg); stroke-dasharray: 130 1818; animation-duration: 12s; }
@keyframes frameRun { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1948; } }
.amb-halo { fill: #8fd0ff; opacity: .5; filter: url(#amb-blur-lg); }
.amb-glow { fill: #d6eeff; opacity: .8; filter: url(#amb-blur-sm); }
.amb-core { fill: #ffffff; }
.gold .amb-halo { fill: #ffd75e; }
.gold .amb-glow { fill: #ffe9a3; }
.gold .amb-core { fill: #fff8dd; }
.amb-rail {
  fill: none; stroke: #63bfff; stroke-width: 2; stroke-linecap: round;
  opacity: .22; filter: url(#amb-blur-sm);
}
.amb-rail-dim { stroke: #8bb8ff; stroke-width: 1.6; opacity: .14; }
.amb-rail-run {
  fill: none; stroke: url(#amb-spark); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 96 406; opacity: .5; filter: url(#amb-blur-sm);
  animation: railRun 6.4s linear infinite;
}
.amb-rail-run.alt { animation-delay: -3.2s; }
.amb-rail-run-sm { stroke-dasharray: 66 210; stroke-width: 2.2; opacity: .34; animation-duration: 4.6s; }
@keyframes railRun { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -502; } }
.amb-rail-run-sm { animation-name: railRunSm; }
@keyframes railRunSm { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -276; } }
@media (prefers-reduced-motion: reduce) {
  .ambient, .amb-mover { display: none; }
}
.scan { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(21,82,216,.022) 0 1px, transparent 1px 4px); mix-blend-mode: multiply; }

/* ---------- 1920x1080 stage, safe area keeps clear of background lines ---------- */
.stage-wrap { position: fixed; inset: 0; }
.stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  margin: -540px 0 0 -960px; transform: scale(var(--s, 1)); transform-origin: center center;
  display: grid; grid-template-rows: 96px 60px 1fr;
  padding: 10px 119px 8px; gap: 10px;
}
.kicker { margin: 0; font-size: 14px; letter-spacing: 3px; color: #3f6db3; font-weight: 600; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 28px; font-weight: 750; letter-spacing: .3px; }

/* header */
.hud-head { position: relative; height: 96px; }
.hud-left { position: absolute; left: 0; top: 28px; display: flex; flex-direction: column; gap: 6px; }
.project-days { font-size: 21px; font-weight: 700; letter-spacing: .4px; color: #23477f; white-space: nowrap; }
.project-days b { font: 800 30px/1 "Inter", "DIN Alternate", Arial, sans-serif; letter-spacing: -.5px; color: #0c2a63; margin: 0 3px; }
.hud-center { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hud-center h1 {
  font-size: 54px; letter-spacing: 8px; font-weight: 800; line-height: 1.08; color: #08225a;
  text-shadow: 0 0 28px rgba(43,168,255,.28), 0 2px 0 rgba(255,255,255,.9);
  text-indent: 8px;
}
.hud-center .kicker { margin-top: 9px; font-size: 12px; letter-spacing: 4px; color: #3f6db3; }
.hud-right { position: absolute; right: 0; top: 2px; display: flex; align-items: flex-start; gap: 10px; }
.tools { display: flex; gap: 10px; order: 1; }
.tools button {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  border: 1px solid rgba(21,82,216,.22); background: rgba(255,255,255,.85); color: #1444c0; font-size: 19px;
  box-shadow: 0 8px 18px rgba(12,42,99,.08);
}
.tools button:hover { border-color: rgba(43,168,255,.6); box-shadow: 0 0 0 4px rgba(43,168,255,.12); }
.tools svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.tools .icon-play { fill: currentColor; stroke: none; }
.tools .icon-pause { display: none; }
.tools button[aria-pressed="true"] { background: linear-gradient(135deg, #2a68e6, #1444c0); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(21,82,216,.28); }
.tools button[aria-pressed="true"] .icon-play { display: none; }
.tools button[aria-pressed="true"] .icon-pause { display: block; }
.clock { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.clock time { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .6px; font-size: 17px; font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(43,168,255,.16), 0 0 12px var(--cyan); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(43,168,255,.03), 0 0 18px var(--cyan); } }
.control-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 0; }
.control-meta { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 600; color: #3c5379; min-width: 0; }
.control-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-meta #source-status { font-size: 15px; font-weight: 600; color: #4b6b9c; }
.control-tail { display: flex; justify-content: flex-end; align-items: center; }
.control-lead { min-height: 0; }
.range { display: flex; gap: 4px; padding: 5px; border: 1px solid rgba(21,82,216,.2); border-radius: 14px; background: rgba(255,255,255,.85); box-shadow: 0 10px 26px rgba(12,42,99,.08); }
.range button { min-height: 48px; padding: 8px 26px; border: 0; border-radius: 10px; background: transparent; color: #41557a; font-size: 19px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.range button.active { background: linear-gradient(135deg, #2a68e6, #1444c0); color: #fff; box-shadow: 0 10px 22px rgba(21,82,216,.3); }

/* status */
.error-banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 16px; border: 1px solid #e0a99f; border-radius: 10px; background: #fff2ef; color: #9c2a1d; font-size: 14px; position: absolute; left: 133px; right: 133px; top: 180px; z-index: 9; }

/* views: every page fills one 1080p screen inside the safe area */
.views { position: relative; min-height: 0; padding-bottom: 92px; }
.view { display: none; height: 100%; min-height: 0; }
.view.active { display: grid; grid-template-rows: 1fr; gap: 14px; }
.view[data-view="overview"] { grid-template-rows: 372px 1fr; }
.view[data-view="consume"] > .grid, .view[data-view="dividend"] > .grid, .view[data-view="operation"] > .grid { height: 100%; }
.view[data-view="consume"] > .grid { grid-template-rows: 1.05fr 0.95fr; }
.view[data-view="dividend"] > .grid { grid-template-rows: 0.95fr 1.05fr; }
.view[data-view="operation"] > .grid { grid-template-rows: 1fr 1fr; }
.view[data-view="withdraw"] > .grid { grid-template-rows: 214px 1fr; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; min-height: 0; height: 100%; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

/* kpi */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 16px; min-height: 0; }
.kpi {
  position: relative; padding: 18px 24px 14px; border-radius: 15px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, rgba(255,255,255,.97), rgba(238,244,255,.92));
  border: 1px solid rgba(21,82,216,.16); box-shadow: 0 16px 40px rgba(12,42,99,.09), inset 0 1px 0 #fff;
}
.kpi:before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, transparent, #2ba8ff, transparent); opacity: .85; }
.kpi.gold:before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.kpi.hero { background: linear-gradient(150deg, #1a5ae0, #0d3aa8 62%, #0b2f8c); border-color: rgba(255,255,255,.3); }
.kpi.hero:before { background: linear-gradient(90deg, transparent, #fff, transparent); }
.kpi .label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 25px; font-weight: 750; line-height: 1.2; color: #3c5379; }
.kpi .label-note { margin-left: 8px; font-size: 17px; font-weight: 600; letter-spacing: 0; color: #6b83a8; white-space: nowrap; }
.kpi.hero .label { color: rgba(255,255,255,.88); }
.kpi .code { font-size: 13px; letter-spacing: 1px; color: #91a7c8; }
.kpi.hero .code { color: rgba(255,255,255,.55); }
.kpi .value { margin: 10px 0 8px; font: 700 60px/1.02 "Inter", "DIN Alternate", Arial, sans-serif; letter-spacing: -1px; color: #0a2a63; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi.hero .value { color: #fff; text-shadow: 0 0 24px rgba(120,190,255,.5); }
.kpi.gold .value { color: #7f5400; }
.kpi .meta { display: flex; gap: 10px; font-size: 17px; color: #5a7299; }
.kpi.hero .meta { color: rgba(255,255,255,.78); }
.kpi .delta { color: #1452c8; font-weight: 700; }
.kpi .delta.neg { color: #a5610a; }
.kpi.hero .delta { color: #d8ffe8; }

/* panels */
.panel {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  padding: 20px 22px 18px; border-radius: 16px; background: var(--panel);
  border: 1px solid rgba(21,82,216,.16);
  box-shadow: 0 18px 46px rgba(12,42,99,.09), inset 0 0 0 1px rgba(255,255,255,.65);
  backdrop-filter: blur(8px); overflow: hidden;
}
.panel:before, .panel:after { content: ''; position: absolute; width: 18px; height: 18px; border-color: rgba(43,168,255,.65); border-style: solid; }
.panel:before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.panel:after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; flex: none; }
.tag { font-size: 15px; color: #3f6db3; background: rgba(21,82,216,.06); border: 1px solid rgba(21,82,216,.14); padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
.chart { width: 100%; flex: 1; min-height: 0; }

/* basis card */
.basis { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; padding-top: 4px; overflow: auto; }
.basis .base-amount { font: 700 40px/1.05 "Inter", Arial, sans-serif; color: #0a2a63; letter-spacing: -1px; }
.basis .rate { font-size: 19px; font-weight: 700; color: var(--blue); }
.basis .rate small { font-weight: 500; color: var(--muted); font-size: 16px; }
.basis .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.basis .chips span { font-size: 15px; color: #334c76; background: #f3f7ff; border: 1px solid rgba(21,82,216,.14); border-radius: 6px; padding: 6px 10px; }
.basis .chips span.gold { background: #fff7e3; border-color: #eed79a; color: #7b5400; }
.basis .formula { font-size: 14px; line-height: 1.75; color: var(--muted); }
.basis .ops { display: flex; flex-wrap: wrap; gap: 7px; font-size: 15px; color: #6a5620; }
.basis .ops b { font-weight: 600; color: #7b5400; background: #fff7e3; border: 1px solid #eed79a; border-radius: 6px; padding: 5px 9px; }

/* settlement & lists */
.settle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; flex: 1; min-height: 0; overflow: auto; }
.settle .cell { padding: 12px 14px; border-radius: 11px; background: rgba(238,244,255,.75); border: 1px solid rgba(21,82,216,.12); }
.settle .cell span { display: block; font-size: 15px; color: var(--muted); }
.settle .cell b { display: block; margin-top: 6px; font: 700 28px "Inter", Arial, sans-serif; color: #0a2a63; }
.settle .note { grid-column: 1/-1; font-size: 14px; color: var(--muted); line-height: 1.8; }
.settle.compact { grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.settle.compact .cell b { font-size: 25px; }
.settle.compact .note { font-size: 13px; line-height: 1.7; }
.rank-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow: auto; }
.rank-list li { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px dashed rgba(21,82,216,.14); font-size: 17px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .no { color: #8a97ad; font-weight: 700; }
.rank-list li:first-child .no { color: var(--gold-deep); }
.rank-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24406e; }
.rank-list .amt { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-tools { display: flex; gap: 10px; align-items: center; }
.rank-tools input, .rank-tools select { height: 40px; border: 1px solid rgba(21,82,216,.2); border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; padding: 0 10px; }
.rank-tools button { height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #2a68e6, #1444c0); color: #fff; font-size: 14px; cursor: pointer; }
.table-scroll { flex: 1; min-height: 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.rank-table { table-layout: fixed; }
.rank-table th:nth-child(1), .rank-table td:nth-child(1) { width: 7%; }
.rank-table th:nth-child(2), .rank-table td:nth-child(2) { width: 38%; }
.rank-table th:nth-child(3), .rank-table td:nth-child(3) { width: 20%; }
.rank-table th:nth-child(4), .rank-table td:nth-child(4) { width: 10%; }
.rank-table th:nth-child(5), .rank-table td:nth-child(5) { width: 10%; }
.rank-table th:nth-child(6), .rank-table td:nth-child(6) { width: 14%; }
.rank-table td { overflow: hidden; text-overflow: ellipsis; }
.leader-table { table-layout: auto; }
.leader-table th, .leader-table td { padding: 3px 9px; font-size: 15px; }
.leader-table th:nth-child(1), .leader-table td:nth-child(1) { width: 42px; text-align: left; }
.leader-table th:nth-child(2), .leader-table td:nth-child(2) { width: auto; max-width: 0; text-align: left; }
.leader-table th:nth-child(3), .leader-table td:nth-child(3) { width: 42%; text-align: right; }
.leader-table td.rank-no { color: #8a97ad; font-weight: 700; }
.leader-table tr:first-child td.rank-no { color: var(--gold-deep); }
.leader-table td b { display: block; font-size: 15px; color: #0a2a63; font-weight: 700; letter-spacing: .2px; }
.leader-table td small { display: block; font-size: 10px; color: #7186a8; margin-top: 1px; }
.leader-table td.amount { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.leader-table .empty-row { cursor: default; }
.leader-table .empty-row td { text-align: center; padding: 42px 0; font-size: 15px; color: var(--muted); }
th, td { padding: 14px 12px; text-align: right; border-bottom: 1px solid rgba(21,82,216,.1); white-space: nowrap; }
th { position: sticky; top: 0; background: #eaf2ff; color: #2b4673; font-weight: 700; z-index: 1; font-size: 15px; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(43,168,255,.07); }
.rank-table .who b { display: block; font-size: 18px; color: #0a2a63; font-weight: 700; letter-spacing: .2px; }
.rank-table .who small { display: block; color: #7186a8; font-size: 14px; margin-top: 3px; }
.rank-table .amount { color: var(--blue); font-weight: 700; font-size: 18px; }
.note { margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.8; }
.top-card { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 10px; flex: none; }
.top-card .name { font-size: 27px; font-weight: 750; color: #0a2a63; overflow-wrap: anywhere; }
.top-card .sub { font-size: 15px; color: var(--muted); }
.top-card .big { font: 700 42px "Inter", Arial, sans-serif; color: var(--blue); letter-spacing: -1px; }
.chart-top { flex: 1; min-height: 0; }
.capital { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-height: 0; overflow: auto; }
.capital .cell { padding: 12px 14px; border-radius: 11px; background: rgba(238,244,255,.72); border: 1px solid rgba(21,82,216,.12); display: flex; flex-direction: column; justify-content: space-between; }
.capital .cell span { display: block; font-size: 15px; color: var(--muted); line-height: 1.5; }
.capital .cell b { display: block; margin-top: 8px; font: 700 26px "Inter", Arial, sans-serif; color: #0a2a63; }
.capital .cell.warn b { color: var(--gold-deep); }
.fulfill { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-height: 0; overflow: auto; }
.fulfill .cell { padding: 12px 14px; border-radius: 11px; border-left: 4px solid #b9d2fb; background: rgba(238,244,255,.62); display: flex; flex-direction: column; justify-content: center; }
.fulfill .cell b { display: block; font: 700 30px "Inter", Arial, sans-serif; color: #0a2a63; }
.fulfill .cell span { font-size: 15px; color: var(--muted); }
.notes { margin: 0; padding-left: 18px; font-size: 15px; color: var(--muted); line-height: 2; overflow: auto; flex: 1; min-height: 0; }

/* payout stats + live feed */
.payout-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-height: 0; align-content: start; }
.payout-stat .cell { padding: 12px 16px; border-radius: 11px; background: rgba(238,244,255,.72); border: 1px solid rgba(21,82,216,.12); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.payout-stat .cell span { font-size: 15px; color: var(--muted); }
.payout-stat .cell b { font: 700 30px/1.1 "Inter", "DIN Alternate", Arial, sans-serif; color: #0a2a63; letter-spacing: -.4px; }
.payout-stat .cell.warn { background: rgba(255,244,236,.85); border-color: #e6c7b2; }
.payout-stat .cell.warn b { color: #9c3512; }
.payout-stat .note { grid-column: 1/-1; margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.feed { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.feed::before, .feed::after { content: ''; position: absolute; left: 0; right: 0; height: 22px; z-index: 2; pointer-events: none; }
.feed::before { top: 0; background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.feed::after { bottom: 0; background: linear-gradient(to top, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.feed-track { will-change: transform; }
.feed:hover .feed-track { animation-play-state: paused !important; }
@keyframes feedScroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.feed-row { display: grid; grid-template-columns: 210px 1fr 260px 300px; gap: 16px; align-items: center; height: 46px; padding: 0 8px; border-bottom: 1px dashed rgba(21,82,216,.13); font-size: 17px; }
.feed-row .time { color: #45597f; font-variant-numeric: tabular-nums; font-weight: 600; }
.feed-row .channel { color: #24406e; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .amt { text-align: right; font-weight: 700; color: #0a2a63; font-variant-numeric: tabular-nums; }
.feed-row .result { text-align: right; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .result.ok { color: #0d7a48; }
.feed-row .result.bad { color: #b03a1a; }
.feed-empty { display: grid; place-items: center; height: 100%; font-size: 16px; color: var(--muted); }

/* svg dock */
.dock-svg { position: absolute; left: 50%; transform: translateX(-50%); bottom: 6px; width: 1160px; height: 84px; z-index: 6; overflow: visible; }
.dock-svg .frame-outer { fill: rgba(255,255,255,.82); stroke: #1552d8; stroke-width: 2.4; }
.dock-svg .frame-inner { fill: none; stroke: rgba(43,168,255,.42); stroke-width: 1.2; }
.dock-svg .divider { stroke: rgba(21,82,216,.18); stroke-width: 1.2; stroke-dasharray: 4 6; }
.dock-svg .dot { fill: #e3a800; }
.dock-tab { cursor: pointer; }
.dock-tab .plate { fill: transparent; }
.dock-tab .label-text { font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 30px; font-weight: 600; letter-spacing: 2px; fill: #22406f; text-anchor: middle; dominant-baseline: middle; }
.dock-tab:hover .plate { fill: rgba(43,168,255,.12); }
.dock-tab.active .plate { fill: url(#dockActive); stroke: rgba(255,255,255,.75); stroke-width: 1.2; }
.dock-tab.active .label-text { fill: #fff; font-weight: 800; }
.dock-tab:focus { outline: none; }
.dock-tab:focus-visible .plate { stroke: #1552d8; stroke-width: 2; }

/* footer */
.link { border: 0; background: transparent; color: #2f5fb8; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 20% 10%, rgba(43,168,255,.15), transparent 55%), radial-gradient(ellipse at 85% 90%, rgba(242,185,13,.14), transparent 50%); }
.login-card { width: min(500px, 100%); padding: 42px 40px; border-radius: 22px; background: rgba(255,255,255,.94); border: 1px solid rgba(21,82,216,.22); box-shadow: 0 30px 90px rgba(12,42,99,.2), inset 0 1px 0 #fff; backdrop-filter: blur(12px); }
.login-card h1 { margin-top: 14px; font-size: 30px; letter-spacing: 2px; }
.login-sub { margin-top: 9px; font-size: 10px; letter-spacing: 2.6px; color: #6d82a5; }
.login-card label { display: block; margin: 22px 0; font-size: 14px; color: #334c76; }
.login-card input { display: block; width: 100%; margin-top: 9px; height: 50px; padding: 0 14px; border: 1px solid rgba(21,82,216,.24); border-radius: 10px; font-size: 17px; color: var(--ink); background: #fff; }
.login-card input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,168,255,.16); }
.login-card .primary { width: 100%; height: 54px; margin-top: 6px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #2a68e6, #1444c0); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer; box-shadow: 0 14px 30px rgba(21,82,216,.3); }
.login-card .primary span { float: right; }
.foot-note { margin-top: 20px; text-align: center; font-size: 12px; color: #8496b4; }
.error { min-height: 20px; font-size: 14px; color: #b3341f; }

/* person dialog */
.person-dialog { width: min(1240px, calc(100% - 60px)); max-height: 88vh; padding: 0; border: 1px solid rgba(21,82,216,.24); border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 40px 120px rgba(12,42,99,.35); }
.person-dialog::backdrop { background: rgba(10,30,64,.55); backdrop-filter: blur(4px); }
.person-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 24px 28px 18px; background: linear-gradient(135deg, #f2f7ff, #fff); border-bottom: 1px solid rgba(21,82,216,.12); }
.person-head h2 { margin-top: 8px; font-size: 28px; }
.person-id { margin-top: 8px; font-size: 15px; color: #41557a; }
.person-head button { width: 48px; height: 48px; border: 1px solid rgba(21,82,216,.2); border-radius: 12px; background: #fff; font-size: 24px; cursor: pointer; color: #24406e; }
.person-body { padding: 20px 28px 28px; max-height: calc(88vh - 130px); overflow: auto; }
.person-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 20px; }
.person-metrics .cell { padding: 15px 17px; border-radius: 11px; background: #f5f9ff; border: 1px solid rgba(21,82,216,.12); }
.person-metrics .cell span { display: block; font-size: 13px; color: var(--muted); }
.person-metrics .cell b { display: block; margin-top: 9px; font: 600 26px "Inter", Arial, sans-serif; color: #0a2a63; }
.person-metrics .cell.gold { background: #fff8e6; border-color: #eed79a; }
.person-metrics .cell.gold b { color: #7b5400; }
.person-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 20px; }
.person-cols h3 { font-size: 17px; margin-bottom: 10px; }
.person-cols h3 small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.contrib-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; }
.contrib-list button { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(21,82,216,.16); border-radius: 10px; background: #f8fbff; cursor: pointer; text-align: left; }
.contrib-list b { color: var(--blue); font-size: 15px; white-space: nowrap; }
.contrib-list small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

@media (max-width: 1100px) { body { overflow: auto; } .stage { transform: scale(var(--s, .5)); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.kpi .value .cur { font-size: 34px; margin-right: 4px; color: inherit; opacity: .85; }
.kpi .value .unit { font-size: 26px; margin-left: 8px; font-weight: 600; opacity: .8; }

.foot-basis { color: var(--gold-deep); font-weight: 600; letter-spacing: .2px; }

.rank-table .link { font-size: 15px; }

#rank-body td.note { height: auto; padding: 48px 0; text-align: center; font-size: 16px; color: var(--muted); }
#rank-body tr:only-child { cursor: default; }

.kpi .value .ratio { font-size: 30px; font-weight: 700; color: var(--blue); }
.kpi .value .ratio small { display: block; margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--muted); }

.rank-span { font-size: 16px; font-weight: 700; color: var(--blue); background: rgba(21,82,216,.08); border: 1px solid rgba(21,82,216,.18); border-radius: 8px; padding: 0 12px; height: 40px; display: flex; align-items: center; }

.chart-empty { display: grid; place-items: center; height: 100%; min-height: 80px; font-size: 15px; color: var(--muted); }

.warehouse { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; min-height: 0; overflow: auto; }
.warehouse .cell { padding: 12px 14px; border-radius: 11px; background: rgba(238,244,255,.72); border: 1px solid rgba(21,82,216,.12); display: flex; flex-direction: column; justify-content: space-between; }
.warehouse .cell span { font-size: 14px; color: var(--muted); }
.warehouse .cell b { font: 700 26px "Inter", Arial, sans-serif; color: #0a2a63; margin-top: 8px; }
.warehouse .cell.warn b { color: var(--gold-deep); }
.top-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.top-stat { padding: 10px 12px; border-radius: 10px; background: rgba(238,244,255,.7); border: 1px solid rgba(21,82,216,.12); }
.top-stat span { display: block; font-size: 13px; color: var(--muted); }
.top-stat b { display: block; margin-top: 6px; font-size: 16px; color: #0a2a63; overflow-wrap: anywhere; }

.kpi .value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 8px 0 6px; }
.kpi .value-row .delta { font-size: 24px; font-weight: 750; color: #1452c8; white-space: nowrap; padding-bottom: 6px; }
.kpi .value-row .delta.neg { color: #a5610a; }
.kpi.hero .value-row .delta { color: #d8ffe8; }
.kpi .meta { font-size: 13px; line-height: 1.4; }
.kpi .code { font-size: 13px; }
