/* Action controls use surface, border and focus changes for feedback. */
:is(button, .btn, [role="button"], .programme-enrolment-add):is(:hover, :focus-visible) {
  text-decoration: none !important;
}

.app-colour-mode-toggle {
  position: fixed;
  z-index: 1031;
  right: max(16px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c6d2df;
  border-radius: 14px;
  background: rgba(250, 253, 255, .9);
  color: #24415e;
  box-shadow: 0 6px 18px #152b4833;
  backdrop-filter: blur(14px);
}
.app-theme-nav-slot { display: flex !important; align-items: center; min-height: 52px; padding-inline: 6px; }
:is(.app-theme-nav-slot, .modern-nav, .welcome-admission-links) .app-colour-mode-toggle {
  position: static;
  flex: 0 0 auto;
}
.navbar-fixed-top .app-colour-mode-toggle--compact {
  position: absolute;
  top: 7px;
  right: 12px;
  width: 40px;
  height: 40px;
}
.navbar-fixed-top.app-theme-navbar-with-menu .app-colour-mode-toggle--compact { right: 58px; }
@media (max-width: 767px) {
  .navbar-fixed-top.app-theme-navbar-with-menu .eduposer-navbar-brand { padding-right: 108px; }
}
.app-colour-mode-toggle[hidden] { display: none; }
.app-colour-mode-toggle svg { width: 21px; height: 21px; }
.app-colour-mode-toggle:hover { color: #813f10; border-color: #b77b45; }
.app-colour-mode-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.app-theme-sun, [data-colour-mode="dark"] .app-theme-moon { display: none; }
[data-colour-mode="dark"] .app-theme-sun { display: inline; }

.admin-catalog-page .admin-catalog-shell { display: flow-root; }

:root {
  --app-dark-canvas: #0b0c0f;
  --app-dark-surface: #13151a;
  --app-dark-raised: #1b1e25;
  --app-dark-border: #3a3f49;
  --app-dark-ink: #e9f1fc;
  --app-dark-muted: #b5c5d9;
  --app-dark-link: #aed1ff;
  --app-dark-accent: #efd3a9;
  --app-dark-accent-ink: #241c20;
  --app-dark-accent-line: #c2a37e;
  --app-secondary-field: #151f30;
  --app-secondary-addon: #2b3549;
  --app-secondary-outline: #637089;
}
@supports (color: color-mix(in srgb, black, white)) {
  :root {
    --app-dark-canvas: color-mix(in srgb, var(--app-school-primary, #0b0c0f) 6%, #0b0c0f);
    --app-dark-surface: color-mix(in srgb, var(--app-school-primary, #13151a) 8%, #13151a);
    --app-dark-raised: color-mix(in srgb, var(--app-school-primary, #1b1e25) 10%, #1b1e25);
    --app-dark-border: color-mix(in srgb, var(--app-dark-raised) 65%, #747b89);
    --app-dark-link: color-mix(in srgb, var(--app-school-primary, #aed1ff) 19%, #cce1ff);
    --app-dark-accent: color-mix(in srgb, var(--app-school-secondary, #c47717) 27%, #fff2e9);
    --app-dark-accent-line: color-mix(in srgb, var(--app-dark-accent) 60%, var(--app-dark-border));
    --app-secondary-field: color-mix(in srgb, var(--app-dark-accent) 4%, var(--app-dark-canvas));
    --app-secondary-addon: color-mix(in srgb, var(--app-dark-accent) 11%, var(--app-dark-raised));
    --app-secondary-outline: color-mix(in srgb, var(--app-dark-accent) 19%, var(--app-dark-border));
  }
}
html[data-colour-mode="dark"] {
  color-scheme: dark;
  background-color: var(--app-dark-canvas);
}
[data-colour-mode="dark"] body {
  background-color: var(--app-dark-canvas);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .navbar-bg {
  background: var(--app-dark-surface);
}
[data-colour-mode="dark"] .navbar.navbar-default.navbar-fixed-top {
  background: var(--app-dark-surface);
  border-bottom: 1px solid var(--app-dark-border);
}
[data-colour-mode="dark"] .admin-sidebar {
  background: linear-gradient(180deg, var(--app-dark-surface), var(--app-dark-canvas));
}
[data-colour-mode="dark"] .admin-sidebar::before {
  opacity: .035;
}
[data-colour-mode="dark"] .admin-sidebar-account {
  background: var(--app-dark-canvas);
}
[data-colour-mode="dark"] .admin-sidebar-link.is-active {
  background: var(--app-dark-raised);
  box-shadow: inset 3px 0 0 var(--app-dark-accent);
}
[data-colour-mode="dark"] .staff-hero-surface {
  background: linear-gradient(112deg, var(--app-dark-raised), var(--app-dark-surface)) !important;
  border: 1px solid var(--app-dark-border);
  box-shadow: 0 10px 24px #0006 !important;
}
[data-colour-mode="dark"] .app-colour-mode-toggle {
  background: var(--app-dark-raised);
  color: var(--app-dark-accent);
  border-color: var(--app-dark-border);
}
[data-colour-mode="dark"] .app-colour-mode-toggle:hover { background-color: var(--app-dark-border); }
[data-colour-mode="dark"] :is(nav#footer, .modern-footer, .fixed-footer) {
  color: var(--app-dark-ink);
  background: var(--app-dark-canvas) !important;
  background: color-mix(in srgb, var(--app-dark-surface) 55%, var(--app-dark-canvas)) !important;
  border-top: 1px solid var(--app-dark-border);
  box-shadow: 0 -5px 24px #080e1959;
  backdrop-filter: blur(16px);
}
[data-colour-mode="dark"] :is(nav#footer, .modern-footer, .fixed-footer) :is(a, .pry-text-no-shadow) {
  color: var(--app-dark-link) !important;
}
[data-colour-mode="dark"] #footer-correction { background: transparent !important; }
[data-colour-mode="dark"] .fixed-footer-right:not(.modern-footer__marks *) {
  background-image: url('../img/alusoft-footer-dark.svg?v=5');
}
[data-colour-mode="dark"] .fixed-footer-left:not(.modern-footer__marks *) {
  background-image: url('../img/eduposer/logos/logo-monochrome-white.png');
}
[data-colour-mode="dark"] .fixed-footer-left--edulearn:not(.modern-footer__marks *) {
  background-image: url('../img/edulearn-footer-dark.svg');
}

[data-colour-mode="dark"] :is(.main-content, .admin-catalog-page, .admin-after-header, .after-header):not(.programme-preview) {
  background-color: var(--app-dark-canvas);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.panel, .well, .modal-content, .dropdown-menu, .popover, .admin-catalog-card, .admin-programme-tabs, .admin-context-help-body, .empty-state):not(.programme-preview *) {
  background: var(--app-dark-surface);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.panel-heading, .modal-header, .modal-footer, .popover-title, .admin-programme-tab.active, .admin-context-help-heading):not(.programme-preview *) {
  background: var(--app-dark-raised);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.form-control, .input-group-addon):not(.programme-preview *) {
  background: var(--app-dark-canvas);
  color: var(--app-dark-ink);
  border-color: var(--app-dark-border);
}
[data-colour-mode="dark"] .form-control::placeholder { color: var(--app-dark-muted); }
[data-colour-mode="dark"] :is(.admin-catalog-title, .admin-programme-detail-heading h5, .admin-programme-tab, .modal-title, .empty-state-title, .close):not(.programme-preview *) {
  color: var(--app-dark-ink);
  text-shadow: none;
}
[data-colour-mode="dark"] :is(.admin-catalog-subtitle, .admin-programme-detail-heading p, .help-block, .text-muted, .empty-state-subtitle):not(.programme-preview *) {
  color: var(--app-dark-muted);
}
[data-colour-mode="dark"] :is(.main-content, .admin-catalog-page, .modal-content) a:not(.btn, .programme-preview *, .label) {
  color: var(--app-dark-link);
}
[data-colour-mode="dark"] :is(.dropdown-menu, .list-group) > li > a:not(.programme-preview *) { color: var(--app-dark-ink); }
[data-colour-mode="dark"] :is(.dropdown-menu, .list-group) > li > a:hover:not(.programme-preview *) { background: var(--app-dark-raised); }
[data-colour-mode="dark"] :is(.table > tbody > tr > td, .table > thead > tr > th):not(.programme-preview *) { border-color: var(--app-dark-border); }
[data-colour-mode="dark"] .table-striped > tbody > tr:nth-of-type(odd):not(.programme-preview *) { background: var(--app-dark-raised); }
[data-colour-mode="dark"] :is(.main-content, .modal-content) :is(.round-list.bgD, .round-list.bgCD, .list-group-item):not(.programme-preview *) {
  background-color: var(--app-dark-raised) !important;
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) :is(.round-list.bgE, .round-list.bgEF, .table-hover > tbody > tr:hover):not(.programme-preview *) {
  background-color: var(--app-dark-surface) !important;
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .empty-state::before { background: none; }
[data-colour-mode="dark"] :is(.programme-course-legacy-heading, .programme-course-panels):not(.programme-preview *) {
  background: var(--app-dark-surface) !important;
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .programme-course-panels :is(.programme-rule-form, .programme-course-picker-label, .empty-state):not(.programme-preview *) {
  background: var(--app-dark-raised) !important;
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .programme-modal-from-faculty-certification .close:not(.programme-preview *) {
  opacity: 1;
}

[data-colour-mode="dark"] :is(.admin-catalog-page, .admin-subject-results) {
  --admin-catalog-border: var(--app-dark-border);
  --admin-catalog-muted: var(--app-dark-muted);
}
[data-colour-mode="dark"] :is(.admin-subject-row, .admin-catalog-empty, .admin-context-help-next, .pills-responsive.nav-pills, .pills-responsive.nav-tabs, .pills-responsive-buttons):not(.programme-preview *) {
  background: var(--app-dark-surface) !important;
  border-color: var(--app-dark-border);
}
[data-colour-mode="dark"] :is(.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6,
  .admin-catalog-section-title, .admin-context-help-heading strong, .admin-context-help-next strong, .pry-text-no-shadow):not(.programme-preview *) {
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.admin-programme-detail-eyebrow, .admin-context-help-heading small, .admin-context-help-next span, .admin-context-help-toggle-icon):not(.programme-preview *) {
  color: var(--app-dark-muted);
}
[data-colour-mode="dark"] :is(.pills-responsive.nav-pills, .pills-responsive.nav-tabs) > li:not(.active) > a:not(.programme-preview *) {
  color: var(--app-dark-muted) !important;
}
[data-colour-mode="dark"] :is(.pills-responsive.nav-pills, .pills-responsive.nav-tabs) > li:not(.active) > a:hover:not(.programme-preview *) {
  background: var(--app-dark-raised) !important;
}

[data-colour-mode="dark"] :is(.admin-catalog-page, .bursary-page).main-content:not(.programme-preview) {
  background: var(--app-dark-canvas);
}
[data-colour-mode="dark"] .bursary-page {
  --bursary-surface: var(--app-dark-surface);
  --bursary-border: var(--app-dark-border);
  --bursary-muted: var(--app-dark-muted);
}
[data-colour-mode="dark"] :is(.admin-subject-instance-toolbar, .admission-admin-workspace .admission-workspace-surface,
  .bursary-page :is(.bursary-help-next, .bursary-summary-card, .bursary-filter-panel .panel-heading),
  .tertiary-course-modal-status, .tertiary-course-meta-icon):not(.programme-preview *) {
  background: var(--app-dark-surface);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.table > thead > tr > th, .admin-programme-tab:hover, .admin-programme-tab:focus):not(.programme-preview *) {
  background-color: var(--app-dark-raised);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.admin-catalog-title, .admin-context-help-body) i:not(.programme-preview *) {
  color: var(--app-dark-link);
}

/* Legacy workspace surfaces are paired with their dark-mode foregrounds. */
[data-colour-mode="dark"] body.staff-modernized .main-content:not(.programme-preview),
[data-colour-mode="dark"] :is(#AdminSettingsSessionCtrl.sessions-modern, #AdminSettingsLevelCtrl.levels-modern,
  #AdminAcademicSettingsCtrl.academic-settings-modern, #AdminFacultiesCtrl.faculties-modern,
  #AdminReservedCodesCtrl.reserved-codes-modern, #AdminAdmissionManagementCtrl, .admin-tests-modern) {
  background: var(--app-dark-canvas);
}

[data-colour-mode="dark"] :is(.main-content, .modal-content):not(.programme-preview) :is(
  .btn-default, .badge:not([class*="bg"]), .label-default, .label-primary2, .label.bg8
):not(.programme-preview *) {
  background-color: var(--app-dark-raised) !important;
  color: var(--app-dark-ink) !important;
  border-color: var(--app-dark-border);
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) .btn-default:hover:not(.programme-preview *) {
  background-color: var(--app-dark-border) !important;
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) :is(
  .btn-secondary, .btn-sec, .btn-warning, .label-secondary, .label-warning, .panel-sec > .panel-heading, .level-profile-badge.bg-sec
):not(.programme-preview *) {
  background-color: var(--app-dark-accent) !important;
  color: var(--app-dark-accent-ink) !important;
  border-color: var(--app-dark-accent-line);
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) :is(.btn-secondary, .btn-sec, .btn-warning):hover:not(.programme-preview *) {
  filter: brightness(1.15);
}
[data-colour-mode="dark"] .main-content .label-info:not(.programme-preview *) {
  color: #d0f3ff;
  background-color: #24506a;
}
[data-colour-mode="dark"] .main-content .label-success:not(.programme-preview *) {
  color: #d3f8df;
  background-color: #28533f;
}

[data-colour-mode="dark"] :is(
  .main-content .share, .main-content .list-group-item, .main-content .table > tbody > tr > td,
  .main-content .table > tfoot > tr > td, .main-content .select2-selection,
  .admin-tests-modern #all-tests-cont, .admin-selected-test-toolbar, .parent-test-browser-card,
  .session-calendar-card > .panel-body, .session-calendar-card table, .session-calendar-card thead td, .sessions-empty,
  .levels-session-picker, .levels-workspace, .level-metadata-card, .level-profile-fact,
  .level-profile-editor, .level-group-tabs, .level-group-tab, .levels-hint, .levels-empty,
  .academic-grading-card, .academic-context-bar, .academic-settings-card, .academic-filter-card,
  .academic-settings-main .panel > .panel-heading, .academic-settings-main .panel > .panel-body,
  .academic-settings-main thead th, .academic-settings-row, .academic-settings-hint, .override-student-card,
  .candidate-unit-switcher, .remote-candidate-progress-body,
  .admission-mode-card > .panel-heading, .admission-mode-summary-box, .enrolment-mode-card > .panel-heading, .enrolment-mode-summary-box,
  .admission-page-header, .admission-card, .admission-help, .admission-stat-box, .admission-detail-panel,
  .admission-programme-box, .screening-rule-builder, .screening-rule-row, .screening-formula-preview,
  .admission-feedback-card, .admission-empty-card,
  .faculties-toolbar, .faculty-instance-toolbar, .faculties-card, .faculty-instance-card, .faculty-departments-card,
  .faculty-row, .department-row, .faculty-inline-editor, .department-inline-editor, .department-hint,
  .reserved-codes-toolbar, .reserved-codes-card, .reserved-code-row, .reserved-codes-hint,
  .database-transfer-card, .database-transfer-library, .database-transfer-format,
  .audit-tabs, .audit-filter, .audit-card, .audit-table th, .application-log-tabs, .application-log-shell, .application-log-files
):not(.programme-preview *) {
  background: var(--app-dark-surface) !important;
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(
  .main-content .table-striped > tbody > tr:nth-of-type(odd) > td, .main-content .table-hover > tbody > tr:hover > td,
  .sessions-tabs, .sessions-tab:not(.active) .badge, .session-card-icon,
  .level-group-tab:hover, .level-group-tab-icon, .faculty-row-index, .department-row-index, .reserved-code-index,
  .audit-table tbody tr:hover > td, .audit-tabs .btn.active, .application-log-tabs .btn.active,
  .application-log-file:hover, .application-log-file.active
):not(.programme-preview *) {
  background: var(--app-dark-raised) !important;
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(
  .main-content .control-label, .main-content .text-primary, .main-content .sec-text-no-shadow,
  .session-card-dates, .sessions-tab:not(.active), .level-profile-fact-label, .levels-hint-title,
  .admission-mode-code, .enrolment-mode-code, .admission-stat-label, .admission-stat-note, .admission-detail-label,
  .bursary-help-next span, .bursary-help-next strong, .database-transfer-count,
  .audit-meta, .audit-heading p, .application-log-heading p, .application-log-file small,
  .select2-selection__placeholder, .select2-selection__rendered
):not(.programme-preview *) {
  color: var(--app-dark-muted) !important;
}
[data-colour-mode="dark"] :is(.audit-tabs, .application-log-tabs) > .btn { color: var(--app-dark-link); }
[data-colour-mode="dark"] .main-content .bg-pry-glass:not(.programme-preview *) {
  background-color: var(--app-dark-raised) !important;
  color: var(--app-dark-ink) !important;
}

[data-colour-mode="dark"] .admin-programmes-page [data-target="#importProgrammeCoursesModal"].btn-inverse {
  background-color: var(--app-dark-accent) !important;
  border-color: var(--app-dark-accent-line);
  color: var(--app-dark-accent-ink);
}
[data-colour-mode="dark"] .admin-programmes-page [data-target="#importProgrammeCoursesModal"].btn-inverse:hover {
  filter: brightness(1.15);
}
[data-colour-mode="dark"] .sessions-modern .session-state-current {
  background: #28533f;
  color: #d3f8df;
}
[data-colour-mode="dark"] .bursary-page .bursary-summary-card .panel-body > div {
  color: var(--app-dark-ink);
  border-color: var(--app-dark-border);
}
[data-colour-mode="dark"] .bursary-page .bursary-summary-card .panel-body > div:last-child {
  color: var(--app-dark-muted);
}

[data-colour-mode="dark"] :is(
  .session-calendar-card thead td, .level-profile-fact-value, .levels-session-picker label, .level-profile-eyebrow,
  .academic-context-bar strong, .admission-mode-title, .enrolment-mode-title,
  .admission-programme-capacity, .admission-page-title, .admission-card-heading, .admission-stat-value,
  .admission-section-title, .admission-instruction :is(p, strong, li)
) { color: var(--app-dark-ink) !important; }
[data-colour-mode="dark"] {
  --app-dark-skeleton-block: color-mix(in srgb, var(--app-dark-raised) 78%, var(--app-dark-border));
  --app-dark-skeleton-sweep: rgba(164, 194, 229, .2);
}
[data-colour-mode="dark"] :is(.page-loader, .bursary-page-loader, .academic-settings-loading, .levels-loading, .faculties-loading, .reserved-codes-loading) {
  background: var(--app-dark-canvas) !important;
}
[data-colour-mode="dark"] :is(
  .collection-shimmer, .collection-shimmer-row, .academic-skeleton-context, .academic-skeleton-card, .academic-skeleton-filters,
  .admission-skeleton-card, .enrolment-skeleton-card, .bursary-skeleton-toolbar, .bursary-skeleton-card, .bursary-skeleton-context,
  .bursary-skeleton-metric, .bursary-inline-loading, .course-skeleton-toolbar, .course-skeleton-table, .course-skeleton-table-row,
  .levels-skeleton-session, .levels-skeleton-workspace, .faculties-skeleton-toolbar, .faculties-skeleton-list,
  .reserved-codes-skeleton-toolbar, .reserved-codes-skeleton-list, .sub-assessment-skeleton
) {
  background: var(--app-dark-surface) !important;
  border-color: var(--app-dark-border) !important;
}
[data-colour-mode="dark"] :is(.collection-shimmer-row, .course-skeleton-table-row):nth-child(even) {
  background: var(--app-dark-raised) !important;
}
[data-colour-mode="dark"] :is(
  .collection-shimmer-block, .admission-skeleton-line, .admission-skeleton-pill, .admission-skeleton-block, .admission-skeleton-action,
  .enrolment-skeleton-line, .enrolment-skeleton-pill, .enrolment-skeleton-action, .shimmer, .animated-gradient-box
) {
  background-color: var(--app-dark-skeleton-block) !important;
  border-color: var(--app-dark-border) !important;
}
[data-colour-mode="dark"] :is(.animated-gradient-box, .shimmer) {
  background-image: linear-gradient(90deg, var(--app-dark-skeleton-block), var(--app-dark-raised), var(--app-dark-skeleton-block)) !important;
}
[data-colour-mode="dark"] :is(
  .collection-shimmer-block, .admission-skeleton-line, .admission-skeleton-pill, .admission-skeleton-block,
  .enrolment-skeleton-line, .enrolment-skeleton-pill, .shimmer
)::after {
  background: linear-gradient(90deg, transparent, var(--app-dark-skeleton-sweep), transparent) !important;
}

[data-colour-mode="dark"] :is(.empty-state-badge, .error-state-badge, .audit-empty-icon),
[data-colour-mode="dark"] .programme-preview .programme-course-panels .empty-state-badge {
  background: var(--app-dark-raised);
  border-color: var(--app-dark-border);
  color: var(--app-dark-accent);
}
[data-colour-mode="dark"] :is(.empty-state-badge, .error-state-badge, .audit-empty-icon) :is(i, svg),
[data-colour-mode="dark"] .programme-preview .programme-course-panels .empty-state-badge i {
  color: inherit;
}

[data-colour-mode="dark"] #footer img[alt="AluSoft Technologies Ltd"] { content: url('../img/alusoft-footer-dark.svg?v=5'); }
[data-colour-mode="dark"] #footer img[alt="EduLearn"] { content: url('../img/edulearn-footer-dark.svg'); }
[data-colour-mode="dark"] #footer img[alt="EduPorch"] { content: url('../img/eduporch-footer-dark.svg'); }
[data-colour-mode="dark"] #footer img[alt="EduPoser"] { content: url('../img/eduposer/logos/logo-monochrome-white.png'); }

[data-colour-mode="dark"] .main-content .share:not(.programme-preview *)::before {
  border-bottom-color: var(--app-dark-surface) !important;
}
[data-colour-mode="dark"] :is(.degree-type-badge-certifications, .admission-pill-screening) {
  background: var(--app-dark-accent);
  color: var(--app-dark-accent-ink);
}
[data-colour-mode="dark"] :is(.database-transfer-card h4, .audit-actor strong, .audit-route, .audit-channel) {
  color: var(--app-dark-ink) !important;
}
[data-colour-mode="dark"] :is(.database-transfer-library th, .database-transfer-card-copy, .database-transfer-card blockquote,
  .audit-filter label, .audit-username, .application-log-files-title) {
  color: var(--app-dark-muted) !important;
}
[data-colour-mode="dark"] .audit-badge.success {
  background: #28533f;
  color: #d3f8df;
}

[data-colour-mode="dark"] body.staff-owned-hero-loading .page-loader::before {
  background-image: linear-gradient(90deg, transparent, var(--app-dark-skeleton-sweep), transparent);
  background-color: var(--app-dark-surface);
  border-color: var(--app-dark-border);
  box-shadow: 0 10px 26px rgba(5, 12, 22, .28);
}
[data-colour-mode="dark"] .degree-type-card .degree-type-card-heading {
  background: linear-gradient(115deg, var(--app-dark-raised), var(--app-dark-surface) 60%,
    color-mix(in srgb, var(--app-dark-accent) 13%, var(--app-dark-surface)));
  border-top-color: var(--app-dark-accent-line);
}
[data-colour-mode="dark"] .degree-type-card.archived .degree-type-card-heading {
  background: var(--app-dark-raised);
  border-top-color: var(--app-dark-border);
}
[data-colour-mode="dark"] .degree-type-badge-programmes {
  background: var(--app-dark-raised);
  border-color: var(--app-dark-border);
  color: var(--app-dark-link);
}
[data-colour-mode="dark"] :is(.main-content .box-item, .main-content .tile, .modal-content .tile, .select2-dropdown, #programme-view-switch-dialog):not(.programme-preview *) {
  background: var(--app-dark-surface);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .main-content .box-item.selectable:hover { background: var(--app-dark-raised); }
[data-colour-mode="dark"] :is(.select2-container--default .select2-results__option--highlighted, .select2-container--default .select2-results__option[aria-selected="true"]) {
  background: var(--app-dark-raised);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) .btn-danger:not(.programme-preview *) {
  background-color: #a83232;
  color: #fff4f4;
}
[data-colour-mode="dark"] :is(.main-content, .modal-content) .btn-danger:hover:not(.programme-preview *) {
  background-color: #b93a3a;
}
[data-colour-mode="dark"] :is(.session-calendar-card thead td, .database-transfer-card :is(h4, blockquote, blockquote b),
  .admission-page-subtitle, .admission-date) { color: var(--app-dark-muted) !important; }
[data-colour-mode="dark"] .admission-date { background: var(--app-dark-raised) !important; }

[data-colour-mode="dark"] .dropdown-menu.dropdown-inverse > :is(.active, .selected) > a:not(.programme-preview *) {
  background-color: var(--app-dark-accent) !important;
  color: var(--app-dark-accent-ink) !important;
}

/* Keep secondary form groups calm on dark and primary-colour surfaces. */
:is([data-colour-mode="dark"] body, .bg-pry, .staff-hero-surface, .panel-primary > .panel-heading)
  :is(.form-control-secondary, .input-group-addon-secondary, .input-group-addon-secondary > .form-control,
      .input-group-btn-secondary > .btn, .form-control-secondary .select2-selection) {
  color-scheme: dark;
  background: var(--app-secondary-field) !important;
  border-color: var(--app-secondary-outline) !important;
  color: var(--app-dark-ink) !important;
  box-shadow: none;
}
:is([data-colour-mode="dark"] body, .bg-pry, .staff-hero-surface, .panel-primary > .panel-heading)
  :is(.input-group-addon-secondary, .input-group-btn-secondary > .btn):not(.form-control) {
  background: var(--app-secondary-addon) !important;
  color: var(--app-dark-accent) !important;
}
:is([data-colour-mode="dark"] body, .bg-pry, .staff-hero-surface, .panel-primary > .panel-heading)
  :is(.form-control-secondary, .input-group-addon-secondary > .form-control, .input-group-btn-secondary > .btn,
      .form-control-secondary .select2-selection):is(:hover, :focus) {
  border-color: var(--app-dark-accent-line) !important;
}
:is([data-colour-mode="dark"] body, .bg-pry, .staff-hero-surface, .panel-primary > .panel-heading)
  :is(.form-control-secondary, .input-group-addon-secondary > .form-control, .input-group-btn-secondary > .btn,
      .form-control-secondary .select2-selection):focus-visible {
  outline: 2px solid var(--app-dark-accent);
  outline-offset: -2px;
}
[data-colour-mode="dark"] .form-control-secondary select,
[data-colour-mode="dark"] .form-control-secondary .select2-selection__rendered { color: var(--app-dark-ink) !important; }
[data-colour-mode="dark"] .session-calendar-card table thead :is(th, td) {
  color: var(--app-dark-muted) !important;
}
[data-colour-mode="dark"] .sessions-modern .sessions-tab:not(.active):is(:hover, :focus-visible),
[data-colour-mode="dark"] .sessions-modern .session-calendar-card > .panel-heading:is(:hover, :focus-within) {
  background: color-mix(in srgb, var(--app-dark-raised) 85%, var(--app-dark-ink)) !important;
}
.sessions-modern .sessions-tab.active:is(:hover, :focus-visible) {
  background: var(--school-primary-color, #173653);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%), 0 3px 10px rgb(0 0 0 / 10%);
}
body.admin-navigation-sidebar .navbar-fixed-top .navbar-nav > li > a[href*="legacy-index"]:is(:hover, :focus-visible) {
  background-color: rgb(255 255 255 / 14%);
  color: #fff;
  text-decoration: none;
}

[data-colour-mode="light"] body.admin-navigation-sidebar .main-content :is(.badge:not([class*="bg"]), .label-default) {
  background-color: #e2e9f1;
  color: #344861;
}
[data-colour-mode="light"] body.admin-navigation-sidebar .main-content .label-success {
  background-color: #dff4e5;
  color: #205937;
}
[data-colour-mode="light"] body.admin-navigation-sidebar .main-content .input-group-addon:not([class*="input-group-addon-"], [class*="bg-"]) {
  background-color: #e2e9f1;
  border-color: #b3c2d3;
  color: #344861;
}
[data-colour-mode="light"] body.admin-navigation-sidebar .main-content .btn-warning,
[data-colour-mode="light"] body.admin-navigation-sidebar .main-content .btn-warning:is(:hover, :focus, :active) {
  color: #332500;
}
[data-colour-mode="light"] .main-content :is([data-programme-view="preview"], .database-transfer-library .btn-default) {
  background-color: #e2e9f1;
  border-color: #b3c2d3;
  color: #344861;
}
[data-colour-mode="light"] .main-content :is([data-programme-view="preview"], .database-transfer-library .btn-default):is(:hover, :focus-visible) {
  background-color: #d4dfeb;
}
[data-colour-mode="light"] .levels-modern .levels-tabs .btn:not(.active) {
  background-color: var(--school-primary-soft, #e9f0f6) !important;
  color: var(--school-primary-dark, #173653);
}
[data-colour-mode="light"] .levels-modern .levels-tabs .btn:not(.active):is(:hover, :focus-visible) {
  background-color: var(--school-primary-border, #d4dfeb) !important;
  color: var(--school-primary-dark, #173653);
}
[data-colour-mode="dark"] .levels-modern.main-content .levels-tabs .btn.active {
  background-color: var(--school-primary-color, #173653) !important;
  color: #fff !important;
}
[data-colour-mode="dark"] .levels-modern .levels-tabs .btn:is(:hover, :focus-visible) {
  box-shadow: inset 0 0 0 1px var(--app-dark-link);
}
[data-colour-mode="dark"] .page-loader h4,
[data-colour-mode="dark"] #AdminDatabaseTransferCtrl .database-transfer-library h4 {
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .main-content .admission-refresh {
  color: var(--app-dark-link) !important;
}
[data-colour-mode="dark"] .main-content .admission-refresh:is(:hover, :focus-visible) {
  color: var(--app-dark-accent) !important;
}
[data-colour-mode="dark"] .main-content .pagination :is(a, span) {
  background-color: var(--app-dark-surface);
  border-color: var(--app-dark-border);
  color: var(--app-dark-ink);
}
[data-colour-mode="dark"] .main-content .pagination li:not(.disabled) > a:is(:hover, :focus-visible) {
  background-color: var(--app-dark-raised);
  color: var(--app-dark-link);
}
[data-colour-mode="dark"] .main-content .pagination li.active > :is(a, span) {
  background-color: var(--app-dark-accent);
  border-color: var(--app-dark-accent-line);
  color: var(--app-dark-accent-ink);
}
