/**
 * Multi-School Online Quiz & Learning Platform
 * Master Design System & Component Stylesheet
 * Compatible with Apache + PHP 8+ Shared Hosting (Hostinger)
 */

/* -------------------------------------------------------------
   1. GLOBAL DESIGN TOKENS & CSS VARIABLES
   ------------------------------------------------------------- */
:root {
    /* Educational Color System */
    --primary: #0f4c81;            /* Classic Academic Navy */
    --primary-dark: #092c4c;       /* Deep Navy */
    --primary-light: #1e6bb8;      /* Bright Royal Blue */
    --primary-subtle: #eff6ff;     /* Tinted Blue Background */
    
    --secondary: #0d9488;          /* Academic Teal */
    --secondary-dark: #0f766e;     /* Deep Teal */
    --secondary-light: #14b8a6;    /* Bright Teal */
    --secondary-subtle: #f0fdfa;   /* Tinted Teal Background */
    
    --accent: #f59e0b;             /* Amber Gold */
    --accent-dark: #d97706;
    --accent-subtle: #fffbeb;
    
    /* Semantic Status Colors */
    --success: #10b981;            /* Emerald Green (Passed / Active / Completed) */
    --success-subtle: #ecfdf5;
    --warning: #f59e0b;            /* Amber (Pending / Attention) */
    --warning-subtle: #fffbeb;
    --danger: #ef4444;             /* Crimson Red (Failed / Inactive / Delete) */
    --danger-subtle: #fef2f2;
    --info: #3b82f6;               /* Sky Blue (Information / General) */
    --info-subtle: #eff6ff;
    --purple: #8b5cf6;             /* Purple (Review / Flagged) */
    --purple-subtle: #f5f3ff;
    
    /* Neutral Palette */
    --bg-main: #f8fafc;            /* Clean Slate Gray */
    --surface: #ffffff;            /* Pure Card White */
    --surface-hover: #f1f5f9;
    --text-main: #0f172a;          /* Charcoal 900 */
    --text-muted: #64748b;         /* Slate 500 */
    --text-light: #94a3b8;         /* Slate 400 */
    --border-color: #e2e8f0;       /* Slate 200 */
    --border-subtle: #f1f5f9;
    
    /* Layout Dimensions */
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 76px;
    --topbar-height: 64px;
    --touch-min: 44px;             /* Minimum touch target size */
    
    /* Spacing & Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* -------------------------------------------------------------
   2. TYPOGRAPHY & MULTILINGUAL UNICODE FIDELITY
   ------------------------------------------------------------- */
body {
    font-family: 'Inter', 'Noto Sans', 'Noto Sans Devanagari', 'Noto Sans Oriya', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Unicode word wrapping for Odia, Hindi, Sanskrit & English */
h1, h2, h3, h4, h5, h6, p, span, div, td, th, label, .quiz-question-text, .quiz-option-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

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

/* -------------------------------------------------------------
   3. UNIFIED CARDS & CONTAINERS
   ------------------------------------------------------------- */
.custom-card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header-clean {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* KPI Stat Cards */
.admin-stat-card, .stat-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

/* -------------------------------------------------------------
   4. BUTTONS & TOUCH INTERACTION
   ------------------------------------------------------------- */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.925rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: all 0.18s ease-in-out;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.825rem;
    border-radius: 5px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

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

.btn-teal:hover, .btn-teal:focus {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #ffffff;
}

.btn-outline-teal {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline-teal:hover, .btn-outline-teal:focus {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #ffffff;
}

.btn-purple {
    background-color: var(--purple);
    border-color: var(--purple);
    color: #ffffff;
}

.btn-purple:hover, .btn-purple:focus {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
}

.btn-outline-purple {
    color: var(--purple);
    border-color: var(--purple);
}

.btn-outline-purple:hover, .btn-outline-purple:focus {
    background-color: var(--purple);
    border-color: var(--purple);
    color: #ffffff;
}

/* Quiz Question Header & Review Button Responsive Controls */
.quiz-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#btnMarkReview,
#btnMarkReview * {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

#btnMarkReview {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .quiz-question-header #qNumberBadge {
        font-size: 0.85rem !important;
        padding: 0.35rem 0.65rem !important;
    }
    .quiz-question-header #qMarksBadge {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.55rem !important;
    }
    #btnMarkReview {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.825rem !important;
    }
}

