.ref-list-page,
.pessoa-list-page,
.config-page {
    width: 100%;
    font-family: Arial, "Segoe UI", Roboto, sans-serif;
}

:where(.ref-list-page, .pessoa-list-page, .config-page) :where(button, input, select, textarea) {
    font: inherit;
}

.ref-page-header,
.pessoa-list__hero,
.config-hero {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    min-height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ref-space-4);
    margin-bottom: var(--ref-space-3);
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: var(--ref-radius-lg);
    color: var(--ref-header-text);
    background: var(--ref-header-gradient);
    box-shadow: var(--ref-shadow-lg);
}

.ref-page-header > *,
.pessoa-list__hero > *,
.config-hero > * {
    position: relative;
    z-index: 1;
}

.ref-page-header::after,
.pessoa-list__hero::after,
.config-hero::after {
    content: "";
    width: 142px;
    height: 142px;
    position: absolute;
    top: -70px;
    right: -34px;
    border: 22px solid var(--ref-header-accent);
    border-radius: 50%;
    pointer-events: none;
}

.ref-page-header__title,
.pessoa-list__hero-title,
.config-hero > :not(.config-hero__actions):not(.config-hero__icon) {
    min-width: 0;
}

.ref-page-header__title,
.pessoa-list__hero-title {
    display: flex;
    align-items: center;
    gap: var(--ref-space-3);
}

.ref-page-header__icon,
.pessoa-list__hero-icon,
.config-hero__icon {
    width: 48px;
    height: 48px;
    position: relative;
    z-index: 1;
    flex: 0 0 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--ref-radius-md);
    color: #fff;
    background: var(--ref-header-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    font-size: 20px;
}

.config-hero > .config-hero__icon + div {
    margin-right: auto;
}

.ref-page-header h1,
.pessoa-list__hero h1,
.config-hero h1 {
    margin: 0;
    color: var(--ref-header-text);
    font-size: 23px;
    line-height: 1.16;
}

.ref-page-header p,
.pessoa-list__hero p,
.config-hero p {
    margin: 3px 0 0;
    color: var(--ref-header-muted);
    font-size: 13px;
    line-height: 1.35;
}

.ref-eyebrow,
.pessoa-list__eyebrow,
.config-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--ref-primary-active);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

:is(.ref-page-header, .pessoa-list__hero, .config-hero) .ref-eyebrow,
:is(.ref-page-header, .pessoa-list__hero, .config-hero) .pessoa-list__eyebrow,
:is(.ref-page-header, .pessoa-list__hero, .config-hero) .config-eyebrow {
    color: var(--ref-header-muted);
}

:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button--primary, .btn-primary, .config-button--primary, .pessoa-list__button--primary),
:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button--primary, .btn-primary, .config-button--primary, .pessoa-list__button--primary):hover {
    color: var(--ref-header-action-text);
    border-color: var(--ref-header-text);
    background: var(--ref-header-text);
}

:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button--secondary, .ref-button--ghost, .btn-default, .config-button--secondary, .config-button--ghost, .pessoa-list__button--secondary),
:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button--secondary, .ref-button--ghost, .btn-default, .config-button--secondary, .config-button--ghost, .pessoa-list__button--secondary):hover {
    color: var(--ref-header-text);
    border-color: rgba(255, 255, 255, .3);
    background: var(--ref-header-accent);
}

:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button, .btn, .config-button, .pessoa-list__button):focus-visible {
    outline: 2px solid var(--ref-header-text);
    outline-offset: 2px;
}

:is(.ref-page-header, .pessoa-list__hero, .config-hero) :is(.ref-button, .btn, .config-button, .pessoa-list__button):hover {
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .06);
}

.ref-page-header__actions,
.pessoa-list__hero-actions,
.config-hero__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ref-space-2);
}

.ref-page-header__actions .ref-button,
.pessoa-list__hero-actions .pessoa-list__button,
.config-hero__actions .config-button {
    min-height: 38px;
}

.ref-summary,
.pessoa-list__summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: var(--ref-space-3);
}

