/* TxRoutePay design system v2 — shared by the merchant portal, admin console, checkout and website.
   Plain CSS, no build step. Colors are tokens on :root; dark mode via [data-theme="dark"] (or system). */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url(/assets/fonts/sora-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url(/assets/fonts/sora-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #f5f6f8; --sf: #ffffff; --sf2: #f9fafb; --bd: #e4e7ec; --bd2: #eef0f3; --tx: #101828; --tx2: #344054; --mu: #5b6475;
  --ac: #2f5bea; --ac-h: #2449c9; --as: #ebf0ff; --tl: #14b88f; --mint: #3ee0b5;
  --gd: #067647; --gs: #e6f6ee; --wn: #93470a; --ws: #fff3e0; --bad: #b42318; --bs: #fdecea; --is: #f0f2f5;
  --or: #e8730c; --tron: #c23631; --bnb: #f0b90b;
  --nav: #0b1220; --nav2: #18223a; --nav-bd: #222c42; --nav-tx: #d5dbe6; --nav-mu: #8d97aa; --nav-ac: #7f9bff; --nav-on: #14b88f;
  --sk: #e9ecf1; --sk2: #f4f6f9;
  --sh: 0 1px 2px rgba(16, 24, 40, .05); --sh-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --r: 14px; --r-sm: 9px;
  --brand: #2f5bea;
  color-scheme: light;
}
.admin { --nav: #111318; --nav2: #1f232c; --nav-bd: #262a33; --nav-tx: #d5d9e1; --nav-mu: #8e95a3; --nav-on: #f5a524; }
:root[data-theme="dark"] {
  --bg: #0b0f17; --sf: #121826; --sf2: #161d2d; --bd: #252e40; --bd2: #1e2636; --tx: #e9edf4; --tx2: #c9d1de; --mu: #a3adbf;
  --ac: #7f9bff; --ac-h: #a3b6ff; --as: #1b2442; --gd: #4fd19a; --gs: #11291f; --wn: #f3b65a; --ws: #2c2312;
  --bad: #ff8f84; --bs: #33181a; --is: #1b2232; --nav: #070a10; --nav2: #141c2e; --nav-bd: #1c2436;
  --sk: #1b2232; --sk2: #232c40; --sh: none; --sh-lg: 0 12px 32px rgba(0, 0, 0, .5); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0b0f17; --sf: #121826; --sf2: #161d2d; --bd: #252e40; --bd2: #1e2636; --tx: #e9edf4; --tx2: #c9d1de; --mu: #a3adbf;
    --ac: #7f9bff; --ac-h: #a3b6ff; --as: #1b2442; --gd: #4fd19a; --gs: #11291f; --wn: #f3b65a; --ws: #2c2312;
    --bad: #ff8f84; --bs: #33181a; --is: #1b2232; --nav: #070a10; --nav2: #141c2e; --nav-bd: #1c2436;
    --sk: #1b2232; --sk2: #232c40; --sh: none; --sh-lg: 0 12px 32px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--tx); font: 14px/1.5 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--ac); text-decoration: none; }
a:hover { color: var(--ac-h); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.h1 { font: 600 24px/1.25 'Sora', sans-serif; letter-spacing: -.02em; }
.h2 { font: 600 15px/1.35 'Sora', sans-serif; letter-spacing: -.01em; }
.h3 { font-weight: 600; font-size: 14px; }
.disp { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -.03em; }
.mu { color: var(--mu); } .sm { font-size: 13px; } .xs { font-size: 12px; } .b { font-weight: 600; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12.5px; word-break: break-all; }
.tab { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 220px), 1fr)); }
.flexw { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.flexw > .main { flex: 2 1 560px; min-width: 0; } .flexw > .aside { flex: 1 1 320px; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.err { color: var(--bad); font-size: 13px; }
.hint { display: block; color: var(--mu); font-size: 12px; font-weight: 400; margin-top: 4px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.s14 { width: 14px; height: 14px; } svg.i.s16 { width: 16px; height: 16px; } svg.i.s22 { width: 22px; height: 22px; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--bd); background: var(--sf); color: var(--tx); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sf2); color: var(--tx); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.pri { background: var(--ac); border-color: var(--ac); color: #fff; }
.btn.pri:hover { background: var(--ac-h); border-color: var(--ac-h); }
:root[data-theme="dark"] .btn.pri { color: #0b0f17; }
.btn.ok { background: var(--gd); border-color: var(--gd); color: #fff; }
.btn.dng { color: var(--bad); }
.btn.dngf { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--is); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { min-height: 48px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn.wide { width: 100%; }
.ib { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 0;
  background: transparent; color: var(--mu); cursor: pointer; position: relative; flex: none; }
.ib:hover { background: var(--is); color: var(--tx); }
.ib.sm { width: 32px; height: 32px; }
.lnk { border: 0; background: none; padding: 0; color: var(--ac); font-weight: 600; cursor: pointer; font-size: 13px; min-height: 32px; }
label { display: block; font-weight: 500; font-size: 13px; }
label > input, label > select, label > textarea, label > .inp { margin-top: 6px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--bd); background: var(--sf); color: var(--tx); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ac); outline-offset: 0; border-color: var(--ac); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ac); }
.code-input { font-family: 'IBM Plex Mono', monospace; letter-spacing: .2em; font-size: 18px !important; text-align: center; }
.addon { display: flex; } .addon > input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.addon > span { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--bd); border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--sf2); font-weight: 600; font-size: 13px; }
.search { position: relative; display: flex; align-items: center; }
.search > svg { position: absolute; left: 12px; color: var(--mu); pointer-events: none; }
.search > input { padding-left: 38px !important; background: var(--sf2) !important; }
.ckb { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 6px 0; cursor: pointer; }
.ckb input { margin-top: 2px; }
.kbd { font: 11px 'IBM Plex Mono', monospace; border: 1px solid var(--bd); border-radius: 5px; padding: 1px 6px; color: var(--mu); background: var(--sf2); }

/* segmented control, switches, tabs, filter chips */
.seg { display: inline-flex; gap: 2px; background: var(--is); padding: 3px; border-radius: 10px; }
.seg.full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--mu); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--sf); color: var(--tx); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.tg { width: 40px; height: 24px; border-radius: 999px; border: 0; background: #c9d0db; position: relative; cursor: pointer; flex: none; padding: 0; }
.tg span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.tg[aria-checked="true"] { background: var(--ac); }
.tg[aria-checked="true"] span { left: 19px; }
.tg:disabled { opacity: .5; cursor: default; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bd); overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--mu); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; text-decoration: none; }
.tabs [aria-selected="true"] { color: var(--tx); border-bottom-color: var(--ac); }
.tabs .n { font-size: 11.5px; background: var(--is); color: var(--mu); border-radius: 999px; padding: 0 7px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed #b6becb;
  background: transparent; color: var(--mu); font-size: 13px; font-weight: 500; cursor: pointer; }
