/* Inventory System Dark Mode & Styling */

/* Modal Styling */
body.dark-mode .modal-content {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
}

body.dark-mode .modal-header {
    background-color: #1e293b !important; /* Overrides bg-light */
    border-bottom-color: #334155 !important;
}

body.dark-mode .modal-footer {
    background-color: #1e293b !important; /* Overrides bg-light */
    border-top-color: #334155 !important;
}

body.dark-mode .modal-title {
    color: #e2e8f0;
}

body.dark-mode .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-mode .modal-body {
    background-color: #1e293b;
}

/* Form Elements in Dark Mode */
body.dark-mode .modal-body .form-label {
    color: #94a3b8 !important; /* Overrides text-muted */
}

body.dark-mode .modal-body .form-control,
body.dark-mode .modal-body .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .modal-body .form-control:focus,
body.dark-mode .modal-body .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(6, 173, 235, 0.25);
}

body.dark-mode .modal-body .form-text {
    color: #64748b !important;
}

body.dark-mode .input-group-text {
    background-color: #0f172a !important; /* Overrides bg-white */
    border-color: #334155 !important;
    color: #94a3b8;
}

/* Buttons in Dark Mode */
body.dark-mode .btn-light {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .btn-light:hover {
    background-color: #475569;
    border-color: #64748b;
    color: #fff;
}

/* Smart Bars (Inventory List) */
body.dark-mode .smart-bar-item {
    background-color: #1e293b;
    border: 1px solid #334155 !important;
}

body.dark-mode .smart-bar-item .text-dark {
    color: #e2e8f0 !important;
}

/* Badges Dark Mode Fixes */
body.dark-mode .smart-bar-item .bg-light {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* Fix for warning/danger badges in dark mode to be more visible/darker */
body.dark-mode .smart-bar-item .bg-warning-subtle {
    background-color: rgba(234, 179, 8, 0.2) !important;
    border-color: rgba(234, 179, 8, 0.3) !important;
    color: #fef08a !important;
}

body.dark-mode .smart-bar-item .bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

body.dark-mode .smart-bar-item .bg-success {
    background-color: #15803d !important;
    color: white !important;
}

/* Log Entries Smart Bars */
.smart-bar-log {
    transition: transform 0.2s ease;
    border-left: 4px solid #06adeb !important;
}

.smart-bar-log:hover {
    transform: translateX(5px);
    background-color: #f8f9fa;
}

body.dark-mode .smart-bar-log {
    background-color: #0f172a;
    border: 1px solid #334155 !important;
    border-left: 4px solid #06adeb !important;
    color: #e2e8f0;
}

body.dark-mode .smart-bar-log:hover {
    background-color: #1e293b;
    transform: translateX(5px);
}

body.dark-mode .smart-bar-log .text-dark {
    color: #e2e8f0 !important;
}

body.dark-mode .smart-bar-log .bg-light {
    background-color: #0f172a !important;
}

/* Scrollbar styling for modal body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

body.dark-mode .modal-body::-webkit-scrollbar-track {
    background: #1e293b;
}

body.dark-mode .modal-body::-webkit-scrollbar-thumb {
    background: #475569;
}
