/* ============================================================
   EasyMetaX — Main CSS (Design System)
   Shared across public site, user portal and admin panel.
   Theme: Deep Ink + Signature Gold
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Brand — navy + electric blue with a yellow accent (matches the brand banner).
       The legacy --gold-* token names are kept as aliases for the blue brand set. */
    --primary: #2E7BFF;
    --primary-dark: #1B5FE0;
    --primary-deep: #1B4FD8;         /* blue that stays readable on white */
    --primary-light: #EAF2FF;
    --primary-tint: #D6E6FF;
    --gold-grad: linear-gradient(135deg, #5AA8FF 0%, #2E7BFF 46%, #1B5FE0 100%);
    --gold-grad-soft: linear-gradient(135deg, #F2F7FF 0%, #E3EEFF 100%);
    --gold-glow: rgba(46, 123, 255, .28);

    /* Yellow accent — announcements, highlights, streaks, premium chips */
    --accent: #FFD400;
    --accent-dark: #E6BE00;
    --accent-light: #FFF7D6;
    --accent-ink: #3A2E00;
    --accent-glow: rgba(255, 212, 0, .3);

    /* Ink — deep navy app surfaces */
    --ink-900: #071A3A;
    --ink-800: #0A2247;
    --ink-700: #0E2A55;
    --ink-grad: linear-gradient(165deg, #0B264F 0%, #051530 58%, #0A2145 100%);
    --ink-grad-2: linear-gradient(150deg, #103261 0%, #071A3A 70%);

    /* Neutrals */
    --ink: #0B1B33;
    --text: #0B1B33;
    --text-light: #5A6B85;
    --text-soft: #8C9BB2;
    --background: #FFFFFF;
    --background-alt: #F5F8FF;
    --surface: #FFFFFF;
    --surface-2: #EEF3FB;
    --surface-3: #E3EAF5;
    --border: #DCE4F0;
    --border-light: #EBF0F8;

    /* Status */
    --secondary: #667085;
    --success: #067647;
    --success-light: #ECFDF3;
    --warning: #B54708;
    --warning-light: #FFFAEB;
    --danger: #B42318;
    --danger-light: #FEF3F2;
    --info: #1B4FD8;
    --info-light: #EAF2FF;

    /* Layout — 8-point rhythm */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
    --shadow-lg: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 18px 40px -16px rgba(16, 24, 40, .18);
    --shadow-xl: 0 24px 60px -20px rgba(16, 24, 40, .28);
    --shadow-gold: 0 10px 26px -10px rgba(27, 95, 224, .55);

    --container: 1200px;
    --gutter: 24px;
    --section: 72px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-deep); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 800;
    line-height: 1.22;
    margin: 0;
    letter-spacing: -.025em;
}

code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: .875em;
    color: var(--ink);
}

.text-gold { color: var(--primary-deep); }

/* Numeric alignment for money */
.stat-value, .wallet-amount, .balance-amount, .reward-value, .amount-value,
.stat-badge, .task-reward, .reward-amount, .claim-amount, .breakdown-amount,
.data-table .positive, .data-table .negative {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink-900);
    color: #fff;
    padding: 10px 20px;
    z-index: 999;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.01em;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none !important;
    position: relative;
    transition: transform .16s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    white-space: nowrap;
    user-select: none;
}

.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

.btn-primary {
    background: var(--gold-grad);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
    color: #FFFFFF;
    filter: brightness(1.04);
    box-shadow: 0 14px 32px -10px rgba(27, 95, 224, .68);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--gold-glow);
}

