/* ===== Numerika LMS — Design System ===== */
/* Google Font: Inter */
:root {
    --bg-primary: #0a1628;
    --bg-secondary: #0f1f35;
    --bg-card: rgba(15, 32, 55, 0.75);
    --bg-card-hover: rgba(20, 42, 70, 0.85);
    --bg-glass: rgba(255,255,255,0.04);
    --bg-input: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.08);
    --border-focus: rgba(0,137,123,0.5);
    --text-primary: #e8edf4;
    --text-secondary: #8fa3b8;
    --text-muted: #5a7088;
    --accent: #00897b;
    --primary: var(--accent);
    --accent-hover: #00695c;
    --accent-glow: rgba(0,137,123,0.25);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --purple-grad: linear-gradient(135deg, #00897b, #26a69a);
    --blue-grad: linear-gradient(135deg, #0277bd, #4fc3f7);
    --green-grad: linear-gradient(135deg, #10b981, #34d399);
    --orange-grad: linear-gradient(135deg, #f59e0b, #fbbf24);
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.35);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --transition: 0.2s cubic-bezier(.4,0,.2,1);
    --bg-topbar: rgba(10,22,40,0.85);
}

/* ===== Theme Overrides ===== */
[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(0, 0, 0, 0.04);
    --border: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(0,137,123,0.5);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #00897b;
    --accent-hover: #00695c;
    --accent-glow: rgba(0,137,123,0.15);
    --purple-grad: linear-gradient(135deg, #00897b, #26a69a);
    --bg-topbar: rgba(255,255,255,0.9);
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
}

[data-theme="steel"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: rgba(31, 41, 55, 0.7);
    --bg-card-hover: rgba(55, 65, 81, 0.8);
    --bg-glass: rgba(255,255,255,0.03);
    --bg-input: rgba(255,255,255,0.05);
    --border: rgba(255,255,255,0.07);
    --border-focus: rgba(0,137,123,0.5);
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent: #00897b;
    --accent-hover: #00695c;
    --accent-glow: rgba(0,137,123,0.25);
    --purple-grad: linear-gradient(135deg, #00897b, #26a69a);
    --bg-topbar: rgba(31,41,55,0.8);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-logo-img {
    height: 36px; width: auto; object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter var(--transition);
}
[data-theme="light"] .sidebar-logo-img {
    filter: none;
}
.logo-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--purple-grad);
    display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 0 20px var(--accent-glow);
}
.logo-icon svg { width: 20px; height: 20px; }
.logo-text { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.sidebar-close { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; }
.sidebar-close svg { width: 20px; height: 20px; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 1rem; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: all var(--transition); position: relative;
}
.nav-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-link:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-link.active {
    color: #fff; background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.nav-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }
.nav-section-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); padding: 0.25rem 1rem; font-weight: 600; }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }
.sidebar-user {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem; border-radius: var(--radius-sm);
    transition: background var(--transition); color: var(--text-primary);
}
.sidebar-user:hover { background: var(--bg-glass); color: var(--text-primary); }
.user-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--purple-grad);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; line-height: 1.3; }
.user-name { font-weight: 600; font-size: 0.85rem; }
.user-role { font-size: 0.7rem; color: var(--text-muted); }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.topbar {
    height: var(--topbar-h); padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; }
.menu-toggle svg { width: 22px; height: 22px; }
.page-title { font-size: 1.15rem; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.topbar-search {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 0.45rem 0.85rem;
}
.topbar-search svg { width: 16px; height: 16px; color: var(--text-muted); }
.topbar-search input {
    background: none; border: none; color: var(--text-primary);
    font-size: 0.85rem; width: 180px; outline: none; font-family: inherit;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.btn-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-glass); color: var(--danger); }
.btn-icon svg { width: 18px; height: 18px; }

.content-area { padding: 1.5rem; max-width: 1280px; margin: 0 auto; }

