.people-hero { margin-bottom: 18px; }

.people-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.people-stats article {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border-radius: 7px;
}

.people-stats strong { color: #061857; font-size: 1.8rem; line-height: 1; }
.people-stats span { color: #667085; font-size: .84rem; }
.people-stats .has-warning { border-color: #f0b429; background: #fffaf0; }

.cleanup-panel,
.directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cleanup-panel { margin-bottom: 16px; }
.cleanup-panel h2, .directory-heading h2 { margin-bottom: 5px; }
.cleanup-panel p { margin: 0; max-width: 760px; }
.people-directory { margin-bottom: 16px; }
.directory-heading { margin-bottom: 14px; }
.directory-heading small { color: #667085; }

.people-table-wrap { overflow-x: auto; border: 1px solid #e7eaf1; border-radius: 7px; }
.people-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.people-table th,
.people-table td { padding: 13px 12px; border-bottom: 1px solid #e7eaf1; vertical-align: top; text-align: left; }
.people-table th { color: #475467; background: #f8f9fc; font-size: .76rem; text-transform: uppercase; letter-spacing: .035em; }
.people-table tr:last-child td { border-bottom: 0; }
.people-table td strong,
.people-table td small { display: block; }
.people-table td small { color: #667085; margin-top: 3px; }
.people-table .owner-row { background: #fbfcff; }
.people-table .needs-review { background: #fffdf7; }
.people-table select { min-width: 120px; border-radius: 7px; }

.access-badge,
.review-ok,
.issue-list span,
.history-status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 700;
}

.access-badge.active, .review-ok, .history-status.aceptada { color: #176b45; background: #eaf8f1; }
.access-badge.pending, .history-status.pendiente { color: #8a5a00; background: #fff3d6; }
.access-badge.none, .history-status.cancelada, .history-status.caducada { color: #667085; background: #eef1f5; }
.issue-list { display: flex; flex-direction: column; gap: 5px; }
.issue-list span { color: #8a5a00; background: #fff3d6; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.row-actions .button { min-height: 34px; padding: 7px 9px; font-size: .76rem; border-radius: 7px; }
.button.danger-soft { color: #a82f2f; background: #fff1f1; border: 1px solid #f1c2c2; }
.button.danger-soft:hover { color: #fff; background: #a82f2f; }

.access-actions { margin-top: 16px; }
.empty-note { color: #667085; padding: 14px; background: #f8f9fc; border-radius: 7px; }
.invitation-history { margin-top: 16px; }
.invitation-history summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.invitation-history summary span { color: #667085; }
.history-list { display: grid; gap: 8px; margin-top: 16px; }
.history-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #e7eaf1; }
.history-list article div { min-width: 0; }
.history-list article strong, .history-list article small { display: block; overflow-wrap: anywhere; }
.history-list article small { color: #667085; margin-top: 3px; }

@media (max-width: 860px) {
    .people-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cleanup-panel, .directory-heading { align-items: flex-start; flex-direction: column; }
    .cleanup-panel form, .cleanup-panel .button { width: 100%; }
}

@media (max-width: 520px) {
    .people-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .people-stats article { padding: 13px; }
    .people-stats strong { font-size: 1.45rem; }
    .history-list article { align-items: flex-start; flex-direction: column; }
}
