:root {
  color-scheme: light;
  --bg: #eef1f4; --panel: #ffffff; --soft: #f5f7f9; --ink: #16202a; --muted: #5d6b78; --faint: #8a96a3; --line: #dde3e9;
  --bad: #d1453b; --warn: #c27a12; --ok: #1e9e6a;
  --identity: #4c5bd4; --money: #1e9e6a; --data: #9b4fc4; --service: #e0a12e; --ai: #2ba3c6; --org: #64748b; --spend: #e0702e;
  --r-lg: 18px; --r-md: 10px; --r-sm: 6px;
  --shadow: 0 18px 50px -20px rgba(22, 32, 42, .35);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f141a; --panel: #171e26; --soft: #1d2530; --ink: #e6ecf2; --muted: #9aa7b4; --faint: #6f7c89; --line: #2a333e;
    --bad: #f06a5f; --warn: #e9a23b; --ok: #3cc48c;
    --identity: #7d8af0; --money: #3cc48c; --data: #bf7be3; --service: #f0b84f; --ai: #4cc3e6; --org: #94a3b8; --spend: #f08a4b;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--identity); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bad { color: var(--bad); } .warn { color: var(--warn); } .muted { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-decoration: none; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-danger { color: var(--bad); }
.sel { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; }

/* ---------- top bar ---------- */
.app { display: flex; flex-direction: column; min-height: 100dvh; }
.top { display: flex; align-items: center; gap: 18px; padding: 16px 24px 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.brand time { color: var(--muted); font-size: 13px; }
.lede { margin: -4px 24px 10px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) { .lede { margin: -4px 14px 10px; } }
.lede b { color: var(--ink); font-weight: 650; }
.mode { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); padding: 2px 8px; border-radius: 999px; }
.top-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- board ---------- */
.board { flex: 1; min-height: 0; display: grid; gap: 14px; padding: 0 24px 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.six { display: grid; gap: 14px; min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1101px) and (min-height: 700px) { .app { height: 100dvh; } }
@media (max-width: 1100px), (max-height: 699px) { .board { grid-template-columns: 1fr; } .tile.big { height: 600px; } .six { grid-template-rows: none; grid-auto-rows: 330px; } }
@media (max-width: 1100px) { .six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .six { grid-template-columns: 1fr; } .board { padding: 0 14px 18px; } .top { padding: 14px; } .tile.big { height: 568px; } }

.tile { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 12px; cursor: zoom-in; outline: none;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--sec); opacity: .0; transition: opacity .28s; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--sec) 50%, var(--line)); box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--sec) 60%, transparent); }
.tile:hover::before, .tile:focus-visible::before { opacity: 1; }
.tile-h { display: flex; align-items: baseline; gap: 8px; }
.tile-h h2 { margin: 0; font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.tile-h h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sec); display: inline-block; }
.tile-head-v { margin-left: auto; display: flex; align-items: baseline; gap: 5px; }
.tile-head-v b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-head-v span { color: var(--muted); font-size: 12px; }
.tile-open { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: var(--sec); opacity: 0; transform: translateY(3px); transition: opacity .25s, transform .25s; pointer-events: none; }
.tile:hover .tile-open, .tile:focus-visible .tile-open { opacity: 1; transform: none; }
.tile-viz { position: relative; flex: 1; min-height: 0; margin-top: 8px; }
.tile-f { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); padding-right: 64px; min-height: 18px; }
.tile-f b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-size: 13px; text-align: center; }

