:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#172b4d;background:#f3f6fb;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{cursor:pointer}a{color:#2457c5;text-decoration:none}button{border:1px solid #cbd5e1;background:white;padding:10px 17px;border-radius:7px;color:#253753}button:hover{background:#edf3ff}button.primary{background:#2457c5;color:white;border-color:#2457c5}button.danger{color:#c33232}button:disabled{opacity:.6;cursor:wait}input,select,textarea{border:1px solid #cad5e4;padding:10px 12px;border-radius:6px;background:white;width:100%;color:#172b4d}textarea{min-height:90px}label{display:grid;gap:7px;font-size:14px}h1{font-size:27px;letter-spacing:-.5px;margin:0}h2{font-size:18px;margin:0 0 20px}.muted{color:#677b96;font-size:14px}.layout{display:grid;grid-template-columns:210px 1fr;min-height:100vh}aside{background:#102747;color:#c8d8ef;padding:30px 18px;position:sticky;top:0;height:100vh}.brand{color:white;font-weight:700;font-size:22px;padding:0 12px 28px}.brand small{display:block;font-size:12px;letter-spacing:2px;margin-top:8px;color:#8ca9cf}nav a{display:block;color:#c8d8ef;padding:14px 16px;margin-bottom:8px;border-radius:7px;font-size:15px}nav a.active{background:#2457c5;color:white}header{height:68px;background:white;border-bottom:1px solid #dfe7f1;display:flex;align-items:center;justify-content:space-between;padding:0 32px}header span{font-size:14px}.content{padding:30px 32px;max-width:1600px;margin:auto}.title{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:20px}.panel{background:white;border:1px solid #dfe7f1;border-radius:10px;padding:24px;margin-bottom:22px}.cards{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:32px}.card{background:white;border:1px solid #dfe7f1;padding:32px;border-radius:12px;display:block;color:#172b4d;min-height:200px;transition:box-shadow .2s}.card:hover{box-shadow:0 8px 28px #172b4d12}.card .icon{display:grid;place-items:center;width:46px;height:46px;background:#eaf1ff;color:#2457c5;border-radius:10px;font-weight:bold;font-size:22px;margin-bottom:24px}.card h2{margin:0 0 12px}.card p{color:#677b96;font-size:14px}.card .action{display:block;margin-top:22px;font-size:14px;color:#2457c5}.formgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.filters{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap}.filters input,.filters select{width:180px}.filters label{width:180px}.toolbar{display:flex;gap:10px;justify-content:flex-end;margin:20px 0 0}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:14px}th{text-align:left;background:#f3f6fb;color:#53677f;font-weight:500}td,th{padding:14px 16px;border-bottom:1px solid #e7edf4}td.number{text-align:right;font-variant-numeric:tabular-nums}td button{padding:5px 9px;font-size:13px;margin-right:5px}td input{min-width:100px}.tag{display:inline-block;border-radius:4px;background:#edf3ff;color:#2457c5;padding:4px 7px;font-size:12px}.empty{text-align:center;color:#677b96;padding:55px}.tabs{display:flex;gap:10px;margin-bottom:22px}.tabs button.active{background:#2457c5;color:white}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.stat{background:white;border:1px solid #dfe7f1;padding:24px;border-radius:8px}.stat strong{display:block;font-size:28px;margin-top:10px}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#102747,#21497d)}.login .panel{width:min(420px,90vw);padding:40px}.login label{margin:22px 0}.login button{width:100%}.login h1{font-size:23px}#notice{position:fixed;right:24px;bottom:24px;max-width:520px;background:#172b4d;color:white;padding:17px 24px;border-radius:8px;z-index:100;box-shadow:0 8px 30px #0002}.error{color:#a92323;background:#fff0f0;padding:12px;border-radius:6px;margin-bottom:15px}.subheading{margin:30px 0 16px}.money{font-variant-numeric:tabular-nums}.wide{grid-column:1/-1}@media(max-width:850px){.layout{grid-template-columns:1fr}aside{position:static;height:auto;padding:14px}.brand{padding:0 8px 12px}nav{display:flex;overflow:auto}nav a{white-space:nowrap;padding:10px}.content{padding:20px}.cards,.formgrid,.stats{grid-template-columns:1fr}header{padding:0 20px}.title{align-items:flex-start}h1{font-size:23px}}

