/* ============================================================
   Poly Sniper dashboard UI kit — view styles.
   Composes the DS tokens; only kit-level layout/table styling here.
   ============================================================ */

/* ── Filled-control fill normalization — single source of truth ──────────────
   Every filled control (button / switch / pill / icon-button / badge) keeps a
   1px border for layout and sets border-color:transparent when filled. The fill
   MUST reach the rounded edge: any `background-clip: padding-box` clips it
   *inside* that transparent border and reveals a 1px seam of whatever sits
   behind the control (the "按钮填充偏移 / 白色缝隙" bug). This recurred per
   component because each injects its own style with no shared primitive — so we
   pin the whole class to border-box here, in one place. Override or extend this
   list instead of adding a per-component clip. */
.ps-btn, .ps-iconbtn, .ps-switch-track, .ps-statuspill, .ps-badge {
  background-clip: border-box !important;
}

.app-shell { display: flex; height: 100vh; overflow: hidden; position: relative; background-color: var(--dashboard-surface); }
.app-shell > * { position: relative; z-index: 1; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); flex: none;
  padding: 0 20px;
  border-bottom: 1px solid var(--dashboard-divider);
  background: var(--dashboard-surface);
  color: var(--dashboard-ink);
}
.topbar-title { font: var(--fw-semibold) 16px/1.25 var(--font-sans); margin: 0; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }

/* ============================================================
   Strategy page (跟单策略)
   ============================================================ */
.strat-page { display: flex; flex-direction: column; gap: var(--sp-5); }

/* 策略总览 — full-width top band */
.strat-overview { position: relative; border-radius: var(--r-lg); background: var(--surface-card); border: 1px solid var(--border-hairline); box-shadow: var(--shadow-md), var(--inner-highlight); padding: var(--sp-5) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); }
.strat-overview::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--gradient-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.45; pointer-events: none; }
.so-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; }
.so-title .ps-card-eyebrow { margin-bottom: 2px; }
.so-h { font: var(--text-headline); margin: 0; letter-spacing: var(--ls-body); }
.so-right { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.so-example { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.soe-label { font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--text-tertiary); }
.soe-row { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-subhead); color: var(--text-secondary); }
.soe-row .num-field { height: var(--control-sm); }
.soe-arrow { width: 15px; height: 15px; color: var(--text-quaternary); }
.soe-out { font-size: var(--fs-subhead); color: var(--text-primary); }
.soe-out b { font-size: var(--fs-h4); color: var(--pnl-up); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.soe-out.ignored { color: var(--status-warn); font-weight: var(--fw-semibold); }
.so-btns { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* horizontal pipeline */
.so-pipe { list-style: none; margin: 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--border-hairline); display: flex; align-items: stretch; flex-wrap: wrap; }
.so-node { flex: 1; min-width: 116px; display: flex; flex-direction: column; gap: 4px; padding: 0 var(--sp-5); position: relative; }
.so-node:first-child { padding-left: 0; }
.so-node + .so-node::before { content: "\203A"; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); color: var(--text-quaternary); font-size: 18px; line-height: 1; }
.son-k { font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--text-tertiary); }
.son-v { font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.so-node.is-key .son-v { color: var(--accent); }
.so-todo { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-footnote); color: var(--status-warn); font-weight: var(--fw-semibold); }
.so-todo [data-lucide] { width: 14px; height: 14px; }

/* compact mini settings row */
.strat-mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.mini-card { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-card); border: 1px solid var(--border-hairline); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.mc-head { display: inline-flex; align-items: center; gap: var(--sp-2); font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); white-space: nowrap; }
.mc-head [data-lucide] { width: 16px; height: 16px; color: var(--text-tertiary); }
.mc-body { display: inline-flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.mc-note { font-size: var(--fs-footnote); color: var(--text-tertiary); }

/* main config columns (merged card, two columns + divider) */
.cfg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-6); align-items: stretch; }
.cfg-col { min-width: 0; display: flex; flex-direction: column; }
.cfg-col + .cfg-col { padding-left: var(--sp-6); border-left: 1px solid var(--border-hairline); }
@media (max-width: 1080px) { .strat-mini-row { grid-template-columns: 1fr; } .cfg-split { grid-template-columns: 1fr; gap: var(--sp-5) 0; } .cfg-col + .cfg-col { padding-left: 0; border-left: 0; padding-top: var(--sp-5); border-top: 1px solid var(--border-hairline); } }

