/* ── Nota de venta ──────────────────────────────────────── */
/* Hoja blanca fija: se ve y se imprime igual en cualquier tema */
.nota { background: #fff; color: #161616; border-radius: 10px; padding: 18px; font-size: .86rem; line-height: 1.45; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.nota__head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid #161616; }
.nota__logo { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: contain; }
.nota__marca { flex: 1; min-width: 0; }
.nota__relleno { display: none; }
.nota__negocio { margin: 0 0 2px; font-size: 1.25rem; font-weight: 800; letter-spacing: .02em; color: #161616; }
.nota__folio { text-align: right; flex: none; }
.nota__titulo { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #555; }
.nota__num { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nota__cliente { padding: 10px 0; border-bottom: 1px solid #ccc; }
.nota__tabla { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.nota__tabla th { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #555; text-align: left; padding: 6px 4px; border-bottom: 1px solid #161616; }
.nota__tabla td { padding: 7px 4px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.nota__tabla .r { text-align: right; white-space: nowrap; }
.nota__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 8px; border-top: 2px solid #161616; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nota__estado { margin-top: 10px; display: inline-block; padding: 3px 10px; border: 2px solid #b42318; color: #b42318; font-weight: 800; font-size: .78rem; letter-spacing: .08em; border-radius: 6px; }
.nota__estado--ok { border-color: #1a7f37; color: #1a7f37; }
/* Observaciones: recuadro con título (pantalla, papel y PDF) */
.nota__obs { margin-top: 12px; padding: 8px 10px; border: 1px solid #bbb; border-radius: 6px; break-inside: avoid; }
.nota__obs-titulo { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #555; margin-bottom: 2px; }
.nota__notas { color: #222; white-space: pre-wrap; overflow-wrap: anywhere; }
.nota__pie { margin-top: 16px; text-align: center; color: #555; font-size: .8rem; }
@media (max-width: 480px) { .nota { padding: 14px; font-size: .8rem; } .nota__head { flex-wrap: wrap; gap: 8px 12px; } .nota__logo { width: 44px; height: 44px; } .nota__folio { flex: 1 1 100%; text-align: left; } }

/* Copia para imprimir: invisible en pantalla; en papel/PDF es lo único que sale */
#nota-impresion { display: none; }
@media print {
  /* Hoja carta fija. Medidas en mm y no en vh: el Chrome 109 de Windows 7/8 calcula vh con la
     pantalla y no con la hoja, y la nota salía más grande que el papel */
  @page { size: letter; margin: 12mm; }
  html, body { background: #fff !important; }
  body > *:not(#nota-impresion) { display: none !important; }
  #nota-impresion { display: block; width: 100%; }
  /* La nota llena la hoja (279.4 − 24 mm de márgenes): el cuerpo se estira y el cierre queda al pie */
  #nota-impresion .nota { display: flex; flex-direction: column; min-height: 254mm; box-sizing: border-box; border-radius: 0; padding: 0; font-size: 10.5pt; }
  #nota-impresion .nota__head { gap: 5mm; padding-bottom: 4mm; }
  #nota-impresion .nota__logo { width: 20mm; height: 20mm; border-radius: 3mm; }
  #nota-impresion .nota__negocio { font-size: 18pt; }
  #nota-impresion .nota__num { font-size: 14pt; }
  #nota-impresion .nota__cliente { padding: 3mm 0; font-size: 11pt; }
  #nota-impresion .nota__cuerpo { flex: 1; display: flex; flex-direction: column; }
  #nota-impresion .nota__tabla { flex: 1; height: 100%; }
  #nota-impresion .nota__tabla td { padding: 3mm 2mm; }
  #nota-impresion .nota__tabla th { padding: 2.5mm 2mm; font-size: 8pt; }
  #nota-impresion .nota__relleno { display: table-row; height: 100%; }
  #nota-impresion .nota__relleno td { padding: 0; border-bottom: 0; }
  #nota-impresion .nota__total { font-size: 15pt; margin-top: 0; padding-top: 3mm; }
  #nota-impresion .nota__estado { margin-top: 3mm; font-size: 9.5pt; }
  #nota-impresion .nota__obs { margin-top: 4mm; padding: 2.5mm 3.5mm; font-size: 10pt; }
  #nota-impresion .nota__obs-titulo { font-size: 8pt; }
  #nota-impresion .nota__pie { margin-top: 6mm; font-size: 9.5pt; }
}
