/*
    Project: Interactive Dashboard (Admin Panel)
    Author: Omkar R. Ghare
    Designation: Front-End Web Developer
    Email: ghareomkarr88@gmail.com

    © 2026 Omkar R. Ghare. All rights reserved.
*/


/* ==================== CSS VARIABLES & THEMING ==================== */
        :root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            
            /* Light Theme */
            --bg-primary: #f0f2f5;
            --bg-secondary: #ffffff;
            --bg-sidebar: #0f172a;
            --bg-card: #ffffff;
            --bg-hover: #f8fafc;
            --bg-input: #f1f5f9;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-sidebar: #94a3b8;
            --text-sidebar-active: #ffffff;
            --border-color: #e2e8f0;
            --accent-primary: #6366f1;
            --accent-secondary: #8b5cf6;
            --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --info: #3b82f6;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
            --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
            --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
            --shadow-3d: 0 10px 30px -5px rgba(99, 102, 241, 0.3);
            --shadow-card: 0 4px 20px rgba(0,0,0,0.06);
            --glass-bg: rgba(255,255,255,0.7);
            --glass-border: rgba(255,255,255,0.3);
            --sidebar-width: 280px;
            --sidebar-collapsed: 80px;
            --header-height: 70px;
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            --transition-fast: 0.2s ease;
            --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        [data-theme="dark"] {
            --bg-primary: #0b1120;
            --bg-secondary: #131b2e;
            --bg-sidebar: #0a0f1e;
            --bg-card: #151f35;
            --bg-hover: #1a2540;
            --bg-input: #1a2540;
            --text-primary: #e2e8f0;
            --text-secondary: #94a3b8;
            --border-color: #1e3050;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
            --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
            --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
            --shadow-card: 0 4px 20px rgba(0,0,0,0.2);
            --glass-bg: rgba(21,31,53,0.8);
            --glass-border: rgba(30,48,80,0.5);
        }

        /* ==================== PRELOADER ==================== */
        .preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 99999;
            transition: opacity 0.6s ease, visibility 0.6s ease;
        }

        .preloader.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .preloader-logo {
            font-size: 2.5rem;
            font-weight: 900;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 40px;
            letter-spacing: -1px;
        }

        .preloader-spinner {
            position: relative;
            width: 80px;
            height: 80px;
        }

        .preloader-spinner .ring {
            position: absolute;
            border: 3px solid transparent;
            border-radius: 50%;
            animation: preloader-spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
        }

        .preloader-spinner .ring:nth-child(1) {
            width: 80px;
            height: 80px;
            border-top-color: #6366f1;
            animation-delay: 0s;
        }

        .preloader-spinner .ring:nth-child(2) {
            width: 60px;
            height: 60px;
            top: 10px;
            left: 10px;
            border-top-color: #8b5cf6;
            animation-delay: 0.15s;
            animation-direction: reverse;
        }

        .preloader-spinner .ring:nth-child(3) {
            width: 40px;
            height: 40px;
            top: 20px;
            left: 20px;
            border-top-color: #a78bfa;
            animation-delay: 0.3s;
        }

        .preloader-spinner .dot {
            position: absolute;
            width: 12px;
            height: 12px;
            background: var(--accent-gradient);
            border-radius: 50%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation: preloader-pulse 1s ease-in-out infinite;
        }

        .preloader-progress {
            margin-top: 40px;
            width: 200px;
            height: 3px;
            background: rgba(255,255,255,0.1);
            border-radius: 10px;
            overflow: hidden;
        }

        .preloader-progress-bar {
            height: 100%;
            background: var(--accent-gradient);
            border-radius: 10px;
            width: 0%;
            animation: preloader-progress 2s ease-in-out forwards;
        }

        .preloader-text {
            color: #64748b;
            margin-top: 15px;
            font-size: 0.85rem;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        @keyframes preloader-spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes preloader-pulse {
            0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
            50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
        }

        @keyframes preloader-progress {
            0% { width: 0%; }
            50% { width: 70%; }
            100% { width: 100%; }
        }

        /* ==================== RESET & BASE ==================== */
        *, *::before, *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
            font-size: 16px;
        }

        body {
            font-family: var(--font-family);
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
            transition: background var(--transition-normal), color var(--transition-normal);
        }

        /* ==================== SCROLLBAR ==================== */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--accent-primary);
            border-radius: 10px;
        }

        /* ==================== LAYOUT ==================== */
        .dashboard-layout {
            display: grid;
            grid-template-columns: var(--sidebar-width) 1fr;
            grid-template-rows: var(--header-height) 1fr;
            grid-template-areas:
                "sidebar header"
                "sidebar main";
            min-height: 100vh;
            transition: grid-template-columns var(--transition-normal);
        }

        .dashboard-layout.sidebar-collapsed {
            grid-template-columns: var(--sidebar-collapsed) 1fr;
        }

        /* ==================== SIDEBAR ==================== */
        .sidebar {
            grid-area: sidebar;
            background: var(--bg-sidebar);
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            transition: width var(--transition-normal), transform var(--transition-normal);
            overflow: hidden;
            border-right: 1px solid rgba(255,255,255,0.05);
        }

        .sidebar-collapsed .sidebar {
            width: var(--sidebar-collapsed);
        }

        .sidebar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px;
            min-height: var(--header-height);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .sidebar-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            white-space: nowrap;
            overflow: hidden;
        }

        .sidebar-logo-icon {
            width: 38px;
            height: 38px;
            background: var(--accent-gradient);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: white;
            flex-shrink: 0;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
        }

        .sidebar-logo-text {
            font-size: 1.3rem;
            font-weight: 800;
            color: white;
            letter-spacing: -0.5px;
            transition: opacity var(--transition-normal);
        }

        .sidebar-collapsed .sidebar-logo-text {
            opacity: 0;
            width: 0;
        }

        .sidebar-toggle-btn {
            display: none;
        }

        .sidebar-nav {
            flex: 1;
            padding: 16px 12px;
            overflow-y: auto;
            overflow-x: hidden;
        }

        .nav-section-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: #475569;
            padding: 16px 16px 8px;
            white-space: nowrap;
            overflow: hidden;
            transition: opacity var(--transition-normal);
        }

        .sidebar-collapsed .nav-section-title {
            opacity: 0;
            height: 0;
            padding: 0;
            margin: 0;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 11px 16px;
            border-radius: var(--radius-md);
            color: var(--text-sidebar);
            text-decoration: none;
            cursor: pointer;
            transition: all var(--transition-fast);
            margin-bottom: 2px;
            white-space: nowrap;
            position: relative;
            overflow: hidden;
        }

        .nav-item:hover {
            background: rgba(99, 102, 241, 0.1);
            color: var(--text-sidebar-active);
        }

        .nav-item.active {
            background: var(--accent-gradient);
            color: white;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
        }

        .nav-item-icon {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
        }

        .nav-item-text {
            font-size: 0.88rem;
            font-weight: 500;
            transition: opacity var(--transition-normal);
        }

        .sidebar-collapsed .nav-item-text {
            opacity: 0;
            width: 0;
        }

        .nav-item-badge {
            margin-left: auto;
            background: var(--danger);
            color: white;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
            transition: opacity var(--transition-normal);
        }

        .sidebar-collapsed .nav-item-badge {
            opacity: 0;
        }

        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        .sidebar-user {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: var(--radius-md);
            background: rgba(255,255,255,0.03);
            overflow: hidden;
        }

        .sidebar-user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: var(--accent-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .sidebar-user-info {
            overflow: hidden;
            transition: opacity var(--transition-normal);
        }

        .sidebar-collapsed .sidebar-user-info {
            opacity: 0;
            width: 0;
        }

        .sidebar-user-name {
            font-size: 0.85rem;
            font-weight: 600;
            color: white;
            white-space: nowrap;
        }

        .sidebar-user-role {
            font-size: 0.72rem;
            color: #64748b;
            white-space: nowrap;
        }

        /* ==================== HEADER ==================== */
        .header {
            grid-area: header;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 28px;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(20px);
            transition: background var(--transition-normal);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .hamburger {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            transition: background var(--transition-fast);
        }

        .hamburger:hover {
            background: var(--bg-hover);
        }

        .hamburger svg {
            width: 24px;
            height: 24px;
        }

        .collapse-btn {
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            cursor: pointer;
            padding: 8px;
            border-radius: var(--radius-sm);
            color: var(--text-secondary);
            transition: all var(--transition-fast);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .collapse-btn:hover {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        .collapse-btn svg {
            width: 18px;
            height: 18px;
            transition: transform var(--transition-normal);
        }

        .sidebar-collapsed .collapse-btn svg {
            transform: rotate(180deg);
        }

        .header-search {
            position: relative;
            width: 320px;
        }

        .header-search input {
            width: 100%;
            padding: 10px 16px 10px 42px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.88rem;
            font-family: var(--font-family);
            transition: all var(--transition-fast);
            outline: none;
        }

        .header-search input:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
            background: var(--bg-secondary);
        }

        .header-search input::placeholder {
            color: var(--text-secondary);
        }

        .header-search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }

        .header-search-icon svg {
            width: 18px;
            height: 18px;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-btn {
            position: relative;
            width: 42px;
            height: 42px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);
        }

        .header-btn:hover {
            background: var(--bg-hover);
            color: var(--accent-primary);
            border-color: var(--accent-primary);
        }

        .header-btn svg {
            width: 20px;
            height: 20px;
        }

        .notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 20px;
            height: 20px;
            background: var(--danger);
            color: white;
            font-size: 0.65rem;
            font-weight: 700;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--bg-secondary);
            animation: badge-pulse 2s infinite;
        }

        @keyframes badge-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .theme-toggle {
            position: relative;
            width: 42px;
            height: 42px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);
            overflow: hidden;
        }

        .theme-toggle:hover {
            background: var(--bg-hover);
            color: var(--accent-primary);
            border-color: var(--accent-primary);
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
            transition: transform var(--transition-normal);
        }

        .theme-toggle .sun-icon { display: none; }
        .theme-toggle .moon-icon { display: block; }

        [data-theme="dark"] .theme-toggle .sun-icon { display: block; }
        [data-theme="dark"] .theme-toggle .moon-icon { display: none; }

        .profile-dropdown {
            position: relative;
        }

        .profile-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 12px 6px 6px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            cursor: pointer;
            transition: all var(--transition-fast);
        }

        .profile-btn:hover {
            background: var(--bg-hover);
            border-color: var(--accent-primary);
        }

        .profile-avatar {
            width: 34px;
            height: 34px;
            border-radius: var(--radius-sm);
            background: var(--accent-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 0.8rem;
        }

        .profile-info {
            text-align: left;
        }

        .profile-name {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .profile-role {
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .profile-chevron {
            color: var(--text-secondary);
            transition: transform var(--transition-fast);
        }

        .profile-chevron svg {
            width: 16px;
            height: 16px;
        }

        .profile-dropdown.open .profile-chevron {
            transform: rotate(180deg);
        }

        .dropdown-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 220px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-lg);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all var(--transition-fast);
            z-index: 1000;
            overflow: hidden;
        }

        .profile-dropdown.open .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            color: var(--text-primary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: background var(--transition-fast);
            text-decoration: none;
        }

        .dropdown-item:hover {
            background: var(--bg-hover);
        }

        .dropdown-item svg {
            width: 18px;
            height: 18px;
            color: var(--text-secondary);
        }

        .dropdown-divider {
            height: 1px;
            background: var(--border-color);
            margin: 4px 0;
        }

        .dropdown-item.danger {
            color: var(--danger);
        }

        .dropdown-item.danger svg {
            color: var(--danger);
        }

        /* ==================== MAIN CONTENT ==================== */
        .main-content {
            grid-area: main;
            padding: 28px;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Page Title */
        .page-header {
            margin-bottom: 28px;
        }

        .page-title {
            font-size: 1.75rem;
            font-weight: 800;
            letter-spacing: -0.5px;
            margin-bottom: 4px;
        }

        .page-subtitle {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        /* ==================== SECTION 1: KPI CARDS ==================== */
        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 28px;
        }

        .kpi-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            position: relative;
            overflow: hidden;
            transition: all var(--transition-normal);
            cursor: pointer;
            transform-style: preserve-3d;
            perspective: 1000px;
        }

        .kpi-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        }

        .kpi-card:nth-child(1)::before { background: var(--accent-gradient); }
        .kpi-card:nth-child(2)::before { background: linear-gradient(135deg, #10b981, #34d399); }
        .kpi-card:nth-child(3)::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
        .kpi-card:nth-child(4)::before { background: linear-gradient(135deg, #ef4444, #f87171); }

        .kpi-card:hover {
            transform: translateY(-4px) rotateX(2deg);
            box-shadow: var(--shadow-xl);
        }

        .kpi-card-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .kpi-icon {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
        }

        .kpi-card:nth-child(1) .kpi-icon {
            background: rgba(99, 102, 241, 0.1);
            color: var(--accent-primary);
        }

        .kpi-card:nth-child(2) .kpi-icon {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }

        .kpi-card:nth-child(3) .kpi-icon {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }

        .kpi-card:nth-child(4) .kpi-icon {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        .kpi-trend {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.78rem;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 20px;
        }

        .kpi-trend.up {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }

        .kpi-trend.down {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        .kpi-trend svg {
            width: 14px;
            height: 14px;
        }

        .kpi-value {
            font-size: 2rem;
            font-weight: 800;
            letter-spacing: -1px;
            margin-bottom: 4px;
            line-height: 1.1;
        }

        .kpi-label {
            font-size: 0.82rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .kpi-sparkline {
            margin-top: 16px;
            height: 40px;
            position: relative;
        }

        /* ==================== SECTION 2: CHARTS ROW ==================== */
        .charts-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 28px;
        }

        .chart-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            transition: all var(--transition-normal);
        }

        .chart-card:hover {
            box-shadow: var(--shadow-md);
        }

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

        .card-title {
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .card-subtitle {
            font-size: 0.78rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .card-actions {
            display: flex;
            gap: 6px;
        }

        .card-filter-btn {
            padding: 6px 14px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            color: var(--text-secondary);
            font-size: 0.78rem;
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-fast);
            font-family: var(--font-family);
        }

        .card-filter-btn:hover,
        .card-filter-btn.active {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        .chart-container {
            position: relative;
            height: 280px;
        }

        .chart-container canvas {
            width: 100% !important;
            height: 100% !important;
        }

        /* ==================== SECTION 3: STATS ROW ==================== */
        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 20px;
            margin-bottom: 28px;
        }

        .stats-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            transition: all var(--transition-normal);
        }

        .stats-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .progress-stat {
            margin-bottom: 18px;
        }

        .progress-stat:last-child {
            margin-bottom: 0;
        }

        .progress-stat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .progress-stat-label {
            font-size: 0.82rem;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .progress-stat-value {
            font-size: 0.82rem;
            font-weight: 700;
        }

        .progress-bar-container {
            height: 8px;
            background: var(--bg-input);
            border-radius: 10px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            border-radius: 10px;
            transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .progress-bar-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .progress-purple { background: var(--accent-gradient); }
        .progress-green { background: linear-gradient(135deg, #10b981, #34d399); }
        .progress-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
        .progress-orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
        .progress-red { background: linear-gradient(135deg, #ef4444, #f87171); }

        /* ==================== SECTION 4: DATA TABLE ==================== */
        .table-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            margin-bottom: 28px;
            overflow: hidden;
        }

        .table-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            gap: 16px;
            flex-wrap: wrap;
        }

        .table-search {
            position: relative;
            width: 260px;
        }

        .table-search input {
            width: 100%;
            padding: 9px 14px 9px 38px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.85rem;
            font-family: var(--font-family);
            outline: none;
            transition: all var(--transition-fast);
        }

        .table-search input:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .table-search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }

        .table-search-icon svg {
            width: 16px;
            height: 16px;
        }

        .table-wrapper {
            overflow-x: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }

        .data-table th {
            text-align: left;
            padding: 12px 16px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-secondary);
            border-bottom: 2px solid var(--border-color);
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
            transition: color var(--transition-fast);
        }

        .data-table th:hover {
            color: var(--accent-primary);
        }

        .data-table th .sort-icon {
            display: inline-block;
            margin-left: 4px;
            vertical-align: middle;
            opacity: 0.4;
            transition: opacity var(--transition-fast);
        }

        .data-table th:hover .sort-icon,
        .data-table th.sorted .sort-icon {
            opacity: 1;
        }

        .data-table td {
            padding: 14px 16px;
            font-size: 0.85rem;
            border-bottom: 1px solid var(--border-color);
            white-space: nowrap;
        }

        .data-table tbody tr {
            transition: background var(--transition-fast);
        }

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

        .table-user {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .table-user-avatar {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 0.75rem;
            flex-shrink: 0;
        }

        .table-user-name {
            font-weight: 600;
        }

        .table-user-email {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .status-badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            display: inline-block;
        }

        .status-active {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }

        .status-pending {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }

        .status-inactive {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        .status-completed {
            background: rgba(59, 130, 246, 0.1);
            color: var(--info);
        }

        /* Pagination */
        .table-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid var(--border-color);
        }

        .table-info {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .pagination {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .page-btn {
            width: 36px;
            height: 36px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);
            font-family: var(--font-family);
        }

        .page-btn:hover {
            background: var(--bg-hover);
            border-color: var(--accent-primary);
        }

        .page-btn.active {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

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

        .page-btn svg {
            width: 16px;
            height: 16px;
        }

        /* ==================== SECTION 5: BOTTOM GRID ==================== */
        .bottom-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 20px;
            margin-bottom: 28px;
        }

        /* Recent Activity */
        .activity-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
        }

        .activity-list {
            display: flex;
            flex-direction: column;
        }

        .activity-item {
            display: flex;
            gap: 14px;
            padding: 14px 0;
            border-bottom: 1px solid var(--border-color);
            transition: background var(--transition-fast);
        }

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

        .activity-icon {
            width: 38px;
            height: 38px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 1rem;
        }

        .activity-icon.purple { background: rgba(99, 102, 241, 0.1); color: var(--accent-primary); }
        .activity-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
        .activity-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--info); }
        .activity-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
        .activity-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

        .activity-content {
            flex: 1;
            min-width: 0;
        }

        .activity-title {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .activity-desc {
            font-size: 0.78rem;
            color: var(--text-secondary);
        }

        .activity-time {
            font-size: 0.72rem;
            color: var(--text-secondary);
            white-space: nowrap;
            margin-top: 2px;
        }

        /* Calendar Widget */
        .calendar-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
        }

        .calendar-header-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .calendar-month {
            font-size: 1rem;
            font-weight: 700;
        }

        .calendar-nav-btn {
            width: 32px;
            height: 32px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
            background: var(--bg-secondary);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);
        }

        .calendar-nav-btn:hover {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        .calendar-nav-btn svg {
            width: 16px;
            height: 16px;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px;
        }

        .calendar-day-label {
            text-align: center;
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-secondary);
            padding: 8px 0;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.82rem;
            font-weight: 500;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all var(--transition-fast);
            color: var(--text-primary);
        }

        .calendar-day:hover {
            background: var(--bg-hover);
        }

        .calendar-day.other-month {
            color: var(--text-secondary);
            opacity: 0.3;
        }

        .calendar-day.today {
            background: var(--accent-gradient);
            color: white;
            font-weight: 700;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .calendar-day.has-event {
            position: relative;
        }

        .calendar-day.has-event::after {
            content: '';
            position: absolute;
            bottom: 3px;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--accent-primary);
        }

        .calendar-day.today.has-event::after {
            background: white;
        }

        /* Recent Orders */
        .orders-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
        }

        .order-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 0;
            border-bottom: 1px solid var(--border-color);
        }

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

        .order-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .order-thumb {
            width: 42px;
            height: 42px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }

        .order-info {
            min-width: 0;
        }

        .order-name {
            font-size: 0.85rem;
            font-weight: 600;
        }

        .order-id {
            font-size: 0.72rem;
            color: var(--text-secondary);
        }

        .order-amount {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--accent-primary);
        }

        /* ==================== SECTION 6: PERFORMANCE METRICS ==================== */
        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 28px;
        }

        .metric-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            transition: all var(--transition-normal);
        }

        .metric-card:hover {
            box-shadow: var(--shadow-md);
        }

        /* ==================== SECTION 7: TEAM / USERS ==================== */
        .team-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 28px;
        }

        .team-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            text-align: center;
            transition: all var(--transition-normal);
            cursor: pointer;
        }

        .team-card:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow: var(--shadow-lg);
        }

        .team-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            margin: 0 auto 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 800;
            font-size: 1.2rem;
            position: relative;
        }

        .team-avatar::after {
            content: '';
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 2px solid var(--bg-card);
        }

        .team-avatar.online::after { background: var(--success); }
        .team-avatar.offline::after { background: var(--text-secondary); }
        .team-avatar.busy::after { background: var(--danger); }
        .team-avatar.away::after { background: var(--warning); }

        .team-name {
            font-size: 0.9rem;
            font-weight: 700;
            margin-bottom: 2px;
        }

        .team-role-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }

        .team-stats {
            display: flex;
            justify-content: center;
            gap: 20px;
        }

        .team-stat {
            text-align: center;
        }

        .team-stat-value {
            font-size: 0.95rem;
            font-weight: 800;
        }

        .team-stat-label {
            font-size: 0.68rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* ==================== SECTION 8: QUICK ACTIONS ==================== */
        .section-title {
            font-size: 1.15rem;
            font-weight: 700;
            margin-bottom: 20px;
            letter-spacing: -0.3px;
        }

        .quick-actions-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 28px;
        }

        .quick-action-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 28px 20px;
            text-align: center;
            cursor: pointer;
            transition: all var(--transition-normal);
            position: relative;
            overflow: hidden;
        }

        .quick-action-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            opacity: 0;
            transition: opacity var(--transition-normal);
            border-radius: var(--radius-lg);
        }

        .quick-action-card:nth-child(1)::before { background: var(--accent-gradient); }
        .quick-action-card:nth-child(2)::before { background: linear-gradient(135deg, #10b981, #34d399); }
        .quick-action-card:nth-child(3)::before { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
        .quick-action-card:nth-child(4)::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

        .quick-action-card:hover::before {
            opacity: 1;
        }

        .quick-action-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }

        .quick-action-card:hover .quick-action-icon,
        .quick-action-card:hover .quick-action-label {
            color: white;
            position: relative;
            z-index: 1;
        }

        .quick-action-card:hover .quick-action-icon {
            background: rgba(255,255,255,0.2);
        }

        .quick-action-icon {
            width: 56px;
            height: 56px;
            border-radius: var(--radius-md);
            margin: 0 auto 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            background: var(--bg-input);
            transition: all var(--transition-normal);
        }

        .quick-action-label {
            font-size: 0.88rem;
            font-weight: 600;
            transition: color var(--transition-normal);
        }

        /* ==================== SECTION 9: FOOTER ==================== */
        .dashboard-footer {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .footer-left {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .footer-left strong {
            color: var(--accent-primary);
            font-weight: 700;
        }

        .footer-right {
            display: flex;
            gap: 20px;
        }

        .footer-link {
            font-size: 0.82rem;
            color: var(--text-secondary);
            text-decoration: none;
            transition: color var(--transition-fast);
        }

        .footer-link:hover {
            color: var(--accent-primary);
        }

        /* ==================== MOBILE OVERLAY ==================== */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 999;
            opacity: 0;
            pointer-events: none;
            transition: opacity var(--transition-normal);
        }

        .sidebar-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        /* ==================== NOTIFICATION PANEL ==================== */
        .notification-panel {
            position: fixed;
            top: 0;
            right: -380px;
            width: 380px;
            height: 100vh;
            background: var(--bg-card);
            border-left: 1px solid var(--border-color);
            z-index: 2000;
            transition: right var(--transition-normal);
            box-shadow: var(--shadow-xl);
            display: flex;
            flex-direction: column;
        }

        .notification-panel.open {
            right: 0;
        }

        .notification-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px;
            border-bottom: 1px solid var(--border-color);
        }

        .notification-panel-title {
            font-size: 1.1rem;
            font-weight: 700;
        }

        .notification-close-btn {
            width: 32px;
            height: 32px;
            border-radius: var(--radius-sm);
            border: none;
            background: var(--bg-input);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-fast);
        }

        .notification-close-btn:hover {
            background: var(--danger);
            color: white;
        }

        .notification-list {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
        }

        .notification-item {
            display: flex;
            gap: 12px;
            padding: 14px;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: background var(--transition-fast);
            margin-bottom: 4px;
        }

        .notification-item:hover {
            background: var(--bg-hover);
        }

        .notification-item.unread {
            background: rgba(99, 102, 241, 0.05);
            border-left: 3px solid var(--accent-primary);
        }

        .notification-item-icon {
            width: 40px;
            height: 40px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 1.1rem;
        }

        .notification-item-content {
            flex: 1;
            min-width: 0;
        }

        .notification-item-title {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .notification-item-desc {
            font-size: 0.78rem;
            color: var(--text-secondary);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .notification-item-time {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .notification-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.3);
            z-index: 1999;
        }

        .notification-overlay.active {
            display: block;
        }

        /* ==================== ANIMATIONS ==================== */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .animate-in {
            animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            opacity: 0;
        }

        .delay-1 { animation-delay: 0.1s; }
        .delay-2 { animation-delay: 0.2s; }
        .delay-3 { animation-delay: 0.3s; }
        .delay-4 { animation-delay: 0.4s; }
        .delay-5 { animation-delay: 0.5s; }
        .delay-6 { animation-delay: 0.6s; }
        .delay-7 { animation-delay: 0.7s; }
        .delay-8 { animation-delay: 0.8s; }

        /* ==================== RESPONSIVE ==================== */
        @media (max-width: 1200px) {
            .kpi-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .bottom-grid {
                grid-template-columns: 1fr 1fr;
            }
            .team-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 992px) {
            .charts-grid {
                grid-template-columns: 1fr;
            }
            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }
            .metrics-grid {
                grid-template-columns: 1fr;
            }
            .quick-actions-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .header-search {
                width: 200px;
            }
            .profile-info {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .dashboard-layout {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "header"
                    "main";
            }

            .sidebar {
                transform: translateX(-100%);
                width: var(--sidebar-width);
                box-shadow: var(--shadow-xl);
            }

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

            .sidebar-overlay {
                display: block;
            }

            .hamburger {
                display: flex;
            }

            .collapse-btn {
                display: none;
            }

            .header-search {
                display: none;
            }

            .main-content {
                padding: 20px 16px;
            }

            .kpi-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .kpi-card {
                padding: 18px;
            }

            .kpi-value {
                font-size: 1.5rem;
            }

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

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

            .team-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .quick-actions-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .table-toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            .table-search {
                width: 100%;
            }

            .dashboard-footer {
                flex-direction: column;
                gap: 12px;
                text-align: center;
            }

            .page-title {
                font-size: 1.4rem;
            }

            .notification-panel {
                width: 100%;
                right: -100%;
            }
        }

        @media (max-width: 480px) {
            .kpi-grid {
                grid-template-columns: 1fr;
            }

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

            .quick-actions-grid {
                grid-template-columns: 1fr;
            }

            .header {
                padding: 0 16px;
            }

            .header-right {
                gap: 4px;
            }

            .kpi-card {
                padding: 16px;
            }

            .chart-card,
            .stats-card,
            .table-card,
            .activity-card,
            .calendar-card,
            .orders-card,
            .metric-card {
                padding: 16px;
            }
        }