/* compact setting block at top of each column */
.cfg-mini { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-4); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5); border-radius: var(--r-md); background: var(--surface-inset); border: 1px solid var(--border-hairline); min-height: 56px; box-sizing: border-box; }
.cm-head { display: inline-flex; align-items: center; gap: var(--sp-2); font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); white-space: nowrap; }
.cm-head [data-lucide] { width: 16px; height: 16px; color: var(--text-tertiary); }
.cm-body { display: inline-flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.mc-note { font-size: var(--fs-footnote); color: var(--text-tertiary); }
.cfg-head { display: flex; align-items: center; gap: var(--sp-3); }
.cfg-head h3 { font: var(--text-headline); margin: 0; letter-spacing: var(--ls-body); }
.cfg-sub { font-size: var(--fs-footnote); color: var(--text-tertiary); margin: 4px 0 var(--sp-4); text-wrap: pretty; }

/* control rows */
.ctrl-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

/* number field */
.num-field { display: inline-flex; align-items: center; gap: var(--sp-2); height: var(--control-md); padding: 0 var(--sp-3); border-radius: var(--r-md); background: var(--surface-card); border: 1px solid var(--border-hairline); }
.num-field:focus-within { border-color: var(--accent); }
.num-field.is-disabled { opacity: 0.45; pointer-events: none; }
.num-field .nf-lead { font-size: var(--fs-subhead); color: var(--text-tertiary); white-space: nowrap; }
.num-field input { border: 0; background: transparent; outline: none; color: var(--text-primary); font: var(--fw-semibold) var(--fs-callout) var(--font-sans); font-variant-numeric: tabular-nums; text-align: right; }
.num-field .nf-unit { font-size: var(--fs-footnote); color: var(--text-tertiary); white-space: nowrap; }
.inline-ex { font-size: var(--fs-footnote); color: var(--text-tertiary); }
.inline-ex b { color: var(--text-secondary); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }

/* switch row */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.sr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-title { font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); }
.sr-desc { font-size: var(--fs-footnote); color: var(--text-tertiary); }

/* sizing options (radio cards) */
.opt-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.opt-card { border: 1px solid var(--border-hairline); border-radius: var(--r-md); padding: var(--sp-4); cursor: pointer; transition: var(--t-hover); background: var(--surface-inset); }
.opt-card:hover { border-color: var(--border-strong); }
.opt-card.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface-inset)); box-shadow: var(--shadow-sm); }
.opt-head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.opt-radio { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--border-strong); position: relative; transition: border-color var(--dur-base) var(--ease-out); }
.opt-card.is-active .opt-radio { border-color: var(--accent); }
.opt-card.is-active .opt-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.opt-titles { display: flex; flex-direction: column; gap: 2px; }
.opt-title { font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); }
.opt-desc { font-size: var(--fs-footnote); color: var(--text-tertiary); }
.opt-body { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); padding-top: var(--sp-4); padding-left: calc(18px + var(--sp-3)); border-top: 1px solid var(--border-hairline); }

/* checkbox row */
.ratio-rows { display: grid; grid-template-columns: max-content max-content; gap: var(--sp-3) var(--sp-4); align-items: center; }
.rr-lead { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-subhead); color: var(--text-secondary); white-space: nowrap; }
.rr-lead.is-check { cursor: pointer; }
.rr-lead input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: none; margin: 0; }
.rr-check-slot { width: 16px; flex: none; }
.ratio-rows .inline-ex { white-space: nowrap; }
.check-row { display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-subhead); color: var(--text-secondary); }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: none; }
.check-row .cr-label { font-weight: var(--fw-semibold); color: var(--text-primary); }
.check-row .cr-hint { font-size: var(--fs-footnote); color: var(--text-quaternary); }
.opt-ex { font-size: var(--fs-footnote); color: var(--text-tertiary); margin: 0; line-height: 1.4; }
.opt-ex b { color: var(--accent); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }

/* risk sub-blocks */
.sub-block { padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-inset); display: flex; flex-direction: column; gap: var(--sp-3); }
.sub-block + .sub-block { margin-top: var(--sp-3); }
.sub-controls { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border-hairline); }
.seg-help { font-size: var(--fs-footnote); color: var(--text-tertiary); margin: 0; line-height: 1.4; }
.seg-help b { color: var(--text-secondary); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }

/* follows-page strategy banner */
.strat-banner { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--gutter); border-radius: var(--r-lg); background: var(--surface-card); border: 1px solid var(--border-hairline); box-shadow: var(--shadow-sm), var(--inner-highlight); }
.sb-left { display: flex; align-items: center; gap: var(--sp-3); }
.sb-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none; }
.sb-icon [data-lucide] { width: 18px; height: 18px; }
.sb-left > div { display: flex; flex-direction: column; gap: 1px; }
.sb-k { font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--text-tertiary); }
.sb-sizing { font: var(--fw-semibold) var(--fs-callout) var(--font-sans); color: var(--text-primary); }
.sb-chips { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; flex: 1; }
.sb-chip { font-size: var(--fs-footnote); color: var(--text-secondary); background: var(--surface-inset); border-radius: var(--r-pill); padding: 3px var(--sp-3); white-space: nowrap; }

.page-scroll { flex: 1; overflow-y: auto; padding: var(--page-pad); }
.page-inner { max-width: var(--maxw-content); margin: 0 auto; display: flex; flex-direction: column; gap: var(--gutter); }

/* ---- Section heads ---- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.sec-head h2 { font: var(--text-section); margin: 0; letter-spacing: var(--ls-title); }
.sec-head .sec-sub { font-size: var(--fs-subhead); color: var(--text-tertiary); margin-top: 2px; }
.sec-actions { display: flex; align-items: center; gap: var(--sp-3); }
/* 钱包采集按钮容器 */
.sample-trigger { position: relative; display: inline-flex; }
.wallet-cell { position: relative; display: inline-flex; align-items: center; gap: 8px; }

/* ---- Tables ---- */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.ps-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ps-table thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: var(--sp-3) var(--sp-3);
  font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label);
  color: var(--text-tertiary); white-space: nowrap;
  border-bottom: 1px solid var(--border-hairline);
  /* 纯 transparent,不加任何 backdrop-filter:表头就是卡片表面本身,和表体物理同色,
     不会因二次合成/saturate 而发亮。滚动时由 .tbl-wrap 的卡片底色兜底。 */
  background: transparent;
}
.ps-table tbody td { padding: var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--border-hairline); vertical-align: middle; }
.ps-table tbody tr:last-child td { border-bottom: 0; }
.ps-table tbody tr.clickable { cursor: pointer; }
.ps-table tbody tr.clickable:hover { background: var(--surface-inset); }
.ps-table .num { font-variant-numeric: tabular-nums; }
.ps-table .strong { font-weight: var(--fw-semibold); color: var(--text-primary); }
.ps-table .muted { color: var(--text-tertiary); font-size: var(--fs-footnote); }
/* P&L semantic coloring — must win over .ps-table .strong */
.ps-table .pnl-up.strong, .ps-table td.pnl-up .strong { color: var(--pnl-up); }
.ps-table .pnl-down.strong, .ps-table td.pnl-down .strong { color: var(--pnl-down); }
.ps-table td.pnl-flat .strong { color: var(--text-primary); }
.cell-stack { display: flex; flex-direction: column; gap: 2px; }

.row-action { text-align: right; white-space: nowrap; }

