/* Relatório de despesas — layout compacto (facelift 21/10/2026).
   Regras com #expenseReportDialog vencem as regras globais !important de modern-theme.css. */
#expenseReportDialog{
  --er-line:#c6d0d8;--er-line-soft:#e2e8ed;--er-ink:#25313b;--er-muted:#576673;--er-head:#e7edf3;--er-head-2:#eef2f5;
  --er-accent:#435969;--er-ctl:32px;--er-gap:7px;--er-pad:8px 10px;
  width:min(1480px,96vw);max-width:96vw;height:min(1000px,94dvh);max-height:94dvh;padding:0;border:1px solid #a5afb8;border-radius:2px;
  background:#f7f8f9;color:var(--er-ink);box-shadow:0 20px 70px #182b3c44;font:14px/1.4 'Segoe UI',Arial,sans-serif;overflow:hidden
}
#expenseReportDialog[open]{display:flex;flex-direction:column}
#expenseReportDialog::backdrop{background:#17212f66}
#expenseReportDialog *{box-sizing:border-box}
#expenseReportDialog [hidden]{display:none!important}
#expenseReportDialog button,#expenseReportDialog input,#expenseReportDialog select{
  font:inherit;font-size:13px;color:inherit;border:1px solid #b4bec8;border-radius:2px;background:#fff;min-height:var(--er-ctl);padding:3px 7px
}
#expenseReportDialog button{cursor:pointer;background:#fbfcfc}
#expenseReportDialog button:hover{background:#e5e9ed}
#expenseReportDialog button:disabled{opacity:.45;cursor:default}
#expenseReportDialog :focus-visible{outline:2px solid #49647b;outline-offset:1px}
#expenseReportDialog input[type=checkbox]{min-height:0;margin:0;accent-color:#475d6e}
#expenseReportDialog select:disabled,#expenseReportDialog input:disabled{background:#eef1f3;color:#7a8794}

/* ---- Barra superior única: título + seções + ações ---- */
#expenseReportDialog .er-header{
  display:flex;align-items:center;gap:10px;min-height:0;padding:5px 10px;background:var(--er-head);
  border-bottom:1px solid #c5ced6;flex-shrink:0
}
#expenseReportDialog .er-title{min-width:0;display:flex;align-items:baseline;gap:6px;flex-shrink:0}
#expenseReportDialog .er-title span{font:600 9.5px/1 'Segoe UI',Arial,sans-serif;letter-spacing:.1em;color:#5b6b78;text-transform:uppercase}
#expenseReportDialog .er-title h2{font:700 15px/1.15 'Segoe UI',Arial,sans-serif;margin:0;color:#1f2d38;white-space:nowrap}
#expenseReportDialog .er-actions{display:flex;align-items:center;gap:5px;flex-shrink:0;margin-left:auto}
#expenseReportDialog .er-export-label{display:flex;align-items:center;gap:4px;font:600 11px/1.2 'Segoe UI',Arial,sans-serif;color:#4d5d69;margin:0}
#expenseReportDialog [data-format]{min-height:28px;height:28px;font-size:12px;padding:1px 5px}
#expenseReportDialog .er-close{font:400 19px/1 'Segoe UI',Arial,sans-serif!important;min-height:28px!important;padding:1px 8px!important;margin-left:2px}

/* Seções (Filtros / Resultados) — vencem as regras globais de .er-tabs */
#expenseReportDialog .er-tabs{
  display:flex!important;align-items:center!important;gap:3px!important;flex:0 0 auto!important;flex-wrap:nowrap!important;
  overflow:visible!important;min-width:0!important;max-width:none!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font:inherit!important
}
#expenseReportDialog .er-tabs>button{
  flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;
  min-height:28px!important;height:auto!important;width:auto!important;margin:0!important;padding:3px 13px!important;
  font:600 12.5px/1.25 'Segoe UI',Arial,sans-serif!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;white-space:nowrap!important;
  color:#31424f!important;background:#eef2f5!important;border:1px solid var(--er-line)!important;border-radius:2px!important;box-shadow:none!important;transform:none!important
}
#expenseReportDialog .er-tabs>button[aria-current=page]{
  color:#1d3a4b!important;background:#fff!important;border-color:#8798a6!important;box-shadow:inset 0 -2px 0 var(--er-accent)!important;font-weight:700!important
}
#expenseReportDialog .er-tabs>button:hover:not([aria-current=page]){background:#e3eaf0!important}
#expenseReportDialog .er-tabs>button:focus-visible{outline:2px solid #49647b!important;outline-offset:1px!important}
#expenseReportDialog [data-count]{font-variant-numeric:tabular-nums;color:#4a6b80;font-weight:700}
#expenseReportDialog .er-actions [data-print],#expenseReportDialog .er-actions [data-export]{font-size:12.5px;min-height:28px;padding:2px 10px}