.text-teal { color: var(--secondary) !important; }
.bg-teal { background-color: var(--secondary) !important; }
.text-purple { color: var(--purple) !important; }
.bg-purple { background-color: var(--purple) !important; }

/* -------------------------------------------------------------
   5. UNIFIED TABLE DESIGN & MOBILE RESPONSIVENESS
   ------------------------------------------------------------- */
.table-custom {
    margin-bottom: 0;
}

.table-custom thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* -------------------------------------------------------------
   6. FORMS & INPUT CONTROLS
   ------------------------------------------------------------- */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.required-star {
    color: var(--danger);
    font-weight: bold;
    margin-left: 2px;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.925rem;
    color: var(--text-main);
    background-color: var(--surface);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
    outline: 0;
}

.form-control-sm, .form-select-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.input-group-text {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* -------------------------------------------------------------
   7. STATUS BADGES & PILLS
   ------------------------------------------------------------- */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    font-size: 0.775rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.badge-pill-soft {
    border-radius: var(--radius-pill);
    padding: 0.25em 0.75em;
}

/* -------------------------------------------------------------
   8. BREADCRUMBS
   ------------------------------------------------------------- */
.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-custom .breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 600;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.1rem;
    line-height: 0.8;
    color: var(--text-light);
}

/* -------------------------------------------------------------
   9. GLOBAL PUBLIC HEADER & NAVIGATION
   ------------------------------------------------------------- */
.navbar-custom {
    background: linear-gradient(135deg, #092c4c 0%, #0f4c81 52%, #0d9488 100%);
    box-shadow: 0 2px 10px rgba(9, 44, 76, 0.16);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.school-header-logo {
    object-fit: contain;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: #ffffff;
}

.navbar-brand:hover .school-header-logo {
    transform: scale(1.04);
}

.brand-title {
    font-weight: 700;
    line-height: 1.15;
}

.brand-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.2px;
    font-weight: 400;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.45rem 0.95rem !important;
    border-radius: var(--radius-pill);
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.navbar-custom .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.18);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* -------------------------------------------------------------
   10. ADMIN PANEL LAYOUT & SIDEBAR (DESKTOP MINI + HOVER EXPAND)
   ------------------------------------------------------------- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

.admin-sidebar {
    width: var(--sidebar-collapsed-width);
    background: linear-gradient(180deg, #091e3a 0%, #0f2b4c 100%);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    overflow-x: hidden;
    white-space: nowrap;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: var(--topbar-height);
    transition: padding 0.25s ease;
}

.sidebar-brand {
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    text-decoration: none;
    overflow: hidden;
    flex-grow: 1;
}

.sidebar-brand-logo {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-brand-text {
    opacity: 0;
    width: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, width 0.25s ease;
    margin-left: 0;
}

.sidebar-section-title {
    font-size: 0.675rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
    padding: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, height 0.2s ease, padding 0.2s ease;
}

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0.4rem;
    margin: 0;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease, padding 0.2s ease;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link i {
    font-size: 1.25rem;
    color: #94a3b8;
    width: 100%;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, margin 0.2s ease;
}

.sidebar-link span {
    opacity: 0;
    width: 0;
    max-width: 0;
    overflow: hidden;
    display: inline-block;
    transition: opacity 0.2s ease, width 0.25s ease;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link:hover i {
    color: #38bdf8;
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488 0%, #0f766e 100%);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Desktop Hover Expansion (screens >= 992px) */
@media (min-width: 992px) {
    .admin-sidebar:hover {
        width: var(--sidebar-width);
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.28);
    }

    .admin-sidebar:hover .sidebar-brand-text {
        opacity: 1;
        width: auto;
        max-width: 180px;
        margin-left: 0.5rem;
    }

    .admin-sidebar:hover .sidebar-section-title {
        opacity: 1;
        height: auto;
        padding: 0.85rem 0.85rem 0.35rem;
    }

    .admin-sidebar:hover .sidebar-nav {
        padding: 0.5rem 0.65rem;
    }

    .admin-sidebar:hover .sidebar-link {
        padding: 0.6rem 0.85rem;
    }

    .admin-sidebar:hover .sidebar-link i {
        width: 22px;
        min-width: 22px;
        margin-right: 0.75rem;
    }

    .admin-sidebar:hover .sidebar-link span {
        opacity: 1;
        width: auto;
        max-width: 180px;
    }
}

.admin-main {
    flex-grow: 1;
    margin-left: var(--sidebar-collapsed-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-topbar {
    height: var(--topbar-height);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-xs);
}

.admin-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 1045;
}

/* -------------------------------------------------------------
   11. STUDENT EXAMINATION ENGINE UI (HIGHEST PRIORITY)
   ------------------------------------------------------------- */
.quiz-top-bar {
    background: var(--surface);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
}

.timer-badge {
    font-family: 'Inter', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-sm);
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-warning {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #f87171 !important;
    animation: timerPulse 1s infinite alternate;
}

@keyframes timerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.03); }
}

/* Option Cards A, B, C, D */
.quiz-option-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    position: relative;
    min-height: 60px;
}

