/* =====================================================================
   TOPTELLER / VA SCRIPT — PORTAL DESIGN SYSTEM
   Navy · Gold · Red · Yellow — Light & Dark mode
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {
    /* Brand core */
    --navy-950: #060c1f;
    --navy-900: #0a1633;
    --navy-800: #0f2049;
    --navy-700: #152b62;
    --navy-600: #1c3a80;
    --navy-500: #26499e;
    --navy-400: #3c62bd;

    --gold-700: #8f6a12;
    --gold-600: #b3860f;
    --gold-500: #dba62c;
    --gold-400: #ecc158;
    --gold-300: #f6d685;
    --gold-100: #fdf1d6;

    --red-700: #7a1f26;
    --red-600: #a3272f;
    --red-500: #c9333c;
    --red-400: #e0525a;
    --red-100: #fce3e4;

    --yellow-600: #a9760c;
    --yellow-500: #e2a51a;
    --yellow-400: #f2bd3a;
    --yellow-100: #fef2d6;

    --teal-600: #0d6e5c;
    --teal-500: #12977d;
    --teal-100: #dbf4ee;

    /* Surfaces — light mode */
    --paper: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f0f3fa;
    --surface-3: #e7ecf6;
    --line: #e1e6f1;
    --line-strong: #cdd5e6;

    /* Text — light mode */
    --ink: #10162c;
    --ink-soft: #333d5c;
    --muted: #626d8a;
    --muted-soft: #8791ab;

    /* Semantic */
    --brand: var(--navy-700);
    --brand-strong: var(--navy-900);
    --accent: var(--gold-500);
    --accent-strong: var(--gold-600);
    --danger: var(--red-500);
    --danger-strong: var(--red-600);
    --warn: var(--yellow-500);
    --success: var(--teal-600);

    --shadow-sm: 0 2px 8px rgba(10, 22, 51, 0.06);
    --shadow-md: 0 10px 28px rgba(10, 22, 51, 0.10);
    --shadow-lg: 0 24px 56px rgba(10, 22, 51, 0.16);
    --shadow-gold: 0 14px 30px rgba(219, 166, 44, 0.30);
    --shadow-navy: 0 18px 40px rgba(10, 22, 51, 0.30);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --sidebar-width: 272px;
    --topbar-height: 76px;
    --font-display: 'Plus Jakarta Sans', 'Manrope', system-ui, -apple-system, sans-serif;
    --font-body: 'Manrope', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    color-scheme: light;
}

/* Dark mode overrides */
:root[data-theme="dark"] {
    --paper: #060c1f;
    --surface: #0d1730;
    --surface-2: #101c3a;
    --surface-3: #172548;
    --line: #223057;
    --line-strong: #2c3c68;

    --ink: #eef1fb;
    --ink-soft: #cbd3ec;
    --muted: #97a1c4;
    --muted-soft: #7883a9;

    --brand: var(--navy-500);
    --brand-strong: var(--navy-400);
    --accent: var(--gold-400);
    --accent-strong: var(--gold-300);
    --danger: var(--red-400);
    --danger-strong: #ef6169;
    --warn: var(--yellow-400);
    --success: #35c9a6;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 30px 64px rgba(0, 0, 0, 0.50);
    --shadow-gold: 0 16px 34px rgba(236, 193, 88, 0.22);
    --shadow-navy: 0 20px 44px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

/* ---------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    background-image:
        radial-gradient(1100px 520px at 92% -10%, rgba(219, 166, 44, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(28, 58, 128, 0.10), transparent 55%);
    background-attachment: fixed;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 220ms ease, color 220ms ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

p { margin: 0; color: var(--muted); }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

img, svg { display: block; }
img { max-width: 100%; }

svg.icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

:focus-visible {
    outline: 3px solid rgba(219, 166, 44, 0.55);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--gold-300); color: var(--navy-950); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
    border: 2px solid var(--paper);
}

/* ---------------------------------------------------------------------
   3. BUTTONS
   --------------------------------------------------------------------- */
.button, .icon-button, .table-action {
    border: 0;
    appearance: none;
    font-family: var(--font-display);
}

.button {
    position: relative;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }

.button-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950);
    box-shadow: var(--shadow-gold);
}
.button-primary:hover { box-shadow: 0 18px 38px rgba(219, 166, 44, 0.38); }

