/**
 * PMS theme overrides — complements Hyper light/dark stylesheets.
 */

/* ------------------------------------------------------------------ */
/* Layout customizations (from index.php)                              */
/* ------------------------------------------------------------------ */

[data-theme="dark"] .container-fluid:nth-child(2) {
    color: #e3eaef;
}

[data-theme="dark"] .card {
    background: rgba(30, 34, 40, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] #search-dropdown .global-search-badge {
    background: #37404a;
    color: #aab8c5;
}

[data-theme="dark"] .theme-option.active {
    background-color: rgba(114, 124, 245, 0.12);
    color: #727cf5;
}

/* ------------------------------------------------------------------ */
/* Dashboard shared styles (_dashboard_styles.php)                       */
/* ------------------------------------------------------------------ */

[data-theme="dark"] .stat-card-gradient-primary {
    background: linear-gradient(135deg, #2a3042 0%, rgba(102, 126, 234, 0.18) 100%);
}

[data-theme="dark"] .stat-card-gradient-warning {
    background: linear-gradient(135deg, #2a3042 0%, rgba(249, 200, 81, 0.16) 100%);
}

[data-theme="dark"] .stat-card-gradient-info {
    background: linear-gradient(135deg, #2a3042 0%, rgba(53, 184, 224, 0.16) 100%);
}

[data-theme="dark"] .stat-card-gradient-success {
    background: linear-gradient(135deg, #2a3042 0%, rgba(16, 196, 105, 0.16) 100%);
}

[data-theme="dark"] .stat-card-gradient-danger {
    background: linear-gradient(135deg, #2a3042 0%, rgba(255, 91, 91, 0.16) 100%);
}

[data-theme="dark"] .stat-card-gradient-teal {
    background: linear-gradient(135deg, #2a3042 0%, rgba(17, 153, 142, 0.16) 100%);
}

[data-theme="dark"] .stat-card-gradient-purple {
    background: linear-gradient(135deg, #2a3042 0%, rgba(139, 92, 246, 0.16) 100%);
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .table-dashboard th,
[data-theme="dark"] .pipeline-label {
    color: #98a6ad;
}

[data-theme="dark"] .chart-card,
[data-theme="dark"] .crm-table-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .crm-panel-header {
    background: #2a3042;
    border-bottom-color: #37404a;
}

[data-theme="dark"] .crm-panel-header h5 {
    color: #e3eaef;
}

[data-theme="dark"] .pipeline-stage {
    background: #2a3042;
    border-color: #37404a;
}

[data-theme="dark"] .pipeline-stage:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

/* ------------------------------------------------------------------ */
/* Right account sidebar                                               */
/* ------------------------------------------------------------------ */

/* Right account sidebar — dark rules live in Views/Sidedatabar/master.php and Views/Myaccount/index.php */

/* ------------------------------------------------------------------ */
/* Auth / login page                                                   */
/* ------------------------------------------------------------------ */

.auth-theme-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1050;
}

.auth-theme-switcher .dropdown-menu {
    min-width: 160px;
}

/* Auth login page styles live in Views/Auth/auth.php (uses WEBROOT image paths). */

/* ------------------------------------------------------------------ */
/* Third-party: Select2                                                */
/* ------------------------------------------------------------------ */

[data-theme="dark"] .select2-container--default .select2-selection--single,
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e3eaef;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #98a6ad;
}

[data-theme="dark"] .select2-dropdown {
    background-color: #2a3042;
    border-color: #4a5568;
}

[data-theme="dark"] .select2-container--default .select2-results__option {
    color: #e3eaef;
}

[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #727cf5;
    color: #fff;
}

[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

/* ------------------------------------------------------------------ */
/* Third-party: Quill editor                                           */
/* ------------------------------------------------------------------ */

[data-theme="dark"] .ql-toolbar.ql-snow {
    background-color: #2a3042;
    border-color: #4a5568;
}

[data-theme="dark"] .ql-container.ql-snow {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .ql-snow .ql-stroke {
    stroke: #aab8c5;
}

[data-theme="dark"] .ql-snow .ql-fill {
    fill: #aab8c5;
}

[data-theme="dark"] .ql-snow .ql-picker-label {
    color: #e3eaef;
}

[data-theme="dark"] .ql-snow .ql-picker-options {
    background-color: #2a3042;
    border-color: #4a5568;
}

/* ------------------------------------------------------------------ */
/* Third-party: DataTables                                             */
/* ------------------------------------------------------------------ */

[data-theme="dark"] table.dataTable {
    color: #e3eaef;
}

[data-theme="dark"] table.dataTable thead th,
[data-theme="dark"] table.dataTable thead td {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] table.dataTable tbody tr {
    background-color: transparent;
}

[data-theme="dark"] table.dataTable.stripe tbody tr.odd,
[data-theme="dark"] table.dataTable.display tbody tr.odd {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .page-item.disabled .page-link {
    background-color: #2a3042;
    border-color: #4a5568;
    color: #6c757d;
}

[data-theme="dark"] .page-link {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: #727cf5;
    border-color: #727cf5;
}

/* ------------------------------------------------------------------ */
/* Common per-page style block patterns                                */
/* ------------------------------------------------------------------ */

[data-theme="dark"] .sch-editable {
    background-color: rgba(249, 200, 81, 0.12) !important;
}

[data-theme="dark"] tr.row-halfday {
    background-color: rgba(249, 200, 81, 0.12) !important;
}

[data-theme="dark"] .td-double.has-ot {
    background-color: rgba(249, 200, 81, 0.12) !important;
}

[data-theme="dark"] .highlight-assigned,
[data-theme="dark"] [style*="background-color: #fff3cd"] {
    /* pages using yellow highlight for assigned users */
}

[data-theme="dark"] .modal-body[style*="background: #fafbfc"],
[data-theme="dark"] .modal-body[style*="background:#fafbfc"] {
    /* inline modal backgrounds — covered by modal-body rule below */
}

[data-theme="dark"] .modal-content {
    background-color: #2a3042;
    border-color: #4a5568;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #4a5568;
}

html[data-theme="light"] .modal-backdrop {
    background-color: #323a46;
}

html[data-theme="light"] .modal-backdrop.show {
    opacity: 0.7;
}

html[data-theme="dark"] .modal-backdrop {
    background-color: #050608;
}

html[data-theme="dark"] .modal-backdrop.show {
    opacity: 0.75;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2a3042;
    border-color: #4a5568;
}

[data-theme="dark"] .dropdown-item {
    color: #e3eaef;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #37404a;
    color: #fff;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .custom-select {
    background-color: #3a444e;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .custom-select:focus {
    background-color: #3a444e;
    border-color: #727cf5;
    color: #e3eaef;
}

[data-theme="dark"] .input-group-text {
    background-color: #37404a;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .table {
    color: #e3eaef;
}

[data-theme="dark"] .table thead th {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-top-color: #37404a;
}

/* Contextual table rows keep light Bootstrap backgrounds; force black text in dark mode */
html[data-theme="dark"] .table-info,
html[data-theme="dark"] .table-info > th,
html[data-theme="dark"] .table-info > td,
html[data-theme="dark"] .table-info > th *,
html[data-theme="dark"] .table-info > td *,
[data-theme="dark"] .table-info,
[data-theme="dark"] .table-info > th,
[data-theme="dark"] .table-info > td,
[data-theme="dark"] .table-info > th *,
[data-theme="dark"] .table-info > td * {
    color: #000 !important;
}

html[data-theme="dark"] .table-primary,
html[data-theme="dark"] .table-primary > th,
html[data-theme="dark"] .table-primary > td,
html[data-theme="dark"] .table-primary > th *,
html[data-theme="dark"] .table-primary > td *,
[data-theme="dark"] .table-primary,
[data-theme="dark"] .table-primary > th,
[data-theme="dark"] .table-primary > td,
[data-theme="dark"] .table-primary > th *,
[data-theme="dark"] .table-primary > td * {
    color: #000 !important;
}

html[data-theme="dark"] .table-success,
html[data-theme="dark"] .table-success > th,
html[data-theme="dark"] .table-success > td,
html[data-theme="dark"] .table-success > th *,
html[data-theme="dark"] .table-success > td *,
[data-theme="dark"] .table-success,
[data-theme="dark"] .table-success > th,
[data-theme="dark"] .table-success > td,
[data-theme="dark"] .table-success > th *,
[data-theme="dark"] .table-success > td * {
    color: #000 !important;
}

html[data-theme="dark"] .table-warning,
html[data-theme="dark"] .table-warning > th,
html[data-theme="dark"] .table-warning > td,
html[data-theme="dark"] .table-warning > th *,
html[data-theme="dark"] .table-warning > td *,
[data-theme="dark"] .table-warning,
[data-theme="dark"] .table-warning > th,
[data-theme="dark"] .table-warning > td,
[data-theme="dark"] .table-warning > th *,
[data-theme="dark"] .table-warning > td * {
    color: #000 !important;
}

html[data-theme="dark"] .table-danger,
html[data-theme="dark"] .table-danger > th,
html[data-theme="dark"] .table-danger > td,
html[data-theme="dark"] .table-danger > th *,
html[data-theme="dark"] .table-danger > td *,
[data-theme="dark"] .table-danger,
[data-theme="dark"] .table-danger > th,
[data-theme="dark"] .table-danger > td,
[data-theme="dark"] .table-danger > th *,
[data-theme="dark"] .table-danger > td * {
    color: #000 !important;
}

[data-theme="dark"] .bg-light {
    background-color: #37404a !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom {
    border-color: #4a5568 !important;
}

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

[data-theme="dark"] .list-group-item {
    background-color: transparent;
    border-color: #4a5568;
    color: #e3eaef;
}

[data-theme="dark"] .nav-tabs {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: #aab8c5;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #2a3042;
    border-color: #4a5568 #4a5568 #2a3042;
    color: #e3eaef;
}

[data-theme="dark"] .alert-light {
    background-color: #37404a;
    border-color: #4a5568;
    color: #e3eaef;
}

/* Manufacture dashboard partial overrides */
[data-theme="dark"] .mf-kpi-card,
[data-theme="dark"] .mf-chart-card,
[data-theme="dark"] .mf-table-card,
[data-theme="dark"] .mf-panel,
[data-theme="dark"] .mf-stage-card,
[data-theme="dark"] .mf-summary-box,
[data-theme="dark"] .mf-info-card {
    background: #2a3042 !important;
    border-color: #37404a !important;
}

[data-theme="dark"] .mf-panel-header,
[data-theme="dark"] .mf-table-header {
    background: #323945 !important;
    border-color: #37404a !important;
}

[data-theme="dark"] .mf-progress-track {
    background: #37404a !important;
}

[data-theme="dark"] .mf-legend-item,
[data-theme="dark"] .mf-metric-label,
[data-theme="dark"] .mf-stage-label {
    color: #98a6ad !important;
}

[data-theme="dark"] .mf-alert-info {
    background: rgba(53, 184, 224, 0.12) !important;
}

[data-theme="dark"] .mf-alert-warning {
    background: rgba(249, 200, 81, 0.12) !important;
}

/* Manufacture dashboard */
[data-theme="dark"] .machine-card {
    background: linear-gradient(145deg, #2a3042 0%, #323945 100%);
}

[data-theme="dark"] .dashboard-chart-card {
    background: linear-gradient(180deg, #2a3042 0%, #323945 100%) !important;
}

[data-theme="dark"] .category-chart-icon {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .category-legend-item {
    background: rgba(42, 48, 66, 0.88);
    border-color: #37404a;
}

[data-theme="dark"] .category-legend-item:hover {
    border-color: rgba(114, 124, 245, 0.35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .category-legend-name {
    color: #e3eaef;
}

[data-theme="dark"] .category-legend-meta {
    color: #98a6ad;
}

[data-theme="dark"] .category-distribution-empty {
    background: rgba(42, 48, 66, 0.55);
    border-color: #37404a;
}

[data-theme="dark"] #category-pie-chart .apexcharts-datalabel-label,
[data-theme="dark"] #category-pie-chart .apexcharts-datalabel-value,
[data-theme="dark"] #category-pie-chart .apexcharts-donut-label {
    fill: #e3eaef !important;
    color: #e3eaef !important;
}

[data-theme="dark"] #category-pie-chart .apexcharts-datalabel-label,
[data-theme="dark"] #category-pie-chart .apexcharts-donut-label {
    fill: #98a6ad !important;
    color: #98a6ad !important;
}

[data-theme="dark"] .activity-item {
    border-bottom-color: #37404a;
}

[data-theme="dark"] .timeline-item::before {
    background: #37404a;
}

[data-theme="dark"] #subcatl2-chart .apexcharts-yaxis-label,
[data-theme="dark"] #subcatl2-chart .apexcharts-xaxis-label {
    fill: #aab8c5;
}

[data-theme="dark"] #subcatl2-chart .apexcharts-gridline {
    stroke: #37404a;
}

html[data-theme="light"] #moProgressQuickViewModal .mo-progress-modal-header {
    background: linear-gradient(135deg, #0f5b87 0%, #357ab8 50%, #59a7d9 100%) !important;
    color: #fff !important;
}

html[data-theme="light"] #moProgressQuickViewModal .mo-progress-modal-body {
    background: linear-gradient(180deg, #f8fcff 0%, #f2f8ff 100%) !important;
}

html[data-theme="dark"] #moProgressQuickViewModal {
    --mo-progress-ring-track: #37404a;
    --mo-progress-ring-center: #2a3042;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-modal-content {
    background: #2a3042 !important;
    border-color: #37404a !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-modal-header {
    background: linear-gradient(135deg, #2a3f4a 0%, #2a3042 100%) !important;
    color: #e3eaef !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-modal-body {
    background: #2a3042 !important;
    color: #e3eaef;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-hero {
    background: #323945 !important;
    border-color: #37404a !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-stat,
html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-step-card {
    background: #323945 !important;
    border-color: #37404a !important;
    color: #e3eaef;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-step-title {
    color: #e3eaef !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-step-machine-value {
    color: #8bbcff !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .text-muted,
html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-kicker,
html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-step-time,
html[data-theme="dark"] #moProgressQuickViewModal .mo-progress-step-machine-label {
    color: #98a6ad !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .badge-light {
    background-color: #37404a !important;
    color: #e3eaef !important;
}

html[data-theme="dark"] #moProgressQuickViewModal .modal-footer.bg-light {
    background-color: #323945 !important;
    border-top-color: #37404a !important;
}

/* Pending MOs modal */
html[data-theme="light"] #pendingMOsModal .pending-mo-modal-header {
    background: linear-gradient(135deg, #1a8aad 0%, #35b8e0 50%, #5bc9e8 100%) !important;
    color: #fff !important;
}

html[data-theme="light"] #pendingMOsModal .modal-content {
    background-color: #fff !important;
}

html[data-theme="light"] #pendingMOsModal .pending-mo-modal-body {
    background: linear-gradient(180deg, #fbfcff 0%, #f5f8ff 100%) !important;
}

html[data-theme="light"] #pendingMOsModal .pending-mo-left-pane,
html[data-theme="light"] #pendingMOsModal .pending-mo-left-pane .table,
html[data-theme="light"] #pendingMOsModal .pending-mo-left-pane .table-responsive {
    background-color: #fff !important;
}

html[data-theme="light"] #pendingMOsModal .pending-mo-right-pane {
    background: linear-gradient(165deg, #f7fbff 0%, #f1f6ff 100%) !important;
}

html[data-theme="light"] #pendingMOsModal .pending-mo-detail-card {
    background: #fff !important;
}

html[data-theme="light"] #pendingMOsModal .modal-footer.bg-light {
    background-color: #f8f9fa !important;
    border-top-color: #dee2e6 !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-modal-header {
    background: linear-gradient(135deg, #2a3f4a 0%, #2a3042 100%) !important;
    border-bottom-color: #37404a !important;
    color: #e3eaef !important;
}

html[data-theme="dark"] #pendingMOsModal .modal-content {
    background-color: #2a3042 !important;
    border-color: #37404a !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-modal-body {
    background: #2a3042 !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-left-pane,
html[data-theme="dark"] #pendingMOsModal .pending-mo-left-pane .table-responsive,
html[data-theme="dark"] #pendingMOsModal .pending-mo-left-pane .table {
    background-color: #2a3042 !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-left-pane {
    border-right-color: #37404a !important;
    border-bottom-color: #37404a !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-right-pane {
    background: #323945 !important;
}

html[data-theme="dark"] #pendingMOsModal .table thead.bg-light th {
    background-color: #37404a !important;
    color: #e3eaef !important;
}

html[data-theme="dark"] #pendingMOsModal .table tbody td {
    color: #e3eaef !important;
    border-top-color: #37404a;
}

html[data-theme="dark"] #pendingMOsModal .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-detail-card,
html[data-theme="dark"] #pendingMOsModal .pending-mo-detail-card .card-body {
    background: #2a3042 !important;
    box-shadow: none !important;
    color: #e3eaef;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-detail-title {
    color: #98a6ad !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-detail-value {
    color: #e3eaef !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-empty {
    color: #98a6ad !important;
}

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

html[data-theme="dark"] #pendingMOsModal .text-primary {
    color: #8bbcff !important;
}

html[data-theme="dark"] #pendingMOsModal .text-info {
    color: #5bc9e8 !important;
}

html[data-theme="dark"] #pendingMOsModal .badge-soft-info {
    background-color: rgba(53, 184, 224, 0.18) !important;
    color: #5bc9e8 !important;
}

