﻿/* Learner Management System - Modern Tech Theme */

:root {
    --bg-color: #050816;
    --surface-color: rgba(10, 18, 40, 0.72);
    --surface-strong: rgba(8, 14, 32, 0.94);
    --border-color: rgba(151, 164, 187, 0.24);
    --border-bright: rgba(91, 170, 255, 0.4);
    --primary-color: #38b6ff;
    --primary-strong: #0d6efd;
    --secondary-color: #91a4c0;
    --success-color: #1fdfb2;
    --info-color: #62c6ff;
    --warning-color: #f7c948;
    --danger-color: #ff5d7a;
    --text-color: #f5f9ff;
    --muted-text: #aebed8;
    --silver-text: #d6e0ec;
    --shadow-lg: 0 24px 80px rgba(2, 8, 24, 0.45);
    --shadow-md: 0 16px 40px rgba(4, 10, 24, 0.3);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

/* Display theme controls */
.theme-toggle-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d4deeb;
    border-radius: 50%;
    bottom: 1.25rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    color: #142238;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    padding: 0;
    position: fixed;
    right: 1.25rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: 3rem;
    z-index: 1050;
}

.theme-toggle-button i {
    color: #8a1538;
    font-size: 1.15rem;
}

.theme-toggle-button:hover {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
    transform: translateY(-2px);
}

.theme-toggle-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

html[data-theme="dark"] .theme-toggle-button {
    background: #14213a;
    border-color: #314569;
    color: #eef5ff;
}

html[data-theme="dark"] .theme-toggle-button i {
    color: #facc15;
}

body {
    padding-bottom: 1.25rem;
}

.currency-input-wrap {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    display: flex;
    min-height: 2.8rem;
    overflow: hidden;
    width: 100%;
}

.currency-input-prefix {
    align-items: center;
    align-self: stretch;
    background: #f1f5f9;
    border-right: 1px solid #cbd5e1;
    color: #334155;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0 .75rem;
}

.currency-input-wrap input,
.currency-input-wrap .form-control,
.currency-input-wrap .workflow-input {
    border: 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
}

.currency-input-wrap input:focus,
.currency-input-wrap .form-control:focus,
.currency-input-wrap .workflow-input:focus {
    outline: 0;
}

.currency-input-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .16);
}

@media (max-width: 575.98px) {
    .theme-toggle-button {
        bottom: 1rem;
        right: 1rem;
    }

    body {
        padding-bottom: 1rem;
    }
}

html[data-theme="light"],
html[data-theme="light"] body {
    background: #eef4fb;
    color: #142238;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at top left, rgba(138, 21, 56, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

html[data-theme="light"] .app-glow,
html[data-theme="light"] .app-grid {
    opacity: 0.18;
}

html[data-theme="light"] .glass-card,
html[data-theme="light"] .card,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .footer-shell,
html[data-theme="light"] .list-group-item,
html[data-theme="light"] .page-link {
    background: rgba(255, 255, 255, 0.94);
    border-color: #dbe4f1;
    color: #142238;
}

html[data-theme="light"] .card-header,
html[data-theme="light"] .modal-header {
    border-color: #dbe4f1;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] .input-group-text {
    background: #ffffff;
    border-color: #cfd9e8;
    color: #142238;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
    background: #ffffff;
    color: #142238;
}

html[data-theme="light"] .form-label,
html[data-theme="light"] .form-text,
html[data-theme="light"] .text-muted,
html[data-theme="light"] .footer-copy,
html[data-theme="light"] .footer-meta,
html[data-theme="light"] .table,
html[data-theme="light"] .page-link {
    color: #64748b !important;
}

html[data-theme="light"] .table > :not(caption) > * > * {
    color: #142238;
    border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .table thead th {
    color: #475569;
    border-bottom-color: #cbd5e1;
}

html[data-theme="light"] .alert,
html[data-theme="light"] .glass-alert {
    background: #ffffff;
    border-color: #dbe4f1;
    color: #142238;
}

html[data-theme="dark"] .workflow-page,
html[data-theme="dark"] .admin-login-page,
html[data-theme="dark"] body.student-portal-page,
html[data-theme="dark"] body.admin-clean-page {
    background: #07101f;
    color: #eaf2ff;
}

html[data-theme="dark"] .workflow-banner,
html[data-theme="dark"] .stepper-card,
html[data-theme="dark"] .workflow-card,
html[data-theme="dark"] .info-strip,
html[data-theme="dark"] .student-portal-header,
html[data-theme="dark"] .student-portal-card,
html[data-theme="dark"] .admin-clean-header,
html[data-theme="dark"] .admin-clean-tabs,
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-clean-panel,
html[data-theme="dark"] .admin-workspace-shell .card,
html[data-theme="dark"] .admin-feature-card,
html[data-theme="dark"] .parent-panel,
html[data-theme="dark"] .login-choice-card {
    background: #101a2d;
    border-color: #263955;
    color: #eaf2ff;
}

html[data-theme="dark"] .workflow-card h1,
html[data-theme="dark"] .workflow-label,
html[data-theme="dark"] .workflow-back,
html[data-theme="dark"] .student-portal-header h1,
html[data-theme="dark"] .student-portal-user strong,
html[data-theme="dark"] .parent-panel-header h2,
html[data-theme="dark"] .parent-info-grid dd,
html[data-theme="dark"] .academic-summary-block strong,
html[data-theme="dark"] .learning-material-row strong,
html[data-theme="dark"] .report-status-row strong,
html[data-theme="dark"] .parent-empty strong,
html[data-theme="dark"] .admin-clean-brand h1,
html[data-theme="dark"] .admin-stat-card strong,
html[data-theme="dark"] .admin-feature-card h4 {
    color: #f8fbff;
}

html[data-theme="dark"] .workflow-subtitle,
html[data-theme="dark"] .workflow-help,
html[data-theme="dark"] .student-portal-header p,
html[data-theme="dark"] .student-portal-titlebar p,
html[data-theme="dark"] .student-portal-user span,
html[data-theme="dark"] .parent-muted,
html[data-theme="dark"] .parent-info-grid dt,
html[data-theme="dark"] .academic-summary-block span,
html[data-theme="dark"] .learning-material-row span,
html[data-theme="dark"] .report-status-row span,
html[data-theme="dark"] .report-status-meta small,
html[data-theme="dark"] .login-choice-card span {
    color: #aebed8;
}

html[data-theme="dark"] .workflow-input,
html[data-theme="dark"] .portal-language-switch select,
html[data-theme="dark"] .admin-language-switch select,
html[data-theme="dark"] .student-admin-edit-fields input,
html[data-theme="dark"] .student-admin-edit-fields select,
html[data-theme="dark"] .student-admin-edit-fields textarea {
    background: #0b1424;
    border-color: #314569;
    color: #f8fbff;
}

html[data-theme="dark"] .workflow-secondary,
html[data-theme="dark"] .student-portal-logout,
html[data-theme="dark"] .portal-documents-button,
html[data-theme="dark"] .portal-feature-card,
html[data-theme="dark"] .section-progress-row,
html[data-theme="dark"] .academic-summary-block,
html[data-theme="dark"] .learning-material-row,
html[data-theme="dark"] .report-status-row,
html[data-theme="dark"] .parent-document-summary div {
    background: #0b1424;
    border-color: #314569;
    color: #eaf2ff;
}

html[data-theme="dark"] .notice-card.green,
html[data-theme="dark"] .workflow-banner.success {
    background: #0f2f25;
    border-color: #166534;
    color: #bbf7d0;
}

html[data-theme="dark"] .notice-card.blue,
html[data-theme="dark"] .parent-access-note {
    background: #102344;
    border-color: #1d4ed8;
    color: #bfdbfe;
}

html[data-theme="dark"] .notice-card.yellow {
    background: #33240b;
    border-color: #92400e;
    color: #fde68a;
}

html[data-theme="dark"] .parent-viewer-hero {
    background: #0b1b31;
}

html[data-theme="dark"] .parent-viewer-total {
    background: #3f1722;
    color: #fecdd3;
}

html[data-theme="dark"] .parent-viewer-total.is-clear {
    background: #0f2f25;
    color: #bbf7d0;
}

html[data-theme="dark"] .parent-viewer-total.is-progress {
    background: #102344;
    color: #bfdbfe;
}

html[data-theme="dark"] .learning-stream-list span {
    background: #0f2f25;
    border-color: #166534;
    color: #bbf7d0;
}

html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-primary {
    color: #eaf2ff;
    border-color: #314569;
}

@media (max-width: 640px) {
    .theme-toggle-button {
        bottom: 1rem;
        right: 1rem;
    }
}

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

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background:
        radial-gradient(circle at top left, rgba(56, 182, 255, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.18), transparent 28%),
        linear-gradient(180deg, #030612 0%, #07101f 40%, #050816 100%);
    font-size: 0.95rem;
    line-height: 1.5;
}

a {
    color: var(--info-color);
}

a:hover {
    color: #9ad9ff;
}

.app-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.app-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.65;
}

.app-glow-a {
    top: 5%;
    left: -8%;
    width: 28rem;
    height: 28rem;
    background: rgba(56, 182, 255, 0.26);
}

.app-glow-b {
    right: -10%;
    bottom: 5%;
    width: 32rem;
    height: 32rem;
    background: rgba(255, 255, 255, 0.12);
}

.app-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 75%);
}

.site-frame,
main {
    position: relative;
}

main {
    flex: 1;
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.glass-card,
.card,
.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    color: var(--text-color);
}

.card-header,
.modal-header {
    border-color: rgba(255, 255, 255, 0.08);
}

