/* ============================================================
   Tables — Unified Design System
   Combined-Admin · Lisle Design Ltd
   ============================================================ */

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13.5px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th {
    background: var(--tbl-head-bg);
    color: var(--tbl-head-text);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    white-space: nowrap;
}

th:last-child {
    border-right: none;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--tbl-border);
    border-right: 1px solid var(--tbl-border);
    color: var(--text-primary);
    font-size: 13.5px;
    vertical-align: middle;
}

td:last-child {
    border-right: none;
}

tr {
    background: var(--tbl-row-a);
}

tr:nth-child(even) {
    background: var(--tbl-row-b);
}

tr:hover {
    background: var(--tbl-row-hover);
}

tr:last-child td {
    border-bottom: none;
}

/* ---- Named row / cell classes ---- */

.heading {
    background: var(--tbl-head-bg);
    color: var(--tbl-head-text);
}

.table-heading {
    background: var(--tbl-head-bg);
    color: var(--tbl-head-text);
}

.small-table {
    width: 50%;
    background: var(--surface-hover);
}

.logs {
    width: 60%;
}

.js-table-heading {
    border: none;
}

.no-results {
    background: #dc3545;
    color: #fff;
}

.table-tr:nth-child(odd) {
    background: var(--tbl-row-a);
}

.table-tr:nth-child(even) {
    background: var(--tbl-row-b);
}

.selected {
    background: var(--surface-hover) !important;
    outline: 2px solid var(--nav-accent) !important;
}

.sub-heading {
    border-top: 1px solid var(--tbl-border);
}

/* ---- Named table IDs ---- */

#mytable,
#searchTable,
#supportTable {
    width: 100%;
    border-spacing: 0;
}

/* ---- Sort buttons ---- */

.up-button,
.down-button {
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    border: 1px solid var(--tbl-border);
    border-radius: var(--radius);
}

/* ---- Layout helpers ---- */

.table-box {
    margin-top: 1.5rem;
}

.table-1-heading {
    background: var(--surface);
}