.btn-dark {
    background: var(--ink-900);
    color: #fff;
    border-color: var(--ink-900);
}
.btn-dark:hover { background: var(--ink-700); border-color: var(--ink-700); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.btn-light {
    background: #fff;
    color: var(--ink-900);
    border-color: #fff;
}
.btn-light:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--ink-900);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.btn-success:hover { background: #05603a; border-color: #05603a; color: #fff; box-shadow: var(--shadow); }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { background: #912018; border-color: #912018; color: #fff; box-shadow: var(--shadow); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-block { width: 100%; }

.btn-lg { min-height: 54px; padding: 15px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-xl { min-height: 58px; padding: 17px 40px; font-size: 17px; border-radius: var(--radius); }
.btn-sm { min-height: 38px; padding: 8px 15px; font-size: 13.5px; border-radius: var(--radius-xs); }

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 42px; height: 42px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.btn-icon:hover { border-color: var(--primary); color: var(--ink); box-shadow: 0 0 0 4px var(--gold-glow); }
.btn-icon svg { width: 19px; height: 19px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.required { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 50px;
    padding: 13px 16px;
    font-family: var(--font);
    font-size: 15px;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .18s, box-shadow .18s, background .18s;
    appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-soft); }

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
    cursor: pointer;
}

textarea { resize: vertical; min-height: 108px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px var(--gold-glow);
}

.form-hint {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

.field-error {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--danger);
    margin-top: 6px;
}

.field-error::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-right: 6px;
    vertical-align: -2px;
}

input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }
.form-row .form-group[style*="flex: 2"] { flex: 2; }
.form-row.align-center { align-items: flex-end; }

.checkbox-group {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
}
.checkbox-group input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-dark);
    cursor: pointer;
    flex-shrink: 0;
}
.checkbox-group label { font-weight: 400; font-size: 14px; cursor: pointer; margin: 0; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 22px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.card-header h2 { font-size: 18px; }

.card-body { padding: 24px; }
.card-body.p-0 { padding: 0; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-pending, .badge-pending_approval, .badge-processing {
    background: var(--warning-light);
    color: var(--warning);
    border-color: rgba(181, 71, 8, .14);
}
.badge-approved, .badge-success, .badge-active, .badge-completed, .badge-verified {
    background: var(--success-light);
    color: var(--success);
    border-color: rgba(6, 118, 71, .14);
}
.badge-rejected, .badge-danger, .badge-suspended, .badge-blocked {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(180, 35, 24, .14);
}
.badge-info, .badge-not_submitted, .badge-pending_payment, .badge-locked {
    background: var(--info-light);
    color: var(--primary-deep);
    border-color: rgba(138, 106, 18, .14);
}
.badge-secondary, .badge-in_process {
    background: var(--surface-2);
    color: var(--text-light);
    border-color: var(--border);
}

/* ---------- Tables ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 640px;
}

.data-table th {
    text-align: left;
    padding: 13px 16px;
    background: var(--surface-2);
    color: var(--text-light);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--primary-light); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr.inactive { opacity: .55; }

.positive { color: var(--success); font-weight: 600; }
.negative { color: var(--danger); font-weight: 600; }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

/* ---------- Stats Grid ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gold-grad);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-tint);
    transform: translateY(-2px);
}

.stat-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary-deep);
}
.stat-icon svg { width: 21px; height: 21px; }

.stat-icon.wallet { background: var(--primary-light); color: var(--primary-deep); }
.stat-icon.coins, .stat-icon.earnings { background: var(--warning-light); color: var(--warning); }
.stat-icon.referrals, .stat-icon.active { background: var(--success-light); color: var(--success); }
.stat-icon.tasks { background: var(--primary-light); color: var(--primary-deep); }
.stat-icon.pending { background: var(--warning-light); color: var(--warning); }
.stat-icon.cashback, .stat-icon.verified, .stat-icon.withdrawn { background: var(--danger-light); color: var(--danger); }

.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.stat-label {
    font-size: 12.5px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -.02em;
}

/* Reserve bottom room so the absolutely-positioned caption can never
   collide with a wrapped value (e.g. "Rs. 0.00" + "Platform liability"). */
.stat-card:has(.stat-change) { padding-bottom: 30px; }

.stat-change {
    position: absolute;
    bottom: 9px;
    right: 16px;
    max-width: calc(100% - 32px);
    font-size: 11.5px;
    line-height: 1.3;
    text-align: right;
    color: var(--text-light);
}
.stat-change.positive { color: var(--success); }
.stat-change.neutral { color: var(--text-light); }

/* ---------- Sections ---------- */
.section { margin-bottom: var(--section); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.section-header h2 { font-size: 20px; }

/* ---------- Flash Messages ---------- */
.flash-message {
    margin: 0 0 22px;
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 500;
    border: 1px solid transparent;
    animation: flashIn .3s cubic-bezier(.2, .8, .2, 1);
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--success-light); color: var(--success); border-color: rgba(6, 118, 71, .2); }
.flash-error, .flash-danger { background: var(--danger-light); color: var(--danger); border-color: rgba(180, 35, 24, .2); }
.flash-info, .flash-warning { background: var(--info-light); color: var(--primary-deep); border-color: rgba(138, 106, 18, .22); }

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0 4px;
    opacity: .7;
}
.flash-close:hover { opacity: 1; }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    color: var(--text-light);
}
.empty-state svg {
    width: 46px; height: 46px;
    margin: 0 auto 16px;
    opacity: .35;
}
.empty-state p { margin-bottom: 10px; font-size: 15px; }
.empty-state .empty-hint { font-size: 14px; }
.empty-state.small { padding: 24px; }
.empty-state.small p { font-size: 14px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination-info { font-size: 14px; color: var(--text-light); }

/* ---------- Filter Tabs ---------- */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none !important;
    transition: all .18s;
    cursor: pointer;
}

