/* public/css/main.css - INFORMA-X Core Design System & BK-Connect Modern App Layout */

/* =========================================================================
   1. DYNAMIC THEME SYSTEM TOKENS (LIGHT & DARK THEMES)
   ========================================================================= */

/* ☀️ AURORA LIGHT (DEFAULT CERAH MODERN & BERSIH) */
:root, [data-theme="aurora-light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-surface-glass: rgba(255, 255, 255, 0.96);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    --border-color: #e2e8f0;
    --border-hover: #6366f1;

    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-glow: rgba(79, 70, 229, 0.18);

    --accent-cyan: #0284c7;
    --accent-emerald: #059669;
    --accent-rose: #e11d48;
    --accent-purple: #7c3aed;
    --accent-amber: #d97706;

    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --sidebar-active-bg: #ede9fe;
    --sidebar-active-color: #4f46e5;

    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --modal-backdrop-bg: rgba(15, 23, 42, 0.65);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #ffffff;
}

/* 🌿 EMERALD OASIS (FRESH MINT EDU) */
[data-theme="emerald-light"] {
    --bg-base: #f0fdf4;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f0fdf4;
    --bg-surface-glass: rgba(255, 255, 255, 0.95);

    --text-main: #064e3b;
    --text-muted: #1e3a2f;
    --text-dim: #4b5563;

    --border-color: #a7f3d0;
    --border-hover: #059669;

    --primary: #059669;
    --primary-light: #10b981;
    --primary-glow: rgba(5, 150, 105, 0.2);

    --accent-cyan: #0891b2;
    --accent-emerald: #047857;
    --accent-rose: #dc2626;
    --accent-purple: #7e22ce;
    --accent-amber: #b45309;

    --sidebar-bg: #ffffff;
    --sidebar-border: #a7f3d0;
    --sidebar-active-bg: #d1fae5;
    --sidebar-active-color: #059669;

    --card-shadow: 0 4px 20px -2px rgba(6, 78, 59, 0.06);
    --modal-backdrop-bg: rgba(6, 78, 59, 0.65);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    --nav-bg: rgba(255, 255, 255, 0.96);
    --input-bg: #ffffff;
}

/* 🌅 SOLAR SUNSET (WARM CORAL & AMBER) */
[data-theme="sunset-warm"] {
    --bg-base: #fff7ed;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffedd5;
    --bg-surface-glass: rgba(255, 255, 255, 0.95);

    --text-main: #431407;
    --text-muted: #44403c;
    --text-dim: #78716c;

    --border-color: #fed7aa;
    --border-hover: #ea580c;

    --primary: #ea580c;
    --primary-light: #f97316;
    --primary-glow: rgba(234, 88, 12, 0.2);

    --accent-cyan: #0284c7;
    --accent-emerald: #16a34a;
    --accent-rose: #e11d48;
    --accent-purple: #9333ea;
    --accent-amber: #d97706;

    --sidebar-bg: #ffffff;
    --sidebar-border: #fed7aa;
    --sidebar-active-bg: #ffedd5;
    --sidebar-active-color: #ea580c;

    --card-shadow: 0 4px 20px -2px rgba(124, 45, 18, 0.06);
    --modal-backdrop-bg: rgba(67, 20, 7, 0.65);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.08) 0%, transparent 60%);
    --nav-bg: rgba(255, 255, 255, 0.96);
    --input-bg: #ffffff;
}

/* 🌌 CYBER DARK (SLEEK CYBERPUNK) */
[data-theme="cyber-dark"] {
    --bg-base: #0b0f19;
    --bg-surface: #131b2e;
    --bg-surface-elevated: #1a243d;
    --bg-surface-glass: rgba(19, 27, 46, 0.9);

    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;

    --border-color: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(99, 102, 241, 0.5);

    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.35);

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-purple: #a855f7;
    --accent-amber: #f59e0b;

    --sidebar-bg: #0d1322;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(99, 102, 241, 0.2);
    --sidebar-active-color: #a5b4fc;

    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --modal-backdrop-bg: rgba(4, 6, 12, 0.85);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    --nav-bg: rgba(11, 15, 25, 0.92);
    --input-bg: #0d1322;
}

