/* =====================================================================
   Impresión: todo documento se arma dentro de #impresion y se imprime
   con el diálogo del navegador (o "Guardar como PDF").
   ===================================================================== */
#impresion { display: none; }

@media print {
  @page { size: letter; margin: 14mm; }
  body { background: #fff; color: #222; font-size: 11pt; }
  #app, #avisos, .modal-fondo { display: none !important; }
  #impresion { display: block; }

  .doc h1 { font-size: 16pt; color: #5B2A27; margin: 8px 0; text-align: center; }
  .doc h2 { font-size: 12pt; color: #5B2A27; margin: 14px 0 6px; border-bottom: 1px solid #E8C9BF; padding-bottom: 3px; }
  .doc p { margin: 4px 0; }
  .doc table { width: 100%; border-collapse: collapse; margin: 6px 0; }
  .doc th, .doc td { border: 1px solid #DDBFB5; padding: 5px 7px; text-align: left; font-size: 10pt; vertical-align: top; }
  .doc th { background: #FBDCD3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc td.num, .doc th.num { text-align: right; white-space: nowrap; }
  .doc .total td { font-weight: 600; font-size: 11pt; }
  .doc .seccion { break-inside: avoid; }
  .doc .salto { break-before: page; }

  .membrete { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid #CF8571; padding-bottom: 8px; margin-bottom: 8px; }
  .membrete img { max-height: 70px; max-width: 200px; object-fit: contain; }
  .membrete .datos { font-size: 9pt; line-height: 1.35; margin-left: auto; text-align: right; }
  .membrete .datos b { font-size: 11pt; color: #5B2A27; }

  .casillas { columns: 2; column-gap: 18px; font-size: 9.5pt; }
  .casillas div { break-inside: avoid; padding: 1px 0; }
  .marca { display: inline-block; width: 12px; text-align: center; font-weight: 700; }

  .firmas { display: flex; gap: 40px; margin-top: 40px; }
  .firmas div { flex: 1; text-align: center; border-top: 1px solid #555; padding-top: 4px; font-size: 9.5pt; }
  .pie-doc { margin-top: 14px; font-size: 8.5pt; color: #777; text-align: center; }

  .odonto-imp { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; font-size: 8pt; text-align: center; }
  .odonto-imp div { border: 1px solid #DDBFB5; padding: 2px 0; }
}

/* ---------- Ticket angosto (58/80 mm) y firmas ---------- */
@media print {
  .doc.ticket { font-size: 8.5pt; color: #000; margin: 0 auto; }
  .doc.ticket .t-centro { text-align: center; }
  .doc.ticket img.t-logo { max-width: 70%; max-height: 22mm; display: block; margin: 0 auto 2mm; }
  .doc.ticket .t-linea { border-top: 1px dashed #000; margin: 2mm 0; }
  .doc.ticket .t-fila { display: flex; justify-content: space-between; gap: 2mm; }
  .doc.ticket .t-grande { font-size: 11pt; font-weight: 700; }
  .doc.ticket .t-cancelado { border: 2px solid #000; text-align: center; font-weight: 700; font-size: 12pt; padding: 1mm; margin: 2mm 0; }
  .doc.ticket p { margin: 1mm 0; }
  .doc img.firma { max-height: 28mm; max-width: 70mm; display: block; margin: 0 auto; }
  .doc .bloque-firma { text-align: center; margin-top: 10mm; break-inside: avoid; }
  .doc .bloque-firma div { border-top: 1px solid #555; padding-top: 2px; font-size: 9.5pt; width: 70mm; margin: 0 auto; }
  .doc .texto-largo { white-space: pre-wrap; line-height: 1.5; }
}