.ref-summary-card,
.pessoa-list__metric {
    --ref-summary-color: var(--ref-summary-total);
    --ref-summary-soft: var(--ref-summary-total-soft);
    min-height: 84px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--ref-summary-color) 20%, var(--ref-border));
    border-radius: var(--ref-radius-md);
    color: var(--ref-text);
    background: linear-gradient(110deg, var(--ref-summary-soft) 0%, var(--ref-surface) 80%);
    box-shadow: var(--ref-shadow-sm);
}

.ref-summary-card::before,
.pessoa-list__metric::before {
    content: "";
    height: 3px;
    position: absolute;
    inset: 0 0 auto;
    background: var(--ref-summary-color);
}

.ref-summary-card--success,
.pessoa-list__metric--active {
    --ref-summary-color: var(--ref-success);
    --ref-summary-soft: var(--ref-success-soft);
}

.ref-summary-card--danger,
.pessoa-list__metric--inactive {
    --ref-summary-color: var(--ref-danger);
    --ref-summary-soft: var(--ref-danger-soft);
}

.ref-summary-card__icon,
.pessoa-list__metric-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--ref-radius-xs);
    color: var(--ref-summary-color);
    background: color-mix(in srgb, var(--ref-summary-color) 13%, var(--ref-surface));
    font-size: 14px;
}

.ref-summary-card__content,
.pessoa-list__metric > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ref-summary-card__label,
.pessoa-list__metric span:not(.pessoa-list__metric-icon) {
    color: var(--ref-text-muted);
    font-size: 12px;
    line-height: 1.25;
}

.ref-summary-card__value,
.pessoa-list__metric strong {
    color: var(--ref-text);
    font-size: 23px;
    line-height: 1.12;
}

.ref-summary-card__description {
    color: var(--ref-text-soft);
    font-size: 11px;
    line-height: 1.25;
}

.ref-summary--stacked {
    grid-template-columns: repeat(var(--ref-summary-columns, 3), minmax(0, 1fr));
}

.ref-summary--stacked .ref-summary-card {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    padding: 12px 14px;
    background: var(--ref-surface);
    text-align: left;
}

.ref-summary--stacked .ref-summary-card::before {
    background: linear-gradient(90deg, var(--ref-summary-color), transparent 82%);
}

.ref-summary--stacked .ref-summary-card::after {
    content: "";
    width: 64px;
    height: 64px;
    position: absolute;
    top: -20px;
    right: -20px;
    border-radius: 50%;
    background: var(--ref-summary-color);
    opacity: .06;
    pointer-events: none;
}

.ref-summary--stacked .ref-summary-card__value,
.ref-summary--stacked .ref-summary-card__description {
    grid-column: 1 / -1;
}

