:root {
  --ink: #1a2332;
  --muted: #6b7a90;
  --line: #e6ebf2;
  --line-strong: #d5dde8;
  --page: #f3f5f8;
  --card: #ffffff;
  --side: #111827;
  --side-hover: rgba(255, 255, 255, 0.06);
  --side-on: rgba(255, 255, 255, 0.1);
  --side-text: #c5cedb;
  --side-muted: #8b97ab;
  --accent: #2563eb;
  --accent-press: #1d4ed8;
  --accent-soft: #eff4ff;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --off: #dc2626;
  --off-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.task-btn,
a.task-btn:hover,
a.task-btn:focus,
a.icon-btn,
a.icon-btn:hover,
a.icon-btn:focus,
.board-actions a,
.board-actions a:hover {
  text-decoration: none !important;
}
button, input, select { font: inherit; }

/* —— Shell —— */
.shell { min-height: 100vh; display: flex; }
.side {
  width: 220px;
  flex: 0 0 220px;
  background: var(--side);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
}
.brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}
.brand span {
  display: block;
  margin-top: 2px;
  color: var(--side-muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  flex: 1;
}
.nav-list a,
.side-logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  color: var(--side-text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.nav-list a i,
.side-logout button i {
  width: 16px;
  text-align: center;
  color: var(--side-muted);
  font-size: 13px;
}
.nav-list a:hover,
.side-logout button:hover {
  background: var(--side-hover);
  color: #fff;
  text-decoration: none;
}
.nav-list a:hover i,
.side-logout button:hover i { color: #fff; }
.nav-list a.on {
  background: var(--side-on);
  color: #fff;
  font-weight: 600;
}
.nav-list a.on i { color: #93c5fd; }
.side-foot {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-foot > a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--side-text);
  text-decoration: none;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
}
.side-foot > a i { width: 16px; text-align: center; color: var(--side-muted); font-size: 13px; }
.side-foot > a:hover, .side-foot > a.on { background: var(--side-hover); color: #fff; text-decoration: none; }
.side-foot > a.on i, .side-foot > a:hover i { color: #fff; }
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 10px;
  color: var(--side-muted);
  font-size: 12px;
}
.who i { width: 14px; text-align: center; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
main { padding: 20px 24px 40px; flex: 1; }

/* —— Surfaces —— */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.card h2, .card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 650;
}
.card h2 i, .card h3 i {
  margin-right: 6px;
  color: var(--muted);
  font-size: 13px;
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-hd h2 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.flash {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.flash.ok { background: var(--ok-bg); color: #047857; }
.flash.err { background: var(--off-bg); color: #b91c1c; }

/* —— Forms —— */
.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 0;
}
input, select {
  display: block;
  width: 100%;
  min-width: 148px;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-press); }
.btn i { font-size: 12px; }
.btn.slim {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.slim:hover { background: var(--page); }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover { background: var(--page); }
.btn.screen-entry { background: #0f172a; }
.btn.screen-entry:hover { background: #1e293b; }
.btn.danger-ghost {
  background: #fff;
  color: var(--off);
  border: 1px solid #fecaca;
}
.btn.danger-ghost:hover { background: var(--off-bg); }
.form-narrow { max-width: 360px; }
.form-narrow label { margin-bottom: 12px; }
.form-narrow .btn { margin-top: 4px; }

/* —— Table —— */
.table-wrap { overflow: auto; padding: 0; }
.table-wrap table { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
}
th:last-child, td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -8px 0 10px -10px rgba(15, 23, 42, 0.35);
}
th:last-child { background: #f8fafc; }
tbody tr:hover td:last-child { background: #f8fafc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }
.ops {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}
.ops form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.ops .btn { padding: 6px 12px; }

/* —— Modal —— */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 64px rgba(28, 39, 64, 0.16);
  overflow: hidden;
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
}
.modal-hd h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.modal-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f4f6fa;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-x:hover { background: #e8edf5; color: #111827; }
.modal-body { padding: 18px 22px 10px; }
.modal-hint {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--muted);
}
.modal-hint strong { color: var(--ink); font-weight: 650; }
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-stack label { margin: 0; font-size: 13px; color: #64748b; font-weight: 600; }
.form-stack input {
  min-width: 0;
  margin-top: 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: #f4f6fa;
}
.import-bar { display: flex; align-items: center; }
.import-bar .btn { text-decoration: none; }
.form-stack input:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.modal-ft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 22px 22px;
}
.modal-ft .btn {
  border-radius: 999px;
  min-width: 96px;
  justify-content: center;
  padding: 10px 18px;
}
.modal-ft .btn.ghost {
  border: 0;
  background: #f4f6fa;
  color: #334155;
  box-shadow: none;
}
.modal-ft .btn.ghost:hover { background: #e8edf5; }
.modal-ft .btn:not(.ghost) { background: #111827; }
.modal-ft .btn:not(.ghost):hover { background: #000; }
.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.pager a {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.pager a:hover { background: var(--page); text-decoration: none; }
.pager-now {
  padding: 5px 10px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* —— Status —— */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 550;
  background: #f1f5f9;
  color: #475569;
}
.pill.ok { background: var(--ok-bg); color: #047857; }
.pill.off { background: var(--off-bg); color: #b91c1c; }
.pill.auto { background: var(--ok-bg); color: #047857; }
.pill.bal { background: var(--accent-soft); color: #1d4ed8; }
.pill.dep { background: var(--warn-bg); color: var(--warn); }
.pill.low { background: #f1f5f9; color: #64748b; }

/* —— Detail —— */
.profile { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile h2 { margin: 0 0 6px; font-size: 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta span {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  color: #334155;
}
.meta span i { color: var(--muted); margin-right: 4px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.back-link:hover { color: var(--accent); text-decoration: none; }
.score-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
}
.score-line b { font-size: 20px; letter-spacing: -0.02em; }
.dimline {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  margin: 7px 0;
  font-size: 13px;
}
.track {
  height: 6px;
  background: #e8eef5;
  border-radius: 99px;
  overflow: hidden;
}
.track b {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}
.track b.dep { background: #d97706; }
.track b.bal { background: #2563eb; }
.track b.auto { background: #059669; }
.track b.low { background: #94a3b8; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.stat:hover { border-color: #c5d4ea; text-decoration: none; }
.stat-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.stat-ico.blue { background: #e8f1ff; color: #1d4ed8; }
.stat-ico.teal { background: #e7f6f4; color: #0f766e; }
.stat-ico.amber { background: #fff6e8; color: #b45309; }
.stat-ico.slate { background: #eef2f7; color: #334155; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-body b { font-size: 26px; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-body span { font-size: 13px; font-weight: 650; margin-top: 2px; }
.stat-body em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dash-split, .split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.meter { display: grid; grid-template-columns: 88px minmax(0, 1fr) 36px; gap: 10px; align-items: center; margin: 10px 0; font-size: 13px; }
.meter > b { text-align: right; font-variant-numeric: tabular-nums; }
.card.table-wrap .card-hd { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.split-2 .form-grid { display: flex; flex-direction: column; align-items: stretch; }
.split-2 .form-grid .btn { align-self: flex-start; }
.file-field input { padding: 7px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* —— Login —— */
body.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(520px 320px at 18% 18%, rgba(34, 197, 94, 0.22), transparent 60%),
    radial-gradient(480px 340px at 82% 78%, rgba(236, 72, 153, 0.18), transparent 62%),
    radial-gradient(420px 280px at 78% 12%, rgba(59, 130, 246, 0.16), transparent 60%),
    #e7edf6;
}
.gate-frame {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  padding: 48px 40px 40px;
  box-shadow: 0 24px 60px rgba(28, 39, 64, 0.1);
}
.gate-logo {
  display: block;
  height: 76px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 36px;
  object-fit: contain;
}
.gate-frame h1 {
  margin: -8px 0 18px;
  text-align: center;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.board-brand .brand-logo {
  height: 40px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
}
.gate-frame form label { margin-bottom: 22px; }
.gate-frame .field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 0 16px;
  background: #f4f6fa;
  border-radius: 14px;
}
.gate-frame .field i { color: #94a3b8; width: 16px; text-align: center; }
body.gate .field input {
  border: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  padding: 16px 0;
  min-width: 0;
}
body.gate .field input:focus { background: transparent; box-shadow: none; }
body.gate .field:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08); }
body.gate .btn { border-radius: 999px; background: #111827; }
body.gate .btn:hover { background: #000; }
.gate-frame .btn {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  padding: 15px;
}
.err {
  background: var(--off-bg);
  color: #b91c1c;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 14px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side {
    width: 100%;
    height: auto;
    position: relative;
  }
  .nav-list {
    flex-direction: row;
    overflow: auto;
    flex: none;
    padding-bottom: 10px;
  }
  .nav-list a { white-space: nowrap; }
  .side-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .who { padding-bottom: 6px; }
  main, .topbar { padding-left: 16px; padding-right: 16px; }
  .stats, .dash-split, .split-2 { grid-template-columns: 1fr; }
  .brand span { max-width: none; }
}

/* —— 控制台：浅色概览 —— */
body.board {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #e7edf6;
  padding: clamp(8px, 1.1vw, 18px);
}
.board-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
  border-radius: clamp(16px, 1.6vw, 28px);
  box-shadow: 0 18px 50px rgba(28, 39, 64, 0.08);
  padding: clamp(12px, 1.2vw, 22px) clamp(12px, 1.4vw, 22px) clamp(14px, 1.4vw, 26px);
}
.board-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.board-body:has(.viz-row) { overflow: auto; }
.board-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 6px 6px 14px;
}
.board-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  text-decoration: none;
  min-width: 0;
  justify-self: start;
  max-width: 100%;
}
.board-brand:hover { text-decoration: none; }
.board-brand strong {
  font-size: 16px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-pills {
  display: flex;
  gap: 6px;
  justify-self: center;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.board-pills a {
  color: #4b5568;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}
.board-pills a:hover { background: #f3f5f8; text-decoration: none; }
.board-pills a.on { background: #111827; color: #fff; }
.board-tools { display: flex; align-items: center; gap: 8px; justify-self: end; }
.board-tools form { margin: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 0;
  background: #fff; color: #334155; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
a.icon-btn { text-decoration: none; }
.icon-btn:hover { background: #f3f5f8; }
.user-chip {
  background: #fff; border-radius: 999px; padding: 7px 12px;
  font-size: 13px; font-weight: 650; color: #1f2937;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 8px 22px; flex: 0 0 auto;
}
.board-head h1 { margin: 0; font-size: clamp(24px, 2.1vw, 34px); letter-spacing: -0.03em; font-weight: 750; }
.board-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-actions .btn { border-radius: 999px; padding: 10px 16px; }
.board-body > .card.table-wrap { margin-top: 4px; }
.board-actions .btn.ghost {
  background: #fff;
  color: #111827;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.board-actions .btn.ghost:hover { background: #f3f5f8; }
.icon-btn.on { background: #111827; color: #fff; }
body.board .card {
  border: 0;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(31, 41, 64, 0.04);
}
body.board .btn, body.board .btn.slim, body.board .btn.danger-ghost { border-radius: 999px; }
body.board input, body.board select {
  border: 0;
  border-radius: 12px;
  background: #f4f6fa;
}
body.board input:focus, body.board select:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
body.board th { background: transparent; }
body.board th:last-child, body.board td:last-child { background: #fff; }
body.board tbody tr:hover td:last-child { background: #f8fafc; }
body.board .pager a { border: 0; border-radius: 999px; background: #f4f6fa; color: #111827; }
body.board .pager-now { border-radius: 999px; background: #111827; }
.task-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #111827; color: #fff; text-decoration: none;
  border-radius: 999px; padding: 12px 18px; font-weight: 650; font-size: 14px;
}
.task-btn:hover { background: #000; color: #fff; text-decoration: none; }
.kpi-row, .viz-row { display: grid; gap: clamp(10px, 1.2vw, 16px); }
.kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 0 0 auto; }
.viz-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1.15fr);
  margin-top: clamp(10px, 1.2vw, 16px);
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}
.kpi, .viz {
  background: #fff; border-radius: clamp(16px, 1.4vw, 22px); padding: clamp(14px, 1.2vw, 18px);
  box-shadow: 0 8px 24px rgba(31, 41, 64, 0.04);
  color: inherit; text-decoration: none;
  min-width: 0;
}
.viz { display: flex; flex-direction: column; min-height: 0; }
.kpi:hover { text-decoration: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.orb {
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  color: #fff; font-size: 18px;
}
.orb.green { background: #22c55e; }
.orb.blue { background: #3b82f6; }
.orb.pink { background: #ec4899; }
.jump {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: #f4f6fa; color: #64748b; font-size: 12px;
}
.kpi b { display: block; margin-top: clamp(10px, 1.2vw, 18px); font-size: clamp(30px, 2.4vw, 46px); line-height: 1; letter-spacing: -0.04em; font-weight: 750; }
.kpi-name { display: block; margin-top: 6px; font-weight: 650; }
.kpi-foot { display: block; margin-top: 14px; color: #8b95a7; font-size: 13px; }
.kpi-foot em { font-style: normal; font-weight: 750; }
.kpi-foot em.up { color: #16a34a; }
.viz-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viz-hd h2 { margin: 0; font-size: 16px; font-weight: 750; }
.chip, .legend-inline {
  background: #f4f6fa; color: #64748b; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 650;
}
.legend-inline { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.legend-inline .c-stu { background: #3b82f6; }
.legend-inline .c-pro { background: #ec4899; margin-left: 6px; }
.viz-score { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; }
.viz-score b { font-size: clamp(30px, 2.6vw, 42px); letter-spacing: -0.04em; line-height: 1; }
.viz-score span { color: #8b95a7; font-size: 13px; }
.dim-cols { display: flex; align-items: flex-end; gap: 10px; flex: 1 1 auto; height: auto; min-height: 0; margin-top: 8px; }
.dim-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.dim-col i { display: block; width: 100%; border-radius: 14px 14px 8px 8px; min-height: 18px; }
.dim-col b { font-size: 13px; }
.dim-col span { font-size: 12px; color: #8b95a7; text-align: center; white-space: nowrap; }
.ring { flex: 1 1 auto; height: auto; min-height: 140px; }
.donut {
  width: clamp(120px, 24vh, 200px); height: clamp(120px, 24vh, 200px); border-radius: 50%;
  margin: 12px auto 8px; display: grid; place-items: center; flex: 0 0 auto;
}
.donut-hole {
  width: 66%; height: 66%; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.donut-hole b { font-size: clamp(28px, 3vh, 40px); line-height: 1; letter-spacing: -0.04em; }
.donut-hole span { color: #8b95a7; font-size: 13px; margin-top: 2px; }
.stage-legend { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 8px; }
.stage-legend li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; }
.stage-legend i { width: 8px; height: 8px; border-radius: 99px; }
.stage-legend b { font-variant-numeric: tabular-nums; }
.stage-legend em { font-style: normal; color: #8b95a7; min-width: 36px; text-align: right; }
.viz-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.viz-foot b { display: block; font-size: 20px; letter-spacing: -0.03em; }
.viz-foot span, .viz-foot em { display: block; color: #8b95a7; font-size: 12px; font-style: normal; }

@media (max-width: 1080px) {
  .viz-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(180px, 1.15fr) minmax(180px, 0.85fr);
  }
  .viz-row > .viz:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .board-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }
  .board-pills {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: auto;
    justify-content: flex-start;
  }
  .board-brand { max-width: none; }
  .kpi-row, .viz-row, .viz-foot { grid-template-columns: 1fr; }
  .viz-row > .viz:nth-child(3) { grid-column: auto; }
  .board-head h1 { font-size: 24px; }
  body.board { height: auto; overflow: auto; }
  .board-frame {
    height: auto;
    min-height: calc(100vh - 16px);
    min-height: calc(100dvh - 16px);
  }
  .board-body,
  .board-body:has(.viz-row) { display: block; overflow: visible; }
  .dim-cols, .ring { flex: none; height: 200px; }
  .donut { width: 168px; height: 168px; }
}
