/* Vetsis Global Dark Mode
	 Reference: "Gelişmiş Raporlar" page dark balance.
	 Scope: colors/contrast/readability only (no layout changes).
*/

:root[data-bs-theme="dark"] {
	color-scheme: dark;

	/* Balanced deep anthracite/navy (NOT black) */
	--bs-body-bg: #1E2A36;
	--bs-body-bg-rgb: 30, 42, 54;

	/* Cards/panels: 1 tone lighter */
	--bs-body-tertiary-bg: #263544;
	--bs-secondary-bg: #263544;

	/* Elevated (dropdown/modal) */
	--bs-tertiary-bg: #2C3D4F;

	/* Sneat core uses paper surface as the base for dropdown/modal/toast/popover.
	   In dark mode it must not remain white. */
	--bs-paper-bg: #2C3D4F;
	--bs-paper-bg-rgb: 44, 61, 79;
	--bs-heading-color: rgba(var(--bs-body-color-rgb), 0.96);

	/* Sidebar: slightly darker than content, still not black */
	--bs-body-secondary-bg: #18222C;

	/* Typography (no pure white) */
	--bs-body-color: #D7DEE6;
	--bs-body-color-rgb: 215, 222, 230;
	--bs-secondary-color: #A8B3BF;
	--bs-secondary-color-rgb: 168, 179, 191;

	/* Borders/dividers (soft) */
	/* Keep borders visible enough to define card/box edges */
	--bs-border-color: rgba(255, 255, 255, 0.20);
	--bs-border-color-translucent: rgba(255, 255, 255, 0.16);

	/* Cards */
	--bs-card-bg: var(--bs-body-tertiary-bg);
	--bs-card-border-color: var(--bs-border-color);
	--bs-card-spacer-y: 1.05rem;
	--bs-card-spacer-x: 1.05rem;

	/* Status colors (muted, used as accents only) */
	--bs-success: #81C784;
	--bs-success-rgb: 129, 199, 132;
	--bs-info: #64B5F6;
	--bs-info-rgb: 100, 181, 246;
	--bs-warning: #E6D470;
	--bs-warning-rgb: 230, 212, 112;
	--bs-danger: #E57373;
	--bs-danger-rgb: 229, 115, 115;

	/* Links */
	--bs-link-color: rgba(var(--bs-info-rgb), 0.95);
	--bs-link-hover-color: rgba(var(--bs-info-rgb), 1);

	/* Forms: slightly lighter than card */
	--bs-form-control-bg: #2A3B4B;
	--bs-form-control-color: var(--bs-body-color);
	/* Inputs are key “boxes”; keep borders visible */
	--bs-form-control-border-color: rgba(255, 255, 255, 0.20);
	--bs-form-control-focus-border-color: #696cff;
	--bs-form-control-focus-box-shadow: 0 0 0 0.18rem rgba(105, 108, 255, 0.22);

	--bs-form-select-bg: #2A3B4B;
	--bs-form-select-color: var(--bs-body-color);
	--bs-form-select-border-color: rgba(255, 255, 255, 0.20);
	--bs-form-select-focus-border-color: #696cff;

	/* Dropdowns / list groups */
	--bs-dropdown-bg: var(--bs-tertiary-bg);
	--bs-dropdown-border-color: rgba(255, 255, 255, 0.20);
	--bs-dropdown-link-color: var(--bs-body-color);
	--bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.05);
	--bs-dropdown-link-hover-color: var(--bs-body-color);

	--bs-list-group-bg: var(--bs-tertiary-bg);
	--bs-list-group-color: var(--bs-body-color);
	--bs-list-group-border-color: rgba(255, 255, 255, 0.16);
	--bs-list-group-action-hover-bg: rgba(255, 255, 255, 0.05);
	--bs-list-group-action-active-bg: rgba(105, 108, 255, 0.12);

	/* Soft shadows (subtle separation, not dramatic) */
	--bs-box-shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.25);
	--bs-box-shadow: 0 12px 26px rgba(0, 0, 0, 0.30);
	--bs-box-shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.38);

	/* Modals/popups */
	--bs-modal-bg: var(--bs-tertiary-bg);
	--bs-modal-color: var(--bs-body-color);
	--bs-modal-border-color: var(--bs-border-color);
	--bs-modal-header-border-color: var(--bs-border-color);
	--bs-modal-footer-border-color: var(--bs-border-color);

	/* Popovers/tooltips */
	--bs-popover-bg: var(--bs-tertiary-bg);
	--bs-popover-border-color: var(--bs-border-color);
	--bs-popover-header-bg: rgba(255, 255, 255, 0.03);
	--bs-popover-header-color: rgba(var(--bs-body-color-rgb), 0.96);
	--bs-popover-body-color: var(--bs-body-color);
	--bs-tooltip-bg: rgba(0, 0, 0, 0.85);
}

