/* ─── Cher's LLC LMS - Design System (matches Registration App) ─── */

:root {
    --primary: #5b7fc7;
    --primary-dark: #3b5998;
    --primary-light: #93b4e8;
    --accent: #7ba3d8;
    --success: #22c55e;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #fbbf24;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border: rgba(147, 180, 232, 0.4);
    --input-border: #cbd5e1;
}

/* ─── Base ─── */

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: #f8faff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 560'%3E%3Cpath fill='none' stroke='%2393b4e8' stroke-width='2.5' d='M0 300 Q360 200 720 300 T1440 300'/%3E%3Cpath fill='none' stroke='%2393b4e8' stroke-width='2' stroke-opacity='0.6' d='M0 350 Q360 250 720 350 T1440 350'/%3E%3Cpath fill='none' stroke='%2393b4e8' stroke-width='2' stroke-opacity='0.4' d='M0 250 Q360 150 720 250 T1440 250'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ─── Navbar ─── */

.navbar {
    background: linear-gradient(135deg, #3b5998, #5b7fc7) !important;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.navbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* ─── Dashboard Sidebar Layout ─── */

.dashboard-shell {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 270px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(91, 127, 199, 0.1);
    padding: 1rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, transform 0.25s ease, padding 0.25s ease;
}

.dashboard-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dashboard-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 700;
}

.sidebar-brand-text {
    white-space: nowrap;
}

.sidebar-collapse-btn,
.sidebar-expand-btn,
.sidebar-toggle-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary-dark);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-expand-btn:hover,
.sidebar-toggle-btn:hover {
    background: rgba(147, 180, 232, 0.15);
    border-color: rgba(91, 127, 199, 0.5);
}

.sidebar-expand-btn {
    display: none;
}

.sidebar-role-pill {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: rgba(147, 180, 232, 0.22);
    border: 1px solid rgba(91, 127, 199, 0.3);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.dashboard-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

.sidebar-nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 0.3rem;
    margin: 0.55rem 0 0.15rem;
}

.dashboard-sidebar-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-link-icon {
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1;
}

.dashboard-sidebar-link:hover {
    background: rgba(147, 180, 232, 0.14);
    border-color: rgba(91, 127, 199, 0.2);
    color: var(--primary-dark);
}

.dashboard-sidebar-link.is-active {
    background: linear-gradient(135deg, #5b7fc7 0%, #3b5998 100%);
    color: #fff;
    border-color: transparent;
}

.dashboard-sidebar-link.is-warn {
    color: #9a3412;
}

.dashboard-sidebar-link.is-warn:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.45);
    color: #7c2d12;
}

.dashboard-main {
    flex: 1;
    margin-left: 270px;
    min-width: 0;
    transition: margin-left 0.25s ease;
}

.dashboard-topbar {
    min-height: 64px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.dashboard-content {
    padding-bottom: 1rem;
}

.dashboard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1030;
    border: 0;
    display: none;
}

.dashboard-mobile-toggle {
    display: none;
}

body.sidebar-collapsed .dashboard-sidebar {
    width: 92px;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

body.sidebar-collapsed .dashboard-main {
    margin-left: 92px;
}

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-role-pill,
body.sidebar-collapsed .sidebar-nav-section,
body.sidebar-collapsed .sidebar-link-text {
    display: none;
}

body.sidebar-collapsed .dashboard-sidebar-header {
    justify-content: center;
}

body.sidebar-collapsed .dashboard-sidebar-brand,
body.sidebar-collapsed .sidebar-collapse-btn {
    display: none;
}

body.sidebar-collapsed .sidebar-expand-btn {
    display: inline-flex;
}

body.sidebar-collapsed .dashboard-sidebar-nav {
    align-items: center;
}

body.sidebar-collapsed .dashboard-sidebar-link {
    width: 38px;
    height: 38px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--primary-dark);
}

body.sidebar-collapsed .dashboard-sidebar-link:hover {
    background: rgba(147, 180, 232, 0.15);
    border-color: rgba(91, 127, 199, 0.5);
    color: var(--primary-dark);
}

body.sidebar-collapsed .sidebar-link-icon {
    margin: 0;
    font-size: 1.05rem;
}

body.sidebar-collapsed .dashboard-sidebar-link.is-active,
body.sidebar-collapsed .dashboard-sidebar-link.is-warn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary-dark);
}

/* ─── Cards ─── */

