@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ---- Shared palette: navy-indigo primary with soft blue-grey tints (used by every portal) ----
   light variants use an 14% tint */
:root,
:root[data-bs-theme=light],
:root[data-color-theme=Blue_Theme],
:root[data-bs-theme=light][data-color-theme=Blue_Theme] {
    --bs-primary: #0f3585;
    --bs-primary-rgb: 15, 53, 133;
    --bs-light-primary: rgba(15, 53, 133, 0.14);
    --bs-primary-bg-subtle: rgba(15, 53, 133, 0.14);
    --bs-primary-border-subtle: #9aaad0;
    --bs-primary-text-emphasis: #0a1d4d;
    --bs-secondary: #55698f;
    --bs-secondary-rgb: 85, 105, 143;
    --bs-light-secondary: rgba(85, 105, 143, 0.14);
    --bs-secondary-bg-subtle: rgba(85, 105, 143, 0.14);
    --bs-secondary-border-subtle: #a9b5cc;
    --bs-secondary-text-emphasis: #2b3750;
    --bs-info: #2f6a9a;
    --bs-info-rgb: 47, 106, 154;
    --bs-light-info: rgba(47, 106, 154, 0.14);
    --bs-info-bg-subtle: rgba(47, 106, 154, 0.14);
    --bs-info-border-subtle: #9dbdd6;
    --bs-info-text-emphasis: #173a56;
    --bs-danger: #c0392b;
    --bs-danger-rgb: 192, 57, 43;
    --bs-light-danger: rgba(192, 57, 43, 0.14);
    --bs-danger-bg-subtle: rgba(192, 57, 43, 0.14);
    --bs-danger-border-subtle: #e3a39c;
    --bs-danger-text-emphasis: #6b1d15;
    --bs-warning: #9a6b00;
    --bs-warning-rgb: 154, 107, 0;
    --bs-light-warning: rgba(240, 180, 0, 0.2);
    --bs-warning-bg-subtle: rgba(240, 180, 0, 0.2);
    --bs-warning-border-subtle: #f0d27a;
    --bs-warning-text-emphasis: #6b4a00;
    --bs-success: #1b8a50;
    --bs-success-rgb: 27, 138, 80;
    --bs-light-success: rgba(27, 138, 80, 0.14);
    --bs-success-bg-subtle: rgba(27, 138, 80, 0.14);
    --bs-success-border-subtle: #8cc6a8;
    --bs-success-text-emphasis: #0d4528;
}

:root .btn-primary,
:root[data-color-theme=Blue_Theme] .btn-primary,
:root[data-bs-theme=light][data-color-theme=Blue_Theme] .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #0f3585;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: #0b2a6a;
    --bs-btn-hover-border-color: #0b2a6a;
    --bs-btn-active-bg: #0b2a6a;
    --bs-btn-active-border-color: #0b2a6a;
    --bs-btn-disabled-bg: #0f3585;
    --bs-btn-disabled-border-color: #0f3585;
    --bs-btn-focus-shadow-rgb: 15, 53, 133;
}

:root .btn-outline-primary,
:root[data-color-theme=Blue_Theme] .btn-outline-primary,
:root[data-bs-theme=light][data-color-theme=Blue_Theme] .btn-outline-primary {
    --bs-btn-color: #0f3585;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0f3585;
    --bs-btn-hover-border-color: #0f3585;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0f3585;
    --bs-btn-active-border-color: #0f3585;
    --bs-btn-disabled-color: #0f3585;
    --bs-btn-disabled-border-color: #0f3585;
    --bs-btn-focus-shadow-rgb: 15, 53, 133;
}

:root .btn-secondary,
:root[data-color-theme=Blue_Theme] .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #55698f;
    --bs-btn-border-color: #55698f;
    --bs-btn-hover-bg: #43557a;
    --bs-btn-hover-border-color: #43557a;
    --bs-btn-active-bg: #43557a;
    --bs-btn-active-border-color: #43557a;
    --bs-btn-disabled-bg: #55698f;
    --bs-btn-disabled-border-color: #55698f;
    --bs-btn-focus-shadow-rgb: 85, 105, 143;
}

:root .btn-outline-secondary,
:root[data-color-theme=Blue_Theme] .btn-outline-secondary {
    --bs-btn-color: #55698f;
    --bs-btn-border-color: #55698f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #55698f;
    --bs-btn-hover-border-color: #55698f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #55698f;
    --bs-btn-active-border-color: #55698f;
    --bs-btn-disabled-color: #55698f;
    --bs-btn-disabled-border-color: #55698f;
    --bs-btn-focus-shadow-rgb: 85, 105, 143;
}

:root .btn-info,
:root[data-color-theme=Blue_Theme] .btn-info {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #2f6a9a;
    --bs-btn-border-color: #2f6a9a;
    --bs-btn-hover-bg: #245580;
    --bs-btn-hover-border-color: #245580;
    --bs-btn-active-bg: #245580;
    --bs-btn-active-border-color: #245580;
    --bs-btn-disabled-bg: #2f6a9a;
    --bs-btn-disabled-border-color: #2f6a9a;
    --bs-btn-focus-shadow-rgb: 47, 106, 154;
}

:root .btn-outline-info,
:root[data-color-theme=Blue_Theme] .btn-outline-info {
    --bs-btn-color: #2f6a9a;
    --bs-btn-border-color: #2f6a9a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2f6a9a;
    --bs-btn-hover-border-color: #2f6a9a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2f6a9a;
    --bs-btn-active-border-color: #2f6a9a;
    --bs-btn-disabled-color: #2f6a9a;
    --bs-btn-disabled-border-color: #2f6a9a;
    --bs-btn-focus-shadow-rgb: 47, 106, 154;
}

:root .btn-danger,
:root[data-color-theme=Blue_Theme] .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #c0392b;
    --bs-btn-border-color: #c0392b;
    --bs-btn-hover-bg: #9f2e22;
    --bs-btn-hover-border-color: #9f2e22;
    --bs-btn-active-bg: #9f2e22;
    --bs-btn-active-border-color: #9f2e22;
    --bs-btn-disabled-bg: #c0392b;
    --bs-btn-disabled-border-color: #c0392b;
    --bs-btn-focus-shadow-rgb: 192, 57, 43;
}

:root .btn-outline-danger,
:root[data-color-theme=Blue_Theme] .btn-outline-danger {
    --bs-btn-color: #c0392b;
    --bs-btn-border-color: #c0392b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #c0392b;
    --bs-btn-hover-border-color: #c0392b;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #c0392b;
    --bs-btn-active-border-color: #c0392b;
    --bs-btn-disabled-color: #c0392b;
    --bs-btn-disabled-border-color: #c0392b;
    --bs-btn-focus-shadow-rgb: 192, 57, 43;
}

:root .btn-warning,
:root[data-color-theme=Blue_Theme] .btn-warning {
    --bs-btn-color: #2b1f00;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-bg: #f0b400;
    --bs-btn-border-color: #f0b400;
    --bs-btn-hover-bg: #d9a000;
    --bs-btn-hover-border-color: #d9a000;
    --bs-btn-active-bg: #d9a000;
    --bs-btn-active-border-color: #d9a000;
    --bs-btn-disabled-bg: #f0b400;
    --bs-btn-disabled-border-color: #f0b400;
    --bs-btn-focus-shadow-rgb: 240, 180, 0;
}

:root .btn-outline-warning,
:root[data-color-theme=Blue_Theme] .btn-outline-warning {
    --bs-btn-color: #b07d00;
    --bs-btn-border-color: #b07d00;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-bg: #f0b400;
    --bs-btn-hover-border-color: #f0b400;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-active-bg: #f0b400;
    --bs-btn-active-border-color: #f0b400;
    --bs-btn-disabled-color: #b07d00;
    --bs-btn-disabled-border-color: #b07d00;
    --bs-btn-focus-shadow-rgb: 240, 180, 0;
}

:root .btn-success,
:root[data-color-theme=Blue_Theme] .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #1b8a50;
    --bs-btn-border-color: #1b8a50;
    --bs-btn-hover-bg: #146c3e;
    --bs-btn-hover-border-color: #146c3e;
    --bs-btn-active-bg: #146c3e;
    --bs-btn-active-border-color: #146c3e;
    --bs-btn-disabled-bg: #1b8a50;
    --bs-btn-disabled-border-color: #1b8a50;
    --bs-btn-focus-shadow-rgb: 27, 138, 80;
}

:root .btn-outline-success,
:root[data-color-theme=Blue_Theme] .btn-outline-success {
    --bs-btn-color: #1b8a50;
    --bs-btn-border-color: #1b8a50;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1b8a50;
    --bs-btn-hover-border-color: #1b8a50;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1b8a50;
    --bs-btn-active-border-color: #1b8a50;
    --bs-btn-disabled-color: #1b8a50;
    --bs-btn-disabled-border-color: #1b8a50;
    --bs-btn-focus-shadow-rgb: 27, 138, 80;
}

:root .swal2-styled.swal2-confirm,
:root[data-color-theme=Blue_Theme] .swal2-styled.swal2-confirm {
    background-color: #0f3585;
}

:root .swal2-styled.swal2-cancel,
:root[data-color-theme=Blue_Theme] .swal2-styled.swal2-cancel {
    background-color: #c0392b;
}

/* Bootstrap components that hard-code the old blue instead of reading --bs-primary */
:root .nav-pills {
    --bs-nav-pills-link-active-bg: #0f3585;
}

:root .nav-tabs {
    --bs-nav-tabs-link-active-bg: #0f3585;
    --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) #0f3585;
}

:root .nav-tabs .nav-link.active {
    box-shadow: 0 5px 6px rgba(15, 53, 133, .3);
}

:root .pagination {
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(15, 53, 133, 0.25);
    --bs-pagination-active-bg: #0f3585;
    --bs-pagination-active-border-color: #0f3585;
}

:root .progress,
:root .progress-stacked {
    --bs-progress-bar-bg: #0f3585;
}

:root .list-group {
    --bs-list-group-active-bg: #0f3585;
    --bs-list-group-active-border-color: #0f3585;
}

:root .form-control:focus {
    box-shadow: 0 0 0 .25rem rgba(15, 53, 133, .25);
}

:root .form-select:focus {
    border-color: #0f3585 !important;
    box-shadow: 0 0 0 .25rem rgba(15, 53, 133, .25);
}

:root .nav-link:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(15, 53, 133, .25);
}

:root .form-check-input[type=checkbox]:indeterminate {
    background-color: #0f3585;
    border-color: #0f3585;
}

:root .form-range::-webkit-slider-thumb {
    background-color: #0f3585;
}

:root .form-range::-moz-range-thumb {
    background-color: #0f3585;
}

/* Page background: a slightly deeper blue-grey so white cards stand out (light theme only) */
:root:not([data-bs-theme=dark]) #main-wrapper {
    background-color: #e5ebf4;
}

/* ---- Dark theme: brighter text/outline shades, mid-tone buttons, deeper page background ---- */
:root[data-bs-theme=dark],
:root[data-bs-theme=dark][data-color-theme=Blue_Theme] {
    --bs-primary: #2bb3c0;
    --bs-primary-rgb: 43, 179, 192;
    --bs-light-primary: rgba(43, 179, 192, 0.18);
    --bs-primary-bg-subtle: rgba(43, 179, 192, 0.18);
    --bs-primary-border-subtle: rgba(43, 179, 192, 0.45);
    --bs-primary-text-emphasis: #7ee3ec;
    --bs-secondary: #8c9cc0;
    --bs-secondary-rgb: 109, 127, 166;
    --bs-light-secondary: rgba(109, 127, 166, 0.22);
    --bs-secondary-bg-subtle: rgba(109, 127, 166, 0.22);
    --bs-secondary-border-subtle: #6d7fa6;
    --bs-secondary-text-emphasis: #b4c0da;
    --bs-info: #4f9bd0;
    --bs-info-rgb: 47, 127, 181;
    --bs-light-info: rgba(47, 127, 181, 0.22);
    --bs-info-bg-subtle: rgba(47, 127, 181, 0.22);
    --bs-info-border-subtle: #2f7fb5;
    --bs-info-text-emphasis: #8cc3e6;
    --bs-danger: #e8776b;
    --bs-danger-rgb: 212, 73, 59;
    --bs-light-danger: rgba(212, 73, 59, 0.22);
    --bs-danger-bg-subtle: rgba(212, 73, 59, 0.22);
    --bs-danger-border-subtle: #d4493b;
    --bs-danger-text-emphasis: #f2a79f;
    --bs-warning: #f5c542;
    --bs-warning-rgb: 245, 197, 66;
    --bs-light-warning: rgba(245, 197, 66, 0.2);
    --bs-warning-bg-subtle: rgba(245, 197, 66, 0.2);
    --bs-warning-border-subtle: #c9a02a;
    --bs-warning-text-emphasis: #f8dc84;
    --bs-success: #45bd82;
    --bs-success-rgb: 38, 160, 99;
    --bs-light-success: rgba(38, 160, 99, 0.22);
    --bs-success-bg-subtle: rgba(38, 160, 99, 0.22);
    --bs-success-border-subtle: #26a063;
    --bs-success-text-emphasis: #8fdab5;
}

:root[data-bs-theme=dark] .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #146c63;
    --bs-btn-border-color: #146c63;
    --bs-btn-hover-bg: #198278;
    --bs-btn-hover-border-color: #198278;
    --bs-btn-active-bg: #198278;
    --bs-btn-active-border-color: #198278;
    --bs-btn-disabled-bg: #146c63;
    --bs-btn-disabled-border-color: #146c63;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-outline-primary {
    --bs-btn-color: #5eead4;
    --bs-btn-border-color: #198278;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #146c63;
    --bs-btn-hover-border-color: #146c63;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #146c63;
    --bs-btn-active-border-color: #146c63;
    --bs-btn-disabled-color: #5eead4;
    --bs-btn-disabled-border-color: #198278;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #264a54;
    --bs-btn-border-color: #264a54;
    --bs-btn-hover-bg: #315d69;
    --bs-btn-hover-border-color: #315d69;
    --bs-btn-active-bg: #315d69;
    --bs-btn-active-border-color: #315d69;
    --bs-btn-disabled-bg: #264a54;
    --bs-btn-disabled-border-color: #264a54;
    --bs-btn-focus-shadow-rgb: 38, 74, 84;
}

:root[data-bs-theme=dark] .btn-outline-secondary {
    --bs-btn-color: #b4c8ce;
    --bs-btn-border-color: #315d69;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #264a54;
    --bs-btn-hover-border-color: #264a54;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #264a54;
    --bs-btn-active-border-color: #264a54;
    --bs-btn-disabled-color: #b4c8ce;
    --bs-btn-disabled-border-color: #315d69;
    --bs-btn-focus-shadow-rgb: 38, 74, 84;
}

:root[data-bs-theme=dark] .btn-info {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #146c63;
    --bs-btn-border-color: #146c63;
    --bs-btn-hover-bg: #198278;
    --bs-btn-hover-border-color: #198278;
    --bs-btn-active-bg: #198278;
    --bs-btn-active-border-color: #198278;
    --bs-btn-disabled-bg: #146c63;
    --bs-btn-disabled-border-color: #146c63;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-outline-info {
    --bs-btn-color: #5eead4;
    --bs-btn-border-color: #198278;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #146c63;
    --bs-btn-hover-border-color: #146c63;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #146c63;
    --bs-btn-active-border-color: #146c63;
    --bs-btn-disabled-color: #5eead4;
    --bs-btn-disabled-border-color: #198278;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #d4493b;
    --bs-btn-border-color: #d4493b;
    --bs-btn-hover-bg: #e05a4c;
    --bs-btn-hover-border-color: #e05a4c;
    --bs-btn-active-bg: #e05a4c;
    --bs-btn-active-border-color: #e05a4c;
    --bs-btn-disabled-bg: #d4493b;
    --bs-btn-disabled-border-color: #d4493b;
    --bs-btn-focus-shadow-rgb: 212, 73, 59;
}

:root[data-bs-theme=dark] .btn-outline-danger {
    --bs-btn-color: #e8776b;
    --bs-btn-border-color: #e8776b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #d4493b;
    --bs-btn-hover-border-color: #d4493b;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #d4493b;
    --bs-btn-active-border-color: #d4493b;
    --bs-btn-disabled-color: #e8776b;
    --bs-btn-disabled-border-color: #e8776b;
    --bs-btn-focus-shadow-rgb: 212, 73, 59;
}

:root[data-bs-theme=dark] .btn-warning {
    --bs-btn-color: #2b1f00;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-bg: #f5c542;
    --bs-btn-border-color: #f5c542;
    --bs-btn-hover-bg: #f8d160;
    --bs-btn-hover-border-color: #f8d160;
    --bs-btn-active-bg: #f8d160;
    --bs-btn-active-border-color: #f8d160;
    --bs-btn-disabled-bg: #f5c542;
    --bs-btn-disabled-border-color: #f5c542;
    --bs-btn-focus-shadow-rgb: 245, 197, 66;
}

:root[data-bs-theme=dark] .btn-outline-warning {
    --bs-btn-color: #f5c542;
    --bs-btn-border-color: #f5c542;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-bg: #f5c542;
    --bs-btn-hover-border-color: #f5c542;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-active-bg: #f5c542;
    --bs-btn-active-border-color: #f5c542;
    --bs-btn-disabled-color: #f5c542;
    --bs-btn-disabled-border-color: #f5c542;
    --bs-btn-focus-shadow-rgb: 245, 197, 66;
}

:root[data-bs-theme=dark] .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #26a063;
    --bs-btn-border-color: #26a063;
    --bs-btn-hover-bg: #32b373;
    --bs-btn-hover-border-color: #32b373;
    --bs-btn-active-bg: #32b373;
    --bs-btn-active-border-color: #32b373;
    --bs-btn-disabled-bg: #26a063;
    --bs-btn-disabled-border-color: #26a063;
    --bs-btn-focus-shadow-rgb: 38, 160, 99;
}

:root[data-bs-theme=dark] .btn-outline-success {
    --bs-btn-color: #45bd82;
    --bs-btn-border-color: #45bd82;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #26a063;
    --bs-btn-hover-border-color: #26a063;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #26a063;
    --bs-btn-active-border-color: #26a063;
    --bs-btn-disabled-color: #45bd82;
    --bs-btn-disabled-border-color: #45bd82;
    --bs-btn-focus-shadow-rgb: 38, 160, 99;
}

:root[data-bs-theme=dark] .swal2-styled.swal2-confirm {
    background-color: #146c63;
}

:root[data-bs-theme=dark] .swal2-styled.swal2-cancel {
    background-color: #d4493b;
}

:root[data-bs-theme=dark] .nav-pills {
    --bs-nav-pills-link-active-bg: #146c63;
}

:root[data-bs-theme=dark] .nav-tabs {
    --bs-nav-tabs-link-active-bg: #146c63;
    --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) #146c63;
}

:root[data-bs-theme=dark] .nav-tabs .nav-link.active {
    box-shadow: 0 5px 6px rgba(20, 108, 99, .35);
}

:root[data-bs-theme=dark] .pagination {
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(20, 108, 99, 0.35);
    --bs-pagination-active-bg: #146c63;
    --bs-pagination-active-border-color: #146c63;
}

:root[data-bs-theme=dark] .progress,
:root[data-bs-theme=dark] .progress-stacked {
    --bs-progress-bar-bg: #2bb3c0;
}

:root[data-bs-theme=dark] .list-group {
    --bs-list-group-active-bg: #167f8a;
    --bs-list-group-active-border-color: #2bb3c0;
}

:root[data-bs-theme=dark] .form-control:focus {
    box-shadow: 0 0 0 .25rem rgba(43, 179, 192, .28);
}

:root[data-bs-theme=dark] .form-select:focus {
    border-color: #2bb3c0 !important;
    box-shadow: 0 0 0 .25rem rgba(43, 179, 192, .28);
}

:root[data-bs-theme=dark] .nav-link:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(43, 179, 192, .28);
}

:root[data-bs-theme=dark] .form-check-input[type=checkbox]:indeterminate {
    background-color: #2bb3c0;
    border-color: #2bb3c0;
}

:root[data-bs-theme=dark] .form-range::-webkit-slider-thumb {
    background-color: #2bb3c0;
}

:root[data-bs-theme=dark] .form-range::-moz-range-thumb {
    background-color: #2bb3c0;
}

/* Dark page background: deeper than the cards and sidebar, which stay #111c2d */
:root[data-bs-theme=dark] #main-wrapper {
    background-color: #0e192a;
}

/* Solid warning badges/backgrounds use the same gold as the button (text colour stays darker for readability) */
:root:not([data-bs-theme=dark]) .bg-warning {
    background-color: #f0b400 !important;
    color: #2b1f00 !important;
}