.filter-tab:hover { border-color: var(--primary); color: var(--primary-deep); background: var(--primary-light); }

.filter-tab.active {
    background: var(--ink-900);
    border-color: var(--ink-900);
    color: #fff;
    box-shadow: var(--shadow);
}

.tab-count {
    background: var(--surface-2);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.filter-tab.active .tab-count { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Upload Areas ---------- */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all .18s;
    background: var(--background-alt);
}

.file-upload-area:hover, .file-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-placeholder svg {
    width: 40px; height: 40px;
    color: var(--text-soft);
    margin: 0 auto 8px;
}

.upload-placeholder p { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.upload-placeholder small { color: var(--text-light); }

.upload-preview { position: relative; display: inline-block; max-width: 100%; }

.upload-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: 2px solid var(--surface);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
}

/* ---------- Progress Bars ---------- */
.progress-bar {
    height: 8px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold-grad);
    border-radius: 999px;
    transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Password Fields & Strength ---------- */
.password-field { position: relative; }
.password-field input { padding-right: 48px; }

.password-toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    display: grid;
    place-items: center;
    border-radius: 8px;
}
.password-toggle:hover { color: var(--ink); background: var(--surface-2); }
.password-toggle svg { width: 18px; height: 18px; }
.eye-closed { display: none; }
.password-field.show-password .eye-open { display: none; }
.password-field.show-password .eye-closed { display: block; }

.password-strength { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.strength-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0;
    background: var(--danger);
    border-radius: 999px;
    transition: all .3s ease;
}

.strength-text { font-size: 12px; color: var(--text-light); white-space: nowrap; }

