:root {
  --bg: #f5f7f9; --panel: #fff; --panel-2: #fbfcfd; --ink: #0f1b26; --ink-2: #304050; --muted: #5f6e7c; --faint: #8b97a3;
  --line: #e6eaef; --line-2: #eef1f4; --soft: #f3f6f8;
  --accent: #0a7c56; --accent-2: #0d9466; --accent-ink: #fff; --accent-soft: #e6f5ee; --accent-line: #bfe5d3;
  --warn: #9a5b0b; --warn-soft: #fff4df; --bad: #b42318; --bad-soft: #fdeceb; --info: #2f55c9; --info-soft: #ebf0ff;
  --shadow-sm: 0 1px 2px rgba(15, 27, 38, .05);
  --shadow: 0 1px 2px rgba(15, 27, 38, .04), 0 6px 20px -10px rgba(15, 27, 38, .14);
  --shadow-lg: 0 2px 4px rgba(15, 27, 38, .04), 0 24px 48px -24px rgba(15, 27, 38, .28);
  --hero-1: #0b5e44; --hero-2: #0a7c56; --hero-3: #12a06f;
  --radius: 14px; color-scheme: light
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1014; --panel: #121920; --panel-2: #0f151b; --ink: #e9eef2; --ink-2: #c5d0d9; --muted: #98a6b3; --faint: #6d7a86;
    --line: #212b34; --line-2: #1a232b; --soft: #161e25;
    --accent: #36c58d; --accent-2: #4fd6a0; --accent-ink: #03150d; --accent-soft: #10301f; --accent-line: #1d5a3e;
    --warn: #f0b45c; --warn-soft: #33260f; --bad: #ff8a80; --bad-soft: #3a1815; --info: #91a9ff; --info-soft: #182140;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -16px rgba(0, 0, 0, .8);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 60px -30px rgba(0, 0, 0, .9);
    --hero-1: #0a3f2e; --hero-2: #0b5c40; --hero-3: #138a5f; color-scheme: dark
  }
  .page-size select { color-scheme: dark }
}
* { box-sizing: border-box }
html { background: var(--bg) }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 14px/1.55 "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer }
a { color: var(--accent) }
svg { flex: none }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
.num { font-variant-numeric: tabular-nums }
.mono { font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: -.01em }
.muted { color: var(--muted) }
.hidden { display: none !important }
.cur { font-size: .58em; font-weight: 600; margin-left: .3em; opacity: .7; letter-spacing: 0 }

/* ---------- Login ---------- */
.login { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; overflow: hidden;
  background: radial-gradient(1000px 600px at 15% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, var(--info) 8%, transparent), transparent 70%), var(--bg) }
.login::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%) }
.login-frame { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); width: min(1080px, 100%); min-height: 600px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow-lg); overflow: hidden }
.brand { display: flex; align-items: center; font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none }
.brand img { width: 168px; height: auto; border-radius: 10px; object-fit: contain; background: #000; padding: 6px 8px }
.side .brand { align-items: flex-start; padding: 2px 8px 14px }
.side .brand img { width: 100%; max-width: 220px }

.login-hero { position: relative; display: flex; flex-direction: column; gap: 26px; padding: 36px 40px; color: #fff; isolation: isolate; overflow: hidden;
  background: linear-gradient(150deg, var(--hero-1) 0%, var(--hero-2) 60%, var(--hero-3) 100%) }
.login-hero::before, .login-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none }
.login-hero::before { width: 420px; height: 420px; right: -160px; top: -140px; border: 64px solid rgba(255,255,255,.06) }
.login-hero::after { width: 260px; height: 260px; left: -90px; bottom: -110px; background: rgba(255,255,255,.05) }
.hero-copy h2 { margin: 0 0 10px; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800 }
.hero-copy h2 em { display: block; font-style: normal; color: #b9f5d8 }
.hero-copy p { margin: 0; max-width: 420px; color: rgba(255,255,255,.8); font-size: 15px }
.demo { padding: 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(4, 28, 19, .32); backdrop-filter: blur(8px) }
.demo-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 8px; color: rgba(255,255,255,.7); font-size: 12px }
.demo-head .live { color: #b9f5d8 }
.demo-head .live i { background: #6ee7b7 }
.demo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px }
.demo-row:nth-child(2) { background: rgba(255,255,255,.09) }
.demo-row .mv-icon { background: rgba(255,255,255,.14); color: #d6fbe9 }
.demo-row div { flex: 1; min-width: 0 }
.demo-row b { display: block; font-size: 13.5px }
.demo-row small { color: rgba(255,255,255,.65); font-size: 12px }
.demo-row strong { color: #b9f5d8; font-variant-numeric: tabular-nums; white-space: nowrap }
.demo-row.faded { opacity: .7 }
.demo-balance { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-top: 6px; padding: 12px; border-top: 1px dashed rgba(255,255,255,.2) }
.demo-balance span { color: rgba(255,255,255,.7); font-size: 12.5px }
.demo-balance b { margin-inline-start: auto; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap }
.demo-balance b small { font-size: 12px; opacity: .7; font-weight: 600 }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: auto 0 0; padding: 0; list-style: none }
.features li { display: grid; gap: 8px; align-content: start }
.features b { display: block; font-size: 13px }
.features span:not(.f-icon) { color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.45 }
.f-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); color: #d6fbe9 }
.f-icon svg { width: 17px; height: 17px }

.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px 52px }
.login-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 18px }
.language-control { position: relative; display: inline-flex; align-items: center; flex: none }
.language-picker { appearance: none; min-height: 34px; padding: 0 29px 0 34px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer }
.language-picker:hover, .language-picker:focus-visible { border-color: var(--accent) }
.language-picker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.language-picker:disabled { opacity: .58; cursor: wait }
.language-control span { position: absolute; display: grid; place-items: center; pointer-events: none }
.language-globe { left: 10px; color: var(--accent) }
.language-chevron { right: 9px; color: var(--muted) }
.language-globe svg { width: 15px; height: 15px }
.language-chevron svg { width: 12px; height: 12px }
.login-form .eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); font-size: 12px; font-weight: 650 }
.login-form .eyebrow svg { width: 13px; height: 13px }
.login-form h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em }
.login-form > p.muted { margin: 0 0 26px; font-size: 14px }
.login-form .field { margin-bottom: 16px }
.key-field { position: relative }
.key-field .input { min-height: 48px; padding-right: 46px }
.eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 8px; background: none; color: var(--muted) }
.eye:hover { background: var(--line); color: var(--ink) }
.eye svg { width: 18px; height: 18px }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none }
.trust li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap }
.trust svg { flex: none; width: 14px; height: 14px; color: var(--accent) }
.login-help { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px }
.login-help svg { width: 15px; height: 15px; color: var(--faint) }
.login-help a { color: var(--accent); font-weight: 600; text-decoration: none }
.login-help a:hover { text-decoration: underline }
/* Maintenance view */
.login-card { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg) }