/* ---------- charts ---------- */
.viz-split { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.viz-split > * { min-height: 0; position: relative; }
.viz-row { display: flex; gap: 10px; height: 100%; }
.viz-row > * { flex: 1; min-width: 0; position: relative; }
.donut { display: flex; align-items: center; justify-content: center; gap: 12px; height: 100%; }
.donut.stack { flex-direction: column; gap: 6px; }
.donut svg { flex: none; overflow: visible; }
.donut path { cursor: pointer; transition: opacity .2s; }
.donut.dim path:not(.on) { opacity: .35; }
.donut-c1 { font-size: 15px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.donut-c2 { font-size: 10.5px; fill: var(--muted); }
.lg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 0; }
.donut.stack .lg { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 10px; }
.lg li { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; cursor: default; }
.lg li span.n { overflow: hidden; text-overflow: ellipsis; }
.lg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lg em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg .more { color: var(--faint); }
.lg.full { gap: 5px; font-size: 13px; }
.lg.full li { justify-content: flex-start; }
.lg.full em.v { margin-left: auto; color: var(--ink); padding-left: 12px; }
svg text { font-family: var(--font); }
.axis-t { font-size: 10.5px; fill: var(--faint); }
.bar-l { font-size: 11.5px; fill: var(--ink); }
.bar-v { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--line); }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.mini-list li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-list .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.mini-list .d { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--c, var(--line)); color: var(--ink); white-space: nowrap; }
.chip.solid { background: color-mix(in srgb, var(--c) 16%, transparent); border-color: transparent; }