/* 🔮 NEON SYNTH (HYPER VIOLET) */
[data-theme="neon-synth"] {
    --bg-base: #0f0b1e;
    --bg-surface: #191233;
    --bg-surface-elevated: #241a49;
    --bg-surface-glass: rgba(25, 18, 51, 0.9);

    --text-main: #faf5ff;
    --text-muted: #e9d5ff;
    --text-dim: #c084fc;

    --border-color: rgba(168, 85, 247, 0.25);
    --border-hover: #c084fc;

    --primary: #9333ea;
    --primary-light: #c084fc;
    --primary-glow: rgba(168, 85, 247, 0.4);

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-purple: #d946ef;
    --accent-amber: #fbbf24;

    --sidebar-bg: #140d2b;
    --sidebar-border: rgba(168, 85, 247, 0.2);
    --sidebar-active-bg: rgba(147, 51, 234, 0.25);
    --sidebar-active-color: #f0abfc;

    --card-shadow: 0 10px 35px -5px rgba(147, 51, 234, 0.35);
    --modal-backdrop-bg: rgba(15, 11, 30, 0.88);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(217, 70, 239, 0.2) 0%, transparent 60%);
    --nav-bg: rgba(15, 11, 30, 0.92);
    --input-bg: #140d2b;
}

/* 💎 AQUA FROST (CYAN TECH EDU / INFOGRAFIS STYLE) */
[data-theme="aqua-frost"] {
    --bg-base: #ebfaf8;
    --bg-surface: rgba(255, 255, 255, 0.94);
    --bg-surface-elevated: #dcf4f2;
    --bg-surface-glass: rgba(255, 255, 255, 0.92);

    --text-main: #083344;
    --text-muted: #155e75;
    --text-dim: #475569;

    --border-color: rgba(6, 182, 212, 0.35);
    --border-hover: #0891b2;

    --primary: #0891b2;
    --primary-light: #06b6d4;
    --primary-glow: rgba(8, 145, 178, 0.28);

    --accent-cyan: #06b6d4;
    --accent-emerald: #0d9488;
    --accent-rose: #f43f5e;
    --accent-purple: #6366f1;
    --accent-amber: #d97706;

    --sidebar-bg: rgba(255, 255, 255, 0.96);
    --sidebar-border: rgba(6, 182, 212, 0.28);
    --sidebar-active-bg: rgba(6, 182, 212, 0.15);
    --sidebar-active-color: #0891b2;

    --card-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.14), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
    --modal-backdrop-bg: rgba(8, 51, 68, 0.75);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.18) 0%, transparent 60%);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #ffffff;
}

/* 💎 AQUA FROST HIGH-TECH CIRCUIT & TECH GLOW BACKGROUND */
[data-theme="aqua-frost"] body {
    background-color: #ebfaf8;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(6, 182, 212, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(14, 165, 233, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.08) 0%, transparent 60%),
        radial-gradient(rgba(8, 145, 178, 0.16) 1.2px, transparent 1.2px),
        linear-gradient(to right, rgba(6, 182, 212, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px, 56px 56px, 56px 56px;
    background-attachment: fixed;
}

/* High-Tech Glassmorphism Card Panels */
[data-theme="aqua-frost"] .card,
[data-theme="aqua-frost"] .stat-card,
[data-theme="aqua-frost"] .analytics-metric-card,
[data-theme="aqua-frost"] .material-viewer,
[data-theme="aqua-frost"] .admin-theme-choice-card,
[data-theme="aqua-frost"] .modal-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

[data-theme="aqua-frost"] .card:hover,
[data-theme="aqua-frost"] .analytics-metric-card:hover,
[data-theme="aqua-frost"] .admin-theme-choice-card:hover {
    border-color: #06b6d4;
    box-shadow: 0 14px 38px -5px rgba(6, 182, 212, 0.24), 0 0 18px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

/* High-Tech Glowing Icon Boxes & Badges */
[data-theme="aqua-frost"] .sidebar-logo,
[data-theme="aqua-frost"] .rpg-avatar,
[data-theme="aqua-frost"] .metric-icon-box,
[data-theme="aqua-frost"] #preview-logo-box {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

[data-theme="aqua-frost"] .sidebar-item-icon {
    filter: drop-shadow(0 2px 6px rgba(6, 182, 212, 0.4));
    transition: transform var(--transition-fast);
}

[data-theme="aqua-frost"] .sidebar-item:hover .sidebar-item-icon {
    transform: scale(1.15);
}

[data-theme="aqua-frost"] .sidebar-item.active {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.18) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #0891b2;
    border-left: 4px solid #06b6d4;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.12);
}

[data-theme="aqua-frost"] .brand-badge {
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.4);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.15);
    font-weight: 800;
    letter-spacing: 0.5px;
}

