:root {
    --app-bg: #f0eeec;
    --app-page-bg: #ffffff;
    --app-surface: #ffffff;
    --app-surface-muted: #f5f6f8;
    --app-surface-subtle: #fafbfc;
    --app-text: #1B2A4A;
    --app-text-body: #3D4A5C;
    --app-text-muted: #697481;
    --app-text-faint: #8a94a6;
    --app-border: #eceff2;
    --app-border-strong: #dfe3e6;
    --app-input-bg: #ffffff;
    --app-input-text: #333333;
    --app-hover-bg: #f5f6f8;
    --app-dropdown-hover-bg: #ececec;
    --app-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    color-scheme: light;
}

[data-color-mode="dark"] {
    --app-bg: #101621;
    --app-page-bg: #101621;
    --app-surface: #182231;
    --app-surface-muted: #202c3d;
    --app-surface-subtle: #151e2b;
    --app-text: #eef3f8;
    --app-text-body: #d9e2ee;
    --app-text-muted: #a9b6c7;
    --app-text-faint: #8090a6;
    --app-border: #2c3a4d;
    --app-border-strong: #3a4b61;
    --app-input-bg: #121b28;
    --app-input-text: #eef3f8;
    --app-hover-bg: #223044;
    --app-dropdown-hover-bg: #26364c;
    --app-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
    --tenant-dark-link: #E77961;
    --tenant-dark-link-hover: #F2A092;
    --tenant-dark-accent: #E77961;
    --tenant-dark-accent-hover: #F2A092;
    --tenant-dark-accent-bg: #C4614A;
    --tenant-dark-accent-text: #FFFFFF;
    --tenant-dark-accent-muted-bg: #4A2020;
    --tenant-dark-accent-muted-border: #C85F55;
    --tenant-dark-accent-muted-text: #FFB3A8;
    --tenant-dark-primary-bg: #24365F;
    --tenant-dark-primary-text: #EEF3F8;
    --tenant-dark-primary-hover-bg: #2D4275;
    --tenant-dark-focus-rgb: 231, 121, 97;
    color-scheme: dark;
}