.card, .card-shadow {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(147, 180, 232, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-shadow {
    border: 1px solid var(--border);
}

/* ─── Buttons ─── */

.btn-primary {
    background: linear-gradient(135deg, #5b7fc7 0%, #3b5998 100%);
    border: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 127, 199, 0.4);
    background: linear-gradient(135deg, #6b8fd7 0%, #4b69a8 100%);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 127, 199, 0.3);
}

.btn-outline-secondary {
    border-radius: 0 10px 10px 0;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
}

/* ─── Forms ─── */

.form-control,
.form-select {
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 127, 199, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

/* ─── Alerts ─── */

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-dark);
    border-radius: 10px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success-dark);
    border-radius: 10px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #1d4ed8;
    border-radius: 10px;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #b45309;
    border-radius: 10px;
}

/* ─── Hero Section ─── */

.hero {
    background: linear-gradient(135deg, #3b5998, #5b7fc7);
    color: #fff;
    padding: 4rem 0;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(91, 127, 199, 0.3);
}

/* ─── Tabs ─── */

.dashboard-tabs {
    border-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.dashboard-tabs .nav-item {
    margin-bottom: 0;
}

.dashboard-tabs .nav-link {
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.92);
    transition: all 0.2s ease;
}

.dashboard-tabs .nav-link:hover {
    color: var(--primary-dark);
    border-color: rgba(91, 127, 199, 0.45);
    background: rgba(147, 180, 232, 0.12);
}

.dashboard-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #5b7fc7 0%, #3b5998 100%);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(59, 89, 152, 0.22);
}

.dashboard-tabs-content {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(91, 127, 199, 0.12);
}

/* ─── Material Card ─── */

.material-card {
    border-left: 4px solid var(--primary);
}

/* ─── Badges ─── */

.badge-excellent {
    background-color: var(--success);
}

.badge-good {
    background-color: var(--primary);
}

.badge-improve {
    background-color: var(--warning);
    color: #111;
}

/* ─── Tables ─── */

.table thead th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border);
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: rgba(91, 127, 199, 0.3);
    border-radius: 6px;
}

/* ─── Upload Summary ─── */

.upload-summary {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(147, 180, 232, 0.15);
    border: 1px solid var(--border);
}

/* ─── Back to Dashboard Button (Static, top-left) ─── */

.back-to-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.back-to-dashboard:hover {
    transform: translateX(-3px);
}

/* ─── Google Sign-In ─── */

.google-signin-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.google-signin-center .g_id_signin iframe {
    margin: 0 auto !important;
}

/* ─── Password Toggle ─── */