/* Base surfaces */
html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .content-wrapper,
html[data-bs-theme="dark"] .layout-page {
	background-color: var(--bs-body-bg);
	color: var(--bs-body-color);
}

/* Headings slightly brighter (still not white) */
html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6 {
	color: rgba(var(--bs-body-color-rgb), 0.96);
}

html[data-bs-theme="dark"] .text-muted {
	color: rgba(var(--bs-secondary-color-rgb), 0.88) !important;
}

/* Cards/panels */
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .table-responsive {
	background-color: var(--bs-body-tertiary-bg);
	border: 1px solid var(--bs-border-color);
	box-shadow: var(--bs-box-shadow-sm);
}

html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer {
	background-color: transparent;
}

html[data-bs-theme="dark"] .card-header {
	border-bottom-color: var(--bs-border-color);
}

html[data-bs-theme="dark"] .card-footer {
	border-top-color: var(--bs-border-color);
}

/* Sidebar */
html[data-bs-theme="dark"] .bg-menu-theme,
html[data-bs-theme="dark"] #layout-menu.layout-menu {
	background-color: var(--bs-body-secondary-bg) !important;
}

html[data-bs-theme="dark"] #layout-menu.layout-menu {
	border-right: 1px solid var(--bs-border-color);
}

html[data-bs-theme="dark"] .layout-menu .menu-header-text {
	color: rgba(var(--bs-secondary-color-rgb), 0.9) !important;
}

html[data-bs-theme="dark"] .layout-menu .menu-link {
	color: rgba(var(--bs-secondary-color-rgb), 0.92) !important;
}

html[data-bs-theme="dark"] .layout-menu .menu-icon {
	color: rgba(var(--bs-body-color-rgb), 0.80) !important;
}

html[data-bs-theme="dark"] .layout-menu .menu-item.active > .menu-link,
html[data-bs-theme="dark"] .layout-menu .menu-item.open > .menu-link {
	color: var(--bs-body-color) !important;
	background-color: rgba(255, 255, 255, 0.04) !important;
}

html[data-bs-theme="dark"] .layout-menu .menu-item.active > .menu-link {
	position: relative;
}

html[data-bs-theme="dark"] .layout-menu .menu-item.active > .menu-link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 3px;
	background: rgba(105, 108, 255, 0.75);
	border-radius: 2px;
}

html[data-bs-theme="dark"] .menu-inner-shadow {
	display: none;
}

/* Navbar: connected, not a detached black strip */
html[data-bs-theme="dark"] #layout-navbar.layout-navbar {
	background-color: var(--bs-body-tertiary-bg) !important;
	border-bottom: 1px solid var(--bs-border-color);
}

/* Tables (no zebra) */
html[data-bs-theme="dark"] .table {
	--bs-table-color: var(--bs-body-color);
	--bs-table-border-color: var(--bs-border-color);
	--bs-table-bg: transparent;
}

