/* 盯收款 控制台样式：零构建设计系统。颜色/间距/层级全部走 CSS 变量，亮暗双主题。 */

/* ---------- tokens ---------- */
:root {
  --brand: #2f6bed;
  --brand-strong: #1c4fd0;
  --brand-ink: #0f2f7a;
  --brand-soft: #eaf0fe;
  --brand-line: #c9d9fb;

  --bg: #f4f6fb;
  --bg-grad-a: #eef2fb;
  --bg-grad-b: #f7f8fc;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --line: #e4e8f0;
  --line-strong: #d2d9e6;
  --text: #16202f;
  --text-2: #3d4b60;
  --muted: #74839a;

  --ok: #0f8a5f;
  --ok-soft: #e6f6ef;
  --ok-line: #bfe4d3;
  --warn: #b46b0c;
  --warn-soft: #fdf3e3;
  --warn-line: #f2ddb7;
  --bad: #cd2f2f;
  --bad-soft: #fdebeb;
  --bad-line: #f5c9c9;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 22px; --s6: 30px; --s7: 44px;

  --sh-1: 0 1px 2px rgba(22, 32, 47, .05), 0 1px 1px rgba(22, 32, 47, .04);
  --sh-2: 0 4px 16px rgba(22, 32, 47, .07), 0 1px 2px rgba(22, 32, 47, .05);
  --sh-3: 0 18px 46px rgba(15, 26, 45, .16);

  --side-w: 224px;
  --top-h: 58px;
  --fs: 14px;

  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html[data-theme='dark'] {
  --brand: #6f9bff;
  --brand-strong: #88aaff;
  --brand-ink: #d5e2ff;
  --brand-soft: #1b2540;
  --brand-line: #2d3d66;

  --bg: #0d1119;
  --bg-grad-a: #10151f;
  --bg-grad-b: #0b0e14;
  --panel: #141a25;
  --panel-2: #19202c;
  --line: #262f3e;
  --line-strong: #36435a;
  --text: #e7ecf5;
  --text-2: #bdc7d8;
  --muted: #8494ac;

  --ok: #3fc98f; --ok-soft: #12281f; --ok-line: #1e4535;
  --warn: #e8a54a; --warn-soft: #2a2114; --warn-line: #4a3a1e;
  --bad: #ff7b7b; --bad-soft: #2c1818; --bad-line: #4d2828;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 6px 20px rgba(0, 0, 0, .4);
  --sh-3: 0 20px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --brand: #6f9bff; --brand-strong: #88aaff; --brand-ink: #d5e2ff; --brand-soft: #1b2540; --brand-line: #2d3d66;
    --bg: #0d1119; --bg-grad-a: #10151f; --bg-grad-b: #0b0e14;
    --panel: #141a25; --panel-2: #19202c; --line: #262f3e; --line-strong: #36435a;
    --text: #e7ecf5; --text-2: #bdc7d8; --muted: #8494ac;
    --ok: #3fc98f; --ok-soft: #12281f; --ok-line: #1e4535;
    --warn: #e8a54a; --warn-soft: #2a2114; --warn-line: #4a3a1e;
    --bad: #ff7b7b; --bad-soft: #2c1818; --bad-line: #4d2828;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .35); --sh-2: 0 6px 20px rgba(0, 0, 0, .4); --sh-3: 0 20px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 420px at 12% -8%, var(--bg-grad-a), transparent 60%),
    radial-gradient(900px 380px at 100% 0%, var(--brand-soft), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: var(--fs);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.2px; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
::selection { background: var(--brand-line); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--panel); padding: var(--s2) var(--s3); z-index: 999; border-radius: 0 0 var(--r-sm) 0; box-shadow: var(--sh-2); }
.skip:focus { left: var(--s2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.selectable { user-select: all; }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------- shell ---------- */
.topbar {
  height: var(--top-h);
  display: flex; align-items: center; gap: var(--s4);
  padding: 0 var(--s5);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.logo { display: flex; align-items: center; gap: var(--s2); font-weight: 700; letter-spacing: -.3px; font-size: 15px; }
.logo .mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(140deg, var(--brand), var(--brand-ink)); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; box-shadow: var(--sh-1); flex-shrink: 0; }
.logo small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
a.logo { color: var(--text); }
a.logo:hover { color: var(--text); text-decoration: none; }
.topbar .spacer { flex: 1; }
.top-links { display: flex; gap: var(--s4); align-items: center; }
.top-links a { color: var(--text-2); font-size: 13.5px; }
.top-links a:hover { color: var(--brand); text-decoration: none; }

.user-chip { display: flex; align-items: center; gap: var(--s2); padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel); }
.user-chip .avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(140deg, var(--brand), var(--brand-strong)); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.user-chip .meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .meta b { font-size: 12.5px; font-weight: 600; }
.user-chip .meta span { font-size: 11px; color: var(--muted); }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-strong); color: var(--brand); background: var(--panel-2); }
#nav-toggle { display: none; }

.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.side { width: var(--side-w); flex-shrink: 0; padding: var(--s4) var(--s3) var(--s6); border-right: 1px solid var(--line); position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h)); overflow-y: auto; }
.side h4 { margin: var(--s5) var(--s3) var(--s2); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; }
.side h4:first-child { margin-top: 0; }
.side a { display: flex; align-items: center; gap: var(--s2); padding: 7px var(--s3); border-radius: var(--r-sm); color: var(--text-2); font-size: 13.5px; margin-bottom: 2px; }
.side a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.side a .ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .65; }
.side a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
html[data-theme='dark'] .side a.on { color: var(--brand-ink); }
.side a.on .ico { opacity: 1; }
.main { flex: 1; min-width: 0; padding: var(--s5) var(--s6) var(--s7); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head .titles h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-head .titles p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.crumb { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-bottom: 2px; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); margin-bottom: var(--s4); box-shadow: var(--sh-1); }
.card > h3 { margin: 0 0 var(--s4); font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.card > h3::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); flex-shrink: 0; }
.card > h3 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: auto; }
.card.flush { padding: 0; overflow: hidden; }
.card .card { background: var(--panel-2); box-shadow: none; margin-bottom: 0; }
.card.flush > h3 { padding: var(--s5) var(--s5) 0; }
.card.flush .table-wrap { margin-bottom: 0; }