.card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-bright);
    box-shadow: 0 26px 70px rgba(0, 14, 38, 0.5);
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #03101f;
    border-color: rgba(56, 182, 255, 0.85);
    background: linear-gradient(135deg, #8de6ff 0%, #38b6ff 45%, #0d6efd 100%);
    box-shadow: 0 14px 28px rgba(13, 110, 253, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #03101f;
    border-color: #9ad9ff;
    background: linear-gradient(135deg, #b0efff 0%, #5cc4ff 50%, #2a7fff 100%);
}

.btn-outline-light,
.btn-outline-primary,
.btn-outline-secondary {
    color: var(--text-color);
    border-color: rgba(214, 224, 236, 0.35);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline-light:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    color: var(--text-color);
    border-color: var(--border-bright);
    background: rgba(56, 182, 255, 0.12);
}

.btn-lg {
    padding: 0.85rem 1.35rem;
    font-size: 0.95rem;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 2.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(214, 224, 236, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.92rem;
}

.form-control::placeholder {
    color: rgba(214, 224, 236, 0.5);
}

.form-control:focus,
.form-select:focus {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(56, 182, 255, 0.18);
}

.form-select option {
    color: #07101f;
}

.input-group-text {
    color: var(--silver-text);
}

.form-label,
.form-text,
.text-muted,
.footer-copy,
.footer-meta,
.table,
.list-group-item,
.page-link {
    color: var(--muted-text) !important;
}

.alert,
.glass-alert {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-color);
    background: rgba(8, 14, 32, 0.92);
}

.alert-success {
    border-color: rgba(31, 223, 178, 0.3);
}

.alert-info {
    border-color: rgba(98, 198, 255, 0.32);
}

.alert-danger {
    border-color: rgba(255, 93, 122, 0.3);
}

.table {
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.table thead th {
    color: var(--silver-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.07);
    color: var(--text-color);
}

.badge {
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
}

.navbar {
    background: rgba(4, 10, 24, 0.72) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.progress {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.progress-bar {
    background: linear-gradient(90deg, #38b6ff, #8de6ff);
}

.list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.06);
}

.pagination .page-link {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    margin: 0 0.2rem;
}

.pagination .page-item.active .page-link {
    color: #03101f !important;
    background: linear-gradient(135deg, #8de6ff, #38b6ff);
    border-color: transparent;
}

.footer {
    margin-top: auto;
}

.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius-lg) - 6px);
    background: rgba(4, 10, 24, 0.72);
    backdrop-filter: blur(16px);
}

.footer-brand,
.eyebrow,
.hero-title,
.auth-aside h1,
.registration-intro h1 {
    font-family: "Orbitron", sans-serif;
}

.footer-brand,
.eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-brand {
    color: var(--silver-text);
}

.footer-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    color: #8ddcff;
}

.hero-panel,
.auth-shell,
.registration-shell {
    position: relative;
    overflow: hidden;
}

.hero-panel {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius-lg) + 4px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(56, 182, 255, 0.05)),
        rgba(4, 10, 24, 0.68);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.hero-title {
    max-width: 15ch;
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
}

.hero-logo-slot {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    min-width: min(100%, 20rem);
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(141, 220, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.hero-logo-mark {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 14px;
    border: 1px solid rgba(141, 220, 255, 0.45);
    background: rgba(56, 182, 255, 0.12);
    color: #8ddcff;
    font-size: 1.35rem;
}

.hero-logo-mark img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.hero-logo-slot strong {
    display: block;
    margin-bottom: 0.12rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.hero-logo-slot p {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.82rem;
}

.hero-copy,
.auth-aside p,
.registration-intro p,
.feature-panel p,
.signal-card p {
    color: var(--muted-text);
    font-size: 0.94rem;
}

.hero-actions,
.hero-metrics,
.feature-grid,
.auth-feature-list,
.registration-cues {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 2rem;
}

.hero-entry-button {
    min-height: 3.6rem;
    padding: 1rem 1.5rem;
    font-size: 1.02rem;
    font-weight: 800;
    border-width: 1px;
    box-shadow: 0 14px 28px rgba(16, 34, 66, 0.16);
}

.hero-entry-primary {
    min-width: 13rem;
}

.hero-metrics {
    margin-top: 2rem;
}

.metric-chip,
.signal-card,
.feature-panel,
.auth-feature-list div,
.registration-cues div,
.section-heading span,
.brand-mark {
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-md);
}

.metric-chip {
    display: grid;
    gap: 0.2rem;
    min-width: 8rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
}

.metric-value {
    font-weight: 800;
    color: var(--text-color);
}

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

.hero-card {
    padding: 1.5rem;
}

.hero-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--silver-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #1fdfb2;
    box-shadow: 0 0 12px rgba(31, 223, 178, 0.8);
}

.hero-stack {
    display: grid;
    gap: 1rem;
}

.signal-card,
.feature-panel,
.auth-feature-list div,
.registration-cues div {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
}

.signal-card i,
.feature-panel i,
.auth-feature-list i,
.registration-cues i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.signal-card h5,
.feature-panel h4,
.section-heading h5 {
    color: var(--text-color);
    font-size: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-shell .feature-grid {
    grid-template-columns: minmax(0, 1fr);
}

.feature-panel {
    flex-direction: column;
    min-height: 100%;
}

.landing-shell .feature-panel {
    max-width: 28rem;
}

.auth-shell,
.registration-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 0;
    border-radius: calc(var(--radius-lg) + 4px);
}

.auth-aside,
.registration-intro {
    padding: 2.4rem;
    background:
        linear-gradient(180deg, rgba(56, 182, 255, 0.13), transparent 45%),
        rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card,
.registration-form-wrap {
    padding: 2.2rem;
}

.auth-card-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.brand-mark,
.section-heading span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-heading p {
    color: var(--muted-text);
}

.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: rgba(4, 10, 24, 0.9);
}

.admin-sidebar .nav-link {
    color: rgba(245, 249, 255, 0.74);
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(56, 182, 255, 0.14);
}

.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}

.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -55%;
    right: -35%;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(56, 182, 255, 0.22), transparent 65%);
}

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

.alert-dismissible {
    animation: slideIn 0.25s ease;
}

.flash-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10050;
    display: grid;
    gap: 0.75rem;
    width: min(30rem, calc(100vw - 2rem));
    pointer-events: none;
}

.notification-message {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
    overflow: hidden;
    margin: 0;
    padding: 1rem 3.25rem 1.15rem 1rem;
    border: 1px solid transparent !important;
    border-left-width: 6px !important;
    border-radius: 0.8rem;
    pointer-events: auto;
    color: #ffffff !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.notification-message:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.notification-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-top: 0.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.17);
    font-size: 1rem;
}

.notification-content {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.notification-label {
    color: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-message-text {
    display: block;
    line-height: 1.5;
}

.notification-message > .btn-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
}

.notification-success {
    background: #15803d !important;
    border-color: #86efac !important;
}

.notification-info {
    background: #1d4ed8 !important;
    border-color: #93c5fd !important;
}

.notification-warning {
    background: #f59e0b !important;
    border-color: #b45309 !important;
    color: #291703 !important;
}

.notification-warning .notification-icon {
    background: rgba(41, 23, 3, 0.12);
}

.notification-warning .btn-close {
    filter: none;
}

.notification-error {
    background: #b91c1c !important;
    border-color: #fecaca !important;
}

.notification-security {
    background: #7f1d1d !important;
    border-color: #ef4444 !important;
    border-left-width: 8px !important;
}

.notification-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
}

.notification-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
}

.notification-persistent {
    box-shadow: 0 20px 44px rgba(69, 10, 10, 0.34);
}

.app-toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 10060;
    display: grid;
    gap: 0.75rem;
    width: min(28rem, calc(100vw - 2rem));
}

.app-toast-stack .toast {
    display: block;
    width: 100%;
    max-width: none;
}

.notification-toast-layout {
    display: contents;
}

.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 22, 0.78);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #08111f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #274a6b, #6d8baa);
    border-radius: 999px;
}

@media (max-width: 991px) {
    .feature-grid,
    .auth-shell,
    .registration-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside,
    .registration-intro {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero-title {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .hero-panel,
    .auth-aside,
    .auth-card,
    .registration-intro,
    .registration-form-wrap {
        padding: 1.4rem;
    }

    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-lg {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .student-nav .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .student-nav .nav-link i {
        display: block;
        margin-bottom: 3px;
        font-size: 1.2rem;
    }

    .hero-actions,
    .hero-metrics,
    .auth-feature-list,
    .registration-cues {
        flex-direction: column;
    }
}

@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card,
    .glass-card {
        border: 1px solid #ddd;
        box-shadow: none !important;
        background: #fff !important;
        color: #000 !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .card,
    .glass-card,
    .btn {
        border-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Light workflow pages modeled on the provided login screenshots */

.workflow-page,
.admin-login-page {
    background: #eaf3ff;
    color: #111827;
}

.workflow-page .app-backdrop,
.admin-login-page .app-backdrop {
    display: none;
}

.workflow-page .footer,
.admin-login-page .footer {
    display: none;
}

.workflow-page .flash-stack,
.admin-login-page .flash-stack {
    max-width: 42rem;
    margin: 0 auto 1rem;
}

.workflow-page .glass-alert,
.admin-login-page .glass-alert {
    background: #ffffff;
    border: 1px solid #d7e3f7;
    color: #1f2937;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

.workflow-main {
    padding: 2.75rem 1rem 4rem;
}

.workflow-wrap {
    max-width: 42rem;
    margin: 0 auto;
}

.workflow-language-switch {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.workflow-language-switch label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0;
}

.workflow-language-switch select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
}

html[data-theme="dark"] .workflow-language-switch select {
    background: #182231;
    border-color: #64748b;
    color: #ffffff;
}

.admin-wrap {
    max-width: 34rem;
}

.workflow-back {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: #111827;
    font-weight: 500;
    text-decoration: none;
}

.workflow-back:hover {
    color: #111827;
}

.workflow-banner,
.stepper-card,
.workflow-card,
.info-strip,
.method-card,
.notice-card {
    background: #ffffff;
    border: 1px solid #d6e2f2;
    border-radius: 1rem;
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.12);
}

.workflow-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.4rem;
}

.workflow-banner.success {
    background: #effcf2;
    border-color: #86efac;
}

.workflow-banner.warning-soft {
    background: #fffbea;
    border-color: #fcd34d;
}

.workflow-banner.expired {
    background: #fff7ed;
    border-color: #fdba74;
}

.workflow-banner-copy {
    display: grid;
    gap: 0.35rem;
    color: #166534;
}

.workflow-banner.warning-soft .workflow-banner-copy,
.workflow-banner.warning-soft .workflow-banner-copy span {
    color: #92400e;
}

.workflow-banner-copy span {
    color: #166534;
}

.workflow-banner.expired .workflow-banner-copy,
.workflow-banner.expired .workflow-banner-copy span,
.workflow-banner.expired .workflow-timer {
    color: #9a3412;
}

.workflow-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: #16a34a;
    font-weight: 600;
    background: #ffffff;
}

.stepper-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.6rem;
}

.stepper-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.stepper-item.active {
    color: #2563eb;
    font-weight: 700;
}

.stepper-item.done {
    color: #16a34a;
    font-weight: 600;
}

.stepper-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.stepper-line {
    flex: 1;
    height: 1px;
    background: #cbd5e1;
}

.workflow-card {
    padding: 1.6rem 1.55rem 1.5rem;
}

.admin-card {
    padding-inline: 1.45rem;
}

.workflow-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 2rem;
}

