/* Table Text Visibility Fix */
/* Force all table content to be visible */

/* Global table styling */
table, .table {
    background-color: #222328 !important;
    color: #ffffff !important;
}

/* Table cells */
table td, table th,
.table td, .table th,
.table-dark td, .table-dark th {
    color: #ffffff !important;
    background-color: transparent !important;
    border-color: #444 !important;
}

/* Table headers */
table thead th,
.table thead th,
.table-dark thead th {
    color: #ffffff !important;
    background-color: rgba(58, 215, 131, 0.2) !important;
    border-color: #3AD783 !important;
    font-weight: 600 !important;
}

/* Table body */
table tbody td,
.table tbody td,
.table-dark tbody td {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Striped tables */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    color: #ffffff !important;
    background-color: transparent !important;
}

.table-striped > tbody > tr:nth-of-type(even) > td,
.table-striped > tbody > tr:nth-of-type(even) > th {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(58, 215, 131, 0.1) !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Force all content inside tables to be white */
table *, .table * {
    color: #ffffff !important;
}

/* Badges inside tables */
table .badge, .table .badge {
    color: #ffffff !important;
}

.badge-success, .bg-success {
    background-color: #3AD783 !important;
    color: #ffffff !important;
}

.badge-danger, .bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.badge-warning, .bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

.badge-info, .bg-info {
    background-color: #17a2b8 !important;
    color: #ffffff !important;
}

.badge-primary, .bg-primary {
    background-color: #3AD783 !important;
    color: #ffffff !important;
}

/* Links inside tables */
table a, .table a {
    color: #3AD783 !important;
    text-decoration: none !important;
}

table a:hover, .table a:hover {
    color: #32c374 !important;
}

/* Buttons inside tables */
table .btn, .table .btn {
    color: #ffffff !important;
}

/* Form elements inside tables */
table input, table select, table textarea,
.table input, .table select, .table textarea {
    background-color: #191A1F !important;
    border-color: #444 !important;
    color: #ffffff !important;
}

/* Checkboxes inside tables */
table input[type="checkbox"],
.table input[type="checkbox"] {
    accent-color: #3AD783 !important;
}

/* DataTables wrapper */
.dataTables_wrapper {
    color: #ffffff !important;
    background-color: #222328 !important;
}

/* DataTables controls */
.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    color: #ffffff !important;
}

.dataTables_length label,
.dataTables_filter label {
    color: #ffffff !important;
}

.dataTables_length select,
.dataTables_filter input {
    background-color: #191A1F !important;
    border-color: #444 !important;
    color: #ffffff !important;
}

/* DataTables pagination */
.dataTables_paginate .paginate_button {
    color: #ffffff !important;
    background: #444 !important;
    border: 1px solid #666 !important;
    margin: 0 2px !important;
}

.dataTables_paginate .paginate_button:hover {
    color: #ffffff !important;
    background: #3AD783 !important;
    border: 1px solid #3AD783 !important;
}

.dataTables_paginate .paginate_button.current {
    color: #ffffff !important;
    background: #3AD783 !important;
    border: 1px solid #3AD783 !important;
}

.dataTables_paginate .paginate_button.disabled {
    color: #666 !important;
    background: #333 !important;
    border: 1px solid #444 !important;
}

/* DataTables search */
.dataTables_filter input[type="search"] {
    background-color: #191A1F !important;
    border: 1px solid #444 !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
}

.dataTables_filter input[type="search"]:focus {
    border-color: #3AD783 !important;
    box-shadow: 0 0 0 0.2rem rgba(58, 215, 131, 0.25) !important;
}

/* DataTables length select */
.dataTables_length select {
    background-color: #191A1F !important;
    border: 1px solid #444 !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* Table responsive wrapper */
.table-responsive {
    background-color: #222328 !important;
    border: 1px solid #444 !important;
    border-radius: 8px !important;
}

/* Ensure no white backgrounds override our styling */
.table-responsive .table,
.table-responsive .table-dark {
    background-color: transparent !important;
    margin-bottom: 0 !important;
}

/* Action buttons in tables */
.table .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

.table .btn-outline-primary {
    color: #3AD783 !important;
    border-color: #3AD783 !important;
}

.table .btn-outline-primary:hover {
    background-color: #3AD783 !important;
    border-color: #3AD783 !important;
    color: #ffffff !important;
}

.table .btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

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

/* Status indicators */
.status-active {
    color: #3AD783 !important;
    font-weight: 600 !important;
}

.status-inactive {
    color: #dc3545 !important;
    font-weight: 600 !important;
}

.status-pending {
    color: #ffc107 !important;
    font-weight: 600 !important;
}

/* Table loading state */
.dataTables_processing {
    background-color: rgba(34, 35, 40, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid #3AD783 !important;
}

/* Empty table message */
.dataTables_empty {
    color: #ffffff !important;
    text-align: center !important;
    padding: 2rem !important;
}

/* Table sorting */
.table th.sorting,
.table th.sorting_asc,
.table th.sorting_desc {
    color: #ffffff !important;
    cursor: pointer !important;
}

.table th.sorting:after,
.table th.sorting_asc:after,
.table th.sorting_desc:after {
    color: #3AD783 !important;
}