@media (max-width: 900px) {
  .login { padding: 20px 16px; place-items: start center }
  .login-frame { grid-template-columns: 1fr; min-height: 0; max-width: 480px }
  .login-hero { display: none }
  .login-form { padding: 32px 24px }
}
/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 18px 12px 14px;
  background: var(--panel); border-right: 1px solid var(--line) }
.side-name { display: flex; align-items: center; gap: 10px; margin: 2px 8px 18px; color: var(--ink); text-decoration: none }
.logo-mark { width: 32px; height: 32px; flex: none; color: var(--accent) }
.side-copy { display: grid; gap: 1px; min-width: 0 }
.side-word { font-weight: 800; font-size: 15.5px; letter-spacing: -.045em; line-height: 1.05 }
.side-word em { font-style: normal; color: var(--accent) }
.side-name small { color: var(--muted); font-size: 11px; font-weight: 550 }
.login-form .side-name { margin: 0 0 22px }
.nav { display: grid; gap: 1px; overflow-y: auto }
.nav-group { margin: 16px 10px 6px; color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase }
.nav-group:first-child { margin-top: 0 }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2);
  text-decoration: none; font-weight: 500; font-size: 13.5px }
.nav a svg { width: 18px; height: 18px; color: var(--faint) }
.nav a:hover { background: var(--soft); color: var(--ink) }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650 }
.nav a[aria-current="page"] svg { color: var(--accent) }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent) }
.account { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding: 12px 4px 2px; border-top: 1px solid var(--line) }
.account-row { display: flex; align-items: center; gap: 10px; min-width: 0 }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--hero-2), var(--hero-3));
  color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase }
.account b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.account-identity { display: grid; gap: 2px; min-width: 0; line-height: 1.3 }
.account-identity small { color: var(--muted); font-size: 11px }
.account .avatar { flex: none; width: 36px; height: 36px; border-radius: 11px; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel)); font-size: 12px }
.account-logout { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer }
.account-logout svg { width: 17px; height: 17px }
.account-logout:hover, .account-logout:focus-visible { background: var(--panel-2); color: var(--ink) }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600 }
.link-btn:hover { color: var(--bad) }

.content { min-width: 0; display: flex; flex-direction: column }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line) }
.crumb { color: var(--muted); font-size: 13px }
.crumb b { color: var(--ink); font-weight: 650 }
.top-actions { display: flex; align-items: center; gap: 10px }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; white-space: nowrap }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ping 2s infinite }
.live.off i { background: var(--faint); animation: none }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent) } 70%, 100% { box-shadow: 0 0 0 7px transparent } }
main { width: 100%; max-width: 1640px; padding: 28px 32px 32px }
.page-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; max-width: 1640px; margin-top: auto; padding: 18px 32px 26px;
  color: var(--faint); font-size: 12px }
.page-foot span { display: inline-flex; align-items: center; gap: 6px }
.page-foot svg { width: 14px; height: 14px; color: var(--accent) }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px }
.head h1 { margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -.025em; font-weight: 750 }
.head p { margin: 4px 0 0; color: var(--muted) }
.env { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
  background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 650; white-space: nowrap }
.env.live-env { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line) }
.env::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }

/* ---------- Building blocks ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow) }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--line) }
.card > header h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em }
.card > header p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px }
.pad { padding: 20px }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start }
.grid2.form-left { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr) }
.col { display: grid; gap: 16px; align-content: start; min-width: 0 }
.scroll { overflow-x: auto }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .05s; white-space: nowrap }
.btn svg { width: 16px; height: 16px }
.btn:hover { background: var(--soft) }
.btn:active { transform: translateY(1px) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(10, 124, 86, .3), inset 0 1px 0 rgba(255, 255, 255, .12) }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2) }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted) }
.btn.ghost:hover { background: var(--soft); color: var(--ink) }
.btn.on-hero { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .26); color: #fff; box-shadow: none }
.btn.on-hero:hover { background: rgba(255, 255, 255, .22) }
.btn.on-hero.solid { background: #fff; color: #0a5e43; border-color: #fff }
.btn.on-hero.solid:hover { background: #f1fbf6 }
.btn.danger { color: var(--bad) }
.btn.danger:hover { background: var(--bad-soft); border-color: transparent }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 12.5px; border-radius: 8px }
.btn.small svg { width: 14px; height: 14px }
.btn.lg { min-height: 46px; font-size: 15px; border-radius: 12px }
.btn[disabled] { opacity: .55; cursor: default; transform: none }
.btn.block { width: 100% }
.icon-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: inherit; opacity: .8 }
.icon-btn:hover { background: rgba(127, 127, 127, .16); opacity: 1 }
.icon-btn svg { width: 14px; height: 14px }

label.field { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 600; font-size: 13px; color: var(--ink-2) }
label.field small { color: var(--muted); font-weight: 500 }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px }
input.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  box-shadow: inset 0 1px 2px rgba(15, 27, 38, .04); transition: border-color .15s, box-shadow .15s }
input.input::placeholder { color: var(--faint) }
input.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); background: var(--panel) }
.money-field { position: relative }
.money-field .input { padding-right: 56px; min-height: 54px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.money-field span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 650; font-size: 13px; pointer-events: none }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px }
.chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; transition: background .15s, border-color .15s }
.chip:hover { border-color: var(--accent-line); background: var(--accent-soft) }
.error { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13px }
.note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 11px 12px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 12.5px }
.note svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent) }
.hint { display: block; margin: 8px 2px 0; color: var(--faint); font-size: 12px; font-weight: 500; line-height: 1.35; }
label.field small.hint { margin: 2px 0 0; font-size: 12px; font-weight: 500; color: var(--faint); line-height: 1.35; }

/* ---------- Overview ---------- */
.ov-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px }
.hero { display: flex; flex-direction: column; gap: 18px; min-width: 0;
  padding: 22px 24px; border: 1px solid rgba(185, 245, 216, .17); border-radius: 18px; color: #fff; box-shadow: var(--shadow-lg);
  background: linear-gradient(120deg, var(--hero-1), var(--hero-2) 65%, var(--hero-3)) }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 12px }