[data-color-mode="dark"] body {
    background-color: var(--app-page-bg);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .content-container,
[data-color-mode="dark"] main,
[data-color-mode="dark"] .login-container {
    background-color: var(--app-bg);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .content-header,
[data-color-mode="dark"] header,
[data-color-mode="dark"] .footer {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .content-header-title,
[data-color-mode="dark"] .breadcrumb,
[data-color-mode="dark"] .page-title,
[data-color-mode="dark"] .form-section-title,
[data-color-mode="dark"] .form-section legend,
[data-color-mode="dark"] .card-title,
[data-color-mode="dark"] .side-content .card-title,
[data-color-mode="dark"] .card.card-primary .card-title,
[data-color-mode="dark"] .list-row-title,
[data-color-mode="dark"] .list-row-title a,
[data-color-mode="dark"] .list-row-label,
[data-color-mode="dark"] .table .thead-dark th {
    color: var(--app-text);
}

[data-color-mode="dark"] .form-section label,
[data-color-mode="dark"] .form-group label,
[data-color-mode="dark"] .control-label,
[data-color-mode="dark"] .form-check-label {
    color: var(--app-text);
}

[data-color-mode="dark"] .card,
[data-color-mode="dark"] .main-content,
[data-color-mode="dark"] .side-content .card,
[data-color-mode="dark"] .card.card-primary,
[data-color-mode="dark"] .list-card,
[data-color-mode="dark"] .admin-dashboard-card,
[data-color-mode="dark"] .dashboard-stat-card,
[data-color-mode="dark"] .course-overview-header,
[data-color-mode="dark"] .modal-content,
[data-color-mode="dark"] .dropdown-menu,
[data-color-mode="dark"] .page-summary-container {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-body);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] .content-header-search,
[data-color-mode="dark"] .content-header-icon-button,
[data-color-mode="dark"] .form-control,
[data-color-mode="dark"] .form-select,
[data-color-mode="dark"] .input-group-text,
[data-color-mode="dark"] .custom-file-label,
[data-color-mode="dark"] .custom-file-label-with-url,
[data-color-mode="dark"] .select2-container--default .select2-selection--single,
[data-color-mode="dark"] .select2-container--default .select2-selection--multiple {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
    color: var(--app-input-text);
}

[data-color-mode="dark"] .select2-container--default .select2-selection--single,
[data-color-mode="dark"] .select2-container--default .select2-selection--multiple {
    border-color: var(--app-border-strong) !important;
}

[data-color-mode="dark"] .content-header-search input,
[data-color-mode="dark"] .form-control,
[data-color-mode="dark"] .form-select,
[data-color-mode="dark"] .custom-file-label,
[data-color-mode="dark"] .custom-file-label-with-url {
    color: var(--app-input-text);
}

[data-color-mode="dark"] .content-header-search input::placeholder,
[data-color-mode="dark"] .form-control::placeholder,
[data-color-mode="dark"] .custom-file-label:empty::before {
    color: var(--app-text-faint);
}

[data-color-mode="dark"] .custom-file-label::after {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .custom-file-label-disabled {
    background-color: var(--app-surface-muted);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .custom-file-label-with-url a,
[data-color-mode="dark"] .player-file .custom-file-label-with-url a {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .custom-file-label-with-url a:hover,
[data-color-mode="dark"] .custom-file-label-with-url a:focus,
[data-color-mode="dark"] .player-file .custom-file-label-with-url a:hover,
[data-color-mode="dark"] .player-file .custom-file-label-with-url a:focus {
    color: var(--tenant-dark-link-hover);
}

[data-color-mode="dark"] .player-form-section:not(:last-of-type) {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .player-form-section-icon {
    background-color: var(--tenant-dark-accent-bg);
    color: var(--tenant-dark-accent-text);
}

[data-color-mode="dark"] .player-form-section-title,
[data-color-mode="dark"] .player-form-section-subtitle,
[data-color-mode="dark"] .player-file-download-name {
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .player-file {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .player-file .custom-file-label {
    background-color: var(--app-input-bg);
    color: var(--app-input-text);
}

[data-color-mode="dark"] .submission-file-container {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .submission-file-container-title {
    color: var(--app-text);
}

[data-color-mode="dark"] .offline-assessment-submission-remove i {
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .offline-assessment-submission-remove-disabled i {
    color: var(--app-text-faint);
}

[data-color-mode="dark"] .input-group-append .btn-outline-secondary,
[data-color-mode="dark"] .remove-file-row-btn.btn-outline-secondary {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .input-group-append .btn-outline-secondary:hover,
[data-color-mode="dark"] .input-group-append .btn-outline-secondary:focus,
[data-color-mode="dark"] .remove-file-row-btn.btn-outline-secondary:hover,
[data-color-mode="dark"] .remove-file-row-btn.btn-outline-secondary:focus {
    background-color: var(--app-hover-bg);
    border-color: var(--tenant-dark-accent);
    color: var(--app-text);
}

[data-color-mode="dark"] .content-header-search,
[data-color-mode="dark"] .content-header-search i,
[data-color-mode="dark"] .content-header-icon-button,
[data-color-mode="dark"] .text-muted,
[data-color-mode="dark"] .form-text,
[data-color-mode="dark"] .breadcrumb-item.active,
[data-color-mode="dark"] .list-row-subtitle,
[data-color-mode="dark"] .list-row-description,
[data-color-mode="dark"] .list-row-section,
[data-color-mode="dark"] .list-row-time,
[data-color-mode="dark"] .side-content .card-subtitle,
[data-color-mode="dark"] .card.card-primary .card-subtitle {
    color: var(--app-text-muted) !important;
}

[data-color-mode="dark"] .content-header-icon-button:hover,
[data-color-mode="dark"] .content-header-icon-button:focus,
[data-color-mode="dark"] .list-row-menu-btn:hover,
[data-color-mode="dark"] .list-row-menu-btn:focus {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .dropdown-item {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .dropdown-item:hover,
[data-color-mode="dark"] .dropdown-item:focus,
[data-color-mode="dark"] .dropdown-item.active,
[data-color-mode="dark"] .dropdown-item:active {
    background-color: var(--app-dropdown-hover-bg);
    color: var(--app-text);
}

[data-color-mode="dark"] .alert-primary {
    background-color: var(--tenant-dark-accent-muted-bg);
    border-color: var(--tenant-dark-accent-muted-border);
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .alert-primary a,
[data-color-mode="dark"] .alert-primary .close,
[data-color-mode="dark"] .alert-primary i {
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .alert-success {
    background-color: #173d32;
    border-color: #2d8a69;
    color: #9ee4c8;
}

[data-color-mode="dark"] .alert-success a {
    color: #9ee4c8;
}

[data-color-mode="dark"] .alert-warning {
    background-color: #4a3414;
    border-color: #b87b22;
    color: #ffd28a;
}

[data-color-mode="dark"] .alert-warning a,
[data-color-mode="dark"] .alert-warning .close {
    color: #ffd28a;
}

[data-color-mode="dark"] .alert-danger {
    background-color: #4a2020;
    border-color: #c85f55;
    color: #ffb3a8 !important;
}

[data-color-mode="dark"] .alert-danger a {
    color: #ffb3a8 !important;
}

[data-color-mode="dark"] .alert-info {
    background-color: #183a4a;
    border-color: #4294b8;
    color: #99d6ef;
}

[data-color-mode="dark"] .alert-info a {
    color: #99d6ef;
}

[data-color-mode="dark"] .breadcrumb {
    background-color: transparent;
}

[data-color-mode="dark"] .content-container a:not(.btn),
[data-color-mode="dark"] .breadcrumb .breadcrumb-item a {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .content-container a:not(.btn):hover,
[data-color-mode="dark"] .breadcrumb .breadcrumb-item a:hover,
[data-color-mode="dark"] .content-container a:not(.btn):focus,
[data-color-mode="dark"] .breadcrumb .breadcrumb-item a:focus {
    color: var(--tenant-dark-link-hover);
}

[data-color-mode="dark"] .breadcrumb .breadcrumb-item,
[data-color-mode="dark"] .breadcrumb .breadcrumb-item.active {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .breadcrumb .breadcrumb-item a:hover,
[data-color-mode="dark"] .breadcrumb .breadcrumb-item a:focus {
    color: var(--app-text);
}

[data-color-mode="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: var(--app-text-faint);
}

[data-color-mode="dark"] .content-container a.mobile-breadcrumb-back:not(.btn),
[data-color-mode="dark"] .content-container .mobile-breadcrumb-toggle {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .content-container a.mobile-breadcrumb-back:not(.btn):hover,
[data-color-mode="dark"] .content-container a.mobile-breadcrumb-back:not(.btn):focus,
[data-color-mode="dark"] .content-container .mobile-breadcrumb-toggle:hover,
[data-color-mode="dark"] .content-container .mobile-breadcrumb-toggle:focus {
    color: var(--app-text);
}

[data-color-mode="dark"] .nav-tabs,
[data-color-mode="dark"] .nav-tabs-container .nav-tabs {
    border-bottom-color: var(--app-border);
}

[data-color-mode="dark"] .nav-tabs .nav-link {
    background-color: transparent !important;
    border-color: transparent;
    color: var(--app-text-muted) !important;
}

[data-color-mode="dark"] .nav-tabs .nav-link:hover,
[data-color-mode="dark"] .nav-tabs .nav-link:focus {
    background-color: transparent !important;
    border-color: transparent;
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .nav-tabs .nav-link.active,
[data-color-mode="dark"] .nav-tabs .nav-link.active:hover,
[data-color-mode="dark"] .nav-tabs .nav-link.active:focus {
    background-color: transparent !important;
    border-color: transparent;
    border-bottom-color: var(--tenant-dark-accent-bg);
    color: var(--tenant-dark-accent) !important;
}

[data-color-mode="dark"] .dropdown-divider,
[data-color-mode="dark"] .pager-container,
[data-color-mode="dark"] .list-row,
[data-color-mode="dark"] .list-row-expand,
[data-color-mode="dark"] .side-content .card-section:not(:last-of-type),
[data-color-mode="dark"] .card.card-primary .card-section:not(:last-of-type),
[data-color-mode="dark"] .side-content .card-title,
[data-color-mode="dark"] .card.card-primary .card-title,
[data-color-mode="dark"] .modal-header,
[data-color-mode="dark"] .modal-footer {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .list-row-expand,
[data-color-mode="dark"] .side-content .card-text,
[data-color-mode="dark"] .card.card-primary .card-text {
    background-color: var(--app-surface-muted);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .expand-filters-container {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-color-mode="dark"] .expand-filters-container:hover {
    background-color: var(--app-hover-bg);
    border-color: var(--app-border-strong);
    color: var(--app-text);
}

[data-color-mode="dark"] .notes-composer,
[data-color-mode="dark"] .notes-filter-group,
[data-color-mode="dark"] .notes-item,
[data-color-mode="dark"] .notes-item-footer {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .notes-composer,
[data-color-mode="dark"] .notes-filter-group,
[data-color-mode="dark"] .notes-item-footer {
    background-color: var(--app-surface-muted);
}

[data-color-mode="dark"] .notes-item {
    background-color: var(--app-surface);
}

[data-color-mode="dark"] .notes-item:hover {
    border-color: var(--tenant-dark-accent-muted-border);
    box-shadow: none;
}

[data-color-mode="dark"] .notes-composer-check,
[data-color-mode="dark"] .notes-filter,
[data-color-mode="dark"] .notes-item-meta {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .notes-filter:hover,
[data-color-mode="dark"] .notes-filter:focus {
    background-color: var(--app-hover-bg);
    color: var(--app-text);
}

[data-color-mode="dark"] .notes-filter.is-active {
    background-color: var(--tenant-dark-primary-bg);
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .notes-item-content {
    color: var(--app-text);
}

[data-color-mode="dark"] .pagination-container {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .pagination li {
    background-color: var(--app-input-bg);
    border-color: var(--tenant-dark-accent-bg);
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .pagination li:hover,
[data-color-mode="dark"] .pagination li:focus-within {
    background-color: var(--app-hover-bg);
    border-color: var(--tenant-dark-accent);
    color: var(--app-text);
}

[data-color-mode="dark"] .pagination li a {
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .pagination li:hover a,
[data-color-mode="dark"] .pagination li:focus-within a {
    color: var(--app-text);
}

[data-color-mode="dark"] .pagination .active,
[data-color-mode="dark"] .pagination .active:hover,
[data-color-mode="dark"] .pagination .active:focus-within {
    background-color: var(--tenant-dark-accent-bg);
    border-color: var(--tenant-dark-accent-bg);
    color: var(--tenant-dark-accent-text);
}

[data-color-mode="dark"] .pagination .active a,
[data-color-mode="dark"] .pagination .active:hover a,
[data-color-mode="dark"] .pagination .active:focus-within a {
    color: var(--tenant-dark-accent-text);
}

[data-color-mode="dark"] .notecontainer {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .notecontainer > .d-flex {
    border-top-color: var(--app-border) !important;
}

[data-color-mode="dark"] .notecontainer .text-muted {
    color: var(--app-text-muted) !important;
}

[data-color-mode="dark"] .notefilter.btn-outline-secondary {
    background-color: transparent;
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .notefilter.btn-outline-secondary:hover,
[data-color-mode="dark"] .notefilter.btn-outline-secondary:focus {
    background-color: var(--app-hover-bg);
    border-color: var(--tenant-dark-accent);
    color: var(--app-text);
}

[data-color-mode="dark"] .notefilter.btn-secondary {
    background-color: var(--tenant-dark-primary-bg);
    border-color: var(--tenant-dark-primary-bg);
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .tox.tox-tinymce {
    border-color: var(--app-border-strong) !important;
}

[data-color-mode="dark"] .tox:not(.tox-tinymce-inline) .tox-editor-header,
[data-color-mode="dark"] .tox .tox-toolbar,
[data-color-mode="dark"] .tox .tox-toolbar__overflow,
[data-color-mode="dark"] .tox .tox-toolbar__primary,
[data-color-mode="dark"] .tox .tox-toolbar-overlord,
[data-color-mode="dark"] .tox .tox-menubar {
    background-color: var(--app-surface-muted) !important;
    border-color: var(--app-border) !important;
    box-shadow: none !important;
}

[data-color-mode="dark"] .tox .tox-toolbar__group {
    border-color: var(--app-border) !important;
}

[data-color-mode="dark"] .tox .tox-tbtn,
[data-color-mode="dark"] .tox .tox-split-button,
[data-color-mode="dark"] .tox .tox-mbtn {
    background-color: transparent !important;
    color: var(--app-text-body) !important;
}

[data-color-mode="dark"] .tox .tox-tbtn svg,
[data-color-mode="dark"] .tox .tox-split-button svg,
[data-color-mode="dark"] .tox .tox-mbtn svg {
    fill: var(--app-text-body) !important;
}

[data-color-mode="dark"] .tox .tox-tbtn:hover,
[data-color-mode="dark"] .tox .tox-tbtn:focus,
[data-color-mode="dark"] .tox .tox-tbtn--enabled,
[data-color-mode="dark"] .tox .tox-split-button:hover,
[data-color-mode="dark"] .tox .tox-split-button:focus,
[data-color-mode="dark"] .tox .tox-mbtn:hover,
[data-color-mode="dark"] .tox .tox-mbtn:focus {
    background-color: var(--app-hover-bg) !important;
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .tox .tox-tbtn:hover svg,
[data-color-mode="dark"] .tox .tox-tbtn:focus svg,
[data-color-mode="dark"] .tox .tox-tbtn--enabled svg,
[data-color-mode="dark"] .tox .tox-split-button:hover svg,
[data-color-mode="dark"] .tox .tox-split-button:focus svg,
[data-color-mode="dark"] .tox .tox-mbtn:hover svg,
[data-color-mode="dark"] .tox .tox-mbtn:focus svg {
    fill: var(--app-text) !important;
}

[data-color-mode="dark"] .tox .tox-tbtn--disabled,
[data-color-mode="dark"] .tox .tox-tbtn--disabled svg,
[data-color-mode="dark"] .tox .tox-tbtn:disabled,
[data-color-mode="dark"] .tox .tox-tbtn:disabled svg {
    color: var(--app-text-faint) !important;
    fill: var(--app-text-faint) !important;
}

[data-color-mode="dark"] .tox .tox-edit-area::before {
    border-color: var(--app-border-strong) !important;
}

[data-color-mode="dark"] .tox .tox-edit-area,
[data-color-mode="dark"] .tox .tox-edit-area iframe {
    background-color: var(--app-surface-muted) !important;
}

[data-color-mode="dark"] .tox .tox-menu,
[data-color-mode="dark"] .tox .tox-collection--list {
    background-color: var(--app-surface) !important;
    border-color: var(--app-border-strong) !important;
    color: var(--app-text-body) !important;
}

[data-color-mode="dark"] .tox .tox-collection__item {
    color: var(--app-text-body) !important;
}

[data-color-mode="dark"] .tox .tox-collection__item--active,
[data-color-mode="dark"] .tox .tox-collection__item:hover {
    background-color: var(--app-hover-bg) !important;
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .sortable-drop-placeholder,
[data-color-mode="dark"] .unit-sortable-element-new,
[data-color-mode="dark"] .activity-sortable-element-new,
[data-color-mode="dark"] .unit-sortable-element,
[data-color-mode="dark"] .activity-sortable-element {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border);
    color: var(--app-text-body) !important;
}

[data-color-mode="dark"] .unit-sortable-element-new a,
[data-color-mode="dark"] .activity-sortable-element-new a,
[data-color-mode="dark"] .unit-sortable-element-title,
[data-color-mode="dark"] .unit-sortable-element-title a,
[data-color-mode="dark"] .activity-sortable-element-title {
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .unit-sortable-element-description,
[data-color-mode="dark"] .activity-sortable-element-description {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .unit-sortable-element-new i,
[data-color-mode="dark"] .activity-sortable-element-new i {
    color: #9ee4c8;
}

[data-color-mode="dark"] .course-units-builder .unit-sortable-element-new,
[data-color-mode="dark"] .course-units-builder .activity-sortable-element-new {
    background: transparent;
    border-color: transparent;
}

[data-color-mode="dark"] .course-units-builder .unit-sortable-element-new:before,
[data-color-mode="dark"] .course-units-builder .unit-sortable-element-new:after,
[data-color-mode="dark"] .course-units-builder .activity-sortable-element-new:before,
[data-color-mode="dark"] .course-units-builder .activity-sortable-element-new:after {
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .course-units-builder .unit-sortable-element-new a,
[data-color-mode="dark"] .course-units-builder .activity-sortable-element-new .dropdown > a {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .course-units-builder .course-sortable-handle {
    background-color: var(--app-surface);
    border-color: var(--app-border);
}

[data-color-mode="dark"] .course-units-builder .course-sortable-handle:before {
    background-image: radial-gradient(circle, var(--app-text-muted) 1.15px, transparent 1.3px);
}

[data-color-mode="dark"] .course-units-builder .unit-sortable-element:hover .course-sortable-handle,
[data-color-mode="dark"] .course-units-builder .activity-sortable-element:hover .course-sortable-handle,
[data-color-mode="dark"] .course-units-builder .ui-sortable-helper .course-sortable-handle {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .course-units-builder .activity-type-pill {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .moderation-report-form-builder .unit-sortable-element-new {
    background: transparent;
    border-color: transparent;
}

[data-color-mode="dark"] .moderation-report-form-builder .unit-sortable-element-new:before,
[data-color-mode="dark"] .moderation-report-form-builder .unit-sortable-element-new:after {
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .moderation-report-form-builder .unit-sortable-element-new a {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .moderation-report-form-builder .course-sortable-handle {
    background-color: var(--app-surface);
    border-color: var(--app-border);
}

[data-color-mode="dark"] .moderation-report-form-builder .course-sortable-handle:before {
    background-image: radial-gradient(circle, var(--app-text-muted) 1.15px, transparent 1.3px);
}

[data-color-mode="dark"] .moderation-report-form-builder .unit-sortable-element:hover .course-sortable-handle,
[data-color-mode="dark"] .moderation-report-form-builder .ui-sortable-helper .course-sortable-handle {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .moderation-report-form-builder .moderation-report-form-type-pill {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .custom-fields-builder .unit-sortable-element-new {
    background: transparent;
    border-color: transparent;
}

[data-color-mode="dark"] .custom-fields-builder .unit-sortable-element-new:before,
[data-color-mode="dark"] .custom-fields-builder .unit-sortable-element-new:after {
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .custom-fields-builder .unit-sortable-element-new a {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .custom-fields-builder .course-sortable-handle {
    background-color: var(--app-surface);
    border-color: var(--app-border);
}

[data-color-mode="dark"] .custom-fields-builder .course-sortable-handle:before {
    background-image: radial-gradient(circle, var(--app-text-muted) 1.15px, transparent 1.3px);
}

[data-color-mode="dark"] .custom-fields-builder .unit-sortable-element:hover .course-sortable-handle,
[data-color-mode="dark"] .custom-fields-builder .ui-sortable-helper .course-sortable-handle {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .custom-fields-builder .custom-field-type-pill,
[data-color-mode="dark"] .custom-fields-builder .custom-field-state-pill,
[data-color-mode="dark"] .custom-fields-builder .custom-field-status-pill {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .custom-fields-builder .custom-field-status-pill-active {
    background-color: rgba(46, 125, 91, 0.18);
    border-color: rgba(158, 228, 200, 0.35);
    color: #9ee4c8;
}

[data-color-mode="dark"] .contentauthoring-item {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .contentauthoring-item:hover {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}

[data-color-mode="dark"] #stage {
    background-color: var(--app-surface);
    color: var(--app-text-body);
}

[data-color-mode="dark"] #stage h1,
[data-color-mode="dark"] #stage h2,
[data-color-mode="dark"] #stage h3,
[data-color-mode="dark"] #stage h4,
[data-color-mode="dark"] #stage h5,
[data-color-mode="dark"] #stage h6,
[data-color-mode="dark"] #stage strong {
    color: var(--app-text);
}

[data-color-mode="dark"] #stage a:not(.btn) {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] #stage a:not(.btn):hover,
[data-color-mode="dark"] #stage a:not(.btn):focus {
    color: var(--tenant-dark-link-hover);
}

[data-color-mode="dark"] #content-column,
[data-color-mode="dark"] .sectionslist-container {
    background-color: var(--app-surface);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .sectionslist-container {
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .sectionslist-container h4 {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-color-mode="dark"] .answer-hint {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] #toc-column {
    background-color: var(--app-surface);
    border-right: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] #toc-close,
[data-color-mode="dark"] .toc-dash {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .toc-no-url {
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .contentelement-container {
    background-color: var(--app-surface);
}

[data-color-mode="dark"] .contentelement-scaled {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .contentelement-scaled h1,
[data-color-mode="dark"] .contentelement-scaled h2,
[data-color-mode="dark"] .contentelement-scaled h3,
[data-color-mode="dark"] .contentelement-scaled h4,
[data-color-mode="dark"] .contentelement-scaled h5,
[data-color-mode="dark"] .contentelement-scaled h6,
[data-color-mode="dark"] .contentelement-scaled strong,
[data-color-mode="dark"] .contentauthoring-item h1,
[data-color-mode="dark"] .contentauthoring-item h2,
[data-color-mode="dark"] .contentauthoring-item h3 {
    color: var(--app-text);
}

[data-color-mode="dark"] .contentauthoring-item-element-type {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text);
}

[data-color-mode="dark"] .contentauthoring-item-element-loading {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text);
}

[data-color-mode="dark"] .contentauthoring-item:hover .contentelement-pagebreak-text,
[data-color-mode="dark"] .contentelement-pagebreak-text,
[data-color-mode="dark"] .player_order_sortable li,
[data-color-mode="dark"] .player_match_item.draggable,
[data-color-mode="dark"] .contentelement-scaled .panel {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .contentelement-pagebreak-line {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .contentelement-scaled .player_multichoice_text,
[data-color-mode="dark"] .contentelement-scaled .player_order_text,
[data-color-mode="dark"] .contentelement-scaled .player_truefalse_text,
[data-color-mode="dark"] .contentelement-scaled .player_match_text,
[data-color-mode="dark"] .contentelement-scaled .player_assessment h2,
[data-color-mode="dark"] .contentelement-scaled .player_instructions {
    color: var(--app-text);
}

[data-color-mode="dark"] .contentelement-scaled.aside-container {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text-body);
}

[data-color-mode="dark"] .contentelement-scaled .aside-title {
    color: var(--app-text) !important;
    border-color: var(--app-border-strong) !important;
}

[data-color-mode="dark"] pre.bg-light {
    background-color: var(--app-input-bg) !important;
    border-color: var(--app-border-strong) !important;
    color: var(--app-input-text);
}

[data-color-mode="dark"] pre.bg-light code {
    color: var(--app-input-text);
}

[data-color-mode="dark"] .marking-question.form-section,
[data-color-mode="dark"] .marking-declaration {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .marking-answer-box,
[data-color-mode="dark"] .marking-answer-box-current {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
    color: var(--app-input-text);
}

[data-color-mode="dark"] .marking-answer-box-muted {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .marking-question .sub-question-text,
[data-color-mode="dark"] .marking-question .online-assessment-question-title,
[data-color-mode="dark"] .marking-question label,
[data-color-mode="dark"] .marking-answer-label,
[data-color-mode="dark"] .marking-intro strong,
[data-color-mode="dark"] .marking-declaration strong {
    color: var(--app-text);
}

[data-color-mode="dark"] .marking-intro,
[data-color-mode="dark"] .marking-declaration {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .marking-outcome-alert {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .marking-outcome-alert i {
    color: var(--tenant-dark-accent);
}

[data-color-mode="dark"] .marking-outcome-alert .overall-outcome-icon-passed {
    color: #9ee4c8;
}

[data-color-mode="dark"] .quiz-container .player_assessment,
[data-color-mode="dark"] .quiz-container .player_activity,
[data-color-mode="dark"] .online-assessment-player-question {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .quiz-container .player_multichoice,
[data-color-mode="dark"] .quiz-container .player_multichoicebody_surroundingbox {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .quiz-container .player_multichoice_text {
    color: var(--app-text);
}

[data-color-mode="dark"] .player-file-download,
[data-color-mode="dark"] .player-file-download:hover,
[data-color-mode="dark"] .player-file-download:focus {
    color: var(--app-text);
}

[data-color-mode="dark"] .player-file-download-icon {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .player-file-download-text {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .player-file {
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .player-file .custom-file-icon,
[data-color-mode="dark"] .online-assessment-current-file .custom-file-icon {
    background-color: var(--app-surface-muted);
    color: var(--app-text);
}

[data-color-mode="dark"] .online-assessment-current-file {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
    color: var(--app-input-text);
}

[data-color-mode="dark"] .online-assessment-current-file-link,
[data-color-mode="dark"] .online-assessment-current-file-link:hover,
[data-color-mode="dark"] .online-assessment-current-file-link:focus {
    color: var(--app-text);
}

[data-color-mode="dark"] .online-assessment-current-file-size {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .quiz-container .player_assessment h2,
[data-color-mode="dark"] .quiz-container .player_activity h2,
[data-color-mode="dark"] .quiz-container .player_assessment strong,
[data-color-mode="dark"] .quiz-container .player_activity strong,
[data-color-mode="dark"] .quiz-container .player_instructions,
[data-color-mode="dark"] .online-assessment-player-question .online-assessment-question-title,
[data-color-mode="dark"] .online-assessment-player-question .player-form-section-title,
[data-color-mode="dark"] .online-assessment-player-question .sub-question-text,
[data-color-mode="dark"] .online-assessment-player-question label,
[data-color-mode="dark"] .online-assessment-page-counter {
    color: var(--app-text) !important;
}

[data-color-mode="dark"] textarea.answerbox,
[data-color-mode="dark"] textarea.online-assessment-answer-field,
[data-color-mode="dark"] .external-assessment-answer-field,
[data-color-mode="dark"] .online-assessment-grid-readonly-answer {
    background-color: var(--app-input-bg) !important;
    border-color: var(--app-border-strong) !important;
    color: var(--app-input-text) !important;
}

[data-color-mode="dark"] textarea.answerbox:focus,
[data-color-mode="dark"] textarea.online-assessment-answer-field:focus,
[data-color-mode="dark"] .external-assessment-answer-field:focus {
    border-color: var(--tenant-dark-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--tenant-dark-focus-rgb), 0.25);
}

[data-color-mode="dark"] .assessment-player-readonly-field,
[data-color-mode="dark"] textarea.online-assessment-answer-field[readonly],
[data-color-mode="dark"] select.online-assessment-answer-field:disabled,
[data-color-mode="dark"] textarea.online-assessment-answer-field:disabled,
[data-color-mode="dark"] .external-assessment-answer-field:disabled,
[data-color-mode="dark"] .player-file .custom-file-label-disabled {
    background-color: var(--app-surface-muted) !important;
    border-color: var(--app-border-strong) !important;
    color: var(--app-text-body) !important;
}

[data-color-mode="dark"] .assessment-player-readonly-field:focus,
[data-color-mode="dark"] textarea.online-assessment-answer-field[readonly]:focus,
[data-color-mode="dark"] .external-assessment-answer-field:disabled:focus {
    border-color: var(--app-border-strong) !important;
    box-shadow: none !important;
}

[data-color-mode="dark"] .online-assessment-grid th {
    color: var(--app-text);
}

[data-color-mode="dark"] .online-assessment-grid-readonly-answer {
    border-style: solid !important;
}

[data-color-mode="dark"] .quiz-container .custom-checkbox label,
[data-color-mode="dark"] .quiz-container .custom-radio label,
[data-color-mode="dark"] .quiz-container .custom-checkbox legend {
    color: var(--app-text);
}

[data-color-mode="dark"] .quiz-container .custom-checkbox input + label::before,
[data-color-mode="dark"] .quiz-container .custom-radio input + label::before {
    background-color: var(--app-input-bg);
    border-color: var(--tenant-dark-accent);
}

[data-color-mode="dark"] .quiz-container .custom-radio input + label::after {
    border-color: var(--tenant-dark-accent);
}

[data-color-mode="dark"] .quiz-container .custom-checkbox input:focus + label::before,
[data-color-mode="dark"] .quiz-container .custom-radio input:focus + label::before {
    box-shadow: 0 0 0 3px rgba(var(--tenant-dark-focus-rgb), 0.28);
}

[data-color-mode="dark"] .quiz-container .outcome-text-passed {
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .quiz-container .outcome-text-failed {
    color: #f0a6ad !important;
}

[data-color-mode="dark"] .outcome-text-passed {
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .outcome-text-failed {
    color: #f0a6ad !important;
}

[data-color-mode="dark"] .activity-status-message-referred,
[data-color-mode="dark"] .activity-status-feedback-referred {
    background-color: #34242b;
    border-color: #70434b;
    color: #f3c7cc;
}

[data-color-mode="dark"] .quiz-container .quiz-correct-icon,
[data-color-mode="dark"] .quiz-container .quiz-correct-text {
    color: #9ee4c8;
}

[data-color-mode="dark"] .quiz-container .quiz-incorrect-icon,
[data-color-mode="dark"] .quiz-container .quiz-incorrect-text {
    color: #ffb3a8;
}

[data-color-mode="dark"] .table {
    --bs-table-bg: var(--app-surface);
    --bs-table-color: var(--app-text-body);
    --bs-table-border-color: var(--app-border);
    --bs-table-striped-bg: var(--app-surface-subtle);
    --bs-table-striped-color: var(--app-text-body);
    --bs-table-hover-bg: var(--app-hover-bg);
    --bs-table-hover-color: var(--app-text);
    color: var(--app-text-body);
    border-color: var(--app-border);
}

[data-color-mode="dark"] .table .thead-dark th,
[data-color-mode="dark"] .table th,
[data-color-mode="dark"] .table td {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .table .thead-dark th {
    background-color: var(--app-surface);
}

[data-color-mode="dark"] .table .thead-light th,
[data-color-mode="dark"] .activity-unit-heading {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .activity-unit-due-date,
[data-color-mode="dark"] .activity-type-label,
[data-color-mode="dark"] .activity-meta,
[data-color-mode="dark"] .activity-empty-value,
[data-color-mode="dark"] .activity-status-note,
[data-color-mode="dark"] .activity-score,
[data-color-mode="dark"] .activity-no-results {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .activity-name-cell strong,
[data-color-mode="dark"] .activity-date-cell {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .activity-filter-btn {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .activity-filter-btn:hover,
[data-color-mode="dark"] .activity-filter-btn:focus {
    background-color: var(--app-hover-bg);
    border-color: var(--tenant-dark-accent);
    color: var(--app-text);
}

[data-color-mode="dark"] .activity-filter-btn.active {
    background-color: var(--tenant-dark-primary-bg);
    border-color: var(--tenant-dark-primary-bg);
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .course-aim {
    background-color: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .course-aim-icon {
    background-color: var(--app-input-bg);
    border: 1px solid var(--app-border-strong);
    color: var(--tenant-dark-accent);
}

[data-color-mode="dark"] .course-aim-title,
[data-color-mode="dark"] .unit-card-title,
[data-color-mode="dark"] .activity-title {
    color: var(--app-text);
}

[data-color-mode="dark"] .course-aim-text,
[data-color-mode="dark"] .unit-description,
[data-color-mode="dark"] .activity-type-description,
[data-color-mode="dark"] .activity-score {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .unit-card {
    border-bottom-color: var(--app-border);
}

[data-color-mode="dark"] .unit-card-header {
    color: var(--app-text);
}

[data-color-mode="dark"] .unit-card-header:hover,
[data-color-mode="dark"] .unit-card-header:focus {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .unit-card-due-date,
[data-color-mode="dark"] .unit-card-toggle {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .unit-card-header:hover .unit-card-toggle,
[data-color-mode="dark"] .unit-card-header:focus .unit-card-toggle {
    background-color: var(--app-surface-muted);
    color: var(--app-text);
}

[data-color-mode="dark"] .unit-card-body,
[data-color-mode="dark"] .activity-row:not(:last-of-type) {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .activity-title a {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .activity-title a:hover,
[data-color-mode="dark"] .activity-title a:focus {
    color: var(--tenant-dark-link-hover);
}

[data-color-mode="dark"] .calendar {
    background-color: var(--app-surface);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .calendar-header {
    background-color: var(--tenant-dark-primary-bg);
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .calendar-header a,
[data-color-mode="dark"] .change-month-btn {
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .change-month-btn:hover,
[data-color-mode="dark"] .change-month-btn:focus {
    background-color: var(--tenant-dark-primary-hover-bg);
    color: var(--tenant-dark-primary-text);
}

[data-color-mode="dark"] .change-month-btn-clicked {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .calendar-week-day-name,
[data-color-mode="dark"] .calendar-container .showmore-modifier,
[data-color-mode="dark"] .calendar-container .showmore-modifier:hover {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .calendar-day {
    background-color: var(--app-surface-subtle);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .calendar-day-visible {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .calendar-day-day {
    color: var(--app-text);
}

[data-color-mode="dark"] .calendar-day-current {
    background-color: var(--tenant-dark-accent-muted-bg);
}

[data-color-mode="dark"] .calendar-day-current .calendar-day-day {
    background-color: var(--tenant-dark-accent-bg);
    color: var(--tenant-dark-accent-text);
}

[data-color-mode="dark"] .calendar-day-button:hover,
[data-color-mode="dark"] .calendar-day-button:focus {
    background-color: var(--app-hover-bg);
    border-color: var(--tenant-dark-accent);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] .calendar-badge.bg-primary {
    background-color: var(--tenant-dark-accent-muted-bg) !important;
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .calendar-badge.bg-warning {
    background-color: #4a3414 !important;
    color: #ffd28a;
}

[data-color-mode="dark"] .calendar-upcoming-day-container,
[data-color-mode="dark"] .modal .calendar-upcoming-day-container {
    border-bottom-color: var(--app-border);
}

[data-color-mode="dark"] .calendar-upcoming-day-more-less-button,
[data-color-mode="dark"] .calendar-upcoming-day-more-less-button:hover,
[data-color-mode="dark"] .calendar-upcoming-day-more-less-button:active,
[data-color-mode="dark"] .calendar-upcoming-day-more-less-button:focus {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .calls-wv-day,
[data-color-mode="dark"] .calls-mv-day,
[data-color-mode="dark"] .calls-wv-call,
[data-color-mode="dark"] .calls-mv-day-call {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-body);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] .calls-wv-day-header,
[data-color-mode="dark"] .calls-mv-day-header {
    background-color: var(--app-surface-muted);
    border-bottom-color: var(--app-border);
    color: var(--app-text);
}

[data-color-mode="dark"] .calls-wv-day-header a,
[data-color-mode="dark"] .calls-mv-day-header a {
    color: var(--tenant-dark-link);
}

[data-color-mode="dark"] .calls-wv-day-header a:hover,
[data-color-mode="dark"] .calls-wv-day-header a:focus,
[data-color-mode="dark"] .calls-mv-day-header a:hover,
[data-color-mode="dark"] .calls-mv-day-header a:focus {
    color: var(--tenant-dark-link-hover);
}

[data-color-mode="dark"] .calls-wv-day-content,
[data-color-mode="dark"] .calls-mv-day-content {
    background-color: var(--app-surface);
}

[data-color-mode="dark"] .calls-weekend-colour,
[data-color-mode="dark"] .calls-absense-colour {
    background-color: var(--app-surface-subtle);
}

[data-color-mode="dark"] .calls-wv-day-content-today,
[data-color-mode="dark"] .calls-mv-day-content-today {
    background-color: var(--tenant-dark-accent-muted-bg);
}

[data-color-mode="dark"] .calls-wv-call:hover,
[data-color-mode="dark"] .calls-mv-day-call:hover {
    border-color: var(--tenant-dark-accent);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] .calls-wv-call-success {
    background-color: #173d32;
    border-color: #2d8a69;
}

[data-color-mode="dark"] .calls-wv-call-fail {
    background-color: #4a2020;
    border-color: #c85f55;
}

[data-color-mode="dark"] .calls-wv-call-time {
    color: var(--app-text);
}

[data-color-mode="dark"] .calls-day-selected {
    outline-color: var(--tenant-dark-accent);
    box-shadow: 0 0 0 0.2rem rgba(var(--tenant-dark-focus-rgb), 0.25);
}

[data-color-mode="dark"] .enrolment-activities-table {
    background-color: var(--app-surface);
}

[data-color-mode="dark"] .enrolment-activities-table tbody tr:nth-child(odd) {
    --bs-table-bg: var(--app-surface-subtle);
    --bs-table-accent-bg: var(--app-surface-subtle);
    background-color: var(--app-surface-subtle);
}

[data-color-mode="dark"] .enrolment-activities-table tr.activity-row-target > td {
    --bs-table-bg: #3b321f;
    --bs-table-accent-bg: #3b321f;
}

[data-color-mode="dark"] .activity-no-results {
    background-color: var(--app-surface-muted);
    border: 1px solid var(--app-border);
}

[data-color-mode="dark"] .changelog-entry-summary,
[data-color-mode="dark"] .changelog-empty-value,
[data-color-mode="dark"] .changelog-detail-table td:before {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .changelog-detail-panel {
    background-color: var(--app-input-bg);
    border-color: var(--app-border-strong);
    color: var(--app-input-text);
}

[data-color-mode="dark"] .changelog-detail-table {
    background-color: var(--app-input-bg) !important;
    color: var(--app-input-text);
}

[data-color-mode="dark"] .changelog-detail-table tbody,
[data-color-mode="dark"] .changelog-detail-table tr,
[data-color-mode="dark"] .changelog-detail-table tbody th,
[data-color-mode="dark"] .changelog-detail-table tbody td {
    background-color: var(--app-input-bg) !important;
    color: var(--app-input-text);
}

[data-color-mode="dark"] .changelog-detail-table th,
[data-color-mode="dark"] .changelog-detail-table td {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .changelog-detail-table thead th {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text);
}

[data-color-mode="dark"] .changelog-field-name,
[data-color-mode="dark"] .changelog-field-action,
[data-color-mode="dark"] .changelog-field-before,
[data-color-mode="dark"] .changelog-field-after,
[data-color-mode="dark"] .changelog-field-value {
    color: var(--app-text-body);
}

@media (max-width: 767.98px) {
    [data-color-mode="dark"] .changelog-detail-table tr {
        border-color: var(--app-border);
    }
}

[data-color-mode="dark"] .dashboard-stat-card {
    border: 1px solid var(--app-border);
}

[data-color-mode="dark"] a.dashboard-stat-card:hover {
    color: var(--app-text-body);
    box-shadow: var(--app-shadow);
}

[data-color-mode="dark"] .dashboard-stat-title,
[data-color-mode="dark"] .dashboard-stat-title a,
[data-color-mode="dark"] .dashboard-stat-card-value,
[data-color-mode="dark"] .dashboard-stat-card .subheader-extratitle {
    color: var(--app-text);
}

[data-color-mode="dark"] .dashboard-stat-card,
[data-color-mode="dark"] .dashboard-stat-card-link,
[data-color-mode="dark"] .dashboard-stat-card-link:hover,
[data-color-mode="dark"] .dashboard-stat-card p {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .dashboard-stat-card-label {
    color: var(--app-text-muted);
}

[data-color-mode="dark"] .dashboard-stat-card-icon-blue {
    background-color: #17334d;
    color: #8cc8ef;
}

[data-color-mode="dark"] .dashboard-stat-card-icon-amber {
    background-color: #4a3212;
    color: #ffc56f;
}

[data-color-mode="dark"] .dashboard-stat-card-icon-slate {
    background-color: #293445;
    color: #aab8c9;
}

[data-color-mode="dark"] .dashboard-stat-card-icon-red {
    background-color: #4a2020;
    color: #ffaaa0;
}

[data-color-mode="dark"] .dashboard-stat-card-icon-green {
    background-color: #173d32;
    color: #9ee4c8;
}

[data-color-mode="dark"] .dashboard-stat-card-badge-red {
    background-color: #4a2020;
    color: #ffb3a8;
}

[data-color-mode="dark"] .dashboard-stat-card-badge-amber {
    background-color: #4a3414;
    color: #ffd28a;
}

[data-color-mode="dark"] .dashboard-stat-card-badge-green {
    background-color: #173d32;
    color: #9ee4c8;
}

[data-color-mode="dark"] .dashboard-stat-card-badge-blue {
    background-color: #183a4a;
    color: #99d6ef;
}

[data-color-mode="dark"] .dashboard-stat-card-badge-slate {
    background-color: #29374a;
    color: #c2cedc;
}

[data-color-mode="dark"] .subheader-stat-col {
    border-color: var(--app-border);
}

[data-color-mode="dark"] .list-badge-default {
    background-color: #29374a;
    color: #c2cedc;
}

[data-color-mode="dark"] .list-badge-primary {
    background-color: var(--tenant-dark-accent-muted-bg);
    color: var(--tenant-dark-accent-muted-text);
}

[data-color-mode="dark"] .list-badge-success {
    background-color: #173d32;
    color: #9ee4c8;
}

[data-color-mode="dark"] .list-badge-warning {
    background-color: #4a3414;
    color: #ffd28a;
}

[data-color-mode="dark"] .list-badge-info {
    background-color: #183a4a;
    color: #99d6ef;
}

[data-color-mode="dark"] .list-badge-danger {
    background-color: #4a2020;
    color: #ffb3a8;
}

[data-color-mode="dark"] .badge-primary,
[data-color-mode="dark"] .badge.bg-primary {
    background-color: var(--tenant-dark-accent-muted-bg) !important;
    border-color: var(--tenant-dark-accent-muted-border);
    color: var(--tenant-dark-accent-muted-text) !important;
}

[data-color-mode="dark"] .badge-success,
[data-color-mode="dark"] .badge.bg-success {
    background-color: #173d32 !important;
    border-color: #2d8a69;
    color: #9ee4c8 !important;
}

[data-color-mode="dark"] .badge-warning,
[data-color-mode="dark"] .badge.bg-warning {
    background-color: #4a3414 !important;
    border-color: #b87b22;
    color: #ffd28a !important;
}

[data-color-mode="dark"] .badge-danger,
[data-color-mode="dark"] .badge.bg-danger {
    background-color: #4a2020 !important;
    border-color: #c85f55;
    color: #ffb3a8 !important;
}

[data-color-mode="dark"] .badge.bg-info {
    background-color: #183a4a !important;
    border-color: #4294b8;
    color: #99d6ef !important;
}

[data-color-mode="dark"] .badge.bg-secondary {
    background-color: #29374a !important;
    border-color: #596a80;
    color: #c2cedc !important;
}

[data-color-mode="dark"] .select2-dropdown,
[data-color-mode="dark"] .datepicker.dropdown-menu,
[data-color-mode="dark"] .ui-widget-content,
[data-color-mode="dark"] .jconfirm-box {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    color: var(--app-text-body);
}

[data-color-mode="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
[data-color-mode="dark"] .select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: var(--app-dropdown-hover-bg);
    color: var(--app-text);
}

[data-color-mode="dark"] .select2-container--default .select2-results__option[aria-selected="true"],
[data-color-mode="dark"] .select2-container--default .select2-results__option[data-selected="true"] {
    background-color: var(--app-surface-muted);
    color: var(--app-text);
}

[data-color-mode="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected="true"],
[data-color-mode="dark"] .select2-container--default .select2-results__option--highlighted[data-selected="true"] {
    background-color: var(--app-dropdown-hover-bg);
    color: var(--app-text);
}

[data-color-mode="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-color-mode="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice,
[data-color-mode="dark"] .select2-results__option,
[data-color-mode="dark"] .datepicker table tr td,
[data-color-mode="dark"] .datepicker table tr th {
    color: var(--app-text-body);
}

[data-color-mode="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
}

[data-color-mode="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--app-text-muted) !important;
}

[data-color-mode="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
[data-color-mode="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    color: var(--app-text) !important;
}

[data-color-mode="dark"] .datepicker table tr td.day:hover,
[data-color-mode="dark"] .datepicker table tr td.focused {
    background-color: var(--app-hover-bg);
}

[data-color-mode="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

@media print {
    :root,
    [data-color-mode="dark"] {
        color-scheme: light;
    }
}