.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-md); padding: 8px 10px; font-size: 12.5px; max-width: 260px; line-height: 1.45; }
.tip b { display: block; font-weight: 650; }
.tip span { display: block; color: var(--muted); }
.tip em { display: block; font-style: normal; color: var(--bad); margin-top: 3px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 3vh 3vw; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, rgba(10, 15, 20, .55)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.panel { position: relative; width: min(1200px, 94vw); height: min(840px, 92dvh); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transform-origin: 0 0; }
.panel-h { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-h h2 { margin: 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: -0.01em; }
.panel-h h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sec); }
.panel-loss { color: var(--muted); font-size: 13px; }
.panel-stats { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.panel-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.panel-stats b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel-stats span { font-size: 11.5px; color: var(--muted); }
.x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.panel-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.p-left { overflow: auto; padding: 18px 22px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.p-right { overflow: hidden; display: flex; flex-direction: column; min-height: 0; background: var(--soft); }
.blk h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--muted); }
.blk .viz { position: relative; }
.p-tools { display: flex; gap: 8px; align-items: center; padding: 14px 18px 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.search { flex: 1; min-width: 140px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.p-count { font-size: 12px; color: var(--muted); }
.acc-list { list-style: none; margin: 0; padding: 4px 18px 22px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.acc-in { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px 10px 15px; position: relative; transition: border-color .2s, transform .2s; }
.acc-in::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sec); }
.acc-in:hover { border-color: color-mix(in srgb, var(--sec) 55%, var(--line)); transform: translateX(2px); }
.acc-top { display: flex; align-items: baseline; gap: 8px; }
.acc-name { font-weight: 650; font-size: 14px; }
.acc-sub { color: var(--muted); font-size: 12px; }
.acc-side { margin-left: auto; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.acc-amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.warn { color: var(--warn); } .due.bad { color: var(--bad); }
.acc-lines { list-style: none; margin: 5px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.acc-lines li { display: flex; gap: 8px; justify-content: space-between; }
.acc-lines li.muted { color: var(--faint); }
.acc-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.flag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.flag.neutral { border-color: var(--line); color: var(--muted); }
.list-h { font-size: 12px; color: var(--muted); padding: 8px 2px 0; list-style: none; }
@media (max-width: 860px) {
  .panel { width: 100vw; height: 100dvh; border-radius: 0; }
  .modal { padding: 0; }
  .panel-b { grid-template-columns: 1fr; overflow: auto; }
  .p-left { border-right: 0; overflow: visible; }
  .p-right { overflow: visible; }
  .acc-list { overflow: visible; }
  .panel-stats { margin-left: 0; }
  .panel-h { padding-right: 60px; }
  .x { position: absolute; right: 14px; top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .tile, .acc-in { transition: none; } }

/* ---------- settings ---------- */
.set-wrap { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; padding: 0 24px 24px; flex: 1; min-height: 0; }
@media (min-width: 900px) { .set-app { height: 100dvh; } .set-wrap > * { min-height: 0; } }
@media (max-width: 899px) { .set-wrap { grid-template-columns: 1fr; padding: 0 14px 18px; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.set-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.set-list-tools { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.set-items { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
@media (max-width: 899px) { .set-items { max-height: 320px; } }
.set-items li.grp { font-size: 11.5px; color: var(--muted); padding: 10px 8px 4px; display: flex; align-items: center; gap: 6px; }
.set-items li.grp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sec); }
.set-items button { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.set-items button:hover { background: var(--soft); }
.set-items button[aria-current="true"] { background: color-mix(in srgb, var(--sec) 14%, transparent); }
.set-items .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-items .s { font-size: 11.5px; color: var(--muted); }
.set-items .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); flex: none; }
.editor { overflow: auto; padding: 18px 22px 22px; }
.ed-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ed-h h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.ed-h h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sec); }
.banner { background: color-mix(in srgb, var(--identity) 10%, transparent); border: 1px solid color-mix(in srgb, var(--identity) 30%, transparent); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 10px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.form label.wide { grid-column: 1 / -1; }
.form input, .form select, .form textarea { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font-size: 14px; }
.form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 14px; margin: 0; min-width: 0; }
.form legend { font-size: 12.5px; padding: 0 6px; color: var(--ink); font-weight: 600; }
.form-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: sticky; bottom: -22px; background: var(--panel); padding: 12px 0; border-top: 1px solid var(--line); }
.toast { font-size: 13px; color: var(--ok); }
.toast.err { color: var(--bad); }

/* ---------- account menu ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.menu-pop.wide-pop { width: 280px; }
.menu-pop .form { margin: 0; gap: 8px; }
.menu-row { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fld.wide { grid-column: 1 / -1; }
.pw-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pw-row input { flex: 1; min-width: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.form fieldset.cred { border-color: color-mix(in srgb, var(--identity) 40%, var(--line)); background: color-mix(in srgb, var(--identity) 4%, transparent); }

/* ---------- login ---------- */
.auth-body { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: min(440px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-brand h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.auth-brand p { margin: 4px 0 0; color: var(--muted); }
.auth-card { padding: 20px 22px; }
.auth-card h2 { margin: 0 0 6px; font-size: 18px; }
.auth-card .tabs { width: fit-content; margin-bottom: 6px; }
.auth-card .form { margin-top: 8px; }
.auth-card .btn-ink { justify-content: center; padding: 10px; font-size: 14.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.hint a { color: var(--ink); }
.check { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-size: 12.5px !important; color: var(--ink) !important; }
.check input { width: auto !important; margin-top: 2px; }
.meter { height: 5px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.steps { padding-left: 20px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.steps code { font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.auth-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
.muted { margin: 0; }
#regOnly { display: flex; flex-direction: column; gap: 10px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.linkbtn:disabled { color: var(--faint); cursor: default; text-decoration: none; }
.code-input { font-size: 22px !important; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- search ---------- */
.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 560px; }
.gsearch { width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.gsearch:focus { outline: none; border-color: var(--identity); box-shadow: 0 0 0 3px color-mix(in srgb, var(--identity) 20%, transparent); }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; list-style: none; margin: 0; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); max-height: min(70vh, 560px); overflow: auto; }
.sr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.sr[aria-selected="true"], .sr:hover { background: var(--soft); }
.sr .dot { width: 9px; height: 9px; border-radius: 50%; }
.sr .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr .u { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-empty { padding: 14px; color: var(--muted); font-size: 13px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.act { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; color: var(--ink); text-decoration: none; }
.act:hover { border-color: var(--sec, var(--ink)); color: var(--sec, var(--ink)); }
.act.key { border-color: color-mix(in srgb, var(--identity) 45%, var(--line)); }
.acc-actions { margin-top: 8px; }
.acc-top { cursor: pointer; }
.acc-cred { margin-top: 4px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pwb { font-size: 11px; padding: 0 7px; border-radius: 999px; border: 1px solid; }
.pwb.strong { color: var(--ok); } .pwb.fair { color: var(--identity); } .pwb.weak { color: var(--warn); } .pwb.reused { color: var(--bad); } .pwb.none { color: var(--faint); }
.snack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow); }
.snack.err { background: var(--bad); color: #fff; }
.today-strip { border-top: 1px solid var(--line); padding-top: 10px; }
.today-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.today-big b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.today-big span { font-size: 12.5px; color: var(--muted); }

details.more { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
details.more > summary { cursor: pointer; padding: 11px 0; font-size: 13.5px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 400; color: var(--muted); font-size: 13px; }
details.more[open] > summary::before { content: "−"; }
details.more[open] { padding-bottom: 14px; }
.form fieldset.cred { padding: 12px 16px 16px; }
.form fieldset.cred legend { font-size: 13.5px; }
.account-dialog { color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; max-height: 90dvh; overflow: auto; }
.account-dialog::backdrop { background: #1119; }
.unlock-dialog { width: min(400px, calc(100vw - 24px)); }
.unlock-dialog h2, .unlock-dialog p { margin: 0; }
.csv-dialog { width: min(760px, calc(100vw - 24px)); }
.csv-head, .csv-footer, .csv-review-actions, .csv-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.csv-head h2, .csv-head p { margin: 0; }
.csv-head p { margin-top: 4px; }
.csv-form { gap: 10px; }
.csv-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.csv-bank-options { margin: 10px 0; }
.csv-review-actions { margin: 8px 0; flex-wrap: wrap; }
.csv-rows { padding: 0; margin: 0; list-style: none; max-height: 38dvh; overflow: auto; }
.csv-rows li { display: grid; grid-template-columns: minmax(100px, .65fr) 1fr; align-items: start; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; }
.csv-rows p { margin: 0; overflow-wrap: anywhere; }
.csv-pick { display: flex; align-items: start; gap: 7px; cursor: pointer; overflow-wrap: anywhere; }
.csv-pick input { flex: none; margin-top: 4px; }
.csv-row-details { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.csv-row-details label { display: grid; gap: 3px; }
.csv-row-details select { max-width: 100%; }
.csv-footer { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }

.privacy-footer { display: flex; justify-content: flex-end; flex: none; width: 100%; padding: 0 24px max(8px, env(safe-area-inset-bottom)); }
.privacy-footer a { color: var(--muted); font-size: 13px; padding: 6px 0 6px 8px; text-underline-offset: 3px; }
.privacy-footer a:hover { color: var(--ink); }
.app > .board, .app > .set-wrap { padding-bottom: 8px; }
.auth-body { grid-template-rows: 1fr auto; padding-bottom: 0; }
.auth-body .privacy-footer { padding-right: 0; }
.privacy-page { width: min(760px, 100%); margin: 0 auto; padding: clamp(22px, 6vw, 54px) clamp(16px, 5vw, 42px) 48px; }
.privacy-head { padding-bottom: 20px; }
.privacy-head a { color: var(--muted); text-underline-offset: 3px; }
.privacy-head h1 { font-size: clamp(27px, 5vw, 38px); letter-spacing: -0.02em; margin: 16px 0 8px; }
.privacy-page section { padding: 19px 0; border-top: 1px solid var(--line); }
.privacy-page section h2 { font-size: 18px; margin: 0 0 9px; }
.privacy-page p, .privacy-page ul { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.privacy-page p + p, .privacy-page ul + p { margin-top: 9px; }
.privacy-page ul { padding-inline-start: 22px; }
.privacy-page strong { color: var(--ink); }
@media (max-width: 640px) { .privacy-footer { padding-right: 14px; } }

/* CSV 分类与标签 */
.csv-password-option, .class-report { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }
.csv-password-option .hint, #copyStatus { margin: 5px 0 0; }
#copyStatus:empty { display: none; }
.class-dialog { width: min(960px, calc(100vw - 24px)); }
.class-report { margin-bottom: 8px; font-size: 14px; }
.class-scroll { max-height: 45dvh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.class-table { width: 100%; min-width: 650px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.class-table th, .class-table td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.class-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.class-table tr:last-child td { border-bottom: 0; }
.class-table input { width: 100%; min-width: 88px; }
.class-table td:first-child .btn { display: block; margin-top: 4px; }
.class-table .hint { display: block; margin: 3px 0 0; }

@media (max-width: 660px) {
  .class-dialog .class-scroll .class-table { display: block; min-width: 0; }
  .class-dialog .class-scroll thead { display: none; }
  #classRows, #classRows tr, #classRows td { display: block; }
  #classRows tr { padding: 7px 0; border-bottom: 1px solid var(--line); }
  #classRows tr:last-child, #classRows td { border: 0; }
  #classRows td { padding: 4px 9px; }
  #classRows td[data-heading] { display: grid; grid-template-columns: 5em minmax(0, 1fr); align-items: baseline; gap: 3px 6px; }
  #classRows td[data-heading]::before { content: attr(data-heading); color: var(--muted); grid-column: 1; grid-row: 1; }
  #classRows td[data-heading="账号"] > * { grid-column: 2; }
  #classRows td:first-child .btn { justify-self: start; }
}

/* 账号分类图 */
.overview-chart { overflow: auto; }
.account-chart { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.account-chart.is-compact { min-height: 100%; grid-template-rows: repeat(6, minmax(47px, 1fr)); gap: 6px; padding: 2px 1px 4px; }
.is-compact .account-chart-row { height: 100%; padding-inline: 11px; }
.account-chart-title small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--muted); font-weight: 400; }
.overview-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.overview-actions b { font-variant-numeric: tabular-nums; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 5px 0 0; padding: 0; }
#formTagHint { margin: 0; }
.account-chart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 3ch; align-items: center; gap: 4px 9px; width: 100%; min-height: 42px; padding: 6px 9px; border: 1px solid transparent; border-radius: 9px; background: var(--soft); color: var(--ink); text-align: left; cursor: pointer; }
.account-chart-row:hover, .account-chart-row[aria-pressed="true"] { border-color: color-mix(in srgb, var(--group-color) 54%, var(--line)); background: color-mix(in srgb, var(--group-color) 7%, var(--panel)); }
.account-chart-row:focus-visible { outline: 2px solid var(--group-color); outline-offset: -2px; }
.account-chart-row:disabled { color: var(--muted); cursor: default; border-color: transparent; background: var(--soft); }
.account-chart-title { font-size: 13px; font-weight: 650; }
.account-chart-logos { display: flex; gap: 3px; }
.account-chart-count { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.account-chart-track { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 3px; }
.account-chart-track span { display: block; width: var(--group-percent); height: 100%; background: var(--group-color); border-radius: inherit; }
.account-logo { display: inline-block; flex: none; vertical-align: middle; width: 21px; height: 21px; border-radius: 5px; background: #fff url("assets/account-logos.webp") no-repeat; background-size: var(--logo-width) var(--logo-height); background-position: var(--logo-x) var(--logo-y); }
.chart-logo { overflow: hidden; }
.lg .account-logo { width: 16px; height: 16px; border-radius: 4px; }
.account-subgroups { margin-top: 10px; }
.account-subgroups:first-child { margin-top: 0; }
.account-subgroups h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 650; }
.account-subgroups .account-chart { max-height: 276px; overflow: auto; }
.account-list-heading { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 650; }
.account-list-heading::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--group-color); }
.account-list-heading b { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.acc-name .account-logo, .set-items button .account-logo { margin-right: 6px; }
.set-items .subgroup { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px 1px; color: var(--muted); font-size: 12px; }
.account-jump { display: none; }
@media (max-width: 860px) { .account-jump { display: inline-flex; margin-top: 8px; } }
@media (max-width: 380px) { .account-chart-logos .account-logo:nth-child(n+4) { display: none; } }

/* 登录与安全 */
.security-overview, .security-list { list-style: none; margin: 0; padding: 0; }
.security-overview { display: grid; gap: 6px; }
.security-overview li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 6px; padding: 8px 10px; border-radius: 8px; background: var(--soft); }
.security-overview li > span, .security-result-name { font-size: 13px; font-weight: 650; }
.security-overview b, .security-result b { font-size: 13px; font-variant-numeric: tabular-nums; }
.security-overview small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.security-list { display: grid; gap: 4px; }
.security-result { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 36px; padding: 6px 9px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--ink); cursor: pointer; }
.security-result:hover { border-color: var(--identity); }
.security-result-name { flex: 1; }
.security-result b { white-space: nowrap; }
.security-result > span:last-child { color: var(--muted); }
.security-logos { display: flex; gap: 3px; }
.security-logos:empty { display: none; }
.security-empty { margin: 0; font-size: 13px; color: var(--muted); }
