/* ===== EarnKE - Light Theme CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --primary-pale: #f0fdf4;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;
    --text-dark: #111827;
    --text-med: #374151;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --white: #ffffff;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a { text-decoration: none; color: inherit; }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
}

.auth-left {
    background: linear-gradient(145deg, #16a34a 0%, #15803d 50%, #166534 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.auth-brand {
    text-align: center;
    color: white;
    z-index: 1;
}

.auth-brand .logo {
    font-family: 'Outfit', sans-serif;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.auth-brand .logo span { color: #fbbf24; }

.auth-brand p {
    font-size: 17px;
    opacity: 0.85;
    max-width: 320px;
    margin: 0 auto 40px;
}

.auth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 340px;
    z-index: 1;
}

.auth-stat {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: white;
}

.auth-stat .val {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
}

.auth-stat .lbl {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 4px;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-form-wrap h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.auth-form-wrap .subtitle {
    color: var(--text-light);
    margin-bottom: 36px;
    font-size: 15px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-med);
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22,163,74,0.1);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22,163,74,0.3);
}

.btn-full { width: 100%; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-med);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #d97706; }

.btn-info { background: var(--info); color: white; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background: var(--primary-light); color: #15803d; border-left: 4px solid var(--primary); }
.alert-danger { background: var(--danger-light); color: #b91c1c; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--accent-light); color: #92400e; border-left: 4px solid var(--accent); }
.alert-info { background: var(--info-light); color: #1d4ed8; border-left: 4px solid var(--info); }

/* ===== LAYOUT ===== */
.app-wrap {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-logo {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.sidebar-logo .logo-text span { color: var(--accent); }

.sidebar-logo p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-med);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.18s;
    margin-bottom: 3px;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item .icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--border-light);
    flex-shrink: 0;
}

.nav-item.active .icon,
.nav-item:hover .icon {
    background: var(--primary);
    color: white;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-info .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.user-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.balance-badge {
    background: var(--primary-pale);
    border: 1px solid var(--primary-light);
    border-radius: 100px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.page-content {
    padding: 32px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.stat-card.green::before { background: var(--primary-light); }
.stat-card.amber::before { background: var(--accent-light); }
.stat-card.blue::before { background: var(--info-light); }
.stat-card.purple::before { background: var(--purple-light); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card.green .stat-icon { background: var(--primary-light); }
.stat-card.amber .stat-icon { background: var(--accent-light); }
.stat-card.blue .stat-icon { background: var(--info-light); }
.stat-card.purple .stat-icon { background: var(--purple-light); }

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== ACTION CARDS ===== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.action-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary);
    background: var(--primary-pale);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-card .ac-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.action-card .ac-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}

.action-card .ac-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== CARDS & PANELS ===== */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.card-body { padding: 24px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-med);
    border-bottom: 1px solid var(--border-light);
}

tbody tr:hover { background: var(--primary-pale); }
tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

.badge-success { background: var(--primary-light); color: var(--primary); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--accent-light); color: #92400e; }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-gray { background: var(--border-light); color: var(--text-light); }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.25s;
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 20px; }

.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s;
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body { padding: 20px 24px 28px; }

/* ===== TASK CARDS ===== */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}

.task-card:hover { box-shadow: var(--shadow); }

.task-card.completed {
    border-color: var(--primary);
    opacity: 0.75;
}

.task-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.task-type-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.task-card .reward-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
}

.task-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.task-card-body { padding: 16px 20px 20px; }

/* ===== REFERRAL BOX ===== */
.referral-box {
    background: linear-gradient(135deg, var(--primary-pale), var(--white));
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.ref-link-wrap {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.ref-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-med);
    background: var(--white);
    outline: none;
}

/* ===== MPESA INSTRUCTIONS ===== */
.mpesa-steps {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 16px 0;
}

.mpesa-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.mpesa-step:last-child { margin-bottom: 0; }

.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mpesa-code-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    text-align: center;
    margin: 16px 0;
}

.mpesa-code-box .big { font-size: 28px; font-weight: 800; font-family: 'Outfit', sans-serif; }
.mpesa-code-box .lbl { font-size: 12px; opacity: 0.8; margin-top: 4px; }

/* ===== RESPONSIVE ===== */

/* ── Tablet (≤1024px) ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .page-content { padding: 24px 20px; }
    .topbar { padding: 0 20px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .action-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .grid-2 { grid-template-columns: 1fr; gap: 16px; }

    .stat-value { font-size: 26px; }
    .stat-card { padding: 20px; }

    .task-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ── Mobile / small tablet (≤900px) ──────────────────────────────────── */