.strength-fill.weak { width: 25%; background: var(--danger); }
.strength-fill.fair { width: 50%; background: var(--warning); }
.strength-fill.good { width: 75%; background: #0E9F6E; }
.strength-fill.strong { width: 100%; background: var(--success); }

/* ---------- Verification Cards (admin) ---------- */
.verification-card { border-left: 3px solid var(--primary); }

.verification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.user-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-info h3 { font-size: 16px; }
.user-info p { font-size: 13px; color: var(--text-light); margin: 2px 0; }

.user-avatar-sm, .user-avatar-md, .user-avatar-lg {
    border-radius: 50%;
    background: var(--gold-grad);
    color: #FFFFFF;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.user-avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.user-avatar-md { width: 46px; height: 46px; font-size: 17px; }
.user-avatar-lg { width: 64px; height: 64px; font-size: 24px; }

.user-cell { display: flex; align-items: center; gap: 8px; }
.user-cell small { display: block; color: var(--text-light); }

.verification-details {
    background: var(--background-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    font-size: 14px;
    flex-wrap: wrap;
}
.detail-row + .detail-row { border-top: 1px solid var(--border-light); }
.detail-label { color: var(--text-light); font-weight: 500; }

.verification-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.reject-form { flex: 1; min-width: 240px; }
.reject-input { display: flex; gap: 8px; }
.reject-input input { flex: 1; }

.screenshot-frame, .doc-frame {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: var(--background-alt);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    max-width: 100%;
}
.screenshot-frame:hover, .doc-frame:hover { border-color: var(--primary); box-shadow: 0 0 0 4px var(--gold-glow); }
.screenshot-frame img, .doc-frame img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 6px;
}

.doc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-item h4 {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.proof-section h4,
.screenshot-container h4,
.task-instructions-admin h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.proof-text {
    background: var(--background-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 14.5px;
    margin-bottom: 16px;
}

.proof-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--background-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.proof-field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-light);
}
.proof-value {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
}
.proof-link {
    font-size: 13.5px;
    font-weight: 600;
    word-break: break-all;
}

.verification-result {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text-light);
}

.inline-form { display: inline; }

.action-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.status-select {
    padding: 8px 32px 8px 12px !important;
    min-height: 40px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    background-position: right 8px center;
    background-size: 12px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #CBD2DC;
    border-radius: 999px;
    border: 2px solid var(--background);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .flash-message, .btn, .pagination,
    .bottom-tabs, .sidebar { display: none !important; }
    body { background: #fff; }
}

/* ---------- Mobile Responsiveness ---------- */
@media (max-width: 768px) {
    :root {
        --gutter: 18px;
        --section: 44px;
    }

    body { font-size: 16px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .stat-card { padding: 16px; gap: 10px; border-radius: var(--radius); }
    .stat-icon { width: 40px; height: 40px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 11px; }
    .stat-change { display: none; }

    .card-header, .card-body { padding: 18px; }
    .card { border-radius: var(--radius); }

    .form-row { flex-direction: column; gap: 0; }
    .form-row .form-group { min-width: 100%; }

    .verification-header { flex-direction: column; }
    .reject-input { flex-direction: column; }
    .doc-pair { grid-template-columns: 1fr; }

    .btn-lg { padding: 14px 24px; font-size: 15px; }
    .btn-xl { padding: 15px 28px; font-size: 16px; }

    .filter-tabs { gap: 8px; }
    .filter-tab { padding: 8px 14px; font-size: 13px; }

    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 11px; }
}

@media (max-width: 480px) {
    .section-header { flex-direction: column; align-items: flex-start; }
    .verification-actions { flex-direction: column; }
    .btn-sm { padding: 8px 14px; font-size: 13px; }
    .action-buttons { flex-direction: column; align-items: stretch; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   App shell — shared chrome for public / user portal / admin.
   Every surface loads main.css, so icons and toggles defined
   here are guaranteed to render everywhere.
   ============================================================ */

/* ---------- Brand / logo ---------- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    flex-shrink: 0;
    min-width: 0;
}

/* Legacy inline SVG marks (kept for any page still using them) */
.logo-icon { width: 32px; height: 32px; flex-shrink: 0; display: block; }

/* DB-driven logo image */
.logo-img {
    height: 34px;
    width: auto;
    max-width: 44px;
    object-fit: contain;
    border-radius: 9px;
    flex-shrink: 0;
    display: block;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.5px;
    white-space: nowrap;
}

.logo-mark-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--ink-900);
    color: #fff;
    border: 1.5px solid var(--surface);
    white-space: nowrap;
}

/* ---------- 3-line hamburger ---------- */
.hamburger {
    position: relative;
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: background .2s ease;
}
.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .22s ease;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

button[aria-expanded="true"] .hamburger { background: transparent; }
button[aria-expanded="true"] .hamburger::before { transform: translateY(6px) rotate(45deg); }
button[aria-expanded="true"] .hamburger::after  { transform: translateY(-6px) rotate(-45deg); }

/* Toggle buttons that host the hamburger */
.mobile-menu-toggle,
.sidebar-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0;
    cursor: pointer;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    transition: background .18s, border-color .18s, box-shadow .18s;
}
.mobile-menu-toggle:hover,
.sidebar-toggle:hover { background: var(--surface-2); border-color: var(--border); }

/* Sidebar toggle hidden on desktop, shown on mobile by layout CSS */
.sidebar-toggle { display: none; }

/* ---------- Sidebar nav (shared by user portal + admin) ---------- */
.nav-sections { list-style: none; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover { background: var(--surface-2); color: var(--ink); }

.nav-item.active {
    background: var(--ink-900);
    color: #fff;
    font-weight: 600;
    box-shadow: var(--shadow);
}
.nav-item.active:hover { color: #fff; background: var(--ink-700); }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--gold-grad);
}

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-badge.pending  { background: var(--warning-light); color: var(--warning); }
.nav-badge.success  { background: var(--success-light); color: var(--success); }
.nav-badge.rejected { background: var(--danger-light);  color: var(--danger); }
.nav-badge.locked   { background: var(--surface-3); color: var(--text-light); }
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .18); color: #fff; }

.nav-item.logout-item { color: var(--danger); margin-top: 14px; }
.nav-item.logout-item:hover { background: var(--danger-light); color: var(--danger); }

.nav-section-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--text-soft);
    padding: 16px 13px 6px;
}

