/* ============================================================
   EXTREMEPAY — Modern Payment Gateway Design System
   Aurora-dark canvas · glass surfaces · gradient pill CTAs
   ============================================================ */
:root {
    /* Canvas & surfaces */
    --canvas: #05060b;
    --canvas-2: #090c14;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --surface-solid: #0d1119;
    --border: rgba(255, 255, 255, 0.09);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* Text */
    --ink: #f4f6fb;
    --ink-secondary: #9aa4b8;
    --muted: #5f6b81;
    --muted-strong: #76829a;

    /* Brand — violet → blue → cyan gradient system */
    --primary: #6366f1;
    --primary-2: #22d3ee;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.12);
    --primary-text: #ffffff;
    --grad-brand: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #22d3ee 100%);
    --grad-brand-soft: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(34,211,238,0.16));
    --glow-primary: 0 0 24px rgba(99, 102, 241, 0.35);

    /* Semantic */
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --info: #60a5fa;
    --info-light: rgba(96, 165, 250, 0.12);

    /* Legacy aliases (old pages reference these) */
    --canvas-dark: var(--canvas);
    --surface-card-dark: var(--surface);
    --on-dark: var(--ink);
    --body-on-dark: var(--ink-secondary);
    --hairline-on-dark: var(--border);
    --hairline-on-light: #e5e7eb;
    --canvas-light: #ffffff;
    --surface-soft-light: #fafafa;
    --trading-up: var(--success);
    --trading-down: var(--danger);

    /* Shapes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-glow: var(--glow-primary);
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.25);

    /* Type */
    --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Consolas', monospace;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: contain;
    position: relative;
}

/* Aurora backdrop — the signature canvas treatment */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(48rem 30rem at 12% -8%, rgba(99, 102, 241, 0.16), transparent 60%),
        radial-gradient(40rem 26rem at 92% 4%, rgba(34, 211, 238, 0.10), transparent 62%),
        radial-gradient(52rem 34rem at 50% 118%, rgba(59, 130, 246, 0.10), transparent 65%),
        var(--canvas);
    pointer-events: none;
}
/* Fine grid texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 100%);
    pointer-events: none;
}

a, button { -webkit-tap-highlight-color: rgba(99, 102, 241, 0.25); }

::selection { background: rgba(99, 102, 241, 0.4); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Top navigation (glass) ---------- */
.top-nav {
    height: 64px;
    background: rgba(5, 6, 11, 0.65);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.top-nav .nav-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--ink);
    text-decoration: none;
    text-transform: uppercase;
}
.wordmark::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--grad-brand);
    box-shadow: var(--glow-primary);
    flex: none;
}
.wordmark:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-link {
    color: var(--ink-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: var(--transition);
}
.nav-link:hover { color: var(--ink); }
.nav-link .chip { margin-left: 4px; }

/* Hamburger */
.nav-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-hamburger:active { transform: scale(0.9); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius-md);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--grad-brand);
    color: var(--primary-text);
    height: 44px;
    padding: 0 22px;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    box-shadow: 0 0 32px rgba(99, 102, 241, 0.5), 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    filter: brightness(1.1);
}
.btn-primary:disabled { background: var(--surface-hover); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; filter: none; }
.btn-block { width: 100%; }

.btn-ghost {
    background: transparent;
    color: var(--ink-secondary);
    height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--ink);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
.btn-secondary-dark {
    background: var(--surface);
    color: var(--ink);
    height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-secondary-dark:hover {
    background: var(--surface-hover);
    border-color: rgba(99, 102, 241, 0.45);
    color: #fff;
}
.btn-mini { height: 32px; padding: 0 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-light); }

/* Minimal top bar shown above the split-screen auth shell */
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 18px 24px;
}
@media (max-width: 900px) {
    .auth-topbar { padding: 14px 16px; }
}