.button-secondary {
    background: var(--surface);
    color: var(--brand);
    border: 1.5px solid var(--line-strong);
    box-shadow: var(--shadow-sm);
}
.button-secondary:hover { border-color: var(--brand); background: var(--surface-2); }

.button-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid transparent;
}
.button-ghost:hover { background: var(--surface-2); color: var(--ink); }

.button-light {
    background: var(--surface);
    color: var(--navy-900);
    box-shadow: var(--shadow-md);
}
.button-light:hover { background: var(--gold-100); }

.button-outline-light {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.button-outline-light:hover { background: rgba(255, 255, 255, 0.16); }

.button-full { width: 100%; }

.table-action.danger,
.button.danger {
    background: var(--red-100);
    color: var(--red-600);
}
:root[data-theme="dark"] .table-action.danger,
:root[data-theme="dark"] .button.danger { background: rgba(224, 82, 90, 0.16); color: var(--red-400); }

.icon-button {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.icon-button:hover { background: var(--surface-3); color: var(--brand); transform: translateY(-1px); }

.text-link {
    color: var(--brand);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.text-link:hover { color: var(--accent-strong); }

/* ---------------------------------------------------------------------
   4. THEME TOGGLE (injected via JS)
   --------------------------------------------------------------------- */
.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 84px;
    z-index: 90;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
    color: var(--gold-400);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-navy);
    border: 1px solid rgba(219, 166, 44, 0.35);
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.theme-toggle:hover { transform: translateY(-3px) scale(1.04); }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (min-width: 960px) {
    .theme-toggle { bottom: 28px; right: 28px; }
}
.app-body .theme-toggle,
.auth-body .theme-toggle { bottom: 84px; }
@media (min-width: 960px) {
    .app-body .theme-toggle,
    .auth-body .theme-toggle { bottom: 28px; }
}

/* ---------------------------------------------------------------------
   5. APP SHELL (dashboard layout)
   --------------------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 22px 18px 22px;
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(219, 166, 44, 0.16), transparent 60%),
        linear-gradient(190deg, var(--navy-900), var(--navy-950) 70%);
    color: rgba(255, 255, 255, 0.92);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 260ms var(--ease);
    overflow-y: auto;
}
.sidebar.is-open { transform: translateX(0); }

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--ink);
}
.brand-lockup img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand-lockup-light { color: #fff; }

.sidebar-close { color: #fff; background: rgba(255, 255, 255, 0.08); border: none; }
.sidebar-close:hover { background: rgba(255, 255, 255, 0.16); color: var(--gold-300); }

.operator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    margin-bottom: 18px;
}
.operator-card .avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.9rem;
}
.operator-card div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.operator-card span { font-size: 0.75rem; color: var(--gold-300); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.operator-card strong { font-size: 0.95rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-nav a.is-active {
    background: linear-gradient(120deg, rgba(219, 166, 44, 0.22), rgba(219, 166, 44, 0.05));
    color: var(--gold-300);
    box-shadow: inset 3px 0 0 var(--gold-400);
}
.side-nav a svg { opacity: 0.9; }

.sidebar-note {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(20, 151, 125, 0.14);
    border: 1px solid rgba(20, 151, 125, 0.3);
    font-size: 0.82rem;
}
.sidebar-note span { color: rgba(255, 255, 255, 0.7); }
.sidebar-note strong { color: #4be0be; }

.sidebar-logout {
    margin-top: 14px;
}
.sidebar-logout button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: rgba(201, 51, 60, 0.14);
    color: #ff9aa0;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(201, 51, 60, 0.28);
}
.sidebar-logout button:hover { background: rgba(201, 51, 60, 0.24); }
.sidebar-logout svg { transform: rotate(45deg); }

.sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 31, 0.55);
    backdrop-filter: blur(2px);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}
.sidebar-scrim.is-visible { opacity: 1; pointer-events: auto; }

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 96px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 10px;
    z-index: 20;
}
.topbar h1 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.topbar p { font-size: 0.85rem; margin-top: 2px; }
.topbar > div:nth-child(2) { flex: 1; min-width: 0; }

.menu-button { display: inline-flex; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.balance-chip {
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
    line-height: 1.2;
}
.balance-chip span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.balance-chip strong { font-family: var(--font-display); font-size: 1rem; color: var(--navy-900); }
:root[data-theme="dark"] .balance-chip strong { color: var(--gold-300); }

.content-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 20px;
}

@media (min-width: 960px) {
    .app-shell { }
    .sidebar { transform: translateX(0); position: sticky; top: 0; height: 100vh; align-self: flex-start; }
    .sidebar-close, .sidebar-scrim { display: none; }
    .app-main { padding: 24px 32px 48px; margin-left: 0; }
    .menu-button { display: none; }
    .topbar { top: 18px; padding: 18px 26px; }
}

/* ---------------------------------------------------------------------
   6. MOBILE TAB BAR
   --------------------------------------------------------------------- */
.mobile-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 22px rgba(10, 22, 51, 0.08);
}
.mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--muted-soft);
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    flex: 1;
}
.mobile-tabbar a.is-active { color: var(--brand); background: var(--surface-2); }
:root[data-theme="dark"] .mobile-tabbar a.is-active { color: var(--gold-400); }
@media (min-width: 960px) { .mobile-tabbar { display: none; } }

