:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #e3e8ee;
  --line-2: #eef1f5;
  --text: #101828;
  --text-2: #475467;
  --muted: #7a8699;
  --accent: #3366d6;
  --accent-soft: #e9effc;
  --good: #0b6b57;          /* 赚（文字） */
  --bad: #b23a0a;           /* 亏（文字） */
  --good-soft: #e3f4ee;
  --bad-soft: #fcebe3;
  --mk-pos: #11866f;        /* 赚（图） */
  --mk-neg: #c2410c;        /* 亏（图） */
  --mk-line: #2d5da8;
  --up: #2a78d6;            /* Up / 第一个结果 */
  --down: #4a3aa7;          /* Down / 第二个结果 */
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --new: #fff6cc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --hover: #f2f5f9;
  --grid: #edf0f4;
  --axis: #c6ccd4;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f15; --surface: #111821; --surface-2: #161f2a; --line: #212c39; --line-2: #1a2430;
    --text: #e9eef4; --text-2: #b4c0cc; --muted: #7f8ea0; --accent: #6ea0ff; --accent-soft: #17243a;
    --good: #4fcfac; --bad: #f2906c; --good-soft: #10291f; --bad-soft: #2f1a12;
    --mk-pos: #17a085; --mk-neg: #e2603c; --mk-line: #6f9be0; --up: #3987e5; --down: #9085e9;
    --warn: #f0c060; --warn-soft: #2e2611; --new: #2f2a10; --shadow: none; --hover: #18222e; --grid: #1b2531; --axis: #33404f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f15; --surface: #111821; --surface-2: #161f2a; --line: #212c39; --line-2: #1a2430;
  --text: #e9eef4; --text-2: #b4c0cc; --muted: #7f8ea0; --accent: #6ea0ff; --accent-soft: #17243a;
  --good: #4fcfac; --bad: #f2906c; --good-soft: #10291f; --bad-soft: #2f1a12;
  --mk-pos: #17a085; --mk-neg: #e2603c; --mk-line: #6f9be0; --up: #3987e5; --down: #9085e9;
  --warn: #f0c060; --warn-soft: #2e2611; --new: #2f2a10; --shadow: none; --hover: #18222e; --grid: #1b2531; --axis: #33404f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.zero { color: var(--text-2); }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; flex: none; }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }

/* ---------------- 顶栏 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b6fe0, #6a52d9); box-shadow: 0 2px 8px rgba(59, 111, 224, .35); }
.brand h1 { font-size: 17px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
a.pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sdot.ok { background: var(--mk-pos); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s infinite; }
.sdot.warn { background: #d29a00; box-shadow: 0 0 0 3px var(--warn-soft); }
.sdot.bad { background: var(--mk-neg); box-shadow: 0 0 0 3px var(--bad-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }
.ibtn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.ibtn:hover { color: var(--text); border-color: var(--axis); }
.ibtn svg { width: 16px; height: 16px; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 56px; display: flex; flex-direction: column; gap: 22px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

/* ---------------- 顶部三格 */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.kpi .lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: 13px; }
.kpi .lbl .chip { font-weight: 400; }
.kpi .big { font-size: 34px; font-weight: 650; line-height: 1.2; margin: 6px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi .sub b { font-weight: 600; }
.spark { height: 40px; margin-top: 8px; }
.spark svg { display: block; overflow: visible; }
.wl { display: flex; align-items: baseline; gap: 14px; font-size: 30px; font-weight: 650; margin: 6px 0 6px; letter-spacing: -.02em; }
.wl small { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 4px; letter-spacing: 0; }
.ratio { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--grid); margin: 4px 0 8px; }
.ratio i { display: block; height: 100%; }
.ratio .w { background: var(--mk-pos); }
.ratio .l { background: var(--mk-neg); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1;
  padding: 5px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  white-space: nowrap;
}
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chip.wait { background: var(--warn-soft); color: var(--warn); }
.chip.win { background: var(--good-soft); color: var(--good); }
.chip.lose { background: var(--bad-soft); color: var(--bad); }
.chip.gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }

/* ---------------- 当前盘口 */
.lc { container-type: inline-size; overflow: hidden; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 12px; }
.lc-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lc-title b { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-title .muted { font-size: 13px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mk-pos); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2s infinite; flex: none; }
.cd-pill { display: flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); flex: none; }
.cd-pill span { font-size: 12px; }
.cd-pill b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prog { height: 3px; background: var(--grid); }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #7a5cf0); transition: width 1s linear; }