[data-theme="aqua-frost"] .btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px -2px rgba(6, 182, 212, 0.45);
    color: #ffffff;
    font-weight: 700;
}

[data-theme="aqua-frost"] .btn-primary:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0369a1 100%);
    box-shadow: 0 8px 25px -2px rgba(6, 182, 212, 0.6), 0 0 14px rgba(6, 182, 212, 0.35);
    transform: translateY(-2px);
}

/* Base Design Tokens */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --font-arabic: 'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.arabic-text {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
    font-size: 1.35rem;
    line-height: 1.8;
}

.math-formula {
    font-family: 'KaTeX_Main', 'Times New Roman', serif;
    display: inline-block;
    vertical-align: middle;
}

/* =========================================================================
   2. GLOBAL BASE STYLES & RESET
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
}

p, span, div, li, td, th, label, input, button {
    color: inherit;
}

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

/* =========================================================================
   3. APP SHELL LAYOUT (BK-CONNECT STYLE)
   ========================================================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* SIDEBAR NAVIGATION */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 300;
    transition: transform var(--transition-smooth);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo img,
.landing-logo-icon img,
.nav-logo img,
#preview-logo-box img,
.app-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    border-radius: inherit;
    display: block;
}

.sidebar-brand h2 {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.sidebar-brand span {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* USER MINI PROFILE IN SIDEBAR */
.sidebar-user-card {
    margin: 1rem 1rem 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

/* SIDEBAR MENU LINKS */
.sidebar-menu {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.menu-category-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    margin: 0.85rem 0.75rem 0.35rem 0.75rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
    user-select: none;
}

.sidebar-item:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
}

.sidebar-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-color);
    font-weight: 700;
    border-color: rgba(79, 70, 229, 0.2);
}

.sidebar-item-icon {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* MAIN CONTENT AREA */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* TOP APPBAR */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-body {
    flex: 1;
    padding: 1.75rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Mobile Responsive */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 250;
    display: none;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-wrapper { margin-left: 0; }
    .content-body { padding: 1.25rem; }
    #btn-toggle-sidebar { display: inline-flex !important; }
}

/* =========================================================================
   4. CARDS & SURFACES
   ========================================================================= */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}

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

.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
    .grid-cols-4 { grid-template-columns: 1fr; }
}

/* =========================================================================
   5. BUTTONS & CONTROLS
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    text-decoration: none;
    outline: none;
    user-select: none;
    line-height: 1.2;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #ffffff !important;
}

.btn-cyan {
    background: var(--accent-cyan);
    color: #ffffff !important;
}

.btn-emerald {
    background: var(--accent-emerald);
    color: #ffffff !important;
}

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

.btn-outline:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

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

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 0.98rem;
    border-radius: var(--radius-md);
}

/* =========================================================================
   6. FORMS & INPUTS
   ========================================================================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.92rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* =========================================================================
   7. ROLES & PILLS & BADGES
   ========================================================================= */
.role-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.role-pill.student { background: rgba(2, 132, 199, 0.15); color: var(--accent-cyan); border: 1px solid rgba(2, 132, 199, 0.3); }
.role-pill.teacher { background: rgba(5, 150, 105, 0.15); color: var(--accent-emerald); border: 1px solid rgba(5, 150, 105, 0.3); }
.role-pill.admin { background: rgba(225, 29, 72, 0.15); color: var(--accent-rose); border: 1px solid rgba(225, 29, 72, 0.3); }

.brand-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.mini-badge.done {
    background: rgba(5, 150, 105, 0.15);
    color: var(--accent-emerald);
    border-color: rgba(5, 150, 105, 0.3);
}