/* ---- Página única: o corpo rola inteiro, filtros em cima e resultados abaixo ---- */
#expenseReportDialog .er-body{flex:1;min-height:0;display:block;overflow:auto;padding:var(--er-pad)}
/* Filtros com a mesma linguagem visual da tabela de resultados: um painel único,
   faixa de título tintada que fica fixa no topo e campos em linhas sobre branco. */
#expenseReportDialog #er-filters{
  display:block;overflow:visible;margin:0 0 10px;
  border:1px solid var(--er-line);border-radius:2px;background:#fff
}
#expenseReportDialog .er-section{background:#fff;border:0;border-radius:0;padding:0 9px 8px;margin:0}
#expenseReportDialog .er-section+.er-section{border-top:1px solid var(--er-line)}
#expenseReportDialog .er-section>h3,#expenseReportDialog .er-section-title{
  position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;
  margin:0 -9px 7px;padding:3px 9px;background:#e3eaf0;border-bottom:1px solid var(--er-line);
  font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#3d4f5c
}
#expenseReportDialog .er-section>h3{display:block}
#expenseReportDialog .er-section-title h3{position:static;margin:0;padding:0;background:none;border:0;font:inherit;letter-spacing:inherit;color:inherit;text-transform:inherit}
#expenseReportDialog .er-shortcuts{display:flex;gap:4px;flex-wrap:wrap}
#expenseReportDialog .er-shortcuts button{font:600 11.5px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:20px!important;padding:0 9px!important;border-radius:10px!important;background:#fff!important;border:1px solid #bccbd8!important;color:#33424e!important;letter-spacing:0!important;text-transform:none!important}
#expenseReportDialog .er-shortcuts button:hover{background:#dbe6ef!important}
/* Limpar filtros fica na faixa dos filtros, em destaque ao lado dos atalhos de período. */
#expenseReportDialog .er-shortcuts-wrap{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
#expenseReportDialog .er-shortcuts-wrap .er-sep{width:1px;height:16px;background:#b3c4d1;margin:0 2px}
#expenseReportDialog .er-clear{
  display:inline-flex;align-items:center;gap:5px;
  font:700 12px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:24px!important;padding:0 12px!important;
  border-radius:12px!important;background:#fff!important;border:1px solid #6d879b!important;color:#1c3a4d!important;
  letter-spacing:0!important;text-transform:none!important;white-space:nowrap
}
#expenseReportDialog .er-clear span{font-size:11px;line-height:1}
#expenseReportDialog .er-clear:hover{background:#1f3c50!important;border-color:#1f3c50!important;color:#fff!important}
#expenseReportDialog .er-close{
  font:400 17px/1 'Segoe UI',Arial,sans-serif!important;min-height:22px!important;width:22px;padding:0!important;
  border-radius:11px!important;background:transparent!important;border:1px solid transparent!important;color:#4d6070!important;margin-left:2px
}
#expenseReportDialog .er-close:hover{background:#cdddea!important;color:#1c3a4d!important}
/* Zona de exportação, dentro da caixa de filtros. */
#expenseReportDialog .er-export-zone{margin:8px -9px 0;border-top:1px solid var(--er-line);background:#f5f8fb}
#expenseReportDialog .er-export-band{background:#e3eaf0;border-bottom:1px solid var(--er-line);padding:3px 9px}
#expenseReportDialog .er-export-band h4{margin:0;font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#3d4f5c}
#expenseReportDialog .er-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 9px 8px}
/* Imprimir e Exportar com a mesma cor clara, no diálogo e em Outros relatórios. */
#expenseReportDialog .er-export-actions .er-print,
#expenseReportDialog .er-export-actions .er-export-go{
background:#e6eef6!important;border:1px solid #a9bfd1!important;border-radius:3px!important;color:#22394b!important;
font:700 13px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:30px!important;padding:2px 14px!important;cursor:pointer}
#expenseReportDialog .er-export-actions .er-print:hover,
#expenseReportDialog .er-export-actions .er-export-go:hover{background:#d2e0ec!important;border-color:#8eaac2!important;color:#1b2f3f!important}
#expenseReportDialog .er-export-actions :is(select,input){min-height:30px!important;font-size:13px!important}
#expenseReportDialog .er-export-label{display:flex;align-items:center;gap:5px;font:600 11px/1.2 'Segoe UI',Arial,sans-serif;color:#4d5d69;margin:0}
/* Divisor entre o grupo de impressão e o grupo de exportação, na mesma faixa. */
#expenseReportDialog .er-export-sep{width:1px;height:20px;background:#c2ced8;margin:0 4px}