.workflow-card h1 {
    margin-bottom: 0.5rem;
    color: #111827;
    font-size: 1.12rem;
    font-weight: 700;
    text-align: center;
}

.workflow-subtitle {
    margin-bottom: 1.6rem;
    color: #64748b;
    text-align: center;
    font-size: 0.9rem;
}

.notice-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.notice-card.green {
    background: #effcf2;
    border-color: #bbf7d0;
    color: #166534;
}

.notice-card.blue,
.info-strip.blue-soft {
    background: #eef4ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.notice-card.yellow {
    background: #fff9e8;
    border-color: #fde68a;
    color: #92400e;
}

.workflow-form {
    margin-top: 0.5rem;
}

.workflow-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #111827;
    font-weight: 600;
}

.workflow-input-wrap {
    position: relative;
}

.workflow-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
}

.workflow-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 2px solid #d7dce5;
    border-radius: 0.85rem;
    background: #ffffff;
    color: #111827;
    font-size: 0.95rem;
}

.workflow-input.with-icon {
    padding-left: 2.5rem;
}

.workflow-input.admin-highlight {
    background: #fffbea;
}

.workflow-input:focus {
    outline: none;
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

.admin-login-page .workflow-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.workflow-help {
    margin: 0.45rem 0 1rem;
    color: #64748b;
    font-size: 0.85rem;
}

.workflow-submit,
.workflow-secondary {
    width: 100%;
    min-height: 2.8rem;
    border: none;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    margin-top: 0.5rem;
}

.workflow-submit.maroon {
    background: #991b47;
    color: #ffffff;
}

.workflow-submit.blue {
    background: #2563eb;
    color: #ffffff;
}

.workflow-secondary {
    margin-top: 0.8rem;
    background: #f8fafc;
    border: 1px solid #d1d5db;
    color: #111827;
}

.workflow-link {
    display: block;
    margin-top: 1.1rem;
    text-align: center;
    color: #2563eb;
    text-decoration: none;
}

.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 1rem;
    color: #334155;
}

.autosave-panel {
    display: block;
    text-align: center;
}

.autosave-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    color: #1e3a8a;
    font-weight: 700;
}

.autosave-copy {
    max-width: 34rem;
    margin: 0 auto 0.9rem;
    color: #1d4ed8;
    line-height: 1.5;
}

.browser-support {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.browser-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.7rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.45rem;
    background: #ffffff;
    color: #2563eb;
    font-size: 0.84rem;
}

.mobile-support {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #2563eb;
}

.method-card {
    padding: 0.8rem 0.8rem 0.9rem;
    margin-bottom: 1.35rem;
    background: #f8fafc;
}

.method-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
    color: #334155;
}

.method-card-top a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.method-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.method-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.2rem;
    border-radius: 0.7rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.method-pill.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.admin-form .workflow-label {
    margin-top: 0.8rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
}

.workflow-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: min(30rem, calc(100vw - 3rem));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    z-index: 2000;
}

.workflow-toast-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
}

@media (max-width: 640px) {
    .flash-stack,
    .app-toast-stack,
    .workflow-toast {
        top: 0.75rem;
        right: 0.75rem;
        bottom: auto;
        left: 0.75rem;
        width: auto;
    }

    .workflow-main {
        padding-inline: 0.75rem;
    }

    .stepper-card {
        padding: 0.9rem 0.85rem;
        gap: 0.45rem;
    }

    .stepper-item span:last-child {
        font-size: 0.82rem;
    }

    .workflow-card {
        padding: 1.2rem 1rem;
    }

    .workflow-banner,
    .method-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .method-switch {
        grid-template-columns: 1fr;
    }

    .workflow-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .autosave-copy {
        font-size: 0.93rem;
    }
}

/* Clean product-style theme */

:root {
    --bg-color: #f5f7fb;
    --surface-color: #ffffff;
    --surface-strong: #ffffff;
    --border-color: #d9e1ef;
    --border-bright: #2b66f6;
    --primary-color: #2563eb;
    --primary-strong: #1d4ed8;
    --secondary-color: #6b7a90;
    --success-color: #16a34a;
    --info-color: #2563eb;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --text-color: #14213d;
    --muted-text: #5f6f86;
    --silver-text: #334155;
    --shadow-lg: 0 14px 36px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.05);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
}

.app-backdrop,
.app-glow,
.app-grid {
    display: none;
}

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

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

.glass-card,
.card,
.modal-content {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: none;
    backdrop-filter: none;
    color: var(--text-color);
}

.card:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: none;
}

.btn {
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0;
}

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

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

.btn-outline-light,
.btn-outline-primary,
.btn-outline-secondary {
    color: var(--text-color);
    border-color: #cfd8e6;
    background: #fff;
}

.btn-outline-light:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    color: var(--primary-color);
    border-color: #b6c5de;
    background: #f8fbff;
}

.form-control,
.form-select,
.input-group-text {
    border: 1px solid #d4ddeb;
    background: #fff;
    color: var(--text-color);
}

.form-control:focus,
.form-select:focus {
    color: var(--text-color);
    background: #fff;
    border-color: #8fb2ff;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.input-group-text {
    background: #fff;
    color: #7b8ba3;
}

.form-label,
.form-text,
.text-muted,
.footer-copy,
.footer-meta,
.table,
.list-group-item,
.page-link,
.section-heading p,
.hero-copy,
.auth-aside p,
.registration-intro p,
.feature-panel p,
.signal-card p {
    color: var(--muted-text) !important;
}

.alert,
.glass-alert {
    border: 1px solid #d7e3f7;
    border-radius: var(--radius-md);
    color: var(--text-color);
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.table {
    border-color: #e5ebf5;
}

.table thead th {
    color: #6a7b93;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    border-bottom-color: #e5ebf5;
}

.table > :not(caption) > * > * {
    border-bottom-color: #edf2f7;
    color: var(--text-color);
}

.navbar {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: none;
    box-shadow: none;
}

.navbar-brand,
.footer-brand,
.eyebrow,
.hero-title,
.auth-aside h1,
.registration-intro h1 {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    color: var(--text-color) !important;
    font-size: 1rem;
    letter-spacing: 0;
}

.navbar .nav-link {
    color: #42536d !important;
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
}

.footer-shell {
    border: 1px solid #e2e8f0;
    background: #fff;
    backdrop-filter: none;
}

.footer-brand {
    letter-spacing: 0;
    text-transform: none;
}

.hero-panel,
.auth-shell,
.registration-shell,
.metric-chip,
.signal-card,
.feature-panel,
.auth-feature-list div,
.registration-cues div,
.section-heading span,
.brand-mark {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.hero-title {
    color: var(--text-color);
}

.workflow-page,
.admin-login-page {
    background: #f5f8fc;
    color: var(--text-color);
}

.workflow-banner,
.stepper-card,
.workflow-card,
.info-strip,
.method-card,
.notice-card {
    border-radius: 18px;
    box-shadow: none;
}

.workflow-card {
    border-color: #dde6f3;
}

.admin-clean-page .footer {
    display: none;
}

.admin-dashboard-main {
    max-width: none;
    padding: 0;
}

.admin-clean-shell {
    min-height: 100vh;
    background: #f6f8fc;
}

.admin-clean-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 3rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5ebf5;
}

.admin-clean-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-clean-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--primary-color);
    font-size: 1.45rem;
}

.admin-clean-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: #0f2140;
}

.admin-clean-header p {
    margin: 0.2rem 0 0;
    color: #51627d;
}

.admin-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    margin-left: 0.4rem;
    border-radius: 999px;
    background: #f3e8ff;
    color: #9333ea;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.admin-clean-logout {
    min-height: auto;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
}

.admin-clean-tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0 3rem;
    background: #fff;
    border-bottom: 1px solid #e5ebf5;
    overflow-x: auto;
}

.admin-clean-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 1rem 0.25rem 0.95rem;
    margin-right: 1.6rem;
    border-bottom: 2px solid transparent;
    color: #42536d;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 500;
}

.admin-clean-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: #42536d;
    text-decoration: none;
    font-weight: 600;
}

.admin-back-link:hover {
    color: var(--primary-color);
}