.grid { display: grid; gap: var(--s4); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: var(--s4); }

.stat { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); box-shadow: var(--sh-1); }
.stat::after { content: ''; position: absolute; top: 0; left: var(--s5); right: 60%; height: 2px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--brand), transparent); opacity: .5; }
.stat > span { display: block; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.stat > b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.6px; margin-top: 2px; }
.stat > b.ok { color: var(--ok); } .stat > b.warn { color: var(--warn); }
.stat > b.bad { color: var(--bad); } .stat > b.brand { color: var(--brand); }
.stat > b.muted { color: var(--text-2); }
.stat > b + span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; line-height: 1.4; }
.stat:hover { box-shadow: var(--sh-2); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); box-shadow: var(--sh-1); margin-bottom: var(--s4); }
table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { text-align: left; padding: 10px var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; background: var(--panel-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--brand-soft) 45%, var(--panel)); }
.card .table-wrap { border: 0; box-shadow: none; border-radius: 0; margin: var(--s3) calc(-1 * var(--s5)) calc(-1 * var(--s5)); }
.card .table-wrap .empty { border-top: 1px solid var(--line); }

/* ---------- 设备列表（app/devices）：共享表格 + 格内可点项 + 气泡 ---------- */
/* .fit：列宽按内容排，单元格不折行，窗口不够宽就横向滚动，保证行列始终对得上 */
.table-wrap.fit table { min-width: 0; }
.table-wrap.fit th, .table-wrap.fit td { white-space: nowrap; padding: 10px var(--s3); }
.dsum { font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.dsum.zero { color: var(--muted); font-weight: 400; }
.dacts { display: flex; gap: var(--s2); white-space: nowrap; }
.dacts.left { justify-content: flex-start; }
.cells { display: flex; gap: var(--s5); flex-wrap: wrap; align-items: flex-start; }
/* 单元格里就地可改的字段：看着是文本，点开出气泡 */
.lnk { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer;
  border-bottom: 1px dashed color-mix(in srgb, var(--brand) 40%, transparent); }
.lnk:hover { border-bottom-style: solid; }
.lnk.warn { color: var(--warn); border-bottom-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pop { position: fixed; z-index: 1000; width: 330px; max-width: calc(100vw - 24px); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--sh-3); padding: var(--s4); }
.pop .hint { margin: calc(-1 * var(--s1)) 0 0; }
.pop .field { margin-bottom: var(--s2); }
.pop-row { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s3); }