/* ---------------------------------------------------------------------
   7. PANELS / CARDS (generic)
   --------------------------------------------------------------------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.panel-head h2 { font-size: 1.18rem; margin-top: 2px; }
.panel-head > .avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950);
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.panel-copy { margin-bottom: 14px; font-size: 0.92rem; }

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

/* status pills */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}
.status-ok, .status.status-ok { background: var(--teal-100); color: var(--teal-600); }
.status-pending { background: var(--yellow-100); color: var(--yellow-600); }
.status-failed { background: var(--red-100); color: var(--red-600); }
.status-neutral { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .status-ok { background: rgba(53, 201, 166, 0.16); color: #43e0bb; }
:root[data-theme="dark"] .status-pending { background: rgba(242, 189, 58, 0.16); color: var(--yellow-400); }
:root[data-theme="dark"] .status-failed { background: rgba(224, 82, 90, 0.16); color: var(--red-400); }
:root[data-theme="dark"] .status-neutral { background: var(--surface-3); color: var(--muted-soft); }

/* notices */
.notice {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.notice-success { background: var(--teal-100); color: var(--teal-600); border-color: rgba(13, 110, 92, 0.2); }
.notice-error { background: var(--red-100); color: var(--red-600); border-color: rgba(163, 39, 47, 0.2); }
.notice-info { background: var(--gold-100); color: var(--gold-700); border-color: rgba(179, 134, 15, 0.2); }
:root[data-theme="dark"] .notice-success { background: rgba(53, 201, 166, 0.12); color: #43e0bb; }
:root[data-theme="dark"] .notice-error { background: rgba(224, 82, 90, 0.14); color: var(--red-400); }
:root[data-theme="dark"] .notice-info { background: rgba(236, 193, 88, 0.12); color: var(--gold-300); }

/* state boxes */
.state {
    padding: 22px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
}
.state-info { text-align: left; background: var(--gold-100); color: var(--gold-700); border: 1px solid rgba(179, 134, 15, 0.2); }
:root[data-theme="dark"] .state-info { background: rgba(236, 193, 88, 0.1); color: var(--gold-300); border-color: rgba(236, 193, 88, 0.24); }
.state-error { background: var(--red-100); color: var(--red-600); border-style: solid; }
.state-loading { display: flex; align-items: center; justify-content: center; gap: 10px; }
.state-loading span {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2.5px solid var(--line-strong);
    border-top-color: var(--brand);
    animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   8. DASHBOARD HERO
   --------------------------------------------------------------------- */
.dash-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(640px 320px at 100% 0%, rgba(219, 166, 44, 0.24), transparent 60%),
        linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    box-shadow: var(--shadow-navy);
    position: relative;
    overflow: hidden;
}
.dash-hero-copy .eyebrow { color: var(--gold-300); }
.dash-hero-copy h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 6px; }
.dash-hero-copy p { color: rgba(255, 255, 255, 0.78); margin-top: 8px; max-width: 46ch; font-size: 0.94rem; }

.command-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.command-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}
.command-strip svg { width: 15px; height: 15px; color: var(--gold-300); }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.wallet-panel {
    position: relative;
    padding: 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wallet-panel > span:first-of-type { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.wallet-panel strong { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.1rem); color: var(--gold-300); }
.wallet-panel > div { display: flex; gap: 18px; margin-top: 6px; }
.wallet-panel > div a { font-weight: 700; font-size: 0.86rem; color: #fff; border-bottom: 1.5px solid var(--gold-400); padding-bottom: 2px; }
.wallet-signal {
    position: absolute;
    top: 16px; right: 16px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #43e0bb;
    box-shadow: 0 0 0 4px rgba(67, 224, 187, 0.2);
}

@media (min-width: 860px) {
    .dash-hero { grid-template-columns: 1.5fr 1fr; align-items: center; padding: 36px 40px; }
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--red-600), var(--red-500));
    color: #fff;
    box-shadow: 0 16px 34px rgba(163, 39, 47, 0.28);
}
.admin-hero .eyebrow { color: rgba(255, 255, 255, 0.8); }
.admin-hero h2 { color: #fff; font-size: 1.3rem; margin-top: 4px; }

/* ---------------------------------------------------------------------
   9. STAT GRID
   --------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}
.stat-card {
    position: relative;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    animation: rise 480ms var(--ease) both;
    animation-delay: calc(var(--reveal-order, 0) * 60ms);
}
.stat-card span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-right: 46px;
}
.stat-mark {
    position: absolute;
    top: 14px; right: 14px;
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.stat-card strong { font-family: var(--font-display); font-size: 1.5rem; margin-top: 2px; }
.stat-card em { font-style: normal; font-size: 0.78rem; color: var(--muted-soft); }

.stat-card-spend .stat-mark { background: var(--gold-100); color: var(--gold-700); }
.stat-card-success .stat-mark { background: var(--teal-100); color: var(--teal-600); }
.stat-card-pending .stat-mark { background: var(--yellow-100); color: var(--yellow-600); }
:root[data-theme="dark"] .stat-card-spend .stat-mark { background: rgba(236, 193, 88, 0.14); color: var(--gold-300); }
:root[data-theme="dark"] .stat-card-success .stat-mark { background: rgba(53, 201, 166, 0.14); color: #43e0bb; }
:root[data-theme="dark"] .stat-card-pending .stat-mark { background: rgba(242, 189, 58, 0.14); color: var(--yellow-400); }

/* admin metric-tone cards (no icon marker, just a left accent) */
.stat-card[class*="metric-"] { border-left: 4px solid var(--line-strong); }
.stat-card.metric-ok { border-left-color: var(--success); }
.stat-card.metric-pending { border-left-color: var(--warn); }
.stat-card.metric-failed { border-left-color: var(--danger); }
.stat-card[class*="metric-"] span { padding-right: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------
   10. SERVICE SHORTCUTS (responsive icon grid — dashboard + service tabs)
   --------------------------------------------------------------------- */
.shortcut-section { display: flex; flex-direction: column; gap: 14px; }

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 520px) { .shortcut-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .shortcut-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .shortcut-grid { grid-template-columns: repeat(6, 1fr); } }

.shortcut-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 16px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
    animation: rise 480ms var(--ease) both;
    animation-delay: calc(var(--reveal-order, 0) * 55ms);
}
.shortcut-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-400); }
.shortcut-card strong { font-size: 0.95rem; font-weight: 800; }
.shortcut-card small { color: var(--muted); font-size: 0.78rem; }