.admin-clean-shell > .admin-back-link,
.admin-clean-shell > .admin-page-intro,
.admin-clean-shell > .admin-page-card,
.admin-clean-shell > .sams-import-grid,
.admin-clean-shell > .student-overview-card,
.admin-clean-shell > .row,
.admin-clean-shell > .admin-clean-panel {
    margin-left: 3rem;
    margin-right: 3rem;
}

.admin-clean-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem 3rem 1.1rem;
}

.admin-stat-card {
    display: block;
    min-height: 112px;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
}

.admin-stat-link {
    color: inherit;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-stat-link:hover,
.admin-stat-link:focus-visible {
    border-color: #9cbcff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .12);
    color: inherit;
    outline: 0;
    transform: translateY(-1px);
    text-decoration: none;
}

.admin-stat-link::after {
    color: #2563eb;
    content: "→";
    font-weight: 800;
    opacity: 0;
    position: absolute;
    right: 1.2rem;
    bottom: 1rem;
    transition: opacity .16s ease;
}

.admin-stat-link:hover::after,
.admin-stat-link:focus-visible::after {
    opacity: 1;
}

.admin-stat-card-wide {
    grid-column: span 2;
}

.admin-stat-card-compact {
    grid-column: span 1;
}

.admin-stat-card-order-version {
    grid-column: auto;
    grid-row: 2;
}

.admin-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    color: #31435f;
    font-size: 0.88rem;
}

.admin-stat-head i {
    font-size: 1.05rem;
}

.admin-stat-card strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

.admin-stat-card p {
    margin: 0.45rem 0 0;
    color: #60708a;
    font-size: 0.88rem;
}

.admin-action-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.admin-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.58rem 0.9rem;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #fbfdff;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-action-link:hover {
    background: #f2f7ff;
    color: var(--primary-color);
}

.admin-clean-panel {
    margin: 0 3rem 3rem;
    padding: 1.4rem 1.5rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
}

.admin-clean-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #172554;
}

.admin-activity-list {
    display: grid;
    gap: 0.9rem;
}

.admin-activity-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #edf2f7;
}

.admin-activity-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.admin-activity-item h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-activity-item p {
    margin: 0;
    color: #64748b;
}

.admin-activity-item span {
    color: #64748b;
    white-space: nowrap;
    font-size: 0.86rem;
}

@media (max-width: 1100px) {
    .admin-clean-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-card-wide {
        grid-column: span 2;
    }

    .admin-stat-card-order-version {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .admin-clean-header,
    .admin-clean-tabs,
    .admin-clean-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .admin-clean-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-clean-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-card-wide {
        grid-column: span 1;
    }

    .admin-stat-card-order-version {
        grid-column: span 1;
    }

    .admin-clean-panel {
        margin: 0 1rem 1rem;
    }

    .admin-action-list {
        grid-template-columns: 1fr;
    }

    .admin-activity-item {
        flex-direction: column;
    }
}

.student-management-shell {
    padding: 1.25rem 3rem 2.25rem;
}

.student-page-intro h2 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f2140;
}

.student-page-intro p {
    margin: 0;
    color: #5e6f88;
    font-size: 0.95rem;
}

.student-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.student-stat-card {
    min-height: 112px;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
}

.student-stat-link {
    color: inherit;
    position: relative;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.student-export-tile {
    border-color: #bfe6ce;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.student-stat-link:hover,
.student-stat-link:focus-visible,
.student-stat-link.active {
    border-color: #2563eb;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12);
    color: inherit;
    outline: none;
    transform: translateY(-2px);
}

.student-stat-link::after {
    color: #2563eb;
    content: "\F285";
    font-family: "bootstrap-icons";
    font-size: 0.85rem;
    opacity: 0;
    position: absolute;
    right: 0.8rem;
    bottom: 0.65rem;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.student-stat-link:hover::after,
.student-stat-link:focus-visible::after,
.student-stat-link.active::after {
    opacity: 1;
    transform: translateX(2px);
}

.student-export-tile strong {
    color: #0f8a4b;
    font-size: 1.4rem;
}

.student-export-tile::after {
    color: #0f8a4b;
    content: "\F138";
}

.student-export-tile:hover,
.student-export-tile:focus-visible {
    border-color: #16a34a;
    box-shadow: 0 16px 32px rgba(22, 163, 74, 0.12);
}

.student-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    color: #233755;
    font-size: 0.88rem;
}

.student-stat-head i {
    font-size: 1rem;
}

.student-stat-card strong {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    color: #101828;
}

.student-stat-card p {
    margin: 0.28rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
}

.learner-number-panel {
    margin-top: 1.2rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    overflow: hidden;
}

.learner-number-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 54px;
    padding: 0.75rem 1rem;
    background: #1f252d;
    color: #fff;
    list-style: none;
}

.learner-number-summary::-webkit-details-marker {
    display: none;
}

.learner-number-summary span {
    align-items: center;
    display: inline-flex;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 800;
}

.learner-number-summary-actions {
    gap: 0.75rem;
}

.learner-number-summary strong {
    color: inherit;
    font-size: 1.45rem;
    font-weight: 800;
}

.learner-number-summary em {
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: inherit;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    padding: 0.32rem 0.58rem;
}

.learner-number-summary .bi-chevron-down {
    transition: transform 0.18s ease;
}

.learner-number-panel[open] .learner-number-summary .bi-chevron-down {
    transform: rotate(180deg);
}

.learner-number-panel[open] .learner-number-summary em {
    font-size: 0;
}

.learner-number-panel[open] .learner-number-summary em::after {
    content: "Close";
    font-size: 0.75rem;
}

.learner-number-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem 1.25rem 1.25rem;
}

.learner-number-group h3 {
    margin: 0 0 0.75rem;
    color: #10213d;
    font-size: 1rem;
    font-weight: 800;
}

.learner-number-list {
    display: grid;
    gap: 0.5rem;
}

.learner-number-list.compact {
    max-height: 260px;
    overflow: auto;
    padding-right: 0.2rem;
}

.learner-number-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
    background: #f8fbff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.learner-number-row span {
    color: #233755;
    font-weight: 700;
}

.learner-number-row strong {
    color: #0f172a;
    font-weight: 800;
}

.learner-number-empty {
    color: #64748b;
    padding: 0.75rem;
}

.student-import-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5c9ff;
    border-radius: 18px;
    background: #f7f4ff;
}

.student-import-panel h3 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    color: #1f2d4d;
}

.student-import-lead {
    margin: 0 0 0.8rem;
    color: #5a6b86;
    font-size: 0.98rem;
}

.student-import-panel p {
    color: #4f5f78;
}

.student-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.student-import-btn {
    color: #fff;
    background: #981b45;
    border-color: #981b45;
    border-radius: 12px;
    padding: 0.8rem 1.1rem;
}

.student-import-btn:hover,
.student-import-btn:focus {
    color: #fff;
    background: #82153b;
    border-color: #82153b;
}

.student-accounts-card {
    margin-top: 1.6rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
}

.student-inline-collapse {
    overflow: hidden;
    padding: 0;
}

.student-accounts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.student-inline-summary {
    background: #1f252d;
    color: #fff;
    cursor: pointer;
    list-style: none;
    min-height: 58px;
    padding: 1rem 1.25rem;
}

.student-inline-summary::-webkit-details-marker {
    display: none;
}

.student-inline-summary h3,
.student-inline-summary p {
    color: inherit;
}

.student-inline-summary p {
    opacity: 0.84;
}

.student-inline-toggle {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.75rem;
}

.student-inline-toggle em {
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: inherit;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    padding: 0.32rem 0.58rem;
}

.student-inline-toggle .bi-chevron-down {
    transition: transform 0.18s ease;
}

.student-inline-collapse[open] .student-inline-toggle .bi-chevron-down {
    transform: rotate(180deg);
}

.student-inline-collapse[open] .student-inline-toggle em {
    font-size: 0;
}

.student-inline-collapse[open] .student-inline-toggle em::after {
    content: "Close";
    font-size: 0.75rem;
}

.student-inline-collapse > .edit-request-grid,
.student-inline-collapse > .student-empty-state,
.student-inline-collapse > .student-tab-rail,
.student-inline-collapse > .student-filter-row,
.student-inline-collapse > .student-active-filter,
.student-inline-collapse > .student-table-shell,
.student-inline-collapse > .student-pagination,
.student-inline-panel-actions {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.student-inline-collapse > .edit-request-grid,
.student-inline-collapse > .student-empty-state,
.student-inline-panel-body,
.student-inline-panel-actions {
    margin-top: 1.25rem;
}

.student-inline-collapse > .edit-request-grid,
.student-inline-collapse > .student-empty-state,
.student-inline-collapse > .student-pagination {
    margin-bottom: 1.5rem;
}

.student-inline-panel-actions {
    display: flex;
    justify-content: flex-end;
}

.student-import-inline-body {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem;
}

.student-accounts-header h3 {
    margin: 0;
    font-size: 1.45rem;
    color: #10213d;
}

.student-accounts-header p {
    margin: 0.4rem 0 0;
    color: #5f6f86;
}

.student-active-filter {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    color: #173050;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 0.95rem;
}

.student-active-filter span {
    font-weight: 800;
}

.student-active-filter strong {
    color: #2563eb;
}

.student-tab-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 1.5rem;
    padding: 0.25rem;
    border-radius: 18px;
    background: #e5eaf2;
}

.student-tab-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 50px;
    border-radius: 15px;
    color: #1f2d4d;
    text-decoration: none;
    font-weight: 500;
}

.student-tab-pill.active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.student-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px auto;
    gap: 1rem;
    margin-top: 1.4rem;
    align-items: center;
}

.student-search-wrap {
    position: relative;
}

.student-search-wrap i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #8a98ab;
}

.student-search-wrap input {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fafbfe;
    color: #172554;
}

.student-search-wrap input:disabled {
    color: #8a98ab;
}