/* Grade adaptativa de campos */
#expenseReportDialog .er-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:6px 9px;align-items:end;padding-top:1px}
#expenseReportDialog .er-grid>label{display:grid;gap:2px;align-content:start;min-width:0;font:600 10.5px/1.25 'Segoe UI',Arial,sans-serif;color:#54636f;letter-spacing:.01em}
#expenseReportDialog .er-grid :is(input,select){width:100%;min-width:0;font-size:13px!important;min-height:var(--er-ctl)}
#expenseReportDialog .er-grid small{font:400 10px/1.3 'Segoe UI',Arial,sans-serif;color:#6d7b87}
#expenseReportDialog .er-span2{grid-column:span 2}
#expenseReportDialog .er-span3{grid-column:span 3}
#expenseReportDialog [data-codes-wrap] :is(input,small){grid-column:1}
/* Períodos adicionais como uma linha de tabela recolhível. */
#expenseReportDialog .er-advanced{margin:7px -9px 0;padding:0;border:0;border-top:1px solid var(--er-line-soft);background:#f5f8fb}
#expenseReportDialog .er-advanced summary{
  list-style:none;cursor:pointer;padding:3px 9px;margin:0;
  font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif;letter-spacing:.05em;text-transform:uppercase;color:#4a6479
}
#expenseReportDialog .er-advanced summary::-webkit-details-marker{display:none}
#expenseReportDialog .er-advanced summary::before{content:'▸';display:inline-block;width:11px;font-size:9px;color:#5a6c7a}
#expenseReportDialog .er-advanced[open] summary::before{content:'▾'}
#expenseReportDialog .er-advanced[open] summary{border-bottom:1px solid var(--er-line-soft)}
#expenseReportDialog .er-advanced .er-grid{padding:6px 9px 8px}

/* Faixas de opções (checkboxes) */
#expenseReportDialog .er-checks{
  border:0;border-top:1px dashed var(--er-line-soft);margin:6px 0 0;padding:5px 0 0;min-width:0;
  display:flex;flex-wrap:wrap;align-items:center;gap:3px 14px
}
#expenseReportDialog .er-checks-title{
  flex:0 0 auto;white-space:nowrap;font:700 10px/1.2 'Segoe UI',Arial,sans-serif;letter-spacing:.05em;text-transform:uppercase;color:#5b6b77;padding:0 6px 0 0
}
#expenseReportDialog .er-checks label,#expenseReportDialog .er-check{
  display:flex!important;align-items:center;gap:4px;font:400 11.5px/1.3 'Segoe UI',Arial,sans-serif;color:#384754;margin:0;white-space:nowrap
}
#expenseReportDialog .er-columns{border-top:0;padding:0;margin:0;grid-column:1/-1}
#expenseReportDialog .er-note{font:400 10.5px/1.4 'Segoe UI',Arial,sans-serif;color:#657684;margin:4px 0 0}
/* Grupos de cobrança em caixa, dentro do bloco de filtros. */
#expenseReportDialog .er-checks-box{
  border:1px solid var(--er-line);border-radius:2px;background:#f7fafc;
  margin:8px 0 0;padding:4px 9px 6px;gap:3px 14px
}
#expenseReportDialog .er-checks-box .er-checks-title{color:#4d6070}
/* Campo de busca com ícone de lupa. */
#expenseReportDialog .er-search input{
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697a87' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 7px center/13px 13px!important;
  padding-left:27px!important
}