@media (max-width: 900px) {
    /* Auth */
    .auth-page { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right { padding: 40px 24px; }

    /* Sidebar — slide-in drawer */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        z-index: 200;
        pointer-events: none;
    }
    .sidebar.open {
        transform: translateX(0);
        pointer-events: all;
    }

    .main-content { margin-left: 0; }
    #menu-btn, .menu-btn { display: flex !important; }

    /* Topbar */
    .topbar { padding: 0 16px; height: 60px; }
    .topbar-title { font-size: 17px; }
    .balance-badge { font-size: 13px; padding: 6px 12px; }

    /* Page content */
    .page-content { padding: 16px; }

    /* Stats grid → 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }
    .stat-card { padding: 16px; }
    .stat-icon { width: 40px; height: 40px; font-size: 20px; margin-bottom: 12px; }
    .stat-value { font-size: 22px; }
    .stat-label { font-size: 12px; }
    .stat-sub { font-size: 11px; }

    /* Action grid → 2×2 */
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }
    .action-card { padding: 18px 12px; }
    .action-card .ac-icon { font-size: 28px; margin-bottom: 8px; }
    .action-card .ac-label { font-size: 14px; }

    /* Two-column grid → stacked */
    .grid-2 { grid-template-columns: 1fr; gap: 14px; }

    /* Cards */
    .card-header { padding: 16px 16px; }
    .card-body { padding: 16px; }

    /* Tables — horizontal scroll */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 520px; }
    thead th { padding: 10px 12px; font-size: 10px; }
    tbody td { padding: 12px; font-size: 13px; }

    /* Tasks */
    .task-grid { grid-template-columns: 1fr; gap: 14px; }
    .task-card-header { padding: 16px; gap: 10px; }
    .task-type-icon { width: 44px; height: 44px; font-size: 22px; }
    .task-card-body { padding: 12px 16px 16px; }
    .task-card img { height: 160px; }

    /* Modals */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal {
        max-width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
        max-height: 92vh;
    }
    .modal-header { padding: 20px 20px 0; }
    .modal-body { padding: 16px 20px 24px; }

    /* Referral link */
    .ref-link-wrap { flex-direction: column; gap: 8px; }
    .ref-link-wrap .btn { width: 100%; }

    /* Toast */
    .toast-container { top: auto; bottom: 16px; left: 16px; right: 16px; pointer-events: none; height: auto; }
    .toast { min-width: unset; width: 100%; pointer-events: all; }

    /* Alerts */
    .alert { font-size: 13px; padding: 10px 14px; }
    .alert > div { font-size: 13px; }

    /* Buttons */
    .btn { padding: 11px 20px; font-size: 14px; }
    .btn-sm { padding: 7px 14px; font-size: 12px; }

    /* Form controls */
    .form-control { padding: 12px 14px; font-size: 14px; }
}

/* ── Small phones (≤480px) ────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Stats → 2 column compact */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px 12px; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 11px; }
    .stat-icon { width: 36px; height: 36px; font-size: 18px; margin-bottom: 10px; }

    /* Action grid → 2×2 tight */
    .action-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .action-card { padding: 14px 10px; }
    .action-card .ac-icon { font-size: 24px; margin-bottom: 6px; }
    .action-card .ac-label { font-size: 13px; }
    .action-card .ac-desc { font-size: 11px; }

    /* Page content */
    .page-content { padding: 12px; }
    .topbar-title { font-size: 15px; }

    /* Auth form */
    .auth-right { padding: 24px 16px; }
    .auth-form-wrap h2 { font-size: 26px; }

    /* Modal full-screen on tiny phones */
    .modal { max-height: 95vh; }
    .modal-header h3 { font-size: 17px; }

    /* mpesa box */
    .mpesa-code-box .big { font-size: 24px; }

    /* Card headers */
    .card-header { padding: 14px; }
    .card-header h3 { font-size: 14px; }

    /* Tables */
    table { min-width: 440px; }
    tbody td { padding: 10px; font-size: 12px; }

    /* Topbar balance — shorten on very small screens */
    .balance-badge { font-size: 12px; padding: 5px 10px; }
}

/* Sidebar overlay — hidden by default always */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
}
.sidebar-overlay.show { display: block; }

/* Menu button (hidden on desktop, shown on mobile via CSS) */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    color: var(--text-dark);
    transition: background 0.2s;
}
.menu-btn:hover { background: var(--border-light); }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fw-700 { font-weight: 700; }
.text-green { color: var(--primary); }
.text-red { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.fs-sm { font-size: 13px; }

/* Spinner */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
    position: fixed;
    top: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: auto;
    height: auto;
}

.toast {
    pointer-events: all;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--accent); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h4 { font-size: 18px; color: var(--text-light); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }