@page {
  size: A4 portrait;
  margin: 0mm 0mm 12mm;
  @bottom-left {
    margin-left: 10mm;
    color: #172f50;
    font: 7pt Arial, sans-serif;
  }
  @bottom-right {
    margin-right: 10mm;
    color: #172f50;
    font: 7pt Arial, sans-serif;
    content: "Pág " counter(page) "/" counter(pages);
  }
}

.report-document,
.report-document * {
  box-sizing: border-box;
}

.report-document {
  color: #172f50;
  font-family: Arial, sans-serif;
  font-size: 9pt;
  line-height: 1.25;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.report-paper {
  position: relative;
  width: 210mm;
  min-height: 285mm;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  background: #fff;
}

.report-section {
  position: relative;
}

.report-header {
  width: 210mm;
  margin-left: 0;
  overflow: visible;
  break-inside: avoid;
}

.report-header-field {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0.5mm;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.report-header-group {
  position: absolute;
  overflow: visible;
}

.report-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left center;
}

.report-lines {
  width: 210mm;
  margin: 0;
  padding: 0 17mm;
  break-inside: auto;
}

.report-line-table,
.report-tax-table {
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.report-line-table {
  width: 100%;
  margin: 0;
  color: #172f50;
}

.report-fill-row td {
  height: 1mm;
  padding: 0;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.report-line-table thead {
  display: table-header-group;
}

.report-line-table th,
.report-line-table td {
  padding: 1.5mm;
  border-bottom: 0.15mm solid #dce3eb;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.report-line-table th {
  background: #172f50;
  color: #fff;
  font-weight: 700;
}

.report-line-table tr {
  break-inside: avoid;
}
.report-line-note{margin-top:1mm;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.92em;line-height:1.25}

.report-line-table .report-no-lines td {
  padding: 3mm;
  color: #62758d;
  text-align: center;
}

.report-various {
  width: 210mm;
  margin-top: 3mm;
  padding: 0 17mm;
  break-inside: avoid;
}

.report-various-grid {
  display: grid;
  width: 100%;
  gap: 1mm;
}

.report-various-block {
  min-width: 0;
  overflow: hidden;
  padding: 1.5mm;
  overflow-wrap: anywhere;
}

.report-various-block[data-report-source="observations"] {
  border: 0.25mm solid #000;
  border-radius: 1.5mm;
}

.report-various-block > strong,
.report-various-title {
  display: block;
  margin-bottom: 1.5mm;
  font-weight: 700;
}

.report-tax-table {
  width: 100%;
  font-size: 7pt;
}

.report-tax-table th,
.report-tax-table td {
  padding: 1mm 0.5mm;
  border-bottom: 0.15mm solid #dce3eb;
  text-align: right;
  overflow-wrap: anywhere;
}

.report-tax-table th:first-child,
.report-tax-table td:first-child {
  text-align: left;
}

.report-tax-table thead {
  background: #f2f5f9;
}

.report-observation-value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-totals {
  margin: 0;
}

.report-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 2mm;
  padding: 0.8mm 0;
}

.report-totals dt,
.report-totals dd {
  margin: 0;
}

.report-totals .report-grand-total {
  margin-top: 1mm;
  padding-top: 1.5mm;
  border-top: 0.3mm solid currentColor;
  font-weight: 700;
}

.report-last-footer {
  position: relative;
  width: 210mm;
  height: 18mm;
  margin-left: 0;
  break-inside: avoid;
}

.report-footer-blocks {
  display: flex;
  flex-direction: column;
  gap: 1mm;
}

.report-footer-field {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0.5mm;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-section-label,
.report-lines-hint,
.report-editor-page-count,
.report-binding-name {
  display: none;
}

.report-editable {
  cursor: move;
  touch-action: none;
}

.report-document.report-edit-mode {
  min-width: 0;
  color: #172f50;
}

.report-edit-mode .report-paper {
  margin: 0 auto;
  box-shadow: 0 3px 15px #00142b26;
}

.report-edit-mode .report-section {
  outline: 0.25mm dashed #0876eb;
  outline-offset: 0.5mm;
}

.report-edit-mode .report-header { outline-color: #0876eb; }
.report-edit-mode .report-lines { outline-color: #13a276; margin-top: 5mm; }
.report-edit-mode .report-various { outline-color: #ed9b20; margin-top: 6mm; }
.report-edit-mode .report-footer { outline-color: #9349ec; }
.report-edit-mode .report-header,
.report-edit-mode .report-footer { outline-offset: -0.25mm; }

.report-edit-mode .report-section-label {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  display: block;
  padding: 0.5mm 2mm;
  border-radius: 1mm 1mm 0 0;
  background: #0876eb;
  color: #fff;
  font: 700 7pt Arial, sans-serif;
}

.report-edit-mode .report-header > .report-section-label { background: #0876eb; }
.report-edit-mode .report-lines > .report-section-label { background: #13a276; }
.report-edit-mode .report-various > .report-section-label { background: #ed9b20; }
.report-edit-mode .report-footer > .report-section-label { background: #9349ec; }

.report-edit-mode .report-header-field,
.report-edit-mode .report-various-block,
.report-edit-mode .report-footer-field {
  border: 0.25mm solid #9bbbe4;
  border-radius: 1mm;
  background-color: #eef5ff;
  color: #203b5c;
  font: 9pt Arial, sans-serif;
}

.report-edit-mode .report-header-group {
  z-index: 0;
  background-color: #f6f9fd80;
}

.report-edit-mode .report-group-title {
  position: absolute;
  top: -3.5mm;
  left: 1mm;
  padding: 0.3mm 1mm;
  border-radius: 0.6mm;
  background: #0876eb;
  color: #fff;
  font: 700 6pt Arial, sans-serif;
  pointer-events: none;
}

.report-edit-mode .report-header-field:hover,
.report-edit-mode .report-various-block:hover,
.report-edit-mode .report-footer-field:hover {
  border-color: #0876eb;
  background-color: #dfedff !important;
}

.report-edit-mode .report-edit-hidden {
  opacity: 0.42;
  outline: 0.25mm dashed #687d98;
  outline-offset: -0.5mm;
}

.report-edit-mode [data-report-element].report-selected,
.report-edit-mode [data-report-group].report-selected,
.report-edit-mode [data-report-various].report-selected,
.report-edit-mode [data-report-column].report-selected {
  outline: 0.6mm solid #0876eb;
  outline-offset: 0.3mm;
}

.report-edit-mode [data-report-block-field].report-selected {
  outline: 0.5mm solid #0876eb;
  outline-offset: -0.4mm;
}

.report-edit-mode [data-report-block-field] {
  cursor: move;
  touch-action: none;
}

.report-edit-mode .report-binding-name {
  display: inline;
  color: #203b5c;
}

.report-edit-mode .report-various-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1mm;
}

.report-edit-mode .report-lines {
  position: relative;
  left: 0;
  padding: 5mm 17mm 0;
}

.report-edit-mode .report-lines-blocks {
  display: flex;
  flex-direction: column;
  gap: 1mm;
  margin-top: 1mm;
}

.report-edit-mode .report-lines-hint {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  color: #19856c;
  font: 7pt Arial, sans-serif;
}

.report-edit-mode .report-lines:has(.report-empty-lines) {
  min-height: 30mm;
}

.report-empty-lines {
  padding: 6mm;
  border: 0.2mm dashed #9bbbe4;
  color: #62758d;
  text-align: center;
}

.report-edit-mode .report-footer {
  position: absolute;
  top: 260mm;
  left: 0;
  width: 210mm;
  height: 25mm;
}

.report-edit-mode .report-footer-blocks {
  position: absolute;
  top: 5mm;
  left: 17mm;
  right: 17mm;
  display: flex;
  max-height: 39mm;
  overflow: auto;
}

.report-edit-mode .report-various {
  position: absolute;
  left: 0;
  margin: 0;
  min-height: 0;
}

.report-edit-mode .report-various-grid {
  min-height: 0;
  padding-top: 5mm;
}

.report-edit-mode .report-various > .report-section-label {
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
}

.report-single-page .report-paper {
  height: 285mm;
  min-height: 285mm;
  overflow: hidden;
}

.report-single-page .report-lines {
  position: absolute;
  left: 0;
  margin: 0;
  padding: 0 17mm;
  overflow: visible;
}

.report-single-page .report-various {
  position: absolute;
  left: 0;
  margin: 0;
  min-height: 0;
  overflow: visible;
}

.report-single-page .report-various-grid {
  min-height: 0;
}

.report-single-page .report-footer {
  position: absolute;
  top: 260mm;
  left: 0;
  width: 210mm;
  height: 25mm;
}

.report-editor-page-count {
  position: absolute;
  right: 17mm;
  bottom: 1mm;
  display: block;
  color: #172f50;
  font: 7pt Arial, sans-serif;
}

.report-edit-mode .report-inherited-line {
  opacity: 0.45;
}

.report-edit-mode .report-lines-hint + .report-line-table {
  margin-top: 0;
}

@media screen {
  .report-print .report-paper {
    min-height: 285mm;
  }
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .report-document,
  .report-paper {
    width: 210mm !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .report-paper {
    min-height: 285mm;
    padding: 0;
  }

  .report-single-page .report-paper {
    height: 285mm;
    min-height: 285mm;
    overflow: hidden;
  }

  .report-edit-mode .report-section-label,
  .report-lines-hint,
  .report-editor-page-count {
    display: none !important;
  }

  .report-lines {
    break-inside: auto;
  }

  .report-various,
  .report-last-footer {
    break-inside: avoid;
  }


}
.report-edit-mode .report-header-grid{position:absolute;display:grid;pointer-events:none;box-sizing:border-box;z-index:0}
.report-edit-mode .report-header-grid-cell{border:1px dashed #8eb6e0;box-sizing:border-box;min-width:0;min-height:0;background:#eff6ff18}
.report-edit-mode .report-header-grid-cell>span{font:6pt Arial;color:#5279a3;padding:1mm;opacity:.8}
.report-edit-mode .report-header-group{z-index:1}
.report-edit-mode .report-header-field{z-index:2;touch-action:none}

/* The base and copied Infitec layouts use the same decoration contract. */
.report-infitec-v2 .report-header-group{border-radius:2mm}
.report-infitec-v2 [data-report-group="document"]{border-left:1.2mm solid #172f50!important}
.report-infitec-v2 .report-lines,.report-infitec-v2 .report-various{padding-left:10mm;padding-right:10mm}
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-lines{margin-top:3mm}
.report-infitec-v2 .report-various-grid{grid-template-columns:102mm 82mm!important;column-gap:6mm}
.report-infitec-v2 [data-report-source="totals"]{border-radius:2mm;padding:3mm;font-size:8pt}
.report-infitec-v2 [data-report-source="totals"]>strong{display:none}
.report-infitec-v2 .report-totals>div{padding:.55mm 0}
.report-infitec-v2 .report-totals dd{white-space:nowrap}
.report-infitec-v2 .report-data-icon{display:inline-block;width:5mm;flex:0 0 5mm;font-size:10pt;color:#476382}
.report-discount-band{border:.25mm solid #b8cee6;border-left:1mm solid #172f50;border-radius:1mm;background:#eff6fd;padding:2mm 3mm;margin-bottom:2mm;font-size:8pt}
.report-discount-value{color:#0066c4}
.report-infitec-v2 .report-footer-field{display:block;white-space:pre-wrap;line-height:1.2}
@page{ @bottom-right{padding-top:2mm;} }

.report-data-icon svg{display:block;width:3.6mm;height:3.6mm}

/* Keep the policy directly above the page footer rule on both renderer paths. */
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-paper{display:flex;flex-direction:column}
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-header,
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-lines,
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-various{flex:0 0 auto}
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-last-footer{height:auto!important;margin-top:auto;padding:0 10mm 1mm}
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-last-footer .report-footer-field,
.report-infitec-v2.report-single-page .report-footer .report-footer-field{position:static!important;display:block!important;left:auto!important;top:auto!important;width:100%!important;height:auto!important;padding:0 0 1mm!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important}
.report-infitec-v2.report-single-page .report-footer{top:auto!important;bottom:0;height:auto!important;padding:0 10mm 1mm;display:flex;flex-direction:column}

/* Infitec card headers and totals follow the refreshed document design. */
.report-infitec-v2:not(.report-edit-mode) .report-header-group[data-report-group="document"],
.report-infitec-v2:not(.report-edit-mode) .report-header-group[data-report-group="entity"],
.report-infitec-v2:not(.report-edit-mode) .report-header-group[data-report-group="client"] {
  overflow: hidden;
  border: .3mm solid #b8cee6 !important;
  border-left: .3mm solid #b8cee6 !important;
  border-radius: 3mm !important;
  background: #f8fbff !important;
}

.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="title"] {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 12mm !important;
  justify-content: flex-start !important;
  gap: 3mm;
  padding: 0 3mm !important;
  border-radius: 2.5mm 2.5mm 0 0;
  background: linear-gradient(110deg, #173f70, #285f96) !important;
  color: #fff !important;
  font-size: 15pt !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="number"] {
  left: 4mm !important;
  top: 13mm !important;
  width: 42mm !important;
  height: 17mm !important;
  justify-content: flex-start !important;
  padding: 0 2mm !important;
  border-right: .3mm solid #8ba9ca;
  font-size: 14pt !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="date"],
.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="reference"] {
  left: 50mm !important;
  width: 38mm !important;
  height: 7mm !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  font-size: 8pt !important;
  white-space: nowrap;
}

.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="date"] { top: 13mm !important; }
.report-infitec-v2:not(.report-edit-mode) [data-report-group="document"] [data-report-element="reference"] { top: 21mm !important; }

.report-infitec-v2:not(.report-edit-mode) [data-report-group="entity"] [data-report-element="company-label"],
.report-infitec-v2:not(.report-edit-mode) [data-report-group="client"] [data-report-element="client-label"] {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 10mm !important;
  justify-content: flex-start !important;
  gap: 2.5mm;
  padding: 0 3mm !important;
  border-radius: 2.5mm 2.5mm 0 0;
  background: linear-gradient(100deg, #e5f1ff, #d9eaff) !important;
  color: #173f70 !important;
  font-size: 9pt !important;
  font-weight: 700 !important;
}

.report-infitec-v2:not(.report-edit-mode) .report-header-text { min-width: 0; }
.report-infitec-v2:not(.report-edit-mode) .report-card-icon {
  display: inline-flex;
  width: 5mm;
  height: 5mm;
  flex: 0 0 5mm;
  align-items: center;
  justify-content: center;
  color: #173f70;
}
.report-infitec-v2:not(.report-edit-mode) .report-card-icon svg { display: block; width: 100%; height: 100%; }
.report-infitec-v2:not(.report-edit-mode) [data-report-element="title"] .report-card-icon { width: 6mm; height: 6mm; flex-basis: 6mm; color: #fff; }

.report-infitec-v2:not(.report-edit-mode) .report-various-block[data-report-source="observations"],
.report-infitec-v2:not(.report-edit-mode) .report-various-block[data-report-source="taxes"] {
  overflow: hidden;
  padding: 0 !important;
  border: .3mm solid #b8cee6 !important;
  border-radius: 2.5mm !important;
  background: #fff !important;
}
.report-infitec-v2:not(.report-edit-mode) .report-various-heading {
  display: flex;
  min-height: 9mm;
  align-items: center;
  gap: 2.5mm;
  padding: 1.5mm 3mm;
  background: linear-gradient(100deg, #e5f1ff, #d9eaff);
  color: #173f70;
  font-size: 10pt;
  font-weight: 700;
}
.report-infitec-v2:not(.report-edit-mode) .report-observation-value { padding: 2mm 3mm 2.5mm; }
.report-infitec-v2:not(.report-edit-mode) .report-tax-table { width: calc(100% - 6mm); margin: 2mm 3mm 3mm; }
.report-infitec-v2:not(.report-edit-mode) .report-tax-table thead { background: #eaf3fd; }
.report-infitec-v2:not(.report-edit-mode) .report-tax-table [data-report-block-field] {
  width: 20%;
  padding-inline: .3mm;
  text-align: center !important;
}
.report-infitec-v2:not(.report-edit-mode) .report-tax-table th[data-report-block-field="base"] { white-space: nowrap; }

.report-infitec-v2:not(.report-edit-mode) [data-report-source="totals"] {
  overflow: hidden;
  border: .35mm solid #9cbad9 !important;
  border-radius: 3mm !important;
  background: linear-gradient(145deg, #f6faff, #e8f2fc) !important;
  padding: 3mm !important;
}
.report-infitec-v2:not(.report-edit-mode) .report-totals .report-sum-of-concepts {
  align-items: center;
  justify-content: flex-start;
  gap: 2mm;
  padding: 0 0 1mm;
}
.report-infitec-v2:not(.report-edit-mode) .report-sum-of-concepts .report-card-icon { width: 5mm; height: 5mm; flex-basis: 5mm; }
.report-infitec-v2:not(.report-edit-mode) .report-sum-of-concepts dt { flex: 1; }
.report-infitec-v2:not(.report-edit-mode) .report-sum-of-concepts dd { margin-left: auto; }
.report-infitec-v2:not(.report-edit-mode) .report-totals .report-grand-total {
  margin: 1mm -3mm -3mm !important;
  padding: 1.8mm 3mm !important;
  border: 0 !important;
  border-radius: 0 0 2.5mm 2.5mm;
  background: #173f70;
  color: #fff !important;
  font-size: 10pt;
  font-weight: 700;
}
.report-infitec-v2:not(.report-edit-mode) .report-totals .report-grand-total dt,
.report-infitec-v2:not(.report-edit-mode) .report-totals .report-grand-total dd { color: #fff !important; }

/* Keep policy and totals panels together, allowing longer policies to push the cards upward. */
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-various { margin-top: auto !important; }
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-various { margin-bottom: 1vh !important; }
.report-infitec-v2:not(.report-edit-mode):not(.report-single-page) .report-last-footer { margin-top: 0 !important; }
.report-infitec-v2:not(.report-edit-mode) .report-lines-blocks:has([data-report-source="observations"]) { margin-top: 1vh !important; }

.report-infitec-v2:not(.report-edit-mode) [data-report-source="totals"] {
  display: flex;
  flex-direction: column;
}
.report-infitec-v2:not(.report-edit-mode) .report-totals {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.report-infitec-v2:not(.report-edit-mode) .report-totals .report-grand-total { margin-top: auto !important; }

/* The fitted one-page path uses the same bottom-up flow as the natural PDF path. */
.report-infitec-v2.report-single-page:not(.report-edit-mode) .report-paper {
  display: flex;
  flex-direction: column;
}
.report-infitec-v2.report-single-page:not(.report-edit-mode) .report-header { flex: 0 0 auto; }
.report-infitec-v2.report-single-page:not(.report-edit-mode) .report-lines {
  position: static !important;
  flex: 0 0 auto;
  margin: 5mm 0 0 !important;
}
.report-infitec-v2.report-single-page:not(.report-edit-mode) .report-various {
  position: static !important;
  flex: 0 0 auto;
  margin: auto 0 1vh !important;
  left: auto !important;
  top: auto !important;
  width: 210mm;
}
.report-infitec-v2.report-single-page:not(.report-edit-mode) .report-footer {
  position: static !important;
  flex: 0 0 auto;
  width: 210mm;
  margin-top: 0 !important;
}
/* The summary stays together in normal print flow; PDF coordinates anchor it. */
.report-infitec-v2:not(.report-edit-mode) .report-paper { display: block !important; min-height: 0 !important; }
.report-final-summary { position: relative; break-inside: avoid; margin-top: 3mm; }
.report-infitec-v2:not(.report-edit-mode) .report-final-summary .report-various { margin: 0 0 1vh !important; }
.report-summary-marker { position: absolute; left: 10mm; display: block; width: 1pt; height: 1pt; font: 1pt/1pt Arial; color: #fff; text-decoration: none; }
.report-summary-top { top: 0; }
.report-summary-bottom { bottom: 0; }

/* Observations belong to the final summary, immediately above taxes/concepts. */
.report-summary-observations { margin: 0 0 3mm; }
.report-summary-observations > .report-various-block { margin: 0 0 2mm; }

/* Party cards share top-aligned rows, wrapping and typography in every document. */
.report-infitec-v2:not(.report-edit-mode) [data-report-group="entity"] .report-header-field:not([data-report-source="text"]),
.report-infitec-v2:not(.report-edit-mode) [data-report-group="client"] .report-header-field:not([data-report-source="text"]){align-items:flex-start;white-space:pre-wrap;overflow-wrap:anywhere}