.hero-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .9 }
.hero-label svg { width: 16px; height: 16px }
.hero-amount { margin-top: 6px; font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.wallet-id-card { display: grid; gap: 4px; width: fit-content; max-width: 100%; min-width: 0; padding: 8px 12px 11px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--ink) }
.wallet-id-header, .wallet-id-header span { display: flex; align-items: center; gap: 7px }
.wallet-id-header { justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase }
.wallet-id-header span svg { flex: none; width: 15px; height: 15px; color: var(--accent) }
.wallet-id-header button { flex: none }
.wallet-id-value { font: 600 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all }
.hero .wallet-id-card { border-color: #d4efe340; background: #062b2380; color: #fff }
.hero .wallet-id-header, .hero .wallet-id-header span svg { color: #b9f5d8 }
.hero-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr)); gap: 8px }
.hero-stat { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; background: rgba(0, 0, 0, .15) }
.hero-stat svg { flex: none; width: 15px; height: 15px; color: #b9f5d8 }
.hero-stat div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; overflow-wrap: anywhere }
.hero-stat span { width: 100%; font-size: 12px; color: #d4efe3 }
.hero-stat b { font-size: 15px; font-variant-numeric: tabular-nums }
.hero-stat small { font-size: 11px; color: #d4efe3 }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto }
.wallet-summary { margin-bottom: 16px; overflow: hidden }
.wallet-balance { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px clamp(16px, 2.5vw, 28px); border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, var(--accent-soft), var(--panel) 68%) }
.wallet-balance .hero-label { color: var(--accent) }
.wallet-balance .hero-amount { color: var(--ink) }
.wallet-balance .hero-amount .cur { color: var(--muted) }
.wallet-controls { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: flex-end; gap: 10px; min-width: 0 }
.wallet-summary .wallet-id-card { align-content: center }
.wallet-action { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 8px 8px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2) }
.wallet-fee { display: grid; gap: 1px; min-width: 72px }
.wallet-fee small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase }
.wallet-fee b { color: var(--ink); font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em }
.wallet-action .btn { min-height: 42px; padding-inline: 16px }
.wallet-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) }
.wallet-metrics > .kpi { border: 0; border-radius: 0; box-shadow: none }
.wallet-metrics > .kpi + .kpi { border-inline-start: 1px solid var(--line) }
.wallet-metrics .kpi-icon { flex: none }
.wallet-metrics .kpi-body b { white-space: normal; overflow-wrap: anywhere }
@media (max-width: 620px) {
  .wallet-metrics { grid-template-columns: minmax(0, 1fr) }
  .wallet-metrics > .kpi + .kpi { border-inline-start: 0; border-top: 1px solid var(--line) }
}
.kpis { display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px }
.kpi { display: flex; align-items: center; gap: 14px; padding: 14px 16px }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent) }
.kpi-icon.blue { background: var(--info-soft); color: var(--info) }
.kpi-icon.amber { background: var(--warn-soft); color: var(--warn) }
.kpi-icon svg { width: 19px; height: 19px }
.kpi-body { flex: 1; min-width: 0 }
.kpi-body span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500 }
.kpi-body b { display: block; font-size: 19px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums }
.delta.up { background: var(--accent-soft); color: var(--accent) }
.delta.down { background: var(--bad-soft); color: var(--bad) }
.delta.flat { background: var(--soft); color: var(--muted) }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px }

/* Chart */
.chart { position: relative; padding: 18px 20px 14px }
.chart-plot { position: relative; height: 200px; margin-left: 44px }
.chart-grid { position: absolute; inset: 0 0 22px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none }
.chart-grid div { position: relative; border-top: 1px dashed var(--line) }
.chart-grid div:last-child { border-top-style: solid }
.chart-grid span { position: absolute; right: calc(100% + 8px); top: -8px; color: var(--faint); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap }
.bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px }
.bar { position: relative; display: grid; grid-template-rows: 1fr 22px; align-items: end; justify-items: center; min-width: 0; cursor: default }
.bar-fill { width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity: .42; transition: opacity .15s }
.bar.today .bar-fill { opacity: 1 }
.bar.zero .bar-fill { background: var(--line); opacity: 1 }
.bar:hover .bar-fill { opacity: .9 }
.bar-label { align-self: center; color: var(--faint); font-size: 10.5px; white-space: nowrap; font-variant-numeric: tabular-nums }
.bar.today .bar-label { color: var(--accent); font-weight: 700 }
.tip { position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 7px 10px; border-radius: 9px; background: var(--ink);
  color: var(--panel); font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transition: opacity .12s }
.tip b { display: block; font-size: 13px }
.bar:hover .tip { opacity: 1 }
.bar:first-child .tip, .bar:nth-child(2) .tip { left: 0; transform: none }
.bar:last-child .tip, .bar:nth-last-child(2) .tip { left: auto; right: 0; transform: none }

/* Activity list */
.activity { margin: 0; padding: 4px 0; list-style: none }
.activity li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; cursor: pointer; transition: background .12s }
.activity li:hover { background: var(--panel-2) }
.act-body { flex: 1; min-width: 0 }
.act-body b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.act-body small { color: var(--muted); font-size: 12px }
.act-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
.act-amount small { display: block; font-weight: 500; font-size: 11.5px }
.mv-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 800 }
.mv-icon svg { width: 16px; height: 16px }
.mv-credit, .mv-refund, .mv-paid { background: var(--accent-soft); color: var(--accent) }
.mv-open { background: var(--info-soft); color: var(--info) }
.mv-withdrawal, .mv-expired, .mv-cancelled { background: var(--soft); color: var(--muted) }
.mv-failed { background: var(--bad-soft); color: var(--bad) }
.amount-in { color: var(--accent) }

/* Tables */
.table { width: 100%; border-collapse: collapse }
.table th { padding: 10px 20px; text-align: left; background: var(--panel-2); color: var(--faint); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle }
.table tr:last-child td { border-bottom: 0 }
.table tbody tr.click { cursor: pointer }
.table tbody tr:hover td { background: var(--panel-2) }
.table .right { text-align: right }
.table td.num { white-space: nowrap }
.table td b { font-weight: 700 }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0 }
.cell-main b { display: block; font-size: 13.5px }
.cell-main small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere }
.wd-account small { white-space: nowrap }
.wd-meta { display: flex; align-items: center; gap: 8px }
.wd-net { font-variant-numeric: tabular-nums }
.wd-back { display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase }
.wd-back b { color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none }
.table td.wd-status { text-align: right; white-space: nowrap }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid transparent }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.b-paid { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line) }
.b-open, .b-pending { background: var(--info-soft); color: var(--info) }
.b-expired, .b-cancelled { background: var(--soft); color: var(--muted) }
.b-failed, .b-rejected { background: var(--bad-soft); color: var(--bad) }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line) }
.search { position: relative; width: 240px }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--faint) }
.search .input { min-height: 36px; padding: 6px 10px 6px 34px }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px }
.pager > span { font-variant-numeric: tabular-nums }
.pager-nav { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel) }
.pager-nav .btn { min-width: 92px; border: 0; border-radius: 0; box-shadow: none; background: transparent }
.pager-nav .btn + .btn { border-left: 1px solid var(--line) }
.pager-nav .btn:disabled { opacity: .38; background: transparent }
.card > .pager { color: var(--ink-2) }
.card > .pager .btn { color: var(--ink) }
.page-switch { display: inline-flex; align-items: center; margin-left: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel) }
.page-switch button { min-width: 34px; height: 30px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer }
.page-switch button + span, .page-switch span + button { border-left: 1px solid var(--line) }
.page-switch span { min-width: 52px; padding: 0 10px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums }
.page-switch button:disabled { opacity: .35; cursor: default }
.empty { display: grid; justify-items: center; gap: 6px; padding: 44px 20px; text-align: center; color: var(--muted) }
.empty .mv-icon { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 4px }
.empty .mv-icon svg { width: 20px; height: 20px }
.empty b { color: var(--ink); font-size: 14px }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line) }
.segmented button { padding: 5px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm) }

