.transferPanel{--tr-border:var(--line,#b7c9d9);color:var(--text);font-size:.875rem;max-width:1500px;margin:auto}.trHead,.trHead nav,.trActions,.trFilters,.trSticky,.trTotals,.trPager{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.trHead{justify-content:space-between;margin-bottom:12px}.trHead h1{font-size:1.4rem;margin:0}.trHead p{margin:4px 0}.transferPanel h2{font-size:1.1rem}.transferPanel h3{font-size:1rem}.transferPanel .card{padding:12px;margin-bottom:10px}.transferPanel input:not([type=checkbox]),.transferPanel select,.transferPanel textarea{width:100%;box-sizing:border-box;min-height:42px;font:inherit}.transferPanel label{display:grid;gap:4px;font-size:.8125rem}.transferPanel label:has(input[type=checkbox]){display:flex;align-items:center}.transferPanel input[type=checkbox]{width:19px;height:19px}.transferPanel button{min-height:42px}.trFilters{margin:12px 0;align-items:end}.trFilters>label{flex:1;min-width:150px;max-width:340px}.trPick{position:relative;min-width:150px}.trPick summary{cursor:pointer;min-height:42px;box-sizing:border-box;display:flex;align-items:center;border:1px solid var(--tr-border);padding:8px 12px;border-radius:8px}.trChoices{position:absolute;top:100%;left:0;z-index:25;background:var(--panel,#fff);color:var(--text,#132638);border:1px solid var(--tr-border);border-radius:8px;padding:8px;min-width:240px;max-width:min(320px,80vw);max-height:300px;overflow:auto;box-shadow:0 6px 18px #0003}.trChoices label{padding:8px}.trOrder{width:100%;text-align:left;display:grid;gap:6px;cursor:pointer}.trOrder small,.trBasketLine small,.trDocument small{display:block}.trStatus{font-size:.75rem;font-weight:600;border:1px solid var(--tr-border);padding:3px 8px;border-radius:12px;display:inline-block}.tr-approved,.tr-completed{color:var(--ok,#287341)}.tr-rejected,.tr-cancelled,.trWarning{color:var(--danger,#ae3535)}.tr-pending{color:var(--warn,#946600)}.trFormGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:12px 0}.trProduct{display:grid;grid-template-columns:minmax(220px,1fr) 130px 130px 120px;align-items:center;gap:12px}.trProductName{display:grid;gap:4px}.trProductName small{opacity:.8}.trProduct input{font-weight:600}.trLineTotal{text-align:right}.trSticky{position:sticky;bottom:8px;background:var(--panel,#fff);border:1px solid var(--tr-border);box-shadow:0 -4px 15px #0001;justify-content:space-between;padding:12px;border-radius:8px;z-index:10}.trTotals{gap:6px 18px}.trTotals span{white-space:nowrap}.trTotals strong{font-size:1rem}.trBasketLine{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--tr-border)}.trPager{justify-content:center;margin:12px 0}.trPolicy p{font-size:.8125rem}.trConfigForm{border:2px solid var(--accent,#168bb5)}.trActions{margin:12px 0}.trTableWrap{overflow:auto}.trDocument table{border-collapse:collapse;width:100%;font-size:.8125rem}.trDocument th,.trDocument td{padding:8px;border-bottom:1px solid var(--tr-border);text-align:right}.trDocument th:first-child,.trDocument td:first-child{text-align:left}.trBrand th{background:var(--bg,#edf5fa);font-weight:700}.trDocument>.trTotals{margin-top:14px;padding:12px;border:1px solid var(--tr-border)}.trBatchProduct{border-bottom:1px solid var(--tr-border);padding:10px 0}.trBatchRow{display:grid;grid-template-columns:1fr 1fr 1fr auto;align-items:end;gap:10px;margin:10px 0}.trRevision{display:block;width:100%;text-align:left;margin:6px 0}.trSignature{margin-top:30px;line-height:3}.transferPanel :focus-visible{outline:2px solid var(--accent,#168bb5);outline-offset:2px}#trMessage:empty{display:none}#trMessage{padding:10px;border:1px solid var(--tr-border);border-radius:6px}#transferPrint{display:none}
@media(max-width:800px){.trProduct{grid-template-columns:1fr 1fr}.trProductName{grid-column:1/-1}.trLineTotal{grid-column:1/-1;text-align:left}.trHead{align-items:start}.trHead nav{width:100%}.trHead nav button{flex:1}.trBatchRow{grid-template-columns:1fr 1fr}.trFormGrid{grid-template-columns:1fr 1fr}.trFormGrid label:last-child{grid-column:1/-1}.trSticky{bottom:0}.trSticky>.btn{width:100%}.trDocument table{min-width:690px}.trDocument>table{min-width:0}.trDocument>table td{overflow-wrap:anywhere}.trTotals{gap:4px 12px}.trHistory{overflow-wrap:anywhere}}
@media(max-width:400px){.trFormGrid{grid-template-columns:1fr}.trHead nav{gap:6px}.trHead nav button{padding:6px}.trBatchRow{grid-template-columns:1fr}.trChoices{min-width:220px}.trFilters>label{min-width:130px}.trSticky{padding:8px}.trTotals{font-size:.75rem}}

@media(prefers-reduced-motion:reduce){.transferPanel *{scroll-behavior:auto!important;transition:none!important}}
.trProductIdentity{display:flex;align-items:center;gap:10px;min-width:0}.trProductIdentity>div{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.trPhoto{display:flex;align-items:center;justify-content:center;flex:0 0 64px;width:64px;height:64px;overflow:hidden;border:1px solid var(--tr-border);border-radius:6px;font-size:.6875rem;text-align:center;color:var(--text);background:var(--bg)}.trPhoto img{width:100%;height:100%;object-fit:contain}.trBasketLine>span:not(.trPhoto){flex:1}.trLineTotal{line-height:1.5}.trConfigForm output{padding:10px 0;min-height:22px}.trProductName{min-width:0}.trProductName>small{line-height:1.4}#trPalletTotal{font-weight:600;line-height:1.6}.trProductIdentity strong{display:block}@media(max-width:400px){.trPhoto{flex-basis:48px;width:48px;height:48px}.trBasketLine{flex-wrap:wrap}.trBasketLine>span:not(.trPhoto){min-width:160px}}

.trPalletMetrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.trPalletMetrics>div{padding:12px;border:1px solid var(--tr-border);border-radius:6px;background:var(--bg)}.trPalletMetrics strong{display:block;font-size:1.25rem;margin-top:5px;overflow-wrap:anywhere}.trPalletMetrics small{font-weight:400}.trPalletFormula{font-weight:400}#trPalletTotal>small{display:block;font-weight:400;margin:6px 0}@media(max-width:680px){.trPalletMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Pallet settings expand inside the selected product; the summary stays in columns. */
.transferPanel .trConfigProduct{grid-template-columns:minmax(220px,1.45fr) minmax(180px,1fr) minmax(150px,.8fr) 145px;gap:8px 14px;padding:8px 10px;margin-bottom:6px}
.trConfigProduct .trPhoto{flex-basis:44px;width:44px;height:44px;font-size:.625rem}.trConfigProduct .trProductIdentity{gap:8px}.trConfigProduct .trProductIdentity>div{gap:2px}.trConfigProduct .trProductIdentity strong{font-size:.875rem;line-height:1.25}.trConfigProduct .trProductIdentity small{font-size:.6875rem;opacity:.8}
.trConfigSpecs,.trConfigPallet,.trConfigActions{display:grid;gap:3px;min-width:0;font-size:.75rem;line-height:1.3;overflow-wrap:anywhere}.trConfigPallet strong{font-size:.8125rem}.trConfigPallet small{opacity:.8}.trConfigActions small{font-size:.6875rem}.trConfigActions button{justify-self:start;padding:5px 12px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.trConfigProductOpen{border-color:var(--accent,#168bb5)}#trConfigEditor{grid-column:1/-1;min-width:0}.transferPanel .trConfigForm{margin:4px 0 0;border-width:1px}.trConfigForm h2{scroll-margin-top:90px}
@media(max-width:1100px){.transferPanel .trConfigProduct{grid-template-columns:minmax(180px,1.3fr) minmax(150px,1fr) 130px}.trConfigProduct .trConfigSpecs{grid-column:2;grid-row:1}.trConfigProduct .trConfigPallet{grid-column:2;grid-row:2}.trConfigProduct>.trProductIdentity{grid-column:1;grid-row:1/3}.trConfigProduct .trConfigActions{grid-column:3;grid-row:1/3}}
@media(max-width:700px){.transferPanel .trConfigProduct{grid-template-columns:minmax(0,1fr) 112px;gap:6px 10px}.trConfigProduct>.trProductIdentity{grid-column:1/-1;grid-row:auto}.trConfigProduct .trConfigSpecs{display:none}.trConfigProduct .trConfigPallet{grid-column:1;grid-row:2}.trConfigProduct .trConfigActions{grid-column:2;grid-row:2}.trConfigProduct .trPhoto{flex-basis:40px;width:40px;height:40px}}
@media(max-width:360px){.transferPanel .trConfigProduct{gap:5px 8px}.trConfigActions button{padding:5px 8px}}

/* Order entry keeps quantities visible; ERP reference data expands on demand. */
.transferPanel .trOrderProduct{grid-template-columns:minmax(0,1fr) 280px auto;gap:6px 12px;padding:8px 10px;margin-bottom:5px}
.trOrderProduct .trPhoto{flex-basis:40px;width:40px;height:40px;font-size:.625rem}
.trOrderProduct .trProductIdentity{gap:8px}.trOrderProduct .trProductIdentity>div{gap:2px}
.trOrderProduct .trProductIdentity strong{font-size:.875rem;line-height:1.25}.trOrderProduct .trProductIdentity small{font-size:.75rem}
.trQuantities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:end}.trLooseStatus{display:block;margin-top:4px;font-size:.75rem}.trQuantities label{gap:2px}
.trQuantities input{padding:6px 8px;min-width:0}
.trOrderProduct .trLineTotal{grid-column:1/-1;text-align:left;line-height:1.25}.trOrderProduct .trLineTotal:empty{display:none}
.trProductDetails{font-size:.75rem;min-width:0}.trProductDetails summary,.trOrderTotalsDetails summary{cursor:pointer;min-height:40px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}
.trProductDetails[open]{grid-column:1/-1}.trProductDetails>div{border-top:1px solid var(--tr-border);padding-top:4px;overflow-wrap:anywhere}.trProductDetails p{margin:4px 0}
.trOrderTotalsDetails{position:relative;font-size:.75rem}.trOrderTotalsDetails>div{position:absolute;bottom:100%;left:0;display:grid;gap:6px;background:var(--panel,#fff);border:1px solid var(--tr-border);padding:10px;min-width:180px;box-shadow:0 4px 12px #0003;border-radius:6px}
#trOrderForm .trSticky{padding:8px 10px;gap:6px}#trOrderForm .trTotals{gap:4px 12px}
.trCatalogBrand{margin:12px 0 6px}
@media(max-width:800px){.transferPanel .trOrderProduct{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}.trOrderProduct .trProductIdentity{grid-column:1/-1}.trQuantities{width:100%;max-width:300px}.trProductDetails{align-self:end}.trOrderTotalsDetails>div{left:auto;right:0}}
@media(max-width:600px){#trOrderForm .trFilters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"brand state" "search search" "pda pda";gap:6px}#trOrderForm .trFilters>label{grid-area:search;min-width:0;max-width:none}#trOrderForm .trPick{min-width:0}#trOrderForm .trPick summary{padding:6px 8px;overflow-wrap:anywhere}#trOrderForm #trBrands{grid-area:brand}#trOrderForm #trEnabled{grid-area:state}#trOrderForm #trPda{grid-area:pda}#trOrderForm #trEnabled .trChoices{left:auto;right:0}#trOrderForm #trCatalogCount{margin:6px 0;font-size:.75rem}}

/* The saved PDF has its own compact layout; screen controls never enter the paper. */
@media print{
 @page transferRequest{size:A4 portrait;margin:10mm}
 body.printingTransfer{margin:0!important;padding:0!important;background:#fff!important}
 body.printingTransfer>*{display:none!important}
 body.printingTransfer>#printArea{display:none!important}
 body.printingTransfer>#transferPrint{page:transferRequest;display:block!important;color:#162d3a;background:#fff;font:9pt/1.3 Arial,sans-serif}
 .trPrintDocument,.trPrintDocument *{box-sizing:border-box;text-shadow:none!important;box-shadow:none!important}
 .trPrintDocument{width:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .trPrintHeader{display:flex;justify-content:space-between;align-items:center;gap:5mm;margin-bottom:4mm;break-inside:avoid}
 .trPrintHeader small{font-size:8pt;letter-spacing:.8pt;color:#46616d}.trPrintHeader h1{font-size:17pt;line-height:1.15;margin:1mm 0 0;color:#163e50}
 .trPrintNumber{font-size:15pt;white-space:nowrap;border:1px solid #aac4cc;border-radius:2mm;padding:2mm 3mm;background:#eff6f7}
 .trPrintRoutes{display:grid;grid-template-columns:1fr 1fr;gap:3mm;break-inside:avoid;margin-bottom:3mm}
 .trPrintRoute{border:1px solid #b6ccd2;border-top:3px solid #277183;border-radius:2mm;padding:3mm;background:#f4f8f9;min-width:0}
 .trPrintRoute span,.trPrintMeta span{display:block;font-size:7.5pt;letter-spacing:.25pt;color:#46616d;margin-bottom:1mm}
 .trPrintRoute strong{display:block;font-size:12pt;line-height:1.2;color:#163e50;overflow-wrap:anywhere}.trPrintRoute small{display:block;font-size:8pt;margin-top:1mm}
 .trPrintMeta{display:grid;grid-template-columns:1fr .8fr 1.5fr;gap:3mm;padding:0 1mm;break-inside:avoid}.trPrintMeta strong{font-size:9pt}
 .trPrintAuthor{font-size:8pt;margin:2mm 0 3mm;color:#46616d}
 .trPrintDocument table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:8.5pt;color:#162d3a}
 .trPrintProductCol{width:43%}.trPrintLayersCol{width:8%}.trPrintPacksCol{width:10%}.trPrintUnitsCol{width:12%}.trPrintLitersCol{width:12%}.trPrintWeightCol{width:15%}
 .trPrintDocument th,.trPrintDocument td{padding:1.5mm 1.3mm;border-bottom:1px solid #d3dfe3;vertical-align:middle;text-align:right;white-space:normal}
 .trPrintDocument th:first-child,.trPrintDocument td:first-child{text-align:left}
 .trPrintDocument thead{display:table-header-group}.trPrintDocument thead th{font-size:7.5pt;color:#274b5c;background:#edf4f6}
 .trPrintDocument thead .trPrintTableIdentity th{padding:1.3mm 0;background:#fff;font-size:7pt;font-weight:400;color:#536975;text-align:left}
 .trPrintDocument tr{break-inside:avoid}.trPrintBrandStart{break-inside:avoid}
 .trPrintBrand th{padding:1.3mm;font-size:8pt;letter-spacing:.35pt;background:#dcebee;border-bottom:1px solid #b6ccd2;text-align:left}
 .trPrintProduct{display:flex;align-items:center;gap:2mm;min-width:0}.trPrintProduct>div{min-width:0}.trPrintProduct strong{display:block;font-size:8.5pt;line-height:1.25;overflow-wrap:anywhere}.trPrintProduct small{display:block;font-size:7.5pt;font-weight:400;color:#536975;margin-top:1mm}
 .trPrintPhoto{display:flex;align-items:center;justify-content:center;flex:0 0 11mm;width:11mm;height:10mm;font-size:6.5pt;line-height:1.2;text-align:center;color:#647784;background:#fff;border:1px solid #dce5e8;border-radius:1.5mm;overflow:hidden}
 .trPrintPhoto img{width:100%;height:100%;object-fit:contain}
 .trPrintItem td:not(:first-child){font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .trPrintDocument tfoot{display:table-row-group}.trPrintDocument tfoot th,.trPrintDocument tfoot td{border-top:2px solid #277183;border-bottom:2px solid #277183;background:#e6f1f3;font-size:10pt;font-weight:700;padding:3mm 1.3mm;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.trPrintDocument tfoot th{font-size:8pt}
 .trPrintNotes{margin:3mm 0;font-size:8pt;overflow-wrap:anywhere}.trPrintNotes p{margin:1mm 0}.trPrintNotes p:first-child{font-size:7.5pt;color:#536975}.trPrintNotes [hidden]{display:none!important}
 .trPrintBatches h2{font-size:10pt;margin:3mm 0 1mm;break-after:avoid}.trPrintBatches table th:first-child{width:44%}.trPrintBatches td{overflow-wrap:anywhere}
 .trPrintSignatures{display:grid;grid-template-columns:repeat(3,1fr);gap:6mm;margin-top:7mm;break-inside:avoid}.trPrintSignatures span{display:block;border-top:1px solid #617781;padding-top:2mm;text-align:center;font-size:8pt}
}