html[data-bs-theme="dark"] .table thead th {
	background-color: var(--bs-secondary-bg);
	color: rgba(var(--bs-body-color-rgb), 0.94);
	border-bottom-color: var(--bs-border-color);
}

html[data-bs-theme="dark"] .table-hover tbody tr:hover {
	background-color: rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .table-hover tbody tr:hover td,
html[data-bs-theme="dark"] .table-hover tbody tr:hover th {
	background-color: rgba(255, 255, 255, 0.04) !important;
}

html[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
	--bs-table-accent-bg: transparent;
}

/* Common light-only utility classes remap */
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-lighter {
	background-color: var(--bs-body-tertiary-bg) !important;
}

html[data-bs-theme="dark"] .bg-body,
html[data-bs-theme="dark"] .bg-body-tertiary,
html[data-bs-theme="dark"] .bg-secondary {
	background-color: var(--bs-body-tertiary-bg) !important;
}

html[data-bs-theme="dark"] .text-dark {
	color: var(--bs-body-color) !important;
}

/* Bootstrap helper used frequently in templates */
html[data-bs-theme="dark"] thead.table-light th,
html[data-bs-theme="dark"] .table thead.table-light th {
	background-color: var(--bs-secondary-bg) !important;
	color: rgba(var(--bs-body-color-rgb), 0.94) !important;
	border-bottom-color: var(--bs-border-color) !important;
}

html[data-bs-theme="dark"] .table-light {
	--bs-table-bg: transparent;
	--bs-table-color: var(--bs-body-color);
	--bs-table-border-color: var(--bs-border-color);
}

html[data-bs-theme="dark"] .table-active {
	--bs-table-bg-state: rgba(255, 255, 255, 0.06);
}

/* Input group addons */
html[data-bs-theme="dark"] .input-group-text {
	background-color: var(--bs-form-control-bg);
	border-color: var(--bs-form-control-border-color);
	color: rgba(var(--bs-secondary-color-rgb), 0.95);
}

/* Forms: Sneat uses color-mix(..., --bs-paper-bg) for borders; enforce visible outlines */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] textarea.form-control {
	background-color: var(--bs-form-control-bg) !important;
	color: var(--bs-body-color) !important;
	border-color: var(--bs-form-control-border-color) !important;
}

html[data-bs-theme="dark"] .form-control::placeholder,
html[data-bs-theme="dark"] .form-select::placeholder {
	color: rgba(var(--bs-secondary-color-rgb), 0.75) !important;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
	background-color: var(--bs-form-control-bg) !important;
	border-color: var(--bs-form-control-focus-border-color) !important;
	box-shadow: var(--bs-form-control-focus-box-shadow) !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, 0.03) !important;
	color: rgba(var(--bs-secondary-color-rgb), 0.78) !important;
	border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-bs-theme="dark"] .form-check-input {
	background-color: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.22);
}

html[data-bs-theme="dark"] .form-check-input:checked {
	background-color: rgba(105, 108, 255, 0.45);
	border-color: rgba(105, 108, 255, 0.55);
}

/* Generic bordered boxes/dividers */
html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-end {
	border-color: var(--bs-border-color) !important;
}

/* Buttons: keep semantics but reduce harsh neon fills */
html[data-bs-theme="dark"] .btn.btn-success:not(.btn-outline-success):not(.btn-label-success) {
	background-color: rgba(var(--bs-success-rgb), 0.85);
	border-color: rgba(var(--bs-success-rgb), 0.65);
	color: var(--bs-body-color);
}

html[data-bs-theme="dark"] .btn.btn-danger:not(.btn-outline-danger):not(.btn-label-danger) {
	background-color: rgba(var(--bs-danger-rgb), 0.85);
	border-color: rgba(var(--bs-danger-rgb), 0.65);
	color: var(--bs-body-color);
}

/* Avatars/icons on label backgrounds */
html[data-bs-theme="dark"] .avatar-initial i {
	color: var(--bs-body-color);
}

