/* Engage Solar — Relatórios Financeiros / Contas a Pagar. */
.es-panel--finance-report { padding: 0; }
/* Layout compartilhado das quatro telas de Relatórios Financeiros: largura fluida da área de conteúdo (sidebar respeitada),
   gutter único de 24px (16px em telas menores). O padding do .es-content é zerado só enquanto um relatório está ativo. */
.es-panel--finance-report { --efr-gutter: 24px; }
body[data-es-panel-active^="relatorios-financeiro-"] .es-content { padding-left: 0; padding-right: 0; }
.efr-shell { box-sizing: border-box; width: 100%; max-width: none; min-width: 0; margin: 0; padding: 8px var(--efr-gutter, 24px) 24px; color: #172033; }
.efr-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.efr-toolbar > div:first-child { flex: 1 1 320px; min-width: 0; }
.efr-toolbar .efr-export-actions { flex: 0 0 auto; justify-content: flex-end; }
.efr-toolbar h1 { margin: 3px 0 7px; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.efr-toolbar p { margin: 0; color: #667085; }
.efr-eyebrow { color: #087f5b !important; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.efr-export-actions, .efr-filter-actions, .efr-pagination > div { display: flex; flex-wrap: wrap; gap: 8px; }
.efr-btn { min-height: 40px; padding: 0 15px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; color: #344054; font: inherit; font-weight: 700; cursor: pointer; }
.efr-btn:hover:not(:disabled) { border-color: #079669; color: #067552; }
.efr-btn:focus-visible { outline: 3px solid rgba(16, 185, 129, .23); outline-offset: 2px; }
.efr-btn:disabled { cursor: wait; opacity: .55; }
.efr-btn--primary { border-color: #087f5b; background: #087f5b; color: #fff; }
.efr-btn--primary:hover:not(:disabled) { border-color: #066c4d; background: #066c4d; color: #fff; }
.efr-card, .efr-kpi, .efr-summary { border: 1px solid #e4e7ec; border-radius: 16px; background: #fff; box-shadow: 0 7px 22px rgba(16, 24, 40, .045); }
.efr-card { margin-bottom: 18px; padding: 20px; }
.efr-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.efr-card h2, .efr-summary h3 { margin: 0; color: #1d2939; }
.efr-card header p { margin: 4px 0 0; color: #667085; font-size: .9rem; }
.efr-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; }
.efr-filters label:not(.efr-check) { display: grid; gap: 6px; color: #475467; font-size: .79rem; font-weight: 700; }
.efr-filters input[type="date"], .efr-filters select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: #101828; font: inherit; }
.efr-filters input:focus, .efr-filters select:focus { outline: 0; border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .13); }
.efr-check { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; color: #344054; font-size: .86rem; font-weight: 700; }
.efr-check input { width: 17px; height: 17px; accent-color: #087f5b; }
.efr-filter-actions { align-items: end; justify-content: flex-end; align-self: end; }
.efr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin: 18px 0; }
.efr-kpi { min-height: 104px; padding: 17px; }
.efr-kpi span { display: block; margin-bottom: 10px; color: #667085; font-size: .78rem; font-weight: 700; }
.efr-kpi strong { color: #101828; font-size: clamp(1rem, 1.7vw, 1.35rem); }
.efr-summaries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.efr-summary { padding: 18px; }
.efr-summary h3 { margin-bottom: 12px; font-size: 1rem; }
.efr-summary p, .efr-empty { color: #667085; }
.efr-summary ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.efr-summary li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #f0f2f5; }
.efr-summary li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; }
.efr-summary li small { min-width: 24px; color: #98a2b3; text-align: right; }
.efr-monthly-list { display: grid; gap: 8px; }
.efr-month-row { display: grid; grid-template-columns: minmax(120px, .7fr) 1fr 1fr; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #f8fafb; }
.efr-month-row span { color: #475467; }
.efr-table-wrap { max-width: 100%; overflow: auto;border: 1px solid #eaecf0; border-radius: 12px; }
.efr-detail table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.efr-detail th, .efr-detail td { padding: 12px 13px; border-bottom: 1px solid #eaecf0; text-align: left; vertical-align: middle; }
.efr-detail thead th { position: sticky; top: 0; z-index: 1; background: #f8fafb; color: #475467; font-size: .75rem; text-transform: uppercase; }
.efr-detail tbody tr:hover { background: #fbfffd; }
.efr-detail .efr-money { font-weight: 750; white-space: nowrap; }
.efr-subtotal { background: #f1faf6; }
.efr-subtotal th { color: #087f5b; }
.efr-status { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: #f2f4f7; color: #475467; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.efr-status[data-status="PAID"] { background: #eafaf3; color: #067552; }
.efr-status[data-status="OVERDUE"] { background: #fff0f0; color: #b42318; }
.efr-status[data-status="OPEN"], .efr-status[data-status="PENDING"] { background: #fff8e7; color: #9a6700; }
.efr-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 15px; color: #667085; font-size: .86rem; }
.efr-loading, .efr-error, .efr-notice { margin: 18px 0; padding: 18px; border-radius: 12px; }
.efr-loading { border: 1px dashed #a7f3d0; background: #f0fdf8; color: #087f5b; }
.efr-error { border: 1px solid #fecdca; background: #fffbfa; color: #912018; }
.efr-error p { margin: 7px 0 14px; }
.efr-notice { border: 1px solid #b2ddff; background: #eff8ff; color: #175cd3; }

@media (max-width: 1180px) {
  .es-panel--finance-report { --efr-gutter: 16px; }
}

@media (max-width: 760px) {
  .efr-shell { padding-top: 8px; }
  .efr-toolbar { display: grid; }
  .efr-export-actions { display: grid; grid-template-columns: 1fr; }
  .efr-export-actions .efr-btn { width: 100%; }
  .efr-filters, .efr-kpis, .efr-summaries { grid-template-columns: 1fr; }
  .efr-filter-actions { justify-content: stretch; }
  .efr-filter-actions .efr-btn { flex: 1; }
  .efr-month-row { grid-template-columns: 1fr; }
  .efr-pagination { align-items: stretch; flex-direction: column; }
}
