/* Impressao (folha A4) - hoje so o atendimento (telas/atendimento-impressao.js).
   Na tela: uma folha branca sobre a mesa. Ao imprimir (ou Salvar como PDF): so a folha.
   A folha e papel, entao tem cores proprias (variaveis abaixo), iguais no tema claro e escuro. */

.folha {
  --folha-fundo: #FFFFFF;
  --folha-tinta: #1A1A1A;
  --folha-suave: #4D4D4D;
  --folha-linha: #3A3A3A;
  --folha-fina: #B8B8B8;
  --folha-tarja: #6E6E6E;
  --folha-sobre-tarja: #FFFFFF;
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 10mm;
  background: var(--folha-fundo);
  color: var(--folha-tinta);
  font: 9.5pt/1.3 Arial, "Helvetica Neue", Helvetica, sans-serif;
  box-shadow: var(--sombra-painel);
}
.folha p { margin: 0; }

.impressao__barra { margin-bottom: 1rem; }
.impressao__barra .pagina__cabecalho { flex-wrap: wrap; margin-bottom: 0.75rem; }
.impressao__extras { max-width: 72rem; }
.impressao__acoes { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.impressao__status { margin: 0; font-size: var(--t-pequeno); color: var(--texto-suave); }
.impressao__mesa { overflow-x: auto; padding: 0.5rem 0 3rem; }

.folha__tabela { width: 100%; border-collapse: collapse; }
.folha__tabela td, .folha__tabela th { padding: 0; vertical-align: top; text-align: left; }

/* cabecalho: logo | empresa | numero e data; faixa do cliente; tarja */
.folha__cabecalho { border: 1.5pt solid var(--folha-linha); margin-bottom: 2mm; }
.folha__topo { display: grid; grid-template-columns: 52mm 1fr 34mm; border-bottom: 1.5pt solid var(--folha-linha); }
.folha__logo { display: flex; align-items: center; justify-content: center; padding: 2mm; border-right: 1.5pt solid var(--folha-linha); min-height: 20mm; }
.folha__logo-img { max-width: 100%; max-height: 19mm; object-fit: contain; }
.folha__empresa { padding: 1.5mm 3mm; font-weight: 700; font-size: 9.5pt; }
.folha__empresa-nome { font-size: 12pt; font-style: italic; margin-bottom: 0.8mm !important; }
.folha__numero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5mm; border-left: 1.5pt solid var(--folha-linha); padding: 1.5mm; }
.folha__numero span { font-size: 8.5pt; color: var(--folha-suave); }
.folha__numero strong { font-size: 15pt; letter-spacing: 0.02em; }
.folha__cliente { padding: 1.5mm 3mm; border-bottom: 1.5pt solid var(--folha-linha); }
.folha__tarja { padding: 1mm; background: var(--folha-tarja); color: var(--folha-sobre-tarja); text-align: center; font-weight: 700; font-size: 13pt; letter-spacing: 0.08em; }

.folha__colunas th { padding: 1mm 1.5mm; font-size: 8pt; color: var(--folha-suave); border-bottom: 1pt solid var(--folha-linha); }
.folha__direita { text-align: right !important; }

/* item: foto 20mm (proporcional e centralizada, como o UImpAtend) | qtde | produto | valores */
.folha__item { break-inside: avoid; page-break-inside: avoid; }
.folha__item td { padding: 1.2mm 1.5mm; border-bottom: 0.5pt solid var(--folha-fina); }
.folha__foto { width: 22mm; }
.folha__foto-img { display: block; width: 20mm; height: 20mm; object-fit: contain; margin: 0 auto; }
.folha__foto-img:not([src]) { visibility: hidden; }
.folha__qtd { width: 22mm; text-align: right !important; white-space: nowrap; }
.folha__qtd strong { display: block; font-size: 10.5pt; }
.folha__qtd span { color: var(--folha-suave); }
.folha__produto p:first-child { font-size: 9.5pt; }
.folha__codigo { font-weight: 700; }
.folha__secundario { font-size: 8pt; color: var(--folha-suave); white-space: pre-wrap; }
.folha__valores { width: 38mm; text-align: right !important; white-space: nowrap; }
.folha__valores span { color: var(--folha-suave); font-size: 8pt; }
.folha__valores strong { font-size: 10pt; }