/* ---- Resultados (abaixo dos filtros, na mesma página) ---- */
#expenseReportDialog #er-results{display:block;overflow:visible;min-height:0}
#expenseReportDialog .er-results-head{display:flex;flex-direction:column;gap:4px;overflow:visible;max-height:none;margin:0 0 6px}
#expenseReportDialog .er-empty{font:400 12px/1.5 'Segoe UI',Arial,sans-serif;color:#546672;background:#f4f8fb;border:1px dashed var(--er-line);border-radius:2px;padding:10px 12px;margin:0}
#expenseReportDialog .er-empty b{font-weight:700}
#expenseReportDialog #er-results[data-empty]>.er-results-head,
#expenseReportDialog #er-results[data-empty]>.er-table,
#expenseReportDialog #er-results[data-empty]>.er-result-foot{display:none}
#expenseReportDialog #er-results:not([data-empty])>.er-empty{display:none}
#expenseReportDialog .er-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) auto;border:1px solid var(--er-line);background:#fff;border-radius:2px;overflow:hidden}
#expenseReportDialog .er-summary>div{display:flex;align-items:baseline;gap:6px;padding:5px 9px;border-right:1px solid var(--er-line-soft);min-width:0}
#expenseReportDialog .er-summary>div:last-child{border-right:0}
#expenseReportDialog .er-summary span{font:600 10px/1.2 'Segoe UI',Arial,sans-serif;text-transform:uppercase;letter-spacing:.04em;color:#5c6b77;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#expenseReportDialog .er-summary strong{margin-left:auto;font:700 15px/1.15 'Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
#expenseReportDialog .er-description{font:400 11.5px/1.45 'Segoe UI',Arial,sans-serif;color:#455561;margin:0}
#expenseReportDialog .er-warning{font:400 11.5px/1.35 'Segoe UI',Arial,sans-serif;padding:5px 8px;background:#fff7e3;border-left:3px solid #a37a26;color:#634a18;margin:0}
#expenseReportDialog [data-warnings]{display:flex;flex-direction:column;gap:3px}
/* Botão único de expandir/recolher, na mesma linha dos totais (Despesas únicas). */
#expenseReportDialog .er-summary-action{align-items:center!important;justify-content:flex-end;padding:3px 8px!important}
#expenseReportDialog .er-items-toggle{font:600 11.5px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:24px!important;padding:2px 12px!important;border-radius:12px!important;background:var(--er-head-2)!important;white-space:nowrap}
#expenseReportDialog .er-items-toggle:hover{background:#d3e2ec!important}
#expenseReportDialog .er-result-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0}
#expenseReportDialog .er-result-title h3{font:700 12px/1.25 'Segoe UI',Arial,sans-serif;margin:0;color:#33434f}
#expenseReportDialog .er-result-title span{font:400 10.5px/1.3 'Segoe UI',Arial,sans-serif;color:#63737f;white-space:nowrap}
#expenseReportDialog .er-open-hint{font-size:11px;color:#4b6070;margin:0}
#expenseReportDialog .er-table{border:1px solid var(--er-line);background:#fff;border-radius:2px;overflow:visible;min-height:0;max-height:none}
#expenseReportDialog .er-table table{width:100%;border-collapse:separate;border-spacing:0;font-size:12.5px}
#expenseReportDialog .er-table th,#expenseReportDialog .er-table td{
  padding:4px 7px!important;border-bottom:1px solid var(--er-line-soft);border-right:1px solid #edf1f4;
  text-align:left;white-space:nowrap;max-width:420px;overflow:hidden;text-overflow:ellipsis;height:auto!important;min-height:0!important;line-height:1.3!important
}
/* Cabeçalho da tabela acompanha a rolagem da página (sem posição fixa). */
#expenseReportDialog .er-table th{
  background:#e3eaf0;position:static;font:700 10.5px/1.25 'Segoe UI',Arial,sans-serif;text-transform:uppercase;letter-spacing:.04em;color:#3d4f5c;
  border-bottom:1px solid #bccbd6
}
#expenseReportDialog .er-table th:last-child,#expenseReportDialog .er-table td:last-child{border-right:0}
#expenseReportDialog .er-table tbody tr:nth-child(even){background:#f6f8fa}
#expenseReportDialog .er-table tbody tr:hover{background:#eef5fa}
#expenseReportDialog .er-table .er-expense-row{background:#e5edf3;font-weight:600}
#expenseReportDialog .er-table .er-expense-row td{border-top:1px solid #b7c8d3}
#expenseReportDialog .er-table .er-number{text-align:right;font-variant-numeric:tabular-nums}

/* ---- Detalhamento (modelo Doctors): linha da despesa, procedimento e seções recolhíveis ---- */
#expenseReportDialog .er-table table.er-detailed{table-layout:auto}
#expenseReportDialog .er-detailed td.er-desc{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;overflow-wrap:anywhere}
#expenseReportDialog .er-detailed td.er-code{font-variant-numeric:tabular-nums;width:1%;white-space:nowrap}
#expenseReportDialog .er-detailed .er-inc{font-size:10px;color:#7a8794;font-style:italic}
#expenseReportDialog .er-expense-row>td{background:#e5edf3;padding:5px 7px!important;border-top:1px solid #b7c8d3;border-bottom:1px solid #ccd8e1}
/* Linha da despesa abre o lançamento com duplo clique. */
#expenseReportDialog .er-expense-row.er-openable{cursor:pointer}
#expenseReportDialog .er-expense-row.er-openable:hover>td{background:#dce8f1}
#expenseReportDialog .er-exp{display:flex;align-items:baseline;justify-content:space-between;gap:6px 14px;flex-wrap:wrap}
#expenseReportDialog .er-exp-id{min-width:0;display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
#expenseReportDialog .er-exp-id b{font:700 12.5px/1.25 'Segoe UI',Arial,sans-serif;color:#1f2d38}
#expenseReportDialog .er-exp-meta{font:400 10.5px/1.3 'Segoe UI',Arial,sans-serif;color:#576673}
#expenseReportDialog .er-exp-totals{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;font:600 11.5px/1.25 'Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums;color:#2c3d4a;white-space:nowrap}
#expenseReportDialog .er-exp-totals i{font-style:normal;font-weight:400;color:#63737f;text-transform:uppercase;font-size:9.5px;letter-spacing:.04em;margin-right:2px}
#expenseReportDialog .er-exp-sum{font-weight:700}
#expenseReportDialog .er-exp-totals .er-exp-sum{padding-left:10px;border-left:1px solid #b3c4d1}
#expenseReportDialog .er-exp-totals .er-exp-sum i{color:#243642;font-weight:600}
#expenseReportDialog .er-exp-recorded{color:#8a5a12}
/* Faixas de seção com tons próprios (sem cinza) para diferenciar procedimento, material e taxa. */
#expenseReportDialog .er-section-row>td{padding:2px 7px!important;border-top:1px solid #cdd8e2;cursor:pointer;user-select:none}
#expenseReportDialog .er-section-row:focus-visible>td{outline:2px solid #49647b;outline-offset:-2px}
#expenseReportDialog .er-section-row[data-toggle=procedures]>td{background:#dbe8f4}
#expenseReportDialog .er-section-row[data-toggle=procedures]:hover>td{background:#cddef0}
#expenseReportDialog .er-section-row[data-toggle=procedures] .er-chev,#expenseReportDialog .er-section-row[data-toggle=procedures] .er-sect-label{color:#1e4a6b}
#expenseReportDialog .er-section-row[data-toggle=materials]>td{background:#d8efe1}
#expenseReportDialog .er-section-row[data-toggle=materials]:hover>td{background:#c7e8d4}
#expenseReportDialog .er-section-row[data-toggle=materials] .er-chev,#expenseReportDialog .er-section-row[data-toggle=materials] .er-sect-label{color:#1c5a3b}
#expenseReportDialog .er-section-row[data-toggle=fees]>td{background:#fae6ca}
#expenseReportDialog .er-section-row[data-toggle=fees]:hover>td{background:#f6d9b0}
#expenseReportDialog .er-section-row[data-toggle=fees] .er-chev,#expenseReportDialog .er-section-row[data-toggle=fees] .er-sect-label{color:#7a4a08}
/* Materiais/medicamentos e taxas ficam sob o procedimento: a faixa da seção
   também recua, com a mesma marca lateral dos itens, para o recuo valer para o
   bloco inteiro e não só para as linhas de item. */
