.tv-pdf-report { display: none; }

@page mymobi-report {
  size: A4 landscape;
  margin: 8mm 12mm 11mm;
  @top-left { content: ''; }
  @top-center { content: ''; }
  @top-right { content: ''; }
  @bottom-left { content: 'MyMobi  |  Central de operações'; color: #42615a; font: 8pt Arial, sans-serif; }
  @bottom-center { content: ''; }
  @bottom-right { content: 'Página ' counter(page) ' de ' counter(pages); color: #42615a; font: 8pt Arial, sans-serif; }
}

@media print {
  body.tv-pdf-printing { margin: 0; padding: 0; background: #fff; overflow: visible; }
  body.tv-pdf-printing > :not(.tv-pdf-report) { display: none !important; }
  .tv-pdf-report, .tv-pdf-report * { visibility: visible !important; }
  .tv-pdf-report {
    display: block; page: mymobi-report; color: #173b36; font: 9pt/1.24 Arial, sans-serif;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .tv-pdf-header { display: flex; align-items: center; gap: 6mm; border-bottom: 1.5pt solid #087e70; padding-bottom: 2.5mm; margin-bottom: 2mm; break-inside: avoid; }
  .tv-pdf-header img { width: 30mm; height: auto; object-fit: contain; }
  .tv-pdf-header h1 { margin: 0 0 0.8mm; font-size: 17pt; line-height: 1.1; color: #093c40; }
  .tv-pdf-header p { margin: 0; font-size: 9pt; color: #3d665e; }
  .tv-pdf-meta { margin-left: auto; text-align: right; display: grid; gap: 0.6mm; }
  .tv-pdf-meta small { font-size: 7.5pt; color: #4c6862; }
  .tv-pdf-report h2 { margin: 2mm 0 1mm; font-size: 11pt; color: #093c40; break-after: avoid; }
  .tv-pdf-range { margin: 0 0 1.5mm; font-size: 8pt; color: #4c6862; break-after: avoid; }
  .tv-pdf-block + .tv-pdf-block { break-before: page; }
  .tv-pdf-report .tv-gestor-kpis { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2mm; margin: 0 0 2.5mm; break-inside: avoid; }
  .tv-pdf-report .tv-gestor-kpis article { padding: 1mm 2mm; border-radius: 1.4mm; border-color: #c6ddd6; }
  .tv-pdf-report .tv-gestor-kpis h4 { font-size: 8pt; margin: 0 0 0.9mm; }
  .tv-pdf-report .tv-gestor-kpis dt { font-size: 7pt; }
  .tv-pdf-report .tv-gestor-kpis dd { font-size: 10pt; margin: 0; }
  .tv-pdf-report table { border-collapse: collapse; }
  .tv-pdf-report thead { display: table-header-group; }
  .tv-pdf-report tr { break-inside: avoid; }
  .tv-pdf-report .tv-gestor-group { break-after: avoid; }
  .tv-pdf-brokers, .tv-pdf-days { table-layout: fixed; width: 100%; font: 8pt/1.12 Arial, sans-serif; }
  .tv-pdf-brokers th, .tv-pdf-brokers td, .tv-pdf-days th, .tv-pdf-days td { border: 0.35pt solid #c5dad4; padding: 0.5mm 1.15mm; text-align: center; position: static; }
  .tv-pdf-brokers { line-height: 1; }
  .tv-pdf-brokers tbody th, .tv-pdf-brokers tbody td { font-size: 8pt; line-height: 1; border-width: 0.25pt; }
  .tv-pdf-brokers th, .tv-pdf-brokers td { padding-block: 0; }
  .tv-pdf-brokers thead th { padding-block: 0.65mm; }
  .tv-pdf-brokers thead th, .tv-pdf-days thead th { background: #0c474c; color: white; font-weight: 700; overflow-wrap: anywhere; }
  .tv-pdf-brokers thead tr:nth-child(2) th { background: #dceee9; color: #214e46; }
  .tv-pdf-brokers thead th[rowspan] { width: 25%; text-align: left; }
  .tv-pdf-brokers th[scope='row'], .tv-pdf-brokers th[scope='rowgroup'] { text-align: left; }
  .tv-pdf-brokers .tv-gestor-group th { background: #e2f0eb; color: #0d544c; }
  .tv-pdf-brokers tr:nth-child(even):not(.tv-gestor-group), .tv-pdf-days tbody tr:nth-child(even) { background: #f2f7f5; }
  .tv-pdf-daily { break-before: page; }
  .tv-pdf-days td, .tv-pdf-days th { padding-block: 0.8mm; }
  .tv-pdf-report .tv-box, .tv-pdf-report .tv-card { box-shadow: none; }
  .tv-pdf-report .tv-history { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tv-pdf-report .tv-detail-btn { cursor: auto; }
}

@media print {
  .tv-pdf-summary { border-bottom: 0.5pt solid #c5dad4; padding-bottom: 1mm; margin-bottom: 1mm; break-inside: avoid; }
  .tv-pdf-summary small { display: block; color: #42615a; font-size: 7pt; }
  .tv-pdf-summary-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2mm; }
  .tv-pdf-summary-grid span, .tv-pdf-summary-grid strong { display: block; font-size: 8pt; line-height: 1.1; }
  .tv-pdf-summary-grid strong { color: #0c474c; }
}
