/* ==========================================================================
   Cashmora design system
   Palette from the logo: ink black, Cashmora blue, money green, slate grey.
   Built on Bootstrap 5.3. Light + dark themes via [data-bs-theme].
   ========================================================================== */

:root {
  --cm-ink: #0b0f14;
  --cm-ink-2: #141a22;
  --cm-blue: #0a7fe6;
  --cm-blue-600: #086dc6;
  --cm-blue-50: #e9f3fd;
  --cm-green: #2fb52a;
  --cm-green-bright: #3fc73a;
  --cm-green-50: #e9f8e8;
  --cm-amber: #d97706;
  --cm-amber-50: #fef4e2;
  --cm-red: #e5484d;
  --cm-red-50: #fdecec;
  --cm-slate: #6b7280;

  --cm-bg: #f5f7fa;
  --cm-surface: #ffffff;
  --cm-surface-2: #f9fafb;
  --cm-border: #e6e9ee;
  --cm-text: #0b0f14;
  --cm-text-2: #5b6472;
  --cm-text-3: #8a93a1;

  --cm-radius: 14px;
  --cm-radius-sm: 10px;
  --cm-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --cm-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14);
  --cm-sidebar-w: 264px;
  --cm-topbar-h: 64px;

  --bs-primary: var(--cm-blue);
  --bs-primary-rgb: 10, 127, 230;
  --bs-success: var(--cm-green);
  --bs-success-rgb: 47, 181, 42;
  --bs-danger: var(--cm-red);
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--cm-text);
  --bs-body-bg: var(--cm-bg);
  --bs-border-color: var(--cm-border);
  --bs-link-color: var(--cm-blue);
  --bs-link-color-rgb: 10, 127, 230;
  --bs-link-hover-color: var(--cm-blue-600);
  --bs-focus-ring-color: rgba(10, 127, 230, .25);
}

[data-bs-theme="dark"] {
  --cm-bg: #0b0f14;
  --cm-surface: #121821;
  --cm-surface-2: #17202b;
  --cm-border: #232d3a;
  --cm-text: #eef2f6;
  --cm-text-2: #a7b0bd;
  --cm-text-3: #7a8594;
  --cm-blue-50: rgba(10, 127, 230, .14);
  --cm-green-50: rgba(63, 199, 58, .14);
  --cm-amber-50: rgba(217, 119, 6, .16);
  --cm-red-50: rgba(229, 72, 77, .16);
  --cm-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --cm-shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, .5);
  --bs-body-color: var(--cm-text);
  --bs-body-bg: var(--cm-bg);
  --bs-border-color: var(--cm-border);
  --bs-secondary-bg: var(--cm-surface-2);
  --bs-tertiary-bg: var(--cm-surface-2);
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--bs-body-font-family);
  font-size: .9375rem;
  background: var(--cm-bg);
  color: var(--cm-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -.02em; color: var(--cm-text); }