.quiz-option-card:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.quiz-option-card.active {
    border-color: var(--secondary);
    background-color: var(--secondary-subtle);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.quiz-option-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    transition: all 0.18s ease;
}

.quiz-option-card.active .quiz-option-badge {
    background-color: var(--secondary);
    color: #ffffff;
    border-color: var(--secondary);
}

.quiz-option-text {
    flex-grow: 1;
    font-size: 1.025rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* Palette Navigator Buttons */
.palette-btn {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--border-color);
}

.palette-btn:hover {
    transform: scale(1.08);
}

.palette-btn.current {
    border: 2px solid #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35);
}

/* -------------------------------------------------------------
   12. EMPTY STATES & TOAST NOTIFICATIONS
   ------------------------------------------------------------- */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: inline-block;
}

.empty-state-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.925rem;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

/* Toast styling */
.toast-custom {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------------
   13. HOME / LANDING PAGE DESIGN SYSTEM
   ------------------------------------------------------------- */
.hero-section {
    background: radial-gradient(120% 120% at 50% 5%, #f0f7ff 0%, #f8fafc 55%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle background academic decorative geometry (CSS-only) */
.hero-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -100px;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.05) 0%, rgba(15, 76, 129, 0) 70%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 76, 129, 0.04) 0%, rgba(13, 148, 136, 0) 70%);
    pointer-events: none;
}

.hero-badge, .badge-odisha {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 1px 3px rgba(15, 76, 129, 0.06);
}

.hero-title {
    color: #091e3a;
    font-size: clamp(2.15rem, 4.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    color: #475569;
    font-size: clamp(1.025rem, 1.8vw, 1.18rem);
    line-height: 1.65;
    max-width: 630px;
}

/* Hero CTA Buttons */
.hero-btn-primary {
    background-color: var(--primary);
    border: 2px solid var(--primary);
    color: #ffffff !important;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    font-size: 1.025rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(15, 76, 129, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hero-btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.35);
}

.hero-btn-secondary {
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    color: var(--primary) !important;
    padding: 0.75rem 1.65rem;
    font-weight: 700;
    font-size: 1.025rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.hero-btn-secondary:hover {
    border-color: var(--primary);
    background-color: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.12);
}

.hero-btn-teal {
    background-color: var(--secondary);
    border: 2px solid var(--secondary);
    color: #ffffff !important;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    font-size: 1.025rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hero-btn-teal:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

.hero-btn-dark {
    background-color: #091e3a;
    border: 2px solid #091e3a;
    color: #ffffff !important;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    font-size: 1.025rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(9, 30, 58, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hero-btn-dark:hover {
    background-color: #0f2b4c;
    border-color: #0f2b4c;
    transform: translateY(-2px);
}

/* Right-side Supported Standards Card (Fixed High-Contrast & Polished Appearance) */
.hero-standards-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.85rem;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    position: relative;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-standards-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -6px rgba(15, 23, 42, 0.12);
}

.hero-standards-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.15rem;
    border: 1px solid #dbeafe;
}

