/* Spindle SMS design system (Spindle Software colours). Plain CSS, no framework and no build step: the shared host serves public/ as is,
   and App\Support\Asset versions the URL so the CDN picks up changes straight away.

   Sections: tokens · base · utilities · buttons · forms · badges · cards · tables · alerts · app shell · page
   parts (dashboard, compose, messages, payments…) · public site · iPhone mockup. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────────────────────────────────────────────────────────── */
:root {
    --brand: #1548a8;
    --brand-hover: #10398a;
    --brand-strong: #0d2f73;
    --brand-soft: #e9effb;
    --brand-soft-2: #d3dff6;
    --copper: #d9711a;
    --copper-soft: #fdf1e6;

    --ink: #0f1f3d;
    --text: #1b2130;
    --muted: #5b6475;
    --faint: #8a93a3;

    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --border: #e3e7ee;
    --border-strong: #cfd6e1;

    --success: #11784a; --success-soft: #e7f5ed;
    --warning: #955800; --warning-soft: #fff3de;
    --danger: #b42318;  --danger-soft: #fdeceb;
    --info: #1d5fc9;    --info-soft: #eaf1fd;
    --neutral: #475066; --neutral-soft: #eef1f6;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-xs: 0 1px 2px rgb(15 31 61 / .05);
    --shadow-sm: 0 1px 3px rgb(15 31 61 / .07), 0 1px 2px rgb(15 31 61 / .04);
    --shadow-lg: 0 16px 40px -12px rgb(15 31 61 / .22), 0 4px 10px -4px rgb(15 31 61 / .08);
    --ring: 0 0 0 3px rgb(21 72 168 / .18);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --sidebar-w: 248px;
    --topbar-h: 60px;
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--surface);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 2px; }
img, svg { vertical-align: middle; }
code, pre, kbd { font-family: var(--mono); font-size: .875em; }
code { background: var(--neutral-soft); color: var(--ink); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft-2); }

/* ── Utilities (kept small on purpose) ─────────────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ink { color: var(--ink); }
.small { font-size: .8125rem; }
.xsmall { font-size: .75rem; }
.strong { font-weight: 600; color: var(--ink); }
.mono { font-family: var(--mono); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.center { text-align: center; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.stack-sm { display: flex; flex-direction: column; gap: .5rem; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cluster-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.list-dots { padding-left: 1.1rem; display: grid; gap: .3rem; }

/* Page grids: main + side column, split forms, stat rows */
.grid-main { display: grid; gap: 1.5rem; align-items: start; }
.grid-split { display: grid; gap: 1.5rem; align-items: start; }
.grid-2 { display: grid; gap: 1.5rem; align-items: start; }
.grid-stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
@media (min-width: 1200px) { .grid-main { grid-template-columns: minmax(0, 1fr) 340px; } }

