/* BetGPT — design system. Dark-first; light via prefers-color-scheme.
   Tokens: type 12/14/16/20/28/36 · 4px grid · radius 10/14/20 · 150ms ease.
   Data marks use the validated dataviz palette; chrome carries the brand. */

.viz-root {
  --page:            #0b0c0f;
  --surface-1:       #14161b;
  --surface-2:       #1b1e25;
  --surface-3:       #23262f;
  --text-primary:    #f5f5f3;
  --text-secondary:  #b6bac3;
  --text-muted:      #7c8089;
  --grid:            #24272e;
  --baseline:        #363a43;
  --border:          rgba(255,255,255,0.07);
  --border-strong:   rgba(255,255,255,0.13);
  --series-1:        #3987e5;
  --div-neg:         #e66767;
  --div-mid:         #383835;
  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-critical: #d03b3b;
  --delta-good:      #22c55e;
  --delta-bad:       #f87171;
  --accent:          #22c55e;
  --accent-ink:      #052e13;
  --accent-soft:     rgba(34,197,94,0.12);
  --blue-soft:       rgba(57,135,229,0.13);
  --warn-soft:       rgba(250,178,25,0.14);
  --live:            #f43f5e;
  --shadow:          0 8px 28px rgba(0,0,0,0.4);
}
@media (prefers-color-scheme: light) {
  .viz-root {
    --page:            #f3f4f6;
    --surface-1:       #ffffff;
    --surface-2:       #f7f8fa;
    --surface-3:       #eef0f3;
    --text-primary:    #0f1013;
    --text-secondary:  #4b4f57;
    --text-muted:      #81858d;
    --grid:            #e5e6e9;
    --baseline:        #c8cbd1;
    --border:          rgba(10,10,12,0.08);
    --border-strong:   rgba(10,10,12,0.16);
    --series-1:        #2a78d6;
    --div-neg:         #e34948;
    --div-mid:         #eceded;
    --delta-good:      #15803d;
    --delta-bad:       #dc2626;
    --accent:          #16a34a;
    --accent-ink:      #ffffff;
    --accent-soft:     rgba(22,163,74,0.10);
    --blue-soft:       rgba(42,120,214,0.09);
    --warn-soft:       rgba(217,119,6,0.12);
    --shadow:          0 8px 28px rgba(15,16,19,0.10);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #0b0c0f; }
@media (prefers-color-scheme: light) { body { background: #f3f4f6; } }

.viz-root {
  min-height: 100vh;
  background:
    radial-gradient(1100px 420px at 15% -12%, var(--blue-soft), transparent 62%),
    radial-gradient(900px 340px at 92% -8%, var(--accent-soft), transparent 58%),
    var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
main { max-width: 1160px; margin: 0 auto; padding: 20px 20px 64px; }

/* ---------- top bar + tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--page) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; font-size: 21px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--series-1), var(--accent));
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: -0.02em; font-weight: 800; line-height: 1.15; }
.sub { color: var(--text-secondary); font-size: 12px; }
.brand .sub { white-space: nowrap; }

.tabs { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.tab {
  position: relative; padding: 9px 14px; border-radius: 10px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 13.5px; font-weight: 650;
  transition: color 150ms ease, background 150ms ease;
}
.tab:hover { color: var(--text-primary); background: var(--surface-2); }
.tab.active { color: var(--text-primary); }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2.5px;
  border-radius: 2px; background: linear-gradient(90deg, var(--series-1), var(--accent));
}

.topbar-right { display: flex; align-items: center; gap: 10px; }
.pause-btn {
  font: inherit; font-size: 12.5px; font-weight: 750; letter-spacing: 0.02em;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface-1); color: var(--text-primary);
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.pause-btn:hover { transform: translateY(-1px); }
.pause-btn.running { border-color: color-mix(in srgb, var(--status-warning) 55%, transparent); }
.pause-btn.paused { background: var(--status-warning); color: #201500; border-color: transparent; }

.activity-chip {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  border: 1px solid var(--border); background: var(--surface-1);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; cursor: help;
}
.activity-chip.live { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.activity-chip.pre { color: var(--series-1); border-color: color-mix(in srgb, var(--series-1) 45%, transparent); }

.fresh-pill {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  border: 1px solid var(--border); background: var(--surface-1);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.fresh-pill .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: pulse 2.4s infinite; }
.fresh-pill.stale .dot { background: var(--status-warning); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.tab-page { animation: fadein 180ms ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- info + tooltip ---------- */
.info, .info-demo {
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 10px; font-weight: 700; font-style: normal;
  color: var(--text-muted); border: 1px solid var(--text-muted);
  cursor: help; vertical-align: 2px; margin-left: 3px; user-select: none;
  transition: color 150ms ease, border-color 150ms ease;
}
.info:hover { color: var(--accent); border-color: var(--accent); }

.tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--surface-2, #1b1e25); color: var(--text-primary, #f5f5f3);
  border: 1px solid var(--border-strong, rgba(255,255,255,0.13));
  box-shadow: var(--shadow, 0 8px 28px rgba(0,0,0,0.4));
  border-radius: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55;
  max-width: 310px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.tooltip .t-title { font-weight: 750; margin-bottom: 4px; font-size: 13px; }
.tooltip .t-why { margin-top: 7px; color: var(--text-secondary, #b6bac3); }
.tooltip .t-why b { color: var(--accent, #22c55e); }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tooltip .t-row .k { color: var(--text-secondary, #b6bac3); }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; transition: transform 150ms ease, border-color 150ms ease;
}
.tile:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.tile .label { color: var(--text-secondary); font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.tile .value { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .value.hero { font-size: 34px; background: linear-gradient(90deg, var(--text-primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tile .value.warn { color: var(--status-warning); }
.tile .delta { font-size: 12.5px; margin-top: 3px; font-weight: 650; }
.delta.up { color: var(--delta-good); } .delta.down { color: var(--delta-bad); }
.tile .hint { color: var(--text-muted); font-size: 11.5px; margin-top: 3px; }

/* ---------- panels ---------- */
.panel {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { font-size: 16px; margin: 0; font-weight: 750; letter-spacing: -0.01em; }

/* ---------- game cards ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.game-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.game-card:hover, .game-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); outline: none; }
.game-card.has-bets { border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.gc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.gc-time { color: var(--text-muted); font-size: 11.5px; font-weight: 650; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge.live { background: rgba(244,63,94,0.15); color: var(--live); }
.badge.live::before { content: "●"; margin-right: 4px; animation: pulse 1.6s infinite; }
.badge.final { background: var(--surface-1); color: var(--text-muted); border: 1px solid var(--border); }
.badge.sched { background: var(--blue-soft); color: var(--series-1); }

.bet-pill {
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-secondary);
}
.bet-pill.pos { background: var(--accent-soft); color: var(--delta-good); }
.bet-pill.neg { background: rgba(248,113,113,0.13); color: var(--delta-bad); }

.matchup { display: flex; flex-direction: column; gap: 6px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-name { font-weight: 750; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row.winner .team-name, .team-row.winner .team-score { color: var(--delta-good); }
.team-right { display: flex; align-items: center; gap: 8px; flex: none; }
.team-score { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; min-width: 20px; text-align: right; }
.price-chip {
  font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
  background: var(--surface-1); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 8px; color: var(--text-secondary);
  white-space: nowrap; transition: border-color 150ms ease;
}

.bet-strip { border-top: 1px dashed var(--grid); padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.bet-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; color: var(--text-secondary); }
.bet-line .bl-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-line .bl-what b { color: var(--text-primary); font-weight: 750; }
.bet-line .bl-pnl { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bet-more { font-size: 11.5px; color: var(--text-muted); }
.gc-hint { color: var(--text-muted); font-size: 11px; text-align: right; margin-top: -4px; }

/* ---------- game detail modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadein 150ms ease;
}
.modal {
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow);
  width: min(560px, 100%); max-height: min(84vh, 760px); overflow-y: auto;
  padding: 20px 22px 18px; position: relative;
  animation: modalin 180ms ease;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.gm-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-secondary); font-size: 15px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; transition: background 150ms ease, color 150ms ease;
}
.gm-close:hover { background: var(--surface-3); color: var(--text-primary); }
.gm-status { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gm-status .when { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.gm-matchup { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; padding-right: 36px; }
.gm-team { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gm-team .name { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.gm-team .score { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gm-team.winner .name, .gm-team.winner .score { color: var(--delta-good); }
.gm-section { margin-top: 16px; }
.gm-section > h3 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 8px;
}
.gm-bet {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 8px;
}
.gm-bet .b-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.gm-bet .b-title { font-weight: 800; font-size: 14px; }
.gm-bet .b-chips { display: flex; gap: 10px; align-items: center; }
.gm-bet .b-nums { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.gm-bet .b-pnl { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 3px; }
.gm-bet .b-story { font-size: 12px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.gm-empty { color: var(--text-muted); font-size: 12.5px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; line-height: 1.55; }
.gm-mkt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--grid); font-size: 13px; }
.gm-mkt:last-child { border-bottom: none; }
.gm-mkt .m-team { font-weight: 750; }
.gm-mkt .m-nums { display: flex; gap: 14px; align-items: baseline; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-mkt .m-price { font-weight: 800; font-size: 14px; }
.gm-mkt .m-model { color: var(--series-1); font-weight: 700; font-size: 12px; }
.gm-mkt .m-age { color: var(--text-muted); font-size: 11px; }
.gm-note { color: var(--text-muted); font-size: 11.5px; margin-top: 6px; }
.gm-ai { display: flex; flex-direction: column; gap: 6px; }
.gm-ai-row { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; }
.gm-ai-row .a-when { color: var(--text-muted); font-size: 11px; flex: none; width: 58px; font-variant-numeric: tabular-nums; }
.gm-ai-row .a-what b { color: var(--text-primary); font-weight: 750; }
.gm-ai-row .a-what { color: var(--text-secondary); line-height: 1.45; }
.gm-ai-row .a-count { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.gm-foot { color: var(--text-muted); font-size: 11.5px; margin-top: 16px; text-align: center; }
body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    animation: sheetin 200ms ease;
  }
  @keyframes sheetin { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
}

/* ---------- tables + chips ---------- */
.scroll-x { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; }
td { font-size: 13px; }
.num-table td.num, .num-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr, table tr { transition: background 120ms ease; }
table tr:hover td { background: color-mix(in srgb, var(--surface-3) 55%, transparent); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 750; letter-spacing: 0.02em; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip.won  { color: var(--status-good); }     .chip.won .dot  { background: var(--status-good); }
.chip.lost { color: var(--status-critical); } .chip.lost .dot { background: var(--status-critical); }
.chip.open { color: var(--series-1); }        .chip.open .dot { background: var(--series-1); }
.chip.void { color: var(--text-muted); }      .chip.void .dot { background: var(--baseline); }
.chip.early { color: var(--status-warning); } .chip.early .dot { background: var(--status-warning); }
.pnl-pos { color: var(--delta-good); font-weight: 700; }
.pnl-neg { color: var(--delta-bad); font-weight: 700; }
.origin-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-secondary); }
.origin-tag.INPLAY { background: rgba(244,63,94,0.13); color: var(--live); }
.origin-tag.PROP { background: var(--blue-soft); color: var(--series-1); }

/* ---------- system tab ---------- */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.provider-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
}
.pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pc-name { font-weight: 800; font-size: 14px; letter-spacing: 0.02em; }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12.5px; color: var(--text-secondary); }
.pc-stats b { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 750; }
.pc-stats b.bad { color: var(--status-critical); }
.pc-stats b.warn { color: var(--status-warning); }
.pc-stats b.good { color: var(--status-good); }
.rate-meter { margin-top: 10px; cursor: help; }
.rate-meter .rm-bar { height: 8px; border-radius: 4px; background: var(--div-mid); overflow: hidden; }
.rate-meter .rm-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--series-1), var(--accent)); transition: width 300ms ease; }
.rate-meter .rm-label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.spark { margin-top: 10px; cursor: help; }
.spark svg { display: block; width: 100%; height: 42px; }
.hb { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.status-chip { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; }
.status-chip.ok { background: var(--accent-soft); color: var(--status-good); }
.status-chip.warn { background: var(--warn-soft); color: var(--status-warning); }
.status-chip.bad { background: rgba(208,59,59,0.15); color: var(--status-critical); }

/* ---------- agents tab ---------- */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.agent-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.ac-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.ac-name { font-weight: 800; font-size: 15px; }
.ac-kind { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-secondary); }
.ac-kind.llm { background: var(--blue-soft); color: var(--series-1); }
.ac-role { color: var(--text-secondary); font-size: 12.5px; margin-bottom: 10px; }
.ac-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.ac-meta b { color: var(--text-primary); font-weight: 750; font-variant-numeric: tabular-nums; }
.ac-review { font-size: 12px; color: var(--text-secondary); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.ac-review b { color: var(--text-primary); }
details.ac-prompt summary { cursor: pointer; color: var(--text-secondary); font-size: 12.5px; font-weight: 650; }
details.ac-prompt pre {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; overflow-x: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; line-height: 1.55; color: var(--text-secondary);
  white-space: pre-wrap; max-height: 320px; overflow-y: auto;
}

/* ---------- needs ---------- */
.need-card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface-2);
}
.need-card:last-child { margin-bottom: 0; }
.need-pri { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; flex: none; margin-top: 1px; }
.need-pri.HIGH { background: rgba(208,59,59,0.15); color: var(--status-critical); }
.need-pri.MED { background: var(--warn-soft); color: var(--status-warning); }
.need-pri.LOW { background: var(--surface-3); color: var(--text-secondary); }
.need-title { font-weight: 750; font-size: 13.5px; }
.need-body { color: var(--text-secondary); font-size: 12.5px; margin-top: 2px; }
.need-meta { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.need-done-btn {
  font: inherit; font-size: 12px; font-weight: 700; flex: none; align-self: center;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-primary);
  transition: background 150ms ease, transform 150ms ease;
}
.need-done-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); transform: translateY(-1px); }
.need-done-btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- charts, skeletons, misc ---------- */
.chart-host { position: relative; }
.chart-host svg { display: block; width: 100%; height: auto; }
.empty { color: var(--text-muted); text-align: center; padding: 30px 12px; font-size: 13px; }
.table-view summary { color: var(--text-secondary); font-size: 12.5px; cursor: pointer; margin-top: 10px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.foot { color: var(--text-muted); font-size: 12.5px; margin-top: 26px; line-height: 1.6; }
.foot .info-demo { cursor: default; }

@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .brand .sub { display: none; }
}