.service-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: var(--gold-300);
    flex: 0 0 auto;
}
.service-icon.compact { width: 38px; height: 38px; border-radius: var(--radius-xs); }

.shortcut-airtime .service-icon { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: var(--navy-950); }
.shortcut-data .service-icon { background: linear-gradient(135deg, var(--navy-600), var(--navy-900)); color: #fff; }
.shortcut-tv .service-icon { background: linear-gradient(135deg, var(--red-500), var(--red-700)); color: #fff; }
.shortcut-electricity .service-icon { background: linear-gradient(135deg, var(--yellow-400), var(--yellow-600)); color: var(--navy-950); }

/* ---------------------------------------------------------------------
   11. TRANSACTION LIST
   --------------------------------------------------------------------- */
.transaction-panel { }
.transaction-list { display: flex; flex-direction: column; gap: 8px; }
.transaction-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid transparent;
    transition: border-color 160ms ease, transform 160ms ease;
    animation: rise 420ms var(--ease) both;
    animation-delay: calc(var(--reveal-order, 0) * 45ms);
}
.transaction-row:hover { border-color: var(--line-strong); transform: translateX(2px); }
.transaction-row > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.transaction-row strong { font-size: 0.92rem; font-weight: 700; }
.transaction-row > div:nth-child(2) span { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.row-end strong { font-family: var(--font-display); font-size: 0.95rem; color: var(--red-500); }
.row-end strong.amount-positive { color: var(--teal-600); }
:root[data-theme="dark"] .row-end strong { color: var(--red-400); }
:root[data-theme="dark"] .row-end strong.amount-positive { color: #43e0bb; }

/* ---------------------------------------------------------------------
   12. FORMS / FIELDS
   --------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-soft);
}
.field span { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field span a { font-weight: 700; color: var(--brand); font-size: 0.8rem; }
.field input, .field select, .field textarea {
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--ink);
    width: 100%;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(219, 166, 44, 0.16);
    outline: none;
}
.field input::placeholder { color: var(--muted-soft); }
.field input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }
.field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }

.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-grid.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid.three { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.check-row, .inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
}
.check-row input, .inline-check input { width: 17px; height: 17px; accent-color: var(--gold-500); }

.inline-field { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; }
.inline-field input { width: 90px; padding: 8px 10px; border-radius: var(--radius-xs); border: 1.5px solid var(--line-strong); background: var(--surface); }

.form-footer { margin-top: 8px; text-align: center; font-size: 0.86rem; color: var(--muted); }
.form-footer a { color: var(--brand); font-weight: 700; }

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}
.filter-bar .button { align-self: end; }

/* ---------------------------------------------------------------------
   13. AUTH PAGES
   --------------------------------------------------------------------- */
.auth-page { min-height: 100vh; padding: 18px; display: flex; flex-direction: column; gap: 24px; }
.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 6px 0;
}
.auth-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    flex: 1;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 12px 0 40px;
}
@media (min-width: 960px) {
    .auth-layout-login, .auth-layout-wide { grid-template-columns: 1fr 1fr; }
    .auth-layout-compact { grid-template-columns: 1fr; max-width: 560px; }
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-card h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 4px; }
.auth-card > p { font-size: 0.92rem; margin-bottom: 4px; }

.auth-aside {
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-copy-panel {
    padding: clamp(24px, 4vw, 44px);
    border-radius: var(--radius-lg);
    background: linear-gradient(150deg, var(--navy-900), var(--navy-700));
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}
.auth-copy-panel .eyebrow { color: var(--gold-300); }
.auth-copy-panel h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.auth-copy-panel p { color: rgba(255, 255, 255, 0.78); }

.auth-metric-strip { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.auth-metric-strip span {
    display: inline-flex; align-items: baseline; gap: 6px;
    font-size: 0.76rem; color: rgba(255, 255, 255, 0.65); font-weight: 600;
}
.auth-metric-strip b { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-300); font-weight: 800; }

.mini-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.mini-list > * { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; }

/* device mock-up */
.device-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }
.device-shell {
    width: min(300px, 82vw);
    border-radius: 34px;
    padding: 16px;
    background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
    box-shadow: var(--shadow-navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 6px solid var(--navy-950);
}
.device-top { display: flex; justify-content: space-between; font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); padding: 0 4px; }
.signal-bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.signal-bars i { display: block; width: 3px; background: rgba(255, 255, 255, 0.7); border-radius: 1px; }
.signal-bars i:nth-child(1) { height: 5px; } .signal-bars i:nth-child(2) { height: 8px; } .signal-bars i:nth-child(3) { height: 11px; }

.device-brand { display: flex; align-items: center; gap: 10px; }
.device-brand img { width: 32px; height: 32px; border-radius: 8px; }
.device-brand div { display: flex; flex-direction: column; }
.device-brand span { font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); }
.device-brand strong { font-size: 0.92rem; }

