html.dark-theme body {
    color: #d7d7d7;
    background-color: #1a2232;
}

html.dark-theme ::placeholder {
    color: #fff !important;
    opacity: 0.4 !important;
}

html.dark-theme .radial-charts img {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

html.dark-theme .navbar-nav .nav-link   {
    color: #fff;
}
html.dark-theme .navbar-nav .nav-link.active   {
    color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));;
}

html.dark-theme .modal-content{
    color: #fff !important;
}

html.dark-theme .StripeElement{
    background-color: #fff !important;
}

html.dark-theme .note-input{
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

/* Sidebar */
html.dark-theme .sidebar-wrapper,
html.dark-theme .sidebar-wrapper .sidebar-header {
    background-color: #202a40 !important;
}

html.dark-theme .sidebar-wrapper,
html.dark-theme .sidebar-wrapper .sidebar-header {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .sidebar-wrapper .sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fcfcfc;
}

html.dark-theme .sidebar-wrapper .sidebar-header .logo-text,
html.dark-theme .sidebar-wrapper .sidebar-header .toggle-icon {
    color: #fcfcfc;
}

html.dark-theme .sidebar-wrapper .metismenu .mm-active > a,
html.dark-theme .sidebar-wrapper .metismenu a:active,
html.dark-theme .sidebar-wrapper .metismenu a:focus,
html.dark-theme .sidebar-wrapper .metismenu a:hover {
    color: #fff;
    text-decoration: none;
    background: rgb(46, 57, 78);
    border-left: 4px solid #ffffff;
}

html.dark-theme .sidebar-wrapper .metismenu a {
    color: #9ea4aa;
}

html.dark-theme .sidebar-wrapper .metismenu ul {
    border: 1px solid transparent;
}

html.dark-theme .sidebar-wrapper .simplebar-scrollbar:before {
    background: rgba(255, 255, 255, 0.4);
}

/* Header */
html.dark-theme .top-header .navbar {
    color: #fcfcfc;
    background-color: #1a2232;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .top-header .navbar .top-navbar-right .nav-link {
    color: #fcfcfc;
}

html.dark-theme .top-header .navbar .mobile-toggle-icon,
html.dark-theme .top-header .navbar .search-toggle-icon {
    color: #fcfcfc;
}

html.dark-theme .top-header .navbar .searchbar .form-control {
    color: #fcfcfc;
    background-color: #202a40;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Components */
html.dark-theme .btn-dark {
    color: #fff;
    background-color: #101821;
    border-color: #101821;
}

html.dark-theme .btn-outline-dark {
    color: #b1b6bb;
    border-color: #7f868d;
}

html.dark-theme .btn-white {
    color: #ffffff;
    background-color: #202a40;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-theme .btn-light {
    color: #fff;
    background-color: #313c53;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-theme .ff_fileupload_wrap .ff_fileupload_dropzone,
html.dark-theme .imageuploadify {
    border: 2px dashed rgba(255, 255, 255, 0.74);
    background-color: #202a40;
}

html.dark-theme .picker__input {
    background-color: #1a2232 !important;
}

html.dark-theme .picker__holder {
    background: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .picker__button--today,
html.dark-theme .picker__button--clear,
html.dark-theme .picker__button--close {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1a2232;
}

html.dark-theme .select2-container--bootstrap4 .select2-selection {
    background-color: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

html.dark-theme .select2-dropdown {
    background-color: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.38);
}

html.dark-theme .select2-search--dropdown .select2-search__field {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background-color: #1a2232;
    color: #e3dfdf;
}

html.dark-theme .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    color: #dee1e5;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: #171717;
}

html.dark-theme .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered .select2-search__field {
    background: 0 0;
    color: #e6e1e1;
}

html.dark-theme .select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected=true] {
    background-color: #1a2232;
}

html.dark-theme .modal-content {
    background-color: #202a40;
}

html.dark-theme .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Base Nav Tabs Styling */
html.dark-theme .nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme .nav-tabs .nav-link {
    color: #8c949c !important;
}

html.dark-theme .nav-tabs .nav-link:hover,
html.dark-theme .nav-tabs .nav-link:focus {
    border-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.12) transparent !important;
    color: #fcfcfc !important;
}

/* Active Nav Tabs Styling */
html.dark-theme .nav-tabs .nav-link.active,
html.dark-theme .nav-tabs .nav-item.show .nav-link {
    color: #fcfcfc !important;
    background-color: #1a2232 !important;
    border-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.12) #1a2232 rgba(255, 255, 255, 0.12) !important;
}

/* Card-Specific Active Nav Tabs (adjusts bottom border to match card background) */
html.dark-theme .card .nav-tabs .nav-link.active,
html.dark-theme .card .nav-tabs .nav-item.show .nav-link {
    background-color: #202a40 !important;
    border-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.12) #202a40 rgba(255, 255, 255, 0.12) !important;
}

