/* ============================================================
   LRC Inventory - Dark Mode
   ============================================================ */

[data-bs-theme="dark"] {
    /* Override Bootstrap dark mode variables */
    --bs-body-bg: #1a1d23;
    --bs-body-color: #e5e7eb;
    --bs-border-color: #2d2d3f;
}

[data-bs-theme="dark"] body {
    background: #1a1d23;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e2029 !important;
}

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

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

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

[data-bs-theme="dark"] .border {
    border-color: #2d2d3f !important;
}

[data-bs-theme="dark"] .border-bottom {
    border-bottom-color: #2d2d3f !important;
}

[data-bs-theme="dark"] .border-top {
    border-top-color: #2d2d3f !important;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e5e7eb;
    --bs-table-hover-bg: rgba(255,255,255,0.03);
    --bs-table-striped-bg: rgba(255,255,255,0.02);
}

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

[data-bs-theme="dark"] .dropdown-menu {
    background: #1e2029;
    border-color: #2d2d3f;
}

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

[data-bs-theme="dark"] .dropdown-item:hover {
    background: #252733;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-header {
    color: #9ca3af;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .modal-content {
    background: #1e2029;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #2d2d3f;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #2d2d3f;
}

[data-bs-theme="dark"] .close {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .list-group-item {
    background: #1e2029;
    border-color: #2d2d3f;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .page-link {
    background: #1e2029;
    border-color: #2d2d3f;
    color: #e5e7eb;
}

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

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background: #1e2029;
    border-color: #2d2d3f;
    color: #6c757d;
}

[data-bs-theme="dark"] .page-link:hover {
    background: #252733;
    color: #fff;
}

[data-bs-theme="dark"] .input-group-text {
    background: #252733;
    border-color: #2d2d3f;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .progress {
    background: #2d2d3f;
}

[data-bs-theme="dark"] .alert-secondary {
    background: #252733;
    border-color: #2d2d3f;
    color: #e5e7eb;
}

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

[data-bs-theme="dark"] .nav-tabs .nav-link:hover,
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    color: #e5e7eb;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .accordion-item {
    background: #1e2029;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .accordion-button {
    background: #1e2029;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background: #252733;
    color: #0d6efd;
}

[data-bs-theme="dark"] .toast {
    background: #1e2029;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .toast-header {
    background: #252733;
    border-color: #2d2d3f;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #loading-overlay {
    background: rgba(0,0,0,0.5) !important;
}

[data-bs-theme="dark"] .upload-area {
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .gatepass-wrapper,
[data-bs-theme="dark"] .receipt-wrapper {
    background: #1e2029;
}

[data-bs-theme="dark"] .barcode-container {
    background: #1e2029;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .filter-panel {
    background: #252733;
}

[data-bs-theme="dark"] .info-label {
    color: #9ca3af;
}

[data-bs-theme="dark"] .activity-feed .feed-item {
    border-bottom-color: #2d2d3f;
}

[data-bs-theme="dark"] .timeline::before {
    background: #2d2d3f;
}

/*===== DASHBOARD 2.0 DARK MODE =====*/
[data-bs-theme="dark"] .kpi-card {
    background: #1e2029;
    border-color: rgba(255,255,255,0.06);
}

[data-bs-theme="dark"] .kpi-card::after {
    background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%);
}

[data-bs-theme="dark"] .kpi-value {
    color: #fff;
}

[data-bs-theme="dark"] .kpi-label {
    color: #9ca3af;
}

[data-bs-theme="dark"] .stock-tile {
    background: #252733;
    border-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .stock-tile .st-num {
    color: #fff;
}

[data-bs-theme="dark"] .stock-tile .st-label {
    color: #9ca3af;
}

[data-bs-theme="dark"] .activity-item {
    border-bottom-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .activity-item:hover {
    background: rgba(255,255,255,0.02);
}

[data-bs-theme="dark"] .activity-title {
    color: #fff;
}

[data-bs-theme="dark"] .activity-desc {
    color: #9ca3af;
}

[data-bs-theme="dark"] .lowstock-item {
    border-bottom-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .lowstock-name {
    color: #fff;
}

[data-bs-theme="dark"] .lowstock-meta {
    color: #9ca3af;
}

[data-bs-theme="dark"] .lowstock-bar {
    background: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .alert-banner-warning {
    background: linear-gradient(135deg, #2b2313, #332a15);
    color: #fcd34d;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .alert-banner-danger {
    background: linear-gradient(135deg, #2b1717, #331a1a);
    color: #fca5a5;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .alert-banner .alert-link {
    color: inherit;
}
