:root {
            --primary: #672576;
            --primary-dark: #4e1a59;
            --primary-light: #8a3a99;
            --secondary: #c53a3d;
            --secondary-dark: #a22e31;
            --secondary-light: #d95a5d;
            --dark: #1a1a1a;
            --gray-dark: #2d2d2d;
            --gray: #4a4a4a;
            --gray-light: #e5e5e5;
            --bg-light: #f8f9fc;
            --white: #ffffff;
            --success: #10b981;
            --warning: #f59e0b;
            --info: #3b82f6;
            --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
            --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
            --radius: 16px;
            --radius-sm: 10px;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-light);
            color: var(--dark);
        }

        /* Admin Header */
        .admin-header {
            box-shadow: var(--shadow-sm);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .logo-area h1 {
            font-size: 1.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .logo-area p {
            font-size: 0.75rem;
            color: var(--gray);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .date-filter {
            display: flex;
            align-items: center;
            gap: 1rem;
            background: var(--bg-light);
            padding: 0.5rem 1rem;
            border-radius: 40px;
            flex-wrap: wrap;
        }

        .date-filter input {
            border: 1px solid var(--gray-light);
            padding: 0.5rem 0.75rem;
            border-radius: 30px;
            font-size: 0.875rem;
            outline: none;
            transition: all 0.2s;
        }

        .date-filter input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(103, 37, 118, 0.1);
        }

        .date-filter button {
            background: var(--primary);
            border: none;
            color: white;
            padding: 0.5rem 1.25rem;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s;
        }

        .date-filter button:hover {
            background: var(--primary-dark);
        }

        .reset-btn {
            background: var(--gray) !important;
        }

        .reset-btn:hover {
            background: var(--gray-dark) !important;
        }

        /* Main Layout */
        .dashboard-container {
            display: flex;
            min-height: calc(100vh - 80px);
        }

        /* Sidebar */
        .sidebar {
            width: 280px;
            background: var(--white);
            border-right: 1px solid var(--gray-light);
            padding: 2rem 1rem;
        }

        .sidebar-nav {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 1rem;
            border-radius: var(--radius-sm);
            color: var(--gray);
            transition: all 0.2s;
            cursor: pointer;
        }

        .nav-item i {
            width: 24px;
            font-size: 1.2rem;
        }

        .nav-item.active, .nav-item:hover {
            background: rgba(103, 37, 118, 0.1);
            color: var(--primary);
        }

        /* Main Content */
        .main-content {
            flex: 1;
            padding-top: 2rem;
            overflow-y: auto;
        }

        /* Stats Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 1.5rem;
            box-shadow: var(--shadow-sm);
            transition: all 0.3s ease;
            border: 1px solid rgba(0,0,0,0.03);
        }

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

        .stat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        .stat-icon.learners { background: rgba(16, 185, 129, 0.1); color: var(--success); }
        .stat-icon.teachers { background: rgba(59, 130, 246, 0.1); color: var(--info); }
        .stat-icon.courses { background: rgba(103, 37, 118, 0.1); color: var(--primary); }
        .stat-icon.modules { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
        .stat-icon.lectures { background: rgba(197, 58, 61, 0.1); color: var(--secondary); }

        .stat-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--dark);
        }

        .stat-label {
            color: var(--gray);
            font-size: 0.875rem;
        }

        /* Dashboard Sections */
        .dashboard-section {
            background: var(--white);
            border-radius: var(--radius);
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-sm);
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid var(--gray-light);
        }

        .section-header h2 {
            font-size: 1.25rem;
            font-weight: 600;
        }

        .section-header i {
            color: var(--primary);
        }

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

        .data-table th {
            text-align: left;
            padding: 0.75rem 0.5rem;
            color: var(--gray);
            font-weight: 500;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .data-table td {
            padding: 0.75rem 0.5rem;
            border-bottom: 1px solid var(--gray-light);
            font-size: 0.875rem;
        }

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

        .event-item, .message-item {
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--gray-light);
        }

        .event-title {
            font-weight: 600;
            color: var(--primary);
        }

        .event-date {
            font-size: 0.75rem;
            color: var(--gray);
        }

        .student-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary-light);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            margin-right: 0.75rem;
        }

        .badge {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 500;
        }

        .badge-active { background: rgba(16,185,129,0.1); color: var(--success); }
        .badge-inactive { background: rgba(239,68,68,0.1); color: #ef4444; }

        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255,255,255,0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s;
        }

        .loading-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 3px solid var(--gray-light);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

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

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

        @media (max-width: 768px) {
            .two-col-grid {
                grid-template-columns: 1fr;
            }
            .sidebar {
                display: none;
            }
            .main-content {
                padding: 1rem;
            }
            .stats-grid {
                grid-template-columns: 1fr;
            }
        }

        .filter-summary {
            font-size: 0.8rem;
            color: var(--gray);
            margin-top: 0.5rem;
        }

        .message-preview {
            max-width: 250px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }