/* ========== COMPLETE CSS ========== */
        :root {
            --bg-primary: #fef9e6;
            --bg-surface: #ffffff;
            --sidebar-bg: #ffffff;
            --card-bg: #ffffff;
            --text-primary: #1e1e2a;
            --text-secondary: #5a5a6e;
            --border-light: #ffe0b5;
            --accent-gradient: linear-gradient(135deg, #FFB347, #FF6B35, #E63946);
            --accent-gradient-hover: linear-gradient(135deg, #FFA133, #FF5722, #D62828);
            --stat-icon-bg: linear-gradient(145deg, #FFD966, #FF8C42);
            --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
            --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
            --nav-active: linear-gradient(95deg, #FFE6C7, #FFF2E0);
            --nav-hover: #FFF1E0;
            --footer-bg: #fff4e8;
            --btn-primary: linear-gradient(100deg, #FF8C42, #FF6B35);
            --btn-save: linear-gradient(100deg, #E63946, #FF8C42);
            --sidebar-width: 260px;
            --sidebar-collapsed-width: 70px;
        }

        body.dark {
            --bg-primary: #121212;
            --bg-surface: #1e1e2a;
            --sidebar-bg: #1a1a24;
            --card-bg: #252532;
            --text-primary: #f0f0f0;
            --text-secondary: #b0b0c0;
            --border-light: #2d2d3a;
            --accent-gradient: linear-gradient(135deg, #FFB347, #FF6B35, #E63946);
            --accent-gradient-hover: linear-gradient(135deg, #FFA133, #FF5722, #D62828);
            --stat-icon-bg: linear-gradient(145deg, #FF8C42, #D63E2E);
            --shadow-sm: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
            --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
            --nav-active: #2a2a36;
            --nav-hover: #2f2f3d;
            --footer-bg: #14141c;
            --btn-primary: linear-gradient(100deg, #FF9F4A, #FF784B);
            --btn-save: linear-gradient(100deg, #E64B2E, #FF9F4A);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            transition: all 0.2s ease;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            font-size: 14px;
        }

        .app-container {
            display: flex;
            min-height: 100vh;
        }

        /* SIDEBAR */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--sidebar-bg);
            border-right: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            overflow-y: auto;
            z-index: 100;
            transition: width 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        }

        .sidebar.collapsed {
            width: var(--sidebar-collapsed-width);
        }

        .sidebar.collapsed .sidebar-brand h2 span,
        .sidebar.collapsed .nav-link span,
        .sidebar.collapsed .sidebar-footer small {
            display: none;
        }

        .sidebar.collapsed .nav-link {
            justify-content: center;
            padding: 10px;
        }

        .sidebar.collapsed .nav-link i {
            margin: 0;
            font-size: 1.3rem;
        }

        .sidebar-brand {
            padding: 20px 20px;
            border-bottom: 1px solid var(--border-light);
            white-space: nowrap;
        }

        .sidebar-brand h2 {
            font-size: 1.5rem;
            font-weight: 800;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .sidebar-nav {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 20px 16px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            border-radius: 12px;
            font-weight: 500;
            font-size: 0.9rem;
            color: var(--text-secondary);
            text-decoration: none;
            white-space: nowrap;
        }

        .nav-link i {
            width: 20px;
            font-size: 1.1rem;
            color: #FF8C42;
        }

        .nav-link:hover {
            background: var(--nav-hover);
            color: var(--text-primary);
            transform: translateX(3px);
        }

        .nav-link.active {
            background: var(--accent-gradient);
            color: white;
            box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
        }

        .nav-link.active i {
            color: white;
        }

        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid var(--border-light);
            text-align: center;
            font-size: 0.7rem;
        }

        /* MAIN WRAPPER */
        .main-wrapper {
            flex: 1;
            margin-left: var(--sidebar-width);
            transition: margin-left 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            width: 100%;
        }

        .sidebar.collapsed ~ .main-wrapper {
            margin-left: var(--sidebar-collapsed-width);
        }

        /* HEADER */
        .top-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 24px;
            background: var(--bg-surface);
            border-bottom: 1px solid var(--border-light);
            position: sticky;
            top: 0;
            z-index: 50;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .sidebar-toggle-btn {
            background: var(--card-bg);
            border: 1px solid var(--border-light);
            padding: 6px 10px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 1rem;
            color: var(--text-primary);
        }

        .sidebar-toggle-btn:hover {
            background: var(--accent-gradient);
            color: white;
        }

        .logo-mobile {
            display: none;
            font-weight: 800;
            font-size: 1.2rem;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .theme-toggle-btn {
            background: var(--card-bg);
            border: 1px solid var(--border-light);
            padding: 6px 12px;
            border-radius: 30px;
            font-weight: 500;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-primary);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-weight: 500;
            font-size: 0.85rem;
            background: rgba(255, 107, 53, 0.1);
            padding: 5px 12px;
            border-radius: 30px;
        }

        .user-profile i {
            font-size: 1.5rem;
            color: #FF6B35;
        }

        /* MAIN CONTENT */
        .main-content {
            flex: 1;
            padding: 20px 24px;
        }

        .page-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .page-content.active-page {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px);}
            to { opacity: 1; transform: translateY(0);}
        }

        /* STATS GRID */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-light);
            cursor: pointer;
            transition: transform 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
        }

        .stat-icon {
            background: var(--stat-icon-bg);
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 24px;
            font-size: 24px;
            color: white;
        }

        .stat-details h3 {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }

        .stat-number {
            font-size: 1.6rem;
            font-weight: 800;
            margin: 4px 0 2px;
        }

        .stat-trend {
            font-size: 0.7rem;
            font-weight: 600;
            background: rgba(0,0,0,0.05);
            padding: 3px 8px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        /* CHARTS GRID */
        .charts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .chart-card {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 16px 20px;
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-sm);
        }

        .section-header {
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 0.9rem;
            border-left: 3px solid #FF6B35;
            padding-left: 12px;
        }

        /* TABLES */
        .orders-section, .products-section, .analytics-section {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 16px 20px;
            margin-bottom: 24px;
            border: 1px solid var(--border-light);
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }

        .data-table th, .data-table td {
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-light);
        }

        .data-table th {
            background: var(--accent-gradient);
            color: white;
            font-weight: 600;
            font-size: 0.8rem;
        }

        .data-table tr:hover {
            background: var(--nav-hover);
        }

        .badge {
            padding: 3px 10px;
            border-radius: 30px;
            font-size: 0.7rem;
            font-weight: 600;
            display: inline-block;
        }

        .badge.active { background: #2b9348; color: white; }
        .badge.pending { background: #ffb347; color: #1e1e2a; }
        .badge.shipped { background: #4a90e2; color: white; }
        .badge.inactive { background: #a0a0b0; color: #1e1e2a; }
        .badge.success { background: #2b9348; color: white; }
        .badge.warning { background: #ffb347; color: #1e1e2a; }

        .btn-primary {
            background: var(--btn-primary);
            border: none;
            padding: 6px 14px;
            border-radius: 30px;
            font-weight: 500;
            font-size: 0.8rem;
            color: white;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-primary:hover {
            transform: scale(0.98);
        }

        .btn-sm {
            padding: 4px 10px;
            font-size: 0.75rem;
        }

        /* Users Stats */
        .users-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .mini-stat {
            background: var(--card-bg);
            padding: 16px;
            border-radius: 16px;
            text-align: center;
            border: 1px solid var(--border-light);
        }

        .mini-stat h3 {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .mini-stat p {
            font-size: 1.5rem;
            font-weight: 800;
        }

        /* Settings Form */
        .settings-form-card {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 24px;
            max-width: 650px;
            border: 1px solid var(--border-light);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            font-size: 0.85rem;
            margin-bottom: 6px;
        }

        .form-group input, .form-group select {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-primary);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            font-size: 0.85rem;
            color: var(--text-primary);
        }

        .checkbox-group {
            display: flex;
            gap: 20px;
            margin-top: 6px;
        }

        .checkbox-group label {
            font-weight: normal;
            font-size: 0.85rem;
        }

        .btn-save {
            background: var(--btn-save);
            border: none;
            padding: 10px 24px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 0.85rem;
            color: white;
            cursor: pointer;
        }

        .main-footer {
            text-align: center;
            padding: 16px 24px;
            background: var(--footer-bg);
            border-top: 1px solid var(--border-light);
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        /* Product Grid */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 16px;
            margin-top: 20px;
        }

        .product-card {
            background: var(--card-bg);
            padding: 16px;
            border-radius: 16px;
            border: 1px solid var(--border-light);
            text-align: center;
        }

        .product-card i {
            font-size: 2rem;
            color: #FF6B35;
            margin-bottom: 10px;
        }

        .product-card h4 {
            font-size: 1rem;
            margin: 8px 0;
        }

        .product-card p {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .price {
            font-size: 1.2rem;
            font-weight: 700;
            color: #FF6B35;
            margin: 8px 0;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                position: fixed;
                width: var(--sidebar-width);
            }
            .sidebar.mobile-open {
                transform: translateX(0);
            }
            .main-wrapper {
                margin-left: 0 !important;
            }
            .charts-grid {
                grid-template-columns: 1fr;
            }
            .main-content {
                padding: 16px;
            }
            .stats-grid {
                grid-template-columns: 1fr;
            }
            .data-table {
                font-size: 0.75rem;
            }
            .logo-mobile {
                display: block;
            }
        }