/* ── Buttons ────────────────────────────────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 38px; padding: 0 .95rem;
    border: 1px solid transparent; border-radius: var(--radius); font-size: .875rem; font-weight: 600; line-height: 1;
    white-space: nowrap; cursor: pointer; text-decoration: none !important; user-select: none;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-xs), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: #b9c0cc; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--neutral-soft); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f0c6c2; box-shadow: var(--shadow-xs); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #e9aaa4; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #9a1e15; color: #fff; }
.btn-accent { background: var(--copper); color: #fff; }
.btn-accent:hover { background: #c1620f; color: #fff; }
.btn-sm { height: 32px; padding: 0 .7rem; font-size: .8125rem; border-radius: 7px; }
.btn-lg { height: 46px; padding: 0 1.25rem; font-size: .9375rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn svg { flex: none; }
.spinner { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
    display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ──────────────────────────────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field + .field, .field + .check, .check + .field { margin-top: 1rem; }
.label { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.label-row a { font-size: .8125rem; font-weight: 500; }
.input { display: block; width: 100%; min-height: 40px; padding: .55rem .75rem; font: inherit; font-size: .9375rem; line-height: 1.4;
    color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; appearance: none; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: #b9c0cc; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[readonly] { background: var(--surface-2); }
textarea.input { resize: vertical; min-height: 84px; }
select.input { padding-right: 2.25rem; cursor: pointer;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2366726d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E") right .7rem center / 14px no-repeat; }
input[type=file].input { padding: .4rem; font-size: .875rem; }
input[type=file].input::file-selector-button { font: inherit; font-weight: 600; margin-right: .75rem; padding: .35rem .7rem; border: 1px solid var(--border-strong);
    border-radius: 6px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.input-lg { min-height: 48px; font-size: 1.0625rem; }
.input-sm { min-height: 32px; padding: .3rem .6rem; font-size: .8125rem; }
.input.mono { font-family: var(--mono); font-size: .875rem; }
.input.is-invalid, .input-group.is-invalid .input { border-color: var(--danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px rgb(180 35 24 / .15); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.input-group .btn { height: auto; border-radius: 0; border-color: var(--border-strong); margin-left: -1px; box-shadow: none; }
.input-group .btn:last-child { border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.help { font-size: .8125rem; color: var(--muted); }
.field-error { font-size: .8125rem; font-weight: 500; color: var(--danger); display: none; }
.is-invalid ~ .field-error, .input-group.is-invalid ~ .field-error, .field-error.is-shown { display: block; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .875rem; color: var(--text); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: .15rem 0 0; flex: none; accent-color: var(--brand); cursor: pointer; }
.check input.is-invalid { outline: 2px solid var(--danger); outline-offset: 1px; }
.rules { list-style: none; margin-top: .6rem; display: grid; gap: .3rem; font-size: .8125rem; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: .45rem; }
.rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.rules li.is-met { color: var(--success); }
.rules li.is-met::before { border-color: var(--success);
    background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/10px no-repeat; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.25rem; }

/* ── Badges ─────────────────────────────────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .35rem; height: 22px; padding: 0 .55rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.badge::before { display: none; }
.badge-plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px;
    background: var(--danger); color: #fff; font-size: .6875rem; font-weight: 700; }

/* ── Cards ──────────────────────────────────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: .9375rem; font-weight: 650; }
.card-head p { font-size: .8125rem; color: var(--muted); }
.card-head > a { font-size: .8125rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-section + .card-section { border-top: 1px solid var(--border); }
.card-flush { overflow: hidden; }

/* Stat tiles */
.stat { padding: 1.1rem 1.25rem; }
.stat-label { display: flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.stat-label svg { color: var(--faint); }
.stat-value { margin-top: .35rem; font-size: 1.75rem; font-weight: 700; letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-meta { margin-top: .2rem; font-size: .8125rem; color: var(--muted); }
.stat-value.is-bad { font-size: 1rem; color: var(--danger); letter-spacing: 0; padding-top: .5rem; }
a.card.stat { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.card.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.stat.is-alert { border-color: #f6dcaa; background: linear-gradient(var(--warning-soft), var(--surface) 70%); }

/* Key/value rows */
.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--border); font-size: .875rem; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* Simple rows (sender IDs on Home) */
.rows { list-style: none; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1.25rem; border-top: 1px solid var(--border); font-size: .875rem; }
.rows li:first-child { border-top: 0; }

/* Empty states */
.empty { padding: 2.75rem 1.5rem; text-align: center; }
.empty-icon { width: 44px; height: 44px; margin: 0 auto .9rem; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.empty h2, .empty h3 { font-size: .9375rem; font-weight: 650; }
.empty p { margin: .3rem auto 0; max-width: 42ch; font-size: .875rem; color: var(--muted); }
.empty .btn { margin-top: 1rem; }

/* ── Tables ─────────────────────────────────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { padding: .6rem 1.25rem; text-align: left; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--surface-2);
    border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfd; }
.table .num { text-align: right; }
.table td.strong { color: var(--ink); }
.table .cell-sub { display: block; font-size: .8125rem; color: var(--muted); margin-top: .1rem; }
.table-compact td { padding: .55rem 1.25rem; }
.table .row-detail td { background: var(--surface-2); padding-top: 0; }
.table pre { margin: 0; padding: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); white-space: pre-wrap; word-break: break-all; font-size: .75rem; }
.table-scroll { max-height: 320px; overflow-y: auto; }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; font-size: .8125rem; color: var(--muted); }
.pager-links { display: flex; gap: .25rem; }
.pager-links a, .pager-links span { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 .55rem; border-radius: 7px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; }
.pager-links a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pager-links .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager-links .is-disabled { color: var(--faint); background: var(--surface-2); }
.pager-links .is-gap { border-color: transparent; background: none; }

/* ── Alerts ─────────────────────────────────────────────────────────────────────────────────────────────── */
.alert { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid transparent;
    font-size: .875rem; line-height: 1.5; background: var(--neutral-soft); color: var(--text); }
.alert-body { flex: 1 1 260px; min-width: 0; }
.alert strong { color: inherit; }
.alert a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; }
.alert-success { background: var(--success-soft); color: #0c5a37; border-color: #c9d7f4; }
.alert-warning { background: var(--warning-soft); color: #7a4700; border-color: #f6dcaa; }
.alert-danger { background: var(--danger-soft); color: #8f1c13; border-color: #f4c5c1; }
.alert-info { background: var(--info-soft); color: #174a9c; border-color: #c9dbf8; }
.flash { margin-bottom: 1.25rem; }

/* Segmented tabs (filters) */
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--neutral-soft); }
.tabs a { padding: .3rem .8rem; border-radius: 7px; font-size: .8125rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Filter bar above admin tables */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.filters .input { width: auto; min-width: 220px; min-height: 36px; padding-top: .4rem; padding-bottom: .4rem; font-size: .875rem; }
.filters .btn { height: 36px; }

/* Collapsible (<details>) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ── App shell: sidebar, top bar, content, phone tab bar ───────────────────────────────────────────────── */
.et-shell { background: var(--bg); min-height: 100vh; }
.et-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-w); display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--border); padding: 1rem .75rem; overflow-y: auto; }
.et-main { min-width: 0; }
@media (min-width: 1024px) { .et-main { margin-left: var(--sidebar-w); } }
@media (max-width: 1023.98px) { .et-sidebar.is-desktop { display: none; } }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .9375rem; color: var(--ink); letter-spacing: -.01em; text-decoration: none !important; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; display: block; border-radius: 8px; }
.brand-mark svg { width: 17px; height: 17px; }
.et-sidebar .brand { padding: .25rem .6rem 1.25rem; }

.nav-group + .nav-group { margin-top: 1.25rem; }
.nav-title { padding: 0 .65rem .4rem; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nav-list { list-style: none; display: grid; gap: 1px; }
.nav-list a, .nav-list button { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .5rem .65rem; border: 0; border-radius: 7px;
    background: none; font-size: .875rem; font-weight: 500; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; }
.nav-list a svg, .nav-list button svg { color: var(--faint); flex: none; transition: color .15s; }
.nav-list a:hover, .nav-list button:hover { background: var(--neutral-soft); color: var(--ink); text-decoration: none; }
.nav-list a:hover svg, .nav-list button:hover svg { color: var(--muted); }
.nav-list a.is-active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.nav-list a.is-active svg { color: var(--brand); }
.nav-list .count { margin-left: auto; }
.nav-foot { margin-top: auto; padding-top: 1rem; }
.nav-account { display: flex; align-items: center; gap: .6rem; padding: .75rem .65rem .25rem; margin-top: .75rem; border-top: 1px solid var(--border); min-width: 0; }
.nav-account-text { min-width: 0; line-height: 1.3; }
.nav-account-text strong { display: block; font-size: .8125rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-text span { display: block; font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong);
    font-size: .8125rem; font-weight: 700; }

.et-topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
    background: rgb(244 246 249 / .85); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .et-topbar { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .et-topbar { padding: 0 2rem; } .et-topbar .brand { display: none; } }
.et-topbar-title { font-size: .875rem; font-weight: 600; color: var(--muted); }
@media (max-width: 1023.98px) { .et-topbar-title { display: none; } }
.et-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.et-balance { display: inline-flex; align-items: center; gap: .4rem; height: 34px; padding: 0 .8rem; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); font-size: .8125rem; color: var(--muted); text-decoration: none !important; box-shadow: var(--shadow-xs); }
.et-balance strong { color: var(--ink); font-variant-numeric: tabular-nums; }


.et-balance:hover { border-color: var(--border-strong); color: var(--text); }
@media (max-width: 639.98px) { .hide-sm { display: none !important; } }

.et-content { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1rem 6rem; }
@media (min-width: 640px) { .et-content { padding: 2rem 1.5rem 6rem; } }
@media (min-width: 1024px) { .et-content { padding: 2rem 2rem 3rem; } }

/* Dropdown menu (<details class="menu">) */
.menu { position: relative; }
.menu > summary { display: block; border-radius: 50%; }
.menu > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 240px; padding: .35rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop .12s ease-out; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 6px; background: none;
    font-size: .875rem; color: var(--text); text-align: left; cursor: pointer; text-decoration: none !important; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--neutral-soft); color: var(--ink); }