#expenseReportDialog .er-section-row[data-nested=true]>td{padding-left:21px!important}
#expenseReportDialog .er-section-row[data-nested=true][data-toggle=materials]>td{box-shadow:inset 3px 0 0 #7cc39b}
#expenseReportDialog .er-section-row[data-nested=true][data-toggle=fees]>td{box-shadow:inset 3px 0 0 #dfa95c}
#expenseReportDialog .er-sec{display:flex;align-items:baseline;gap:7px;font:700 10.5px/1.5 'Segoe UI',Arial,sans-serif;letter-spacing:.05em;text-transform:uppercase;color:#3d4f5c}
#expenseReportDialog .er-chev{flex:0 0 auto;width:11px;font-size:10px;color:#5a6c7a}
#expenseReportDialog .er-sect-label{flex:0 0 auto}
#expenseReportDialog .er-sect-count{flex:0 0 auto;font-weight:400;text-transform:none;letter-spacing:0;font-size:10.5px;color:#5a6a76}
#expenseReportDialog .er-sect-total{margin-left:auto;font-variant-numeric:tabular-nums;font-size:11.5px;color:#243642;text-transform:none;letter-spacing:0}
/* Itens recuados: procedimento em primeiro nível (14px), materiais/medicamentos
   e taxas em segundo (34px) quando estão sob um procedimento. */
#expenseReportDialog .er-item-row>td{background:#fff}
#expenseReportDialog .er-item-row>td:first-child{padding-left:14px!important}
#expenseReportDialog .er-item-row[data-nested=true]>td:first-child{padding-left:34px!important}
#expenseReportDialog .er-item-row[data-section=procedures]:hover>td{background:#f4f8fc}
#expenseReportDialog .er-item-row[data-section=materials]>td{background:#f1faf5;box-shadow:inset 3px 0 0 #7cc39b}
#expenseReportDialog .er-item-row[data-section=materials]:hover>td{background:#e3f5eb}
#expenseReportDialog .er-item-row[data-section=fees]>td{background:#fff9f0;box-shadow:inset 3px 0 0 #dfa95c}
#expenseReportDialog .er-item-row[data-section=fees]:hover>td{background:#fdeed9}
#expenseReportDialog .er-item-row[hidden]{display:none!important}
/* Faixa branca entre uma despesa e a seguinte, para separar os resultados. */
#expenseReportDialog .er-table .er-spacer-row>td{height:11px!important;min-height:11px!important;padding:0!important;border:0!important;background:#fff!important;line-height:0!important;font-size:0}
#expenseReportDialog .er-result-foot{display:flex;align-items:center;gap:10px;margin:6px 0 0}
#expenseReportDialog .er-result-foot .er-note{flex:1;min-width:0;margin:0}
#expenseReportDialog .er-more{display:flex;flex:0 0 auto}
#expenseReportDialog .er-more button{font-size:11.5px;min-height:26px;padding:2px 10px}

/* ---- Rodapé de ações ---- */
#expenseReportDialog .er-footer{
  border-top:1px solid #bfcad3;background:var(--er-head);display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:5px 10px;flex-shrink:0
}
#expenseReportDialog .er-footer p{margin:0;font-size:11.5px;color:#3f4d59;flex:1;min-width:0;line-height:1.3}
#expenseReportDialog .er-footer>div{display:flex;gap:5px;flex-shrink:0}
#expenseReportDialog .er-footer button{min-height:30px;padding:3px 12px}
#expenseReportDialog .er-primary{background:var(--er-accent)!important;border-color:var(--er-accent)!important;color:#fff!important;font-weight:700!important;padding:3px 18px!important}
#expenseReportDialog .er-primary:hover{background:#33485a!important;color:#fff!important}
#expenseReportDialog .er-error{color:#a51f27;font-weight:700}