.password-toggle-btn {
    border-color: var(--input-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.password-toggle-btn:hover {
    background: rgba(147, 180, 232, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── Disabled Option ─── */

.disabled-option {
    color: #6c757d;
}

/* ─── Info Section ─── */

.info-section {
    background: rgba(147, 180, 232, 0.1);
    border: 1px solid rgba(147, 180, 232, 0.25);
    border-radius: 12px;
    padding: 20px;
}

/* ─── KPI Cards ─── */

.kpi-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 180, 232, 0.2);
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Student Help Widget ─── */

body.student-help-open {
    overflow: hidden;
}

.student-help-launcher {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1060;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #5b7fc7 0%, #3b5998 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(59, 89, 152, 0.38);
    padding: 0.65rem 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.student-help-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(59, 89, 152, 0.45);
}

.student-help-launcher-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.student-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1061;
}

.student-help-panel {
    position: fixed;
    top: 0;
    right: -430px;
    width: min(420px, 96vw);
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-left: 1px solid var(--border);
    box-shadow: -14px 0 38px rgba(15, 23, 42, 0.16);
    z-index: 1062;
    display: flex;
    flex-direction: column;
    transition: right 0.24s ease;
}

.student-help-root.is-open .student-help-overlay {
    opacity: 1;
    pointer-events: auto;
}

.student-help-root.is-open .student-help-panel {
    right: 0;
}

.student-help-header {
    padding: 1rem 1rem 0.8rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.student-help-kicker {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary-dark);
}

.student-help-heading {
    margin: 0.15rem 0 0;
    font-size: 1.08rem;
    color: var(--text);
}

.student-help-close {
    border: 0;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    line-height: 1;
    font-size: 1.35rem;
    color: var(--text);
    cursor: pointer;
}

.student-help-controls {
    padding: 0.9rem 1rem 0.5rem;
}

.student-help-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.student-help-select {
    width: 100%;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    font-size: 0.92rem;
    background: #fff;
}

.student-help-progress-wrap {
    padding: 0.35rem 1rem 0.8rem;
}

.student-help-progress-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.student-help-progress-track {
    height: 8px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    overflow: hidden;
}

.student-help-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.student-help-body {
    padding: 0.2rem 1rem 1.1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-help-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 0.75rem 0.85rem;
}

.student-help-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

.student-help-overview {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.89rem;
    line-height: 1.45;
}

.student-help-subheading {
    margin: 0 0 0.45rem;
    font-size: 0.9rem;
    color: var(--text);
}

.student-help-list,
.student-help-checklist {
    margin: 0;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.student-help-list li,
.student-help-checklist li {
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--text);
}

.student-help-checklist {
    list-style: none;
    padding-left: 0;
}

.student-help-checklist-item {
    margin: 0;
}

.student-help-checkline {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.student-help-checkbox {
    margin-top: 0.17rem;
}

.student-help-checktext {
    color: var(--text);
}

.student-help-checktext.is-complete {
    text-decoration: line-through;
    color: var(--text-muted);
}

.student-help-checklist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.student-help-reset {
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.1);
    color: var(--text);
    border-radius: 9px;
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.student-help-next-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.student-help-next-link {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    font-size: 0.78rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #5b7fc7 0%, #3b5998 100%);
}

.student-help-whatsapp-link {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.student-help-whatsapp-note {
    margin-top: 0.45rem;
}

.student-help-muted {
    margin: 0;
    font-size: 0.83rem;
    color: var(--text-muted);
}

/* ─── Responsive ─── */

@media (max-width: 767.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        width: 270px;
    }

    .dashboard-main {
        margin-left: 0;
    }

    body.sidebar-collapsed .dashboard-main {
        margin-left: 0;
    }

    body.sidebar-open .dashboard-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .dashboard-overlay {
        display: block;
    }

    .dashboard-mobile-toggle {
        position: fixed;
        left: 1rem;
        bottom: 1rem;
        z-index: 1045;
        display: inline-flex;
        box-shadow: 0 10px 24px rgba(59, 89, 152, 0.24);
    }

    body.sidebar-open .dashboard-mobile-toggle {
        display: none;
    }

    .dashboard-topbar {
        padding: 0.7rem 0.9rem;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .dashboard-topbar > div:last-child {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-content .container,
    .dashboard-content .container-fluid {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dashboard-content .row {
        --bs-gutter-x: 0.9rem;
    }

    .card-body {
        padding: 1rem;
    }

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

    .dashboard-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-tabs .nav-item {
        width: 100%;
    }

    .dashboard-tabs .nav-link {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        padding: 0.55rem 0.65rem;
        font-size: 0.92rem;
    }

    .dashboard-tabs-content {
        padding: 1rem;
    }

    .dashboard-tabs-content .btn {
        width: 100%;
    }

    .dashboard-tabs-content .btn + .btn {
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }

    .student-help-panel {
        width: min(96vw, 420px);
    }
}

@media (max-width: 576px) {
    .dashboard-sidebar {
        width: min(84vw, 270px);
    }

    .dashboard-topbar .btn,
    .dashboard-topbar .btn-sm {
        width: 100%;
    }

    .dashboard-tabs {
        grid-template-columns: 1fr;
    }

    .card, .card-shadow {
        border-radius: 16px;
    }

    .hero {
        padding: 2.5rem 0;
        border-radius: 16px;
    }

    .btn-primary {
        border-radius: 8px;
    }

    .student-help-launcher {
        right: 0.8rem;
        bottom: 0.8rem;
        padding: 0.56rem 0.82rem;
    }

    .student-help-panel {
        width: 100vw;
        right: -100vw;
    }
}

/* ─── Auto Test: Timer Bar ─── */
.test-timer-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.test-timer {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.test-timer.warning { color: var(--warning); }
.test-timer.danger { color: var(--danger); animation: timer-pulse 1s infinite; }

@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Auto Test: Question Navigator ─── */
.test-navigator {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.test-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.15s ease;
}

.test-nav-btn:hover { background: #e8f0fe; }
.test-nav-btn.answered { background: var(--success); color: white; border-color: var(--success-dark); }
.test-nav-btn.current { background: var(--primary); color: white; border-color: var(--primary-dark); }
.test-nav-btn.unanswered { background: #f1f5f9; }

/* ─── Auto Test: Question Card ─── */
.test-question { display: none; }
.test-question.active { display: block; }

.test-question .list-group-item {
    cursor: pointer;
    transition: background 0.15s;
}
.test-question .list-group-item:hover {
    background: #f0f4ff;
}
.test-question .list-group-item.selected {
    background: #e8f0fe;
    border-color: var(--primary);
}

/* ─── Auto Test: Results ─── */
.result-correct { background: #ecfdf5; border-left: 4px solid var(--success); }
.result-incorrect { background: #fef2f2; border-left: 4px solid var(--danger); }
.result-unanswered { background: #f8fafc; border-left: 4px solid #94a3b8; }

/* ─── Auto Test: Admin Question Cards ─── */
.question-card { border-left: 3px solid var(--primary); }
.question-card .badge { font-size: 0.7rem; }
.question-card.approved { border-left-color: var(--success); }

/* ─── Auto Test: Generation Spinner ─── */
.generation-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}
.generation-spinner.active { display: block; }
.generation-spinner .spinner-border { width: 3rem; height: 3rem; }
