/* 收款网关面板 —— 无外部依赖，跟随系统深浅色 */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e3e6eb;
  --line-soft: #eef0f3;
  --text: #16181d;
  --text-2: #4b5260;
  --text-3: #8a919e;

  --accent: #2b59c3;
  --accent-strong: #1f47a3;
  --accent-soft: #e9effb;
  --on-accent: #ffffff;

  --ok: #1a8a4a;
  --ok-soft: #e6f4ec;
  --warn: #a15c00;
  --warn-soft: #fdf2e1;
  --err: #c0362c;
  --err-soft: #fbeae8;
  --idle: #6b7280;
  --idle-soft: #eef0f3;

  --chart: #2b59c3;
  --chart-soft: #c9d6f2;

  --wx: #07c160;
  --wx-soft: #e5f7ed;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);

  --radius: 12px;
  --radius-sm: 7px;
  --shadow-pop: 0 12px 40px rgba(16, 24, 40, .18);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #191c21;
    --surface-2: #1e2127;
    --line: #2b3038;
    --line-soft: #23272e;
    --text: #e8eaee;
    --text-2: #b0b6c1;
    --text-3: #7d8592;

    --accent: #7aa2f7;
    --accent-strong: #9ab8fa;
    --accent-soft: #1d2840;
    --on-accent: #0d1220;

    --ok: #4cc685;
    --ok-soft: #15291e;
    --warn: #e5a54b;
    --warn-soft: #2e2415;
    --err: #f07a6f;
    --err-soft: #321b19;
    --idle: #9aa1ab;
    --idle-soft: #23272e;

    --chart: #7aa2f7;
    --chart-soft: #2c3a5c;
    --wx: #3ad07f;
    --wx-soft: #14291d;
    --shadow-card: none;
    --shadow-pop: 0 16px 48px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.wrap { flex-wrap: wrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 外框 ───────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}
.brand-mark svg { width: 17px; height: 17px; }
.brand b { display: block; font-size: 14px; font-weight: 650; letter-spacing: .2px; }
.brand span { display: block; font-size: 11.5px; color: var(--text-3); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; text-decoration: none;
}
.nav a { position: relative; transition: background .12s, color .12s; }
.nav a:hover { background: var(--line-soft); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px;
  font-size: 11px; line-height: 18px; text-align: center;
  background: var(--err-soft); color: var(--err); font-weight: 600;
}

.side-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.side-foot .row { gap: 8px; }
.side-foot .addr { color: var(--text-2); font-family: var(--mono); font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.page-head {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 26px 32px 18px; max-width: 1180px; width: 100%;
}
.page-head h1 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: .2px; }
.page-head p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.view { padding: 0 32px 48px; max-width: 1180px; width: 100%; }

/* ── 通栏提示 ───────────────────────────────────── */
.banner {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 16px 32px 0; padding: 12px 16px; max-width: 1116px;
  border-radius: var(--radius); border: 1px solid transparent; font-size: 13px;
}
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner b { display: block; margin-bottom: 2px; }
.banner.err { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner .mono { color: var(--text); }

/* ── 卡片 ───────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 620; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 16px; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

/* ── 健康状态 ───────────────────────────────────── */
.health { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 118px; }
.health .label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.health .state { font-size: 16px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.health .detail { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.health .link { margin-top: auto; font-size: 12.5px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--idle); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.dot.idle { background: var(--idle); box-shadow: 0 0 0 3px var(--idle-soft); }

/* ── 指标 ───────────────────────────────────────── */
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--text-3); }
.kpi .value { margin-top: 6px; font-size: 26px; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--text-3); margin-right: 2px; }
.kpi .foot { margin-top: 6px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kpi .foot .err { color: var(--err); }
.kpi .foot .warn { color: var(--warn); }

/* ── 趋势图 ─────────────────────────────────────── */
.chart { position: relative; padding: 8px 20px 14px; }
.chart svg { display: block; width: 100%; height: 200px; overflow: visible; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart); }
.chart .bar.empty { fill: var(--line); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.hover { fill: var(--accent-strong); }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--text); color: var(--surface); border-radius: 6px;
  padding: 6px 9px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ── 列表 ───────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line-soft); min-width: 0; }
