/* VIIT V8 — one light/dark design system for every Admin and Student screen */
:root {
    color-scheme: light;
    --portal-bg: #f5f7fc;
    --portal-surface: #ffffff;
    --portal-surface-2: #f8faff;
    --portal-surface-3: #f1f4fa;
    --portal-text: #111827;
    --portal-muted: #667085;
    --portal-line: #dfe5ef;
    --portal-accent: #ad0038;
    --portal-accent-soft: #fff0f5;
    --portal-shadow: 0 12px 32px rgba(29,42,69,.07);
}

html[data-bs-theme="dark"] {
    color-scheme: dark;
    --portal-bg: #060b14;
    --portal-surface: #0b131f;
    --portal-surface-2: #0f1928;
    --portal-surface-3: #142033;
    --portal-text: #f2f5fa;
    --portal-muted: #9eabbc;
    --portal-line: #283649;
    --portal-accent: #ff3d75;
    --portal-accent-soft: rgba(255,61,117,.12);
    --portal-shadow: 0 15px 38px rgba(0,0,0,.28);
    --bg: var(--portal-bg);
    --panel: var(--portal-surface);
    --ink: var(--portal-text);
    --muted: var(--portal-muted);
    --line: var(--portal-line);
    --viit-bg: var(--portal-bg);
    --viit-card: var(--portal-surface);
    --viit-ink: var(--portal-text);
    --viit-muted: var(--portal-muted);
    --viit-line: var(--portal-line);
    --att-card: var(--portal-surface);
    --att-soft: var(--portal-surface-2);
    --att-ink: var(--portal-text);
    --att-muted: var(--portal-muted);
    --att-line: var(--portal-line);
    --fee-bg: var(--portal-bg);
    --fee-text: var(--portal-text);
    --fee-muted: var(--portal-muted);
    --fee-line: var(--portal-line);
    --oe-bg: var(--portal-bg);
    --oe-text: var(--portal-text);
    --oe-muted: var(--portal-muted);
    --oe-border: var(--portal-line);
    --rd-bg: var(--portal-bg);
    --rd-ink: var(--portal-text);
    --rd-muted: var(--portal-muted);
    --report-surface: var(--portal-surface);
    --report-line: var(--portal-line);
    --sma-bg: var(--portal-bg);
    --sma-text: var(--portal-text);
    --sma-muted: var(--portal-muted);
    --sma-border: var(--portal-line);
}

/* Shared switch used on stand-alone student pages. */
.portal-theme-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.10);
    cursor: pointer;
}

