/* 算力门总后台: a dense operations console for many tenants. Slate neutrals with a blue bias, one accent (the site's
   #2f62f0) for everything you click, 32px table rows, 44px header, no decoration that costs space. Each part of the
   console (a menu group) also has its own color (--g-*: blue, violet, teal, pink, gold, green, orange, sky, slate),
   which marks its menu group, the header and the cards of its pages. Light and dark share every rule through the
   tokens below. */
:root {
  --bg: #f3f5f9; --panel: #ffffff; --panel-2: #f8fafc; --side: #ffffff; --hover: #f1f4f9; --sel: #eaf0fe; --sel-line: #c9d6fb;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e3e8f0; --line-2: #eef2f7; --input: #ffffff; --input-line: #d5dce6;
  --accent: #2f62f0; --accent-2: #2554d6; --accent-soft: rgba(47, 98, 240, .10); --on-accent: #ffffff;
  --ok: #0f9d6e; --ok-soft: rgba(15, 157, 110, .12); --warn: #c27a06; --warn-soft: rgba(217, 140, 10, .13);
  --err: #d93a4a; --err-soft: rgba(217, 58, 74, .11); --info: #4b6bfb; --info-soft: rgba(75, 107, 251, .11);
  --c1: #2f62f0; --c2: #10a37f; --c3: #e8833a; --c4: #9b5de5; --c5: #d64f8a; --c6: #2a9fb8; --c7: #b6c0cf;
  --heat: 47, 98, 240;
  --g-dash: #2f62f0; --g-ana: #7357e8; --g-ten: #0d9488; --g-usr: #d6407f; --g-mod: #c27c0e; --g-fin: #15965a;
  --g-cli: #e0651e; --g-log: #0a88bd; --g-sys: #5a6a82; --tint: 12%; --on-g: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --pop: 0 12px 32px -8px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .08);
  --code: #0f172a; --code-text: #e2e8f0;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 8px; --r-sm: 6px; --side-w: 188px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1018; --panel: #121925; --panel-2: #0f1520; --side: #0f1520; --hover: #182131; --sel: #1a2742; --sel-line: #2c3f66;
  --text: #e6ebf3; --text-2: #c3cddb; --muted: #8a97ab; --faint: #5f6b7e;
  --line: #222d3d; --line-2: #1b2433; --input: #0d131d; --input-line: #2b384b;
  --accent: #5b86f7; --accent-2: #7598f8; --accent-soft: rgba(91, 134, 247, .16); --on-accent: #ffffff;
  --ok: #34c79a; --ok-soft: rgba(52, 199, 154, .14); --warn: #f0b13c; --warn-soft: rgba(240, 177, 60, .14);
  --err: #f26d7b; --err-soft: rgba(242, 109, 123, .14); --info: #7c95ff; --info-soft: rgba(124, 149, 255, .14);
  --c1: #5b86f7; --c2: #34c79a; --c3: #f29b57; --c4: #b78cf2; --c5: #ec79aa; --c6: #4cc1d8; --c7: #55627a;
  --heat: 91, 134, 247;
  --g-dash: #6d8ff7; --g-ana: #a08af6; --g-ten: #2fc2ae; --g-usr: #ee7aae; --g-mod: #e7b040; --g-fin: #45c487;
  --g-cli: #f5925a; --g-log: #4cb6e4; --g-sys: #97a4b8; --tint: 18%; --on-g: #0b1018;
  --shadow: none; --pop: 0 14px 36px -8px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .4);
  --code: #070b11; --code-text: #d5deea;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); } .strong { font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--err); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.i { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- sign-in: its own page, not part of the console ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.login-box { width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--pop); }
