/* ===== DARK MODE FORM & TABLE FIXES (ENHANCED) ===== */

/* Ensure labels and text have MAXIMUM contrast */
label,
.form-label,
.form-label * {
    color: #ffffff !important;
    font-weight: 500 !important;
}

.text-muted,
.text-muted * {
    color: rgba(255, 255, 255, 0.75) !important;
}

small,
small * {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Form Controls Dark Mode - Enhanced visibility */
.form-control,
.form-select {
    background-color: rgba(51, 65, 85, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(51, 65, 85, 0.95) !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.35) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Modal Dark Mode - Maximum readability */
.modal-content {
    background-color: rgba(30, 41, 59, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.modal-title,
.modal-header *,
.modal-body *,
.modal-footer * {
    color: #ffffff !important;
}

.modal-body {
    color: #ffffff !important;
}

/* Table Dark Mode - High contrast */
.table {
    color: #ffffff !important;
}

.table thead {
    background-color: rgba(51, 65, 85, 0.8) !important;
}

.table thead th,
.table thead * {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.table tbody tr {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.table tbody tr:hover {
    background-color: rgba(51, 65, 85, 0.8) !important;
}

.table td,
.table th,
.table td *,
.table th * {
    color: #ffffff !important;
}

.table .fw-bold {
    font-weight: 700 !important;
}

/* Code/Barcode Display - BRIGHT and visible */
code,
code * {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: #22d3ee !important;
    /* Bright cyan */
    padding: 0.3rem 0.5rem !important;
    border-radius: 6px !important;
    border: 1px solid rgba(34, 211, 238, 0.3) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

/* Badge Adjustments - High visibility */
.badge {
    font-weight: 700 !important;
}

.badge.bg-primary {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

.bg-light,
.bg-light * {
    background-color: rgba(51, 65, 85, 0.8) !important;
    color: #ffffff !important;
}

/* Buttons - Enhanced contrast */
.btn-light {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

.btn-light:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.btn-outline-info {
    color: #22d3ee !important;
    border-color: #22d3ee !important;
    font-weight: 600 !important;
}

.btn-outline-info:hover {
    background-color: #22d3ee !important;
    color: #0f172a !important;
}

/* Card titles and headers */
.card-title,
h5,
h4,
h3,
h2,
h1 {
    color: #ffffff !important;
}

/* Ensure all text in cards is visible */
.card,
.card * {
    color: #ffffff !important;
}

.card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}