.device-balance {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.device-balance > span { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.05em; }
.device-balance strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-300); margin-top: 4px; }
.device-actions { display: flex; gap: 8px; margin-top: 10px; }
.device-actions b { font-weight: 700; font-size: 0.74rem; background: rgba(219, 166, 44, 0.18); color: var(--gold-300); padding: 6px 12px; border-radius: 999px; }

.device-services { display: flex; justify-content: space-between; gap: 6px; }
.device-services span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.64rem; color: rgba(255, 255, 255, 0.75); }
.device-services svg { width: 17px; height: 17px; color: var(--gold-300); }

.device-list { display: flex; flex-direction: column; gap: 8px; }
.device-list > div { display: flex; justify-content: space-between; font-size: 0.76rem; padding: 8px 10px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.device-list strong { font-weight: 700; }
.device-list .positive { color: #43e0bb; }
.device-visual figcaption { font-size: 0.8rem; color: var(--muted); text-align: center; max-width: 260px; }

/* ---------------------------------------------------------------------
   14. PUBLIC LANDING PAGE
   --------------------------------------------------------------------- */
.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.public-nav-links { display: none; align-items: center; gap: 26px; }
.public-nav-links a { font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }
.public-nav-links a:hover, .public-nav-links a.is-active { color: var(--brand); }
.public-nav-actions { display: flex; gap: 10px; align-items: center; }
@media (min-width: 860px) { .public-nav-links { display: flex; } }

.public-main { max-width: 1240px; margin: 0 auto; padding: 0 18px; display: flex; flex-direction: column; gap: 64px; }

.landing-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
    padding: 40px 0 8px;
}
@media (min-width: 960px) { .landing-hero { grid-template-columns: 1.1fr 0.9fr; padding: 64px 0 20px; } }

.hero-copy[data-reveal] h1 {
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    margin-top: 10px;
    background: linear-gradient(120deg, var(--navy-900), var(--navy-600) 60%, var(--gold-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
:root[data-theme="dark"] .hero-copy h1 { background: linear-gradient(120deg, #fff, var(--gold-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { font-size: 1.02rem; margin-top: 14px; max-width: 52ch; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.hero-trust span { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.hero-trust svg { color: var(--success); }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* benefit slider */
.benefit-slider { display: flex; flex-direction: column; gap: 18px; }
.benefit-slider-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.benefit-slider-head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: 6px; }
.benefit-slider-controls { display: flex; gap: 8px; }
.benefit-slider-controls button {
    width: 30px; height: 6px; border-radius: 999px; border: none;
    background: var(--line-strong); padding: 0; transition: background 200ms ease, width 200ms ease;
}
.benefit-slider-controls button[aria-pressed="true"] { background: var(--gold-500); width: 42px; }

.benefit-slide-track { position: relative; min-height: 200px; }
.benefit-slide {
    display: none;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    box-shadow: var(--shadow-navy);
}
.benefit-slide.is-active { display: block; animation: rise 420ms var(--ease) both; }
.benefit-slide-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    background: rgba(219, 166, 44, 0.18); color: var(--gold-300); margin-bottom: 14px;
}
.benefit-slide-kicker { display: block; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-300); margin-bottom: 8px; }
.benefit-slide h3 { color: #fff; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.benefit-slide p { color: rgba(255, 255, 255, 0.78); margin-top: 10px; max-width: 56ch; }

.metric-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) { .metric-strip { grid-template-columns: repeat(4, 1fr); } }
.metric-strip > div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.metric-strip strong { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--brand); }
.metric-strip span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.metric-strip-premium { background: linear-gradient(135deg, var(--gold-100), var(--surface)); border-color: rgba(219, 166, 44, 0.35); }
:root[data-theme="dark"] .metric-strip-premium { background: linear-gradient(135deg, rgba(236, 193, 88, 0.08), var(--surface)); }

.section-block { display: flex; flex-direction: column; gap: 28px; }
.section-heading { max-width: 62ch; }
.section-heading h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 8px; }
.section-heading p { margin-top: 10px; font-size: 0.96rem; }

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 620px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold-400); }
.service-card strong { font-size: 1.02rem; }
.service-card > span:last-child { font-size: 0.85rem; color: var(--muted); }