.product-thumb{width:56px;height:64px;object-fit:contain;background:#f4f6f9}.product-preview{max-width:260px;height:220px;object-fit:contain;display:block;margin-bottom:15px}

.order-sheet{width:1080px;background:#fff;color:#111;font-family:Arial,"Microsoft YaHei",sans-serif;border:1px solid #444;font-size:13px}.order-sheet h2,.order-sheet h3{margin:0;background:#c7c7c7;text-align:center;border:1px solid #444;padding:8px;font-weight:700}.order-sheet h2{font-size:23px}.order-sheet h3{font-size:14px}.order-sheet table{width:100%;border-collapse:collapse;min-width:0;table-layout:fixed}.order-sheet td,.order-sheet th{border:1px solid #555;padding:10px 5px;text-align:center;white-space:normal;overflow-wrap:anywhere;background:transparent;color:inherit}.order-sheet th{font-weight:bold}.order-sheet .product-grid td,.order-sheet .product-grid th{height:52px}.order-sheet .due{background:#fff200;color:red;font-weight:bold}.batch-layout{display:grid;grid-template-columns:55% 45%}.batch-media{display:grid;grid-template-columns:42% 15% 43%;min-height:300px}.order-sheet .sample-image{width:100%;height:100%;max-height:380px;object-fit:contain;display:block}.image-placeholder{min-height:100px;border:1px solid #555;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px;color:#555}.sheet-notes>div{white-space:pre-wrap;line-height:1.65;padding:12px;font-size:12px}.order-sheet .batch-quantities thead{background:#f5cbae}.order-sheet .ordered{background:red;color:#fff;font-weight:bold}.order-sheet .remaining,.order-sheet .total{font-weight:bold}.normal-top{display:grid;grid-template-columns:22% 71% 7%}.sample-slot{border:1px solid #555}.normal-quantities{display:grid;grid-template-columns:78% 22%}.normal-bottom{display:grid;grid-template-columns:40% 60%}.normal-bottom table td{height:65px}.order-sheet .tablewrap{overflow:visible}
.stock-subtotal td{background:#eef4fb;font-weight:700;border-top:2px solid #9cb1cd}
/* Revised order form: product header and image share a height, quantities span the sheet. */
.order-sheet .batch-layout{display:block}.order-sheet .sheet-top,.order-sheet .normal-top{display:grid;grid-template-columns:78% 22%;align-items:stretch}.order-sheet .sheet-top .product-grid,.order-sheet .normal-top .product-grid{height:280px}.order-sheet .product-grid td,.order-sheet .product-grid th{height:70px;box-sizing:border-box}.order-sheet .sample-slot{position:relative;min-height:0}.order-sheet .sample-slot .sample-image,.order-sheet .sample-slot .image-placeholder{position:absolute;inset:0;width:100%;height:100%;max-height:none;box-sizing:border-box}.order-sheet .quantity-section{width:100%}.order-sheet .normal-quantities{display:block}.order-sheet .sheet-notes{border-top:1px solid #444}

.order-sheet .normal-top{grid-template-columns:22% 71% 7%}.order-sheet .normal-quantities{display:grid}.order-sheet .normal-top .product-grid{height:auto}
.order-sheet.first-sheet .normal-top{grid-template-columns:22% 78%}.order-sheet.first-sheet .normal-quantities{display:block}
/* First-order bottom: instructions on the left and four equal requirement rows on the right. */
.order-sheet.first-sheet .normal-bottom{grid-template-columns:60% 40%;align-items:stretch}.order-sheet.first-sheet .normal-bottom>.sheet-notes{grid-column:1;grid-row:1;display:flex;flex-direction:column}.order-sheet.first-sheet .normal-bottom>section{grid-column:2;grid-row:1;display:flex;flex-direction:column}.order-sheet.first-sheet .normal-bottom>section>table{display:flex;flex:1}.order-sheet.first-sheet .normal-bottom>section>table>tbody{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));width:100%;flex:1}.order-sheet.first-sheet .normal-bottom>section tr{display:grid;grid-template-columns:26% 74%;min-height:0}.order-sheet.first-sheet .normal-bottom>section td,.order-sheet.first-sheet .normal-bottom>section th{height:auto;display:flex;align-items:center;justify-content:center;white-space:pre-wrap;font-size:12px;line-height:1.5;padding:10px;box-sizing:border-box}.order-sheet.first-sheet .normal-bottom>section td{text-align:left;justify-content:flex-start}.order-sheet.first-sheet .normal-bottom .sheet-notes>div{flex:1}
#image-preview{display:flex;flex-wrap:wrap;gap:16px}.product-photo{padding:12px;border:1px solid #dae1eb;border-radius:8px}.product-photo p{font-size:12px}
.order-sheet.normal-sheet .normal-top{grid-template-columns:22% 78%}.order-sheet.normal-sheet .normal-quantities{display:block}
/* Footer height follows the notes, with one line below the final note. */
.order-sheet.normal-sheet .normal-bottom{grid-template-columns:60% 40%;align-items:stretch}.order-sheet.normal-sheet .normal-bottom>.sheet-notes{grid-column:1;grid-row:1;display:block}.order-sheet.normal-sheet .normal-bottom>.sheet-notes>div{padding-bottom:1.65em;flex:none}.order-sheet.normal-sheet .normal-bottom>section{grid-column:2;grid-row:1;contain:size;display:flex;flex-direction:column;min-height:0}.order-sheet.normal-sheet .normal-bottom>section>table{display:flex;flex:1;min-height:0}.order-sheet.normal-sheet .normal-bottom>section>table>tbody{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);width:100%;flex:1}.order-sheet.normal-sheet .normal-bottom>section tr{display:grid;grid-template-columns:26% 74%;min-height:0}.order-sheet.normal-sheet .normal-bottom>section td,.order-sheet.normal-sheet .normal-bottom>section th{height:auto;display:flex;align-items:center;white-space:pre-wrap;font-size:12px;line-height:1.5;padding:10px;box-sizing:border-box}.order-sheet.normal-sheet .normal-bottom>section td{justify-content:flex-start;text-align:left}.order-sheet.normal-sheet .normal-bottom>section th{justify-content:center}
.inventory-table table{width:100%;border-collapse:collapse;min-width:1280px}.inventory-table th,.inventory-table td,.inventory-table td.number{text-align:center;vertical-align:middle;padding:13px 9px;border-bottom:1px solid #e7edf5;font-size:13px}.inventory-table th{background:#f3f6fc;color:#617795;font-weight:500;white-space:nowrap}.inventory-table .product-key{border-right:1px solid #edf1f7;min-width:100px}.inventory-table .product-key:nth-child(2){min-width:190px;overflow-wrap:anywhere}.inventory-table .stock-subtotal td{background:#edf4fc;border-top:2px solid #b0c5df;font-weight:700;padding:14px 9px}.inventory-table button{font-size:12px;padding:6px 10px;white-space:nowrap}.inventory-table [data-size] td{height:46px}

.order-sheet .no-wrap{white-space:nowrap;overflow-wrap:normal;word-break:normal}
/* A4 landscape canvas; long order histories may continue onto another printed page. */
.order-sheet{width:297mm;min-height:210mm}

.order-sheet.first-sheet .normal-quantities thead{background:#f5cbae}

.order-sheet .extra-production>div{font-size:20px;font-weight:700;color:#d00000;white-space:pre-wrap;padding:12px;border:1px solid #555}
@page{size:A4 landscape;margin:0}
@media print{
 body{background:white}
 .layout{display:block}aside,header,.title,#notice{display:none!important}
 .content{padding:0;margin:0;max-width:none}
 .content>.panel{padding:0;margin:0;border:0;border-radius:0;overflow:visible}
 .order-sheet{width:277mm;min-height:190mm;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .order-sheet table{table-layout:auto}
 .order-sheet tr,.order-sheet .sheet-top,.order-sheet .normal-top{break-inside:avoid}
 .order-sheet thead{display:table-header-group}
}

.inventory-table th,.inventory-table td{border:1px solid #d9dfe8}
.inventory-table .product-key{min-width:370px}.inventory-product{display:flex;align-items:center;gap:16px;text-align:left}.inventory-product p{white-space:nowrap;margin:10px 0}.inventory-photo{width:110px;height:150px;object-fit:contain}.inventory-table .inventory-action{min-width:120px;text-align:center;vertical-align:middle}.inventory-table th{background:#eff2f6}.inventory-table .stock-subtotal td{background:#eff2f6;border-top:1px solid #d9dfe8}

.order-sheet table{table-layout:auto}

/* Compact standard sheets to the A4 landscape canvas without clipping content. */
.order-sheet .product-grid td,.order-sheet .product-grid th{height:50px}
.order-sheet .sheet-top .product-grid{height:200px}
.order-sheet .sheet-notes>div{font-size:10px;line-height:1.45;padding:8px 10px 1.65em}
.order-sheet.normal-sheet .normal-bottom>section td,.order-sheet.normal-sheet .normal-bottom>section th{font-size:10px;line-height:1.45;padding:8px}

.order-sheet.batch-sheet .sheet-notes>div{column-count:2;column-gap:24px}

@media print{.order-sheet{width:297mm;min-height:210mm;zoom:0.9}}

/* No page margins: browser-generated title, URL, date and page counters have no margin area. */
#print-page{position:absolute;left:-100000px;top:0;width:297mm;height:auto;overflow:visible;background:white}
#print-page #print-order-sheet{position:static;width:max-content;max-width:none;min-height:0;height:auto;zoom:1;transform:none;transform-origin:top left;print-color-adjust:exact;-webkit-print-color-adjust:exact}
#print-page .normal-bottom>section{contain:none}
@media print{
 body.printing-order{margin:0;padding:0}
 body.printing-order>:not(#print-page){display:none!important}
 body.printing-order #print-page{position:relative;left:0;top:0;width:297mm;height:auto;overflow:visible;break-inside:avoid;break-after:avoid}
}
/* Give editable craft fields the spare height; product requirements size to their text. */
.order-sheet.normal-sheet .normal-bottom>section{contain:none}
.order-sheet.normal-sheet .normal-bottom>section>table>tbody{grid-template-rows:repeat(3,minmax(60px,1fr)) max-content}
.order-sheet.normal-sheet .normal-bottom>section .extra-production-row>th,
.order-sheet.normal-sheet .normal-bottom>section .extra-production-row>td{color:#d00000;font-weight:700;font-size:18px;line-height:1.45}
.order-sheet .sheet-notes>.extra-production-text{margin:0;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;color:#d00000;font-weight:700;font-size:20px;line-height:1.45}
/* Scroll inventory rows beneath the persistent column headings. */
.inventory-table>.tablewrap{max-height:70vh;overflow:auto;position:relative;isolation:isolate}
.inventory-table thead th{position:sticky;top:0;z-index:2;background:#eff2f6;box-shadow:0 1px 0 #d9dfe8}
.order-sheet .batch-bottom{display:grid;grid-template-columns:78% 22%;align-items:stretch}
.order-sheet .batch-bottom>.quantity-section{min-width:0;display:flex;flex-direction:column}
.order-sheet .batch-bottom .batch-quantities{flex:1;height:100%;font-size:11px}
.order-sheet .batch-bottom .batch-quantities td,.order-sheet .batch-bottom .batch-quantities th{padding:6px 3px}
.order-sheet .batch-bottom>.sheet-notes{min-width:0;border:1px solid #555}
.order-sheet .batch-bottom .sheet-notes>div{column-count:1}
.order-sheet .batch-bottom.measuring-batch{align-items:start}
.order-sheet .batch-bottom.measuring-batch .batch-quantities{height:100%;flex:1}
.order-sheet.ordinary-sheet:not(.temu-first-sheet) .normal-bottom{display:block}

.order-sheet.normal-sheet .normal-quantities thead{background:#f5cbae}

.inventory-table th:first-child,.inventory-table .product-key{width:300px;min-width:300px}
.inventory-table .inventory-product{gap:10px}
.inventory-table .inventory-photo{width:70px;height:96px}
.inventory-table th:last-child,.inventory-table .inventory-action{width:1%;min-width:0;padding-left:7px;padding-right:7px;white-space:nowrap}
.inventory-table .inventory-action button{margin:0}
.image-zoom{padding:0;border:0;background:transparent;display:block;cursor:zoom-in}
.image-zoom:hover{background:transparent}.image-zoom:focus-visible{outline:2px solid #2457c5;outline-offset:3px}
.image-viewer{border:0;border-radius:10px;padding:52px 16px 16px;background:#fff;max-width:94vw;max-height:94vh}
.image-viewer::backdrop{background:#000b}.image-viewer>img{display:block;width:85vw;height:78vh;object-fit:contain}
.image-viewer-close{position:absolute;right:16px;top:8px}
.inventory-table .image-zoom{padding:0;margin:0;border:0;flex-shrink:0}
/* Shipping notes follow the complete quantity table in both preview modes. */
.order-sheet .batch-bottom{display:block}
.order-sheet .batch-bottom .batch-quantities{height:auto;flex:none}
.reconciliation-sheet{padding:0;overflow:hidden}.reconciliation-sheet>h2{text-align:center;background:#d5dce5;margin:0;padding:28px;font-size:24px}.reconciliation-sheet table{font-size:14px}.reconciliation-sheet td,.reconciliation-sheet th{border:1px solid #b5bdc8;text-align:center;padding:12px 10px}.reconciliation-sheet th{background:#d5dce5;color:#172b4d}.reconciliation-sheet>h3{background:#32c9dd;margin:0;padding:15px;text-align:center}.reconciliation-sheet .reconciliation-note{white-space:pre-wrap;min-width:160px;max-width:280px}.reconciliation-deduction{color:#d00000;font-weight:700}.reconciliation-total{font-weight:700;background:#f1f5fa}.reconciliation-final{text-align:right;padding:24px 30px;font-size:24px;margin:0}.reconciliation-sheet .no-wrap{white-space:nowrap}#reconciliation-list td{vertical-align:middle}#reconciliation-list td:nth-child(5){line-height:1.8}
/* One continuous statement grid follows the supplied factory bill. */
.reconciliation-sheet{background:white;color:#111;border-radius:0;border:0;overflow:visible}.statement-scroll{overflow:auto}.reconciliation-sheet .statement-table{width:100%;min-width:1100px;table-layout:fixed;border-collapse:collapse;font-family:Arial,"Microsoft YaHei",sans-serif;font-size:14px}.reconciliation-sheet .statement-table td,.reconciliation-sheet .statement-table th{border:1px solid #555;padding:12px 5px;height:46px;white-space:nowrap;font-weight:400;color:#111;vertical-align:middle;text-align:center}.reconciliation-sheet .statement-table .statement-title th{height:98px;font-weight:700;font-size:24px;background:#d3dce5}.reconciliation-sheet .statement-table .statement-header th{height:50px;background:#d3dce5}.reconciliation-sheet .statement-table .statement-section th{background:#31cbdf;height:50px}.reconciliation-sheet .statement-table .statement-red{color:#ff2020}.reconciliation-sheet .statement-table .statement-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.reconciliation-sheet .statement-table .statement-final td{height:58px;font-size:17px}.reconciliation-sheet .statement-table td[data-field=total]{text-align:left}
#statement-print{display:none}
@page statement{size:A4 portrait;margin:8mm}
@media print{
 body.printing-statement>*:not(#statement-print){display:none!important}
 body.printing-statement{margin:0;background:white}
 #statement-print{display:block;page:statement;zoom:var(--statement-print-zoom);width:1100px;max-width:none;margin:0;padding:0;border:0;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 #statement-print .statement-scroll{overflow:visible}
 #statement-print .statement-table{width:1100px;min-width:1100px;table-layout:fixed}
 #statement-print tr{break-inside:avoid}
 #statement-print .statement-section{break-after:avoid}
}
/* Order sheet readability and centered print layout. */
.order-sheet{font-size:14px;width:1120px;margin:0 auto}
.order-sheet .normal-top,.order-sheet .sheet-top{width:100%}
.order-sheet .normal-top .product-grid,.order-sheet .sheet-top .product-grid{height:340px}
.order-sheet .normal-top .sample-image,.order-sheet .sheet-top .sample-image{height:100%;max-height:none;object-fit:contain;transform:scale(1.08)}
.order-sheet .normal-top td,.order-sheet .normal-top th,.order-sheet .sheet-top td,.order-sheet .sheet-top th{font-size:14px}
.order-sheet .normal-bottom td,.order-sheet .normal-bottom th,.order-sheet .sheet-notes>div{font-size:14px}
@media print{
 .order-sheet{width:1120px;margin-left:auto;margin-right:auto;transform-origin:top center}
}
/* Final order sheet sizing. */
.order-sheet{width:297mm;max-width:100%;font-size:16px;margin:0 auto}
.order-sheet .product-grid,.order-sheet .normal-quantities,.order-sheet .batch-quantities{font-size:16px}
.order-sheet .sheet-notes>div,.order-sheet .normal-bottom td,.order-sheet .normal-bottom th{font-size:16px}
.order-sheet .sheet-top .product-grid,.order-sheet .normal-top .product-grid{height:360px}
.order-sheet .sample-slot{overflow:hidden;display:flex;align-items:stretch;justify-content:center}
.order-sheet .sample-slot .sample-image{width:100%;height:100%;max-height:none;object-fit:contain}
@media print{.order-sheet{width:297mm;max-width:297mm;margin-left:auto;margin-right:auto}}
/* Final per-template layout rules. These selectors intentionally come last so
   legacy generic order-sheet rules cannot override the five supplied forms. */
.order-sheet h2{background:#c7c7c7;font-size:23px;padding:8px 12px}
.order-sheet .product-grid th{font-size:16px;font-weight:700}
.order-sheet .product-grid td{font-size:16px}
.order-sheet .batch-bottom,.order-sheet .normal-bottom{display:grid;grid-template-columns:68% 32%;align-items:stretch}
.order-sheet .batch-bottom .quantity-section,.order-sheet .normal-bottom>section{min-width:0}
.order-sheet .batch-bottom>.sheet-notes,.order-sheet .normal-bottom>.sheet-notes{border:1px solid #555}
.order-sheet .batch-quantities thead,.order-sheet .normal-quantities thead{background:#f5cbae}
.order-sheet .ordered{background:#f00;color:#fff;font-weight:700}
.order-sheet .due{background:#fff200;color:#f00;font-weight:700}
.order-sheet.temu-jit-sheet .batch-bottom{grid-template-columns:68% 32%}
.order-sheet.first-sheet .normal-top,.order-sheet.ordinary-sheet .normal-top{grid-template-columns:22% 78%}
.order-sheet.first-sheet .normal-bottom{grid-template-columns:36% 64%}
.order-sheet.ordinary-sheet:not(.temu-first-sheet) .normal-bottom{display:grid;grid-template-columns:36% 64%}
.order-sheet.ordinary-sheet .craft-requirements{min-width:0}
.order-sheet.ordinary-sheet .craft-requirements h3,.order-sheet.ordinary-sheet .product-requirements-panel h3{font-size:18px!important}
.order-sheet.ordinary-sheet .craft-requirements td,.order-sheet.ordinary-sheet .craft-requirements th,.order-sheet.ordinary-sheet .product-requirements-panel{font-size:18px!important}
.order-sheet.ordinary-sheet .product-requirements-panel{padding:12px;border:1px solid #555;overflow-wrap:anywhere}
.order-sheet.ordinary-sheet .product-requirements-panel>div{white-space:pre-wrap;line-height:1.45}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom{grid-template-columns:36% 32% 32%}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.sheet-notes{grid-column:2}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.eu-representative{grid-column:3}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom{grid-template-columns:36% 64%;grid-template-rows:auto auto auto;align-items:stretch}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.craft-requirements{grid-column:1;grid-row:1}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.product-requirements-panel{grid-column:1;grid-row:2}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.eu-representative{grid-column:1;grid-row:3;min-height:0}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.sheet-notes{grid-column:2;grid-row:1 / span 3;min-height:0}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom{grid-template-rows:auto 1fr}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.eu-representative{grid-row:1;min-height:0;height:100%}
.order-sheet.ordinary-sheet:has(.eu-representative) .normal-bottom>.product-requirements-panel{grid-row:2;min-height:0}
.eu-representative{border:1px solid #555;background:#fff}
.eu-representative h3{background:#c7c7c7;font-size:16px}
.eu-content{display:flex;gap:10px;align-items:flex-start;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere}
.eu-content img{width:180px;height:180px;object-fit:contain;border:1px solid #aaa}
.order-sheet[data-single-shipment="true"] .batch-bottom{display:block}
.order-sheet.temu-jit-sheet .temu-jit-top{display:grid;grid-template-columns:56% 22% 22%;min-height:452px}
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid{height:100%;width:100%}
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid td,.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid th{height:20%;font-size:16px}
.order-sheet.temu-jit-sheet .temu-eu{border:1px solid #555;overflow:hidden}
.order-sheet.temu-jit-sheet .temu-eu h3{height:20%;display:flex;align-items:center;justify-content:center;background:#fff;font-size:18px}
.order-sheet.temu-jit-sheet .temu-eu>div{height:80%;padding:8px;font-size:11px;line-height:1.15;overflow:hidden}
.order-sheet.temu-jit-sheet .temu-eu img{display:block;width:100%;height:48%;object-fit:contain}
.order-sheet.temu-jit-sheet .temu-jit-bottom{display:grid;grid-template-columns:68% 32%;align-items:stretch}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.sheet-notes{border:1px solid #555}
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities th,.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities td{font-size:16px;height:58px}
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid td,.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid th{font-size:18px}
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities th,.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities td{font-size:18px}
.order-sheet.temu-jit-sheet .temu-eu h3,.order-sheet.temu-jit-sheet .temu-jit-bottom>.sheet-notes h3{font-size:18px}
.order-sheet.temu-jit-sheet .temu-eu>div{font-size:12px}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.sheet-notes>div{font-size:12px}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.sheet-notes .extra-production-text{font-size:24px}
@media print{.order-sheet{width:297mm;max-width:297mm;zoom:.9}.order-sheet .eu-content img{max-width:42mm;max-height:42mm}}
/* Shipping notes are a single continuous, wrapping column. */
.order-sheet .sheet-notes{column-count:1!important;columns:1!important;min-width:0;overflow:hidden}
.order-sheet .sheet-notes>div{column-count:1!important;columns:1!important;font-size:12px!important;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.order-sheet .sheet-notes h3{font-size:18px!important}
.order-sheet .sheet-notes .note-highlight{color:#f00;font-weight:700}
.order-sheet .sheet-notes .extra-production-text{font-size:12px!important;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
/* Responsive order-sheet canvas: width is twice the height on screen. */
.order-sheet{width:100%;max-width:none;aspect-ratio:2 / 1;box-sizing:border-box;overflow:visible}
.order-sheet .batch-bottom,.order-sheet .temu-jit-bottom{display:grid!important;grid-template-columns:68% 32%;align-items:stretch}
.order-sheet .batch-bottom>.quantity-section,.order-sheet .batch-bottom>.sheet-notes,.order-sheet .temu-jit-bottom>.quantity-section,.order-sheet .temu-jit-bottom>.sheet-notes{height:100%;min-height:0;box-sizing:border-box}
.order-sheet .batch-bottom>.quantity-section,.order-sheet .temu-jit-bottom>.quantity-section{display:flex;flex-direction:column}
.order-sheet .batch-quantities{height:100%;table-layout:fixed}
.order-sheet .batch-bottom .batch-quantities,.order-sheet .temu-jit-bottom .batch-quantities{height:auto;flex:1;min-height:0}
.order-sheet .batch-quantities th:nth-last-child(2),.order-sheet .batch-quantities td:nth-last-child(2){width:40mm}
.order-sheet .batch-quantities th:last-child,.order-sheet .batch-quantities td:last-child{width:37mm}
.order-sheet .quantity-section>h3{font-size:18px!important}
.order-sheet .extra-production-text{font-size:20px!important}
.order-sheet .shipment-empty th,.order-sheet .shipment-empty td{height:58px!important;padding:6px 3px}
.order-sheet .batch-bottom,.order-sheet .temu-jit-bottom{align-items:stretch!important}
.order-sheet .batch-bottom>.sheet-notes,.order-sheet .temu-jit-bottom>.sheet-notes{display:flex;flex-direction:column}
.order-sheet .batch-bottom>.sheet-notes>div,.order-sheet .temu-jit-bottom>.sheet-notes>div{flex:1;border:0!important}
.order-sheet .sheet-notes>.extra-production-text{border:0!important}
.order-sheet .batch-bottom,.order-sheet .temu-jit-bottom{grid-auto-rows:minmax(0,1fr)}
.order-sheet .sheet-notes{border:1px solid #555!important}
.order-sheet .sheet-notes *{border:0!important;box-shadow:none!important;background-image:none!important}
.order-sheet .batch-bottom,.order-sheet .temu-jit-bottom{border:0!important;outline:0!important}
.order-sheet .batch-quantities th,.order-sheet .batch-quantities td{height:46px!important;padding:4px 3px!important}
.order-sheet .batch-quantities tr.remaining th,.order-sheet .batch-quantities tr.remaining td{height:46px!important}
.order-sheet .batch-quantities tr.remaining th,.order-sheet .batch-quantities tr.remaining td{height:64px!important}
.order-sheet .sheet-notes>.extra-production-text{height:64px!important;min-height:64px!important;box-sizing:border-box;display:flex;align-items:center}
.order-sheet .product-grid td,.order-sheet .product-grid th{height:58px}
/* All order-detail quantity tables use the same readable 18px type. */
.order-sheet .batch-quantities,
.order-sheet .batch-quantities th,
.order-sheet .batch-quantities td,
.order-sheet .normal-quantities table,
.order-sheet .normal-quantities table th,
.order-sheet .normal-quantities table td{font-size:18px!important}
@media print{
 .order-sheet{width:100%;max-width:100%;aspect-ratio:2 / 1;height:auto;zoom:1;break-inside:avoid;page-break-inside:avoid}
}
/* Unified typography for every order-detail template. */
.order-sheet,.order-sheet td,.order-sheet th{font-size:18px!important}
.order-sheet .sheet-notes h3,.order-sheet .temu-eu h3,.order-sheet .eu-representative h3{font-size:18px!important}
.order-sheet .sheet-notes>div,.order-sheet .temu-eu>div,.order-sheet .eu-content{font-size:12px!important}
.order-sheet .sheet-notes .extra-production-text{font-size:24px!important}
/* Supplied order-sheet canvas dimensions. */
.order-sheet{width:380mm;max-width:380mm;aspect-ratio:auto;box-sizing:border-box}
.order-sheet.batch-sheet{min-height:200mm}
@media print{
 .order-sheet{width:380mm;max-width:380mm;min-height:0;aspect-ratio:auto}
 .order-sheet.batch-sheet{min-height:200mm;height:200mm}
}
#print-image-page{display:none}
@media print{
 body.printing-order-image>:not(#print-image-page){display:none!important}
 body.printing-order-image{margin:0;padding:0;background:#fff}
 body.printing-order-image #print-image-page{display:block;width:297mm;height:auto;margin:0;break-inside:avoid;break-after:avoid}
 body.printing-order-image #print-image-page img{display:block;width:297mm;height:auto;max-width:none}
}

body.printing-order-dom>:not(#print-order-sheet){display:none!important} body.printing-order-dom #print-order-sheet{display:block!important;width:380mm!important;margin:0!important;background:#fff!important} body.printing-order-dom #print-order-sheet .order-sheet{width:380mm!important;max-width:none!important}
/* TEMU-JIT top information ends after the color/weight row.  Do not keep
   the old fixed 452px minimum, which rendered an extra blank row before the
   quantity section when printing at a reduced scale. */
.order-sheet.temu-jit-sheet .temu-jit-top{
  min-height:0!important;
  height:auto!important;
}
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid{
  height:auto!important;
}
/* Batch order sheets must grow with the quantity and notes modules. */
.order-sheet.batch-sheet{
  min-height:0!important;
  height:auto!important;
}
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.quantity-section{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
.order-sheet .batch-bottom .batch-quantities,
.order-sheet .temu-jit-bottom .batch-quantities{
  height:100%!important;
  flex:1 1 auto!important;
  min-height:0!important;
}
.order-sheet .batch-quantities tr.remaining>th,
.order-sheet .batch-quantities tr.remaining>td{
  vertical-align:middle!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tbody{
  height:100%!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.quantity-section{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  align-content:stretch!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.quantity-section>.batch-quantities{
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tr.remaining{
  height:100%!important;
}
/* JMI / self-stock use the same shared-height batch layout as TEMU-JIT. */
.order-sheet .batch-bottom{
  display:grid!important;
  grid-template-columns:68% 32%!important;
  grid-template-rows:auto!important;
  align-items:stretch!important;
}
.order-sheet .batch-bottom>.quantity-section{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  height:100%!important;
  min-height:0!important;
}
.order-sheet .batch-bottom>.quantity-section>.batch-quantities{
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
.order-sheet .batch-bottom .batch-quantities tbody{height:100%!important}
.order-sheet .batch-bottom .batch-quantities tr.remaining{height:100%!important}
/* FBA and ordinary replenishment sheets have no craft section.  Let the
   shipping notes occupy the full lower row and keep the allow-extra notice
   as its final emphasized line. */
.order-sheet.ordinary-sheet:not(.temu-first-sheet) .normal-bottom{
  display:block!important;
  width:100%!important;
  height:auto!important;
}
.order-sheet.ordinary-sheet:not(.temu-first-sheet) .normal-bottom>.sheet-notes{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
}
.order-sheet.ordinary-sheet:not(.temu-first-sheet) .normal-bottom>.sheet-notes>.extra-production-text{
  margin-top:auto!important;
  color:#d00000!important;
  font-size:24px!important;
  font-weight:700!important;
  line-height:1.35!important;
}
.order-sheet .batch-bottom>.sheet-notes{
  height:100%!important;
  min-height:100%!important;
  align-self:stretch!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tr.remaining:last-child>th,
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tr.remaining:last-child>td{
  border-bottom:1px solid #555!important;
}
@media print{
  .order-sheet.batch-sheet{
    min-height:0!important;
    height:auto!important;
  }
}
/* Keep the quantity table and shipping notes as one continuous row.  The
   previous minmax row plus percentage heights allowed the notes column to
   stop after its content while the shipment table continued below it. */
.order-sheet .batch-bottom,
.order-sheet .temu-jit-bottom{
  display:grid!important;
  grid-template-columns:68% 32%!important;
  grid-template-rows:auto!important;
  align-items:stretch!important;
  height:auto!important;
  min-height:0!important;
}
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .batch-bottom>.sheet-notes,
.order-sheet .temu-jit-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.sheet-notes{
  grid-row:1!important;
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.quantity-section{grid-column:1!important}
.order-sheet .batch-bottom>.sheet-notes,
.order-sheet .temu-jit-bottom>.sheet-notes{
  grid-column:2!important;
  overflow:hidden!important;
}
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.quantity-section{
  height:max-content!important;
  min-height:0!important;
  overflow:visible!important;
}
.order-sheet .batch-bottom>.sheet-notes,
.order-sheet .temu-jit-bottom>.sheet-notes{
  height:100%!important;
  min-height:100%!important;
  align-self:stretch!important;
}
.order-sheet .batch-bottom .batch-quantities,
.order-sheet .temu-jit-bottom .batch-quantities{
  height:auto!important;
  flex:none!important;
  border:1px solid #555!important;
}
.order-sheet .batch-quantities tr>th:first-child,
.order-sheet .batch-quantities tr>td:first-child{border-left:1px solid #555!important}
.order-sheet .batch-quantities tr:last-child>th,
.order-sheet .batch-quantities tr:last-child>td{border-bottom:1px solid #555!important}
/* Final cascade: the quantity table must consume the whole shared grid row. */
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.quantity-section{
  height:100%!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
}
.order-sheet .batch-bottom .batch-quantities,
.order-sheet .temu-jit-bottom .batch-quantities{
  height:100%!important;
  min-height:0!important;
  flex:1 1 auto!important;
  align-self:stretch!important;
}
.order-sheet .batch-bottom .batch-quantities tbody,
.order-sheet .temu-jit-bottom .batch-quantities tbody{height:100%!important}
.order-sheet .batch-bottom .batch-quantities tr.remaining,
.order-sheet .temu-jit-bottom .batch-quantities tr.remaining{height:100%!important}