.fav-btn { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--text-quaternary); line-height: 1; transition: transform var(--dur-fast) var(--ease-spring); }
.fav-btn:hover { color: var(--status-warn); }
.fav-btn.on { color: var(--status-warn); }
.fav-btn:active { transform: scale(1.3); }

/* ---- Team line / match cell (helper parts) ---- */
.team-mono {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; background: color-mix(in srgb, var(--team) 22%, transparent);
  color: var(--team); border: 1px solid color-mix(in srgb, var(--team) 45%, transparent);
  font: var(--fw-bold) 10px/1 var(--font-sans); letter-spacing: 0;
}
.team-line { display: flex; align-items: center; gap: var(--sp-3); }
.team-line .team { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.team-line .team-name { font-weight: var(--fw-semibold); font-size: var(--fs-callout); color: var(--text-primary); white-space: nowrap; }
.team-line .vs { font: var(--fw-bold) var(--fs-caption)/1 var(--font-sans); color: var(--text-quaternary); text-transform: uppercase; letter-spacing: 0.08em; }

/* held-side highlight: the outcome(s) we bought are colored by side (a=coral,
   b=teal), the non-held side is muted. Both sides held (对手盘/自对冲) → both lit. */
.team-line .team.is-held .team-name { font-weight: var(--fw-bold); }
.team-line .team.s-a.is-held .team-name { color: var(--side-a); }
.team-line .team.s-b.is-held .team-name { color: var(--side-b); }
.team-line .team.is-muted .team-name { color: var(--text-tertiary); font-weight: var(--fw-medium); }

/* outcome side chip (买入边标) — used in follow detail per-wallet + hero summary */
.side-chips { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.side-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-caption); font-weight: var(--fw-semibold); white-space: nowrap; }
.side-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.side-chip.s-a { color: var(--side-a); background: color-mix(in srgb, var(--side-a) 13%, transparent); }
.side-chip.s-b { color: var(--side-b); background: color-mix(in srgb, var(--side-b) 13%, transparent); }
.mh-teamrow { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.mh-held { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.mh-held-label { font-size: var(--fs-footnote); color: var(--text-tertiary); }

/* icon-only 刷新盘口价 按钮:刷新中让刷新符号自转(比换成 spinner 更克制好看) */
.mh-refresh.spinning { pointer-events: none; }
.mh-refresh.spinning svg { animation: mh-refresh-spin 0.8s linear infinite; transform-origin: center; }
@keyframes mh-refresh-spin { to { transform: rotate(360deg); } }

/* both-sides-held marker (列表/详情) — amber, distinct from side colors */
.dual-tag { margin-left: var(--sp-2); padding: 1px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--status-warn); background: var(--status-warn-soft); white-space: nowrap; }

.match-cell { display: flex; flex-direction: column; gap: 5px; }
.match-game { display: flex; align-items: center; gap: var(--sp-2); }
.match-meta { font-size: var(--fs-footnote); color: var(--text-tertiary); }
.match-times { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-footnote); color: var(--text-quaternary); }
.dot-sep { opacity: 0.5; }

/* extra badge tone for the watch-list "已跟单" mark — blue, distinct from
   accent(未开始) and the up-green(进行中) status pills. */
.ps-badge.t-info { --_bg: var(--info-soft); --_fg: var(--info); }

/* market-type tag next to a followed match name (主盘 / 地图 / 单局) */
.mkt-tag { margin-left: var(--sp-2); padding: 1px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--text-secondary); background: var(--surface-inset); white-space: nowrap; }