.auto-hide-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.auto-hide-trigger.is-auto-hidden,
.auto-hide-tile.is-auto-hidden {
    display: none;
}

.auto-hide-tile-controls {
    display: flex;
    justify-content: flex-end;
}

.admin-auto-collapse-card > summary {
    cursor: pointer;
    list-style: none;
}

.admin-auto-collapse-card > summary::-webkit-details-marker {
    display: none;
}

.admin-auto-collapse-summary {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-auto-collapse-summary > i.bi-chevron-down {
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.admin-auto-collapse-card[open] > .admin-auto-collapse-summary > i.bi-chevron-down {
    transform: rotate(180deg);
}

.admin-collapse-hint {
    border: 1px solid currentColor;
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    margin-left: auto;
    padding: 0.18rem 0.55rem;
}

.admin-auto-collapse-card[open] > .admin-auto-collapse-summary .admin-collapse-hint {
    font-size: 0;
}

.admin-auto-collapse-card[open] > .admin-auto-collapse-summary .admin-collapse-hint::after {
    content: "Collapse";
    font-size: 0.78rem;
}

.student-table-shell {
    margin-top: 1rem;
    overflow: visible;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
}

.student-table {
    margin-bottom: 0;
    font-size: 0.93rem;
}

.student-table thead th {
    padding: 1rem 0.85rem;
    background: #f6f8fc;
    color: #243753;
    font-weight: 600;
}

.student-table tbody td {
    padding: 1rem 0.85rem;
    vertical-align: middle;
}

.student-code {
    color: #13294b;
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pending {
    background: #fff4db;
    color: #b45309;
}

.status-completed,
.status-pre_existing {
    background: #e8f8ee;
    color: #15803d;
}

.status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.status-archived {
    background: #eef2f7;
    color: #475569;
}

.access-enabled {
    background: #f3e8ff;
    color: #8b1e4f;
}

.access-disabled {
    background: #fee2e2;
    color: #b91c1c;
}

.student-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.student-actions form {
    margin: 0;
}

.student-actions .dropdown {
    display: inline-flex;
}

.student-action-menu {
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
    min-width: 12rem;
    padding: 0.45rem;
}

.student-action-menu .dropdown-item {
    align-items: center;
    border: 0;
    border-radius: 8px;
    display: flex;
    font-weight: 600;
    min-height: 2.35rem;
    width: 100%;
}

.student-action-btn {
    min-height: 40px;
    padding: 0.6rem 0.9rem;
    border: 1px solid #d8dfeb;
    border-radius: 12px;
    background: #fff;
    color: #16263f;
    font-weight: 500;
}

.student-action-btn:hover {
    background: #f8fbff;
    color: #2563eb;
}

.student-action-btn.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.student-action-btn.danger {
    border-color: #fecaca;
    background: #ef2b2b;
    color: #fff;
}

.student-action-btn.danger:hover {
    background: #dc2626;
    color: #fff;
}

.student-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: #64748b;
}

.student-empty-state {
    display: grid;
    place-items: center;
    gap: 0.45rem;
    min-height: 220px;
    text-align: center;
    color: #64748b;
}

.student-empty-state i {
    font-size: 2.5rem;
    color: #98a2b3;
}

.student-empty-state h4 {
    margin: 0;
    color: #243753;
}

.student-modal {
    border-radius: 20px;
    border: 1px solid #d6e2f3;
    box-shadow: 0 38px 90px rgba(15, 23, 42, 0.34);
}

.modal {
    z-index: 1080;
}

.modal-dialog {
    margin: 1.25rem auto;
}

.modal-dialog,
.modal-content,
.modal-header,
.modal-body,
.modal-footer,
.btn-close {
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    border: 1px solid #d6e2f3;
    box-shadow: 0 40px 100px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
    max-height: calc(100vh - 2.5rem);
}

.modal-header {
    background: linear-gradient(180deg, #f7faff 0%, #eef4fd 100%);
    border-bottom: 1px solid #dbe5f3;
    position: sticky;
    top: 0;
    z-index: 2;
}

.modal-footer {
    background: #ffffff;
    border-top: 1px solid #dbe5f3;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 10rem);
    scrollbar-gutter: stable;
}

.modal-title,
.modal-body,
.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6,
.modal-body p,
.modal-body span,
.modal-body strong,
.modal-body label {
    color: #243753;
}

.btn-close {
    cursor: pointer;
    opacity: 0.85;
}

.btn-close:hover,
.btn-close:focus {
    opacity: 1;
}

.modal-backdrop {
    --bs-backdrop-bg: #16263d;
    --bs-backdrop-opacity: 0.5;
    z-index: 1070;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-content {
        max-height: calc(100vh - 1.5rem);
    }

    .modal-body {
        max-height: calc(100vh - 8.5rem);
    }
}

.student-history-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}

.student-history-meta {
    padding: 0.95rem;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #f8fbff;
}

.student-history-meta span {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.82rem;
}

.student-history-meta strong {
    color: #10213d;
}

.student-history-list {
    display: grid;
    gap: 0.75rem;
}

.student-history-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid #edf2f7;
}

.student-history-item:first-child {
    border-top: 0;
}

.student-history-item h6 {
    margin: 0 0 0.2rem;
    color: #10213d;
}

.student-history-item p {
    margin: 0;
    color: #64748b;
}

.student-history-item span {
    color: #64748b;
    white-space: nowrap;
}

.student-history-empty {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    min-height: 140px;
    color: #64748b;
}

.student-history-empty i {
    font-size: 2rem;
}

.archived-tools {
    grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 1200px) {
    .student-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .learner-number-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .student-management-shell {
        padding: 1rem;
    }

    .student-filter-row,
    .archived-tools {
        grid-template-columns: 1fr;
    }

    .student-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-import-inline-body,
    .student-inline-summary {
        display: grid;
    }

    .student-import-inline-body {
        padding: 0 1rem 1rem;
    }

    .student-inline-collapse > .edit-request-grid,
    .student-inline-collapse > .student-empty-state,
    .student-inline-collapse > .student-tab-rail,
    .student-inline-collapse > .student-filter-row,
    .student-inline-collapse > .student-active-filter,
    .student-inline-collapse > .student-table-shell,
    .student-inline-collapse > .student-pagination,
    .student-inline-panel-actions {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* Final display-theme overrides kept at the end so page-specific styles obey the toggle. */
html[data-theme="dark"] body,
html[data-theme="dark"] .site-frame,
html[data-theme="dark"] .admin-dashboard-main,
html[data-theme="dark"] .admin-clean-shell,
html[data-theme="dark"] .workflow-page,
html[data-theme="dark"] .admin-login-page,
html[data-theme="dark"] body.student-portal-page,
html[data-theme="dark"] body.admin-clean-page {
    background: #343840 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .workflow-banner,
html[data-theme="dark"] .stepper-card,
html[data-theme="dark"] .workflow-card,
html[data-theme="dark"] .info-strip,
html[data-theme="dark"] .student-portal-header,
html[data-theme="dark"] .student-portal-card,
html[data-theme="dark"] .portal-feature-card,
html[data-theme="dark"] .portal-field input,
html[data-theme="dark"] .portal-field select,
html[data-theme="dark"] .portal-field textarea,
html[data-theme="dark"] .admin-clean-header,
html[data-theme="dark"] .admin-clean-tabs,
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-clean-panel,
html[data-theme="dark"] .admin-feature-card,
html[data-theme="dark"] .admin-workspace-shell .card,
html[data-theme="dark"] .student-admin-edit-section,
html[data-theme="dark"] .student-admin-edit-fields,
html[data-theme="dark"] .student-stat-card,
html[data-theme="dark"] .learner-number-panel,
html[data-theme="dark"] .student-accounts-card,
html[data-theme="dark"] .student-table-shell,
html[data-theme="dark"] .student-action-menu,
html[data-theme="dark"] .student-modal,
html[data-theme="dark"] .student-history-meta,
html[data-theme="dark"] .parent-panel,
html[data-theme="dark"] .login-choice-card,
html[data-theme="dark"] .mock-email-frame {
    background: #424750 !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .learner-number-summary,
html[data-theme="dark"] .learner-number-row {
    border-color: #64707f !important;
}

html[data-theme="dark"] .learner-number-row {
    background: #343840 !important;
}

html[data-theme="dark"] .workflow-card h1,
html[data-theme="dark"] .workflow-label,
html[data-theme="dark"] .workflow-back,
html[data-theme="dark"] .student-portal-header h1,
html[data-theme="dark"] .student-portal-user strong,
html[data-theme="dark"] .portal-feature-card strong,
html[data-theme="dark"] .parent-panel-header h2,
html[data-theme="dark"] .parent-info-grid dd,
html[data-theme="dark"] .academic-summary-block strong,
html[data-theme="dark"] .learning-material-row strong,
html[data-theme="dark"] .report-status-row strong,
html[data-theme="dark"] .admin-clean-brand h1,
html[data-theme="dark"] .admin-stat-card strong,
html[data-theme="dark"] .admin-feature-card h4,
html[data-theme="dark"] .student-page-intro h2,
html[data-theme="dark"] .student-stat-head,
html[data-theme="dark"] .student-stat-card strong,
html[data-theme="dark"] .student-accounts-header h3,
html[data-theme="dark"] .student-code,
html[data-theme="dark"] .student-empty-state h4,
html[data-theme="dark"] .student-history-meta strong,
html[data-theme="dark"] .student-history-item h6,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-body h1,
html[data-theme="dark"] .modal-body h2,
html[data-theme="dark"] .modal-body h3,
html[data-theme="dark"] .modal-body h4,
html[data-theme="dark"] .modal-body h5,
html[data-theme="dark"] .modal-body h6,
html[data-theme="dark"] .modal-body p,
html[data-theme="dark"] .modal-body span,
html[data-theme="dark"] .modal-body strong,
html[data-theme="dark"] .modal-body label,
html[data-theme="dark"] .mock-email-frame h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] .workflow-subtitle,
html[data-theme="dark"] .workflow-help,
html[data-theme="dark"] .student-portal-header p,
html[data-theme="dark"] .student-portal-titlebar p,
html[data-theme="dark"] .student-portal-user span,
html[data-theme="dark"] .portal-feature-card span,
html[data-theme="dark"] .parent-muted,
html[data-theme="dark"] .parent-info-grid dt,
html[data-theme="dark"] .academic-summary-block span,
html[data-theme="dark"] .learning-material-row span,
html[data-theme="dark"] .report-status-row span,
html[data-theme="dark"] .login-choice-card span,
html[data-theme="dark"] .admin-back-link,
html[data-theme="dark"] .student-page-intro p,
html[data-theme="dark"] .student-stat-card p,
html[data-theme="dark"] .student-accounts-header p,
html[data-theme="dark"] .student-empty-state,
html[data-theme="dark"] .student-empty-state i,
html[data-theme="dark"] .student-history-meta span,
html[data-theme="dark"] .student-history-item p,
html[data-theme="dark"] .student-history-item span,
html[data-theme="dark"] .student-pagination,
html[data-theme="dark"] .mock-email-frame p {
    color: #ffffff !important;
}

html[data-theme="dark"] .workflow-input,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .portal-language-switch select,
html[data-theme="dark"] .admin-language-switch select,
html[data-theme="dark"] .student-search-wrap input,
html[data-theme="dark"] .student-admin-edit-fields input,
html[data-theme="dark"] .student-admin-edit-fields select,
html[data-theme="dark"] .student-admin-edit-fields textarea {
    background: #4d535d !important;
    border-color: #6f7a89 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .workflow-secondary,
html[data-theme="dark"] .student-portal-logout,
html[data-theme="dark"] .portal-documents-button,
html[data-theme="dark"] .section-progress-row,
html[data-theme="dark"] .academic-summary-block,
html[data-theme="dark"] .learning-material-row,
html[data-theme="dark"] .report-status-row,
html[data-theme="dark"] .parent-document-summary div,
html[data-theme="dark"] .student-tab-rail,
html[data-theme="dark"] .student-action-btn,
html[data-theme="dark"] .bypass-step-item {
    background: #4d535d !important;
    border-color: #6f7a89 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-import-panel {
    background: #4a4650 !important;
    border-color: #7a7085 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-import-panel h3,
html[data-theme="dark"] .student-import-panel p {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-tab-pill {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-tab-pill.active {
    background: #5a616d !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-table {
    --bs-table-bg: transparent;
    --bs-table-color: #ffffff;
    --bs-table-border-color: #64707f;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-table thead th {
    background: #4d535d !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-table tbody td {
    background: #424750 !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-action-menu .dropdown-item {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-action-menu .dropdown-item:hover,
html[data-theme="dark"] .student-action-menu .dropdown-item:focus,
html[data-theme="dark"] .student-action-btn:hover {
    background: #5a616d !important;
    color: #86b7ff !important;
}

html[data-theme="dark"] .student-history-item {
    border-color: #64707f !important;
}

html[data-theme="dark"] .admin-action-link {
    background: #4d535d !important;
    border-color: #6f7a89 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .admin-action-link:hover,
html[data-theme="dark"] .admin-action-link:focus {
    background: #5a616d !important;
    border-color: #8a94a3 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .notice-card.green,
html[data-theme="dark"] .workflow-banner.success {
    background: #0f2f25 !important;
    border-color: #166534 !important;
    color: #bbf7d0 !important;
}

html[data-theme="dark"] .notice-card.blue,
html[data-theme="dark"] .parent-access-note {
    background: #102344 !important;
    border-color: #1d4ed8 !important;
    color: #bfdbfe !important;
}

html[data-theme="dark"] .notice-card.yellow,
html[data-theme="dark"] .workflow-banner.warning-soft {
    background: #33240b !important;
    border-color: #92400e !important;
    color: #fde68a !important;
}

html[data-theme="dark"] .parent-viewer-hero {
    background: #0b1b31 !important;
}

html[data-theme="dark"] .parent-viewer-total {
    background: #3f1722 !important;
    color: #fecdd3 !important;
}

html[data-theme="dark"] .parent-viewer-total.is-clear {
    background: #0f2f25 !important;
    color: #bbf7d0 !important;
}

html[data-theme="dark"] .parent-viewer-total.is-progress {
    background: #102344 !important;
    color: #bfdbfe !important;
}

html[data-theme="dark"] body.admin-clean-page :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    strong,
    small,
    label,
    td,
    th,
    a,
    .text-muted,
    .admin-back-link,
    .student-pagination,
    .student-search-wrap i,
    .dropdown-item
):not(.status-pill):not(.admin-role-pill):not(.student-import-btn):not(.text-primary):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info) {
    color: #ffffff !important;
}

html[data-theme="dark"] body.admin-clean-page :where(input, select, textarea)::placeholder {
    color: #ffffff !important;
    opacity: 1;
}

@media (max-width: 768px) {
    .student-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-import-panel,
    .student-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-accounts-header,
    .student-import-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .student-tab-rail {
        grid-template-columns: 1fr;
    }

    .admin-clean-shell > .admin-back-link,
    .admin-clean-shell > .admin-page-intro,
    .admin-clean-shell > .admin-page-card,
    .admin-clean-shell > .sams-import-grid,
    .admin-clean-shell > .student-overview-card,
    .admin-clean-shell > .row,
    .admin-clean-shell > .admin-clean-panel {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 576px) {
    .student-stat-grid,
    .student-history-grid {
        grid-template-columns: 1fr;
    }
}

.applications-shell {
    padding: 2rem 3rem 3rem;
}

.applications-card {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
}

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

.applications-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #10213d;
}

.applications-filter-summary {
    margin: .35rem 0 0;
    color: #64748b;
    font-size: .84rem;
}

.applications-filter-summary strong {
    display: inline-flex;
    margin-left: .35rem;
    padding: .18rem .5rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: .76rem;
}

.applications-export-btn {
    min-height: 40px;
    padding: 0.7rem 1rem;
}

.applications-filter-btn {
    min-height: 48px;
    white-space: nowrap;
}

.applications-filter-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(170px, 0.55fr)) auto;
    gap: 1rem;
    align-items: center;
}

.applications-search-wrap,
.applications-select-wrap {
    position: relative;
}

.applications-search-wrap i,
.applications-select-wrap i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #8a98ab;
    z-index: 1;
}

.applications-search-wrap input,
.applications-select-wrap .form-select {
    min-height: 48px;
    padding-left: 2.8rem;
    border-radius: 14px;
    border-color: #e2e8f0;
    background: #fafbfe;
}

.applications-count {
    margin: 1.3rem 0 1rem;
    color: #5e6f88;
}

.application-doc-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    min-width: 15rem;
}

.application-doc-summary div {
    padding: .42rem .48rem;
    border: 1px solid #e0e8f3;
    border-radius: 8px;
    background: #fbfdff;
}

.application-doc-summary strong {
    display: block;
    color: #10233f;
    font-size: .92rem;
    line-height: 1;
}

.application-doc-summary span {
    color: #64748b;
    font-size: .7rem;
    font-weight: 700;
}

.application-doc-summary .is-warning {
    border-color: #f3d28b;
    background: #fff8e8;
}

.application-doc-summary .is-success {
    border-color: #bfe7cf;
    background: #effcf5;
}

.application-doc-missing {
    margin-top: .35rem;
    max-width: 18rem;
    color: #b13f3f;
    font-size: .72rem;
    line-height: 1.3;
}

.application-doc-link {
    display: inline-flex;
    align-items: center;
    margin-top: .38rem;
    color: #1d4ed8;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.application-doc-link:hover {
    color: #0f3aae;
    text-decoration: underline;
}

.applications-table-shell {
    margin-top: 0;
}

.applications-table tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.applications-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 1250px) {
    .applications-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .applications-filter-btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .applications-shell {
        padding: 1rem;
    }

    .applications-filter-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .applications-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.text-violet {
    color: #9333ea !important;
}

.admin-management-shell {
    padding: 1.25rem 3rem 2.25rem;
}

.admin-workspace-shell {
    padding: 2rem 3rem 3rem;
}

.admin-page-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-page-intro h2 {
    margin: 0 0 0.45rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f2140;
}

.admin-page-intro p {
    margin: 0;
    color: #5e6f88;
    font-size: 0.94rem;
}

.database-stats-banner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.database-stats-banner .btn {
    flex: 0 0 auto;
}

.admin-page-intro-split {
    margin-bottom: 1.5rem;
}

.admin-register-btn {
    color: #fff;
    background: #981b45;
    border-color: #981b45;
    border-radius: 10px;
    padding: 0.58rem 0.85rem;
    font-size: 0.9rem;
}

.admin-register-btn:hover,
.admin-register-btn:focus {
    color: #fff;
    background: #7f1439;
    border-color: #7f1439;
}

.admin-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-advanced-launcher {
    margin-bottom: 1.5rem;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.admin-advanced-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    cursor: pointer;
    list-style: none;
}

.admin-advanced-summary::-webkit-details-marker {
    display: none;
}

.admin-advanced-summary h4 {
    margin: 0 0 0.35rem;
    color: #0f2140;
}

.admin-advanced-summary p {
    margin: 0;
    color: #60708a;
}

.admin-advanced-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.82rem;
}

.admin-advanced-launcher[open] .admin-advanced-toggle {
    background: #e8f8ee;
    color: #15803d;
}

.admin-launcher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.admin-launcher-link {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 138px;
    padding: 1.1rem;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #fbfdff;
    color: #17304f;
    text-decoration: none;
}

.admin-launcher-link:hover {
    border-color: #bfd4ef;
    background: #f5f9ff;
    color: #0d6efd;
}

.admin-launcher-link i {
    font-size: 1.3rem;
    color: #2563eb;
}

.admin-launcher-link strong {
    font-size: 1rem;
}

.admin-launcher-link span {
    color: #64748b;
    font-size: 0.9rem;
}

.admin-role-card {
    min-height: 96px;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
}

.admin-role-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #22344f;
    font-size: 0.88rem;
}

.admin-role-head i {
    font-size: 1rem;
}

.admin-role-card strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: #101828;
}

.admin-section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.15rem;
    margin-bottom: 0.75rem;
}

.admin-section-heading h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #10213d;
}