.hero-standards-title {
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.academic-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: var(--primary);
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease;
}

.academic-chip:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--primary-dark);
}

.hero-standards-meta {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    margin-top: 1rem;
    line-height: 1.45;
}

/* Section 15: Select Your Portal */
.section-title {
    color: #091e3a;
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #64748b;
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
}

.portal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    border-color: #cbd5e1;
}

.portal-icon-container {
    width: 66px;
    height: 66px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.95rem;
    margin: 0 auto 1.5rem;
    transition: transform 0.2s ease;
}

.portal-card:hover .portal-icon-container {
    transform: scale(1.06);
}

.portal-icon-student {
    background-color: #eff6ff;
    color: var(--primary);
    border: 1px solid #dbeafe;
}

.portal-icon-teacher {
    background-color: #f0fdfa;
    color: var(--secondary);
    border: 1px solid #ccfbf1;
}

.portal-icon-admin {
    background-color: #f8fafc;
    color: #092c4c;
    border: 1px solid #e2e8f0;
}

.portal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.portal-desc {
    color: #64748b;
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.portal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
}

/* Feature Highlights Strip */
.features-section {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4.5rem 0;
}

.feature-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.85rem 1.65rem;
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
}

.feature-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    flex-shrink: 0;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.feature-desc {
    color: #64748b;
    font-size: 0.885rem;
    line-height: 1.55;
    margin-bottom: 0;
}

/* -------------------------------------------------------------
   14. FOOTER
   ------------------------------------------------------------- */
footer {
    background: linear-gradient(180deg, #091e3a 0%, #061527 100%);
    color: #94a3b8;
    padding: 2.75rem 0 2.25rem;
    margin-top: 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer a {
    color: #cbd5e1;
}

footer a:hover {
    color: #ffffff;
}

/* -------------------------------------------------------------
   14. MOBILE & RESPONSIVE BREAKPOINTS (320px - 1440px)
   ------------------------------------------------------------- */
@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .admin-sidebar {
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        z-index: 1050;
        box-shadow: none;
    }

    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.45);
    }

    .admin-sidebar .sidebar-brand-text {
        opacity: 1;
        width: auto;
        max-width: none;
        margin-left: 0.5rem;
    }

    .admin-sidebar .sidebar-section-title {
        opacity: 1;
        height: auto;
        padding: 0.85rem 0.85rem 0.35rem;
    }

    .admin-sidebar .sidebar-nav {
        padding: 0.5rem 0.65rem;
    }

    .admin-sidebar .sidebar-link {
        padding: 0.65rem 0.85rem;
    }

    .admin-sidebar .sidebar-link i {
        width: 24px;
        min-width: 24px;
        margin-right: 0.75rem;
    }

    .admin-sidebar .sidebar-link span {
        opacity: 1;
        width: auto;
        max-width: none;
    }

    .sidebar-overlay {
        display: none;
        opacity: 0;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        transition: opacity 0.25s ease;
    }

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    .admin-main {
        margin-left: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .admin-content {
        padding: 1rem;
    }
    
    .timer-badge {
        font-size: 1.15rem;
        padding: 0.3rem 0.65rem;
    }

    .quiz-option-card {
        padding: 0.85rem 1rem;
    }

    .palette-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .timer-badge {
        font-size: 1.05rem;
    }
}