/* ---------- badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 550; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.pill.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.pill.muted { color: var(--muted); background: var(--panel-2); border-color: var(--line); }
.pill.brand { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }

/* ---------- buttons ---------- */
/* a.btn 会继承正文 line-height，和同排的 button 高出一截，统一成 normal */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--r-sm); padding: 7px 14px; font-size: 13px; font-weight: 550; line-height: normal; cursor: pointer; box-shadow: var(--sh-1); transition: .14s ease; }
.btn:hover { border-color: var(--brand-line); color: var(--brand); background: var(--panel-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--brand), var(--brand-strong)); border-color: transparent; color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn.primary:hover { color: #fff; filter: brightness(1.05); }
html[data-theme='dark'] .btn.primary { color: #08101f; }
html[data-theme='dark'] .btn.primary:hover { color: #08101f; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.btn.big { padding: 11px 22px; font-size: 15px; border-radius: var(--r-md); }
.btn.block { width: 100%; }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line); }
.row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.tight { gap: var(--s1); }

/* ---------- forms ---------- */
label { display: block; margin-bottom: var(--s2); font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
label.field { display: block; margin-bottom: var(--s3); color: var(--text-2); }
label.field span { display: block; color: var(--text-2); font-size: 12px; font-weight: 600; margin-bottom: 5px; }
label.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 400; font-size: 13px; margin-bottom: 0; }
label.check.keep { margin-bottom: var(--s4); }
label:not(.check):not(.inline) > input, label:not(.check):not(.inline) > select, label:not(.check):not(.inline) > textarea { margin-top: 5px; }
.row label { margin-bottom: 0; }
input, select, textarea { font: inherit; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--panel); color: var(--text); width: 100%; transition: .14s ease; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=file], input[type=checkbox], input[type=radio] { width: auto; padding: 0; box-shadow: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
textarea { min-height: 82px; resize: vertical; font-family: inherit; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); }
legend { font-size: 12px; color: var(--muted); padding: 0 6px; }

/* ---------- notices ---------- */
.warnbox, .denybox { padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: 13px; border: 1px solid; }
.warnbox.flex, .denybox.flex { display: flex; gap: var(--s3); align-items: center; }
.warnbox { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.denybox { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.warnbox a, .denybox a { color: inherit; }
.empty { text-align: center; color: var(--muted); padding: var(--s6) var(--s4); font-size: 13px; }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 4px; }
.hr { height: 1px; background: var(--line); margin: var(--s5) 0; }
.steps { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.steps span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.steps span::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 10px; }
.steps span.now { color: var(--brand); font-weight: 600; }
.steps span.now::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.steps span.done::before { border-color: var(--ok-line); background: var(--ok-soft); content: '✓'; color: var(--ok); }
.card-flat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
/* 文字型按钮：用于表单内切换视图，视觉上与链接一致 */
.linklike { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike:hover { opacity: .8; }

/* ---------- tabs / kv / lists / code ---------- */
.tabs { display: inline-flex; gap: 2px; margin-bottom: var(--s4); padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-pill); flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; border-radius: var(--r-pill); padding: 5px 14px; cursor: pointer; font-size: 13px; color: var(--text-2); font: inherit; }
.tabs button:hover { color: var(--brand); }
.tabs button.on { background: var(--panel); color: var(--brand); font-weight: 600; box-shadow: var(--sh-1); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: var(--s2) var(--s4); font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.list { margin: 0; padding-left: var(--s5); }
.list li { margin-bottom: 5px; }
.list li::marker { color: var(--brand-line); }
.checks li { margin-bottom: var(--s2); }
code.block { display: block; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s4);
  white-space: pre-wrap; word-break: break-all; font-size: 12.5px; color: var(--text-2); }

/* ---------- charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 132px; padding-top: var(--s2); }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 28px; background: linear-gradient(180deg, var(--brand), var(--brand-strong)); border-radius: 4px 4px 2px 2px; opacity: .78; transition: .14s ease; }
.bars .bar b { font-size: 10px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.bars .bar:hover i { opacity: 1; transform: scaleY(1.02); }
.bars-lg { height: 190px; }

/* ---------- toast ---------- */
#toast { position: fixed; right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); z-index: 100; }
#toast div { background: var(--panel); color: var(--text); padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: 13px; max-width: 430px;
  box-shadow: var(--sh-3); border: 1px solid var(--line); border-left: 3px solid var(--brand); animation: pop .18s ease; }
