@charset "UTF-8";

/* ==========================================================================
   Antigravity Dark Mode Strategy: Professional Dashboard Experience
   Version 5.0 - Final Polish & Editor Support
   ========================================================================== */

/* 1. Core Variable Overrides */
:root {
    --bs-body-bg: #151521;
    --bs-body-color: #c2c2d9;
    --bs-primary: #37a279;
    --bs-card-bg: #1b1b29;
    --bs-border-color: #2a2a3d;
    --bs-text-muted: #8a8a9e;
    --bs-header-bg: #1b1b29;
}

body.theme-dark {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

/* 2. Container & Layout Reset */
body.theme-dark .bg-white {
    background-color: var(--bs-card-bg) !important;
}

body.theme-dark #app,
body.theme-dark #main,
body.theme-dark #main-content,
body.theme-dark .page-heading,
body.theme-dark .layout-wrapper {
    background-color: var(--bs-body-bg) !important;
}

body.theme-dark .layout-header,
body.theme-dark .layout-header .navbar {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* 3. Sidebar Persistence & Logo Area Fix */
body.theme-dark .sidebar-wrapper {
    background-color: var(--bs-card-bg) !important;
    border-right: 1px solid var(--bs-border-color) !important;
}

body.theme-dark .sidebar-header {
    background-color: var(--bs-card-bg) !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
}

body.theme-dark .sidebar-wrapper .menu .sidebar-link,
body.theme-dark .sidebar-wrapper .menu .sidebar-title,
body.theme-dark .sidebar-wrapper .menu .sidebar-link span {
    color: #c2c2d9 !important;
}

/* Sidebar Active States */
body.theme-dark .sidebar-wrapper .menu .sidebar-item.active > .sidebar-link,
body.theme-dark .sidebar-wrapper .menu .submenu-item.active > a {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

body.theme-dark .sidebar-wrapper .menu .sidebar-item.active i,
body.theme-dark .sidebar-wrapper .menu .sidebar-item.active span {
    color: #fff !important;
}

/* 4. Universal Card & Surface Reset */
body.theme-dark .card,
body.theme-dark .card-body,
body.theme-dark .card-header,
body.theme-dark .card-footer {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: #fff !important;
}

/* 5. Table & List Reset */
body.theme-dark .table,
body.theme-dark table,
body.theme-dark .b-table {
    background-color: transparent !important;
    color: #c2c2d9 !important;
}

body.theme-dark .table thead th {
    background-color: #252535 !important;
    color: #fff !important;
    border-bottom: 2px solid var(--bs-border-color) !important;
}

body.theme-dark .table tbody tr,
body.theme-dark .table td,
body.theme-dark .list-group-item {
    background-color: var(--bs-card-bg) !important;
    color: #c2c2d9 !important;
    border-color: var(--bs-border-color) !important;
}

/* 6. Form & Filter Bar Reset */
body.theme-dark .orders-filter-bar,
body.theme-dark .dashboard-filter-bar,
body.theme-dark .filter-row {
    background-color: #1a1a27 !important;
    background-image: none !important;
    background: #1a1a27 !important;
    border-color: var(--bs-border-color) !important;
    box-shadow: none !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background-color: #151521 !important;
    border-color: #33334d !important;
    color: #c2c2d9 !important;
}

body.theme-dark .form-control:focus {
    background-color: #151521 !important;
    color: #fff !important;
}

body.theme-dark .form-label,
body.theme-dark label {
    color: #8a8a9e !important;
}

/* 7. Status Tabs & Action Buttons */
body.theme-dark .status-tabs-row {
    background-color: #1a1a27 !important;
    border: 1px solid var(--bs-border-color) !important;
}

body.theme-dark .status-tab {
    background-color: #252535 !important;
    color: #c2c2d9 !important;
}

/* 8. Badge & Utility Overrides */
body.theme-dark .bg-light,
body.theme-dark .badge.bg-light {
    background-color: #252535 !important;
    color: #fff !important;
}

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

/* 9. Specialized Component Fixes */
body.theme-dark .file-input-div {
    background-color: #1a1a27 !important;
    border-color: #33334d !important;
}

body.theme-dark .variant-card {
    background-color: #1a1a27 !important;
    border-color: #33334d !important;
}

body.theme-dark .total-calc {
    color: #fff !important;
}

/* Store Settings Vertical Tabs */
body.theme-dark .tab-buttons button {
    background-color: #252535 !important;
    color: #c2c2d9 !important;
    border: 1px solid var(--bs-border-color) !important;
}

body.theme-dark .tab-buttons button.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    border-color: var(--bs-primary) !important;
}

/* Dropdowns / Modals */
body.theme-dark .dropdown-menu {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-border-color) !important;
}

body.theme-dark .dropdown-item {
    color: #c2c2d9 !important;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    background-color: #252535 !important;
    color: #fff !important;
}

body.theme-dark .dropdown-divider {
    border-top-color: var(--bs-border-color) !important;
}


/* 10. Tinymce Shadow Overrides (In case skin is slow to load) */
body.theme-dark .tox-tinymce {
    border-color: var(--bs-border-color) !important;
    background-color: #151521 !important;
}

body.theme-dark .tox .tox-menubar,
body.theme-dark .tox .tox-toolbar,
body.theme-dark .tox .tox-toolbar__primary,
body.theme-dark .tox .tox-statusbar {
    background-color: #252535 !important;
    border-color: var(--bs-border-color) !important;
}

body.theme-dark .tox .tox-mbtn,
body.theme-dark .tox .tox-tbtn,
body.theme-dark .tox .tox-statusbar a,
body.theme-dark .tox .tox-statusbar__path-item,
body.theme-dark .tox .tox-statusbar__wordcount {
    color: #c2c2d9 !important;
}

/* Extreme Specificity Override */
body.theme-dark [style*="background: #fff"],
body.theme-dark [style*="background:#fff"],
body.theme-dark [style*="background-color: #fff"],
body.theme-dark [style*="background-color:#fff"] {
    background-color: var(--bs-card-bg) !important;
}

/* Fix for logo white background if it's an image bg */
body.theme-dark .sidebar-header img {
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
}

/* 11. Modal Overrides */
body.theme-dark .modal-content,
body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .modal-body,
body.theme-dark .modal-title,
body.theme-dark .b-modal,
body.theme-dark .modal-content .bg-white {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: #c2c2d9 !important;
}

body.theme-dark .modal-header .close {
    color: #fff !important;
    text-shadow: none !important;
}

body.theme-dark .modal-content .form-label,
body.theme-dark .modal-content .form-control-plaintext {
    color: #c2c2d9 !important;
}