.fchip.on { border-style: solid; border-color: var(--ac); background: var(--as); color: var(--ac); }
.fchip select, .fchip input { border: 0 !important; background: transparent !important; min-height: 30px !important; padding: 0 2px !important; width: auto !important; color: inherit; font-weight: 600; font-size: 13px; }
.fchip input[type=date] { width: 128px !important; }
.fchip select:focus, .fchip input:focus { outline: none; }

/* ---------- chips, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.c-ok { background: var(--gs); color: var(--gd); } .c-wn { background: var(--ws); color: var(--wn); } .c-ac { background: var(--as); color: var(--ac); }
.c-mu { background: var(--is); color: var(--mu); } .c-bad { background: var(--bs); color: var(--bad); }
.delta { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.delta.up { background: var(--gs); color: var(--gd); } .delta.dn { background: var(--bs); color: var(--bad); } .delta.flat { background: var(--is); color: var(--mu); }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.net b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700; }
.n-t b { background: var(--tron); color: #fff; } .n-b b { background: var(--bnb); color: #1a1300; } .n-e b { background: #627eea; color: #fff; }
.sc { display: inline-flex; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--is); color: var(--mu); margin: 0 4px 2px 0; }
.ev { display: inline-flex; font: 12px 'IBM Plex Mono', monospace; background: var(--is); border-radius: 6px; padding: 2px 8px; }

/* ---------- cards, tables ---------- */
.card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh); }
.card.pad { padding: 20px; }
.ch { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--bd); }
.cb { padding: 16px 20px; }
.kpi { padding: 18px 20px; }
.kpi .v { font: 600 26px/1.2 'Sora', sans-serif; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tw { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--bd); white-space: nowrap; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
th { color: var(--mu); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--sf2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td, tbody tr:hover td { background: var(--sf2); }
tr.sel td, tbody tr.sel:hover td { background: var(--as); }
td.wrap { white-space: normal; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--bd); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv > :last-child { text-align: right; min-width: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--bd); }
.list-row:first-child { border-top: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--mu); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--is); color: var(--mu); display: grid; place-items: center; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.banner.info { background: var(--as); color: var(--ac); } .banner.warn { background: var(--ws); color: var(--wn); }
.banner.bad { background: var(--bs); color: var(--bad); } .banner.ok { background: var(--gs); color: var(--gd); }
.secret { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--sf2); border: 1px solid var(--bd); }
.secret > .mono { flex: 1; }
.code { background: #0b1220; color: #d5dbe6; border-radius: 12px; overflow: hidden; }
.code .bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid #1e2940; overflow-x: auto; }
.code .bar button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #8d97aa; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.code .bar button[aria-pressed="true"] { background: #18223a; color: #fff; }
.code pre { margin: 0; padding: 14px 16px; font: 12.5px/1.65 'IBM Plex Mono', monospace; white-space: pre; overflow-x: auto; }
.progress { height: 6px; background: var(--is); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--tl); border-radius: 999px; transition: width .3s; }