.portal-theme-toggle:hover { background: rgba(255,255,255,.18); }
.oe-theme-actions { display:flex; align-items:center; gap:9px; }
.id-head-actions { display:flex; align-items:center; gap:9px; }
.viit-id-card-page .portal-theme-toggle { border-color:#e3cbd3; color:#850029; background:#fff; box-shadow:0 8px 22px rgba(70,0,22,.08); }
html[data-bs-theme="dark"] .viit-id-card-page .portal-theme-toggle { border-color:var(--portal-line); color:#fff; background:var(--portal-surface); }

/* -------------------------- ADMIN: ALL MODULES -------------------------- */
html[data-bs-theme="dark"] body.app-shell,
html[data-bs-theme="dark"] body.app-shell .app-main,
html[data-bs-theme="dark"] body.app-shell .content-area {
    color: var(--portal-text) !important;
    background-color: var(--portal-bg) !important;
}

html[data-bs-theme="dark"] body.app-shell .content-area {
    background-image:
        radial-gradient(circle at 98% 0,rgba(176,0,56,.12),transparent 25%),
        radial-gradient(circle at 0 100%,rgba(34,92,170,.08),transparent 29%) !important;
}

html[data-bs-theme="dark"] body.app-shell :where(
    .panel,.card,.admin-card,.dashboard-head,.modal-content,.offcanvas,
    .list-group-item,.accordion-item,.accordion-button,.tab-content,
    .dataTables_wrapper,.dt-container,.empty-state
) {
    border-color: var(--portal-line) !important;
    color: var(--portal-text) !important;
    background-color: var(--portal-surface) !important;
}

html[data-bs-theme="dark"] body.app-shell :where(
    .panel,.card,.admin-card,.modal-content,.offcanvas
) { box-shadow: var(--portal-shadow) !important; }

html[data-bs-theme="dark"] body.app-shell :where(h1,h2,h3,h4,h5,h6,strong,b,label,legend,.form-label,.card-title,.panel-title) {
    color: var(--portal-text) !important;
}

html[data-bs-theme="dark"] body.app-shell :where(p,small,.text-muted,.form-text,.help-text,.subtitle) {
    color: var(--portal-muted) !important;
}

html[data-bs-theme="dark"] body.app-shell :where(.form-control,.form-select,.form-check-input,.input-group-text,.form-range,.dt-input) {
    border-color: #334258 !important;
    color: var(--portal-text) !important;
    background-color: #111c2c !important;
}

html[data-bs-theme="dark"] body.app-shell :where(.form-control,.form-select,.dt-input)::placeholder { color:#78869a !important; }
html[data-bs-theme="dark"] body.app-shell .form-control:disabled,
html[data-bs-theme="dark"] body.app-shell .form-control[readonly],
html[data-bs-theme="dark"] body.app-shell .form-select:disabled { background:#192437 !important; color:#9da9ba !important; }
html[data-bs-theme="dark"] body.app-shell input[type="file"]::file-selector-button { color:#eef2f7; background:#26344a; border-color:#3b4b63; }

html[data-bs-theme="dark"] body.app-shell .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--portal-text);
    --bs-table-border-color: var(--portal-line);
    --bs-table-striped-bg: rgba(255,255,255,.022);
    --bs-table-striped-color: var(--portal-text);
    --bs-table-hover-bg: #142033;
    --bs-table-hover-color: #fff;
    color: var(--portal-text) !important;
}

html[data-bs-theme="dark"] body.app-shell .table > :not(caption) > * > * { border-color:var(--portal-line) !important; background-color:transparent !important; color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.app-shell .table thead th { color:#f3cf6a !important; background:#151f30 !important; }
html[data-bs-theme="dark"] body.app-shell :where(.pagination,.dt-paging) .page-link,
html[data-bs-theme="dark"] body.app-shell .dt-paging-button { border-color:#324157 !important; color:#dce3ed !important; background:#111c2c !important; }
html[data-bs-theme="dark"] body.app-shell :where(.pagination,.dt-paging) .active .page-link,
html[data-bs-theme="dark"] body.app-shell .dt-paging-button.current { color:#fff !important; background:#9e0033 !important; border-color:#d1265d !important; }

html[data-bs-theme="dark"] body.app-shell :where(.dropdown-menu,.select2-dropdown,.choices__list--dropdown) {
    border-color:var(--portal-line) !important;
    color:var(--portal-text) !important;
    background:var(--portal-surface-2) !important;
}
html[data-bs-theme="dark"] body.app-shell :where(.dropdown-item,.select2-results__option) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.dropdown-item:hover,.dropdown-item:focus) { background:#1c293d !important; }
html[data-bs-theme="dark"] body.app-shell :where(.nav-tabs,.nav-pills) { border-color:var(--portal-line) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.nav-tabs .nav-link,.nav-pills .nav-link) { color:#bac4d2; }
html[data-bs-theme="dark"] body.app-shell .nav-tabs .nav-link.active { border-color:var(--portal-line) var(--portal-line) var(--portal-surface) !important; color:#fff !important; background:var(--portal-surface) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.alert-light,.alert-secondary) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:#131e2e !important; }
html[data-bs-theme="dark"] body.app-shell hr { border-color:var(--portal-line); opacity:1; }
html[data-bs-theme="dark"] body.app-shell .btn-close { filter:invert(1) grayscale(1); }

/* Attendance module */
html[data-bs-theme="dark"] body.app-shell :where(
    .att-metric-grid article,.att-module-tabs,.att-live-panel,.att-register-panel,
    .att-method-panel,.att-monitor-panel,.att-manual-panel,.att-selector-panel,
    .att-settings-form,.att-settings-help,.att-setup-item,.att-scanner-card,
    .att-scan-result-panel,.att-location-preview,.att-student-row,.att-sticky-save
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.att-live-times div,.att-toggle-grid label,.att-quick-toggle,.att-scan-rules,.att-monitor-footer) { border-color:var(--portal-line) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.app-shell .att-student-table thead th { background:#151f30 !important; color:#f3cf6a !important; }

/* Fees module */
html[data-bs-theme="dark"] body.app-shell .fee-pro-page .content-area { background:var(--portal-bg) !important; }
html[data-bs-theme="dark"] body.app-shell :where(
    .fee-stat-grid article,.fee-section-tabs,.fee-panel,.fee-request-card,
    .fee-selected-student,.fee-upi-card,.fee-check
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.fee-rule-list div,.fee-summary-strip div,.fee-request-data span,.fee-table thead th,.fee-timeline article) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.fee-stat-grid strong,.fee-summary-strip strong,.fee-request-data strong,.fee-empty strong) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.app-shell .fee-section-tabs a { color:#c0c9d6; }

/* Settings, branches and staff */
html[data-bs-theme="dark"] body.app-shell :where(
    .settings-card,.settings-form-panel,.settings-notice,.settings-save-bar,
    .setting-toggle-card,.control-tile,.staff-profile-mini,.permission-matrix,
    .gps-test-box
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.settings-card-icon,.form-switch-pro,.permission-matrix th,.permission-matrix td) { border-color:var(--portal-line) !important; }

/* Online exam administration */
html[data-bs-theme="dark"] body.app-shell :where(
    .oe-panel,.oe-module,.oe-kpi,.oe-switch-card,.oe-form-section,
    .oe-question-preview,.oe-answer-review,.oe-monitor-row,.oe-import-result
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.oe-panel-head,.oe-question-meta,.oe-switch-grid) { border-color:var(--portal-line) !important; background:var(--portal-surface-2) !important; }

/* Results, certificates and documents */
html[data-bs-theme="dark"] body.app-shell :where(
    .rd-kpi,.rd-panel,.rd-form-card,.rd-document-card,.rd-template-option,
    .rd-asset-preview,.rd-lock-banner
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.rd-table thead th,.rd-marks-grid > div,.rd-total-cell) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }

/* Reports and bulk ID selection (the actual printable cards remain white). */
html[data-bs-theme="dark"] body.app-shell :where(.report-tabs a,.report-filter,.report-metrics article,.report-metrics > a,.report-table-panel,.report-category-grid a,.column-picker label,.bar-track) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; }
html[data-bs-theme="dark"] body.app-shell :where(.bulk-id-toolbar,.bulk-student-selector,.bulk-card-preview-panel,.bulk-student-row) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }

html[data-bs-theme="dark"] body.app-shell .mobile-bottom-nav {
    border-color:var(--portal-line) !important;
    color:#aeb8c6 !important;
    background:rgba(8,15,25,.98) !important;
    box-shadow:0 -10px 30px rgba(0,0,0,.30) !important;
}
html[data-bs-theme="dark"] body.app-shell .mobile-bottom-nav a { color:#aeb8c6 !important; }
html[data-bs-theme="dark"] body.app-shell .mobile-bottom-nav a.active { color:#ff4a7e !important; background:rgba(156,10,61,.16) !important; }

/* ------------------------- STUDENT: ALL VIEWS -------------------------- */
.student-login-card { position:relative; }
.student-login-theme { position:absolute; top:15px; right:15px; width:42px; height:42px; border-radius:12px; }
html[data-bs-theme="dark"] body.student-portal-body .student-login-page { color:var(--portal-text) !important; background:radial-gradient(circle at 90% 5%,rgba(175,0,56,.18),transparent 30%),var(--portal-bg) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-login-card { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-login-card :where(h1,label) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-login-card p { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-login-card :where(input,select) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }

html[data-bs-theme="dark"] body.student-portal-body,
html[data-bs-theme="dark"] body.student-portal-body .student-main,
html[data-bs-theme="dark"] body.student-portal-body .student-content,
html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content,
html[data-bs-theme="dark"] body.student-portal-body .sma-page-body {
    color:var(--portal-text) !important;
    background-color:var(--portal-bg) !important;
}

html[data-bs-theme="dark"] body.student-portal-body :where(
    .student-card,.student-attendance-summary-card,.student-attendance-history,
    .student-exam-card,.student-fee-row,.student-document-row,.student-profile-grid > div,
    .student-settings-form,.student-table-wrap
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }

html[data-bs-theme="dark"] body.student-portal-body :where(
    .student-table,.student-attendance-history,.student-exam-list,.student-card table
) { color:var(--portal-text) !important; --bs-table-color:var(--portal-text); --bs-table-bg:transparent; --bs-table-border-color:var(--portal-line); }
html[data-bs-theme="dark"] body.student-portal-body :where(.student-card input,.student-card select,.student-card textarea) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }
html[data-bs-theme="dark"] body.student-portal-body :where(.student-card h1,.student-card h2,.student-card h3,.student-card strong,.student-card b,.student-card label) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.student-portal-body :where(.student-card p,.student-card small,.student-card span.text-muted) { color:var(--portal-muted) !important; }

html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content :where(
    .sma-section,.sma-profile-panel,.sma-exam-card,.sma-ticket,.sma-form,
    .sma-attendance-summary,.sma-today-attendance,.sma-live-attendance-card,
    .sma-fee-summary,.sma-fee-clear,.sma-fee-request-pending,.sma-support-hero,
    .sma-settings-list,.sma-empty
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }

html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content :where(
    .sma-list-row,.sma-history-row,.sma-payment-row,.sma-progress-row,
    .sma-material-list > a,.sma-message-list > a,.sma-notification-list > a,
    .sma-fee-installment-list > div,.sma-settings-list > a,.sma-profile-activity-list > a,
    .sma-profile-link-grid > a,.sma-profile-info-grid > div,.sma-profile-overview-grid > div,
    .sma-exam-meta > span,.sma-guidelines,.sma-fee-lines > div
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }

html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content :where(
    h1,h2,h3,strong,b,label,.sma-section-title,.sma-exam-title
) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content :where(p,small,.sma-subtitle,.sma-list-row span,.sma-history-row span) { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.student-portal-body .student-mobile-content :where(input,select,textarea,.sma-search) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }
html[data-bs-theme="dark"] body.student-portal-body .sma-segmented { border-color:var(--portal-line) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.student-portal-body .sma-segmented a.active { color:#fff !important; background:linear-gradient(135deg,#7f0028,#b90040) !important; }
html[data-bs-theme="dark"] body.student-portal-body .sma-filter-pills a { border-color:var(--portal-line) !important; color:#c2ccd9 !important; background:var(--portal-surface) !important; }
html[data-bs-theme="dark"] body.student-portal-body .sma-filter-pills a.active { color:#fff !important; background:#a60038 !important; }

/* ------------------- STAND-ALONE EXAM / RESULT PAGES ------------------- */
html[data-bs-theme="dark"] body.oe-student-body { color:var(--portal-text) !important; background:var(--portal-bg) !important; }
html[data-bs-theme="dark"] body.oe-student-body .oe-exam-topbar { border-color:#b10b45 !important; color:var(--portal-text) !important; background:#0a121e !important; box-shadow:0 8px 28px rgba(0,0,0,.28) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.oe-exam-name,.oe-brand strong,.oe-portal-title strong,.oe-header-stat strong,.oe-student-chip strong) { color:#f5f7fb !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.oe-brand span,.oe-portal-title span,.oe-header-stat span,.oe-student-chip small) { color:#a7b2c1 !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(
    .oe-panel,.oe-kpi,.oe-question-panel,.oe-question-body,.oe-navigator,.oe-question-card,
    .oe-answer-card,.oe-answer-option,.oe-answer-summary,.modal-content
) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.oe-option,.oe-nav-legends,.oe-nav-summary,.oe-mobile-student-bar,.oe-language-line .lang) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.oe-option-text,.oe-question-text,.oe-panel h2,.oe-answer-card h3,.oe-language-line .text,.oe-option-key) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.oe-language-line.english .text,.oe-option-languages .en,.text-muted) { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.oe-student-body .oe-option:has(input:checked) { border-color:#ff3e78 !important; background:rgba(255,61,117,.10) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(.alert-light,.alert-secondary) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.oe-student-body :where(textarea,.form-control,.form-select) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }
html[data-bs-theme="dark"] body.oe-student-body .btn-close { filter:invert(1) grayscale(1); }

/* ID-card workspace only: generated/printed cards intentionally stay light. */
html[data-bs-theme="dark"] body.viit-id-card-page { color:var(--portal-text) !important; background:radial-gradient(circle at 10% 0,rgba(175,0,56,.16),transparent 28%),var(--portal-bg) !important; }
html[data-bs-theme="dark"] body.viit-id-card-page .id-page-title h1,
html[data-bs-theme="dark"] body.viit-id-card-page .id-page-title small { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.viit-id-card-page .id-page-head .id-back-link { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; }

/* Admin and student sign-in screens. */
.auth-theme-toggle { position:fixed; top:14px; left:14px; z-index:9999; color:#850029; border-color:#ead3da; background:rgba(255,255,255,.94); box-shadow:0 12px 32px rgba(48,0,17,.14); }
html[data-bs-theme="dark"] .auth-theme-toggle { color:#fff; border-color:var(--portal-line); background:rgba(11,19,31,.95); }
html[data-bs-theme="dark"] body.viit-admin-auth,
html[data-bs-theme="dark"] body.viit-student-login {
    color:var(--portal-text) !important;
    background:radial-gradient(circle at 92% 8%,rgba(173,0,56,.18),transparent 28%),radial-gradient(circle at 5% 92%,rgba(30,89,168,.10),transparent 28%),var(--portal-bg) !important;
}
html[data-bs-theme="dark"] body.viit-admin-auth :where(.viit-admin-auth-shell,.viit-admin-form-side,.viit-admin-login-card),
html[data-bs-theme="dark"] body.viit-student-login :where(.viit-login-shell,.viit-login-form-side,.viit-login-card) {
    border-color:var(--portal-line) !important;
    color:var(--portal-text) !important;
    background:var(--portal-surface) !important;
    box-shadow:var(--portal-shadow) !important;
}
html[data-bs-theme="dark"] body.viit-admin-auth :where(.viit-admin-login-card h3,.viit-admin-login-card label),
html[data-bs-theme="dark"] body.viit-student-login :where(.viit-login-card h3,.viit-login-card label) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.viit-admin-auth :where(.viit-admin-login-help,.viit-admin-login-card p),
html[data-bs-theme="dark"] body.viit-student-login :where(.viit-login-help,.viit-login-card p) { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.viit-admin-auth :where(.viit-admin-input,.viit-admin-input input,.form-control),
html[data-bs-theme="dark"] body.viit-student-login :where(.viit-input,.viit-input input,.form-control) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }
html[data-bs-theme="dark"] :where(body.viit-admin-auth,body.viit-student-login) .viit-login-website-link { border-color:var(--portal-line) !important; color:#fff !important; background:rgba(11,19,31,.95) !important; }

html[data-bs-theme="dark"] body.viit-exam-auth {
    color:var(--portal-text) !important;
    background:radial-gradient(circle at 92% 8%,rgba(173,0,56,.18),transparent 28%),var(--portal-bg) !important;
}
html[data-bs-theme="dark"] body.viit-exam-auth :where(.viit-exam-auth-shell,.viit-exam-form-side,.viit-exam-login-card) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.viit-exam-auth :where(h3,label) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.viit-exam-auth :where(p,.viit-exam-login-help) { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.viit-exam-auth :where(.viit-exam-input,.viit-exam-input input,.form-control) { border-color:#334258 !important; color:var(--portal-text) !important; background:#111c2c !important; }
html[data-bs-theme="dark"] body.viit-exam-auth .viit-login-website-link { border-color:var(--portal-line) !important; color:#fff !important; background:rgba(11,19,31,.95) !important; }

html[data-bs-theme="dark"] body.dex-body { color:var(--portal-text) !important; background:radial-gradient(circle at 10% 0,rgba(175,0,56,.15),transparent 28%),var(--portal-bg) !important; }
html[data-bs-theme="dark"] body.dex-body .dex-header { border-color:var(--portal-line) !important; background:rgba(9,16,27,.96) !important; box-shadow:0 12px 34px rgba(0,0,0,.30) !important; }
html[data-bs-theme="dark"] body.dex-body :where(.dex-student-card,.dex-exam-shell,.dex-detail-grid article,.dex-schedule-card,.dex-countdown-panel,.dex-empty,.dex-popup-card) { border-color:var(--portal-line) !important; color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:var(--portal-shadow) !important; }
html[data-bs-theme="dark"] body.dex-body :where(.dex-student-meta div,.dex-schedule-card i) { color:var(--portal-text) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.dex-body :where(.dex-student-copy h1,.dex-detail-grid strong,.dex-schedule-card strong,.dex-popup-card h2) { color:var(--portal-text) !important; }
html[data-bs-theme="dark"] body.dex-body :where(.dex-student-copy p,.dex-detail-grid span,.dex-schedule-card small,.dex-popup-card p) { color:var(--portal-muted) !important; }

html[data-bs-theme="dark"] body.viit-exam-completed { background:radial-gradient(circle at 18% 10%,rgba(172,0,55,.20),transparent 28%),linear-gradient(135deg,#020711,#0b1421) !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-card { color:var(--portal-text) !important; background:var(--portal-surface) !important; box-shadow:0 34px 90px rgba(0,0,0,.55) !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-card h1 { color:#ff4a7e !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-card > p,
html[data-bs-theme="dark"] body.viit-exam-completed .done-redirect { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-meta { border-color:var(--portal-line) !important; background:var(--portal-surface-2) !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-meta span { color:var(--portal-muted) !important; }
html[data-bs-theme="dark"] body.viit-exam-completed .done-meta strong { color:var(--portal-text) !important; }

@media (max-width: 900px) {
    .oe-theme-actions .btn span { display:none; }
    .oe-theme-actions .btn { width:42px; height:42px; padding:0; display:inline-grid; place-items:center; }
    html[data-bs-theme="dark"] body.app-shell .app-sidebar { box-shadow:20px 0 55px rgba(0,0,0,.38) !important; }
}

@media (max-width: 600px) {
    .auth-theme-toggle { top:9px; left:9px; width:38px; height:38px; }
}

@media print {
    .portal-theme-toggle { display:none !important; }
    html, body, body.app-shell, body.student-portal-body, body.oe-student-body, body.viit-id-card-page {
        color-scheme:light !important;
        background:#fff !important;
    }
}