:root[data-bs-theme=dark] .bg-warning {
    background-color: #f5c542 !important;
    color: #2b1f00 !important;
}

/* Card borders: pages that mark cards "border-0" (utility is !important) still get the theme's card border */
[data-card=border] .card.border-0 {
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: none !important;
}

/* The default light border is almost the same shade as the new page background, so darken it a touch */
:root:not([data-bs-theme=dark])[data-card=border] .card,
:root:not([data-bs-theme=dark])[data-card=border] .card.border-0 {
    border-color: #c5cfe0 !important;
}

/* Table borders: a slight blue-grey line between rows and cells */
:root:not([data-bs-theme=dark]) .table,
:root:not([data-bs-theme=dark]) table.dataTable {
    --bs-table-border-color: #d3dbe8;
    --bs-border-color: #d3dbe8;
}

:root:not([data-bs-theme=dark]) .table> :not(caption)>*>*,
:root:not([data-bs-theme=dark]) table.dataTable>tbody>tr>*,
:root:not([data-bs-theme=dark]) table.dataTable>thead>tr>* {
    border-color: #d3dbe8;
}

:root:not([data-bs-theme=dark]) table.dataTable>thead>tr>* {
    border-bottom: 1px solid #c5cfe0;
}

:root[data-bs-theme=dark] .table,
:root[data-bs-theme=dark] table.dataTable {
    --bs-table-border-color: rgba(189, 200, 240, 0.22);
}

/* Buttons: squarer corners, same radius as Bootstrap's rounded-2 (utility classes such as rounded-circle / rounded-pill still win) */
:root .btn,
:root .btn-sm,
:root .btn-lg,
:root .btn-group-sm>.btn,
:root .btn-group-lg>.btn {
    --bs-btn-border-radius: var(--bs-border-radius);
}

/* Every table body gets the same look as class="table-group-divider bg-white" (divider line under the header, white body).
   Done here instead of editing ~550 <tbody> tags, so DataTables and ajax-loaded tables get it too. White only in light mode. */
.table>tbody,
table.dataTable>tbody {
    border-top: calc(var(--bs-border-width, 1px) * 2) solid currentcolor;
}

:root:not([data-bs-theme=dark]) .table>tbody,
:root:not([data-bs-theme=dark]) table.dataTable>tbody {
    background-color: #fff !important;
}

/* Form validation colours: valid = green, invalid = red (inputs, selects, and their inline SVG icons) */
:root {
    --bs-form-valid-color: #1b8a50;
    --bs-form-valid-border-color: #1b8a50;
    --bs-form-invalid-color: #c0392b;
    --bs-form-invalid-border-color: #c0392b;
}

:root[data-bs-theme=dark] {
    --bs-form-valid-color: #45bd82;
    --bs-form-valid-border-color: #45bd82;
    --bs-form-invalid-color: #e8776b;
    --bs-form-invalid-border-color: #e8776b;
}

:root .form-control.is-valid,
:root .was-validated .form-control:valid {
    border-color: var(--bs-form-valid-border-color);
    padding-right: calc(1.5em + 16px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%231b8a50' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + 4px) center;
    background-size: calc(.75em + 8px) calc(.75em + 8px)
}

:root .form-select.is-valid:not([multiple]):not([size]),
:root .form-select.is-valid:not([multiple])[size="1"],
:root .was-validated .form-select:valid:not([multiple]):not([size]),
:root .was-validated .form-select:valid:not([multiple])[size="1"] {
    --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%231b8a50' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    padding-right: 88px;
    background-position: right 16px center, center right 48px;
    background-size: 16px 12px, calc(.75em + 8px) calc(.75em + 8px)
}

:root .form-control.is-invalid,
:root .was-validated .form-control:invalid {
    border-color: var(--bs-form-invalid-border-color);
    padding-right: calc(1.5em + 16px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23c0392b'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23c0392b' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + 4px) center;
    background-size: calc(.75em + 8px) calc(.75em + 8px)
}

:root .form-select.is-invalid:not([multiple]):not([size]),
:root .form-select.is-invalid:not([multiple])[size="1"],
:root .was-validated .form-select:invalid:not([multiple]):not([size]),
:root .was-validated .form-select:invalid:not([multiple])[size="1"] {
    --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23c0392b'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23c0392b' stroke='none'/%3e%3c/svg%3e");
    padding-right: 88px;
    background-position: right 16px center, center right 48px;
    background-size: 16px 12px, calc(.75em + 8px) calc(.75em + 8px)
}

:root[data-bs-theme=dark] .form-control.is-valid,
:root[data-bs-theme=dark] .was-validated .form-control:valid {
    border-color: var(--bs-form-valid-border-color);
    padding-right: calc(1.5em + 16px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2345bd82' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + 4px) center;
    background-size: calc(.75em + 8px) calc(.75em + 8px)
}

:root[data-bs-theme=dark] .form-select.is-valid:not([multiple]):not([size]),
:root[data-bs-theme=dark] .form-select.is-valid:not([multiple])[size="1"],
:root[data-bs-theme=dark] .was-validated .form-select:valid:not([multiple]):not([size]),
:root[data-bs-theme=dark] .was-validated .form-select:valid:not([multiple])[size="1"] {
    --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2345bd82' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    padding-right: 88px;
    background-position: right 16px center, center right 48px;
    background-size: 16px 12px, calc(.75em + 8px) calc(.75em + 8px)
}

:root[data-bs-theme=dark] .form-control.is-invalid,
:root[data-bs-theme=dark] .was-validated .form-control:invalid {
    border-color: var(--bs-form-invalid-border-color);
    padding-right: calc(1.5em + 16px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e8776b'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e8776b' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + 4px) center;
    background-size: calc(.75em + 8px) calc(.75em + 8px)
}

:root[data-bs-theme=dark] .form-select.is-invalid:not([multiple]):not([size]),
:root[data-bs-theme=dark] .form-select.is-invalid:not([multiple])[size="1"],
:root[data-bs-theme=dark] .was-validated .form-select:invalid:not([multiple]):not([size]),
:root[data-bs-theme=dark] .was-validated .form-select:invalid:not([multiple])[size="1"] {
    --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e8776b'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e8776b' stroke='none'/%3e%3c/svg%3e");
    padding-right: 88px;
    background-position: right 16px center, center right 48px;
    background-size: 16px 12px, calc(.75em + 8px) calc(.75em + 8px)
}

/* Toastr notifications and SweetAlert success ring */
:root .toast-success {
    background-color: #1b8a50;
}

:root .toast-error {
    background-color: #c0392b;
}

:root .toast-warning {
    background-color: #f0b400;
    color: #2b1f00;
}

:root .toast-info {
    background-color: #0a4d73;
}

:root[data-bs-theme=dark] .toast-success {
    background-color: #26a063;
}

:root[data-bs-theme=dark] .toast-error {
    background-color: #d4493b;
}

:root[data-bs-theme=dark] .toast-warning {
    background-color: #f5c542;
    color: #2b1f00;
}

:root[data-bs-theme=dark] .toast-info {
    background-color: #2f7fb5;
}

:root .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(27, 138, 80, .3);
}


/* Font: Open Sans everywhere (the template default and the Poppins in main.css / gs.css are overridden here).
   Icon fonts keep their own family because they are set on the icon classes, not on these elements. */
:root,
:root[data-bs-theme=light],
:root[data-bs-theme=dark] {
    --bs-font-sans-serif: "Open Sans", sans-serif;
    --bs-body-font-family: "Open Sans", sans-serif;
}

html body,
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body button,
html body input,
html body select,
html body textarea,
html body .btn,
html body .form-control,
html body .form-select,
html body .swal2-popup,
html body .select2-container,
html body .select2-dropdown,
html body .dataTables_wrapper,
html body .daterangepicker,
html body #toast-container,
html body .modal,
html body .dropdown-menu,
html body .tooltip,
html body .popover {
    font-family: "Open Sans", sans-serif !important;
}


/* File chooser button: several portals hard-code their own blue or green in mycss.css, so use the palette here */
:root input[type="file"].form-control::file-selector-button,
:root .form-control::file-selector-button {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

:root input[type="file"].form-control:hover::file-selector-button,
:root .form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #0b2a6a !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] input[type="file"].form-control::file-selector-button,
:root[data-bs-theme=dark] .form-control::file-selector-button {
    background-color: #167f8a !important;
}

:root[data-bs-theme=dark] input[type="file"].form-control:hover::file-selector-button,
:root[data-bs-theme=dark] .form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #2bb3c0 !important;
}

/* Sidebar: the open page is a solid dark pill with light text (it was a pale pill with dark text) */
:root #sidebarnav .sidebar-item .sidebar-link.active::before,
:root #sidebarnav .sidebar-item.selected>.sidebar-link::before,
:root #sidebarnav .selected .primary-hover-bg::before {
    background-color: var(--bs-primary) !important;
}

:root #sidebarnav>.sidebar-item>.sidebar-link.active::before,
:root #sidebarnav>.sidebar-item.selected>.sidebar-link::before,
:root #sidebarnav>.sidebar-item .primary-hover-bg.active::before {
    width: calc(100% + 26px) !important;
}

:root #sidebarnav .sidebar-item .sidebar-link.active,
:root #sidebarnav .sidebar-item .sidebar-link.active .aside-icon,
:root #sidebarnav .sidebar-item .sidebar-link.active .aside-icon *,
:root #sidebarnav .sidebar-item .sidebar-link.active .hide-menu,
:root #sidebarnav .sidebar-item.selected>.sidebar-link,
:root #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon,
:root #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon *,
:root #sidebarnav .sidebar-item.selected>.sidebar-link .hide-menu {
    color: #fff !important;
}

:root #sidebarnav .sidebar-item .sidebar-link.active.has-arrow::after,
:root #sidebarnav .sidebar-item.selected>.sidebar-link.has-arrow::after {
    border-color: #fff !important;
}

:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
:root[data-bs-theme=dark] #sidebarnav .selected .primary-hover-bg::before {
    background-color: #146c63 !important;
}

:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover::before,
:root[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg:hover::before {
    background-color: rgba(20, 108, 99, 0.35) !important;
}

:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover,
:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .aside-icon,
:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .aside-icon *,
:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu {
    color: #ffffff !important;
}

/* Collapsed sidebar (desktop): the open page is a rounded square around its icon, not a clipped half circle */
@media (min-width: 1200px) {

    #main-wrapper.show-sidebar .left-sidebar:not(:hover) #sidebarnav .sidebar-item .sidebar-link.active::before,
    #main-wrapper.show-sidebar .left-sidebar:not(:hover) #sidebarnav .sidebar-item.selected>.sidebar-link::before {
        left: 0 !important;
        width: 100% !important;
        border-radius: 12px !important;
    }
}