/* ===== FLASH MESSAGES ===== */
.flash-message {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1.25rem; margin: 1rem 1.5rem 0; border-radius: var(--radius);
    animation: slideDown 0.3s ease;
}
.flash-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: var(--danger); }
.flash-info { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: var(--info); }
.flash-message svg { width: 18px; height: 18px; flex-shrink: 0; }
.flash-close { background: none; border: none; color: inherit; cursor: pointer; margin-left: auto; opacity: 0.7; }
.flash-close:hover { opacity: 1; }
.flash-close svg { width: 16px; height: 16px; }

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.25rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600; border: none; cursor: pointer;
    transition: all var(--transition); font-family: inherit; text-decoration: none;
    white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 0 24px var(--accent-glow); transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-glass); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 0.95rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-sm svg { width: 14px; height: 14px; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.form-group label svg { width: 15px; height: 15px; }
.form-input, .form-input-sm {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem; color: var(--text-primary); font-size: 0.9rem;
    font-family: inherit; outline: none; transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }
select option { background-color: var(--bg-secondary); color: var(--text-primary); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; padding-top: 0.5rem; }
.form-page { max-width: 640px; margin: 0 auto; }
.checkbox-label { flex-direction: row !important; gap: 0.5rem; cursor: pointer; align-items: center; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--accent); }
.inline-form { display: inline; }
.role-select { min-width: 110px; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.5rem; backdrop-filter: blur(8px);
}
.section { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.section-header h3 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.section-header h3 svg { width: 18px; height: 18px; color: var(--accent); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-header h2 { font-size: 1.3rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.85rem; }

/* ===== GRID UTILITIES ===== */
.grid { display: grid; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ===== STATS ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
    backdrop-filter: blur(8px);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; color: #fff; }
.stat-purple .stat-icon { background: var(--purple-grad); }
.stat-blue .stat-icon { background: var(--blue-grad); }
.stat-green .stat-icon { background: var(--green-grad); }
.stat-orange .stat-icon { background: var(--orange-grad); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ===== WELCOME ===== */
.welcome-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 2rem; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; position: relative; overflow: hidden;
}
.welcome-card::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}
.welcome-text h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.welcome-text p { color: var(--text-secondary); margin-bottom: 1rem; }
.welcome-illustration { font-size: 4rem; }

/* ===== COURSES GRID ===== */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding-top: 15px; }
.course-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-card-header {
    padding: 1.25rem; display: flex; justify-content: space-between; align-items: flex-start;
    min-height: 60px;
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}
.cat-web { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(99,102,241,0.1)); }
.cat-programming { background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(168,85,247,0.1)); }
.cat-backend { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(52,211,153,0.1)); }
.cat-design { background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(244,114,182,0.1)); }
.cat-data { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(251,191,36,0.1)); }
.cat-general { background: linear-gradient(135deg, rgba(107,114,128,0.2), rgba(156,163,175,0.1)); }
.course-badge {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem; border-radius: 20px; background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
.course-badge.draft { background: rgba(245,158,11,0.2); color: var(--warning); }
.course-category { font-size: 0.7rem; color: var(--text-muted); }
.course-card-body { padding: 1.25rem; }
.course-card-body h4 { margin-bottom: 0.4rem; }
.course-card-body h4 a { color: var(--text-primary); }
.course-card-body h4 a:hover { color: var(--accent); }
.course-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.5; }
.course-meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.course-meta { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--text-muted); }
.course-meta svg { width: 14px; height: 14px; }
.course-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ===== PROGRESS BAR ===== */
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; margin: 0.4rem 0; }
.progress-fill { height: 100%; background: var(--purple-grad); border-radius: 10px; transition: width 0.5s ease; }
.progress-lg { height: 10px; }
.progress-text { font-size: 0.75rem; color: var(--text-muted); }

