/* ==========================================================================
   Education Algorithm — Executive & Modern EdTech Design System
   Typography: Plus Jakarta Sans (Brand & Headings) + Inter (Clean UI & Data)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Signature Brand Colors & Modern Slate Palette */
    --ink: #0f172a;
    --base: #f8fafc;
    --purple: #6366f1;
    --purple-hover: #4f46e5;
    --purple-light: #eef2ff;
    --purple-glow: rgba(99, 102, 241, 0.25);
    --coral: #f97316;
    --coral-hover: #ea580c;
    --coral-light: #fff7ed;
    --teal: #06b6d4;
    --teal-light: #ecfeff;
    --yellow: #f59e0b;
    --yellow-light: #fef3c7;
    --white: #ffffff;

    /* Semantic Mappings */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-dark: #0f172a;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #ffffff;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-glow: rgba(99, 102, 241, 0.22);

    --accent: #f97316;
    --accent-hover: #ea580c;

    --success: #10b981;
    --success-light: #ecfdf5;
    --success-text: #047857;

    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-text: #b45309;

    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-text: #b91c1c;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Layered Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 8px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-glow: 0 0 16px rgba(99, 102, 241, 0.2);
    --shadow-coral: 0 6px 14px rgba(249, 115, 22, 0.2);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

    --transition-bounce: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Smooth Theme Transitions & Dark Theme System
   ========================================================================== */
