/* DARK MODE TABLE OVERRIDE - LOADS LAST */
/* This file exists solely to override any other table styling in dark mode */

[data-theme="dark"] {
    --text-color: #e4e4e7 !important;
    --bg-color: #1a1a2e !important;
    --bg-primary: #0f172a !important;
    --bg-secondary: #1e293b !important;
    --bg-tertiary: #334155 !important;
    --border-color: #475569 !important;
    --text-primary: #e4e4e7 !important;
}

/* ALL DARK MODE TABLE OVERRIDES */
[data-theme="dark"] .table,
[data-theme="dark"] .staff-table,
[data-theme="dark"] .incidents-table,
[data-theme="dark"] .goals-table,
[data-theme="dark"] .placements-table {
    color: #e4e4e7 !important;
    background-color: transparent !important;
}

[data-theme="dark"] table {
    color: #e4e4e7 !important;
}

/* Headers - Dark Mode */
[data-theme="dark"] .table thead,
[data-theme="dark"] .staff-table thead,
[data-theme="dark"] .incidents-table thead,
[data-theme="dark"] .goals-table thead,
[data-theme="dark"] .placements-table thead {
    background-color: #334155 !important;
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] .staff-table thead th,
[data-theme="dark"] .incidents-table thead th,
[data-theme="dark"] .goals-table thead th,
[data-theme="dark"] .placements-table thead th,
[data-theme="dark"] th {
    background-color: #334155 !important;
    color: #e4e4e7 !important;
    border-color: #475569 !important;
    border-bottom: 2px solid #475569 !important;
}

/* Body Rows - Dark Mode */
[data-theme="dark"] .table tbody tr,
[data-theme="dark"] .staff-table tbody tr,
[data-theme="dark"] .incidents-table tbody tr,
[data-theme="dark"] .goals-table tbody tr,
[data-theme="dark"] .placements-table tbody tr {
    background-color: #1e293b !important;
    color: #e4e4e7 !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .table tbody tr:nth-of-type(even),
[data-theme="dark"] .staff-table tbody tr:nth-of-type(even),
[data-theme="dark"] .incidents-table tbody tr:nth-of-type(even),
[data-theme="dark"] .goals-table tbody tr:nth-of-type(even),
[data-theme="dark"] .placements-table tbody tr:nth-of-type(even),
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #0f172a !important;
    color: #e4e4e7 !important;
}

/* Cells - Dark Mode */
[data-theme="dark"] .table td,
[data-theme="dark"] .staff-table td,
[data-theme="dark"] .incidents-table td,
[data-theme="dark"] .goals-table td,
[data-theme="dark"] .placements-table td,
[data-theme="dark"] td {
    color: #e4e4e7 !important;
    background-color: inherit !important;
    border-color: #475569 !important;
}

/* Hover States - Dark Mode */
[data-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] .staff-table tbody tr:hover,
[data-theme="dark"] .incidents-table tbody tr:hover,
[data-theme="dark"] .goals-table tbody tr:hover,
[data-theme="dark"] .placements-table tbody tr:hover,
[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}
