/* ═══════════ Etiquetas de transportista (tamaño libre en cm) ═══════════
   --s escala todo según el tamaño elegido (1 = 8.5 × 6.5 cm). */
.et-panel { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.et-vista { background: #E9E4F1; padding: 16px; border-radius: 0 0 14px 14px; max-height: 78vh; overflow: auto; }
#vista { display: flex; flex-wrap: wrap; gap: 10px; transform-origin: top left; }
.et-err { border-left: 4px solid var(--mal); }

.et { --s: 1; background: #fff; color: #000; box-sizing: border-box; overflow: hidden;
  display: grid; grid-template-rows: 13% 9% 15% 13% 19% 7% 24%; grid-template-columns: 100%; gap: 0;
  border: calc(var(--s) * 0.5mm) solid #000; font-family: Arial, Helvetica, sans-serif;
  break-inside: avoid; page-break-inside: avoid; }
.et > div { min-height: 0; overflow: hidden; border-bottom: calc(var(--s) * 0.35mm) solid #000; padding: calc(var(--s) * 0.8mm) calc(var(--s) * 2mm); }
.et > div:last-child { border-bottom: 0; }
.et svg { width: 100%; height: 100%; display: block; }
.et .lbl { font-size: calc(var(--s) * 6.5pt); font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: .3px; line-height: 1.1; }
.et-ocbar { padding: calc(var(--s) * 1.2mm) calc(var(--s) * 5mm) calc(var(--s) * 0.6mm) !important; }
.et-oc { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(var(--s) * 17pt); white-space: nowrap; }
.et-desc { display: flex; flex-direction: column; }
.et-desc .txt { font-size: calc(var(--s) * 8.5pt); line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: calc(var(--s) * 0.4mm); }
.et-tabla { display: grid; grid-template-columns: 1fr 1.25fr 1fr; padding: 0 !important; }
.et-tabla > div { padding: calc(var(--s) * 0.8mm) calc(var(--s) * 1.2mm); border-right: calc(var(--s) * 0.35mm) solid #000; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.et-tabla > div:last-child { border-right: 0; }
.et-tabla b { font-size: calc(var(--s) * 8.5pt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: calc(var(--s) * 0.5mm); }
.et-tabla .guia b { font-size: calc(var(--s) * 8pt); }
.et-sku { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 100%; gap: calc(var(--s) * 2mm); align-items: center; }
.et-sku .lbl { width: calc(var(--s) * 19mm); }
.et-sku, .et-gen { height: 100%; box-sizing: border-box; }
.et-sku .cod { display: flex; flex-direction: column; height: 100%; min-width: 0; min-height: 0; overflow: hidden; padding: calc(var(--s) * 0.6mm) calc(var(--s) * 2mm) 0; box-sizing: border-box; }
.et-sku .cod svg { flex: 1; min-height: 0; }
.et-sku .cod span { text-align: center; font-family: 'Courier New', monospace; font-size: calc(var(--s) * 7pt); font-weight: 700; }
.et-fecha { display: flex; align-items: center; font-size: calc(var(--s) * 8.5pt); }
.et-fecha b { margin-left: calc(var(--s) * 1.5mm); }
.et-gen { display: flex; flex-direction: column; padding: calc(var(--s) * 1.2mm) calc(var(--s) * 4mm) calc(var(--s) * 0.6mm) !important; }
.et-gen svg { flex: 1; min-height: 0; }
.et-gen .pie { display: flex; justify-content: space-between; font-size: calc(var(--s) * 6.5pt); font-weight: 700; margin-top: calc(var(--s) * 0.5mm); }
.et-gen .pend { flex: 1; display: flex; align-items: center; justify-content: center; border: 1px dashed #94A3B8; color: #64748B; font-size: calc(var(--s) * 7.5pt); text-align: center; }
.et .sin { display: flex; align-items: center; justify-content: center; height: 100%; color: #B91C1C; font-weight: 700; font-size: calc(var(--s) * 7.5pt); }

#impresion { display: none; }
@media print {
  body { background: #fff !important; }
  .no-imp, #toasts { display: none !important; }
  #impresion { display: block; }
  #impresion .hoja-et { display: flex; flex-wrap: wrap; align-content: flex-start; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 900px) {
  .et-panel { grid-template-columns: minmax(0, 1fr); }
}
.et-panel > *, .et-panel .rejilla > * { min-width: 0; }
.et-panel .rejilla { grid-template-columns: minmax(0, 1fr); }
.et-panel .zona { overflow-wrap: anywhere; }