.list li:first-child { border-top: 0; }
.list .amount { font-weight: 620; font-variant-numeric: tabular-nums; min-width: 80px; }
.list .time { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: none; }
.list .msg { color: var(--text-2); font-size: 13px; }
.grow { flex: 1; min-width: 0; }

/* 可选列表（补单选订单） */
.list.pick { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 300px; overflow: auto; }
.list.pick li { padding: 10px 14px; cursor: pointer; font-size: 13px; }
.list.pick li:hover { background: var(--surface-2); }
.list.pick li[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.list.pick li[aria-disabled="true"] { cursor: default; opacity: .55; }
.list.pick li[aria-disabled="true"]:hover { background: none; }
.list.pick li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.empty { padding: 34px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty b { display: block; color: var(--text-2); font-weight: 600; margin-bottom: 4px; font-size: 13.5px; }

/* ── 表格 ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .r { text-align: right; }
.table .amount { font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .result { width: 100%; color: var(--text-2); }
/* 表格单元格上的 max-width 不生效，截断要放在内层块上 */
.cell-trunc { max-width: var(--w, 320px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .result .cell-trunc { max-width: none; width: 0; min-width: 100%; }

/* ── 徽章 ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap;
  background: var(--idle-soft); color: var(--idle);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.plain::before { display: none; }

/* ── 按钮 ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--line-soft); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-soft); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 分段筛选 ───────────────────────────────────── */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--line-soft); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg .n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ── 表单 ───────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 560; color: var(--text); }
.field .help { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.field .help.err { color: var(--err); }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 13.5px; outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; }
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.search { padding-left: 32px; background: var(--surface) no-repeat 10px 50% / 15px; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-wrap .input { padding-left: 32px; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  flex: none; width: 36px; height: 21px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; margin-top: 1px;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .txt b { display: block; font-size: 13.5px; font-weight: 560; }
.switch .txt span { font-size: 12.5px; color: var(--text-3); }

/* ── 键值 ───────────────────────────────────────── */
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── 代码块 ─────────────────────────────────────── */
.code {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 0; color: var(--text);
}
.code.wrap-text { white-space: pre-wrap; word-break: break-all; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .code { flex: 1; min-width: 0; }

/* ── 步骤 ───────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; counter-increment: step; }
.steps li::before {
  content: counter(step); width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--accent-soft); color: var(--accent);
}
.steps b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.steps p { margin: 0 0 8px; color: var(--text-2); font-size: 13px; }

/* ── 代理 ───────────────────────────────────────── */
.agent-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.agent-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.agent-icon svg { width: 19px; height: 19px; }
.agent-head h3 { margin: 0; font-size: 15px; font-weight: 620; }
.agent-head .sub { font-size: 12.5px; color: var(--text-3); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.stat-strip > div { padding: 12px 20px; border-left: 1px solid var(--line-soft); }
.stat-strip > div:first-child { border-left: 0; }
.stat-strip .l { font-size: 12px; color: var(--text-3); }
.stat-strip .v { font-size: 16px; font-weight: 620; font-variant-numeric: tabular-nums; }

/* ── 日志 ───────────────────────────────────────── */
.log { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
.log-row { display: grid; grid-template-columns: 74px 64px minmax(0, 1fr); gap: 12px; padding: 6px 20px; border-top: 1px solid var(--line-soft); align-items: baseline; }
.log-row:first-child { border-top: 0; }
.log-row .t { color: var(--text-3); }
.log-row .k { color: var(--text-2); }
.log-row .m { overflow-wrap: anywhere; }
.log-row.warn .m { color: var(--warn); }
.log-row.error .m { color: var(--err); }
mark { background: var(--warn-soft); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── 弹层 ───────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 22, .42);
  display: grid; place-items: center; padding: 16px; animation: fade .12s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); border: 1px solid var(--line);
}
.dialog.wide { width: min(720px, 100%); }
.dialog header { padding: 18px 22px 0; }
.dialog header h3 { margin: 0; font-size: 16px; font-weight: 640; }
.dialog header p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.dialog .body { padding: 18px 22px; overflow: auto; }
.dialog footer { padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }

.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 22, .32); animation: fade .12s ease-out; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(520px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: slide .16s ease-out;
}
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; font-size: 16px; }
.drawer .body { padding: 18px 20px; overflow: auto; display: grid; gap: 18px; align-content: start; }
.drawer .big, .dialog .big { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }

.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 13px;
  animation: fade .15s ease-out;
}
.toast .dot { margin-top: 6px; }

.note { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.err { background: var(--err-soft); color: var(--err); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.info { background: var(--accent-soft); color: var(--accent); }
.note ul { margin: 4px 0 0; padding-left: 18px; }

/* ── 登录 ───────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(400px, 100%); padding: 28px; }
.auth .brand { padding: 0 0 22px; }
.auth h1 { margin: 0 0 4px; font-size: 19px; }
.auth p { margin: 0 0 20px; color: var(--text-3); font-size: 13px; }

/* ── 微信账号页 ─────────────────────────────────── */
.locate { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.locate b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.locate .mono { font-size: 12px; }
.locate-icon {
  width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--idle-soft); color: var(--idle);
}
.locate-icon.ok { background: var(--wx-soft); color: var(--wx); }
.locate-icon svg { width: 18px; height: 18px; }

.wx-mark {
  width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: var(--wx); color: #fff;
}
.wx-mark svg { width: 30px; height: 30px; stroke-width: 1.6; }

.acct-main { display: flex; align-items: center; gap: 16px; padding: 20px; }
.acct-main h3 { margin: 0; font-size: 16px; font-weight: 640; }
.acct-main h3 .mono { font-size: 15px; }
.acct-main .sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.acct-tip { padding: 0 20px 16px; }
.acct-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--line-soft); background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.check {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2);
}
.check b { display: block; font-size: 13.5px; font-weight: 600; }
.check .trunc { display: block; font-size: 12px; color: var(--text-3); }
.check-ic { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.check-ic svg { width: 16px; height: 16px; stroke-width: 2.2; }
.check.ok .check-ic { background: var(--ok-soft); color: var(--ok); }
.check.err .check-ic { background: var(--err-soft); color: var(--err); }
.check.idle .check-ic { background: var(--idle-soft); color: var(--idle); }
.check-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 560; white-space: nowrap; flex: none; }
.check.ok .check-state { color: var(--ok); }
.check.err .check-state { color: var(--err); }
.check.idle .check-state { color: var(--text-3); }

/* 收款码弹窗 */
.codes { display: grid; gap: 10px; min-width: 0; }
.codes-label { font-size: 13px; font-weight: 560; }
.codes-list { border: 1px solid var(--line); border-radius: 10px; max-height: 280px; overflow: auto; }
.codes-list .list li { padding: 9px 12px; gap: 10px; }
.codes-list .idx {
  width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center;
  font-size: 11.5px; color: var(--text-3); background: var(--line-soft);
}
.codes-list .empty { padding: 26px 16px; }
.codes-add { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 窄屏 ───────────────────────────────────────── */
@media (max-width: 1040px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 10px 16px; }
  .brand span { display: none; }
  .nav { flex-direction: row; overflow-x: auto; padding: 6px 8px; gap: 2px; scrollbar-width: none; min-width: 0; }
  .side { min-width: 0; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .nav a svg { display: none; }
  .side-foot { display: none; }
  .page-head { padding: 20px 16px 14px; }
  .view { padding: 0 16px 40px; }
  .banner { margin: 12px 16px 0; }
  .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .checks { padding: 14px 16px; }
  .locate, .acct-main { padding-left: 16px; padding-right: 16px; }
  .acct-actions { padding-left: 16px; padding-right: 16px; }
  .acct-actions .spacer { display: none; }
  .nav a[aria-current="page"]::before { display: none; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip > div:nth-child(3) { border-left: 0; }
  .stat-strip > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .card-head, .card-body, .card-foot, .list li { padding-left: 16px; padding-right: 16px; }
  .log-row { grid-template-columns: 64px minmax(0, 1fr); padding: 6px 16px; }
  .log-row .k { display: none; }
}
@media (max-width: 520px) {
  .g-4 { grid-template-columns: minmax(0, 1fr); }
  .kpi .value { font-size: 23px; }
  .brand b { display: none; }
}