/* ===== AUTH PAGES ===== */
.auth-body { background: var(--bg-primary); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-body::before {
    content: ''; position: fixed; top: -30%; left: -20%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,137,123,0.15), transparent 70%); pointer-events: none;
}
.auth-body::after {
    content: ''; position: fixed; bottom: -30%; right: -20%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(2,119,189,0.1), transparent 70%); pointer-events: none;
}
.auth-container { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 2rem; backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 1.5rem; font-weight: 800; margin: 0.75rem 0 0.25rem; }
.auth-header p { color: var(--text-muted); font-size: 0.88rem; }
.auth-logo-img {
    max-height: 60px; width: auto; object-fit: contain;
    margin: 0 auto; display: block;
    filter: brightness(0) invert(1);
}
.logo-icon-lg {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto;
    background: var(--purple-grad); display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 0 30px var(--accent-glow);
}
.logo-icon-lg svg { width: 28px; height: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-muted); }
.auth-demo { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.demo-title { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-bottom: 0.5rem; }
.demo-accounts { display: flex; gap: 0.5rem; justify-content: center; }
.demo-btn { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.4rem 0.8rem; cursor: pointer; transition: all var(--transition); }
.demo-btn:hover { border-color: var(--accent); background: var(--bg-glass); }
.demo-role { font-size: 0.75rem; font-weight: 600; }
.demo-role.admin { color: var(--danger); }
.demo-role.instructor { color: var(--warning); }
.demo-role.student { color: var(--success); }

/* ===== COURSE DETAIL ===== */
.course-detail-header { padding: 2rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.course-detail-header h2 { font-size: 1.5rem; margin: 0.5rem 0; }
.course-detail-header p { color: var(--text-secondary); max-width: 600px; }
.course-detail-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.enrollment-progress { text-align: center; }
.enrollment-progress span { font-size: 0.8rem; color: var(--text-muted); }
.course-content-grid { display: flex; flex-direction: column; gap: 1.5rem; }

/* ===== LESSONS ===== */
.lessons-list { display: flex; flex-direction: column; gap: 4px; }
.lesson-item { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-sm); background: var(--bg-glass); border: 1px solid var(--border); color: var(--text-primary); transition: all var(--transition); }
.lesson-item:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.12); color: var(--text-primary); transform: translateX(4px); }
.lesson-item.completed { border-color: rgba(16,185,129,0.2); }
.lesson-number { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.lesson-item.completed .lesson-number { background: rgba(16,185,129,0.15); color: var(--success); }
.lesson-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lesson-title { font-weight: 600; font-size: 0.9rem; }
.lesson-duration { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; }
.lesson-duration svg { width: 12px; height: 12px; }
.lesson-check svg { width: 20px; height: 20px; color: var(--success); }
.lesson-arrow svg { width: 18px; height: 18px; color: var(--text-muted); }

.lesson-detail { }
.lesson-breadcrumb { margin-bottom: 1rem; }
.lesson-breadcrumb a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.85rem; }
.lesson-breadcrumb a:hover { color: var(--accent); }
.lesson-breadcrumb svg { width: 16px; height: 16px; }
.lesson-content-wrapper { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; }
.lesson-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; height: fit-content; position: sticky; top: 80px; }
.lesson-sidebar h4 { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--text-muted); }
.lesson-nav-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--text-secondary); transition: all var(--transition); margin-bottom: 2px; }
.lesson-nav-item:hover { background: var(--bg-glass); color: var(--text-primary); }
.lesson-nav-item.active { background: var(--accent); color: #fff; }
.lesson-nav-num { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.7rem; flex-shrink: 0; }
.lesson-nav-item.active .lesson-nav-num { background: rgba(255,255,255,0.2); }
.lesson-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.lesson-header-detail { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.lesson-header-detail h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.lesson-meta { display: flex; gap: 1rem; align-items: center; }
.lesson-meta span { display: flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: var(--text-muted); }
.lesson-meta svg { width: 15px; height: 15px; }
.badge-success { color: var(--success); background: rgba(16,185,129,0.1); padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.prose { line-height: 1.8; }
.prose h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
.prose h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
.prose p { margin-bottom: 0.75rem; color: var(--text-secondary); }
.prose ul, .prose ol { margin: 0.5rem 0; padding-left: 1.5rem; color: var(--text-secondary); }
.prose li { margin-bottom: 0.3rem; }
.prose pre { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; margin: 1rem 0; }
.prose code { font-family: 'Fira Code', monospace; font-size: 0.85rem; color: #26a69a; }
.prose pre code { color: #e0e0e8; }
.lesson-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.lesson-nav-buttons { display: flex; gap: 0.75rem; }

/* ===== TABLES ===== */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-secondary); padding: 0.75rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); font-size: 0.88rem; }
.data-table tr:hover td { background: var(--bg-glass); }
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar-sm { width: 30px; height: 30px; border-radius: 8px; background: var(--purple-grad); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.7rem; color: #fff; flex-shrink: 0; }
.role-badge { font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 20px; }
.role-admin { background: rgba(239,68,68,0.12); color: var(--danger); }
.role-instructor { background: rgba(245,158,11,0.12); color: var(--warning); }
.role-student { background: rgba(16,185,129,0.12); color: var(--success); }

/* ===== QUIZ ===== */
.quiz-take, .quiz-results { max-width: 720px; margin: 0 auto; }
.quiz-header-detail { margin-bottom: 1.5rem; }
.quiz-header-detail h2 { font-size: 1.3rem; margin: 0.5rem 0; }
.quiz-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem; }
.quiz-meta svg { width: 15px; height: 15px; }
.breadcrumb-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-link svg { width: 15px; height: 15px; }
.quiz-form { display: flex; flex-direction: column; gap: 1rem; }
.quiz-question-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.question-number { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.quiz-question-card h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: var(--bg-glass); border: 1px solid var(--border); cursor: pointer; transition: all var(--transition); }
.quiz-option:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.quiz-option input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.option-label { font-size: 0.9rem; }
.quiz-submit-area { text-align: center; padding: 1rem 0; }

/* Quiz Results */
.results-header { text-align: center; margin-bottom: 2rem; }
.score-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.score-pass .score-circle { background: rgba(16,185,129,0.12); border: 3px solid var(--success); }
.score-fail .score-circle { background: rgba(239,68,68,0.12); border: 3px solid var(--danger); }
.score-value { font-size: 1.5rem; font-weight: 800; }
.score-percent { font-size: 0.82rem; color: var(--text-muted); }
.results-details { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.result-question { display: flex; gap: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); }
.result-question.correct { border-color: rgba(16,185,129,0.3); }
.result-question.incorrect { border-color: rgba(239,68,68,0.3); }
.result-icon svg { width: 22px; height: 22px; flex-shrink: 0; }
.result-question.correct .result-icon svg { color: var(--success); }
.result-question.incorrect .result-icon svg { color: var(--danger); }
.result-content h4 { font-size: 0.92rem; margin-bottom: 0.3rem; }
.result-content p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; }
.correct-answer { color: var(--success) !important; margin-top: 0.25rem; }
.results-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* Quiz Builder */
.quiz-builder { margin-top: 0.5rem; }
.question-block { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.question-num { font-weight: 700; font-size: 0.88rem; color: var(--accent); }
.quiz-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.quiz-info { display: flex; align-items: center; gap: 0.75rem; }
.quiz-info svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.quiz-info h4 { font-size: 0.92rem; }
.quiz-info p { font-size: 0.78rem; color: var(--text-muted); }

/* ===== CHAT ===== */
.chat-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 4rem); }
.chat-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.chat-header-bar h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; }
.chat-header-bar h3 svg { width: 18px; height: 18px; color: var(--accent); }
.chat-online { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--success); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-msg { display: flex; gap: 0.6rem; max-width: 75%; }
.chat-msg.own { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--blue-grad); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; color: #fff; flex-shrink: 0; }
.chat-msg.own .msg-avatar { background: var(--purple-grad); }
.msg-bubble { background: var(--bg-glass); border: 1px solid var(--border); border-radius: 12px 12px 12px 4px; padding: 0.65rem 0.9rem; }
.chat-msg.own .msg-bubble { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.2); border-radius: 12px 12px 4px 12px; }
.msg-sender { font-size: 0.72rem; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.msg-text { font-size: 0.88rem; color: var(--text-primary); line-height: 1.5; }
.msg-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }
.chat-input-area { display: flex; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--border); }
.chat-input-area input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.65rem 1rem; color: var(--text-primary); font-family: inherit; font-size: 0.88rem; outline: none; }
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area .btn svg { width: 18px; height: 18px; }