a { text-decoration: none; }
.text-2 { color: var(--cm-text-2) !important; }
.text-3 { color: var(--cm-text-3) !important; }
.fw-600 { font-weight: 600 !important; }
.tabular, .amount { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.amount { font-weight: 700; letter-spacing: -.02em; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: .85em; }
::selection { background: rgba(10, 127, 230, .2); }
:focus-visible { outline: 2px solid var(--cm-blue); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 10px; --bs-btn-padding-y: .55rem; --bs-btn-padding-x: 1rem; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 34px; --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .75rem; --bs-btn-border-radius: 8px; }
.btn-lg { min-height: 50px; --bs-btn-border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--cm-blue); --bs-btn-border-color: var(--cm-blue); --bs-btn-hover-bg: var(--cm-blue-600); --bs-btn-hover-border-color: var(--cm-blue-600); --bs-btn-active-bg: #075aa3; --bs-btn-disabled-bg: var(--cm-blue); --bs-btn-disabled-border-color: var(--cm-blue); box-shadow: 0 1px 2px rgba(10, 127, 230, .3); }
.btn-success { --bs-btn-bg: var(--cm-green); --bs-btn-border-color: var(--cm-green); --bs-btn-hover-bg: #279a23; --bs-btn-hover-border-color: #279a23; }
.btn-dark { --bs-btn-bg: var(--cm-ink); --bs-btn-border-color: var(--cm-ink); --bs-btn-hover-bg: #1d2530; }
.btn-light { --bs-btn-bg: var(--cm-surface); --bs-btn-border-color: var(--cm-border); --bs-btn-color: var(--cm-text); --bs-btn-hover-bg: var(--cm-surface-2); --bs-btn-hover-border-color: #d3d8df; --bs-btn-hover-color: var(--cm-text); }
.btn-soft { background: var(--cm-blue-50); color: var(--cm-blue); border: 0; }
.btn-soft:hover { background: var(--cm-blue); color: #fff; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .85rem; color: var(--cm-text); margin-bottom: .4rem; }
.form-control, .form-select { border-radius: 10px; border-color: var(--cm-border); min-height: 46px; padding: .6rem .85rem; font-size: .95rem; background-color: var(--cm-surface); color: var(--cm-text); }
.form-control:focus, .form-select:focus { border-color: var(--cm-blue); box-shadow: 0 0 0 4px rgba(10, 127, 230, .12); background-color: var(--cm-surface); color: var(--cm-text); }
.form-control::placeholder { color: var(--cm-text-3); }
.form-text { color: var(--cm-text-3); font-size: .8rem; }
.invalid-feedback { font-size: .8rem; font-weight: 500; }
.form-check-input { width: 1.15em; height: 1.15em; border-color: #c7cdd6; }
.form-check-input:checked { background-color: var(--cm-blue); border-color: var(--cm-blue); }
.input-group-text { background: var(--cm-surface-2); border-color: var(--cm-border); color: var(--cm-text-2); border-radius: 10px; font-weight: 600; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--cm-text-3); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-action { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--cm-text-3); padding: .4rem .55rem; border-radius: 8px; }
.input-action:hover { color: var(--cm-text); background: var(--cm-surface-2); }
.input-icon > .form-control.has-action { padding-right: 2.75rem; }
.amount-input { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; min-height: 60px; }
.network-badge { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; letter-spacing: .02em; }
.network-badge.mtn { background: #ffcb05; color: #1a1a1a; }
.network-badge.airtel { background: #e40000; color: #fff; }
.network-badge.unknown { background: var(--cm-red-50); color: var(--cm-red); }

/* Segmented control (e.g. Individual / Business) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--cm-surface-2); border: 1px solid var(--cm-border); padding: 4px; border-radius: 12px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { text-align: center; padding: .55rem .75rem; border-radius: 9px; font-weight: 600; font-size: .875rem; color: var(--cm-text-2); cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.segmented input:checked + label { background: var(--cm-surface); color: var(--cm-text); box-shadow: var(--cm-shadow); }
.segmented input:focus-visible + label { outline: 2px solid var(--cm-blue); }

/* ---------- Cards ---------- */
.card { --bs-card-border-color: var(--cm-border); --bs-card-border-radius: var(--cm-radius); --bs-card-bg: var(--cm-surface); --bs-card-cap-bg: transparent; box-shadow: var(--cm-shadow); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--cm-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.card-body { padding: 1.25rem; }

/* Balance cards */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-label { font-size: .8rem; font-weight: 600; color: var(--cm-text-2); display: flex; align-items: center; gap: .4rem; }
.stat-card .stat-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.stat-card .stat-value small { font-size: .9rem; font-weight: 600; color: var(--cm-text-3); margin-right: .25rem; letter-spacing: 0; }
.stat-card .stat-foot { font-size: .78rem; color: var(--cm-text-3); margin-top: .35rem; }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.stat-icon.blue { background: var(--cm-blue-50); color: var(--cm-blue); }
.stat-icon.green { background: var(--cm-green-50); color: var(--cm-green); }
.stat-icon.amber { background: var(--cm-amber-50); color: var(--cm-amber); }
.stat-icon.ink { background: var(--cm-surface-2); color: var(--cm-text); }

.balance-hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(63, 199, 58, .35) 0%, rgba(63, 199, 58, 0) 45%),
              linear-gradient(135deg, #0b0f14 0%, #10243a 55%, #0a5eab 100%);
  color: #fff; border: 0; border-radius: 18px;
}
.balance-hero .stat-label { color: rgba(255, 255, 255, .72); }
.balance-hero .stat-value { color: #fff; font-size: 2.1rem; }
.balance-hero .stat-value small { color: rgba(255, 255, 255, .6); }
.balance-hero .stat-foot { color: rgba(255, 255, 255, .6); }
.balance-hero .swoosh { position: absolute; right: -10px; bottom: -18px; width: 150px; opacity: .14; pointer-events: none; }

/* Quick actions */
.quick-action { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; border: 1px solid var(--cm-border); border-radius: var(--cm-radius); background: var(--cm-surface); color: var(--cm-text); transition: border-color .15s, transform .15s, box-shadow .15s; height: 100%; width: 100%; text-align: left; }
.quick-action:hover { border-color: rgba(10, 127, 230, .45); box-shadow: var(--cm-shadow-lg); transform: translateY(-1px); color: var(--cm-text); }
.quick-action .qa-title { font-weight: 700; font-size: .9rem; }
.quick-action .qa-sub { font-size: .78rem; color: var(--cm-text-3); }

/* Status pills - same colours everywhere */
.status { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-successful { background: var(--cm-green-50); color: var(--cm-green); }
.status-pending, .status-processing { background: var(--cm-amber-50); color: var(--cm-amber); }
.status-failed, .status-expired { background: var(--cm-red-50); color: var(--cm-red); }
.status-reversed, .status-unknown { background: var(--cm-surface-2); color: var(--cm-text-2); }
.status-live { background: var(--cm-green-50); color: var(--cm-green); }
.status-sandbox { background: var(--cm-amber-50); color: var(--cm-amber); }

/* Empty states */
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--cm-surface-2); border: 1px solid var(--cm-border); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--cm-text-3); margin-bottom: 1rem; }
.empty-state h6 { font-weight: 700; margin-bottom: .25rem; }
.empty-state p { color: var(--cm-text-3); font-size: .875rem; max-width: 340px; margin: 0 auto; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px dashed var(--cm-border); font-size: .875rem; font-weight: 500; }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd5dd; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; }
.checklist li.done .tick { background: var(--cm-green); border-color: var(--cm-green); color: #fff; }
.checklist li.done span.label { color: var(--cm-text-3); text-decoration: line-through; }
.progress { --bs-progress-bg: var(--cm-surface-2); --bs-progress-bar-bg: var(--cm-green); height: 6px; border-radius: 99px; }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--cm-sidebar-w); background: var(--cm-surface); border-right: 1px solid var(--cm-border); display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.sidebar-brand { height: var(--cm-topbar-h); display: flex; align-items: center; padding: 0 1.25rem; border-bottom: 1px solid var(--cm-border); }
.sidebar-brand img { height: 30px; width: auto; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; }
.nav-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cm-text-3); padding: 1rem .75rem .4rem; }
.nav-section:first-child { padding-top: 0; }
.nav-item-link { display: flex; align-items: center; gap: .75rem; padding: .58rem .75rem; border-radius: 10px; color: var(--cm-text-2); font-weight: 600; font-size: .875rem; transition: background .12s, color .12s; position: relative; }
.nav-item-link .bi { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-item-link:hover { background: var(--cm-surface-2); color: var(--cm-text); }
.nav-item-link.active { background: var(--cm-blue-50); color: var(--cm-blue); }
.nav-item-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cm-blue); }
.nav-item-link.is-soon { opacity: .62; }
.nav-item-link .soon { margin-left: auto; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--cm-surface-2); border: 1px solid var(--cm-border); color: var(--cm-text-3); padding: .08rem .4rem; border-radius: 6px; }
.sidebar-foot { padding: 1rem; border-top: 1px solid var(--cm-border); }
.mode-card { background: var(--cm-amber-50); border-radius: 12px; padding: .8rem .9rem; font-size: .8rem; color: var(--cm-text-2); }
.mode-card strong { color: var(--cm-amber); display: flex; align-items: center; gap: .35rem; }

.main { margin-left: var(--cm-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--cm-topbar-h); background: rgba(245, 247, 250, .85); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--cm-border); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; }
[data-bs-theme="dark"] .topbar { background: rgba(11, 15, 20, .85); }
.topbar .page-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--cm-border); background: var(--cm-surface); color: var(--cm-text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; position: relative; }
.icon-btn:hover { color: var(--cm-text); background: var(--cm-surface-2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--cm-red); border: 2px solid var(--cm-surface); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--cm-blue), var(--cm-green-bright)); color: #fff; font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--cm-border); background: var(--cm-surface); color: var(--cm-text); }
.user-chip .name { font-size: .82rem; font-weight: 700; line-height: 1.1; }
.user-chip .role { font-size: .7rem; color: var(--cm-text-3); }
.content { padding: 1.5rem 2rem; flex: 1; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--cm-text-2); }
.app-footer { padding: 1rem 1.5rem 1.5rem; font-size: .78rem; color: var(--cm-text-3); }

