/* Partner portal: a ledger-like reading page. Neutrals lean to the brand teal; money in a monospace face. */
:root {
    --bg: #f4f6f5;
    --surface: #ffffff;
    --fg: #17201d;
    --muted: #5b6863;
    --line: #d8dfdc;
    --accent: #0f6e63;
    --accent-ink: #ffffff;
    --accent-soft: #e2f0ed;
    --in: #1e7a46;
    --out: #a3471f;
    --error-bg: #fbe9e4;
    --error-fg: #8f2d14;
    --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111715; --surface: #18201d; --fg: #e2e9e6; --muted: #98a6a0; --line: #2b3632;
        --accent: #3fb3a3; --accent-ink: #08201c; --accent-soft: #173431; --in: #6cc493; --out: #e39a72;
        --error-bg: #3a1f17; --error-fg: #f2b39d; color-scheme: dark;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--font-body); }
[hidden] { display: none !important; }
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .02em; }
.brand .sub { font-weight: 400; color: var(--muted); }
.mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }
.who { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; }
.muted { color: var(--muted); }
.page { max-width: 1040px; margin: 0 auto; padding: 28px 20px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.narrow { max-width: 440px; margin: 24px auto; }
h1 { font-size: 22px; margin: 0 0 18px; }
form { display: grid; gap: 8px; }
label { font-size: 13px; color: var(--muted); margin-top: 6px; }
input { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
    padding: 9px 11px; min-width: 0; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; border-radius: 6px; padding: 8px 14px; border: 1px solid var(--line);
    background: var(--surface); color: var(--fg); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); margin-top: 10px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
.aside { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.error { background: var(--error-bg); color: var(--error-fg); border-radius: 6px; padding: 8px 12px; margin: 8px 0 0; font-size: 14px; }
.banner { margin: 0 0 16px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: s; font-size: 13px; }
.steps li { counter-increment: s; color: var(--muted); }
.steps li::before { content: counter(s) " "; font-weight: 600; }
.steps li + li::before { content: "› " counter(s) " "; }
.steps li.current { color: var(--accent); font-weight: 600; }
.steps li.done { color: var(--fg); }
.qr { display: flex; justify-content: center; padding: 8px; background: #ffffff; border-radius: 6px; }
.qr img { width: 200px; max-width: 100%; height: auto; image-rendering: pixelated; }
.secret code { font: 14px var(--font-mono); letter-spacing: .06em; overflow-wrap: anywhere; }
.codes { columns: 2; font: 15px var(--font-mono); padding-left: 24px; margin: 8px 0 12px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--fg); font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 14px; color: var(--muted); }
.tabs button.active { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.figure { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 4px; min-width: 0; }
.figure .label { font-size: 13px; color: var(--muted); }
.figure .value { font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.figure .unit { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.amount.in { color: var(--in); }
.amount.out { color: var(--out); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 500; background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
.reason { white-space: normal; min-width: 14em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.status-APPROVED { color: var(--in); }
.status-REJECTED { color: var(--out); }
.empty { color: var(--muted); text-align: center; padding: 24px; }
.range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.range label { margin: 0; }
.range button.primary { margin-top: 0; }
.balances { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; font-size: 14px; }
@media (max-width: 520px) { .card { padding: 20px; } .codes { columns: 1; } }

/* Spec 2026-10-25: the language switcher, and Traditional Chinese faces for zh-Hant. */
html:lang(zh-Hant) { --font-body: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
.locale-switch { display: flex; gap: 4px; margin-left: auto; } /* next to the account, not mid-bar */
.locale-switch button {
    min-width: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface); color: var(--fg); font-size: 13px; cursor: pointer;
}
.locale-switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