.hero { display: grid; grid-template-columns: 1fr; grid-template-areas: "a" "b" "c"; border-bottom: 1px solid var(--line-2); }
.h-cell { padding: 16px 20px; min-width: 0; }
.h-a { grid-area: a; }
.h-b { grid-area: b; border-top: 1px solid var(--line-2); }
.h-c { grid-area: c; border-top: 1px solid var(--line-2); }
.h-l { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.h-v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.h-v.big { font-size: 32px; }
.h-v.sm { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.h-v.md { font-size: 24px; }
.btc2 { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.btc2 .r { text-align: right; }
.h-s { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.h-s b { font-weight: 650; font-variant-numeric: tabular-nums; }
.lead { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }

.pr-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.pr-top > .h-l { margin: 0 0 4px; }
.pr-side { display: flex; flex-direction: column; gap: 2px; }
.pr-side.r { align-items: flex-end; }
.pr-name { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 0; }
.pr-side.r .pr-name .dot { margin: 0 0 0 5px; }
.pr-pct { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.split { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--grid); }
.split i { display: block; height: 100%; transition: width .6s ease; }
.split .up { background: var(--up); }
.split .down { background: var(--down); }
.pr-bot { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-bot span:last-child { text-align: right; }
.pr-bot b { color: var(--text-2); font-weight: 600; }

.lc-bottom { display: grid; grid-template-columns: 1fr; }
.lc-pos, .lc-fl { padding: 14px 20px 16px; min-width: 0; }
.lc-fl { border-top: 1px solid var(--line-2); }
.sub-h { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 6px; }
table.hold-t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.hold-t th { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: right; padding: 0 0 6px; white-space: nowrap; }
table.hold-t th:first-child, table.hold-t td:first-child { text-align: left; color: var(--muted); font-weight: 400; }
table.hold-t td { padding: 6px 0; text-align: right; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line-2); white-space: nowrap; }
table.hold-t td.nil { color: var(--muted); }
.pos-meta { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }

@container (min-width: 560px) {
  .hero { grid-template-columns: 1fr 1fr; grid-template-areas: "a c" "b b"; }
  .h-c { border-top: 0; border-left: 1px solid var(--line-2); }
}
@container (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.5fr 1.15fr; grid-template-areas: "a b c"; }
  .h-b { border-top: 0; border-left: 1px solid var(--line-2); }
  .lc-bottom { grid-template-columns: minmax(280px, 1fr) 1.45fr; }
  .lc-fl { border-top: 0; border-left: 1px solid var(--line-2); }
}

.minis { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.minis:empty { display: none; }
.mini { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding: 12px 20px; }
.mini .t { display: flex; align-items: baseline; gap: 8px; }
.mini .t b { font-weight: 650; }
.mini .px, .mini .hold { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini .px b, .mini .hold b { color: var(--text); font-weight: 600; }
.mini .pl { margin-left: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mini .pl .l { font-size: 12px; color: var(--muted); }
.mini .pl b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini .pl .s { font-size: 12px; color: var(--muted); width: 100%; text-align: right; }

.fills { max-height: 236px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; font-size: 12.5px; scrollbar-width: thin; }
.fill { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.fill + .fill { border-top: 1px solid var(--line-2); }
.fill.new { background: var(--new); }
.fill .t { color: var(--muted); }
.fill .w { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.fill .w > span:not(.badge):not(.tag) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fill .a { text-align: right; color: var(--text-2); white-space: nowrap; }
.badge { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 5px; font-weight: 600; flex: none; }
.badge.buy { background: var(--accent-soft); color: var(--accent); }
.badge.sell { background: var(--warn-soft); color: var(--warn); }
.badge.merge { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge.redeem { background: var(--good-soft); color: var(--good); }
.tag { display: inline-block; font-size: 10.5px; line-height: 1; padding: 2px 5px; border-radius: 4px; border: 1px dashed var(--accent); color: var(--accent); flex: none; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.others { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.chip .dot { background: currentColor; }

/* ---------------- 图 */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { padding: 16px 18px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h3 { font-size: 14px; }
.chart { position: relative; width: 100%; height: 240px; }
.chart svg { display: block; overflow: visible; }
.chart .ax { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .ax-sel { fill: var(--accent); font-weight: 700; }
.chart .lab { font-size: 11px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: var(--hover); fill-opacity: .55; }
.chart .sel { fill: var(--accent-soft); }

.tip {
  position: fixed; z-index: 30; pointer-events: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  padding: 9px 11px; font-size: 12.5px; line-height: 1.6;
  max-width: 290px; font-variant-numeric: tabular-nums;
}
.tip b { font-weight: 600; }
.tip .k { color: var(--muted); }

/* ---------------- 每个盘口 */
.tbl-card { padding: 16px 18px 12px; }
.daynav { display: flex; gap: 6px; align-items: center; }
.btn, .daynav input, .seg button, .pager button, .pager select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 5px 11px; cursor: pointer; line-height: 1.4;
}
.btn:hover, .seg button:hover, .pager button:hover:not(:disabled) { border-color: var(--axis); background: var(--hover); }
.btn:disabled, .pager button:disabled { opacity: .4; cursor: default; }
.daynav input { cursor: text; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.stat { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; min-width: 0; }
.stat .l { font-size: 11.5px; color: var(--muted); display: block; }
.stat b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .s { font-size: 11.5px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.inc-line { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }

.tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 4px 12px; color: var(--text-2); }
.seg button:hover { background: var(--hover); border: 0; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.seg button .c { color: var(--muted); font-weight: 400; margin-left: 3px; font-size: 12px; }

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.mk { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 820px; }
table.mk th, table.mk td { padding: 9px 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.mk th { color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
table.mk td { border-bottom: 1px solid var(--line-2); }
table.mk td.l, table.mk th.l { text-align: left; }
table.mk td.name { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
table.mk tbody tr.row { cursor: pointer; }
table.mk tbody tr.row:hover td { background: var(--hover); }
table.mk tbody tr.open-row td { background: var(--hover); }
table.mk td.pnl { font-weight: 650; }
table.mk td.est-v { color: var(--muted); font-weight: 500; }
table.mk td.cum { color: var(--muted); }
table.mk tfoot td { font-weight: 600; border-bottom: none; border-top: 1px solid var(--line); }
table.mk .zero-cell { color: var(--muted); }
tr.detail td { background: var(--surface-2); padding: 10px 14px 14px; text-align: left; white-space: normal; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 18px; font-size: 12.5px; }
.detail-meta { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; line-height: 1.7; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; font-size: 13px; color: var(--muted); }
.pager .pg { display: flex; gap: 4px; flex-wrap: wrap; }
.pager button { min-width: 34px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.pager button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager .gap { padding: 4px 4px; }
.pager select { padding: 4px 8px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 12px; }

/* ---------------- 登录 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login .brand { margin-bottom: 4px; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.login input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login button { padding: 10px 12px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #3b6fe0, #6a52d9); color: #fff; cursor: pointer; font-weight: 600; }
.login .err { color: var(--bad); font-size: 13px; min-height: 1.2em; }

@media (max-width: 980px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:last-child { grid-column: 1 / -1; }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-in { padding: 8px 16px; }
  main { padding: 14px 16px 44px; gap: 18px; }
  .kpis { grid-template-columns: 1fr; }
  .kpi .big { font-size: 30px; }
  .chart-card, .tbl-card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .chart { height: 210px; }
  .est-main b { font-size: 24px; }
  .side-h .p { font-size: 19px; }
  .clock { display: none; }
}

/* ---------------- 策略 */
.agent-st { display: flex; gap: 6px; flex-wrap: wrap; }
.strats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sc { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sc.on { border-color: color-mix(in srgb, var(--mk-pos) 45%, var(--line)); box-shadow: 0 0 0 3px var(--good-soft); }
.sc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-h b { font-size: 15px; }
.sc-d { font-size: 12.5px; color: var(--text-2); }
.params { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.params span { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.params b { color: var(--text); font-weight: 600; }
.sline { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; word-break: break-all; }
.evs summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.evs div div { font-size: 12px; color: var(--text-2); padding: 2px 0; border-top: 1px solid var(--line-2); }
.sc-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; font-weight: 600; }
.flash { margin-top: 10px; font-size: 13px; padding: 8px 12px; border-radius: 10px; }
.flash.ok { background: var(--good-soft); color: var(--good); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.flash.wait { background: var(--warn-soft); color: var(--warn); }
.cmdlog { margin-top: 10px; font-size: 13px; }
.cmdlog summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.cmd { display: grid; grid-template-columns: 70px 1fr auto; gap: 4px 10px; padding: 4px 0; border-top: 1px solid var(--line-2); }
.cmd > span:last-child { grid-column: 2 / -1; }
dialog.dlg { border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text); width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.dlg::backdrop { background: rgba(10, 15, 21, .45); }
.dlg form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dlg h3 { font-size: 16px; }
.dlg input { display: block; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-top: 4px; }
.dlg .row { display: flex; justify-content: flex-end; gap: 8px; }
.dlg .err { color: var(--bad); min-height: 1em; }
