/* Visor de NF-e (herramientas/nfe.js, página pt/danfe-online.html). Pantalla y hoja impresa con la forma del DANFE (MOC 7.0 Anexo II). */
.fh-nfe-caixa { display: block; border: 2px dashed var(--ft-line-strong, #CBD5E1); border-radius: 10px; background: #fff; padding: 22px 18px;
  text-align: center; cursor: pointer; margin: 0 0 .8rem; }
.fh-nfe-caixa:hover, .fh-nfe-sobre { border-color: #2563EB; background: #EFF6FF; }
.fh-nfe-caixa-t { display: block; font-weight: 700; font-size: 1.1rem; color: var(--ft-ink, #0C0D14); }
.fh-nfe-caixa-s { display: block; font-weight: 400; font-size: .93rem; margin-top: .3rem; }
#fh-nfe-arq { display: block; max-width: 100%; font-size: .95rem; }
#fh-nfe-arq:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
/* la cabecera del sitio pone h2 y h3 a 20-34 px con !important bajo 768 px: aquí se gana con especificidad e !important */
.fh-nfe-res .fh-nfe-tit { font-size: 1.15rem !important; line-height: 1.3; margin: 0 0 .6rem; }
.fh-nfe-tit:focus { outline: none; }
.fh-nfe-btn2 { background: #fff; color: #1D4ED8; border: 1.5px solid #2563EB; }
.fh-nfe-btn2:hover { background: #EFF6FF; }
.fh-nfe-res .fh-pruebas li > span:last-child { min-width: 0; overflow-wrap: anywhere; }

.fh-nfe-folha { background: #fff; color: #0C0D14; border: 1px solid #94A3B8; padding: 10px; margin: 1rem 0 0; font-size: .82rem; line-height: 1.35; }
.fh-nfe-folha p { margin: 0; max-width: none; line-height: 1.35; }
.fh-nfe-marca { background: #F1F5F9; border: 1px solid #CBD5E1; padding: 5px 8px; font-size: .9em; color: #334155; }
.fh-nfe-sem { margin-top: 6px !important; border: 2px solid #DC2626; color: #B91C1C; font-weight: 800; text-align: center; padding: 4px; letter-spacing: .04em; }
.fh-nfe-alerta { margin-top: 6px !important; border: 1px solid #D97706; color: #92400E; font-weight: 700; text-align: center; padding: 3px; }
.fh-nfe-topo { display: grid; grid-template-columns: 2fr 1fr 2.2fr; gap: 6px; margin-top: 6px; }
.fh-nfe-q { border: 1px solid #94A3B8; padding: 5px 7px; margin-top: 6px; min-width: 0; }
.fh-nfe-topo .fh-nfe-q { margin-top: 0; }
.fh-nfe-folha .fh-nfe-q h3 { font-size: .8em !important; line-height: 1.3; text-transform: uppercase; letter-spacing: .05em; color: #334155; margin: 0 0 4px; font-weight: 700; }
.fh-nfe-nome { font-weight: 700; font-size: 1.15em; margin-bottom: 2px !important; }
.fh-nfe-doc { text-align: center; }
.fh-nfe-folha .fh-nfe-doc h3 { font-size: 1.25em !important; color: #0C0D14; letter-spacing: 0; text-transform: none; }
.fh-nfe-num { font-weight: 700; font-size: 1.15em; }
.fh-nfe-ch { font: 700 1.1em/1.4 var(--ft-mono, ui-monospace, monospace); word-break: break-word; margin-bottom: 3px !important; }
.fh-nfe-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; }
.fh-nfe-c { border: 1px solid #E2E8F0; padding: 2px 5px; min-width: 0; }
.fh-nfe-r { display: block; font-size: .76em; text-transform: uppercase; letter-spacing: .03em; color: #64748B; }
.fh-nfe-v { display: block; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.fh-nfe-largo { grid-column: 1 / -1; }
.fh-nfe-total .fh-nfe-v { font-size: 1.2em; font-weight: 800; }
.fh-nfe-rola { overflow-x: auto; }
.fh-nfe-itens table { border-collapse: collapse; width: 100%; font-size: .9em; }
.fh-nfe-itens td:nth-child(2) { min-width: 13em; }
.fh-nfe-itens th, .fh-nfe-itens td { border: 1px solid #CBD5E1; padding: 2px 4px; text-align: left; vertical-align: top; }
.fh-nfe-itens th { background: #F1F5F9; font-size: .86em; text-transform: uppercase; white-space: nowrap; }
.fh-nfe-itens td.fh-nfe-n { text-align: right; white-space: nowrap; }
.fh-nfe-item td { border-top: 1px dashed #64748B; }
.fh-nfe-mais td { font-size: .95em; color: #334155; border-top: 0; white-space: pre-line; }
.fh-nfe-rodape { margin-top: 6px !important; font-size: .85em; color: #475569; }
@media (max-width: 640px) { .fh-nfe-topo { grid-template-columns: 1fr; } .fh-nfe-g { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body > :not(main) { display: none !important; }
  .fh { padding: 0 !important; }
  .fh-wrap { max-width: none; }
  .fh-wrap > :not(#fh-nfe-out), #fh-nfe-out > :not(.fh-nfe-folha) { display: none !important; }
  .fh-nfe-folha { border: 0; padding: 0; margin: 0; font-size: 7.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fh-nfe-topo { grid-template-columns: 2fr 1fr 2.2fr; }
  .fh-nfe-g { grid-template-columns: repeat(6, 1fr); }
  .fh-nfe-q { break-inside: avoid; }
  .fh-nfe-itens { break-inside: auto; }
  .fh-nfe-rola { overflow: visible; }
  .fh-nfe-itens table { font-size: 6.3pt; }
  .fh-nfe-itens td:nth-child(2) { min-width: 0; width: 24%; }
  .fh-nfe-itens thead { display: table-header-group; }
  .fh-nfe-itens tr { break-inside: avoid; }
}