/* ---------- Auth layout (split screen) ---------- */
.auth-wrap {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
}
/* Logged-in single-column variant (e.g. change-password): centered card, no rail */
.auth-wrap:has(> .auth-card) {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 24px;
}
/* Left brand rail — hidden below 900px */
.auth-rail {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    border-right: 1px solid var(--border-light);
    overflow: hidden;
    background:
        radial-gradient(38rem 26rem at 18% 0%, rgba(99, 102, 241, 0.22), transparent 62%),
        radial-gradient(32rem 22rem at 88% 100%, rgba(34, 211, 238, 0.14), transparent 62%),
        var(--canvas-2);
}
.auth-rail::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 20%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 20%, transparent 90%);
    pointer-events: none;
}
.auth-rail-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--ink);
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.auth-rail-logo::before {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--grad-brand);
    box-shadow: var(--glow-primary);
    flex: none;
}
.auth-rail-quote { position: relative; z-index: 1; max-width: 420px; }
.auth-rail-quote h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}
.auth-rail-quote h2 em {
    font-style: normal;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.auth-rail-quote p { color: var(--ink-secondary); font-size: 14px; }
.auth-rail-meta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    color: var(--ink-secondary);
    font-size: 12.5px;
}
.auth-rail-meta strong {
    display: block;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    margin-bottom: 2px;
}
/* Right form panel */
.auth-panel {
    display: flex;
    justify-content: center;
    padding: 48px 24px;
    overflow-y: auto;
}
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; justify-content: center; }
.auth-card h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}
.auth-sub { color: var(--ink-secondary); margin-bottom: 24px; font-size: 14px; }
.auth-alt { margin-top: 24px; color: var(--ink-secondary); text-align: center; font-size: 13.5px; }
.auth-alt a { color: var(--primary-hover); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { color: var(--primary-2); }
.auth-note {
    margin-top: 32px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 12px;
    line-height: 1.55;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.auth-note::before {
    content: '';
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 1px;
    border-radius: 50%;
    background:
        no-repeat center / 10px 10px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-rail { display: none; }
    .auth-panel { padding: 32px 16px 64px; }
    .auth-wrap:has(> .auth-card) { padding: 32px 16px 64px; }
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--ink-secondary);
    letter-spacing: 0.2px;
}
.input-wrap { position: relative; }
.text-input {
    width: 100%;
    height: 46px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.text-input::placeholder { color: var(--muted); }
.text-input:hover { border-color: var(--border-strong); }
.text-input:focus {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}
.text-input.has-toggle { padding-right: 52px; }
.hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.toggle-pass {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 40px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted-strong);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
}
.toggle-pass:hover { color: var(--primary-hover); }
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--ink-secondary);
}
.check-row input {
    margin-top: 3px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    flex: none;
}
.check-row a { color: var(--primary-hover); text-decoration: none; font-weight: 500; }
.check-row a:hover { text-decoration: underline; }

/* OTP code input */
.otp-input {
    width: 100%;
    height: 54px;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 10px;
    text-align: center;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.otp-input:focus {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-error   { color: var(--danger);  background: var(--danger-light);  border-color: rgba(248,113,113,0.25); }
.alert-success { color: var(--success); background: var(--success-light); border-color: rgba(52,211,153,0.25); }
.alert-info    { color: var(--info);    background: var(--info-light);    border-color: rgba(96,165,250,0.25); }
.alert a { color: inherit; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
    padding: 28px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    border-top: 1px solid var(--border-light);
}
.site-footer a { color: var(--muted-strong); text-decoration: none; margin: 0 8px; }
.site-footer a:hover { color: var(--primary-hover); }

/* ---------- Dashboard ---------- */
.dash-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}
.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}
.dash-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; color: var(--ink); }
.dash-head .auth-sub { margin-bottom: 0; margin-top: 4px; }

/* ---------- Stat cards (glass) ---------- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: var(--transition);
}
.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 24px rgba(99,102,241,0.08);
}
.balance-card { padding: 26px; }
.stat-card .balance-label {
    color: var(--ink-secondary);
    font-size: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.stat-card .balance-value {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.balance-note { color: var(--muted-strong); font-size: 12px; margin-top: 10px; line-height: 1.6; }
.quick-actions { display: flex; gap: 10px; margin-top: 18px; }
.quick-actions .btn { flex: 1; min-height: 44px; }

/* ---------- Chips / badges ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}
.chip-ok   { color: var(--success); background: var(--success-light); border-color: rgba(52,211,153,0.25); }
.chip-warn { color: var(--warning); background: var(--warning-light); border-color: rgba(251,191,36,0.25); }
.chip-fail { color: var(--danger);  background: var(--danger-light);  border-color: rgba(248,113,113,0.25); }

/* ---------- Cards ---------- */
.card {
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 14px;
}
.card-light {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.card-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--ink-secondary);
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 500;
    font-size: 13px;
}
.avatar {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-brand);
    color: var(--primary-text);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--glow-primary);
}