.btn-badge-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1.5px dashed var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-badge-shortcut:hover {
    transform: translateY(-2px);
    border-style: solid;
    border-color: var(--primary);
    color: var(--primary-light);
    background: var(--bg-surface-elevated);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-badge-shortcut.done {
    background: rgba(5, 150, 105, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(5, 150, 105, 0.4);
}

.btn-badge-shortcut.done:hover {
    background: rgba(5, 150, 105, 0.22);
    border-color: var(--accent-emerald);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* =========================================================================
   8. TABS & DATA TABLES
   ========================================================================= */
.tabs-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-surface-elevated);
}

.tab-btn.active {
    color: #ffffff !important;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Learning Steps Tab Bar - Fully Visible & Responsive */
.learning-step-tabs-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
    width: 100% !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-surface-elevated, rgba(15, 23, 42, 0.5)) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    overflow-x: visible !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.learning-tab-pill {
    flex: 1 1 170px !important;
    min-width: 140px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    transition: all var(--transition-fast) !important;
    text-align: center !important;
    white-space: normal !important;
}

.learning-tab-pill:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.learning-tab-pill.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary, #4f46e5) 0%, var(--accent-cyan, #06b6d4) 100%) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35) !important;
}

.learning-tab-pill .tab-title {
    font-size: 0.88rem;
    line-height: 1.25;
}

@media (max-width: 768px) {
    .learning-step-tabs-bar {
        gap: 0.4rem !important;
        padding: 0.35rem !important;
    }
    .learning-tab-pill {
        flex: 1 1 calc(50% - 0.4rem) !important;
        min-width: 120px !important;
        padding: 0.5rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .learning-tab-pill {
        flex: 1 1 100% !important;
        justify-content: space-between !important;
        padding: 0.6rem 0.85rem !important;
    }
}

.analytics-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
    .analytics-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .analytics-metric-grid {
        grid-template-columns: 1fr;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    padding: 0.8rem 1rem;
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Sortable Table Headers */
th.th-sortable {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding-right: 1.6rem !important;
}

th.th-sortable:hover {
    background: rgba(99, 102, 241, 0.12) !important;
    color: var(--primary-light) !important;
}

th.th-sortable .th-sort-icon {
    display: inline-block;
    margin-left: 0.45rem;
    font-size: 0.82rem;
    line-height: 1;
    color: var(--text-muted);
    opacity: 0.4;
    transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    vertical-align: middle;
}

th.th-sortable:hover .th-sort-icon {
    opacity: 0.85;
    color: var(--primary-light);
}

th.th-sorted-asc {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--primary-light) !important;
}

th.th-sorted-asc .th-sort-icon {
    color: #38bdf8 !important; /* cyan-400 */
    opacity: 1 !important;
    font-weight: 900;
    transform: scale(1.15);
}

th.th-sorted-desc {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--accent-emerald) !important;
}

th.th-sorted-desc .th-sort-icon {
    color: #34d399 !important; /* emerald-400 */
    opacity: 1 !important;
    font-weight: 900;
    transform: scale(1.15);
}

.data-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

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

/* =========================================================================
   9. MODALS & TOASTS
   ========================================================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-backdrop-bg);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
}

#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: var(--text-main);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success { border-left: 4px solid var(--accent-emerald); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

/* =========================================================================
   10. TEACHER HUB & QUICK ACTION CARDS (USER-FRIENDLY REDESIGN)
   ========================================================================= */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.15rem;
    margin-bottom: 2rem;
}

.quick-action-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-action-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.12);
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--action-color, var(--primary));
    opacity: 0.8;
}

.quick-action-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--action-bg, rgba(99, 102, 241, 0.1));
    color: var(--action-color, var(--primary));
}

.quick-action-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.25rem 0;
}

.quick-action-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.teacher-hero-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.06));
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.session-wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .quick-action-grid {
        grid-template-columns: 1fr;
    }
    .teacher-hero-banner {
        padding: 1.25rem;
    }
}

/* =========================================================================
   11. CLASSROOM DISCUSSION & AI TUTOR CHAT (WITH AVATARS & TYPING INDICATOR)
   ========================================================================= */
.classroom-chat-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: 520px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.chat-header-bar {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chat-messages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.chat-msg-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    animation: fadeInMsg 0.25s ease-out;
}

.chat-msg-item.is-me {
    flex-direction: row-reverse;
}