.menu-panel svg { color: var(--faint); }
.menu-head { padding: .5rem .6rem .6rem; font-size: .8125rem; line-height: 1.35; }
.menu-head strong { display: block; color: var(--ink); }
.menu-head span { color: var(--muted); overflow-wrap: anywhere; }
.menu-sep { height: 1px; margin: .3rem 0; background: var(--border); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* Phone: bottom tab bar + slide-in drawer (<dialog>) */
.et-tabbar { position: fixed; inset: auto 0 0 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
.et-tabbar a, .et-tabbar button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .3rem 0; border: 0; background: none;
    font-size: .6875rem; font-weight: 600; color: var(--muted); text-decoration: none !important; cursor: pointer; }
.et-tabbar a.is-active { color: var(--brand); }
@media (min-width: 1024px) { .et-tabbar { display: none; } }

.et-drawer { margin: 0; padding: 0; width: min(300px, 86vw); max-width: none; height: 100%; max-height: none; border: 0; background: transparent; }
.et-drawer::backdrop { background: rgb(15 31 61 / .35); }
.et-drawer[open] { animation: drawer-in .2s ease-out; }
.et-drawer .et-sidebar { position: relative; width: 100%; height: 100%; box-shadow: var(--shadow-lg); }
.et-drawer-close { position: absolute; top: .9rem; right: .75rem; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }

/* Page header */
.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; font-weight: 700; letter-spacing: -.025em; }
.page-head p { margin-top: .25rem; font-size: .9375rem; color: var(--muted); }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .6rem; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--ink); text-decoration: none; }

/* ── Dashboard parts ───────────────────────────────────────────────────────────────────────────────────── */
.balance-big { font-size: 2.25rem; font-weight: 750; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sparkline { width: 100%; height: 44px; display: block; margin: .4rem 0 .25rem; }
.sparkline-line { fill: none; stroke: var(--brand); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sparkline-fill { fill: var(--brand-soft); stroke: none; }

.setup { display: grid; gap: .75rem; }
@media (min-width: 900px) { .setup { grid-template-columns: repeat(3, 1fr); } }
.setup-step { display: flex; gap: .8rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); list-style: none; }
.setup-step.is-done { background: var(--surface-2); }
.setup-dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--border-strong);
    font-size: .75rem; font-weight: 700; color: var(--muted); }