.sandbox-strip { background: repeating-linear-gradient(-45deg, #f59e0b, #f59e0b 10px, #fbbf24 10px, #fbbf24 20px); height: 3px; }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(11, 15, 20, .45); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .2s; }

/* Mobile bottom tab bar */
.tabbar { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--cm-shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; padding-bottom: 76px; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem; }
  .user-chip .who { display: none; }
  .user-chip { padding: .2rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--cm-surface); border-top: 1px solid var(--cm-border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--cm-text-3); padding: .35rem 0; border: 0; background: none; min-height: 52px; justify-content: center; }
  .tabbar .bi { font-size: 1.25rem; }
  .tabbar .active { color: var(--cm-blue); }
  .tabbar .tab-primary .bi { background: var(--cm-blue); color: #fff; width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: 0 6px 16px -4px rgba(10, 127, 230, .55); }
}

/* Responsive tables -> stacked cards on phones */
.table { --bs-table-bg: transparent; --bs-table-color: var(--cm-text); margin: 0; }
.table > thead th { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cm-text-3); border-bottom-color: var(--cm-border); padding: .75rem 1.25rem; white-space: nowrap; background: var(--cm-surface-2); }
.table > tbody td { padding: .9rem 1.25rem; border-color: var(--cm-border); vertical-align: middle; font-size: .875rem; }
.table > tbody tr:hover td { background: var(--cm-surface-2); }
@media (max-width: 767.98px) {
  .table-stack thead { display: none; }
  .table-stack tbody tr { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--cm-border); }
  .table-stack tbody td { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border: 0; }
  .table-stack tbody td::before { content: attr(data-label); font-size: .75rem; font-weight: 600; color: var(--cm-text-3); }
}

