: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:0;padding:0;margin:auto;width:fit-content;height:fit-content;background:transparent;overflow:visible;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);box-shadow:0 8px 32px #0005}
.image-viewer::backdrop{background:rgba(0,0,0,.55)}.image-viewer>img{display:block;width:auto;height:auto;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);object-fit:contain}
.image-viewer .image-viewer-close{position:absolute;z-index:1;right:-12px;top:-12px;display:grid;place-items:center;width:28px;height:28px;padding:0;margin:0;border:1px solid #fff;border-radius:50%;background:#333c;color:#fff;font-size:24px;line-height:1;font-weight:400;box-shadow:0 1px 3px #0004}.image-viewer .image-viewer-close:hover{background:#111e}.image-viewer .image-viewer-close:focus-visible{outline:2px solid #1677ff;outline-offset:2px}#app img[src^="/api/images/"]{cursor:zoom-in}
.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-quantities .unit-price{font-weight:700}
.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:160px}
.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}
/* Firefox resolves percentage heights in an auto-sized grid row differently from
   Chromium.  Keep the shared row and let the left table grow through Flex, rather
   than chaining 100% through the table, tbody and remaining row. */
.order-sheet .batch-bottom,
.order-sheet .temu-jit-bottom{
  align-items:stretch!important;
  grid-auto-rows:auto!important;
}
.order-sheet .batch-bottom>.quantity-section,
.order-sheet .temu-jit-bottom>.quantity-section{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
  overflow:hidden!important;
}
.order-sheet .batch-bottom>.sheet-notes,
.order-sheet .temu-jit-bottom>.sheet-notes{
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
.order-sheet .batch-bottom .batch-quantities,
.order-sheet .temu-jit-bottom .batch-quantities{
  height:auto!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,
.order-sheet .batch-bottom .batch-quantities tr.remaining,
.order-sheet .temu-jit-bottom .batch-quantities tr.remaining{
  height:auto!important;
}

/* TEMU 的照片栏保持固定边界，照片填满可用区域。裁切发生在栏内，
   不会挤压或撑破订单表格。 */
.order-sheet.temu-jit-sheet .sample-slot,
.order-sheet.temu-first-sheet .sample-slot{
  overflow:hidden!important;
}
.order-sheet.temu-jit-sheet .sample-slot .sample-image,
.order-sheet.temu-first-sheet .sample-slot .sample-image{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  transform:none!important;
}

/* TEMU-JIT 欧代图片在资料栏内按比例占满可用空间。 */
.order-sheet.temu-jit-sheet .temu-eu>div{
  display:flex;
  flex-direction:column;
}
.order-sheet.temu-jit-sheet .temu-eu>div>p{
  flex:0 0 auto;
  margin:0 0 6px;
}
.order-sheet.temu-jit-sheet .temu-eu>div>img{
  display:block;
  flex:1 1 auto;
  min-height:0;
  width:100%;
  height:100%;
  object-fit:contain;
}

/* TEMU-JIT 基本信息新增店铺后，六行内容均分顶部栏高度。 */
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid td,
.order-sheet.temu-jit-sheet .temu-jit-top>.product-grid th{
  height:calc(100% / 6)!important;
}

/* Ordinary order sheets: quantities use the same right 78% column as the top product information. */
.order-sheet.normal-sheet .normal-quantities{
  display:grid;
  grid-template-columns:22% 78%;
  min-width:0;
}
.order-sheet.normal-sheet .normal-quantities>table{
  grid-column:2;
  width:100%;
}
.order-sheet.normal-sheet .normal-top .product-grid td,
.order-sheet.normal-sheet .normal-top .product-grid th{
  height:52px!important;
}
/* Stable two-column wrapper: only the header and quantity area participate. */
.order-sheet.normal-sheet .normal-layout{
  display:grid;
  grid-template-columns:22% 78%;
  align-items:stretch;
}
.order-sheet.normal-sheet .normal-layout>.normal-top{display:contents!important}
.order-sheet.normal-sheet .normal-layout>.normal-top>.sample-slot{
  grid-column:1;
  grid-row:1 / span 2;
  min-height:0;
  overflow:hidden;
}
.order-sheet.normal-sheet .normal-layout>.normal-top>.sample-slot .sample-image,
.order-sheet.normal-sheet .normal-layout>.normal-top>.sample-slot .image-placeholder{
  object-fit:contain;
  object-position:center;
}
.order-sheet.normal-sheet .normal-layout>.normal-top>section{grid-column:2;grid-row:1;min-width:0}
.order-sheet.normal-sheet .normal-layout>.normal-top .product-grid{height:auto!important}
.order-sheet.normal-sheet .normal-layout>.normal-quantities{grid-column:2;grid-row:2;display:block!important;min-width:0}
.order-sheet.normal-sheet .normal-layout>.normal-quantities>table{width:100%;grid-column:auto}
.order-sheet.normal-sheet .normal-layout .product-grid td,
.order-sheet.normal-sheet .normal-layout .product-grid th{height:44px!important}

/* 普通订单产品信息与下单数量强调。 */
.order-sheet .date-highlight{background:#fff200!important;color:#f00!important;font-weight:700!important}
.order-sheet.normal-sheet .normal-quantities .ordered-quantity{color:#f00!important;font-weight:700!important}

/* FBA 产品信息使用较高的三行布局，其余普通订单保持 44px。 */
.order-sheet.fba-sheet .normal-layout .product-grid td,
.order-sheet.fba-sheet .normal-layout .product-grid th{height:52px!important}
/* Loading feedback never delays interaction or adds network requests. */
#navigation-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:10000;background:linear-gradient(90deg,#2563eb 0%,#93c5fd 50%,#2563eb 100%);background-size:200% 100%;animation:navigation-progress 1s linear infinite;pointer-events:none}
#navigation-status,#navigation-error{margin:0 0 12px;padding:10px 14px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff;color:#1e40af;font-size:14px}
#navigation-error{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
#app[aria-busy="true"] .content [data-navigation-inert]{opacity:.65;pointer-events:none}
.navigation-skeleton{display:grid;gap:12px;padding:16px 0}
.navigation-skeleton span{height:28px;background:#dbeafe;border-radius:4px}
.page-enter{animation:page-enter 140ms ease-out}
.return-highlight{animation:return-highlight 1.2s ease-out}
@keyframes navigation-progress{to{background-position:-200% 0}}
@keyframes page-enter{from{opacity:.65}to{opacity:1}}
@keyframes return-highlight{from{background:#fef3c7}to{background:transparent}}
@media(prefers-reduced-motion:reduce){.page-enter,.return-highlight,#navigation-progress{animation:none}}
@media print{#navigation-progress,#navigation-status,#navigation-error{display:none!important}.page-enter,.return-highlight{animation:none!important}}

/* Shared compact pagination for all list pages. */
.list-pagination{flex-wrap:wrap;align-items:center;gap:6px}.list-pagination button{min-width:32px;padding:6px 9px}.list-pagination button.active{background:#2563eb;border-color:#2563eb;color:#fff}.list-pagination label{display:flex;align-items:center;gap:6px;white-space:nowrap}.list-pagination .page-jump{width:70px;min-width:0;padding:6px}.page-gap{padding:0 4px}

/* Override the older, more specific TEMU table percentage rules in Firefox.
   A remaining row is content-sized; only the whole table fills the shared row. */
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tbody,
.order-sheet.temu-jit-sheet .temu-jit-bottom .batch-quantities tr.remaining{
  height:auto!important;
  min-height:0!important;
}
.order-sheet.temu-jit-sheet .temu-jit-bottom>.quantity-section{
  overflow:visible!important;
}

/* Keep the complete raster frame inside the printable page. */
@media print{body.printing-order-image #print-image-page{width:289mm!important;margin:4mm!important}body.printing-order-image #print-image-page img{width:100%!important;max-width:100%!important;box-sizing:border-box}}

.sort-header{border:0;background:transparent;padding:0;white-space:nowrap;font:inherit;color:inherit;display:inline-flex;align-items:center;gap:3px}.sort-header span{font-size:9px;color:#9ca3af}.sort-header span.selected{color:#1677ff}

.order-list-table table{border-collapse:collapse;min-width:1050px}.order-list-table td,.order-list-table th{text-align:center;vertical-align:middle}.order-list-table .order-basic-cell{min-width:290px;width:310px;border-right:1px solid #e7edf5}.order-list-table .order-basic{justify-content:center;gap:12px}.order-list-table .order-basic p{margin:6px 0;white-space:normal;overflow-wrap:anywhere;text-align:left}.order-list-table .inventory-photo{width:70px;height:96px}.order-numbers{display:flex;flex-direction:column;gap:10px;overflow-wrap:anywhere;min-width:150px}.order-list-table .order-group-start>td{border-top:2px solid #d9e2ef}.order-list-table [data-size]>td:not([rowspan]){height:46px}.order-list-table .order-merged{vertical-align:middle;text-align:center}

.order-list-table td,.order-list-table th{border:1px solid #d9dee7}.order-list-table .order-list-total>td{background:#eff2f6;font-weight:700}.order-list-table .order-skc{white-space:nowrap!important;overflow-wrap:normal!important}.order-list-table .order-basic-cell{width:auto;min-width:330px}.order-list-table .order-numbers a{color:#1677ff;text-decoration:none}.order-list-table .order-numbers a:hover{text-decoration:underline}

/* List alignment and frozen basic information. */
.order-list-table .tablewrap{width:100%;overflow:auto;position:relative;isolation:isolate}.order-list-table table{width:100%;min-width:1050px}.order-list-table td,.order-list-table th,.order-list-table .order-merged,.inventory-table td,.inventory-table th,.inventory-table td.number,.inventory-table .inventory-action{text-align:left}.order-list-table .order-basic{justify-content:flex-start}.order-list-table [data-size]>td:not([rowspan]){height:46px;padding:13px 9px}.order-list-table .receipt-total{padding:0;margin:0;background:transparent;border:0;font-size:inherit;line-height:inherit}.order-dates{display:flex;flex-direction:column;gap:10px;min-width:165px}.order-list-table .order-basic-cell,.order-list-table th:first-child,.inventory-table .product-key,.inventory-table th:first-child{position:sticky;left:0;z-index:3;background:#fff;box-shadow:1px 0 0 #d9dee7}.order-list-table th:first-child,.inventory-table th:first-child{background:#eff2f6;z-index:4}

.order-list-table table{table-layout:fixed}.order-list-table .order-basic-cell,.order-list-table th:first-child{width:330px;min-width:330px}.order-list-table .order-numbers,.order-list-table .order-dates{min-width:0;overflow-wrap:anywhere}

.order-list-table td{white-space:normal;overflow-wrap:anywhere}.order-list-table .order-dates>div{white-space:normal}.order-list-table .order-number-link{white-space:normal}

.order-list-table table{min-width:1440px}.shipment-list-table th:nth-child(6),.shipment-list-table th:nth-child(7){width:180px}.shipment-list-table .order-dates>div{white-space:nowrap}.shipment-list-table td:last-child button{white-space:nowrap}

/* Compact quantity columns, centered headers/actions, aligned image slots. */
.order-list-table th,.inventory-table th{text-align:center}.order-list-table td:has(>button),.order-list-table td:has(>[data-order-actions]),.inventory-table .inventory-action{text-align:center}.order-list-table button,.inventory-table button{text-align:center}.order-list-table .inventory-product,.inventory-table .inventory-product{display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;align-items:center;justify-content:start}.order-list-table .image-zoom,.inventory-table .image-zoom,.list-image-placeholder{width:70px;height:96px;display:block;margin:0;justify-self:start}.order-list-table .inventory-product>div,.inventory-table .inventory-product>div{text-align:left;min-width:0}.order-list-table .order-numbers>div,.order-list-table .order-number-link{white-space:nowrap;overflow-wrap:normal}.order-list-table:not(.shipment-list-table) th:nth-child(2){width:100px}.order-list-table:not(.shipment-list-table) th:nth-child(3){width:80px}.order-list-table:not(.shipment-list-table) th:nth-child(4){width:340px}.order-list-table th:last-child{width:105px}.shipment-list-table th:nth-child(2){width:90px}.shipment-list-table th:nth-child(3){width:75px}.shipment-list-table th:nth-child(4){width:100px}.shipment-list-table th:nth-child(5){width:90px}.shipment-list-table th:nth-child(6){width:340px}.shipment-list-table th:nth-child(8){width:75px}.order-list-table .order-numbers{max-width:100%}

.order-list-table td.order-merged:has(>button){text-align:center}
.layout>main{min-width:0}.content{width:100%;min-width:0}

/* First order group: specified widths and centered quantity/date columns. */
.batch-order-list th:first-child,.batch-order-list .order-basic-cell{width:380px;min-width:380px}.batch-order-list:not(.shipment-list-table) th:nth-child(2){width:140px}.batch-order-list:not(.shipment-list-table) th:nth-child(3){width:100px}.batch-order-list:not(.shipment-list-table) th:nth-child(4){width:340px}.batch-order-list th:nth-child(5),.batch-order-list th:nth-child(6){width:180px}.batch-order-list th:last-child{width:auto}.batch-order-list [data-size]>td:not([rowspan]),.batch-order-list .order-list-total>td,.batch-order-list .order-date-cell,.batch-order-list .order-due-cell,.batch-order-list .order-actions-cell{text-align:center}

/* Both order groups share quantity and number column widths. */
.batch-order-list:not(.shipment-list-table) th:nth-child(3){width:140px}.batch-order-list:not(.shipment-list-table) th:nth-child(4){width:320px}

/* Shipment list widths and receipt quantity buttons. */
.shipment-list-table th:first-child,.shipment-list-table .order-basic-cell{width:350px;min-width:350px}.shipment-list-table th:nth-child(2){width:100px}.shipment-list-table th:nth-child(3),.shipment-list-table th:nth-child(4),.shipment-list-table th:nth-child(5){width:75px}.shipment-list-table th:nth-child(6){width:300px}.shipment-list-table th:nth-child(7){width:180px}.shipment-list-table th:nth-child(8){width:80px}.shipment-list-table th:nth-child(9){width:auto}.shipment-list-table th:last-child{width:105px}.shipment-list-table th{white-space:normal;overflow-wrap:anywhere}.shipment-list-table [data-size]>td:not([rowspan]),.shipment-list-table .order-list-total>td,.shipment-list-table .order-merged:has(>.order-dates){text-align:center}.shipment-list-table .receipt-total{display:inline-block;padding:6px 10px;border:1px solid #cbd5e1;background:#fff;border-radius:7px;color:#253753;font-size:12px;line-height:normal}.shipment-list-table .receipt-total:hover{background:#edf3ff}
.shipment-list-table [data-size]>td:has(>.receipt-total){padding-top:9px;padding-bottom:9px}
.shipment-list-table [data-size]>td:has(>.receipt-total){padding-top:7px;padding-bottom:7px}

/* Updated shipment list column widths. */
.shipment-list-table th:first-child,.shipment-list-table .order-basic-cell{width:340px;min-width:340px}.shipment-list-table th:nth-child(2){width:140px}.shipment-list-table th:nth-child(3),.shipment-list-table th:nth-child(4),.shipment-list-table th:nth-child(5){width:90px}.shipment-list-table th:nth-child(6){width:280px}.shipment-list-table th:nth-child(7){width:170px}.shipment-list-table th:nth-child(8){width:90px}.shipment-list-table th:nth-child(9){width:auto}.shipment-list-table th:last-child{width:105px}

.shipment-list-table .receipt-heading{display:inline-block;text-align:center;line-height:1.4;vertical-align:middle}

.shipment-list-table th:nth-child(5){width:110px}.shipment-list-table .sort-header .receipt-heading{font-size:inherit;color:inherit}

.product-list-table table{min-width:1150px;border-collapse:collapse;width:100%}.product-list-table th,.product-list-table td{border:1px solid #d9dee7;vertical-align:middle;padding:13px 9px}.product-list-table th{background:#eff2f6;text-align:center}.product-list-table td{text-align:center;white-space:normal;overflow-wrap:anywhere}.product-list-table .product-basic-cell{min-width:360px;text-align:left}.product-list-table .inventory-product{display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;align-items:center;text-align:left}.product-list-table .inventory-product p{white-space:normal;overflow-wrap:anywhere;margin:6px 0}.product-list-table .inventory-photo{width:70px;height:96px;object-fit:contain}.product-list-table .image-zoom{padding:0;border:0;margin:0;width:70px;height:96px}.product-list-table .product-factory-cell{text-align:left;min-width:180px}.product-list-table .product-factory-cell>div+div{margin-top:10px}.product-list-table .product-action-cell{min-width:140px;white-space:nowrap}.product-list-table [data-product-size]>td:not([rowspan]){height:46px}

.product-list-table table{table-layout:fixed;min-width:1490px}.product-list-table th:first-child,.product-list-table .product-basic-cell{width:340px;min-width:340px}.product-list-table th:nth-child(2),.product-list-table th:nth-child(3),.product-list-table th:nth-child(5){width:120px}.product-list-table th:nth-child(4),.product-list-table .product-factory-cell{width:150px;min-width:150px}.product-list-table th:nth-child(6),.product-list-table th:nth-child(7){width:100px}.product-list-table th:nth-child(8){width:200px}.product-list-table th:last-child{width:140px}.product-created-display{display:grid;align-content:start;gap:7px;font-size:14px}.product-created-display p{margin:0;padding:10px 0}
.product-list-table table{min-width:1390px}
.product-list-table [data-product-size]>td:not([rowspan]){height:42px;padding-top:10px;padding-bottom:10px}

/* Both order lists include outstanding quantities per size. */
.batch-order-list th:first-child,.batch-order-list .order-basic-cell{width:340px;min-width:340px}.batch-order-list:not(.shipment-list-table) th:nth-child(3),.batch-order-list:not(.shipment-list-table) th:nth-child(4){width:140px}.batch-order-list:not(.shipment-list-table) th:nth-child(5){width:280px}.batch-order-list:not(.shipment-list-table) th:nth-child(6),.batch-order-list th:nth-child(7){width:180px}.batch-order-list th:last-child{width:auto}.batch-order-list th{white-space:normal}

.batch-order-list table{min-width:1490px}

.batch-order-list:not(.shipment-list-table) th:nth-child(6),.batch-order-list th:nth-child(7){width:150px}

.batch-order-list:not(.shipment-list-table) th:nth-child(6),.batch-order-list th:nth-child(7){width:130px}
.batch-order-list table{min-width:1335px}.batch-order-list th:last-child{width:85px}
.batch-order-list:not(.shipment-list-table) table{min-width:1505px}.batch-order-list:not(.shipment-list-table) th:nth-child(6){width:190px}.batch-order-list:not(.shipment-list-table) th:nth-child(7){width:240px}.batch-order-list .order-time-cell,.batch-order-list .order-edit-cell{text-align:left!important;line-height:1.8}.batch-order-list .order-time-cell>div>div,.batch-order-list .order-edit-cell>div>div{white-space:nowrap}
.batch-order-list:not(.shipment-list-table) table{min-width:1455px}.batch-order-list:not(.shipment-list-table) th:first-child,.batch-order-list:not(.shipment-list-table) .order-basic-cell{width:320px;min-width:320px}.batch-order-list:not(.shipment-list-table) th:nth-child(5){width:250px}.order-edit-time{display:grid!important;grid-template-columns:max-content 1fr;align-items:start}.order-edit-time>span:last-child{text-align:left;line-height:1.45}
.batch-order-list .order-actions-cell,.batch-order-list th:last-child{position:sticky;right:0;z-index:3;background:#fff;box-shadow:-1px 0 0 #d9dee7}.batch-order-list th:last-child{background:#eff2f6;z-index:4}

.batch-order-list .order-actions-cell [data-order-actions]{display:block}.batch-order-list .order-actions-cell button{display:block;margin:6px auto;white-space:nowrap}

.product-photo[draggable="true"]{cursor:grab}.product-photo[draggable="true"]:active{cursor:grabbing}

.order-list-table [data-size]>td:not([rowspan]){height:42px;padding-top:10px;padding-bottom:10px}
.order-list-table [data-size]>td:not([rowspan]):has(.receipt-total){padding-top:5px;padding-bottom:5px}

.size-row [data-remove-size]{padding:5px 9px;font-size:13px;line-height:normal;width:auto;height:auto;align-self:flex-start;white-space:nowrap}

.size-row [data-remove-size]{align-self:flex-end}

#measurements details{margin-bottom:20px}#measurements summary{margin-bottom:12px;cursor:pointer;font-weight:600}.measurement-table-wrap{overflow-x:auto}.measurement-table{width:100%;table-layout:fixed;border-collapse:collapse;white-space:normal}.measurement-table th,.measurement-table td{border:1px solid #cbd1dc;text-align:center;vertical-align:middle}.measurement-table th{background:#e8ebf0;color:#172b4d;font-weight:600;height:64px}.measurement-table th:first-child{width:34%}.measurement-table td{height:76px;padding:16px 24px;background:#fff}.measurement-table input{width:100%;min-width:0;padding:7px 10px;border:1px solid #d5dce8;border-radius:4px;background:#fff}.measurement-table td:first-child{overflow-wrap:anywhere}@media(max-width:600px){.measurement-table td{padding:12px}.measurement-table th:first-child{width:40%}}

#measurements{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}#measurements>h2{grid-column:1/-1;margin-bottom:0}#measurements>details{min-width:0;margin-bottom:0}#measurements .measurement-table th:first-child{width:38%}#measurements .measurement-table td{padding:12px}#measurements .measurement-table input{min-width:0}@media(max-width:850px){#measurements{grid-template-columns:minmax(0,1fr)}}

.search-clear-wrap{position:relative;display:block;min-width:0}.search-clear-wrap input{padding-right:32px}.search-clear-wrap .search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:18px;height:18px;padding:0;border:0;border-radius:50%;background:#b4bbc6;color:white;font-size:16px;line-height:18px;text-align:center;margin:0}.search-clear-wrap .search-clear:hover{background:#8491a3}.search-clear-wrap .search-clear[hidden]{display:none}

.filters button.search-action-button{height:40px;align-self:flex-end;white-space:nowrap;text-align:center}.filters button.search-action-button.primary{background:#2457c5;color:#fff;border-color:#2457c5}

.employee-tabs{display:flex;gap:8px;margin-bottom:16px}.employee-tabs button.active{background:#2457c5;color:#fff;border-color:#2457c5}.employee-table-wrap{overflow:auto}.employee-data-table{width:100%;min-width:1200px;border-collapse:collapse;table-layout:fixed}.employee-data-table th,.employee-data-table td,.employee-payroll-list th,.employee-payroll-list td,.payroll-form th,.payroll-form td{border:1px solid #d6deeb;text-align:center;vertical-align:middle}.employee-data-table th,.employee-payroll-list th,.payroll-form th{background:#f1f4f8;color:#40577a;font-weight:500}.employee-data-table thead tr:first-child th{height:54px}.employee-data-table thead tr:last-child th{height:42px}.employee-name-head{width:150px}.employee-basic-head{width:270px}.employee-base-salary-head{width:80px;white-space:nowrap;padding-left:2px;padding-right:2px}.employee-bonus-head,.employee-meal-head{width:80px;white-space:nowrap;padding-left:2px;padding-right:2px}.employee-emergency-head{width:200px}.employee-status-head{width:92px}.employee-system-head{width:120px}.employee-actions-head{width:110px}.employee-data-table td{height:118px;padding:16px 14px}.employee-name{font-size:16px}.employee-basic,.employee-emergency{text-align:left!important}.employee-basic div,.employee-emergency div{margin:7px 0}.employee-actions button{display:block;margin:6px auto;white-space:nowrap}.employee-payroll-list .tablewrap{margin-top:18px}.employee-payroll-list table{width:100%;border-collapse:collapse}.employee-payroll-list th{height:56px}.employee-payroll-list td{height:58px}.employee-resigned{color:#dc2626;font-weight:700}.payroll-dialog{width:min(1400px,96vw);max-height:90vh;border:0;border-radius:10px;padding:0}.payroll-dialog::backdrop{background:rgba(15,23,42,.45)}.payroll-form{margin:0;max-height:90vh;overflow:auto}.payroll-form .tablewrap{overflow:auto}.payroll-form table{min-width:1100px;border-collapse:collapse}.payroll-form th{height:52px}.payroll-form td{height:58px}.payroll-form td input{min-width:80px;width:100%}
.payroll-payable{font-size:18px;font-weight:700;color:#173f80}
.account-toolbar{display:flex;justify-content:flex-start;margin-bottom:16px}.account-table{width:100%;min-width:900px;border-collapse:collapse;table-layout:fixed}.account-table th,.account-table td{border:1px solid #d8e0ec;padding:16px 14px;vertical-align:middle}.account-table th{height:48px;background:#f3f5f8;color:#40577a;text-align:left;font-weight:500}.account-table th:nth-child(1){width:180px}.account-table th:nth-child(2){width:130px}.account-table th:nth-child(4){width:170px}.account-role{margin-top:7px;color:#64748b;font-size:13px}.account-status{display:inline-flex;align-items:center;gap:7px}.account-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#dc2626}.account-status.enabled::before{background:#10a36a}.account-permissions{color:#1769e0;line-height:1.8}.account-actions{text-align:left}.account-actions .link-button{display:block;margin:4px 0;padding:2px 0;border:0;background:none;color:#1769e0}.account-actions .danger-text{color:#dc2626}.account-dialog{width:min(900px,94vw);max-height:90vh;border:0;border-radius:10px;padding:0}.account-dialog::backdrop{background:rgba(15,23,42,.45)}.account-dialog-form{margin:0;max-height:90vh;overflow:auto}.account-dialog-form .permissions{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px 18px;margin-top:18px;padding:20px}.account-dialog-form .permissions label{display:flex;align-items:center;gap:8px}.account-dialog-form .permissions input{width:auto}@media(max-width:800px){.account-dialog-form .permissions{grid-template-columns:1fr}}
.permission-tree{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:18px;padding:20px}.permission-group{min-width:0}.permission-parent{display:flex;align-items:center;gap:8px;font-weight:700;color:#243b5a}.permission-children{display:grid;gap:10px;margin:12px 0 0 24px;padding-left:14px;border-left:2px solid #dce5f2}.permission-children label{display:flex;align-items:center;gap:8px}.permission-tree input{width:auto}.account-dialog-form .permission-tree{display:grid}.account-dialog-form .permission-group{display:block}@media(max-width:800px){.permission-tree{grid-template-columns:1fr}}

.order-sheet.normal-sheet .normal-quantities tbody td:nth-child(5),.order-sheet.normal-sheet .normal-quantities tbody td:last-child{font-weight:700}

.order-sheet.temu-jit-sheet .batch-quantities th:nth-last-child(2),.order-sheet.temu-jit-sheet .batch-quantities td:nth-last-child(2){width:170px;white-space:nowrap;overflow-wrap:normal;word-break:normal}

.employee-position-head{width:270px}.employee-data-table .employee-basic,.employee-data-table .employee-position{white-space:normal;overflow-wrap:anywhere}



.employee-data-table .employee-position{text-align:left}.employee-position div{margin:7px 0}

.employee-data-table{min-width:1600px}.employee-data-table .employee-gender-head{width:100px}.employee-data-table .employee-position-head{width:120px}.employee-data-table .employee-hire-head,.employee-data-table .employee-leave-head{width:120px}.employee-data-table .employee-salary-head{width:170px}.employee-data-table .employee-id-head{width:190px}.employee-data-table .employee-phone-head{width:130px}.employee-data-table .employee-address-head{width:220px}.employee-data-table .employee-emergency-head{width:180px}.employee-data-table td{padding-left:10px;padding-right:10px}.employee-data-table .employee-hire,.employee-data-table .employee-leave,.employee-data-table .employee-id,.employee-data-table .employee-phone{white-space:nowrap}.employee-data-table .employee-salary,.employee-data-table .employee-address{white-space:normal;overflow-wrap:anywhere;text-align:left}.employee-salary div{margin:7px 0}

.employee-data-table{min-width:1800px}.employee-data-table .employee-emergency-name-head{width:90px}.employee-data-table .employee-emergency-relation-head{width:80px}.employee-data-table .employee-emergency-phone-head{width:130px}.employee-data-table .employee-salary{padding-left:2px;padding-right:2px;white-space:normal;overflow-wrap:anywhere;text-align:center}.employee-data-table .employee-emergency-name,.employee-data-table .employee-emergency-relation{white-space:normal;overflow-wrap:anywhere}.employee-data-table .employee-emergency-phone{white-space:nowrap}

.employee-data-table th,.employee-data-table td:not(.employee-address){text-align:center!important}
