* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column;
  background: #131722; color: #d1d4dc;
  font: 13px/1.4 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid #2a2e39;
}
.toolbar form { display: flex; align-items: center; gap: 6px; }
.toolbar input {
  width: 110px; padding: 4px 6px; text-transform: uppercase;
  background: #1e222d; color: inherit; border: 1px solid #363a45; border-radius: 4px;
}
.toolbar select {
  padding: 4px 6px;
  background: #1e222d; color: inherit; border: 1px solid #363a45; border-radius: 4px;
}
.combo { position: relative; }
.combo-panel {
  position: absolute; top: calc(100% + 2px); left: 0; z-index: 10;
  width: 300px; max-height: 380px; overflow-y: auto;
  background: #1e222d; border: 1px solid #363a45; border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.combo-panel ul { list-style: none; margin: 0; padding: 2px 0; }
.combo-panel li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 8px; cursor: pointer;
}
.combo-panel li:hover { background: #2a2e39; }
.combo-panel li[aria-selected="true"] { background: #2962ff; color: #fff; }
.combo-panel .name { color: #8b8f9a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-panel li[aria-selected="true"] .name { color: #e0e3eb; }
.combo-panel .empty { color: #8b8f9a; cursor: default; }
.combo-note { margin: 0; padding: 4px 8px; color: #8b8f9a; border-top: 1px solid #2a2e39; }
.zoom { display: flex; gap: 4px; }
.zoom button { min-width: 30px; }
button {
  padding: 4px 10px; cursor: pointer;
  background: #1e222d; color: inherit; border: 1px solid #363a45; border-radius: 4px;
}
button:hover { border-color: #5d606b; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #2962ff; outline-offset: 1px; }
#periods { display: flex; flex-wrap: wrap; gap: 4px; }
#periods button[aria-pressed="true"], #chan-toggle.active, #block-toggle.active { background: #2962ff; border-color: #2962ff; color: #fff; }
.chan-menu, .block-menu { position: relative; }
.chan-panel {
  position: absolute; top: calc(100% + 2px); left: 0; z-index: 10;
  min-width: 140px; margin: 0; padding: 6px 4px;
  background: #1e222d; border: 1px solid #363a45; border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.chan-panel legend { float: left; width: 100%; padding: 0 8px 4px; color: #8b8f9a; font-size: 12px; }
/* 标题行右侧的关闭/打开按钮 */
.chan-panel .chan-off { position: absolute; top: 4px; right: 6px; padding: 1px 8px; font-size: 12px; }
/* 阻塞面板关闭按钮左边的保存，没改动时灰掉 */
.chan-panel .block-save { right: 54px; }
.chan-panel .block-save:disabled { opacity: 0.4; cursor: default; }
.chan-panel label { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.chan-panel label:hover { background: #2a2e39; }
.chan-panel input { width: auto; margin: 0; padding: 0; accent-color: #2962ff; }
.chan-panel .swatch { width: 16px; height: 3px; border-radius: 2px; }
.chan-panel .lv { margin-left: auto; padding: 0 2px 0 12px; background: none; border: none; color: #8b8f9a; font-size: 12px; text-decoration: underline dotted; text-underline-offset: 3px; }
.chan-panel .lv:hover { text-decoration-style: solid; }
/* 取色器不占位置，点 lv 时从这里弹出 */
/* 阻塞能量面板：参数输入框靠右 */
.block-panel { min-width: 230px; }
.block-panel input[type="number"] { width: 64px; margin-left: auto; padding: 1px 4px; }
.block-panel .note { max-width: 260px; padding: 4px 8px 0; color: #8b8f9a; font-size: 12px; white-space: normal; }
.chan-panel .lv-pick { position: absolute; right: 8px; width: 0; height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
#status { color: #8b8f9a; }
#status.error { color: #ef5350; }
.chart-wrap { position: relative; flex: 1; min-height: 300px; }
#chart { position: absolute; inset: 0; }
.legend {
  position: absolute; top: 6px; left: 12px; z-index: 2; pointer-events: none;
  display: flex; flex-wrap: wrap; gap: 10px; font-variant-numeric: tabular-nums;
}
.legend .up { color: #ef5350; }
.legend .down { color: #26a69a; }
.legend .avg { color: #f5c242; }
/* 点开平仓标注点弹出的触发规则 */
.mark-tip {
  position: absolute; z-index: 5; max-width: 360px; padding: 8px 10px;
  background: #1e222d; border: 1px solid #363a45; border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.mark-tip .tip-title { display: block; margin-bottom: 4px; font-weight: 600; }
.mark-tip dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.mark-tip dt { color: #8b8f9a; }
.mark-tip dd { margin: 0; }

/* ---------- 量化交易面板 ---------- */
#users-open { margin-left: auto; }
/* ---------- 用户管理 ---------- */
.users-dialog {
  --panel: #181c27; --field: #1e222d; --line: #2a2e39; --line2: #363a45;
  --muted: #8b8f9a; --dim: #6a6d78; --accent: #2962ff;
  width: min(1200px, 96vw); height: 80vh; padding: 12px 16px 16px;
  background: #131722; color: #d1d4dc; border: 1px solid var(--line2); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.users-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.users-head { display: flex; align-items: center; }
.users-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.users-close { margin-left: auto; width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; }
.users-dialog h3 { margin: 14px 0 6px; font-size: 13px; }
.users-dialog table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.users-dialog th, .users-dialog td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.users-dialog th { color: var(--muted); font-weight: normal; }
.users-ops { display: flex; gap: 4px; }
.users-dialog .online { color: #26a69a; }
.users-dialog button.small { height: 26px; padding: 0 10px; font-size: 12px; }
.users-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
.users-dialog input:not([type="checkbox"]) {
  width: 100%; height: 30px; padding: 4px 8px; font: inherit;
  background: var(--field); color: inherit; border: 1px solid var(--line2); border-radius: 4px;
}
.users-dialog input:disabled { opacity: 0.6; }
.users-dialog .field { display: flex; flex-direction: column; gap: 4px; }
.users-dialog .field > label { color: var(--muted); font-size: 12px; }
.users-dialog .field.end { justify-content: flex-end; }
.users-dialog .hint { color: var(--dim); font-size: 11px; }
.users-dialog .actions { display: flex; gap: 8px; margin-top: 10px; }
.users-dialog .muted { color: var(--muted); }
.users-dialog .up { color: #ef5350; }
.users-dialog .down { color: #26a69a; }
.users-dialog td.num, .users-dialog th.num { text-align: right; }
.users-rebate { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.users-dialog .users-rebate input { width: 80px; }
.users-search { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.users-dialog .users-search input { width: 220px; }
.users-pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#trade-open[aria-expanded="true"] { background: #2962ff; border-color: #2962ff; color: #fff; }
.drawer {
  --panel: #181c27; --field: #1e222d; --line: #2a2e39; --line2: #363a45;
  --muted: #8b8f9a; --dim: #6a6d78; --accent: #2962ff;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(var(--drawer-width, 680px), 100vw); display: flex; flex-direction: column;
  background: #131722; border-left: 1px solid var(--line2); box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
}
.drawer[hidden] { display: none; }
.drawer-resize { position: absolute; top: 0; bottom: 0; left: -4px; width: 8px; z-index: 1; cursor: ew-resize; touch-action: none; }
.drawer-resize:hover, .drawer-resize:focus-visible { background: var(--accent); outline: none; }
.drawer.resizing, .drawer.resizing * { cursor: ew-resize; user-select: none; }
.drawer.full .drawer-resize { display: none; }
.drawer-head {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.drawer-head #trade-max { margin-left: auto; }
.drawer-head #trade-max, .drawer-head #trade-close { width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; }
.drawer.full { width: 100vw; border-left: 0; }
.tabs { display: flex; gap: 2px; padding: 2px; background: var(--field); border-radius: 6px; }
.drawer .tabs button { height: 26px; border: 0; background: none; padding: 0 14px; border-radius: 4px; color: var(--muted); }
.drawer .tabs button:hover { color: #d1d4dc; }
.drawer .tabs [aria-selected="true"] { background: var(--accent); color: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 0; }

/* 输入控件 */
.drawer input, .drawer select, .drawer textarea {
  width: 100%; height: 30px; padding: 4px 8px; font: inherit;
  background: var(--field); color: inherit; border: 1px solid var(--line2); border-radius: 4px;
}
.drawer textarea { height: auto; min-height: 52px; resize: vertical; text-transform: uppercase; }
.drawer input:hover, .drawer select:hover, .drawer textarea:hover { border-color: #5d606b; }
.drawer input[type="checkbox"], .drawer input[type="radio"] {
  width: 14px; height: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--accent);
}
.drawer :disabled { opacity: 0.5; cursor: not-allowed; }
.drawer textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 分组卡片 */
.note { margin: 0 0 12px; padding: 8px 10px; color: var(--muted); background: var(--panel);
  border-left: 3px solid var(--accent); border-radius: 4px; }
.group { margin: 0 0 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.group-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; margin-bottom: 10px; }
.group-title h3 { margin: 0; font-size: 13px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.grid.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid + .grid, .grid + .preview, .acct + .grid { margin-top: 12px; }
.grid[hidden], .field[hidden], .params[hidden], .acct[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field.end { justify-content: flex-end; align-items: flex-start; }
/* 策略参数：同一行有的标题折成两行时，输入框按底边对齐 */
.params > .field { justify-content: flex-end; }
.field > label, .field > .label { color: var(--muted); font-size: 12px; }
.hint { color: var(--dim); font-size: 11px; }
.muted { color: var(--muted); }
.empty { margin: 4px 0; padding: 10px; color: var(--muted); background: #131722;
  border: 1px dashed var(--line2); border-radius: 4px; }
.warn { color: #f5c242; }
.warn ul { margin: 4px 0; padding-left: 18px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* 多个交易：每个交易一张可收起的卡片 */
.trades-title { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.trades-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.trades-title .hint { flex: 1; min-width: 0; }
.trades { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.trade { border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 6px; background: #131722; }
.trade-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 4px; }
.drawer button.trade-toggle { flex: 1; min-width: 0; height: auto; display: flex; align-items: baseline; gap: 10px;
  padding: 6px 8px; border: 0; background: none; text-align: left; color: inherit; }
.trade-toggle::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.trade-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.trade-toggle:hover .trade-name { color: #fff; }
.trade-name { flex: none; font-weight: 600; }
.trade-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.trade-pnl { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-pnl[hidden] { display: none; }
.trade-pnl small { color: var(--dim); font-size: 11px; font-weight: normal; }
.trade-body { padding: 0 10px 2px; }
.trade-body[hidden] { display: none; }
.trade-body .group { margin-bottom: 10px; }
button.ghost-plain { background: none; color: var(--muted); }
button.ghost-plain:hover:not(:disabled) { color: #d1d4dc; }

/* 分段选择（单选按钮组） */
.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; background: var(--field);
  border: 1px solid var(--line2); border-radius: 5px; }
.seg label { position: relative; cursor: pointer; }
.drawer .seg input[type="radio"], .drawer .seg input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 3px 12px; border-radius: 3px; color: var(--muted); white-space: nowrap; }
.seg label:hover span { color: #d1d4dc; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg input:disabled + span { opacity: 0.5; }
.seg.wrap { flex-wrap: wrap; }

/* 策略 */
.sub + .sub { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sub-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sub-title h4 { margin: 0; font-size: 13px; font-weight: 500; }
.logic { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.drawer .logic select { width: auto; height: 26px; }
.rules { display: flex; flex-direction: column; gap: 6px; }
.rule { padding: 8px 10px; background: #131722; border: 1px solid var(--line); border-radius: 4px; }
.rule:has(> .check input:checked) { border-color: rgba(41, 98, 255, 0.6); }
.rule-name { font-weight: 500; }
.tag { padding: 0 6px; color: var(--dim); background: var(--field); border-radius: 3px; font-size: 11px; }
.tag.only-long { color: #f5c242; background: rgba(245, 194, 66, 0.1); cursor: help; }
.tag.chan { color: #7aa2ff; background: rgba(41, 98, 255, 0.12); cursor: help; }
.pair { margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(245, 194, 66, 0.35); border-radius: 4px;
  background: rgba(245, 194, 66, 0.04); }
.pair-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: #f5c242; }
.pair-rule + .pair-rule { margin-top: 8px; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* 账户概览 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.acct-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.card { min-width: 0; padding: 8px 10px; background: #131722; border: 1px solid var(--line); border-radius: 4px; }
.card[title] { cursor: help; }
.card dt { color: var(--muted); font-size: 12px; }
.card dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card dd.sub-val { font-size: 11px; font-weight: normal; color: var(--dim); }
.drawer .up { color: #ef5350; }
.drawer .down { color: #26a69a; }
.drawer .strong { font-weight: 600; }
/* 操作栏：滚动时固定在面板底部 */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.key-actions { grid-column: 1 / -1; }
.actions.sticky { position: sticky; bottom: 0; z-index: 3; margin: 0 -16px 10px; padding: 10px 16px;
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.25); }
.spacer { flex: 1; }
/* 模拟盘"同步到实盘"：勾选要追加的交易 */
.sync-box { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.sync-box[hidden] { display: none; }
.sync-box legend { padding: 0 4px; }
.sync-box .check:has(input:disabled) { cursor: default; opacity: 0.6; }
.drawer button { height: 30px; padding: 0 14px; }
.drawer button.small { height: 28px; padding: 0 12px; font-size: 12px; }
.drawer button.link { height: auto; padding: 0; border: 0; background: none; color: #5b8cff; font-size: 12px; }
.drawer button.link:hover { text-decoration: underline; }
button.primary { background: #2962ff; border-color: #2962ff; color: #fff; font-weight: 500; }
button.primary:hover:not(:disabled) { background: #1e53e5; }
button.ghost { background: none; color: var(--muted); }
button.ghost:hover:not(:disabled) { color: #ef5350; border-color: #ef5350; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.badge { padding: 2px 10px; border-radius: 10px; background: var(--field); color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: currentColor; vertical-align: 1px; }
.badge.on { background: rgba(239, 83, 80, 0.15); color: #ef5350; }
.msg { margin: 0 0 10px; color: var(--muted); }
.msg:empty { display: none; }
.msg.error { color: #ef5350; }
.run-info { margin: 0 0 10px; color: var(--muted); }
.run-info:empty, .run-info[hidden] { display: none; }
.preview:empty { display: none; }
.preview p { margin: 2px 0; }
progress { width: 180px; height: 6px; accent-color: #2962ff; }
/* 按钮一行放不下时进度条先缩短（按 40px 算换行）；实在放不下，右边的按钮整组换到下一行并靠右 */
.actions progress { flex: 1 1 40px; max-width: 180px; width: auto; }
.actions .btns { display: flex; gap: 10px; margin-left: auto; }

/* 结果与表格 */
.bt-result h3 { margin: 16px 0 6px; font-size: 14px; }
.bt-result h4 { margin: 14px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.bt-result > p { margin: 4px 0; }
/* 获利能力标题旁的多空下拉框 */
.with-pick { display: flex; align-items: center; gap: 8px; }
.drawer select.side-pick { width: auto; height: 24px; padding: 1px 6px; font-size: 12px; font-weight: 400; }
.table-wrap { margin: 12px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.event-records { margin: 12px 0; }
.event-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.event-filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.event-pagination label { display: flex; align-items: center; gap: 4px; }
.drawer .event-pagination select { width: auto; }
.event-pagination .muted { flex: 1; }
.drawer table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer caption { padding: 8px 10px; text-align: left; font-weight: 600; background: var(--panel); }
.drawer th, .drawer td { padding: 6px 10px; border-top: 1px solid var(--line); text-align: right; }
.drawer th:first-child, .drawer td:first-child { text-align: left; }
.drawer th { color: var(--muted); font-size: 12px; font-weight: normal; background: var(--panel); }
.drawer tbody tr:hover { background: var(--panel); }
.paper-status > p.muted { margin: 10px 0; }
.bt-chart { position: relative; height: 260px; margin: 12px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
/* 收益曲线：小图点击放大 */
.curve { margin: 12px 0; }
.curve[hidden] { display: none; }
.curve-head, .modal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.curve-head h4 { margin: 0; font-size: 13px; font-weight: 600; color: inherit; }
.curve-info { font-variant-numeric: tabular-nums; }
.drawer select.curve-sym { width: auto; max-width: 180px; height: 28px; padding: 2px 6px; }
.warn-text { color: #f5c242; }
.curve-modes { display: flex; gap: 2px; padding: 2px; background: var(--field); border-radius: 6px; }
.drawer .curve-modes button { height: 24px; padding: 0 10px; border: 0; background: none; color: var(--muted); }
.drawer .curve-modes button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.curve .curve-box { margin-top: 8px; cursor: zoom-in; }
.chart-modal { position: fixed; inset: 0; z-index: 30; display: flex; padding: 32px;
  background: rgba(0, 0, 0, 0.6); }
.modal-box { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #131722;
  border: 1px solid var(--line2); border-radius: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.modal-head { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); border-radius: 8px 8px 0 0; }
.modal-head h3 { margin: 0; font-size: 14px; }
.drawer .modal-close { width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; }
.modal-chart { position: relative; flex: 1; min-height: 0; }
@media (max-width: 560px) { .chart-modal { padding: 0; } }
.acct-fold { margin-top: 16px; }
.acct-fold > summary { padding: 6px 0; cursor: pointer; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); }
.logs { margin: 12px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.logs summary { padding: 8px 10px; cursor: pointer; font-weight: 600; background: var(--panel); }
.logs ol { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.logs li { padding: 4px 10px; border-top: 1px solid var(--line); }
.logs li time { margin-right: 8px; color: var(--dim); font-variant-numeric: tabular-nums; }
.logs li.warn { color: #f5c242; }
.logs li.error { color: #ef5350; }
.logs > p { margin: 0; padding: 8px 10px; }
@media (max-width: 560px) {
  .grid, .grid.cols4, .acct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 管理员登录页、修改密码 */
.login-page { align-items: center; justify-content: center; }
.login-box {
  display: flex; flex-direction: column; gap: 6px; width: min(320px, 90vw); padding: 20px 24px;
  background: #181c27; border: 1px solid #363a45; border-radius: 8px;
}
.login-box h1 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.login-box label { color: #8b8f9a; font-size: 12px; }
.login-box input {
  height: 32px; padding: 4px 8px; font: inherit;
  background: #1e222d; color: inherit; border: 1px solid #363a45; border-radius: 4px;
}
.login-box button { height: 32px; margin-top: 10px; background: #2962ff; border-color: #2962ff; color: #fff; }
.login-msg { min-height: 1.4em; margin: 4px 0 0; color: #ef5350; }
.pw-dialog { width: min(360px, 94vw); height: auto; }
.pw-dialog form { display: flex; flex-direction: column; gap: 10px; }
.pw-msg { min-height: 1.4em; margin: 0; color: #26a69a; }
.pw-msg.error { color: #ef5350; }