/* ---- Modo embutido na tela Relatórios ---- */
#expenseReportDialog.er-inline{
  width:100%;max-width:none;height:100%;max-height:none;min-height:0;margin:0;border:0;border-radius:0;box-shadow:none;background:transparent;font-size:13px
}
#expenseReportDialog.er-inline .er-header{padding:3px 6px;background:#e7edf3}
#expenseReportDialog.er-inline .er-title span{display:none}
#expenseReportDialog.er-inline .er-body{padding:6px}

/* ---- Responsivo ---- */
/* Janela de notebook: reduz um passo a densidade para os filtros caberem sem rolagem. */
@media(max-width:1320px),(max-height:790px){
  #expenseReportDialog{--er-ctl:30px;--er-gap:5px}
  #expenseReportDialog .er-grid{gap:4px 8px}
  #expenseReportDialog .er-section{padding:0 8px 6px}
  #expenseReportDialog .er-shortcuts button{min-height:19px!important}
  #expenseReportDialog .er-section>h3,#expenseReportDialog .er-section-title{margin:0 -8px 5px;padding:2px 8px}
  #expenseReportDialog .er-advanced{margin-left:-8px;margin-right:-8px}
  #expenseReportDialog .er-advanced summary{padding:2px 8px}
  #expenseReportDialog .er-advanced .er-grid{padding:5px 8px 6px}
  #expenseReportDialog .er-checks{padding:4px 0 0;margin:4px 0 0}
}
@media(max-width:1180px){
  #expenseReportDialog .er-summary{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
  #expenseReportDialog .er-summary>div:nth-child(3){border-right:0}
}
@media(max-width:980px){
  #expenseReportDialog .er-header{flex-wrap:wrap;row-gap:4px}
  #expenseReportDialog .er-actions{margin-left:0}
  #expenseReportDialog .er-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  #expenseReportDialog .er-title h2{font-size:14px}
  #expenseReportDialog .er-results-head{max-height:52%}
}
@media(max-width:680px){
  #expenseReportDialog{width:100vw!important;height:100dvh!important;max-height:100dvh!important}
  #expenseReportDialog .er-grid{grid-template-columns:1fr 1fr}
  #expenseReportDialog .er-span2,#expenseReportDialog .er-span3{grid-column:1/-1}
  #expenseReportDialog .er-summary{grid-template-columns:1fr 1fr auto}
  #expenseReportDialog .er-summary>div{border-right:0;border-bottom:1px solid var(--er-line-soft)}
  #expenseReportDialog .er-footer{flex-direction:column;align-items:stretch;gap:5px}
  #expenseReportDialog .er-footer>div{justify-content:flex-end;flex-wrap:wrap}
  #expenseReportDialog .er-export-label span{display:none}
  #expenseReportDialog .er-table{min-height:40vh}
}

/* ============================================================================
   Aba "Outros relatórios" — mesma pele do Relatório de Despesas:
   painel de filtros com faixa de título, tira de resumo, barra de ações e
   tabela com cabeçalho fixo. Seletores com #view-doctors.reports-workspace
   vencem as regras globais de .df-tools/.df-card/.df-table do tema.
   ========================================================================== */
#view-doctors.reports-workspace .report-filters{border:1px solid #c6d0d8;border-radius:2px;background:#fff;margin:0 0 7px;overflow:hidden}
#view-doctors.reports-workspace .report-filters-band{display:flex;align-items:center;justify-content:space-between;gap:6px 10px;flex-wrap:wrap;background:#e3eaf0;border-bottom:1px solid #c6d0d8;padding:3px 9px}
#view-doctors.reports-workspace .report-filters-band h3{margin:0;font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif!important;letter-spacing:.06em;text-transform:uppercase;color:#3d4f5c;background:none;border:0;padding:0;flex:0 0 auto}
#view-doctors.reports-workspace .report-filters-note{flex:1 1 90px;min-width:0;font:400 11px/1.6 'Segoe UI',Arial,sans-serif;color:#5a6a76;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Atalhos de período e limpeza na faixa do cabeçalho, como no Relatório de Despesas. */
#view-doctors.reports-workspace .report-shortcuts{display:flex;align-items:center;gap:3px;flex-wrap:wrap;flex:0 0 auto}
#view-doctors.reports-workspace .report-shortcuts button{font:600 10.5px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:20px!important;padding:1px 9px!important;border-radius:10px!important;background:#fff!important;border:1px solid #b9c8d3!important;color:#33434f!important;cursor:pointer}
#view-doctors.reports-workspace .report-shortcuts button:hover{background:#d9e6ef!important;border-color:#9fb4c4!important}
#view-doctors.reports-workspace .report-sep{flex:0 0 auto;width:1px;height:16px;background:#b3c4d1;margin:0 2px}

