/* Printable documents (layouts/document): the report PDF and the seller pack.
   A4 pages laid out in millimetres, as in the approved "Pacote do Vendedor"
   design; on screen they sit on a grey desk, on paper one per sheet. */
body.doc { margin: 0; background: #e9ecef; color: #12302a; font-family: "Segoe UI", system-ui, Calibri, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body.doc *, body.doc *::before, body.doc *::after { box-sizing: border-box; }
body.doc a { color: #5889FB; text-decoration: none; }
.doc-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 24px;
  background: #00463A; color: #fff; font-size: 14px; }
.doc-toolbar .doc-back { color: #A4E0CE; font-weight: 600; }
.doc-tool-text { color: #A4E0CE; }
.doc-tool-hint { margin-left: auto; color: #A4E0CE; }
.doc-toolbar select { background: #fff; height: 32px; padding: 0 10px; border-radius: 8px; border: 0; font-size: 14px; font-family: inherit; color: #12302a; max-width: 340px; }
.doc-print { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: #00D2AE; color: #00463A; font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit; }
.doc-print:hover { background: #A4E0CE; }
.doc-xls { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3);
  color: #fff !important; font-weight: 600; }
.doc-lang { display: flex; padding: 3px; background: rgba(255,255,255,.12); border-radius: 8px; gap: 2px; }
.doc-lang button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #A4E0CE; font-size: 12.5px; font-weight: 700;
  cursor: pointer; }
.doc-lang button.is-on { background: #fff; color: #00463A; }
.doc-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 0 48px; }

/* min-height, not height: an unusually long pack grows onto another sheet rather than losing its bottom. */
.doc-page { width: 210mm; min-height: 297mm; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.12); position: relative; display: flex; flex-direction: column; }
.doc-page.is-landscape { width: 297mm; height: auto; min-height: 210mm; page: landscape; }
.doc-page.is-flow { height: auto; overflow: visible; padding: 11mm 14mm 9mm; display: flex; flex-direction: column; gap: 5mm; }
.doc-inner { flex: 1; min-height: 297mm; padding: 11mm 14mm 7mm; display: flex; flex-direction: column; gap: 3.5mm; }

/* report document */
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; padding-bottom: 3.5mm; border-bottom: 2px solid #00463A; }
.doc-brand { font-size: 9pt; font-weight: 700; letter-spacing: .18em; color: #00463A; }
.doc-brand span { font-weight: 400; letter-spacing: 0; color: #5C7268; }
.doc-title { font-size: 19pt; font-weight: 700; color: #00463A; line-height: 1.15; margin-top: 2mm; }
.doc-sub { font-size: 10.5pt; color: #5C7268; margin-top: 1mm; }
.doc-head-side { font-size: 9.5pt; color: #5C7268; text-align: right; max-width: 80mm; line-height: 1.45; }
.doc-filters { font-size: 9.5pt; color: #5C7268; line-height: 1.45; }
.doc-filters b { color: #12302a; }
.doc-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; align-items: start; }
.doc-charts .mr-rb-chart { padding: 3.5mm; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.doc-table th { text-align: left; font-weight: 600; color: #5C7268; border-bottom: 1px solid #12302a; padding: 1.4mm 2mm; vertical-align: bottom; }
.doc-table th small { display: block; font-weight: 400; font-size: 8pt; }
.doc-table td { border-bottom: 1px solid #e6eeeb; padding: 1.2mm 2mm; max-width: 70mm; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-table .is-right { text-align: right; }
.doc-table tr { break-inside: avoid; }
.doc-note { font-size: 9pt; color: #5C7268; margin: 0; line-height: 1.45; }
.doc-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 6mm; font-size: 9pt; color: #5C7268; border-top: 1px solid #e6eeeb;
  padding-top: 2.5mm; }

@media print {
  @page { size: A4; margin: 0; }
  @page landscape { size: A4 landscape; margin: 0; }
  body.doc { background: #fff; }
  .doc-noprint { display: none !important; }
  .doc-pages { display: block; padding: 0; }
  .doc-page { box-shadow: none; break-after: page; margin: 0; }
  .doc-page:last-child { break-after: auto; }
  .doc-page.is-landscape { width: auto; min-height: 0; }
  body.doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- the seller pack (transcribed from "Pacote do Vendedor v2") ---------- */
.pk-empty { font-size: 12pt; color: #5C7268; }
.pk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; padding-bottom: 3.5mm; border-bottom: 2px solid #00463A; }
.pk-kicker { font-size: 11pt; color: #5C7268; margin-top: 2.5mm; }
.pk-name { font-size: 21pt; font-weight: 700; color: #00463A; line-height: 1.15; }
.pk-meta { font-size: 11pt; margin-top: 1.5mm; }
.pk-head-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2.5mm; text-align: right; }
.pk-class { padding: 2mm 4mm; border-radius: 2mm; font-size: 15pt; font-weight: 700; }
.pk-head-lines { font-size: 10pt; color: #5C7268; line-height: 1.45; }
.pk-head-lines b { color: #12302a; }
.pk-cols { display: flex; gap: 6mm; }
.pk-hl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5mm; }
.pk-hl-title { font-size: 9pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pk-hl-row { font-size: 12pt; line-height: 1.3; padding: 1.2mm 0; border-top: 1px solid #e6eeeb; }
.pk-hl-row b { font-weight: 600; }
.pk-hl-row span, .pk-hl-row.is-none { color: #5C7268; }
.pk-kpis { display: flex; flex-direction: column; }
.pk-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; margin-bottom: 2mm; }
.pk-sec-title { font-size: 13pt; font-weight: 700; color: #00463A; }
.pk-sec-note { font-size: 10pt; color: #5C7268; text-align: right; }
.pk-sec-note .pk-tick { position: static; display: inline-block; width: .7mm; height: 3mm; margin: 0 1mm 0 2mm; vertical-align: -.4mm; }
.pk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 26mm 19mm 19mm 30mm 17mm; gap: 0 3mm; align-items: center; padding: 1.05mm 0;
  border-bottom: 1px solid #e6eeeb; }
.pk-grid.is-head { padding: 1.6mm 0; border-bottom: 1px solid #12302a; font-size: 9.5pt; font-weight: 600; color: #5C7268; }
.pk-kpi-name { font-size: 11.5pt; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-kpi-unit { font-size: 9pt; color: #5C7268; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-r { text-align: right; }
.pk-val { font-size: 11.5pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-ref { font-size: 10.5pt; color: #5C7268; white-space: nowrap; }
.pk-track { position: relative; height: 5mm; }
.pk-track::before { content: ""; position: absolute; left: 0; right: 0; top: 2.2mm; height: .6mm; background: #e6eeeb; }
.pk-tick { position: absolute; top: .6mm; width: .6mm; height: 3.8mm; }
.pk-tick.is-scope { background: #12302a; }
.pk-tick.is-state { background: #5889FB; }
.pk-dot { position: absolute; top: .9mm; width: 3.2mm; height: 3.2mm; margin-left: -1.6mm; border-radius: 50%; background: #00463A; }
.pk-dot.is-good { background: #1b7a47; } .pk-dot.is-bad { background: #8a1f1f; } .pk-dot.is-none { background: #77767b; }
.pk-read { justify-self: start; padding: .6mm 2mm; border-radius: 1.2mm; font-size: 9.5pt; font-weight: 600; white-space: nowrap; }
.pk-note { font-size: 9.5pt; color: #5C7268; margin-top: 1.5mm; line-height: 1.45; }
.pk-head2 { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; padding-bottom: 2mm; border-bottom: 2px solid #00463A; }
.pk-head2 span:first-child { font-size: 15pt; font-weight: 700; color: #00463A; }
.pk-head2 span:last-child { font-size: 10pt; color: #5C7268; }
.pk-block { display: flex; flex-direction: column; gap: 1.5mm; }
.pk-sig { display: grid; grid-template-columns: minmax(0, 1fr) 26mm 28mm 24mm 16mm; gap: 0 3mm; align-items: center; padding: .35mm 0; line-height: 1.2;
  border-bottom: 1px solid #e6eeeb; font-size: 10.5pt; }
.pk-sig.is-head { padding: 1mm 0; white-space: nowrap; border-bottom: 1px solid #12302a; font-size: 9.5pt; font-weight: 600; color: #5C7268; }
.pk-pct { justify-self: end; padding: 0 1.5mm; border-radius: 1.2mm; font-size: 10pt; font-weight: 700; }
.pk-row { display: flex; gap: 6mm; }
.pk-disc { flex: 0 0 52mm; display: flex; flex-direction: column; gap: 1.2mm; }
.pk-fact { display: flex; align-items: baseline; gap: 2.5mm; padding: .6mm 0; border-top: 1px solid #e6eeeb; }
.pk-fact b { flex: 0 0 19mm; font-size: 13pt; font-weight: 700; }
.pk-fact span { font-size: 10pt; color: #5C7268; line-height: 1.3; }
.pk-seg { display: flex; flex-direction: column; gap: 1.2mm; }
.pk-seg.is-col { flex: 0 0 56mm; min-width: 0; }
.pk-sub-title { font-size: 10pt; line-height: 1.25; font-weight: 600; color: #12302a; }
.pk-seg-body { display: flex; gap: 3mm; align-items: center; }
.pk-donut { position: relative; flex: none; width: 17mm; height: 17mm; border-radius: 50%; }
.pk-donut i { position: absolute; inset: 4.2mm; border-radius: 50%; background: #fff; }
.pk-seg-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .6mm; }
.pk-seg-legend div { display: grid; grid-template-columns: 2.4mm minmax(0, 1fr) 9mm; gap: 1.5mm; align-items: center; font-size: 9pt; }
.pk-seg-legend i { width: 2.4mm; height: 2.4mm; border-radius: .6mm; }
.pk-seg-legend span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-seg-legend b { text-align: right; }
.pk-rules { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5mm; }
.pk-rule { display: grid; grid-template-columns: minmax(0, 1fr) 13mm; gap: 3mm; align-items: baseline; padding: .6mm 0; border-top: 1px solid #e6eeeb;
  font-size: 10pt; }
.pk-rule span { line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-rule b { text-align: right; }
.pk-trends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm 6mm; }
.pk-trend { display: flex; flex-direction: column; gap: .6mm; min-width: 0; }
.pk-trend-name { font-size: 10.5pt; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-trend-unit { font-size: 8.5pt; color: #5C7268; margin-top: -.8mm; }
.pk-trend-bars { display: flex; align-items: flex-end; gap: 1.6mm; height: 9.5mm; padding-top: 2.8mm; }
.pk-trend-bars > div { flex: 1; height: 100%; position: relative; min-width: 0; }
.pk-trend-bar { position: absolute; left: 0; right: 0; bottom: 0; background: #009279; border-radius: .8mm .8mm 0 0; }
.pk-trend-bar.is-partial { background: #A4E0CE; }
.pk-trend-bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 7.5pt; color: #5C7268; white-space: nowrap;
  padding-bottom: .4mm; }
.pk-trend-avg { position: absolute; left: -.5mm; right: -.5mm; height: .7mm; background: #5889FB; }
.pk-trend-labels { display: flex; gap: 1.6mm; border-top: 1px solid #e6eeeb; padding-top: .8mm; }
.pk-trend-labels span { flex: 1; text-align: center; font-size: 8.5pt; color: #5C7268; }
.pk-flag { display: flex; gap: 3mm; align-items: baseline; padding: 1mm 0; border-top: 1px solid #e6eeeb; font-size: 10pt; line-height: 1.3; }
.pk-flag > span:first-child { flex: none; padding: .4mm 2mm; border-radius: 1.2mm; font-size: 9.5pt; font-weight: 600; }
.pk-flag.is-none { color: #5C7268; }
.pk-agreed { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 6mm; }
.pk-lines { flex: 1; min-height: 6mm; background: repeating-linear-gradient(to bottom, transparent 0, transparent 8.4mm, #e6eeeb 8.4mm, #e6eeeb calc(8.4mm + 1px)); }
.pk-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8mm; margin-top: 4mm; font-size: 10pt; color: #5C7268; }
.pk-sign span { border-top: 1px solid #12302a; padding-top: 1.2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
