/* Vezeti SMSC console — self-contained (no CDN), light + dark, mobile-first enough to use on a phone. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --brand: #0a7fd8;
  --brand-600: #0668b8;
  --brand-700: #0a4f8f;
  --brand-100: #e4f2fd;
  --cyan: #4fd6ea;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --ink: #0e1b2c;
  --ink-2: #47566b;
  --muted: #7a889b;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --ring: rgba(10, 127, 216, .35);
  --good: #0ca30c;  --good-ink: #0a6a0a;  --good-bg: #e6f6e6;
  --crit: #d03b3b;  --crit-ink: #a52424;  --crit-bg: #fdeaea;
  --warn: #fab219;  --warn-ink: #7a5200;  --warn-bg: #fff4d9;
  --pend: #3987e5;  --pend-ink: #1c5cab;  --pend-bg: #e7f0fd;
  --side: #0a2036;
  --side-2: #0e2b47;
  --side-ink: #b9cbe0;
  --shadow: 0 1px 2px rgba(14, 27, 44, .05), 0 4px 16px rgba(14, 27, 44, .05);
  --shadow-lg: 0 12px 40px rgba(14, 27, 44, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #3aa0f0; --brand-600: #5bb2f4; --brand-700: #8cc9f8; --brand-100: #10314f;
    --bg: #08121f; --surface: #0f1f33; --surface-2: #132840; --ink: #eaf2fb; --ink-2: #b3c2d5; --muted: #8496ac;
    --line: #1e3652; --line-2: #172d46; --ring: rgba(58, 160, 240, .45);
    --good-ink: #5fd35f; --good-bg: #0f2d14; --crit-ink: #ff8f8f; --crit-bg: #331517;
    --warn-ink: #ffcf66; --warn-bg: #33270b; --pend-ink: #8cbcf5; --pend-bg: #112a48;
    --side: #061321; --side-2: #0b2036;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #3aa0f0; --brand-600: #5bb2f4; --brand-700: #8cc9f8; --brand-100: #10314f;
  --bg: #08121f; --surface: #0f1f33; --surface-2: #132840; --ink: #eaf2fb; --ink-2: #b3c2d5; --muted: #8496ac;
  --line: #1e3652; --line-2: #172d46; --ring: rgba(58, 160, 240, .45);
  --good-ink: #5fd35f; --good-bg: #0f2d14; --crit-ink: #ff8f8f; --crit-bg: #331517;
  --warn-ink: #ffcf66; --warn-bg: #33270b; --pend-ink: #8cbcf5; --pend-bg: #112a48;
  --side: #061321; --side-2: #0b2036;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.show-dark { display: none; }
:root[data-theme="dark"] .show-dark { display: inline-flex; }
:root[data-theme="dark"] .show-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .show-dark { display: inline-flex; }
  :root:not([data-theme="light"]) .show-light { display: none; }
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.brand-text { font-size: 20px; font-weight: 700; letter-spacing: -.02em; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--cyan); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-ink); font-weight: 520; position: relative; text-decoration: none; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(79, 214, 234, .14); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cyan); }
.side-foot { margin-top: auto; padding: 12px 8px 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
.role-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--cyan); }
.role-tag .i { width: 15px; height: 15px; }
.side-note { font-size: 12px; color: rgba(185, 203, 224, .6); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.page-title { font-size: 21px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-menu { display: flex; align-items: center; gap: 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; font-weight: 700; text-decoration: none; }
.avatar:hover { text-decoration: none; filter: brightness(1.05); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.menu-btn { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 14px; text-decoration: none; }
.chip:hover { text-decoration: none; border-color: var(--brand); }
.chip .i { width: 17px; height: 17px; color: var(--brand); }
.chip b { font-variant-numeric: tabular-nums; }
.chip span { color: var(--muted); }
.chip-balance.low { border-color: var(--warn); background: var(--warn-bg); }
.chip-balance.low .i { color: var(--warn-ink); }
.chip-inbox b, .chip-inbox span { color: var(--muted); }
.chip-inbox .i { color: var(--muted); }
.chip-inbox.has-unread { border-color: var(--brand); background: var(--brand-100); }
.chip-inbox.has-unread b, .chip-inbox.has-unread span { color: var(--brand-600); font-weight: 700; }
.chip-inbox.has-unread .i { color: var(--brand-600); }
.content { padding: 24px 28px 40px; width: 100%; max-width: 1440px; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px 28px 26px; font-size: 13px; color: var(--muted); margin-top: auto; }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-h h2 { font-size: 16px; }
.card-h .sub { color: var(--muted); font-size: 13px; }
.card-b { padding: 16px 20px 20px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.unread-row { font-weight: 600; }
.unread-row .msg { font-weight: 600; }
.dot.new { background: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* ---------- KPI tiles ---------- */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand); }
.kpi-ico.good { background: var(--good-bg); color: var(--good-ink); }
.kpi-ico.crit { background: var(--crit-bg); color: var(--crit-ink); }
.kpi-ico.warn { background: var(--warn-bg); color: var(--warn-ink); }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.kpi-val small { font-size: 14px; font-weight: 550; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; font-size: 13px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.delta { white-space: nowrap; }
.delta.flat { color: var(--ink-2); }
.delta.up { color: var(--good-ink); }
.delta.down { color: var(--crit-ink); }
.delta .i { width: 14px; height: 14px; }
.spark { width: 64px; height: 26px; flex: none; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }

/* ---------- status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill .i { width: 13px; height: 13px; stroke-width: 2.4; }
.pill.delivered { background: var(--good-bg); color: var(--good-ink); }
.pill.failed { background: var(--crit-bg); color: var(--crit-ink); }
.pill.pending { background: var(--pend-bg); color: var(--pend-ink); }
.pill.online { background: var(--good-bg); color: var(--good-ink); }
.pill.offline { background: var(--crit-bg); color: var(--crit-ink); }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot.good { background: var(--good); box-shadow: 0 0 0 4px rgba(12, 163, 12, .16); }
.dot.crit { background: var(--crit); box-shadow: 0 0 0 4px rgba(208, 59, 59, .16); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(180deg, var(--brand), var(--brand-600)); color: #fff; border-color: var(--brand-600); box-shadow: 0 1px 2px rgba(6, 104, 184, .35); }
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-600), var(--brand-700)); color: #fff; }
.btn-danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn-danger:hover { background: #b93030; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-sm { padding: 5px 11px; min-height: 32px; font-size: 13.5px; border-radius: 8px; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea { width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; min-height: 42px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .toggle-pw { position: absolute; right: 4px; top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button, .seg a { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13.5px; padding: 6px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.seg button:hover, .seg a:hover { color: var(--ink); text-decoration: none; }
.seg .on { background: var(--surface); color: var(--brand-600); box-shadow: 0 1px 2px rgba(14, 27, 44, .12); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.alert .i { margin-top: 2px; }
.alert-success { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 35%, transparent); color: var(--good-ink); }
.alert-error { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 35%, transparent); color: var(--crit-ink); }
.alert-info { background: var(--pend-bg); border-color: color-mix(in srgb, var(--pend) 35%, transparent); color: var(--pend-ink); }
.alert-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn-ink); }
.secret-box { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 12px; background: var(--surface); border: 1px dashed var(--line); border-radius: 9px; color: var(--ink); }
.secret-box code { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; user-select: all; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl th:first-child { border-top-left-radius: var(--radius); }
.tbl th:last-child { border-top-right-radius: var(--radius); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl td.msg { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.tbl-empty .i { width: 34px; height: 34px; margin-bottom: 8px; opacity: .6; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager a, .pager span.cur { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.pager a:hover { background: var(--surface-2); }
.pager span.cur { background: var(--brand-100); color: var(--brand-600); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* ---------- dialog ---------- */
dialog { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(6, 19, 33, .55); backdrop-filter: blur(2px); }
.dlg-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.dlg-h h3 { font-size: 18px; }
.dlg-b { padding: 16px 22px 8px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 20px; }
.msg-full { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin-bottom: 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- charts ---------- */
.chart-box { position: relative; padding: 4px 8px 12px; }
.chart-box.loading svg { opacity: .55; transition: opacity .2s; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .axis { stroke: var(--line); stroke-width: 1; }
.chart-svg text { fill: var(--muted); font: 12px var(--font); font-variant-numeric: tabular-nums; }
.chart-svg .col { transition: opacity .12s; }
.chart-svg .col.dim { opacity: .35; }
.chart-svg .hit { fill: transparent; cursor: default; }
.chart-svg .hit:focus { outline: none; }
.chart-svg .hit:focus-visible + .focus-ring, .chart-svg .focus-ring.on { stroke: var(--ring); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 20px; font-size: 13px; color: var(--ink-2); }
.legend .k { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend .sw.delivered { background: #0ca30c; }
.legend .sw.failed { background: #d03b3b; }
.legend .sw.pending { background: #5598e7; }
.legend .i { width: 13px; height: 13px; stroke-width: 2.6; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 168px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; box-shadow: var(--shadow-lg); font-size: 13px; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s; }
.tip.on { opacity: 1; transform: none; }
.tip .t-h { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.tip .t-r { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.tip .t-r i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.tip .t-r b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.tip .t-r.total { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 5px; }
.viz-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.outcome { padding: 4px 20px 20px; }
.outcome-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line-2); }
.outcome-bar span { display: block; min-width: 3px; }
.outcome-bar .delivered { background: #0ca30c; }
.outcome-bar .failed { background: #d03b3b; }
.outcome-bar .pending { background: #5598e7; }
.outcome-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.outcome-list li { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.outcome-list .sw { width: 10px; height: 10px; border-radius: 3px; }
.outcome-list .sw.delivered { background: #0ca30c; }
.outcome-list .sw.failed { background: #d03b3b; }
.outcome-list .sw.pending { background: #5598e7; }
.outcome-list b { margin-left: auto; font-variant-numeric: tabular-nums; }
.outcome-list em { font-style: normal; color: var(--muted); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.viz-table { padding: 0 8px 12px; }

/* ---------- status / connector card ---------- */
.conn { display: flex; align-items: center; gap: 14px; padding: 4px 0 2px; }
.conn-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand); flex: none; }
.conn.ok .conn-ico { background: var(--good-bg); color: var(--good-ink); }
.conn.bad .conn-ico { background: var(--crit-bg); color: var(--crit-ink); }
.conn-title { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.conn-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.conn-stats-period { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.conn-stats div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.conn-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.conn-stats span { font-size: 12px; color: var(--muted); }

/* ---------- send page ---------- */
.counter { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.counter b { color: var(--ink); font-variant-numeric: tabular-nums; }
.recap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.recap div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.recap b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.recap span { font-size: 12px; color: var(--muted); }
.phone-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.bubble { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; margin-left: 24px; white-space: pre-wrap; word-break: break-word; min-height: 42px; }
.bubble.empty { background: var(--line); color: var(--muted); }
.from { font-size: 12px; color: var(--muted); margin: 0 0 6px 4px; }

/* ---------- auth (login) ---------- */
body.auth { background: var(--surface); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; background: radial-gradient(1200px 700px at 20% 10%, #e6f6fd 0%, #d3ecfb 40%, #bfe1f8 100%); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px; padding: 48px; text-align: center; color: #0a2f52; }
:root[data-theme="dark"] .auth-brand { background: radial-gradient(1200px 700px at 20% 10%, #0f3557 0%, #0a2340 45%, #071a30 100%); color: #dcecfb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-brand { background: radial-gradient(1200px 700px at 20% 10%, #0f3557 0%, #0a2340 45%, #071a30 100%); color: #dcecfb; } }
.auth-brand img.logo { width: min(300px, 62%); height: auto; filter: drop-shadow(0 22px 34px rgba(10, 100, 180, .28)); }
.auth-brand h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand p { max-width: 400px; color: inherit; opacity: .8; margin: 0 auto; }
.feature-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.feature-list li { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.feature-list .i { color: var(--brand); width: 18px; height: 18px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; position: relative; }
.auth-card { width: min(410px, 100%); }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .btn-primary { width: 100%; margin-top: 4px; min-height: 46px; }
.auth-card .lead { color: var(--muted); margin-bottom: 26px; }
.auth-mobile-logo { display: none; }
.auth-theme { position: absolute; top: 18px; right: 18px; }
.auth-foot { margin-top: 26px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(6, 19, 33, .5); z-index: 35; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px 16px; }
  .content { padding: 18px 16px 32px; }
  .foot { padding: 14px 16px 24px; }
  .g-3, .g-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .chip-balance span { display: none; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: block; width: 120px; margin: 0 auto 18px; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 18px; }
  .conn-stats, .recap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-val { font-size: 26px; }
  .top-actions { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .pill, .chip, .btn { border: 1px solid CanvasText; } .outcome-bar span { forced-color-adjust: none; } }
@media print { .side, .top, .foot, .filters, .pager, .btn { display: none !important; } .shell { display: block; } }

/* ---------- small additions ---------- */
.hr { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }
.hint.err { color: var(--crit-ink); font-weight: 550; }
.mt-sm { margin-top: 8px; }
ul.plain { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
pre.code { margin: 0 0 12px; padding: 14px 16px; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font: 13px/1.6 var(--mono); color: var(--ink); white-space: pre; }
.filters .row { align-items: flex-end; }
.filters .input, .filters .select { height: 44px; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- local numbers ---------- */
.tbl th.chk, .tbl td.chk { width: 44px; padding-right: 0; }
.tbl input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.bulkbar { border-top: 1px solid var(--line-2); background: var(--surface-2); align-items: center; padding: 10px 20px; }
.bulkbar .select { width: auto; min-width: 170px; height: 36px; min-height: 36px; padding: 4px 10px; }

/* ---------- connectors & routing ---------- */
.conn-card .card-h h2 { font-size: 18px; }
.route-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.switch .knob { width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; flex: none; }
.switch.on { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good-ink); }
.switch.on .knob { background: var(--good); transform: translateX(2px); }
.switch.sm { padding: 3px; gap: 0; width: 44px; justify-content: flex-start; }
.switch.sm .knob { width: 18px; height: 18px; }
.switch.sm.on { justify-content: flex-end; }
.switch.sm.on .knob { transform: none; }
.tester { max-width: 320px; }
.select-sm { width: auto; min-height: 36px; height: 36px; padding: 4px 10px; }
tr.win td { background: var(--good-bg); }
tr.off td { opacity: .55; }
.chip-lite { display: inline-block; padding: 2px 9px; margin: 0 4px 4px 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.conn-list { display: grid; gap: 10px; margin-top: 12px; }
.conn-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.conn-item:first-child { border-top: 0; }
.conn-item .nm { font-weight: 600; }
.conn-item .meta { margin-left: auto; text-align: right; color: var(--muted); font-size: 12.5px; }

/* ---------- row actions ---------- */
/* Row actions as plain text links in fixed columns, so they line up on every row even when some do not apply. */
.actions { display: grid; grid-template-columns: 52px 74px 82px 44px 92px 60px; justify-content: end; align-items: center; column-gap: 2px; }
.actions form.inline { display: contents; }
.lnk { justify-self: start; background: none; border: 0; padding: 6px 8px; margin: 0 -2px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px; color: var(--brand-600); cursor: pointer; white-space: nowrap; }
.lnk:hover { background: var(--brand-100); }
.lnk.good { color: var(--good-ink); }
.lnk.good:hover { background: var(--good-bg); }
.lnk.bad { color: var(--crit-ink); }
.lnk.bad:hover { background: var(--crit-bg); }
.btn-good { background: var(--good-bg); color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.btn-good:hover { background: color-mix(in srgb, var(--good-bg) 80%, var(--good)); }
.btn-bad { color: var(--crit-ink); }
.btn-bad:hover { background: var(--crit-bg); }

/* ---------- sortable table headers and the big-list pager ---------- */
.sortlink { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sortlink:hover { color: var(--ink); text-decoration: none; }
.sortlink .arr { font-size: 11px; opacity: .35; }
.sortlink.on { color: var(--brand-600); }
.sortlink.on .arr { opacity: 1; }
.tbl th.num .sortlink { justify-content: flex-end; }
.pager .jump { display: flex; gap: 6px; align-items: center; }
.pager .jump .input { width: 84px; min-height: 34px; height: 34px; padding: 4px 10px; }
.bulkbar .owner-in { width: 250px; height: 36px; min-height: 36px; padding: 4px 10px; }

/* ---------- send page: import help ---------- */
details.help { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
details.help > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; color: var(--brand-600); }
details.help > summary::-webkit-details-marker { display: none; }
details.help[open] > summary { border-bottom: 1px solid var(--line); }
.help-body { padding: 12px 16px 14px; font-size: 14px; }
.help-body p { margin: 0 0 10px; }
.help-tbl th, .help-tbl td { padding: 9px 12px; vertical-align: top; }
.help-list { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.import-msg { font-size: 13px; margin-top: 6px; }
.import-msg.ok { color: var(--good-ink); }
.import-msg.err, .hint.err { color: var(--crit-ink); font-weight: 550; }
.counter b.bad { color: var(--crit-ink); }
.mb-sm { margin-bottom: 8px; }

/* Send page: when to send */
fieldset.when { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.when legend { padding: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg-opt input:checked + span { background: var(--surface); color: var(--brand-600); box-shadow: 0 1px 2px rgba(14, 27, 44, .12); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.sched-box { margin-top: 12px; padding: 14px 16px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sched-box[hidden], #everyBox[hidden] { display: none; }
.sched-box .hint { margin-bottom: 10px; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap .input { min-width: 0; }

/* Scheduled messages */
.tbl td.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .bad, .recap b.bad { color: var(--crit-ink); }
.sched-upload { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 14px; }
.sched-upload .field { margin: 0; min-width: 200px; }
.sched-upload .field.grow { flex: 1; }
#preview .recap { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { #preview .recap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Billing / currency */
.curlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 18px; }
.currow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.currow .select { width: auto; }
.big-figure { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 4px; }
.input-sm { height: 38px; min-width: 110px; }
.cur-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: 1px; }

/* Buy credit */
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.buy-sum { min-height: 22px; margin: 0 0 12px; font-weight: 600; color: var(--good-ink); }
.buy-sum.err { color: var(--crit-ink); }
.receipt { max-width: 640px; }
@media print { .receipt .btn { display: none !important; } }
.card-lite { border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; background: var(--surface); }
.card-lite h3 { margin: 0; font-size: 16px; }
.copyline { display: flex; gap: 8px; }
.copyline .input { flex: 1; min-width: 0; font-size: 12.5px; }

/* "Taking you to the payment page" */
.interstitial { max-width: 520px; margin: 12vh auto 0; text-align: center; }

#addBox[hidden], #deductBox[hidden] { display: none; }

/* Staff admins: rights list */
.rights { display: grid; gap: 8px; }
.right-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.right-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.right-opt span { display: flex; flex-direction: column; gap: 2px; }
.right-opt small { color: var(--muted); font-size: 12.5px; }
.actions2 { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.tbl td.clip-wide { max-width: 420px; overflow-wrap: anywhere; }

/* Dashboard money boxes */
.money .kpi-val { margin-top: 0; }
.money .kpi-val.neg { color: var(--crit-ink); }
.money-tbl th, .money-tbl td { padding: 8px 10px; }
.money-kv { margin: 12px 0 4px; }

.pill.blocked { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* sign-up: the hidden trap field for bots (people never see it) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.otp-input { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* message text hidden from staff without the Message content right */
.locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-style: italic; font-size: 13px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 2px 10px; }
.locked .i { width: 14px; height: 14px; }

/* Sidebar groups (drop-downs) */
.nav-group { display: block; }
.nav-group > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-toggle .chev { margin-left: auto; width: 16px; height: 16px; opacity: .7; transition: transform .15s ease; }
.nav-group[open] > .nav-toggle .chev { transform: rotate(180deg); }
.nav-toggle.has-active { color: #fff; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 18px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .12); }
.nav-link.sub { padding: 8px 10px; font-size: 14px; font-weight: 500; }
.nav-link.sub.active::before { left: -11px; top: 8px; bottom: 8px; }

/* ---------- resellers (staff pages) ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.row.end { justify-content: flex-end; gap: 4px; }
.big-figure { font-size: 32px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.good-t { color: var(--good-ink); }
.bad-t { color: var(--crit-ink); }
.terms-box { max-height: 260px; overflow: auto; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.terms-box h3 { font-size: 15px; margin-bottom: 8px; }
.back { transform: rotate(90deg); }

/* ---------- reseller portal (banking-app look) ---------- */
body.rp { background: var(--bg); }
.rp-top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.rp-bar { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 18px; }
.rp-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.rp-brand:hover { text-decoration: none; }
.rp-brand span { display: flex; flex-direction: column; line-height: 1.1; font-size: 16px; }
.rp-brand small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.rp-tabs { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.rp-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.rp-tab:hover { background: var(--surface-2); text-decoration: none; }
.rp-tab.active { background: var(--brand-100); color: var(--brand-600); }
.rp-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.rp-main { max-width: 860px; margin: 0 auto; padding: 22px 18px 96px; }
.rp-hello { font-size: 18px; margin-bottom: 14px; color: var(--ink-2); }
.rp-bottom { display: none; }

.bal-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 24px 20px; border-radius: 22px; color: #fff; overflow: hidden; margin-bottom: 18px;
  background: radial-gradient(120% 140% at 100% 0%, #4fd6ea 0%, rgba(79, 214, 234, 0) 55%), linear-gradient(135deg, #0a7fd8 0%, #0a4f8f 100%); box-shadow: 0 10px 30px rgba(10, 79, 143, .35); }
.bal-card.slim { padding-bottom: 22px; }
.bal-label { font-size: 13px; font-weight: 600; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.bal-fig { font-size: 40px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bal-sub { font-size: 13.5px; opacity: .9; }
.bal-prog { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 12.5px; }
.bal-prog progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .25); appearance: none; -webkit-appearance: none; }
.bal-prog progress::-webkit-progress-bar { background: rgba(255, 255, 255, .25); }
.bal-prog progress::-webkit-progress-value { background: #fff; border-radius: 99px; }
.bal-prog progress::-moz-progress-bar { background: #fff; border-radius: 99px; }
.bal-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bal-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); text-decoration: none; }
.bal-btn:hover { background: rgba(255, 255, 255, .28); text-decoration: none; }
.bal-btn.primary { background: #fff; color: #0a4f8f; border-color: #fff; }
.bal-btn.primary:hover { background: #eaf4fd; }
.bal-btn.dim { opacity: .75; }

.rp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.rp-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.rp-tile-l { font-size: 12px; color: var(--muted); font-weight: 600; }
.rp-tile-v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.rp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rp-card-h h2 { font-size: 16px; }
.rp-empty { padding: 14px 0 4px; }
.txns { list-style: none; margin: 0; padding: 0; }
.txn { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.txn:first-child { border-top: 0; }
.txn-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.txn-ic.in { background: var(--good-bg); color: var(--good-ink); }
.txn-ic.out { background: var(--crit-bg); color: var(--crit-ink); }
.txn-ic.cust { background: var(--brand-100); color: var(--brand-600); }
.txn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.txn-t { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.txn-d { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.txn-amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; }
.txn-amt.in { color: var(--good-ink); }
.txn-amt.out { color: var(--crit-ink); }
.txn-amt small { font-weight: 500; font-size: 12px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chip-link { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.chip-link:hover { background: var(--surface-2); text-decoration: none; }
.chip-link.on { background: var(--brand-100); color: var(--brand-600); border-color: transparent; }
.rp-dates { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rp-dates .field { margin: 0; flex: 1; min-width: 140px; }
.rp-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.rp-sum div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.rp-sum span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rp-sum strong { font-variant-numeric: tabular-nums; }
.rp-dl { gap: 10px; }

.bank-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; margin: 6px 0 16px; }
.amt-input { font-size: 24px; font-weight: 700; height: 56px; font-variant-numeric: tabular-nums; }
.btn-pay { width: 100%; min-height: 52px; font-size: 17px; letter-spacing: .08em; border-radius: 14px; }
.rp-done { text-align: center; padding: 32px 20px; }
.rp-done .done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--good-bg); color: var(--good-ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.rp-done .done-ic .i { width: 32px; height: 32px; stroke-width: 2.6; }
.done-amt { font-size: 34px; font-weight: 750; letter-spacing: -.02em; margin: 6px 0 12px; }

@media (max-width: 720px) {
  .rp-tabs { display: none; }
  .rp-tiles, .rp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bal-fig { font-size: 34px; }
  .rp-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; }
  .rp-bottom .rp-tab { flex-direction: column; gap: 2px; padding: 6px 14px; font-size: 11.5px; border-radius: 12px; }
}
.terms-edit { min-height: 280px; font: inherit; line-height: 1.5; resize: vertical; height: auto; }
.flash-dialog .flash-body { padding: 24px 24px 8px; display: grid; gap: 12px; }
.flash-dialog .flash-body .alert { margin-bottom: 0; }
.flash-dialog .flash-actions { display: flex; justify-content: flex-end; padding: 8px 24px 20px; }
.field-error { color: var(--crit-ink); font-size: 13px; }
.field .input[aria-invalid="true"], .field .select[aria-invalid="true"] { border-color: var(--crit); }