.admin-section-heading span {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #f3e8ff;
    color: #9333ea;
    font-size: 0.78rem;
    border: 0;
    box-shadow: none;
}

.security-heading span {
    background: #fee2e2;
    color: #dc2626;
}

.admin-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.admin-security-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.admin-feature-card {
    padding: 0;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #fff;
    overflow: hidden;
}

.admin-feature-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.78rem 1rem;
    background: #1f252d;
    color: #fff;
}

.admin-feature-top h4 {
    margin: 0;
    font-size: 0.96rem;
    color: inherit;
}

.admin-feature-top p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.84rem;
}

.admin-feature-card > p,
.admin-feature-note {
    color: #5e6f88;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0.85rem 1rem;
}

.tone-purple {
    border-color: #d8b4fe;
}

.tone-blue {
    border-color: #bfdbfe;
}

.tone-amber {
    border-color: #fcd34d;
}

.tone-green {
    border-color: #86efac;
}

.tone-red {
    border-color: #fca5a5;
}

.tone-blue .admin-feature-top {
    background: #1d4ed8;
}

.tone-purple .admin-feature-top {
    background: #6d28d9;
}

.tone-amber .admin-feature-top {
    background: #92400e;
}

.tone-green .admin-feature-top {
    background: #047857;
}

.tone-red .admin-feature-top {
    background: #b91c1c;
}

