.ahp-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--surface-default);
}

/* Quando a tabela é seguida por AhpPagination, os cantos inferiores ficam retos
   para casar com os cantos superiores retos da barra de paginação (que arredonda só embaixo). */
.ahp-table-wrapper:has(+ .ahp-pagination) {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
}

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

.ahp-table th,
.ahp-table td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.ahp-table th {
    background: var(--brand-primary);
    font-weight: 600;
    color: var(--text-on-brand);
}

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

.ahp-table tbody tr:hover {
    background: var(--surface-muted);
}

.ahp-table td.ahp-table-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--space-6);
}

.ahp-table-empty-rich {
    padding: var(--space-8) var(--space-5);
}

.ahp-table-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    color: rgba(var(--brand-primary-rgb), .35);
}

.ahp-table-empty-icon svg {
    width: 100%;
    height: 100%;
}

.ahp-table-empty-rich h3 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    letter-spacing: .02em;
    font-size: 1.4rem;
    margin: 0 0 var(--space-2);
    color: var(--text-primary);
}

.ahp-table-empty-rich p {
    margin: 0 auto var(--space-4);
    color: var(--text-secondary);
    font-size: .9rem;
    max-width: 360px;
}

.ahp-table-empty-action {
    display: flex;
    justify-content: center;
}