.login-art { background: #0f172a; color: #cbd5e1; padding: 26px 28px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.login-art .lb, .login-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.login-art .lb { color: #fff; }
.login-art .lb img, .login-brand img { width: 24px; height: 24px; }
.login-art h2 { color: #fff; font-size: 18px; margin: 0 0 12px; font-weight: 600; text-wrap: balance; }
.login-art ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.login-art li { display: flex; gap: 8px; align-items: baseline; } .login-art li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: #5b86f7; flex: none; transform: translateY(-1px); }
.login-art .ft { font-size: 12px; color: #64748b; margin-top: auto; }
.login-side { padding: 28px; display: flex; align-items: center; min-width: 0; }
.login-card { width: 100%; }
.login-brand { display: none; margin-bottom: 18px; color: var(--text); }
.login-card h1 { font-size: 18px; margin: 0 0 4px; }
.login-sub { color: var(--muted); margin: 0 0 18px; font-size: 12px; }
.login .field { margin-bottom: 12px; }
.login .btn { width: 100%; height: 34px; justify-content: center; margin-top: 4px; }
.login-foot { margin-top: 14px; color: var(--faint); font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.shell.rail { --side-w: 48px; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line-2); flex: none; color: inherit; text-decoration: none !important; }
.brand img { width: 22px; height: 22px; }
.brand b { font-size: 13px; display: block; line-height: 1.15; } .brand span { font-size: 11px; color: var(--muted); display: block; line-height: 1.15; }
/* a part's color: --g on the group (menu) or on the shell (the page you are on); --g-ink is its text on --g-soft */
:root { --g: var(--accent); }
.g-dash, [data-g="dash"] { --g: var(--g-dash); } .g-ana, [data-g="ana"] { --g: var(--g-ana); } .g-ten, [data-g="ten"] { --g: var(--g-ten); }
.g-usr, [data-g="usr"] { --g: var(--g-usr); } .g-mod, [data-g="mod"] { --g: var(--g-mod); } .g-fin, [data-g="fin"] { --g: var(--g-fin); }
.g-cli, [data-g="cli"] { --g: var(--g-cli); } .g-log, [data-g="log"] { --g: var(--g-log); } .g-sys, [data-g="sys"] { --g: var(--g-sys); }
:root, [data-g], .ng, .rail-g { --g-ink: color-mix(in srgb, var(--g) 76%, var(--text)); --g-soft: color-mix(in srgb, var(--g) var(--tint), transparent); }
.nav { flex: 1; overflow-y: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.ng { padding-top: 2px; }
.ng.grp { margin: 0 6px; padding: 2px 0; }
.ng.grp + .ng.grp { border-top: 1px solid var(--line-2); }
.ng-h { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .02em; text-align: left; }
.ng-h:hover { background: var(--hover); }
.ng-h .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng:not(.shut) .ng-h .cnt { display: none; }
.ng-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--g-soft); color: var(--g); transition: background .12s, color .12s; }
.ng-ic .i { width: 13px; height: 13px; stroke-width: 2; }
.ng.cur .ng-ic { background: var(--g); color: var(--on-g); }
.ng.cur .ng-h { color: var(--g-ink); }
.ng-h .chev { display: grid; color: var(--faint); transition: transform .12s; }
.ng-h .chev .i { width: 12px; height: 12px; }
.ng.shut .ng-h .chev { transform: rotate(-90deg); }
.ng.shut .ng-b { display: none; }
.ng-h + .ng-b { margin: 1px 0 3px 16px; padding-left: 7px; border-left: 1px solid color-mix(in srgb, var(--g) 30%, var(--line)); }
.nav a, .nav .soon { display: flex; align-items: center; gap: 6px; height: 26px; margin: 0 6px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.ng-h + .ng-b a, .ng-h + .ng-b .soon { position: relative; height: 26px; margin: 0; padding: 0 8px; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--g-soft); color: var(--g-ink); font-weight: 600; }
.ng-h + .ng-b a.on::before { content: ""; position: absolute; left: -9px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--g); }
.nav .soon { color: var(--faint); cursor: default; }
.nav .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav .cnt { font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 8px; background: var(--err); color: #fff; }
.nav .cnt.mute { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.ptag { font-size: 10.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; line-height: 15px; white-space: nowrap; font-weight: 400; }
.side-foot { padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex: none; }
.side-foot .link { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.rail .brand { padding: 0; justify-content: center; } .rail .brand div { display: none; }
.rail .nav { padding-top: 6px; }
.rail-g { display: grid; place-items: center; width: 36px; height: 32px; margin: 2px auto; border: 0; border-radius: var(--r-sm); background: none; color: var(--g); cursor: pointer; position: relative; }
.rail-g:hover { background: var(--g-soft); } .rail-g.on { background: var(--g); color: var(--on-g); }
.rail-g .i { width: 17px; height: 17px; }
.rail-g .cnt { position: absolute; top: 1px; right: 1px; font-size: 9.5px; line-height: 14px; padding: 0 4px; border-radius: 7px; background: var(--err); color: #fff; }
.rail .side-foot { justify-content: center; padding: 8px 0; } .rail .side-foot span:not(.dot) { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.err { background: var(--err); } .dot.warn { background: var(--warn); } .dot.info { background: var(--info); }
.sq { width: 9px; height: 9px; border-radius: 2px; flex: none; display: inline-block; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
.crumbs a, .crumbs span { color: var(--faint); font-size: 12px; white-space: nowrap; }
.crumbs .crumb-g { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; background: var(--g-soft); color: var(--g-ink); font-weight: 600; }
.crumb-g .i { width: 13px; height: 13px; stroke-width: 2; }
.crumbs h1 { font-size: 14px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.qs { display: flex; align-items: center; gap: 6px; height: 28px; width: 230px; padding: 0 8px; border: 1px solid var(--input-line); border-radius: var(--r-sm); background: var(--panel-2); color: var(--faint); font-size: 12px; cursor: text; }
.qs span { flex: 1; text-align: left; } .qs kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font: 10.5px var(--font); }
.top .upd { font-size: 12px; color: var(--faint); white-space: nowrap; }
.bell { position: relative; }
.bell .cnt { position: absolute; top: -5px; right: -5px; background: var(--err); color: #fff; border-radius: 8px; font-size: 10px; line-height: 15px; padding: 0 4px; }
.avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--sel); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.menu-btn { display: none; }
.content { padding: 10px 12px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ---------- building blocks ---------- */
.btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--input-line); background: var(--panel); color: var(--text-2); cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1; font-size: 12.5px; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--input-line)); }
.btn.danger.solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.icon { width: 28px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 24px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--err); } .link.mute { color: var(--muted); }
.acts { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line-2); min-height: 34px; flex-wrap: wrap; }
.card-h h2 { font-size: 13px; margin: 0; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.card-h h2::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--g); flex: none; }
.card-h .sub { color: var(--faint); font-size: 12px; }
.card-h .r { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-b { padding: 10px 12px; }
.card-b.flush { padding: 0; }
.card-f { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.grid { display: grid; gap: 10px; min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.split > .wide { flex: 3 1 620px; min-width: 0; } .split > .narrow { flex: 2 1 340px; min-width: 0; }
.split > .side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar > * { max-width: 100%; min-width: 0; }
.card > .toolbar { padding: 6px 12px; border-bottom: 1px solid var(--line-2); }
.toolbar .r { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar label.lab { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

.input, select.input, textarea.input { height: 28px; padding: 0 8px; border: 1px solid var(--input-line); border-radius: var(--r-sm); background: var(--input); outline: none; min-width: 0; font-size: 12.5px; }
select.input { padding-right: 4px; }
.input.sm { height: 24px; font-size: 12px; padding: 0 6px; }
textarea.input { height: auto; min-height: 76px; padding: 6px 8px; resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: 12px; }
textarea.input.prose { font-family: inherit; font-size: 12.5px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.w-xs { width: 70px; } .input.w-sm { width: 120px; } .input.w-md { width: 200px; } .input.w-lg { width: 280px; }
.sbox { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 1px solid var(--input-line); border-radius: var(--r-sm); background: var(--input); color: var(--faint); }
.sbox input { border: 0; outline: none; background: transparent; min-width: 0; width: 180px; font-size: 12.5px; color: var(--text); }
.sbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field .ferr { font-size: 12px; color: var(--err); }
.field .seg { align-self: flex-start; }
.field.bad .input { border-color: var(--err); }
.form { display: grid; gap: 12px; }
.form.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
.seg { display: inline-flex; border: 1px solid var(--input-line); border-radius: var(--r-sm); overflow: hidden; background: var(--input); flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 9px; cursor: pointer; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.seg.sm button { height: 22px; padding: 0 7px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg button .n { color: var(--faint); font-weight: 400; margin-left: 3px; }
.seg button:disabled { color: var(--faint); cursor: not-allowed; }
.sw { width: 30px; height: 17px; border-radius: 9px; background: var(--input-line); border: 0; padding: 2px; cursor: pointer; display: inline-flex; flex: none; transition: background .12s; }
.sw::after { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .12s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sw.on { background: var(--accent); } .sw.on::after { transform: translateX(13px); }
.sw:disabled { opacity: .5; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11.5px; white-space: nowrap; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; }
.st.ok { color: var(--ok); } .st.err { color: var(--err); } .st.warn { color: var(--warn); } .st.off { color: var(--faint); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-block; font-size: 11px; padding: 0 5px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); line-height: 16px; white-space: nowrap; }
.tag.acc { background: var(--sel); border-color: var(--sel-line); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 0 6px; line-height: 19px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.on { background: var(--sel); border-color: var(--sel-line); color: var(--accent); }
.chip.off { color: var(--faint); text-decoration: line-through; }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

/* tables: 32px rows, sticky header inside a scrolling box */
.tw { overflow-x: auto; }
.tw.tall { max-height: calc(100vh - 230px); overflow: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; background: var(--panel-2); padding: 0 8px; height: 28px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.t th.sort { cursor: pointer; user-select: none; } .t th.sort:hover { color: var(--text); }
.t th.sorted { color: var(--accent); }
.t td { padding: 0 8px; height: 31px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.t td.wrap { white-space: normal; padding-block: 5px; }
.t th:first-child, .t td:first-child { padding-left: 12px; } .t th:last-child, .t td:last-child { padding-right: 12px; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--hover); }
.t tbody tr.sel td { background: var(--sel); }
.t tbody tr.off td { color: var(--faint); }
.t tbody tr.click { cursor: pointer; }
.t th.num, .t td.num { text-align: right; }
.t th.ck, .t td.ck { width: 30px; padding-right: 0; }
.t .sub { color: var(--faint); font-size: 11.5px; margin-left: 5px; }
.t .strong { font-weight: 600; color: var(--text); }
.t a.name { font-weight: 600; color: var(--text); }
.t tfoot td { background: var(--panel-2); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; position: sticky; bottom: 0; }
.t td.heat { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 12.5px; }
.pager { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.pager .r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pager .pg { min-width: 24px; height: 22px; padding: 0 5px; border: 1px solid var(--input-line); border-radius: 5px; background: var(--panel); cursor: pointer; font-size: 12px; color: var(--text-2); }
.pager .pg.on { border-color: var(--accent); background: var(--sel); color: var(--accent); font-weight: 600; }
.pager .pg:disabled { opacity: .45; cursor: default; }
.batch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 12px; border: 1px solid var(--sel-line); background: var(--sel); border-radius: var(--r); font-size: 12.5px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 8px; }
.kpi { position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--g) 5%, var(--panel)), var(--panel) 70%); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px 6px 13px; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--g); }
.kpi .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi .k span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.kpi .d { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.soon .v { color: var(--faint); font-size: 13px; font-weight: 400; line-height: 24px; }
.kpi.soon::before { background: var(--line); }
.kpi.link { cursor: pointer; } .kpi.link:hover { border-color: color-mix(in srgb, var(--g) 45%, var(--line)); }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0; border-bottom: 1px solid var(--line-2); }
.mini > div { padding: 6px 12px; border-right: 1px solid var(--line-2); min-width: 0; }
.mini .k { font-size: 11.5px; color: var(--muted); } .mini .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* alert list */
.alist { display: flex; flex-direction: column; }
.arow { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 31px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; min-width: 0; }
.arow:last-child { border-bottom: 0; }
.arow .kind { flex: none; width: 60px; color: var(--muted); font-size: 12px; }
.arow .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow a { flex: none; font-size: 12px; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: var(--r-sm); background: var(--info-soft); color: var(--text-2); font-size: 12.5px; }
.note.warn { background: var(--warn-soft); } .note.err { background: var(--err-soft); } .note.ok { background: var(--ok-soft); }
.note .i { margin-top: 2px; }

/* key/value info */
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 5px 10px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv.mid { align-items: center; row-gap: 8px; } .kv dd.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 0 8px; scrollbar-width: thin; }
.tabs a { padding: 0 10px; height: 34px; display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; font-size: 12.5px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* record header (one tenant) */
.rh { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.rh-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; }
.rh-av { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; background: var(--accent); }
.rh-top h2 { margin: 0; font-size: 15px; font-weight: 600; }
.rh-top .meta { color: var(--muted); font-size: 12px; min-width: 0; }
.rh-top .r { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.rh-top .r b { color: var(--text); font-variant-numeric: tabular-nums; }

/* charts */
.chart { position: relative; padding: 4px 10px 4px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ax { font-size: 10px; fill: var(--faint); }
.chart .gl { stroke: var(--line-2); stroke-width: 1; }
.chart .hl { stroke: var(--faint); stroke-dasharray: 3 3; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); align-items: center; padding: 6px 12px 0; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--pop); border-radius: var(--r-sm); padding: 6px 8px; font-size: 12px; min-width: 160px; z-index: 5; }
.tip b { display: block; margin-bottom: 2px; }
.tip div { display: flex; justify-content: space-between; gap: 12px; }
.tip div span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; min-width: 50px; flex: 1; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.share { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.share.tight { min-width: 84px; }
.share .pct { width: 40px; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.4; }

/* price chain: what each party keeps of every dollar */
.chain { display: flex; height: 22px; border-radius: 5px; overflow: hidden; font-size: 11.5px; color: #fff; }
.chain div { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; min-width: 0; padding: 0 4px; }
.chain .c1 { background: var(--c7); color: var(--text); } .chain .c2 { background: var(--c1); } .chain .c3 { background: var(--c2); }

/* panel editor */
.prev { background: #0f141c; color: #dbe3ee; border-radius: var(--r); overflow: hidden; font-size: 11.5px; border: 1px solid var(--line); }
.prev .pt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #151c27; border-bottom: 1px solid #222c3a; }
.prev .pt .lg { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 10px; flex: none; }
.prev .pt .tk { flex: 1; min-width: 0; color: #8fa3bd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prev .pb { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; padding: 8px; }
.prev .blk { background: #182130; border: 1px solid #243045; border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.prev .blk b { color: #fff; font-weight: 600; }
.prev .btnp { background: #22304a; border-radius: 4px; padding: 3px 6px; text-align: center; color: #c8d6f0; }
.prev .tools { display: flex; flex-wrap: wrap; gap: 4px; }
.prev .tools span { background: #22304a; border-radius: 4px; padding: 1px 6px; }
.prev .tools span.cur { background: #2f62f0; color: #fff; }
.prev .dim { color: #6d7f99; }
.ftable .fn { font-weight: 500; }
.ftable td .seg button { height: 22px; padding: 0 7px; }
.diffdot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); display: inline-block; margin-left: 4px; vertical-align: middle; }

/* log viewer */
pre.log { margin: 0; background: var(--code); color: var(--code-text); font: 12px/1.55 var(--mono); padding: 10px 12px; border-radius: var(--r-sm); max-height: 460px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
pre.json { margin: 0; font: 11.5px/1.5 var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; max-height: 420px; overflow: auto; white-space: pre; }
.secret { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; max-width: 100%; overflow-wrap: anywhere; }

/* overlays */
.mask { position: fixed; inset: 0; background: rgba(8, 12, 20, .45); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
.mask.top-al { place-items: start center; padding-top: 12vh; }
.dlg { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop); width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.dlg.wide { width: min(760px, 100%); } .dlg.wide.x { width: min(1120px, 100%); }
.dlg-h { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); gap: 8px; }
.dlg-h h3 { margin: 0; font-size: 14px; }
.dlg-h .x { margin-left: auto; }
.dlg-b { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line-2); }
.pal { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop); overflow: hidden; }
.pal input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; height: 42px; padding: 0 14px; outline: none; font-size: 14px; }
.pal .res { max-height: 360px; overflow-y: auto; padding: 4px; }
.pal .res button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; height: 30px; padding: 0 10px; border-radius: 5px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.pal .res button.on, .pal .res button:hover { background: var(--sel); color: var(--accent); }
.pal .res .grp { font-size: 11px; color: var(--faint); padding: 6px 10px 2px; }
.pal .res .sub { color: var(--faint); margin-left: auto; font-size: 11.5px; }
.pal .foot { border-top: 1px solid var(--line-2); padding: 5px 12px; font-size: 11.5px; color: var(--faint); }
.menu { position: fixed; z-index: 110; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--pop); padding: 4px; min-width: 150px; max-height: 70vh; overflow-y: auto; animation: fade .1s ease-out; }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 0 10px; height: 28px; border-radius: 4px; cursor: pointer; color: var(--text-2); white-space: nowrap; font-size: 12.5px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--err); }
.menu button:disabled { opacity: .45; cursor: not-allowed; }
.menu button .ptag { margin-left: auto; }
.menu .mh { font-size: 11px; color: var(--faint); padding: 4px 10px 2px; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.menu label { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 26px; font-size: 12.5px; cursor: pointer; border-radius: 4px; }
.menu label:hover { background: var(--hover); }
.toasts { position: fixed; top: 52px; right: 14px; z-index: 120; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ok); box-shadow: var(--pop); border-radius: var(--r-sm); padding: 7px 11px; max-width: 380px; font-size: 12.5px; animation: fade .15s ease-out; }
.toast.err { border-left-color: var(--err); } .toast.warn { border-left-color: var(--warn); }
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } }
.skel { background: linear-gradient(90deg, var(--line-2), var(--hover), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 4px; height: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- finance ---------- */
.t tr.bad td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.t.recon { max-width: 460px; margin-left: auto; }
.t.recon td { height: 28px; }
.t.recon tr.sum td { font-weight: 600; border-top: 1px solid var(--line); }
.t.recon tr:hover td { background: none; }

/* ---------- narrow screens ---------- */
@media (max-width: 1180px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qs { width: 170px; } .top .upd { display: none; } }
@media (max-width: 900px) {
  .login-box { grid-template-columns: minmax(0, 1fr); max-width: 400px; } .login-art { display: none; } .login-brand { display: flex; }
  .shell, .shell.rail { grid-template-columns: minmax(0, 1fr); --side-w: 220px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--pop); }
  .shell.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .g2, .g3, .form.cols, .form.cols3 { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 8px max(10px, env(safe-area-inset-right)) 20px max(10px, env(safe-area-inset-left)); }
  .top { padding: 0 10px; flex-wrap: wrap; }
  .top .hide-sm, .qs span, .qs kbd { display: none; }
  .qs { width: 28px; padding: 0; justify-content: center; }
  .prev .pb { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 安全: two-step sign-in set-up and the recovery codes ---------- */
.login-box.one { width: min(520px, 100%); grid-template-columns: minmax(0, 1fr); }
.login-box.one .login-side { padding: 28px 30px; }
.login-box.one .btn { width: auto; }
.login .code-in, .code-in { font-family: var(--mono); font-size: 18px; letter-spacing: 3px; height: 38px; }
.code-in::placeholder { font-family: var(--font); font-size: 13px; letter-spacing: 0; }
.tfa { display: grid; gap: 12px; }
.tfa-step { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.tfa-step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.tfa-step .faint { margin-left: auto; }
.tfa-scan { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.tfa-scan .qr { width: 208px; height: 208px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; image-rendering: pixelated; }
.tfa-ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.rcodes { margin: 0; padding: 10px 14px 10px 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; font-family: var(--mono); font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.rcodes li::marker { color: var(--faint); font-size: 11px; }
@media (max-width: 560px) { .tfa-scan { grid-template-columns: minmax(0, 1fr); } .tfa-scan .qr { justify-self: center; } .rcodes { grid-template-columns: minmax(0, 1fr); } }

/* 站点设置 groups and the 站点巡检 site picker (三期) */
.form .sgrp { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 6px 0 4px; border-bottom: 1px solid var(--line-2); }
.form .sgrp:not(:nth-child(2)) { margin-top: 6px; }
.field .hint.err { color: var(--err); }
.pick { max-height: 180px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }

/* ---------- 入驻申请: the follow-up timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 12px 16px; border-left: 1px solid var(--line); margin-left: 4px; }
.tl li:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl li::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tl li.n::before { background: var(--accent); }
.tl-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.tl-b { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; color: var(--text-2); }