#toast div.bad { border-left-color: var(--bad); }
#toast div.ok { border-left-color: var(--ok); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, #toast div { animation: none !important; transition: none !important; } }

/* ---------- auth / public ---------- */
.center { max-width: 460px; margin: 0 auto; padding-top: 6vh; }
.center.card { padding: var(--s6); box-shadow: var(--sh-2); }
.center .brandline { display: flex; align-items: center; gap: var(--s2); justify-content: center; margin-bottom: var(--s5); }
.center .brandline b { font-size: 17px; font-weight: 700; }
.center h1 { font-size: 19px; margin: 0 0 4px; }
.auth-tabs { display: flex; gap: var(--s4); justify-content: center; margin: var(--s4) 0 var(--s2); font-size: 13px; }

.splash { max-width: 980px; margin: 0 auto; padding: var(--s7) var(--s5) var(--s6); }
.splash-wide { max-width: 1180px; }
.splash h1 { font-size: 40px; line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -1.2px; font-weight: 800;
  background: linear-gradient(100deg, var(--text) 20%, var(--brand) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash .lead { color: var(--text-2); font-size: 16px; margin: 0 0 var(--s6); max-width: 660px; }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--r-pill); background: var(--brand-soft);
  color: var(--brand-ink); border: 1px solid var(--brand-line); font-size: 12px; font-weight: 600; margin-bottom: var(--s4); }
