/* Dark Mode Enhancements */
html[data-bs-theme="dark"] {
    --bs-body-bg: #25293c;
    --bs-body-color: #ffffff;
    --bs-border-color: #434968;
}

html[data-bs-theme="dark"] body {
    background-color: #25293c !important;
    color: #ffffff !important;
}

/* Layout Elements */
html[data-bs-theme="dark"] .layout-wrapper,
html[data-bs-theme="dark"] .layout-container,
html[data-bs-theme="dark"] .layout-page,
html[data-bs-theme="dark"] .content-wrapper {
    background-color: #25293c !important;
    color: #ffffff !important;
}

/* Sidebar */
html[data-bs-theme="dark"] .sidebar,
html[data-bs-theme="dark"] .layout-menu,
html[data-bs-theme="dark"] .menu-inner {
    background-color: #1a1d2e !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .sidebar-menu li a,
html[data-bs-theme="dark"] .menu-inner li a {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .sidebar-menu li a:hover,
html[data-bs-theme="dark"] .menu-inner li a:hover {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .sidebar-menu li.active>a,
html[data-bs-theme="dark"] .menu-inner li.active>a {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Navbar */
html[data-bs-theme="dark"] .navbar,
html[data-bs-theme="dark"] .layout-navbar {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .navbar-brand,
html[data-bs-theme="dark"] .nav-link {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .nav-link:hover {
    color: #ffffff !important;
}

/* Footer */
html[data-bs-theme="dark"] .footer {
    background-color: #1a1d2e !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .footer a {
    color: #266BEE !important;
}

/* Cards */
html[data-bs-theme="dark"] .card {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .card-header {
    background-color: #25293c !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .card-body {
    color: #ffffff !important;
}

/* Tables */
html[data-bs-theme="dark"] .table {
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .table thead th {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .table tbody td {
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: #2f3349 !important;
}

/* Forms */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] textarea {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] textarea:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #266BEE !important;
    box-shadow: 0 0 0 0.2rem rgba(38, 107, 238, 0.25) !important;
}

html[data-bs-theme="dark"] .form-label {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .form-text {
    color: #b0b0b0 !important;
}

/* Dropdowns */
html[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
}

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

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .dropdown-item.active {
    background-color: #266BEE !important;
}

/* Select2 Dropdown */
html[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-dropdown {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
}

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

html[data-bs-theme="dark"] .select2-container--default .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted:not([aria-selected=true]),
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted:not([aria-selected=true]),
html[data-bs-theme="dark"] .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-results__option--highlighted {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Input Fields & Textareas */
html[data-bs-theme="dark"] input[type="text"],
html[data-bs-theme="dark"] input[type="email"],
html[data-bs-theme="dark"] input[type="password"],
html[data-bs-theme="dark"] input[type="number"],
html[data-bs-theme="dark"] input[type="date"],
html[data-bs-theme="dark"] input[type="time"],
html[data-bs-theme="dark"] input[type="search"],
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] .ckeditor_common_cls {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] input[type="text"]:focus,
html[data-bs-theme="dark"] input[type="email"]:focus,
html[data-bs-theme="dark"] input[type="password"]:focus,
html[data-bs-theme="dark"] input[type="number"]:focus,
html[data-bs-theme="dark"] input[type="date"]:focus,
html[data-bs-theme="dark"] input[type="time"]:focus,
html[data-bs-theme="dark"] input[type="search"]:focus,
html[data-bs-theme="dark"] textarea:focus,
html[data-bs-theme="dark"] .ckeditor_common_cls:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #266BEE !important;
    box-shadow: 0 0 0 0.2rem rgba(38, 107, 238, 0.25) !important;
}

html[data-bs-theme="dark"] input::placeholder,
html[data-bs-theme="dark"] textarea::placeholder {
    color: #b0b0b0 !important;
}

/* CKEditor */
html[data-bs-theme="dark"] .ck-editor__main>.ck-editor__editable {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck.ck-editor__editable {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-toolbar {
    background-color: #25293c !important;
    border-color: #434968 !important;
}

/* CKEditor Toolbar & Buttons */
html[data-bs-theme="dark"] .ck-toolbar__items,
html[data-bs-theme="dark"] .ck-toolbar__separator {
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .ck-button {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-button__label {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-button:hover:not(.ck-disabled) {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-button.ck-on {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-icon {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-dropdown__panel {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .ck-list__item {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-list__item:hover {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] .ck-labeled-field-view__input-wrapper input {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .ck-labeled-field-view__input-wrapper input:focus {
    border-color: #266BEE !important;
}

html[data-bs-theme="dark"] .ck-label {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .ck-labeled-field-view__status {
    color: #b0b0b0 !important;
}

/* List Items */
html[data-bs-theme="dark"] ul li,
html[data-bs-theme="dark"] #productList li {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] ul li:hover,
html[data-bs-theme="dark"] #productList li:hover {
    background-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] ul li.active,
html[data-bs-theme="dark"] #productList li.active {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Headings */
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: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-outline-primary {
    color: #266BEE !important;
    border-color: #266BEE !important;
}

html[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-outline-primary:focus,
html[data-bs-theme="dark"] .btn-outline-primary:active {
    background-color: #1e52c4 !important;
    border-color: #1e52c4 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1a1d2e !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .dropdown-menu.show {
    background-color: #1a1d2e !important;
}

html[data-bs-theme="dark"] .dropdown-item {
    color: #ffffff !important;
    background-color: #1a1d2e !important;
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .dropdown-item.active,
html[data-bs-theme="dark"] .dropdown-item:active {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .modal-content {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .modal-header {
    background-color: #25293c !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .modal-body {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .modal-footer {
    border-color: #434968 !important;
}

/* Buttons */
html[data-bs-theme="dark"] .btn-outline-primary {
    color: #266BEE !important;
    border-color: #266BEE !important;
}

html[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-primary {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #1e52c4 !important;
    border-color: #1e52c4 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-primary:focus,
html[data-bs-theme="dark"] .btn-primary:active {
    background-color: #1e52c4 !important;
    border-color: #1e52c4 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-secondary {
    background-color: #434968 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #5a5f7f !important;
    border-color: #5a5f7f !important;
}

/* Lists */
html[data-bs-theme="dark"] .list-group-item {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] .list-group-item.active {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
    color: #ffffff !important;
}

/* Badges */
/* html[data-bs-theme="dark"] .badge {
    background-color: #434968 !important;
    color: #ffffff !important;
} */

/* html[data-bs-theme="dark"] .badge-primary {
    background-color: #266BEE !important;
} */

/* Alerts */
html[data-bs-theme="dark"] .alert {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .alert-info {
    background-color: #1a3a52 !important;
    border-color: #00cfe8 !important;
    color: #00cfe8 !important;
}

html[data-bs-theme="dark"] .alert-success {
    background-color: #1a3a2a !important;
    border-color: #28c76f !important;
    color: #28c76f !important;
}

html[data-bs-theme="dark"] .alert-warning {
    background-color: #3a3a1a !important;
    border-color: #ff9f43 !important;
    color: #ff9f43 !important;
}

html[data-bs-theme="dark"] .alert-danger {
    background-color: #3a1a1a !important;
    border-color: #ea5455 !important;
    color: #ea5455 !important;
}

/* Pagination */
html[data-bs-theme="dark"] .pagination .page-link {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: #434968 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .pagination .page-link.active {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
}

/* Input Groups */
html[data-bs-theme="dark"] .input-group-text {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

/* Breadcrumbs */
html[data-bs-theme="dark"] .breadcrumb {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .breadcrumb-item {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .breadcrumb-item a {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .breadcrumb-item+.breadcrumb-item::before {
    color: #ffffff !important;
    --bs-breadcrumb-divider-color: #ffffff !important;
    filter: brightness(0) invert(1) !important;
}

/* Scrollbar */
html[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #25293c;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #434968;
    border-radius: 4px;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #5a5f7f;
}

/* Text Colors */
html[data-bs-theme="dark"] .text-muted {
    color: #b0b0b0 !important;
}

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

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

/* Borders */
html[data-bs-theme="dark"] .border {
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] hr {
    border-color: #434968 !important;
}

/* Menu Theme Background */
html[data-bs-theme="dark"] .bg-menu-theme {
    background-color: #1a1d2e !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item.open>.menu-link.menu-toggle,
html[data-bs-theme="dark"] .layout-menu-hover.layout-menu-collapsed .bg-menu-theme .menu-inner .menu-item.open>.menu-link.menu-toggle,
html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item.active>.menu-link.menu-toggle,
html[data-bs-theme="dark"] .layout-menu-hover.layout-menu-collapsed .bg-menu-theme .menu-inner .menu-item.active>.menu-link.menu-toggle {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item>.menu-link {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item>.menu-link:hover {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item.open>.menu-link,
html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-item.active>.menu-link {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Menu Submenu */
html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-sub {
    background-color: #25293c !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-sub .menu-item>.menu-link {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-sub .menu-item>.menu-link:hover {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-menu-theme .menu-inner .menu-sub .menu-item.active>.menu-link {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Light Background Classes */
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-light-subtle,
html[data-bs-theme="dark"] .bg-white {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-light-subtle h1,
html[data-bs-theme="dark"] .bg-light-subtle h2,
html[data-bs-theme="dark"] .bg-light-subtle h3,
html[data-bs-theme="dark"] .bg-light-subtle h4,
html[data-bs-theme="dark"] .bg-light-subtle h5,
html[data-bs-theme="dark"] .bg-light-subtle h6,
html[data-bs-theme="dark"] .bg-light h1,
html[data-bs-theme="dark"] .bg-light h2,
html[data-bs-theme="dark"] .bg-light h3,
html[data-bs-theme="dark"] .bg-light h4,
html[data-bs-theme="dark"] .bg-light h5,
html[data-bs-theme="dark"] .bg-light h6,
html[data-bs-theme="dark"] .bg-white h1,
html[data-bs-theme="dark"] .bg-white h2,
html[data-bs-theme="dark"] .bg-white h3,
html[data-bs-theme="dark"] .bg-white h4,
html[data-bs-theme="dark"] .bg-white h5,
html[data-bs-theme="dark"] .bg-white h6 {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .card-header.bg-light-subtle,
html[data-bs-theme="dark"] .card-header.bg-light,
html[data-bs-theme="dark"] .card-header.bg-white {
    background-color: #25293c !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .card-header {
    background-color: #25293c !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .card-header h1,
html[data-bs-theme="dark"] .card-header h2,
html[data-bs-theme="dark"] .card-header h3,
html[data-bs-theme="dark"] .card-header h4,
html[data-bs-theme="dark"] .card-header h5,
html[data-bs-theme="dark"] .card-header h6,
html[data-bs-theme="dark"] .card-header p,
html[data-bs-theme="dark"] .card-header span,
html[data-bs-theme="dark"] .card-header i {
    color: #ffffff !important;
}

/* Light Text Classes */
html[data-bs-theme="dark"] .text-light {
    color: #ffffff !important;
}

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

html[data-bs-theme="dark"] .card-title.mb-1,
html[data-bs-theme="dark"] .card-title.pt-2 {
    color: #ffffff !important;
}

/* DataTable Styling */
html[data-bs-theme="dark"] .dataTables_wrapper {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] table.dataTable {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] table.dataTable thead th {
    background-color: #25293c !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr:hover {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody td {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr.odd {
    background-color: #2f3349 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr.even {
    background-color: #25293c !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr.odd:hover {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] table.dataTable tbody tr.even:hover {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] .dtfc-fixed-left {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd td.dtfc-fixed-left {
    background-color: #2f3349 !important;
}

html[data-bs-theme="dark"] table.dataTable.stripe tbody tr.even td.dtfc-fixed-left {
    background-color: #25293c !important;
}

/* Date Picker & Flatpickr Styling */
html[data-bs-theme="dark"] .flatpickr-calendar {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-calendar.open {
    background-color: #2f3349 !important;
}

html[data-bs-theme="dark"] .flatpickr-months {
    background-color: #25293c !important;
}

html[data-bs-theme="dark"] .flatpickr-month {
    background-color: #25293c !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-prev-month,
html[data-bs-theme="dark"] .flatpickr-next-month {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-prev-month:hover,
html[data-bs-theme="dark"] .flatpickr-next-month:hover {
    color: #266BEE !important;
}

html[data-bs-theme="dark"] .flatpickr-weekdays {
    background-color: #25293c !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-weekday {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-days {
    background-color: #2f3349 !important;
}

html[data-bs-theme="dark"] .flatpickr-day {
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-day:hover {
    background-color: #434968 !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-day.selected {
    background-color: #266BEE !important;
    border-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-day.today {
    border-color: #266BEE !important;
}

html[data-bs-theme="dark"] .flatpickr-day.inRange {
    background-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-time {
    background-color: #25293c !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-time input {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-time input:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #266BEE !important;
}

html[data-bs-theme="dark"] .flatpickr-input {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .flatpickr-input:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #266BEE !important;
}

/* Status Dropdown */
html[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-dropdown {
    background-color: #1a1d2e !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option {
    color: #ffffff !important;
    background-color: #1a1d2e !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted:not([aria-selected=true]),
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted:not([aria-selected=true]),
html[data-bs-theme="dark"] .select2-results__option:hover,
html[data-bs-theme="dark"] .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] .select2-results__option--highlighted {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #266BEE !important;
    color: #ffffff !important;
}


/* ===== BLADE FILE DARK THEME OVERRIDES ===== */

/* Text Color Overrides for Dark Theme */
html[data-bs-theme="dark"] .text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: #b0b0b0 !important;
}

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

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

/* Background Color Overrides for Dark Theme */
html[data-bs-theme="dark"] .bg-light {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-white {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-gray {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Inline Style Overrides */
html[data-bs-theme="dark"] [style*="background-color: #f9f9f9"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] [style*="background-color:#f9f9f9"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] [style*="background-color: #e9ecef"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] [style*="background-color:#e9ecef"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] [style*="background-color: #e2e6e8"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] [style*="background-color:#e2e6e8"] {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Badge Overrides */
html[data-bs-theme="dark"] .badge.bg-light {
    background-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .badge.text-dark {
    color: #ffffff !important;
}

/* Table Header Overrides */
html[data-bs-theme="dark"] thead.bg-light {
    background-color: #25293c !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] thead.bg-light th {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .bg-light.text-dark {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Card Footer Overrides */
html[data-bs-theme="dark"] .card-footer.bg-white {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .card-footer.bg-light {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Form Input Overrides */
html[data-bs-theme="dark"] input.bg-light,
html[data-bs-theme="dark"] .form-control.bg-light {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] input.bg-light:focus,
html[data-bs-theme="dark"] .form-control.bg-light:focus {
    background-color: #2f3349 !important;
    color: #ffffff !important;
    border-color: #266BEE !important;
}

/* Span and Text Elements */
html[data-bs-theme="dark"] span.text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] p.text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] h1.text-dark,
html[data-bs-theme="dark"] h2.text-dark,
html[data-bs-theme="dark"] h3.text-dark,
html[data-bs-theme="dark"] h4.text-dark,
html[data-bs-theme="dark"] h5.text-dark,
html[data-bs-theme="dark"] h6.text-dark {
    color: #ffffff !important;
}

/* Label Overrides */
html[data-bs-theme="dark"] label.text-dark {
    color: #ffffff !important;
}

/* Div with bg-light */
html[data-bs-theme="dark"] div.bg-light {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] div.bg-white {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Modal and Overlay Overrides */
html[data-bs-theme="dark"] [style*="background:rgba(255,255,255"] {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Inner Table Row Styling */
html[data-bs-theme="dark"] .inner-table-row {
    background-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .inner-table-row td {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .inner-table-row th {
    color: #ffffff !important;
    background-color: #25293c !important;
}

/* Readonly Input Styling */
html[data-bs-theme="dark"] .readonly-look {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

/* Additional Text Color Fixes */
html[data-bs-theme="dark"] .fw-semibold.text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .fw-bold.text-dark {
    color: #ffffff !important;
}

/* Table Cell Overrides */
html[data-bs-theme="dark"] td.text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] th.text-dark {
    color: #ffffff !important;
}

/* Ensure all text in dark theme is readable */
html[data-bs-theme="dark"] * {
    color-scheme: dark;
}

/* ===== PRODUCTION DASHBOARD DARK MODE ===== */

/* Production Dashboard Container */
html[data-bs-theme="dark"] .production-dashboard {
    --pd-bg: linear-gradient(135deg, #1a1d2e 0%, #25293c 100%);
    --pd-card: #2f3349;
    --pd-border: #434968;
    --pd-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --pd-shadow-hover: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: var(--pd-bg) !important;
}

/* Production Dashboard Cards */
html[data-bs-theme="dark"] .production-dashboard .pd-card {
    background: var(--pd-card) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

/* KPI Cards */
html[data-bs-theme="dark"] .production-dashboard .pd-kpi-card {
    background: var(--pd-card) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-title {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-value {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-icon {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3) !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-icon.tone-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a7f 100%) !important;
    color: #7c9fd9 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-icon.tone-info {
    background: linear-gradient(135deg, #1a3a4a 0%, #2a5a6a 100%) !important;
    color: #5ab8d4 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-icon.tone-success {
    background: linear-gradient(135deg, #1a3a2a 0%, #2a5a3a 100%) !important;
    color: #5ab87a !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-kpi-icon.tone-warning {
    background: linear-gradient(135deg, #3a2a1a 0%, #5a3a2a 100%) !important;
    color: #d4a85a !important;
}

/* Card Headers */
html[data-bs-theme="dark"] .production-dashboard .pd-card-header {
    background: linear-gradient(135deg, #25293c 0%, #2f3349 100%) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-section-title {
    color: #ffffff !important;
}

/* Chart Legend */
html[data-bs-theme="dark"] .production-dashboard .pd-chart-legend {
    color: #b0b0b0 !important;
}

/* Workflow Section */
html[data-bs-theme="dark"] .production-dashboard .pd-workflow {
    background: linear-gradient(135deg, #25293c 0%, #2f3349 100%) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-title {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-item {
    background: #2f3349 !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-item h6 {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-item small {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-more {
    color: #7c9fd9 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-workflow-more:hover {
    color: #9bb8e8 !important;
}

/* Stage Flow Cards */
html[data-bs-theme="dark"] .production-dashboard .pd-stage-card {
    background: linear-gradient(135deg, #2f3349 0%, #25293c 100%) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-label {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-name {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-desc {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-metric {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-rejected {
    color: #ff6b6b !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-stage-arrow {
    color: #434968 !important;
}

/* Final Output Section */
html[data-bs-theme="dark"] .production-dashboard .pd-final-output {
    background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%) !important;
    border-color: #5a3a7a !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-final-output h3 {
    color: #b89bff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-final-output small {
    color: #b0b0b0 !important;
}

/* Tables */
html[data-bs-theme="dark"] .production-dashboard .pd-table {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-table thead th {
    background: linear-gradient(135deg, #25293c 0%, #2f3349 100%) !important;
    border-color: var(--pd-border) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-table tbody td {
    color: #ffffff !important;
    border-color: var(--pd-border) !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-table tbody tr:hover {
    background-color: #434968 !important;
}

/* Scrollbar in Charts */
html[data-bs-theme="dark"] .production-dashboard .pd-chart-scroll::-webkit-scrollbar-track {
    background: #25293c !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-chart-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #434968 0%, #5a5f7f 100%) !important;
}

html[data-bs-theme="dark"] .production-dashboard .pd-chart-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a5f7f 0%, #6a6f8f 100%) !important;
}

/* Badge in Workflow */
html[data-bs-theme="dark"] .production-dashboard .badge.bg-light {
    background-color: #434968 !important;
    color: #ffffff !important;
    border-color: #5a5f7f !important;
}

/* Canvas Charts */
html[data-bs-theme="dark"] .production-dashboard canvas {
    filter: brightness(0.9);
}

/* ===== TABLE STRIPED ROWS DARK MODE ===== */

/* Override Bootstrap's table striped CSS variables */
html[data-bs-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-bg-type: transparent !important;
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped>tbody>tr:nth-of-type(even)>* {
    --bs-table-bg-type: transparent !important;
    background-color: #25293c !important;
    color: #ffffff !important;
}

/* Ensure all table striped rows have dark background */
html[data-bs-theme="dark"] .table-striped tbody tr {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: #2f3349 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(even) {
    background-color: #25293c !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped tbody tr:hover {
    background-color: #434968 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped tbody td {
    color: #ffffff !important;
    border-color: #434968 !important;
    background-color: transparent !important;
}

html[data-bs-theme="dark"] .table-striped thead th {
    background-color: #25293c !important;
    color: #ffffff !important;
    border-color: #434968 !important;
}

/* ===== LABEL TEXT DARK MODE ===== */

/* All labels should be white in dark mode */
html[data-bs-theme="dark"] label,
html[data-bs-theme="dark"] .form-label,
html[data-bs-theme="dark"] .col-form-label {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] label.col-sm-6,
html[data-bs-theme="dark"] label.col-form-label {
    color: #ffffff !important;
}

/* ===== INLINE STYLE BADGES DARK MODE ===== */

/* Force white text on all badges with inline background-color styles */
html[data-bs-theme="dark"] .badge[style*="background-color"] {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

html[data-bs-theme="dark"] span.badge[style*="background-color"] {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* All badges should have white text */
/* html[data-bs-theme="dark"] .badge {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .badge.bg-glow {
    color: #ffffff !important;
} */


/* Card header in cardViewContainer should have black background in dark mode */
html[data-bs-theme="dark"] #cardViewContainer .card-header {
    background: #000000 !important;
    border-radius: 14px 14px 0 0 !important;
    padding: 12px 16px !important;
    padding-top: 16px !important;
    color: #ffffff !important;
}

/* Override inline styles for card-header */
html[data-bs-theme="dark"] #cardViewContainer .card-header[style*="background"] {
    background: #000000 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .card-header[style*="#F4F5F7"] {
    background: #000000 !important;
    color: #ffffff !important;
}

/* ===== LABEL CLASS DARK MODE ===== */

/* All .label class elements should have white text in dark mode */
html[data-bs-theme="dark"] .label {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .label.text-dark {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .label.text-muted {
    color: #b0b0b0 !important;
}

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

/* Override details-list label styling in dark mode */
html[data-bs-theme="dark"] #cardViewContainer .details-list .label {
    min-width: 40%;
    font-weight: 600;
    color: #ffffff !important;
}

/* Custom Dropdown for Search Product */
html[data-bs-theme="dark"] .custom-dropdown ul {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
}

html[data-bs-theme="dark"] .custom-dropdown ul li {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .custom-dropdown ul li:hover,
html[data-bs-theme="dark"] #productList li.highlight {
    background-color: #266BEE !important;
    color: #ffffff !important;
}

/* Custom Dropdown Input Field Styles */
html[data-bs-theme="dark"] .custom-dropdown input[type="text"] {
    background-color: #2f3349 !important;
    border-color: #434968 !important;
    color: #cfd3ec !important;
}

html[data-bs-theme="dark"] .custom-dropdown input[type="text"]:focus {
    border-color: #266BEE !important;
    box-shadow: 0 0 0.25rem rgba(38, 107, 238, 0.25) !important;
    outline: none !important;
}