/* Top bar buttons: dark with light icons and text (they were pale with dark icons) */
:root nav.navbar .nav-icon-hover-bg.bg-primary-subtle,
:root nav.navbar .d-inline-flex.bg-primary-subtle {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

:root nav.navbar .nav-icon-hover-bg.bg-primary-subtle a,
:root nav.navbar .nav-icon-hover-bg.bg-primary-subtle span,
:root nav.navbar .nav-icon-hover-bg.bg-primary-subtle iconify-icon,
:root nav.navbar .d-inline-flex.bg-primary-subtle,
:root nav.navbar .d-inline-flex.bg-primary-subtle * {
    color: #fff !important;
}

:root nav.navbar .bg-danger-subtle {
    background-color: var(--bs-danger) !important;
}

:root nav.navbar .bg-danger-subtle a,
:root nav.navbar .bg-danger-subtle iconify-icon,
:root nav.navbar .bg-danger-subtle i {
    color: #fff !important;
}

:root[data-bs-theme=dark] nav.navbar .nav-icon-hover-bg.bg-primary-subtle,
:root[data-bs-theme=dark] nav.navbar .d-inline-flex.bg-primary-subtle {
    background-color: #146c63 !important;
    border-color: #146c63 !important;
}

:root[data-bs-theme=dark] nav.navbar .bg-danger-subtle {
    background-color: #d4493b !important;
}

:root nav.navbar .d-inline-flex.bg-primary-subtle select.form-select,
:root nav.navbar .d-inline-flex.bg-primary-subtle select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Top bar: each button gets its own colour (school navy, language and home steel blue, theme slate, logout red) */
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(#lbl-lang-ar),
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(#lbl-lang-en),
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(iconify-icon[icon*="home"]) {
    background-color: var(--bs-info) !important;
}

:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(.dark-layout),
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(.light-layout) {
    background-color: var(--bs-secondary) !important;
}

:root[data-bs-theme=dark] nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(#lbl-lang-ar),
:root[data-bs-theme=dark] nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(#lbl-lang-en),
:root[data-bs-theme=dark] nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(iconify-icon[icon*="home"]) {
    background-color: #19707d !important;
}

:root[data-bs-theme=dark] nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(.dark-layout),
:root[data-bs-theme=dark] nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:has(.light-layout) {
    background-color: #1e545c !important;
}

/* School selector: the open list keeps normal dark text on a white background (the closed box is white on navy) */
:root nav.navbar .d-inline-flex.bg-primary-subtle select option,
:root nav.navbar .d-inline-flex.bg-primary-subtle select optgroup {
    background-color: #fff !important;
    color: #111c2d !important;
}

:root[data-bs-theme=dark] nav.navbar .d-inline-flex.bg-primary-subtle select option,
:root[data-bs-theme=dark] nav.navbar .d-inline-flex.bg-primary-subtle select optgroup {
    background-color: #111c2d !important;
    color: #fff !important;
}

/* Top bar polish: soft shadow and lift on hover, solid-looking icons, an icon chip on the school selector */
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle,
:root nav.navbar li.bg-danger-subtle {
    box-shadow: 0 2px 6px rgba(15, 30, 70, .22);
}

/* No hover effect on the top bar buttons: they look the same with and without the mouse over them */
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle:hover,
:root nav.navbar li.bg-danger-subtle:hover {
    transform: none;
    filter: none;
}

:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle iconify-icon,
:root nav.navbar li.bg-danger-subtle iconify-icon {
    opacity: 1 !important;
    font-size: 1.3rem !important;
}

:root nav.navbar .d-inline-flex.bg-primary-subtle {
    box-shadow: 0 2px 6px rgba(15, 30, 70, .22);
}

:root nav.navbar .d-inline-flex.bg-primary-subtle>iconify-icon {
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    padding: 4px;
    width: 26px;
    height: 26px;
    font-size: 1rem !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
}


/* Same size for every top bar button: 40px circles with 20px icons; the school selector is 40px high too */
:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle,
:root nav.navbar li.bg-danger-subtle {
    width: 40px !important;
    height: 40px !important;
}

:root nav.navbar li.nav-icon-hover-bg.bg-primary-subtle iconify-icon,
:root nav.navbar li.bg-danger-subtle iconify-icon {
    font-size: 1.25rem !important;
    width: 1.25rem;
    height: 1.25rem;
    filter: none !important;
}

:root nav.navbar .d-inline-flex.bg-primary-subtle {
    height: 40px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

:root nav.navbar .d-inline-flex.bg-primary-subtle>iconify-icon {
    width: 24px;
    height: 24px;
    padding: 4px;
    filter: none !important;
}

/* No outline buttons: every .btn-outline-* is a solid filled button in the same colour */
:root .btn-outline-primary {
    --bs-btn-bg: #0f3585;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: #0b2a6a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #0b2a6a;
    --bs-btn-active-bg: #0b2a6a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #0b2a6a;
    --bs-btn-disabled-bg: #0f3585;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #0f3585;
}

:root .btn-outline-secondary {
    --bs-btn-bg: #55698f;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #55698f;
    --bs-btn-hover-bg: #43557a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #43557a;
    --bs-btn-active-bg: #43557a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #43557a;
    --bs-btn-disabled-bg: #55698f;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #55698f;
}

:root .btn-outline-info {
    --bs-btn-bg: #2f6a9a;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #2f6a9a;
    --bs-btn-hover-bg: #245580;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #245580;
    --bs-btn-active-bg: #245580;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #245580;
    --bs-btn-disabled-bg: #2f6a9a;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #2f6a9a;
}

:root .btn-outline-danger {
    --bs-btn-bg: #c0392b;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #c0392b;
    --bs-btn-hover-bg: #9f2e22;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #9f2e22;
    --bs-btn-active-bg: #9f2e22;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #9f2e22;
    --bs-btn-disabled-bg: #c0392b;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #c0392b;
}

:root .btn-outline-warning {
    --bs-btn-bg: #f0b400;
    --bs-btn-color: #2b1f00;
    --bs-btn-border-color: #f0b400;
    --bs-btn-hover-bg: #d9a000;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-border-color: #d9a000;
    --bs-btn-active-bg: #d9a000;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-active-border-color: #d9a000;
    --bs-btn-disabled-bg: #f0b400;
    --bs-btn-disabled-color: #2b1f00;
    --bs-btn-disabled-border-color: #f0b400;
}

:root .btn-outline-success {
    --bs-btn-bg: #1b8a50;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #1b8a50;
    --bs-btn-hover-bg: #146c3e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #146c3e;
    --bs-btn-active-bg: #146c3e;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #146c3e;
    --bs-btn-disabled-bg: #1b8a50;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #1b8a50;
}

/* The Blue_Theme rules further up set the outline colours with a higher specificity; repeat the solid versions for that theme
   (placed before the dark rules, which keep winning in dark mode) */
:root[data-color-theme=Blue_Theme] .btn-outline-primary {
    --bs-btn-bg: #0f3585;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: #0b2a6a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #0b2a6a;
    --bs-btn-active-bg: #0b2a6a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #0b2a6a;
    --bs-btn-disabled-bg: #0f3585;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #0f3585;
}

:root[data-color-theme=Blue_Theme] .btn-outline-secondary {
    --bs-btn-bg: #55698f;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #55698f;
    --bs-btn-hover-bg: #43557a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #43557a;
    --bs-btn-active-bg: #43557a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #43557a;
    --bs-btn-disabled-bg: #55698f;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #55698f;
}

:root[data-color-theme=Blue_Theme] .btn-outline-info {
    --bs-btn-bg: #2f6a9a;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #2f6a9a;
    --bs-btn-hover-bg: #245580;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #245580;
    --bs-btn-active-bg: #245580;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #245580;
    --bs-btn-disabled-bg: #2f6a9a;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #2f6a9a;
}

:root[data-color-theme=Blue_Theme] .btn-outline-danger {
    --bs-btn-bg: #c0392b;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #c0392b;
    --bs-btn-hover-bg: #9f2e22;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #9f2e22;
    --bs-btn-active-bg: #9f2e22;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #9f2e22;
    --bs-btn-disabled-bg: #c0392b;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #c0392b;
}

:root[data-color-theme=Blue_Theme] .btn-outline-warning {
    --bs-btn-bg: #f0b400;
    --bs-btn-color: #2b1f00;
    --bs-btn-border-color: #f0b400;
    --bs-btn-hover-bg: #d9a000;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-border-color: #d9a000;
    --bs-btn-active-bg: #d9a000;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-active-border-color: #d9a000;
    --bs-btn-disabled-bg: #f0b400;
    --bs-btn-disabled-color: #2b1f00;
    --bs-btn-disabled-border-color: #f0b400;
}

:root[data-color-theme=Blue_Theme] .btn-outline-success {
    --bs-btn-bg: #1b8a50;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #1b8a50;
    --bs-btn-hover-bg: #146c3e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #146c3e;
    --bs-btn-active-bg: #146c3e;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #146c3e;
    --bs-btn-disabled-bg: #1b8a50;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #1b8a50;
}

:root[data-bs-theme=dark] .btn-outline-primary {
    --bs-btn-bg: rgba(20, 108, 99, .14);
    --bs-btn-color: #5eead4;
    --bs-btn-border-color: #198278;
    --bs-btn-hover-bg: #146c63;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #146c63;
    --bs-btn-active-bg: #198278;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #198278;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #5eead4;
    --bs-btn-disabled-border-color: #198278;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-outline-secondary {
    --bs-btn-bg: rgba(255, 255, 255, .06);
    --bs-btn-color: #d8e4e8;
    --bs-btn-border-color: rgba(255, 255, 255, .28);
    --bs-btn-hover-bg: #264a54;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #315d69;
    --bs-btn-active-bg: #315d69;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #315d69;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #d8e4e8;
    --bs-btn-disabled-border-color: rgba(255, 255, 255, .22);
    --bs-btn-focus-shadow-rgb: 49, 93, 105;
}

:root[data-bs-theme=dark] .btn-outline-info {
    --bs-btn-bg: rgba(20, 108, 99, .14);
    --bs-btn-color: #5eead4;
    --bs-btn-border-color: #198278;
    --bs-btn-hover-bg: #146c63;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #146c63;
    --bs-btn-active-bg: #198278;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #198278;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #5eead4;
    --bs-btn-disabled-border-color: #198278;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

:root[data-bs-theme=dark] .btn-outline-danger {
    --bs-btn-bg: rgba(212, 73, 59, .14);
    --bs-btn-color: #fca5a5;
    --bs-btn-border-color: #d4493b;
    --bs-btn-hover-bg: #d4493b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #d4493b;
    --bs-btn-active-bg: #e05a4c;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #e05a4c;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #fca5a5;
    --bs-btn-disabled-border-color: #d4493b;
    --bs-btn-focus-shadow-rgb: 212, 73, 59;
}

:root[data-bs-theme=dark] .btn-outline-warning {
    --bs-btn-bg: rgba(245, 197, 66, .12);
    --bs-btn-color: #fde047;
    --bs-btn-border-color: #eab308;
    --bs-btn-hover-bg: #f5c542;
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-border-color: #f5c542;
    --bs-btn-active-bg: #f8d160;
    --bs-btn-active-color: #2b1f00;
    --bs-btn-active-border-color: #f8d160;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #fde047;
    --bs-btn-disabled-border-color: #eab308;
    --bs-btn-focus-shadow-rgb: 245, 197, 66;
}

:root[data-bs-theme=dark] .btn-outline-success {
    --bs-btn-bg: rgba(38, 160, 99, .14);
    --bs-btn-color: #6ee7b7;
    --bs-btn-border-color: #26a063;
    --bs-btn-hover-bg: #26a063;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #26a063;
    --bs-btn-active-bg: #32b373;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #32b373;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-color: #6ee7b7;
    --bs-btn-disabled-border-color: #26a063;
    --bs-btn-focus-shadow-rgb: 38, 160, 99;
}

/* No info buttons: .btn-info looks like primary; .btn-outline-info styled above */
:root .btn-info,
:root .btn-outline-info {
    --bs-btn-bg: #0f3585;
    --bs-btn-color: #fff;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: #0b2a6a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #0b2a6a;
    --bs-btn-active-bg: #0b2a6a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #0b2a6a;
    --bs-btn-disabled-bg: #0f3585;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-border-color: #0f3585;
    --bs-btn-focus-shadow-rgb: 15, 53, 133;
}

:root[data-bs-theme=dark] .btn-info {
    --bs-btn-bg: #146c63;
    --bs-btn-border-color: #146c63;
    --bs-btn-hover-bg: #198278;
    --bs-btn-hover-border-color: #198278;
    --bs-btn-active-bg: #198278;
    --bs-btn-active-border-color: #198278;
    --bs-btn-disabled-bg: #146c63;
    --bs-btn-disabled-border-color: #146c63;
    --bs-btn-focus-shadow-rgb: 20, 108, 99;
}

/* Toggle / radio / checkbox outline buttons (.btn-check + .btn-outline-*) and .btn-status.btn-outline-*:
   keep unselected buttons outlined in light and dark modes so active vs inactive state is always distinct */
:root .btn-check:not(:checked)+.btn-outline-primary,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-primary,
:root .btn-status.btn-outline-primary:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-primary:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #0f3585;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: rgba(15, 53, 133, 0.1);
    --bs-btn-hover-color: #0f3585;
    --bs-btn-hover-border-color: #0f3585;
}

:root .btn-check:not(:checked)+.btn-outline-secondary,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-secondary,
:root .btn-status.btn-outline-secondary:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-secondary:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #55698f;
    --bs-btn-border-color: #55698f;
    --bs-btn-hover-bg: rgba(85, 105, 143, 0.1);
    --bs-btn-hover-color: #43557a;
    --bs-btn-hover-border-color: #43557a;
}

:root .btn-check:not(:checked)+.btn-outline-info,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-info,
:root .btn-status.btn-outline-info:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-info:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #0f3585;
    --bs-btn-border-color: #0f3585;
    --bs-btn-hover-bg: rgba(15, 53, 133, 0.1);
    --bs-btn-hover-color: #0f3585;
    --bs-btn-hover-border-color: #0f3585;
}

:root .btn-check:not(:checked)+.btn-outline-danger,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-danger,
:root .btn-status.btn-outline-danger:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-danger:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #c0392b;
    --bs-btn-border-color: #c0392b;
    --bs-btn-hover-bg: rgba(192, 57, 43, 0.12);
    --bs-btn-hover-color: #c0392b;
    --bs-btn-hover-border-color: #c0392b;
}

:root .btn-check:not(:checked)+.btn-outline-warning,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-warning,
:root .btn-status.btn-outline-warning:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-warning:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #b58200;
    --bs-btn-border-color: #f0b400;
    --bs-btn-hover-bg: rgba(240, 180, 0, 0.14);
    --bs-btn-hover-color: #2b1f00;
    --bs-btn-hover-border-color: #f0b400;
}

:root .btn-check:not(:checked)+.btn-outline-success,
:root[data-color-theme=Blue_Theme] .btn-check:not(:checked)+.btn-outline-success,
:root .btn-status.btn-outline-success:not(.active),
:root[data-color-theme=Blue_Theme] .btn-status.btn-outline-success:not(.active) {
    --bs-btn-bg: transparent;
    --bs-btn-color: #1b8a50;
    --bs-btn-border-color: #1b8a50;
    --bs-btn-hover-bg: rgba(27, 138, 80, 0.12);
    --bs-btn-hover-color: #1b8a50;
    --bs-btn-hover-border-color: #1b8a50;
}

html[data-bs-theme=dark] .btn-check:checked+.btn-outline-primary,
html[data-bs-theme=dark] .btn-status.btn-outline-primary.active {
    background-color: #198278 !important;
    border-color: #198278 !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-primary,
html[data-bs-theme=dark] .btn-status.btn-outline-primary:not(.active) {
    background-color: rgba(20, 108, 99, 0.14) !important;
    color: #5fd3dc !important;
    border-color: rgba(43, 179, 192, 0.55) !important;
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-secondary,
html[data-bs-theme=dark] .btn-status.btn-outline-secondary:not(.active) {
    --bs-btn-bg: rgba(255, 255, 255, 0.06);
    --bs-btn-color: #d8e4e8;
    --bs-btn-border-color: rgba(255, 255, 255, 0.28);
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-danger,
html[data-bs-theme=dark] .btn-status.btn-outline-danger:not(.active) {
    --bs-btn-bg: rgba(212, 73, 59, 0.14);
    --bs-btn-color: #fca5a5;
    --bs-btn-border-color: #d4493b;
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-warning,
html[data-bs-theme=dark] .btn-status.btn-outline-warning:not(.active) {
    --bs-btn-bg: rgba(245, 197, 66, 0.12);
    --bs-btn-color: #fde047;
    --bs-btn-border-color: #eab308;
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-success,
html[data-bs-theme=dark] .btn-status.btn-outline-success:not(.active) {
    --bs-btn-bg: rgba(38, 160, 99, 0.14);
    --bs-btn-color: #6ee7b7;
    --bs-btn-border-color: #26a063;
}

html[data-bs-theme=dark] .btn-check:not(:checked)+.btn-outline-info,
html[data-bs-theme=dark] .btn-status.btn-outline-info:not(.active) {
    --bs-btn-bg: rgba(20, 108, 99, 0.14);
    --bs-btn-color: #5eead4;
    --bs-btn-border-color: #198278;
}

/* No outlined badges: badges keep their fill and lose any border line */
:root .badge,
:root .badge[class*="border"] {
    border: 0 !important;
}

/* Badges: darker fill with light text (they were pale tints with dark text) */
:root .badge.bg-primary-subtle,
:root .badge.bg-light-primary,
:root .badge[class*="bg-primary-subtle"],
:root .badge[class*="bg-light-primary"] {
    background-color: #0f3585 !important;
    color: #fff !important;
}

:root .badge.bg-primary-subtle *,
:root .badge.bg-light-primary * {
    color: #fff !important;
}

:root .badge.bg-secondary-subtle,
:root .badge.bg-light-secondary,
:root .badge[class*="bg-secondary-subtle"],
:root .badge[class*="bg-light-secondary"] {
    background-color: #55698f !important;
    color: #fff !important;
}

:root .badge.bg-secondary-subtle *,
:root .badge.bg-light-secondary * {
    color: #fff !important;
}

:root .badge.bg-info-subtle,
:root .badge.bg-light-info,
:root .badge[class*="bg-info-subtle"],
:root .badge[class*="bg-light-info"] {
    background-color: #2f6a9a !important;
    color: #fff !important;
}

:root .badge.bg-info-subtle *,
:root .badge.bg-light-info * {
    color: #fff !important;
}

:root .badge.bg-success-subtle,
:root .badge.bg-light-success,
:root .badge[class*="bg-success-subtle"],
:root .badge[class*="bg-light-success"] {
    background-color: #1b8a50 !important;
    color: #fff !important;
}

:root .badge.bg-success-subtle *,
:root .badge.bg-light-success * {
    color: #fff !important;
}

:root .badge.bg-danger-subtle,
:root .badge.bg-light-danger,
:root .badge[class*="bg-danger-subtle"],
:root .badge[class*="bg-light-danger"] {
    background-color: #c0392b !important;
    color: #fff !important;
}

:root .badge.bg-danger-subtle *,
:root .badge.bg-light-danger * {
    color: #fff !important;
}

:root .badge.bg-warning-subtle,
:root .badge.bg-light-warning,
:root .badge[class*="bg-warning-subtle"],
:root .badge[class*="bg-light-warning"] {
    background-color: #b87a0c !important;
    color: #fff !important;
}

:root .badge.bg-warning-subtle *,
:root .badge.bg-light-warning * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-primary-subtle,
:root[data-bs-theme=dark] .badge.bg-light-primary,
:root[data-bs-theme=dark] .badge[class*="bg-primary-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-primary"] {
    background-color: #167f8a !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-primary-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-primary * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-secondary-subtle,
:root[data-bs-theme=dark] .badge.bg-light-secondary,
:root[data-bs-theme=dark] .badge[class*="bg-secondary-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-secondary"] {
    background-color: #6d7fa6 !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-secondary-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-secondary * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-info-subtle,
:root[data-bs-theme=dark] .badge.bg-light-info,
:root[data-bs-theme=dark] .badge[class*="bg-info-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-info"] {
    background-color: #2f7fb5 !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-info-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-info * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-success-subtle,
:root[data-bs-theme=dark] .badge.bg-light-success,
:root[data-bs-theme=dark] .badge[class*="bg-success-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-success"] {
    background-color: #26a063 !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-success-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-success * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-danger-subtle,
:root[data-bs-theme=dark] .badge.bg-light-danger,
:root[data-bs-theme=dark] .badge[class*="bg-danger-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-danger"] {
    background-color: #d4493b !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-danger-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-danger * {
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-warning-subtle,
:root[data-bs-theme=dark] .badge.bg-light-warning,
:root[data-bs-theme=dark] .badge[class*="bg-warning-subtle"],
:root[data-bs-theme=dark] .badge[class*="bg-light-warning"] {
    background-color: #c98a12 !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge.bg-warning-subtle *,
:root[data-bs-theme=dark] .badge.bg-light-warning * {
    color: #fff !important;
}

/* Badges that were outline only (no background class) get the secondary fill, so they don't turn into plain text */
:root .badge:not([class*="bg-"]) {
    background-color: #55698f !important;
    color: #fff !important;
}

:root[data-bs-theme=dark] .badge:not([class*="bg-"]) {
    background-color: #6d7fa6 !important;
}

/* Icons and text inside those badges follow the badge's light text (e.g. icons carrying text-primary were dark blue on the dark fill) */
:root .badge:not([class*="bg-"]) *,
:root .badge:not([class*="bg-"]) [class*="text-"] {
    color: #fff !important;
}

/* Light shadow on every card (the template's card border mode removes shadows) */
:root .card,
:root[data-card=border] .card,
:root .rm-box,
:root .rm-page,
:root .panel-grid-card {
    box-shadow: 0 18px 36px -12px rgba(15, 53, 133, .16), 0 4px 10px rgba(15, 53, 133, .05) !important;
}

:root[data-bs-theme=dark] .card,
:root[data-bs-theme=dark][data-card=border] .card,
:root[data-bs-theme=dark] .rm-box,
:root[data-bs-theme=dark] .rm-page,
:root[data-bs-theme=dark] .panel-grid-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .2) !important;
}

/* Sub-menu items inside an opened menu: the open one is bold navy text (no dark pill, which hid behind the list and left white text on white) */
:root #sidebarnav .first-level .sidebar-item .sidebar-link.active,
:root #sidebarnav .first-level .sidebar-item .sidebar-link.active .hide-menu,
:root #sidebarnav .first-level .sidebar-item .sidebar-link.active .aside-icon,
:root #sidebarnav .first-level .sidebar-item .sidebar-link.active .aside-icon *,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .hide-menu,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .aside-icon,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .aside-icon * {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link.active::before,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link::before {
    background-color: transparent !important;
}

:root[data-bs-theme=dark] #sidebarnav .first-level .sidebar-item .sidebar-link.active::before,
:root[data-bs-theme=dark] #sidebarnav .first-level .sidebar-item.selected>.sidebar-link::before {
    background-color: transparent !important;
}

/* Keyboard focus in the sidebar: a quiet navy outline instead of the browser's bright blue box */
:root #sidebarnav a:focus-visible {
    outline: 2px solid rgba(15, 53, 133, .45);
    outline-offset: -2px;
    border-radius: 10px;
    box-shadow: none;
}

/* Sub-menu design: a thin guide line through the dots, rounded rows, soft tint on hover and for the open item */
:root #sidebarnav .first-level {
    position: relative;
}

:root #sidebarnav .first-level::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: rgba(var(--bs-primary-rgb), .16);
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link {
    margin: 2px 12px 2px 0;
    padding-top: 7px;
    padding-bottom: 7px;
    border-radius: 10px;
    transition: background-color .15s ease, color .15s ease;
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link:hover {
    background-color: rgba(var(--bs-primary-rgb), .07);
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link:hover .hide-menu {
    color: var(--bs-primary);
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link.active,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link {
    background-color: rgba(var(--bs-primary-rgb), .12);
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link .sidebar-icon {
    background-color: #a3aec3 !important;
    border-color: #a3aec3 !important;
    transition: transform .15s ease, background-color .15s ease;
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link:hover .sidebar-icon {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

:root #sidebarnav .first-level .sidebar-item .sidebar-link.active .sidebar-icon,
:root #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .sidebar-icon {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    transform: scale(1.4);
}

/* Buttons have no shadow */
/* (the keyboard focus ring stays, so tabbing through buttons is still visible) */
:root .btn:not(:focus-visible) {
    box-shadow: none;
}


/* Arabic (RTL): no dropdown arrows on selects, system-wide (plain selects and select2) */
html[dir="rtl"] .form-select {
    --bs-form-select-bg-img: none;
}

html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__arrow,
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow,
html[dir="rtl"] .select2-container .select2-selection--multiple .select2-selection__arrow {
    display: none !important;
}

/* DataTables 1.x controls: "Show [n] entries" and "Search:" sit on one line, the select is not full width */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length select {
    display: inline-block;
    width: auto !important;
    min-width: 78px;
}

.dataTables_wrapper .dataTables_filter input {
    display: inline-block;
    width: 220px;
    margin-left: 0 !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: .75rem !important;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: .75rem;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: flex-end;
    margin-bottom: 0;
}

/* Room at the bottom of every page, so the floating helper buttons (Edit Translations, Report an issue)
   never sit on top of the last content (for example table pagination) */
.page-wrapper .body-wrapper>.container-fluid {
    padding-bottom: 90px;
}

/* ---- Light and Dark buttons (Go Back / Cancel / Next ...): same family as the colours above ---- */
:root .btn-light {
    --bs-btn-color: #2b3a55;
    --bs-btn-hover-color: #1c2840;
    --bs-btn-active-color: #1c2840;
    --bs-btn-bg: #e4e8f0;
    --bs-btn-border-color: #e4e8f0;
    --bs-btn-hover-bg: #d3d9e6;
    --bs-btn-hover-border-color: #d3d9e6;
    --bs-btn-active-bg: #c7cfdf;
    --bs-btn-active-border-color: #c7cfdf;
    --bs-btn-disabled-color: #2b3a55;
    --bs-btn-disabled-bg: #e4e8f0;
    --bs-btn-disabled-border-color: #e4e8f0;
    --bs-btn-focus-shadow-rgb: 85, 105, 143;
}

:root .btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #2e3440;
    --bs-btn-border-color: #2e3440;
    --bs-btn-hover-bg: #1f242d;
    --bs-btn-hover-border-color: #1f242d;
    --bs-btn-active-bg: #1f242d;
    --bs-btn-active-border-color: #1f242d;
    --bs-btn-disabled-bg: #2e3440;
    --bs-btn-disabled-border-color: #2e3440;
    --bs-btn-focus-shadow-rgb: 46, 52, 64;
}

:root[data-bs-theme=dark] .btn-light {
    --bs-btn-color: #dfe5f1;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-bg: #3a4560;
    --bs-btn-border-color: #3a4560;
    --bs-btn-hover-bg: #4a577a;
    --bs-btn-hover-border-color: #4a577a;
    --bs-btn-active-bg: #4a577a;
    --bs-btn-active-border-color: #4a577a;
}

:root[data-bs-theme=dark] .btn-dark {
    --bs-btn-bg: #1b2030;
    --bs-btn-border-color: #3a4560;
    --bs-btn-hover-bg: #2a3146;
    --bs-btn-hover-border-color: #4a577a;
}

/* Light buttons that also carry text-secondary / border (Go Back, Cancel): keep the text readable in both themes */
:root .btn-light.text-secondary,
:root .btn-light.text-muted {
    color: #2b3a55 !important;
}

:root .btn-light.border {
    border-color: #c7cfdf !important;
}

:root[data-bs-theme=dark] .btn-light.text-secondary,
:root[data-bs-theme=dark] .btn-light.text-muted {
    color: #e6ebf5 !important;
}

:root[data-bs-theme=dark] .btn-light {
    --bs-btn-bg: #3f4b69;
    --bs-btn-border-color: #55638a;
    --bs-btn-hover-bg: #52608a;
    --bs-btn-hover-border-color: #6b7aa5;
}

:root[data-bs-theme=dark] .btn-light.border {
    border-color: #6b7aa5 !important;
}

:root[data-bs-theme=dark] .btn-light:hover i,
:root[data-bs-theme=dark] .btn-light i {
    color: inherit;
}

/* Sub-menu items that are not open: dark text and full-colour count bubbles.
   The theme fades every closed sub-menu link (opacity .6), which also washed out the red bubbles. */
:root #sidebarnav .first-level .sidebar-item>.sidebar-link {
    opacity: 1;
}

:root #sidebarnav .first-level .sidebar-item:not(.selected)>.sidebar-link:not(.active):not(:hover) .hide-menu {
    color: var(--bs-dark);
}

:root[data-bs-theme=dark] #sidebarnav .first-level .sidebar-item:not(.selected)>.sidebar-link:not(.active):not(:hover) .hide-menu {
    color: #ffffff;
}

/* Sidebar count badges grow with the number (2 or 3 digits) instead of overflowing the 20px circle; the menu text shrinks to make room */
:root #sidebarnav .sidebar-link .badge.round-20 {
    width: auto !important;
    min-width: 20px;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

:root #sidebarnav .sidebar-link.justify-content-between>.d-flex {
    min-width: 0;
    flex: 1 1 auto;
}

:root #sidebarnav .sidebar-link.justify-content-between .hide-menu {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Global Dark Mode: teal glass look (applied across all portals/pages) ---- */
html[data-bs-theme=dark] #main-wrapper {
    background-color: transparent;
}

html[data-bs-theme=dark] .page-wrapper {
    background: transparent;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

html[data-bs-theme=dark] .body-wrapper {
    background: transparent;
    position: relative;
}

html[data-bs-theme=dark] .page-wrapper .card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .03) 100%) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 18px 40px rgba(0, 0, 0, .28) !important;
}

html[data-bs-theme=dark] .left-sidebar {
    background: linear-gradient(180deg, rgba(12, 42, 52, 0.90) 0%, rgba(8, 29, 37, 0.94) 100%) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid rgba(255, 255, 255, .12);
}

html[data-bs-theme=dark] .left-sidebar .text-dark,
html[data-bs-theme=dark] .left-sidebar #sidebarnav .sidebar-link,
html[data-bs-theme=dark] .left-sidebar #sidebarnav .nav-small-cap,
html[data-bs-theme=dark] .left-sidebar #sidebarnav .hide-menu {
    color: #ffffff !important;
}

html[data-bs-theme=dark] .topbar {
    background: linear-gradient(180deg, rgba(14, 48, 59, 0.78) 0%, rgba(8, 29, 37, 0.72) 100%) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-bs-theme=dark] .topbar .sidebartoggler,
html[data-bs-theme=dark] .topbar .navbar-toggler,
html[data-bs-theme=dark] .topbar .nav-link,
html[data-bs-theme=dark] .topbar .text-dark,
html[data-bs-theme=dark] .topbar .text-muted {
    color: #ffffff !important;
}

/* ---- Dark Mode Visibility: Cards, Surfaces, Text ---- */
html[data-bs-theme=dark],
html[data-bs-theme=dark] body {
    --bs-body-color: #ffffff;
    --bs-heading-color: #ffffff;
    --bs-secondary-color: #ffffff;
    --bs-table-color: #ffffff;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .page-wrapper .card {
    --bs-card-color: #ffffff;
    color: #ffffff;
}

html[data-bs-theme=dark] .page-wrapper .card-header,
html[data-bs-theme=dark] .page-wrapper .card-footer {
    background-color: rgba(255, 255, 255, .03) !important;
    border-color: rgba(255, 255, 255, .1) !important;
    color: #ffffff;
}

html[data-bs-theme=dark] .page-wrapper .bg-white {
    background-color: rgba(255, 255, 255, .05) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .page-wrapper .bg-light {
    background-color: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .page-wrapper .badge.bg-light {
    background-color: rgba(255, 255, 255, .14) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .22) !important;
}

html[data-bs-theme=dark] .page-wrapper .text-dark:not(.bg-warning):not(.btn-warning):not(.btn-outline-warning),
html[data-bs-theme=dark] .page-wrapper .text-muted,
html[data-bs-theme=dark] .page-wrapper .text-secondary,
html[data-bs-theme=dark] .page-wrapper .text-body-secondary,
html[data-bs-theme=dark] .page-wrapper .text-body-tertiary,
html[data-bs-theme=dark] .page-wrapper .text-body,
html[data-bs-theme=dark] .page-wrapper .text-black-50 {
    color: #ffffff !important;
}

html[data-bs-theme=dark] .page-wrapper .border,
html[data-bs-theme=dark] .page-wrapper .border-top,
html[data-bs-theme=dark] .page-wrapper .border-bottom,
html[data-bs-theme=dark] .page-wrapper .border-start,
html[data-bs-theme=dark] .page-wrapper .border-end {
    border-color: rgba(255, 255, 255, .12) !important;
}

/* ---- Dark Mode Visibility: Tables & DataTables ---- */
html[data-bs-theme=dark] .page-wrapper .table,
html[data-bs-theme=dark] .page-wrapper table.dataTable {
    --bs-table-bg: transparent;
    --bs-table-color: #ffffff;
    --bs-table-striped-bg: rgba(255, 255, 255, .03);
    --bs-table-striped-color: #ffffff;
    --bs-table-hover-bg: rgba(255, 255, 255, .07);
    --bs-table-hover-color: #ffffff;
    --bs-table-border-color: rgba(255, 255, 255, .12);
    color: #ffffff;
}

html[data-bs-theme=dark] .page-wrapper .table> :not(caption)>*>*,
html[data-bs-theme=dark] .page-wrapper table.dataTable>tbody>tr>* {
    background-color: transparent !important;
    color: #ffffff !important;
    --bs-table-color-state: #ffffff;
    border-color: rgba(255, 255, 255, .12) !important;
}

html[data-bs-theme=dark] .page-wrapper .table thead th,
html[data-bs-theme=dark] .page-wrapper table.dataTable thead th,
html[data-bs-theme=dark] .page-wrapper .table-light,
html[data-bs-theme=dark] .page-wrapper thead.table-light th,
html[data-bs-theme=dark] .page-wrapper tr.table-light>* {
    background-color: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .16) !important;
    --bs-table-bg: rgba(255, 255, 255, .08);
    --bs-table-color: #ffffff;
}

html[data-bs-theme=dark] .page-wrapper .table>tbody,
html[data-bs-theme=dark] .page-wrapper table.dataTable>tbody {
    background-color: transparent !important;
    border-top-color: rgba(255, 255, 255, .2) !important;
}

html[data-bs-theme=dark] .page-wrapper .table-hover>tbody>tr:hover>* {
    background-color: rgba(255, 255, 255, .07) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .dataTables_wrapper .dataTables_length,
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_filter,
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_info,
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_processing {
    color: #ffffff !important;
}

/* ---- Dark Mode Visibility: Forms, Inputs, Selects, Select2 ---- */
html[data-bs-theme=dark] label,
html[data-bs-theme=dark] .form-label,
html[data-bs-theme=dark] .col-form-label,
html[data-bs-theme=dark] .form-check-label,
html[data-bs-theme=dark] .form-text {
    color: #ffffff !important;
}

html[data-bs-theme=dark] .form-control,
html[data-bs-theme=dark] .form-select {
    background-color: rgba(7, 24, 32, .72) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] nav.navbar .d-inline-flex.bg-primary-subtle .form-select,
html[data-bs-theme=dark] nav.navbar .d-inline-flex.bg-primary-subtle select {
    background-color: transparent !important;
    border-color: transparent !important;
}

html[data-bs-theme=dark] .form-control::placeholder {
    color: rgba(255, 255, 255, .78) !important;
}

html[data-bs-theme=dark] .form-control:disabled,
html[data-bs-theme=dark] .form-control[readonly],
html[data-bs-theme=dark] .form-select:disabled {
    background-color: rgba(255, 255, 255, .07) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .form-select option,
html[data-bs-theme=dark] select option {
    background-color: #0b2833;
    color: #ffffff;
}

html[data-bs-theme=dark] .input-group-text {
    background-color: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .form-check-input {
    background-color: rgba(7, 24, 32, .8);
    border-color: rgba(255, 255, 255, .35);
}

html[data-bs-theme=dark] .select2-container--default .select2-selection--single,
html[data-bs-theme=dark] .select2-container--default .select2-selection--multiple {
    background-color: rgba(7, 24, 32, .72) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

html[data-bs-theme=dark] .select2-dropdown {
    background-color: #0b2833 !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: rgba(7, 24, 32, .85) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .select2-results__option {
    color: #ffffff;
}

/* ---- Dark Mode Visibility: Modals, Dropdowns, SweetAlert2 ---- */
html[data-bs-theme=dark] .modal-content {
    background: #0b2833 !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    color: #ffffff;
}

html[data-bs-theme=dark] .modal-header,
html[data-bs-theme=dark] .modal-footer {
    background-color: rgba(255, 255, 255, .04) !important;
    border-color: rgba(255, 255, 255, .12) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .modal-content .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-bs-theme=dark] .dropdown-menu {
    background-color: #0b2833 !important;
    border-color: rgba(255, 255, 255, .14) !important;
    color: #ffffff;
}

html[data-bs-theme=dark] .dropdown-item {
    color: #ffffff;
}

html[data-bs-theme=dark] .dropdown-item:hover,
html[data-bs-theme=dark] .dropdown-item:focus {
    background-color: rgba(255, 255, 255, .1);
    color: #ffffff;
}

html[data-bs-theme=dark] .swal2-popup {
    background: #0b2833 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, .14);
}

html[data-bs-theme=dark] .swal2-title,
html[data-bs-theme=dark] .swal2-html-container {
    color: #ffffff !important;
}

/* ---- Dark Mode Alerts (Teal Glass Theme) ---- */
html[data-bs-theme=dark] .alert {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 60%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 20px rgba(0, 0, 0, .20);
}

html[data-bs-theme=dark] .alert .alert-heading,
html[data-bs-theme=dark] .alert .alert-link {
    color: #ffffff;
}

html[data-bs-theme=dark] .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-bs-theme=dark] .alert-primary,
html[data-bs-theme=dark] .alert-info {
    background-color: rgba(20, 108, 99, .24) !important;
    border-color: rgba(25, 130, 120, .55) !important;
    color: #d8f8f2 !important;
}

html[data-bs-theme=dark] .alert-secondary {
    background-color: rgba(38, 74, 84, .32) !important;
    border-color: rgba(255, 255, 255, .20) !important;
    color: #e6eff2 !important;
}

html[data-bs-theme=dark] .alert-success {
    background-color: rgba(38, 160, 99, .22) !important;
    border-color: rgba(50, 179, 115, .52) !important;
    color: #d1fae5 !important;
}

html[data-bs-theme=dark] .alert-danger {
    background-color: rgba(212, 73, 59, .22) !important;
    border-color: rgba(224, 90, 76, .52) !important;
    color: #fee2e2 !important;
}

html[data-bs-theme=dark] .alert-warning {
    background-color: rgba(245, 197, 66, .18) !important;
    border-color: rgba(245, 197, 66, .48) !important;
    color: #fef3c7 !important;
}

html[data-bs-theme=dark] .alert-light {
    background-color: rgba(255, 255, 255, .09) !important;
    border-color: rgba(255, 255, 255, .18) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .alert-dark {
    background-color: rgba(7, 24, 32, .72) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    color: #ffffff !important;
}

/* ---- Light Mode Buttons: old button colors with 3D raised gradient & bottom edge (matching dark mode .gsb-btn) ---- */
html:not([data-bs-theme=dark]) .btn-primary,
html:not([data-bs-theme=dark]) .btn-outline-primary {
    --gsb-n: #0f3585;
}

html:not([data-bs-theme=dark]) .btn-secondary,
html:not([data-bs-theme=dark]) .btn-outline-secondary {
    --gsb-n: #55698f;
}

html:not([data-bs-theme=dark]) .btn-info,
html:not([data-bs-theme=dark]) .btn-outline-info {
    --gsb-n: #0f3585;
}

html:not([data-bs-theme=dark]) .btn-success,
html:not([data-bs-theme=dark]) .btn-outline-success {
    --gsb-n: #1b8a50;
}

html:not([data-bs-theme=dark]) .btn-danger,
html:not([data-bs-theme=dark]) .btn-outline-danger {
    --gsb-n: #c0392b;
}

html:not([data-bs-theme=dark]) .btn-warning,
html:not([data-bs-theme=dark]) .btn-outline-warning {
    --gsb-n: #f0b400;
}

html:not([data-bs-theme=dark]) .btn-primary,
html:not([data-bs-theme=dark]) .btn-secondary,
html:not([data-bs-theme=dark]) .btn-info,
html:not([data-bs-theme=dark]) .btn-success,
html:not([data-bs-theme=dark]) .btn-danger,
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-status.btn-outline-primary.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-secondary.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-info.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-success.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-danger.active {
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 86%, #000 14%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 3px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 70%, #000 30%) 85%, transparent), 0 4px 6px -1px rgba(15, 26, 42, .16) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html:not([data-bs-theme=dark]) .btn-warning,
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-status.btn-outline-warning.active {
    color: #2b1f00 !important;
    background-color: #f0b400 !important;
    background-image: linear-gradient(180deg, #ffd24d 0, #f0b400 55%, #d69e00 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 #b88600, 0 4px 6px -1px rgba(15, 26, 42, .14) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html:not([data-bs-theme=dark]) .btn-primary:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-secondary:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-info:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-success:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-danger:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-warning:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status):hover:not(:disabled):not(.disabled) {
    filter: brightness(1.07);
}

html:not([data-bs-theme=dark]) .btn-primary:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-secondary:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-info:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-success:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-danger:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-warning:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-primary.active,
html:not([data-bs-theme=dark]) .btn-secondary.active,
html:not([data-bs-theme=dark]) .btn-info.active,
html:not([data-bs-theme=dark]) .btn-success.active,
html:not([data-bs-theme=dark]) .btn-danger.active,
html:not([data-bs-theme=dark]) .btn-warning.active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 70%, #000 30%) 85%, transparent), 0 1px 2px rgba(15, 26, 42, .14) !important;
    transform: translateY(1px);
}

html:not([data-bs-theme=dark]) .btn-primary:disabled,
html:not([data-bs-theme=dark]) .btn-secondary:disabled,
html:not([data-bs-theme=dark]) .btn-info:disabled,
html:not([data-bs-theme=dark]) .btn-success:disabled,
html:not([data-bs-theme=dark]) .btn-danger:disabled,
html:not([data-bs-theme=dark]) .btn-warning:disabled,
html:not([data-bs-theme=dark]) .btn-outline-primary:disabled,
html:not([data-bs-theme=dark]) .btn-outline-secondary:disabled,
html:not([data-bs-theme=dark]) .btn-outline-info:disabled,
html:not([data-bs-theme=dark]) .btn-outline-success:disabled,
html:not([data-bs-theme=dark]) .btn-outline-danger:disabled,
html:not([data-bs-theme=dark]) .btn-outline-warning:disabled {
    box-shadow: none !important;
    filter: grayscale(.35);
    opacity: .6;
    transform: none;
}

/* ---- Dark Mode Buttons: gsbooks look (.gsb-btn / .gsb-neu): raised gradient with a darker bottom edge, soft outline for outline buttons ---- */
html[data-bs-theme=dark] .btn-primary {
    --gsb-c: #2bb3c0;
}

html[data-bs-theme=dark] .btn-outline-primary {
    --gsb-c: #2bb3c0;
}

html[data-bs-theme=dark] .btn-secondary {
    --gsb-c: #5fd3dc;
}

html[data-bs-theme=dark] .btn-outline-secondary {
    --gsb-c: #5fd3dc;
}

html[data-bs-theme=dark] .btn-info {
    --gsb-c: #4cb8d6;
}

html[data-bs-theme=dark] .btn-outline-info {
    --gsb-c: #4cb8d6;
}

html[data-bs-theme=dark] .btn-success {
    --gsb-c: #3fd38a;
}

html[data-bs-theme=dark] .btn-outline-success {
    --gsb-c: #3fd38a;
}

html[data-bs-theme=dark] .btn-danger {
    --gsb-c: #f27272;
}

html[data-bs-theme=dark] .btn-outline-danger {
    --gsb-c: #f27272;
}

html[data-bs-theme=dark] .btn-warning {
    --gsb-c: #f5b65e;
}

html[data-bs-theme=dark] .btn-outline-warning {
    --gsb-c: #f5b65e;
}

html[data-bs-theme=dark] .btn-primary,
html[data-bs-theme=dark] .btn-secondary,
html[data-bs-theme=dark] .btn-info,
html[data-bs-theme=dark] .btn-success,
html[data-bs-theme=dark] .btn-danger,
html[data-bs-theme=dark] .btn-warning {
    --gsb-n: color-mix(in srgb, var(--gsb-c) 74%, #000 26%);
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 88%, #000 12%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 80%, #000 20%) 75%, transparent), 0 4px 4px -1px rgba(0, 0, 0, .18) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html[data-bs-theme=dark] .btn-primary:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-info:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-success:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-danger:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-warning:hover:not(:disabled):not(.disabled) {
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    filter: brightness(1.1);
}

html[data-bs-theme=dark] .btn-primary:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-secondary:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-info:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-success:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-danger:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-warning:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-primary.active,
html[data-bs-theme=dark] .btn-secondary.active,
html[data-bs-theme=dark] .btn-info.active,
html[data-bs-theme=dark] .btn-success.active,
html[data-bs-theme=dark] .btn-danger.active,
html[data-bs-theme=dark] .btn-warning.active {
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 80%, #000 20%) 75%, transparent), 0 1px 2px rgba(0, 0, 0, .14) !important;
    transform: translateY(1px);
}

html[data-bs-theme=dark] .btn-primary:disabled,
html[data-bs-theme=dark] .btn-secondary:disabled,
html[data-bs-theme=dark] .btn-info:disabled,
html[data-bs-theme=dark] .btn-success:disabled,
html[data-bs-theme=dark] .btn-danger:disabled,
html[data-bs-theme=dark] .btn-warning:disabled,
html[data-bs-theme=dark] .btn-primary.disabled,
html[data-bs-theme=dark] .btn-secondary.disabled,
html[data-bs-theme=dark] .btn-info.disabled,
html[data-bs-theme=dark] .btn-success.disabled,
html[data-bs-theme=dark] .btn-danger.disabled,
html[data-bs-theme=dark] .btn-warning.disabled {
    box-shadow: none !important;
    filter: grayscale(.4);
    opacity: .6;
    transform: none;
}

html[data-bs-theme=dark] .btn-outline-primary,
html[data-bs-theme=dark] .btn-outline-secondary,
html[data-bs-theme=dark] .btn-outline-info,
html[data-bs-theme=dark] .btn-outline-success,
html[data-bs-theme=dark] .btn-outline-danger,
html[data-bs-theme=dark] .btn-outline-warning {
    color: var(--gsb-c) !important;
    background-color: transparent !important;
    background-image: linear-gradient(rgba(255, 255, 255, .04), rgba(0, 0, 0, .03)) !important;
    border: 0 !important;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gsb-c) 45%, transparent), 0 2px 2px -.5px color-mix(in srgb, var(--gsb-c) 28%, transparent) !important;
}

html[data-bs-theme=dark] .btn-outline-primary:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-outline-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-outline-info:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-outline-success:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-outline-danger:hover:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-outline-warning:hover:not(:disabled):not(.disabled) {
    color: #f3f8f9 !important;
    background-color: color-mix(in srgb, var(--gsb-c) 18%, transparent) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gsb-c) 60%, transparent), 0 3px 3px -1px color-mix(in srgb, var(--gsb-c) 35%, transparent) !important;
}

/* ==========================================================================
   Clearbook Dark (Glass Teal) — Dark Theme Only (html[data-bs-theme=dark])
   ========================================================================== */
html[data-bs-theme=dark] {
    color-scheme: dark;
    --bs-primary: #2bb3c0;
    --bs-primary-rgb: 43, 179, 192;
    --bs-secondary: #5fd3dc;
    --bs-secondary-rgb: 95, 211, 220;
    --bs-success: #3fd38a;
    --bs-success-rgb: 63, 211, 138;
    --bs-info: #4cb8d6;
    --bs-info-rgb: 76, 184, 214;
    --bs-warning: #f5b65e;
    --bs-warning-rgb: 245, 182, 94;
    --bs-danger: #f27272;
    --bs-danger-rgb: 242, 114, 114;
    --bs-body-bg: #0b3943;
    --bs-tertiary-bg: #0e414c;
    --bs-secondary-bg: #114854;
    --bs-body-color: #d2e2e5;
    --bs-heading-color: #f3f8f9;
    --bs-secondary-color: #94b4ba;
    --bs-border-color: rgba(255, 255, 255, .12);
    --bs-link-color: #2bb3c0;
    --bs-link-hover-color: #5fd3dc;
}

/* Dark theme page background: the dark teal picture (assets/images/school/dark-bg.jpg), on the same teal as a fallback */
html[data-bs-theme=dark] body {
    background-image: url('../images/school/dark-bg.jpg') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-color: #062a33 !important;
    background-attachment: fixed !important;
    color: #d2e2e5 !important;
}

/* phones and tablets: a fixed background stutters while scrolling (iOS ignores it), so it scrolls with the page */
@media (max-width: 991.98px) {
    html[data-bs-theme=dark] body {
        background-attachment: scroll !important;
    }
}

html[data-bs-theme=dark] #main-wrapper,
html[data-bs-theme=dark] .page-wrapper,
html[data-bs-theme=dark] .body-wrapper {
    background: transparent !important;
}

html[data-bs-theme=dark] .left-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-color: rgba(255, 255, 255, .12) !important;
}

html[data-bs-theme=dark] .topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035)) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

html[data-bs-theme=dark] .page-wrapper .card {
    background: linear-gradient(135deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035)) !important;
    /* no backdrop-filter here: it makes the card the containing block of position:fixed children, so modals loaded inside a card were clipped to it */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    color: #d2e2e5;
}

html[data-bs-theme=dark] .modal-content,
html[data-bs-theme=dark] .dropdown-menu,
html[data-bs-theme=dark] .select2-dropdown,
html[data-bs-theme=dark] .swal2-popup {
    background-color: #0b3943 !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .55) !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .form-control,
html[data-bs-theme=dark] .form-select,
html[data-bs-theme=dark] .select2-container--default .select2-selection--single,
html[data-bs-theme=dark] .input-group-text {
    background-color: #0b3943 !important;
    border-color: rgba(255, 255, 255, .16) !important;
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] .form-control:focus,
html[data-bs-theme=dark] .form-select:focus {
    border-color: #2bb3c0 !important;
    box-shadow: 0 0 0 .2rem rgba(43, 179, 192, .25) !important;
}

html[data-bs-theme=dark] .page-wrapper .table thead th,
html[data-bs-theme=dark] .page-wrapper table.dataTable thead th {
    background-color: rgba(255, 255, 255, .08) !important;
    color: #e3f1f3 !important;
    border-color: rgba(255, 255, 255, .14) !important;
}

html[data-bs-theme=dark] .page-wrapper .table-striped>tbody>tr:nth-of-type(odd)>*,
html[data-bs-theme=dark] .page-wrapper table.dataTable.stripe>tbody>tr.odd>* {
    background-color: rgba(255, 255, 255, .04) !important;
}

html[data-bs-theme=dark] .page-wrapper .table-hover>tbody>tr:hover>*,
html[data-bs-theme=dark] .page-wrapper table.dataTable.hover>tbody>tr:hover>*,
html[data-bs-theme=dark] .page-wrapper .comm-table>tbody>tr:hover,
html[data-bs-theme=dark] .page-wrapper .comm-table>tbody>tr:hover>*,
html[data-bs-theme=dark] .page-wrapper .table-receipts>tbody>tr:hover,
html[data-bs-theme=dark] .page-wrapper .table-receipts>tbody>tr:hover>* {
    background-color: rgba(43, 179, 192, .14) !important;
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] .btn-outline-primary {
    border-color: rgba(43, 179, 192, .55) !important;
    color: #5fd3dc !important;
}

html[data-bs-theme=dark] .btn-outline-primary:hover {
    background-color: rgba(43, 179, 192, .18) !important;
    color: #f3f8f9 !important;
}

/* ---- Clearbook Dark: Sidebar ---- */
html[data-bs-theme=dark] .left-sidebar .nav-small-cap {
    color: #ff4b4e !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link {
    position: relative;
    isolation: isolate;
    background-color: transparent !important;
    color: #f3f8f9 !important;
    border-radius: 10px;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: 0 !important;
    height: 100% !important;
    border-radius: 10px !important;
    background: rgba(43, 179, 192, .14) !important;
    transition: width .4s ease-in-out !important;
    z-index: -1 !important;
}

html[dir="rtl"][data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[dir="rtl"][data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    inset: 0 0 0 auto !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link svg {
    color: #f3f8f9 !important;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover {
    background-color: transparent !important;
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover svg {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link {
    background-color: transparent !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link svg {
    color: #2bb3c0 !important;
}

/* ---- Clearbook Dark: text-* utilities ---- */
html[data-bs-theme=dark] .text-primary {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .text-secondary {
    color: #5fd3dc !important;
}

html[data-bs-theme=dark] .text-success {
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .text-info {
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .text-warning {
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .text-danger {
    color: #f27272 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-dark:not(.bg-warning):not(.btn-warning):not(.btn-outline-warning) {
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-muted,
html[data-bs-theme=dark] .page-wrapper .text-body-secondary,
html[data-bs-theme=dark] .page-wrapper .text-body-tertiary,
html[data-bs-theme=dark] .page-wrapper .text-black-50 {
    color: #94b4ba !important;
}

html[data-bs-theme=dark] .page-wrapper .text-body {
    color: #d2e2e5 !important;
}

/* ---- Clearbook Dark: badge-* utilities ---- */
html[data-bs-theme=dark] .badge.bg-primary-subtle,
html[data-bs-theme=dark] .badge.bg-light-primary {
    background-color: rgba(43, 179, 192, .16) !important;
    border-color: rgba(43, 179, 192, .35) !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .badge.bg-success-subtle,
html[data-bs-theme=dark] .badge.bg-light-success {
    background-color: rgba(63, 211, 138, .16) !important;
    border-color: rgba(63, 211, 138, .35) !important;
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .badge.bg-info-subtle,
html[data-bs-theme=dark] .badge.bg-light-info {
    background-color: rgba(76, 184, 214, .16) !important;
    border-color: rgba(76, 184, 214, .35) !important;
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .badge.bg-warning-subtle,
html[data-bs-theme=dark] .badge.bg-light-warning {
    background-color: rgba(245, 182, 94, .18) !important;
    border-color: rgba(245, 182, 94, .38) !important;
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .badge.bg-danger-subtle,
html[data-bs-theme=dark] .badge.bg-light-danger {
    background-color: rgba(242, 114, 114, .16) !important;
    border-color: rgba(242, 114, 114, .35) !important;
    color: #f27272 !important;
}

html[data-bs-theme=dark] .badge.bg-secondary-subtle,
html[data-bs-theme=dark] .badge.bg-light {
    background-color: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .2) !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .badge.bg-primary {
    background-color: #2bb3c0 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-success {
    background-color: #3fd38a !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-info {
    background-color: #4cb8d6 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-warning {
    background-color: #f5b65e !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-danger {
    background-color: #f27272 !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .badge.bg-secondary {
    background-color: rgba(255, 255, 255, .16) !important;
    color: #f3f8f9 !important;
}

/* ---- Clearbook Dark: Sidebar ---- */
html[data-bs-theme=dark] .left-sidebar .nav-small-cap {
    color: #ff4b4e !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link {
    position: relative;
    isolation: isolate;
    background-color: transparent !important;
    color: #f3f8f9 !important;
    border-radius: 10px;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: 0 !important;
    height: 100% !important;
    border-radius: 10px !important;
    background: rgba(43, 179, 192, .14) !important;
    transition: width .4s ease-in-out !important;
    z-index: -1 !important;
}

html[dir="rtl"][data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[dir="rtl"][data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    inset: 0 0 0 auto !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link svg {
    color: #f3f8f9 !important;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover {
    background-color: transparent !important;
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover svg {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link {
    background-color: transparent !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link svg {
    color: #2bb3c0 !important;
}

/* ---- Clearbook Dark: text-* utilities ---- */
html[data-bs-theme=dark] .text-primary {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .text-secondary {
    color: #5fd3dc !important;
}

html[data-bs-theme=dark] .text-success {
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .text-info {
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .text-warning {
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .text-danger {
    color: #f27272 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-dark:not(.bg-warning):not(.btn-warning):not(.btn-outline-warning) {
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-muted,
html[data-bs-theme=dark] .page-wrapper .text-body-secondary,
html[data-bs-theme=dark] .page-wrapper .text-body-tertiary,
html[data-bs-theme=dark] .page-wrapper .text-black-50 {
    color: #94b4ba !important;
}

html[data-bs-theme=dark] .page-wrapper .text-body {
    color: #d2e2e5 !important;
}

/* ---- Clearbook Dark: badge-* utilities ---- */
html[data-bs-theme=dark] .badge.bg-primary-subtle,
html[data-bs-theme=dark] .badge.bg-light-primary {
    background-color: rgba(43, 179, 192, .16) !important;
    border-color: rgba(43, 179, 192, .35) !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .badge.bg-success-subtle,
html[data-bs-theme=dark] .badge.bg-light-success {
    background-color: rgba(63, 211, 138, .16) !important;
    border-color: rgba(63, 211, 138, .35) !important;
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .badge.bg-info-subtle,
html[data-bs-theme=dark] .badge.bg-light-info {
    background-color: rgba(76, 184, 214, .16) !important;
    border-color: rgba(76, 184, 214, .35) !important;
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .badge.bg-warning-subtle,
html[data-bs-theme=dark] .badge.bg-light-warning {
    background-color: rgba(245, 182, 94, .18) !important;
    border-color: rgba(245, 182, 94, .38) !important;
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .badge.bg-danger-subtle,
html[data-bs-theme=dark] .badge.bg-light-danger {
    background-color: rgba(242, 114, 114, .16) !important;
    border-color: rgba(242, 114, 114, .35) !important;
    color: #f27272 !important;
}

html[data-bs-theme=dark] .badge.bg-secondary-subtle,
html[data-bs-theme=dark] .badge.bg-light {
    background-color: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .2) !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .badge.bg-primary {
    background-color: #2bb3c0 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-success {
    background-color: #3fd38a !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-info {
    background-color: #4cb8d6 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-warning {
    background-color: #f5b65e !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-danger {
    background-color: #f27272 !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .badge.bg-secondary {
    background-color: rgba(255, 255, 255, .16) !important;
    color: #f3f8f9 !important;
}

/* ---- Clearbook Dark: bg-* utilities ---- */
html[data-bs-theme=dark] .bg-primary:not(.badge) {
    background-color: rgba(43, 179, 192, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-secondary:not(.badge) {
    background-color: rgba(95, 211, 220, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-success:not(.badge) {
    background-color: rgba(63, 211, 138, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-info:not(.badge) {
    background-color: rgba(76, 184, 214, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-warning:not(.badge) {
    background-color: rgba(245, 182, 94, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-danger:not(.badge) {
    background-color: rgba(242, 114, 114, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark],
html[data-bs-theme=dark][data-color-theme=Blue_Theme] {
    --bs-primary-bg-subtle: rgba(43, 179, 192, .22);
    --bs-primary-border-subtle: rgba(43, 179, 192, .45);
    --bs-primary-text-emphasis: #7de3ec;
    --bs-secondary-bg-subtle: rgba(95, 211, 220, .20);
    --bs-secondary-border-subtle: rgba(95, 211, 220, .42);
    --bs-secondary-text-emphasis: #9fe5ec;
    --bs-success-bg-subtle: rgba(63, 211, 138, .20);
    --bs-success-border-subtle: rgba(63, 211, 138, .42);
    --bs-success-text-emphasis: #7df0b6;
    --bs-info-bg-subtle: rgba(76, 184, 214, .20);
    --bs-info-border-subtle: rgba(76, 184, 214, .42);
    --bs-info-text-emphasis: #8cd9ef;
    --bs-warning-bg-subtle: rgba(245, 182, 94, .22);
    --bs-warning-border-subtle: rgba(245, 182, 94, .45);
    --bs-warning-text-emphasis: #ffd28e;
    --bs-danger-bg-subtle: rgba(242, 114, 114, .20);
    --bs-danger-border-subtle: rgba(242, 114, 114, .45);
    --bs-danger-text-emphasis: #ff9c9c;
}

html[data-bs-theme=dark] .bg-primary-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-primary:not(.badge) {
    background-color: rgba(43, 179, 192, .22) !important;
    color: #7de3ec !important;
}

html[data-bs-theme=dark] .bg-secondary-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-secondary:not(.badge) {
    background-color: rgba(95, 211, 220, .20) !important;
    color: #9fe5ec !important;
}

html[data-bs-theme=dark] .bg-success-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-success:not(.badge) {
    background-color: rgba(63, 211, 138, .20) !important;
    color: #7df0b6 !important;
}

html[data-bs-theme=dark] .bg-info-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-info:not(.badge) {
    background-color: rgba(76, 184, 214, .20) !important;
    color: #8cd9ef !important;
}

html[data-bs-theme=dark] .bg-warning-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-warning:not(.badge) {
    background-color: rgba(245, 182, 94, .22) !important;
    color: #ffd28e !important;
}

html[data-bs-theme=dark] .bg-danger-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-danger:not(.badge) {
    background-color: rgba(242, 114, 114, .20) !important;
    color: #ff9c9c !important;
}

html[data-bs-theme=dark] .bg-body {
    background-color: #0b3943 !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .bg-body-tertiary {
    background-color: #0e414c !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .bg-dark {
    background-color: #042028 !important;
    color: #f3f8f9 !important;
}

/* ---- Clearbook Dark: Sidebar ---- */
html[data-bs-theme=dark] .left-sidebar .nav-small-cap {
    color: #ff4b4e !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link {
    position: relative;
    isolation: isolate;
    background-color: transparent !important;
    color: #f3f8f9 !important;
    border-radius: 10px;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: 0 !important;
    height: 100% !important;
    border-radius: 10px !important;
    background: rgba(43, 179, 192, .14) !important;
    transition: width .4s ease-in-out !important;
    z-index: -1 !important;
}

html[dir="rtl"][data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[dir="rtl"][data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    inset: 0 0 0 auto !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link svg {
    color: #f3f8f9 !important;
    transition: color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover {
    background-color: transparent !important;
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link:hover svg {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link {
    background-color: transparent !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link::before {
    width: 100% !important;
    background: rgba(43, 179, 192, .14) !important;
}

html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link.active svg,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link i,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item.selected>.sidebar-link svg {
    color: #2bb3c0 !important;
}

/* ---- Clearbook Dark: text-* utilities ---- */
html[data-bs-theme=dark] .text-primary {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .text-secondary {
    color: #5fd3dc !important;
}

html[data-bs-theme=dark] .text-success {
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .text-info {
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .text-warning {
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .text-danger {
    color: #f27272 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-dark:not(.bg-warning):not(.btn-warning):not(.btn-outline-warning) {
    color: #f3f8f9 !important;
}

html[data-bs-theme=dark] .page-wrapper .text-muted,
html[data-bs-theme=dark] .page-wrapper .text-body-secondary,
html[data-bs-theme=dark] .page-wrapper .text-body-tertiary,
html[data-bs-theme=dark] .page-wrapper .text-black-50 {
    color: #94b4ba !important;
}

html[data-bs-theme=dark] .page-wrapper .text-body {
    color: #d2e2e5 !important;
}

/* ---- Clearbook Dark: badge-* utilities ---- */
html[data-bs-theme=dark] .badge.bg-primary-subtle,
html[data-bs-theme=dark] .badge.bg-light-primary {
    background-color: rgba(43, 179, 192, .16) !important;
    border-color: rgba(43, 179, 192, .35) !important;
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .badge.bg-success-subtle,
html[data-bs-theme=dark] .badge.bg-light-success {
    background-color: rgba(63, 211, 138, .16) !important;
    border-color: rgba(63, 211, 138, .35) !important;
    color: #3fd38a !important;
}

html[data-bs-theme=dark] .badge.bg-info-subtle,
html[data-bs-theme=dark] .badge.bg-light-info {
    background-color: rgba(76, 184, 214, .16) !important;
    border-color: rgba(76, 184, 214, .35) !important;
    color: #4cb8d6 !important;
}

html[data-bs-theme=dark] .badge.bg-warning-subtle,
html[data-bs-theme=dark] .badge.bg-light-warning {
    background-color: rgba(245, 182, 94, .18) !important;
    border-color: rgba(245, 182, 94, .38) !important;
    color: #f5b65e !important;
}

html[data-bs-theme=dark] .badge.bg-danger-subtle,
html[data-bs-theme=dark] .badge.bg-light-danger {
    background-color: rgba(242, 114, 114, .16) !important;
    border-color: rgba(242, 114, 114, .35) !important;
    color: #f27272 !important;
}

html[data-bs-theme=dark] .badge.bg-secondary-subtle,
html[data-bs-theme=dark] .badge.bg-light {
    background-color: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .2) !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .badge.bg-primary {
    background-color: #2bb3c0 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-success {
    background-color: #3fd38a !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-info {
    background-color: #4cb8d6 !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-warning {
    background-color: #f5b65e !important;
    color: #042028 !important;
}

html[data-bs-theme=dark] .badge.bg-danger {
    background-color: #f27272 !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .badge.bg-secondary {
    background-color: rgba(255, 255, 255, .16) !important;
    color: #f3f8f9 !important;
}

/* ---- Clearbook Dark: bg-* utilities ---- */
html[data-bs-theme=dark] .bg-primary:not(.badge) {
    background-color: rgba(43, 179, 192, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-secondary:not(.badge) {
    background-color: rgba(95, 211, 220, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-success:not(.badge) {
    background-color: rgba(63, 211, 138, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-info:not(.badge) {
    background-color: rgba(76, 184, 214, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-warning:not(.badge) {
    background-color: rgba(245, 182, 94, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark] .bg-danger:not(.badge) {
    background-color: rgba(242, 114, 114, var(--bs-bg-opacity, 1)) !important;
}

html[data-bs-theme=dark],
html[data-bs-theme=dark][data-color-theme=Blue_Theme] {
    --bs-primary-bg-subtle: rgba(43, 179, 192, .22);
    --bs-primary-border-subtle: rgba(43, 179, 192, .45);
    --bs-primary-text-emphasis: #7de3ec;
    --bs-secondary-bg-subtle: rgba(95, 211, 220, .20);
    --bs-secondary-border-subtle: rgba(95, 211, 220, .42);
    --bs-secondary-text-emphasis: #9fe5ec;
    --bs-success-bg-subtle: rgba(63, 211, 138, .20);
    --bs-success-border-subtle: rgba(63, 211, 138, .42);
    --bs-success-text-emphasis: #7df0b6;
    --bs-info-bg-subtle: rgba(76, 184, 214, .20);
    --bs-info-border-subtle: rgba(76, 184, 214, .42);
    --bs-info-text-emphasis: #8cd9ef;
    --bs-warning-bg-subtle: rgba(245, 182, 94, .22);
    --bs-warning-border-subtle: rgba(245, 182, 94, .45);
    --bs-warning-text-emphasis: #ffd28e;
    --bs-danger-bg-subtle: rgba(242, 114, 114, .20);
    --bs-danger-border-subtle: rgba(242, 114, 114, .45);
    --bs-danger-text-emphasis: #ff9c9c;
}

html[data-bs-theme=dark] .bg-primary-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-primary:not(.badge) {
    background-color: rgba(43, 179, 192, .22) !important;
    color: #7de3ec !important;
}

html[data-bs-theme=dark] .bg-secondary-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-secondary:not(.badge) {
    background-color: rgba(95, 211, 220, .20) !important;
    color: #9fe5ec !important;
}

html[data-bs-theme=dark] .bg-success-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-success:not(.badge) {
    background-color: rgba(63, 211, 138, .20) !important;
    color: #7df0b6 !important;
}

html[data-bs-theme=dark] .bg-info-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-info:not(.badge) {
    background-color: rgba(76, 184, 214, .20) !important;
    color: #8cd9ef !important;
}

html[data-bs-theme=dark] .bg-warning-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-warning:not(.badge) {
    background-color: rgba(245, 182, 94, .22) !important;
    color: #ffd28e !important;
}

html[data-bs-theme=dark] .bg-danger-subtle:not(.badge),
html[data-bs-theme=dark] .bg-light-danger:not(.badge) {
    background-color: rgba(242, 114, 114, .20) !important;
    color: #ff9c9c !important;
}

html[data-bs-theme=dark] .bg-body {
    background-color: #0b3943 !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .bg-body-tertiary {
    background-color: #0e414c !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .bg-dark {
    background-color: #042028 !important;
    color: #f3f8f9 !important;
}

/* ---- Clean Toastr Notifications (Light & Clearbook Glass Teal Dark) ---- */
#toast-container>div.toast {
    --bs-toast-border-radius: 10px;
    width: 340px !important;
    padding: 13px 36px 13px 46px !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    background-repeat: no-repeat !important;
    background-position: 15px center !important;
    background-size: 18px 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .10) !important;
    color: #1e293b !important;
    opacity: 1 !important;
}

[dir="rtl"] #toast-container>div.toast {
    padding: 13px 46px 13px 36px !important;
    background-position: calc(100% - 15px) center !important;
}

#toast-container>div.toast:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14) !important;
}

#toast-container>.toast-success {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231b8a50'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm-1.1 14.3-3.6-3.6 1.4-1.4 2.2 2.2 4.8-4.8 1.4 1.4Z'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c0392b'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm3.7 12.3-1.4 1.4L12 13.4l-2.3 2.3-1.4-1.4L10.6 12 8.3 9.7l1.4-1.4L12 10.6l2.3-2.3 1.4 1.4L13.4 12Z'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d99b00'%3E%3Cpath d='M12 2 1 21h22Zm1 15h-2v-2h2Zm0-4h-2V9h2Z'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-info {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f3585'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm1 15h-2v-6h2Zm0-8h-2V7h2Z'/%3E%3C/svg%3E") !important;
}

#toast-container .toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 2px;
}

#toast-container .toast-message {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #334155 !important;
}

#toast-container .toast-close-button {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 16px;
    color: #64748b !important;
    text-shadow: none !important;
    opacity: 0.7;
}

#toast-container .toast-close-button:hover {
    opacity: 1;
}

#toast-container .toast-progress {
    height: 3px;
    opacity: 0.85;
}

#toast-container>.toast-success .toast-progress {
    background-color: #1b8a50;
}

#toast-container>.toast-error .toast-progress {
    background-color: #c0392b;
}

#toast-container>.toast-warning .toast-progress {
    background-color: #d99b00;
}

#toast-container>.toast-info .toast-progress {
    background-color: #0f3585;
}

html[data-bs-theme=dark] #toast-container>div.toast {
    background-color: rgba(11, 57, 67, .96) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .42) !important;
    color: #f3f8f9 !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

html[data-bs-theme=dark] #toast-container>.toast-success {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233fd38a'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm-1.1 14.3-3.6-3.6 1.4-1.4 2.2 2.2 4.8-4.8 1.4 1.4Z'/%3E%3C/svg%3E") !important;
}

html[data-bs-theme=dark] #toast-container>.toast-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f27272'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm3.7 12.3-1.4 1.4L12 13.4l-2.3 2.3-1.4-1.4L10.6 12 8.3 9.7l1.4-1.4L12 10.6l2.3-2.3 1.4 1.4L13.4 12Z'/%3E%3C/svg%3E") !important;
}

html[data-bs-theme=dark] #toast-container>.toast-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f5b65e'%3E%3Cpath d='M12 2 1 21h22Zm1 15h-2v-2h2Zm0-4h-2V9h2Z'/%3E%3C/svg%3E") !important;
}

html[data-bs-theme=dark] #toast-container>.toast-info {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232bb3c0'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm1 15h-2v-6h2Zm0-8h-2V7h2Z'/%3E%3C/svg%3E") !important;
}

html[data-bs-theme=dark] #toast-container>.toast-success .toast-progress {
    background-color: #3fd38a;
}

html[data-bs-theme=dark] #toast-container>.toast-error .toast-progress {
    background-color: #f27272;
}

html[data-bs-theme=dark] #toast-container>.toast-warning .toast-progress {
    background-color: #f5b65e;
}

html[data-bs-theme=dark] #toast-container>.toast-info .toast-progress {
    background-color: #2bb3c0;
}

html[data-bs-theme=dark] #toast-container .toast-title {
    color: #ffffff !important;
}

html[data-bs-theme=dark] #toast-container .toast-message {
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] #toast-container .toast-close-button {
    color: #d2e2e5 !important;
}

/* ---- gsbooks motion: eased fade/scale entrances, hover lift, press feedback (dark theme) ---- */
html[data-bs-theme=dark] {
    --gsb-ease-out: cubic-bezier(0, 0, .2, 1);
    --gsb-ease-strong: cubic-bezier(.23, 1, .32, 1);
}

@keyframes gsb-scale-in {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gsb-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* page content eases in on load */
html[data-bs-theme=dark] .body-wrapper>.container-fluid {
    animation: gsb-fade-up .32s var(--gsb-ease-strong) backwards;
}

/* dropdowns, popovers and select2 results scale in */
html[data-bs-theme=dark] .dropdown-menu.show,
html[data-bs-theme=dark] .popover.show,
html[data-bs-theme=dark] .select2-dropdown {
    animation: gsb-scale-in .12s var(--gsb-ease-out) backwards;
}

/* modals: scale in instead of the default slide */
html[data-bs-theme=dark] .modal.show .modal-dialog {
    animation: gsb-scale-in .2s var(--gsb-ease-strong) backwards;
}

/* cards and pill-style controls lift slightly on hover */
html[data-bs-theme=dark] .page-wrapper .card {
    transition: box-shadow .2s, border-color .2s;
}

html[data-bs-theme=dark] .page-wrapper .card:hover {
    border-color: rgba(255, 255, 255, .2) !important;
}

html[data-bs-theme=dark] .nav-pills .nav-link,
html[data-bs-theme=dark] .form-control,
html[data-bs-theme=dark] .form-select {
    transition: box-shadow .2s, transform .15s, background-color .2s, border-color .2s;
}

html[data-bs-theme=dark] .nav-pills .nav-link:hover:not(.active) {
    transform: translateY(-1px);
}

html[data-bs-theme=dark] .nav-pills .nav-link:active {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    html[data-bs-theme=dark] .body-wrapper>.container-fluid,
    html[data-bs-theme=dark] .dropdown-menu.show,
    html[data-bs-theme=dark] .popover.show,
    html[data-bs-theme=dark] .select2-dropdown,
    html[data-bs-theme=dark] .modal.show .modal-dialog {
        animation: none;
    }

    html[data-bs-theme=dark] .page-wrapper .card:hover,
    html[data-bs-theme=dark] .nav-pills .nav-link:hover:not(.active) {
        transform: none;
    }
}

/* ---- gsbooks motion: sidebar (dark theme). The wipe-in highlight (.4s ease-in-out) is defined above. ---- */
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link svg,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link iconify-icon {
    transition: color .2s ease, transform .2s var(--gsb-ease-strong);
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover svg,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover iconify-icon {
    transform: scale(1.12);
}

/* label slides in slightly on hover, like gsbooks nav rows */
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link .hide-menu {
    display: inline-block;
    transition: transform .25s var(--gsb-ease-strong), color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu {
    transform: translateX(2px);
}

html[dir="rtl"][data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu {
    transform: translateX(-2px);
}

/* submenu arrow turns smoothly; submenu items ease in when it opens */
html[data-bs-theme=dark] #sidebarnav .sidebar-link.has-arrow::after {
    transition: transform .25s var(--gsb-ease-strong), border-color .2s ease;
}

html[data-bs-theme=dark] #sidebarnav ul.collapse.show>.sidebar-item,
html[data-bs-theme=dark] #sidebarnav ul.collapse.in>.sidebar-item {
    animation: gsb-fade-up .25s var(--gsb-ease-strong) backwards;
}

/* active item gets a gentle press, same feel as gsbooks pills */
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:active {
    transform: scale(.985);
}

@media (prefers-reduced-motion: reduce) {

    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover i,
    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover svg,
    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover iconify-icon,
    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu,
    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:active {
        transform: none;
    }

    html[data-bs-theme=dark] #sidebarnav ul.collapse.show>.sidebar-item,
    html[data-bs-theme=dark] #sidebarnav ul.collapse.in>.sidebar-item {
        animation: none;
    }
}

/* ---- gsbooks top bar (dark theme): glass pill buttons like .mod-pill, same on every module ---- */
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg,
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg.bg-primary-subtle,
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg.bg-danger-subtle,
html[data-bs-theme=dark] .topbar nav.navbar .d-inline-flex.bg-primary-subtle {
    background-color: rgba(255, 255, 255, .06) !important;
    background-image: linear-gradient(rgba(255, 255, 255, .07), rgba(255, 255, 255, 0)) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 4px -1px rgba(0, 0, 0, .25) !important;
    transition: box-shadow .2s, transform .15s, background-color .2s;
}

html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg:hover,
html[data-bs-theme=dark] .topbar nav.navbar .d-inline-flex.bg-primary-subtle:hover {
    background-color: rgba(255, 255, 255, .1) !important;
    box-shadow: inset 0 0 0 1px #2bb3c0, 0 4px 8px -2px rgba(0, 0, 0, .35) !important;
    transform: translateY(-1px);
}

html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg:active {
    transform: translateY(0);
}

/* icons and text: light, accent on the danger (logout) pill */
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg a,
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg span,
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg iconify-icon,
html[data-bs-theme=dark] .topbar nav.navbar .d-inline-flex.bg-primary-subtle,
html[data-bs-theme=dark] .topbar nav.navbar .d-inline-flex.bg-primary-subtle * {
    color: #f3f8f9 !important;
    transition: color .2s ease;
}

html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg:hover iconify-icon,
html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg:hover a {
    color: #2bb3c0 !important;
}

html[data-bs-theme=dark] .topbar nav.navbar li.bg-danger-subtle iconify-icon,
html[data-bs-theme=dark] .topbar nav.navbar li.bg-danger-subtle a,
html[data-bs-theme=dark] .topbar nav.navbar li.bg-danger-subtle i {
    color: #f27272 !important;
}

html[data-bs-theme=dark] .topbar nav.navbar li.bg-danger-subtle:hover {
    box-shadow: inset 0 0 0 1px #f27272, 0 4px 8px -2px rgba(0, 0, 0, .35) !important;
}

@media (prefers-reduced-motion: reduce) {

    html[data-bs-theme=dark] .topbar nav.navbar li.nav-icon-hover-bg:hover,
    html[data-bs-theme=dark] .topbar nav.navbar .d-inline-flex.bg-primary-subtle:hover {
        transform: none;
    }
}

/* ---- gsbooks datepicker (dark theme): glass teal panel, teal selected cell, ringed today ---- */
html[data-bs-theme=dark] .datepicker.dropdown-menu {
    background: linear-gradient(160deg, rgba(14, 65, 76, .98), rgba(8, 36, 44, .98)) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .45) !important;
    color: #d2e2e5;
    animation: gsb-scale-in .12s var(--gsb-ease-out) backwards;
}

html[data-bs-theme=dark] .datepicker table tr td,
html[data-bs-theme=dark] .datepicker table tr th,
html[data-bs-theme=dark] .datepicker table tr td span {
    color: #d2e2e5 !important;
    border-radius: 8px !important;
    transition: background-color .15s, color .15s, box-shadow .15s;
}

html[data-bs-theme=dark] .datepicker table tr th.datepicker-switch,
html[data-bs-theme=dark] .datepicker table tr th.prev,
html[data-bs-theme=dark] .datepicker table tr th.next,
html[data-bs-theme=dark] .datepicker table tr th.dow {
    color: #f3f8f9 !important;
    background: transparent !important;
}

html[data-bs-theme=dark] .datepicker table tr th.datepicker-switch:hover,
html[data-bs-theme=dark] .datepicker table tr th.prev:hover,
html[data-bs-theme=dark] .datepicker table tr th.next:hover,
html[data-bs-theme=dark] .datepicker tfoot tr th:hover {
    background-color: rgba(255, 255, 255, .1) !important;
}

html[data-bs-theme=dark] .datepicker tfoot tr th {
    color: #f3f8f9 !important;
}

/* hover and keyboard focus */
html[data-bs-theme=dark] .datepicker table tr td.day:hover,
html[data-bs-theme=dark] .datepicker table tr td span:hover,
html[data-bs-theme=dark] .datepicker table tr td.focused,
html[data-bs-theme=dark] .datepicker table tr td span.focused {
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
}

/* dimmed: other-month days, out-of-range years, disabled */
html[data-bs-theme=dark] .datepicker table tr td.old,
html[data-bs-theme=dark] .datepicker table tr td.new,
html[data-bs-theme=dark] .datepicker table tr td span.old,
html[data-bs-theme=dark] .datepicker table tr td span.new,
html[data-bs-theme=dark] .datepicker table tr td.disabled,
html[data-bs-theme=dark] .datepicker table tr td span.disabled {
    color: rgba(210, 226, 229, .38) !important;
    background: transparent !important;
}

/* today: ring, not a pale box */
html[data-bs-theme=dark] .datepicker table tr td.today:not(.active),
html[data-bs-theme=dark] .datepicker table tr td span.focused:not(.active) {
    background: rgba(43, 179, 192, .14) !important;
    box-shadow: inset 0 0 0 1px #2bb3c0;
    color: #fff !important;
}

/* range between dates */
html[data-bs-theme=dark] .datepicker table tr td.range {
    background: rgba(43, 179, 192, .18) !important;
    color: #fff !important;
}

/* selected: gsbooks raised teal */
html[data-bs-theme=dark] .datepicker table tr td.active,
html[data-bs-theme=dark] .datepicker table tr td.active:hover,
html[data-bs-theme=dark] .datepicker table tr td span.active,
html[data-bs-theme=dark] .datepicker table tr td span.active:hover {
    background: linear-gradient(180deg, #4ec5d0 0, #2bb3c0 55%, #1f8f9b 100%) !important;
    color: #fff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 0 rgba(15, 98, 108, .75);
}

/* ---- gsbooks sidebar + pill tabs (dark theme) ---- */
/* section labels: small muted caps with the orange-to-pink bar (gsbooks .nav-head) */
html[data-bs-theme=dark] .left-sidebar .nav-small-cap {
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #94b4ba !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
}

html[data-bs-theme=dark] .left-sidebar .nav-small-cap::before {
    content: "";
    flex-shrink: 0;
    width: 3px;
    height: 12px;
    border-radius: 9999px;
    background: linear-gradient(#e89443, #db396b);
}

html[data-bs-theme=dark] .left-sidebar .nav-small-cap .nav-small-cap-icon,
html[data-bs-theme=dark] .left-sidebar .nav-small-cap>iconify-icon {
    display: none;
}

/* active page: teal text and a soft 12% teal wash instead of the solid green block */
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html[data-bs-theme=dark] #sidebarnav .selected .primary-hover-bg::before {
    background-color: rgba(43, 179, 192, .12) !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link:hover::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg:hover::before {
    background-color: rgba(43, 179, 192, .12) !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .hide-menu,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .aside-icon,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active i,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active svg,
html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active iconify-icon,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link .hide-menu {
    color: #2bb3c0 !important;
}

/* pill tabs = gsbooks .mod-pill: glass when idle, dark inset when active */
html[data-bs-theme=dark] .nav-pills .nav-link {
    color: #d2e2e5 !important;
    background-color: rgba(255, 255, 255, .06) !important;
    background-image: linear-gradient(rgba(255, 255, 255, .07), rgba(255, 255, 255, 0)) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 4px -1px rgba(0, 0, 0, .25);
}

html[data-bs-theme=dark] .nav-pills .nav-link:hover:not(.active) {
    color: #fff !important;
    box-shadow: inset 0 0 0 1px #2bb3c0, 0 4px 8px -2px rgba(0, 0, 0, .35);
}

html[data-bs-theme=dark] .nav-pills .nav-link.active,
html[data-bs-theme=dark] .nav-pills .show>.nav-link {
    color: #fff !important;
    background-color: rgba(0, 0, 0, .38) !important;
    background-image: none !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 2px 4px rgba(0, 0, 0, .25) !important;
}

html[data-bs-theme=dark] .nav-pills .nav-link.active i,
html[data-bs-theme=dark] .nav-pills .nav-link.active iconify-icon {
    color: #2bb3c0 !important;
}

/* ---- gsbooks sidebar, part 2: label rule line, rounder active wash, highlight sweeps in on page load ---- */
html[data-bs-theme=dark] .left-sidebar .nav-small-cap::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255, 255, 255, .12);
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link {
    border-radius: 14px;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link::before,
html[data-bs-theme=dark] .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    border-radius: 14px !important;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before {
    background-color: rgba(43, 179, 192, .18) !important;
    animation: gsb-wipe .4s ease-in-out backwards;
}

html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link {
    font-weight: 600;
}

@keyframes gsb-wipe {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

html[dir="rtl"][data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before {
    animation-name: gsb-wipe;
}

@media (prefers-reduced-motion: reduce) {

    html[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
    html[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before {
        animation: none;
    }
}

/* ---- gsbooks buttons, part 2 (dark theme): .btn-dark = raised neutral, .btn-light = soft glass ---- */
html[data-bs-theme=dark] .btn-dark {
    --gsb-c: #6b8f99;
    --gsb-n: color-mix(in srgb, var(--gsb-c) 74%, #000 26%);
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 88%, #000 12%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 80%, #000 20%) 75%, transparent), 0 4px 4px -1px rgba(0, 0, 0, .18) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html[data-bs-theme=dark] .btn-dark:hover:not(:disabled):not(.disabled) {
    filter: brightness(1.1);
    color: #fff !important;
    background-color: var(--gsb-n) !important;
}

html[data-bs-theme=dark] .btn-dark:active:not(:disabled):not(.disabled) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 80%, #000 20%) 75%, transparent), 0 1px 2px rgba(0, 0, 0, .14) !important;
    transform: translateY(1px);
}

html[data-bs-theme=dark] .btn-light {
    color: #d2e2e5 !important;
    background-color: transparent !important;
    background-image: linear-gradient(rgba(255, 255, 255, .06), rgba(0, 0, 0, .03)) !important;
    border: 0 !important;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 2px 2px -.5px rgba(0, 0, 0, .25) !important;
    transition: box-shadow .2s, transform .15s, color .2s;
}

html[data-bs-theme=dark] .btn-light:hover:not(:disabled):not(.disabled) {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .08) !important;
    box-shadow: inset 0 0 0 1px #2bb3c0, 0 3px 3px -1px rgba(0, 0, 0, .3) !important;
}

html[data-bs-theme=dark] .btn-light.text-secondary,
html[data-bs-theme=dark] .btn-light.text-muted {
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .btn-light.border {
    border: 0 !important;
}

/* ---- Missing documents stat cards (dark theme): active = gsbooks teal wash like the sidebar, not a blue border ---- */
html[data-bs-theme=dark] .md-stat {
    border-color: rgba(255, 255, 255, .12);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

html[data-bs-theme=dark] .md-stat:hover {
    border-color: rgba(43, 179, 192, .45);
    background: rgba(255, 255, 255, .06);
}

html[data-bs-theme=dark] .md-stat.active {
    border-color: transparent;
    background: rgba(0, 0, 0, .38);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 2px 4px rgba(0, 0, 0, .25);
    transform: none;
}

html[data-bs-theme=dark] .md-stat {
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

html[data-bs-theme=dark] .md-stat.active .md-lbl {
    color: #d2e2e5;
}

html[data-bs-theme=dark] .md-stat.md-total .md-ico {
    background: rgba(43, 179, 192, .18);
    color: #2bb3c0;
}

/* ---- Pressed-in active cards, applied to every stat / filter card (missing documents, student fee setup, accounting, role + user pages) ---- */
html[data-bs-theme=dark] .sfs-stat,
html[data-bs-theme=dark] .acc-stat {
    border-color: rgba(255, 255, 255, .12);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

html[data-bs-theme=dark] .sfs-stat:hover,
html[data-bs-theme=dark] .acc-stat:hover {
    border-color: rgba(43, 179, 192, .45);
    background: rgba(255, 255, 255, .06);
}

html[data-bs-theme=dark] .sfs-stat.active,
html[data-bs-theme=dark] .acc-stat.active,
html[data-bs-theme=dark] .rm-page.is-active {
    border-color: transparent;
    background: rgba(0, 0, 0, .38);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 2px 4px rgba(0, 0, 0, .25);
    transform: none;
}

html[data-bs-theme=dark] .sfs-stat.active .sfs-lbl {
    color: #d2e2e5;
}

/* icon tiles: teal instead of blue */
html[data-bs-theme=dark] .sfs-stat .sfs-ico,
html[data-bs-theme=dark] .sfs-sec h6 i,
html[data-bs-theme=dark] .sfs-person-av,
html[data-bs-theme=dark] .md-sec h6>i:first-child {
    background: rgba(43, 179, 192, .18);
    color: #2bb3c0;
}

/* input add-on icons (the little icon box next to an input): always a visible box with the same border as the input */
html[data-bs-theme=dark] .input-group>.input-group-text {
    border-width: 1px;
    border-style: solid;
    border-color: rgba(255, 255, 255, .16);
    background-color: rgba(255, 255, 255, .06) !important;
    color: #d2e2e5 !important;
}

html[data-bs-theme=dark] .md-field.is-missing .input-group>.input-group-text {
    border-color: #ff6b78 !important;
}

/* ---- Sidebar active item, final design (dark): soft teal wash only (no side border or bar); teal icon and label ----
   html:root raises the specificity above the older :root[data-bs-theme=dark] rules that painted the solid green block */
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active::before,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected .primary-hover-bg::before,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .primary-hover-bg.active::before {
    background-color: rgba(43, 179, 192, .16) !important;
    box-shadow: none;
    width: 100% !important;
}

html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .hide-menu,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .aside-icon,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .aside-icon *,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active i,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active svg,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active iconify-icon,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link .hide-menu,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon,
html:root[data-bs-theme=dark] #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon * {
    color: #4fd0dc !important;
}

html:root[data-bs-theme=dark] #sidebarnav .sidebar-item .sidebar-link.active .hide-menu {
    font-weight: 700;
}

/* ---- Plain modal headers everywhere (light and dark): no colour fill, no gradient, normal text, thin bottom border.
   Covers .bg-primary/.bg-danger/.bg-dark/.bg-*-subtle headers and the inline #f8fafc ones; the modal body colour shows through. ---- */
html:root .modal-header,
html:root .modal-header[class*="bg-"],
html:root .modal-header[style] {
    background: transparent !important;
    background-image: none !important;
    color: var(--bs-body-color) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

html:root .modal-header .modal-title,
html:root .modal-header h1,
html:root .modal-header h2,
html:root .modal-header h3,
html:root .modal-header h4,
html:root .modal-header h5,
html:root .modal-header h6,
html:root .modal-header .text-white,
html:root .modal-header .text-dark {
    color: var(--bs-heading-color, var(--bs-body-color)) !important;
}

html:root .modal-header .text-white-50,
html:root .modal-header .text-muted,
html:root .modal-header small {
    color: var(--bs-secondary-color) !important;
}

/* close button: normal dark cross on light, light cross on dark (the white variant is not needed any more) */
html:root:not([data-bs-theme=dark]) .modal-header .btn-close,
html:root:not([data-bs-theme=dark]) .modal-header .btn-close-white {
    filter: none !important;
}

html[data-bs-theme=dark]:root .modal-header .btn-close,
html[data-bs-theme=dark]:root .modal-header .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* ---- gsbooks dark-mode perfections: modals, SweetAlert2, Student Finance Setup, Billing Basis, Select2 ---- */
html[data-bs-theme=dark] .swal2-popup .bg-light,
html[data-bs-theme=dark] .modal .bg-light {
    background-color: rgba(255, 255, 255, .07) !important;
    color: #e2eef0 !important;
}

html[data-bs-theme=dark] .swal2-popup .list-group-item,
html[data-bs-theme=dark] .modal .list-group-item {
    background-color: transparent;
    border-color: rgba(255, 255, 255, .12);
    color: #e2eef0;
}

html[data-bs-theme=dark] .swal2-popup .progress,
html[data-bs-theme=dark] .modal .progress {
    background-color: rgba(255, 255, 255, .10);
}

html[data-bs-theme=dark] .sfs-seg,
html[data-bs-theme=dark] .bb-seg,
html[data-bs-theme=dark] .md-seg {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .14);
}

html[data-bs-theme=dark] .sfs-seg-btn,
html[data-bs-theme=dark] .bb-seg-btn,
html[data-bs-theme=dark] .md-seg-btn {
    color: #b8ced2;
}

html[data-bs-theme=dark] .sfs-seg-btn.on,
html[data-bs-theme=dark] .bb-seg-btn.on,
html[data-bs-theme=dark] .md-seg-btn.on {
    background: #2bb3c0 !important;
    color: #062126 !important;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

html[data-bs-theme=dark] .sfs-pill,
html[data-bs-theme=dark] .bb-pill,
html[data-bs-theme=dark] .md-pill,
html[data-bs-theme=dark] .sfs-person-tag,
html[data-bs-theme=dark] .md-person-tag {
    background: rgba(43, 179, 192, .16) !important;
    color: #7ee3ec !important;
}

html[data-bs-theme=dark] .sfs-pill-info,
html[data-bs-theme=dark] .bb-pill-info,
html[data-bs-theme=dark] .md-pill-info {
    background: rgba(56, 189, 248, .16) !important;
    color: #7dd3fc !important;
}

html[data-bs-theme=dark] .sfs-auto-banner,
html[data-bs-theme=dark] .bb-auto-banner {
    background: rgba(43, 179, 192, .14) !important;
    border-color: rgba(43, 179, 192, .32) !important;
    color: #7ee3ec !important;
}

html[data-bs-theme=dark] .bb-sec,
html[data-bs-theme=dark] .sfs-sec {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .12);
}

html[data-bs-theme=dark] .bb-sec h6 i {
    background: rgba(43, 179, 192, .18);
    color: #2bb3c0;
}

html[data-bs-theme=dark] .bb-eqbox,
html[data-bs-theme=dark] .sfs-eqbox {
    background: rgba(255, 255, 255, .05) !important;
    border-color: rgba(255, 255, 255, .14) !important;
    color: #e2eef0 !important;
}

html[data-bs-theme=dark] .bb-sumrow,
html[data-bs-theme=dark] .sfs-sumrow {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .12);
}

html[data-bs-theme=dark] .bb-sum-final,
html[data-bs-theme=dark] .sfs-sum-final {
    background: rgba(43, 192, 130, .16) !important;
    color: #7be3b1 !important;
}

html[data-bs-theme=dark] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(43, 179, 192, .25) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Light Mode Parity with Dark Mode (GSBooks layout, glass topbar, sidebar,
   motion, tables, pills, and old button colors in 3D)
   ========================================================================== */

/* ---- Motion: same smooth fade/scale entrances & hover feedback in light mode ---- */
html:not([data-bs-theme=dark]) .body-wrapper>.container-fluid {
    animation: gsb-fade-up .26s var(--gsb-ease-out, cubic-bezier(.22, 1, .36, 1)) backwards;
}

html:not([data-bs-theme=dark]) .dropdown-menu.show,
html:not([data-bs-theme=dark]) .select2-dropdown {
    animation: gsb-scale-in .14s var(--gsb-ease-out, cubic-bezier(.22, 1, .36, 1)) backwards;
}

html:not([data-bs-theme=dark]) .modal.show .modal-dialog {
    animation: gsb-scale-in .18s var(--gsb-ease-out, cubic-bezier(.22, 1, .36, 1)) backwards;
}

@media (prefers-reduced-motion: reduce) {

    html:not([data-bs-theme=dark]) .body-wrapper>.container-fluid,
    html:not([data-bs-theme=dark]) .dropdown-menu.show,
    html:not([data-bs-theme=dark]) .select2-dropdown,
    html:not([data-bs-theme=dark]) .modal.show .modal-dialog {
        animation: none !important;
    }
}

/* ---- Top Nav Bar (light): frosted surface + raised .mod-pill buttons ---- */
html:not([data-bs-theme=dark]) .topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(244, 247, 252, .90)) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(15, 53, 133, .10) !important;
    box-shadow: 0 2px 10px -4px rgba(15, 53, 133, .08);
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg.bg-primary-subtle,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg.bg-danger-subtle,
html:not([data-bs-theme=dark]) .topbar nav.navbar .d-inline-flex.bg-primary-subtle {
    background-color: #ffffff !important;
    background-image: linear-gradient(180deg, #ffffff 0%, #f2f5fa 100%) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    box-shadow: inset 0 0 0 1px rgba(15, 53, 133, .14), 0 2px 4px -1px rgba(15, 53, 133, .10) !important;
    transition: box-shadow .2s, transform .15s, background-color .2s;
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg:hover,
html:not([data-bs-theme=dark]) .topbar nav.navbar .d-inline-flex.bg-primary-subtle:hover {
    background-color: #f4f7fc !important;
    box-shadow: inset 0 0 0 1px #0f3585, 0 4px 10px -2px rgba(15, 53, 133, .18) !important;
    transform: translateY(-1px);
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg:active {
    transform: translateY(0);
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg a,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg span,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg iconify-icon,
html:not([data-bs-theme=dark]) .topbar nav.navbar .d-inline-flex.bg-primary-subtle,
html:not([data-bs-theme=dark]) .topbar nav.navbar .d-inline-flex.bg-primary-subtle * {
    color: #1e293b !important;
    transition: color .2s ease;
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg:hover iconify-icon,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.nav-icon-hover-bg:hover a {
    color: #0f3585 !important;
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.bg-danger-subtle iconify-icon,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.bg-danger-subtle a,
html:not([data-bs-theme=dark]) .topbar nav.navbar li.bg-danger-subtle i {
    color: #c0392b !important;
}

html:not([data-bs-theme=dark]) .topbar nav.navbar li.bg-danger-subtle:hover {
    box-shadow: inset 0 0 0 1px #c0392b, 0 4px 10px -2px rgba(192, 57, 43, .18) !important;
}

/* ---- Sidebar (light): section bar + rule line, soft rounded wash on active & hover ---- */
html:not([data-bs-theme=dark]) .left-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 249, 253, .98)) !important;
    border-color: rgba(15, 53, 133, .10) !important;
}

html:not([data-bs-theme=dark]) .left-sidebar .nav-small-cap {
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #55698f !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
}

html:not([data-bs-theme=dark]) .left-sidebar .nav-small-cap::before {
    content: "";
    flex-shrink: 0;
    width: 3px;
    height: 12px;
    border-radius: 9999px;
    background: linear-gradient(#e89443, #db396b);
}

html:not([data-bs-theme=dark]) .left-sidebar .nav-small-cap::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(15, 53, 133, .12);
}

html:not([data-bs-theme=dark]) .left-sidebar .nav-small-cap .nav-small-cap-icon,
html:not([data-bs-theme=dark]) .left-sidebar .nav-small-cap>iconify-icon {
    display: none;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link,
html:not([data-bs-theme=dark]) .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link {
    border-radius: 14px;
    transition: transform .15s ease, color .15s ease;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link::before,
html:not([data-bs-theme=dark]) .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    border-radius: 14px !important;
    left: 0 !important;
    right: auto !important;
}

html[dir="rtl"]:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link::before,
html[dir="rtl"]:not([data-bs-theme=dark]) .left-sidebar .sidebar-nav ul .sidebar-item .sidebar-link::before {
    right: 0 !important;
    left: auto !important;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link:hover::before,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .primary-hover-bg:hover::before,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .primary-hover-bg.btn-toggle[aria-expanded=true]::before {
    background-color: rgba(15, 53, 133, .08) !important;
    width: 100% !important;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu {
    transform: translateX(3px);
}

html[dir="rtl"]:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link:hover .hide-menu {
    transform: translateX(-3px);
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active::before,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link::before,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected .primary-hover-bg::before,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .primary-hover-bg.active::before {
    background-color: #0f3585 !important;
    box-shadow: 0 4px 10px -2px rgba(15, 53, 133, .32);
    width: 100% !important;
    animation: gsb-wipe .4s ease-in-out backwards;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active .hide-menu,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active .aside-icon,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active .aside-icon *,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active i,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active svg,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active iconify-icon,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link .hide-menu,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link .aside-icon * {
    color: #ffffff !important;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active .hide-menu {
    font-weight: 700;
}

html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item .sidebar-link.active.has-arrow::after,
html:not([data-bs-theme=dark]) #sidebarnav .sidebar-item.selected>.sidebar-link.has-arrow::after {
    border-color: #ffffff !important;
}

/* Keep submenu (.first-level) active item as bold navy text on transparent background */
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item .sidebar-link.active::before,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item.selected>.sidebar-link::before {
    background-color: transparent !important;
    box-shadow: none !important;
}

html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item .sidebar-link.active,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item .sidebar-link.active .hide-menu,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item .sidebar-link.active .aside-icon,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item .sidebar-link.active .aside-icon *,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item.selected>.sidebar-link,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .hide-menu,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .aside-icon,
html:not([data-bs-theme=dark]) #sidebarnav .first-level .sidebar-item.selected>.sidebar-link .aside-icon * {
    color: #0f3585 !important;
}

/* ---- Pill tabs (light): raised glass pill when idle, solid 3D navy pill when active ---- */
html:not([data-bs-theme=dark]) .nav-pills .nav-link {
    color: #334155 !important;
    background-color: #ffffff !important;
    background-image: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    box-shadow: inset 0 0 0 1px rgba(15, 53, 133, .14), 0 2px 4px -1px rgba(15, 53, 133, .08);
    transition: box-shadow .18s, transform .14s, color .15s;
}

html:not([data-bs-theme=dark]) .nav-pills .nav-link:hover:not(.active) {
    color: #0f3585 !important;
    box-shadow: inset 0 0 0 1px #0f3585, 0 4px 8px -2px rgba(15, 53, 133, .16);
    transform: translateY(-1px);
}

html:not([data-bs-theme=dark]) .nav-pills .nav-link.active,
html:not([data-bs-theme=dark]) .nav-pills .show>.nav-link {
    color: #ffffff !important;
    background-color: #0f3585 !important;
    background-image: linear-gradient(180deg, #1b47a3 0%, #0f3585 58%, #0b2a6a 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 0 #071c4a, 0 4px 8px -2px rgba(15, 53, 133, .28) !important;
}

html:not([data-bs-theme=dark]) .nav-pills .nav-link.active i,
html:not([data-bs-theme=dark]) .nav-pills .nav-link.active iconify-icon {
    color: #ffffff !important;
}

/* ---- Tables (light): soft header, crisp dividers, gentle hover ---- */
html:not([data-bs-theme=dark]) .page-wrapper .table thead th,
html:not([data-bs-theme=dark]) .page-wrapper table.dataTable thead th {
    background-color: #e8eef7 !important;
    color: #0f2756 !important;
    border-color: #d6e0ee !important;
}

html:not([data-bs-theme=dark]) .page-wrapper .table-striped>tbody>tr:nth-of-type(odd)>*,
html:not([data-bs-theme=dark]) .page-wrapper table.dataTable.stripe>tbody>tr.odd>* {
    background-color: #f7f9fc !important;
}

html:not([data-bs-theme=dark]) .page-wrapper .table-hover>tbody>tr:hover>*,
html:not([data-bs-theme=dark]) .page-wrapper table.dataTable.hover>tbody>tr:hover>*,
html:not([data-bs-theme=dark]) .page-wrapper .comm-table>tbody>tr:hover,
html:not([data-bs-theme=dark]) .page-wrapper .comm-table>tbody>tr:hover>*,
html:not([data-bs-theme=dark]) .page-wrapper .table-receipts>tbody>tr:hover,
html:not([data-bs-theme=dark]) .page-wrapper .table-receipts>tbody>tr:hover>* {
    background-color: #eaf1fb !important;
    color: #0f172a !important;
}

/* ---- Stat / Filter cards & input add-ons (light) ---- */
html:not([data-bs-theme=dark]) .sfs-stat,
html:not([data-bs-theme=dark]) .acc-stat {
    border-color: #d5dfec;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

html:not([data-bs-theme=dark]) .sfs-stat:hover,
html:not([data-bs-theme=dark]) .acc-stat:hover {
    border-color: rgba(15, 53, 133, .45);
    background: #f5f8fd;
}

html:not([data-bs-theme=dark]) .sfs-stat.active,
html:not([data-bs-theme=dark]) .acc-stat.active,
html:not([data-bs-theme=dark]) .rm-page.is-active {
    border-color: #0f3585;
    background: rgba(15, 53, 133, .08);
    box-shadow: inset 0 0 0 1px rgba(15, 53, 133, .22), inset 0 2px 4px rgba(15, 53, 133, .08);
    transform: none;
}

html:not([data-bs-theme=dark]) .input-group>.input-group-text {
    border-width: 1px;
    border-style: solid;
    border-color: var(--bs-border-color, #d3dbe8);
    background-color: #f3f6fb !important;
    color: #334155 !important;
}

/* ---- Light Mode Buttons: old button colors with 3D raised gradient & bottom edge ---- */
html:not([data-bs-theme=dark]) .btn-primary,
html:not([data-bs-theme=dark]) .btn-outline-primary {
    --gsb-n: #0f3585;
}

html:not([data-bs-theme=dark]) .btn-secondary,
html:not([data-bs-theme=dark]) .btn-outline-secondary {
    --gsb-n: #55698f;
}

html:not([data-bs-theme=dark]) .btn-info,
html:not([data-bs-theme=dark]) .btn-outline-info {
    --gsb-n: #0f3585;
}

html:not([data-bs-theme=dark]) .btn-success,
html:not([data-bs-theme=dark]) .btn-outline-success {
    --gsb-n: #1b8a50;
}

html:not([data-bs-theme=dark]) .btn-danger,
html:not([data-bs-theme=dark]) .btn-outline-danger {
    --gsb-n: #c0392b;
}

html:not([data-bs-theme=dark]) .btn-warning,
html:not([data-bs-theme=dark]) .btn-outline-warning {
    --gsb-n: #f0b400;
}

html:not([data-bs-theme=dark]) .btn-primary,
html:not([data-bs-theme=dark]) .btn-secondary,
html:not([data-bs-theme=dark]) .btn-info,
html:not([data-bs-theme=dark]) .btn-success,
html:not([data-bs-theme=dark]) .btn-danger,
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-status.btn-outline-primary.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-secondary.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-info.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-success.active,
html:not([data-bs-theme=dark]) .btn-status.btn-outline-danger.active {
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 86%, #000 14%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 3px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 70%, #000 30%) 85%, transparent), 0 4px 6px -1px rgba(15, 26, 42, .16) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html:not([data-bs-theme=dark]) .btn-warning,
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-status.btn-outline-warning.active {
    color: #2b1f00 !important;
    background-color: #f0b400 !important;
    background-image: linear-gradient(180deg, #ffd24d 0, #f0b400 55%, #d69e00 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 #b88600, 0 4px 6px -1px rgba(15, 26, 42, .14) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html:not([data-bs-theme=dark]) .btn-primary:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-secondary:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-info:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-success:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-danger:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-warning:hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status):hover:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status):hover:not(:disabled):not(.disabled) {
    filter: brightness(1.07);
}

html:not([data-bs-theme=dark]) .btn-primary:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-secondary:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-info:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-success:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-danger:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-warning:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-primary:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-secondary:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-info:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-success:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-danger:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-outline-warning:not(.btn-status):active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-primary.active,
html:not([data-bs-theme=dark]) .btn-secondary.active,
html:not([data-bs-theme=dark]) .btn-info.active,
html:not([data-bs-theme=dark]) .btn-success.active,
html:not([data-bs-theme=dark]) .btn-danger.active,
html:not([data-bs-theme=dark]) .btn-warning.active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-n) 70%, #000 30%) 85%, transparent), 0 1px 2px rgba(15, 26, 42, .14) !important;
    transform: translateY(1px);
}

html:not([data-bs-theme=dark]) .btn-primary:disabled,
html:not([data-bs-theme=dark]) .btn-secondary:disabled,
html:not([data-bs-theme=dark]) .btn-info:disabled,
html:not([data-bs-theme=dark]) .btn-success:disabled,
html:not([data-bs-theme=dark]) .btn-danger:disabled,
html:not([data-bs-theme=dark]) .btn-warning:disabled,
html:not([data-bs-theme=dark]) .btn-outline-primary:disabled,
html:not([data-bs-theme=dark]) .btn-outline-secondary:disabled,
html:not([data-bs-theme=dark]) .btn-outline-info:disabled,
html:not([data-bs-theme=dark]) .btn-outline-success:disabled,
html:not([data-bs-theme=dark]) .btn-outline-danger:disabled,
html:not([data-bs-theme=dark]) .btn-outline-warning:disabled {
    box-shadow: none !important;
    filter: grayscale(.35);
    opacity: .6;
    transform: none;
}

/* ---- Light Mode Datepicker: rounded panel + 3D raised cells matching dark mode & 3D buttons ---- */
html:not([data-bs-theme=dark]) .datepicker.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(15, 53, 133, .14) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 40px -12px rgba(15, 53, 133, .22) !important;
    padding: 10px !important;
    animation: gsb-scale-in .12s var(--gsb-ease-out, cubic-bezier(.22, 1, .36, 1)) backwards;
}

html:not([data-bs-theme=dark]) .datepicker table tr td,
html:not([data-bs-theme=dark]) .datepicker table tr th,
html:not([data-bs-theme=dark]) .datepicker table tr td span {
    border-radius: 8px !important;
    color: #1e293b;
    transition: background-color .15s, color .15s, box-shadow .15s, transform 80ms;
}

html:not([data-bs-theme=dark]) .datepicker table tr th.datepicker-switch,
html:not([data-bs-theme=dark]) .datepicker table tr th.prev,
html:not([data-bs-theme=dark]) .datepicker table tr th.next,
html:not([data-bs-theme=dark]) .datepicker table tr th.dow {
    color: #0f2756 !important;
    font-weight: 600;
}

html:not([data-bs-theme=dark]) .datepicker table tr th.datepicker-switch:hover,
html:not([data-bs-theme=dark]) .datepicker table tr th.prev:hover,
html:not([data-bs-theme=dark]) .datepicker table tr th.next:hover {
    background-color: #e8eef7 !important;
    color: #0f3585 !important;
}

html:not([data-bs-theme=dark]) .datepicker table tr td.day:hover,
html:not([data-bs-theme=dark]) .datepicker table tr td span:hover {
    background-color: #eaf1fb !important;
    color: #0f3585 !important;
}

html:not([data-bs-theme=dark]) .datepicker table tr td.old,
html:not([data-bs-theme=dark]) .datepicker table tr td.new,
html:not([data-bs-theme=dark]) .datepicker table tr td span.old,
html:not([data-bs-theme=dark]) .datepicker table tr td span.new,
html:not([data-bs-theme=dark]) .datepicker table tr td.disabled,
html:not([data-bs-theme=dark]) .datepicker table tr td span.disabled {
    color: #94a3b8 !important;
    background: transparent !important;
}

html:not([data-bs-theme=dark]) .datepicker table tr td.today:not(.active),
html:not([data-bs-theme=dark]) .datepicker table tr td.focused:not(.active),
html:not([data-bs-theme=dark]) .datepicker table tr td span.focused:not(.active) {
    background: rgba(15, 53, 133, .08) !important;
    box-shadow: inset 0 0 0 1px rgba(15, 53, 133, .45) !important;
    color: #0f3585 !important;
    font-weight: 600;
}

html:not([data-bs-theme=dark]) .datepicker table tr td.range {
    background: rgba(15, 53, 133, .12) !important;
    color: #0f3585 !important;
}

html:not([data-bs-theme=dark]) .datepicker table tr td.active,
html:not([data-bs-theme=dark]) .datepicker table tr td.active:hover,
html:not([data-bs-theme=dark]) .datepicker table tr td span.active,
html:not([data-bs-theme=dark]) .datepicker table tr td span.active:hover {
    background-color: #0f3585 !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, #0f3585 78%, #fff 22%) 0, #0f3585 55%, color-mix(in srgb, #0f3585 86%, #000 14%) 100%) !important;
    color: #fff !important;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 0 #071c4a, 0 3px 5px -1px rgba(15, 26, 42, .18) !important;
}

html:not([data-bs-theme=dark]) .datepicker tfoot tr th.today,
html:not([data-bs-theme=dark]) .datepicker tfoot tr th.clear {
    background-color: #eef2f8 !important;
    background-image: linear-gradient(180deg, #ffffff 0, #eef2f8 60%, #dfe7f2 100%) !important;
    color: #0f2756 !important;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 0 #c2cde0, 0 2px 4px -1px rgba(15, 26, 42, .10) !important;
}

html:not([data-bs-theme=dark]) .datepicker tfoot tr th.today:hover,
html:not([data-bs-theme=dark]) .datepicker tfoot tr th.clear:hover {
    filter: brightness(0.97);
}

/* ---- Global 3D Badges (Light & Dark Mode): matches 3D raised button gradient & bottom edge ---- */
html:not([data-bs-theme=dark]) .badge.bg-primary,
html:not([data-bs-theme=dark]) .badge.text-bg-primary,
html:not([data-bs-theme=dark]) .badge.bg-primary-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-primary,
html:not([data-bs-theme=dark]) .badge[class*="bg-primary-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-primary"] {
    --gsb-b: #0f3585;
}

html:not([data-bs-theme=dark]) .badge.bg-secondary,
html:not([data-bs-theme=dark]) .badge.text-bg-secondary,
html:not([data-bs-theme=dark]) .badge.bg-secondary-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-secondary,
html:not([data-bs-theme=dark]) .badge[class*="bg-secondary-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-secondary"],
html:not([data-bs-theme=dark]) .badge:not([class*="bg-"]) {
    --gsb-b: #55698f;
}

html:not([data-bs-theme=dark]) .badge.bg-info,
html:not([data-bs-theme=dark]) .badge.text-bg-info,
html:not([data-bs-theme=dark]) .badge.bg-info-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-info,
html:not([data-bs-theme=dark]) .badge[class*="bg-info-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-info"] {
    --gsb-b: #2f6a9a;
}

html:not([data-bs-theme=dark]) .badge.bg-success,
html:not([data-bs-theme=dark]) .badge.text-bg-success,
html:not([data-bs-theme=dark]) .badge.bg-success-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-success,
html:not([data-bs-theme=dark]) .badge[class*="bg-success-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-success"] {
    --gsb-b: #1b8a50;
}

html:not([data-bs-theme=dark]) .badge.bg-danger,
html:not([data-bs-theme=dark]) .badge.text-bg-danger,
html:not([data-bs-theme=dark]) .badge.bg-danger-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-danger,
html:not([data-bs-theme=dark]) .badge[class*="bg-danger-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-danger"] {
    --gsb-b: #c0392b;
}

html:not([data-bs-theme=dark]) .badge.bg-dark,
html:not([data-bs-theme=dark]) .badge.text-bg-dark {
    --gsb-b: #263248;
}

html[data-bs-theme=dark] .badge.bg-primary,
html[data-bs-theme=dark] .badge.text-bg-primary,
html[data-bs-theme=dark] .badge.bg-primary-subtle,
html[data-bs-theme=dark] .badge.bg-light-primary,
html[data-bs-theme=dark] .badge[class*="bg-primary-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-primary"] {
    --gsb-b: #167f8a;
}

html[data-bs-theme=dark] .badge.bg-secondary,
html[data-bs-theme=dark] .badge.text-bg-secondary,
html[data-bs-theme=dark] .badge.bg-secondary-subtle,
html[data-bs-theme=dark] .badge.bg-light-secondary,
html[data-bs-theme=dark] .badge[class*="bg-secondary-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-secondary"],
html[data-bs-theme=dark] .badge:not([class*="bg-"]) {
    --gsb-b: #5c6f94;
}

html[data-bs-theme=dark] .badge.bg-info,
html[data-bs-theme=dark] .badge.text-bg-info,
html[data-bs-theme=dark] .badge.bg-info-subtle,
html[data-bs-theme=dark] .badge.bg-light-info,
html[data-bs-theme=dark] .badge[class*="bg-info-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-info"] {
    --gsb-b: #2874a6;
}

html[data-bs-theme=dark] .badge.bg-success,
html[data-bs-theme=dark] .badge.text-bg-success,
html[data-bs-theme=dark] .badge.bg-success-subtle,
html[data-bs-theme=dark] .badge.bg-light-success,
html[data-bs-theme=dark] .badge[class*="bg-success-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-success"] {
    --gsb-b: #218f58;
}

html[data-bs-theme=dark] .badge.bg-danger,
html[data-bs-theme=dark] .badge.text-bg-danger,
html[data-bs-theme=dark] .badge.bg-danger-subtle,
html[data-bs-theme=dark] .badge.bg-light-danger,
html[data-bs-theme=dark] .badge[class*="bg-danger-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-danger"] {
    --gsb-b: #c74235;
}

html[data-bs-theme=dark] .badge.bg-warning,
html[data-bs-theme=dark] .badge.text-bg-warning,
html[data-bs-theme=dark] .badge.bg-warning-subtle,
html[data-bs-theme=dark] .badge.bg-light-warning,
html[data-bs-theme=dark] .badge[class*="bg-warning-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-warning"] {
    --gsb-b: #c98a12;
}

html[data-bs-theme=dark] .badge.bg-dark,
html[data-bs-theme=dark] .badge.text-bg-dark {
    --gsb-b: #33415c;
}

/* Shared 3D raised fill for colored & default badges */
:root .badge:not(.bg-light):not(.bg-white):not(.text-bg-light):not(.bg-warning):not(.text-bg-warning):not([class*="bg-warning-subtle"]):not([class*="bg-light-warning"]) {
    color: #fff !important;
    background-color: var(--gsb-b, #55698f) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-b, #55698f) 78%, #fff 22%) 0, var(--gsb-b, #55698f) 55%, color-mix(in srgb, var(--gsb-b, #55698f) 86%, #000 14%) 100%) !important;
    border: 0 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-b, #55698f) 70%, #000 30%) 85%, transparent), 0 3px 5px -1px rgba(15, 26, 42, .16) !important;
    vertical-align: middle;
}

:root .badge:not(.bg-light):not(.bg-white):not(.text-bg-light):not(.bg-warning):not(.text-bg-warning):not([class*="bg-warning-subtle"]):not([class*="bg-light-warning"]) * {
    color: #fff !important;
}

/* Warning badges: 3D gold in light mode (dark amber text), 3D amber in dark mode (white text) */
html:not([data-bs-theme=dark]) .badge.bg-warning,
html:not([data-bs-theme=dark]) .badge.text-bg-warning,
html:not([data-bs-theme=dark]) .badge.bg-warning-subtle,
html:not([data-bs-theme=dark]) .badge.bg-light-warning,
html:not([data-bs-theme=dark]) .badge[class*="bg-warning-subtle"],
html:not([data-bs-theme=dark]) .badge[class*="bg-light-warning"] {
    color: #2b1f00 !important;
    background-color: #f0b400 !important;
    background-image: linear-gradient(180deg, #ffd24d 0, #f0b400 55%, #d69e00 100%) !important;
    border: 0 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 0 #b88600, 0 3px 5px -1px rgba(15, 26, 42, .14) !important;
    vertical-align: middle;
}

html:not([data-bs-theme=dark]) .badge.bg-warning *,
html:not([data-bs-theme=dark]) .badge.text-bg-warning *,
html:not([data-bs-theme=dark]) .badge.bg-warning-subtle *,
html:not([data-bs-theme=dark]) .badge.bg-light-warning *,
html:not([data-bs-theme=dark]) .badge[class*="bg-warning-subtle"] *,
html:not([data-bs-theme=dark]) .badge[class*="bg-light-warning"] * {
    color: #2b1f00 !important;
}

html[data-bs-theme=dark] .badge.bg-warning,
html[data-bs-theme=dark] .badge.text-bg-warning,
html[data-bs-theme=dark] .badge.bg-warning-subtle,
html[data-bs-theme=dark] .badge.bg-light-warning,
html[data-bs-theme=dark] .badge[class*="bg-warning-subtle"],
html[data-bs-theme=dark] .badge[class*="bg-light-warning"] {
    color: #fff !important;
    background-color: var(--gsb-b) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-b) 78%, #fff 22%) 0, var(--gsb-b) 55%, color-mix(in srgb, var(--gsb-b) 86%, #000 14%) 100%) !important;
    border: 0 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 0 color-mix(in srgb, color-mix(in srgb, var(--gsb-b) 70%, #000 30%) 85%, transparent), 0 3px 5px -1px rgba(0, 0, 0, .22) !important;
    vertical-align: middle;
}

html[data-bs-theme=dark] .badge.bg-warning *,
html[data-bs-theme=dark] .badge.text-bg-warning *,
html[data-bs-theme=dark] .badge.bg-warning-subtle *,
html[data-bs-theme=dark] .badge.bg-light-warning *,
html[data-bs-theme=dark] .badge[class*="bg-warning-subtle"] *,
html[data-bs-theme=dark] .badge[class*="bg-light-warning"] * {
    color: #fff !important;
}

/* Light/white badges: crisp 3D raised pill */
html:not([data-bs-theme=dark]) .badge.bg-light,
html:not([data-bs-theme=dark]) .badge.bg-white,
html:not([data-bs-theme=dark]) .badge.text-bg-light {
    background-color: #eef2f8 !important;
    background-image: linear-gradient(180deg, #ffffff 0, #eef2f8 60%, #dfe7f2 100%) !important;
    border: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 0 #c2cde0, 0 3px 5px -1px rgba(15, 26, 42, .12) !important;
    vertical-align: middle;
}

html[data-bs-theme=dark] .badge.bg-light,
html[data-bs-theme=dark] .badge.bg-white,
html[data-bs-theme=dark] .badge.text-bg-light {
    background-color: #2b3a4f !important;
    background-image: linear-gradient(180deg, #384a63 0, #2b3a4f 60%, #202c3d 100%) !important;
    color: #e6eef8 !important;
    border: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 0 #141c28, 0 3px 5px -1px rgba(0, 0, 0, .28) !important;
    vertical-align: middle;
}

/* Sidebar 3D badges: prevent bottom lip/shadow clipping inside sidebar links */
#sidebarnav .sidebar-link .badge,
.sidebar-nav .badge {
    margin-top: 1px;
    margin-bottom: 4px;
    transform: translateY(-1px);
}

/* Role card count pills (.um-role-cnt) */
html:not([data-bs-theme=dark]) .um-role-cnt {
    --gsb-b: #0f3585;
    color: #fff !important;
    background-color: var(--gsb-b) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-b) 78%, #fff 22%) 0, var(--gsb-b) 55%, color-mix(in srgb, var(--gsb-b) 86%, #000 14%) 100%) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 0 #071c4a, 0 3px 5px -1px rgba(15, 26, 42, .16) !important;
}

html[data-bs-theme=dark] .um-role-cnt {
    --gsb-b: #167f8a;
    color: #fff !important;
    background-color: var(--gsb-b) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-b) 78%, #fff 22%) 0, var(--gsb-b) 55%, color-mix(in srgb, var(--gsb-b) 86%, #000 14%) 100%) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 0 #0b484f, 0 3px 5px -1px rgba(0, 0, 0, .25) !important;
}

/* ---- 3D Dark & Light Buttons (Light & Dark Mode) ---- */
html:not([data-bs-theme=dark]) .btn-dark,
html:not([data-bs-theme=dark]) .btn-outline-dark:not(.btn-status),
html:not([data-bs-theme=dark]) .btn-status.btn-outline-dark.active {
    --gsb-n: #263248;
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 86%, #000 14%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 3px 0 #121926, 0 4px 6px -1px rgba(15, 26, 42, .22) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html[data-bs-theme=dark] .btn-dark,
html[data-bs-theme=dark] .btn-outline-dark:not(.btn-status),
html[data-bs-theme=dark] .btn-status.btn-outline-dark.active {
    --gsb-n: #33415c;
    color: #fff !important;
    background-color: var(--gsb-n) !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--gsb-n) 78%, #fff 22%) 0, var(--gsb-n) 55%, color-mix(in srgb, var(--gsb-n) 88%, #000 12%) 100%) !important;
    border: 0 !important;
    border-radius: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 0 #1a2334, 0 4px 6px -1px rgba(0, 0, 0, .28) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

.btn-dark:hover:not(:disabled):not(.disabled),
.btn-outline-dark:not(.btn-status):hover:not(:disabled):not(.disabled) {
    filter: brightness(1.08);
}

.btn-dark:active:not(:disabled):not(.disabled),
.btn-outline-dark:not(.btn-status):active:not(:disabled):not(.disabled),
.btn-dark.active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 0 #121926, 0 1px 2px rgba(15, 26, 42, .16) !important;
    transform: translateY(1px);
}

.btn-dark:disabled,
.btn-outline-dark:disabled {
    box-shadow: none !important;
    filter: grayscale(.35);
    opacity: .6;
    transform: none;
}

html:not([data-bs-theme=dark]) .btn-light {
    color: #1e293b !important;
    background-color: #eef2f8 !important;
    background-image: linear-gradient(180deg, #ffffff 0, #eef2f8 60%, #dfe7f2 100%) !important;
    border: 1px solid #d0dbe8 !important;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 3px 0 #c2cde0, 0 4px 6px -1px rgba(15, 26, 42, .10) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html:not([data-bs-theme=dark]) .btn-light:hover:not(:disabled):not(.disabled) {
    filter: brightness(0.98);
}

html:not([data-bs-theme=dark]) .btn-light:active:not(:disabled):not(.disabled),
html:not([data-bs-theme=dark]) .btn-light.active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 #c2cde0, 0 1px 2px rgba(15, 26, 42, .10) !important;
    transform: translateY(1px);
}

html[data-bs-theme=dark] .btn-light {
    color: #e6eef8 !important;
    background-color: #2b3a4f !important;
    background-image: linear-gradient(180deg, #384a63 0, #2b3a4f 60%, #202c3d 100%) !important;
    border: 1px solid #3c4e68 !important;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 #141c28, 0 4px 6px -1px rgba(0, 0, 0, .25) !important;
    transform: translateY(-1px);
    transition: box-shadow 80ms, transform 80ms, filter .12s;
}

html[data-bs-theme=dark] .btn-light:hover:not(:disabled):not(.disabled) {
    filter: brightness(1.08);
}

html[data-bs-theme=dark] .btn-light:active:not(:disabled):not(.disabled),
html[data-bs-theme=dark] .btn-light.active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 #141c28, 0 1px 2px rgba(0, 0, 0, .2) !important;
    transform: translateY(1px);
}

/* ---- Button Groups with 3D buttons: clean spacing & full rounded corners ---- */
.btn-group {
    gap: 4px;
}

.btn-group > .btn,
.btn-group > .btn-group > .btn {
    border-radius: 8px !important;
    margin-left: 0 !important;
}

/* ---- Select2 (Light & Dark Mode): clean height, vertical centering, soft focus ring, 3D highlight ---- */
.select2-container--default .select2-selection--single {
    min-height: 38px !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    transition: border-color .15s, box-shadow .15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-inline-start: 12px !important;
    padding-inline-end: 32px !important;
    width: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-search--dropdown {
    padding: 6px 8px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    padding: 6px 10px !important;
    outline: none !important;
}

.select2-container--default .select2-results__option {
    border-radius: 6px;
    margin: 2px 6px;
    padding: 7px 10px;
}

.select2-dropdown--below {
    margin-top: 4px !important;
}

.select2-dropdown--above {
    margin-top: -4px !important;
}

html:not([data-bs-theme=dark]) .select2-container--default .select2-selection--single,
html:not([data-bs-theme=dark]) .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important;
    border: 1px solid #d3dbe8 !important;
    color: #1e293b !important;
}

html:not([data-bs-theme=dark]) .select2-container--default.select2-container--open .select2-selection--single,
html:not([data-bs-theme=dark]) .select2-container--default.select2-container--focus .select2-selection--single,
html:not([data-bs-theme=dark]) .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #0f3585 !important;
    box-shadow: 0 0 0 2px rgba(15, 53, 133, .10) !important;
}

html:not([data-bs-theme=dark]) .select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 53, 133, .18) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px -6px rgba(15, 53, 133, .18) !important;
    overflow: hidden;
    padding-top: 4px;
    padding-bottom: 4px;
}

html:not([data-bs-theme=dark]) .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #f8fafd !important;
    border: 1px solid #d3dbe8 !important;
    color: #1e293b !important;
}

html:not([data-bs-theme=dark]) .select2-container--default .select2-search--dropdown .select2-search__field:focus {
    background-color: #ffffff !important;
    border-color: #0f3585 !important;
    box-shadow: none !important;
}

html:not([data-bs-theme=dark]) .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0f3585 !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, #0f3585 78%, #fff 22%) 0, #0f3585 55%, color-mix(in srgb, #0f3585 86%, #000 14%) 100%) !important;
    color: #ffffff !important;
}

html[data-bs-theme=dark] .select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #2bb3c0 !important;
    box-shadow: 0 0 0 3px rgba(43, 179, 192, .22) !important;
}

/* ---- Global 3D Stat / Filter Cards (.md-stat, .sfs-stat, .acc-stat, .um-role-card) ---- */
html:not([data-bs-theme=dark]) .md-stat,
html:not([data-bs-theme=dark]) .sfs-stat,
html:not([data-bs-theme=dark]) .acc-stat,
html:not([data-bs-theme=dark]) .um-role-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%) !important;
    border: 1px solid #d5dfec !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 3px 0 #d0dced, 0 5px 12px -4px rgba(15, 53, 133, .12) !important;
    transform: translateY(-1px);
    transition: transform 80ms, box-shadow 80ms, border-color .15s, background .15s;
}

html:not([data-bs-theme=dark]) .md-stat:hover,
html:not([data-bs-theme=dark]) .sfs-stat:hover,
html:not([data-bs-theme=dark]) .acc-stat:hover,
html:not([data-bs-theme=dark]) .um-role-card:hover {
    border-color: rgba(15, 53, 133, .5) !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef4fc 100%) !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 3px 0 #b8c8e0, 0 8px 16px -4px rgba(15, 53, 133, .18) !important;
    transform: translateY(-2px);
}

html:not([data-bs-theme=dark]) .md-stat.active,
html:not([data-bs-theme=dark]) .sfs-stat.active,
html:not([data-bs-theme=dark]) .acc-stat.active,
html:not([data-bs-theme=dark]) .um-role-card.active {
    background: linear-gradient(180deg, #edf3fc 0%, #e1ebfa 100%) !important;
    border-color: #0f3585 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 1px rgba(15, 53, 133, .22), 0 1px 0 #9aaad0, 0 2px 4px rgba(15, 53, 133, .12) !important;
    transform: translateY(1px);
}

html[data-bs-theme=dark] .md-stat,
html[data-bs-theme=dark] .sfs-stat,
html[data-bs-theme=dark] .acc-stat,
html[data-bs-theme=dark] .um-role-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .03) 100%) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 rgba(0, 0, 0, .35), 0 6px 12px -4px rgba(0, 0, 0, .30) !important;
    transform: translateY(-1px);
    transition: transform 80ms, box-shadow 80ms, border-color .15s, background .15s;
}

html[data-bs-theme=dark] .md-stat:hover,
html[data-bs-theme=dark] .sfs-stat:hover,
html[data-bs-theme=dark] .acc-stat:hover,
html[data-bs-theme=dark] .um-role-card:hover {
    border-color: #2bb3c0 !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .05) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 0 rgba(0, 0, 0, .40), 0 8px 16px -4px rgba(0, 0, 0, .38) !important;
    transform: translateY(-2px);
}

html[data-bs-theme=dark] .md-stat.active,
html[data-bs-theme=dark] .sfs-stat.active,
html[data-bs-theme=dark] .acc-stat.active,
html[data-bs-theme=dark] .um-role-card.active {
    background: linear-gradient(180deg, rgba(43, 179, 192, .22) 0%, rgba(43, 179, 192, .10) 100%) !important;
    border-color: #2bb3c0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 0 rgba(10, 50, 56, .8), 0 2px 6px rgba(0, 0, 0, .28) !important;
    transform: translateY(1px);
}

/* ---- Sidebar smooth hover & click transition ---- */
#sidebarnav .sidebar-item .sidebar-link::before,
#sidebarnav .sidebar-item .primary-hover-bg::before {
    transition: width .22s cubic-bezier(.22, 1, .36, 1), background-color .18s ease, opacity .18s ease !important;
}

@media (prefers-reduced-motion: reduce) {
    #sidebarnav .sidebar-item .sidebar-link::before,
    #sidebarnav .sidebar-item .primary-hover-bg::before {
        transition: none !important;
    }
}