.stage-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.splash h2 { font-size: 15px; font-weight: 700; margin: var(--s7) 0 var(--s3); color: var(--text-2); letter-spacing: .02em; }
.splash h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); box-shadow: var(--sh-1); }
.feature:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.feature b { display: block; font-size: 14.5px; margin-bottom: 5px; }
.feature span { color: var(--muted); font-size: 13px; }
.feature span code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 1px 4px; }
ul.ticks { list-style: none; margin: 0; padding: 0; }
ul.ticks li { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s2); font-size: 13.5px; }
.tick { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); margin-top: 2px; }
.tick.no { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.flow { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: var(--s4) 0; }
.flow span { padding: 5px 13px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.flow i { color: var(--muted); font-style: normal; }

/* ---------- landing：产品首页主视觉，登录入口在右上角 ---------- */
.landing { text-align: center; padding: var(--s6) 0 var(--s7); }
.landing h1 { font-size: 64px; letter-spacing: -2.4px; margin: var(--s5) 0; }
.landing .lead { font-size: 19px; max-width: 640px; margin: 0 auto var(--s5); text-wrap: balance; }
.landing .lead .lb { display: none; }
.landing .points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.landing .points li { color: var(--text-2); font-size: 15px; font-weight: 500; padding: 0 var(--s4); }
.landing .points li:first-child { padding-left: 0; }
.landing .points li + li { border-left: 1px solid var(--line-strong); }
.landing .cta { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin: var(--s5) 0 0; }
.landing .cta .btn, .landing .stage-pill { border-radius: 0; }

/* ---------- landing 新增板块：边界 / 原则 / 版本公告 / 页脚 ---------- */
.landing-sec { margin-top: var(--s7); }
.landing-sec > h2 { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; font-size: 18px; font-weight: 700;
  letter-spacing: -.3px; margin: 0 0 var(--s4); }
.landing-sec > h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.bounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s5); }
.princ { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); }
.bounds .feature, .princ .feature { margin: 0; }
/* 首页整体走直角风格，与 .landing .btn / .demo-pane 的形状一致 */
.landing-sec .feature { border-radius: 0; }
.landing .cta-note { margin: var(--s3) 0 0; }
/* 首页方案对比：沿用后台表格，但去掉吸顶与大写，我们那列整列高亮 */
.cmp th { position: static; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.cmp table { min-width: 720px; }
.cmp .us { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
/* 窄屏横向滚动时，「对比项」和「盯收款」两列钉住不动，中间的方案列可滚出来看 */
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; z-index: 2; color: var(--text-2); font-weight: 600;
  background: var(--panel-2); box-shadow: inset -1px 0 0 var(--line); }
.cmp th.us, .cmp td.us { position: sticky; right: 0; z-index: 2; box-shadow: inset 1px 0 0 var(--brand-line); }
.cmp th.us { box-shadow: inset 1px 0 0 var(--brand-line), inset 0 2px 0 var(--brand); }
.rellog .rel { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rellog .rel:last-child { border-bottom: 0; padding-bottom: 0; }
.rellog .rel b { flex-shrink: 0; font-size: 13px; }
.rellog .rel .rel-note { flex: 1; min-width: 0; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rellog .rel.open .rel-note { display: block; -webkit-line-clamp: unset; overflow: visible; }
.rellog .rel .rel-more { flex-shrink: 0; font-size: 12px; }
.rellog .rel em { flex-shrink: 0; font-style: normal; color: var(--muted); font-size: 12px; }
.footer .spacer { flex: 1; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--brand); text-decoration: none; }

/* ---------- landing demo：到账链路自动播放演示 ---------- */
.demo { background: var(--panel); border: 1px solid var(--line); border-radius: 0;
  padding: var(--s6) var(--s7) var(--s7); box-shadow: var(--sh-1); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s5); }
.demo-head b { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.demo-cap { text-align: center; font-size: 14px; color: var(--muted); margin: calc(-1 * var(--s2)) 0 var(--s6); min-height: 22px; }
.demo-rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 0 var(--s5); }
.demo-rail::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 13px; height: 2px; background: var(--line); }
.demo-dot { position: absolute; top: 8px; left: 12.5%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); transition: left 1s cubic-bezier(.55, 0, .2, 1); }
.demo-dot.instant { transition: none; }
.demo-node { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.demo-node i { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line-strong); font-style: normal; font-size: 12px; transition: .3s ease; }
.demo-node.on { color: var(--text); }
.demo-node small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); opacity: .9; }
.demo-node.on i { background: linear-gradient(180deg, var(--brand), var(--brand-strong)); border-color: transparent; color: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft); }
.demo-node.done i { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); }
.demo-pane { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 0; padding: var(--s5); }
.demo-pane > h4 { margin: 0 0 var(--s4); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.demo-pane .demo-body { transition: opacity .35s ease, visibility .35s ease; }
.demo-pane.off .demo-body { opacity: .22; visibility: hidden; }
.demo-wait { display: none; position: absolute; inset: 54px var(--s5) auto; margin: 0; font-size: 12.5px; color: var(--muted); }
.demo-pane.off .demo-wait { display: block; }
.demo .rv { opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease; }
.demo .rv.in { opacity: 1; transform: none; }
.demo .kv { font-size: 13px; grid-template-columns: 72px 1fr; gap: var(--s2) var(--s3); }
.demo .hint { margin: var(--s4) 0 0; line-height: 1.55; font-size: 12px; }
code.block.demo-code { margin: 0; font-size: 12px; line-height: 1.6; background: var(--panel); }
.demo-req { font-size: 12px; color: var(--text-2); margin: 0 0 var(--s3); word-break: break-all; }
.demo-ok { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s4); }

/* ---------- 首页直角：卡片 / 徽标 / 按钮 / 代码块一律不用圆角（轨道节点与亮点保持圆形） ---------- */
.demo .pill, .demo .btn, .demo code.block, .landing .stage-pill { border-radius: 0; }

/* 手机样机：状态栏 + 盯账 App 界面 + 顶部下拉到账通知 */
.phone { position: relative; width: clamp(156px, 62%, 210px); margin: var(--s1) auto 0; border: 2px solid var(--line-strong); border-radius: 0; background: var(--panel);
  padding: 8px 8px 12px; box-shadow: var(--sh-1); }