.owner-band {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: clamp(24px, 4vw, 44px);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--navy-950), var(--navy-700));
    color: #fff;
    box-shadow: var(--shadow-navy);
}
.owner-band h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 8px; }
.owner-band p { color: rgba(255, 255, 255, 0.76); margin-top: 10px; max-width: 60ch; }
.owner-rail { display: flex; flex-wrap: wrap; gap: 10px; }
.owner-rail span {
    padding: 9px 16px; border-radius: 999px;
    background: rgba(219, 166, 44, 0.15); border: 1px solid rgba(219, 166, 44, 0.35);
    color: var(--gold-300); font-size: 0.82rem; font-weight: 700;
}

.security-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 860px) { .security-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.security-panel { display: flex; flex-direction: column; gap: 12px; }
.security-panel > div {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-radius: var(--radius-md);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.security-panel span { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.security-panel strong { font-size: 0.94rem; color: var(--brand); }

.landing-final-cta {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding: clamp(28px, 5vw, 52px);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--gold-500), var(--gold-600));
    color: var(--navy-950);
    box-shadow: var(--shadow-gold);
}
.landing-final-cta h2 { color: var(--navy-950); font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 8px; }
.landing-final-cta .eyebrow { color: rgba(10, 22, 51, 0.65); }
.landing-final-cta .button-outline-light { background: rgba(10, 22, 51, 0.08); color: var(--navy-950); border-color: rgba(10, 22, 51, 0.35); }
.landing-final-cta .button-outline-light:hover { background: rgba(10, 22, 51, 0.16); }

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 30px 18px 40px;
    max-width: 1240px;
    margin: 0 auto;
    border-top: 1px solid var(--line);
}
.site-footer > div { max-width: 44ch; display: flex; flex-direction: column; gap: 6px; }
.site-footer strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--brand); }
.site-footer span { font-size: 0.85rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.site-footer nav a { font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); }
.site-footer nav a:hover { color: var(--brand); }

