:root {
    --theme-bg: #ffffff;
    --theme-bg-accent-1: rgba(7, 123, 161, 0.12);
    --theme-bg-accent-2: rgba(187, 8, 8, 0.12);
    --theme-surface: #ffffff;
    --theme-surface-soft: #f7fafc;
    --theme-surface-alt: #fbfdff;
    --theme-border: #d9e6ef;
    --theme-border-strong: #c7d8e4;
    --theme-text: #446078;
    --theme-text-muted: #7e8080;
    --theme-link: #bb0808;
    --theme-link-hover: #8f0606;
    --theme-primary: #077ba1;
    --theme-primary-strong: #446078;
    --theme-success: #198754;
    --theme-warning-bg: #fff7e8;
    --theme-warning-border: #f0dfb6;
    --theme-warning-text: #6f5a2e;
    --theme-danger-bg: #fdeeee;
    --theme-danger-border: #f3c3c3;
    --theme-danger-text: #8b2f2f;
    --theme-topbar: rgba(255, 255, 255, 0.88);
    --theme-sidebar-start: #0b86af;
    --theme-sidebar-end: #446078;
    --theme-input-bg: #ffffff;
    --theme-input-text: #446078;
    --theme-placeholder: #8ba0af;
    --theme-table-head: #f8fbfd;
    --theme-table-row-hover: #f7fbff;
    --theme-shadow: 0 16px 30px -24px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] {
    --theme-bg: #0e1720;
    --theme-bg-accent-1: rgba(57, 166, 201, 0.2);
    --theme-bg-accent-2: rgba(187, 8, 8, 0.14);
    --theme-surface: #14212c;
    --theme-surface-soft: #172734;
    --theme-surface-alt: #1c2d3a;
    --theme-border: #294152;
    --theme-border-strong: #3a586c;
    --theme-text: #d7e6f0;
    --theme-text-muted: #96afbf;
    --theme-link: #ff7a7a;
    --theme-link-hover: #ff9b9b;
    --theme-primary: #39a6c9;
    --theme-primary-strong: #84b8cf;
    --theme-success: #33a06f;
    --theme-warning-bg: #392f1b;
    --theme-warning-border: #6a5830;
    --theme-warning-text: #f0d895;
    --theme-danger-bg: #3f2226;
    --theme-danger-border: #6c3940;
    --theme-danger-text: #f1b4bb;
    --theme-topbar: rgba(20, 33, 44, 0.92);
    --theme-sidebar-start: #112736;
    --theme-sidebar-end: #18384b;
    --theme-input-bg: #10202b;
    --theme-input-text: #e0edf5;
    --theme-placeholder: #7d94a3;
    --theme-table-head: #1a2b38;
    --theme-table-row-hover: #1c3242;
    --theme-shadow: 0 18px 34px -26px rgba(0, 0, 0, 0.75);
}

html[data-theme='dark'] body {
    background-color: var(--theme-bg);
    background-image: radial-gradient(circle at top right, var(--theme-bg-accent-1) 0%, transparent 48%),
        radial-gradient(circle at bottom left, var(--theme-bg-accent-2) 0%, transparent 42%);
    color: var(--theme-text);
}

html[data-theme='dark'] a:not(.btn):not([class*='btn-']) {
    color: var(--theme-link);
}

html[data-theme='dark'] a:not(.btn):not([class*='btn-']):hover,
html[data-theme='dark'] a:not(.btn):not([class*='btn-']):focus {
    color: var(--theme-link-hover);
}

html[data-theme='dark'] .scanner-button-icon,
html[data-theme='dark'] .scanner-hint-icon {
    filter: brightness(0) saturate(100%) invert(90%) sepia(15%) saturate(217%) hue-rotate(165deg) brightness(99%) contrast(93%);
}

