/* Reportes en tamaño carta, pensados para blanco y negro: sin fondos, solo texto y líneas finas. */
#reporte { display: none; }

@page {
  size: letter;
  margin: 16mm 13mm 16mm;
  @bottom-left { content: "Generado con GanaderoYa"; font: 8pt Arial, sans-serif; color: #000; }
  @bottom-right { content: "Página " counter(page) " de " counter(pages); font: 8pt Arial, sans-serif; color: #000; }
}

@media print {
  html { font-size: 10.5pt; }
  body { background: #fff; color: #000; line-height: 1.3; }
  .no-imprimir, .boton, dialog { display: none !important; }

  body.imprimiendo > *:not(#reporte) { display: none !important; }
  body.imprimiendo #reporte { display: block; font-family: Arial, sans-serif; color: #000; background: #fff; }

  .rep-cabecera { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1.5pt solid #000; }
  .rep-logo { max-width: 22mm; max-height: 22mm; }
  .rep-foto { display: block; max-width: 40mm; max-height: 40mm; margin-bottom: 8px; }
  .rep-foto-tabla { display: block; width: 36mm; max-height: 30mm; object-fit: contain; }
  .rep-foto-grande { display: block; max-width: 90mm; max-height: 70mm; margin-bottom: 4px; }
  .rep-finca { font-size: 13pt; font-weight: 700; }
  #reporte h1 { font-size: 15pt; margin: 2px 0; color: #000; }
  #reporte h2 { font-size: 11.5pt; margin: 0 0 4px; color: #000; break-after: avoid; }
  #reporte p { margin: 0 0 6px; }
  .rep-fuerte { font-size: 12.5pt; font-weight: 700; padding: 4px 0; border-top: 1pt solid #000; border-bottom: 1pt solid #000; }
  .rep-seccion { margin-top: 12px; }
  .rep-resumen { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-bottom: 8px; }

  .rep-tabla { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .rep-tabla thead { display: table-header-group; }
  .rep-tabla tfoot { display: table-row-group; font-weight: 700; }
  .rep-tabla tr { break-inside: avoid; }
  .rep-tabla th { text-align: left; font-weight: 700; padding: 3px 4px; border-top: 1pt solid #000; border-bottom: 1pt solid #000; }
  .rep-tabla td { padding: 2.5px 4px; border-bottom: .5pt solid #777; vertical-align: top; }
  .rep-tabla .rep-derecha { text-align: right; }
  .rep-firma { margin-top: 26px; font-size: 11pt; font-weight: 700; break-inside: avoid; }
}