.setup-step.is-done .setup-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.setup-step h3 { font-size: .875rem; font-weight: 650; }
.setup-step.is-done h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.setup-step p { font-size: .8125rem; color: var(--muted); margin-top: .15rem; }
.setup-step a { display: inline-block; margin-top: .4rem; font-size: .8125rem; font-weight: 600; }
.progress { height: 6px; border-radius: 99px; background: var(--neutral-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width 1s linear; }

/* Message lists */
.msg-list { list-style: none; }
.msg { padding: .9rem 1.25rem; border-top: 1px solid var(--border); }
.msg:first-child { border-top: 0; }
.msg-top { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.msg-sender { font-size: .8125rem; font-weight: 700; color: var(--ink); letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { margin-left: auto; flex: none; font-size: .75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg-text { margin-top: .3rem; font-size: .875rem; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.msg-meta { margin-top: .25rem; font-size: .75rem; color: var(--muted); }
.msg-actions { margin-top: .75rem; }
.msg-edit { margin-top: .8rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }

/* Compose */
.compose-row { display: grid; gap: .45rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.compose-row:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 768px) { .compose-row { grid-template-columns: 88px minmax(0, 1fr); gap: 1rem; } .compose-row > .label { padding-top: .6rem; } }
.compose-control { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.meter { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter strong { color: var(--ink); }
.meter-after { margin-left: auto; }
.compose-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.compose-foot .help { max-width: 44ch; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-input { position: absolute; opacity: 0; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: .4rem; height: 30px; padding: 0 .7rem; border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--surface); font-size: .8125rem; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: #b9c0cc; }
.chip-input:checked + .chip { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.chip-input:checked + .chip span { color: var(--brand); }
.chip-input:focus-visible + .chip { box-shadow: var(--ring); }
.tips { list-style: none; }
.tips li { padding: .85rem 1.25rem; border-top: 1px solid var(--border); font-size: .875rem; color: var(--muted); }
.tips li:first-child { border-top: 0; }
.tips strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: .1rem; }

/* Package picker (radio cards) */
.packages { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .packages { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.package-input { position: absolute; opacity: 0; pointer-events: none; }
.package { position: relative; display: block; height: 100%; padding: .95rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
    background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.package:hover { border-color: #b3bccb; }
.package-name { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.package-price { display: block; margin: .2rem 0 .15rem; font-size: 1.5rem; font-weight: 750; letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.package-price small { font-size: .875rem; font-weight: 600; color: var(--muted); margin-right: .1rem; }
.package-per { font-size: .75rem; font-weight: 600; color: var(--brand); }
.package-input:checked + .package { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.package-input:checked + .package::after { content: ""; position: absolute; top: .8rem; right: .8rem; width: 18px; height: 18px; border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/11px no-repeat; }
.package-input:focus-visible + .package { box-shadow: var(--ring); }
.pay-row { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 768px) { .pay-row { grid-template-columns: minmax(0, 380px) auto; } .pay-row > .btn { margin-top: 1.55rem; justify-self: start; } }

/* Payment status */
.status-card { max-width: 560px; margin: 0 auto; }
.status-icon { width: 56px; height: 56px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.5rem; font-weight: 700; }
.status-icon.is-success { background: var(--success-soft); color: var(--success); }
.status-icon.is-pending { background: var(--warning-soft); color: var(--warning); }
.status-icon.is-failed { background: var(--danger-soft); color: var(--danger); }
.status-card h1 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.status-details { margin-top: 1.75rem; text-align: left; }

/* Code blocks */
.code { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; border-radius: var(--radius-lg); background: #0f1f3d; color: #dbe3f2;
    font-family: var(--mono); font-size: .8125rem; line-height: 1.65; }
.code .c { color: #8592ab; }
.code .s { color: #9db8f2; }

/* Admin: held message review */
.review { padding: 1.25rem; border-top: 1px solid var(--border); }
.review:first-child { border-top: 0; }
.review-message { margin: .7rem 0; padding: .8rem 1rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border);
    font-size: .875rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.review-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.review-actions form { display: flex; flex-wrap: wrap; gap: .5rem; }
.review-actions .input { width: 280px; max-width: 100%; min-height: 32px; padding: .3rem .6rem; font-size: .8125rem; }
.review details summary { font-size: .8125rem; font-weight: 600; color: var(--brand); }

/* ── Public site ───────────────────────────────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
.container-narrow { max-width: 820px; }

.site-nav { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / .88); backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.site-links { display: none; gap: .25rem; }
.site-links a { padding: .45rem .7rem; border-radius: 7px; font-size: .875rem; font-weight: 500; color: var(--text); text-decoration: none; }
.site-links a:hover, .site-links a.is-active { background: var(--neutral-soft); color: var(--ink); }
.site-actions { display: none; margin-left: auto; align-items: center; gap: .5rem; }
.site-actions form { margin: 0; }
.site-menu { margin-left: auto; }
.site-menu > summary { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--ink); }
.site-menu > summary:hover { background: var(--neutral-soft); }
.site-menu-panel { position: absolute; left: 0; right: 0; top: 64px; padding: .75rem 1.25rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); display: grid; gap: .25rem; }
.site-menu-panel a:not(.btn), .site-menu-panel button:not(.btn) { padding: .6rem .5rem; border: 0; border-radius: 7px; background: none; font-weight: 500; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.site-menu-panel a:not(.btn):hover { background: var(--neutral-soft); }
.site-menu-panel .btn { margin-top: .5rem; }
@media (min-width: 900px) { .site-links, .site-actions { display: flex; } .site-menu { display: none; } }

.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; font-size: .875rem; color: var(--muted); }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-company { display: grid; gap: .5rem; }
.footer-company p { margin: 0; }
.site-flash { padding-top: 1rem; }

.eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; background: var(--brand-soft);
    color: var(--brand-strong); font-size: .8125rem; font-weight: 600; }
.eyebrow::before { display: none; }

.hero { position: relative; overflow: hidden; padding: 3.5rem 0 4.5rem;
    background: var(--surface-2); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 5.5rem 0 6rem; } .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.hero h1 { margin-top: 1.25rem; font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 750; letter-spacing: -.04em; line-height: 1.04; }
.hero-lead { margin-top: 1.25rem; max-width: 34rem; font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.hero-note { margin-top: 1rem; font-size: .8125rem; color: var(--muted); }
.hero-visual { position: relative; }
@media (min-width: 640px) { .hero-visual { padding-right: 185px; } }
.window { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 30px 60px -30px rgb(15 31 61 / .3), var(--shadow-sm); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 .9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.window-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.window-url { margin: 0 auto; padding: .15rem .8rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: .6875rem; color: var(--muted); }
.window-body { padding: 1.25rem; display: grid; gap: .5rem; font-size: .8125rem; }
.window-label { font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-top: .25rem; }
.window-field { padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 7px; color: var(--ink); }
.window-numbers { font-family: var(--mono); font-size: .75rem; line-height: 1.6; }
.window-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--border); color: var(--muted); }
.window-summary strong { color: var(--ink); }
.window-send { margin-left: auto; padding: .45rem .8rem; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 600; }
.hero-phone { display: none; }
@media (min-width: 640px) { .hero-phone { display: block; position: absolute; right: 0; bottom: -2.5rem; width: 300px; transform: scale(.72); transform-origin: bottom right; } }

.section { padding: 5rem 0; }
.section-muted { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: #0f1f3d; color: #c2cde3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.375rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.12; }
.section-sub { margin-top: .75rem; max-width: 40rem; font-size: 1.0625rem; color: var(--muted); }
.section-dark .section-sub { color: #a9b6cf; }
.section-head { margin-bottom: 2.5rem; }

.features { display: grid; gap: 2rem; }
@media (min-width: 768px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgb(255 255 255 / .08); color: #9db8f2; margin-bottom: 1rem; }
.feature h3 { font-size: 1rem; font-weight: 650; }
.feature p { margin-top: .4rem; font-size: .9375rem; line-height: 1.6; }

.examples { display: grid; gap: 1rem; }
@media (min-width: 640px) { .examples { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .examples { grid-template-columns: repeat(4, 1fr); } }
.example { display: flex; flex-direction: column; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.example-who { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--copper); }
.example-sender { margin-top: .25rem; font-size: .875rem; font-weight: 700; color: var(--ink); }
.example-bubble { margin: .8rem 0; padding: .7rem .85rem; border-radius: 16px 16px 16px 4px; background: #eef1f6; color: var(--ink); font-size: .875rem; line-height: 1.45; flex: 1; }
.example-meta { font-size: .75rem; color: var(--muted); }

.steps { list-style: none; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: 2px solid var(--border); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 1rem; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: .875rem; font-weight: 700; }
.steps h3 { font-size: 1rem; font-weight: 650; }
.steps p { margin-top: .4rem; font-size: .9375rem; color: var(--muted); }

.pricing { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 1024px) { .pricing { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }
.calc { margin-top: 2rem; padding: 1.5rem; border-radius: var(--radius-xl); background: var(--brand-soft); border: 1px solid var(--brand-soft-2); }
.calc-total { margin-top: 1rem; font-size: 2.25rem; font-weight: 750; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-xs); }
.price-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.price-row:first-child { border-top: 0; }
.price-row.is-featured { background: var(--brand-soft); }
.price-name { font-weight: 600; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.price-amount { font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.price-per { text-align: right; font-size: .8125rem; font-weight: 600; color: var(--brand); }
.tag-best { padding: .15rem .5rem; border-radius: 99px; background: var(--copper); color: #fff; font-size: .625rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.dev-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .dev-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; font-weight: 600; color: var(--ink); }
.faq summary::after { content: ""; width: 20px; height: 20px; flex: none; transition: transform .2s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%2366726d' stroke-width='1.7' stroke-linecap='round' d='M10 4v12M4 10h12'/%3E%3C/svg%3E") center/18px no-repeat; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2rem 1.25rem 0; color: var(--muted); }

.contact-grid { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
.contact-card { display: block; padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
    box-shadow: var(--shadow-xs); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.contact-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.contact-card.wide { grid-column: 1 / -1; }
.contact-kind { display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.contact-value { display: block; margin-top: .25rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* Docs and policy pages */
.doc { padding: 3rem 0 5rem; }
.doc h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.03em; }
.doc h2 { margin-top: 2.5rem; font-size: 1.25rem; font-weight: 700; }
.doc h3 { margin-top: 1.5rem; font-size: 1rem; font-weight: 650; }
.doc p, .doc ul, .doc ol { margin-top: .75rem; color: var(--text); }
.doc ul, .doc ol { padding-left: 1.25rem; display: grid; gap: .35rem; }
.doc .lead { font-size: 1.0625rem; color: var(--muted); }
.doc .code { margin-top: 1rem; }
.doc .table-wrap { margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.doc .alert { margin-top: 1rem; }

/* Auth pages */
.auth { display: grid; min-height: calc(100vh - 65px); }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.auth-aside { display: none; position: relative; overflow: hidden; padding: 3.5rem; color: #d6e0f5;
    background: #001b53; }
@media (min-width: 1024px) { .auth-aside { display: flex; align-items: center; } }
.auth-aside h2 { color: #fff; font-size: 1.875rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.auth-aside p { margin-top: 1rem; font-size: 1rem; line-height: 1.6; }
.auth-points { list-style: none; margin-top: 2rem; display: grid; gap: .75rem; }
.auth-points li { display: flex; align-items: center; gap: .6rem; color: #e9effb; }
.auth-points svg { color: #9db8f2; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -.03em; }
.auth-card > p { margin-top: .4rem; color: var(--muted); }
.auth-card form { margin-top: 1.75rem; }
.auth-alt { margin-top: 1.5rem; text-align: center; font-size: .875rem; color: var(--muted); }

/* Error pages */
.error-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.error-page header { padding: 1.25rem 0; }
.error-page main { flex: 1; display: flex; align-items: center; padding: 2rem 0 4rem; }
.error-card { max-width: 520px; margin: 0 auto; padding: 2.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.error-code { font-size: .8125rem; font-weight: 700; color: var(--brand); letter-spacing: .04em; text-transform: uppercase; }
.error-card h1 { margin-top: .5rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.error-card .error-body { margin-top: .75rem; color: var(--muted); }
.error-card .error-help { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); }

/* ── iPhone mockup (landing hero) ──────────────────────────────────────────────────────────────────────── */
.iphone { position: relative; width: 300px; max-width: 100%; aspect-ratio: 300 / 620; margin: 0 auto; padding: 11px; border-radius: 56px;
    background: linear-gradient(145deg, #d9dade 0%, #8e9197 18%, #3b3d42 50%, #8e9197 82%, #d4d6da 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35) inset, 0 40px 70px -25px rgba(16, 32, 43, .45), 0 12px 25px -12px rgba(16, 32, 43, .3); }
.iphone::before { content: ""; position: absolute; inset: 3px; border-radius: 53px; background: #0b0b0c; }
.iphone-btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #6d7076, #b9bbc0); }
.iphone-btn-action { left: -3px; top: 108px; height: 30px; }
.iphone-btn-vol-up { left: -3px; top: 160px; height: 52px; }
.iphone-btn-vol-down { left: -3px; top: 222px; height: 52px; }
.iphone-btn-power { right: -3px; top: 180px; height: 82px; background: linear-gradient(270deg, #6d7076, #b9bbc0); }
.iphone-screen { position: relative; height: 100%; border-radius: 45px; overflow: hidden; background: #fff; display: flex; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; color: #000; }
.iphone-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(120deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 32%); }
.iphone-status { position: relative; height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 22px 0 32px; }
.iphone-time { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.iphone-island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 92px; height: 27px; border-radius: 20px; background: #000; }
.iphone-icons { display: flex; align-items: center; gap: 4px; color: #000; }
.iphone-icons svg { fill: currentColor; }
.iphone-thread-header { position: relative; flex: none; display: flex; justify-content: center; padding: 2px 12px 8px; background: rgba(249, 249, 249, .94); border-bottom: .5px solid rgba(0, 0, 0, .15); }
.iphone-back { position: absolute; left: 14px; top: 16px; color: #007aff; }
.iphone-contact { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.iphone-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(180deg, #a5abb6, #858a94); }
.iphone-avatar svg { margin-top: 8px; }
.iphone-contact-name { font-size: 11px; display: inline-flex; align-items: center; gap: 3px; color: #000; }
.iphone-contact-name svg { color: #8e8e93; }
.iphone-thread { flex: 1; overflow: hidden; padding: 6px 12px 0; display: flex; flex-direction: column; }
.iphone-stamp { text-align: center; font-size: 10.5px; color: #8e8e93; margin: 10px 0 6px; line-height: 1.3; }
.iphone-stamp strong { font-weight: 600; }
.iphone-bubble { position: relative; align-self: flex-start; max-width: 78%; background: #e9e9eb; color: #000; font-size: 13.5px; line-height: 1.3;
    padding: 7px 11px; border-radius: 18px; margin-left: 5px; }
.iphone-bubble::before, .iphone-bubble::after { content: ""; position: absolute; bottom: 0; height: 17px; }
.iphone-bubble::before { left: -7px; width: 20px; background: #e9e9eb; border-bottom-right-radius: 16px 14px; }
.iphone-bubble::after { left: -10px; width: 10px; background: #fff; border-bottom-right-radius: 10px; }
.iphone-no-reply { flex: none; text-align: center; font-size: 11px; color: #8e8e93; padding: 10px 16px 30px; }
.iphone-home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 110px; height: 4px; border-radius: 3px; background: #000; }

/* Responsive show/hide (tables on wide screens, stacked lists on phones) */
.show-md-up { display: none; }
@media (min-width: 768px) { .show-md-up { display: block; } .hide-md-up { display: none; } }
.table .cell-message { min-width: 280px; }
.table .cell-text { display: block; margin-top: .15rem; color: var(--text); }

/* Small layout fixes */
.grid-2 > .field + .field { margin-top: 0; }
.card-body > .kv:first-child > div:first-child { border-top: 0; padding-top: 0; }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════
   Polish layer: depth, colour and motion on top of the base system above.
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════ */
:root {
    --radius-lg: 14px;
    --shadow-xs: 0 1px 2px rgb(15 31 61 / .04);
    --shadow-sm: 0 1px 2px rgb(15 31 61 / .04), 0 4px 12px -2px rgb(15 31 61 / .06);
    --shadow-md: 0 2px 4px rgb(15 31 61 / .04), 0 12px 28px -8px rgb(15 31 61 / .14);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

.et-shell { background: var(--bg); }
.card { box-shadow: var(--shadow-sm); border-color: #e3e7ee; }
.card-head h2, .card-head h3 { font-size: 1rem; }

/* Buttons: depth + press */
.btn { transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--brand); box-shadow: 0 1px 2px rgb(13 47 115 / .3), 0 4px 12px -4px rgb(21 72 168 / .45), inset 0 1px 0 rgb(255 255 255 / .16); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 1px 2px rgb(13 47 115 / .3), 0 8px 18px -6px rgb(21 72 168 / .55), inset 0 1px 0 rgb(255 255 255 / .16); }
.btn-lg { height: 50px; font-size: 1rem; }
.btn-white { background: #fff; color: var(--brand-strong); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.btn-white:hover { background: #eef3fd; color: var(--brand-strong); }
.btn-glass { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .22); }
.btn-glass:hover { background: rgb(255 255 255 / .2); color: #fff; }

/* Sidebar: accent marker on the active item */
.nav-list a { position: relative; transition: background-color .15s, color .15s; }
.nav-list a.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }


/* Top bar balance: live dot */

@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(21 72 168 / .45); } 70%, 100% { box-shadow: 0 0 0 7px rgb(21 72 168 / 0); } }

/* Page entrance: sections rise in, one after another */
.et-content > * { animation: rise .5s var(--ease) both; }
.et-content > *:nth-child(2) { animation-delay: .05s; }
.et-content > *:nth-child(3) { animation-delay: .1s; }
.et-content > *:nth-child(4) { animation-delay: .15s; }
.et-content > *:nth-child(n+5) { animation-delay: .2s; }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .06s; } .stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; } .stagger > *:nth-child(5) { animation-delay: .24s; } .stagger > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Interactive cards lift */
a.card, .card.is-interactive { transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
a.card:hover, .card.is-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); text-decoration: none; }

/* Stat tiles with a coloured icon */
.stat { padding: 1.15rem 1.25rem; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; margin-bottom: .85rem; background: var(--brand-soft); color: var(--brand); }
.stat-icon.is-blue { background: var(--info-soft); color: var(--info); }
.stat-icon.is-amber { background: var(--warning-soft); color: #b86e00; }
.stat-icon.is-red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.is-violet { background: var(--brand-soft); color: var(--brand); }
.stat-label svg { display: none; }
.stat-value { font-size: 1.875rem; }

/* Alerts slide in; flash messages can be dismissed */
.alert { animation: slide-in .4s var(--ease) both; }
.flash { position: relative; padding-right: 2.75rem; }
.flash-close { position: absolute; top: 50%; right: .5rem; translate: 0 -50%; width: 28px; height: 28px; display: grid; place-items: center;
    border: 0; border-radius: 6px; background: none; color: inherit; opacity: .6; cursor: pointer; }
.flash-close:hover { opacity: 1; background: rgb(0 0 0 / .06); }
.flash.is-leaving { animation: slide-out .3s ease-in forwards; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes slide-out { to { opacity: 0; transform: translateY(-8px); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }

/* Tables and lists */
.table tbody tr td { transition: background-color .15s; }
.msg { transition: background-color .15s; }
.msg:hover { background: #fbfcfd; }
.badge { transition: transform .2s; }
.empty-icon { animation: float 3.5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Page header */
.page-head h1 { font-size: 1.625rem; }

/* ── Home: welcome banner ─────────────────────────────────────────────────────────────────────────────── */
.welcome { position: relative; overflow: hidden; margin-bottom: 1.5rem; padding: 1.75rem; border-radius: 16px; color: #d6e0f5; background: #001b53;
    }
.welcome::after { display: none;
    border: 36px solid rgb(255 255 255 / .05); pointer-events: none; }
.welcome-grid { position: relative; z-index: 1; display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 900px) { .welcome { padding: 2rem 2.25rem; } .welcome-grid { grid-template-columns: 1fr auto; } }
.welcome-hello { font-size: .9375rem; font-weight: 500; color: #b7c9f0; }
.welcome h1 { margin-top: .2rem; color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; }
.welcome-balance { margin-top: 1.25rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.welcome-balance strong { font-size: 3rem; font-weight: 750; letter-spacing: -.045em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.welcome-balance span { font-size: 1rem; font-weight: 600; color: #d6e0f5; }
.welcome-sub { margin-top: .45rem; font-size: .875rem; color: #b7c9f0; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.welcome .alert { margin-top: 1.25rem; }

.usage-spark { margin-top: .25rem; }

/* ── Checkout (Buy credits) ───────────────────────────────────────────────────────────────────────────── */
.checkout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1100px) { .checkout { grid-template-columns: minmax(0, 1fr) 360px; } .checkout-summary { position: sticky; top: calc(var(--topbar-h) + 1.25rem); } }
.step-head { display: flex; align-items: center; gap: .7rem; }
.step-num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8125rem; font-weight: 700;
    box-shadow: 0 0 0 4px var(--brand-soft); }
.step-head h2 { font-size: 1rem; }

.packages { gap: .85rem; }
@media (min-width: 640px) { .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.package { padding: 1.1rem 1.1rem 1rem; border-radius: 14px; border-color: var(--border); box-shadow: var(--shadow-xs);
    transition: transform .2s var(--ease), border-color .15s, box-shadow .2s, background-color .15s; }
.package:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.package-credits { display: block; font-size: 1.625rem; font-weight: 750; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.package-unit { font-size: .75rem; font-weight: 600; color: var(--muted); }
.package-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px dashed var(--border-strong); }
.package-price { margin: 0; font-size: 1.125rem; }
.package-save { display: inline-block; margin-left: .35rem; padding: .1rem .4rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand-strong); font-size: .6875rem; font-weight: 700; }
.package-best { position: absolute; top: -10px; left: 1rem; padding: .15rem .55rem; border-radius: 99px; background: linear-gradient(135deg, #f08a2c, var(--copper));
    color: #fff; font-size: .625rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 4px 10px -3px rgb(217 113 26 / .6); }
.package-input:checked + .package { animation: pop .35s var(--ease); transform: translateY(-2px); box-shadow: 0 0 0 1px var(--brand), 0 12px 24px -10px rgb(21 72 168 / .45); }
.package-input:checked + .package .package-save { background: var(--brand); color: #fff; }
@keyframes pop { 0% { transform: scale(.97); } 60% { transform: scale(1.02) translateY(-2px); } 100% { transform: translateY(-2px); } }

.networks { display: flex; flex-wrap: wrap; gap: .5rem; }
.network { display: inline-flex; align-items: center; gap: .5rem; height: 36px; padding: 0 .8rem 0 .45rem; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); font-size: .8125rem; font-weight: 600; color: var(--muted); transition: all .25s var(--ease); }
.network-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: .625rem; font-weight: 800; letter-spacing: -.02em; }
.network[data-network="airtel"] .network-dot { background: #e40000; }
.network[data-network="mtn"] .network-dot { background: #ffc403; color: #1a1a1a; }
.network[data-network="kwacha"] .network-dot { background: #2f8f3a; }
.networks.has-match .network { opacity: .45; filter: grayscale(.6); }
.networks.has-match .network.is-match { opacity: 1; filter: none; color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-sm); transform: scale(1.04); }

.phone-field { position: relative; }
.phone-field .input { padding-left: 2.8rem; font-size: 1.125rem; font-weight: 600; letter-spacing: .02em; min-height: 52px; }
.phone-field > svg { position: absolute; left: .95rem; top: 17px; color: var(--faint); pointer-events: none; }

.summary-rows { display: grid; gap: .6rem; font-size: .875rem; }
.summary-rows > div { display: flex; justify-content: space-between; gap: 1rem; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.summary-rows .is-after dd { color: var(--brand); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin: 1.1rem 0 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.summary-total span { font-size: .875rem; font-weight: 600; color: var(--muted); }
.summary-total strong { font-size: 2rem; font-weight: 750; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bump { animation: bump .35s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); color: var(--brand); } 100% { transform: scale(1); } }
.how { list-style: none; display: grid; gap: .7rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.how li { display: flex; gap: .65rem; align-items: flex-start; font-size: .8125rem; color: var(--muted); }
.how-num { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--neutral-soft); color: var(--ink); font-size: .6875rem; font-weight: 700; }
.secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .85rem; font-size: .75rem; color: var(--muted); }

/* ── Payment status ──────────────────────────────────────────────────────────────────────────────────── */
.status-card { max-width: 580px; overflow: hidden; }
.status-hero { position: relative; padding: 2.5rem 1.75rem 2rem; text-align: center; }
.status-hero.is-pending { background: linear-gradient(180deg, #fff8ec, var(--surface)); }
.status-hero.is-success { background: linear-gradient(180deg, #eaf7f0, var(--surface)); }
.status-hero.is-failed { background: linear-gradient(180deg, #fdf0ef, var(--surface)); }
.status-orb { position: relative; width: 84px; height: 84px; margin: 0 auto 1.25rem; display: grid; place-items: center; border-radius: 50%; }
.is-pending .status-orb { background: #fff; color: #b86e00; box-shadow: 0 0 0 1px #f6dcaa, 0 10px 24px -8px rgb(149 88 0 / .35); }
.is-pending .status-orb::before, .is-pending .status-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #f0b24d; animation: ripple 2.4s ease-out infinite; }
.is-pending .status-orb::after { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
.is-pending .status-orb svg { animation: buzz 2.4s ease-in-out infinite; }
@keyframes buzz { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-10deg); } 78% { transform: rotate(10deg); } 82% { transform: rotate(-8deg); } 86% { transform: rotate(6deg); } 90% { transform: rotate(0); } }
.is-success .status-orb { background: var(--brand); color: #fff; box-shadow: 0 12px 30px -10px rgb(21 72 168 / .6); animation: pop-in .5s var(--ease) both; }
.is-success .status-orb::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgb(21 72 168 / .35); animation: burst .9s .2s ease-out both; }
.check-draw path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .35s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } to { transform: scale(1); } }
@keyframes burst { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.is-failed .status-orb { background: var(--danger); color: #fff; box-shadow: 0 12px 30px -10px rgb(180 35 24 / .55); animation: pop-in .45s var(--ease) both, shake .5s .45s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.status-hero h1 { font-size: 1.5rem; }
.status-amount { margin-top: .35rem; font-size: 2.25rem; font-weight: 750; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.status-body { padding: 0 1.75rem 1.75rem; }
.timeline { list-style: none; display: grid; gap: 0; margin: 0 0 1.5rem; text-align: left; }
.timeline li { position: relative; display: flex; gap: .8rem; padding-bottom: 1.1rem; font-size: .875rem; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done .timeline-dot { border-color: var(--brand); background: var(--brand); color: #fff; }
.timeline li.is-done::before { background: var(--brand); }
.timeline li.is-current { color: var(--ink); font-weight: 600; }
.timeline li.is-current .timeline-dot { border-color: #f0b24d; }
.timeline li.is-current .timeline-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #f0a93b; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; transform: scale(.7); } }
.countdown { padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; }
.countdown .progress { height: 8px; }
.countdown .progress > span { background: linear-gradient(90deg, #f0a93b, #f7c56b); }

/* Motion off for people who ask for less */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}


/* ── Admin workspace (overview, activity, customers) ─────────────────────── */
.section-title { font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.mb-6 { margin-bottom: 1.75rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-2-1 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-2-1 { grid-template-columns: 2fr 1fr; } }
.card-body { padding: 1.1rem 1.25rem 1.25rem; }
.small { font-size: .8125rem; }
.is-bad-text { color: var(--danger); font-weight: 600; }
.card.is-alert { border-color: #f6dcaa; background: linear-gradient(var(--warning-soft), var(--surface) 60%); }

.all-clear { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--success-soft); border: 1px solid #c9d7f4; }
.all-clear-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--success); color: #fff; }
.all-clear p { font-size: .875rem; color: var(--muted); margin: .1rem 0 0; }

.attention { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.attention-item { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s, transform .15s; }
.attention-item:hover { text-decoration: none; color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.attention-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; }
.attention-text { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.attention-text strong { font-size: .9375rem; }
.attention-text span { font-size: .8125rem; color: var(--muted); }
.attention-item.is-danger { border-color: #f2c9c4; }
.attention-item.is-danger .attention-icon { background: var(--danger-soft); color: var(--danger); }
.attention-item.is-warning { border-color: #f6dcaa; }
.attention-item.is-warning .attention-icon { background: var(--warning-soft); color: var(--warning); }
.attention-item.is-info .attention-icon { background: var(--info-soft); color: var(--info); }

.stat.is-feature { background: var(--brand); border-color: var(--brand); }
.stat.is-feature .stat-label, .stat.is-feature .stat-meta { color: rgb(255 255 255 / .78); }
.stat.is-feature .stat-value { color: #fff; }

.bars { display: flex; align-items: flex-end; gap: .35rem; height: 190px; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .35rem; }
.bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: var(--brand-soft-2); transition: background .15s; }
.bar.is-today { background: var(--brand); }
.bar-col:hover .bar { background: var(--brand-hover); }
.bar-value { font-size: .6875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-label { font-size: .6875rem; color: var(--faint); white-space: nowrap; }
@media (max-width: 640px) { .bar-value { display: none; } }

.runway-bar { height: 8px; border-radius: 999px; background: var(--neutral-soft); overflow: hidden; margin: .75rem 0 .5rem; }
.runway-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.runway-bar span.is-low { background: var(--danger); }

.activity { list-style: none; margin: 0; padding: .25rem 0; }
.activity-item { display: flex; gap: .8rem; padding: .8rem 1.25rem; border-top: 1px solid var(--border); }
.activity-item:first-child { border-top: 0; }
.activity-dot { width: 9px; height: 9px; margin-top: .45rem; flex: none; border-radius: 999px; background: var(--neutral); }
.activity-dot.is-credits { background: var(--success); }
.activity-dot.is-customer { background: var(--warning); }
.activity-dot.is-sender_id, .activity-dot.is-message { background: var(--info); }
.activity-body { min-width: 0; }
.activity-body p { margin: 0; font-size: .875rem; }
.activity-note { color: var(--text); overflow-wrap: anywhere; }
.activity-body .activity-meta { font-size: .75rem; color: var(--faint); margin-top: .15rem; }

.filters-split { justify-content: space-between; align-items: center; }
.tabs-scroll { max-width: 100%; overflow-x: auto; }
.tabs a { white-space: nowrap; }
.tab-count { margin-left: .25rem; font-size: .75rem; font-weight: 600; color: var(--faint); }
.tabs a.is-active .tab-count { color: var(--brand); }

.et-balance.is-zamtel strong { margin-left: .25rem; }
.nav-collapse > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.nav-collapse > summary::-webkit-details-marker { display: none; }
.nav-collapse > summary::after { content: '+'; font-size: .9rem; color: var(--faint); }
.nav-collapse[open] > summary::after { content: '–'; }

/* ── Confirmation dialog ─────────────────────────────────────────────────── */
.et-confirm { width: min(26rem, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.et-confirm::backdrop { background: rgb(15 31 61 / .45); backdrop-filter: blur(3px); }
.et-confirm form { padding: 1.5rem; }
.et-confirm-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.et-confirm-icon::before { content: '?'; font-weight: 700; font-size: 1.1rem; }
.et-confirm.is-danger .et-confirm-icon { background: var(--danger-soft); color: var(--danger); }
.et-confirm.is-danger .et-confirm-icon::before { content: '!'; }
.et-confirm h2 { margin-top: 1rem; font-size: 1.125rem; font-weight: 700; }
.et-confirm p { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.et-confirm p:empty { display: none; }
.et-confirm-actions { display: flex; flex-direction: column-reverse; gap: .5rem; margin-top: 1.4rem; }
.et-confirm-actions .btn { width: 100%; justify-content: center; }
.et-confirm[open] { animation: et-confirm-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes et-confirm-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) { .et-confirm-actions { flex-direction: row; justify-content: flex-end; } .et-confirm-actions .btn { width: auto; } }
@media (max-width: 639px) {
    .et-confirm { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .et-confirm[open] { animation-name: et-sheet-up; }
}
@keyframes et-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .et-confirm[open] { animation: none; } .attention-item { transition: none; } }

/* Tap targets: links in card headers and the brand get a 44px tall hit area without changing the layout. */
.card-head a, .card-head .link { display: inline-block; padding: 12px 0; margin: -12px 0; }
.brand { padding: 7px 0; margin: -7px 0; }
