/* ───────────────────────────────────────────────────────────────
   TABLE COMPONENTS — premium refresh, theme-aware
   ─────────────────────────────────────────────────────────────── */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--surface-card-translucent);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    color: var(--text-body);
}

/* Table Head — navy in both themes */
.table thead th {
    padding: 0.5rem 1rem;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%
    );
    color: var(--color-accent-orange);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    border: none;
}

.table thead th:first-child {
    border-radius: var(--radius-lg) 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 var(--radius-lg) 0 0;
}

/* Table Body */
.table tbody tr {
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.table tbody tr:nth-child(even) {
    background: var(--surface-raised);
}

.table tbody tr:hover {
    background: var(--surface-hover);
    box-shadow: inset 0 0 0 1px var(--border-gold);
}

.table tbody td {
    padding: 0.6rem 1rem;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Table Light Variant — quiet header on surface */
.table-light thead th {
    background: var(--surface-raised);
    color: var(--text-strong);
    border-bottom: 1px solid var(--border-strong);
}

/* Table Hover */
.table-hover tbody tr:hover {
    cursor: pointer;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table thead th,
    .table tbody td {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}

/* Table Pager (reusable TablePager component) */
.table-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.25rem;
    margin-top: 0.5rem;
}

.table-pager-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-pager-size label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.table-pager-size .form-select {
    width: auto;
    min-width: 4.5rem;
}

.table-pager-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.table-pager-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.table-pager-page {
    font-size: 0.85rem;
    color: var(--text-body);
    padding: 0 0.4rem;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .table-pager {
        justify-content: center;
    }
}
