/* Credit system — phone-first UI. White surfaces, one blue accent (set in Settings → Appearance, served as --blue). */
:root {
  --blue: #2563eb;
  --blue-ink: color-mix(in srgb, var(--blue) 82%, #000);
  --blue-50: color-mix(in srgb, var(--blue) 7%, #fff);
  --blue-100: color-mix(in srgb, var(--blue) 14%, #fff);
  --blue-200: color-mix(in srgb, var(--blue) 28%, #fff);
  --ink: #0f172a;
  --ink-2: #475569;
  --mute: #8a97ab;
  --line: #e7ecf3;
  --soft: #f5f7fb;
  --bg: #ffffff;
  --green: #059669;
  --green-50: #ecfdf5;
  --red: #dc2626;
  --red-50: #fef2f2;
  --amber: #b45309;
  --amber-50: #fffbeb;
  --r: 14px;
  --r-sm: 10px;
  --bar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.num, .amt, td.n { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 24px; height: 24px; }

/* ------------------------------------------------------------ shell */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
@media (min-width: 600px) {
  body { background: var(--soft); }
  .app { box-shadow: 0 0 0 1px var(--line); }
}
.bar {
  position: sticky; top: 0; z-index: 20; height: var(--bar-h);
  display: flex; align-items: center; gap: 4px; padding: 0 6px;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar h1 { flex: 1; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--ink);
  background: none; border: 0; cursor: pointer; flex: none;
}
.icon-btn:active { background: var(--soft); }
.icon-btn.blue { color: var(--blue); }
.content { padding: 14px 16px calc(96px + var(--safe-b)); }
.content.flush { padding-left: 0; padding-right: 0; }

/* ------------------------------------------------------------ drawer */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .32);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(300px, 84vw);
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(-102%); visibility: hidden;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s;
  padding-bottom: var(--safe-b);
}
.nav-toggle:checked ~ .scrim { opacity: 1; pointer-events: auto; }
.nav-toggle:checked ~ .drawer { transform: none; visibility: visible; transition-delay: 0s; box-shadow: 8px 0 32px rgba(15, 23, 42, .12); }
.drawer-head { padding: 22px 18px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: #fff;
  display: grid; place-items: center;
}
.me { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.me b { display: block; font-size: 15px; }
.me small { color: var(--mute); font-size: 12.5px; }
.me-bal { margin-top: 12px; padding: 10px 12px; background: var(--blue-50); border-radius: var(--r-sm); font-size: 13px; color: var(--ink-2); }
.me-bal b { display: block; color: var(--blue-ink); font-size: 18px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.nav-label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px;
  color: var(--ink-2); font-weight: 520; font-size: 15px;
}
.nav a:active { background: var(--soft); }
.nav a.on { background: var(--blue-50); color: var(--blue-ink); font-weight: 620; }
.nav a.on svg { color: var(--blue); }
.drawer-foot { border-top: 1px solid var(--line); padding: 8px 10px 12px; }
.drawer-foot a, .drawer-foot button {
  display: flex; width: 100%; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px;
  color: var(--ink-2); font: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
.drawer-foot button { color: var(--red); }

/* ------------------------------------------------------------ flash */
.flashes { position: sticky; top: calc(var(--bar-h) + 8px); z-index: 15; padding: 0 12px; margin-top: 10px; }
.flash {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow); margin-bottom: 8px; animation: drop .25s ease-out;
}
.flash.ok { background: var(--green-50); color: #065f46; border: 1px solid #a7f3d0; }
.flash.err { background: var(--red-50); color: #991b1b; border: 1px solid #fecaca; }
.flash svg { margin-top: 1px; }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ building blocks */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }
.pad { padding: 16px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.section-head h2 { font-size: 15.5px; font-weight: 650; }
.section-head a, .section-head span { font-size: 13.5px; }
.section-head span { color: var(--mute); }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.right { text-align: right; }
.green { color: var(--green); }
.red { color: var(--red); }
.blue { color: var(--blue); }
.strike { text-decoration: line-through; color: var(--mute) !important; }

.hero {
  background: var(--blue); color: #fff; border-radius: 18px; padding: 18px 18px 16px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.hero .label { font-size: 13px; opacity: .85; }
.hero .big { font-size: 32px; font-weight: 720; letter-spacing: -.02em; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.hero-row { display: flex; gap: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 12px; }
.hero-row > div { flex: 1; }
.hero-row > div + div { border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 14px; }
.hero-row small { display: block; font-size: 12px; opacity: .8; }
.hero-row b { font-size: 16px; font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; min-width: 0; }
.tile small { display: block; color: var(--mute); font-size: 12.5px; margin-bottom: 2px; }
.tile b { font-size: 18px; font-weight: 680; font-variant-numeric: tabular-nums; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.wide { grid-column: span 2; }
.tile.accent { background: var(--blue-50); border-color: var(--blue-100); }
.tile.accent b { color: var(--blue-ink); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 520; text-align: center; }
.quick span {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue);
}
.quick a:active span { background: var(--blue-100); }

/* list rows */
.list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.list.plain { border: 0; border-radius: 0; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; min-height: 62px;
  border-top: 1px solid var(--line); background: #fff;
}
.row:first-child { border-top: 0; }
a.row:active { background: var(--soft); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.row .t .nm { font-weight: 450; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .end { text-align: right; flex: none; }
.row .end b { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 650; display: block; }
.row .end small { font-size: 12px; color: var(--mute); }
.row .chev { color: #c3cbd8; margin-right: -4px; }

.av {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-ink); font-weight: 650; font-size: 14px; letter-spacing: .02em;
}
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av.in { background: var(--green-50); color: var(--green); }
.av.out { background: var(--red-50); color: var(--red); }
.av.void { background: var(--soft); color: var(--mute); }
.av.gray { background: var(--soft); color: var(--ink-2); }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--soft); color: var(--ink-2); white-space: nowrap; line-height: 1.5;
}
.tag.blue { background: var(--blue-50); color: var(--blue-ink); }
.tag.green { background: var(--green-50); color: var(--green); }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.amber { background: var(--amber-50); color: var(--amber); }

/* key / value */
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv > div:first-child { border-top: 0; }
.kv dt { color: var(--mute); flex: none; }
.kv dd { margin: 0; text-align: right; font-weight: 520; min-width: 0; overflow-wrap: anywhere; }

/* profile header */
.profile { text-align: center; padding: 22px 16px 18px; }
.profile .av { margin: 0 auto 10px; }
.profile h2 { font-size: 20px; }
.profile .sub { color: var(--mute); font-size: 13.5px; margin-top: 2px; }
.profile .bal-label { margin-top: 16px; font-size: 12.5px; color: var(--mute); }
.profile .bal { font-size: 34px; font-weight: 740; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

/* stats strip */
.strip { display: flex; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.strip > div { flex: 1; padding: 10px 12px; min-width: 0; }
.strip > div + div { border-left: 1px solid var(--line); }
.strip small { display: block; font-size: 12px; color: var(--mute); }
.strip b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 620; font-size: 15px; cursor: pointer;
  background: var(--blue); color: #fff; width: 100%; -webkit-tap-highlight-color: transparent; transition: transform .06s, filter .15s;
}
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--blue-200); }
.btn.soft { background: var(--blue-50); color: var(--blue-ink); }
.btn.danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.sm { height: 38px; font-size: 14px; padding: 0 14px; border-radius: 10px; width: auto; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }

.fab {
  position: fixed; z-index: 18; right: max(18px, calc(50% - 280px + 18px)); bottom: calc(22px + var(--safe-b));
  width: 56px; height: 56px; border-radius: 18px; background: var(--blue); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--blue) 35%, transparent);
}
.fab:active { transform: scale(.96); }

.sticky-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 18;
  padding: 10px 16px calc(10px + var(--safe-b)); background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sticky-foot > * { max-width: 528px; margin: 0 auto; }

/* ------------------------------------------------------------ forms */
.field { display: block; margin-bottom: 14px; }
.field > span, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > small, .help { display: block; font-size: 12.5px; color: var(--mute); margin-top: 5px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #d9e0ea; border-radius: 12px; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a97ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
input[type=color] { width: 64px; height: 44px; padding: 3px; border: 1px solid #d9e0ea; border-radius: 10px; background: #fff; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-card { padding: 16px 16px 2px; }
.form-title { font-size: 13px; font-weight: 650; color: var(--mute); letter-spacing: .04em; text-transform: uppercase; margin: 22px 2px 8px; }
form > .form-title:first-of-type, .content > .form-title:first-child { margin-top: 4px; }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.switch:first-child { border-top: 0; }
.switch .txt { flex: 1; font-size: 14.5px; }
.switch .txt small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { width: 46px; height: 28px; border-radius: 999px; background: #d6dde8; position: relative; flex: none; transition: background .18s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s; }
.switch input:checked + .knob { background: var(--blue); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { box-shadow: 0 0 0 3px var(--blue-100); }
.switch input:disabled + .knob { opacity: .45; }

/* segmented control */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg > label, .seg > a { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span, .seg > a {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 9px;
  font-weight: 600; font-size: 14.5px; color: var(--ink-2); cursor: pointer;
}
.seg input:checked + span, .seg > a.on { background: #fff; color: var(--blue-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.seg input:checked + span.in { color: var(--green); }
.seg input:checked + span.out { color: var(--red); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue-100); }

/* amount */
.amount-box { border: 1px solid #d9e0ea; border-radius: 16px; padding: 12px 16px 14px; transition: border-color .15s, box-shadow .15s; }
.amount-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.amount-box .lbl { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.amount-line { display: flex; align-items: baseline; gap: 6px; }
.amount-line .sym { font-size: 22px; font-weight: 650; color: var(--mute); }
.amount-box input {
  border: 0; box-shadow: none !important; height: 52px; padding: 0; font-size: 36px; font-weight: 720; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on, .chip:active { background: var(--blue-50); color: var(--blue-ink); border-color: var(--blue-200); }
a.chip { color: var(--ink-2); }
a.chip.on { color: var(--blue-ink); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }

.preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--soft); border-radius: 12px; margin-top: 10px; }
.preview .main { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.preview .main b { color: var(--ink); font-size: 15px; display: block; }
.preview .arrow { color: var(--mute); }
.preview .after b { font-size: 16px; }
.opt-card { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; cursor: pointer; }
.opt-card input { width: 18px; height: 18px; accent-color: var(--blue); }
.opt-card .txt { flex: 1; font-size: 14.5px; font-weight: 550; }
.opt-card .txt small { display: block; color: var(--mute); font-weight: 450; font-size: 12.5px; }
.opt-card:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }

/* search + filters */
.searchbar { position: relative; }
.searchbar svg { position: absolute; left: 14px; top: 14px; color: var(--mute); pointer-events: none; }
.searchbar input { padding-left: 42px; background: var(--soft); border-color: transparent; }
.searchbar input:focus { background: #fff; }
.filters { margin-top: 10px; }
.filters summary { list-style: none; display: inline-flex; }
.filters summary::-webkit-details-marker { display: none; }
.filters[open] summary .chip { background: var(--blue-50); color: var(--blue-ink); border-color: var(--blue-200); }
.filters .panel { margin-top: 10px; padding: 14px 14px 2px; background: var(--soft); border-radius: var(--r); }
.filters .panel input, .filters .panel select { background-color: #fff; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13.5px; color: var(--mute); }
.pager a, .pager span.off { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.pager span.off { opacity: .4; }

/* empty */
.empty { text-align: center; padding: 36px 20px; color: var(--mute); font-size: 14px; }
.empty svg { width: 36px; height: 36px; color: #c8d0dc; margin-bottom: 6px; }

/* chart: last 7 days */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 14px 14px 0; }
.bars .day { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bars .pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bars .pair i { display: block; width: 9px; border-radius: 4px 4px 2px 2px; min-height: 2px; }
.bars i.bi { background: var(--blue); }
.bars i.bo { background: var(--blue-200); }
.bars small { font-size: 11px; color: var(--mute); padding: 6px 0 10px; }
.bars .day.today small { color: var(--blue-ink); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--mute); padding: 0 14px 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* summary agent card */
.agent-sum { padding: 14px 16px; border-top: 1px solid var(--line); }
.agent-sum:first-child { border-top: 0; }
.agent-sum .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.agent-sum .head .main { flex: 1; min-width: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; }
.mini-grid small { display: block; font-size: 11.5px; color: var(--mute); }
.mini-grid b { font-size: 14px; font-variant-numeric: tabular-nums; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { font-size: 11.5px; font-weight: 600; color: var(--mute); text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .03em; }
.tbl td { text-align: right; padding: 10px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr:first-child td { border-top: 0; }
.scroll-x { overflow-x: auto; }

/* receipt */
.receipt { text-align: center; padding: 26px 18px 18px; }
.receipt .ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
.receipt .ic.in { background: var(--green-50); color: var(--green); }
.receipt .ic.out { background: var(--red-50); color: var(--red); }
.receipt .ic.void { background: var(--soft); color: var(--mute); }
.receipt .amt { font-size: 36px; font-weight: 750; letter-spacing: -.02em; }
.receipt .who { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.flow { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; padding: 12px; background: var(--soft); border-radius: 12px; font-variant-numeric: tabular-nums; }
.flow small { display: block; font-size: 11.5px; color: var(--mute); }
.flow b { font-size: 15px; }

/* perms */
.perm-group { margin-top: 14px; }
.perm-group h3 { font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 8px; font-weight: 650; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* audit */
.diff { width: 100%; border-collapse: collapse; font-size: 13px; }
.diff th { text-align: left; font-size: 11.5px; color: var(--mute); font-weight: 600; padding: 8px 12px; text-transform: uppercase; }
.diff td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.diff td.k { color: var(--ink-2); font-weight: 600; width: 32%; }
.diff td.b { color: var(--red); }
.diff td.a { color: var(--green); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 22px calc(32px + var(--safe-b)); max-width: 420px; margin: 0 auto; }
.login .brand-mark { width: 56px; height: 56px; border-radius: 17px; margin-bottom: 18px; }
.login .brand-mark svg { width: 28px; height: 28px; }
.login h1 { font-size: 26px; font-weight: 740; }
.login p { color: var(--mute); margin: 6px 0 28px; }
.login .flashes { position: static; padding: 0; margin: 0 0 14px; }

.danger-zone { margin-top: 28px; padding: 14px 16px; border: 1px dashed #fecaca; border-radius: var(--r); }
.danger-zone p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
.note-box { padding: 12px 14px; background: var(--amber-50); color: #78350f; border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; }
.info-box { padding: 12px 14px; background: var(--blue-50); color: var(--blue-ink); border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px -16px 0; padding: 0 12px; overflow-x: auto; }
.tabs a { padding: 12px 10px; font-weight: 600; font-size: 14.5px; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--blue-ink); border-bottom-color: var(--blue); }
.tree-arm { color: #c3cbd8; margin-right: -6px; font-size: 14px; }