.admin-hub-card .admin-feature-top {
    background: #1f252d;
}

.admin-feature-btn {
    width: calc(100% - 2rem);
    min-height: 36px;
    margin: 0 1rem 1rem;
    border-radius: 10px;
    border: 1px solid currentColor;
    background: #fff;
    color: #10213d;
    font-size: 0.88rem;
    font-weight: 700;
}

.admin-migration-btn {
    width: calc(100% - 2rem);
    min-height: 38px;
    margin: 0 1rem 1rem;
    color: #fff;
    background: #f45d01;
    border-color: #f45d01;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
}

.admin-migration-btn:hover,
.admin-migration-btn:focus {
    color: #fff;
    background: #d94e00;
    border-color: #d94e00;
}

.admin-warning-box,
.admin-security-summary {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0.85rem 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    font-size: 0.88rem;
}

.admin-warning-box {
    border: 1px solid #fcd34d;
    background: #fffbea;
    color: #92400e;
}

.admin-security-summary {
    border: 1px solid #fecaca;
    background: #fff;
    color: #7f1d1d;
}

.admin-version-list {
    display: grid;
    gap: 0.5rem;
    margin: 0.85rem 1rem;
}

.admin-version-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #44556e;
    font-size: 0.88rem;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.85rem;
}

.version-updates-shell {
    display: grid;
    gap: 1.25rem;
}

.version-release-hero {
    align-items: stretch;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    padding: 1.25rem;
}

.version-release-kicker {
    color: #2563eb;
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.version-release-hero h3 {
    color: #0f2140;
    font-size: 1.75rem;
    font-weight: 850;
    margin: 0 0 0.4rem;
}

.version-release-hero p {
    color: #5e6f88;
    margin: 0;
}

.version-release-meta {
    display: grid;
    gap: 0.6rem;
}

.version-release-meta div,
.version-summary-card {
    background: #f8fbff;
    border: 1px solid #e1e9f3;
    border-radius: 8px;
    padding: 0.75rem;
}

.version-release-meta span,
.version-summary-head span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.version-release-meta strong {
    color: #0f172a;
    display: block;
    margin-top: 0.18rem;
}

.version-summary-grid {
    display: grid;
    gap: 1rem;
}

.version-summary-card {
    background: #fff;
    padding: 1.15rem;
}

.version-summary-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.version-release-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.version-type-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
}

.version-type-major {
    background: #fee2e2;
    color: #991b1b;
}

.version-type-minor {
    background: #dbeafe;
    color: #1e3a8a;
}

.version-type-patch {
    background: #dcfce7;
    color: #166534;
}

.version-type-release {
    background: #e2e8f0;
    color: #334155;
}

.version-summary-head h3 {
    color: #0f2140;
    font-size: 1.1rem;
    margin: 0.2rem 0 0;
}

.version-summary-head strong {
    color: #2563eb;
    white-space: nowrap;
}

.version-summary-card p {
    color: #5e6f88;
    margin: 0.75rem 0;
}

.version-summary-card ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.1rem;
}

.version-summary-card li {
    color: #263b5a;
}

.admin-accounts-card {
    margin-top: 1.6rem;
}

.admin-accounts-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 1rem;
    margin-top: 1.4rem;
    align-items: center;
}

.admin-role-status.role-grand_admin,
.admin-role-status.role-super_admin {
    background: #981b45;
    color: #fff;
}

.admin-role-status.role-admin {
    background: #475569;
    color: #fff;
}

.admin-role-status.role-viewer {
    background: #ede9fe;
    color: #7c3aed;
}

.admin-you-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    margin-left: 0.5rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.78rem;
}

.admin-own-account {
    color: #94a3b8;
}

.admin-pin-item {
    align-items: center;
}

.admin-page-card {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
    overflow: hidden;
}

.admin-page-card-narrow {
    max-width: 860px;
}

.admin-page-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    color: #fff;
}

.admin-page-card-head h3 {
    margin: 0;
    font-size: 1.65rem;
}

.admin-page-card-head.primary {
    background: linear-gradient(135deg, #2d7cff 0%, #0d6efd 100%);
}

.admin-page-card-head.success {
    background: linear-gradient(135deg, #27b36a 0%, #1f8f54 100%);
}

.admin-page-card-head.dark {
    background: #1f2937;
}

.admin-page-card-head.with-action {
    flex-wrap: wrap;
}

.admin-page-card-body {
    padding: 1.5rem;
}

.admin-page-inline-btn {
    min-height: auto;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #fff;
    color: #0f172a;
    font-weight: 700;
}

.admin-page-inline-btn:hover,
.admin-page-inline-btn:focus {
    background: #f8fafc;
    color: #0f172a;
    border-color: #e2e8f0;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.admin-kpi-card {
    position: relative;
    min-height: 138px;
    padding: 1.25rem 1.35rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #2f80ff 0%, #1d4ed8 100%);
    color: #fff;
    overflow: hidden;
}

.admin-kpi-card span,
.admin-kpi-card strong {
    position: relative;
    z-index: 1;
}

.admin-kpi-card span {
    display: block;
    font-size: 1rem;
    opacity: 0.92;
}

.admin-kpi-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 2.2rem;
    font-weight: 800;
}

.admin-kpi-card i {
    position: absolute;
    right: 1.25rem;
    top: 1rem;
    font-size: 3rem;
    opacity: 0.26;
}

.admin-kpi-card.tone-primary {
    background: linear-gradient(135deg, #2f80ff 0%, #1d4ed8 100%);
}

.admin-kpi-card.tone-success {
    background: linear-gradient(135deg, #28a96b 0%, #15803d 100%);
}

.admin-kpi-card.tone-danger {
    background: linear-gradient(135deg, #f0435c 0%, #dc2626 100%);
}

.admin-kpi-card.tone-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
}

.admin-kpi-card.admin-kpi-card-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

@media (max-width: 900px) {
    .admin-management-shell {
        padding: 1rem;
    }

    .admin-workspace-shell {
        padding: 1rem;
    }

    .admin-page-intro,
    .admin-role-grid,
    .admin-feature-grid,
    .admin-accounts-filter-row,
    .admin-launcher-grid,
    .version-release-hero,
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-page-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .database-stats-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-role-grid,
    .admin-feature-grid {
        display: grid;
    }

    .admin-page-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

.bypass-shell {
    padding: 2rem 3rem 3rem;
}

.bypass-subcopy {
    margin: 0 0 1rem;
    color: #42536d;
    font-size: 1.02rem;
}

.bypass-main-card,
.bypass-howto-card {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e8cfff;
    border-radius: 20px;
}

.bypass-main-card.empty {
    text-align: center;
}

.bypass-empty-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f5ebff;
    color: #a855f7;
    font-size: 2.4rem;
}

.bypass-main-card h2 {
    margin: 0 0 0.65rem;
    font-size: 1.55rem;
    color: #0f2140;
}

.bypass-main-card p {
    color: #55657e;
    font-size: 0.96rem;
}

.bypass-generate-form {
    max-width: 560px;
    margin: 1.4rem auto 1.8rem;
}

.bypass-generate-controls,
.bypass-regenerate-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.bypass-uses-input {
    max-width: 140px;
}

.bypass-primary-btn,
.bypass-regenerate-btn {
    color: #fff;
    background: #8b1cf6;
    border-color: #8b1cf6;
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
}

.bypass-primary-btn:hover,
.bypass-primary-btn:focus,
.bypass-regenerate-btn:hover,
.bypass-regenerate-btn:focus {
    color: #fff;
    background: #7c3aed;
    border-color: #7c3aed;
}

.bypass-info-grid,
.bypass-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.bypass-info-card,
.bypass-status-card {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid #ead5ff;
    background: #faf5ff;
}

.bypass-info-card h3,
.bypass-status-card span {
    color: #7c3aed;
    font-size: 0.98rem;
}

.bypass-card-header h2 {
    font-size: 1.08rem;
    margin-bottom: 0.35rem;
}

.bypass-pin-panel {
    margin-top: 1rem;
    padding: 1.15rem;
    border: 1px solid #ead5ff;
    border-radius: 18px;
    background: #faf5ff;
}

.bypass-pin-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.85rem;
}

.bypass-pin-head h3 {
    margin: 0;
    color: #6b21a8;
    font-size: 0.98rem;
    white-space: nowrap;
}

.bypass-action-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    margin-left: auto;
}

.bypass-action-row form {
    margin: 0;
}

.bypass-email-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: nowrap;
}

