/* Dark Theme Table Styling - Global */
/* Apply to all tables in dark theme to ensure consistent styling */

[data-theme="dark"] .table,
[data-theme="dark"] .table-responsive .table {
    color: #f1f5f9 !important;
    background-color: #1e293b !important;
    --bs-table-bg: #1e293b !important;
    --bs-table-striped-bg: #1e293b !important;
    --bs-table-hover-bg: #334155 !important;
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] .table-responsive .table thead th {
    background-color: #1e40af !important;
    color: #ffffff !important;
    border-color: #334155 !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .table tbody tr,
[data-theme="dark"] .table-responsive .table tbody tr {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Ensure table wrapper has dark background */
[data-theme="dark"] .table-responsive {
    background-color: #1e293b !important;
}

[data-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] .table-responsive .table tbody tr:hover {
    background-color: #334155 !important;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table-responsive .table td,
[data-theme="dark"] .table tbody td {
    color: #f1f5f9 !important;
    border-color: #334155 !important;
    background-color: #1e293b !important;
}

[data-theme="dark"] .table tbody tr:hover td {
    background-color: #334155 !important;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: #334155 !important;
}

[data-theme="dark"] .table-hover tbody tr:hover td {
    background-color: #334155 !important;
}

/* Card styling for dark theme */
[data-theme="dark"] .card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .card-header {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .card-body {
    background: #1e293b !important;
}

/* Text colors */
[data-theme="dark"] .text-muted,
[data-theme="dark"] small.text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .fw-medium {
    color: #f1f5f9 !important;
}

/* Form controls */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .form-label {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .input-group-text {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

/* Filter sections */
[data-theme="dark"] .filter-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* Ensure all text in tables is light colored */
[data-theme="dark"] .table th,
[data-theme="dark"] .table td,
[data-theme="dark"] .table-responsive th,
[data-theme="dark"] .table-responsive td {
    color: #f1f5f9 !important;
}

/* Badge styling in dark theme */
[data-theme="dark"] .badge {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .badge.bg-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #000000 !important;
}

[data-theme="dark"] .badge.bg-info {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background-color: #6b7280 !important;
    color: #ffffff !important;
}
