/* Cada bulto ocupa una hoja A5. Los remitos mantienen hojas A4 por ejemplar. */
.ht-print-sheet{box-sizing:border-box;width:210mm;height:297mm;padding:10mm;background:#fff;color:#111;font-family:Arial,Helvetica,sans-serif;font-size:10pt;line-height:1.3;overflow:hidden;break-after:page;page-break-after:always;position:relative}
.ht-print-sheet:last-child{break-after:auto;page-break-after:auto}.ht-print-sheet *{box-sizing:border-box}.ht-print-sheet header,.ht-print-sheet footer{position:static}.ht-print-sheet h1,.ht-print-sheet p{margin:0}.ht-print-sheet strong,.ht-print-sheet b{color:#000}.ht-taga{font-size:20pt;font-weight:800;letter-spacing:.12em;line-height:1.2}.ht-brand-rule{display:block;width:15mm;height:1mm;background:#111;margin:2mm 0 3mm;transform:skewX(-25deg)}.ht-paper-field small{display:block;font-size:7pt;letter-spacing:.065em;font-weight:700;margin-bottom:1mm;color:#333}.ht-paper-field>div{white-space:pre-wrap;overflow-wrap:anywhere}.ht-editable{outline:none;border-radius:2px;min-width:12px;display:inline;white-space:pre-wrap;overflow-wrap:anywhere}.ht-editable:empty:before{content:attr(data-placeholder);color:#999;font-weight:400;font-size:9pt}.ht-editable:hover{background:#f1f5fa}.ht-editable:focus{background:#eaf2ff;box-shadow:0 1px #2176d2}
.ht-label-sheet{width:148mm;height:210mm;padding:7mm;display:flex;page:etiquetas}.ht-label{width:100%;height:100%;border:.5mm solid #111;display:flex;flex-direction:column;padding:5mm;overflow:hidden;flex-shrink:0}.ht-label header{display:flex;justify-content:space-between;align-items:center;gap:2mm;padding-bottom:3mm;border-bottom:.25mm solid #777;flex-wrap:wrap;flex-shrink:0}.ht-label .ht-taga{font-size:19pt}.ht-label .ht-brand-rule{display:none}.ht-label-purpose{font-size:7pt;letter-spacing:.07em}.ht-label-destination{padding:4mm 0 3mm;flex:1 0 auto}.ht-label-destination .ht-paper-field{font-size:10pt;margin-bottom:2.5mm}.ht-label-destination .ht-paper-field:first-child{font-size:15pt;font-weight:700}.ht-label-destination .ht-paper-field:last-of-type{font-size:12pt;font-weight:700}.ht-label-locality{font-size:10pt;overflow-wrap:anywhere}.ht-label-contact{display:grid;grid-template-columns:1fr 1fr;gap:2.5mm;border-top:.25mm solid #aaa;padding-top:3mm;font-size:9pt;flex-shrink:0}.ht-label-contact .ht-paper-field:first-child{grid-column:1/-1}.ht-label-shipment{display:flex;justify-content:space-between;gap:3mm;align-items:end;margin:4mm 0;flex-shrink:0}.ht-label-reference{min-width:0;flex:1;font-size:8pt;overflow-wrap:anywhere;white-space:pre-wrap}.ht-label-reference>.ht-paper-field{margin-top:2mm}.ht-package{border:.5mm solid #111;min-width:32mm;padding:2mm;text-align:center;white-space:nowrap;flex-shrink:0}.ht-package small{display:block;font-weight:700;font-size:8pt;letter-spacing:.2em}.ht-package strong{font-size:21pt}.ht-package strong span{font-size:11pt}.ht-label-return{border-top:.3mm solid #111;padding-top:3mm;font-size:8pt;line-height:1.5;flex-shrink:0;overflow-wrap:anywhere}.ht-label-return>b{font-size:7.5pt;display:block}
/* Remito compacto: el espacio principal de la hoja queda para los artículos. */
.ht-remito-sheet{display:flex;flex-direction:column;font-size:9pt;page:remitos}
.ht-remito-header{display:grid;grid-template-columns:minmax(0,1fr) 68mm;gap:7mm;border-bottom:.4mm solid #111;padding-bottom:3mm;flex:0 0 auto}
.ht-issuer{font-size:7.7pt;line-height:1.35;overflow-wrap:anywhere}.ht-issuer .ht-taga{font-size:17pt;font-weight:800;letter-spacing:.11em;margin:0 0 2mm}
.ht-document-title{text-align:right;display:flex;flex-direction:column;justify-content:space-between;gap:1.1mm}.ht-title-line{display:flex;justify-content:flex-end;align-items:center;gap:2mm}.ht-document-title h1{font-size:13pt;font-weight:800;letter-spacing:0;line-height:1.2;margin:0}.ht-internal-mark{display:inline-flex;border:.3mm solid #111;width:6mm;height:6mm;align-items:center;justify-content:center;font-size:12pt;font-weight:700}.ht-remito-number{display:block;font-size:12pt;line-height:1.2;overflow-wrap:anywhere}.ht-date-copy{display:flex;justify-content:flex-end;gap:5mm;font-size:8pt}.ht-date-copy b{letter-spacing:.07em}.ht-document-title>small{font-size:6pt;color:#333;line-height:1.1}
.ht-recipient{padding:2.5mm 0 2mm;display:flex;flex-direction:column;gap:1mm;flex:0 0 auto;font-size:9pt}.ht-inline{overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.35}.ht-inline>b{font-size:8pt}.ht-locality{font-size:8pt;padding-left:13mm}.ht-reception{display:flex;flex-wrap:wrap;gap:1mm 5mm;font-size:8pt;margin-top:1mm}.ht-reception .ht-inline{max-width:100%}.ht-process{display:flex;flex-wrap:wrap;gap:1mm 5mm;border-top:.2mm solid #bbb;padding:2mm 0 3mm;font-size:8pt;flex:0 0 auto}.ht-process .ht-inline{max-width:100%}.ht-extra{display:flex;flex-wrap:wrap;gap:1mm 4mm;padding:0 0 3mm;font-size:7.5pt;flex:0 0 auto}
.ht-sheet-body{min-height:0;flex:1 1 auto;overflow:hidden}.ht-sheet-body table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;font-size:9pt;text-align:left}.ht-sheet-body th{background:#f0f0f0;color:#111;font-size:8pt;font-weight:700;letter-spacing:0;white-space:normal;text-align:left;border-top:.4mm solid #111;border-bottom:.3mm solid #111;padding:2mm}.ht-sheet-body th:nth-child(1){width:12mm}.ht-sheet-body th:nth-child(3){width:22mm}.ht-sheet-body th:nth-child(4){width:22mm}.ht-sheet-body td{vertical-align:top;padding:1.7mm 2mm;border-bottom:.2mm solid #bbb;white-space:pre-wrap;overflow-wrap:anywhere}.ht-sheet-body tr:last-child td{border-bottom:.2mm solid #bbb}.ht-sheet-body td small{display:block;font-size:7.5pt;margin-top:1mm;color:#444}.ht-sheet-body .ht-quantity{text-align:right;font-weight:700}
.ht-remito-footer{flex:0 0 auto;padding-top:3mm;font-size:8pt}.ht-transport-required{display:flex;flex-wrap:wrap;gap:2mm 5mm;border-top:.3mm solid #777;padding:2mm 0;margin-bottom:1mm;overflow-wrap:anywhere}.ht-transport-required>div{max-width:100%}.ht-declared-value{white-space:nowrap;font-weight:700}.ht-footer-data{display:flex;flex-wrap:wrap;gap:2mm 6mm;margin-bottom:2mm;overflow-wrap:anywhere}.ht-footer-data>span{max-width:100%}.ht-observations{margin-bottom:2mm;white-space:pre-wrap;overflow-wrap:anywhere}.ht-signatures{display:grid;grid-template-columns:1fr 1.7fr 1fr;gap:5mm;margin-top:10mm;font-size:7pt}.ht-signatures>div{border-top:.25mm solid #555;padding-top:2mm}.ht-paper-end{display:flex;justify-content:space-between;margin-top:3mm;font-size:7pt;color:#444}.ht-print-sheet small{color:#333}.ht-editable:empty:before{font-size:inherit;color:inherit}
@page{size:A4 portrait;margin:0}@page remitos{size:A4 portrait;margin:0}@page etiquetas{size:148mm 210mm;margin:0}@media print{html,body{margin:0;padding:0;background:#fff}.ht-editable:empty:before{content:''}.ht-editable{background:transparent!important;box-shadow:none!important}.ht-print-sheet{box-shadow:none!important;margin:0!important}.ht-print-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* El encuadre CSS conserva los PNG originales y recorta sólo su margen blanco. */
.ht-brand-logo{display:block;width:86mm;height:16mm;object-fit:cover;object-position:center;flex:0 0 auto}.ht-label .ht-brand-logo{width:80mm;height:15mm;max-width:100%}.ht-issuer .ht-brand-logo{margin-bottom:2mm;max-width:100%}

.ht-cai-footer{display:flex;justify-content:space-between;gap:3mm;flex-wrap:wrap;border-top:.2mm solid #aaa;padding-top:2mm;margin-top:3mm;font-size:8pt;overflow-wrap:anywhere}
