/* ==========================================================================
   GPay — design system
   ========================================================================== */

:root {
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;

    --bg: #f3f5fa;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f4f9;
    --border: #e5e8f0;
    --border-strong: #d3d9e4;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #8a94a8;

    --primary: #4f46e5;
    --primary-600: #4338ca;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --ring: rgba(79, 70, 229, .18);
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #c026d3 120%);
    --grad-soft: linear-gradient(135deg, rgba(79, 70, 229, .10), rgba(124, 58, 237, .06));

    --success: #059669;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --danger: #e11d48;
    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --info: #0369a1;
    --info-bg: #f0f9ff;
    --info-border: #bae6fd;
    --violet: #7c3aed;
    --violet-bg: #f5f3ff;

    --sidebar-bg: #0b1020;
    --sidebar-text: #94a3b8;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0e1a;
        --surface: #111827;
        --surface-2: #151d2e;
        --surface-3: #1a2336;
        --border: #232d42;
        --border-strong: #2f3a52;
        --text: #e6eaf2;
        --text-2: #a7b0c2;
        --text-3: #6f7a90;

        --primary: #818cf8;
        --primary-600: #a5b4fc;
        --primary-50: rgba(129, 140, 248, .12);
        --primary-100: rgba(129, 140, 248, .22);
        --ring: rgba(129, 140, 248, .28);
        --grad-soft: linear-gradient(135deg, rgba(129, 140, 248, .14), rgba(167, 139, 250, .06));

        --success: #34d399;
        --success-bg: rgba(52, 211, 153, .10);
        --success-border: rgba(52, 211, 153, .30);
        --danger: #fb7185;
        --danger-bg: rgba(251, 113, 133, .10);
        --danger-border: rgba(251, 113, 133, .30);
        --warning: #fbbf24;
        --warning-bg: rgba(251, 191, 36, .10);
        --warning-border: rgba(251, 191, 36, .30);
        --info: #38bdf8;
        --info-bg: rgba(56, 189, 248, .10);
        --info-border: rgba(56, 189, 248, .30);
        --violet: #a78bfa;
        --violet-bg: rgba(167, 139, 250, .12);

        --sidebar-bg: #070a14;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
p { margin: 0 0 12px; }
svg { flex-shrink: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

.icon { width: 18px; height: 18px; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- app shell ---------- */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 268px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    z-index: 50;
    overflow-y: auto;
    transition: transform .22s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 10px 22px;
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -.02em;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--grad);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(124, 58, 237, .45);
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: #64748b; letter-spacing: 0; }

.nav-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #4b5671;
    padding: 18px 12px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(148, 163, 184, .08); color: #e2e8f0; text-decoration: none; }
.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, .28), rgba(124, 58, 237, .10));
    color: #fff;
    box-shadow: inset 3px 0 0 #a5b4fc;
}
.nav-link .count {
    margin-left: auto;
    min-width: 22px;
    text-align: center;
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.sidebar-footer { margin-top: auto; padding-top: 18px; }

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(148, 163, 184, .07);
    border: 1px solid rgba(148, 163, 184, .10);
}
.user-card .who { min-width: 0; flex: 1; }
.user-card .who strong { display: block; color: #e2e8f0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who span { display: block; font-size: 11.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.icon-btn:hover { background: rgba(148, 163, 184, .14); }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13.5px;
    flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

.main { margin-left: 268px; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 36px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar h1 { font-size: 21px; font-weight: 700; }
.topbar .subtitle { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.topbar .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.menu-toggle { display: none; color: var(--text); border: 1px solid var(--border); background: var(--surface); }

.content { padding: 28px 36px 64px; width: 100%; max-width: 1240px; }

.backdrop { display: none; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .5); z-index: 45; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: 14px 16px; }
    .topbar .actions .btn span { display: none; }
    .content { padding: 20px 16px 48px; }
}

/* ---------- layout helpers ---------- */

.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-kpi { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.layout-side { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.layout-side .sticky { position: sticky; top: 92px; }
@media (max-width: 1100px) {
    .layout-side { grid-template-columns: minmax(0, 1fr); }
    .layout-side .sticky { position: static; }
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.muted { color: var(--text-3); }
.soft { color: var(--text-2); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.break { word-break: break-word; overflow-wrap: anywhere; }

/* ---------- cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.card-flush .card-head { padding: 18px 22px 0; margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 650; }
.card-title .icon { color: var(--primary); }
.card-desc { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.card-foot { border-top: 1px solid var(--border); padding: 14px 22px; background: var(--surface-2); }

.section-title { font-size: 15px; font-weight: 650; margin: 6px 0 12px; }

/* ---------- hero / balances ---------- */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 28px;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 18px 40px rgba(79, 70, 229, .28);
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
}
.hero::before { width: 260px; height: 260px; right: -60px; top: -110px; }
.hero::after { width: 180px; height: 180px; right: 140px; bottom: -120px; background: rgba(255, 255, 255, .06); }
.hero > * { position: relative; z-index: 1; }
.hero h2 { font-size: 24px; font-weight: 700; }
.hero p { color: rgba(255, 255, 255, .82); margin: 6px 0 0; }
.hero .hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero .btn-light { background: #fff; color: #3730a3; }
.hero .btn-light:hover { background: #eef2ff; }
.hero .btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); }
.hero .btn-glass:hover { background: rgba(255, 255, 255, .22); }

.balance-card {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.balance-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.balance-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.balance-card .label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.balance-card .name { font-weight: 650; }
.balance-card .amount { font-size: 26px; font-weight: 750; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.balance-card .amount small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 6px; letter-spacing: 0; }
.balance-card .glow { position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; opacity: .08; }
.balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.balance-actions .btn { padding: 0 8px; min-width: 0; }

/* ---------- currency coins ---------- */

.coin {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 750;
    font-size: 17px;
    color: #fff;
    background: #64748b;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.coin-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.coin-INR { background: linear-gradient(135deg, #fb923c, #ea580c); }
.coin-PKR { background: linear-gradient(135deg, #22c55e, #15803d); }
.coin-BDT { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.coin-USDT { background: linear-gradient(135deg, #34d399, #1a7f5f); }
.glow-INR { background: #ea580c; }
.glow-PKR { background: #16a34a; }
.glow-BDT { background: #0d9488; }
.glow-USDT { background: #26a17b; }

/* ---------- KPI ---------- */

.kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
a.kpi:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.kpi-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi-value { font-size: 24px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.tone-primary { background: var(--primary-50); color: var(--primary); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, box-shadow .15s, transform .05s, opacity .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn:disabled, .btn.is-loading { opacity: .65; cursor: not-allowed; }
.btn .icon { width: 17px; height: 17px; }

.btn-primary { background: var(--grad); box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(79, 70, 229, .38); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { filter: brightness(.95); }
.btn-success { background: var(--success); }
.btn-soft-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }

.btn.is-loading::after {
    content: "";
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }
.field > label, .label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row .label { margin-bottom: 7px; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14.5px;
    transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 11px 14px; resize: vertical; }
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }

.input-lg { height: 56px !important; font-size: 22px !important; font-weight: 700; letter-spacing: -.01em; }

.affix { position: relative; }
.affix .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-weight: 700;
    pointer-events: none;
}
.affix .suffix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.affix input { padding-left: 64px; }
.affix.has-suffix input { padding-right: 84px; }
.affix-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--primary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.affix-btn:hover { background: var(--primary-50); }

.hint { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
.error-text { display: flex; gap: 6px; align-items: center; color: var(--danger); font-size: 12.5px; font-weight: 500; margin-top: 6px; }

.checkbox { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--primary); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch input {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 25px;
    border-radius: 999px;
    background: var(--border-strong);
    position: relative;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}
.switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s;
}
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(19px); }
.switch input:focus-visible { box-shadow: 0 0 0 4px var(--ring); outline: none; }
.switch small { display: block; font-weight: 400; color: var(--text-3); font-size: 12.5px; }

.reveal { position: relative; }
.reveal input { padding-right: 46px; }
.reveal .icon-btn { position: absolute; right: 4px; top: 4px; color: var(--text-3); }
.reveal .icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* option tiles (radio cards) */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { position: relative; display: block; margin: 0; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.tile-body:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tile input:checked + .tile-body { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 4px var(--ring); }
.tile input:focus-visible + .tile-body { outline: 2px solid var(--primary); outline-offset: 2px; }
.tile-title { font-weight: 650; font-size: 14px; line-height: 1.25; }
.tile-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tile .check {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    display: grid;
    place-items: center;
    color: transparent;
}
.tile input:checked + .tile-body .check { background: var(--primary); border-color: var(--primary); color: #fff; }
.tile .check svg { width: 12px; height: 12px; }

/* method chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .15s;
}
.chip span:hover { border-color: var(--border-strong); }
.chip input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.m-UPI { background: #2563eb; }
.m-JAZZCASH { background: #dc2626; }
.m-EASYPAISA { background: #16a34a; }
.m-BKASH { background: #db2777; }
.m-NAGAD { background: #ea580c; }
.m-AUTO { background: linear-gradient(135deg, #6366f1, #a855f7); }

/* ---------- alerts ---------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px 13px 16px;
    border-radius: 13px;
    border: 1px solid;
    margin-bottom: 18px;
    font-size: 14px;
    animation: slide-in .25s ease;
}
.alert .icon { margin-top: 1px; }
.alert .body { flex: 1; min-width: 0; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert .close { margin: -6px -6px -6px 0; width: 30px; height: 30px; color: inherit; opacity: .6; }
.alert .close:hover { opacity: 1; background: transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 13px;
    background: var(--grad-soft);
    border: 1px solid var(--primary-100);
    color: var(--text-2);
    font-size: 13.5px;
}
.callout .icon { color: var(--primary); margin-top: 1px; }

/* ---------- badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    line-height: 1.6;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot { padding-left: 10px; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--surface-3); color: var(--text-2); }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-pulse::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
    text-align: left;
    padding: 11px 18px;
    font-size: 11.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cell-main { font-weight: 600; }
.table .cell-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.table tr.clickable { cursor: pointer; }

.tx-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.tx-in { background: var(--success-bg); color: var(--success); }
.tx-out { background: var(--violet-bg); color: var(--violet); }
.amount-in { color: var(--success); font-weight: 650; }
.amount-out { color: var(--text); font-weight: 650; }

/* ---------- definition lists ---------- */

.dl { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; margin: 0; }
.dl dt, .dl dd { padding: 11px 0; border-bottom: 1px dashed var(--border); margin: 0; }
.dl dt { color: var(--text-3); font-size: 13px; padding-right: 16px; }
.dl dd { font-weight: 500; word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
@media (max-width: 640px) {
    .dl { grid-template-columns: 1fr; }
    .dl dt { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- transaction hero + stepper ---------- */

.tx-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tx-hero .tx-icon { width: 56px; height: 56px; border-radius: 16px; }
.tx-hero .tx-icon .icon { width: 26px; height: 26px; }
.tx-hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tx-hero .big small { font-size: 15px; color: var(--text-3); font-weight: 650; margin-left: 6px; letter-spacing: 0; }

.steps { display: flex; margin: 26px 0 4px; padding: 0; list-style: none; }
.step { flex: 1; position: relative; text-align: center; padding: 0 6px; }
.step::before {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(-50% + 20px);
    right: calc(50% + 20px);
    height: 2px;
    background: var(--border);
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before, .step.failed::before { background: var(--primary); }
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-3);
    position: relative;
    z-index: 1;
}
.step-dot .icon { width: 15px; height: 15px; }
.step.done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.current .step-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px var(--ring); }
.step.failed .step-dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.step-title { font-size: 13px; font-weight: 650; }
.step-time { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 640px) {
    .steps { flex-direction: column; gap: 14px; }
    .step { display: flex; align-items: center; gap: 12px; text-align: left; }
    .step::before { display: none; }
    .step-dot { margin: 0; }
}

/* ---------- empty state ---------- */

.empty { text-align: center; padding: 44px 20px; }
.empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--grad-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border: 1px solid var(--primary-100);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { color: var(--text-3); max-width: 380px; margin: 0 auto 18px; }

/* ---------- segmented / tabs ---------- */

.segmented {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-3);
    border: 1px solid var(--border);
}
.segmented a {
    padding: 7px 14px;
    border-radius: 9px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
}
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { margin-bottom: 0; min-width: 150px; flex: 1; }
.filters .field.grow { flex: 2; min-width: 200px; }

/* ---------- summary panel ---------- */

.summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.summary-row + .summary-row { border-top: 1px dashed var(--border); }
.summary-row span:first-child { color: var(--text-3); }
.summary-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.summary-total { font-size: 18px; }

.trust { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.trust div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.trust .icon { color: var(--success); width: 16px; height: 16px; margin-top: 2px; }

/* ---------- code ---------- */

pre, .code {
    margin: 0;
    background: #0b1020;
    color: #c7d2fe;
    border-radius: 12px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
}
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 6px 6px 12px; }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* ---------- pagination ---------- */

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* ---------- auth ---------- */

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
    position: relative;
    overflow: hidden;
    padding: 44px 52px;
    color: #fff;
    background: radial-gradient(1200px 600px at -10% -10%, #6366f1 0%, transparent 55%), radial-gradient(900px 500px at 110% 110%, #c026d3 0%, transparent 50%), #0b1020;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
}
.auth-brand .brand { padding: 0; font-size: 22px; }
.auth-brand h2 { font-size: 38px; line-height: 1.12; font-weight: 800; letter-spacing: -.035em; max-width: 470px; }
.auth-brand h2 span { background: linear-gradient(90deg, #a5b4fc, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand .lead { color: #a5b4fc; font-size: 16px; margin-top: 16px; max-width: 440px; }
.auth-features { display: grid; gap: 14px; }
.auth-feature { display: flex; gap: 14px; align-items: flex-start; }
.auth-feature .fi { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); display: grid; place-items: center; color: #c7d2fe; }
.auth-feature strong { display: block; color: #fff; font-size: 14.5px; }
.auth-feature span { color: #94a3b8; font-size: 13px; }
.auth-coins { display: flex; gap: 8px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.auth-card .sub { color: var(--text-3); margin: 6px 0 28px; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.auth-mobile-brand .brand { color: var(--text); padding: 0; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--text-3); font-size: 13.5px; }
@media (max-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-brand { display: none; }
    .auth-mobile-brand { display: block; }
}

/* ---------- error pages ---------- */

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-code {
    font-size: 96px;
    font-weight: 850;
    letter-spacing: -.05em;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-page h1 { font-size: 24px; margin: 14px 0 8px; }
.error-page p { color: var(--text-3); max-width: 420px; margin: 0 auto 24px; }

/* ---------- misc ---------- */

.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }

.pill-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
