/* ============================================================
   EduCRM - AI Education ERP - Main Stylesheet
   ============================================================ */

/* Google Fonts loaded in layout */
:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Colors - Light Theme */
    --bg-base: #f0f2f7;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: rgba(255,255,255,0.07);
    --bg-sidebar-active: rgba(99,102,241,0.2);
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;

    /* Brand Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --header-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 12px rgba(99,102,241,0.07);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-base: #0d1117;
    --bg-card: #161b22;
    --bg-sidebar: #0d1117;
    --border-color: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

body.admin-body {
    display: flex;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.brand-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.brand-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.session-badge {
    margin: 10px 12px;
    padding: 8px 12px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 8px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.25);
    padding: 16px 10px 6px;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: var(--transition);
    position: relative;
    margin-bottom: 2px;
}

.nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: white;
}

.nav-link.active {
    background: var(--bg-sidebar-active);
    color: #a5b4fc;
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.nav-badge.danger { background: var(--danger); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

/* ============================================================
   HEADER
   ============================================================ */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    gap: 16px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}
.menu-toggle:hover { background: var(--bg-base); color: var(--primary); }

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 6px 16px;
    color: var(--text-muted);
    min-width: 220px;
}

.header-search input {
    background: none;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-main);
    flex: 1;
}

.header-icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 17px;
    position: relative;
    transition: var(--transition);
}
.header-icon-btn:hover { background: var(--bg-base); color: var(--primary); }

.notif-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.header-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}
.header-profile { background: none; border: none; padding: 0; }
.header-profile:hover img { border-color: var(--primary); }

/* Notifications Dropdown */
.notif-dropdown { width: 340px; padding: 0; border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-weight: 600; font-size: 14px; }
.notif-header a { font-size: 12px; color: var(--primary); text-decoration: none; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; transition: var(--transition); border-bottom: 1px solid var(--border-color); }
.notif-item:hover { background: var(--bg-base); }
.notif-item.unread { background: rgba(99,102,241,0.04); }
.notif-icon { width: 36px; height: 36px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content { padding: 24px; flex: 1; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

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

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat-body { flex: 1; min-width: 0; }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Colored Stat Variants */
.stat-card.primary .stat-icon { background: rgba(99,102,241,0.12); color: var(--primary); --card-accent: var(--primary); }
.stat-card.success .stat-icon { background: rgba(16,185,129,0.12); color: var(--success); --card-accent: var(--success); }
.stat-card.warning .stat-icon { background: rgba(245,158,11,0.12); color: var(--warning); --card-accent: var(--warning); }
.stat-card.danger .stat-icon { background: rgba(239,68,68,0.12); color: var(--danger); --card-accent: var(--danger); }
.stat-card.info .stat-icon { background: rgba(59,130,246,0.12); color: var(--info); --card-accent: var(--info); }
.stat-card.cyan .stat-icon { background: rgba(6,182,212,0.12); color: var(--secondary); --card-accent: var(--secondary); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: none;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 20px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { border-radius: var(--radius-md); overflow: hidden; }

.table {
    margin: 0;
    font-size: 13.5px;
    border-color: var(--border-color);
}

.table thead th {
    background: var(--bg-base);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-color: var(--border-color);
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: rgba(99,102,241,0.03);
}

.table td {
    padding: 12px 14px;
    border-color: var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 600;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }

.btn-outline-primary { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: white; }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    font-family: var(--font-main);
    font-size: 13.5px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    outline: none;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   GPS ATTENDANCE SPECIFIC
   ============================================================ */
.gps-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gps-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
}

.gps-time {
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -2px;
    margin-bottom: 4px;
}

.gps-date {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 32px;
}

.gps-status-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    position: relative;
}

.gps-status-ring.locating {
    border-color: var(--warning);
    animation: spin 2s linear infinite;
}

.gps-status-ring.inside { border-color: var(--success); }
.gps-status-ring.outside { border-color: var(--danger); }

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

.checkin-btn {
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.checkin-btn.check-in { background: var(--success); color: white; }
.checkin-btn.check-out { background: var(--danger); color: white; }
.checkin-btn:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.checkin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================
   EXAM INTERFACE
   ============================================================ */
.exam-container {
    max-width: 900px;
    margin: 0 auto;
}

.exam-header-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--primary);
}

.exam-timer.warning { color: var(--warning); }
.exam-timer.danger { color: var(--danger); animation: pulse 1s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.question-card:hover { border-color: var(--primary); }

.question-number {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.question-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.option-label:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.04);
}

.option-label input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.option-label.selected { border-color: var(--primary); background: rgba(99,102,241,0.08); color: var(--primary); }
.option-label.correct { border-color: var(--success); background: rgba(16,185,129,0.08); }
.option-label.wrong { border-color: var(--danger); background: rgba(239,68,68,0.08); }

.question-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.q-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-nav-btn.answered { background: var(--primary); color: white; border-color: var(--primary); }
.q-nav-btn.current { border-color: var(--warning); color: var(--warning); }

/* ============================================================
   KANBAN BOARD
   ============================================================ */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.kanban-column {
    min-width: 270px;
    max-width: 270px;
    background: var(--bg-base);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.kanban-col-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.kanban-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.kanban-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   AI PREDICTION BADGE
   ============================================================ */
.ai-score {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
}

.ai-score.high { background: rgba(16,185,129,0.12); color: var(--success); }
.ai-score.medium { background: rgba(245,158,11,0.12); color: var(--warning); }
.ai-score.low { background: rgba(239,68,68,0.12); color: var(--danger); }

/* ============================================================
   SIDEBAR OVERLAY (Mobile)
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .main-content { margin-left: 0; }
    .page-content { padding: 16px; }
}

@media (max-width: 768px) {
    .stat-value { font-size: 22px; }
    .gps-time { font-size: 36px; }
    .exam-header-bar { flex-direction: column; gap: 12px; }
    .kanban-board { flex-direction: column; }
    .kanban-column { min-width: 100%; max-width: 100%; }
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 60%);
}

.auth-container::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 60%);
}

.auth-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    text-align: center;
    margin-bottom: 28px;
}

.auth-form .form-control {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    padding: 12px 16px;
}

.auth-form .form-control::placeholder { color: rgba(255,255,255,0.3); }
.auth-form .form-control:focus { background: rgba(255,255,255,0.09); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.auth-form .form-label { color: rgba(255,255,255,0.6); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    letter-spacing: 0.2px;
}

.auth-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,102,241,0.4); }

.auth-link { color: rgba(255,255,255,0.5); font-size: 13px; text-align: center; margin-top: 20px; }
.auth-link a { color: #a5b4fc; text-decoration: none; font-weight: 600; }
.auth-link a:hover { color: white; }

/* ============================================================
   PROGRESS & CHARTS
   ============================================================ */
.progress {
    height: 6px;
    border-radius: 4px;
    background: var(--bg-base);
}

.progress-bar { border-radius: 4px; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-base) 25%, rgba(0,0,0,0.05) 50%, var(--bg-base) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
[data-theme="dark"] .card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .table thead th { background: #0d1117; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: #0d1117; border-color: var(--border-color); color: var(--text-primary); }
[data-theme="dark"] .top-header { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .header-search { background: #0d1117; }
[data-theme="dark"] .auth-card { background: rgba(0,0,0,0.4); }
