﻿        :root[data-theme="dark"] {
            --bg-base: #0f172a;
            --bg-panel: rgba(30, 41, 59, 0.7);
            --bg-hover: rgba(51, 65, 85, 0.8);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border: rgba(255, 255, 255, 0.1);
            --accent: #8b5cf6;
            --accent-glow: rgba(139, 92, 246, 0.4);
            --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --info: #3b82f6;
            --glass-blur: blur(12px);
        }

        :root[data-theme="light"] {
            --bg-base: #f1f5f9;
            --bg-panel: rgba(255, 255, 255, 0.8);
            --bg-hover: rgba(226, 232, 240, 0.8);
            --text-main: #0f172a;
            --text-muted: #475569;
            --border: rgba(0, 0, 0, 0.1);
            --accent: #6366f1;
            --accent-glow: rgba(99, 102, 241, 0.4);
            --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
            --success: #059669;
            --danger: #dc2626;
            --warning: #d97706;
            --info: #2563eb;
            --glass-blur: blur(12px);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
        
        body {
            background: var(--bg-base);
            color: var(--text-main);
            overflow: hidden;
            display: flex;
            height: 100vh;
            transition: background 0.3s ease, color 0.3s ease;
        }

        /* Utilities */
        .glass {
            background: var(--bg-panel);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            border-radius: 16px;
        }
        
        .flex { display: flex; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .gap-2 { gap: 0.5rem; }
        .gap-4 { gap: 1rem; }
        .w-full { width: 100%; }
        .mb-4 { margin-bottom: 1rem; }
        .mt-4 { margin-top: 1rem; }
        .text-accent { color: var(--accent); }
        .text-success { color: var(--success); }
        .text-danger { color: var(--danger); }
        .text-warning { color: var(--warning); }
        .text-info { color: var(--info); }
        .text-muted { color: var(--text-muted); }
        .font-bold { font-weight: 700; }
        .text-xs { font-size: 0.75rem; }

        /* Ripple Effect */
        .ripple-btn {
            position: relative;
            overflow: hidden;
            cursor: pointer;
        }
        .ripple {
            position: absolute;
            border-radius: 50%;
            transform: scale(0);
            animation: ripple-anim 0.6s linear;
            background-color: rgba(255, 255, 255, 0.3);
            pointer-events: none;
        }
        @keyframes ripple-anim {
            to { transform: scale(4); opacity: 0; }
        }

        /* App Layout */
        .app-container { display: flex; width: 100%; height: 100%; }
        
        /* Sidebar */
        .sidebar {
            width: 260px;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border);
            background: var(--bg-panel);
            backdrop-filter: var(--glass-blur);
            transition: width 0.3s ease, transform 0.3s ease;
            z-index: 100;
        }
        .sidebar.collapsed { width: 80px; }
        
        .sidebar-header {
            height: 70px;
            display: flex;
            align-items: center;
            padding: 0 24px;
            border-bottom: 1px solid var(--border);
            gap: 12px;
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-main);
            overflow: hidden;
            white-space: nowrap;
        }
        .sidebar-header i { color: var(--accent); font-size: 1.5rem; }
        
        .nav-menu {
            flex: 1;
            padding: 24px 0;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .nav-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 24px;
            color: var(--text-muted);
            text-decoration: none;
            transition: 0.3s;
            border-left: 3px solid transparent;
            cursor: pointer;
            white-space: nowrap;
        }
        
        .nav-item:hover { background: var(--bg-hover); color: var(--text-main); }
        .nav-item.active {
            background: var(--bg-hover);
            color: var(--accent);
            border-left-color: var(--accent);
        }
        .nav-item i { font-size: 1.25rem; }
        
        .sidebar-footer {
            padding: 24px;
            border-top: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            color: var(--text-muted);
            transition: 0.3s;
        }
        .sidebar-footer:hover { color: var(--text-main); }

        .sidebar.collapsed .nav-text, 
        .sidebar.collapsed .sidebar-header span,
        .sidebar.collapsed .badge {
            display: none;
        }

        .badge {
            background: var(--accent);
            color: white;
            font-size: 0.75rem;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
            margin-left: auto;
        }

        /* Mobile Overlay */
        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 90;
            display: none;
            opacity: 0;
            transition: 0.3s;
        }

        /* Main Content wrapper */
        .main-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }

        /* Navbar */
        .navbar {
            height: 70px;
            background: var(--bg-panel);
            backdrop-filter: var(--glass-blur);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            z-index: 50;
        }
        
        .nav-left { display: flex; align-items: center; gap: 16px; }
        
        .search-container { position: relative; }
        .search-container input {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            color: var(--text-main);
            padding: 8px 16px 8px 36px;
            border-radius: 20px;
            width: 200px;
            transition: width 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
            outline: none;
        }
        .search-container input:focus {
            width: 300px;
            border-color: var(--accent);
            box-shadow: 0 0 10px var(--accent-glow);
        }
        .search-container i {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        .nav-right { display: flex; align-items: center; gap: 20px; }
        
        .icon-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1.5rem;
            cursor: pointer;
            transition: 0.3s;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }
        .icon-btn:hover { color: var(--accent); background: var(--bg-hover); }
        .icon-btn .badge { position: absolute; top: 0; right: 0; transform: translate(20%, -20%); font-size: 0.6rem; padding: 2px 5px; }

        .dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            width: 300px;
            border-radius: 12px;
            padding: 10px;
            display: none;
            flex-direction: column;
            gap: 5px;
            opacity: 0;
            transform: translateY(10px);
            transition: 0.3s ease;
            transform-origin: top right;
            z-index: 100;
        }
        .dropdown.show {
            display: flex;
            opacity: 1;
            transform: translateY(0);
        }
        .dropdown-item {
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.875rem;
        }
        .dropdown-item:hover { background: var(--bg-hover); color: var(--accent); }

        .avatar-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--accent);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            border: none;
            cursor: pointer;
        }

        /* Content Area */
        .content-area {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
            position: relative;
            scroll-behavior: smooth;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

        /* Pages */
        .page-section { display: none; }
        .page-section.active { display: block; animation: fadeSlideUp 0.5s ease forwards; }
        @keyframes fadeSlideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .page-header { margin-bottom: 24px; }
        .page-title { font-size: 1.75rem; font-weight: 600; margin-bottom: 4px; }
        .breadcrumb { color: var(--text-muted); font-size: 0.875rem; }

        /* Grids */
        .grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 24px; }
        .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 24px; margin-bottom: 24px; }

        /* Cards */
        .card { padding: 20px; transition: transform 0.3s, box-shadow 0.3s; position: relative; overflow: hidden; }
        .card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px 0 rgba(0,0,0,0.4); border-color: var(--accent-glow); }
        
        /* KPI Cards */
        .kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .kpi-title { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }
        .kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--bg-hover); color: var(--accent); }
        .kpi-value { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
        .kpi-change { font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 4px; }

        /* Chart Cards */
        .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .chart-title { font-size: 1.1rem; font-weight: 600; }
        .chart-container { position: relative; height: 300px; width: 100%; }
        
        .btn {
            background: var(--bg-hover);
            color: var(--text-main);
            border: 1px solid var(--border);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .btn:hover { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 15px var(--accent-glow); }
        .btn-primary { background: var(--accent); color: white; border-color: var(--accent); }

        /* Tables */
        .table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
        .table-toolbar input {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            color: var(--text-main);
            padding: 8px 16px;
            border-radius: 8px;
            outline: none;
            width: 250px;
        }
        .table-responsive { overflow-x: auto; }
        table { width: 100%; border-collapse: collapse; text-align: left; }
        th, td { padding: 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
        th { color: var(--text-muted); font-weight: 500; cursor: pointer; user-select: none; transition: 0.3s; }
        th:hover { color: var(--accent); }
        tbody tr { transition: 0.3s; }
        tbody tr:hover { background: var(--bg-hover); }
        
        .status { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
        .status.completed { background: rgba(16, 185, 129, 0.2); color: var(--success); }
        .status.pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
        .status.cancelled { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
        
        .pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
        .page-btn {
            background: var(--bg-hover);
            border: 1px solid var(--border);
            color: var(--text-main);
            width: 36px; height: 36px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.3s;
            display: flex; align-items: center; justify-content: center;
        }
        .page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

        /* Settings */
        .settings-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 600px; }
        .settings-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
        
        .color-swatches { display: flex; gap: 12px; }
        .swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.3s; }
        .swatch.active { border-color: white; transform: scale(1.1); box-shadow: 0 0 10px currentColor; }
        
        .toggle-switch {
            position: relative;
            width: 48px;
            height: 24px;
            background: var(--bg-hover);
            border-radius: 12px;
            cursor: pointer;
            transition: 0.3s;
            border: 1px solid var(--border);
        }
        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 18px;
            height: 18px;
            background: var(--text-muted);
            border-radius: 50%;
            transition: 0.3s;
        }
        .toggle-switch.on { background: var(--accent); border-color: var(--accent); }
        .toggle-switch.on::after { transform: translateX(24px); background: white; }

        /* Toasts */
        .toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 1000; }
        .toast {
            padding: 16px 20px;
            background: var(--bg-panel);
            backdrop-filter: var(--glass-blur);
            border-left: 4px solid var(--accent);
            border-radius: 8px;
            box-shadow: var(--shadow);
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 280px;
            animation: slideInRight 0.3s ease forwards;
            position: relative;
            overflow: hidden;
        }
        @keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
        
        .toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent); width: 100%; animation: progress 3s linear forwards; }
        @keyframes progress { from { width: 100%; } to { width: 0; } }

        /* Skeleton */
        .skeleton-overlay {
            position: absolute;
            inset: 0;
            background: var(--bg-panel);
            backdrop-filter: var(--glass-blur);
            z-index: 10;
            display: none;
            border-radius: 16px;
            padding: 20px;
        }
        .skeleton {
            background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 8px;
        }
        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .skeleton-title { height: 24px; width: 40%; margin-bottom: 20px; }
        .skeleton-content { height: calc(100% - 44px); width: 100%; }

        .content-inner { opacity: 1; transition: opacity 0.3s; height: 100%; display: flex; flex-direction: column; }

        /* Footer */
        .footer {
            padding: 24px;
            text-align: center;
            color: var(--text-muted);
            border-top: 1px solid var(--border);
            font-size: 0.875rem;
            margin-top: 40px;
        }
        .footer a { color: var(--accent); text-decoration: none; font-weight: 500; transition: 0.3s; }
        .footer a:hover { text-decoration: underline; text-shadow: 0 0 8px var(--accent-glow); }
        .footer-divider { width: 60px; height: 2px; background: var(--border); margin: 16px auto; }
        .footer-info { display: flex; flex-direction: column; gap: 8px; align-items: center; }

        /* Scroll Reveal */
        .reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s ease-out; }
        .reveal.active { opacity: 1; transform: translateY(0); }

        /* Responsive */
        @media (max-width: 1024px) {
            .grid-4 { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 768px) {
            .sidebar { position: fixed; left: -260px; height: 100vh; z-index: 110; }
            .sidebar.mobile-open { left: 0; }
            .sidebar-overlay.active { display: block; opacity: 1; }
            .grid-4, .grid-2 { grid-template-columns: 1fr; }
            .search-container input { width: 150px; }
            .search-container input:focus { width: 200px; }
        }