/* ---------- QR slip ---------- */
.slip { overflow: hidden }
.slip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px dashed var(--line) }
.slip-body { display: grid; justify-items: center; gap: 6px; padding: 26px 20px 20px; text-align: center; background: radial-gradient(400px 200px at 50% 0%, var(--accent-soft), transparent 70%) }
.qr-frame { position: relative; padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow) }
.qr-frame img { display: block; width: 216px; height: 216px; image-rendering: pixelated }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent) }
.qr-frame::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0 }
.qr-frame::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0 }
.qr-wait { display: grid; place-items: center; align-content: center; gap: 10px; width: 244px; height: 244px; padding: 20px; border-radius: 18px; border: 1px dashed var(--line); color: var(--muted); background: var(--panel) }
.qr-wait .mv-icon { width: 46px; height: 46px; border-radius: 14px }
.qr-wait .mv-icon svg { width: 22px; height: 22px }
.slip-amount { margin-top: 14px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums }
.countdown { width: min(260px, 100%); margin-top: 4px }
.countdown-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px }
.countdown-row b { color: var(--ink); font-variant-numeric: tabular-nums }
.countdown.ending .countdown-row b { color: var(--bad) }
.progress { height: 5px; margin-top: 6px; border-radius: 5px; background: var(--line); overflow: hidden }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width 1s linear }
.countdown.ending .progress span { background: var(--bad) }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; padding: 16px 20px; border-top: 1px solid var(--line) }
.kv dt { color: var(--muted); font-size: 12.5px }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; font-size: 13px }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px }
.slip-actions .btn { flex: 1 }
.placeholder { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 440px; padding: 24px; text-align: center; color: var(--muted) }
.placeholder .mv-icon { width: 52px; height: 52px; border-radius: 15px }
.placeholder .mv-icon svg { width: 24px; height: 24px }
.placeholder b { color: var(--ink); font-size: 15px }

/* ---------- Withdraw ---------- */
.summary { margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); overflow: hidden }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 13px }
.summary div + div { border-top: 1px solid var(--line-2) }
.summary span { color: var(--muted) }
.summary b { font-variant-numeric: tabular-nums }
.summary .total { background: var(--accent-soft) }
.summary .total b { color: var(--accent); font-size: 15px }
.confirm-box { margin-bottom: 16px; padding: 16px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft) }
.confirm-box h3 { margin: 0 0 10px; font-size: 14px }
.confirm-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 14px; font-size: 13px }
.confirm-box dt { color: var(--muted) }
.confirm-box dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere }
.confirm-box dt.holder-check, .confirm-box dd.holder-check { grid-column: 1 / -1; text-align: left }
.confirm-box dd.holder-check { margin-top: 2px; padding: 10px 12px; border-radius: 10px; background: var(--panel); font-size: 16px; line-height: 1.4; letter-spacing: .02em }
.confirm-box .confirm-actions { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr) }
.confirm-box .confirm-actions .btn.primary { min-height: 48px }
.confirm-actions { display: flex; gap: 8px }
.confirm-actions .btn { flex: 1 }

/* ---------- Integration ---------- */
.list { margin: 0; padding: 0; list-style: none }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 50px; padding: 10px 20px; border-bottom: 1px solid var(--line-2) }
.list li:last-child { border-bottom: 0 }
.list li > span:first-child { color: var(--muted); font-size: 13px; white-space: nowrap }
.list li > span:last-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0 }
.code-block { overflow: hidden; border-radius: 12px; border: 1px solid #1d2935; background: #0d151d }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 14px; border-bottom: 1px solid #1d2935; color: #8b9cab; font-size: 12px; font-weight: 600 }
.code-head .btn { background: transparent; border-color: #2a3845; color: #c9d6e1; box-shadow: none }
.code-head .btn:hover { background: #17222c }
.code { margin: 0; padding: 14px 16px; overflow-x: auto; color: #d7e3ec; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre }
.code-label { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; font-weight: 650 }
.code-label + .code-block { margin-bottom: 18px }

/* ---------- Skeleton & toast ---------- */
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--line-2) 25%, var(--line) 50%, var(--line-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite }
@keyframes shimmer { to { background-position: -200% 0 } }
.sk-head { width: 220px; height: 30px; margin-bottom: 24px }
.sk-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px }
.sk-block { height: 216px; border-radius: 18px }
.sk-wide { height: 280px; border-radius: 14px }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; display: flex; align-items: center; gap: 10px; transform: translateX(-50%); padding: 11px 16px;
  border-radius: 12px; background: var(--ink); color: var(--panel); font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .25s ease-out; max-width: calc(100% - 32px) }
.toast svg { width: 18px; height: 18px }
.toast-in { background: var(--accent); color: var(--accent-ink); font-size: 14px; padding: 13px 18px }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px) } }

@media (max-width: 1100px) {
  .ov-top, .ov-grid { grid-template-columns: 1fr }
  .kpis { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width: 960px) {
  .grid2, .grid2.form-left { grid-template-columns: 1fr }
  .kpis { grid-template-columns: 1fr }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr }
  .side { position: sticky; z-index: 6; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px 0; border-right: 0; border-bottom: 1px solid var(--line) }
  .side-name { flex: 1; margin: 0 0 6px }
  .account { margin: 0; padding: 0; border: 0; background: none; gap: 6px }
  .account-identity small { display: none }
  .account b { max-width: 108px }
  .account .avatar { width: 28px; height: 28px; border-radius: 8px }
  .mobile-tools { display: flex; flex-wrap: wrap; order: 3; width: 100%; align-items: center; gap: 8px; padding: 2px 0 8px }
  .mobile-tools .live { margin-right: auto; min-width: 0 }
  .mobile-tools .btn.primary { flex: none }
  .nav { order: 4; width: calc(100% + 32px); display: flex; gap: 2px; margin: 0 -16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none }
  .nav-group { display: none }
  .nav a { flex: none; padding: 10px 10px 12px; border-radius: 0; font-size: 13px }
  .nav a svg { display: none }
  .nav a[aria-current="page"] { background: none }
  .nav a[aria-current="page"]::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px 2px 0 0 }
  .topbar { display: none }
  main { padding: 20px 16px 24px }
  .page-foot { padding: 14px 16px 22px }
  .head { flex-direction: column; align-items: flex-start; gap: 8px }
  .head h1 { font-size: 21px }
  .hero { min-height: 0; padding: 20px }
  .table .hide-sm { display: none }
  .table th, .table td { padding-left: 14px; padding-right: 14px }
  .toolbar { padding: 12px 14px }
  .search { width: 100% }
  .segmented { width: 100%; overflow-x: auto }
  .chart { padding: 14px 12px 10px }
  .chart-plot { margin-left: 34px; height: 170px }
  .bars { gap: 3px }
  .bar-label { font-size: 9.5px }
  .bar:not(.today):nth-child(odd) .bar-label { visibility: hidden }
  .activity li { padding: 10px 14px }
  .list li { padding: 10px 14px; flex-direction: column; align-items: flex-start; gap: 2px }
  .list li > span:last-child { text-align: left }
  .sk-row { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}