/* ===== PROFILE ===== */
.profile-page { max-width: 640px; margin: 0 auto; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; }
.profile-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.profile-avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--purple-grad); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; color: #fff; }
.profile-header h2 { font-size: 1.2rem; }
.enrollments-list { display: flex; flex-direction: column; gap: 0.75rem; }
.enrollment-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.enrollment-info { flex: 1; }
.enrollment-info h4 { font-size: 0.9rem; }
.enrollment-item .progress-bar { width: 120px; }

/* ===== EMPTY STATES ===== */
.empty-state { text-align: center; padding: 3rem 1rem; grid-column: 1 / -1; }
.empty-state svg { width: 48px; height: 48px; color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.empty-state p { color: var(--text-muted); font-size: 0.88rem; }
.empty-state-sm { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.88rem; background: var(--bg-glass); border-radius: var(--radius-sm); }

/* ===== RESPONSIVE ===== */

/* --- Tablet / Phone (<=768px) --- */
@media (max-width: 768px) {
    /* Sidebar */
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .menu-toggle { display: block; }
    .main-content { margin-left: 0; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
    .sidebar-overlay.active { display: block; }

    /* Topbar */
    .topbar { padding: 0 1rem; }
    .topbar-search { display: none; }
    .page-title { font-size: 1rem; }

    /* Content */
    .content-area { padding: 1.25rem 1rem; }

    /* Stats */
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stat-card { padding: 1rem; gap: 0.75rem; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-value { font-size: 1.25rem; }

    /* Welcome */
    .welcome-card { flex-direction: column; text-align: center; }
    .welcome-illustration { font-size: 3rem; }

    /* Dashboard Grid */
    .dashboard-grid-drag { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .dashboard-grid-drag .widget-item { grid-column: span 1 !important; }

    /* Widget drag — disable on mobile */
    .widget-item { cursor: default !important; }
    .widget-item[draggable="true"] { -webkit-user-drag: none; }
    .widget-controls { display: none !important; }

    /* Courses */
    .courses-grid { grid-template-columns: 1fr; }
    .course-detail-header { flex-direction: column; }
    .course-detail-actions { align-items: stretch; }

    /* Lessons */
    .form-row { grid-template-columns: 1fr; }
    .lesson-content-wrapper { grid-template-columns: 1fr; }
    .lesson-sidebar { position: static; }
    .lesson-main { padding: 1.25rem; }
    .lesson-nav-buttons { flex-direction: column; width: 100%; }
    .lesson-nav-buttons .btn { width: 100%; justify-content: center; }

    /* Calendar */
    .calendar-page .grid-3,
    .calendar-page .grid.grid-3 {
        grid-template-columns: 1fr !important;
    }
    .calendar-page .grid-3 > *,
    .calendar-page .grid.grid-3 > * {
        grid-column: span 1 !important;
    }
    .calendar-day-cell { min-height: 65px; padding: 0.35rem; }
    .calendar-day-number { font-size: 0.75rem; }
    .calendar-event-dot { font-size: 0.6rem; padding: 0.1rem 0.25rem; }

    /* Chat Layout */
    .chat-layout { grid-template-columns: 1fr !important; height: auto !important; }
    .chat-sidebar { display: none; }
    .chat-sidebar.mobile-open { display: flex !important; position: fixed; inset: 0; z-index: 200; border-radius: 0; max-height: 100vh; }
    .chat-container { height: 75vh !important; }
    .chat-msg { max-width: 88%; }
    .chat-header-bar h3 { font-size: 1rem !important; }

    /* Forum */
    .forum-grid { grid-template-columns: 1fr !important; }
    .forum-sidebar { order: -1; }
    .forum-topic-card { flex-direction: column; align-items: stretch !important; gap: 0.75rem !important; }
    .forum-topic-card > div:last-child { flex-direction: row; justify-content: space-between; }

    /* Leaderboard */
    .leaderboard-container { padding: 0 0.25rem; }
    .leaderboard-container .card { border-radius: var(--radius-sm); }
    .leaderboard-container table th,
    .leaderboard-container table td { padding: 0.75rem 0.5rem; }

    /* Tables */
    .table-container { border-radius: var(--radius-sm); }
    .data-table th, .data-table td { padding: 0.6rem 0.75rem; font-size: 0.82rem; }

    /* Page Headers */
    .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

    /* Achievements container */
    .achievements-container { flex-direction: column !important; gap: 1.25rem !important; }
    .activity-column, .badges-column { min-width: 0 !important; width: 100% !important; }

    /* Forms */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .form-page { padding: 0; }

    /* Profile */
    .profile-header { flex-direction: column; text-align: center; }
    .profile-avatar { margin: 0 auto; }
    .enrollment-item { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .enrollment-item .progress-bar { width: 100%; }

    /* Cards */
    .card { padding: 1.25rem; border-radius: var(--radius); }

    /* Catalog Filters */
    .catalog-filters { padding: 0.5rem 0.75rem; gap: 0.5rem; }
    .filter-pills { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; -webkit-overflow-scrolling: touch; }
    .filter-pill { flex-shrink: 0; }

    /* Group Sections */
    .group-header { flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .group-desc { margin-left: 0; }

    /* Quiz */
    .quiz-take, .quiz-results { padding: 0; }
    .results-actions { flex-direction: column; }
    .results-actions .btn { width: 100%; justify-content: center; }

    /* Auth */
    .auth-card { padding: 1.5rem; }
    .demo-accounts { flex-direction: column; align-items: center; }

    /* Buttons in tight layouts */
    .btn-full-mobile { width: 100%; justify-content: center; }
}

/* --- Small phone (<=480px) --- */
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .content-area { padding: 0.75rem; }

    /* Calendar - ultra compact */
    .calendar-day-cell { min-height: 50px; padding: 0.25rem; }
    .calendar-event-dot { display: none; }
    .calendar-day-number { font-size: 0.7rem; }

    /* Chat */
    .chat-container { height: 70vh !important; }
    .chat-msg { max-width: 92%; }
    .msg-bubble { padding: 0.5rem 0.7rem !important; }
    .msg-text { font-size: 0.85rem !important; }

    /* Leaderboard */
    .leaderboard-container h2 { font-size: 1.4rem !important; }

    /* Welcome */
    .welcome-text h2 { font-size: 1.15rem; }
    .welcome-text p { font-size: 0.85rem; }

    /* Forum hero */
    .welcome-card .welcome-text { max-width: 100% !important; }
    .welcome-card .welcome-text h2 { font-size: 1.3rem; }
    .welcome-card .welcome-text h2 svg { display: none; }

    /* Topbar */
    .topbar { height: 52px; }
    .page-title { font-size: 0.9rem; }

    /* Cards */
    .card { padding: 1rem; }
    .stat-card { padding: 0.85rem; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.72rem; }

    /* Course cards */
    .course-card-header { padding: 1rem; min-height: 48px; }
    .course-card-body { padding: 1rem; }
    .course-actions { flex-direction: column; }
    .course-actions .btn { width: 100%; justify-content: center; }
}

/* ===== WIDGET DRAG & DROP SYSTEM ===== */
.widget-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.widget-item.widget-editable {
    border: 2px dashed var(--border) !important;
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}
.widget-item.widget-editable:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}
.widget-item.drag-over {
    border: 2px dashed var(--accent) !important;
    background: rgba(124, 58, 237, 0.06) !important;
    transform: scale(0.99);
}
.widget-item.dragging {
    opacity: 0.3;
    transform: scale(0.96);
}
.edit-mode-grid {
    gap: 2rem !important;
}
.widget-controls select {
    cursor: pointer;
    font-size: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}
.widget-controls select:focus {
    border-color: var(--accent);
}

/* ===== CUSTOM HELPERS & EXAMS UTILITIES ===== */
.hidden {
    display: none !important;
}

.question-inputs label.form-check-label:hover {
    border-color: var(--accent) !important;
    background: rgba(0, 137, 123, 0.02) !important;
}

/* ===== CATALOG GROUPING & LEARNING PATHS ===== */
.catalog-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem 0;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    flex-wrap: wrap;
}
.filters-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.filters-label svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}
.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}
.filter-pill:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
    border-color: rgba(255, 255, 255, 0.15);
}
.filter-pill.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Group Sections */
.group-section {
    margin-bottom: 3.5rem;
    animation: fadeIn 0.4s ease;
}
.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.6) 100%);
    border-left: 4px solid var(--accent);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.group-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 50%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}
.group-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.group-header h3 svg {
    color: var(--accent);
}
.group-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-left: 2.2rem;
}
.group-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.75rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    align-self: center;
}
.group-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}
.group-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Learning Sequence Badge */
.course-card {
    position: relative;
    padding-top: 10px; /* space for absolute positioned badge */
}
.learning-step-badge {
    position: absolute;
    top: -12px;
    left: 1.25rem;
    background: var(--purple-grad);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 10;
}
.learning-step-badge svg {
    width: 10px;
    height: 10px;
}

/* Prerequisite Warning & Badge */
.prereq-alert-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
}
.prereq-alert-badge.incomplete {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.prereq-alert-badge.incomplete svg {
    width: 14px;
    height: 14px;
    color: #ef4444;
    flex-shrink: 0;
}
.prereq-alert-badge.complete {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.prereq-alert-badge.complete svg {
    width: 14px;
    height: 14px;
    color: var(--success);
    flex-shrink: 0;
}

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

/* Sidebar Nav Badge Dot */
.nav-badge-dot {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--warning);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    display: inline-block;
    animation: navBadgePulse 2.5s infinite ease-in-out;
}

@keyframes navBadgePulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: translateY(-50%) scale(1.35);
        box-shadow: 0 0 16px rgba(245, 158, 11, 0.9);
    }
}

/* Premium Notification Bell & Dropdown Styles */
.topbar-notif-container {
    position: relative;
    display: inline-block;
}
.notif-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-secondary);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: badgeBounce 2s infinite ease-in-out;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownEntrance 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.notif-dropdown.show {
    display: flex;
}
.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.notif-badge-new {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    text-transform: none;
    font-weight: 600;
}
.notif-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.notif-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item:hover {
    background: rgba(255, 255, 255, 0.02);
}
.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-item-icon.color-warning { background: rgba(245, 158, 11, 0.12); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.notif-item-icon.color-danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.notif-item-icon.color-info { background: rgba(59, 130, 246, 0.12); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }

.notif-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}
.notif-item-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
.notif-empty-state {
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}
.notif-empty-state p {
    font-size: 0.8rem;
    font-weight: 500;
}
@keyframes dropdownEntrance {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.16); }
}

/* Sidebar nav notification badge dot */
.nav-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    margin-left: auto;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), 0 0 16px rgba(239, 68, 68, 0.3);
    animation: navBadgePulse 2s infinite ease-in-out;
    flex-shrink: 0;
}
@keyframes navBadgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
}