.folha__fim { break-inside: avoid; page-break-inside: avoid; }
.folha__fim td { padding: 2mm 1.5mm; border-top: 1.5pt solid var(--folha-linha); border-bottom: 1.5pt solid var(--folha-linha); }
.folha__total { text-align: right !important; white-space: nowrap; }
.folha__total strong { font-size: 12pt; }

/* ---- orcamento (UImpOrc): A4 paisagem, uma linha por item com 10 colunas */
.folha--paisagem { width: 297mm; min-height: 210mm; page: paisagem; }
.folha__rotulo { display: inline-block; min-width: 9mm; font-weight: 700; }
.folha__rotulo--largo { min-width: 40mm; }
.folha__forte { font-weight: 700; }
.folha__tabela--linhas .folha__colunas th { white-space: nowrap; }
.folha__linha { break-inside: avoid; page-break-inside: avoid; }
.folha__linha td { padding: 0.8mm 1.5mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8.5pt; }
.folha__linha td:nth-child(3), .folha__linha td:nth-child(9), .folha__linha td:nth-child(10) { white-space: nowrap; font-size: 9.5pt; }
.folha__tabela--linhas .folha__fim td { vertical-align: top; }
.folha__totais { display: grid; grid-template-columns: 1fr auto; gap: 0.6mm 5mm; margin: 0; font-weight: 700; }
.folha__totais dt { text-align: right; }
.folha__totais dd { margin: 0; text-align: right; min-width: 28mm; }
.folha__totais .folha__totalgeral { font-size: 12pt; padding-top: 1mm; border-top: 1pt solid var(--folha-linha); }

@page paisagem {
  size: A4 landscape;
  margin: 8mm;
  @bottom-right { content: "Página " counter(page) " de " counter(pages); font: 8pt Arial, sans-serif; }
}

@page {
  size: A4 portrait;
  margin: 8mm;
  @bottom-right { content: "Página " counter(page) " de " counter(pages); font: 8pt Arial, sans-serif; }
}