/* ---------- Copy, filters, results ---------- */
.copyable { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; vertical-align: middle }
.copy-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.copyable .icon-btn { opacity: .55 }
.copyable:hover .icon-btn, .copyable .icon-btn:focus-visible { opacity: 1 }
.copyable.strong .copy-text { color: var(--ink); font-weight: 650 }
.cell-main .copyable.strong { font-size: 13px }
.head-actions { display: flex; align-items: center; gap: 12px }
.filters { display: grid; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2) }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.filter-row .search { margin-left: auto }
.date-range, .amount-range { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px }
.date-range svg { width: 16px; height: 16px; color: var(--faint) }
.date-range .input { width: 150px; min-height: 34px; padding: 5px 10px; font-size: 13px }
.amount-range .input { width: 118px; min-height: 34px; padding: 5px 10px; font-size: 13px; font-variant-numeric: tabular-nums }
.amount-range > span:first-child { font-weight: 600; color: var(--ink-2) }
.tags { gap: 6px }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line); font-size: 12px; font-weight: 600 }
.tag button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit }
.tag button:hover { background: color-mix(in srgb, var(--accent) 15%, transparent) }
.tag svg { width: 12px; height: 12px }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px }
.result-bar b { color: var(--ink); font-variant-numeric: tabular-nums }
.result-bar b.amount-in { color: var(--accent) }
.result-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto }
.page-size { display: inline-flex; align-items: center; gap: 6px; color: var(--muted) }
.page-size select { color-scheme: light; background: var(--panel); color: var(--ink) }
.mobile-tools { display: none }
.bar:not(.zero) { cursor: pointer }
@media (max-width: 760px) {
  .filters { padding: 12px 14px }
  .filter-row .search { margin-left: 0 }
  .date-range { width: 100% }
  .date-range .input { flex: 1; width: auto }
  .amount-range { width: 100% }
  .amount-range .input { flex: 1; width: auto }
  .result-bar { padding: 10px 14px }
  .result-actions { width: 100%; margin-left: 0 }
  .result-actions .btn { flex: 1 }
}

/* ---------- Density: fill the canvas ---------- */
.card.fill { display: flex; flex-direction: column }
.card.fill .chart { flex: 1; display: flex; flex-direction: column }
.card.fill .chart-plot { flex: 1; min-height: 220px }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line) }
.mini-stats > div { display: grid; gap: 1px; padding: 14px 20px; min-width: 0 }
.mini-stats > div + div { border-left: 1px solid var(--line) }
.mini-stats span { color: var(--muted); font-size: 12px }
.mini-stats b { font-size: 16px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.mini-stats small { color: var(--faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch }
.grid3 > .card { display: flex; flex-direction: column; min-width: 0 }
.grid3 > .card > header { min-height: 68px }
.grid3 > .card > .pad { display: flex; flex: 1; flex-direction: column }
.stack-bar { display: flex; gap: 3px; height: 12px; overflow: hidden; border-radius: 6px }
.seg { min-width: 4px; border-radius: 3px }
.seg-paid { background: var(--accent) }
.seg-open { background: var(--info) }
.seg-expired { background: color-mix(in srgb, var(--faint) 70%, transparent) }
.seg-cancelled { background: color-mix(in srgb, var(--bad) 70%, transparent) }
.seg-none { background: var(--line) }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 16px 0 0; padding: 0; list-style: none }
.legend li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 13px }
.legend li:hover { background: var(--soft) }
.legend .dot { width: 9px; height: 9px; border-radius: 3px }
.legend span { color: var(--muted); flex: 1 }
.legend b { font-variant-numeric: tabular-nums }
.legend small { min-width: 34px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums }
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; flex: 1; min-height: 108px }
.hour { display: flex; align-items: flex-end; height: 100% }
.hour i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--accent) 35%, var(--line)) }
.hour.peak i { background: var(--accent) }
.hour:hover i { background: var(--accent-2) }
.hour-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-size: 11px }
.shortcuts { display: grid; flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; padding: 14px }
.shortcut { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none;
  background: var(--panel-2); transition: border-color .15s, background .15s; min-width: 0 }
.shortcut:hover { border-color: var(--accent-line); background: var(--accent-soft) }
.shortcut .kpi-icon { width: 34px; height: 34px; border-radius: 10px }
.shortcut .kpi-icon svg { width: 17px; height: 17px }
.shortcut div { min-width: 0 }
.shortcut b { display: block; font-size: 13px }
.shortcut small { display: block; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
.tiles .kpi { padding: 14px }
.tiles .kpi-icon { width: 36px; height: 36px }
.tiles .kpi-body b { font-size: 17px }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 22px 18px 24px; list-style: none }
.steps li { position: relative; display: grid; align-content: start; justify-items: center; gap: 10px; min-width: 0; padding: 0 8px; text-align: center }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 50%; width: 100%; height: 1px; background: var(--line) }
.steps .step-icon { position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 12px;
  background: var(--panel-2); border-color: var(--accent-line); box-shadow: 0 0 0 5px var(--panel) }
.steps .step-icon svg { width: 19px; height: 19px }
.step-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line) }
.step-icon svg { width: 16px; height: 16px }
.steps b { display: block; font-size: 13px }
.steps small { display: block; max-width: 25ch; margin: 4px auto 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere }
.endpoints li > span:first-child { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2) }
.list.endpoints li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px }
.endpoint-main { display: grid; gap: 2px; min-width: 0 }
.endpoint-main b { color: var(--ink); font-size: 13.5px; font-weight: 650 }
.endpoint-main .mono { color: var(--muted); font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sample-panel { display: grid }
.sample-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow) }
.sample-toggle:hover { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 6%, var(--panel)) }
.sample-panel.is-open .sample-toggle { border-bottom-color: transparent; border-radius: var(--radius) var(--radius) 0 0; box-shadow: none }
.sample-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent) }
.sample-icon svg { width: 18px; height: 18px }
.sample-copy { display: grid; gap: 2px; flex: 1; min-width: 0 }
.sample-copy b { font-size: 14.5px; letter-spacing: -.01em }
.sample-copy small { color: var(--muted); font-size: 12.5px; font-weight: 500 }
.sample-chevron { display: grid; place-items: center; flex: none; width: 28px; height: 28px; color: var(--muted); transition: transform .16s ease }
.sample-chevron svg { width: 16px; height: 16px }
.sample-panel.is-open .sample-chevron { transform: rotate(180deg) }
.sample-body { padding: 16px 16px 4px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--panel); box-shadow: var(--shadow) }
.sample-panel.is-open .sample-body { box-shadow: var(--shadow) }
.sample-static { padding: 16px 16px 4px }
.sample-static .code-block:last-child { margin-bottom: 12px }
.integration { align-items: stretch }
.integration .note { margin: 0 }
.endpoint-card { display: flex; flex-direction: column }
.endpoint-head { display: grid; gap: 2px; min-width: 0 }
.endpoint-head p { margin: 0 }
.endpoint-groups { display: flex; flex-direction: column }
.endpoint-group h3 { margin: 0; padding: 14px 20px 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }
.endpoint-group + .endpoint-group { border-top: 1px solid var(--line) }
@media (min-width: 961px) {
  .endpoint-col { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch }
  .endpoint-card { height: 100% }
  .endpoint-groups { flex: 1 }
  .endpoint-group { display: flex; flex-direction: column; min-height: 0 }
  .endpoint-group .list { flex: 1; display: flex; flex-direction: column }
  .endpoint-group .list li { flex: 1 }
}
.method { display: inline-block; min-width: 46px; padding: 2px 0; border-radius: 6px; font: 700 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; font-style: normal; letter-spacing: .03em }
.m-get { background: var(--info-soft); color: var(--info) }
.m-post { background: var(--accent-soft); color: var(--accent) }
@media (max-width: 1280px) {
  .grid3 { grid-template-columns: 1fr 1fr }
  .grid3 > :last-child { grid-column: 1 / -1 }
  .grid3 > :last-child .shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .mini-stats { grid-template-columns: 1fr 1fr }
  .mini-stats > div:nth-child(3) { border-left: 0 }
  .mini-stats > div:nth-child(n+3) { border-top: 1px solid var(--line) }
}
@media (max-width: 1100px) {
  .tiles { grid-template-columns: 1fr 1fr 1fr }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 16px }
  .steps li { grid-template-columns: 42px minmax(0, 1fr); justify-items: start; align-items: center; padding: 0; text-align: left }
  .steps li:not(:last-child)::after { top: 21px; left: 21px; width: 1px; height: calc(100% + 16px) }
  .steps small { max-width: none; margin-inline: 0 }
}
@media (max-width: 760px) {
  .grid3 { grid-template-columns: 1fr }
  .grid3 > :last-child .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .tiles { grid-template-columns: 1fr }
  .mini-stats > div { padding: 12px 14px }
  .card.fill .chart-plot { min-height: 170px }
}
@media (max-width: 380px) {
  .grid3 > :last-child .shortcuts { grid-template-columns: 1fr }
}