/* ---------- skeletons ---------- */
@keyframes sh { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--sk) 0, var(--sk2) 120px, var(--sk) 240px); background-size: 800px 100%; animation: sh 1.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.loading { display: grid; place-items: center; padding: 60px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--bd); border-top-color: var(--ac); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; align-items: stretch; }
.side { flex: 0 0 248px; background: var(--nav); color: var(--nav-tx); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; padding: 4px 8px 12px; }
.side .sec { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-mu); padding: 14px 12px 6px; }
.side a.nv { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 9px; color: var(--nav-tx); text-decoration: none; font-weight: 500; }
.side a.nv:hover { background: var(--nav2); color: #fff; }
.side a.nv.on { background: var(--nav2); color: #fff; }
.side a.nv.on svg { color: var(--nav-on); }
.side .badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--or); color: #fff; border-radius: 999px; padding: 0 7px; }
.admin .side .badge { background: #f5a524; color: #2a1a00; }
.biz { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--nav-bd);
  background: #111a2c; color: #fff; text-align: left; cursor: pointer; }
.admin .biz { background: #191c23; }
.biz .av { width: 32px; height: 32px; border-radius: 8px; background: var(--mint); color: #062b21; display: grid; place-items: center; font-weight: 700; flex: none; }
.biz small { display: block; font-size: 12px; color: var(--nav-mu); }
.side .help { margin-top: auto; padding: 14px; border-radius: 12px; background: #111a2c; border: 1px solid var(--nav-bd); }
.side .help a { color: var(--nav-ac); font-weight: 600; font-size: 13px; }
.mainw { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 28px; background: var(--sf); border-bottom: 1px solid var(--bd); position: sticky; top: 0; z-index: 10; min-height: 62px; }
.topbar .sbtn { flex: 1 1 280px; max-width: 520px; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 12px; border-radius: 9px;
  border: 1px solid var(--bd); background: var(--sf2); color: var(--mu); cursor: pointer; text-align: left; }
.topbar .sbtn span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tm { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--bd); background: var(--sf);
  font-size: 13px; font-weight: 600; cursor: pointer; }
.tm .tr { width: 34px; height: 20px; border-radius: 999px; background: #c9d0db; position: relative; flex: none; }
.tm .tr span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.tm[aria-checked="true"] { border-color: #f4b26b; background: #fff6ec; color: #93470a; }
.tm[aria-checked="true"] .tr { background: var(--or); } .tm[aria-checked="true"] .tr span { left: 16px; }
.testbar { background: var(--or); color: #fff; text-align: center; font-size: 12.5px; font-weight: 600; padding: 6px 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ac); color: #fff; font-weight: 700; cursor: pointer; display: grid; place-items: center; flex: none; }
.dot-badge { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid var(--sf); }
.page { padding: 28px; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1360px; }
.page.wide { max-width: 1600px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu { position: absolute; right: 0; top: 46px; width: 360px; max-width: calc(100vw - 24px); z-index: 30; background: var(--sf); border: 1px solid var(--bd);
  border-radius: 14px; box-shadow: var(--sh-lg); overflow: hidden; }
.menu.small { width: 240px; padding: 6px; }
.menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--tx); text-decoration: none; font-size: 13.5px; }
.menu .mi:hover { background: var(--is); }
.ni { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--bd); text-decoration: none; color: var(--tx); }
.ni:hover { background: var(--sf2); color: var(--tx); }
.ni .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.bottomnav { display: none; }

/* drawer (payment detail) + dialogs + palette + toasts */
.drawer { flex: 1 1 380px; min-width: 0; }
dialog { border: 0; padding: 0; border-radius: 16px; background: var(--sf); color: var(--tx); box-shadow: var(--sh-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
dialog.wide { width: min(780px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(11, 18, 32, .5); }
.dlg { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg .x { position: absolute; top: 12px; right: 12px; }
.pal { padding: 0; }
.pal .pin { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bd); }
.pal .pin input { border: 0; min-height: 36px; padding: 0; background: transparent; font-size: 15px; }
.pal .pin input:focus { outline: none; }
.pal .res { padding: 6px 8px 8px; max-height: 420px; overflow-y: auto; }
.pal .g { font-size: 12px; font-weight: 600; color: var(--mu); padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .06em; }
.pal .pi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--tx); text-align: left; cursor: pointer; }
.pal .pi[aria-selected="true"], .pal .pi:hover { background: var(--as); }
.pal .pic { width: 30px; height: 30px; border-radius: 8px; background: var(--is); color: var(--mu); display: grid; place-items: center; flex: none; }
.pal .pi[aria-selected="true"] .pic { background: var(--ac); color: #fff; }
.pal .foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--bd); background: var(--sf2); font-size: 12px; color: var(--mu); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: #0b1220; color: #fff; box-shadow: var(--sh-lg); font-size: 13.5px; min-width: 260px; animation: tin .2s ease-out; }
.toast .tic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tl); }
.toast.bad .tic { background: #e5484d; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* timeline */
.tl { position: relative; padding-left: 28px; }
.tl .st { position: relative; padding-bottom: 18px; }
.tl .st::before { content: ""; position: absolute; left: -19px; top: 22px; bottom: -2px; width: 2px; background: var(--bd); }
.tl .st:last-child { padding-bottom: 0; } .tl .st:last-child::before { display: none; }
.tl .bul { position: absolute; left: -28px; top: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.tl .done .bul { background: var(--tl); color: #fff; } .tl .now .bul { background: var(--as); border: 2px solid var(--ac); }
.tl .todo .bul { background: var(--sf); border: 2px solid var(--bd); } .tl .warn .bul { background: var(--ws); border: 2px solid var(--or); }

/* charts */
.chart { position: relative; height: 240px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .hov { position: absolute; inset: 0; display: flex; }
.chart .hov > div { flex: 1; }
.chart .vline { position: absolute; top: 0; bottom: 0; width: 1px; background: #9aa6bd; pointer-events: none; }
.chart .pt { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--ac); transform: translate(-50%, -50%); pointer-events: none; }
.chart .tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); background: #0b1220; color: #fff; border-radius: 9px; padding: 8px 12px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 2; }
.chart .tip .l { color: #a7b0c2; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 240px; text-align: right; font-size: 12px; color: var(--mu); padding-right: 6px; }
.xaxis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--mu); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 220px; border-bottom: 1px solid var(--bd); }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 2px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--mu); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.spark { width: 96px; height: 32px; }

/* checklist + steps */
.ck { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--bd); }
.ck .bx { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ck .bx.y { background: var(--tl); color: #fff; } .ck .bx.n { border: 2px dashed #b6becb; }
.steps { display: flex; align-items: center; gap: 10px; }
.steps .s { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #8a93a3; }
.steps .s b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 2px solid var(--bd); color: var(--mu); background: var(--sf); }
.steps .s.on { color: var(--tx); } .steps .s.on b { border-color: var(--ac); background: var(--ac); color: #fff; }
.steps .s.done b { border-color: var(--tl); background: var(--tl); color: #fff; }
.steps .ln { flex: 1; height: 2px; background: var(--bd); min-width: 16px; }
.trk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trk .tk { position: relative; padding: 40px 12px 0 0; }
.trk .tk::before { content: ""; position: absolute; top: 13px; left: 28px; right: 0; height: 3px; background: var(--bd); }
.trk .tk:last-child::before { display: none; } .trk .tk.y::before { background: var(--tl); }
.trk .d { position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.trk .y .d { background: var(--tl); color: #fff; } .trk .p .d { background: var(--as); border: 3px solid var(--ac); }
.trk .n .d { background: var(--sf); border: 2px solid var(--bd); } .trk .w .d { background: var(--ws); border: 3px solid var(--or); }

/* auth pages */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--sf); }
.auth .pitch { flex: 1 1 420px; background: #0b1220; color: #d5dbe6; padding: 40px 48px; display: flex; flex-direction: column; gap: 36px; }
.auth .pitch .disp { color: #fff; }
.auth .pitch .pt { display: flex; gap: 12px; align-items: flex-start; }
.auth .pitch .pt .ic { width: 36px; height: 36px; border-radius: 10px; background: #18223a; color: var(--mint); display: grid; place-items: center; flex: none; }
.auth .form { flex: 1.4 1 520px; min-width: 0; padding: 40px 48px; display: flex; flex-direction: column; align-items: center; }
.auth .form > div { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 22px; }
.center-auth { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: 40px 16px; }
.center-auth .card { width: 100%; max-width: 440px; padding: 32px; display: flex; flex-direction: column; gap: 18px; border-radius: 20px; box-shadow: var(--sh), 0 20px 50px rgba(16, 24, 40, .06); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { text-align: center; font: 600 22px 'IBM Plex Mono', monospace !important; min-height: 56px !important; padding: 0 !important; }
.bar4 { display: flex; gap: 6px; } .bar4 span { flex: 1; height: 4px; border-radius: 999px; background: var(--bd); } .bar4 span.on { background: var(--tl); } .bar4.weak span.on { background: var(--or); }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--tx); text-decoration: none; }
.brand:hover { color: inherit; }
.wordmark { font: 700 17px 'Sora', sans-serif; letter-spacing: -.02em; }
.wordmark b { color: var(--nav-ac); font-weight: 700; }
.light .wordmark b, .brand.light .wordmark b { color: var(--ac); }

/* QR */
.qr { display: inline-flex; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid #e4e7ec; position: relative; }
.qr svg { display: block; }
.qr .qm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; }


/* ---------- hosted checkout (/pay) ---------- */
.pay { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: 0 16px 32px; }
.pay .band { position: absolute; left: 0; right: 0; top: 0; height: 168px; background: var(--brand); z-index: 0; }
.pay-box { position: relative; z-index: 1; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; padding-top: 28px; }
.pay-mh { display: flex; align-items: center; gap: 12px; color: #fff; }
.pay-mh .lg { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; color: var(--brand); font: 700 18px 'Sora', sans-serif; }
.pay-mh .lg img { width: 100%; height: 100%; object-fit: cover; }
.pay-mh .nm { font: 600 17px/1.2 'Sora', sans-serif; }
.pay-mh .od { font-size: 13px; opacity: .85; }
.pay-card { background: var(--sf); border: 1px solid var(--bd); border-radius: 20px; box-shadow: 0 18px 50px rgba(16, 24, 40, .12); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pay-amt { font: 700 34px/1.1 'Sora', sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pay-amt small { font: 600 16px 'IBM Plex Sans', sans-serif; color: var(--mu); letter-spacing: 0; }
.pay-qr { display: flex; justify-content: center; }
.pay-qr .qm b { width: 28px; height: 28px; font-size: 13px; }
.pay-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--bd); background: var(--sf); color: var(--tx); text-align: left; cursor: pointer; }
.pay-opt:hover { border-color: var(--brand); background: var(--sf2); }
.pay-opt .net b { width: 32px; height: 32px; font-size: 14px; }
.pay-warn { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ws); color: var(--wn); font-size: 12.5px; }
.pay-addr { padding: 12px; border-radius: 12px; border: 1px solid var(--bd); background: var(--sf2); display: flex; flex-direction: column; gap: 8px; }
.pay-addr .mono { font-size: 13.5px; line-height: 1.5; color: var(--tx); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.brand:hover { filter: brightness(.94); color: #fff; }
.pay .progress > span { background: var(--brand); }
.pay-big { width: 88px; height: 88px; margin: 0 auto; display: block; }
.pay-done { text-align: center; align-items: center; }
.pay-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--mu); }
.pay-foot a { color: var(--mu); }
.pay-trust { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--mu); padding: 0 4px; }
.pay-trust svg { color: var(--tl); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tl); box-shadow: 0 0 0 0 rgba(20, 184, 143, .6); animation: pdot 1.6s infinite; flex: none; }
@keyframes pdot { 70% { box-shadow: 0 0 0 8px rgba(20, 184, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 184, 143, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }
@media print { .pay .band, .pay-foot, .pay .noprint { display: none !important; } .pay-mh { color: var(--tx); } .pay-card { box-shadow: none; } }

/* ---------- responsive: phone ---------- */
@media (max-width: 900px) {
  .side { display: none; }
  .topbar { padding: 10px 14px; }
  .topbar .sbtn span.kbd, .topbar .tm .lbl, .topbar .right > .chip, .topbar .right > a.ib { display: none; }
  .topbar .sbtn { flex: 1 1 auto; min-width: 0; }
  .topbar .tm { padding: 0 8px; }
  .page { padding: 18px 14px 96px; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--sf); border-top: 1px solid var(--bd); padding: 4px 6px calc(8px + env(safe-area-inset-bottom)); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; font-size: 11px; font-weight: 600; color: #8a93a3; text-decoration: none; }
  .bottomnav a.on { color: var(--ac); }
  .bottomnav .fab { flex: 0 0 64px; }
  .bottomnav .fab span { width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; border: 4px solid var(--bg); background: var(--ac); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(47, 91, 234, .35); }
  .toasts { bottom: 90px; }
  .auth .pitch { display: none; }
  .auth .form { padding: 28px 18px; }
  .trk { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  th:first-child, td:first-child { padding-left: 14px; } th:last-child, td:last-child { padding-right: 14px; }
  .ch, .cb { padding-left: 14px; padding-right: 14px; }
}
@media print {
  .side, .topbar, .bottomnav, .noprint, .testbar { display: none !important; }
  body { background: #fff; } .card { box-shadow: none; } .page { padding: 0; max-width: none; }
}