/* Badges/labels: keep backgrounds subtle (no colored surfaces) */
html[data-bs-theme="dark"] .bg-label-primary { background-color: rgba(var(--bs-primary-rgb), 0.16) !important; }
html[data-bs-theme="dark"] .bg-label-success { background-color: rgba(var(--bs-success-rgb), 0.14) !important; }
html[data-bs-theme="dark"] .bg-label-info { background-color: rgba(var(--bs-info-rgb), 0.14) !important; }
html[data-bs-theme="dark"] .bg-label-warning { background-color: rgba(var(--bs-warning-rgb), 0.14) !important; }
html[data-bs-theme="dark"] .bg-label-danger { background-color: rgba(var(--bs-danger-rgb), 0.14) !important; }
html[data-bs-theme="dark"] .bg-label-secondary { background-color: rgba(255, 255, 255, 0.10) !important; }

html[data-bs-theme="dark"] .badge.text-dark,
html[data-bs-theme="dark"] .bg-label-warning.text-dark,
html[data-bs-theme="dark"] .bg-label-info.text-dark {
	color: var(--bs-body-color) !important;
}

/* Solid badges in dark mode: avoid loud neon blocks, keep readable */
html[data-bs-theme="dark"] .badge.bg-success { background-color: rgba(var(--bs-success-rgb), 0.16) !important; color: rgba(var(--bs-success-rgb), 0.95) !important; }
html[data-bs-theme="dark"] .badge.bg-danger { background-color: rgba(var(--bs-danger-rgb), 0.16) !important; color: rgba(var(--bs-danger-rgb), 0.95) !important; }
html[data-bs-theme="dark"] .badge.bg-warning { background-color: rgba(var(--bs-warning-rgb), 0.16) !important; color: rgba(var(--bs-warning-rgb), 0.96) !important; }
html[data-bs-theme="dark"] .badge.bg-info { background-color: rgba(var(--bs-info-rgb), 0.16) !important; color: rgba(var(--bs-info-rgb), 0.95) !important; }
html[data-bs-theme="dark"] .badge.bg-primary { background-color: rgba(var(--bs-primary-rgb), 0.16) !important; color: rgba(var(--bs-primary-rgb), 0.95) !important; }
html[data-bs-theme="dark"] .badge.bg-secondary { background-color: rgba(255, 255, 255, 0.10) !important; color: rgba(var(--bs-body-color-rgb), 0.92) !important; }

/* Alerts: keep dark surface, use subtle tint */
html[data-bs-theme="dark"] .alert {
	border-color: var(--bs-border-color);
	color: var(--bs-body-color);
}

html[data-bs-theme="dark"] .alert-warning { background-color: rgba(var(--bs-warning-rgb), 0.10) !important; border-color: rgba(var(--bs-warning-rgb), 0.22) !important; }
html[data-bs-theme="dark"] .alert-danger { background-color: rgba(var(--bs-danger-rgb), 0.10) !important; border-color: rgba(var(--bs-danger-rgb), 0.22) !important; }
html[data-bs-theme="dark"] .alert-success { background-color: rgba(var(--bs-success-rgb), 0.10) !important; border-color: rgba(var(--bs-success-rgb), 0.22) !important; }
html[data-bs-theme="dark"] .alert-info { background-color: rgba(var(--bs-info-rgb), 0.10) !important; border-color: rgba(var(--bs-info-rgb), 0.22) !important; }

