/* Fix for Dark Box Issues - Alpha Agency 752 */

/* 1. Fix Admin Panel User Management Table */
.admin-card .table.table-hover {
    background-color: white !important;
    color: #212529 !important;
}

.admin-card .table.table-hover thead {
    background-color: #667eea !important;
}

.admin-card .table.table-hover thead th {
    background-color: #667eea !important;
    color: white !important;
    border: none !important;
}

.admin-card .table.table-hover tbody tr {
    background-color: white !important;
    color: #212529 !important;
}

.admin-card .table.table-hover tbody td {
    background-color: white !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

/* Override table-dark class in admin panel */
.admin-card .table-dark,
.admin-card .table-dark thead th,
.admin-card .table-dark tbody td {
    background-color: #667eea !important;
    color: white !important;
    border-color: #495057 !important;
}

/* 2. Fix PK Events Data Table */
.pk-card .table,
.pk-card .table-responsive {
    background-color: white !important;
}

.pk-card .table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

.pk-card .table tbody tr {
    background-color: white !important;
    color: #212529 !important;
}

.pk-card .table tbody td {
    background-color: white !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

/* 3. Fix Recent Activity Lists */
.dashboard-card .list-group-item {
    background-color: white !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

.dashboard-card .list-group-item h6 {
    color: #212529 !important;
}

.dashboard-card .list-group-item p {
    color: #6c757d !important;
}

.dashboard-card .list-group-item small {
    color: #6c757d !important;
}

/* 4. Fix Calculator Input Areas */
.calculator-input,
.input-group {
    background-color: white !important;
}

.calculator-input input,
.form-control {
    background-color: white !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

/* 5. Fix Card Headers and Backgrounds */
.pk-card-header,
.admin-card-header,
.dashboard-card-header {
    background-color: #667eea !important;
    color: white !important;
    border-radius: 10px 10px 0 0 !important;
}

.pk-card,
.admin-card,
.dashboard-card {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

/* 6. Fix All Tables Globally */
.table {
    background-color: white !important;
    color: #212529 !important;
}

.table thead th {
    background-color: #667eea !important;
    color: white !important;
    border-bottom: 2px solid #495057 !important;
}

.table tbody tr {
    background-color: white !important;
}

.table tbody td {
    background-color: white !important;
    color: #212529 !important;
}

/* 7. Override any dark theme inheritance */
.table tbody tr:nth-child(odd) {
    background-color: #f8f9fa !important;
}

.table tbody tr:nth-child(even) {
    background-color: white !important;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

/* 8. Fix Form Groups and Input Areas */
.form-group,
.input-group,
.form-floating {
    background-color: transparent !important;
}

.form-control,
.form-select {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid #ced4da !important;
}

.form-control:focus,
.form-select:focus {
    background-color: white !important;
    color: #212529 !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

/* 9. Fix List Groups */
.list-group {
    background-color: transparent !important;
}

.list-group-item {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

.list-group-item:hover {
    background-color: #f8f9fa !important;
}

/* 10. Fix Modals and Dropdowns */
.modal-content {
    background-color: white !important;
    color: #212529 !important;
}

.dropdown-menu {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

.dropdown-item {
    color: #212529 !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* 11. Ensure All Text is Readable */
* {
    /* Don't force colors unless necessary, but ensure readability */
}

/* 12. Fix Any Remaining Dark Elements */
.bg-dark {
    background-color: #343a40 !important;
    color: white !important;
}

.text-dark {
    color: #212529 !important;
}

.table-dark {
    background-color: #667eea !important;
    color: white !important;
}

/* 13. Fix Registration Sheets and Data Tables */
.registration-sheet,
.data-table {
    background-color: white !important;
    color: #212529 !important;
}

.registration-sheet .table,
.data-table .table {
    background-color: white !important;
}

/* 14. Final Override for Stubborn Elements */
.table-responsive .table,
.table-responsive .table tbody,
.table-responsive .table tbody tr,
.table-responsive .table tbody td {
    background-color: white !important;
    color: #212529 !important;
}

/* 15. Fix Tool Cards and Calculator Areas */
.tool-section,
.calculator-section,
.results-section {
    background-color: white !important;
    color: #212529 !important;
}

.tool-section .card,
.calculator-section .card,
.results-section .card {
    background-color: white !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}
