/* ============================================================
   RehanSchool - Main Stylesheet
   Modern AI-Enabled Educational Platform
   ============================================================ */

/* ============================================================
   CSS Variables & Theme
   ============================================================ */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #059669;
    --secondary-dark: #047857;
    --accent: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #10b981;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-light: #f9fafb;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111827;

    --border: #e5e7eb;
    --border-light: #f3f4f6;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* ============================================================
   Main Content
   ============================================================ */
.main-content {
    flex: 1;
    padding-top: 70px;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 70px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand i { font-size: 1.75rem; }

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* User Dropdown */
.nav-user-dropdown {
    position: relative;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

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

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
}

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

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.dropdown-header strong {
    display: block;
    font-size: 0.95rem;
}

.dropdown-header small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

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

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
    line-height: 1.4;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

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

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    cursor: pointer;
    appearance: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================================
   Alerts
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    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;
}

/* ============================================================
   Auth Pages
   ============================================================ */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    color: var(--primary);
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Role Selector */
.role-selector {
    display: flex;
    gap: 12px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.role-card i {
    font-size: 2rem;
    color: var(--text-muted);
}

.role-option input:checked + .role-card {
    border-color: var(--primary);
    background: #eef2ff;
}

.role-option input:checked + .role-card i {
    color: var(--primary);
}

.role-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

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

/* Hero Illustration */
.hero-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
}

.hero-illustration i {
    color: var(--primary);
    opacity: 0.8;
}

.floating-card {
    position: absolute;
    background: var(--bg-primary);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    animation: float 3s ease-in-out infinite;
}

.floating-card i { color: var(--primary); font-size: 1rem; }

.card-1 { top: 20px; left: 20px; animation-delay: 0s; }
.card-2 { top: 40px; right: 20px; animation-delay: 0.5s; }
.card-3 { bottom: 40px; left: 40px; animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================================
   Sections
   ============================================================ */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

section {
    padding: 80px 0;
}

/* ============================================================
   Features Grid
   ============================================================ */
.features {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition-slow);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: #eef2ff;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================
   Categories
   ============================================================ */
.categories-section {
    background: var(--bg-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition-slow);
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    color: var(--text-primary);
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.category-card h3 {
    margin-bottom: 8px;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================================
   Course Cards
   ============================================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition-slow);
}

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

.course-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary-light);
    font-size: 3rem;
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.course-badge.free {
    background: #d1fae5;
    color: #065f46;
}

.course-badge.paid {
    background: #fef3c7;
    color: #92400e;
}