.create-layout > .slip { display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 100px }
.create-recent { min-width: 0 }
.create-recent > header { min-height: 48px; padding-block: 8px }
.create-recent .activity li { padding-block: 7px }
@media (min-width: 961px) {
  .create-layout > .slip { grid-column: 2; grid-row: 1 / span 2; align-self: stretch }
  .create-layout .slip-main { flex: 1; align-items: center }
}
@media (min-width: 1280px) {
  .create-layout .slip-main { grid-template-columns: minmax(218px, 252px) minmax(0, 1fr) }
}
.preview-slip { display: grid; justify-items: center; align-content: center; gap: 12px; flex: 1; min-height: 380px; padding: 30px 22px 26px; text-align: center;
  background: radial-gradient(440px 200px at 50% 0%, var(--accent-soft), transparent 72%) }
.qr-ghost { position: relative; width: 168px; height: 168px; border-radius: 18px; border: 1px solid var(--accent-line);
  background:
    linear-gradient(var(--accent), var(--accent)) 18px 18px / 28px 28px no-repeat,
    linear-gradient(var(--panel) , var(--panel)) 24px 24px / 16px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 122px 18px / 28px 28px no-repeat,
    linear-gradient(var(--panel), var(--panel)) 128px 24px / 16px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 18px 122px / 28px 28px no-repeat,
    linear-gradient(var(--panel), var(--panel)) 24px 128px / 16px 16px no-repeat,
    radial-gradient(circle, var(--accent) 1.5px, transparent 1.7px) 62px 58px / 14px 14px,
    color-mix(in srgb, var(--accent) 10%, var(--panel));
  box-shadow: 0 16px 40px -24px color-mix(in srgb, var(--accent) 70%, transparent) }
.qr-ghost::before, .qr-ghost::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--accent) }
.qr-ghost::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0 }
.qr-ghost::after { right: -7px; bottom: -7px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0 }
.preview-wait { margin: 2px 0 0; color: var(--muted); font-size: 13px }
.preview-amount { display: flex; align-items: baseline; gap: 6px; color: var(--faint); font-variant-numeric: tabular-nums }
.preview-sum { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; opacity: .45; transition: opacity .15s, color .15s }
.preview-sum.is-set { color: var(--ink); opacity: 1 }
.preview-amount span { font-size: 14px; font-weight: 650; color: var(--muted) }
.preview-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(440px, 100%); margin-top: 6px }
.preview-facts span { display: grid; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--muted); font-size: 11.5px }
.preview-facts b { color: var(--ink); font-size: 13px }
.chips-5 .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent) }
@media (max-width: 520px) {
  .preview-slip { min-height: 0; padding: 26px 14px 20px }
  .preview-facts { gap: 6px }
  .preview-facts span { padding: 9px 4px; font-size: 11px }
  .preview-facts b { font-size: 12px }
}
@media (max-width: 340px) {
  .preview-facts { grid-template-columns: 1fr }
}
.placeholder .note { width: min(420px, 100%) }
.state-rate { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px }
.state-rate b { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums }
.state-rate span { color: var(--muted); font-size: 13px }