/* ---------------------------------------------------------------------
   15. SERVICE PURCHASE / WALLET / ACCOUNT PAGE LAYOUTS
   --------------------------------------------------------------------- */
.service-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1020px) { .service-layout { grid-template-columns: 1.5fr 1fr; align-items: start; } }

.service-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
@media (min-width: 520px) { .service-mode-grid { grid-template-columns: repeat(4, 1fr); } }
.service-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.service-mode:hover { transform: translateY(-2px); }
.service-mode.is-active { border-color: var(--gold-500); background: var(--gold-100); }
:root[data-theme="dark"] .service-mode.is-active { background: rgba(236, 193, 88, 0.1); }
.service-mode strong { font-size: 0.88rem; }
.service-mode small { font-size: 0.74rem; color: var(--muted); }

.category-panel { border: 0; padding: 0; margin: 0 0 14px; display: none; }
.category-panel.is-active { display: flex; flex-direction: column; gap: 14px; }

.purchase-security-strip { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.purchase-security-strip span { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.purchase-security-strip svg { color: var(--gold-600); flex: 0 0 auto; margin-top: 2px; }

.confirmation-panel { position: sticky; top: 100px; }
.summary-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.summary-list > div { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.summary-list span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.summary-list strong { font-size: 0.9rem; }

.wallet-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .wallet-layout { grid-template-columns: 0.9fr 1.1fr; } }
.wallet-summary {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, var(--navy-900), var(--navy-700));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-navy);
}
.wallet-summary > span:first-child { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.wallet-summary strong { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.2rem); color: var(--gold-300); }
.wallet-command-grid { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.wallet-command-grid span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.72); }
.wallet-summary > div:last-child { display: flex; gap: 10px; margin-top: 8px; }

