/* SeT LMS 2026 - Enhanced Vibrant Stylesheet
   Color Scheme: Vibrant Purple Gradients with Modern Design
*/

:root {
    /* Primary Purple Gradient (Vibrant) */
    --primary-purple: #8B5CF6;
    --primary-purple-dark: #6D28D9;
    --primary-purple-light: #A78BFA;
    --primary-purple-hover: #7C3AED;

    /* Legacy blue variables (mapped to purple for compatibility) */
    --primary-blue: #8B5CF6;
    --primary-blue-dark: #6D28D9;
    --primary-blue-light: #A78BFA;
    --primary-blue-hover: #7C3AED;

    /* Whites and Neutrals (70%) */
    --white: #FFFFFF;
    --off-white: #F8FAFC;
    --light-gray: #F1F5F9;
    --border-gray: #E2E8F0;
    --text-gray: #64748B;

    /* Vibrant Accent Colors */
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --danger-red: #EF4444;
    --info-purple: #8B5CF6;
    --accent-teal: #14B8A6;
    --accent-gold: #ffd43b;
    --accent-pink: #EC4899;

    /* Text Colors */
    --text-dark: #1E293B;
    --text-medium: #475569;
    --text-light: #94A3B8;

    /* Shadows - More Vibrant */
    --shadow-sm: 0 1px 2px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 4px 12px rgba(139, 92, 246, 0.15);
    --shadow-lg: 0 10px 25px rgba(139, 92, 246, 0.2);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

    /* Card theme colors - More Vibrant */
    --card-blue: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    --card-green: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    --card-purple: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
    --card-orange: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    --card-pink: linear-gradient(135deg, #FCE7F3 0%, #FBCFE8 100%);
    --card-teal: linear-gradient(135deg, #CCFBF1 0%, #99F6E4 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Ensure main content is always interactive */
main {
    position: relative;
    z-index: 1;
}

/* ============== NAVBAR ============== */

.navbar {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #4C1D95 100%);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .brand-icon {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-links .nav-game-btn {
    background: linear-gradient(135deg, #ffd43b, #F59E0B);
    color: #1a1a2e !important;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 212, 59, 0.4);
}

.nav-links .nav-game-btn:hover {
    background: linear-gradient(135deg, #FFE066, #ffd43b);
    transform: translateY(-2px) scale(1.02);
}

.nav-links .nav-game-btn.active {
    background: linear-gradient(135deg, #FFE066, #ffd43b);
    box-shadow: 0 4px 20px rgba(255, 212, 59, 0.5);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.nav-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-user span {
    font-size: 0.9rem;
}

.btn-logout {
    background: var(--danger-red) !important;
    color: var(--white) !important;
}

.btn-logout:hover {
    background: #DC2626 !important;
}

/* ============== NAV RIGHT SECTION ============== */

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.nav-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 1.1rem;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.nav-icon-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #6D28D9;
}

.nav-user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    margin-left: 0.5rem;
}

.nav-user-dropdown:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-user-dropdown img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.nav-user-dropdown span {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-dropdown i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

/* ============== DROPDOWN MENUS ============== */

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-height: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    overflow: hidden;
}

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

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    font-weight: 600;
}

.dropdown-header a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-decoration: none;
}

.dropdown-header a:hover {
    color: white;
    text-decoration: underline;
}

.dropdown-content {
    max-height: 320px;
    overflow-y: auto;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #F9FAFB;
}

.dropdown-user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #8B5CF6;
}

.dropdown-user-info strong {
    display: block;
    color: #1F2937;
    font-size: 0.95rem;
}

.dropdown-user-info small {
    color: #6B7280;
    font-size: 0.8rem;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #F5F3FF;
    color: #6D28D9;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

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

.dropdown-item.logout:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* Notification & Message Items */
.notification-item, .message-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.2s ease;
}

.notification-item:hover, .message-item:hover {
    background: #F5F3FF;
}

.notification-item.unread, .message-item.unread {
    background: #EDE9FE;
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #8B5CF6;
    color: white;
}

.notif-icon.message { background: #0EA5E9; }
.notif-icon.grade { background: #10B981; }
.notif-icon.alert { background: #F59E0B; }
.notif-icon.announcement { background: #EC4899; }

.notif-content p, .message-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
}

.notif-content small, .message-content small {
    color: #9CA3AF;
    font-size: 0.75rem;
}

.message-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

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

.message-header strong {
    font-size: 0.9rem;
    color: #1F2937;
}

.message-content p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9CA3AF;
}

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

.empty-state p {
    margin: 0;
}

/* User dropdown specific */
.user-dropdown {
    min-width: 240px;
}

@media (max-width: 768px) {
    .nav-user-dropdown span {
        display: none;
    }

    .nav-user-dropdown {
        padding: 6px;
        border-radius: 50%;
    }

    .nav-user-dropdown i {
        display: none;
    }

    .dropdown-menu {
        min-width: 280px;
        right: -10px;
    }
}

/* ============== ALERTS ============== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
    position: relative;
    z-index: 1;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error, .alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ============== LOGIN PAGE ============== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #4C1D95 100%);
    padding: 2rem;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-box h1 {
    text-align: center;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ============== FORMS ============== */

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-medium);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============== BUTTONS ============== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7C3AED, #5B21B6);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-medium);
    border: 1px solid var(--border-gray);
}

.btn-secondary:hover {
    background: var(--border-gray);
}

.btn-success {
    background: var(--success-green);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-red);
    color: var(--white);
}

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

.btn-warning {
    background: var(--warning-orange);
    color: var(--white);
}

.btn-warning:hover {
    background: #D97706;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* Button Color Variants */
.btn-emerald { background-color: #10B981; }
.btn-emerald:hover { background-color: #059669; }

.btn-violet { background-color: #8B5CF6; }
.btn-violet:hover { background-color: #7C3AED; }

.btn-amber { background-color: #F59E0B; }
.btn-amber:hover { background-color: #D97706; }

.btn-rose { background-color: #F43F5E; }
.btn-rose:hover { background-color: #E11D48; }

.btn-sky { background-color: #0EA5E9; }
.btn-sky:hover { background-color: #0284C7; }

.btn-teal { background-color: #14B8A6; }
.btn-teal:hover { background-color: #0D9488; }

.btn-indigo { background-color: #6366F1; }
.btn-indigo:hover { background-color: #4F46E5; }

.btn-orange { background-color: #F97316; }
.btn-orange:hover { background-color: #EA580C; }

.btn-cyan { background-color: #06B6D4; }
.btn-cyan:hover { background-color: #0891B2; }

.btn-lime { background-color: #84CC16; }
.btn-lime:hover { background-color: #65A30D; }

/* ============== STATS CARDS ============== */

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

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-gray);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeIn 0.3s ease;
}

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

.stat-card.blue { background: var(--card-blue); border-color: #7DD3FC; }
.stat-card.green { background: var(--card-green); border-color: #6EE7B7; }
.stat-card.purple { background: var(--card-purple); border-color: #C4B5FD; }
.stat-card.orange { background: var(--card-orange); border-color: #FCD34D; }
.stat-card.teal { background: var(--card-teal); border-color: #5EEAD4; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-card.blue .stat-number { color: #0284C7; }
.stat-card.green .stat-number { color: #059669; }
.stat-card.purple .stat-number { color: #7C3AED; }
.stat-card.orange .stat-number { color: #D97706; }
.stat-card.teal .stat-number { color: #0D9488; }

.stat-label {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ============== CARDS ============== */

.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-gray);
    overflow: hidden;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-gray);
    background: var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3, .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============== SUBJECT/CLASS CARDS ============== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.subject-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeIn 0.3s ease;
}

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

.subject-card-header {
    padding: 1.25rem;
}

.subject-card-header.blue { background: var(--card-blue); }
.subject-card-header.green { background: var(--card-green); }
.subject-card-header.purple { background: var(--card-purple); }
.subject-card-header.orange { background: var(--card-orange); }
.subject-card-header.pink { background: var(--card-pink); }
.subject-card-header.teal { background: var(--card-teal); }

.schedule-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.subject-card h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subject-card .section-info {
    color: var(--text-medium);
    font-size: 0.85rem;
}

.subject-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.subject-card-body .btn {
    flex: 1;
    min-width: 80px;
}

/* ============== PAGE HEADER ============== */

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

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header p {
    color: var(--text-gray);
    margin-top: 0.25rem;
}

/* ============== TABLES ============== */

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--text-medium);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--off-white);
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-cell img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-gray);
}

/* ============== SESSION LIST ============== */

.session-list {
    list-style: none;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.session-item:hover {
    border-color: #A78BFA;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.session-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.session-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.session-title {
    font-weight: 600;
    color: var(--text-dark);
}

.session-meta {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.session-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============== VISIBILITY TOGGLE ============== */

.visibility-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-gray);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background: var(--success-green);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* ============== BADGES ============== */

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

.badge-visible { background: #D1FAE5; color: #065F46; }
.badge-hidden { background: #FEE2E2; color: #991B1B; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-active { background: #DBEAFE; color: #1E40AF; }

/* ============== CAMERA & PHOTO ============== */

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border: 2px dashed #8B5CF6;
    border-radius: 16px;
    background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
}

.camera-preview {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #000;
    object-fit: cover;
    border: 4px solid #8B5CF6;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.camera-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.photo-upload-label {
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

/* ============== PROFILE ============== */

.profile-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.profile-photo-section {
    text-align: center;
}

.profile-photo-large {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #8B5CF6;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.profile-role {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: capitalize;
}

/* ============== QUIZ/EXAM ============== */

.question-card {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-gray);
}

.question-card h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.options-list {
    list-style: none;
}

.options-list li {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.options-list li:hover {
    border-color: #8B5CF6;
    background: #F5F3FF;
}

.options-list input[type="radio"],
.options-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B5CF6;
}

/* ============== GRADES ============== */

.grade-display {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grade-a, .grade-good { color: var(--success-green); }
.grade-b { color: #3B82F6; }
.grade-c, .grade-average { color: var(--warning-orange); }
.grade-d, .grade-poor { color: var(--danger-red); }

.grade-input {
    width: 80px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
}

/* ============== MODALS ============== */

/* Ensure main content is always interactive when no modal is open */
main.container {
    position: relative;
    z-index: 1;
}

.modal {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden;
}

.modal.active {
    display: flex !important;
    visibility: visible;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    pointer-events: auto !important;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    margin: 50px 0;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
}

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

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger-red);
}

/* ============== UPLOAD SECTION ============== */

.upload-section {
    background: var(--light-gray);
    border: 2px dashed var(--border-gray);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
}

.upload-section:hover {
    border-color: #8B5CF6;
    background: #F5F3FF;
}

.upload-section h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* ============== EMPTY STATE ============== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* ============== ANIMATIONS ============== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.camera-preview.recording {
    animation: pulse 1.5s infinite;
}

/* ============== UTILITY CLASSES ============== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-20 { margin-top: 20px; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-10 { gap: 10px; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

/* ============================================================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Breakpoints: 1024px (tablet), 768px (small tablet), 640px (large phone),
                480px (phone), 380px (small phone), 320px (foldable)
   ============================================================================ */

/* === GLOBAL: Prevent horizontal overflow on all devices === */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }

/* === GLOBAL: Make all tables horizontally scrollable === */
div[style*="overflow-x:auto"], div[style*="overflow-x: auto"] {
    -webkit-overflow-scrolling: touch;
}
table { max-width: 100%; }

/* ============== TABLET (1024px) ============== */
@media (max-width: 1024px) {
    .container { padding: 1.25rem; }

    /* Dashboard 2-col layouts to stack */
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Fixed sidebar layouts */
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns:1fr 360px"],
    [style*="grid-template-columns: 1fr 340px"],
    [style*="grid-template-columns:1fr 340px"] {
        grid-template-columns: 1fr !important;
    }

    /* Charts side by side -> stack */
    .charts-grid { grid-template-columns: 1fr; }
}

/* ============== SMALL TABLET (768px) ============== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .nav-links {
        gap: 0.25rem;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    .nav-links a { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .container { padding: 0.75rem; }

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

    /* Dashboard layouts */
    .dashboard-grid { grid-template-columns: 1fr; }
    .profile-card { grid-template-columns: 1fr; }

    /* Session items */
    .session-item { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

    /* Page headers */
    .page-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .page-header h1 { font-size: 1.3rem; }

    /* Camera */
    .camera-preview { width: 160px; height: 160px; }
    .nav-user { display: none; }

    /* Tables: scrollable with touch */
    table { font-size: 0.82rem; }
    th, td { padding: 0.5rem 0.4rem; }

    /* Modals - fit viewport */
    .modal-content { margin: 10px; padding: 1.25rem; max-width: 96vw !important; width: 96vw !important; }
    [style*="max-width:640px"] { max-width: 96vw !important; }
    [style*="max-width:600px"] { max-width: 96vw !important; }
    [style*="max-width:550px"] { max-width: 96vw !important; }
    [style*="max-width:500px"] { max-width: 96vw !important; }

    /* Charts */
    .charts-grid { grid-template-columns: 1fr; }

    /* Marketplace */
    .marketplace-grid { grid-template-columns: 1fr !important; }
    .marketplace-filters { flex-direction: column; gap: 8px; }
    .marketplace-filters input, .marketplace-filters select { width: 100%; }

    /* Tab bar horizontal scroll */
    .tab-bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tab-bar a, .tab-bar button { white-space: nowrap; flex-shrink: 0; }

    /* Two-column grids -> single column */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Auto-fit grids: reduce min size */
    [style*="minmax(280px"],
    [style*="minmax(300px"],
    [style*="minmax(240px"] {
        grid-template-columns: 1fr !important;
    }

    /* Table min-widths: wrap in scroll */
    [style*="min-width:1100px"],
    [style*="min-width:1000px"],
    [style*="min-width: 1100px"],
    [style*="min-width: 1000px"] {
        min-width: 800px !important;
    }

    /* Forms in modals: 3-col -> 1-col */
    [style*="grid-template-columns:1fr 1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Share FAB adjustment */
    #shareFab { bottom: 16px !important; right: 16px !important; }
    #shareModal { width: 280px !important; }
}

/* ============== LARGE PHONE (640px) ============== */
@media (max-width: 640px) {
    .container { padding: 0.5rem; }

    /* All auto-fit grids: max 2 columns */
    [style*="grid-template-columns: repeat(auto-fit"],
    [style*="grid-template-columns:repeat(auto-fit"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Inline flex: always wrap */
    [style*="display:flex"][style*="gap"],
    [style*="display: flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }

    /* Page header buttons */
    .page-header .btn, .page-header button {
        font-size: 0.78rem;
        padding: 0.4rem 0.8rem;
    }

    /* Card padding reduction */
    .card-body { padding: 1rem; }
    .card-header { padding: 0.75rem 1rem; font-size: 0.88rem; }

    /* Notification dropdown */
    .notif-dropdown { min-width: 280px !important; max-width: 90vw !important; }
}

/* ============== PHONE (480px) ============== */
@media (max-width: 480px) {
    .container { padding: 0.35rem; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-card { padding: 0.75rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.72rem; }

    .page-header h1 { font-size: 1.1rem; gap: 0.4rem; }
    .page-header h1 i { font-size: 0.95rem; }

    .card-body { padding: 0.75rem; }
    .card-header { padding: 0.6rem 0.75rem; }

    /* Subject cards stack */
    .subject-card-body { flex-direction: column; }
    .subject-card-body .btn { width: 100%; }

    /* Session actions */
    .session-actions { width: 100%; justify-content: flex-end; }

    /* Quiz */
    .question-card { padding: 0.75rem; }
    .options-list li { padding: 0.6rem; }

    /* Grade */
    .grade-display { font-size: 1.1rem; }

    /* Login */
    .login-box { padding: 1.25rem; margin: 10px; }
    .login-box h1 { font-size: 1.35rem; }
    .register-box { padding: 1.25rem; margin: 10px; }

    /* Forms smaller */
    .form-group input, .form-group select, .form-group textarea {
        padding: 0.55rem 0.7rem;
        font-size: 0.85rem;
    }

    /* Buttons compact */
    .btn { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
    .btn-lg { padding: 0.6rem 1rem; font-size: 0.85rem; }

    /* Upload */
    .upload-section { padding: 1rem; }

    /* Profile photo */
    .profile-photo-large { width: 100px; height: 100px; }

    /* All auto-fit grids: force 2-col or 1-col */
    [style*="grid-template-columns: repeat(auto-fit"],
    [style*="grid-template-columns:repeat(auto-fit"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Inline flex containers: always wrap */
    [style*="display:flex"][style*="gap:10px"],
    [style*="display:flex"][style*="gap:12px"],
    [style*="display:flex"][style*="gap:16px"],
    [style*="display:flex"][style*="gap:20px"],
    [style*="display: flex"][style*="gap: 10px"],
    [style*="display: flex"][style*="gap: 12px"],
    [style*="display: flex"][style*="gap: 16px"],
    [style*="display: flex"][style*="gap: 20px"] {
        flex-wrap: wrap !important;
    }

    /* Table min-widths: override inline */
    [style*="min-width:900px"] { min-width: auto !important; }
    [style*="min-width:800px"] { min-width: auto !important; }
    [style*="min-width:700px"] { min-width: auto !important; }
    [style*="min-width:600px"] { min-width: auto !important; }
    [style*="min-width:1000px"] { min-width: auto !important; }
    [style*="min-width:1100px"] { min-width: auto !important; }
    [style*="min-width: 900px"] { min-width: auto !important; }
    [style*="min-width: 800px"] { min-width: auto !important; }
    [style*="min-width: 700px"] { min-width: auto !important; }
    [style*="min-width: 600px"] { min-width: auto !important; }
    [style*="min-width: 1000px"] { min-width: auto !important; }
    [style*="min-width: 1100px"] { min-width: auto !important; }

    /* Modals full-width on phone */
    .modal-content,
    [style*="max-width:500px"],
    [style*="max-width:540px"],
    [style*="max-width:550px"],
    [style*="max-width:600px"],
    [style*="max-width:640px"],
    [style*="max-width: 500px"],
    [style*="max-width: 540px"],
    [style*="max-width: 550px"],
    [style*="max-width: 600px"],
    [style*="max-width: 640px"] {
        max-width: 98vw !important;
    }

    /* Share modal */
    #shareModal { width: 260px !important; padding: 14px !important; }
    #shareFab { bottom: 12px !important; right: 12px !important; }
    #shareFab button { width: 44px !important; height: 44px !important; font-size: 1rem !important; }
}

/* ============== SMALL PHONE (380px) ============== */
@media (max-width: 380px) {
    .container { padding: 0.25rem; }

    /* Stats: single column on very small screens */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .stat-card { padding: 0.6rem; }
    .stat-number { font-size: 1.3rem; }
    .stat-label { font-size: 0.68rem; }

    .page-header h1 { font-size: 1rem; }

    /* All auto-fit grids to single column */
    [style*="grid-template-columns: repeat(auto-fit"],
    [style*="grid-template-columns:repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }

    .card-body { padding: 0.6rem; }
    table { font-size: 0.75rem; }
    th, td { padding: 0.35rem 0.3rem; }
    .btn { padding: 0.4rem 0.7rem; font-size: 0.75rem; }

    /* Login/Register */
    .login-box, .register-box { padding: 1rem; }
    .login-box h1 { font-size: 1.2rem; }
    .form-row { grid-template-columns: 1fr !important; }

    /* Share FAB minimal */
    #shareModal { width: 240px !important; }
}

/* ============== FOLDABLE DEVICES (320px and below) ============== */
@media (max-width: 320px) {
    .container { padding: 0.15rem; }

    .stats-grid { grid-template-columns: 1fr; gap: 0.35rem; }
    .stat-card { padding: 0.5rem; }
    .stat-number { font-size: 1.2rem; }

    .page-header h1 { font-size: 0.9rem; }
    .page-header h1 i { font-size: 0.85rem; }

    .card-body { padding: 0.5rem; }
    .card-header { padding: 0.5rem; font-size: 0.8rem; }

    table { font-size: 0.7rem; }
    th, td { padding: 0.3rem 0.25rem; }

    .btn { padding: 0.35rem 0.6rem; font-size: 0.72rem; }
    .btn-lg { padding: 0.5rem 0.8rem; font-size: 0.78rem; }

    .form-group input, .form-group select, .form-group textarea {
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }

    .login-box, .register-box { padding: 0.75rem; }
    .login-box h1 { font-size: 1.05rem; }

    #shareModal { width: 220px !important; right: -4px !important; }
    #shareFab { bottom: 8px !important; right: 8px !important; }
}

/* ============== MARKETPLACE ============== */
.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.tutor-card { background: var(--white, #fff); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-gray, #E2E8F0); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tutor-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15); }
.tutor-card-header { padding: 1.5rem; background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%); text-align: center; }
.tutor-card-header img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #8B5CF6; margin-bottom: 0.75rem; }
.tutor-card-body { padding: 1rem 1.5rem 1.5rem; }
.tutor-rating { color: #F59E0B; font-size: 0.9rem; }
.tutor-tag { display: inline-block; padding: 2px 10px; background: #EDE9FE; color: #6D28D9; border-radius: 20px; font-size: 0.75rem; font-weight: 500; margin: 2px; }
.availability-badge { display: inline-block; padding: 3px 10px; background: #D1FAE5; color: #065F46; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.booking-status-pending { background: #FEF3C7; color: #92400E; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.booking-status-approved { background: #D1FAE5; color: #065F46; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.booking-status-rejected { background: #FEE2E2; color: #991B1B; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.booking-status-completed { background: #DBEAFE; color: #1E40AF; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.booking-status-cancelled { background: #F1F5F9; color: #64748B; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.marketplace-filters { background: #fff; border-radius: 12px; padding: 1.5rem; border: 1px solid #E2E8F0; margin-bottom: 1.5rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.marketplace-filters input, .marketplace-filters select { padding: 8px 14px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 0.85rem; }
.marketplace-filters input:focus, .marketplace-filters select:focus { outline: none; border-color: #8B5CF6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }
.btn-full { width: 100%; }

/* ============== CHARTS ============== */
.chart-card { background: #fff; border-radius: 12px; border: 1px solid #E2E8F0; padding: 1.5rem; margin-bottom: 1.5rem; }
.chart-card h3 { font-size: 1rem; font-weight: 600; margin: 0 0 1rem 0; color: #1E293B; display: flex; align-items: center; gap: 8px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }

/* ============== RECOMMENDATIONS ============== */
.recommendation-card { background: #fff; border-left: 4px solid #8B5CF6; border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 2px rgba(139, 92, 246, 0.1); }
.recommendation-card.urgent { border-left-color: #EF4444; }
.recommendation-card .dismiss-btn { margin-left: auto; cursor: pointer; color: #94A3B8; font-size: 0.85rem; border: none; background: none; padding: 4px 8px; border-radius: 4px; }
.recommendation-card .dismiss-btn:hover { background: #FEE2E2; color: #EF4444; }

/* ============== PREDICTION BADGES ============== */
.prediction-excelling { background: #D1FAE5; color: #065F46; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.prediction-on_track { background: #DBEAFE; color: #1E40AF; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.prediction-at_risk { background: #FEF3C7; color: #92400E; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.prediction-likely_to_fail { background: #FEE2E2; color: #991B1B; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* ============== HEATMAP TABLE ============== */
.heatmap-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.heatmap-table th, .heatmap-table td { padding: 6px 8px; text-align: center; border: 1px solid #E2E8F0; }
.heatmap-table th { background: #F8FAFC; font-weight: 600; color: #64748B; }
.heatmap-cell-done { background: #10B981; color: white; border-radius: 3px; }
.heatmap-cell-notdone { background: #FEE2E2; color: #991B1B; border-radius: 3px; }

/* Marketplace public nav */
.marketplace-nav { background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; }
.marketplace-nav a { color: white; text-decoration: none; font-weight: 500; font-size: 0.9rem; padding: 6px 14px; border-radius: 8px; transition: background 0.2s; }
.marketplace-nav a:hover { background: rgba(255,255,255,0.2); }
.marketplace-nav .brand { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ============== DARK MODE ============== */
[data-theme="dark"] {
    --white: #1E293B;
    --off-white: #0F172A;
    --light-gray: #1E293B;
    --border-gray: #334155;
    --text-gray: #94A3B8;
    --text-dark: #E2E8F0;
    --text-medium: #CBD5E1;
    --text-light: #64748B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.4);
}
[data-theme="dark"] body { background: #0F172A; color: #E2E8F0; }
[data-theme="dark"] .sidebar { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .card, [data-theme="dark"] .question-card { background: #1E293B; border-color: #334155; color: #E2E8F0; }
[data-theme="dark"] .card-header { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .page-header h1, [data-theme="dark"] .page-header h2 { color: #E2E8F0; }
[data-theme="dark"] .form-group input, [data-theme="dark"] .form-group select, [data-theme="dark"] .form-group textarea { background: #0F172A; color: #E2E8F0; border-color: #334155; }
[data-theme="dark"] .form-group label { color: #CBD5E1; }
[data-theme="dark"] .btn-secondary { background: #334155; color: #CBD5E1; border-color: #475569; }
[data-theme="dark"] .btn-secondary:hover { background: #475569; }
[data-theme="dark"] table { background: #1E293B; }
[data-theme="dark"] th { background: #0F172A !important; color: #94A3B8; border-color: #334155 !important; }
[data-theme="dark"] td { border-color: #334155 !important; color: #CBD5E1; }
[data-theme="dark"] tr:nth-child(even) { background: #1a2536; }
[data-theme="dark"] tr:hover { background: #334155 !important; }
[data-theme="dark"] .badge { opacity: 0.9; }
[data-theme="dark"] .modal-content { background: #1E293B; color: #E2E8F0; border-color: #334155; }
[data-theme="dark"] .modal-header { border-color: #334155; }
[data-theme="dark"] .modal-footer { border-color: #334155; }
[data-theme="dark"] .tab-bar { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .tab-bar a, [data-theme="dark"] .tab-bar button { color: #94A3B8; }
[data-theme="dark"] .tab-bar a:hover:not(.active), [data-theme="dark"] .tab-bar button:hover:not(.active) { background: #334155; }
[data-theme="dark"] .stats-card { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .pdf-viewer-section { background: #1E293B; }
[data-theme="dark"] .pdf-header-bar { background: #334155; }
[data-theme="dark"] .due-date-info { background: #334155; }
[data-theme="dark"] .file-upload-area { background: #0F172A; border-color: #475569; }
[data-theme="dark"] .upload-placeholder { color: #94A3B8; }
[data-theme="dark"] .session-stepper { background: #1E293B; }
[data-theme="dark"] .heatmap-table th { background: #1E293B; color: #94A3B8; }
[data-theme="dark"] .heatmap-table td { border-color: #334155; }
[data-theme="dark"] a { color: #A78BFA; }
[data-theme="dark"] a:hover { color: #C4B5FD; }
[data-theme="dark"] .topnav a, [data-theme="dark"] .topnav-links a { color: #94A3B8; }
[data-theme="dark"] .topnav-links a:hover { color: #A78BFA; }
[data-theme="dark"] .topnav-links a.active { color: #A78BFA; }
[data-theme="dark"] hr { border-color: #334155; }
[data-theme="dark"] pre, [data-theme="dark"] code { background: #0F172A; color: #A78BFA; }