html[data-theme='dark'] .navbar,
html[data-theme='dark'] .app-topbar,
html[data-theme='dark'] .card,
html[data-theme='dark'] .card-soft,
html[data-theme='dark'] .section-card,
html[data-theme='dark'] .report-card,
html[data-theme='dark'] .crud-card,
html[data-theme='dark'] .table-wrap,
html[data-theme='dark'] .summary-item,
html[data-theme='dark'] .preview-item,
html[data-theme='dark'] .detail-card,
html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .offcanvas,
html[data-theme='dark'] .inventory-stat,
html[data-theme='dark'] .modal-field,
html[data-theme='dark'] .items-empty-cell {
    background: var(--theme-surface) !important;
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow);
}

html[data-theme='dark'] .report-card {
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .dashboard-shell .selection-bar,
html[data-theme='dark'] .dashboard-shell .chart-card {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow);
}

html[data-theme='dark'] .dashboard-home .dash-panel,
html[data-theme='dark'] .dashboard-home .dash-panel .card-body {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
    box-shadow: var(--theme-shadow);
}

html[data-theme='dark'] .dashboard-home .dash-panel .card-header {
    background: linear-gradient(180deg, #1e3342 0%, #1a2b38 100%) !important;
    border-bottom-color: var(--theme-border) !important;
    color: #b8d4e4 !important;
}

html[data-theme='dark'] .admin-home-hero {
    background: linear-gradient(135deg, rgba(57, 166, 201, 0.14) 0%, var(--theme-surface) 45%, rgba(187, 8, 8, 0.08) 100%) !important;
}

html[data-theme='dark'] .admin-home-stat {
    background: var(--theme-surface-alt) !important;
    border-color: var(--theme-border) !important;
}

html[data-theme='dark'] .admin-home-stat__value {
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .admin-home-stat__label,
html[data-theme='dark'] .admin-module-tile__desc {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .admin-home-group__title,
html[data-theme='dark'] .admin-module-tile__title {
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .admin-home-group__count {
    background: rgba(57, 166, 201, 0.16) !important;
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .admin-home-search-icon {
    background: var(--theme-surface-alt) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .admin-module-tile:hover,
html[data-theme='dark'] .admin-module-tile:focus-visible {
    border-color: rgba(57, 166, 201, 0.45) !important;
    box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.65) !important;
}

html[data-theme='dark'] .admin-module-tile__icon--blue {
    background: rgba(57, 166, 201, 0.18) !important;
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .admin-module-tile__icon--teal {
    background: rgba(45, 212, 191, 0.14) !important;
    color: #5eead4 !important;
}

html[data-theme='dark'] .admin-module-tile__icon--green {
    background: rgba(51, 160, 111, 0.18) !important;
    color: var(--theme-success) !important;
}

html[data-theme='dark'] .admin-module-tile__icon--purple {
    background: rgba(167, 139, 250, 0.16) !important;
    color: #c4b5fd !important;
}

html[data-theme='dark'] .admin-module-tile__icon--amber {
    background: rgba(240, 216, 149, 0.14) !important;
    color: var(--theme-warning-text) !important;
}

html[data-theme='dark'] .admin-module-tile__icon--slate {
    background: rgba(132, 184, 207, 0.14) !important;
    color: var(--theme-primary-strong) !important;
}

html[data-theme='dark'] .admin-module-tile__icon--red {
    background: rgba(255, 122, 122, 0.16) !important;
    color: var(--theme-link) !important;
}

html[data-theme='dark'] .admin-module-tile__arrow {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .admin-module-tile:hover .admin-module-tile__arrow,
html[data-theme='dark'] .admin-module-tile:focus-visible .admin-module-tile__arrow {
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .admin-home-empty__icon {
    color: var(--theme-primary) !important;
}
}

html[data-theme='dark'] .dashboard-shell .chart-header {
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .dashboard-shell .chart-toggle-btn {
    background: var(--theme-surface-alt) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .dashboard-shell .chart-toggle-btn:hover,
html[data-theme='dark'] .dashboard-shell .chart-toggle-btn:focus {
    background: rgba(57, 166, 201, 0.14) !important;
    border-color: rgba(57, 166, 201, 0.4) !important;
    color: #eef9fd !important;
}

html[data-theme='dark'] .dashboard-shell .chart-toggle-btn.active {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .app-topbar {
    background: var(--theme-topbar) !important;
    border-bottom-color: var(--theme-border) !important;
    backdrop-filter: blur(12px);
}

html[data-theme='dark'] .app-sidebar,
html[data-theme='dark'] #mobileSidebar {
    background: linear-gradient(180deg, var(--theme-sidebar-start) 0%, var(--theme-sidebar-end) 100%) !important;
}

html[data-theme='dark'] .brand-logo,
html[data-theme='dark'] .dashboard-icon {
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme='dark'] .topbar-breadcrumb .breadcrumb-item a,
html[data-theme='dark'] .breadcrumb-item,
html[data-theme='dark'] .navbar-brand,
html[data-theme='dark'] .modal-title,
html[data-theme='dark'] .section-title,
html[data-theme='dark'] .detail-value,
html[data-theme='dark'] .summary-item .value,
html[data-theme='dark'] .preview-item .value,
html[data-theme='dark'] .inventory-stat-value,
html[data-theme='dark'] .inventory-code,
html[data-theme='dark'] .inventory-qty,
html[data-theme='dark'] .responsable-highlight {
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .topbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .topbar-breadcrumb .breadcrumb-item.active,
html[data-theme='dark'] .text-muted,
html[data-theme='dark'] .text-dark,
html[data-theme='dark'] .text-muted-brand,
html[data-theme='dark'] .summary-item .label,
html[data-theme='dark'] .preview-item .label,
html[data-theme='dark'] .detail-label,
html[data-theme='dark'] .inventory-stat-label,
html[data-theme='dark'] .inventory-location,
html[data-theme='dark'] .items-empty-state,
html[data-theme='dark'] .form-text,
html[data-theme='dark'] .text-secondary {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .fw-semibold.text-dark,
html[data-theme='dark'] .card .text-dark,
html[data-theme='dark'] .report-card .text-dark {
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .table,
html[data-theme='dark'] .table > :not(caption) > * > * {
    color: var(--theme-text);
    border-color: var(--theme-border);
    background-color: transparent;
}

html[data-theme='dark'] .table thead th,
html[data-theme='dark'] .crud-table-wrap table thead th,
html[data-theme='dark'] .table-wrap thead th,
html[data-theme='dark'] .operation-result .table thead th {
    background: var(--theme-table-head) !important;
    color: var(--theme-primary) !important;
    border-bottom-color: var(--theme-border) !important;
}

html[data-theme='dark'] .crud-table-wrap table tbody tr:hover,
html[data-theme='dark'] .table-hover > tbody > tr:hover > *,
html[data-theme='dark'] .table tbody tr:hover > * {
    background: var(--theme-table-row-hover) !important;
}

html[data-theme='dark'] .operation-result {
    background: linear-gradient(180deg, rgba(57, 166, 201, 0.14) 0%, rgba(20, 33, 44, 0.98) 100%) !important;
    border-color: rgba(57, 166, 201, 0.38) !important;
}

html[data-theme='dark'] .report-nav a,
html[data-theme='dark'] .report-nav span {
    background: var(--theme-surface-alt) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme='dark'] .report-nav a:hover,
html[data-theme='dark'] .report-nav a:focus {
    background: rgba(57, 166, 201, 0.14) !important;
    border-color: rgba(57, 166, 201, 0.4) !important;
    color: #eef9fd !important;
}

html[data-theme='dark'] .report-nav a.active {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .operation-result strong,
html[data-theme='dark'] .operation-result .value,
html[data-theme='dark'] .badge.text-bg-primary {
    color: #ecf8fd !important;
}

html[data-theme='dark'] .form-control,
html[data-theme='dark'] .form-select,
html[data-theme='dark'] textarea.form-control,
html[data-theme='dark'] .modal-field .form-control,
html[data-theme='dark'] .modal-field .form-select {
    background: var(--theme-input-bg) !important;
    color: var(--theme-input-text) !important;
    border-color: var(--theme-border) !important;
}

html[data-theme='dark'] .form-control::placeholder,
html[data-theme='dark'] textarea.form-control::placeholder {
    color: var(--theme-placeholder) !important;
}

html[data-theme='dark'] .form-control:focus,
html[data-theme='dark'] .form-select:focus,
html[data-theme='dark'] .modal-field .form-control:focus,
html[data-theme='dark'] .modal-field .form-select:focus {
    border-color: rgba(57, 166, 201, 0.72) !important;
    box-shadow: 0 0 0 0.2rem rgba(57, 166, 201, 0.18) !important;
}

html[data-theme='dark'] .btn-outline-secondary,
html[data-theme='dark'] .sidebar-toggle-btn,
html[data-theme='dark'] .theme-toggle-btn,
html[data-theme='dark'] .operation-counter,
html[data-theme='dark'] .topbar-user-role,
html[data-theme='dark'] .action-icon-btn,
html[data-theme='dark'] .observation-indicator {
    background: var(--theme-surface-alt) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border-strong) !important;
}

html[data-theme='dark'] .operation-counter-label {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .topbar-user-role-label {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .operation-counter-value {
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .topbar-user-role-value {
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] .btn-outline-secondary:hover,
html[data-theme='dark'] .btn-outline-secondary:focus,
html[data-theme='dark'] .sidebar-toggle-btn:hover,
html[data-theme='dark'] .theme-toggle-btn:hover,
html[data-theme='dark'] .theme-toggle-btn:focus,
html[data-theme='dark'] .action-icon-btn:hover,
html[data-theme='dark'] .action-icon-btn:focus,
html[data-theme='dark'] .observation-indicator:hover,
html[data-theme='dark'] .observation-indicator:focus {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-outline-primary {
    color: #ff9b9b;
    border-color: #ff7a7a;
}

html[data-theme='dark'] .btn-outline-primary:hover,
html[data-theme='dark'] .btn-outline-primary:focus {
    background: #ff7a7a;
    border-color: #ff7a7a;
    color: #1d0f11;
}

html[data-theme='dark'] .btn-brand,
html[data-theme='dark'] .btn-brand:hover,
html[data-theme='dark'] .btn-brand:focus,
html[data-theme='dark'] .btn-primary,
html[data-theme='dark'] .btn-primary:hover,
html[data-theme='dark'] .btn-primary:focus {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-success,
html[data-theme='dark'] .btn-success:hover,
html[data-theme='dark'] .btn-success:focus {
    background-color: var(--theme-primary-strong) !important;
    border-color: var(--theme-primary-strong) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-success:hover,
html[data-theme='dark'] .btn-success:focus {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

html[data-theme='dark'] .btn-secondary {
    background-color: var(--theme-primary-strong) !important;
    border-color: var(--theme-primary-strong) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-secondary:hover,
html[data-theme='dark'] .btn-secondary:focus {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-outline-info {
    color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    background-color: transparent !important;
}

html[data-theme='dark'] .btn-outline-info:hover,
html[data-theme='dark'] .btn-outline-info:focus {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-info {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-info:hover,
html[data-theme='dark'] .btn-info:focus {
    background-color: var(--theme-primary-strong) !important;
    border-color: var(--theme-primary-strong) !important;
    color: #08141b !important;
}

html[data-theme='dark'] .btn-outline-warning {
    color: var(--theme-warning-text) !important;
    border-color: var(--theme-warning-border) !important;
    background-color: transparent !important;
}

html[data-theme='dark'] .btn-outline-warning:hover,
html[data-theme='dark'] .btn-outline-warning:focus {
    background-color: var(--theme-warning-border) !important;
    border-color: var(--theme-warning-border) !important;
    color: #1a1408 !important;
}

html[data-theme='dark'] .btn-warning {
    background-color: var(--theme-warning-border) !important;
    border-color: var(--theme-warning-border) !important;
    color: #1a1408 !important;
}

html[data-theme='dark'] .btn-warning:hover,
html[data-theme='dark'] .btn-warning:focus {
    background-color: var(--theme-warning-text) !important;
    border-color: var(--theme-warning-text) !important;
    color: #1a1408 !important;
}

html[data-theme='dark'] .btn-outline-danger,
html[data-theme='dark'] .btn-danger-outline {
    color: var(--theme-link) !important;
    border-color: var(--theme-link) !important;
    background-color: transparent !important;
}

html[data-theme='dark'] .btn-outline-danger:hover,
html[data-theme='dark'] .btn-outline-danger:focus,
html[data-theme='dark'] .btn-danger-outline:hover,
html[data-theme='dark'] .btn-danger-outline:focus {
    background-color: var(--theme-link) !important;
    border-color: var(--theme-link) !important;
    color: #1d0f11 !important;
}

html[data-theme='dark'] .btn-danger {
    background-color: var(--theme-link) !important;
    border-color: var(--theme-link) !important;
    color: #1d0f11 !important;
}

html[data-theme='dark'] .btn-danger:hover,
html[data-theme='dark'] .btn-danger:focus {
    background-color: var(--theme-link-hover) !important;
    border-color: var(--theme-link-hover) !important;
    color: #1d0f11 !important;
}

html[data-theme='dark'] a.btn-outline-info,
html[data-theme='dark'] a.btn-outline-info:hover,
html[data-theme='dark'] a.btn-outline-info:focus {
    color: var(--theme-primary) !important;
}

html[data-theme='dark'] a.btn-outline-info:hover,
html[data-theme='dark'] a.btn-outline-info:focus {
    color: #08141b !important;
}

html[data-theme='dark'] a.btn-outline-warning,
html[data-theme='dark'] a.btn-outline-warning:hover,
html[data-theme='dark'] a.btn-outline-warning:focus {
    color: var(--theme-warning-text) !important;
}

html[data-theme='dark'] a.btn-outline-warning:hover,
html[data-theme='dark'] a.btn-outline-warning:focus {
    color: #1a1408 !important;
}

html[data-theme='dark'] a.btn-outline-danger,
html[data-theme='dark'] a.btn-danger-outline,
html[data-theme='dark'] a.btn-outline-danger:hover,
html[data-theme='dark'] a.btn-outline-danger:focus,
html[data-theme='dark'] a.btn-danger-outline:hover,
html[data-theme='dark'] a.btn-danger-outline:focus {
    color: var(--theme-link) !important;
}

html[data-theme='dark'] a.btn-outline-danger:hover,
html[data-theme='dark'] a.btn-outline-danger:focus,
html[data-theme='dark'] a.btn-danger-outline:hover,
html[data-theme='dark'] a.btn-danger-outline:focus {
    color: #1d0f11 !important;
}

html[data-theme='dark'] .btn-excel,
html[data-theme='dark'] .btn-excel:hover,
html[data-theme='dark'] .btn-excel:focus {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

html[data-theme='dark'] .btn-excel:hover,
html[data-theme='dark'] .btn-excel:focus {
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

html[data-theme='dark'] .btn-pdf,
html[data-theme='dark'] .btn-pdf:hover,
html[data-theme='dark'] .btn-pdf:focus {
    background-color: var(--accent, #bb0808) !important;
    border-color: var(--accent, #bb0808) !important;
    color: #ffffff !important;
}

html[data-theme='dark'] .btn-pdf:hover,
html[data-theme='dark'] .btn-pdf:focus {
    background-color: var(--accent-dark, #8f0606) !important;
    border-color: var(--accent-dark, #8f0606) !important;
}

html[data-theme='dark'] .page-item.active .page-link {
    color: #ffffff !important;
}

html[data-theme='dark'] .btn-light {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f3f9fc;
}

html[data-theme='dark'] .btn-light:hover,
html[data-theme='dark'] .btn-light:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

html[data-theme='dark'] .filters-actions .btn:disabled,
html[data-theme='dark'] .filters-actions .btn.disabled {
    color: var(--theme-text-muted) !important;
    border-color: var(--theme-border) !important;
    background-color: var(--theme-surface-alt) !important;
}

html[data-theme='dark'] .alert-primary,
html[data-theme='dark'] .alert-info {
    background: rgba(57, 166, 201, 0.16);
    border-color: rgba(57, 166, 201, 0.28);
    color: #d8eef7;
}

html[data-theme='dark'] .alert-warning {
    background: var(--theme-warning-bg);
    border-color: var(--theme-warning-border);
    color: var(--theme-warning-text);
}

html[data-theme='dark'] .alert-danger {
    background: var(--theme-danger-bg);
    border-color: var(--theme-danger-border);
    color: var(--theme-danger-text);
}

html[data-theme='dark'] .page-link {
    background: var(--theme-surface-alt);
    color: var(--theme-link);
    border-color: var(--theme-border);
}

html[data-theme='dark'] .page-link:hover {
    background: rgba(255, 122, 122, 0.12);
    color: var(--theme-link-hover);
    border-color: rgba(255, 122, 122, 0.28);
}

html[data-theme='dark'] .modal-header,
html[data-theme='dark'] .crud-modal .modal-header {
    background: linear-gradient(180deg, #1a2a37 0%, #14212c 100%) !important;
    border-bottom-color: var(--theme-border) !important;
}

html[data-theme='dark'] .modal-body,
html[data-theme='dark'] .crud-modal .modal-body,
html[data-theme='dark'] .modal-footer,
html[data-theme='dark'] .crud-modal .modal-footer,
html[data-theme='dark'] .offcanvas-header,
html[data-theme='dark'] .offcanvas-body {
    background: var(--theme-surface) !important;
    color: var(--theme-text);
    border-color: var(--theme-border) !important;
}

html[data-theme='dark'] .modal-content.border-0.shadow,
html[data-theme='dark'] .shadow,
html[data-theme='dark'] .shadow-sm {
    box-shadow: var(--theme-shadow) !important;
}

html[data-theme='dark'] .btn-close {
    filter: invert(1) grayscale(1);
}


html[data-theme='dark'] .theme-toggle-btn,
html[data-theme='dark'] .operation-counter,
html[data-theme='dark'] .topbar-user-role {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.15rem;
    font-weight: 600;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface);
    color: var(--theme-text);
}

html[data-theme='light'] .theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.15rem;
    font-weight: 600;
}

html[data-theme='dark'] .inventory-filter-select {
    background: var(--theme-input-bg) !important;
    color: var(--theme-input-text) !important;
    border-color: var(--theme-border) !important;
}

html[data-theme='dark'] .offcanvas .side-link.text-dark,
html[data-theme='dark'] .offcanvas .side-link.border {
    color: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme='dark'] .offcanvas .side-link:hover,
html[data-theme='dark'] .offcanvas .side-link.active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

html[data-theme='dark'] .table-responsive,
html[data-theme='dark'] .crud-table-wrap {
    scrollbar-color: #4a6578 #14212c;
}

html[data-theme='dark'] .bg-white,
html[data-theme='dark'] .bg-light {
    background-color: var(--theme-surface) !important;
}

html[data-theme='dark'] .border,
html[data-theme='dark'] .border-top,
html[data-theme='dark'] .border-bottom,
html[data-theme='dark'] .border-start,
html[data-theme='dark'] .border-end {
    border-color: var(--theme-border) !important;
}

@media (max-width: 991.98px) {
    html[data-theme='dark'] .mobile-menu-trigger {
        background: var(--theme-surface-alt);
        border-color: var(--theme-border-strong);
        color: var(--theme-text);
    }
}

html[data-theme='dark'] .auth-login {
    --login-primary: #39a6c9;
    --login-secondary: #5a7f97;
    --login-text: #d8e6ef;
    --login-muted: #9eb0bd;
    --login-surface: rgba(20, 33, 44, 0.92);
}

html[data-theme='dark'] .auth-login .login-card {
    border-color: rgba(57, 166, 201, 0.28);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

html[data-theme='dark'] .auth-login .login-input-group {
    background: var(--theme-surface-alt);
    border-color: var(--theme-border);
}

html[data-theme='dark'] .auth-login .login-input-group:focus-within {
    background: var(--theme-surface);
    border-color: var(--login-primary);
    box-shadow: 0 0 0 0.25rem rgba(57, 166, 201, 0.18);
}

html[data-theme='dark'] .auth-login .login-input-control {
    color: var(--theme-input-text);
}

html[data-theme='dark'] .auth-login .login-input-control::placeholder {
    color: var(--theme-placeholder);
}

html[data-theme='dark'] .auth-login .login-password-toggle {
    color: var(--theme-placeholder);
}

html[data-theme='dark'] .auth-login .login-password-toggle:hover,
html[data-theme='dark'] .auth-login .login-password-toggle:focus {
    color: var(--login-primary);
}

html[data-theme='dark'] .auth-login .form-check-label {
    color: var(--theme-text-muted) !important;
}

html[data-theme='dark'] .auth-login .login-alert {
    background: rgba(139, 47, 47, 0.18);
    color: #ffb4b4;
    box-shadow: inset 0 0 0 1px rgba(243, 195, 195, 0.25);
}

html[data-theme='dark'] .auth-login .shape-1 {
    background: rgba(57, 166, 201, 0.55);
}

html[data-theme='dark'] .auth-login .shape-2 {
    background: rgba(187, 8, 8, 0.28);
}

html[data-theme='dark'] .help-toggle-btn {
    background: var(--theme-surface-alt);
    border-color: var(--theme-border-strong);
    color: var(--theme-text-muted);
}

html[data-theme='dark'] .help-toggle-btn:hover,
html[data-theme='dark'] .help-toggle-btn:focus {
    background: var(--theme-surface);
    color: var(--theme-accent);
    border-color: var(--theme-border-strong);
}

html[data-theme='dark'] .help-panel {
    background: var(--theme-surface);
}

html[data-theme='dark'] .help-panel-header {
    border-bottom-color: var(--theme-border);
}

html[data-theme='dark'] .help-panel-title {
    color: var(--theme-text);
}

html[data-theme='dark'] .help-panel-close {
    color: var(--theme-text-muted);
}

html[data-theme='dark'] .help-panel-close:hover {
    background: var(--theme-surface-alt);
    color: #f08a8a;
}

html[data-theme='dark'] .help-panel-search {
    border-bottom-color: var(--theme-border);
}

html[data-theme='dark'] .help-section {
    border-color: var(--theme-border);
}

html[data-theme='dark'] .help-section-header {
    background: var(--theme-surface-alt);
}

html[data-theme='dark'] .help-section-header:hover {
    background: var(--theme-surface);
}

html[data-theme='dark'] .help-section-label {
    color: var(--theme-text);
}

html[data-theme='dark'] .help-section-chevron {
    color: var(--theme-text-muted);
}

html[data-theme='dark'] .help-item-title {
    color: var(--theme-accent);
}

html[data-theme='dark'] .help-item-content {
    color: var(--theme-text-muted);
}

html[data-theme='dark'] .help-no-results p {
    color: var(--theme-text-muted);
}