html[data-theme="dark"] #pendingMOsModal .pending-mo-row-active {
    background-color: rgba(53, 184, 224, 0.12) !important;
}

html[data-theme="dark"] #pendingMOsModal .modal-footer,
html[data-theme="dark"] #pendingMOsModal .modal-footer.bg-light {
    background-color: #323945 !important;
    border-top-color: #37404a !important;
}

/* Inventory dashboard inline-style classes */
[data-theme="dark"] .inv-alert-item,
[data-theme="dark"] .inv-warehouse-card {
    background: #2a3042;
    border-color: #37404a;
}

[data-theme="dark"] .scrollable-section::-webkit-scrollbar-thumb {
    background: #4a5568;
}

/* SweetAlert2 */
[data-theme="dark"] .swal2-popup {
    background: #2a3042;
    color: #e3eaef;
}

[data-theme="dark"] .swal2-title,
[data-theme="dark"] .swal2-content {
    color: #e3eaef;
}

/* Bootstrap datetimepicker */
[data-theme="dark"] .bootstrap-datetimepicker-widget {
    background-color: #2a3042;
    color: #e3eaef;
}

[data-theme="dark"] .bootstrap-datetimepicker-widget table td,
[data-theme="dark"] .bootstrap-datetimepicker-widget table th {
    color: #e3eaef;
}