/* Outros relatórios: mesma caixa de Impressão e Exportação do Relatório de Despesas. */
#view-doctors.reports-workspace .er-export-zone{margin:0 0 7px;border:1px solid #c6d0d8;border-radius:2px;background:#f5f8fb;overflow:hidden}
#view-doctors.reports-workspace .er-export-band{background:#e3eaf0;border-bottom:1px solid #c6d0d8;padding:3px 9px}
#view-doctors.reports-workspace .er-export-band h4{margin:0;font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#3d4f5c;background:none;border:0;padding:0}
#view-doctors.reports-workspace .er-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 9px 8px}
#view-doctors.reports-workspace .er-export-actions .er-print,
#view-doctors.reports-workspace .er-export-actions .er-export-go{
min-height:30px;padding:2px 14px;background:#e6eef6;border:1px solid #a9bfd1;border-radius:3px;color:#22394b;
font:700 13px/1.2 'Segoe UI',Arial,sans-serif;cursor:pointer}
#view-doctors.reports-workspace .er-export-actions .er-print:hover,#view-doctors.reports-workspace .er-export-actions .er-export-go:hover{background:#d2e0ec;border-color:#8eaac2;color:#1b2f3f}
#view-doctors.reports-workspace .er-export-actions :is(select,input){min-height:30px;font-size:13px}
#view-doctors.reports-workspace .er-export-label{display:flex;align-items:center;gap:5px;font:600 11px/1.2 'Segoe UI',Arial,sans-serif;color:#4d5d69;margin:0}
#view-doctors.reports-workspace .er-export-label span{display:none}
#view-doctors.reports-workspace .er-export-sep{width:1px;height:20px;background:#c2ced8;margin:0 4px}
#view-doctors.reports-workspace .report-clear{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;font:700 11px/1.2 'Segoe UI',Arial,sans-serif!important;min-height:22px!important;padding:1px 10px!important;border-radius:2px!important;background:#fff!important;border:1px solid #8fa3b2!important;color:#27455c!important;cursor:pointer}
#view-doctors.reports-workspace .report-clear:hover{background:#1f3c50!important;border-color:#1f3c50!important;color:#fff!important}
#view-doctors.reports-workspace .report-filters-body{padding:7px 9px 8px}
#view-doctors.reports-workspace .report-filters .df-tools{display:flex;flex-wrap:wrap;align-items:end;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important;gap:6px 9px}
#view-doctors.reports-workspace .report-filters .df-tools label{display:grid;gap:2px;font:600 10.5px/1.25 'Segoe UI',Arial,sans-serif!important;color:#54636f}
#view-doctors.reports-workspace .report-filters .df-tools :is(input,select){min-height:32px!important;font-size:13px!important;padding:3px 7px!important}
#view-doctors.reports-workspace .report-filters .df-tools .button{min-height:32px!important;padding:3px 14px!important;font-size:13px!important}
#view-doctors.reports-workspace .report-filters .df-card{border:1px solid #c6d0d8!important;border-radius:2px!important;background:#f7fafc!important;margin:8px 0 0!important;padding:4px 9px 6px!important;box-shadow:none!important}
#view-doctors.reports-workspace .report-filters .df-card summary{font:700 10px/1.7 'Segoe UI',Arial,sans-serif!important;letter-spacing:.05em;text-transform:uppercase;color:#4d6070;cursor:pointer}
#view-doctors.reports-workspace .report-filters .df-checkboxes{display:flex;flex-wrap:wrap;gap:3px 14px;padding:4px 0 0}
#view-doctors.reports-workspace .report-filters .df-checkboxes label{display:flex!important;align-items:center;gap:4px;font:400 11.5px/1.3 'Segoe UI',Arial,sans-serif!important;color:#384754;white-space:nowrap}
#view-doctors.reports-workspace .report-summary{display:flex!important;flex-wrap:wrap;border:1px solid #c6d0d8!important;border-radius:2px!important;background:#fff!important;padding:0!important;margin:0 0 6px!important;box-shadow:none!important;min-height:0}
#view-doctors.reports-workspace .report-summary>span{display:flex;align-items:baseline;gap:6px;padding:5px 9px;border-right:1px solid #e2e8ed;font:400 11.5px/1.3 'Segoe UI',Arial,sans-serif;color:#54636f;white-space:nowrap}
#view-doctors.reports-workspace .report-summary>span:last-child{border-right:0}
#view-doctors.reports-workspace .report-summary strong{font:700 15px/1.15 'Segoe UI',Arial,sans-serif;color:#25313b;font-variant-numeric:tabular-nums}
#view-doctors.reports-workspace .report-actions{display:flex;flex-wrap:wrap;align-items:end;background:#e7edf3!important;border:1px solid #cbd5df!important;border-radius:2px!important;padding:5px 8px!important;margin:0 0 6px!important;box-shadow:none!important;gap:6px 9px}
#view-doctors.reports-workspace .report-actions .button{min-height:30px!important;padding:3px 12px!important;font-size:13px!important}
#view-doctors.reports-workspace .report-actions label{display:grid;gap:2px;font:600 10.5px/1.25 'Segoe UI',Arial,sans-serif;color:#54636f}
#view-doctors.reports-workspace .report-actions :is(select,input){min-height:30px!important;font-size:13px!important}
/* Divisor entre o grupo de impressão e o de exportação, como no Relatório de Despesas. */
#view-doctors.reports-workspace .report-actions .report-sep{width:1px;height:20px;background:#c2ced8;margin:0 4px}
/* Cabeçalho, resumo e ações mantêm a altura: só a tabela ocupa o espaço restante.
   Sem isso, com muitas linhas o painel de filtros (overflow:hidden) era comprimido e cortado. */