/* ---------- KV table ---------- */
.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv-table th {
    text-align: left;
    font-weight: 400;
    color: var(--ink-secondary);
    padding: 10px 0;
    vertical-align: top;
    white-space: nowrap;
    width: 40%;
}
.kv-table td { padding: 10px 0; word-break: break-word; color: var(--ink); }
.mono { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Check list ---------- */
.check-list { list-style: none; font-size: 13px; }
.check-list li { padding: 8px 0 8px 24px; position: relative; color: var(--ink-secondary); }
.check-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.check-list li.ok::before { background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.check-list li.warn::before { background: var(--warning); box-shadow: 0 0 8px rgba(251,191,36,0.5); }

/* ---------- Dashboard grid ---------- */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    align-items: start;
}

/* ---------- Transaction table ---------- */
.tx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tx-table th {
    text-align: left;
    color: var(--ink-secondary);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}
.tx-table td { padding: 12px; border-bottom: 1px solid var(--border-light); color: var(--ink); }
.tx-table tr:last-child td { border-bottom: none; }
.tx-table tr:hover td { background: var(--surface-hover); }
.tx-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt-up   { color: var(--success); }
.amt-down { color: var(--danger); }

/* ---------- Admin grid ---------- */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.admin-grid .balance-card { margin-bottom: 0; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.admin-stats .card { margin-bottom: 0; }
.kv-label { color: var(--ink-secondary); font-size: 13px; margin-bottom: 4px; }
.stat-num {
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 700;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
select.text-input { appearance: auto; cursor: pointer; }
select.text-input option { background: var(--surface-solid); color: var(--ink); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 16px;
}
.fee-input { width: 90px; height: 32px; padding: 4px 8px; font-size: 13px; }

/* ---------- Search form ---------- */
.search-form {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-form input[type="text"] {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    max-width: 280px;
    height: 40px;
    outline: none;
    background: var(--surface);
    color: var(--ink);
    transition: var(--transition);
    -webkit-appearance: none;
    font-family: inherit;
}
.search-form input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

/* ---------- Dropdown ---------- */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
    min-width: 150px;
    background: rgba(13, 17, 25, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 6px;
    margin-top: 4px;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--ink);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary-hover); }
.dropdown-item-danger { color: var(--danger); }
.dropdown-item-danger:hover { background: var(--danger-light); color: var(--danger); }

/* ---------- Mobile Optimizations ---------- */
@media (max-width: 900px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-head { flex-direction: column; gap: 8px; }
    .quick-actions { flex-wrap: wrap; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .tx-table td, .tx-table th { padding: 8px 6px; font-size: 12px; }
}

@media (max-width: 640px) {
    .top-nav .nav-inner { padding: 0 14px; }
    .nav-hamburger { display: flex; }
    .nav-actions {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(13, 17, 25, 0.97);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 16px;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        z-index: 99;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .nav-actions.open { display: flex; }
    .nav-actions .nav-link { width: 100%; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--border-light); }
    .nav-actions .nav-user { width: 100%; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--border-light); }
    .nav-actions .btn { width: 100%; min-height: 44px; }
    .nav-user { font-size: 12px; gap: 6px; }
    .avatar { width: 28px; height: 28px; font-size: 11px; }
    .wordmark { font-size: 13px; }

    .dash-main { padding: 20px 14px; }
    .dash-head h1 { font-size: 20px; }

    .stat-card { padding: 18px; border-radius: var(--radius-md); }
    .balance-card { padding: 20px; }
    .stat-card .balance-value { font-size: 25px; }
    .balance-note { font-size: 11px; }
    .quick-actions .btn { min-height: 48px; font-size: 14px; }

    .card { padding: 18px; border-radius: var(--radius-md); }
    .card-title { font-size: 11px; margin-bottom: 12px; }

    .admin-grid { grid-template-columns: 1fr; gap: 8px; }
    .admin-stats { grid-template-columns: 1fr 1fr; gap: 8px; }

    .tx-table { font-size: 12px; }
    .tx-table th { font-size: 10px; padding: 8px 4px; }
    .tx-table td { padding: 8px 4px; }

    .btn-ghost { height: 38px; padding: 0 12px; font-size: 12px; }
    .btn-secondary-dark { height: 44px; padding: 0 16px; }

    .form-grid { grid-template-columns: 1fr; }
    .search-form { flex-wrap: wrap; }
    .search-form input[type="text"] { max-width: 100%; flex: 1; }
}

@media (max-width: 400px) {
    .dash-head { margin-bottom: 16px; }
    .stat-card .balance-value { font-size: 22px; }
    .admin-stats { grid-template-columns: 1fr; }
}

/* Smooth page transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.dash-main { animation: fadeIn 0.35s ease-out; }
.auth-card { animation: riseIn 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

/* Touch-friendly scroll */
@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-ghost { min-height: 40px; }
    .btn-mini { min-height: 36px; }
    .tx-table td { padding: 12px 8px; }
    .tx-table tr:hover td { background: transparent; }
}