@media print {
  /* so a folha: esconde menu, ficha, barra da pagina e avisos */
  #menu, #ficha, .impressao__barra, .aviso, .avisos, [data-abre-menu] { display: none !important; }
  html, body, #tela-app, #conteudo, .impressao__mesa { display: block !important; margin: 0 !important; padding: 0 !important;
    background: #FFFFFF !important; overflow: visible !important; height: auto !important; width: auto !important; }
  .folha { width: auto; min-height: 0; padding: 0; box-shadow: none; }
  .folha, .folha * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- pedido de compra (telas/pedido-compra-impressao.js): A4 retrato, uma linha por item com 7 colunas */
.folha__rotulo--medio { min-width: 28mm; }
.folha--compra .folha__linha td:nth-child(3) { white-space: normal; }
.folha--compra .folha__linha td:nth-child(4), .folha--compra .folha__linha td:nth-child(6), .folha--compra .folha__linha td:nth-child(7) { white-space: nowrap; font-size: 9.5pt; }

/* ---- Central de Produtos (telas/central-produtos-impressao.js): lista (paisagem), completo e catalogo (retrato) */
.cprod-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.cprod-folha__linha td { padding: 0.6mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.cprod-folha__linha td:nth-child(1), .cprod-folha__linha td:nth-child(4), .cprod-folha__linha td:nth-child(6) { white-space: nowrap; }
.cprod-folha__linha td.folha__direita { white-space: nowrap; }
.folha--central .folha__fim td.folha__total { padding: 2mm 1.5mm; }
.cprod-folha__completo .folha__produto p + p { margin-top: 0.4mm; }
.cprod-folha__completo .folha__valores br + strong { font-size: 11pt; }
.cprod-folha__catalogo { table-layout: fixed; }
.cprod-folha__fila { break-inside: avoid; page-break-inside: avoid; }
.cprod-folha__cartao { width: 33.33%; padding: 2mm !important; border: 0.5pt solid var(--folha-fina); text-align: center !important; }
.cprod-folha__cartao--vazio { border: 0; }
.cprod-folha__moldura { display: flex; align-items: center; justify-content: center; height: 38mm; margin-bottom: 1.5mm; }
.cprod-folha__foto { display: block; max-width: 100%; max-height: 38mm; object-fit: contain; }
.cprod-folha__foto:not([src]) { visibility: hidden; }
.cprod-folha__nome { font-weight: 700; font-size: 9pt; min-height: 2.6em; }
.cprod-folha__preco { margin-top: 1mm !important; font-size: 13pt; font-weight: 700; }

/* ---- Tabela de precos (telas/central-produtos-tabela-impressao.js): convencional densa; com foto reusa o catalogo */
.tabpreco-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.tabpreco-folha__linha td { padding: 0.5mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 9pt; vertical-align: top; }
.tabpreco-folha__linha td:nth-child(1), .tabpreco-folha__linha td:nth-child(5), .tabpreco-folha__linha td:nth-child(6), .tabpreco-folha__linha td.folha__direita { white-space: nowrap; }
.tabpreco-folha__grupo { break-after: avoid; page-break-after: avoid; break-inside: avoid; }
.tabpreco-folha__grupo td { padding: 1.5mm 1.2mm 0.8mm; border-bottom: 1pt solid var(--folha-linha); font-size: 10pt; font-weight: 700; }
.folha--tabela-preco .folha__fim td.folha__total { padding: 2mm 1.5mm; }

/* ---- Relatorios do Balanco (telas/central-produtos-balanco-impressao.js): tabela densa por fornecedor, subtotais e total geral */
.balanco-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.balanco-folha__linha td { padding: 0.5mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 9pt; vertical-align: top; }
.balanco-folha__linha td:nth-child(1), .balanco-folha__linha td.folha__direita { white-space: nowrap; }
.balanco-folha__grupo { break-after: avoid; page-break-after: avoid; break-inside: avoid; }
.balanco-folha__grupo td { padding: 1.5mm 1.2mm 0.8mm; border-bottom: 1pt solid var(--folha-linha); font-size: 10pt; font-weight: 700; }
.balanco-folha__subtotal, .balanco-folha__geral { break-inside: avoid; page-break-inside: avoid; font-weight: 700; }
.balanco-folha__subtotal td { padding: 0.8mm 1.2mm; border-top: 0.5pt solid var(--folha-linha); border-bottom: 0.5pt solid var(--folha-linha); font-size: 9pt; white-space: nowrap; }
.balanco-folha__geral td { padding: 2mm 1.2mm; border-top: 1.5pt solid var(--folha-linha); font-size: 10pt; white-space: nowrap; }

/* ---- Analise para Compra (telas/central-produtos-analise-compra-impressao.js): A4 paisagem, tabela densa */
.analise-folha { font-size: 8pt; }
.analise-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.analise-folha__linha td { padding: 0.4mm 1mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.analise-folha__linha td.folha__direita { white-space: nowrap; text-align: right; }
.analise-folha__linha td:nth-child(1), .analise-folha__linha td:nth-child(2) { white-space: nowrap; }
.analise-folha__nome { max-width: 60mm; }
.analise-folha__ultima { white-space: nowrap; }
.analise-folha__tabela .folha__colunas th { font-size: 7.5pt; padding: 0.6mm 1mm; }
.analise-folha__fim { break-inside: avoid; page-break-inside: avoid; font-weight: 700; }
.analise-folha__fim td { padding: 2mm 1mm; border-top: 1.5pt solid var(--folha-linha); font-size: 9pt; text-align: right; }

/* ---- roteiro da Rota de Prospeccao (telas/prospeccao-rota-impressao.js): A4 retrato, mapa 170 x 110 mm e tabela das paradas */
.roteiro-folha { font-size: 10pt; }
.roteiro-folha__mapa { width: 170mm; max-width: 100%; height: 110mm; margin: 0 auto 3mm; border: 0.5pt solid var(--folha-linha); background: var(--folha-fundo); overflow: hidden; }
.roteiro-folha__mapa-falha { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0 !important; font-size: 10pt; color: var(--folha-suave); }
.roteiro-folha__tabela { margin-bottom: 3mm; }
.roteiro-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.roteiro-folha__linha td { padding: 1.2mm 1.5mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 9.5pt; vertical-align: middle; }
.roteiro-folha__partida td { font-style: italic; }
.roteiro-folha__num { width: 8mm; white-space: nowrap; }
.roteiro-folha__medida { white-space: nowrap; width: 20mm; }
.roteiro-folha__anotacoes { min-width: 48mm; width: 48mm; height: 8mm; }
.roteiro-folha__aviso { margin-top: 1.5mm !important; font-size: 9pt; color: var(--folha-suave); }

/* ---- Central de Clientes (telas/central-clientes-impressao.js): lista e fichas, A4 retrato */
.ccli-folha { font-size: 9pt; }
.ccli-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.ccli-folha__linha td { padding: 0.6mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.ccli-folha__linha td:nth-child(1), .ccli-folha__linha td:nth-child(6), .ccli-folha__linha td:nth-child(7), .ccli-folha__linha td.folha__direita { white-space: nowrap; }
.ccli-folha__fichas { display: block; }
.ccli-folha__ficha { break-inside: avoid; page-break-inside: avoid; padding: 2mm 0 2.5mm; border-bottom: 0.5pt solid var(--folha-linha); font-size: 9pt; }
.ccli-folha__nome { margin: 0; font-size: 10.5pt; }
.ccli-folha__colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6mm; margin-top: 1mm; }
.ccli-folha__dado { margin: 0.3mm 0; overflow-wrap: anywhere; }
.ccli-folha__rotulo { color: var(--folha-suave); font-size: 8pt; }
.ccli-folha__total { margin: 3mm 0 0; text-align: right; font-weight: 700; font-size: 11pt; }

/* ---- Central de Clientes, movimento (telas/central-clientes-movimento-impressao.js): A4 paisagem, tabela densa */
.ccli-mov-folha { font-size: 8pt; }
.ccli-mov-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.ccli-mov-folha__linha td { padding: 0.5mm 1mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.ccli-mov-folha__linha td.folha__direita { white-space: nowrap; }
.ccli-mov-folha__cancelada td { color: var(--folha-suave); text-decoration: line-through; }
.ccli-mov-folha__tabela .folha__colunas th { font-size: 7.5pt; padding: 0.6mm 1mm; }
.ccli-mov-folha .folha__fim td.folha__total { padding: 2mm 1mm; font-size: 9pt; }

/* Central de Representantes: lista A4 retrato */
.crep-folha { font-size: 9pt; }
.crep-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.crep-folha__linha td { padding: 0.6mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.crep-folha__linha td:nth-child(1), .crep-folha__linha td:nth-child(4), .crep-folha__linha td:nth-child(8), .crep-folha__linha td.folha__direita { white-space: nowrap; }
.crep-folha--carteira .crep-folha__linha td:nth-child(4), .crep-folha--carteira .crep-folha__linha td:nth-child(6) { white-space: normal; }

/* Central de Representantes: comissao (telas/central-representantes-comissao-impressao.js), A4 paisagem */
.crcom-folha { font-size: 9pt; }
.crcom-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.crcom-folha__linha td { padding: 0.6mm 1.2mm; border-bottom: 0.5pt solid var(--folha-fina); font-size: 8pt; vertical-align: top; }
.crcom-folha__linha td.folha__direita { white-space: nowrap; }
.crcom-folha__total td { font-weight: 700; border-top: 0.8pt solid var(--folha-fina); }
.crcom-folha__demo { break-inside: avoid; page-break-inside: avoid; margin: 0 0 5mm; }
.crcom-folha__demo + .crcom-folha__demo { break-before: page; page-break-before: always; }
.crcom-folha__nome { margin: 2mm 0 1.5mm; font-size: 10pt; font-weight: 700; }
.crcom-folha__grupos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm; }
.crcom-folha__grupo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4mm 3mm; margin: 0; padding: 1.5mm 2mm; border: 0.5pt solid var(--folha-fina); font-size: 8pt; }
.crcom-folha__grupo dt { color: var(--folha-suave); }
.crcom-folha__grupo dd { margin: 0; text-align: right; white-space: nowrap; }
.crcom-folha__forte, .crcom-folha__escolhida { font-weight: 700; color: inherit !important; }

/* ---- duplicata do título a receber (telas/titulo-duplicata.js, modelo UImpDuplic) */
.dup__quadro { display: grid; grid-template-columns: 1.2fr 1.2fr 0.9fr 1fr; border: 1.5pt solid var(--folha-linha); margin-bottom: 2mm; }
.dup__grupo { padding: 1.5mm 2mm; border-right: 1pt solid var(--folha-linha); display: flex; flex-direction: column; gap: 1mm; }
.dup__grupo:last-child { border-right: 0; }
.dup__grupo--uso { min-height: 18mm; }
.dup__titulo { font-size: 8pt; font-weight: 700; color: var(--folha-suave); text-align: center; border-bottom: 0.5pt solid var(--folha-fina); padding-bottom: 0.8mm; }
.dup__celula { display: flex; justify-content: space-between; gap: 2mm; }
.dup__celula strong { font-size: 10pt; }
.dup__celula--forte strong { font-size: 12pt; }
.dup__rotulo { font-size: 8pt; color: var(--folha-suave); }
.dup__bloco { border: 1pt solid var(--folha-linha); padding: 1.5mm 3mm; margin-bottom: 2mm; display: flex; flex-direction: column; gap: 0.8mm; }
.dup__extenso { border: 1.5pt solid var(--folha-linha); padding: 1.5mm 3mm; margin-bottom: 2mm; }
.dup__extenso-texto { font-size: 11pt; font-weight: 700; margin-top: 0.8mm !important; }
.dup__reconhece { font-size: 8.5pt; line-height: 1.45; margin: 2mm 0 6mm !important; text-align: justify; }
.dup__assinaturas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8mm; margin-top: 10mm; }
.dup__assina { display: flex; flex-direction: column; align-items: center; gap: 1mm; font-size: 8pt; text-align: center; }
.dup__linha { width: 100%; height: 6mm; border-bottom: 1pt solid var(--folha-linha); }

/* ---- relatório do Contas a Receber (telas/titulos-relatorio.js, modelo UImpRecPag): faixa do grupo na cor de
   destaque do tema (variáveis de base.css), somas por grupo e a linha final */
.folha--relatorio-titulos { font-size: 8pt; }
.trel__topo { display: grid; grid-template-columns: 40mm 1fr 32mm; align-items: center; gap: 3mm; padding-bottom: 2mm; margin-bottom: 2mm; border-bottom: 1.5pt solid var(--folha-linha); }
.trel__logo { display: flex; align-items: center; justify-content: center; min-height: 14mm; }
.trel__logo .folha__logo-img { max-height: 14mm; }
.trel__titulos { display: flex; flex-direction: column; gap: 0.6mm; }
.trel__titulo { font-size: 12pt; font-weight: 700; }
.trel__filtro { color: var(--folha-suave); overflow-wrap: anywhere; }
.trel__emitido { display: flex; flex-direction: column; align-items: flex-end; font-size: 8pt; }
.trel__emitido span { color: var(--folha-suave); }
.trel__tabela .folha__colunas th { white-space: nowrap; padding: 0.8mm 1.2mm; }
.trel__tabela thead { display: table-header-group; }
.trel__faixa td { padding: 0.8mm 1.5mm; font-weight: 700; background: var(--acento-suave); border-top: 0.8pt solid var(--acento); border-bottom: 0.8pt solid var(--acento); color: var(--folha-tinta); }
.trel__faixa { break-after: avoid; page-break-after: avoid; }
.trel__linha { break-inside: avoid; page-break-inside: avoid; }
.trel__linha td { border-bottom: 0.5pt solid var(--folha-fina); padding: 0.5mm 1.2mm; font-size: 8pt; white-space: nowrap; }
.trel__linha td:nth-child(4) { white-space: normal; }
.trel__somas td { padding: 0.8mm 1.2mm 1.5mm; font-weight: 700; white-space: pre; border-top: 0.5pt solid var(--folha-fina); }
.trel__somas td:first-child { text-align: right; }
.trel__somas, .trel__total { break-inside: avoid; page-break-inside: avoid; }
.trel__total { break-before: avoid; page-break-before: avoid; }
.trel__total td { padding: 1.5mm 1.2mm; font-weight: 700; white-space: pre-wrap; border-top: 1.5pt solid var(--folha-linha); border-bottom: 1.5pt solid var(--folha-linha); }
.trel__total td:not(:first-child) { white-space: nowrap; }
.trel__vazio { margin: 8mm 0 !important; text-align: center; font-size: 10pt; }

/* ---- duplicatas em lote (telas/titulos-duplicatas.js): duas por folha A4, linha de corte entre elas */
.folha--duplicatas { display: flex; flex-direction: column; padding: 8mm 10mm; break-after: page; page-break-after: always; }
.folha--duplicatas + .folha--duplicatas { margin-top: 1rem; }
.folha--duplicatas:last-child { break-after: auto; page-break-after: auto; }
.dup__meia { box-sizing: border-box; height: 136mm; overflow: hidden; font-size: 8.5pt; }
.dup__meia .folha__logo { min-height: 12mm; padding: 1mm; }
.dup__meia .folha__logo-img { max-height: 11mm; }
.dup__meia .folha__empresa { padding: 1mm 2.5mm; font-size: 8.5pt; }
.dup__meia .folha__empresa-nome { font-size: 10.5pt; margin-bottom: 0.3mm !important; }
.dup__meia .folha__numero strong { font-size: 12pt; }
.dup__meia .folha__cliente { padding: 0.8mm 3mm; }
.dup__meia .folha__tarja { padding: 0.4mm; font-size: 10pt; }
.dup__meia .folha__cabecalho { margin-bottom: 1.2mm; }
.dup__meia .dup__grupo { padding: 1mm 2mm; gap: 0.5mm; }
.dup__meia .dup__bloco { padding: 1mm 3mm; gap: 0.3mm; }
.dup__meia .dup__extenso { padding: 1mm 3mm; }
.dup__meia .dup__extenso-texto { font-size: 10pt; margin-top: 0.3mm !important; }
.dup__meia .dup__linha { height: 4mm; }
.dup__meia .dup__reconhece { margin: 1mm 0 2mm !important; font-size: 7.5pt; line-height: 1.3; }
.dup__meia .dup__assinaturas { margin-top: 2mm; }
.dup__meia .dup__bloco, .dup__meia .dup__quadro, .dup__meia .dup__extenso { margin-bottom: 1.2mm; }
.dup__meia .dup__grupo--uso { min-height: 10mm; }
.dup__corte { height: 0; margin: 4mm 0; border-top: 0.8pt dashed var(--folha-fina); }
@media print {
  .folha--duplicatas { padding: 0; min-height: 0; height: 281mm; }
  .folha--duplicatas + .folha--duplicatas { margin-top: 0; }
}

/* ---- recibo do título liquidado (telas/titulo-recibo.js): textos editáveis na barra, a folha só com o texto */
.recibo__campos { max-width: 72rem; }
.recibo__dica { margin: 0 0 0.4rem; font-size: var(--t-pequeno); }
.recibo__via { break-inside: avoid; page-break-inside: avoid; }
.recibo__topo { display: flex; justify-content: space-between; align-items: center; gap: 4mm; padding: 2mm 3mm; }
.recibo__titulo { font-size: 18pt; font-weight: 700; letter-spacing: 0.12em; }
.recibo__valor { border: 1.5pt solid var(--folha-linha); padding: 1.5mm 4mm; font-size: 12pt; }
.recibo__valor strong { font-size: 14pt; }
.recibo__linhas { display: grid; grid-template-columns: 34mm 1fr; gap: 3mm 4mm; margin: 6mm 0 0; font-size: 11pt; }
.recibo__linhas dt { color: var(--folha-suave); }
.recibo__linhas dd { margin: 0; padding-bottom: 1mm; border-bottom: 0.5pt solid var(--folha-fina); overflow-wrap: anywhere; }
.recibo__forte { font-weight: 700; }
.recibo__local { font-size: 11pt; margin: 10mm 0 0 !important; text-align: right; }
.recibo__assinatura { width: 90mm; margin: 16mm 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1mm; font-size: 9.5pt; text-align: center; }

/* ---- Fluxo de caixa (telas/fluxo-caixa-impressao.js): A4 paisagem, tabela densa */
.fcx-folha { font-size: 8pt; }
.fcx-folha__empresa { display: flex; align-items: center; gap: 3mm; font-size: 11pt; }
.fcx-folha__alerta { color: var(--folha-tinta); font-weight: 700; border: 0.6pt solid currentColor; padding: 1mm 2mm; }
.fcx-folha__tabela th, .fcx-folha__linha td { padding: 0.5mm 1mm; font-size: 7pt; border-bottom: 0.5pt solid var(--folha-fina); }
.fcx-folha__tabela .folha__colunas th { font-size: 7pt; }
.fcx-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.fcx-folha__linha td.folha__direita { white-space: nowrap; }
.fcx-folha__rot { text-align: left; white-space: nowrap; }
.fcx-folha__linha--grupo td, .fcx-folha__linha--total td, .fcx-folha__linha--saldo td { font-weight: 700; }
.fcx-folha__linha--saldo td { border-top: 0.6pt solid var(--folha-fina); }
.fcx-folha__linha--camada td { font-style: italic; }
.fcx-folha__aviso { margin: 0.5mm 0; font-size: 7pt; }
.fcx-folha__neg { color: var(--folha-tinta); text-decoration: underline; }

/* ---- Caixa e bancos (telas/financeiro-impressao.js): A4 paisagem, tabela densa */
.fin-folha { font-size: 8pt; }
.fin-folha__empresa { display: flex; align-items: center; gap: 3mm; font-size: 11pt; }
.fin-folha__aviso { margin: 0.5mm 0; font-size: 7pt; font-weight: 700; }
.fin-folha__tabela th, .fin-folha__linha td { padding: 0.5mm 1mm; font-size: 7pt; border-bottom: 0.5pt solid var(--folha-fina); text-align: left; }
.fin-folha__tabela th.folha__direita, .fin-folha__linha td.folha__direita { text-align: right; white-space: nowrap; }
.fin-folha__linha { break-inside: avoid; page-break-inside: avoid; }
.fin-folha__linha--grupo td, .fin-folha__linha--saldo td { font-weight: 700; }
.fin-folha__linha--grupo td { border-top: 0.6pt solid var(--folha-fina); }