[data-theme="dark"] .bootstrap-datetimepicker-widget table td.day:hover,
[data-theme="dark"] .bootstrap-datetimepicker-widget table td.hour:hover,
[data-theme="dark"] .bootstrap-datetimepicker-widget table td.minute:hover {
    background: #37404a;
}

/* Sales dashboard pipeline */
[data-theme="dark"] .pipeline-nav .nav-link {
    background: #2a3042;
    border-color: #37404a;
}

[data-theme="dark"] .pipeline-nav .nav-link:hover {
    border-color: #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .pipeline-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(114, 124, 245, 0.12) 0%, rgba(114, 124, 245, 0.2) 100%);
    border-color: #727cf5;
}

[data-theme="dark"] .pipeline-label {
    color: #e3eaef;
}

[data-theme="dark"] .pipeline-table thead th {
    background: #323945;
    border-bottom-color: #37404a;
}

[data-theme="dark"] .pipeline-table tbody td {
    border-bottom-color: #37404a;
}

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

[data-theme="dark"] .inventory-value-code,
[data-theme="dark"] .inventory-mini-code {
    color: #98a6ad;
}

[data-theme="dark"] .inventory-value-amount,
[data-theme="dark"] .inventory-mini-amount {
    color: #e3eaef;
}

[data-theme="dark"] .inv-warehouse-card {
    background: linear-gradient(145deg, #2a3042 0%, #323945 100%);
}

[data-theme="dark"] .inv-alert-item {
    border-color: #37404a;
}

/* Management Information dashboard */
html[data-theme="dark"] .mi-module-card,
[data-theme="dark"] .mi-module-card {
    background: #2a3042 !important;
    border: 1px solid #37404a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .mi-module-card:hover,
[data-theme="dark"] .mi-module-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mi-module-header,
[data-theme="dark"] .mi-module-header {
    border-bottom-color: #37404a;
}

html[data-theme="dark"] .mi-module-header h6,
[data-theme="dark"] .mi-module-header h6 {
    color: #e3eaef;
}

html[data-theme="dark"] .mi-module-header .text-muted,
[data-theme="dark"] .mi-module-header .text-muted {
    color: #98a6ad !important;
}

html[data-theme="dark"] .mi-metric-row,
[data-theme="dark"] .mi-metric-row {
    border-bottom-color: #37404a;
    color: #aab8c5;
}

html[data-theme="dark"] .mi-metric-row .val,
[data-theme="dark"] .mi-metric-row .val {
    color: #e3eaef;
}

html[data-theme="dark"] .mi-module-body .quick-link,
[data-theme="dark"] .mi-module-body .quick-link {
    color: #a5b4fc;
}

html[data-theme="dark"] .mi-module-body .quick-link:hover,
[data-theme="dark"] .mi-module-body .quick-link:hover {
    color: #c7d2fe;
}

[data-theme="dark"] .mi-alert-item {
    background: #323945;
    border-color: #37404a;
    color: #e3eaef;
}

[data-theme="dark"] .mi-alert-item:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: #6366f1;
    color: #e3eaef;
}

[data-theme="dark"] .mi-alert-item strong {
    color: #e3eaef;
}

[data-theme="dark"] .mi-alert-item .text-muted {
    color: #98a6ad !important;
}

[data-theme="dark"] .mi-quick-report {
    background: #323945;
    border-color: #4a5568;
    color: #e3eaef !important;
}

[data-theme="dark"] .mi-quick-report i {
    color: #a5b4fc;
    opacity: 1;
}

[data-theme="dark"] .mi-quick-report:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: #818cf8;
    color: #ffffff !important;
}

[data-theme="dark"] .mi-quick-report:hover i {
    color: #ffffff;
}

html[data-theme="dark"] .chart-card .header-title,
[data-theme="dark"] .chart-card .header-title {
    color: #e3eaef;
}

[data-theme="dark"] .stat-card-gradient-indigo {
    background: linear-gradient(135deg, #2a3042 0%, rgba(99, 102, 241, 0.18) 100%);
}

[data-theme="dark"] .stat-card-gradient-gold {
    background: linear-gradient(135deg, #2a3042 0%, rgba(245, 158, 11, 0.16) 100%);
}

[data-theme="dark"] .mi-hero {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ApexCharts — dark mode tooltips and axis hovers */
[data-theme="dark"] .apexcharts-tooltip,
html[data-theme="dark"] .apexcharts-tooltip {
    background: #2a3042 !important;
    border-color: #37404a !important;
    color: #e3eaef !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-title,
html[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-title {
    background: #323945 !important;
    border-bottom-color: #37404a !important;
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-series-group,
html[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-series-group {
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-text,
html[data-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-text {
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-xaxistooltip,
html[data-theme="dark"] .apexcharts-xaxistooltip {
    background: #2a3042 !important;
    border-color: #37404a !important;
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-xaxistooltip-text,
html[data-theme="dark"] .apexcharts-xaxistooltip-text {
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-yaxistooltip,
html[data-theme="dark"] .apexcharts-yaxistooltip {
    background: #2a3042 !important;
    border-color: #37404a !important;
    color: #e3eaef !important;
}

[data-theme="dark"] .apexcharts-legend-text,
html[data-theme="dark"] .apexcharts-legend-text {
    color: #aab8c5 !important;
}