*, *::before, *::after {
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

[data-theme="dark"] {
    --bg-page: #060911;
    --bg-surface: #0e1526;
    --bg-subtle: #172033;
    --bg-dark: #030712;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border: #1e293b;
    --border-hover: #334155;
    
    --primary-light: rgba(99, 102, 241, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] body {
    background-color: #060911 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] .studio-title-wrap h2,
[data-theme="dark"] .greeting-title-block h1 {
    color: #ffffff !important;
}

[data-theme="dark"] p,
[data-theme="dark"] .studio-title-wrap p,
[data-theme="dark"] .greeting-title-block p {
    color: #94a3b8 !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .course-showcase-card,
[data-theme="dark"] .academic-standing-card,
[data-theme="dark"] .single-col-progress-deck,
[data-theme="dark"] .curriculum-sidebar-box,
[data-theme="dark"] .sticky-quiz-bar,
[data-theme="dark"] .question-card,
[data-theme="dark"] .module-accordion,
[data-theme="dark"] .module-accordion-card,
[data-theme="dark"] .clean-action-card,
[data-theme="dark"] .clean-action-card.live-card,
[data-theme="dark"] .clean-action-card.resume-card,
[data-theme="dark"] .metric-tile,
[data-theme="dark"] .curriculum-toolbar-box,
[data-theme="dark"] .curriculum-studio,
[data-theme="dark"] .resource-drawer-card,
[data-theme="dark"] .video-stage {
    background: #0e1526 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .academic-standing-card span,
[data-theme="dark"] .course-showcase-meta h2,
[data-theme="dark"] .metric-value,
[data-theme="dark"] .metric-label {
    color: #f8fafc !important;
}

[data-theme="dark"] .module-header {
    background: #0e1526 !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
}

[data-theme="dark"] .module-header:hover {
    background: #172033 !important;
}

[data-theme="dark"] .module-meta h3,
[data-theme="dark"] .module-meta h3 span,
[data-theme="dark"] .module-title-wrap h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .module-meta .module-subtext,
[data-theme="dark"] .module-meta .module-subtext span,
[data-theme="dark"] .module-title-wrap .module-meta {
    color: #94a3b8 !important;
}

[data-theme="dark"] .module-number {
    background: #1e1b4b !important;
    color: #818cf8 !important;
    border: 1px solid #4338ca !important;
}

[data-theme="dark"] .module-accordion.open .module-number {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .module-chevron {
    color: #94a3b8 !important;
}

[data-theme="dark"] .module-accordion.open .module-chevron {
    color: #818cf8 !important;
}

[data-theme="dark"] .module-body {
    background: #090d16 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .module-content {
    background: #090d16 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .module-desc-card {
    background: #172033 !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .lesson-row {
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .lesson-row:hover {
    background: #172033 !important;
}

[data-theme="dark"] .lesson-item {
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .lesson-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .module-select-filter,
[data-theme="dark"] .curriculum-search-box {
    background: #172033 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .type-filter-btn {
    background: #172033 !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .type-filter-btn.active {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .curr-pill {
    background: #172033 !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .curr-pill.active {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary {
    background: #172033 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}

[data-theme="dark"] .resource-drawer-tabs {
    background: #090d16 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .resource-item-row {
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .resource-item-row:hover,
[data-theme="dark"] .resource-item-row.active {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .ts-note-box {
    background: #090d16 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ts-note-item {
    background: #172033 !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .ts-note-item p {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .student-navbar {
    background: #0e1526 !important;
    border-color: #1e293b !important;
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

p, span, a, label, li {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Keyframe Animations */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 217, 192, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(0, 217, 192, 0); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes shimmerEffect {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* App Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 3.5rem;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    animation: fadeInDown 0.35s ease-out;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span.separator {
    color: #cbd5e1;
    font-size: 0.75rem;
}

/* Navbar - Ink Brand Header */
.student-navbar {
    background-color: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(20, 20, 43, 0.15);
    width: 100%;
}

.snav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
    position: relative;
}

.snav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.snav-brand:hover {
    transform: scale(1.01);
}

/* Animated Cyber Logo Mark */
.brand-logo-svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 6px rgba(108, 92, 231, 0.3));
    flex-shrink: 0;
}

.snav-brand:hover .brand-logo-svg,
.brand-logo:hover .brand-logo-svg {
    transform: rotate(-10deg) scale(1.12);
    filter: drop-shadow(0 4px 14px rgba(255, 107, 74, 0.5));
}

@keyframes pulseNode {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.25); }
}

.logo-node-pulse {
    animation: pulseNode 2.5s infinite ease-in-out;
    transform-origin: center;
}

.brand-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    background: rgba(108, 92, 231, 0.2);
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    align-self: center;
    flex-shrink: 0;
}

.snav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.snav-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.snav-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.snav-item.active {
    color: var(--white);
    background: rgba(108, 92, 231, 0.35);
    border: 1px solid rgba(108, 92, 231, 0.6);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.nav-badge {
    background: var(--coral);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px rgba(255, 107, 74, 0.4);
}

.snav-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.snav-notif-btn {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.snav-notif-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.snav-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ff6b4a;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff6b4a;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.32rem 0.8rem 0.32rem 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
    flex-shrink: 0;
}

.user-name-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.btn-logout {
    background: #271217;
    border: 1px solid #991b1b;
    color: #fca5a5;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-logout:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

/* 3-Lines Right Toggle Button */
.btn-drawer-toggle {
    background: #23224b;
    border: 1px solid #4f46e5;
    color: #ffffff;
    cursor: pointer;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.btn-drawer-toggle:hover {
    background: #3730a3;
    border-color: #6366f1;
    box-shadow: 0 0 14px rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
}

/* ==========================================================================
   Right-Side Slide-Out Drawer (Offcanvas Menu)
   ========================================================================== */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 20, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.right-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 88vw;
    background: #0d0d20;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.right-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.drawer-user-role {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: rotate(90deg);
}

.drawer-nav {
    flex: 1;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.drawer-section-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    padding: 0.4rem 0.5rem 0.2rem;
    text-transform: uppercase;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.drawer-link svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.drawer-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.drawer-link:hover svg {
    transform: scale(1.1);
}

.drawer-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.35), rgba(108, 92, 231, 0.15));
    border-color: rgba(108, 92, 231, 0.6);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
    font-weight: 600;
}

.drawer-link .nav-badge {
    margin-left: auto;
}

.drawer-footer {
    padding: 1.25rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-toggle {
    display: none;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.page-header-text h1 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.page-header-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Cards & Surfaces */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Helpdesk Ticket Items */
.ticket-item-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1.15rem;
    background: var(--bg-surface);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.ticket-item-card.open {
    background: #fffbf5;
    border-color: #fde68a;
}

.ticket-subject-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.ticket-meta-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
    margin-top: 0.2rem;
    line-height: 1.4;
}

.ticket-message-box {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0.75rem 0;
    white-space: pre-wrap;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Stats Metrics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.9rem;
    transition: var(--transition-bounce);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--purple);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon.indigo { background: var(--purple-light); color: var(--purple); }
.stat-icon.emerald { background: var(--success-light); color: var(--success); }
.stat-icon.amber { background: var(--yellow-light); color: var(--warning-text); }
.stat-icon.rose { background: var(--coral-light); color: var(--coral); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.1rem;
    letter-spacing: -0.01em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 2px 8px var(--purple-glow);
}

.btn-primary:hover {
    background: var(--purple-hover);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--coral);
    color: #fff;
    box-shadow: var(--shadow-coral);
}

.btn-accent:hover {
    background: var(--coral-hover);
    box-shadow: 0 6px 16px rgba(255, 107, 74, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--purple);
    color: var(--purple);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.38rem 0.75rem;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    box-sizing: border-box;
}

.badge.neutral { background: var(--bg-subtle); color: var(--purple); border: 1px solid var(--border); }
.badge.paid, .badge.approved { background: var(--success-light); color: var(--success-text); }
.badge.pending, .badge.submitted, .badge.open { background: var(--yellow-light); color: var(--warning-text); }
.badge.rejected { background: var(--danger-light); color: var(--danger-text); }

/* Form Controls */
.form-group {
    margin-bottom: 0.95rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 0.48rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.84rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    color: var(--text-primary);
    text-align: left;
}

th, td {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-primary);
}

tr:hover td {
    background: var(--bg-subtle);
}

/* Module Accordions */
.module-accordion {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.module-accordion.open {
    border-color: var(--purple);
    box-shadow: var(--shadow-md);
}

.module-header {
    padding: 0.95rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--bg-surface);
    transition: background 0.15s ease;
    user-select: none;
    gap: 0.85rem;
}

.module-header:hover {
    background: var(--bg-subtle);
}

.module-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.module-number {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    border-radius: 8px;
    background: var(--primary-light, #f3f0ff);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    box-shadow: 0 1px 2px rgba(108, 92, 231, 0.1);
    transition: all 0.2s ease;
}

.module-accordion.open .module-number {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.35);
}

.module-meta {
    flex: 1;
    min-width: 0;
}

.module-meta h3 {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
}

.module-meta .module-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.module-status-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.module-chevron {
    color: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-accordion.open .module-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.module-body {
    display: none;
    padding: 0.75rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    animation: fadeIn 0.2s ease-out;
}

.module-accordion.open .module-body {
    display: block;
}

.module-desc-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    transition: background 0.15s;
    border-radius: var(--radius-sm);
}

.lesson-row:hover {
    background: var(--bg-subtle);
}

/* Course Switcher & Dashboard Banners */
.live-batch-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.35rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.live-batch-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    border-left-color: var(--primary);
}

.live-batch-info-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 250px;
}

.live-batch-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.live-batch-text-block {
    flex: 1;
    min-width: 0;
}

.live-batch-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.live-batch-badge-row strong {
    font-size: 0.92rem;
    color: var(--text-primary);
    font-weight: 700;
}

.live-indicator-tag {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.live-batch-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.live-batch-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.resume-learning-card {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #fff;
    padding: 1.15rem 1.4rem;
    border-radius: var(--radius-lg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    transition: var(--transition-smooth);
}

.resume-learning-card:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.course-switcher-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.course-switcher-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.course-select-dropdown {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    max-width: 100%;
}

.curriculum-section {
    margin-top: 1rem;
}

.curriculum-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.curriculum-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quick Module Selector & Filter Bar */
/* Quick Module Selector & Filter Bar */
.curriculum-toolbar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.curriculum-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.curriculum-dropdown-filter {
    flex: 1;
    min-width: 240px;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.curriculum-dropdown-filter:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.curriculum-search-container {
    flex: 1;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.curriculum-search-container svg.curriculum-search-icon,
.curriculum-search-container svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 10;
    width: 16px;
    height: 16px;
}

input[type="text"].curriculum-search-input,
.curriculum-search-input {
    width: 100% !important;
    padding: 0.6rem 1rem 0.6rem 2.6rem !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    font-size: 0.88rem !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.curriculum-search-input:focus {
    border-color: var(--primary) !important;
    background: var(--bg-surface) !important;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15) !important;
}

/* Horizontal Smooth Module Category Pills */
.curriculum-pills-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.15rem 0 0.4rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.curriculum-pills-row::-webkit-scrollbar {
    display: none;
}

.curr-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.38rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    outline: none;
}

.curr-pill:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* Quiz Management Dedicated Responsive Classes */
.quiz-manage-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: var(--bg-surface);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.quiz-manage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

@media (max-width: 640px) {
    .quiz-manage-header {
        flex-direction: column;
        align-items: stretch;
    }
    .quiz-manage-header .btn-delete-quiz {
        align-self: flex-start;
        margin-top: 0.35rem;
    }
}

.quiz-manage-badge {
    display: inline-block;
    background: var(--bg-subtle);
    color: var(--primary);
    border: 1px solid var(--border);
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    box-sizing: border-box;
}

.quiz-question-row {
    padding: 0.75rem 0.95rem;
    border-radius: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    font-size: 0.88rem;
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 640px) {
    .quiz-question-row {
        flex-direction: column;
        gap: 0.6rem;
    }
    .quiz-question-row .delete-btn {
        align-self: flex-end;
    }
}
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
}

.curr-pill.active {
    background: linear-gradient(135deg, #6C5CE7, #4F46E5);
    border-color: #6C5CE7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

.curr-pill .pill-badge {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

.curr-pill.active .pill-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.module-status-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.chevron-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.module-accordion.open .chevron-icon {
    transform: rotate(180deg);
}

.lesson-list {
    display: flex;
    flex-direction: column;
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    gap: 0.75rem;
}

.lesson-item:hover {
    background: var(--bg-subtle);
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-size: 0.92rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.lesson-type-badge {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lesson-type-badge.video { background: var(--coral-light); color: var(--coral); }
.lesson-type-badge.note { background: var(--purple-light); color: var(--purple); }
.lesson-type-badge.code { background: var(--teal-light); color: #00897b; }

.completion-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.completion-check.completed {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.assessment-card {
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.assessment-card.quiz {
    background: #fffbeb;
    border-color: #fde68a;
}

.assessment-card.assignment {
    background: #fff7ed;
    border-color: #fed7aa;
}

[data-theme="dark"] .assessment-card.quiz {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .assessment-card.assignment {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.3);
}

[data-theme="dark"] .ticket-item-card.open {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
}

.lesson-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.lesson-icon.video { background: var(--coral-light); color: var(--coral); }
.lesson-icon.pdf { background: var(--purple-light); color: var(--purple); }
.lesson-icon.code { background: var(--teal-light); color: #00897b; }
.lesson-icon.quiz { background: var(--yellow-light); color: var(--warning-text); }
.lesson-icon.task { background: #e0e7ff; color: #4338ca; }

[data-theme="dark"] .lesson-icon.quiz {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .lesson-icon.video {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

[data-theme="dark"] .lesson-icon.pdf {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

[data-theme="dark"] .lesson-icon.code {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

[data-theme="dark"] .lesson-icon.task {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* Progress Bar */
.progress-container {
    width: 100%;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.progress-track {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple) 0%, var(--teal) 100%);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.success {
    background: var(--success);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInDown 0.3s ease;
}

.alert-success { background: var(--success-light); color: var(--success-text); border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-light); color: var(--danger-text); border: 1px solid #fecaca; }

/* Certificate View */
.cert-container {
    background: var(--bg-surface);
    border: 8px double #6C5CE7;
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.cert-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: rgba(108, 92, 231, 0.04);
    pointer-events: none;
}

.cert-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.cert-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.cert-recipient {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--ink);
    border-bottom: 2px solid var(--yellow);
    display: inline-block;
    padding: 0.2rem 1.5rem;
    margin: 1.25rem 0;
}

.cert-course {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 2.5rem;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.cert-sign-line {
    border-top: 1px solid #14142B;
    padding-top: 0.5rem;
    width: 180px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Modern Responsive Rules */
@media (max-width: 900px) {
    .module-quick-selector-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .module-search-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14.5px;
    }
    .app-container {
        padding: 0.85rem 0.85rem 2.5rem;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .page-header-text h1 {
        font-size: 1.25rem;
        line-height: 1.25;
    }
    .page-header-text p {
        font-size: 0.8rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        margin-bottom: 1rem;
    }
    .stat-card {
        padding: 0.75rem 0.85rem;
        gap: 0.6rem;
        border-radius: var(--radius-md);
    }
    .stat-icon {
        width: 32px;
        height: 32px;
    }
    .stat-icon svg {
        width: 16px;
        height: 16px;
    }
    .stat-label {
        font-size: 0.65rem;
    }
    .stat-value {
        font-size: 1.15rem;
    }
    .card {
        padding: 0.85rem 1rem;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }
    .card-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .card-header h2 {
        font-size: 1rem;
    }
    .course-switcher-bar {
        padding: 0.75rem 0.9rem;
        margin-bottom: 0.85rem;
        gap: 0.65rem;
    }
    .course-switcher-left {
        gap: 0.65rem;
    }
    .course-switcher-left svg {
        width: 18px;
        height: 18px;
    }
    .course-select-dropdown {
        padding: 0.4rem 0.7rem;
        font-size: 0.82rem;
    }
    .curriculum-section {
        margin-top: 1.25rem;
    }
    .curriculum-header-bar {
        margin-bottom: 0.65rem;
        gap: 0.5rem;
    }
    .curriculum-header-bar h2 {
        font-size: 1.15rem;
    }
    .curriculum-header-bar p {
        font-size: 0.78rem !important;
    }
    .curriculum-controls {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    .curriculum-controls .btn {
        flex: 1;
        padding: 0.35rem 0.5rem;
        font-size: 0.78rem;
    }
    .curriculum-toolbar-card {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.85rem;
        gap: 0.65rem;
    }
    .curriculum-filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .curriculum-dropdown-filter {
        width: 100%;
        min-width: 0;
        padding: 0.45rem 0.7rem;
        font-size: 0.82rem;
    }
    .curriculum-search-container {
        width: 100%;
        min-width: 0;
    }
    .curriculum-search-input {
        font-size: 0.82rem !important;
        padding: 0.48rem 0.75rem 0.48rem 2.3rem !important;
    }
    .curriculum-pills-row {
        gap: 0.4rem;
        padding-bottom: 0.15rem;
    }
    .curr-pill {
        padding: 0.3rem 0.65rem;
        font-size: 0.76rem;
    }
    .curr-pill .pill-badge {
        width: 16px;
        height: 16px;
        font-size: 0.68rem;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    table {
        min-width: 500px;
    }
    th, td {
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }
    .module-accordion {
        margin-bottom: 0.65rem;
        border-radius: var(--radius-md);
    }
    .module-header {
        padding: 0.75rem 0.85rem;
        gap: 0.6rem;
        min-height: 44px;
    }
    .module-number {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    .module-meta h3 {
        font-size: 0.88rem;
        line-height: 1.3;
    }
    .module-meta p {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .module-status-group {
        gap: 0.4rem;
    }
    .module-status-group .badge {
        font-size: 0.68rem;
        padding: 0.15rem 0.45rem;
    }
    .module-body {
        padding: 0.25rem 0.65rem 0.75rem;
    }
    .lesson-item {
        padding: 0.55rem 0.45rem;
        gap: 0.5rem;
        margin-bottom: 0.25rem;
    }
    .lesson-type-badge {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .lesson-type-badge svg {
        width: 13px;
        height: 13px;
    }
    .lesson-title {
        font-size: 0.82rem;
        line-height: 1.35;
    }
    .completion-check {
        width: 20px;
        height: 20px;
        font-size: 0.72rem;
    }
    .assessment-card {
        padding: 0.75rem 0.85rem;
        margin-top: 0.65rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        border-radius: var(--radius-md);
    }
    .assessment-card h4 {
        font-size: 0.88rem;
    }
    .assessment-card p {
        font-size: 0.76rem;
    }
    .assessment-card .btn {
        width: 100%;
        justify-content: center;
        padding: 0.4rem 0.75rem;
        font-size: 0.78rem;
    }

    /* Certificate Mobile Scaling */
    .cert-container {
        padding: 1.75rem 1rem;
        border-width: 3px;
    }
    .cert-watermark {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }
    .cert-title {
        font-size: 1.35rem;
    }
    .cert-recipient {
        font-size: clamp(1.1rem, 4.5vw, 1.5rem);
        padding: 0.2rem 0.6rem;
        margin: 0.75rem 0;
    }
    .cert-course {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    .cert-footer {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }
    .cert-sign-line {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    .app-container {
        padding: 0.65rem 0.65rem 2rem;
    }
    .snav-brand {
        font-size: 0.95rem;
        gap: 0.45rem;
    }
    .brand-badge {
        display: none;
    }
    .snav-container {
        padding: 0.55rem 0.75rem;
    }
    .snav-right {
        gap: 0.45rem;
    }
    .btn-drawer-toggle {
        padding: 0.38rem 0.6rem;
        gap: 0.35rem;
        font-size: 0.8rem;
    }
    .snav-notif-btn {
        padding: 0.38rem 0.48rem;
    }
    .page-header-text h1 {
        font-size: 1.15rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.45rem;
        margin-bottom: 0.75rem;
    }
    .stat-card {
        padding: 0.55rem 0.65rem;
        gap: 0.45rem;
    }
    .stat-icon {
        width: 28px;
        height: 28px;
    }
    .stat-value {
        font-size: 1.05rem;
    }
}

@media print {
    .no-print, nav, .site-nav, .student-navbar, .page-header, .btn, .chatbot-widget {
        display: none !important;
    }
    body {
        background: #fff;
        padding: 0;
    }
    .app-container {
        padding: 0;
        max-width: 100%;
    }
    .cert-container {
        box-shadow: none;
        border: 4px double #6C5CE7;
        margin: 0 auto;
    }
}

/* Admin Portal Mobile Responsiveness Enhancements */
@media (max-width: 768px) {
    .admin-app-wrapper .app-container {
        padding: 1rem 0.75rem 3rem !important;
    }
    .admin-grid-cards {
        grid-template-columns: 1fr !important;
    }
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
}

/* CLEAN FILE INPUT STYLING (MATCHING NATIVE ADMIN UI) */
input[type="file"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    padding: 0.35rem 0.55rem !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.84rem;
}
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.85rem !important;
    margin-right: 0.85rem !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25) !important;
}
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: #4338ca !important;
}