.bypass-email-input {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    min-height: 34px;
    border-radius: 12px;
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
}

.bypass-action-btn {
    min-height: 34px;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    border: 1px solid #d9dfeb;
    background: #fff;
    color: #10213d;
    font-size: 0.84rem;
    white-space: nowrap;
}

.bypass-code-box {
    padding: 1rem 1.1rem;
    border: 2px solid #c084fc;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.bypass-code-box span {
    display: block;
    margin-bottom: 0.45rem;
    color: #9333ea;
    font-size: 0.68rem;
}

.bypass-code-box strong {
    font-size: 1.95rem;
    letter-spacing: 0.08em;
    color: #6b21a8;
}

.bypass-status-card strong {
    display: block;
    margin-top: 0.4rem;
    color: #0f172a;
    font-size: 1.15rem;
    line-height: 1.2;
}

.bypass-status-card small {
    font-size: 0.78rem;
}

.bypass-regenerate-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid #fde68a;
    border-radius: 16px;
    background: #fff7db;
}

.bypass-regenerate-strip h3 {
    margin: 0 0 0.25rem;
    color: #92400e;
    font-size: 0.92rem;
}

.bypass-regenerate-strip p,
.bypass-status-card p {
    margin: 0.25rem 0 0;
    font-size: 0.84rem;
    line-height: 1.45;
}

.bypass-howto-card {
    margin-top: 1.4rem;
    border-color: #bfdbfe;
    background: #fff;
}

.bypass-howto-card h3 {
    margin: 0 0 1rem;
    color: #0f2140;
    font-size: 1.02rem;
}

.bypass-step-list {
    display: grid;
    gap: 0.8rem;
}

.bypass-step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: #eff6ff;
}

.bypass-step-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.bypass-step-item p {
    margin: 0;
    color: #17335d;
    font-size: 0.94rem;
}

.mock-email-frame {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fcfdff;
}

.mock-email-frame h2 {
    margin-top: 0;
    color: #10213d;
}

.mock-email-frame p {
    color: #44556e;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .bypass-shell {
        padding: 1rem;
    }

    .bypass-pin-head,
    .bypass-regenerate-strip,
    .bypass-generate-controls,
    .bypass-regenerate-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bypass-info-grid,
    .bypass-status-grid {
        grid-template-columns: 1fr;
    }

    .bypass-uses-input {
        max-width: none;
    }

    .bypass-email-input {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .bypass-action-row,
    .bypass-email-form {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
    }
}

/* Authoritative dark-mode portal harmonizer. Keep this block last. */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .site-frame,
html[data-theme="dark"] main,
html[data-theme="dark"] .admin-dashboard-main,
html[data-theme="dark"] .admin-clean-shell,
html[data-theme="dark"] .admin-workspace-shell,
html[data-theme="dark"] .applications-shell,
html[data-theme="dark"] .student-detail-shell,
html[data-theme="dark"] .student-portal-main,
html[data-theme="dark"] .student-portal-shell,
html[data-theme="dark"] .compact-portal-shell,
html[data-theme="dark"] .parent-viewer-shell {
    background: #343840 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .admin-clean-header,
html[data-theme="dark"] .admin-clean-tabs,
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-clean-panel,
html[data-theme="dark"] .admin-accounts-card,
html[data-theme="dark"] .applications-card,
html[data-theme="dark"] .admin-advanced-launcher,
html[data-theme="dark"] .admin-launcher-link,
html[data-theme="dark"] .admin-role-card,
html[data-theme="dark"] .admin-feature-card,
html[data-theme="dark"] .system-maintenance-panel,
html[data-theme="dark"] .system-maintenance-status,
html[data-theme="dark"] .student-stat-card,
html[data-theme="dark"] .student-accounts-card,
html[data-theme="dark"] .student-table-shell,
html[data-theme="dark"] .student-overview-card,
html[data-theme="dark"] .student-admin-edit-section,
html[data-theme="dark"] .student-doc-item,
html[data-theme="dark"] .student-request-item,
html[data-theme="dark"] .student-subpanel,
html[data-theme="dark"] .student-history-meta,
html[data-theme="dark"] .student-portal-header,
html[data-theme="dark"] .student-portal-card,
html[data-theme="dark"] .portal-feature-card,
html[data-theme="dark"] .portal-document-card,
html[data-theme="dark"] .portal-side-card,
html[data-theme="dark"] .portal-side-item,
html[data-theme="dark"] .portal-side-note,
html[data-theme="dark"] .portal-empty-state,
html[data-theme="dark"] .parent-panel,
html[data-theme="dark"] .parent-access-note,
html[data-theme="dark"] .parent-document-summary div,
html[data-theme="dark"] .bypass-status-card,
html[data-theme="dark"] .bypass-generate-card,
html[data-theme="dark"] .bypass-howto-card,
html[data-theme="dark"] .bypass-code-box,
html[data-theme="dark"] .mock-email-frame,
html[data-theme="dark"] .card:not(.bg-success):not(.bg-warning):not(.bg-danger):not(.bg-info),
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item {
    background: #424750 !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .admin-launcher-link:hover,
html[data-theme="dark"] .admin-launcher-link:focus,
html[data-theme="dark"] .admin-action-link:hover,
html[data-theme="dark"] .admin-action-link:focus,
html[data-theme="dark"] .admin-feature-btn:hover,
html[data-theme="dark"] .admin-feature-btn:focus,
html[data-theme="dark"] .student-action-btn:hover,
html[data-theme="dark"] .student-action-btn:focus,
html[data-theme="dark"] .portal-mini-button:hover,
html[data-theme="dark"] .portal-mini-button:focus {
    background: #5a616d !important;
    border-color: #8a94a3 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .admin-language-switch select,
html[data-theme="dark"] .portal-language-switch select,
html[data-theme="dark"] .applications-search-wrap input,
html[data-theme="dark"] .applications-select-wrap .form-select,
html[data-theme="dark"] .student-search-wrap input,
html[data-theme="dark"] .student-admin-field input,
html[data-theme="dark"] .student-admin-field select,
html[data-theme="dark"] .student-admin-field textarea,
html[data-theme="dark"] .portal-field input,
html[data-theme="dark"] .portal-field select,
html[data-theme="dark"] .portal-field textarea,
html[data-theme="dark"] .admin-action-link,
html[data-theme="dark"] .admin-feature-btn,
html[data-theme="dark"] .student-action-btn,
html[data-theme="dark"] .portal-mini-button,
html[data-theme="dark"] .portal-documents-button,
html[data-theme="dark"] .student-portal-logout,
html[data-theme="dark"] .workflow-secondary,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .student-tab-rail,
html[data-theme="dark"] .bypass-step-item,
html[data-theme="dark"] .bypass-action-btn,
html[data-theme="dark"] .bypass-regenerate-strip,
html[data-theme="dark"] .system-maintenance-progress {
    background: #4d535d !important;
    border-color: #6f7a89 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-tab-pill.active {
    background: #5a616d !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .table,
html[data-theme="dark"] .student-table {
    --bs-table-bg: #424750 !important;
    --bs-table-color: #ffffff !important;
    --bs-table-border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .table > :not(caption) > * > *,
html[data-theme="dark"] .student-table tbody td {
    background: #424750 !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .student-table thead th {
    background: #4d535d !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

html[data-theme="dark"] :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    strong,
    small,
    label,
    dt,
    dd,
    li,
    td,
    th,
    a,
    .text-muted,
    .card-title,
    .card-text,
    .dropdown-item,
    .admin-back-link,
    .admin-clean-panel-title,
    .admin-page-intro,
    .applications-count,
    .student-pagination,
    .portal-side-copy,
    .parent-muted
):not(.badge):not(.status-pill):not(.admin-role-pill):not(.state-pill):not(.version-badge):not(.text-primary):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info):not(.text-violet):not(.btn):not([class*="btn-"]) {
    color: #ffffff !important;
}

html[data-theme="dark"] :where(input, select, textarea)::placeholder {
    color: #ffffff !important;
    opacity: 1;
}

html[data-theme="dark"] .tone-purple,
html[data-theme="dark"] .tone-blue,
html[data-theme="dark"] .tone-amber,
html[data-theme="dark"] .tone-green,
html[data-theme="dark"] .tone-red,
html[data-theme="dark"] .student-import-panel,
html[data-theme="dark"] .admin-warning-box,
html[data-theme="dark"] .admin-security-summary,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .workflow-banner,
html[data-theme="dark"] .notification-ack-message {
    background: #424750 !important;
    border-color: #64707f !important;
    color: #ffffff !important;
}

.iso-date-control {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
}

.iso-date-control .iso-date-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 3.25rem !important;
}

.iso-date-picker-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #42536d;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    min-width: 3rem;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.iso-date-picker-button:hover,
.iso-date-picker-button:focus {
    color: #2563eb;
}

.iso-date-native-picker {
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 1px !important;
}

.iso-date-input:invalid:not(:placeholder-shown) {
    border-color: #dc2626 !important;
}

html[data-theme="dark"] .iso-date-picker-button {
    color: #ffffff !important;
}

