/* ============================================================================
   RokuChannel Platform - Custom Styles
   Dark theme with Tailwind CSS doing the heavy lifting.
   ============================================================================ */

/* --------------------------------------------------------------------------
   CSS Variables - Theme
   -------------------------------------------------------------------------- */
:root {
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #0f3460;
    --color-highlight: #e94560;
    --color-surface: #1e2a3a;
    --color-surface-hover: #253547;
    --color-border: #2a3a4e;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-primary); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-highlight); }

/* --------------------------------------------------------------------------
   Layout - Sidebar
   -------------------------------------------------------------------------- */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--color-secondary);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.open + .sidebar-overlay {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
}

/* --------------------------------------------------------------------------
   Sidebar Nav Items
   -------------------------------------------------------------------------- */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 12px;
    transition: all 0.15s ease;
}

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

.nav-item.active {
    background: var(--color-accent);
    color: white;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--color-accent);
}

.card-highlight:hover {
    border-color: var(--color-highlight);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.1);
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-highlight);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

/* --------------------------------------------------------------------------
   Toast Animations
   -------------------------------------------------------------------------- */
.toast-enter {
    animation: toastIn 0.3s ease;
}

.toast-exit {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}

/* --------------------------------------------------------------------------
   Loading Spinner
   -------------------------------------------------------------------------- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-highlight);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Loading Overlay
   -------------------------------------------------------------------------- */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-high { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-medium { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-low { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-pending { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.badge-accepted { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-published { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-draft { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

/* --------------------------------------------------------------------------
   Form Inputs
   -------------------------------------------------------------------------- */
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.875rem;
    transition: border-color 0.15s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-highlight);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #d43d56;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn-secondary {
    background: var(--color-accent);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #124580;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-highlight);
    border-bottom-color: var(--color-highlight);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--color-border);
}

.data-table tbody tr:hover {
    background: var(--color-surface-hover);
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.4;
}

/* --------------------------------------------------------------------------
   Priority indicator dots
   -------------------------------------------------------------------------- */
.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.priority-dot.high { background: #ef4444; }
.priority-dot.medium { background: #f59e0b; }
.priority-dot.low { background: #10b981; }

/* --------------------------------------------------------------------------
   Pulse animation for status indicators
   -------------------------------------------------------------------------- */
.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot.green { background: var(--color-success); }
.pulse-dot.red { background: var(--color-danger); }
.pulse-dot.yellow { background: var(--color-warning); }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================================
   Page-Specific Styles (extracted from inline <style> blocks)
   ============================================================================ */

/* === admin-analytics === */
* { box-sizing: border-box; }
        body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; margin: 0; min-width: 22.5rem; }

        /* ============================================================ */
        /* SIDEBAR                                                       */
        /* ============================================================ */
        .sidebar {
            width: 15.625rem;
            background: #1e293b;
            min-height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding-top: 1.25rem;
            overflow-y: auto;
            z-index: 40;
            transition: transform 0.3s ease;
        }
        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            min-height: 2.75rem;
        }
        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right: 3px solid #e94560;
        }
        .sidebar .section-title {
            padding: 0.9375rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
        }

        /* ============================================================ */
        /* MAIN CONTENT                                                  */
        /* ============================================================ */
        .main-content {
            margin-left: 15.625rem;
            padding: 1.875rem;
        }

        /* ============================================================ */
        /* HAMBURGER                                                     */
        /* ============================================================ */
        .hamburger {
            display: none;
            position: fixed;
            top: 0.75rem;
            left: 0.75rem;
            z-index: 50;
            background: #1e293b;
            border: 1px solid #334155;
            color: #e2e8f0;
            border-radius: 0.5rem;
            padding: 0.5rem 0.75rem;
            cursor: pointer;
            font-size: 1.25rem;
            min-height: 2.75rem;
            min-width: 2.75rem;
            transition: background 0.2s ease;
        }
        .hamburger:hover { background: #334155; }

        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 35;
        }

        /* ============================================================ */
        /* STAT CARDS                                                    */
        /* ============================================================ */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .stat-card:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.3);
        }
        .stat-card .stat-icon {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.625rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.125rem;
            margin-bottom: 0.75rem;
        }
        .stat-card .stat-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
        }
        .stat-card .stat-label {
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-top: 0.25rem;
        }
        .stat-card .stat-change {
            font-size: 0.75rem;
            margin-top: 0.375rem;
        }
        .stat-card .stat-change.up { color: #34d399; }
        .stat-card .stat-change.down { color: #f87171; }

        /* ============================================================ */
        /* CHART CONTAINERS                                              */
        /* ============================================================ */
        .chart-container {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            transition: box-shadow 0.2s ease;
        }
        .chart-container:hover {
            box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.2);
        }
        .chart-header {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        /* ============================================================ */
        /* PERIOD SELECTOR                                               */
        /* ============================================================ */
        .period-selector {
            display: flex;
            gap: 0.125rem;
            background: #1e293b;
            border-radius: 0.5rem;
            padding: 0.1875rem;
        }
        .period-btn {
            padding: 0.5rem 1rem;
            border-radius: 0.375rem;
            font-size: 0.8125rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            min-width: 2.75rem;
        }
        .period-btn:hover:not(.active) { color: #e2e8f0; background: #33415580; }
        .period-btn.active { background: #e94560; color: white; }

        /* ============================================================ */
        /* TAB BAR                                                       */
        /* ============================================================ */
        .tab-bar {
            display: flex;
            gap: 0.125rem;
            background: #1e293b;
            border-radius: 0.625rem;
            padding: 0.1875rem;
            margin-bottom: 1.5rem;
        }
        .tab-btn {
            padding: 0.5rem 1.125rem;
            border-radius: 0.5rem;
            font-size: 0.8125rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            transition: all 0.2s ease;
            min-height: 2.75rem;
        }
        .tab-btn.active { background: #e94560; color: white; }
        .tab-btn:hover:not(.active) { color: #e2e8f0; }

        /* ============================================================ */
        /* DATA TABLE                                                    */
        /* ============================================================ */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #94a3b8;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            white-space: nowrap;
        }
        .data-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #1e293b;
            font-size: 0.875rem;
        }
        .data-table tr { transition: background 0.15s ease; }
        .data-table tr:hover { background: #1e293b40; }

        /* ============================================================ */
        /* BADGES                                                        */
        /* ============================================================ */
        .badge {
            padding: 0.125rem 0.625rem;
            border-radius: 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
        }
        .badge-green { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red { background: #7f1d1d30; color: #f87171; }
        .badge-blue { background: #1e3a5f30; color: #60a5fa; }

        /* ============================================================ */
        /* TOAST ANIMATIONS                                              */
        /* ============================================================ */
        .toast-enter { animation: toastIn 0.3s ease; }
        .toast-exit { animation: toastOut 0.3s ease forwards; }
        @keyframes toastIn { from { opacity: 0; transform: translateY(-0.625rem); } to { opacity: 1; transform: translateY(0); } }
        @keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-0.625rem); } }

        /* ============================================================ */
        /* LOADING SKELETON                                              */
        /* ============================================================ */
        @keyframes shimmer {
            0% { background-position: -30rem 0; }
            100% { background-position: 30rem 0; }
        }
        .skeleton {
            background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
            background-size: 60rem 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 0.375rem;
        }

        /* ============================================================ */
        /* RESPONSIVE                                                    */
        /* ============================================================ */
        @media (max-width: 64rem) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.open {
                transform: translateX(0);
            }
            .sidebar-overlay.open {
                display: block;
            }
            .hamburger {
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .main-content {
                margin-left: 0;
                padding: 1.25rem;
                padding-top: 3.75rem;
            }
            .charts-grid {
                grid-template-columns: 1fr !important;
            }
            .charts-grid .chart-span-2 {
                grid-column: span 1 !important;
            }
            .stats-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

        @media (max-width: 40rem) {
            .stats-grid {
                grid-template-columns: 1fr !important;
            }
            .data-table-wrap {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

/* === admin-customers === */
*, *::before, *::after { box-sizing: border-box; }
        body { background: #0f172a; color: #e2e8f0; font-family: system-ui, sans-serif; margin: 0; min-height: 100vh; }

        /* ── Sidebar ─────────────────────────────────────── */
        .sidebar {
            width: 15.625rem;
            background: #1e293b;
            min-height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding-top: 1.25rem;
            overflow-y: auto;
            z-index: 40;
            transition: transform 0.3s ease;
        }
        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            transition: all 0.2s;
        }
        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right: 1px solid #e94560;
            border-right-width: 0.1875rem;
        }
        .sidebar .section-title {
            padding: 0.9375rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
        }

        /* ── Main Content ────────────────────────────────── */
        .main-content {
            margin-left: 15.625rem;
            padding: 1.875rem;
            min-height: 100vh;
        }

        /* ── Stat Cards ──────────────────────────────────── */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .stat-card:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
        }
        .stat-card .stat-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
        }
        .stat-card .stat-label {
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-top: 0.25rem;
        }

        /* ── Data Table ──────────────────────────────────── */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #94a3b8;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }
        .data-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #1e293b;
            font-size: 0.875rem;
        }
        .data-table tr:hover { background: #1e293b40; }

        /* ── Badges ──────────────────────────────────────── */
        .badge {
            padding: 0.125rem 0.625rem;
            border-radius: 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
            display: inline-block;
        }
        .badge-green { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red { background: #7f1d1d30; color: #f87171; }
        .badge-blue { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray { background: #33415530; color: #94a3b8; }

        /* ── Buttons ─────────────────────────────────────── */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.375rem;
            border: none;
            border-radius: 0.5rem;
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 2.75rem;
            padding: 0.5rem 1rem;
        }
        .btn-primary { background: #e94560; color: white; }
        .btn-primary:hover { background: #d63851; transform: scale(1.02); }
        .btn-secondary { background: #334155; color: #e2e8f0; }
        .btn-secondary:hover { background: #475569; }
        .btn-danger { background: #dc2626; color: white; }
        .btn-danger:hover { background: #b91c1c; }
        .btn-success { background: #059669; color: white; }
        .btn-success:hover { background: #047857; }
        .btn-sm {
            min-height: 2.75rem;
            padding: 0.375rem 0.75rem;
            font-size: 0.75rem;
        }

        /* ── Form Inputs ─────────────────────────────────── */
        .form-input {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            outline: none;
            box-sizing: border-box;
            min-height: 2.75rem;
            transition: border-color 0.2s;
        }
        .form-input:focus { border-color: #e94560; }

        /* ── Modal ────────────────────────────────────────── */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        .modal-overlay.show { display: flex; }
        .modal-content {
            background: #1e293b;
            border-radius: 0.75rem;
            max-width: 37.5rem;
            width: 100%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }
        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }
        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.75rem;
            flex-shrink: 0;
        }

        /* ── Role Tag ────────────────────────────────────── */
        .role-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            background: #1e3a5f30;
            color: #60a5fa;
            padding: 0.25rem 0.625rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 500;
            transition: background 0.2s;
        }
        .role-tag .remove-role {
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.2s;
            font-size: 0.625rem;
        }
        .role-tag .remove-role:hover { opacity: 1; }

        /* ── Sidebar Overlay (mobile) ────────────────────── */
        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 35;
            display: none;
        }
        .sidebar-overlay.show { display: block; }

        /* ── Mobile Header ───────────────────────────────── */
        .mobile-header {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
            position: sticky;
            top: 0;
            z-index: 30;
        }
        .hamburger-btn {
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 1.25rem;
            cursor: pointer;
            min-height: 2.75rem;
            min-width: 2.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
        }
        .hamburger-btn:hover { color: #e2e8f0; }

        /* ── Pagination ──────────────────────────────────── */
        .pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            margin-top: 1.5rem;
        }
        .pagination button {
            min-height: 2.75rem;
            min-width: 2.75rem;
            border: 1px solid #334155;
            background: #1e293b;
            color: #94a3b8;
            border-radius: 0.5rem;
            cursor: pointer;
            font-size: 0.8125rem;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 0.875rem;
        }
        .pagination button:hover:not(:disabled) { background: #334155; color: #e2e8f0; }
        .pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
        .pagination .page-info { font-size: 0.8125rem; color: #94a3b8; }

        /* ── Order row in modal ───────────────────────────── */
        .order-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.625rem 0;
            border-bottom: 1px solid #33415540;
            font-size: 0.8125rem;
        }
        .order-row:last-child { border-bottom: none; }

        /* ── Info row in modal ────────────────────────────── */
        .info-row {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            font-size: 0.8125rem;
        }
        .info-row .info-label { color: #94a3b8; }
        .info-row .info-value { color: #e2e8f0; font-weight: 500; }

        /* ── Section divider in modal ─────────────────────── */
        .modal-section-title {
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            margin-bottom: 0.75rem;
            margin-top: 1.25rem;
        }
        .modal-section-title:first-child { margin-top: 0; }

        /* ── Responsive ──────────────────────────────────── */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.open {
                transform: translateX(0);
            }
            .main-content {
                margin-left: 0;
                padding: 1rem;
            }
            .mobile-header {
                display: flex;
            }
        }

        /* ── Toast animations (complement api.js) ─────────── */
        .toast-enter {
            animation: toastIn 0.3s ease forwards;
        }
        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }
        @keyframes toastIn {
            from { opacity: 0; transform: translateX(1rem); }
            to { opacity: 1; transform: translateX(0); }
        }
        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to { opacity: 0; transform: translateX(1rem); }
        }

        /* ── Suspend reason input ─────────────────────────── */
        .suspend-reason-wrapper {
            margin-top: 0.75rem;
        }
        .suspend-reason-wrapper label {
            display: block;
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
        }

/* === admin-settings === */
*, *::before, *::after { box-sizing: border-box; }
        body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; margin: 0; min-width: 22.5rem; }

        /* ── Sidebar ── */
        .sidebar {
            width: 15.625rem; background: #1e293b; min-height: 100vh;
            position: fixed; left: 0; top: 0; overflow-y: auto; z-index: 40;
            transition: transform 0.3s ease;
            padding-top: 1.25rem;
        }
        .sidebar a {
            display: flex; align-items: center; gap: 0.625rem;
            padding: 0.625rem 1.25rem; color: #94a3b8; text-decoration: none;
            font-size: 0.875rem; transition: all 0.2s; min-height: 2.75rem;
        }
        .sidebar a:hover, .sidebar a.active {
            color: #e2e8f0; background: #334155;
            border-right: 3px solid #e94560;
        }
        .sidebar .section-title {
            padding: 0.9375rem 1.25rem 0.3125rem;
            font-size: 0.6875rem; text-transform: uppercase;
            color: #64748b; letter-spacing: 0.0625rem;
        }
        .sidebar-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(0,0,0,0.5); z-index: 35;
        }
        @media (max-width: 48rem) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.open { transform: translateX(0); }
            .sidebar-overlay.open { display: block; }
            .main-content { margin-left: 0 !important; }
        }

        /* ── Main ── */
        .main-content { margin-left: 15.625rem; padding: 1.875rem; }

        /* ── Cards ── */
        .card {
            background: #1e293b; border-radius: 0.75rem;
            padding: 1.25rem; transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .card-hover:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.3);
        }

        /* ── Tables ── */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left; padding: 0.75rem 1rem;
            background: #1e293b; color: #94a3b8;
            font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03125rem;
        }
        .data-table td {
            padding: 0.75rem 1rem; border-bottom: 1px solid #1e293b;
            font-size: 0.875rem;
        }
        .data-table tr:hover { background: rgba(30,41,59,0.25); }

        /* ── Badges ── */
        .badge {
            display: inline-flex; align-items: center; gap: 0.25rem;
            padding: 0.125rem 0.625rem; border-radius: 0.75rem;
            font-size: 0.75rem; font-weight: 500; white-space: nowrap;
        }
        .badge-green { background: rgba(6,95,70,0.19); color: #34d399; }
        .badge-blue { background: rgba(30,58,95,0.19); color: #60a5fa; }
        .badge-purple { background: rgba(88,28,135,0.19); color: #a78bfa; }
        .badge-yellow { background: rgba(133,77,14,0.19); color: #fbbf24; }
        .badge-red { background: rgba(127,29,29,0.19); color: #f87171; }
        .badge-rose { background: rgba(233,69,96,0.15); color: #fb7185; }
        .badge-slate { background: rgba(51,65,85,0.5); color: #94a3b8; }

        /* ── Buttons ── */
        .btn-primary {
            background: #e94560; color: white;
            padding: 0.5rem 1.25rem; border-radius: 0.5rem;
            font-weight: 600; cursor: pointer; border: none;
            font-size: 0.875rem; min-height: 2.75rem;
            display: inline-flex; align-items: center; gap: 0.5rem;
            transition: background 0.2s, transform 0.1s;
        }
        .btn-primary:hover { background: #d63851; transform: translateY(-0.0625rem); }
        .btn-primary:active { transform: translateY(0); }
        .btn-secondary {
            background: #334155; color: #e2e8f0;
            padding: 0.5rem 1.25rem; border-radius: 0.5rem;
            cursor: pointer; border: none; font-size: 0.875rem;
            min-height: 2.75rem; display: inline-flex; align-items: center; gap: 0.5rem;
            transition: background 0.2s;
        }
        .btn-secondary:hover { background: #475569; }
        .btn-danger {
            background: #dc2626; color: white;
            padding: 0.5rem 1.25rem; border-radius: 0.5rem;
            cursor: pointer; border: none; font-size: 0.875rem;
            min-height: 2.75rem; display: inline-flex; align-items: center; gap: 0.5rem;
            transition: background 0.2s;
        }
        .btn-danger:hover { background: #b91c1c; }
        .btn-icon {
            width: 2.75rem; height: 2.75rem; border-radius: 0.5rem;
            display: inline-flex; align-items: center; justify-content: center;
            border: none; cursor: pointer; background: transparent;
            color: #94a3b8; transition: all 0.2s; font-size: 0.875rem;
        }
        .btn-icon:hover { background: #334155; color: #e2e8f0; }
        .btn-icon.danger:hover { background: rgba(220,38,38,0.15); color: #f87171; }

        /* ── Forms ── */
        .form-input {
            width: 100%; background: #0f172a; border: 1px solid #334155;
            border-radius: 0.5rem; padding: 0.625rem 0.875rem;
            color: #e2e8f0; font-size: 0.875rem; outline: none;
            box-sizing: border-box; min-height: 2.75rem;
            transition: border-color 0.2s;
        }
        .form-input:focus { border-color: #e94560; }
        .form-label {
            display: block; font-size: 0.8125rem; color: #94a3b8;
            margin-bottom: 0.375rem; font-weight: 500;
        }
        .form-group { margin-bottom: 1rem; }

        /* ── Tabs ── */
        .tab-bar {
            display: flex; gap: 0.25rem; background: #1e293b;
            border-radius: 0.75rem; padding: 0.25rem;
            margin-bottom: 1.5rem; overflow-x: auto;
        }
        .tab-btn {
            padding: 0.625rem 1.25rem; border-radius: 0.5rem;
            font-size: 0.875rem; font-weight: 500; cursor: pointer;
            border: none; background: transparent; color: #94a3b8;
            white-space: nowrap; min-height: 2.75rem;
            display: inline-flex; align-items: center; gap: 0.5rem;
            transition: all 0.2s;
        }
        .tab-btn:hover { color: #e2e8f0; }
        .tab-btn.active {
            background: #334155; color: #e2e8f0;
            box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.2);
        }
        .tab-panel { display: none; }
        .tab-panel.active { display: block; }

        /* ── Modal ── */
        .modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.7);
            z-index: 100; display: none; align-items: center; justify-content: center;
            padding: 1.25rem;
        }
        .modal-overlay.show { display: flex; }
        .modal-content {
            background: #1e293b; border-radius: 0.75rem;
            max-width: 37.5rem; width: 100%;
            max-height: 85vh; display: flex; flex-direction: column;
        }
        .modal-header {
            padding: 1.25rem 1.5rem; border-bottom: 1px solid #334155;
            display: flex; align-items: center; justify-content: space-between;
            flex-shrink: 0;
        }
        .modal-body {
            padding: 1.5rem; overflow-y: auto; flex: 1;
        }
        .modal-footer {
            padding: 1rem 1.5rem; border-top: 1px solid #334155;
            display: flex; justify-content: flex-end; gap: 0.75rem;
            flex-shrink: 0;
        }
        .modal-close {
            background: none; border: none; color: #94a3b8;
            font-size: 1.5rem; cursor: pointer; padding: 0.25rem;
            min-width: 2.75rem; min-height: 2.75rem;
            display: flex; align-items: center; justify-content: center;
            border-radius: 0.5rem; transition: all 0.2s;
        }
        .modal-close:hover { color: #e2e8f0; background: #334155; }

        /* ── Permissions checkbox list ── */
        .perm-checkbox-list {
            max-height: 18.75rem; overflow-y: auto;
            border: 1px solid #334155; border-radius: 0.5rem;
            padding: 0.5rem;
        }
        .perm-checkbox-item {
            display: flex; align-items: center; gap: 0.75rem;
            padding: 0.5rem 0.625rem; border-radius: 0.375rem;
            cursor: pointer; transition: background 0.15s;
            min-height: 2.75rem;
        }
        .perm-checkbox-item:hover { background: #334155; }
        .perm-checkbox-item input[type="checkbox"] {
            width: 1.125rem; height: 1.125rem; accent-color: #e94560;
            flex-shrink: 0; cursor: pointer;
        }
        .perm-checkbox-item .perm-name { font-size: 0.875rem; color: #e2e8f0; }
        .perm-checkbox-item .perm-desc { font-size: 0.75rem; color: #64748b; }

        /* ── Timeline ── */
        .timeline { position: relative; padding-left: 2rem; }
        .timeline::before {
            content: ''; position: absolute; left: 0.5rem; top: 0.5rem;
            bottom: 0.5rem; width: 0.125rem; background: #334155;
        }
        .timeline-item {
            position: relative; padding-bottom: 1.5rem;
        }
        .timeline-item:last-child { padding-bottom: 0; }
        .timeline-dot {
            position: absolute; left: -1.75rem; top: 0.25rem;
            width: 1rem; height: 1rem; border-radius: 50%;
            background: #334155; border: 0.125rem solid #475569;
            display: flex; align-items: center; justify-content: center;
        }
        .timeline-dot.green { background: #065f46; border-color: #34d399; }
        .timeline-dot.red { background: #7f1d1d; border-color: #f87171; }
        .timeline-dot.blue { background: #1e3a5f; border-color: #60a5fa; }
        .timeline-dot.yellow { background: #854d0e; border-color: #fbbf24; }

        /* ── Tag list ── */
        .tag-list { display: flex; flex-wrap: wrap; gap: 0.375rem; }

        /* ── Expanded section ── */
        .role-perms-detail {
            max-height: 0; overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
        }
        .role-perms-detail.open {
            max-height: 25rem; padding-top: 0.75rem;
        }

        /* ── Clamp ── */
        .line-clamp-2 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* ── Toast animation ── */
        .toast-enter { animation: slideIn 0.3s ease; }
        .toast-exit { animation: slideOut 0.3s ease forwards; }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes slideOut { from { opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

        /* ── Empty state ── */
        .empty-state {
            text-align: center; padding: 3rem 1.25rem; color: #64748b;
        }
        .empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; color: #475569; }

        /* ── Mobile hamburger bar ── */
        .mobile-bar {
            display: none; position: sticky; top: 0; z-index: 30;
            background: #1e293b; padding: 0.75rem 1rem;
            border-bottom: 1px solid #334155;
            align-items: center; justify-content: space-between;
        }
        @media (max-width: 48rem) {
            .mobile-bar { display: flex; }
        }

        /* ── Responsive grid ── */
        .roles-grid {
            display: grid; gap: 1rem;
            grid-template-columns: 1fr;
        }
        @media (min-width: 48rem) { .roles-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (min-width: 64rem) { .roles-grid { grid-template-columns: repeat(3, 1fr); } }

        /* ── Search highlight ── */
        .search-box {
            position: relative;
        }
        .search-box i {
            position: absolute; left: 0.75rem; top: 50%;
            transform: translateY(-50%); color: #64748b; font-size: 0.875rem;
        }
        .search-box input { padding-left: 2.25rem; }

        /* ── Scrollbar ── */
        ::-webkit-scrollbar { width: 0.375rem; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #475569; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* === admin-tickets === */
*, *::before, *::after { box-sizing: border-box; }
        body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; margin: 0; min-width: 22.5rem; }

        /* ================================================================
           SIDEBAR
           ================================================================ */
        .sidebar {
            width: 15.625rem;
            background: #1e293b;
            min-height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding-top: 1.25rem;
            overflow-y: auto;
            z-index: 40;
            transition: transform 0.3s ease;
        }
        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            min-height: 2.75rem;
        }
        .sidebar a:hover, .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right: 0.1875rem solid #e94560;
        }
        .sidebar .section-title {
            padding: 0.9375rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
        }

        /* ================================================================
           MAIN CONTENT
           ================================================================ */
        .main-content {
            margin-left: 15.625rem;
            padding: 1.875rem;
            min-height: 100vh;
        }

        /* ================================================================
           HAMBURGER (mobile)
           ================================================================ */
        .hamburger {
            display: none;
            position: fixed;
            top: 0.75rem;
            left: 0.75rem;
            z-index: 50;
            background: #1e293b;
            border: 1px solid #334155;
            color: #e2e8f0;
            border-radius: 0.5rem;
            width: 2.75rem;
            height: 2.75rem;
            cursor: pointer;
            font-size: 1.125rem;
            transition: background 0.2s ease;
        }
        .hamburger:hover { background: #334155; }

        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 35;
        }

        @media (max-width: 48rem) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.open { transform: translateX(0); }
            .sidebar-overlay.open { display: block; }
            .hamburger { display: flex; align-items: center; justify-content: center; }
            .main-content { margin-left: 0; padding: 3.75rem 1rem 1rem; }
        }

        /* ================================================================
           STAT CARDS
           ================================================================ */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .stat-card:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
        }
        .stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: #f1f5f9; }
        .stat-card .stat-label { font-size: 0.8125rem; color: #94a3b8; margin-top: 0.25rem; }

        /* ================================================================
           TABS
           ================================================================ */
        .tab-bar {
            display: flex;
            gap: 0.125rem;
            background: #1e293b;
            border-radius: 0.625rem;
            padding: 0.1875rem;
            margin-bottom: 1.25rem;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .tab-btn {
            padding: 0.5rem 1.125rem;
            border-radius: 0.5rem;
            font-size: 0.8125rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-height: 2.75rem;
        }
        .tab-btn.active { background: #e94560; color: white; }
        .tab-btn:hover:not(.active) { color: #e2e8f0; background: #33415550; }

        /* ================================================================
           FILTER BAR
           ================================================================ */
        .filter-bar {
            display: flex;
            gap: 0.75rem;
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
            align-items: center;
        }
        .filter-bar input,
        .filter-bar select {
            background: #1e293b;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.5rem 0.75rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            outline: none;
            transition: border-color 0.2s ease;
            min-height: 2.75rem;
        }
        .filter-bar input:focus,
        .filter-bar select:focus { border-color: #e94560; }
        .filter-bar input { flex: 1; min-width: 12.5rem; }
        .filter-bar select { min-width: 9.375rem; }

        /* ================================================================
           DATA TABLE
           ================================================================ */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #94a3b8;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            white-space: nowrap;
        }
        .data-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #1e293b;
            font-size: 0.875rem;
        }
        .data-table tr { transition: background 0.15s ease; }
        .data-table tr:hover { background: #1e293b40; }

        /* ================================================================
           BADGES
           ================================================================ */
        .badge {
            display: inline-block;
            padding: 0.125rem 0.625rem;
            border-radius: 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
            white-space: nowrap;
        }
        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }
        .badge-purple { background: #581c8730; color: #a78bfa; }

        /* ================================================================
           SLIDE-IN PANEL
           ================================================================ */
        .ticket-panel-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 60;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .ticket-panel-overlay.open { opacity: 1; pointer-events: auto; }

        .ticket-panel {
            position: fixed;
            top: 0;
            right: 0;
            width: 31.25rem;
            max-width: 100vw;
            height: 100vh;
            max-height: 85vh;
            top: calc((100vh - 85vh) / 2);
            background: #1e293b;
            z-index: 70;
            transform: translateX(100%);
            transition: transform 0.3s ease;
            display: flex;
            flex-direction: column;
            border-radius: 0.75rem 0 0 0.75rem;
            box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.4);
        }
        .ticket-panel.open { transform: translateX(0); }

        .panel-header {
            padding: 1.25rem;
            border-bottom: 1px solid #334155;
            flex-shrink: 0;
        }
        .panel-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.25rem;
        }
        .panel-footer {
            padding: 1.25rem;
            border-top: 1px solid #334155;
            flex-shrink: 0;
        }

        /* ================================================================
           MESSAGE THREAD
           ================================================================ */
        .msg-customer {
            background: #0f172a;
            border-radius: 0.75rem;
            padding: 0.75rem 1rem;
            margin-bottom: 0.75rem;
        }
        .msg-agent {
            background: #334155;
            border-radius: 0.75rem;
            padding: 0.75rem 1rem;
            margin-bottom: 0.75rem;
        }

        /* ================================================================
           FORM ELEMENTS (panel)
           ================================================================ */
        .panel-select {
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.375rem;
            padding: 0.375rem 0.5rem;
            color: #e2e8f0;
            font-size: 0.75rem;
            outline: none;
            cursor: pointer;
            min-height: 2.75rem;
            transition: border-color 0.2s ease;
        }
        .panel-select:focus { border-color: #e94560; }

        .reply-textarea {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.75rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            resize: vertical;
            outline: none;
            min-height: 4.5rem;
            font-family: inherit;
            transition: border-color 0.2s ease;
        }
        .reply-textarea:focus { border-color: #e94560; }

        .btn-send {
            background: #e94560;
            color: white;
            border: none;
            border-radius: 0.5rem;
            padding: 0.5rem 1.25rem;
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            min-height: 2.75rem;
            transition: background 0.2s ease, transform 0.1s ease;
        }
        .btn-send:hover { background: #d63851; transform: translateY(-0.0625rem); }
        .btn-send:active { transform: translateY(0); }
        .btn-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

        /* ================================================================
           ACTION BUTTONS
           ================================================================ */
        .action-btn {
            background: transparent;
            border: 1px solid #334155;
            color: #94a3b8;
            border-radius: 0.375rem;
            padding: 0.375rem 0.625rem;
            cursor: pointer;
            font-size: 0.8125rem;
            min-width: 2.75rem;
            min-height: 2.75rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.375rem;
            transition: all 0.2s ease;
        }
        .action-btn:hover { color: #e2e8f0; border-color: #e94560; background: #e9456010; }

        /* ================================================================
           TOAST ANIMATIONS
           ================================================================ */
        .toast-enter { animation: slideIn 0.3s ease; }
        .toast-exit { animation: slideOut 0.3s ease forwards; }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

        /* ================================================================
           RESPONSIVE TABLE
           ================================================================ */
        .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

        @media (max-width: 64rem) {
            .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
        }
        @media (max-width: 36rem) {
            .stat-grid { grid-template-columns: 1fr !important; }
            .ticket-panel { width: 100vw; border-radius: 0; }
        }

        /* ================================================================
           SCROLLBAR
           ================================================================ */
        .panel-body::-webkit-scrollbar { width: 0.375rem; }
        .panel-body::-webkit-scrollbar-track { background: transparent; }
        .panel-body::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        .panel-body::-webkit-scrollbar-thumb:hover { background: #475569; }

        /* ================================================================
           LOADING SKELETON
           ================================================================ */
        @keyframes shimmer {
            0% { background-position: -31.25rem 0; }
            100% { background-position: 31.25rem 0; }
        }
        .skeleton {
            background: linear-gradient(90deg, #1e293b 25%, #2d3b4f 50%, #1e293b 75%);
            background-size: 62.5rem 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 0.25rem;
        }

/* === admin-vendors === */
*, *::before, *::after { box-sizing: border-box; }
        html { font-size: 100%; }
        body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; margin: 0; min-width: 22.5rem; }

        /* ================================================================
           SIDEBAR
           ================================================================ */
        .sidebar {
            width: 15.625rem;
            background: #1e293b;
            min-height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            padding-top: 1.25rem;
            overflow-y: auto;
            z-index: 40;
            transition: transform 0.3s ease;
        }
        .sidebar .brand { padding: 0 1.25rem 1rem; }
        .sidebar .brand h1 { font-size: 1.125rem; font-weight: 700; color: #e94560; margin: 0; }
        .sidebar .brand p { font-size: 0.75rem; color: #64748b; margin: 0.25rem 0 0; }
        .sidebar .section-title {
            padding: 0.9375rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
        }
        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            min-height: 2.75rem;
        }
        .sidebar a:hover { color: #e2e8f0; background: #334155; }
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right: 0.1875rem solid #e94560;
        }
        .sidebar a i { width: 1.25rem; text-align: center; font-size: 0.875rem; }

        /* ================================================================
           MOBILE HAMBURGER
           ================================================================ */
        .hamburger {
            display: none;
            position: fixed;
            top: 0.75rem;
            left: 0.75rem;
            z-index: 50;
            background: #1e293b;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            color: #e2e8f0;
            width: 2.75rem;
            height: 2.75rem;
            cursor: pointer;
            font-size: 1.125rem;
            transition: background 0.2s ease;
        }
        .hamburger:hover { background: #334155; }
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 35;
        }
        .sidebar-overlay.show { display: block; }

        @media (max-width: 48rem) {
            .sidebar { transform: translateX(-100%); z-index: 45; }
            .sidebar.open { transform: translateX(0); }
            .hamburger { display: flex; align-items: center; justify-content: center; }
            .main-content { margin-left: 0 !important; padding: 1rem !important; padding-top: 4rem !important; }
            .stats-grid { grid-template-columns: 1fr 1fr !important; }
        }

        /* ================================================================
           MAIN CONTENT
           ================================================================ */
        .main-content { margin-left: 15.625rem; padding: 1.875rem; }

        /* ================================================================
           STAT CARDS
           ================================================================ */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.25rem;
            margin-bottom: 2rem;
        }
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .stat-card:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.3);
        }
        .stat-card .stat-icon {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            margin-bottom: 0.75rem;
        }
        .stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: #f1f5f9; }
        .stat-card .stat-label { font-size: 0.8125rem; color: #94a3b8; margin-top: 0.25rem; }

        /* ================================================================
           FILTER TABS (pill-style)
           ================================================================ */
        .filter-tabs {
            display: flex;
            gap: 0.125rem;
            background: #1e293b;
            border-radius: 0.625rem;
            padding: 0.1875rem;
            margin-bottom: 1.5rem;
            overflow-x: auto;
        }
        .filter-tab {
            padding: 0.5rem 1.125rem;
            border-radius: 0.5rem;
            font-size: 0.8125rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-height: 2.75rem;
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }
        .filter-tab:hover:not(.active) { color: #e2e8f0; }
        .filter-tab.active { background: #e94560; color: #ffffff; }
        .filter-tab .count {
            font-size: 0.6875rem;
            background: rgba(255,255,255,0.15);
            padding: 0.0625rem 0.375rem;
            border-radius: 0.375rem;
        }
        .filter-tab.active .count { background: rgba(255,255,255,0.25); }

        /* ================================================================
           DATA TABLE
           ================================================================ */
        .table-wrapper {
            border-radius: 0.75rem;
            overflow: hidden;
            border: 1px solid rgba(51,65,85,0.5);
        }
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            background: #1e293b;
            color: #94a3b8;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            font-weight: 600;
        }
        .data-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #1e293b;
            font-size: 0.875rem;
            vertical-align: middle;
        }
        .data-table tr { transition: background 0.15s ease; }
        .data-table tr:hover { background: rgba(30,41,59,0.4); }

        /* ================================================================
           BADGES
           ================================================================ */
        .badge {
            padding: 0.125rem 0.625rem;
            border-radius: 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
            display: inline-block;
        }
        .badge-green { background: rgba(6,95,70,0.19); color: #34d399; }
        .badge-yellow { background: rgba(133,77,14,0.19); color: #fbbf24; }
        .badge-red { background: rgba(127,29,29,0.19); color: #f87171; }
        .badge-blue { background: rgba(30,58,95,0.19); color: #60a5fa; }
        .badge-gray { background: rgba(51,65,85,0.19); color: #94a3b8; }

        /* ================================================================
           BUTTONS
           ================================================================ */
        .btn {
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            min-height: 2.75rem;
        }
        .btn-primary { background: #e94560; color: #ffffff; }
        .btn-primary:hover { background: #d63851; transform: translateY(-0.0625rem); }
        .btn-secondary { background: #334155; color: #e2e8f0; }
        .btn-secondary:hover { background: #475569; }
        .btn-success { background: #059669; color: #ffffff; }
        .btn-success:hover { background: #047857; }
        .btn-danger { background: #dc2626; color: #ffffff; }
        .btn-danger:hover { background: #b91c1c; }
        .btn-sm {
            padding: 0.375rem 0.75rem;
            font-size: 0.75rem;
            min-height: 2.75rem;
            min-width: 2.75rem;
            justify-content: center;
        }
        .btn-icon {
            width: 2.75rem;
            height: 2.75rem;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.5rem;
            border: none;
            cursor: pointer;
            background: transparent;
            color: #94a3b8;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }
        .btn-icon:hover { background: #334155; }
        .btn-icon.approve:hover { color: #34d399; background: rgba(6,95,70,0.19); }
        .btn-icon.reject:hover { color: #f87171; background: rgba(127,29,29,0.19); }
        .btn-icon.view:hover { color: #60a5fa; background: rgba(30,58,95,0.19); }

        /* ================================================================
           MODALS
           ================================================================ */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
        }
        .modal-overlay.show { display: flex; }
        .modal {
            background: #1e293b;
            border-radius: 0.75rem;
            width: 100%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .modal-sm { max-width: 28rem; }
        .modal-lg { max-width: 42rem; }
        .modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }
        .modal-header h2 { font-size: 1.125rem; font-weight: 700; margin: 0; }
        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }
        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.75rem;
            flex-shrink: 0;
        }
        .close-btn {
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 1.25rem;
            cursor: pointer;
            width: 2.75rem;
            height: 2.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }
        .close-btn:hover { background: #334155; color: #e2e8f0; }

        /* ================================================================
           FORM ELEMENTS
           ================================================================ */
        .form-group { margin-bottom: 1rem; }
        .form-label {
            display: block;
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
            font-weight: 500;
        }
        .form-input {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.2s ease;
            min-height: 2.75rem;
        }
        .form-input:focus { border-color: #e94560; }
        select.form-input { cursor: pointer; }

        /* ================================================================
           STARS RATING
           ================================================================ */
        .stars { display: inline-flex; gap: 0.0625rem; }
        .stars .fa-star { font-size: 0.75rem; }
        .stars .filled { color: #fbbf24; }
        .stars .empty { color: #475569; }

        /* ================================================================
           VENDOR INFO GRID
           ================================================================ */
        .info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        .info-item { }
        .info-item .info-label {
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.03125rem;
            margin-bottom: 0.25rem;
        }
        .info-item .info-value {
            font-size: 0.875rem;
            color: #e2e8f0;
        }

        /* ================================================================
           FINANCIAL SUMMARY
           ================================================================ */
        .financial-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
        }
        .financial-card {
            background: #0f172a;
            border-radius: 0.5rem;
            padding: 1rem;
            text-align: center;
        }
        .financial-card .fin-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: #f1f5f9;
        }
        .financial-card .fin-label {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.25rem;
            text-transform: uppercase;
        }

        /* ================================================================
           TRANSACTION LIST
           ================================================================ */
        .transaction-list { }
        .transaction-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 0;
            border-bottom: 1px solid rgba(51,65,85,0.4);
        }
        .transaction-item:last-child { border-bottom: none; }
        .transaction-left { display: flex; align-items: center; gap: 0.75rem; }
        .transaction-icon {
            width: 2rem;
            height: 2rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
        }
        .transaction-icon.credit { background: rgba(6,95,70,0.19); color: #34d399; }
        .transaction-icon.debit { background: rgba(127,29,29,0.19); color: #f87171; }
        .transaction-desc { font-size: 0.8125rem; color: #e2e8f0; }
        .transaction-date { font-size: 0.6875rem; color: #64748b; margin-top: 0.125rem; }
        .transaction-amount { font-size: 0.875rem; font-weight: 600; }
        .transaction-amount.credit { color: #34d399; }
        .transaction-amount.debit { color: #f87171; }

        /* ================================================================
           SECTION DIVIDER
           ================================================================ */
        .section-divider {
            font-size: 0.8125rem;
            font-weight: 600;
            color: #94a3b8;
            margin: 1.5rem 0 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .section-divider i { font-size: 0.75rem; color: #64748b; }

        /* ================================================================
           PAYOUT BALANCE DISPLAY
           ================================================================ */
        .payout-balance {
            background: #0f172a;
            border-radius: 0.75rem;
            padding: 1.5rem;
            text-align: center;
            margin-bottom: 1.5rem;
        }
        .payout-balance .balance-label {
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
        }
        .payout-balance .balance-value {
            font-size: 2rem;
            font-weight: 700;
            color: #34d399;
        }

        /* ================================================================
           SEARCH BAR
           ================================================================ */
        .search-wrapper { position: relative; }
        .search-wrapper input {
            padding-left: 2.5rem;
        }
        .search-wrapper i {
            position: absolute;
            left: 0.875rem;
            top: 50%;
            transform: translateY(-50%);
            color: #64748b;
            font-size: 0.875rem;
        }

        /* ================================================================
           TOAST ANIMATION (if not in api.js)
           ================================================================ */
        .toast-enter { animation: slideIn 0.3s ease; }
        .toast-exit { animation: slideOut 0.3s ease forwards; }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

        /* ================================================================
           EMPTY STATE
           ================================================================ */
        .empty-state {
            text-align: center;
            padding: 3rem 1.25rem;
            color: #64748b;
        }
        .empty-state i {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            display: block;
        }

        /* ================================================================
           RESPONSIVE TABLE
           ================================================================ */
        @media (max-width: 62rem) {
            .table-responsive { overflow-x: auto; }
            .stats-grid { grid-template-columns: repeat(2, 1fr); }
            .info-grid { grid-template-columns: 1fr; }
            .financial-grid { grid-template-columns: 1fr; }
        }

/* === index === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           STAT CARDS — #1e293b bg, 0.75rem rounded, 1.25rem padding
           ==================================================================== */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .stat-card:hover {
            border-color: #334155;
            transform: translateY(-0.125rem);
        }

        .stat-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .stat-card-label {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #94a3b8;
        }

        .stat-card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        .stat-card-trend {
            font-size: 0.75rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.1875rem;
        }

        .trend-up { color: #34d399; }
        .trend-down { color: #f87171; }

        /* ====================================================================
           CARDS / PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           QUICK ACTION CARDS
           ==================================================================== */
        .quick-action {
            display: flex;
            align-items: center;
            gap: 0.875rem;
            padding: 0.875rem;
            border-radius: 0.625rem;
            text-decoration: none;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border: 1px solid transparent;
        }

        .quick-action:hover {
            background: #33415540;
            border-color: #475569;
        }

        .quick-action-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.625rem;
            font-size: 1rem;
            flex-shrink: 0;
            transition: all 0.2s ease;
        }

        .quick-action:hover .quick-action-icon {
            transform: scale(1.05);
        }

        .quick-action-title {
            font-size: 0.875rem;
            font-weight: 600;
            color: #e2e8f0;
        }

        .quick-action-desc {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        /* ====================================================================
           TABLE — Orders
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           ACTIVITY FEED
           ==================================================================== */
        .activity-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.75rem 0;
            border-bottom: 1px solid #33415540;
            transition: all 0.2s ease;
        }

        .activity-item:last-child {
            border-bottom: none;
        }

        .activity-item:hover {
            padding-left: 0.25rem;
        }

        .activity-dot {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            margin-top: 0.4375rem;
            flex-shrink: 0;
        }

        .activity-text {
            font-size: 0.8125rem;
            color: #cbd5e1;
        }

        .activity-time {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.1875rem;
        }

        /* ====================================================================
           CHART CONTAINER
           ==================================================================== */
        .chart-container {
            position: relative;
            width: 100%;
            height: 18.75rem;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

/* === store-cart === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .store-card { background: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
        .store-card:hover { transform: translateY(-2px); }
        .price-tag { background: #e94560; color: white; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
        .btn-primary { background: #e94560; color: white; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; width: 100%; }
        .btn-primary:hover { background: #d63851; }
        .btn-primary:disabled { background: #475569; cursor: not-allowed; }
        .btn-secondary { background: #334155; color: #e2e8f0; padding: 10px 24px; border-radius: 8px; cursor: pointer; border: none; }
        .cart-item { background: #1e293b; border-radius: 12px; padding: 12px; display: flex; gap: 12px; align-items: center; }
        .qty-btn { width: 28px; height: 28px; border-radius: 6px; background: #334155; color: #e2e8f0; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
        .qty-btn:hover { background: #475569; }
        .remove-btn { color: #ef4444; cursor: pointer; background: none; border: none; padding: 4px; }
        .remove-btn:hover { color: #f87171; }
        .promo-input { background: #1e293b; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; padding: 10px 14px; font-size: 14px; }
        .promo-input:focus { outline: none; border-color: #e94560; }
        .summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
        .summary-divider { border-top: 1px solid #334155; margin: 8px 0; }

/* === store-checkout === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .btn-primary { background: #e94560; color: white; padding: 12px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; width: 100%; font-size: 16px; }
        .btn-primary:hover { background: #d63851; }
        .btn-primary:disabled { background: #475569; cursor: not-allowed; }
        .summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
        .summary-divider { border-top: 1px solid #334155; margin: 8px 0; }
        .order-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
        .stripe-element { background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 12px 14px; transition: border-color 0.2s; }
        .stripe-element.StripeElement--focus { border-color: #e94560; }
        .stripe-element.StripeElement--invalid { border-color: #ef4444; }
        .form-label { font-size: 13px; color: #94a3b8; margin-bottom: 6px; display: block; font-weight: 500; }
        .tv-banner { background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%); border: 1px solid #2563eb; border-radius: 12px; padding: 16px; }
        .success-overlay { position: fixed; inset: 0; background: #0f172a; z-index: 100; display: flex; align-items: center; justify-content: center; }
        .error-msg { color: #ef4444; font-size: 13px; margin-top: 6px; }

/* === store-index === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .store-card { background: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
        .store-card:hover { transform: translateY(-2px); }
        .price-tag { background: #e94560; color: white; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
        .btn-primary { background: #e94560; color: white; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; }
        .btn-primary:hover { background: #d63851; }
        .btn-secondary { background: #334155; color: #e2e8f0; padding: 10px 24px; border-radius: 8px; cursor: pointer; border: none; }
        .category-pill { background: #334155; color: #94a3b8; padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; border: none; }
        .category-pill.active { background: #e94560; color: white; }
        .type-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
        .type-badge.ebook { background: #1d4ed8; color: #bfdbfe; }
        .type-badge.course { background: #047857; color: #a7f3d0; }
        .type-badge.test-pack { background: #7c3aed; color: #ddd6fe; }
        .type-badge.ppv { background: #b45309; color: #fde68a; }
        .type-badge.bundle { background: #be185d; color: #fbcfe8; }
        .featured-banner { background: linear-gradient(135deg, #1e293b 0%, #334155 100%); border-radius: 16px; overflow: hidden; }
        .search-input { background: #1e293b; border: 1px solid #334155; border-radius: 10px; color: #e2e8f0; }
        .search-input:focus { outline: none; border-color: #e94560; }
        .stars { color: #f59e0b; }
        .stars .empty { color: #475569; }
        .skeleton { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === store-library === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .store-card { background: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
        .store-card:hover { transform: translateY(-2px); }
        .btn-primary { background: #e94560; color: white; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; }
        .btn-primary:hover { background: #d63851; }
        .btn-secondary { background: #334155; color: #e2e8f0; padding: 10px 24px; border-radius: 8px; cursor: pointer; border: none; }
        .category-pill { background: #334155; color: #94a3b8; padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; border: none; }
        .category-pill.active { background: #e94560; color: white; }
        .type-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
        .type-badge.ebook { background: #1d4ed8; color: #bfdbfe; }
        .type-badge.course { background: #047857; color: #a7f3d0; }
        .type-badge.test-pack { background: #7c3aed; color: #ddd6fe; }
        .type-badge.ppv { background: #b45309; color: #fde68a; }
        .type-badge.bundle { background: #be185d; color: #fbcfe8; }
        .type-badge.subscription { background: #0369a1; color: #bae6fd; }
        .access-active { background: #065f46; color: #6ee7b7; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
        .access-expired { background: #7f1d1d; color: #fca5a5; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
        .sub-banner { background: linear-gradient(135deg, #065f46 0%, #1e293b 100%); border: 1px solid #10b981; border-radius: 12px; padding: 16px; }
        .sub-banner.expired { background: linear-gradient(135deg, #7f1d1d 0%, #1e293b 100%); border-color: #ef4444; }
        .content-card { background: #1e293b; border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform 0.2s, background 0.2s; }
        .content-card:hover { transform: translateY(-2px); background: #253349; }

/* === store-orders === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .store-card { background: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
        .btn-primary { background: #e94560; color: white; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; }
        .btn-primary:hover { background: #d63851; }
        .category-pill { background: #334155; color: #94a3b8; padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; border: none; }
        .category-pill.active { background: #e94560; color: white; }
        .order-card { background: #1e293b; border-radius: 12px; padding: 16px; cursor: pointer; transition: background 0.2s; }
        .order-card:hover { background: #253349; }
        .status-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        .status-completed { background: #065f46; color: #6ee7b7; }
        .status-processing { background: #92400e; color: #fcd34d; }
        .status-cancelled { background: #7f1d1d; color: #fca5a5; }
        .status-pending { background: #1e3a5f; color: #93c5fd; }
        .timeline-step { display: flex; align-items: flex-start; gap: 12px; position: relative; padding-bottom: 20px; }
        .timeline-step:last-child { padding-bottom: 0; }
        .timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #475569; flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1; }
        .timeline-dot.active { background: #10b981; }
        .timeline-step:not(:last-child)::after { content: ''; position: absolute; left: 5.5px; top: 16px; bottom: 0; width: 1px; background: #334155; }
        .order-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
        .expand-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
        .expand-content.open { max-height: 500px; }

/* === store-product === */
body { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
        .store-card { background: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
        .store-card:hover { transform: translateY(-2px); }
        .price-tag { background: #e94560; color: white; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
        .btn-primary { background: #e94560; color: white; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; width: 100%; }
        .btn-primary:hover { background: #d63851; }
        .btn-secondary { background: #334155; color: #e2e8f0; padding: 10px 24px; border-radius: 8px; cursor: pointer; border: none; width: 100%; }
        .btn-secondary:hover { background: #475569; }
        .category-pill { background: #334155; color: #94a3b8; padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; border: none; }
        .category-pill.active { background: #e94560; color: white; }
        .type-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
        .type-badge.ebook { background: #1d4ed8; color: #bfdbfe; }
        .type-badge.course { background: #047857; color: #a7f3d0; }
        .type-badge.test-pack { background: #7c3aed; color: #ddd6fe; }
        .type-badge.ppv { background: #b45309; color: #fde68a; }
        .type-badge.bundle { background: #be185d; color: #fbcfe8; }
        .tab-btn { padding: 10px 16px; font-size: 14px; font-weight: 500; color: #94a3b8; border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
        .tab-btn.active { color: #e94560; border-bottom-color: #e94560; }
        .tab-content { display: none; }
        .tab-content.active { display: block; }
        .stars { color: #f59e0b; }
        .stars .empty { color: #475569; }
        .review-card { background: #1e293b; border-radius: 10px; padding: 16px; }
        .content-item { background: #1e293b; border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
        .skeleton { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === store-bundles === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           STAT CARDS — #1e293b bg, 0.75rem rounded, 1.25rem padding
           ==================================================================== */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .stat-card:hover {
            border-color: #334155;
            transform: translateY(-0.125rem);
        }

        .stat-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .stat-card-label {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #94a3b8;
        }

        .stat-card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        .stat-card-trend {
            font-size: 0.75rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.1875rem;
        }

        .trend-up { color: #34d399; }
        .trend-down { color: #f87171; }

        /* ====================================================================
           CARDS / PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           TABLE
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

        /* ====================================================================
           PAGE-SPECIFIC: BUTTONS
           ==================================================================== */
        .btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #e94560;
            color: white;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-primary:hover {
            background: #d63851;
        }

        .btn-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #334155;
            color: #e2e8f0;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-secondary:hover {
            background: #475569;
        }

        .btn-danger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #dc2626;
            color: white;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-danger:hover {
            background: #b91c1c;
        }

        .btn-sm {
            padding: 0.375rem 0.75rem;
            font-size: 0.75rem;
            min-height: 2.75rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: FORM INPUTS
           ==================================================================== */
        .form-input {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            outline: none;
            box-sizing: border-box;
            min-height: 2.75rem;
            transition: border-color 0.2s ease;
        }

        .form-input:focus {
            border-color: #e94560;
        }

        .form-label {
            display: block;
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
            font-weight: 500;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: BUNDLE CARDS
           ==================================================================== */
        .bundle-card {
            background: #1e293b;
            border-radius: 0.75rem;
            overflow: hidden;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            border: 1px solid transparent;
        }

        .bundle-card:hover {
            transform: translateY(-0.125rem);
            box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
            border-color: #334155;
        }

        .bundle-card__thumb {
            width: 100%;
            height: 10rem;
            object-fit: cover;
            background: #334155;
        }

        .bundle-card__nothumb {
            width: 100%;
            height: 10rem;
            background: #334155;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            font-size: 2.25rem;
        }

        .bundle-card__body {
            padding: 1rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: MODAL
           ==================================================================== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal-content {
            background: #1e293b;
            border-radius: 0.75rem;
            max-width: 40.625rem;
            width: 100%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #334155;
            flex-shrink: 0;
        }

        .modal-header h2 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid #334155;
            flex-shrink: 0;
        }

        .modal-close-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            font-size: 1.25rem;
            transition: all 0.2s ease;
        }

        .modal-close-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           PAGE-SPECIFIC: ITEM ROWS (bundle items)
           ==================================================================== */
        .item-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.75rem;
            background: #0f172a;
            border-radius: 0.5rem;
            margin-bottom: 0.375rem;
        }

        .item-row .item-title {
            font-size: 0.8125rem;
            color: #e2e8f0;
        }

        .item-row .item-actions {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .item-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
        }

        .item-action-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        .item-action-btn.danger:hover {
            color: #f87171;
        }

        .item-action-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* ====================================================================
           PAGE-SPECIFIC: SEARCH RESULTS DROPDOWN
           ==================================================================== */
        .search-results {
            max-height: 11.25rem;
            overflow-y: auto;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            margin-top: 0.375rem;
        }

        .search-results .result-item {
            padding: 0.5rem 0.75rem;
            cursor: pointer;
            font-size: 0.8125rem;
            transition: background 0.2s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-height: 2.75rem;
        }

        .search-results .result-item:hover {
            background: #334155;
        }

        /* ====================================================================
           PAGE-SPECIFIC: EMPTY STATE
           ==================================================================== */
        .empty-state {
            text-align: center;
            color: #64748b;
            padding: 3rem 1rem;
        }

        .empty-state i {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            display: block;
        }

        .empty-state p {
            font-size: 0.875rem;
        }

        /* ====================================================================
           RESPONSIVE GRID OVERRIDES
           ==================================================================== */
        @media (max-width: 48rem) {
            .bundles-grid {
                grid-template-columns: 1fr !important;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .bundles-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

/* === store-orders === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           STAT CARDS
           ==================================================================== */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .stat-card:hover {
            border-color: #334155;
            transform: translateY(-0.125rem);
        }

        .stat-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .stat-card-label {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #94a3b8;
        }

        .stat-card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        /* ====================================================================
           CARDS / PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           TABLE — Data
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

        /* ====================================================================
           PAGE-SPECIFIC — Tab Bar
           ==================================================================== */
        .tab-bar {
            display: flex;
            gap: 0.125rem;
            background: #1e293b;
            border-radius: 0.625rem;
            padding: 0.1875rem;
            margin-bottom: 1.5rem;
            overflow-x: auto;
        }

        .tab-btn {
            padding: 0.5rem 1.125rem;
            border-radius: 0.5rem;
            font-size: 0.8125rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-height: 2.75rem;
        }

        .tab-btn.active {
            background: #e94560;
            color: white;
        }

        .tab-btn:hover:not(.active) {
            color: #e2e8f0;
        }

        /* ====================================================================
           PAGE-SPECIFIC — Order Detail Expandable Row
           ==================================================================== */
        .order-detail {
            background: #0f172a;
            border-radius: 0.5rem;
            padding: 1rem;
            margin-top: 0.5rem;
        }

        .order-detail-label {
            font-size: 0.6875rem;
            color: #64748b;
            margin-bottom: 0.25rem;
        }

        .order-detail-value {
            font-size: 0.8125rem;
            color: #e2e8f0;
        }

        /* ====================================================================
           PAGE-SPECIFIC — Status Select
           ==================================================================== */
        .status-select {
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.375rem;
            padding: 0.25rem 0.5rem;
            color: #e2e8f0;
            font-size: 0.75rem;
            outline: none;
            cursor: pointer;
            min-height: 2.75rem;
            transition: border-color 0.2s ease;
        }

        .status-select:hover {
            border-color: #475569;
        }

        .status-select:focus {
            border-color: #e94560;
        }

        /* ====================================================================
           PAGE-SPECIFIC — Detail Toggle Button
           ==================================================================== */
        .detail-toggle-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
        }

        .detail-toggle-btn:hover {
            color: #60a5fa;
            background: #33415530;
        }

        /* ====================================================================
           PAGE-SPECIFIC — Inner Detail Table
           ==================================================================== */
        .detail-table {
            width: 100%;
            border-collapse: collapse;
        }

        .detail-table th {
            text-align: left;
            padding: 0.5rem 0;
            font-size: 0.75rem;
            font-weight: 400;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .detail-table th.text-right {
            text-align: right;
        }

        .detail-table td {
            padding: 0.5rem 0;
            font-size: 0.8125rem;
            color: #cbd5e1;
            border-bottom: 1px solid #33415530;
        }

        .detail-table td.text-right {
            text-align: right;
        }

        .detail-table tfoot td {
            font-weight: 600;
            color: #f1f5f9;
            border-bottom: none;
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }

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

            .data-table-wrap {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .order-detail-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

        /* ====================================================================
           UTILITY — Stats Grid
           ==================================================================== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        @media (max-width: 64rem) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
            }
        }

        /* ====================================================================
           UTILITY — Order Detail Grid
           ==================================================================== */
        .order-detail-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
            margin-bottom: 1rem;
        }

/* === store-products === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           STAT CARDS
           ==================================================================== */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .stat-card:hover {
            border-color: #334155;
            transform: translateY(-0.125rem);
        }

        .stat-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .stat-card-label {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #94a3b8;
        }

        .stat-card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        /* ====================================================================
           CARDS / PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-purple { background: #581c8730; color: #a78bfa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           TABLE
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

        /* ====================================================================
           PAGE-SPECIFIC: BUTTONS
           ==================================================================== */
        .btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #e94560;
            color: #ffffff;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-primary:hover {
            background: #d63851;
        }

        .btn-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #334155;
            color: #e2e8f0;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-secondary:hover {
            background: #475569;
        }

        .btn-danger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #dc2626;
            color: #ffffff;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .btn-danger:hover {
            background: #b91c1c;
        }

        .btn-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            background: transparent;
            color: #94a3b8;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }

        .btn-icon:hover {
            background: #33415540;
        }

        .btn-icon.edit:hover { color: #60a5fa; }
        .btn-icon.delete:hover { color: #f87171; }

        /* ====================================================================
           PAGE-SPECIFIC: FORM ELEMENTS
           ==================================================================== */
        .form-input {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            font-family: inherit;
            outline: none;
            box-sizing: border-box;
            min-height: 2.75rem;
            transition: border-color 0.2s ease;
        }

        .form-input:focus {
            border-color: #e94560;
        }

        .form-label {
            display: block;
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
            font-weight: 500;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: THUMBNAIL CELL
           ==================================================================== */
        .thumbnail-cell img {
            width: 3rem;
            height: 3rem;
            border-radius: 0.5rem;
            object-fit: cover;
            background: #334155;
        }

        .thumbnail-cell .no-img {
            width: 3rem;
            height: 3rem;
            border-radius: 0.5rem;
            background: #334155;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            font-size: 1.125rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: MODAL
           ==================================================================== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal-content {
            background: #1e293b;
            border-radius: 0.75rem;
            max-width: 37.5rem;
            width: 100%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            border: 1px solid #334155;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #334155;
            flex-shrink: 0;
        }

        .modal-header h2 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid #334155;
            flex-shrink: 0;
        }

        /* ====================================================================
           PAGE-SPECIFIC: SEARCH BAR
           ==================================================================== */
        .search-wrapper {
            position: relative;
        }

        .search-wrapper .search-icon {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: #64748b;
            font-size: 0.875rem;
            pointer-events: none;
        }

        .search-wrapper .form-input {
            padding-left: 2.5rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: CHECKBOX STYLE
           ==================================================================== */
        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            min-height: 2.75rem;
            font-size: 0.875rem;
            color: #cbd5e1;
        }

        .checkbox-label input[type="checkbox"] {
            width: 1rem;
            height: 1rem;
            accent-color: #e94560;
            cursor: pointer;
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }

            .toolbar {
                flex-direction: column;
                align-items: stretch;
                gap: 0.75rem;
            }

            .toolbar-filters {
                flex-direction: column;
                gap: 0.5rem;
            }

            .toolbar-filters .search-wrapper,
            .toolbar-filters .filter-select-wrapper {
                width: 100%;
            }

            .stat-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .table-scroll {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

/* === store-revenue === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           STAT CARDS — #1e293b bg, 0.75rem rounded, 1.25rem padding
           ==================================================================== */
        .stat-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.25rem;
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .stat-card:hover {
            border-color: #334155;
            transform: translateY(-0.125rem);
        }

        .stat-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            flex-shrink: 0;
        }

        .stat-card-label {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #94a3b8;
        }

        .stat-card-value {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1.2;
        }

        .stat-card-trend {
            font-size: 0.75rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.1875rem;
        }

        .trend-up { color: #34d399; }
        .trend-down { color: #f87171; }

        /* ====================================================================
           CARDS / PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           TABLE
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           CHART CONTAINER
           ==================================================================== */
        .chart-container {
            position: relative;
            width: 100%;
            height: 18.75rem;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           PAGE-SPECIFIC: REVENUE SELECT
           ==================================================================== */
        .period-select {
            background: #0f172a;
            border: 1px solid #475569;
            border-radius: 0.5rem;
            padding: 0.5rem 0.75rem;
            font-size: 0.875rem;
            color: #cbd5e1;
            outline: none;
            min-height: 2.75rem;
            cursor: pointer;
            transition: border-color 0.2s ease;
            font-family: inherit;
        }

        .period-select:hover,
        .period-select:focus {
            border-color: #e94560;
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }

            .two-col-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

        /* ====================================================================
           PAGE-SPECIFIC GRID HELPERS
           ==================================================================== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }

        @media (min-width: 48.0625rem) {
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1rem;
            }
        }

        .two-col-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        @media (min-width: 48.0625rem) {
            .two-col-grid {
                grid-template-columns: 1fr 1fr;
                gap: 1.5rem;
            }
        }

/* === store-subscriptions === */
/* ====================================================================
           DESIGN SYSTEM — zero px values (except border-width)
           Background: #0f172a | Text: #e2e8f0 | Font: system-ui
           ==================================================================== */

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

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

        body {
            background: #0f172a;
            color: #e2e8f0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ====================================================================
           SCROLLBAR
           ==================================================================== */
        ::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
        ::-webkit-scrollbar-track { background: #0f172a; }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 0.1875rem; }
        ::-webkit-scrollbar-thumb:hover { background: #e94560; }

        /* ====================================================================
           LAYOUT
           ==================================================================== */
        .layout-wrapper {
            display: flex;
            min-height: 100vh;
        }

        /* ====================================================================
           SIDEBAR — 15.625rem wide, #1e293b bg
           ==================================================================== */
        .sidebar {
            width: 15.625rem;
            min-height: 100vh;
            background: #1e293b;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 40;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #334155;
            transition: transform 0.3s ease;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 1.25rem 1.25rem 1rem;
            border-bottom: 1px solid #334155;
        }

        .sidebar-header h1 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f43f5e;
            margin: 0;
        }

        .sidebar-header p {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }

        .sidebar .section-title {
            padding: 1rem 1.25rem 0.3125rem;
            font-size: 0.6875rem;
            text-transform: uppercase;
            color: #64748b;
            letter-spacing: 0.0625rem;
            font-weight: 600;
        }

        .sidebar a {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1.25rem;
            color: #94a3b8;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            min-height: 2.75rem;
            border-right: 0.1875rem solid transparent;
        }

        .sidebar a:hover,
        .sidebar a.active {
            color: #e2e8f0;
            background: #334155;
            border-right-color: #e94560;
        }

        .sidebar a i {
            width: 1.25rem;
            text-align: center;
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 1rem 1.25rem;
            border-top: 1px solid #334155;
        }

        .sidebar-footer button {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            width: 100%;
            padding: 0.625rem 0;
            color: #ef4444;
            background: none;
            border: none;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            min-height: 2.75rem;
            transition: all 0.2s ease;
        }

        .sidebar-footer button:hover {
            color: #f87171;
        }

        /* Sidebar overlay for mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 35;
        }

        /* ====================================================================
           MAIN CONTENT
           ==================================================================== */
        .main-content {
            margin-left: 15.625rem;
            flex: 1;
            min-height: 100vh;
        }

        .content-area {
            padding: 1.5rem;
        }

        /* ====================================================================
           MOBILE TOPBAR
           ==================================================================== */
        .mobile-topbar {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: #1e293b;
            border-bottom: 1px solid #334155;
        }

        .hamburger-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .hamburger-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        /* ====================================================================
           PAGE HEADER
           ==================================================================== */
        .page-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .page-header p {
            font-size: 0.875rem;
            color: #64748b;
            margin-top: 0.25rem;
        }

        /* ====================================================================
           PANELS
           ==================================================================== */
        .panel {
            background: #1e293b;
            border-radius: 0.75rem;
            border: 1px solid #334155;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .panel:hover {
            border-color: #475569;
        }

        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #334155;
        }

        .panel-header h2 {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
        }

        .panel-body {
            padding: 1.25rem;
        }

        /* ====================================================================
           BADGE COLORS
           ==================================================================== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.125rem 0.625rem;
            border-radius: 62.4375rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .badge-green  { background: #065f4630; color: #34d399; }
        .badge-yellow { background: #854d0e30; color: #fbbf24; }
        .badge-red    { background: #7f1d1d30; color: #f87171; }
        .badge-blue   { background: #1e3a5f30; color: #60a5fa; }
        .badge-gray   { background: #33415530; color: #94a3b8; }

        /* ====================================================================
           TABLE
           ==================================================================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
            color: #64748b;
            border-bottom: 1px solid #334155;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            font-size: 0.8125rem;
            border-bottom: 1px solid #1e293b;
            color: #cbd5e1;
        }

        .data-table tbody tr {
            transition: background 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: #33415520;
        }

        /* ====================================================================
           SPINNER
           ==================================================================== */
        .spinner {
            width: 2rem;
            height: 2rem;
            border: 0.1875rem solid #334155;
            border-top-color: #e94560;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ====================================================================
           BUTTONS
           ==================================================================== */
        .btn-primary {
            background: #e94560;
            color: white;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            transition: all 0.2s ease;
        }

        .btn-primary:hover {
            background: #d63851;
            transform: translateY(-0.0625rem);
        }

        .btn-secondary {
            background: #334155;
            color: #e2e8f0;
            padding: 0.5rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.875rem;
            min-height: 2.75rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.375rem;
            transition: all 0.2s ease;
        }

        .btn-secondary:hover {
            background: #475569;
        }

        .btn-danger {
            background: #dc2626;
            color: white;
            padding: 0.375rem 0.75rem;
            border-radius: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 0.75rem;
            min-height: 2.75rem;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            transition: all 0.2s ease;
        }

        .btn-danger:hover {
            background: #b91c1c;
        }

        /* ====================================================================
           FORM INPUTS
           ==================================================================== */
        .form-input {
            width: 100%;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 0.5rem;
            padding: 0.625rem 0.875rem;
            color: #e2e8f0;
            font-size: 0.875rem;
            outline: none;
            box-sizing: border-box;
            min-height: 2.75rem;
            transition: border-color 0.2s ease;
        }

        .form-input:focus {
            border-color: #e94560;
        }

        .form-label {
            display: block;
            font-size: 0.8125rem;
            color: #94a3b8;
            margin-bottom: 0.375rem;
            font-weight: 500;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        textarea.form-input {
            min-height: auto;
            resize: vertical;
        }

        /* ====================================================================
           PLAN CARDS
           ==================================================================== */
        .plan-card {
            background: #1e293b;
            border-radius: 0.75rem;
            padding: 1.5rem;
            border: 1px solid #334155;
            transition: all 0.2s ease;
            position: relative;
        }

        .plan-card:hover {
            border-color: #475569;
            transform: translateY(-0.125rem);
        }

        .plan-card.popular {
            border-color: #e94560;
        }

        .plan-card .popular-tag {
            position: absolute;
            top: -0.0625rem;
            right: 1.25rem;
            background: #e94560;
            color: white;
            font-size: 0.625rem;
            font-weight: 700;
            padding: 0.1875rem 0.625rem;
            border-radius: 0 0 0.375rem 0.375rem;
            text-transform: uppercase;
            letter-spacing: 0.03125rem;
        }

        .plan-price {
            font-size: 2.25rem;
            font-weight: 800;
            color: #f1f5f9;
        }

        .plan-price .period {
            font-size: 0.875rem;
            font-weight: 400;
            color: #94a3b8;
        }

        .feature-list {
            list-style: none;
            padding: 0;
            margin: 1rem 0;
        }

        .feature-list li {
            padding: 0.375rem 0;
            font-size: 0.8125rem;
            color: #94a3b8;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .feature-list li i {
            color: #34d399;
            font-size: 0.75rem;
        }

        /* ====================================================================
           MODAL — max-height 85vh, scrollable body, fixed header/footer
           ==================================================================== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal-content {
            background: #1e293b;
            border-radius: 0.75rem;
            max-width: 34.375rem;
            width: 100%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            border: 1px solid #334155;
            overflow: hidden;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #334155;
            flex-shrink: 0;
        }

        .modal-header h2 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #f1f5f9;
        }

        .modal-close-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 1.25rem;
            cursor: pointer;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
        }

        .modal-close-btn:hover {
            background: #334155;
            color: #e2e8f0;
        }

        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid #334155;
            flex-shrink: 0;
        }

        /* ====================================================================
           CHECKBOX WRAPPER
           ==================================================================== */
        .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            min-height: 2.75rem;
        }

        .checkbox-wrapper input[type="checkbox"] {
            width: 1rem;
            height: 1rem;
            accent-color: #e94560;
            cursor: pointer;
        }

        .checkbox-wrapper span {
            font-size: 0.875rem;
            color: #cbd5e1;
        }

        /* ====================================================================
           TOAST
           ==================================================================== */
        .toast-enter {
            animation: toastIn 0.3s ease;
        }

        .toast-exit {
            animation: toastOut 0.3s ease forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to   { opacity: 0; transform: translateX(100%); }
        }

        /* ====================================================================
           RESPONSIVE — Mobile first from 22.5rem (360px equiv)
           ==================================================================== */
        @media (max-width: 48rem) {
            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar.open ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-topbar {
                display: flex;
            }

            .content-area {
                padding: 1rem;
            }

            .plans-grid {
                grid-template-columns: 1fr !important;
            }

            .page-header-row {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.75rem;
            }

            .subscribers-section-header {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.5rem;
            }

            .table-scroll-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

        @media (min-width: 48.0625rem) and (max-width: 64rem) {
            .content-area {
                padding: 1.25rem;
            }

            .plans-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

        @media (min-width: 64.0625rem) {
            .content-area {
                padding: 2rem;
            }
        }

/* === student-dashboard === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .progress-ring { transition: stroke-dashoffset 0.6s ease; }

/* === student-episode === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        #videoPlayer { background: #000; }
        .video-container { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: 0.75rem; overflow: hidden; }
        .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
        .video-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); transition: opacity 0.3s; }
        .video-overlay.hidden { opacity: 0; pointer-events: none; }

/* === student-grades === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === student-homework === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3); }

/* === student-series === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .episode-card:hover { transform: translateY(-1px); }

/* === student-test === */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
        .skeleton { background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .fade-in { animation: fadeIn 0.3s ease-in; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .question-slide { animation: slideIn 0.25s ease; }
        @keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
        .radio-option:has(input:checked) { border-color: rgba(139, 92, 246, 0.5); background: rgba(139, 92, 246, 0.1); }
        .radio-option:has(input:checked) .radio-dot { background: #8b5cf6; border-color: #8b5cf6; }
        .timer-warning { animation: pulse 1s ease-in-out infinite; }
        @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