.course-level {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-body {
    padding: 20px;
}

.course-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.course-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-rating {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.course-rating i {
    color: var(--border);
}

.course-rating i.active {
    color: var(--accent);
}

/* ============================================================
   Testimonials
   ============================================================ */
.testimonials {
    background: var(--bg-primary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.testimonial-stars {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.testimonial-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-align: center;
}

.cta-content h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.cta-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cta-section .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.cta-section .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* ============================================================
   Page Banner
   ============================================================ */
.page-banner {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    margin-bottom: 8px;
}

.page-banner p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard {
    padding: 30px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.75rem;
}

.dashboard-header p {
    color: var(--text-secondary);
}

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

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

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

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

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

/* ============================================================
   Dashboard Grid
   ============================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

.section-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

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

.section-card-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Enrolled Courses List */
.enrolled-courses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.enrolled-course-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.enrolled-course-item:hover {
    background: var(--bg-secondary);
}

.enrolled-course-info {
    flex: 1;
}

.enrolled-course-info h3 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.enrolled-course-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.course-progress-circle {
    flex-shrink: 0;
}

/* Notifications */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: var(--transition);
}

.notification-item.unread {
    background: #eef2ff;
}

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

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.notification-icon.type-success { background: var(--success); }
.notification-icon.type-error { background: var(--danger); }
.notification-icon.type-warning { background: var(--warning); }
.notification-icon.type-info { background: var(--info); }

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
}

.notification-content small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.quick-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    border-color: var(--primary-light);
}

.quick-action-btn i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Assignment Items */
.assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

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

.assignment-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.assignment-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Quiz Results */
.quiz-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.quiz-result-score {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.quiz-result-score.passed {
    background: #d1fae5;
    color: #065f46;
}

.quiz-result-score.failed {
    background: #fee2e2;
    color: #991b1b;
}

.quiz-result-info h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.quiz-result-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Leaderboard Mini */
.leaderboard-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.leaderboard-item.current-user {
    background: #eef2ff;
}

.leaderboard-item .rank {
    font-weight: 800;
    color: var(--text-muted);
    width: 30px;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.leaderboard-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.leaderboard-item .points {
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================
   Course Detail Hero
   ============================================================ */
.course-detail-hero {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #fff;
    padding: 60px 0;
}

.course-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.course-breadcrumb {
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.course-breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.course-breadcrumb span {
    color: rgba(255,255,255,0.5);
    margin: 0 6px;
}

.course-detail-header h1 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.course-description {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.course-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.course-meta-list span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.course-meta-list i.active { color: var(--accent); }

.course-price-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.course-price-box .price {
    font-size: 2rem;
    font-weight: 800;
}

.course-price-box .price.free {
    color: #34d399;
}

.course-thumbnail-large img {
    width: 100%;
    border-radius: var(--radius-md);
}

.course-thumbnail-placeholder-lg {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
}

/* ============================================================
   Course Content Layout
   ============================================================ */
.course-content-section {
    background: var(--bg-secondary);
    padding: 60px 0;
}

.course-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.course-section {
    margin-bottom: 40px;
}

.course-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-description-full {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Curriculum Accordion */
.chapter-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: var(--bg-primary);
    transition: var(--transition);
}

.chapter-header:hover {
    background: var(--bg-tertiary);
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-info i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chapter-card.active .chapter-info i {
    transform: rotate(90deg);
}

.chapter-number {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.chapter-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.lesson-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chapter-lessons {
    display: none;
    border-top: 1px solid var(--border);
}

.chapter-card.active .chapter-lessons {
    display: block;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 52px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

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

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

.lesson-item i {
    color: var(--primary);
}

.lesson-duration {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructor-info {
    display: flex;
    gap: 16px;
}

.instructor-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.course-includes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.course-includes li i {
    color: var(--primary);
    width: 20px;
}

/* ============================================================
   Learning Page
   ============================================================ */
.learning-page {
    padding-top: 70px;
    height: calc(100vh - 70px);
}

.learning-container {
    display: flex;
    height: 100%;
}

.learning-sidebar {
    width: 320px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-course-info {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-course-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.sidebar-course-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.sidebar-curriculum {
    padding: 12px;
}

.curriculum-chapter {
    margin-bottom: 8px;
}

.curriculum-chapter-title {
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.curriculum-lessons {
    display: flex;
    flex-direction: column;
}

.lesson-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.lesson-link:hover {
    background: var(--bg-tertiary);
}

.lesson-link.active {
    background: #eef2ff;
    color: var(--primary);
    font-weight: 600;
}

.lesson-status i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lesson-status.completed i {
    color: var(--success);
}

.lesson-title {
    flex: 1;
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Learning Main */
.learning-main {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

.lesson-view h2 {
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 20px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1e1b4b;
    color: rgba(255,255,255,0.5);
    gap: 16px;
}

.lesson-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.lesson-notes {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: none;
}

.lesson-notes.show {
    display: block;
}

.lesson-notes h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lesson-notes .lesson-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.lesson-resources {
    margin-bottom: 24px;
}

.lesson-resources h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.resource-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
}

.resource-item i {
    font-size: 1.5rem;
    color: var(--danger);
}

.resource-item span {
    flex: 1;
    font-weight: 500;
}

.resource-size {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   About Page
   ============================================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    margin: 24px 0 12px;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-illustration {
    display: flex;
    justify-content: center;
    color: var(--primary-light);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.value-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.value-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    font-size: 1.5rem;
}

.value-card h3 {
    margin-bottom: 8px;
}

.value-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.team-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-box {
    padding: 40px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.contact-info-box h2 {
    margin-bottom: 16px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    gap: 16px;
}

.contact-item i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary);
    border-radius: var(--radius);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-form-box {
    padding: 40px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.contact-form-box h2 {
    margin-bottom: 24px;
}

/* ============================================================
   Blog
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

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

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary-light);
    font-size: 3rem;
}

.blog-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.blog-body {
    padding: 20px;
}

.blog-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.blog-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* Blog Post Full */
.blog-post-full {
    padding: 40px 0;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-post-image {
    margin-bottom: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-post-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   Courses Listing
   ============================================================ */
.courses-toolbar {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding-left: 40px;
}

.search-form select {
    min-width: 160px;
}

/* ============================================================
   Profile
   ============================================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.profile-card {
    text-align: center;
    padding: 30px;
}

.profile-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
}

.profile-card h2 {
    margin-bottom: 4px;
}

.profile-role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.photo-upload-form {
    margin-top: 16px;
}

/* ============================================================
   Leaderboard Full
   ============================================================ */
.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    padding: 40px 0;
}

.podium-item {
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-md);
    min-width: 160px;
}

.podium-item.rank-1 {
    order: 2;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    transform: scale(1.1);
}

.podium-item.rank-2 {
    order: 1;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

.podium-item.rank-3 {
    order: 3;
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

.podium-medal i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.podium-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 8px;
}

.podium-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.podium-points {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
}

/* Leaderboard Table */
.leaderboard-table {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.leaderboard-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.leaderboard-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr.current-user-row {
    background: #eef2ff;
}

.leaderboard-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-user-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.rank-cell {
    font-weight: 800;
    color: var(--text-muted);
}

.current-rank-banner {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.current-rank-banner strong {
    color: var(--primary);
    font-size: 1.3rem;
}

/* ============================================================
   Quizzes
   ============================================================ */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.quiz-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

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

.quiz-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quiz-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.quiz-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.quiz-best-score {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.quiz-best-score.passed {
    color: var(--success);
}

.quiz-best-score.failed {
    color: var(--danger);
}

/* Quiz Taking */
.quiz-info-bar {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quiz-info-bar i {
    margin-right: 6px;
}

.question-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.question-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    border-color: var(--primary);
    background: #f8f9ff;
}

.option input:checked + .option-text {
    color: var(--primary);
    font-weight: 600;
}

.option:has(input:checked) {
    border-color: var(--primary);
    background: #eef2ff;
}

.option-text {
    flex: 1;
}

/* Quiz Result */
.quiz-result-card {
    text-align: center;
    padding: 40px;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-icon.passed { color: var(--success); }
.result-icon.failed { color: var(--danger); }

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 24px 0;
}

.result-stat {
    display: flex;
    flex-direction: column;
}

.result-number {
    font-size: 1.5rem;
    font-weight: 800;
}

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

.review-list {
    text-align: left;
    margin: 24px 0;
}

.review-item {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    border-left: 4px solid;
}

.review-item.correct {
    border-color: var(--success);
    background: #f0fdf4;
}

.review-item.incorrect {
    border-color: var(--danger);
    background: #fef2f2;
}

.review-question {
    font-weight: 600;
    margin-bottom: 8px;
}

.review-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.correct-answer {
    color: var(--success);
    font-weight: 700;
}

.review-your-answer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   Assignments
   ============================================================ */
.assignment-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}

.assignment-header {
    margin-bottom: 12px;
}

.assignment-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.assignment-title h3 {
    margin-bottom: 0;
}

.course-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
}

.assignment-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.submission-status {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.feedback-text {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.assignment-submit-form {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ============================================================
   Forum
   ============================================================ */
.topic-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition);
}

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

.topic-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.topic-header {
    margin-bottom: 8px;
}

.topic-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topic-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.topic-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Topic Detail */
.topic-full {
    max-width: 800px;
    margin: 0 auto;
}

.topic-main {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 24px;
}

.topic-header-full h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.topic-content-full {
    margin-top: 20px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.reply-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.reply-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reply-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.reply-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reply-form {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

/* ============================================================
   Certificates
   ============================================================ */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.certificate-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

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

.certificate-badge i {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.certificate-card h3 {
    margin-bottom: 8px;
}

.certificate-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cert-code {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

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

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.results-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
}

.results-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-draft { background: #f3f4f6; color: #6b7280; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-archived { background: #f3f4f6; color: #6b7280; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-student { background: #dbeafe; color: #1e40af; }
.badge-teacher { background: #d1fae5; color: #065f46; }
.badge-admin { background: #fee2e2; color: #991b1b; }
.badge-online { background: #dbeafe; color: #1e40af; }
.badge-offline { background: #f3f4f6; color: #6b7280; }

/* ============================================================
   Modal
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

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

.modal-header h2 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
}

.modal-form, .modal .standard-form {
    padding: 24px;
}

/* ============================================================
   Filter Tabs
   ============================================================ */
.filter-tabs {
    display: flex;
    gap: 8px;
}

/* ============================================================
   Events
   ============================================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.event-card {
    display: flex;
    gap: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

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

.event-date-badge {
    text-align: center;
    min-width: 60px;
}

.event-month {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
}

.event-day {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.event-body h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.event-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.event-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   Announcements
   ============================================================ */
.announcement-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

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

.announcement-header h3 {
    font-size: 1.1rem;
}

.announcement-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.announcement-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   Messages (Admin)
   ============================================================ */
.message-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
}

.message-card.unread {
    border-left: 4px solid var(--primary);
    background: #f8f9ff;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-header strong {
    font-size: 0.95rem;
}

.message-card h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.message-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================
   Chatbot Widget
   ============================================================ */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chatbot-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 520px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chatbot-container.show {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--primary);
    color: #fff;
}

.chatbot-header i {
    font-size: 1.3rem;
}

.chatbot-header span {
    font-weight: 600;
    flex: 1;
}

.chatbot-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    max-width: 85%;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.bot .message-content {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.user .message-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.typing-indicator .message-content {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

.chatbot-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.chatbot-input input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: 0.85rem;
    outline: none;
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chatbot-input button:hover {
    background: var(--primary-dark);
}

/* ============================================================
   Curriculum Manager (Teacher)
   ============================================================ */
.chapter-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.chapter-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lesson-list {
    padding: 12px;
}

.lesson-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.lesson-item-row:hover {
    background: var(--bg-tertiary);
}

.lesson-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.lesson-info i {
    color: var(--primary);
    width: 16px;
}

.lesson-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lesson-actions-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ============================================================
   Submissions (Grading)
   ============================================================ */
.submission-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

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

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

.submission-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.submission-body p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.submission-grade {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.grade-form {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ============================================================
   Minitable
   ============================================================ */
.minitable {
    display: flex;
    flex-direction: column;
}

.minitable-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.minitable-row:last-child {
    border-bottom: none;
}

.minitable-row small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   Modals & Overrides
   ============================================================ */
.standard-form .btn {
    margin-top: 8px;
}

.form-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
}

/* ============================================================
   My Courses Grid
   ============================================================ */
.my-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.course-card.enrolled .course-thumbnail {
    position: relative;
}

.course-progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-tertiary);
}

.course-progress-overlay .progress-bar {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.course-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    margin-bottom: 16px;
    color: var(--border);
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 20px;
}

.empty-state.small {
    padding: 30px 20px;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.status-select {
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: #fff;
    padding-left: 4px;
}

.contact-info li {
    display: flex;
    gap: 10px;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.contact-info li i {
    color: var(--primary-light);
    margin-top: 4px;
    width: 16px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.85rem;
}

.footer-bottom p {
    color: rgba(255,255,255,0.4);
    margin: 0;
}

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

.footer-bottom-links a {
    color: rgba(255,255,255,0.4);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: #fff;
}
