@page { size: A4 portrait; margin: 6mm 4mm; }

* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { margin: 0; background: #fff !important; color: #000; font-family: Arial, sans-serif; }
.toolbar, .sheet { display: none !important; }
#printArea { display: block !important; }
#printArea, #printArea * { background-color: #fff !important; box-shadow: none !important; }

.print-page {
  height: 285mm;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2mm;
  page-break-after: always;
}
.print-page:last-child { page-break-after: auto; }
.ng-order {
  position: relative;
  width: 100%;
  height: 134mm;
  min-height: 134mm;
  overflow: hidden;
  border: .18mm solid #222;
  break-inside: avoid;
  font-size: 6.8pt;
  color: #000;
}
.print-page.single-copy .ng-order { height: auto; min-height: 134mm; }

.ng-top { position: relative; height: 32mm; display: grid; grid-template-columns: 23mm 1fr; }
.ng-logo { display: grid; place-items: center; overflow: hidden; border-right: .18mm solid #222; }
.ng-logo img { display: block; width: 21mm; height: 26.5mm; object-fit: contain; object-position: center; }
.ng-info h1, .ng-info h2 { margin: 0; text-align: center; border-bottom: .18mm solid #222; }
.ng-info h1 { height: 7mm; padding: 1.5mm 1mm; font-size: 9.5pt; }
.ng-info h2 { height: 5mm; padding: 1mm; font-size: 6.6pt; }
.ng-meta { height: 20mm; display: grid; grid-template-columns: 20mm minmax(0, 1fr) 22mm 32mm; grid-auto-rows: 4mm; }
.ng-meta > * { height: 4mm; min-height: 4mm; display: flex; align-items: center; padding: .4mm 1mm; border-right: .18mm solid #222; border-bottom: .18mm solid #222; overflow: hidden; white-space: nowrap; line-height: 1; }
.ng-meta > *:nth-child(4n) { border-right: 0; }
.ng-meta > *:nth-last-child(-n+4) { border-bottom: 0; }
.ng-meta > span { font-size: 6.1pt; }
.ng-meta > b { font-size: 6.2pt; text-overflow: ellipsis; font-weight: 900; }

.ng-head, .ng-row { display: grid; grid-template-columns: 6mm 42mm 10mm minmax(0, 1fr) 11mm 15mm 17mm; }
.ng-head { height: 5.5mm; min-height: 5.5mm; font-size: 6.5pt; }
.ng-head > * { display: flex; align-items: center; justify-content: center; border-top: .18mm solid #222; border-right: .18mm solid #222; border-bottom: .18mm solid #222; text-align: center; }
.ng-row { height: 7.5mm; min-height: 7.5mm; }
.ng-row > div { min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: .5mm; border-right: .18mm solid #222; border-bottom: .18mm solid #222; text-align: center; }
.ng-head > *:last-child, .ng-row > div:last-child { border-right: 0; }
.ng-product { justify-content: flex-start !important; padding-left: .8mm !important; white-space: nowrap; text-align: left !important; font-size: 6.2pt; line-height: 1; }
.ng-product.ng-product-medium { font-size: 5.9pt; letter-spacing: -.03pt; }
.ng-product.ng-product-long { font-size: 5.5pt; letter-spacing: -.06pt; }
.ng-product.ng-product-xlong { font-size: 5pt; letter-spacing: -.1pt; }
.ng-details { position: relative; height: 100%; display: grid !important; grid-template-columns: repeat(10, minmax(0, 1fr)) !important; align-items: stretch; padding: 0 !important; }
.ng-details::after { content: ''; position: absolute; z-index: 2; top: 50%; left: 0; right: 0; border-top: .18mm solid #222; pointer-events: none; }
.ng-box { min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr 1fr; border-right: .18mm solid #222; }
.ng-box:last-child { border-right: 0; }
.ng-box > b, .ng-box > small { min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 .1mm; font-size: 5.9pt; line-height: 1; }
.ng-box > b { border-bottom: 0; }

.ng-row.ng-filled .ng-product,
.ng-row.ng-filled > div:nth-child(3),
.ng-row.ng-filled > div:nth-child(5),
.ng-row.ng-filled > div:nth-child(6),
.ng-row.ng-filled > div:nth-child(7),
.ng-row.ng-filled .ng-box > b,
.ng-row.ng-filled .ng-box > small { font-weight: 900; }
.ng-row.ng-filled .ng-box > b.ng-fit-medium { font-size: 5.3pt; letter-spacing: -.08pt; padding: 0 .2mm; }
.ng-row.ng-filled .ng-box > b.ng-fit-long { font-size: 4.6pt; letter-spacing: -.12pt; padding: 0 .15mm; }

.ng-total { height: 7mm; min-height: 7mm; display: grid; grid-template-columns: 1fr 18mm 11mm 32mm; font-size: 7pt; }
.ng-total > * { display: flex; align-items: center; padding: 1mm; border-right: .18mm solid #222; border-bottom: .18mm solid #222; }
.ng-total > *:last-child { justify-content: center; border-right: 0; }
.ng-total > strong { justify-content: center; text-align: center; font-weight: 900; }

.ng-footer { height: 14mm; min-height: 14mm; display: grid; grid-template-columns: 1fr 1fr; font-size: 7.5pt; }
.ng-footer > div { height: 14mm; min-height: 14mm; display: grid; grid-template-rows: 5mm 9mm; align-items: stretch; text-align: center; }
.ng-footer > div:first-child { display: flex; align-items: center; justify-content: center; border-right: .18mm solid #222; font-weight: 700; }
.ng-footer > div > b { height: 5mm; display: flex; align-items: center; justify-content: center; border-bottom: .18mm solid #222; }
.ng-footer > div:first-child > b { height: auto; border-bottom: 0; }
.ng-footer > div > span { height: 9mm; min-height: 9mm; }

.ng-copy-label { position: absolute; z-index: 5; top: 1.5mm; right: 1.5mm; display: flex; align-items: center; justify-content: center; padding: .8mm 1.5mm; border: .18mm solid #222; border-radius: 2mm; background: #fff; color: #000; font-size: 5.7pt; font-weight: 800; letter-spacing: .05em; }
.copy-separator { position: relative; height: 2mm; border-top: .18mm dashed #222; }
.copy-separator::after { content: 'cortar aqui'; position: absolute; top: -2mm; right: 1mm; padding: 0 1mm; background: #fff; color: #000; font-size: 5pt; }