.chat-msg-item.is-me .chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-msg-item.is-me .chat-msg-header {
    justify-content: flex-end;
}

.chat-msg-item.is-me .chat-msg-time {
    margin-left: 0;
    margin-right: 0.4rem;
}

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

.chat-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-avatar-circle.teacher {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #34d399;
}

.chat-avatar-circle.student {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border: 2px solid #818cf8;
}

.chat-avatar-circle.ai_bot {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: 2px solid #f472b6;
    animation: glowBot 3s infinite alternate;
}

@keyframes glowBot {
    from { box-shadow: 0 0 10px rgba(168, 85, 247, 0.4); }
    to { box-shadow: 0 0 20px rgba(236, 72, 153, 0.7); }
}

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

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.chat-msg-sender {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.chat-msg-time {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-left: auto;
}

.chat-bubble-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px 14px 14px 14px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
    max-width: 82%;
}

.chat-bubble-card.is-me {
    border-radius: 14px 4px 14px 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(99, 102, 241, 0.15));
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.12);
}

.chat-bubble-card.is-teacher {
    border-left: 4px solid var(--accent-emerald);
    background: rgba(16, 185, 129, 0.06);
}

.chat-bubble-card.is-ai {
    border-left: 4px solid var(--accent-purple);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.04));
}

/* Typing Indicator Animation */
.chat-typing-bar {
    padding: 0.4rem 1.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 28px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.typing-dot {
    width: 5px;
    height: 5px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-bar {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* =========================================================================
   12. CHAPTER ACCORDION (SPACE-SAVING COLLAPSIBLE CURRICULUM TREE)
   ========================================================================= */
.chapter-accordion-item {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chapter-accordion-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.chapter-accordion-item.is-open {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
}

.chapter-accordion-header {
    padding: 1.1rem 1.35rem;
    background: var(--bg-surface-elevated);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background var(--transition-fast);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chapter-accordion-header:hover {
    background: rgba(99, 102, 241, 0.06);
}

.chapter-accordion-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    font-size: 0.85rem;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.chapter-accordion-item.is-open .chapter-accordion-toggle-icon {
    transform: rotate(90deg);
    background: var(--primary);
    color: white;
}

.chapter-accordion-content {
    display: none;
    padding: 1.25rem 1.35rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    animation: slideDownAccordion 0.25s ease-out;
}

.chapter-accordion-item.is-open .chapter-accordion-content {
    display: block;
}

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

/* =========================================================================
   14. MODERN HIGH-TECH WELCOME & LANDING PAGE (INFORMA-X 2.0)
   ========================================================================= */

.landing-page-root {
    min-height: 100vh;
    background: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* Landing Top Navigation Bar */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.landing-header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.landing-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.landing-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text-main);
}

.landing-brand-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-nav-menu {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.landing-nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.landing-nav-link:hover {
    color: var(--primary);
}

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

/* Landing Hero Section */
.landing-hero-section {
    position: relative;
    padding: 5rem 1.5rem 4rem 1.5rem;
    overflow: hidden;
}

.landing-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.landing-hero-glow.glow-1 {
    width: 450px;
    height: 450px;
    top: -100px;
    left: -50px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
}

.landing-hero-glow.glow-2 {
    width: 400px;
    height: 400px;
    bottom: -50px;
    right: 0;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
}

.landing-hero-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-main-heading {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem 0;
    color: var(--text-main);
}

.hero-description {
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    max-width: 580px;
}

.hero-cta-group {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2.75rem;
}

.btn-hero-action {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.65rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.hero-stat-card {
    background: var(--bg-surface);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

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

.hero-stat-card .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.2rem;
}

/* Hero Right Visual Mockup */
.landing-hero-visual {
    position: relative;
}

.hero-mockup-card {
    background: #0f172a;
    color: #f8fafc;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
    overflow: hidden;
}

.mockup-header {
    background: #1e293b;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-dots {
    display: flex;
    gap: 0.4rem;
}

.mockup-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-title {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.mockup-badge {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    animation: pulseGlow 1.5s infinite;
}

.mockup-body {
    padding: 1.5rem;
}

.mockup-hero-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(6, 182, 212, 0.25));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.25rem;
}

.mockup-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.mockup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mockup-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mockup-item-icon {
    font-size: 1.3rem;
}

.mockup-item strong {
    display: block;
    font-size: 0.82rem;
    color: #f1f5f9;
}

.mockup-item small {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Landing Section General */
.landing-section {
    padding: 5rem 1.5rem;
}

.landing-section-container {
    max-width: 1240px;
    margin: 0 auto;
}

.section-header-center {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem auto;
}

.section-pill {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 0.75rem 0;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Arena PIN Quick Box */
.arena-pin-box {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.arena-pin-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #10b981, #06b6d4);
}

.arena-pin-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.pin-input-wrap {
    position: relative;
    min-width: 240px;
}

.pin-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

.pin-input {
    padding-left: 2.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-transform: uppercase;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-tech-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--card-shadow);
}

.feature-tech-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 32px -8px var(--primary-glow);
}

.feature-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--icon-bg);
    color: var(--icon-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 1.25rem;
}

.feature-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.65rem 0;
    color: var(--text-main);
}

.feature-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
}

.feature-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.feature-checklist li {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feature-checklist li span {
    color: #10b981;
    font-weight: 800;
}

/* Curriculum Preview Grid */
.curriculum-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.curriculum-preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.curr-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.curriculum-preview-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
}

.curriculum-preview-card p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
    flex: 1;
}

.curr-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    align-self: flex-start;
}

