@page {
  size: A4 landscape;
  margin: 8mm;
}

.print-only {
  display: none;
}

@media print {
  .print-only {
    display: block;
  }

  body {
    background: #fff;
  }

  .pr-relatorio,
  .pr-relatorio * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

.pr-relatorio {
  font-family: Arial, Helvetica, sans-serif;
  color: #262626;
  font-size: 9pt;
}

/* ========================= CABEÇALHO ========================= */

.pr-relatorio .pr-cabecalho {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid #d9d9d9;
}

.pr-relatorio .pr-empresa {
  min-width: 0;
}

.pr-relatorio .pr-empresa-nome {
  margin: 0 0 3px;
  font-size: 13pt;
  font-weight: 700;
  line-height: 1.2;
}

.pr-relatorio .pr-empresa-dados {
  font-size: 8pt;
  color: #3c3c3c;
}

.pr-relatorio .pr-empresa-dados span + span {
  margin-left: 12px;
}

.pr-relatorio .pr-resumo {
  display: flex;
  gap: 28px;
  margin-top: 10px;
  white-space: nowrap;
}

.pr-relatorio .pr-resumo-item {
  display: flex;
  flex-direction: column;
}

.pr-relatorio .pr-resumo-label {
  font-size: 7pt;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #3c3c3c;
}

.pr-relatorio .pr-resumo-valor {
  font-size: 9.5pt;
  font-weight: 700;
  color: #262626;
}

.pr-relatorio .pr-periodo {
  text-align: right;
  white-space: nowrap;
}

.pr-relatorio .pr-ano {
  font-size: 18pt;
  font-weight: 700;
  line-height: 1;
  color: #595959;
}

.pr-relatorio .pr-emissao {
  font-size: 7pt;
  color: #3c3c3c;
  margin-top: 4px;
}

/* ========================= SEÇÕES ========================= */

.pr-relatorio .pr-secao {
  margin-bottom: 18px;
}

.pr-relatorio .pr-secao:last-child {
  margin-bottom: 0;
}

.pr-relatorio .pr-secao-titulo {
  margin: 0 0 10px;
  font-size: 10pt;
  font-weight: 700;
  color: #262626;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 4px;
}

.pr-relatorio .pr-secao-subtitulo {
  font-weight: 400;
  font-size: 8.5pt;
  color: #3c3c3c;
  margin-left: 6px;
}

/* ========================= GRÁFICO ========================= */

/* Mantém o título "Pagamentos no Ano" na mesma página do gráfico
 Só funciona porque a seção sempre cabe em uma página (o SVG é limitado a 70mm). */
.pr-relatorio .pr-secao-grafico {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pr-relatorio .pr-grafico {
  width: 100%;
  page-break-inside: avoid;
}

.pr-relatorio .pr-grafico svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70mm;
}

/* ========================= TABELA DE TRIBUTOS =========================
   Visual aproximado da nz-table (nzSize="small" + nzBordered).
   ====================================================================== */

.pr-relatorio .pr-tabela {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 6.5pt;
  color: #595959;
}

.pr-relatorio .pr-tabela th,
.pr-relatorio .pr-tabela td {
  border: 1px solid #d9d9d9;
  padding: 3px 5px;
  vertical-align: middle;
  overflow-wrap: break-word;
}

.pr-relatorio .pr-tabela thead {
  display: table-header-group;
}

.pr-relatorio .pr-tabela thead th {
  background: #fafafa;
  color: #262626;
  font-weight: 600;
  text-align: center;
  font-size: 7pt;
  border-bottom: 1px solid #bfbfbf;
}

.pr-relatorio .pr-tabela tfoot {
  display: table-row-group;
}

.pr-relatorio .pr-tabela tr {
  page-break-inside: avoid;
}

.pr-relatorio .pr-col-obrigacao {
  width: 15%;
  text-align: left;
  color: #262626;
}

.pr-relatorio .pr-col-mes {
  text-align: right;
}

/* Categoria (Obrigações Acessórias / Principais) */
.pr-relatorio .pr-linha-categoria td {
  background: #f0f0f0;
  color: #262626;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 7pt;
  letter-spacing: 0.3px;
}

/* Obrigação: cinza bem claro para separar dos detalhes */
.pr-relatorio .pr-linha-obrigacao td {
  background: #fafafa;
}

.pr-relatorio .pr-linha-obrigacao .pr-col-obrigacao {
  padding-left: 10px;
  font-weight: 600;
}

/* Detalhes (dinâmicos) da obrigação */
.pr-relatorio .pr-linha-detalhe td {
  background: #fff;
  color: #3c3c3c;
}

.pr-relatorio .pr-col-detalhe {
  padding-left: 22px;
  color: #595959;
  font-weight: 400;
}

/* Totalizadores */
.pr-relatorio .pr-tabela tfoot th,
.pr-relatorio .pr-tabela tfoot td {
  background: #fafafa;
  color: #262626;
  font-weight: 600;
  font-size: 6.5pt;
}

.pr-relatorio .pr-tabela tfoot th {
  text-align: left;
}

/* ========================= CORES DOS VALORES =========================
   Mesmas regras da tela: arquivo ausente / sem movimento em laranja,
   tributo não informado (N/I) em amarelo escuro e divergências em vermelho.
   ====================================================================== */

.pr-relatorio .pr-alerta {
  color: #dc5706;
  font-size: 6pt;
  white-space: nowrap;
}

.pr-relatorio .pr-nao-informado {
  color: #e1a00f;
}

.pr-relatorio .pr-negativo {
  color: red;
}

.pr-relatorio .pr-tabela small {
  font-size: 5.5pt;
  color: #3c3c3c;
}