.phone .bar { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); margin-bottom: 7px; padding: 0 2px; }
.ap-screen { border: 1px solid var(--line); border-radius: 0; overflow: hidden; background: var(--panel); }
.ap-head { display: flex; align-items: center; gap: 5px; padding: 5px 7px; background: linear-gradient(140deg, var(--brand), var(--brand-ink));
  color: #fff; font-size: 10px; font-weight: 600; }
.ap-head s { display: grid; place-items: center; width: 14px; height: 14px; background: #fff; color: var(--brand);
  font-size: 9px; font-weight: 800; text-decoration: none; }
.ap-head em { font-style: normal; margin-left: auto; font-weight: 400; font-size: 9px; opacity: .85; }
.ap-rows { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-bottom: 1px solid var(--line);
  font-size: 9px; color: var(--muted); }
.ap-rows:last-child { border-bottom: 0; }
.ap-rows b { font-weight: 600; color: var(--ok); }
.notif { position: absolute; left: 6px; right: 6px; top: 26px; display: flex; align-items: center; gap: 5px; padding: 5px 7px;
  border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 0; background: var(--panel);
  box-shadow: var(--sh-2); font-size: 9.5px; color: var(--text-2); }
.notif b { color: var(--ok); font-size: 10px; }
.notif em { font-style: normal; margin-left: auto; color: var(--muted); font-size: 9px; }
.card .warnbox { margin-top: var(--s3); }
.footer { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; display: flex; gap: var(--s3) var(--s5); flex-wrap: wrap; align-items: baseline; }
/* 页脚分两组：联系方式和入口不排在同一层级上 */
.footer .f-grp { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.footer .f-grp b { font-size: 11.5px; font-weight: 600; opacity: .7; }
.qr { max-width: 230px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: var(--s2); }
.qr.masked { filter: blur(10px); }

/* 绑定码作废遮罩：设备一连上就把码糊掉并盖层，旁人再扫也扫不出来 */
.qrbox { position: relative; display: inline-block; }
.qrbox img { display: block; }
.qrbox.off img { filter: blur(9px); }
.qr-off { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s1); background: rgba(255, 255, 255, .82); border-radius: var(--r-md); text-align: center; padding: var(--s3); }
.qrbox.off .qr-off { display: flex; }
.qr-off b { color: #16202f; font-size: 15px; }
.qr-off span { color: #3d4b60; font-size: 12px; }
.qr-off .btn { margin-top: var(--s2); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .side { position: fixed; inset: var(--top-h) auto 0 0; z-index: 30; background: var(--panel); transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--sh-3); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: var(--top-h) 0 0; background: rgba(10, 16, 26, .38); z-index: 25; }
  #nav-toggle { display: grid; }
  .main { padding: var(--s4) var(--s4) var(--s6); }
  .topbar { padding: 0 var(--s4); gap: var(--s2); }
  .user-chip .meta { display: none; }
  .user-chip { padding: 3px; }
  .kv { grid-template-columns: 110px 1fr; }
  .splash { padding: var(--s5) var(--s4); }
  .splash h1 { font-size: 30px; }
  .landing { padding: var(--s4) 0 var(--s6); }
  .landing h1 { font-size: 34px; letter-spacing: -1.2px; margin: var(--s4) 0 var(--s4); }
  .landing .lead { font-size: 17px; }
  .landing .points li { padding: 0 var(--s3); font-size: 14px; }
  .landing .cta { flex-direction: column; align-items: center; }
  .landing .cta .btn { width: 100%; max-width: 320px; }
  .landing .lead .lb { display: inline; }
  .logo small { display: none; }
  .top-links { gap: var(--s3); }
  .demo { padding: var(--s5) var(--s4) var(--s6); }
  .demo-head b { font-size: 16px; }
  .demo-cap { margin-bottom: var(--s5); }
  .demo-node { font-size: 11px; }
  .demo-node small { font-size: 10.5px; line-height: 1.35; }
  .demo-grid { grid-template-columns: 1fr; }
  /* 窄屏：对比表转成堆叠卡片，第三列不再被裁进看不见的横向滚动区 */
  .cmp table { min-width: 0; }
  .cmp thead { display: none; }
  .cmp tbody tr { display: block; margin-bottom: var(--s3); padding: var(--s4); border: 1px solid var(--line);
    background: var(--panel); box-shadow: var(--sh-1); }
  .cmp tbody tr:last-child { margin-bottom: 0; }
  .cmp tbody td { display: flex; align-items: baseline; gap: var(--s3); position: static; left: auto; right: auto; z-index: auto;
    border: 0; box-shadow: none; background: none; padding: var(--s1) 0; font-size: 13px; color: var(--text-2); }
  .cmp tbody td:not(:first-child)::before { content: attr(data-col); flex: 0 0 82px; color: var(--muted); font-size: 11.5px; }
  .cmp tbody td:first-child { font-size: 14px; font-weight: 700; color: var(--text); border: 0; border-bottom: 1px solid var(--line);
    background: none; box-shadow: none; position: static; left: auto; z-index: auto; padding: 0 0 var(--s2); margin-bottom: var(--s1); }
  .cmp tbody td.us { position: static; right: auto; box-shadow: none; background: var(--brand-soft); color: var(--brand-ink);
    font-weight: 600; padding: var(--s1) var(--s2); }
  /* 页脚两组各自成行，联系方式和入口不再挤在同一层级 */
  .footer { flex-direction: column; align-items: flex-start; gap: var(--s3); }
  .footer .spacer { display: none; }
}


/* 窄屏：卖点竖排，去掉跨行分隔线 */
@media (max-width: 560px) {
  .landing .points { display: grid; grid-template-columns: max-content; gap: var(--s2); justify-content: center; }
  .landing .points li, .landing .points li + li { border-left: 0; padding: 0; }
}

/* ---------- 套餐卡片与收款弹窗 ---------- */
.pkgs { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pkg { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--panel); box-shadow: var(--sh-1); }
.pkg:hover { border-color: var(--brand-line); box-shadow: var(--sh-2); }
.pkg.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft) inset; }
.pkg .name { font-size: 13.5px; font-weight: 650; }
.pkg .price { font-size: 24px; font-weight: 700; letter-spacing: -.6px; color: var(--brand); font-variant-numeric: tabular-nums; }
.pkg .price small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pkg .meta { font-size: 12px; color: var(--muted); }
.pkg .btn { margin-top: var(--s3); }
.pkg.off { opacity: .55; }