.ref-summary--stacked button.ref-summary-card {
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.ref-summary--stacked button.ref-summary-card:hover,
.ref-summary--stacked .ref-summary-card.is-active {
    border-color: var(--ref-summary-color);
    box-shadow: var(--ref-shadow-md);
}

.ref-summary--stacked .ref-summary-card:focus-visible {
    outline: 3px solid var(--ref-focus);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .ref-summary--stacked {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .ref-summary--stacked {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ref-toolbar,
.pessoa-list__toolbar,
.config-search,
.config-consulta-filters {
    --ref-control-height: 38px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--ref-space-3);
    padding: 12px;
    border: 1px solid var(--ref-border);
    border-radius: var(--ref-radius-md);
    background: var(--ref-surface);
    box-shadow: 0 3px 12px rgba(20, 55, 48, .035);
}

.ref-search,
.pessoa-list__search,
.config-search > label:first-child {
    min-width: min(100%, 220px);
    position: relative;
    flex: 1 1 360px;
    margin: 0;
}

.ref-search > i,
.pessoa-list__search > i,
.config-search > label:first-child > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: var(--ref-text-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.ref-search input,
.pessoa-list__search input,
.config-search input[type="search"] {
    width: 100%;
    height: 38px;
    padding: 7px 13px 7px 38px;
    border: 1px solid var(--ref-border);
    border-radius: var(--ref-radius-sm);
    color: var(--ref-text);
    background: var(--ref-surface-muted);
    outline: 0;
}

.ref-search input:focus,
.pessoa-list__search input:focus,
.config-search input[type="search"]:focus {
    border-color: var(--ref-primary);
    background: var(--ref-surface);
    box-shadow: 0 0 0 3px var(--ref-focus);
}

.ref-toolbar__actions,
.pessoa-list__toolbar-actions,
.ref-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.ref-filter,
.pessoa-list__filter,
.ref-quick-filter {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--ref-border);
    border-radius: 999px;
    color: var(--ref-label);
    background: var(--ref-surface-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.ref-filter:hover,
.ref-filter:focus-visible,
.pessoa-list__filter:hover,
.pessoa-list__filter:focus-visible,
.ref-quick-filter:hover,
.ref-quick-filter:focus-visible {
    outline: 0;
    color: var(--ref-primary-active);
    border-color: var(--ref-primary-border);
    background: var(--ref-primary-soft);
}

.ref-filter.is-active,
.pessoa-list__filter.is-active,
.ref-quick-filter.is-active {
    color: var(--ref-on-primary);
    border-color: var(--ref-primary);
    background: var(--ref-primary);
    box-shadow: var(--ref-button-shadow);
}

.ref-toolbar .ref-button,
.pessoa-list__toolbar .pessoa-list__filter,
.config-search .config-button,
.config-consulta-filters .config-button {
    min-height: 38px;
}

.ref-table-card,
.pessoa-list__table-card,
.config-panel,
.ref-list-page > .panel,
.ref-list-page > .card,
.ref-list-page .panel.datagrid-container,
.ref-list-page .card.datagrid-container {
    overflow: hidden;
    border: 1px solid var(--ref-border) !important;
    border-radius: var(--ref-radius-lg) !important;
    background: var(--ref-surface) !important;
    box-shadow: var(--ref-shadow-sm) !important;
}

.ref-list-panel__header,
.config-panel__header,
.ref-list-page .panel-heading,
.ref-list-page .card-header,
.pessoa-list__table-card > .panel-heading,
.pessoa-list__table-card > .card-header {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ref-border) !important;
    color: var(--ref-text);
    background: var(--ref-surface) !important;
    font-size: 16px;
}

.ref-list-panel__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ref-list-panel__header h2,
.config-panel__header h2 {
    margin: 0;
    color: var(--ref-text);
    font-size: 16px;
    line-height: 1.25;
}

.ref-list-panel__pagination-top {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ref-border);
    background: var(--ref-surface-muted);
}

.ref-table-wrap,
.config-table-wrap,
.ref-list-page .table-responsive,
.pessoa-list__table-card .table-responsive {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.ref-table,
.config-table,
.ref-list-page table,
.pessoa-list__table-card table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: var(--ref-surface);
}

.ref-table th,
.config-table th,
.ref-list-page table thead th,
.pessoa-list__table-card table thead th {
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ref-border) !important;
    color: var(--ref-text-muted) !important;
    background: var(--ref-surface-muted) !important;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: .025em;
    text-transform: uppercase;
    vertical-align: middle !important;
    white-space: nowrap;
}

.ref-table td,
.config-table td,
.ref-list-page table tbody td,
.pessoa-list__table-card table tbody td {
    padding: 10px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ref-border) !important;
    color: var(--ref-text);
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle !important;
}

.ref-table tbody tr,
.config-table tbody tr,
.ref-list-page table tbody tr,
.pessoa-list__table-card table tbody tr {
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.ref-table tbody tr:hover,
.config-table tbody tr:hover,
.ref-list-page table tbody tr:hover,
.pessoa-list__table-card table tbody tr:hover {
    background: var(--ref-primary-soft);
}

.ref-secondary,
.ref-table small,
.config-table small,
.ref-list-page table small {
    color: var(--ref-text-muted);
    font-size: 11px;
    line-height: 1.35;
}

.ref-clickable-row,
[data-ref-row-url],
[data-pessoa-edit-url] {
    cursor: pointer;
}

.ref-clickable-row:focus-visible,
[data-ref-row-url]:focus-visible,
[data-pessoa-edit-url]:focus-visible {
    outline: 0;
    box-shadow: inset 3px 0 0 var(--ref-primary);
    background: var(--ref-primary-soft);
}

.ref-table-footer,
.config-panel__footer,
.ref-list-page .panel-footer,
.ref-list-page .card-footer,
.pessoa-list__table-card > .panel-footer,
.pessoa-list__table-card > .card-footer {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ref-space-3);
    padding: 10px 14px;
    border-top: 1px solid var(--ref-border);
    color: var(--ref-text-muted);
    background: var(--ref-surface-muted) !important;
    font-size: 12px;
}

.ref-pagination,
.config-pagination,
.ref-cardapio-pagination,
[data-ref-pagination-mirror] {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 0;
}

.ref-pagination__summary {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: auto;
    color: var(--ref-text-muted);
    font-size: 12px;
}

.ref-pagination--inline {
    gap: 10px;
    flex-wrap: nowrap;
}

.ref-pagination--inline .ref-pagination__status {
    min-height: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 640px) {
    .ref-pagination--inline {
        flex-direction: column;
        align-items: stretch;
    }

    .ref-pagination--inline .ref-pagination__status {
        justify-content: center;
    }
}

.ref-pagination__button,
.config-pagination__button,
.ref-cardapio-pagination button:not(.ref-button),
[data-ref-pagination-mirror] a,
[data-ref-pagination-mirror] span[aria-disabled="true"] {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid var(--ref-border);
    border-radius: var(--ref-radius-xs);
    color: var(--ref-text-muted);
    background: var(--ref-surface);
    line-height: 1;
    text-decoration: none;
}

.ref-pagination__button:hover,
.ref-pagination__button:focus-visible,
.config-pagination__button:hover,
.config-pagination__button:focus-visible,
.ref-cardapio-pagination button:not(.ref-button):hover,
.ref-cardapio-pagination button:not(.ref-button):focus-visible,
[data-ref-pagination-mirror] a:hover,
[data-ref-pagination-mirror] a:focus-visible {
    outline: 0;
    color: var(--ref-primary-active);
    border-color: var(--ref-primary);
    background: var(--ref-primary-soft);
    box-shadow: 0 0 0 3px var(--ref-focus);
}

.ref-pagination__button:disabled,
.ref-pagination__button.is-disabled,
.config-pagination__button:disabled,
.config-pagination__button.is-disabled,
.ref-cardapio-pagination button:not(.ref-button):disabled,
[data-ref-pagination-mirror] span[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .55;
}

.ref-pagination__status,
.config-pagination__status,
.ref-cardapio-pagination__status,
[data-ref-pagination-mirror] .ref-pagination__status {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    padding: 6px 2px;
    color: var(--ref-text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ref-pagination-source,
.ref-list-page .ref-pagination-source {
    display: none !important;
}

.ref-list-page .datagrid-header-actions {
    min-height: 58px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: var(--ref-space-2);
    padding: 10px 14px;
    border-bottom: 1px solid var(--ref-border);
    background: var(--ref-surface);
}

.ref-list-page .datagrid-header-actions-left-actions,
.ref-list-page .datagrid-header-actions-right-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ref-space-2);
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
    .ref-summary-card,
    .pessoa-list__metric {
        border-color: var(--ref-border);
    }
}

@media (max-width: 780px) {
    .ref-page-header,
    .pessoa-list__hero,
    .config-hero {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .ref-page-header__title,
    .pessoa-list__hero-title,
    .config-hero > .config-hero__icon + div {
        flex: 1 1 calc(100% - 62px);
    }

    .ref-page-header__actions,
    .pessoa-list__hero-actions,
    .config-hero__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .ref-toolbar,
    .pessoa-list__toolbar,
    .config-search {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .ref-search,
    .pessoa-list__search,
    .config-search > label:first-child {
        min-width: 100%;
        flex-basis: 100%;
    }

    .ref-toolbar__actions,
    .pessoa-list__toolbar-actions {
        justify-content: flex-start;
    }

    .config-consulta-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .ref-table-footer,
    .config-panel__footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .ref-pagination__summary {
        flex-basis: 100%;
    }

    .ref-page-header,
    .pessoa-list__hero,
    .config-hero {
        padding: 13px 14px;
    }

    .ref-page-header h1,
    .pessoa-list__hero h1,
    .config-hero h1 {
        font-size: 21px;
    }

    .ref-summary,
    .pessoa-list__summary {
        grid-template-columns: 1fr;
    }

}