/* Tables: debt risk rows (table-success/warning/danger) should not paint bright surfaces */
html[data-bs-theme="dark"] .table > tbody > tr.table-success > * { --bs-table-bg: rgba(var(--bs-success-rgb), 0.09); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
html[data-bs-theme="dark"] .table > tbody > tr.table-warning > * { --bs-table-bg: rgba(var(--bs-warning-rgb), 0.09); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
html[data-bs-theme="dark"] .table > tbody > tr.table-danger > * { --bs-table-bg: rgba(var(--bs-danger-rgb), 0.09); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
html[data-bs-theme="dark"] .table > tbody > tr.table-info > * { --bs-table-bg: rgba(var(--bs-info-rgb), 0.08); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
html[data-bs-theme="dark"] .table > tbody > tr.table-primary > * { --bs-table-bg: rgba(var(--bs-primary-rgb), 0.08); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
html[data-bs-theme="dark"] .table > tbody > tr.table-secondary > * { --bs-table-bg: rgba(255, 255, 255, 0.06); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }

html[data-bs-theme="dark"] .table > tbody > tr.table-success td:first-child { box-shadow: inset 3px 0 0 rgba(var(--bs-success-rgb), 0.60); }
html[data-bs-theme="dark"] .table > tbody > tr.table-warning td:first-child { box-shadow: inset 3px 0 0 rgba(var(--bs-warning-rgb), 0.65); }
html[data-bs-theme="dark"] .table > tbody > tr.table-danger td:first-child { box-shadow: inset 3px 0 0 rgba(var(--bs-danger-rgb), 0.65); }
html[data-bs-theme="dark"] .table > tbody > tr.table-info td:first-child { box-shadow: inset 3px 0 0 rgba(var(--bs-info-rgb), 0.60); }
html[data-bs-theme="dark"] .table > tbody > tr.table-primary td:first-child { box-shadow: inset 3px 0 0 rgba(var(--bs-primary-rgb), 0.60); }

/* Progress bars used for credit risk: visible but not neon */
html[data-bs-theme="dark"] .progress { background-color: rgba(255, 255, 255, 0.06); }
html[data-bs-theme="dark"] .progress-bar.bg-warning { background-color: rgba(var(--bs-warning-rgb), 0.55) !important; }
html[data-bs-theme="dark"] .progress-bar.bg-danger { background-color: rgba(var(--bs-danger-rgb), 0.60) !important; }
html[data-bs-theme="dark"] .progress-bar.bg-success { background-color: rgba(var(--bs-success-rgb), 0.55) !important; }

/* Sidebar scroll: remove any light rails/overlays */
html[data-bs-theme="dark"] .layout-menu .ps__rail-y,
html[data-bs-theme="dark"] .layout-menu .ps__rail-x {
	background-color: transparent !important;
}

html[data-bs-theme="dark"] .layout-menu .ps__thumb-y,
html[data-bs-theme="dark"] .layout-menu .ps__thumb-x {
	background-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-bs-theme="dark"] .menu-inner-shadow {
	background: transparent !important;
}

/* Code/pills (barcode etc.) */
html[data-bs-theme="dark"] code {
	color: rgba(var(--bs-secondary-color-rgb), 0.92);
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--bs-border-color);
	border-radius: 0.25rem;
	padding: 0.1rem 0.35rem;
}

/* Dropdown menu + list group visuals */
html[data-bs-theme="dark"] .dropdown-menu {
	background-color: var(--bs-dropdown-bg);
	border-color: var(--bs-dropdown-border-color);
	box-shadow: var(--bs-box-shadow);
}

/* Modals: never show light surfaces in dark mode */
html[data-bs-theme="dark"] .modal-content {
	background-color: var(--bs-modal-bg);
	color: var(--bs-modal-color);
	border: 1px solid var(--bs-modal-border-color);
	box-shadow: var(--bs-box-shadow);
}

html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-body,
html[data-bs-theme="dark"] .modal-footer {
	background-color: transparent;
}

html[data-bs-theme="dark"] .modal-header {
	border-bottom-color: var(--bs-modal-header-border-color);
}

html[data-bs-theme="dark"] .modal-footer {
	border-top-color: var(--bs-modal-footer-border-color);
}

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

html[data-bs-theme="dark"] .modal .btn-close:hover {
	opacity: 1;
}

/* Contextual modal headers should not become “light mode strips” */
html[data-bs-theme="dark"] .modal-header.bg-warning {
	background-color: rgba(var(--bs-warning-rgb), 0.14) !important;
	color: rgba(var(--bs-body-color-rgb), 0.96) !important;
}

html[data-bs-theme="dark"] .modal-header.bg-danger {
	background-color: rgba(var(--bs-danger-rgb), 0.12) !important;
	color: rgba(var(--bs-body-color-rgb), 0.96) !important;
}

html[data-bs-theme="dark"] .modal-header.bg-primary {
	background-color: rgba(var(--bs-primary-rgb), 0.12) !important;
	color: rgba(var(--bs-body-color-rgb), 0.96) !important;
}

/* Select2: searchable dropdowns (appointments/vaccines etc.) */
html[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
html[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
	background-color: var(--bs-form-control-bg) !important;
	border-color: var(--bs-form-control-border-color) !important;
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single,
html[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--multiple {
	border-color: var(--bs-form-control-focus-border-color) !important;
	box-shadow: var(--bs-form-control-focus-box-shadow) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: rgba(var(--bs-secondary-color-rgb), 0.85) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: rgba(var(--bs-secondary-color-rgb), 0.9) transparent transparent transparent !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
	background-color: rgba(255, 255, 255, 0.06) !important;
	border: 1px solid var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: rgba(var(--bs-secondary-color-rgb), 0.95) !important;
}

html[data-bs-theme="dark"] .select2-dropdown {
	background-color: var(--bs-dropdown-bg) !important;
	border-color: var(--bs-dropdown-border-color) !important;
	box-shadow: var(--bs-box-shadow);
}

html[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
	background-color: var(--bs-form-control-bg) !important;
	border-color: var(--bs-form-control-border-color) !important;
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option {
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: rgba(255, 255, 255, 0.06) !important;
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
	background-color: rgba(105, 108, 255, 0.14) !important;
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-disabled="true"] {
	color: rgba(var(--bs-secondary-color-rgb), 0.70) !important;
}

/* Flatpickr: date/time pickers */
html[data-bs-theme="dark"] .flatpickr-calendar {
	background: var(--bs-dropdown-bg) !important;
	border: 1px solid var(--bs-border-color) !important;
	box-shadow: var(--bs-box-shadow);
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .flatpickr-calendar.arrowTop:before,
html[data-bs-theme="dark"] .flatpickr-calendar.arrowTop:after,
html[data-bs-theme="dark"] .flatpickr-calendar.arrowBottom:before,
html[data-bs-theme="dark"] .flatpickr-calendar.arrowBottom:after {
	border-top-color: var(--bs-dropdown-bg) !important;
	border-bottom-color: var(--bs-dropdown-bg) !important;
}

html[data-bs-theme="dark"] .flatpickr-months,
html[data-bs-theme="dark"] .flatpickr-weekdays,
html[data-bs-theme="dark"] .flatpickr-time {
	background: transparent !important;
}

html[data-bs-theme="dark"] .flatpickr-current-month,
html[data-bs-theme="dark"] .flatpickr-weekday {
	color: rgba(var(--bs-secondary-color-rgb), 0.92) !important;
}

html[data-bs-theme="dark"] .flatpickr-day {
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay,
html[data-bs-theme="dark"] .flatpickr-day.disabled,
html[data-bs-theme="dark"] .flatpickr-day.notAllowed {
	color: rgba(var(--bs-secondary-color-rgb), 0.55) !important;
}

html[data-bs-theme="dark"] .flatpickr-monthDropdown-months,
html[data-bs-theme="dark"] .flatpickr-current-month input.cur-year {
	color: rgba(var(--bs-body-color-rgb), 0.96) !important;
}

html[data-bs-theme="dark"] .flatpickr-monthDropdown-months {
	background: transparent !important;
}

html[data-bs-theme="dark"] .flatpickr-prev-month,
html[data-bs-theme="dark"] .flatpickr-next-month {
	fill: rgba(var(--bs-secondary-color-rgb), 0.92) !important;
	color: rgba(var(--bs-secondary-color-rgb), 0.92) !important;
}

html[data-bs-theme="dark"] .flatpickr-prev-month:hover,
html[data-bs-theme="dark"] .flatpickr-next-month:hover {
	fill: rgba(var(--bs-body-color-rgb), 0.95) !important;
	color: rgba(var(--bs-body-color-rgb), 0.95) !important;
}

html[data-bs-theme="dark"] .flatpickr-day:hover,
html[data-bs-theme="dark"] .flatpickr-day:focus {
	background: rgba(255, 255, 255, 0.06) !important;
	border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-bs-theme="dark"] .flatpickr-day.today {
	border-color: rgba(var(--bs-info-rgb), 0.70) !important;
}

html[data-bs-theme="dark"] .flatpickr-day.selected,
html[data-bs-theme="dark"] .flatpickr-day.startRange,
html[data-bs-theme="dark"] .flatpickr-day.endRange,
html[data-bs-theme="dark"] .flatpickr-day.selected:hover,
html[data-bs-theme="dark"] .flatpickr-day.startRange:hover,
html[data-bs-theme="dark"] .flatpickr-day.endRange:hover {
	background: rgba(105, 108, 255, 0.30) !important;
	border-color: rgba(105, 108, 255, 0.30) !important;
	color: rgba(var(--bs-body-color-rgb), 0.98) !important;
}

html[data-bs-theme="dark"] .flatpickr-day.inRange {
	background: rgba(105, 108, 255, 0.14) !important;
	border-color: rgba(105, 108, 255, 0.10) !important;
}

html[data-bs-theme="dark"] .flatpickr-time input,
html[data-bs-theme="dark"] .flatpickr-time .numInputWrapper span.arrowUp,
html[data-bs-theme="dark"] .flatpickr-time .numInputWrapper span.arrowDown {
	color: var(--bs-body-color) !important;
}

html[data-bs-theme="dark"] .flatpickr-time input {
	background: transparent !important;
}

html[data-bs-theme="dark"] .flatpickr-time .numInputWrapper span {
	border-color: var(--bs-border-color) !important;
}

html[data-bs-theme="dark"] .list-group {
	--bs-list-group-bg: var(--bs-list-group-bg);
	--bs-list-group-color: var(--bs-list-group-color);
	--bs-list-group-border-color: var(--bs-list-group-border-color);
}

html[data-bs-theme="dark"] .list-group-item-action:hover,
html[data-bs-theme="dark"] .list-group-item-action:focus {
	background-color: rgba(255, 255, 255, 0.05) !important;
	color: var(--bs-body-color) !important;
}

/* ApexCharts (labels/tooltip/grid) */
html[data-bs-theme="dark"] .apexcharts-tooltip {
	background: var(--bs-dropdown-bg) !important;
	border: 1px solid var(--bs-border-color) !important;
	color: var(--bs-body-color) !important;
	box-shadow: var(--bs-box-shadow);
}

html[data-bs-theme="dark"] .apexcharts-tooltip-title {
	background: rgba(255, 255, 255, 0.03) !important;
	border-bottom: 1px solid var(--bs-border-color) !important;
	color: rgba(var(--bs-body-color-rgb), 0.95) !important;
}

html[data-bs-theme="dark"] .apexcharts-text,
html[data-bs-theme="dark"] .apexcharts-legend-text {
	fill: rgba(var(--bs-secondary-color-rgb), 0.9) !important;
	color: rgba(var(--bs-secondary-color-rgb), 0.9) !important;
}

html[data-bs-theme="dark"] .apexcharts-title-text,
html[data-bs-theme="dark"] .apexcharts-subtitle-text {
	fill: rgba(var(--bs-body-color-rgb), 0.95) !important;
}

html[data-bs-theme="dark"] .apexcharts-gridline {
	stroke: rgba(255, 255, 255, 0.07) !important;
}