.mask { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 26, .55);
  display: flex; align-items: center; justify-content: center; padding: var(--s4); }
.sheet { position: relative; width: 460px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-3); padding: var(--s5); }
/* 选套餐这一步把弹窗加宽，套餐卡平铺成多列 */
.sheet.wide { width: 720px; }
.sheet.wide .pkg { padding: var(--s3) var(--s4); }
.sheet.wide .pkg .price { font-size: 20px; }
.sheet h3 { margin: 0 0 var(--s4); font-size: 15.5px; }
.sheet .x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer; }
.sheet .x:hover { color: var(--text); }
.sheet .foot { display: flex; gap: var(--s2); justify-content: space-between; align-items: center; margin-top: var(--s4); flex-wrap: wrap; }

.pay-amt { text-align: center; margin: var(--s3) 0; }
.pay-amt b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -1px; color: var(--brand); font-variant-numeric: tabular-nums; }
.pay-amt span { font-size: 12.5px; color: var(--muted); }
.pay-qr { text-align: center; padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--panel-2); }
.pay-qr img { width: 220px; max-width: 100%; border-radius: var(--r-sm); background: #fff; }
.pay-wait { display: flex; align-items: center; justify-content: center; gap: var(--s2); font-size: 13px; color: var(--muted); margin-top: var(--s3); }
.pay-done { text-align: center; padding: var(--s5) 0 var(--s3); }
.pay-done .big { font-size: 40px; line-height: 1; }
.pay-done h4 { margin: var(--s3) 0 2px; font-size: 16px; }
.pay-done p { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 560px) {
  .pkgs { grid-template-columns: 1fr 1fr; }
  .sheet { padding: var(--s4); }
}