/* ---------- Sidebar frame ---------- */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 10px;
}

.sidebar-header h3 {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    padding: 6px 10px;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
}
.sidebar-close:hover { background: var(--surface-2); color: var(--ink); }

.sidebar-nav { flex: 1; padding: 8px 12px 16px; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
}

.sidebar-version {
    font-size: 11.5px;
    color: var(--text-soft);
    text-align: center;
}

/* ---------- Sidebar profile card (shared: user portal + admin) ----------
   flex-shrink:0 is essential: the sidebar is a tall flex column, and without
   it this card gets compressed vertically and its contents clip. */
.sidebar-profile {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin: 14px 12px 10px;
    padding: 18px 16px;
    border-radius: var(--radius-lg);
    background: var(--ink-grad-2);
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.sidebar-profile::before {
    content: "";
    position: absolute;
    right: -46px; top: -58px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 123, 255, .45), transparent 68%);
}
.sidebar-profile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, .08);
    pointer-events: none;
}
.sidebar-profile-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
}
.sidebar-profile .user-avatar-sm {
    background: var(--gold-grad);
    color: #FFFFFF;
    width: 48px; height: 48px;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, .3);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .8);
}
.sidebar-profile-info { min-width: 0; flex: 1; }
.sidebar-profile-name {
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.sidebar-profile-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #FFD84D;
    margin-top: 2px;
}
.sidebar-profile-role .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .22);
}
.sidebar-profile-balance {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.sidebar-profile-balance .label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}
.sidebar-profile-balance .value {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.sidebar-profile-bal { font-size: 12px; color: rgba(255, 255, 255, .72); font-weight: 500; }
.sidebar-profile-avatar { flex-shrink: 0; }

/* Sidebars must never scroll horizontally, and their fixed chrome must not
   be squeezed by the (scrollable) nav list. */
.sidebar, .admin-sidebar { overflow-x: hidden; }
.sidebar > .sidebar-header, .admin-sidebar > .sidebar-header,
.sidebar > .sidebar-profile, .admin-sidebar > .sidebar-profile,
.sidebar > .sidebar-footer, .admin-sidebar > .sidebar-footer { flex-shrink: 0; }
.sidebar > .sidebar-nav, .admin-sidebar > .sidebar-nav { flex: 1 1 auto; min-height: 0; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 32, .55);
    z-index: 128;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .28s ease;
}
.sidebar-overlay.show { display: block; opacity: 1; }

/* ---------- Small shared utilities (used by headers/footers) ---------- */
.icon-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid var(--surface);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.hide-mobile { display: initial; }
.show-mobile { display: none !important; }

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: initial !important; }
    .logo-img { height: 30px; }
    .logo-text { font-size: 17px; }
}

/* ---------- Shared utilities (used across all surfaces) ---------- */
.text-center { text-align: center; }

.txn-type {
    font-weight: 600;
    color: var(--ink);
    text-transform: capitalize;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}
.form-actions .btn { flex: 1 1 auto; }

.instructions-content {
    background: var(--background-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

/* Custom checkbox (login "remember me" etc.) */
.checkmark { display: none; }

/* Sticky mobile action bar for long forms */
@media (max-width: 768px) {
    .sticky-actions {
        position: sticky;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
        z-index: 40;
        margin: 16px -16px 0;
        padding: 12px 16px;
        background: rgba(255, 255, 255, .94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-light);
    }
    .sticky-actions .btn { width: 100%; }
}
