/* ============================================
   Tables
   ============================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: var(--gray-50);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

table tbody tr {
    transition: background var(--transition-fast);
}

table tbody tr:hover {
    background: var(--gray-50);
}

table tbody tr:last-child td {
    border-bottom: none;
}


/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination a, .pagination span.page-num {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
}

.pagination span {
    color: var(--text-secondary);
    font-weight: 600;
}


/* ============================================
   Table Zebra Striping
   ============================================ */

table tbody tr:nth-child(even) {
    background: var(--bg-tertiary);
}

table tbody tr:hover {
    background: var(--primary-50);
}


/* ============================================
   Inline Editable Tables
   ============================================ */

.table-editable td input {
    width: 100%;
    min-width: 100px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.table-editable td button {
    white-space: nowrap;
}