/* About School Card */
.about-school-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.75rem;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.about-logo-box {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.15));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Landing Footer */
.landing-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
}

.landing-footer-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* =========================================================================
   15. FLOATING AI TUTOR WIDGET & MOBILE RESPONSIVE ENGINE
   ========================================================================= */
.floating-ai-tutor-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 950;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ai-tutor-fab {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #ffffff !important;
    border-radius: 50px;
    padding: 0.75rem 1.35rem;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.45);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-ai-tutor-fab:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(168, 85, 247, 0.55);
}

.ai-fab-icon {
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
}

.ai-fab-text {
    font-size: 0.9rem;
    font-weight: 700;
}

.ai-chatbox-popup {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 360px;
    height: 480px;
    max-height: calc(100vh - 120px);
    padding: 0;
    border: 1px solid var(--accent-purple);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-surface);
    border-radius: 16px;
    z-index: 1000;
}

/* Grids & Two-Column Form Helpers */
.admin-settings-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 2rem;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Horizontal Scrollable Tabs on Mobile */
.scrollable-tabs-bar, .tabs-header {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollable-tabs-bar::-webkit-scrollbar, .tabs-header::-webkit-scrollbar {
    display: none;
}

/* Modal Responsive Container */
.modal-overlay, .modal-backdrop {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container, .modal-box, .modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-md);
}

/* =========================================================================
   16. COMPREHENSIVE MOBILE BREAKPOINTS (<= 768px & <= 480px)
   ========================================================================= */
@media (max-width: 1024px) {
    .landing-hero-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .features-grid, .curriculum-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Base typography & containers */
    body {
        font-size: 0.92rem;
    }

    .topbar {
        padding: 0 1rem;
    }

    .content-body {
        padding: 1rem 0.85rem !important;
    }

    .card {
        padding: 1.25rem 1rem !important;
    }

    /* Floating AI Tutor on Mobile: Transforms into sleek circular FAB */
    .floating-ai-tutor-widget {
        bottom: 16px !important;
        right: 14px !important;
    }

    .btn-ai-tutor-fab {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
    }

    .ai-fab-text {
        display: none !important; /* Hide label on mobile to avoid blocking content */
    }

    .ai-fab-icon {
        font-size: 1.45rem;
    }

    .ai-chatbox-popup {
        position: fixed !important;
        bottom: 74px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        height: 62vh !important;
        max-height: 500px !important;
    }

    /* Forms */
    .form-row-2col {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Modal Responsive on Gadgets */
    .modal-backdrop, .modal-overlay {
        padding: 0.5rem !important;
    }

    .modal-card, .modal-container, .modal-box, .modal-content {
        max-width: calc(100vw - 16px) !important;
        width: 100% !important;
        max-height: 94vh !important;
        padding: 1.25rem 1rem !important;
        border-radius: var(--radius-md) !important;
        margin: auto !important;
    }

    /* Responsive Tables */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0 !important;
    }

    /* Horizontal scroll for tabs */
    .tabs-header {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem !important;
        padding-bottom: 0.5rem;
    }

    .tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 0.55rem 0.85rem !important;
        font-size: 0.84rem !important;
    }

    /* Landing Page Mobile */
    .landing-nav-menu {
        display: none;
    }
    .hide-mobile {
        display: none;
    }
    .hero-main-heading {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }
    .hero-cta-group {
        flex-direction: column !important;
        width: 100%;
    }
    .btn-hero-action {
        width: 100% !important;
    }
    .hero-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .arena-pin-box {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
    }
    .arena-pin-form {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }
    .pin-input-wrap {
        width: 100%;
    }
    .features-grid, .curriculum-preview-grid {
        grid-template-columns: 1fr !important;
    }
    .about-school-card {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
        gap: 1.25rem;
    }
    .about-logo-box {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 480px) {
    .modal-card, .modal-container, .modal-box, .modal-content {
        padding: 1rem 0.75rem !important;
    }
    .hero-main-heading {
        font-size: 1.6rem !important;
    }
    .hero-stats-row {
        grid-template-columns: 1fr 1fr !important;
    }
    .btn-lg {
        padding: 0.7rem 1.2rem;
        font-size: 0.92rem;
    }
}