/* Colored Nav Tabs variants */
html.dark-theme .nav-primary.nav-tabs .nav-link.active {
    border-color: #008cff #008cff rgba(255, 255, 255, 0.24);
}

html.dark-theme .nav-danger.nav-tabs .nav-link.active {
    border-color: #f41127 #f41127 rgba(255, 255, 255, 0.24);
}

html.dark-theme .nav-success.nav-tabs .nav-link.active {
    border-color: #17a00e #17a00e rgba(255, 255, 255, 0.24);
}

html.dark-theme .nav-warning.nav-tabs .nav-link.active {
    border-color: #ffc107 #ffc107 rgba(255, 255, 255, 0.24);
}

html.dark-theme .nav-pills .nav-link {
    color: #ffffff;
}

html.dark-theme .page-link {
    color: #ffffff;
    background-color: #202a40;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .page-item.disabled .page-link {
    color: #ffffff;
    background-color: #181f2e;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-theme .productlist .product-box {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: #1a2232;
}

html.dark-theme .form-control,
html.dark-theme .form-select {
    color: #fcfcfc;
    background-color: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .form-control:disabled,
html.dark-theme .form-control[readonly] {
    background-color: #2c364a;
}

html.dark-theme .form-select:disabled {
    background-color: #2c364a;
}

html.dark-theme .bootstrap-tagsinput {
    color: #fcfcfc;
    background-color: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .input-group-text {
    color: #ffffff;
    background-color: #313c53;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .chip {
    color: #ffffff;
    background-color: #141b29;
}

html.dark-theme .card {
    background-color: #202a40;
}

/* Fix Card Header and Footer */
html.dark-theme .card-header,
html.dark-theme .card-footer {
    background-color: #161d2d !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #fcfcfc !important; /* Force the text to be white */
}

/* Ensure any specific titles inside the card header are also white */
html.dark-theme .card-header .card-title,
html.dark-theme .card-header div {
    color: #fcfcfc !important;
}

html.dark-theme .bg-dark {
    background-color: #101821 !important;
}

html.dark-theme .border {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme .text-option {
    color: #fcfcfc !important;
}

html.dark-theme .offcanvas {
    background-color: #1a2232;
}

html.dark-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html.dark-theme .w_percent {
    color: #ffffff;
}

html.dark-theme .bg-light {
    background-color: #1b2336 !important;
}

html.dark-theme .list-group-item {
    color: #fcfcfc;
    background-color: #202a40;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}

html.dark-theme .new-customer-list .customer-list-item:hover {
    background-color: #1b2436;
}

html.dark-theme .best-product-item {
    background-color: #202a40;
}

html.dark-theme .best-product-item:hover,
html.dark-theme .sellers-list-item:hover {
    background-color: #1b2436;
}

html.dark-theme .theme-icons,
html.dark-theme .product-box {
    background-color: #202a40;
    color: #f1f4f6;
}

html.dark-theme .accordion-button {
    color: #ffffff;
    background-color: #202a40;
}

html.dark-theme .accordion-item {
    background-color: #1b2436;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .accordion-button:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

html.dark-theme .accordion-button:not(.collapsed) {
    color: #ffffff;
    background-color: #161d2c;
}

html.dark-theme .dropdown-menu {
    color: #fcfcfc;
    background-color: #202a40;
}

html.dark-theme .dropdown-item {
    color: #fcfcfc;
}

html.dark-theme .top-header .navbar .dropdown-large .dropdown-menu::after,
html.dark-theme .top-header .navbar .dropdown-user-setting .dropdown-menu::after {
    background: #202a40;
    border-top: 1px solid #2f3b55;
    border-left: 1px solid #2f3b55;
}

html.dark-theme .top-header .navbar .dropdown-searchbar .form-control {
    color: #fcfcfc;
    background-color: #202a40;
}

html.dark-theme .top-header .navbar .dropdown-item .setting-icon {
    background-color: #2b3650;
}

html.dark-theme .top-header .navbar .dropdown-large .dropdown-item:hover,
html.dark-theme .top-header .navbar .dropdown-user-setting .dropdown-item:hover {
    border-radius: 10px;
    color: #fcfcfc;
    background-color: #2e384e;
}

html.dark-theme .top-header .navbar .dropdown-menu .notification-box {
    background-color: #2e384e;
}

html.dark-theme .top-header .navbar .dropdown-menu .apps:hover {
    background-color: #2e384e;
    transition: all 0.2s;
}

html.dark-theme .top-header .navbar .dropdown-menu .apps .apps-name {
    color: #fcfcfc;
}

html.dark-theme .table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-color: #ffffff;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-active-color: #ffffff;
    --bs-table-active-bg: rgba(255, 255, 255, 0.10);
    --bs-table-hover-color: #ffffff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
    width: 100%;
    margin-bottom: 1rem;
    color: #fcfcfc;
    vertical-align: top;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-theme .table-light {
    --bs-table-bg: rgba(255, 255, 255, 0.12);
    --bs-table-striped-bg: #ecedee;
    --bs-table-striped-color: #000;
    --bs-table-active-bg: #dfe0e1;
    --bs-table-active-color: #000;
    --bs-table-hover-bg: #e5e6e7;
    --bs-table-hover-color: #000;
    color: #fff;
    border-color: #dfe0e1;
}

/* Emailbox */
html.dark-theme .email-wrapper {
    background-color: #202a40;
    box-shadow: 0 0.1rem 0.7rem rgba(0, 0, 0, 0.24);
}

html.dark-theme .email-sidebar {
    background-color: #202a40;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .email-sidebar-header {
    background-color: #202a40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0 solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .email-navigation {
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .email-navigation a.list-group-item {
    color: #e4e5e6;
    background-color: #202a40;
    border-bottom: 1px solid transparent;
}

html.dark-theme .email-navigation a.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

html.dark-theme .email-meeting a.list-group-item {
    color: #e4e5e6;
    background-color: #202a40;
    border-bottom: 1px solid transparent;
}

html.dark-theme .email-meeting a.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

html.dark-theme .email-navigation a.list-group-item.active {
    color: #ffffff;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.14);
}

html.dark-theme .email-header {
    background-color: #202a40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .email-content {
    background: #202a40;
}

html.dark-theme .email-list div.email-message {
    background-color: #202a40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e5e6;
}

html.dark-theme .email-list div.email-message:hover {
    transition: all 0.2s ease-out;
    background: #434a50;
}

html.dark-theme .email-time {
    font-size: 13px;
    color: #8c969e;
}

/* Chatbox */
html.dark-theme .chat-wrapper {
    background-color: #202a40;
    box-shadow: 0 0.1rem 0.7rem rgba(0, 0, 0, 0.22);
}

html.dark-theme .chat-sidebar {
    background-color: #202a40;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .chat-sidebar-header {
    background-color: #202a40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    border-right: 0 solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .chat-header {
    background-color: #202a40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .chat-tab-menu li a.nav-link {
    color: #c3c5c8;
}

html.dark-theme .chat-title {
    color: #e4e5e6;
}

html.dark-theme .chat-msg {
    font-size: 14px;
    color: #848992;
}

html.dark-theme .chat-time {
    font-size: 13px;
    color: #8c969e;
}

html.dark-theme .chat-top-header-menu a {
    color: #c3c5c8;
    background-color: #202a40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-theme .chat-content-leftside .chat-left-msg {
    background-color: #202a40;
}

html.dark-theme .chat-content-rightside .chat-right-msg {
    background-color: #41484e;
}

html.dark-theme .chat-footer {
    background-color: #202a40;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

html.dark-theme .chat-footer-menu a {
    color: #c3c5c8;
    background-color: #202a40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark-theme .fm-menu .list-group a {
    color: #c3c5c8;
}

html.dark-theme .fm-icon-box {
    background: #202a40;
    color: #fff;
}

html.dark-theme .contacts-social a {
    background: #202a40;
    color: #fff;
}

html.dark-theme .fc-theme-standard td,
html.dark-theme .fc-theme-standard th {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .fc-theme-standard .fc-scrollgrid {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html.dark-theme .fc .fc-col-header-cell-cushion {
    color: #fff;
}

html.dark-theme .fc .fc-daygrid-day-number {
    color: #fff;
}

html.dark-theme .breadcrumb {
    background-color: transparent;
}

html.dark-theme .breadcrumb-item.active {
    color: #8b969f;
}

html.dark-theme .breadcrumb-title {
    border-right: 1.5px solid rgba(255, 255, 255, 0.18);
}

html.dark-theme .bg-body {
    background-color: #202a40 !important;
}

html.dark-theme .apexcharts-pie-label,
html.dark-theme .apexcharts-datalabels,
html.dark-theme .apexcharts-datalabel,
html.dark-theme .apexcharts-datalabel-label,
html.dark-theme .apexcharts-datalabel-value {
    fill: #fff;
}

html.dark-theme .apexcharts-text tspan {
    fill: rgba(255, 255, 255, 0.66);
}

/* Typography, Background & Custom Utilities Overrides */
html.dark-theme h1,
html.dark-theme h2,
html.dark-theme h3,
html.dark-theme h4,
html.dark-theme h5,
html.dark-theme h6,
html.dark-theme .h1,
html.dark-theme .h2,
html.dark-theme .h3,
html.dark-theme .h4,
html.dark-theme .h5,
html.dark-theme .h6 {
    color: #fcfcfc !important;
}

html.dark-theme .text-secondary {
    color: #8c949c !important;
}

html.dark-theme .text-muted {
    color: #adb5bd !important;
}

html.dark-theme .text-dark {
    color: #fcfcfc !important;
}

html.dark-theme .bg-white {
    background-color: #202a40 !important;
}

html.dark-theme footer.bg-white {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme .table > :not(caption) > * > * {
    color: #fcfcfc !important;
    background-color: var(--bs-table-bg) !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

/* Fix Card Body Background */
html.dark-theme .card-body {
    background-color: #202a40 !important;
    color: #fcfcfc !important;
}

/* Summernote / WYSIWYG Editor Background */
html.dark-theme .note-editable {
    background-color: #ffffff !important;
    color: #000000 !important; /* Force text to be dark so it is readable on the white background */
}

html.dark-theme .form-text {
    color: #adb5bd !important;
}

html.dark-theme .text-body{
    color: #fff !important;
}

/* Accordion Collapse (Ticket Replies) */
html.dark-theme #ticketAccordion .accordion-collapse .bg-white,
html.dark-theme #clientTicketAccordion .accordion-collapse .bg-white{
    background-color: #ffffff !important;
    color: #000000 !important; /* Force text to be dark so the ticket reply is readable */
}

/* Ensure any nested cards/elements inside the white accordion also look correct */
html.dark-theme .accordion-collapse .card,
html.dark-theme .accordion-collapse .card-body {
    background-color: #202a40 !important;
    color: #fcfcfc !important;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    html.dark-theme .top-header .navbar .full-searchbar {
        background-color: #1a2232;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        background-clip: border-box;
    }
}

html.dark-theme .sticky-pagination-wrapper {
    background-color: #202a40; /* Matches the dark theme card background */
    border-top-color: rgba(255, 255, 255, 0.12); /* Matches dark theme borders */
}


/* ApexCharts Tooltip Dark Mode Fix */
html.dark-theme .apexcharts-tooltip {
    background: #202a40 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0.1rem 0.7rem rgba(0, 0, 0, 0.2) !important;
    color: #fcfcfc !important;
}

html.dark-theme .apexcharts-tooltip-title {
    background: #161d2d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fcfcfc !important;
    font-weight: bold;
}

html.dark-theme .apexcharts-tooltip-text {
    color: #fcfcfc !important;
}

html.dark-theme .apexcharts-tooltip.apexcharts-theme-light {
    background: #202a40 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme .apexcharts-legend-text {
    color: #fcfcfc !important;
}


/* ApexCharts Tooltip Inner Text Dark Mode Fix */
html.dark-theme .apexcharts-tooltip-text-y-label,
html.dark-theme .apexcharts-tooltip-text-y-value,
html.dark-theme .apexcharts-tooltip-text-z-label,
html.dark-theme .apexcharts-tooltip-text-z-value,
html.dark-theme .apexcharts-tooltip-series-group {
    color: #fcfcfc !important;
}

/* Ensure the chart grid lines match the dark mode borders */
html.dark-theme .apexcharts-gridline {
    stroke: rgba(255, 255, 255, 0.12) !important;
}

/* Fix the small tick marks on the bottom axis */
html.dark-theme .apexcharts-xaxis-tick {
    stroke: rgba(255, 255, 255, 0.12) !important;
}

/* =========================================
   Select2 Exact Dark Theme Overrides
   ========================================= */

/* Main input box background and border */
html.dark-theme .select2-container--default .select2-selection--single {
    background-color: #1a2232 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Selected text color */
html.dark-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fcfcfc !important;
}

/* Placeholder text color (slightly dimmed) */
html.dark-theme .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: rgba(252, 252, 252, 0.5) !important;
}

/* The dropdown menu background and border (the popup box) */
html.dark-theme .select2-dropdown {
    background-color: #1a2232 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* The search input field inside the dropdown */
html.dark-theme .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #1a2232 !important;
    color: #fcfcfc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* The options (list items) background and text color */
html.dark-theme .select2-container--default .select2-results__option {
    background-color: #1a2232 !important;
    color: #fcfcfc !important;
}

/* Highlighted/Hovered option */
html.dark-theme .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(255, 255, 255, 0.08) !important; /* Subtle white overlay for hover */
    color: #fcfcfc !important;
}

/* Already selected option in the list */
html.dark-theme .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #fcfcfc !important;
}

/* Disabled state */
html.dark-theme .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: rgba(26, 34, 50, 0.6) !important; /* Dimmed version of your background */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