.bank-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    margin: 14px 0;
}
.bank-box > div { display: flex; justify-content: space-between; }
.bank-box span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.bank-box strong { font-size: 0.9rem; }

.account-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .account-grid { grid-template-columns: 1.4fr 1fr; } }
.upgrade-panel { background: linear-gradient(150deg, var(--navy-900), var(--navy-700)); color: #fff; border: none; }
.upgrade-panel .eyebrow { color: var(--gold-300); }
.upgrade-panel h2 { color: #fff; }
.upgrade-price { font-family: var(--font-display); font-size: 2rem; color: var(--gold-300); margin: 8px 0; display: block; }
.upgrade-panel .mini-list { color: rgba(255, 255, 255, 0.82); }

/* ---------------------------------------------------------------------
   16. TABLES (admin + transactions)
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--surface); }
thead th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    color: var(--muted);
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    font-size: 0.87rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
.amount-cell { font-family: var(--font-display); font-weight: 700; }

.table-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-action {
    padding: 7px 14px;
    border-radius: var(--radius-xs);
    background: var(--surface-2);
    color: var(--brand);
    font-weight: 700;
    font-size: 0.78rem;
    border: 1px solid var(--line);
}
.table-action:hover { background: var(--surface-3); }

/* ---------------------------------------------------------------------
   17. ADMIN GRIDS
   --------------------------------------------------------------------- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1100px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-grid > .panel:only-child, .admin-grid > .panel.panel-full { grid-column: 1 / -1; }

.admin-stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1000px) { .settings-grid { grid-template-columns: 1fr 1fr; } }

.pricing-rule-form { align-items: end; }

/* VA Script update/support controls */
.update-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 20px;
    align-items: start;
}

.update-hero .button { white-space: nowrap; }

.update-panel-primary {
    border-top: 3px solid var(--success);
}

.update-notice-panel {
    border-left: 4px solid var(--success);
}

.compact-state {
    margin: 14px 0 0;
    padding: 13px 15px;
    text-align: left;
}

.two-column-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.danger-panel {
    border-color: rgba(201, 51, 60, 0.22);
}

.danger-panel .form-grid {
    align-items: center;
}

.danger-panel .button-secondary {
    justify-content: center;
}

.form-grid .full-span {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .update-grid,
    .two-column-list {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------
   18. UTILITY / MISC
   --------------------------------------------------------------------- */
.icon { color: inherit; }
.positive { color: var(--teal-600); }
:root[data-theme="dark"] .positive { color: #43e0bb; }

@media (max-width: 480px) {
    .app-main { padding: 12px 10px 96px; }
    .panel { padding: 16px; }
    .topbar { padding: 12px 14px; gap: 10px; }
    .balance-chip strong { font-size: 0.86rem; }
}

/* print */
@media print {
    .sidebar, .mobile-tabbar, .theme-toggle, .topbar-actions { display: none !important; }
}