/* --- WORD IMPORT, EMBEDDED IMAGES, KATEX MATH & ARABIC SCRIPT SUPPORT --- */
.quiz-question-image-wrapper {
    margin: 0.85rem 0;
    text-align: center;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.quiz-embedded-img {
    max-width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, #334155);
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.quiz-embedded-img:hover {
    transform: scale(1.015);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Arabic Script RTL and Font Optimization */
[dir="rtl"],
.arabic-text {
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 1.18rem !important;
    line-height: 2.1 !important;
    letter-spacing: 0.02em;
    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

/* KaTeX Formulas Display in Quiz Cards */
.katex {
    font-size: 1.08em;
}

.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
    margin: 0.5rem 0;
}

.katex-display > .katex {
    text-align: center;
    white-space: nowrap;
}

/* Word Dropzone Styling */
#word-quiz-dropzone:hover {
    border-color: var(--accent-purple, #a855f7) !important;
    background: rgba(168, 85, 247, 0.08) !important;
}

/* ==========================================================================
   PROFESSIONAL MULTIMEDIA LEARNING MODULE STYLING
   ========================================================================== */
.material-rich-body {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text-main, #0f172a);
    word-break: break-word;
}

.material-rich-body h3 {
    font-size: 1.32rem;
    font-weight: 800;
    margin: 1.75rem 0 0.85rem 0;
    color: var(--text-main, #0f172a);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid var(--primary, #4f46e5);
    padding-left: 0.75rem;
}

.material-rich-body h4 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem 0;
    color: var(--text-main, #0f172a);
}

.material-rich-body p {
    margin: 0.85rem 0;
    color: var(--text-main, #1e293b);
}

.material-rich-body ul, .material-rich-body ol {
    margin: 0.85rem 0 1.25rem 1.5rem;
    padding-left: 0.5rem;
    color: var(--text-main, #1e293b);
}

.material-rich-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-main, #1e293b);
}

.material-rich-body li strong, .material-rich-body p strong {
    color: var(--text-main, #0f172a);
    font-weight: 700;
}

/* Callout Box Base */
.module-callout {
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--text-main, #0f172a);
}

.module-callout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.09);
}

.module-callout h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.08rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.module-callout p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-main, #1e293b);
}

.module-callout li {
    color: var(--text-main, #1e293b);
}

.module-callout strong {
    color: var(--text-main, #0f172a);
}

/* Callout Variants (Light Mode / Default) */
.module-callout.callout-concept {
    background: #f5f3ff;
    border-color: #c7d2fe;
    border-left: 5px solid #6366f1;
}
.module-callout.callout-concept h4 { color: #4338ca; }

.module-callout.callout-tip {
    background: #f0fdf4;
    border-color: #a7f3d0;
    border-left: 5px solid #10b981;
}
.module-callout.callout-tip h4 { color: #047857; }

.module-callout.callout-important {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 5px solid #f59e0b;
}
.module-callout.callout-important h4 { color: #b45309; }

.module-callout.callout-case {
    background: #faf5ff;
    border-color: #e9d5ff;
    border-left: 5px solid #a855f7;
}
.module-callout.callout-case h4 { color: #6b21a8; }

.module-callout.callout-reflection {
    background: #fdf2f8;
    border-color: #fbcfe8;
    border-left: 5px solid #ec4899;
}
.module-callout.callout-reflection h4 { color: #9d174d; }
.module-callout.callout-reflection ol {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    color: var(--text-main, #1e293b);
}
.module-callout.callout-reflection li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-main, #1e293b);
}

/* Dark Theme Overrides for Callouts */
[data-theme="cyber-dark"] .module-callout.callout-concept,
[data-theme="midnight-blue"] .module-callout.callout-concept,
[data-theme="dracula"] .module-callout.callout-concept {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}
[data-theme="cyber-dark"] .module-callout.callout-concept h4,
[data-theme="midnight-blue"] .module-callout.callout-concept h4,
[data-theme="dracula"] .module-callout.callout-concept h4 { color: #a5b4fc; }

[data-theme="cyber-dark"] .module-callout.callout-tip,
[data-theme="midnight-blue"] .module-callout.callout-tip,
[data-theme="dracula"] .module-callout.callout-tip {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}
[data-theme="cyber-dark"] .module-callout.callout-tip h4,
[data-theme="midnight-blue"] .module-callout.callout-tip h4,
[data-theme="dracula"] .module-callout.callout-tip h4 { color: #6ee7b7; }

[data-theme="cyber-dark"] .module-callout.callout-important,
[data-theme="midnight-blue"] .module-callout.callout-important,
[data-theme="dracula"] .module-callout.callout-important {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}
[data-theme="cyber-dark"] .module-callout.callout-important h4,
[data-theme="midnight-blue"] .module-callout.callout-important h4,
[data-theme="dracula"] .module-callout.callout-important h4 { color: #fcd34d; }

[data-theme="cyber-dark"] .module-callout.callout-case,
[data-theme="midnight-blue"] .module-callout.callout-case,
[data-theme="dracula"] .module-callout.callout-case {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
}
[data-theme="cyber-dark"] .module-callout.callout-case h4,
[data-theme="midnight-blue"] .module-callout.callout-case h4,
[data-theme="dracula"] .module-callout.callout-case h4 { color: #d8b4fe; }

[data-theme="cyber-dark"] .module-callout.callout-reflection,
[data-theme="midnight-blue"] .module-callout.callout-reflection,
[data-theme="dracula"] .module-callout.callout-reflection {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.4);
}
[data-theme="cyber-dark"] .module-callout.callout-reflection h4,
[data-theme="midnight-blue"] .module-callout.callout-reflection h4,
[data-theme="dracula"] .module-callout.callout-reflection h4 { color: #f472b6; }

/* Timeline & Video Map */
.module-timeline {
    background: var(--bg-surface-elevated, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.module-timeline h4 {
    margin: 0 0 0.85rem 0;
    color: var(--accent-cyan, #0284c7);
    font-size: 1.1rem;
    font-weight: 800;
}

.module-timeline ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.module-timeline li {
    position: relative;
    padding-left: 1.75rem;
    line-height: 1.5;
    font-size: 0.95rem;
    color: var(--text-main, #1e293b);
}

.module-timeline li::before {
    content: "▶";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary, #6366f1);
    font-size: 0.75rem;
}

.module-timeline li strong {
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 700;
    margin-right: 0.35rem;
}

[data-theme="cyber-dark"] .module-timeline li strong,
[data-theme="midnight-blue"] .module-timeline li strong,
[data-theme="dracula"] .module-timeline li strong {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Glossary Grid */
.module-glossary {
    background: var(--bg-surface-elevated, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.module-glossary h4 {
    margin: 0 0 1rem 0;
    color: var(--accent-purple, #6d28d9);
    font-size: 1.1rem;
    font-weight: 800;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.glossary-item {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-main, #1e293b);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.glossary-item strong {
    color: var(--primary, #4338ca);
    font-weight: 700;
    display: inline-block;
    margin-right: 0.25rem;
}
