/* LIGHT THEME - FINAL OVERRIDE */

body {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
}

.app-wrapper {
    background: #f3f4f6 !important;
}

.main-content {
    background: #f3f4f6 !important;
    padding: 12px !important;
}

.card,
.stats-card,
.page-header,
.empty-state,
.compact-header-card,
.compact-filter-card,
.field-selector,
.alert {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
    margin-bottom: 12px !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}

.compact-header-card,
.compact-filter-card {
    padding: 12px !important;
}

.compact-filter-card strong,
.compact-filter-card i,
.compact-filter-card button {
    color: #1f2937 !important;
}

.btn-outline-secondary {
    color: #6b7280 !important;
    background: #ffffff !important;
    border-color: #d1d5db !important;
}

.btn-outline-secondary:not(:hover) {
    color: #6b7280 !important;
    background: #ffffff !important;
}

.btn-outline-secondary:hover {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #ffffff !important;
}

.btn-group .btn:hover {
    z-index: 1;
}

.card-body,
.modal-body {
    background: #ffffff !important;
    color: #1f2937 !important;
}

.card-body {
    padding: 12px !important;
}

.card .table-responsive {
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
}

.card table {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.table {
    border-radius: 8px !important;
}

.table thead th:first-child {
    border-top-left-radius: 8px !important;
}

.table thead th:last-child {
    border-top-right-radius: 8px !important;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px !important;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px !important;
}



.card-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: #ffffff !important;
}

.modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: #ffffff !important;
}

.table thead th {
    background: #2563eb !important;
    color: #ffffff !important;
}

.table thead th:first-child {
    border-top-left-radius: 0 !important;
}

.table thead th:last-child {
    border-top-right-radius: 0 !important;
}

.card-header *,
.modal-header *,
.table thead th * {
    color: #ffffff !important;
}

.table-container {
    background: #ffffff !important;
    overflow-x: auto !important;
    border-radius: 8px !important;
}

.table tbody tr {
    background: #ffffff !important;
    color: #1f2937 !important;
}

.table tbody tr td {
    color: #1f2937 !important;
    vertical-align: middle !important;
}

.form-control,
.form-select,
#searchInput {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #d1d5db !important;
}

.form-label,
.form-check-label {
    color: #1f2937 !important;
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-secondary {
    color: #ffffff !important;
}

.btn {
    transition: all 0.2s ease !important;
}

.btn-outline-primary {
    color: #2563eb !important;
    background: #ffffff !important;
    border-color: #2563eb !important;
}

.btn-outline-success {
    color: #22c55e !important;
    background: #ffffff !important;
    border-color: #22c55e !important;
}

.btn-outline-danger {
    color: #ef4444 !important;
    background: #ffffff !important;
    border-color: #ef4444 !important;
}

a.btn-outline-primary:hover,
button.btn-outline-primary:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

a.btn-outline-success:hover,
button.btn-outline-success:hover {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

a.btn-outline-danger:hover,
button.btn-outline-danger:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

a.btn-outline-primary.active,
button.btn-outline-primary.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

a.btn-outline-success.active,
button.btn-outline-success.active {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

a.btn-outline-danger.active,
button.btn-outline-danger.active {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.modal-content {
    background: #ffffff !important;
    color: #1f2937 !important;
}

.modal-footer {
    background: #f9fafb !important;
}

.sidebar,
.sidebar *,
.nav-item {
    color: #ffffff !important;
}

.text-muted,
small {
    color: #6b7280 !important;
}

.compact-stat {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}

.stat-value {
    color: #2563eb !important;
}

.compact-stat.success .stat-value {
    color: #22c55e !important;
}

.compact-stat.danger .stat-value {
    color: #ef4444 !important;
}

.stat-label {
    color: #6b7280 !important;
}

.input-group-text {
    background: #f9fafb !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
}

h1, h2, h3, h4, h5, h6 {
    color: inherit !important;
}

.badge {
    color: #ffffff !important;
}

.badge-success {
    background: #22c55e !important;
}

.badge-danger {
    background: #ef4444 !important;
}

/* Table fixes */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

#dataTable {
    min-width: 800px;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
}



#dataTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.btn-group {
    white-space: nowrap;
}

.data-row {
    border-left: none !important;
}

.table-success-subtle {
    border-left: none !important;
    background: #ffffff !important;
}

.table-danger-subtle {
    border-left: none !important;
    background: #ffffff !important;
}

.table-success-subtle td,
.table-danger-subtle td {
    background: #ffffff !important;
}

.row.g-3 {
    margin-bottom: 12px !important;
}

/* Error filter buttons */
.error-filter-btn {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #fbbf24 !important;
}

.error-filter-btn:hover {
    color: #78350f !important;
    background: #fde68a !important;
}

.error-filter-btn i {
    color: #f59e0b !important;
}

/* Compact table */
#dataTable th,
#dataTable td {
    padding: 6px 8px !important;
    font-size: 0.875rem !important;
}

#dataTable thead th {
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
}

.cell-value {
    font-size: 0.875rem !important;
    line-height: 1.3 !important;
}

.error-msg {
    font-size: 0.75rem !important;
    display: block;
    margin-top: 2px !important;
}

.status-badge {
    font-size: 0.75rem !important;
    padding: 2px 6px !important;
}

.btn-sm {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    height: 30px !important;
}

.form-select-sm {
    padding: 4px 28px 4px 8px !important;
    font-size: 0.8rem !important;
    height: 30px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.input-group-sm .form-control,
.input-group-sm .input-group-text {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    height: 30px !important;
}