#view-doctors.reports-workspace>.report-filters{flex:0 0 auto}
#view-doctors.reports-workspace>.report-results{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
#view-doctors.reports-workspace>.report-results>.report-summary,
#view-doctors.reports-workspace>.report-results>.report-actions,
#view-doctors.reports-workspace>.report-results>.report-more,
#view-doctors.reports-workspace>.report-results>.er-export-zone{flex:0 0 auto}
#view-doctors.reports-workspace>.report-results>.report-table-host{flex:1 1 auto;min-height:150px;overflow:hidden}
#view-doctors.reports-workspace>.report-results .report-table-host .df-scroll{max-height:none!important;height:100%}
#view-doctors.reports-workspace .report-table-host .df-scroll,
#view-doctors.reports-workspace .report-groups .df-scroll{border:1px solid #c6d0d8!important;border-radius:2px!important;background:#fff!important;overflow:auto;max-height:calc(100dvh - 320px)}
#view-doctors.reports-workspace .report-table-host .df-table,
#view-doctors.reports-workspace .report-groups .df-table{width:100%;border-collapse:separate!important;border-spacing:0!important;font-size:12.5px}
#view-doctors.reports-workspace .report-table-host .df-table th,
#view-doctors.reports-workspace .report-groups .df-table th{position:sticky;top:0;z-index:1;background:#e3eaf0!important;border-bottom:1px solid #bccbd6!important;border-right:1px solid #edf1f4;font:700 10.5px/1.25 'Segoe UI',Arial,sans-serif!important;text-transform:uppercase;letter-spacing:.04em;color:#3d4f5c!important;padding:4px 7px!important;text-align:left;white-space:nowrap!important}
#view-doctors.reports-workspace .report-table-host .df-table td,
#view-doctors.reports-workspace .report-groups .df-table td{padding:4px 7px!important;border-bottom:1px solid #e2e8ed!important;border-right:1px solid #edf1f4;background:#fff;font:400 12.5px/1.35 'Segoe UI',Arial,sans-serif!important;color:#25313b;white-space:nowrap;max-width:420px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
#view-doctors.reports-workspace .report-table-host .df-table th:last-child,#view-doctors.reports-workspace .report-table-host .df-table td:last-child,
#view-doctors.reports-workspace .report-groups .df-table th:last-child,#view-doctors.reports-workspace .report-groups .df-table td:last-child{border-right:0!important}
#view-doctors.reports-workspace .report-table-host .df-table tbody tr:nth-child(even)>td,
#view-doctors.reports-workspace .report-groups .df-table tbody tr:nth-child(even)>td{background:#f6f8fa}
/* Colunas de valor alinhadas à direita, como na tabela do Relatório de Despesas. */
#view-doctors.reports-workspace .report-table-host .df-table :is(th,td).er-number{text-align:right!important;font-variant-numeric:tabular-nums!important}
#view-doctors.reports-workspace .report-table-host .df-table tbody tr:hover>td,
#view-doctors.reports-workspace .report-groups .df-table tbody tr:hover>td{background:#eef5fa}
#view-doctors.reports-workspace .report-groups:not(:empty){margin:8px 0 0}
#view-doctors.reports-workspace .report-groups>h3{background:#e3eaf0;border:1px solid #c6d0d8;border-bottom:0;border-radius:2px 2px 0 0;margin:0;padding:3px 9px;font:700 10.5px/1.6 'Segoe UI',Arial,sans-serif!important;letter-spacing:.06em;text-transform:uppercase;color:#3d4f5c}
#view-doctors.reports-workspace .report-groups .df-scroll{max-height:none;border-radius:0 0 2px 2px!important}
/* Limite de 200 linhas por renderização, com botão para carregar mais. */
#view-doctors.reports-workspace .report-more:empty{display:none}
#view-doctors.reports-workspace .report-more{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:6px 0 0;font:400 11.5px/1.35 'Segoe UI',Arial,sans-serif;color:#54636f}
#view-doctors.reports-workspace .report-more b{font-weight:700;color:#25313b;font-variant-numeric:tabular-nums}
#view-doctors.reports-workspace .report-more .button{min-height:28px!important;padding:2px 12px!important;font-size:12.5px!important}