/* ---- Event countdown + status ---- */
.evt-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.evt-count { font-size: var(--fs-footnote); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

/* ---- Pagination (Apple-minimal) ---- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-5); }
.pager-range { font-size: var(--fs-footnote); color: var(--text-tertiary); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.pager-range em { font-style: normal; color: var(--text-quaternary); }
.pager-nav { display: flex; align-items: center; gap: 3px; }
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 7px;
  border: 0; background: transparent; border-radius: 11px;
  color: var(--text-secondary);
  font: var(--fw-medium) var(--fs-subhead)/1 var(--font-sans); font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}
.pg-btn:hover:not(:disabled):not(.is-active) { background: var(--surface-inset); color: var(--text-primary); }
.pg-btn:active:not(:disabled) { transform: scale(0.9); }
.pg-btn.is-active {
  background: var(--accent-soft); color: var(--accent); font-weight: var(--fw-semibold);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  cursor: default;
}
.pg-btn.pg-arrow { color: var(--text-tertiary); }
.pg-btn.pg-arrow:disabled { color: var(--text-quaternary); opacity: 0.55; cursor: not-allowed; }
.pg-ellipsis { display: inline-flex; align-items: flex-end; justify-content: center; min-width: 22px; height: 34px; padding-bottom: 6px; color: var(--text-quaternary); font-size: var(--fs-subhead); }

/* page-change fade for table bodies */
/* 仅透明度淡入:不要 translateY,否则切页动画期间内容下推会瞬时溢出 page-scroll 触发滚动条闪现。 */
.tbl-fade { animation: pageFade var(--dur-slow) var(--ease-out); }
@keyframes pageFade { from { opacity: 0.4; } to { opacity: 1; } }

/* ---- Toolbar row in panels ---- */
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: var(--sp-2); }
.filter-group label { font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--text-tertiary); }
.ps-select {
  appearance: none; height: var(--control-sm); padding: 0 var(--sp-7) 0 var(--sp-3);
  border-radius: var(--r-pill); border: 1px solid var(--border-hairline);
  background: var(--surface-inset) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center;
  color: var(--text-primary); font: var(--fw-semibold) var(--fs-subhead)/1 var(--font-sans); cursor: pointer;
}
.ps-select:focus-visible { border-color: var(--accent); outline: none; }

/* ---- Stake field (topbar) ---- */
.stake-field { display: flex; flex-direction: column; gap: 5px; }
.stake-field > span { font: var(--text-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--text-tertiary); }
.stake-input-wrap { display: flex; align-items: center; gap: 4px; height: var(--control-sm); padding: 0 var(--sp-3); border-radius: var(--r-pill); background: var(--surface-inset); border: 1px solid var(--border-hairline); }
.stake-input-wrap:focus-within { border-color: var(--accent); }
.stake-input-wrap input { width: 48px; border: 0; background: transparent; outline: none; color: var(--text-primary); font: var(--fw-semibold) var(--fs-subhead) var(--font-sans); font-variant-numeric: tabular-nums; text-align: right; }
.stake-input-wrap .unit { font-size: var(--fs-footnote); color: var(--text-tertiary); }

.empty-cell { text-align: center; color: var(--text-tertiary); padding: var(--sp-9) 0; }

.theme-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-toggle-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sidebar-muted); }
.theme-toggle-label svg { width: 16px; height: 16px; }
.theme-toggle-label [data-lucide="moon"],
[data-theme="dark"] .theme-toggle-label [data-lucide="sun"] { display: none; }
[data-theme="dark"] .theme-toggle-label [data-lucide="moon"] { display: block; }
.theme-toggle .ps-switch { min-width: 44px; min-height: 44px; justify-content: center; border-radius: 5px; }
.theme-toggle .ps-switch .ps-switch-track {
  box-sizing: border-box; width: 32px; height: 18px;
  border: 1px solid var(--sidebar-muted); background: var(--sidebar-selected); box-shadow: none;
}
.theme-toggle .ps-switch.on .ps-switch-track { background: #4a4945; }
.theme-toggle .ps-switch .ps-switch-thumb {
  top: 2px; left: 2px; width: 12px; height: 12px;
  background: #fff; border: 1px solid var(--sidebar-muted); box-shadow: none;
}
.theme-toggle .ps-switch.on .ps-switch-thumb { border-color: transparent; transform: translateX(14px); }
@media (max-width: 640px) {
  .theme-toggle { flex-direction: column; gap: 0; }
  .theme-toggle-label > span { display: none; }
}

@media (max-width: 980px) {
}