/* Create QR form polish */
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px }
label.field small.optional { padding: 2px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--faint); font-size: 11px; font-weight: 600 }
input.input.mono::placeholder { font-family: "Be Vietnam Pro", ui-sans-serif, system-ui, sans-serif; font-size: 13.5px; letter-spacing: 0 }
input.input.mono { min-height: 46px; font-size: 14px }
.card.pad > .note { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel-2); color: var(--ink-2); font-size: 13px; line-height: 1.55 }
.btn.primary.lg { min-height: 50px; font-weight: 700; font-size: 15.5px; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22) }
.btn.primary.lg:hover { filter: brightness(1.06) }
.btn.primary.lg svg { width: 18px; height: 18px }
@media (prefers-color-scheme: dark) {
  .btn.primary.lg { background: linear-gradient(180deg, #3fd39a, #1fa56f); color: #021a0f }
}

/* Payment slip polish */
.qr-frame { padding: 16px; border-radius: 20px; box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow) }
.qr-frame::before, .qr-frame::after { content: none }
.qr-frame img { width: 228px; height: 228px }
.slip-body { gap: 10px; padding: 30px 20px 22px }
.slip-amount { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-top: 12px }
.slip-amount .copyable { gap: 6px }
.slip-amount .copy-text { font: inherit }
.slip-amount .cur { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0 }
.slip-amount .copy-btn, .slip-amount button { align-self: center }
.countdown { width: min(280px, 100%); margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2) }
.countdown-row { font-size: 13px }
.countdown-row b { font-size: 14px }
.kv { grid-template-columns: minmax(110px, auto) 1fr; gap: 0 16px; padding: 6px 20px; align-items: center }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px dashed var(--line-2) }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0 }
.kv dt { font-size: 13px }
.kv dd { font-size: 13px; display: flex; justify-content: flex-end; min-width: 0 }
.kv dd .copyable { min-width: 0 }
.kv dd .copy-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.slip-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-top: auto; padding: 14px 20px 20px; border-top: 1px solid var(--line) }
.slip-actions .btn { min-height: 40px; font-size: 13.5px; font-weight: 600; border-radius: 10px }
.slip-actions .btn.danger { border-color: color-mix(in srgb, var(--bad) 35%, transparent) }
.transfer { margin: 0 20px 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); display: grid; gap: 2px }
.transfer header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; color: var(--ink) }
.transfer header svg { width: 17px; height: 17px; color: var(--accent) }
.transfer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; border-bottom: 1px dashed var(--line-2); font-size: 13.5px }
.transfer-row:last-of-type { border-bottom: 0 }
.transfer-row > span:first-child { color: var(--muted) }
.transfer-row b, .transfer-row .copyable { font-weight: 650; color: var(--ink); text-align: right; min-width: 0; overflow-wrap: anywhere }
.transfer-row .key .copy-text { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent) }
.transfer-warn { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; line-height: 1.5 }
.transfer-warn svg { width: 16px; height: 16px; flex: none; margin-top: 1px }
/* Slip v2: closed state, amount and rows */
.slip-amount { align-items: center; gap: 8px }
.slip-amount .num { font: inherit }
.slip-amount .cur { margin-left: -2px }
.slip-amount .icon-btn { width: 30px; height: 30px; margin-left: 4px }
.slip-body.is-closed { background: none; padding: 22px 20px 18px }
.slip-body.is-closed .qr-wait { width: 100%; max-width: 420px; height: auto; grid-auto-flow: column; justify-content: center; gap: 12px; padding: 14px 16px; border-style: solid; border-radius: 12px; font-size: 13.5px }
.slip-body.is-closed .qr-wait .mv-icon { width: 34px; height: 34px; border-radius: 10px }
.slip-body.is-closed .qr-wait .mv-icon svg { width: 17px; height: 17px }
.slip-body.is-closed .slip-amount { margin-top: 4px; font-size: 26px; color: var(--muted) }
.kv { column-gap: 0 }
.kv dd { padding-left: 16px }
.kv dt, .kv dd { border-bottom-style: solid; border-bottom-color: var(--line-2) }
.slip .slip-head { padding: 16px 20px; border-bottom-style: solid }
.slip-main { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px }
.slip-qr { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-2) }
.slip-qr .qr-frame { width: 100%; padding: 8px; border-radius: 10px; box-shadow: none }
.slip-qr .qr-frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain }
.slip-qr .qr-wait { width: 100%; height: auto; aspect-ratio: 1; font-size: 12.5px }
.slip-qr .countdown { width: 100%; margin: 0; padding: 0; border: 0; background: none }
.slip-qr .countdown-row { font-size: 12px }
.slip-qr .countdown-row b { font-size: 13px }
.slip-qr .progress { height: 4px; margin-top: 7px }
.slip-info { display: grid; gap: 14px; min-width: 0 }
.slip-total { padding: 0 0 12px; border-bottom: 1px solid var(--line) }
.slip-total > span, .st-amount > small { color: var(--muted); font-size: 12px }
.slip-info .slip-amount { justify-content: flex-start; margin: 2px 0 0; font-size: clamp(23px, 3.5vw, 34px) }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13px }
.srow:last-child { border-bottom: 0 }
.srow > span:first-child { flex: none; color: var(--muted) }
.srow > b, .srow > .copyable { min-width: 0; font-weight: 650; color: var(--ink); text-align: right }
.srow .copy-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.srow .key .copy-text { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent) }
.slip-transfer, .slip-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
.slip-transfer .srow, .slip-meta .srow { display: grid; justify-content: stretch; gap: 4px; min-width: 0; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2) }
.slip-transfer .srow > span:first-child, .slip-meta .srow > span:first-child { font-size: 11.5px }
.slip-transfer .srow > b, .slip-meta .srow > b,
.slip-transfer .copyable, .slip-meta .copyable { justify-self: start; max-width: 100%; text-align: left; overflow-wrap: anywhere }
.slip-info .transfer-warn { margin: 0; padding: 8px 10px; font-size: 12px }
.slip-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 20px 20px }
.slip-closed { --st: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 20px; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2) }
.slip-closed.st-paid { --st: var(--accent) }
.slip-closed.st-expired { --st: var(--warn) }
.slip-closed.st-failed { --st: var(--bad) }
.st-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px;
  background: color-mix(in srgb, var(--st) 15%, transparent); color: var(--st) }
.st-icon svg { width: 20px; height: 20px }
.st-text { flex: 1 1 200px; display: grid; gap: 4px; min-width: 0 }
.st-text b { color: var(--ink); font-size: 16px }
.st-text small { color: var(--muted); font-size: 12.5px }
.st-amount { display: grid; justify-items: end; margin-left: auto }
.slip-closed .slip-amount { margin: 0; font-size: clamp(20px, 3vw, 25px); color: var(--ink) }
.slip-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line) }
.tool-group { display: flex; flex-wrap: wrap; gap: 7px }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer }
.tool svg { width: 15px; height: 15px; color: currentColor }
.tool:hover { border-color: var(--muted); color: var(--ink) }
.tool.slip-pay-link { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)) }
.tool.danger { border-color: transparent; background: transparent; color: var(--bad) }
.tool.danger:hover { background: var(--bad-soft) }
.tool[disabled] { opacity: .55; cursor: default }
.slip-transfer { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.slip-closed.st-cancelled { --st: var(--bad) }
.slip-main.is-closed { --st: var(--muted); align-items: center }
.slip-main.is-closed.st-paid { --st: var(--accent) }
.slip-main.is-closed.st-expired { --st: var(--warn) }
.slip-main.is-closed.st-failed, .slip-main.is-closed.st-cancelled { --st: var(--bad) }
.slip-void { align-content: center; justify-items: center }
.void-mark { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 18px; color: var(--st);
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--st) 16%, transparent) 0 38%, transparent 39%),
    color-mix(in srgb, var(--st) 7%, var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st) 42%, transparent), inset 0 0 0 10px color-mix(in srgb, var(--st) 8%, transparent) }
.void-mark svg { width: 72px; height: 72px; stroke-width: 2.4 }
.slip-status { display: grid; align-content: center; gap: 6px; min-height: 92px; padding: 16px;
  border: 1px solid color-mix(in srgb, var(--st) 34%, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--st) 8%, var(--panel-2)) }
