/* Consultas de transparência (PublicSoft): despesas orçamentárias. Layout 0.15: filtros em destaque, totais em cartões, resultado enxuto e detalhe em blocos. */
.saae-ps {
  --ps-line: var(--saae-line, #d6e6da);
  --ps-ink: var(--saae-ink, #15301f);
  --ps-muted: var(--saae-muted, #4b6253);
  --ps-green: var(--saae-green, #007030);
  --ps-deep: var(--saae-green-900, #083820);
  --ps-mint: var(--saae-mint, #8bcf9b);
  --ps-leaf: var(--saae-green-500, #128040);
  --ps-paper: var(--saae-paper, #f2f8f3);
  --ps-radius: 18px;
}
.saae-ps-icon { flex: none; }

/* ---- filtros ---- */
.saae-ps-filter { margin: 1.2rem 0 1.6rem; padding: 1.1rem 1.2rem 1.2rem; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; box-shadow: 0 10px 28px rgba(14, 54, 28, .06); }
.saae-ps-filter-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; color: var(--ps-green); font-family: var(--saae-font-display, inherit); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.saae-ps-filter-main { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(150px, 1fr) minmax(120px, .8fr) minmax(220px, 2fr); gap: .8rem; align-items: end; }
.saae-ps-filter label { display: grid; gap: .3rem; color: var(--ps-ink); font-size: .8rem; font-weight: 700; }
.saae-ps-filter select, .saae-ps-filter input { width: 100%; min-height: 44px; padding: .5rem .7rem; border: 1px solid #b9cfbf; border-radius: 12px; background: #fff; color: var(--ps-ink); font: inherit; font-weight: 500; }
.saae-ps-filter select:focus-visible, .saae-ps-filter input:focus-visible { border-color: var(--ps-green); outline: 3px solid rgba(0, 112, 48, .28); outline-offset: 1px; }
.saae-ps-advanced { margin-top: .9rem; border-top: 1px dashed var(--ps-line); padding-top: .8rem; }
.saae-ps-advanced summary { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; color: var(--ps-green); font-size: .86rem; font-weight: 800; }
.saae-ps-filter-adv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.saae-ps-filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
.saae-ps-submit { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .55rem 1.4rem; border: 0; border-radius: 999px; background: var(--ps-mint); color: var(--ps-deep); font: inherit; font-family: var(--saae-font-display, inherit); font-size: .92rem; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.saae-ps-submit:hover, .saae-ps-submit:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 122, 46, .25); }
.saae-ps-filter-actions a { color: var(--ps-muted); font-size: .86rem; font-weight: 700; }

/* ---- totais ---- */
.saae-ps-totals { margin: 1.6rem 0 1rem; }
.saae-ps-totals h3 { margin: 0 0 .7rem; font-family: var(--saae-font-display, inherit); font-size: 1.05rem; font-weight: 800; }
.saae-ps-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.saae-ps-kpi { position: relative; overflow: hidden; padding: 1.1rem 1.2rem 1rem; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; }
.saae-ps-kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--ps-green); }
.saae-ps-kpi.is-liquidado::before { background: var(--ps-leaf); }
.saae-ps-kpi.is-pago::before { background: var(--ps-mint); }
.saae-ps-kpi dt { color: var(--ps-muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.saae-ps-kpi dd { margin: 0; }
.saae-ps-kpi-value { margin-top: .3rem !important; color: var(--ps-ink); font-family: var(--saae-font-display, inherit); font-size: clamp(1.05rem, 1.55vw, 1.3rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.saae-ps-count { margin-top: .25rem !important; color: var(--ps-muted); font-size: .8rem; }
.saae-ps-monthly { margin: .9rem 0 1.2rem; }
.saae-ps-monthly summary { cursor: pointer; color: var(--ps-green); font-weight: 800; }

/* ---- barra de ações e resultado ---- */
.saae-ps-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin: 1.6rem 0 .4rem; }
.saae-ps-result-count { margin: 0; color: var(--ps-muted); font-size: .95rem; }
.saae-ps-result-count strong { color: var(--ps-ink); font-family: var(--saae-font-display, inherit); font-size: 1.3rem; }
.saae-ps-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.saae-ps-button { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: .5rem 1.05rem; border: 2px solid var(--ps-deep); border-radius: 999px; background: var(--ps-deep); color: #fff; font: inherit; font-size: .84rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease; }
.saae-ps-button.is-light { background: #fff; color: var(--ps-deep); }
.saae-ps-button:hover, .saae-ps-button:focus-visible { border-color: var(--ps-green); background: var(--ps-green); color: #fff; }
.saae-ps-hint { margin: 0 0 1rem; color: var(--ps-muted); font-size: .84rem; line-height: 1.5; }

.saae-ps-table-wrap { overflow-x: auto; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; }
.saae-ps-table-wrap:focus-visible { outline: 3px solid var(--ps-leaf); outline-offset: 2px; }
.saae-ps-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.saae-ps-table th, .saae-ps-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--ps-line); text-align: left; vertical-align: top; }
.saae-ps-table thead th { background: var(--ps-deep); color: #fff; font-family: var(--saae-font-display, inherit); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.saae-ps-table tbody tr:last-child td, .saae-ps-table tbody tr:last-child th { border-bottom: 0; }
.saae-ps-table tbody tr:hover { background: #f1f9f2; }
.saae-ps-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saae-ps-results { min-width: 0; }
.saae-ps-results th, .saae-ps-results td { padding: .75rem .7rem; }
.saae-ps-col-emp { white-space: nowrap; color: var(--ps-green); }
.saae-ps-col-date { white-space: nowrap; color: var(--ps-muted); }
.saae-ps-col-cred { min-width: 180px; }
.saae-ps-col-cred strong { font-weight: 800; }
.saae-ps-col-val { color: var(--ps-ink); font-weight: 800; }
.saae-ps-doc { color: var(--ps-muted); font-size: .76rem; }
.saae-ps-hist { min-width: 190px; max-width: 360px; color: #2d4a3a; font-size: .86rem; line-height: 1.45; }
.saae-ps-col-act { white-space: nowrap; }
.saae-ps-more { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border: 1.5px solid var(--ps-green); border-radius: 999px; color: var(--ps-green); font-size: .82rem; font-weight: 800; text-decoration: none; transition: background .15s ease, color .15s ease; }
.saae-ps-more:hover, .saae-ps-more:focus-visible { background: var(--ps-green); color: #fff; }
.saae-ps-more svg { width: 15px; height: 15px; }
.saae-ps-table-compact { min-width: 0; }
.saae-ps-table-compact thead th { background: var(--ps-paper); color: var(--ps-ink); }

/* ---- detalhe do empenho ---- */
.saae-ps-backwrap { margin: 0 0 1rem; }
.saae-ps-back { display: inline-flex; align-items: center; gap: .4rem; color: var(--ps-green); font-weight: 800; text-decoration: none; }
.saae-ps-back:hover { text-decoration: underline; }
.saae-ps-detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; padding: 1.3rem 1.4rem; border-radius: var(--ps-radius); background: radial-gradient(circle at 92% 0%, rgba(137, 255, 0, .28), transparent 42%), linear-gradient(135deg, #083820 0%, #007030 100%); color: #fff; }
.saae-ps-eyebrow { margin: 0; color: var(--ps-mint); font-family: var(--saae-font-display, inherit); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.saae-ps-detail-head h3 { margin: .15rem 0 .3rem; color: #fff; font-family: var(--saae-font-display, inherit); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.saae-ps-detail-meta { margin: 0; color: rgba(255, 255, 255, .88); font-size: .95rem; }
.saae-ps-detail-head .saae-ps-button { border-color: #fff; background: #fff; color: var(--ps-deep); }
.saae-ps-detail-head .saae-ps-button:hover { background: var(--ps-mint); border-color: var(--ps-mint); color: var(--ps-deep); }
.saae-ps-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 .8rem; }
.saae-ps-tile { padding: 1rem 1.2rem; border: 1px solid var(--ps-line); border-left: 6px solid var(--ps-green); border-radius: 16px; background: #fff; }
.saae-ps-tile.is-liquidado { border-left-color: var(--ps-leaf); }
.saae-ps-tile.is-pago { border-left-color: var(--ps-mint); }
.saae-ps-tile dt { color: var(--ps-muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.saae-ps-tile dd { margin: .25rem 0 0; color: var(--ps-ink); font-family: var(--saae-font-display, inherit); font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.saae-ps-balances { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: 0 0 1.4rem; color: var(--ps-muted); font-size: .9rem; }
.saae-ps-balances strong { color: var(--ps-ink); font-variant-numeric: tabular-nums; }
.saae-ps-card { margin-bottom: 1.1rem; padding: 1.1rem 1.2rem 1.2rem; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; }
.saae-ps-card h4 { margin: 0 0 .8rem; padding-bottom: .55rem; border-bottom: 2px solid var(--ps-mint); color: var(--ps-ink); font-family: var(--saae-font-display, inherit); font-size: 1rem; font-weight: 800; }
.saae-ps-dl { display: grid; gap: 0; margin: 0; }
.saae-ps-dl > div { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #edf3ee; }
.saae-ps-dl > div:last-child { border-bottom: 0; }
.saae-ps-dl dt { color: var(--ps-muted); font-size: .82rem; font-weight: 800; }
.saae-ps-dl dd { margin: 0; overflow-wrap: anywhere; }

.saae-ps-note, .saae-ps-source { margin: 1rem 0 0; color: var(--ps-muted); font-size: .82rem; line-height: 1.55; }
.saae-ps-asterisk { color: var(--ps-ink); }
.saae-ps-warning { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid #e0b64a; border-left: 5px solid #e0a100; border-radius: 12px; background: #fff8e1; color: #4a3b00; }

@media (max-width: 1100px) {
  .saae-ps-filter-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .saae-ps-filter-main .saae-ps-wide { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .saae-ps-kpis, .saae-ps-tiles, .saae-ps-filter-adv { grid-template-columns: minmax(0, 1fr); }
  .saae-ps-dl > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
}
/* celular: cada empenho vira um cartão em vez de uma tabela larga */
@media (max-width: 760px) {
  .saae-ps-filter-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .saae-ps-table-wrap { overflow: visible; border: 0; background: transparent; }
  .saae-ps-results { min-width: 0; }
  .saae-ps-results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .saae-ps-results, .saae-ps-results tbody, .saae-ps-results tr, .saae-ps-results td { display: block; width: 100%; }
  .saae-ps-results tr { margin-bottom: .9rem; padding: .9rem 1rem; border: 1px solid var(--ps-line); border-radius: 16px; background: #fff; }
  .saae-ps-results td { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: .6rem; padding: .3rem 0; border: 0; text-align: left; }
  .saae-ps-results td::before { content: attr(data-label); color: var(--ps-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding-top: .15rem; }
  .saae-ps-results td.num { text-align: left; }
  .saae-ps-results .saae-ps-hist { max-width: none; min-width: 0; }
  .saae-ps-results .saae-ps-col-cred { min-width: 0; }
  .saae-ps-results .saae-ps-col-act { padding-top: .6rem; }
}
@media (max-width: 480px) {
  .saae-ps-filter-main { grid-template-columns: minmax(0, 1fr); }
  .saae-ps-actions { width: 100%; }
  .saae-ps-button { flex: 1 1 auto; justify-content: center; }
}
@media print {
  .saae-transparency-sidebar, .saae-ps-filter, .saae-ps-actions, .saae-ps-hint, .saae-doc-pagination, .site-header, .site-footer, .utility-bar, .skip-link, .saae-ps-backwrap { display: none !important; }
  .saae-transparency-layout { display: block; }
  .saae-ps-table-wrap { overflow: visible; border: 0; }
  .saae-ps-results { min-width: 0; font-size: 9pt; }
  .saae-ps-table thead th { background: #eee; color: #000; }
  .saae-ps-detail-head { background: none; color: #000; padding: 0; }
  .saae-ps-detail-head h3, .saae-ps-detail-meta { color: #000; }
}

/* ---- consultas de receitas, extra-orçamentárias e previsões (0.17) ---- */
.saae-ps-kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.saae-psq-chip { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: #e6f6ea; color: var(--ps-green); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.saae-psq-chip.is-ded { background: #fdeceb; color: #a3261c; }
.saae-psq-neg { color: #a3261c; font-weight: 800; }
.saae-psq-grouped .saae-psq-group th, .saae-psq-grouped .saae-psq-group td { background: #eaf6ec; color: var(--ps-deep); font-family: var(--saae-font-display, inherit); font-weight: 800; border-top: 2px solid var(--ps-mint); }
.saae-psq-grouped .saae-psq-total th, .saae-psq-grouped .saae-psq-total td { background: var(--ps-deep); color: #fff; font-weight: 800; }
.saae-psq-grouped .saae-ps-col-date { width: 1%; }
.saae-psq-meter { display: block; width: 100%; height: 5px; margin-top: .35rem; border-radius: 999px; background: #e3eee6; overflow: hidden; }
.saae-psq-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #128040, #8bcf9b); }
.saae-psq-despesa .saae-ps-col-cred { min-width: 240px; }
@media (max-width: 760px) {
  .saae-psq-grouped .saae-psq-group, .saae-psq-grouped .saae-psq-total, .saae-psq-grouped .saae-psq-subtotal { padding: .8rem 1rem; border-top: 3px solid var(--ps-mint); }
  .saae-psq-grouped .saae-psq-group { background: #eaf6ec; }
  .saae-psq-grouped .saae-psq-subtotal { background: #f1f7f2; }
  .saae-psq-grouped .saae-psq-total { background: var(--ps-deep); color: #fff; border-color: var(--ps-deep); }
  .saae-psq-grouped .saae-psq-group th, .saae-psq-grouped .saae-psq-total th, .saae-psq-grouped .saae-psq-subtotal th { display: block; width: auto; padding: 0 0 .35rem; border: 0; background: transparent; text-align: left; font-size: 1rem; }
  .saae-psq-grouped .saae-psq-group td, .saae-psq-grouped .saae-psq-total td, .saae-psq-grouped .saae-psq-subtotal td { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); width: auto; padding: .15rem 0; border: 0; background: transparent; }
  .saae-psq-grouped .saae-psq-total td::before { color: #cfe8d6; }
  .saae-psq-grouped .saae-psq-group td:empty, .saae-psq-grouped .saae-psq-total td:empty, .saae-psq-grouped .saae-psq-subtotal td:empty { display: none; }
}
.saae-psq-grouped .saae-psq-subtotal th, .saae-psq-grouped .saae-psq-subtotal td { background: #f1f7f2; font-weight: 800; border-top: 2px solid var(--ps-line); }
@media (max-width: 760px) {
  .saae-psq-grouped .saae-psq-subtotal th, .saae-psq-grouped .saae-psq-subtotal td { background: transparent; border: 0; }
}

/* =====================================================================================================
   0.18 Legibilidade das consultas (ver as regras no fim de portal.css): rótulos e cabeçalhos na fonte do texto,
   em negrito, sem caixa-alta; células de tabela em 16 px; nada abaixo de 14 px.
   ===================================================================================================== */
.saae-ps-filter-title { font-size: .875rem; letter-spacing: .08em; }
.saae-ps-filter label { font-size: 1rem; }
.saae-ps-filter select, .saae-ps-filter input { min-height: 48px; font-size: 1rem; }
.saae-ps-advanced summary { font-size: 1rem; }
.saae-ps-submit { min-height: 48px; font-size: 1rem; }
.saae-ps-filter-actions a { font-size: 1rem; }
.saae-ps-totals h3 { font-size: 1.2rem; }
.saae-ps-kpi dt, .saae-ps-tile dt { font-size: .9375rem; font-weight: 700; letter-spacing: .01em; text-transform: none; }
.saae-ps-kpi-value { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.saae-ps-tile dd { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
.saae-ps-count { font-size: .9375rem; }
.saae-ps-monthly summary { font-size: 1.0625rem; }
.saae-ps-result-count { font-size: 1.0625rem; }
.saae-ps-result-count strong { font-size: 1.5rem; }
.saae-ps-button { min-height: 46px; font-size: .95rem; }
.saae-ps-hint { font-size: .9375rem; }
.saae-ps table.saae-ps-table, .entry-content table.saae-ps-table { font-size: 1rem; line-height: 1.45; } /* o tema define .entry-content table em .93rem */
.saae-ps table.saae-ps-table th, .saae-ps table.saae-ps-table td { padding: .85rem .9rem; }
.saae-ps table.saae-ps-results th, .saae-ps table.saae-ps-results td { padding: .8rem .75rem; }
.saae-ps table.saae-ps-table thead th { font-family: var(--saae-font-body, inherit); font-size: .9375rem; font-weight: 700; letter-spacing: .01em; text-transform: none; }
.saae-ps-doc { font-size: .875rem; }
.saae-ps-hist { font-size: 1rem; line-height: 1.5; }
.saae-ps-more { padding: .4rem .8rem; font-size: .9375rem; }
.saae-ps-eyebrow { font-size: .8125rem; }
.saae-ps-detail-meta { font-size: 1.0625rem; }
.saae-ps-balances { font-size: 1rem; }
.saae-ps-card h4 { font-size: 1.15rem; }
.saae-ps-dl dt { font-size: .9375rem; }
.saae-ps-note, .saae-ps-source { font-size: .9375rem; line-height: 1.6; }
.saae-psq-chip { padding: .15rem .6rem; font-size: .75rem; letter-spacing: .04em; }
@media (max-width: 760px) {
  .saae-ps-results td { grid-template-columns: 8.2rem minmax(0, 1fr); }
  .saae-ps-results td::before { font-size: .875rem; font-weight: 700; letter-spacing: .01em; text-transform: none; }
  .saae-psq-grouped .saae-psq-group td, .saae-psq-grouped .saae-psq-total td, .saae-psq-grouped .saae-psq-subtotal td { grid-template-columns: 8.2rem minmax(0, 1fr); }
}
/* tabelas agrupadas (previsão da receita): no computador o nome da receita é o link e a coluna "Detalhe" some, para a tabela caber sem rolagem lateral */
@media (min-width: 761px) {
  .saae-psq-grouped thead th:last-child, .saae-psq-grouped tbody td:last-child, .saae-psq-despesa thead th:last-child, .saae-psq-despesa tbody td:last-child { display: none; }
  .saae-psq-grouped .saae-ps-col-cred a, .saae-psq-despesa .saae-ps-col-cred a { color: var(--ps-ink); text-decoration: underline; text-decoration-color: rgba(0, 122, 46, .45); text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .saae-psq-grouped .saae-ps-col-cred a:hover, .saae-psq-grouped .saae-ps-col-cred a:focus-visible, .saae-psq-despesa .saae-ps-col-cred a:hover, .saae-psq-despesa .saae-ps-col-cred a:focus-visible { color: var(--ps-green); text-decoration-color: var(--ps-green); }
}
@media (max-width: 760px) { .saae-psq-grouped .saae-ps-col-cred a, .saae-psq-despesa .saae-ps-col-cred a { color: inherit; text-decoration: none; } }


/* ---- licitações, contratos e folha de pagamento (Elmar, 0.18) ---- */
.saae-el-pill { display: inline-flex; align-items: center; gap: .25rem; margin: .15rem .35rem .15rem 0; padding: .3rem .8rem; border: 1.5px solid var(--ps-green); border-radius: 999px; color: var(--ps-green); font-size: .9375rem; font-weight: 800; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.saae-el-pill:hover, .saae-el-pill:focus-visible { background: var(--ps-green); color: #fff; }
.saae-el-pills { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.saae-el-status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: #edf1ee; color: #3a4a41; font-size: .9375rem; font-weight: 800; line-height: 1.3; }
.saae-el-status.is-open { background: #e1f7e7; color: #00642a; }
.saae-el-status.is-done { background: #e3f3e8; color: #07582d; }
.saae-el-status.is-off { background: #fdeceb; color: #a3261c; }
.saae-el-obj { display: block; margin-top: .25rem; color: #2d4a3a; font-size: .9375rem; line-height: 1.45; }
.saae-el-table .saae-ps-col-act { white-space: normal; }
.saae-el-table .saae-ps-col-emp a { color: var(--ps-green); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.saae-el-table .saae-ps-col-emp a:hover, .saae-el-table .saae-ps-col-emp a:focus-visible { color: var(--ps-deep); }
.saae-el-sub { display: block; color: var(--ps-muted); font-size: .875rem; line-height: 1.45; }
.saae-el-money { font-variant-numeric: tabular-nums; }
.saae-el-files { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.saae-el-files a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border: 1px solid var(--ps-line); border-radius: 14px; background: #fff; color: var(--ps-ink); font-weight: 700; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.saae-el-files a:hover, .saae-el-files a:focus-visible { border-color: var(--ps-green); background: #f1f9f2; }
.saae-el-file-ico { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #e6f6ea; color: var(--ps-green); }
.saae-el-file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.saae-el-file-ext { flex: none; padding: .1rem .55rem; border-radius: 999px; background: #edf1ee; color: #3a4a41; font-size: .8125rem; font-weight: 800; letter-spacing: .04em; }
.saae-el .saae-ps-filter-main { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.saae-el .saae-ps-filter-main .saae-ps-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .saae-el .saae-ps-filter-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.saae-el-table .saae-ps-col-emp { min-width: 8.5rem; white-space: normal; }
.saae-el-table .saae-ps-col-emp strong { white-space: nowrap; }
.saae-el-table .saae-ps-col-cred { min-width: 16rem; }
.saae-el-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 .2rem; }
.saae-el-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem 1.15rem; border: 2px solid var(--ps-line); border-radius: 999px; background: #fff; color: var(--ps-ink); font-family: var(--saae-font-display, inherit); font-size: .95rem; font-weight: 800; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.saae-el-tabs a:hover, .saae-el-tabs a:focus-visible { border-color: var(--ps-green); }
.saae-el-tabs a.is-active { border-color: var(--ps-mint); background: var(--ps-mint); color: var(--ps-deep); }
.saae-el-fiscal { margin: .7rem 0; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; overflow: hidden; }
.saae-el-fiscal summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding: .95rem 1.2rem; cursor: pointer; list-style: none; }
.saae-el-fiscal summary::-webkit-details-marker { display: none; }
.saae-el-fiscal summary::after { content: "+"; flex: none; margin-left: auto; color: var(--ps-green); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.saae-el-fiscal[open] summary::after { content: "−"; }
.saae-el-fiscal summary:hover, .saae-el-fiscal summary:focus-visible { background: #f1f9f2; }
.saae-el-fiscal summary > span:first-child { display: grid; gap: .1rem; }
.saae-el-fiscal summary small { color: var(--ps-muted); font-size: .9375rem; font-weight: 600; }
.saae-el-count { color: var(--ps-green); font-size: .9375rem; font-weight: 800; }
.saae-el-fiscal ul { margin: 0; padding: .3rem 1.2rem 1rem; list-style: none; border-top: 1px solid var(--ps-line); }
.saae-el-fiscal li { padding: .75rem 0; border-bottom: 1px solid #edf3ee; font-size: 1rem; line-height: 1.5; }
.saae-el-fiscal li:last-child { border-bottom: 0; }
.saae-el-pessoal .num strong { display: block; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .saae-el-tabs a { flex: 1 1 auto; justify-content: center; }
  .saae-el-fiscal summary { padding: .85rem 1rem; }
  .saae-el-pill { white-space: normal; }
}

/* consultas sem o terceiro filtro (ex.: documentos pagos): a busca ocupa o espaço que sobra */
@media (min-width: 1101px) {
  .saae-ps-filter.has-no-extra .saae-ps-filter-main { grid-template-columns: minmax(110px, .7fr) minmax(150px, 1fr) minmax(280px, 3fr); }
}

/* documentos pagos: coluna do credor com largura mínima e CNPJ sem quebrar no meio;
   no computador o nome do credor é o link do detalhe e a coluna "Detalhe" some (no celular o botão continua no cartão) */
.saae-ps-col-credor { min-width: 15rem; }
.saae-ps-col-credor .saae-ps-doc { white-space: nowrap; }
@media (min-width: 761px) {
  .saae-psq-linked thead th:last-child, .saae-psq-linked tbody td:last-child { display: none; }
  .saae-psq-linked .saae-ps-col-credor strong a { color: var(--ps-ink); text-decoration: underline; text-decoration-color: rgba(0, 112, 48, .45); text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .saae-psq-linked .saae-ps-col-credor strong a:hover, .saae-psq-linked .saae-ps-col-credor strong a:focus-visible { color: var(--ps-green); text-decoration-color: var(--ps-green); }
}
@media (max-width: 760px) {
  .saae-psq-linked .saae-ps-col-credor strong a { color: inherit; text-decoration: none; }
  .saae-ps-col-credor { min-width: 0; }
  .saae-ps-col-credor .saae-ps-doc { white-space: normal; }
}

/* ordem cronológica dos pagamentos (16/10/2026): situação do pagamento em etiqueta (verde, âmbar ou vermelho; sem azul) e filtros com
   vários campos extras em três colunas */
.saae-oc-sit { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .875rem; font-weight: 800; white-space: nowrap; }
.saae-oc-sit.is-paga { background: #e0f6e6; color: #0b5a2b; }
.saae-oc-sit.is-parcial { background: #fff1d6; color: #7a4f00; }
.saae-oc-sit.is-apagar { background: #fde8e4; color: #9a2d1b; }
.saae-oc-col-pos { width: 5.5rem; }
.saae-oc-cell { display: block; min-width: 0; }
.saae-ps-results td.saae-oc-col-pag { min-width: 7rem; } /* a etiqueta não quebra; a linha "data · valor" do pagamento parcial pode quebrar */
.saae-ps-results td.saae-oc-col-fonte { min-width: 10rem; } /* a tabela inteira cabe no notebook (1366 px) sem rolar */
.saae-ps-results td.saae-oc-col-credor { min-width: 14rem; }
@media (max-width: 760px) { .saae-ps-results td.saae-oc-col-pag, .saae-ps-results td.saae-oc-col-fonte, .saae-ps-results td.saae-oc-col-credor { min-width: 0; } }
.saae-ps-list { display: grid; gap: .35rem; margin: 0; padding-left: 1.2rem; font-variant-numeric: tabular-nums; } /* pagamentos de uma liquidação, no detalhe */
.saae-ps-filter.has-many-extra .saae-ps-filter-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.saae-ps-filter.has-many-extra .saae-ps-filter-main .saae-ps-wide { grid-column: auto; }
@media (max-width: 760px) { .saae-ps-filter.has-many-extra .saae-ps-filter-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 480px) { .saae-ps-filter.has-many-extra .saae-ps-filter-main { grid-template-columns: minmax(0, 1fr); } }
