/* Pay Rupee — new merchant UI */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eff1f7;
  --border: #e4e7ef;
  --border-strong: #d3d8e4;
  --ink: #0e1430;
  --ink-2: #474f6b;
  --muted: #6f7792;
  --brand: #1f3fb8;
  --brand-hover: #1a35a0;
  --brand-ink: #ffffff;
  --brand-soft: #eef1fd;
  --brand-soft-ink: #1f3fb8;
  --teal: #0f9f92;
  --teal-soft: #e5f7f5;
  --amber: #b45309;
  --amber-soft: #fdf3e2;
  --red: #c42b2b;
  --red-soft: #fdecec;
  --slate-soft: #eef0f5;
  --chart-bar: #3554d1;
  --chart-bar-hover: #1f3fb8;
  --chart-bar-today: #0f9f92;
  --st-success: #16a34a;
  --st-processing: #d97706;
  --st-failed: #dc2626;
  --st-reversed: #7c8296;
  --focus: 0 0 0 3px rgba(53, 84, 209, .28);
  --shadow-sm: 0 1px 2px rgba(16, 24, 56, .05);
  --shadow: 0 1px 2px rgba(16, 24, 56, .04), 0 4px 16px rgba(16, 24, 56, .05);
  --shadow-lg: 0 12px 40px rgba(16, 24, 56, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 256px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e1a;
    --surface: #111729;
    --surface-2: #151c31;
    --surface-3: #1b2440;
    --border: #232d4a;
    --border-strong: #2f3a5c;
    --ink: #e9ecf6;
    --ink-2: #b3bad2;
    --muted: #858ead;
    --brand: #6f86ff;
    --brand-hover: #8798ff;
    --brand-ink: #0a0e1a;
    --brand-soft: #1a2452;
    --brand-soft-ink: #aab8ff;
    --teal: #2cc9b8;
    --teal-soft: #0f2f2f;
    --amber: #f2b046;
    --amber-soft: #33240c;
    --red: #ff7b7b;
    --red-soft: #3a1518;
    --slate-soft: #1c2338;
    --chart-bar: #6f86ff;
    --chart-bar-hover: #95a5ff;
    --chart-bar-today: #2cc9b8;
    --st-success: #34c46e;
    --st-processing: #f0a63a;
    --st-failed: #f26363;
    --st-reversed: #8a91a8;
    --focus: 0 0 0 3px rgba(111, 134, 255, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e1a;
  --surface: #111729;
  --surface-2: #151c31;
  --surface-3: #1b2440;
  --border: #232d4a;
  --border-strong: #2f3a5c;
  --ink: #e9ecf6;
  --ink-2: #b3bad2;
  --muted: #858ead;
  --brand: #6f86ff;
  --brand-hover: #8798ff;
  --brand-ink: #0a0e1a;
  --brand-soft: #1a2452;
  --brand-soft-ink: #aab8ff;
  --teal: #2cc9b8;
  --teal-soft: #0f2f2f;
  --amber: #f2b046;
  --amber-soft: #33240c;
  --red: #ff7b7b;
  --red-soft: #3a1518;
  --slate-soft: #1c2338;
  --chart-bar: #6f86ff;
  --chart-bar-hover: #95a5ff;
  --chart-bar-today: #2cc9b8;
  --st-success: #34c46e;
  --st-processing: #f0a63a;
  --st-failed: #f26363;
  --st-reversed: #8a91a8;
  --focus: 0 0 0 3px rgba(111, 134, 255, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.skip-link:focus { top: 12px; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Theme icons: show the one you'd switch to */
.ic-sun { display: none; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-sun { display: block; }
  :root:not([data-theme="light"]) .ic-moon { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; text-decoration: none !important; }
.btn .ic { width: 16px; height: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 46px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(31, 63, 184, .25); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }

/* ---------- Alerts ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid; border-radius: var(--radius-sm); font-weight: 500; }
.alert > .ic { margin-top: 1px; }
.alert > span { flex: 1; }
.alert .icon-btn { width: 26px; height: 26px; border: 0; background: transparent; margin: -3px -4px -3px 0; }
.alert .icon-btn .ic { width: 16px; height: 16px; }
.alert-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.alert-success { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 30%, transparent); color: var(--teal); }

/* =========================================================
   App shell
   ========================================================= */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 18px 14px; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 18px; }
.brand { display: inline-flex; padding: 6px 8px; margin: -6px -8px; border-radius: 10px; }
.brand img { height: 30px; width: auto; }
:root[data-theme="dark"] .brand { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { background: #fff; } }
.sidebar-close { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-sub summary { list-style: none; cursor: pointer; user-select: none; }
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-toggle .nav-chev { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform .18s; }
.nav-sub[open] .nav-chev { transform: rotate(180deg); }
.nav-toggle.has-active, .nav-toggle.has-active .ic:first-child { color: var(--ink); }
.nav-children { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; padding-left: 18px; }
.nav-children .nav-item { padding-top: 8px; padding-bottom: 8px; font-size: 13.5px; }
.nav-children .nav-item .ic { width: 16px; height: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 0 10px 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-item .ic { color: var(--muted); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 600; }
.nav-item.is-active .ic { color: var(--brand-soft-ink); }

.sidebar-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.preview-card { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.preview-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; }
.preview-card p { margin: 8px 0 10px; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.preview-card a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.preview-card a .ic { width: 15px; height: 15px; }

.backdrop { display: none; }

.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.menu-btn { display: none; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid var(--bg); border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; }
:root[data-theme="dark"] .bell-badge { background: #e5484d; }

.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-3); }
.user-text { display: flex; flex-direction: column; line-height: 1.2; max-width: 170px; }
.user-text strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.user-menu[open] .chev { transform: rotate(180deg); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--teal)); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.avatar.sm { width: 30px; height: 30px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: 11px; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 250px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.menu-who span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13.5px; text-align: left; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.menu-pop .ic { width: 16px; height: 16px; color: var(--muted); }
.menu-pop em { margin-left: auto; padding: 0 7px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-size: 11px; font-style: normal; font-weight: 700; }
.menu-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }
.menu-pop .danger, .menu-pop .danger .ic { color: var(--red); }

.content { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1360px; margin: 0 auto; padding: 26px 28px 48px; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head:not(:has(.page-actions)) { display: none; }
.eyebrow { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.page-head h2 { margin-top: 2px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.lede { margin-top: 4px; color: var(--ink-2); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card-head p { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.card-figure { text-align: right; }
.card-figure strong { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.card-figure span { color: var(--muted); font-size: 12px; }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.balance-card { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius); overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 100% 0%, rgba(44, 201, 184, .38) 0%, rgba(44, 201, 184, 0) 45%), linear-gradient(135deg, #182f8f 0%, #1f3fb8 55%, #2a4fd6 100%); box-shadow: 0 10px 30px rgba(31, 63, 184, .28); isolation: isolate; }
.balance-card::after { content: ""; position: absolute; right: -60px; bottom: -90px; z-index: -1; width: 280px; height: 280px; border: 40px solid rgba(255, 255, 255, .06); border-radius: 50%; }
.balance-top { display: flex; align-items: center; justify-content: space-between; }
.balance-label { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .82); font-weight: 500; }
.balance-label .ic { width: 17px; height: 17px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 11.5px; font-weight: 600; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 3px rgba(94, 234, 212, .25); }
.balance-amount { margin-top: 18px; font-size: clamp(30px, 4vw, 40px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.balance-sub { margin-top: 6px; color: rgba(255, 255, 255, .72); }
.balance-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 24px; }
.btn-on-brand { background: #fff; color: #182f8f; }
.btn-on-brand:hover { background: #eef1fd; }
.btn-on-brand-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn-on-brand-ghost:hover { background: rgba(255, 255, 255, .18); }

.quick-card .card-head { margin-bottom: 10px; }
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); transition: border-color .15s, background .15s, transform .15s; }
.quick-item:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); background: var(--surface-2); text-decoration: none; }
.quick-item:hover .quick-arrow { transform: translateX(3px); color: var(--brand); }
.quick-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; }
.quick-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.quick-text strong { font-weight: 600; }
.quick-text small { color: var(--muted); font-size: 12.5px; }
.quick-arrow { width: 16px; height: 16px; color: var(--muted); transition: transform .15s, color .15s; }

.indigo { background: var(--brand-soft); color: var(--brand-soft-ink); }
.teal { background: var(--teal-soft); color: var(--teal); }
.amber { background: var(--amber-soft); color: var(--amber); }
.red { background: var(--red-soft); color: var(--red); }
.slate { background: var(--slate-soft); color: var(--ink-2); }

/* ---------- KPIs ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.kpi > div { display: flex; flex-direction: column; min-width: 0; }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; }
.kpi-icon .ic { width: 19px; height: 19px; }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi-value { margin-top: 2px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.kpi-note { margin-top: 2px; color: var(--ink-2); font-size: 12.5px; }

/* ---------- Insights ---------- */
.insight-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }

/* Bar chart (single series: no legend; title names it) */
.bar-chart { position: relative; height: 240px; padding-left: 52px; }
.bar-grid { position: absolute; inset: 0 0 26px 0; display: flex; flex-direction: column; justify-content: space-between; }
.bar-gridline { position: relative; height: 0; border-top: 1px dashed var(--border); }
.bar-gridline:last-child { border-top: 1px solid var(--border-strong); }
.bar-gridline span { position: absolute; left: 0; top: -8px; width: 46px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bar-cols { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 100%; }
.bar-col { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 2px; cursor: default; border-radius: 8px; }
.bar-col:hover, .bar-col:focus-visible { background: color-mix(in srgb, var(--brand) 6%, transparent); box-shadow: none; }
.bar-track { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; flex: 1; }
.bar { display: block; width: min(38px, 62%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--chart-bar); transition: background .15s; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { background: var(--chart-bar-hover); }
.bar-col.is-today .bar { background: var(--chart-bar-today); }
.bar-label { height: 26px; padding-top: 7px; color: var(--muted); font-size: 12px; }
.bar-col.is-today .bar-label { color: var(--ink); font-weight: 650; }
.bar-col.is-future .bar-label { opacity: .6; }
.bar-tip { position: absolute; left: 50%; bottom: calc(100% - 20px); z-index: 5; display: none; flex-direction: column; width: max-content; max-width: 200px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-lg); font-size: 12px; transform: translateX(-50%); pointer-events: none; }
.bar-tip strong { color: var(--ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bar-col:hover .bar-tip, .bar-col:focus-visible .bar-tip { display: flex; }
.bar-col:first-child .bar-tip { left: 0; transform: none; }
.bar-col:last-child .bar-tip { left: auto; right: 0; transform: none; }

/* Outcomes */
.rate-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rate-value { font-size: 34px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rate-label { color: var(--muted); font-size: 13px; }
.stack-bar { display: flex; gap: 2px; height: 10px; margin: 16px 0 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.stack-bar i { min-width: 4px; flex-basis: 0; }
.stack-bar.is-empty i { flex: 1; }
.seg-success { background: var(--st-success); }
.seg-processing { background: var(--st-processing); }
.seg-failed { background: var(--st-failed); }
.seg-reversed { background: var(--st-reversed); }
.status-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.status-list li { display: grid; grid-template-columns: 1fr auto 48px; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.status-list li:first-child { border-top: 0; }
.status-key { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); }
.swatch { width: 10px; height: 10px; border-radius: 3px; }
.status-count { font-weight: 650; font-variant-numeric: tabular-nums; }
.status-share { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Table ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-card .card-head { padding: 20px 20px 0; }
.table-scroll { overflow-x: auto; }
.tx-table { width: 100%; border-collapse: collapse; }
.tx-table th { padding: 10px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tx-table th.num { text-align: right; }
.tx-table td { padding: 13px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tx-table tbody tr:last-child td { border-bottom: 0; }
.tx-table tbody tr:hover { background: var(--surface-2); }
.who { display: inline-flex; align-items: center; gap: 10px; }
.who strong { font-weight: 600; }
.chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.status .ic { width: 14px; height: 14px; }
.status-success { background: color-mix(in srgb, var(--st-success) 13%, transparent); color: color-mix(in srgb, var(--st-success) 80%, var(--ink)); }
.status-processing { background: color-mix(in srgb, var(--st-processing) 15%, transparent); color: color-mix(in srgb, var(--st-processing) 75%, var(--ink)); }
.status-failed { background: color-mix(in srgb, var(--st-failed) 12%, transparent); color: color-mix(in srgb, var(--st-failed) 85%, var(--ink)); }
.status-reversed { background: color-mix(in srgb, var(--st-reversed) 15%, transparent); color: var(--ink-2); }

/* ---------- Empty ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; padding: 28px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 12px; background: var(--surface-3); color: var(--muted); }
.empty p { color: var(--muted); margin-bottom: 8px; }

/* =========================================================
   Auth
   ========================================================= */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
body.auth { background: var(--bg); }
.auth-layout .auth-form-side { width: 100%; max-width: 480px; margin: 0 auto; }
.auth-layout .auth-card { padding: 32px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.auth-layout .auth-card h1 { font-size: 24px; }
.auth-layout .auth-fields { margin-top: 22px; }
.auth-layout .auth-foot { justify-content: center; }
.auth-form-side { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.auth-top .brand img { height: 32px; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth-card h1 { font-size: 28px; font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
.auth-sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.auth-card .alert { margin-top: 22px; }
.auth-fields { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; }
.link-sm { font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-wrap input { width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input-wrap input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input-wrap input:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border-strong)); }
.input-wrap input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input-wrap input[aria-invalid="true"] { border-color: var(--red); }
.input-wrap input[type="password"], .input-wrap input[data-revealed] { padding-right: 46px; }
.reveal { position: absolute; right: 6px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.reveal:hover { background: var(--surface-3); color: var(--ink); }
.reveal .ic-eye-off { display: none; }
[data-reveal-secret] .ic-eye-off { display: none; }
[data-reveal-secret][aria-pressed="true"] .ic-eye { display: none; }
[data-reveal-secret][aria-pressed="true"] .ic-eye-off { display: block; }
.reveal[aria-pressed="true"] .ic-eye { display: none; }
.reveal[aria-pressed="true"] .ic-eye-off { display: block; }
.field-error, .field-hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.field-error { color: var(--red); }
.field-hint { color: var(--amber); }
.field-hint .ic { width: 14px; height: 14px; }
.checkbox { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; cursor: pointer; user-select: none; }
.checkbox input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; }
.checkbox .box { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: transparent; transition: background .15s, border-color .15s; }
.checkbox .box .ic { width: 13px; height: 13px; stroke-width: 3; }
.checkbox input:checked + .box { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.checkbox input:focus-visible + .box { box-shadow: var(--focus); }
.auth-fields .btn-primary { margin-top: 4px; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-alt { margin-top: 24px; color: var(--ink-2); text-align: center; }
.auth-alt a { font-weight: 600; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.auth-foot span, .auth-foot a { display: inline-flex; align-items: center; gap: 6px; }
.auth-foot .ic { width: 14px; height: 14px; }
.auth-foot a { color: var(--ink-2); font-weight: 500; }

.auth-brand-side { position: relative; display: flex; align-items: center; justify-content: center; margin: 12px; padding: 48px clamp(28px, 4vw, 64px); border-radius: 24px; overflow: hidden; color: #fff; background: radial-gradient(90% 70% at 90% 10%, rgba(44, 201, 184, .45) 0%, rgba(44, 201, 184, 0) 60%), radial-gradient(70% 60% at 0% 100%, rgba(111, 134, 255, .45) 0%, rgba(111, 134, 255, 0) 60%), linear-gradient(150deg, #142777 0%, #1c38a6 55%, #2346c9 100%); isolation: isolate; }
.auth-brand-side::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.brand-inner { width: 100%; max-width: 460px; }
.brand-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 12.5px; font-weight: 600; }
.brand-pill i { width: 7px; height: 7px; border-radius: 50%; background: #5eead4; }
.auth-brand-side h2 { margin-top: 18px; font-size: clamp(28px, 3vw, 40px); font-weight: 750; letter-spacing: -.03em; line-height: 1.12; }
.auth-brand-side h2 span { color: #7ff0e1; }
.auth-brand-side > .brand-inner > p { margin-top: 14px; color: rgba(255, 255, 255, .78); font-size: 15.5px; line-height: 1.55; }
.mock { display: flex; flex-direction: column; gap: 10px; margin-top: 32px; padding: 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(5, 12, 50, .35); }
.mock-balance { position: relative; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, .96); color: #0e1430; }
.mock-balance span { color: #6f7792; font-size: 12px; font-weight: 500; }
.mock-balance strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.mock-bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; margin-top: 12px; }
.mock-bars i { flex: 1; border-radius: 3px 3px 0 0; background: #c9d2f7; }
.mock-bars i:last-child { background: #0f9f92; }
.mock-bars i:nth-child(6) { background: #3554d1; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .96); color: #0e1430; }
.mock-av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eef1fd; color: #1f3fb8; font-size: 11px; font-weight: 700; }
.mock-t { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.mock-t b { font-size: 13px; }
.mock-t small { color: #6f7792; font-size: 11.5px; }
.mock-amt { font-weight: 700; font-size: 13.5px; }
.mock-ok { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #15803d; }
.mock-ok .ic { width: 13px; height: 13px; stroke-width: 3; }
.brand-points { display: flex; flex-direction: column; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.brand-points li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .88); font-weight: 500; }
.brand-points .ic { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: #7ff0e1; }

/* =========================================================
   Transactions
   ========================================================= */
.btn.is-disabled { opacity: .5; pointer-events: none; }
.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn-sm .ic { width: 16px; height: 16px; }
.list-card { padding: 0; overflow: hidden; }

.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 14px 10px 13px; color: var(--ink-2); font-weight: 550; white-space: nowrap; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--ink); font-weight: 650; }
.tab.is-active::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.tab .swatch { width: 8px; height: 8px; border-radius: 50%; }
.tab-count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.tab.is-active .tab-count { background: var(--brand-soft); color: var(--brand-soft-ink); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filters .search { position: relative; display: flex; align-items: center; flex: 1 1 220px; min-width: 0; }
.filters input, .filters select { height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13.5px; transition: border-color .15s, box-shadow .15s; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.filters .search input { width: 100%; padding-left: 38px; }
.filters .search .input-icon { left: 12px; width: 17px; height: 17px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-field > span { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.filter-field input[type="date"] { width: 146px; }
.filters select { padding-right: 32px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f7792' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .btn { height: 38px; }

.tx-list td { vertical-align: middle; }
.tx-list td small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 400; }
.tx-list .c-amount strong { font-variant-numeric: tabular-nums; }
.tx-list .c-ref .mono { color: var(--ink); }
.tx-list .c-ref small.mono { color: var(--muted); font-size: 11.5px; }
.tx-list .c-open { width: 1%; padding-left: 0; text-align: right; }
.tx-list tbody tr { cursor: pointer; }
.tx-list tbody tr:hover .c-open .icon-btn { border-color: var(--border-strong); color: var(--brand); }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-text small { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 13px; }
.pager strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager-nav { display: flex; align-items: center; gap: 4px; }
.pager-num { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; color: var(--ink-2); font-weight: 550; font-variant-numeric: tabular-nums; }
.pager-num:hover { background: var(--surface-3); text-decoration: none; }
.pager-num.is-active { background: var(--brand); color: var(--brand-ink); }
.pager-gap { padding: 0 4px; color: var(--muted); }

/* Details drawer */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); height: 100%; max-width: 100vw; max-height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.drawer::backdrop { background: rgba(8, 12, 30, .45); }
.drawer[open] { animation: drawer-in .22s ease; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.drawer-kicker { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }
.drawer-foot .btn { flex: 1; }
.result { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 22px; text-align: center; }
.result-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; }
.result-icon .ic { width: 26px; height: 26px; }
.result[data-status="success"] .result-icon { background: color-mix(in srgb, var(--st-success) 14%, transparent); color: var(--st-success); }
.result[data-status="processing"] .result-icon { background: color-mix(in srgb, var(--st-processing) 16%, transparent); color: var(--st-processing); }
.result[data-status="failed"] .result-icon { background: color-mix(in srgb, var(--st-failed) 13%, transparent); color: var(--st-failed); }
.result[data-status="reversed"] .result-icon { background: color-mix(in srgb, var(--st-reversed) 16%, transparent); color: var(--ink-2); }
.result-amount { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result h3 { font-size: 15px; font-weight: 650; }
.result p { max-width: 320px; color: var(--muted); font-size: 13px; }
.detail-block { padding: 16px 0; border-top: 1px solid var(--border); }
.detail-block h4 { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.detail-list { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.detail-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.detail-list dt { color: var(--ink-2); flex: none; }
.detail-list dd { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 550; text-align: right; overflow-wrap: anywhere; justify-content: flex-end; }
.detail-list .is-total { padding-top: 9px; border-top: 1px dashed var(--border-strong); }
.detail-list .is-total dd { font-size: 15px; font-weight: 700; }
.copy { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; flex: none; }
.copy:hover { background: var(--surface-3); color: var(--ink); }
.copy .ic { width: 15px; height: 15px; }
.copy.is-copied { color: var(--st-success); }
.timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 10px; top: -6px; height: 12px; width: 2px; background: var(--border-strong); }
.timeline li:first-child::before { display: none; }
.timeline i { width: 12px; height: 12px; margin-left: 5px; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done i { border-color: var(--st-success); background: var(--st-success); }
.timeline li.is-failed i { border-color: var(--st-failed); background: var(--st-failed); }
.timeline li.is-pending i { border-color: var(--st-processing); }
.timeline small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* =========================================================
   Send payout
   ========================================================= */
.alert-info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-soft-ink); }
.alert-warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--amber); }
.alert.compact { padding: 9px 12px; font-size: 13px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; font-weight: 400; }
.alert a { color: inherit; font-weight: 650; text-decoration: underline; }
.small-text { font-size: 13px; }

.payout-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.payout-form { display: flex; flex-direction: column; gap: 4px; padding: 24px; }
.payout-form > .alert { margin-bottom: 8px; }
.form-section { margin: 0; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--border); }
.form-section + .form-section { padding-top: 20px; }
.form-section legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 14px; padding: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.form-section legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: 12px; font-weight: 700; }

.method-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.method-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.method-card:hover { border-color: var(--border-strong); }
.method-card input { position: absolute; opacity: 0; pointer-events: none; }
.method-card-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; }
.method-card-text { display: flex; flex-direction: column; line-height: 1.3; }
.method-card-text strong { font-weight: 650; }
.method-card-text small { color: var(--muted); font-size: 12.5px; }
.method-card-check { display: grid; place-items: center; width: 22px; height: 22px; margin-left: auto; border: 1.5px solid var(--border-strong); border-radius: 50%; color: transparent; flex: none; }
.method-card-check .ic { width: 13px; height: 13px; stroke-width: 3; }
.method-card:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.method-card:has(input:checked) .method-card-check { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.method-card:has(input:focus-visible) { box-shadow: var(--focus); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border-strong)); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--red); }
.mono-input { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; }
.optional { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.muted-hint { color: var(--muted); font-weight: 400; }
.field-count { color: var(--muted); font-size: 12.5px; text-align: right; }
.amount-wrap { position: relative; display: flex; align-items: center; }
.amount-wrap > span { position: absolute; left: 14px; color: var(--ink-2); font-size: 18px; font-weight: 600; pointer-events: none; }
.amount-input { height: 52px; padding-left: 34px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 20px; }
.form-foot-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.form-foot-note .ic { width: 16px; height: 16px; color: var(--teal); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.payout-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.summary-card .detail-list { gap: 10px; }
.balance-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.balance-strip div { display: flex; flex-direction: column; min-width: 0; }
.balance-strip span { color: var(--muted); font-size: 12px; }
.balance-strip strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-strip strong.is-negative { color: var(--red); }
.summary-card .alert { margin-top: 12px; }
.mini-list { display: flex; flex-direction: column; margin: 0 -8px; padding: 0; list-style: none; }
.mini-list a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--ink); }
.mini-list a:hover { background: var(--surface-2); text-decoration: none; }
.mini-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.mini-text strong { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text small { color: var(--muted); font-size: 12px; }
.mini-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mini-end strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mini-end .status { padding: 1px 7px 1px 5px; font-size: 11px; }
.mini-end .status .ic { width: 12px; height: 12px; }
.tips-card h3 { margin-bottom: 10px; font-size: 14px; font-weight: 650; }
.tips-card ul { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tips-card li { display: flex; gap: 10px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.tips-card li .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--muted); }

/* Modal dialog */
.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(8, 12, 30, .5); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .18s ease; }
@keyframes modal-in { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-pane { display: none; }
.modal[data-state="review"] [data-pane="review"],
.modal[data-state="sending"] [data-pane="sending"],
.modal[data-state="result"] [data-pane="result"] { display: block; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-body { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.modal-body.center { align-items: center; text-align: center; padding: 32px 24px 24px; gap: 6px; }
.modal-body.center h3 { font-size: 17px; font-weight: 650; }
.modal-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-foot .btn { flex: 1; }
.confirm-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; text-align: center; }
.confirm-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.confirm-hero strong { font-size: 32px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.confirm-to { color: var(--ink-2); }
.confirm-to b { color: var(--ink); font-weight: 650; }
.confirm-costs { padding-top: 14px; border-top: 1px solid var(--border); }
.big-spinner { width: 44px; height: 44px; margin-bottom: 12px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
[data-pane="result"] .result-icon { margin-bottom: 6px; }
[data-pane="result"][data-status="success"] .result-icon { background: color-mix(in srgb, var(--st-success) 14%, transparent); color: var(--st-success); }
[data-pane="result"][data-status="processing"] .result-icon { background: color-mix(in srgb, var(--st-processing) 16%, transparent); color: var(--st-processing); }
[data-pane="result"][data-status="failed"] .result-icon { background: color-mix(in srgb, var(--st-failed) 13%, transparent); color: var(--st-failed); }
.result-refs { width: 100%; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-align: left; }

/* =========================================================
   Wallet
   ========================================================= */
.wallet-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.wallet-grid .balance-card { min-height: 190px; }
.wallet-grid .kpi { align-items: center; }
.how-card { padding: 16px 20px; }
.how-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.how-steps li { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.how-steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; margin-left: 4px; background: var(--border-strong); min-width: 12px; }
.how-steps li > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.how-steps strong { font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.how-steps small { color: var(--muted); font-size: 12px; }
.list-head { padding: 20px 20px 4px; margin: 0; }
.topup-list .c-fee, .topup-list .c-paid { font-variant-numeric: tabular-nums; }
.topup-list td small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 400; }
.topup-list td { vertical-align: middle; }
.method-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; }
.method-dot .ic { width: 15px; height: 15px; }
.utr-cell { display: inline-flex; align-items: center; gap: 2px; }
.pager-of { color: var(--muted); font-size: 13px; margin: 0 4px 0 2px; }
.modal[data-state="amount"] [data-pane="amount"],
.modal[data-state="pay"] [data-pane="pay"] { display: block; }
.modal-head h3 { flex: 1; }
.modal-head .icon-btn[data-back] { margin-right: 10px; }
.label-like { font-size: 13.5px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip-btn { height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip-btn.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.summary-box { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.pay-to { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.pay-to-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-row strong { font-size: 16px; overflow-wrap: anywhere; }
.upi-app-link { display: none; }
@media (hover: none) and (pointer: coarse) { .upi-app-link { display: inline-flex; } }
.copy-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 200; padding: 9px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; transform: translateX(-50%); box-shadow: var(--shadow-lg); }

/* =========================================================
   Bulk payout
   ========================================================= */
.bulk-work { display: flex; flex-direction: column; gap: 14px; padding: 20px; min-width: 0; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { box-shadow: var(--focus); }
.dropzone-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); }
.dropzone strong { font-weight: 600; }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.link-like { color: var(--brand); text-decoration: underline; }
.bulk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.bulk-head h3 { font-size: 15px; font-weight: 650; }
.bulk-head p { color: var(--muted); font-size: 12.5px; }
.bulk-head-actions { display: flex; gap: 8px; }
.bulk-scroll { border: 1px solid var(--border); border-radius: 12px; }
.bulk-table { display: block; width: 100%; min-width: 880px; }
.bulk-table thead, .bulk-table tbody { display: block; }
.bulk-table tr { display: grid; grid-template-columns: 36px minmax(0, 1.3fr) 92px minmax(0, 1.4fr) 130px 120px minmax(0, 1.1fr) 40px; align-items: center; column-gap: 6px; padding: 0 6px; }
.bulk-table th { display: block; padding: 9px 2px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.bulk-table th.num { text-align: right; }
.bulk-table thead tr { border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: 12px 12px 0 0; }
.bulk-table td { display: block; padding: 6px 0; }
.bulk-table tbody tr { border-top: 1px solid var(--border); }
.bulk-table tbody tr:first-child { border-top: 0; }
.bulk-table .c-idx { color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.bulk-table .c-del { text-align: center; }
.bulk-table td.c-err { grid-column: 1 / -1; padding: 0 0 8px 42px; color: var(--red); font-size: 12px; font-weight: 500; }
.bulk-table td.c-err.is-warn { color: var(--amber); }
.bulk-table td[hidden] { display: none; }
.input-sm { height: 36px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f7792' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.input:disabled { background-color: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.bulk-table tr.is-invalid { background: color-mix(in srgb, var(--red) 4%, transparent); }
.bulk-help { margin-top: -4px; }
code { padding: 1px 5px; border-radius: 5px; background: var(--surface-3); font-family: var(--mono); font-size: 12px; }
.batch-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.batch-counts div { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.batch-counts span { color: var(--muted); font-size: 12px; }
.batch-counts strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-card .btn-block { margin-top: 16px; }
.bulk-grid { grid-template-columns: minmax(0, 1fr); }
.bulk-grid .payout-side { position: static; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .bulk-grid .payout-side { grid-template-columns: minmax(0, 1fr); } }
.modal-wide { width: min(720px, calc(100vw - 32px)); }
.review-scroll { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.review-table th { position: sticky; top: 0; z-index: 1; border-top: 0; }
.review-table td { padding: 10px 14px; }
.review-table th { padding: 9px 14px; }

/* =========================================================
   API & webhooks
   ========================================================= */
.api-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.api-grid .card, .webhook-card { display: flex; flex-direction: column; gap: 16px; }
.api-grid .card-head, .webhook-card .card-head { margin-bottom: 0; }
.secret-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); border-radius: 12px; background: var(--teal-soft); }
.secret-banner > div:first-child { display: flex; flex-direction: column; }
.secret-banner strong { color: var(--teal); }
.secret-banner span { color: var(--ink-2); font-size: 13px; }
.secret-value { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.secret-value code { min-width: 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; white-space: nowrap; max-width: min(520px, 70vw); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-on { background: color-mix(in srgb, var(--st-success) 14%, transparent); color: color-mix(in srgb, var(--st-success) 80%, var(--ink)); }
.pill-off { background: var(--surface-3); color: var(--muted); }
.secret-field { display: flex; align-items: center; gap: 6px; }
.secret-field .input { flex: 1; min-width: 0; }
.secret-field.is-empty { min-height: 44px; padding: 0 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.field-hint .ic { width: 14px; height: 14px; color: var(--st-success); }
.key-meta { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card-actions form { margin: 0; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--red) 88%, #000); }
.compact-empty { min-height: 0; padding: 18px 10px; }
.code-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-3); width: max-content; max-width: 100%; overflow-x: auto; }
.code-tab { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.code-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.code-wrap { position: relative; }
.code { margin: 0; padding: 16px; border-radius: 12px; background: #0d1326; color: #d7def5; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; overflow-x: auto; max-height: 340px; }
:root[data-theme="dark"] .code { background: #070b17; border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .code { background: #070b17; border: 1px solid var(--border); } }
.code code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.code-copy { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .1); color: #d7def5; border-color: rgba(255, 255, 255, .15); }
.code-copy:hover { background: rgba(255, 255, 255, .18); }
.webhook-card { padding: 20px; }
.webhook-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 99px; background: var(--border-strong); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--teal); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }
.switch-label { font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 46px; }
.events { margin: 0; padding: 0; border: 0; }
.events legend { margin-bottom: 8px; padding: 0; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.event-option { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.event-option:hover { border-color: var(--border-strong); }
.event-option input { position: absolute; opacity: 0; }
.event-option .box { display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; flex: none; border: 1.5px solid var(--border-strong); border-radius: 5px; color: transparent; }
.event-option .box .ic { width: 13px; height: 13px; stroke-width: 3; }
.event-option input:checked + .box { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.event-option input:focus-visible + .box { box-shadow: var(--focus); }
.event-option:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.event-option > span:last-child { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.event-option strong { font-size: 12.5px; font-weight: 600; }
.event-option small { color: var(--muted); font-size: 12px; }
.webhook-card .form-foot { padding-top: 4px; }
.delivery-error { display: block; max-width: 280px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.confirm-text { color: var(--ink-2); line-height: 1.55; }

/* =========================================================
   IP whitelist & notifications
   ========================================================= */
.mode-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid; border-radius: var(--radius); }
.mode-card strong { font-size: 15px; font-weight: 650; }
.mode-card p { color: var(--ink-2); font-size: 13px; }
.mode-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; }
.mode-card.is-locked { border-color: color-mix(in srgb, var(--st-success) 35%, transparent); background: color-mix(in srgb, var(--st-success) 7%, var(--surface)); }
.mode-card.is-locked .mode-icon { background: color-mix(in srgb, var(--st-success) 16%, transparent); color: var(--st-success); }
.mode-card.is-open { border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-soft); }
.mode-card.is-open .mode-icon { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.ip-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.ip-add .btn { align-self: flex-start; }
.ip-list { margin: 0; padding: 0; list-style: none; }
.ip-list li { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); }
.ip-list li.is-off .ip-text { opacity: .6; }
.ip-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; }
.ip-icon .ic { width: 17px; height: 17px; }
.ip-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.ip-text strong { font-weight: 600; }
.ip-text .mono { color: var(--ink); overflow-wrap: anywhere; }
.ip-text small { color: var(--muted); font-size: 12px; }
.ip-actions { display: flex; align-items: center; gap: 6px; }
.ip-actions form { margin: 0; }
.notif-card { padding: 8px 0; max-width: 900px; }
.notif-top { display: flex; justify-content: flex-end; padding: 8px 16px 0; margin: 0; }
.notif-top + .notif-group { padding-top: 0; }
.notif-group { padding: 14px 20px 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.notif-list { margin: 0; padding: 0; list-style: none; }
.notif { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.notif-group + .notif-list .notif:first-child { border-top: 0; }
.notif.is-unread { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.notif.is-unread::before { content: ""; position: absolute; left: 8px; top: 26px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.notif-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; }
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { font-weight: 600; }
.notif.is-unread .notif-body strong { font-weight: 700; }
.notif-body p { margin-top: 2px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.notif-body small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.notif-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.notif-actions form { margin: 0; }

/* =========================================================
   Documentation
   ========================================================= */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.docs-toc a { padding: 6px 10px; border-left: 2px solid var(--border); color: var(--ink-2); font-size: 13.5px; }
.docs-toc a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--border-strong); }
.docs-toc a.is-active { border-left-color: var(--brand); color: var(--brand-soft-ink); font-weight: 600; }
.docs-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 880px; }
.doc { display: flex; flex-direction: column; gap: 14px; padding: 24px; scroll-margin-top: 84px; }
.doc h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.doc p { color: var(--ink-2); line-height: 1.6; }
.doc p strong { color: var(--ink); }
.doc-facts { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.endpoint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.endpoint .mono { color: var(--ink); font-size: 14px; }
.verb { padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.verb.post { background: color-mix(in srgb, var(--st-success) 15%, transparent); color: color-mix(in srgb, var(--st-success) 80%, var(--ink)); }
.verb.get { background: var(--brand-soft); color: var(--brand-soft-ink); }
.doc-code { display: flex; flex-direction: column; gap: 6px; }
.doc-code-head { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.doc-table { border: 1px solid var(--border); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.doc-table th { border-top: 0; }
.doc-table td { white-space: normal; vertical-align: top; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.doc-table td.mono { color: var(--ink); font-size: 12.5px; min-width: 150px; max-width: 260px; overflow-wrap: anywhere; }
.doc-table tbody tr:hover { background: transparent; }
.doc-list, .checklist { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 18px; color: var(--ink-2); line-height: 1.55; }
.checklist { padding: 0; list-style: none; }
.checklist li { display: flex; gap: 10px; }
.checklist .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--st-success); }

/* =========================================================
   Settings
   ========================================================= */
.sx { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1100px; }
.sx-profile { position: sticky; top: 84px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0 20px 20px; overflow: hidden; text-align: center; }
.card.sx-profile { padding: 0 20px 20px; }
.sx-cover { align-self: stretch; height: 84px; margin: 0 -20px; background: radial-gradient(120% 140% at 100% 0%, rgba(44, 201, 184, .45), transparent 55%), linear-gradient(135deg, #182f8f, #2a4fd6); }
.sx-avatar { width: 84px; height: 84px; margin-top: -42px; border: 4px solid var(--surface); border-radius: 24px; font-size: 26px; overflow: hidden; box-shadow: var(--shadow); }
.sx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sx-name { margin-top: 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.sx-biz { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.sx-facts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.sx-facts div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-facts dt { display: grid; color: var(--muted); }
.sx-facts dt .ic { width: 16px; height: 16px; }
.sx-facts dd { margin: 0; color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-kyc { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); text-align: left; }
.sx-kyc-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand-soft-ink); }
.sx-kyc-icon .ic { width: 17px; height: 17px; }
.sx-kyc-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1; min-width: 0; }
.sx-kyc-text strong { font-size: 14px; }
.sx-kyc-text .status { padding: 1px 8px; font-size: 11.5px; }
.sx-out { width: 100%; margin-top: 10px; }
.sx-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sx-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; scroll-margin-top: 90px; }
.sx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sx-card-head h3 { font-size: 15.5px; font-weight: 650; }
.sx-card .method-card-text small { color: var(--muted); font-size: 12.5px; }
.sx-pw { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.sx-pw .btn { height: 44px; }
.sx-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sx-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 550; font-size: 13.5px; }
.sx-toggle > .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
.sx-toggle > span:not(.switch) { flex: 1; min-width: 0; }
.sx-toggle:has(input:checked) { border-color: color-mix(in srgb, var(--teal) 40%, var(--border)); }
.sx-modal { overflow: auto; }
.sx-modal .modal-head { gap: 10px; }
.sx-modal .modal-body { gap: 16px; }
.doc-list-up { display: flex; flex-direction: column; gap: 8px; }
.doc-list-up .doc-tile { padding: 12px 14px; }
.panel { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.panel form { display: flex; flex-direction: column; gap: 18px; }
.panel-stack { padding: 0; gap: 16px; }
.panel-stack > .card { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h3, .panel-title { font-size: 16px; font-weight: 650; }
.panel-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 4px; }
.panel-foot .muted { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }
.ic-inline { width: 14px; height: 14px; }
.profile-photo { display: flex; align-items: center; gap: 16px; }
.avatar.xl { width: 64px; height: 64px; border-radius: 18px; font-size: 20px; overflow: hidden; }
.avatar.xl img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo .btn { cursor: pointer; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.doc-tile:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.doc-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.doc-tile:focus-within { box-shadow: var(--focus); }
.doc-tile.has-file { border-style: solid; border-color: color-mix(in srgb, var(--st-success) 45%, var(--border)); background: color-mix(in srgb, var(--st-success) 5%, var(--surface)); }
.doc-tile.is-bad { border-style: solid; border-color: var(--red); }
.doc-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); }
.doc-icon .ic { width: 17px; height: 17px; }
.doc-tile.has-file .doc-icon { background: color-mix(in srgb, var(--st-success) 14%, transparent); color: var(--st-success); }
.doc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.doc-text strong { font-size: 13.5px; font-weight: 600; }
.doc-text em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 12px; }
.doc-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-state { color: var(--muted); }
.doc-state .ic { width: 16px; height: 16px; }
.doc-tile.has-file .doc-state { color: var(--st-success); }
.kyc-facts { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.doc-list-view { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.doc-list-view li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.doc-list-view li:first-child { border-top: 0; }
.text-danger { color: var(--red) !important; white-space: normal !important; }
.toggle-list { display: flex; flex-direction: column; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; font-weight: 550; }
.toggle-row:first-child { border-top: 0; }

/* =========================================================
   Custom dropdown (see app.js "Custom dropdowns")
   ========================================================= */
.cs { position: relative; display: block; width: 100%; min-width: 0; }
.cs-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.cs-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.cs-btn:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border-strong)); }
.cs-btn:focus-visible, .cs.is-open .cs-btn { outline: none; border-color: var(--brand); box-shadow: var(--focus); border-radius: 9px; }
.cs-btn:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.cs-btn.cs-sm { height: 36px; font-size: 13px; border-radius: 8px; }
.cs-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .18s; }
.cs.is-open .cs-chev { transform: rotate(180deg); color: var(--brand); }
.cs-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.cs-menu { position: fixed; z-index: 80; max-height: 300px; max-width: min(340px, calc(100vw - 16px)); margin: 0; padding: 5px; overflow-y: auto; list-style: none; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); animation: cs-in .12s ease; }
.cs-menu:focus { outline: none; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-4px); } }
.cs-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.cs-opt span { flex: 1; }
.cs-opt.is-active { background: var(--surface-3); color: var(--ink); }
.cs-opt[aria-selected="true"] { color: var(--brand-soft-ink); font-weight: 600; }
.cs-opt[aria-selected="true"].is-active { background: var(--brand-soft); }
.cs-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.cs-tick { width: 15px; height: 15px; flex: none; color: var(--brand); visibility: hidden; }
.cs-opt[aria-selected="true"] .cs-tick { visibility: visible; }
.filter-field .cs { min-width: 150px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-grid .balance-card { grid-column: 1 / -1; }
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps li::after { display: none; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: min(300px, 86vw); box-shadow: var(--shadow-lg); transform: translateX(-104%); transition: transform .22s ease; }
  .sidebar.is-open { transform: none; }
  .sidebar-close { display: inline-grid; }
  .backdrop { position: fixed; inset: 0; z-index: 40; display: block; background: rgba(8, 12, 30, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .backdrop.is-open { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .insight-grid, .hero-grid, .payout-grid, .api-grid, .webhook-grid, .ip-grid, .docs, .sx { grid-template-columns: minmax(0, 1fr); }
  .sx-profile { position: static; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .docs-toc .nav-label { width: 100%; }
  .docs-toc a { border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; background: var(--surface); }
  .docs-toc a.is-active { border-color: var(--brand); }
  .payout-side { position: static; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-brand-side { display: none; }
}
@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 16px; padding-top: env(safe-area-inset-top, 0px); }
  .content { padding: 18px 16px 40px; gap: 16px; }
  .classic-switch span, .user-text, .chev { display: none; }
  .classic-switch { width: 38px; padding: 0; }
  .user-menu summary { padding: 3px; border-radius: 11px; }
  .page-head h2 { font-size: 22px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .kpi-grid { gap: 12px; }
  .kpi { flex-direction: column; gap: 10px; padding: 14px; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 9px; }
  .kpi-icon .ic { width: 17px; height: 17px; }
  .kpi-value { font-size: 18px; }
  .card { padding: 16px; }
  .balance-card { padding: 20px; }
  .balance-actions { padding-top: 20px; }
  .balance-actions .btn { flex: 1 1 140px; }
  .page-actions .btn-secondary { display: none; }
  .bar-chart { height: 200px; padding-left: 44px; }
  .bar-gridline span { width: 40px; font-size: 10.5px; }
  .bar-label { font-size: 11px; }
  /* Transactions become stacked rows */
  .table-card .card-head { padding: 16px 16px 0; }
  .tx-table thead { display: none; }
  .tx-table, .tx-table tbody, .tx-table tr, .tx-table td { display: block; width: 100%; }
  .tx-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
  .tx-table td { padding: 0; border: 0; white-space: normal; text-align: left; }
  .tx-table td[data-label="Recipient"] { grid-column: 1; }
  .tx-table td[data-label="Amount"] { grid-column: 2; grid-row: 1; text-align: right; }
  .tx-table td[data-label="Method"] { display: none; }
  .tx-table td[data-label="Status"] { grid-column: 2; grid-row: 2; text-align: right; }
  .tx-table td[data-label="Transaction ID"] { grid-column: 1; grid-row: 2; padding-left: 40px; overflow: hidden; text-overflow: ellipsis; }
  .tx-table td[data-label="Date"] { grid-column: 1 / -1; padding-left: 40px; font-size: 12px; }
  .who strong { overflow: hidden; text-overflow: ellipsis; }
  /* Transactions */
  .tabs { padding: 0 8px; }
  .filters { padding: 14px 16px; gap: 10px; }
  .filters .search { flex-basis: 100%; }
  .filter-field { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .filter-field > span { font-size: 11px; }
  .filter-field input[type="date"], .filter-field select { width: 100%; min-width: 0; }
  .filter-actions { flex: 1 1 calc(50% - 5px); }
  .filter-actions .btn { flex: 1; }
  .tx-list tr { grid-template-columns: minmax(0, 1fr) auto; }
  .tx-list td.c-who { grid-column: 1; grid-row: 1; }
  .tx-list td.c-amount { grid-column: 2; grid-row: 1; text-align: right; }
  .tx-list td.c-status { grid-column: 2; grid-row: 2; text-align: right; }
  .tx-list td.c-ref { grid-column: 1; grid-row: 2; padding-left: 40px; overflow: hidden; text-overflow: ellipsis; }
  .tx-list td.c-ref small { display: none; }
  .tx-list td.c-date { grid-column: 1 / -1; padding-left: 40px; font-size: 12px; color: var(--muted); }
  .tx-list td.c-date small { display: inline; margin-left: 4px; }
  .tx-list td.c-method, .tx-list td.c-open, .tx-list td.c-amount small { display: none; }
  .pager { padding: 14px 16px; justify-content: center; }
  .pager-num:not(.is-active), .pager-gap { display: none; }
  /* Send payout */
  .payout-form { padding: 18px 16px; }
  .method-cards, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .method-card { padding: 12px; }
  .form-foot .btn { width: 100%; }
  .form-foot-note { width: 100%; justify-content: center; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* Wallet */
  .wallet-grid { gap: 12px; }
  .wallet-grid .kpi { padding: 14px; gap: 10px; flex-direction: row; }
  .how-card { padding: 14px 16px; }
  .how-steps { gap: 12px; }
  .list-head { padding: 16px 16px 2px; }
  .topup-list tr { grid-template-columns: minmax(0, 1fr) auto; }
  .topup-list td.c-ref { grid-column: 1; grid-row: 1; }
  .topup-list td.c-amount { grid-column: 2; grid-row: 1; text-align: right; }
  .topup-list td.c-status { grid-column: 2; grid-row: 2; text-align: right; }
  .topup-list td.c-utr { grid-column: 1; grid-row: 2; padding-left: 40px; }
  .topup-list td.c-date { grid-column: 1 / -1; padding-left: 40px; font-size: 12px; color: var(--muted); }
  .topup-list td.c-date small { display: inline; margin-left: 4px; }
  .topup-list td.c-fee, .topup-list td.c-paid { display: none; }
  /* Bulk payout */
  .bulk-work { padding: 14px; }
  .bulk-scroll { border: 0; border-radius: 0; overflow: visible; }
  .bulk-table { min-width: 0; }
  .bulk-table thead { display: none; }
  .bulk-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
  .bulk-table tbody tr:first-child { border-top: 1px solid var(--border); }
  .bulk-table td { padding: 0; }
  .bulk-table td.c-idx { grid-column: 1; text-align: left; font-weight: 600; }
  .bulk-table td.c-idx::before { content: "Payout "; }
  .bulk-table td.c-del { grid-column: 2; grid-row: 1; justify-self: end; }
  .bulk-table td.c-name, .bulk-table td.c-dest, .bulk-table td.c-rem, .bulk-table td.c-err { grid-column: 1 / -1; }
  .bulk-table td.c-err { padding: 0; }
  .batch-counts strong { font-size: 18px; }
  .bulk-head-actions { width: 100%; }
  .bulk-head-actions .btn { flex: 1; }
  /* API & webhooks */
  .webhook-card { padding: 16px; }
  .secret-value { width: 100%; }
  .secret-value code { flex: 1; max-width: none; }
  .card-actions { width: 100%; }
  .card-actions > * { flex: 1; }
  .card-actions .btn { width: 100%; }
  .delivery-list tr { grid-template-columns: minmax(0, 1fr) auto; }
  .delivery-list td.c-event { grid-column: 1; grid-row: 1; }
  .delivery-list td.c-status { grid-column: 2; grid-row: 1; text-align: right; }
  .delivery-list .delivery-error { display: none; }
  .delivery-list td.c-ref { overflow: hidden; text-overflow: ellipsis; }
  .code-copy { position: static; margin-top: 8px; width: 100%; background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
  .delivery-list td.c-ref { grid-column: 1; grid-row: 2; }
  .delivery-list td.c-attempts { grid-column: 1; text-align: left; font-size: 12px; color: var(--muted); }
  .delivery-list td.c-attempts::before { content: "Attempts "; }
  .delivery-list td.c-date { grid-column: 2; text-align: right; font-size: 12px; }
  /* IP whitelist & notifications */
  .ip-list li { flex-wrap: wrap; padding: 14px 16px; }
  .ip-list .ip-actions { width: 100%; justify-content: flex-end; }
  .ip-add .btn { align-self: stretch; }
  .notif { padding: 14px 16px; flex-wrap: wrap; }
  .notif-actions { width: 100%; justify-content: flex-end; }
  /* Documentation */
  .doc { padding: 18px 16px; }
  .doc-table td.mono { white-space: normal; word-break: break-word; }
  /* Settings */
  .sx-card { padding: 16px; }
  .sx-pw { grid-template-columns: minmax(0, 1fr); }
  .sx-toggles { grid-template-columns: minmax(0, 1fr); }
  .sx-card .method-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-card .method-card-icon { display: none; }
  .panel-foot .btn { flex: 1; }
  .filter-field .cs { min-width: 0; }
  .cs-btn { height: 40px; }
  .auth-form-side { padding: 20px 16px; }
  .auth-card { padding: 28px 0; }
  .auth-card h1 { font-size: 24px; }
  .auth-foot { justify-content: center; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