.slip-status b { color: var(--ink); font-size: 16px }
.slip-status p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5 }
.cancel-dialog { color: var(--ink); width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); box-shadow: var(--shadow-lg) }
.cancel-dialog::backdrop { background: #030a12b8 }
.cancel-dialog form { display: grid; justify-items: center; text-align: center }
.cancel-dialog .st-icon { --st: var(--bad); width: 48px; height: 48px; border-radius: 14px }
.cancel-dialog h2 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -.02em }
.cancel-dialog p { margin: 0 0 16px; max-width: 34ch; color: var(--muted); font-size: 13.5px; line-height: 1.45 }
.cancel-reference { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); text-align: left; overflow-wrap: anywhere }
.cancel-reference strong { font-size: 16px; font-variant-numeric: tabular-nums }
.cancel-reference .mono { color: var(--muted); font-size: 12.5px }
.cancel-dialog .error { width: 100%; margin-bottom: 12px; text-align: left }
.cancel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100% }
.cancel-actions .btn { min-height: 42px }
.cancel-actions .danger { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); font-weight: 700 }
@media (max-width: 640px) {
  .slip-main { grid-template-columns: minmax(0, 1fr); gap: 16px }
  .slip-qr { width: min(218px, 100%); justify-self: center }
  .slip-meta, .slip-transfer { grid-template-columns: minmax(0, 1fr) }
  .st-amount { width: 100%; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); justify-items: start }
}
/* Activity rows and amount chips */
.act-body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px }
.act-amount small { margin-top: 2px; color: var(--faint) }
.chips-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px }
.chips-5 .chip { padding: 6px 0; text-align: center }

.withdraw-balance { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 22px 24px;
  background: radial-gradient(560px 180px at 0% 0%, var(--accent-soft), transparent 68%), var(--panel) }
.withdraw-available { display: grid; gap: 6px; min-width: 0 }
.withdraw-available > span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650 }
.withdraw-available > span svg { width: 16px; height: 16px; color: var(--accent) }
.withdraw-available b { font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums }
.withdraw-side-stats { display: grid; grid-template-columns: repeat(2, minmax(132px, 1fr)); gap: 10px }
.withdraw-side-stats div { display: grid; gap: 1px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 80%, transparent) }
.withdraw-side-stats span, .withdraw-side-stats small { color: var(--muted); font-size: 12px }
.withdraw-side-stats b { color: var(--ink); font-size: 16px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.withdraw-split { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: stretch }
.withdraw-gate { display: grid; align-content: center; gap: 16px; height: 100%; padding: 22px; background: radial-gradient(320px 160px at 18% 0%, var(--accent-soft), transparent 72%) }
.withdraw-gate-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--accent); background: var(--accent-soft) }
.withdraw-gate-mark svg { width: 26px; height: 26px }
.withdraw-gate h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; line-height: 1.25 }
.withdraw-gate p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px }
.withdraw-gate ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none }
.withdraw-gate li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 600 }
.withdraw-gate li b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--soft); color: var(--accent); font-size: 12px }
.withdraw-gate .btn { justify-self: start; min-height: 42px; margin-top: 2px }
.withdraw-split .empty { padding: 64px 20px }
@media (max-width: 960px) {
  .withdraw-balance { flex-direction: column; align-items: stretch; padding: 18px }
  .withdraw-side-stats { grid-template-columns: 1fr 1fr }
  .withdraw-split { grid-template-columns: 1fr }
}
.withdraw-methods { display: grid; gap: 8px; margin-bottom: 16px }
.withdraw-methods .segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
.withdraw-methods .segmented button { min-height: 42px; white-space: normal }
.withdraw-form .pay-fields { display: grid; gap: 0; margin: 0 0 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); overflow: hidden; }
.withdraw-form .pay-reuse { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer; }
.withdraw-form .pay-qr-status { margin: 0; padding: 0 14px 10px; font-size: 12.5px }
.withdraw-form .pay-reuse b { color: var(--ink); font-size: 13px; font-weight: 650; }
.withdraw-form .pay-reuse:hover { background: var(--soft); }
.withdraw-form .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) }
.withdraw-form .chips .chip { text-align: center }
.withdraw-form .pay-fields .field { display: grid; grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr); align-items: center; margin: 0; padding: 10px 14px; gap: 12px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.withdraw-form .pay-fields .input,
.withdraw-form .bank-trigger { width: 100%; min-height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 15px; font-weight: 600; letter-spacing: 0; text-align: right; }
.withdraw-form .bank-trigger { justify-content: flex-end; gap: 6px; color: var(--ink); }
.withdraw-form .bank-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.withdraw-form .pay-usdt { grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.withdraw-form .pay-usdt .input { min-height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: right; font-size: 15px; font-weight: 600; }
.withdraw-form .bank-trigger:hover,
.withdraw-form .bank-trigger:active { background: transparent; transform: none; }
.withdraw-form .bank-trigger.is-empty { color: var(--faint); font-weight: 500; }
.withdraw-form .pay-fields .input::placeholder { color: var(--faint); font-weight: 500; }
.withdraw-form .pay-fields .input:focus,
.withdraw-form .bank-trigger:focus { outline: none; box-shadow: none; background: transparent; }
.withdraw-form .pay-fields .field:focus-within { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.withdraw-form .pay-fields .holder-field { align-items: start }
.withdraw-form .pay-fields textarea.holder-input { min-height: 44px; max-height: 140px; text-align: left; resize: none; line-height: 1.35; overflow: hidden }
.withdraw-form > .btn.block { margin-top: 16px; }

.bank-trigger { width: 100%; justify-content: space-between; min-height: 42px; background: var(--panel-2) }
.bank-trigger svg, .bank-option svg { width: 16px; height: 16px; flex: none }
.bank-dialog { width: min(420px, calc(100% - 32px)); max-height: min(500px, 75dvh); padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden }
.bank-dialog[open] { display: flex; flex-direction: column }
.bank-dialog::backdrop { background: #030a12a6 }
.bank-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px }
.bank-dialog-head h3 { margin: 0; font-size: 16px }
.bank-dialog-search { padding: 0 16px 10px }
.bank-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; border-top: 1px solid var(--line) }
.bank-options p { padding: 4px 8px }
.bank-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer }
.bank-option:hover, .bank-option[aria-pressed="true"] { background: var(--panel-2) }
.bank-option[aria-pressed="true"] svg { color: var(--accent) }
.bank-code { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .04em }
@media (max-width: 560px) {
  .bank-dialog { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: none; max-height: min(500px, 65dvh);
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom) }
  .bank-dialog-search input { font-size: 16px }
}

@media (min-width: 761px) {
  .nav a.mobile-security { display: none }
}

.authenticator-dialog { color: var(--ink); width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; overflow: auto }
.authenticator-dialog::backdrop { background: #030a12b8 }
.authenticator-card { max-width: 540px }
.authenticator-heading { display: flex; align-items: center; gap: 12px }
.authenticator-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel)) }
.authenticator-icon svg { width: 18px; height: 18px }
.authenticator-body { padding: clamp(16px, 4vw, 24px) }
.authenticator-body p { margin: 0; overflow-wrap: break-word }
.authenticator-body .btn { justify-self: start }
.authenticator-setup { justify-items: center; text-align: center }
.authenticator-setup .muted { max-width: 36ch }
.authenticator-setup .field, .authenticator-setup .confirm-actions, .authenticator-setup .setup-manual { width: 100%; text-align: left }
.authenticator-qr { display: block; width: 192px; height: auto; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px }
.setup-reveal { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13.5px; cursor: pointer }
.setup-reveal:hover { text-decoration: underline }
.setup-manual { display: grid; gap: 6px }
.setup-manual > span { color: var(--muted); font-size: 13px }
.setup-key { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2) }
.setup-key code { flex: 1; letter-spacing: .06em; line-height: 1.45 }