/* ---------- Admin shell (dark sidebar so staff always know where they are) ---------- */
.admin .sidebar { background: var(--cm-ink); border-right-color: #1b222c; }
.admin .sidebar-brand { border-bottom-color: #1b222c; }
.admin .nav-section { color: #5f6b7a; }
.admin .nav-item-link { color: #a3adba; }
.admin .nav-item-link:hover { background: #151c25; color: #fff; }
.admin .nav-item-link.active { background: rgba(10, 127, 230, .18); color: #fff; }
.admin .nav-item-link.active::before { background: var(--cm-green-bright); }
.admin .nav-item-link .soon { background: #151c25; border-color: #232c38; color: #6f7b8b; }
.admin .sidebar-foot { border-top-color: #1b222c; }
.admin-badge { font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cm-green-bright); border: 1px solid rgba(63, 199, 58, .35); padding: .1rem .45rem; border-radius: 6px; margin-left: .5rem; }

/* ---------- Auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--cm-surface); }
.auth-visual { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 2.5rem; background: #0b0f14 center/cover no-repeat; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 22, .55) 0%, rgba(8, 14, 22, .15) 30%, rgba(8, 14, 22, .7) 58%, rgba(8, 14, 22, .96) 100%); }
.auth-visual { background-position: center 20%; justify-content: flex-start; }
.auth-visual > div:nth-child(2) { margin-top: auto; }
.auth-visual .legal { margin-top: 1.75rem; }
.auth-visual > * { position: relative; }
.auth-visual .brand img { height: 34px; }
.auth-visual h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.35rem); font-weight: 800; line-height: 1.15; max-width: 520px; }
.auth-visual h2 .accent { color: var(--cm-green-bright); }
.auth-visual .lead-sm { color: rgba(255, 255, 255, .75); max-width: 480px; margin-top: .75rem; }
.auth-points { display: grid; gap: .75rem; margin-top: 1.75rem; max-width: 480px; }
.auth-points div { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; color: rgba(255, 255, 255, .88); }
.auth-points .bi { color: var(--cm-green-bright); font-size: 1.1rem; margin-top: 1px; }
.auth-visual .legal { font-size: .75rem; color: rgba(255, 255, 255, .5); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.25rem, 5vw, 4.5rem); }
.auth-form { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-form h1 { font-size: 1.65rem; font-weight: 800; }
.auth-form .sub { color: var(--cm-text-2); margin-bottom: 1.75rem; }
.auth-mobile-brand { display: none; }
.auth-mobile-brand img { height: 30px; width: auto; vertical-align: middle; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--cm-text-3); font-size: .75rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--cm-border); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .75rem; color: var(--cm-text-3); margin-top: 1.5rem; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-mobile-brand { display: block; margin-bottom: 2rem; }
  .auth-panel { justify-content: flex-start; padding-top: 2rem; }
}
.admin-auth .auth-panel { background: var(--cm-surface); }

/* ---------- Toastr (re-skinned to match) ---------- */
#toast-container > div { opacity: 1; border-radius: 12px; box-shadow: var(--cm-shadow-lg); padding: 14px 16px 14px 52px; width: 360px; max-width: calc(100vw - 24px); font-family: var(--bs-body-font-family); font-size: .875rem; background-position: 16px center; background-size: 22px; background-color: var(--cm-ink); color: #fff; border-left: 4px solid; }
#toast-container > div:hover { box-shadow: var(--cm-shadow-lg); }
#toast-container > .toast-success { border-left-color: var(--cm-green-bright); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%233fc73a'/%3E%3Cpath d='M7 12.5l3.2 3L17 9' stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
#toast-container > .toast-error { border-left-color: var(--cm-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23e5484d'/%3E%3Cpath d='M8.5 8.5l7 7M15.5 8.5l-7 7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") !important; }
#toast-container > .toast-warning { border-left-color: #f59e0b; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23f59e0b'/%3E%3Cpath d='M12 7v6' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.6' r='1.3' fill='%23fff'/%3E%3C/svg%3E") !important; }
#toast-container > .toast-info { border-left-color: var(--cm-blue); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%230a7fe6'/%3E%3Cpath d='M12 11v6' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='7.6' r='1.3' fill='%23fff'/%3E%3C/svg%3E") !important; }
#toast-container .toast-title { font-weight: 700; margin-bottom: 2px; }
#toast-container .toast-message { color: rgba(255, 255, 255, .85); line-height: 1.4; }
#toast-container .toast-progress { opacity: .5; height: 3px; background: rgba(255, 255, 255, .6); }
#toast-container .toast-close-button { opacity: .6; text-shadow: none; font-weight: 400; right: -.1em; top: -.2em; }
#toast-container.toast-top-right { top: 16px; right: 16px; }
@media (max-width: 575.98px) { #toast-container.toast-top-right { left: 12px; right: 12px; } #toast-container > div { width: 100%; } }

/* ---------- SweetAlert2 (re-skinned) ---------- */
.swal2-popup { border-radius: 18px !important; padding: 1.75rem 1.5rem 1.5rem !important; font-family: var(--bs-body-font-family) !important; background: var(--cm-surface) !important; color: var(--cm-text) !important; width: 28rem !important; }
.swal2-title { font-size: 1.25rem !important; font-weight: 800 !important; color: var(--cm-text) !important; letter-spacing: -.02em; }
.swal2-html-container { font-size: .925rem !important; color: var(--cm-text-2) !important; }
.swal2-actions { gap: .5rem; width: 100%; }
.swal2-actions .btn { flex: 1; }
.swal2-input { border-radius: 10px !important; border: 1px solid var(--cm-border) !important; box-shadow: none !important; font-size: 1.4rem !important; letter-spacing: .5em; text-align: center; font-weight: 700; margin: 1rem auto 0 !important; width: 100% !important; max-width: 260px; }
.swal2-input:focus { border-color: var(--cm-blue) !important; box-shadow: 0 0 0 4px rgba(10, 127, 230, .12) !important; }
.swal2-validation-message { background: var(--cm-red-50) !important; color: var(--cm-red) !important; border-radius: 10px; font-size: .85rem !important; }
.confirm-summary { text-align: left; border: 1px solid var(--cm-border); border-radius: 12px; overflow: hidden; margin-top: .75rem; }
.confirm-summary div { display: flex; justify-content: space-between; padding: .6rem .9rem; font-size: .875rem; }
.confirm-summary div + div { border-top: 1px solid var(--cm-border); }
.confirm-summary div span:first-child { color: var(--cm-text-3); }
.confirm-summary div span:last-child { color: var(--cm-text); font-weight: 600; }
.confirm-summary .total { background: var(--cm-surface-2); }
.confirm-summary .total span:last-child { font-weight: 800; }

/* ---------- Error page ---------- */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; text-align: center; }
.error-page .code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(135deg, var(--cm-ink), var(--cm-blue) 60%, var(--cm-green-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-bs-theme="dark"] .error-page .code { background: linear-gradient(135deg, #fff, var(--cm-blue) 60%, var(--cm-green-bright)); -webkit-background-clip: text; background-clip: text; }

/* Utilities */
.gap-row { row-gap: 1.25rem; }
.dev-note { border: 1px dashed var(--cm-border); border-radius: 12px; padding: .75rem 1rem; font-size: .8rem; color: var(--cm-text-3); background: var(--cm-surface-2); }
code { color: var(--cm-blue); }

/* Logo swap for dark theme */
.logo-for-dark { display: none !important; }
[data-bs-theme="dark"] .logo-for-light { display: none !important; }
[data-bs-theme="dark"] .logo-for-dark { display: inline-block !important; }

/* ---------- Large and high-resolution (IPS / 2K / 4K) monitors ----------
   Content always fills the width; on big screens everything scales up a little
   so cards and text don't look tiny. */
@media (min-width: 1680px) {
  :root { --cm-sidebar-w: 280px; }
  html { font-size: 17px; }
  .content { padding: 1.75rem 2.5rem; }
  .topbar { padding: 0 2.5rem; }
  .app-footer { padding: 1rem 2.5rem 1.5rem; }
}
@media (min-width: 2200px) {
  :root { --cm-sidebar-w: 300px; --cm-topbar-h: 72px; }
  html { font-size: 19px; }
  .content { padding: 2rem 3rem; }
}
@media (min-width: 3000px) {
  html { font-size: 22px; }
}

/* Business switcher (sidebar) */
.biz-switch { width: 100%; display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border: 1px solid var(--cm-border); border-radius: 12px; background: var(--cm-surface); color: var(--cm-text); font-size: .82rem; line-height: 1.25; }
.biz-switch:hover { background: var(--cm-surface-2); }
.biz-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; background: var(--cm-ink); color: #fff; font-weight: 700; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; }
[data-bs-theme="dark"] .biz-icon { background: var(--cm-blue); }

/* Settings tabs */
.settings-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--cm-border); margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.settings-tabs a { padding: .7rem 1rem; font-weight: 600; font-size: .875rem; color: var(--cm-text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.settings-tabs a:hover { color: var(--cm-text); }
.settings-tabs a.active { color: var(--cm-blue); border-bottom-color: var(--cm-blue); }
.setting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--cm-border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row h3 { font-size: .95rem; margin: 0 0 .2rem; }
.setting-row p { margin: 0; color: var(--cm-text-3); font-size: .85rem; max-width: 560px; }
.verified-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; color: var(--cm-green); }
.unverified-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; color: var(--cm-amber); }

/* Recovery codes + QR */
.codes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; padding: 1rem; background: var(--cm-surface-2); border: 1px dashed var(--cm-border); border-radius: 12px; }
.codes-grid code { font-size: .95rem; font-weight: 700; color: var(--cm-text); letter-spacing: .08em; text-align: center; padding: .35rem; background: var(--cm-surface); border-radius: 8px; }
.qr-box { width: 208px; height: 208px; padding: 12px; background: #fff; border: 1px solid var(--cm-border); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.qr-box svg { width: 100%; height: 100%; }
.secret-key { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; font-weight: 700; letter-spacing: .12em; word-break: break-all; background: var(--cm-surface-2); border: 1px solid var(--cm-border); border-radius: 10px; padding: .6rem .8rem; }
.otp-input { font-size: 1.6rem; font-weight: 800; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--cm-blue-50); color: var(--cm-blue); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Session list */
.session-item { display: flex; align-items: center; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--cm-border); }
.session-item:last-child { border-bottom: 0; }
.session-item .stat-icon { width: 38px; height: 38px; }

/* Verify screen status rows */
.verify-row { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--cm-border); border-radius: 14px; margin-bottom: .75rem; }
.verify-row.done { background: var(--cm-green-50); border-color: transparent; }

/* Dev mailbox */
.mailbox { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 1rem; min-height: calc(100vh - 220px); }
.mailbox-list { overflow-y: auto; max-height: calc(100vh - 220px); }
.mailbox-list a { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--cm-border); color: var(--cm-text); }
.mailbox-list a.active, .mailbox-list a:hover { background: var(--cm-blue-50); }
.mailbox iframe { width: 100%; height: 100%; min-height: 560px; border: 0; background: #fff; border-radius: 0 0 var(--cm-radius) var(--cm-radius); }
@media (max-width: 991.98px) { .mailbox { grid-template-columns: 1fr; } .mailbox-list { max-height: 320px; } }

.checklist a { color: inherit; }
.checklist a:hover .label { color: var(--cm-blue); }

/* Password strength bars */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength span { height: 4px; border-radius: 4px; background: var(--cm-border); transition: background .2s; }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--cm-red); }
.strength[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-score="3"] span:nth-child(-n+3) { background: var(--cm-blue); }
.strength[data-score="4"] span { background: var(--cm-green); }
.role-option { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--cm-border); border-radius: 12px; margin-bottom: .5rem; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--cm-blue); background: var(--cm-blue-50); }
.role-option input { margin-top: .2rem; flex: none; }

/* ---------- Phase 2: products, terms, KYC ---------- */
.product-card { color: var(--cm-text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.product-card:hover { border-color: rgba(10, 127, 230, .45); box-shadow: var(--cm-shadow-lg); transform: translateY(-2px); color: var(--cm-text); }
.product-card.is-soon { opacity: .75; }
.terms-box { max-height: 440px; overflow-y: auto; padding: 1rem 1.15rem; border: 1px solid var(--cm-border); border-radius: 12px; background: var(--cm-surface-2); }
.doc { font-size: .925rem; line-height: 1.65; }
.doc h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
.doc h3 { font-size: 1rem; margin: 1.25rem 0 .4rem; }
.doc h4 { font-size: .95rem; margin: 1rem 0 .3rem; }
.doc ul { padding-left: 1.2rem; margin-bottom: .75rem; }
.doc li { margin-bottom: .25rem; }
.doc-note { background: var(--cm-amber-50); color: var(--cm-amber); border-radius: 10px; padding: .6rem .85rem; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--cm-border); border-radius: 12px; margin-bottom: .6rem; font-size: .875rem; cursor: pointer; }
.consent:has(input:checked) { border-color: var(--cm-blue); background: var(--cm-blue-50); }
.consent.is-invalid { border-color: var(--cm-red); }
.consent input { flex: none; margin-top: .15rem; }
.fw-800 { font-weight: 800; }
.min-w-0 { min-width: 0; }
.kyc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.kyc-steps div { display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; border-radius: 12px; background: var(--cm-surface); border: 1px solid var(--cm-border); font-size: .82rem; font-weight: 600; color: var(--cm-text-3); }
.kyc-steps span { width: 24px; height: 24px; border-radius: 50%; background: var(--cm-surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; flex: none; }
.kyc-steps .on { color: var(--cm-text); border-color: rgba(10, 127, 230, .35); }
.kyc-steps .on span { background: var(--cm-blue); color: #fff; }
@media (max-width: 575.98px) { .kyc-steps { grid-template-columns: 1fr; } }
.doc-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--cm-border); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .stat-icon { width: 38px; height: 38px; flex: none; }

/* ---------- Phase 3: payments ---------- */
/* Live "waiting for approval" card on a transaction */
.waiting-card { border-color: rgba(10, 127, 230, .35); background: var(--cm-blue-50); }

/* Status timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: .42rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--cm-border); }
.timeline li { position: relative; padding-bottom: 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -1.2rem; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--cm-surface); border: 2px solid var(--cm-text-3); }
.timeline li.status-successful::before { border-color: var(--cm-green); background: var(--cm-green); }
.timeline li.status-failed::before, .timeline li.status-expired::before { border-color: var(--cm-red); background: var(--cm-red); }
.timeline li.status-processing::before, .timeline li.status-pending::before, .timeline li.status-unknown::before { border-color: var(--cm-amber); }

/* Code samples and API docs */
.code-block { background: #0b0f14; color: #e6edf3; border-radius: 12px; padding: 1rem 1.1rem; font-size: .8rem; line-height: 1.55; overflow-x: auto; white-space: pre; margin: .5rem 0 1.25rem; }
.api-doc h2 { margin-top: 1.75rem; padding-top: .5rem; border-top: 1px solid var(--cm-border); }
.api-doc h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.api-doc table { font-size: .85rem; }
.docs-nav { position: sticky; top: calc(var(--cm-topbar-h) + 1rem); }
.docs-nav a { display: block; padding: .3rem 0; color: var(--cm-text-2); }
.docs-nav a:hover { color: var(--cm-blue); }

/* Hosted checkout (customer-facing) */
.checkout-body { background: radial-gradient(120% 80% at 50% 0%, var(--cm-blue-50) 0%, var(--cm-bg) 60%); min-height: 100vh; }
.checkout-sandbox { background: var(--cm-amber-50); color: var(--cm-amber); text-align: center; font-size: .8rem; font-weight: 700; padding: .45rem 1rem; }
.checkout-wrap { max-width: 440px; margin: 0 auto; padding: 2rem 1rem 1.5rem; }
.checkout-card { padding: 1.5rem; border-radius: 20px; box-shadow: var(--cm-shadow-lg); }
.checkout-merchant { display: flex; align-items: center; gap: .8rem; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--cm-border); }
.checkout-item { margin-bottom: 1.25rem; }
.checkout-amount { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.checkout-foot { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.25rem; font-size: .75rem; color: var(--cm-text-3); }
.checkout-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.9rem; }
.checkout-icon.ok { background: var(--cm-green-50); color: var(--cm-green); }
.checkout-icon.bad { background: var(--cm-red-50); color: var(--cm-red); }
.checkout-pulse { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--cm-blue-50); color: var(--cm-blue); display: flex; align-items: center; justify-content: center; font-size: 2rem; animation: cm-pulse 1.6s ease-in-out infinite; }
@keyframes cm-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10, 127, 230, .35); } 50% { box-shadow: 0 0 0 16px rgba(10, 127, 230, 0); } }
@media (prefers-reduced-motion: reduce) { .checkout-pulse { animation: none; } }

/* Phase 4: payouts */
.table-row-invalid td { background: color-mix(in srgb, var(--cm-red, #d63b3b) 6%, transparent); }
[data-save-beneficiary][hidden] { display: none !important; }

/* Developers: live / test mode switch */
.dev-mode-switch { display: inline-flex; background: var(--cm-surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.dev-mode-switch button { border: 0; background: transparent; padding: .4rem .8rem; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--cm-text-3, #6b7280); }
.dev-mode-switch button.active { background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.dev-mode-switch button.active.test { background: #fff4dd; color: #92400e; }
[data-bs-theme="dark"] .dev-mode-switch button.active.test { background: #3a2a0c; color: #fbbf24; }
.network-notice { display: flex; gap: .6rem; align-items: flex-start; background: var(--cm-amber-50); color: var(--cm-amber); border-radius: 10px; padding: .65rem .85rem; font-size: .875rem; font-weight: 600; margin-bottom: .75rem; }

/* API docs */
.docs-nav-group { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cm-text-3, #8a94a6); margin: .9rem 0 .2rem; }
.docs-nav-group:first-child { margin-top: 0; }
.api-doc h2 { scroll-margin-top: calc(var(--cm-topbar-h, 64px) + 1rem); }
.api-doc h3 { margin-top: 1.5rem; scroll-margin-top: calc(var(--cm-topbar-h, 64px) + 1rem); }
.api-method { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: .15rem .45rem; border-radius: 6px; vertical-align: middle; }
.api-method.post { background: #e6f6e5; color: #1f7a1b; }
.api-method.get { background: #e6f1fd; color: #0a66b8; }
.code-tabs { margin: .5rem 0 1.25rem; border-radius: 12px; overflow: hidden; background: #0b0f14; }
.code-tabs-nav { display: flex; gap: 2px; align-items: center; padding: .35rem .4rem 0; background: #121821; }
.code-tabs-nav button { border: 0; background: transparent; color: #8b98a9; font-size: .78rem; font-weight: 600; padding: .4rem .7rem; border-radius: 8px 8px 0 0; }
.code-tabs-nav button.active { background: #0b0f14; color: #e6edf3; }
.code-tabs-nav .code-copy { margin-left: auto; border-radius: 8px; }
.code-tabs-nav .code-copy:hover { color: #e6edf3; }
.code-tabs .code-block { margin: 0; border-radius: 0; }

/* Registered-name lookup under phone fields */
.name-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .45rem; padding: .5rem .7rem; border-radius: 10px; font-size: .875rem; font-weight: 600; }
.name-lookup small { flex-basis: 100%; margin-left: 1.4rem; font-weight: 500; opacity: .8; }
.name-lookup.is-found { background: var(--cm-green-50); color: #1f7d1b; }
.name-lookup.is-missing { background: var(--cm-amber-50); color: var(--cm-amber); }
.name-lookup.is-loading, .name-lookup.is-muted { background: var(--cm-surface-2, rgba(127,127,127,.08)); color: var(--cm-text-2, inherit); font-weight: 500; }

/* Two-step method choice */
.method-card { display: flex; gap: .75rem; align-items: flex-start; border: 1.5px solid var(--cm-border, #e5e7eb); border-radius: 12px; padding: 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.method-card:hover { border-color: var(--cm-blue); }
.method-card:has(input:checked) { border-color: var(--cm-blue); background: var(--cm-blue-50, rgba(37,99,235,.06)); }
.method-card .form-check-input { margin-top: .2rem; flex-shrink: 0; }

/* Branded checkout: --brand comes from the business colour or the link's accent (inline style on the page). */
.checkout-body[style*="--brand"] .btn-primary,
.brand-preview[style*="--brand"] .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.checkout-body[style*="--brand"] .btn-primary:hover { filter: brightness(.94); background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.checkout-body[style*="--brand"] { background: radial-gradient(120% 80% at 50% 0%, var(--brand-soft) 0%, var(--cm-bg) 60%); }
.checkout-body[style*="--brand"] .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem var(--brand-soft); }
.checkout-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--cm-border); flex: none; }
.checkout-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; background: var(--brand, var(--cm-blue)); color: var(--brand-ink, #fff); border: 0; }
.checkout-banner { display: block; width: calc(100% + 3rem); max-width: none; margin: -1.5rem -1.5rem 1.25rem; border-radius: 20px 20px 0 0; aspect-ratio: 3 / 1; object-fit: cover; }
.checkout-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.checkout-chips button { border: 1px solid var(--cm-border); background: var(--cm-surface, #fff); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout-chips button.active, .checkout-chips button:hover { border-color: var(--brand, var(--cm-blue)); color: var(--brand, var(--cm-blue)); }
.checkout-support { font-size: .8rem; color: var(--cm-text-2); text-align: center; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--cm-border); }
.checkout-support a { color: inherit; }
.brand-preview { border-radius: 0 0 16px 16px; }
.brand-logo-preview { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; border: 1px solid var(--cm-border); background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.biz-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }
.checkout-thanks { background: var(--brand-soft, var(--cm-blue-50)); border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; margin-top: .75rem; }
.checkout-foot a { display: inline-flex; }

/* ---- Checkout v2 (payment links) ---- */
.checkout-card { padding: 0; overflow: hidden; border: 0; }
.co-hero { height: 84px; background: linear-gradient(135deg, var(--brand, var(--cm-blue)) 0%, color-mix(in srgb, var(--brand, var(--cm-blue)) 65%, #000) 100%); position: relative; }
.co-hero.has-banner { height: auto; aspect-ratio: 3 / 1; background: var(--cm-surface-2); }
.co-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-merchant { display: flex; align-items: flex-end; gap: .75rem; padding: 0 1.5rem; margin-top: -26px; position: relative; }
.co-logo { width: 60px; height: 60px; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .12); font-size: 1.05rem; }
.co-merchant-name { font-size: 1.02rem; padding-top: 30px; }
.co-verified { color: var(--brand, var(--cm-blue)); font-size: .95rem; }
.co-body { padding: 1.1rem 1.5rem 1.5rem; }
.co-item { padding-bottom: 1.1rem; margin-bottom: 1.2rem; border-bottom: 1px dashed var(--cm-border); }
.co-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.co-desc { color: var(--cm-text-2); font-size: .9rem; margin: .35rem 0 0; }
.co-optional { font-weight: 500; color: var(--cm-text-3); font-size: .78rem; margin-left: .25rem; }
.co-amount-input { display: flex; align-items: center; gap: .5rem; border: 1.5px solid var(--cm-border); border-radius: 14px; padding: .55rem .9rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.co-amount-input:focus-within { border-color: var(--brand, var(--cm-blue)); box-shadow: 0 0 0 .2rem var(--brand-soft, rgba(10, 127, 230, .12)); }
.co-amount-input span { font-weight: 700; color: var(--cm-text-3); }
.co-amount-input input { border: 0; outline: 0; width: 100%; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: transparent; min-width: 0; }
.co-amount-input.is-invalid, .co-amount-input:has(input.is-invalid) { border-color: var(--bs-danger); }
.co-networks { display: flex; gap: .4rem; margin-top: .45rem; }
.co-net { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; }
.co-net.mtn { background: #ffcc00; color: #1a1a1a; }
.co-net.airtel { background: #e40000; color: #fff; }
.co-pay { border-radius: 14px; font-weight: 700; padding: .85rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.co-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 0; margin: 1rem 0 .75rem; }
.co-steps li { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; font-size: .72rem; color: var(--cm-text-2); }
.co-steps i { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft, var(--cm-blue-50)); color: var(--brand, var(--cm-blue)); font-size: .95rem; }
.checkout-support { margin: 0; padding: .9rem 1.5rem; background: var(--cm-surface-2); display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .5rem; }
.checkout-support .sep, .cb-contacts .sep { color: var(--cm-text-3); margin: 0 .15rem; }
.checkout-support a, .cb-contacts a { color: var(--cm-text-2); text-decoration: none; }
.checkout-wrap { max-width: 460px; }
.choice-card { display: flex; gap: .7rem; align-items: flex-start; border: 1.5px solid var(--cm-border); border-radius: 12px; padding: .8rem .9rem; cursor: pointer; }
.choice-card.active, .choice-card:has(input:checked) { border-color: var(--cm-blue); background: var(--cm-blue-50); }
.choice-card input { margin-top: .2rem; flex: none; }

/* ---- Contribution page ---- */
.contrib-body { background: var(--cm-bg); }
.cb-top { background: #fff; border-bottom: 1px solid var(--cm-border); position: sticky; top: 0; z-index: 10; }
.cb-top-inner { max-width: 1080px; margin: 0 auto; padding: .6rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.cb-wrap { max-width: 1080px; margin: 0 auto; padding: 1.25rem 1rem 1rem; }
.cb-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; grid-template-areas: "head" "side" "body"; }
.cb-head { grid-area: head; min-width: 0; }
.cb-side { grid-area: side; min-width: 0; }
.cb-body { grid-area: body; min-width: 0; }
@media (min-width: 992px) {
  .cb-grid { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "head side" "body side"; align-items: start; }
  .cb-side { position: sticky; top: 76px; }
}
.cb-cover { border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 8; background: var(--cm-surface-2); }
.cb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-cover-empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand, var(--cm-blue)), color-mix(in srgb, var(--brand, var(--cm-blue)) 55%, #000)); color: rgba(255, 255, 255, .9); font-size: 4rem; aspect-ratio: 16 / 6; }
.cb-cat { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; background: var(--brand-soft, var(--cm-blue-50)); color: var(--brand, var(--cm-blue)); }
.cb-title { font-size: clamp(1.45rem, 3.6vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: .6rem 0 .4rem; }
.cb-organiser { color: var(--cm-text-2); font-size: .9rem; }
.cb-card { padding: 1.4rem; border-radius: 20px; border: 0; box-shadow: var(--cm-shadow-lg); }
.cb-raised { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cb-of { color: var(--cm-text-2); font-size: .9rem; margin-bottom: .8rem; }
.cb-progress { height: 10px; border-radius: 999px; background: var(--cm-surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--cm-border); }
.cb-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand, var(--cm-blue)), color-mix(in srgb, var(--brand, var(--cm-blue)) 70%, #22c55e)); transition: width .6s ease; }
.cb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0 1.2rem; text-align: center; }
.cb-stats div { background: var(--cm-surface-2); border-radius: 12px; padding: .55rem .25rem; }
.cb-stats strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cb-stats span { font-size: .72rem; color: var(--cm-text-3); }
.cb-closed { background: var(--cm-surface-2); border-radius: 12px; padding: .9rem 1rem; font-weight: 600; text-align: center; margin-bottom: 1rem; }
.cb-share { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--cm-border); }
.cb-section { padding: 1.3rem 1.4rem; border-radius: 20px; border: 0; box-shadow: var(--cm-shadow); margin-bottom: 1.25rem; }
.cb-h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .75rem; }
.cb-story { color: var(--cm-text-2); line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.cb-list { list-style: none; padding: 0; margin: 0; }
.cb-list li { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--cm-border); }
.cb-list li:last-child { border-bottom: 0; }
.cb-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; background: var(--brand-soft, var(--cm-blue-50)); color: var(--brand, var(--cm-blue)); }
.cb-avatar.anon { background: var(--cm-surface-2); color: var(--cm-text-3); }
.cb-msg { font-size: .88rem; color: var(--cm-text-2); margin: .15rem 0; overflow-wrap: anywhere; }
.contrib-body .checkout-foot { flex-wrap: wrap; }

/* Merchant: contributions and link stats */
.contrib-tile { border-radius: 16px; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.contrib-tile .cover { aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--cm-blue), #0b3b7a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.contrib-tile .cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.mini-bars span { flex: 1; background: var(--cm-blue-50); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.mini-bars span.has { background: var(--cm-blue); }

/* Install the app (login page) */
.pwa-install { display: flex; align-items: center; gap: .8rem; margin-top: 1.25rem; padding: .85rem 1rem; border: 1px solid var(--cm-border); border-radius: 14px; background: var(--cm-surface-2); }
.pwa-install[hidden] { display: none; }
.pwa-install-icon img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 2px 8px rgba(15, 23, 42, .1); }

/* Notifications */
.notif-table td, .notif-table th { vertical-align: middle; }
.notif-table th:not(:first-child), .notif-table td:not(:first-child) { width: 76px; }
.notif-check { width: 1.25rem; height: 1.25rem; cursor: pointer; }
.notif-off { font-size: .72rem; font-weight: 700; color: var(--cm-text-3); background: var(--cm-surface-2); padding: .15rem .45rem; border-radius: 6px; }
.notif-threshold { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; font-size: .8rem; color: var(--cm-text-2); flex-wrap: wrap; }
.notif-threshold .input-group { max-width: 180px; }
.notif-group td { background: var(--cm-surface-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cm-text-3); }
.sms-balance { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.sms-history li { padding: .7rem 1.25rem; border-bottom: 1px solid var(--cm-border); }
.sms-history li:last-child { border-bottom: 0; }

/* Mobile action sheets (Pay / Get paid) */
.action-sheet.offcanvas-bottom { height: auto; max-height: 85vh; border-radius: 22px 22px 0 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
.action-sheet .offcanvas-header { padding: 1rem 1.25rem .5rem; }
.action-sheet .offcanvas-header::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--cm-border); }
.sheet-item { display: flex; align-items: center; gap: .85rem; width: 100%; padding: .75rem .25rem; border: 0; border-bottom: 1px solid var(--cm-border); background: none; color: inherit; text-decoration: none; }
.sheet-item:last-child { border-bottom: 0; }
.sheet-item .stat-icon { flex: none; }
.tabbar .tab-primary { color: var(--cm-blue); }
