@import url('https://fonts.googleapis.com/css2?family=DM+Mono&family=Manrope:wght@400;500;600;700;800&display=swap');
html.erp-booting body>aside,html.erp-booting body>main{opacity:0;visibility:hidden}
html.erp-booting body::before{content:"THREADLINE";position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:#f7f8fb;color:#53617a;font:800 15px Manrope,"Microsoft YaHei",sans-serif;letter-spacing:2px}
html.erp-ready body>aside,html.erp-ready body>main{animation:erp-interface-ready .16s ease-out both}
@keyframes erp-interface-ready{from{opacity:0}to{opacity:1}}
.language-toggle{border:1px solid #dfe3eb;background:#fff;color:#505b72;padding:5px 8px;border-radius:6px;font:800 11px "DM Mono",monospace;cursor:pointer}
#ordersTable td{font-size:13px}#ordersTable td small{font-size:11px}
#inventory .stock-filters{margin-left:auto;display:flex;gap:4px;align-items:center}#inventory .toolbar .stock-filters select{margin-left:0}
.metric-stock-actions{display:inline-flex!important;gap:5px;margin-left:7px;vertical-align:middle}.metric-stock-actions .link{font-size:10px;text-transform:none}.metrics small b{font-size:10px;color:#657086}
#dashboard .dashboard-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}.dashboard-calendar-card{padding:0!important}.dashboard-calendar-shortcut{width:100%;height:100%;min-height:78px;border:0;border-radius:11px;background:transparent;padding:19px;text-align:left;display:flex;align-items:flex-start;gap:13px;color:#1d2433;font:inherit;cursor:pointer}.dashboard-calendar-shortcut:hover{background:#fafbff;box-shadow:inset 0 0 0 1px #d9e2fa}.dashboard-calendar-shortcut b{display:block;font-size:11px;color:#778196}.dashboard-calendar-shortcut small{display:block;margin-top:4px;font-size:10px;color:#9099a8}@media(max-width:900px){#dashboard .dashboard-metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){#dashboard .dashboard-metrics{grid-template-columns:1fr}}
.team-message-board{margin-top:21px;padding-top:18px;border-top:1px solid #e8ebf0}.team-message-list{max-height:235px;overflow:auto;border:1px solid #e7eaf0;border-radius:8px;background:#fafbfc;padding:0 12px}.team-message{padding:10px 0;border-bottom:1px solid #e9edf2}.team-message:last-child{border-bottom:0}.team-message b{font-size:12px;color:#344054}.team-message time{margin-left:7px;color:#98a2b3;font-size:10px}.team-message p{margin:4px 0 0;color:#556176;font-size:12px;line-height:1.5;white-space:pre-wrap}.team-message-empty{margin:0;padding:20px 4px;color:#8b96a6;font-size:12px;text-align:center}.team-message-form{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:8px;margin-top:10px}.team-message-form input{min-width:0;border:1px solid #dfe3eb;border-radius:7px;padding:10px;font:12px inherit;color:#2d384e}.team-message-form .primary{white-space:nowrap}#dashboard>.title-row{align-items:stretch;gap:18px}#dashboard>.title-row>div:first-child{flex:1;align-self:center}.dashboard-top-message-board{flex:0 1 520px;width:min(520px,43vw);margin:0;padding:12px 14px;border-top:0;align-self:stretch}.dashboard-top-message-board .card-title{margin-bottom:7px}.dashboard-top-message-board .card-title p,.dashboard-top-message-board>small{display:none}.dashboard-top-message-board .team-message-list{max-height:164px;padding:0 9px}.dashboard-top-message-board .team-message{min-height:0;padding:5px 0}.dashboard-top-message-board .team-message p{margin-top:2px;line-height:1.3}.dashboard-top-message-board .team-message-form{grid-template-columns:82px minmax(0,1fr) auto;gap:5px;margin-top:6px}.dashboard-top-message-board .team-message-form input{padding:7px}.dashboard-top-message-board .team-message-form .primary{padding:8px 10px}@media(max-width:900px){#dashboard>.title-row{flex-wrap:wrap}.dashboard-top-message-board{order:3;flex-basis:100%;width:100%}}@media(max-width:700px){.team-message-form{grid-template-columns:1fr}.team-message-form .primary{justify-self:end}.dashboard-top-message-board .team-message-form{grid-template-columns:1fr}.dashboard-top-message-board .team-message-form .primary{justify-self:end}}
.purchase-quick-nav{grid-template-columns:repeat(3,minmax(210px,1fr))!important;overflow-x:auto;padding-bottom:2px}@media(max-width:900px){.purchase-quick-nav{grid-template-columns:repeat(3,minmax(210px,1fr))!important}}
#inventory .metrics .metric-icon[data-stock-category],#inventory .metrics .metric-icon[data-open-finished-stock]{cursor:pointer;transition:transform .15s,box-shadow .15s}#inventory .metrics .metric-icon[data-stock-category]:hover,#inventory .metrics .metric-icon[data-open-finished-stock]:hover{transform:translateY(-2px);box-shadow:0 4px 10px #25314a22}
.style-quick-nav{display:grid;grid-template-columns:repeat(2,1fr);gap:17px;margin:-8px 0 20px}.style-quick-card{background:#fff;border:1px solid #ebedf2;border-radius:11px;padding:17px;text-align:left;display:flex;align-items:center;gap:13px;color:#273248;cursor:pointer;font:inherit;transition:transform .15s,box-shadow .15s}.style-quick-card:hover{transform:translateY(-2px);box-shadow:0 5px 14px #25314a17}.style-quick-card b{display:block;font-size:13px}.style-quick-card small{display:block;color:#7c8799;font-size:11px;margin-top:4px}@media(max-width:900px){.style-quick-nav{grid-template-columns:1fr}}.cost-quick-nav{grid-template-columns:minmax(280px,420px)}
.stock-receipt-choice{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stock-receipt-choice .secondary{padding:18px 10px;font-size:13px}#stockReceiptChoiceDialog{width:min(760px,94vw)}@media(max-width:760px){.stock-receipt-choice{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.stock-receipt-choice{grid-template-columns:1fr}}
#productionQuickNav{grid-template-columns:1fr;max-width:420px}
.style-client-toolbar{align-items:center}.style-client-toolbar .muted{margin-right:auto}.style-client-toolbar details{position:relative}.style-client-toolbar summary{cursor:pointer;list-style:none;border:1px solid #dfe3eb;border-radius:7px;padding:9px 12px;font-size:12px;color:#2d384e;background:#fff}.style-client-toolbar summary:after{content:" ▾"}.style-client-menu{position:absolute;right:0;top:42px;z-index:20;width:270px;max-height:310px;overflow:auto;padding:10px;background:#fff;border:1px solid #dfe3eb;border-radius:9px;box-shadow:0 10px 30px #25314a22;display:grid;gap:7px}.style-client-menu .secondary{text-align:left;padding:8px 10px}.style-client-add{display:flex;gap:6px;border-top:1px solid #edf0f4;padding-top:9px}.style-client-add input{min-width:0;flex:1;border:1px solid #dfe3eb;border-radius:6px;padding:8px;font:12px inherit}.style-client-add .primary{padding:8px 10px;white-space:nowrap}
.style-table-photo-wrap{display:flex;align-items:center;gap:10px}.style-table-photo,.style-table-photo-empty{width:52px;height:52px;border-radius:7px;object-fit:cover;flex:none}.style-table-photo{border:1px solid #dfe3eb}.style-table-photo-empty{display:grid;place-items:center;background:#f1f3f6;color:#8792a3;font-size:10px;border:1px dashed #bcc5d2}.style-table-photo-wrap small{display:block;margin-top:3px}
#stylesContent th,#stylesContent td{padding:10px 14px}#stylesContent .style-table-photo,#stylesContent .style-table-photo-empty{width:42px;height:42px}#stylesContent .style-table-photo-wrap{gap:8px}#stylesContent .style-action-icon{width:38px;height:38px;font-size:20px!important}
#packingListDialog,#packingReceiptDialog{width:min(1180px,96vw);max-height:94vh}#packingListDialog form,#packingReceiptDialog form{min-width:0!important;max-height:94vh;overflow:auto;padding:30px 34px}#packingListDialog #packingLines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#packingListDialog .packing-line{margin:0!important;height:100%}@media(max-width:760px){#packingListDialog,#packingReceiptDialog{width:96vw}#packingListDialog form,#packingReceiptDialog form{padding:20px}#packingListDialog #packingLines{grid-template-columns:1fr}}
#productionMaterialsDialog{width:min(1520px,98vw);max-height:95vh}#productionMaterialsDialog form{min-width:0!important;max-height:95vh;overflow:auto;padding:30px 34px}#productionMaterialsDialog .table-card{overflow:auto}@media(max-width:760px){#productionMaterialsDialog{width:98vw}#productionMaterialsDialog form{padding:20px}}
#stockHistoryDialog{width:min(1180px,96vw);max-height:92vh}#stockHistoryDialog form{min-width:0!important;max-height:92vh;overflow:auto;padding:30px 34px}#stockHistoryDialog table{min-width:860px}@media(max-width:760px){#stockHistoryDialog{width:98vw}#stockHistoryDialog form{padding:20px}}
*{box-sizing:border-box}body{margin:0;background:#f7f8fb;color:#1d2433;font-family:Manrope,"Microsoft YaHei",sans-serif;font-size:14px}.sidebar{position:fixed;width:248px;inset:0 auto 0 0;background:#172033;color:#c7cedc;padding:26px 14px;display:flex;flex-direction:column}.brand{font-size:16px;font-weight:800;letter-spacing:1.4px;color:#fff;padding:0 10px 28px;display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;background:#7c77ef;border-radius:7px;width:25px;height:25px;font-family:Georgia;font-size:18px}.workspace{background:#242e43;border:1px solid #303c54;padding:10px;border-radius:9px;display:flex;align-items:center;gap:9px;color:#fff;font-weight:600;margin-bottom:28px}.avatar{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:#efc295;color:#5f351d;font-weight:800}.chev{margin-left:auto;color:#8f99aa}.nav-label{font-size:10px;letter-spacing:1.1px;margin:18px 12px 7px;color:#728099;font-weight:700}.nav-item{border:0;background:transparent;color:#bec7d7;width:100%;text-align:left;padding:10px 12px;margin:2px 0;border-radius:7px;font:600 13px inherit;cursor:pointer;display:flex;align-items:center;gap:12px}.nav-item span{font-size:17px;width:16px;text-align:center;color:#a5b0c5}.nav-item b{margin-left:auto;background:#33405a;padding:1px 7px;border-radius:9px;font-size:10px}.nav-item:hover,.nav-item.active{background:#2b3650;color:#fff}.nav-item.active span{color:#9d99ff}.sidebar-foot{border-top:1px solid #2b364c;margin-top:auto;padding:17px 8px 0;display:flex;align-items:center;gap:9px;color:#fff;font-size:12px}.sidebar-foot small{color:#8793a7}.small{width:29px;height:29px;background:#b3d4cf;color:#234941}main{margin-left:248px;min-height:100vh}header{height:66px;background:#fff;border-bottom:1px solid #e9ebf0;padding:0 42px;display:flex;align-items:center;justify-content:space-between;font-weight:700}.header-actions{display:flex;gap:12px;align-items:center}.icon-btn,.help,.dots{border:0;background:transparent;font-size:19px;cursor:pointer;color:#667085}.help{border:1px solid #dce1e9;width:25px;height:25px;border-radius:50%;font-size:14px}.notice{position:relative}.notice:after{content:"";position:absolute;width:6px;height:6px;background:#ef6c61;border-radius:50%;top:1px;right:1px}.page{display:none;padding:38px 42px 56px;max-width:1450px;margin:auto}.page.active{display:block}.title-row{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:29px}.eyebrow{text-transform:uppercase;color:#758096;font-size:11px;letter-spacing:.8px;font-weight:700;margin:0 0 7px}h1{font-size:27px;letter-spacing:-.8px;margin:0 0 7px;color:#182134}h2{font-size:15px;margin:0;color:#263044}.muted,.card-title p{color:#8690a2;margin:0;font-size:12px}.primary,.secondary{border:0;border-radius:7px;padding:11px 16px;font:700 12px inherit;cursor:pointer}.primary{background:#625de8;color:#fff;box-shadow:0 4px 9px #625de832}.primary:hover{background:#524ccc}.secondary{background:#f0f2f6;color:#47536a}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:20px}.metrics article,.card{background:#fff;border:1px solid #ebedf2;border-radius:11px}.metrics article{padding:19px;display:flex;gap:13px;align-items:flex-start}.metric-icon{width:37px;height:37px;border-radius:9px;display:grid;place-items:center;font-size:19px;font-weight:700}.blue{background:#e7efff;color:#4d7de7}.amber{background:#fff3de;color:#e99c2d}.violet{background:#f0eaff;color:#8e67d7}.green{background:#e5f7ee;color:#42a879}.metrics span{display:block;color:#778196;font-size:11px;font-weight:600}.metrics strong{display:block;font-size:22px;letter-spacing:-.5px;margin:1px 0}.metrics small{font-size:10px;color:#9099a8}.up{color:#25a275!important}.warn{color:#df8c23!important}.grid{display:grid;gap:20px;margin-bottom:20px}.two-one{grid-template-columns:1.65fr 1fr}.card{padding:20px}.card-title{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.link{border:0;background:none;color:#625de8;font:700 11px inherit;cursor:pointer}.order-list{border-top:1px solid #edf0f4}.order-row{padding:13px 0;display:grid;grid-template-columns:1.4fr 1fr .8fr 1.8fr .8fr;align-items:center;gap:10px;border-bottom:1px solid #edf0f4}.order-row b{font-family:"DM Mono",monospace;font-size:11px}.order-row small{color:#7e899b;font-size:10px;display:block}.progress{height:6px;background:#eef0f5;border-radius:10px;overflow:hidden;margin-top:5px}.progress i{height:100%;display:block;border-radius:10px;background:#6e69eb}.tag{font-size:10px;font-weight:700;padding:4px 8px;border-radius:10px;text-align:center;white-space:nowrap}.tag.blue{color:#3973cf;background:#eaf2ff}.tag.orange{color:#bf791d;background:#fff0da}.tag.green{color:#25855b;background:#e3f6eb}.task{display:flex;gap:10px;align-items:start;padding:12px 0;border-bottom:1px solid #edf0f4}.check{width:18px;height:18px;border:1.5px solid #cdd3df;border-radius:5px;cursor:pointer;flex:none}.task.done .check{background:#6d69e7;border-color:#6d69e7}.task.done .check:after{content:"✓";display:block;text-align:center;color:white;font-size:12px}.task.done .task-copy{text-decoration:line-through;color:#a4abba}.task-copy{font-size:12px;font-weight:600;line-height:18px}.task-copy small{display:block;color:#8994a6;font-weight:400}.add-task{margin-top:13px;background:none;border:0;color:#625de8;font:700 12px inherit;cursor:pointer}.schedule{padding-bottom:25px}.timeline{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid #edf0f4;padding-top:16px;min-height:104px}.day{border-left:1px solid #edf0f4;padding:0 10px;position:relative;color:#7f899a;min-height:84px}.day:first-child{border:0}.day b{display:block;color:#2b3445;font-size:14px}.day span{font-size:10px}.today b{background:#625de8;color:#fff;width:23px;height:23px;display:grid;place-items:center;border-radius:50%;margin:-4px 0 2px}.event{position:absolute;left:8px;right:5px;top:48px;padding:4px 5px;border-radius:4px;font-style:normal;font-size:9px;font-weight:700;white-space:nowrap}.event.purple{background:#eeeaff;color:#6f57bd}.event.orange{background:#fff0da;color:#b57622}.event.blue{background:#e5efff;color:#4375cf}.event.green{background:#e0f5ea;color:#31855c}.table-card{padding:0;overflow:hidden}.toolbar{padding:17px;display:flex;gap:10px;border-bottom:1px solid #edf0f4}.toolbar input,.toolbar select,dialog input{border:1px solid #dfe3eb;border-radius:7px;padding:10px;font:12px inherit;color:#2d384e}.toolbar input{width:320px}.toolbar select{margin-left:auto;background:#fff}table{width:100%;border-collapse:collapse;text-align:left}th{background:#fafbfc;color:#758096;font-size:10px;text-transform:uppercase;letter-spacing:.5px}th,td{padding:14px 17px;border-bottom:1px solid #edf0f4}td{font-size:12px;color:#465166}td:first-child{font-family:"DM Mono",monospace;color:#343c52;font-weight:700}.empty{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.empty-art{font-size:36px;color:#817bea;background:#f0efff;width:68px;height:68px;border-radius:17px;display:grid;place-items:center;margin-bottom:15px}.empty h2{font-size:16px}.empty p{color:#808b9d;max-width:410px;font-size:12px;line-height:1.7;margin:8px 0 15px}dialog{width:430px;border:0;border-radius:14px;padding:0;box-shadow:0 18px 60px #17203355}dialog::backdrop{background:#17203388}dialog form{padding:24px;display:grid;gap:14px}dialog label{font-size:11px;font-weight:700;color:#4d5870;display:grid;gap:6px}dialog input{width:100%}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.dialog-head h2{font-size:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.mobile-menu{display:none}@media(max-width:900px){.sidebar{width:64px;padding:20px 8px}.brand span:last-child,.workspace span:not(.avatar),.nav-item:not(.active){font-size:0}.workspace{padding:8px;justify-content:center}.nav-item{justify-content:center;padding:11px}.nav-label,.sidebar-foot span:not(.avatar){display:none}.sidebar-foot{justify-content:center}.sidebar-foot .avatar{display:grid}main{margin-left:64px}.page,header{padding-left:25px;padding-right:25px}.metrics{grid-template-columns:repeat(2,1fr)}.two-one{grid-template-columns:1fr}}@media(max-width:600px){.page{padding:25px 16px}.title-row{align-items:start;gap:15px}.title-row .primary{white-space:nowrap}.metrics{grid-template-columns:1fr}.two-one{display:block}.two-one .card{margin-bottom:16px}.timeline{overflow:auto;grid-template-columns:repeat(7,90px)}.toolbar input{width:100%}.toolbar select{display:none}.table-card{overflow:auto}.header-actions{display:none}}
/* Editable carton rows in the final shipment form. */
.packing-list-table .table-cell-input{width:100%;min-width:52px;border:0;background:transparent;padding:6px 4px;text-align:center;font:inherit;color:inherit;outline:0}
.packing-list-table .table-cell-input:focus{background:#fff;border-radius:5px;box-shadow:0 0 0 2px rgba(94,78,230,.2)}
.packing-carton-tools{display:flex;align-items:center;gap:14px;margin-top:12px}.packing-carton-tools .muted{margin:0}.packing-carton-tools .secondary{white-space:nowrap}
#stockForm label:has(input[name="used"]),#stockForm label:has(input[name="minimum"]){display:none!important}
dialog [hidden]{display:none!important}
#stockForm label:has(select[name="unit"]),#stockForm label:has(input[name="trimCategory"]){display:grid!important}
select[name="unit"],input[name="unit"]{text-transform:uppercase}
.purchase-need-alert{display:grid;gap:5px;margin:14px 0 4px;padding:13px 15px;border:1px solid;border-radius:12px;font-size:14px;line-height:1.45}
.purchase-need-alert b{font-size:15px}.purchase-need-alert span{color:#53627a}.purchase-need-alert strong{font-weight:700}
.purchase-need-alert.short,.purchase-need-alert.over{background:#fff3f1;border-color:#ef9a8d;color:#a73528}
.purchase-need-alert.short span,.purchase-need-alert.over span{color:#7e4a43}
.purchase-need-alert.ok{background:#edf9f2;border-color:#83c9a1;color:#147448}
.purchase-need-alert.info{background:#f3f6fb;border-color:#cbd5e3;color:#42536d}
.purchase-history-check{display:inline-flex;align-items:center;padding:6px 9px;border:1px solid;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.purchase-history-check.over,.purchase-history-check.short{background:#fff0ed;border-color:#e58b7d;color:#a73528}
.purchase-history-check.ok{background:#eaf8f0;border-color:#82c69e;color:#137247}
.completed-trim-review{display:block;margin-top:8px;padding:7px 10px;font-size:12px;white-space:nowrap}
#patternSheetDialog,#patternSheetViewDialog{width:min(1500px,98vw);max-width:98vw;max-height:95vh}#patternSheetDialog>form,#patternSheetViewDialog>form{width:100%;min-width:0;max-height:95vh;overflow:hidden;padding:24px;display:flex;flex-direction:column}.pattern-sheet-scroll{overflow:auto;min-height:0;padding-right:3px}.pattern-sheet-grid{min-width:1120px;border:1px solid #aeb8c8;border-collapse:collapse;background:#fff}.pattern-sheet-grid th,.pattern-sheet-grid td{border:1px solid #aeb8c8;padding:7px 8px;text-align:center;vertical-align:middle}.pattern-sheet-grid th{background:#edf2fa;color:#34435d;font-size:11px;letter-spacing:0;text-transform:none}.pattern-sheet-grid input,.pattern-sheet-grid select{width:100%;min-width:72px;border:0;border-radius:4px;background:transparent;padding:7px 6px;text-align:center;font:12px inherit;color:#243149}.pattern-sheet-grid input:focus,.pattern-sheet-grid select:focus{background:#f7f8ff;box-shadow:inset 0 0 0 2px #7773e8;outline:0}.pattern-sheet-basic th{width:118px}.pattern-sheet-basic td{text-align:left}.pattern-sheet-basic td input,.pattern-sheet-basic td select{text-align:left}.pattern-sheet-section{margin-top:15px;border:1px solid #cbd3df;border-radius:9px;overflow:hidden}.pattern-sheet-section-title{min-height:44px;padding:10px 13px;background:#f5f7fb;display:flex;align-items:center;justify-content:space-between;gap:12px}.pattern-sheet-section-title b{font-size:13px;color:#263650}.pattern-sheet-section-title span{display:block;margin-top:3px;color:#7a869a;font-size:11px}.pattern-size-table .pattern-plan-row th,.pattern-size-table .pattern-plan-row td{background:#fff8cf}.pattern-sheet-grid output{font-weight:800;color:#243c68}.pattern-layout-table td:first-child input{min-width:120px;text-align:left}.pattern-sheet-notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:13px}.pattern-sheet-notes label{font-size:11px;font-weight:700;color:#4d5870}.pattern-sheet-notes textarea{width:100%;margin-top:6px;border:1px solid #dce2eb;border-radius:7px;padding:10px;font:12px inherit;resize:vertical}.pattern-archive-card .toolbar select{margin-left:0}.pattern-archive-card .toolbar input{flex:1;max-width:430px}.pattern-archive-card table{min-width:1280px}.pattern-row-actions{display:flex;align-items:center;gap:7px}.pattern-detail-notes{padding:13px;background:#fff}.pattern-detail-notes p{margin:5px 0;color:#4a5870}.pattern-archive-card td small{display:block;margin-top:4px;color:#8490a3}@media(max-width:760px){#patternSheetDialog,#patternSheetViewDialog{width:98vw}.pattern-sheet-notes{grid-template-columns:1fr}#patternSheetDialog>form,#patternSheetViewDialog>form{padding:16px}}
/* Keep the short factory labels (工厂1 / 工厂2) on one line in narrow tables. */
.factory-name-nowrap {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* Purchasing: supplier-category routing and import-container loading board */
.import-container-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,420px);gap:14px;align-items:start;margin-top:12px}
#typedPackingCargoDialog{width:min(1040px,96vw);max-width:96vw;max-height:94vh}#typedPackingCargoDialog form{max-height:94vh;overflow:auto;padding:24px}.container-cargo-review-preview{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:12px;padding:12px 14px;border:1px solid #dce4ef;border-radius:11px;background:#f8faff}.container-cargo-review-preview>img,.container-cargo-review-preview>span{width:64px;height:64px;border-radius:9px;object-fit:contain;background:#fff}.container-cargo-review-preview>.import-cargo-type{display:grid;place-items:center;height:64px}.container-cargo-review-preview b,.container-cargo-review-preview small{display:block}.container-cargo-review-preview b{color:#17233d;font-size:16px}.container-cargo-review-preview small{margin-top:4px;color:#758198}.container-cargo-review-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.container-cargo-review-summary>div{min-width:0;padding:10px 12px;border:1px solid #dfe5ef;border-radius:9px;background:#fff}.container-cargo-review-summary small,.container-cargo-review-summary b{display:block}.container-cargo-review-summary small{color:#758198;font-size:10px}.container-cargo-review-summary b{margin-top:3px;overflow:hidden;color:#1f2c43;text-overflow:ellipsis;white-space:nowrap}.container-cargo-review-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:13px;border:1px solid #dce4ef;border-radius:11px;background:#f8faff}.container-cargo-review-fields label{display:grid;position:relative;gap:5px;min-width:0}.container-cargo-review-fields input,.container-cargo-review-fields select{width:100%;min-width:0}.container-cargo-review-fields label>small{position:absolute;right:9px;bottom:10px;color:#8792a5}@media(max-width:760px){.container-cargo-review-summary,.container-cargo-review-fields{grid-template-columns:1fr 1fr}}
.import-container-board>.card{min-height:1100px;padding:0;overflow:hidden}
.import-container-board .truck-panel-head{padding:15px 17px;border-bottom:1px solid #e7ebf2;background:#f8faff}
.import-container-board .truck-panel-head h2{margin:0;font-size:17px;color:#17233d}
.import-container-board .truck-panel-head p{margin:4px 0 0;color:#74809a;font-size:12px;line-height:1.45}
.import-cargo-list,.import-container-list{display:grid;align-content:start;gap:5px;padding:9px 12px;max-height:970px;overflow:auto}
.import-cargo-card{display:grid;grid-template-columns:56px minmax(0,1fr) 34px;gap:8px;align-items:center;min-height:54px;padding:7px 9px;border:1px solid #dfe5ef;border-radius:10px;background:#fff;cursor:grab}
.import-cargo-card:hover{border-color:#8e86f4;box-shadow:0 8px 22px rgba(71,61,167,.1)}
.import-cargo-type{display:grid;place-items:center;align-self:stretch;min-height:34px;padding:4px 6px;border-radius:8px;font-size:11px;font-weight:800;line-height:1.15;text-align:center;background:#e9f2ff;color:#245f9e}
.import-cargo-type.trim{background:#fff0dc;color:#9a5e08}
.import-cargo-card b,.import-cargo-card small,.import-cargo-card p{display:block;margin:0;color:#15213a}
.import-cargo-card small{margin-top:3px;color:#69758d;font-size:11px}
.import-cargo-card p{margin-top:5px;font-size:12px}
.import-cargo-add{width:34px;height:34px;padding:0;border:0;border-radius:9px;background:#5d55e7;color:#fff;font-size:18px;cursor:pointer}
.import-container-card{border:1px solid #dfe5ef;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .18s,box-shadow .18s}
.import-container-card:hover,.import-container-card:has(.import-container-main:focus-visible){border-color:#7067ef;box-shadow:0 8px 24px rgba(69,61,165,.11)}
.import-container-head{display:flex;align-items:flex-start;gap:8px;padding:12px 14px;background:#eef3ff}
.import-container-main{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:center;min-width:0;flex:1;padding:0;border:0;background:transparent;text-align:left;color:#17233d;cursor:pointer}
.import-container-state{display:flex;align-items:center;gap:7px;flex:none}
.import-container-delete{width:28px!important;height:28px!important;min-width:28px!important;padding:0!important;color:#b42318!important}
.import-container-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#e9eaff;color:#5c55df;font-size:21px}
.import-container-main b,.import-container-main small,.import-container-main em{display:block;font-style:normal}
.import-container-main b{font-size:16px}.import-container-main small{margin-top:3px;color:#66728a}.import-container-main em{margin-top:5px;color:#2d3850;font-size:12px;font-weight:650}
.import-container-lines{display:grid;gap:6px;min-height:82px;padding:9px;border-top:1px solid #e8ebf2}
.import-container-lines>span{display:grid;grid-template-columns:minmax(90px,.75fr) minmax(0,1.45fr) auto;align-items:center;gap:10px;padding:7px 9px;border-radius:8px;background:#f8fafc;color:#1f2b43}
.import-container-lines small{color:#66728a;overflow-wrap:anywhere}.import-container-lines em{color:#42506a;font-size:11px;font-style:normal;white-space:nowrap}.import-container-empty-cargo{display:grid;min-height:64px;place-items:center;border:1px dashed #d7ddeb;border-radius:9px;color:#8792a7;background:#fafbfe;text-align:center}
.import-container-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:9px;border-top:1px solid #e8ebf2}
.import-container-page-tools{display:flex;align-items:center;gap:8px}.import-container-history-button{width:44px!important;height:44px!important;min-width:44px!important;padding:0!important}.import-container-overview-search input{width:min(430px,100%)}
.import-container-history{padding:0!important;overflow:hidden}.import-container-history-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:10px;padding:12px}.import-container-card.history .import-container-lines{min-height:0}
#typedPurchaseOrderForm .purchase-supplier-field select{font-weight:650;color:#000}
@media(max-width:1000px){.import-container-board{grid-template-columns:1fr}.import-container-board>.card{min-height:620px}.import-cargo-list,.import-container-list{max-height:none}}

/* Shipment packing views and editors use the production packing-list baseline. */
#typedShipmentSourceDialog,#typedShipmentLoadDialog{width:min(1220px,96vw)!important;max-width:96vw!important;height:auto!important;max-height:94vh!important;overflow:hidden!important}
#typedShipmentSourceDialog>form,#typedShipmentLoadDialog>form{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;max-height:94vh!important;padding:28px 32px!important;overflow-x:hidden!important;overflow-y:auto!important}
#typedShipmentLoadDialog .shipment-editable-packing{width:100%;min-width:0;max-width:100%;overflow:hidden}
#typedShipmentLoadDialog .shipment-editable-packing-head{min-width:0;flex-wrap:wrap}
#typedShipmentSourceDialog .shipment-packing-wrap,#typedShipmentLoadDialog .shipment-packing-wrap{width:100%;min-width:0;max-width:100%;overflow-x:auto!important}
#typedShipmentSourceDialog .packing-list-table{width:100%!important;min-width:1000px!important;max-width:none!important;table-layout:fixed}
#typedShipmentSourceDialog .packing-list-table :is(th,td){height:auto!important;padding:3px 2px!important;font-size:9.5px!important;line-height:1.2!important;white-space:normal;overflow-wrap:anywhere}
#typedShipmentLoadDialog .shipment-editable-packing-table{width:100%!important;min-width:1000px!important;max-width:none!important;table-layout:fixed}
#typedShipmentLoadDialog .shipment-editable-packing-table :is(th,td){height:32px!important;padding:4px 2px!important;font-size:9.5px!important;line-height:1.2!important;white-space:normal;overflow-wrap:anywhere}
#typedShipmentLoadDialog .shipment-editable-packing-table :is(input,.table-cell-input){width:100%!important;min-width:0!important;height:28px;padding:2px 1px;font-size:9.5px!important;line-height:1.45!important}
#typedShipmentSourceDialog .packing-list-table tfoot th,#typedShipmentLoadDialog .shipment-editable-packing-table tfoot th{background:#e5e7eb!important;font-weight:800!important}
#typedShipmentLoadDialog .shipment-editable-packing-table :is(th,td):first-child{width:62px!important;min-width:0!important}
#typedShipmentLoadDialog .shipment-editable-packing-table :is(th,td):last-child{width:34px!important;min-width:0!important}
#typedShipmentLoadDialog .shipment-remove-carton{width:26px;height:26px;padding:0}
@media(max-width:760px){#typedShipmentSourceDialog,#typedShipmentLoadDialog{width:96vw!important;max-width:96vw!important}}

/* TypeScript-owned production line plan and daily output pages. */
#productionDailyOutputContent .daily-primary-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
#productionDailyOutputContent .daily-output-filters,#productionPlanBoard .production-plan-filter{margin-bottom:10px}
#productionDailyOutputContent .daily-output-combined-card,#productionPlanBoard .production-plan-month-card{padding:0;overflow:hidden}
#productionDailyOutputContent .daily-output-scroll,#productionPlanBoard .production-plan-month-scroll,.production-half-year-scroll{overflow:auto}
#productionDailyOutputContent .daily-output-table,#productionPlanBoard .production-plan-month-table,.production-half-year-table{border-collapse:collapse;width:max-content;min-width:100%}
#productionDailyOutputContent .daily-output-table th,#productionDailyOutputContent .daily-output-table td,#productionPlanBoard .production-plan-month-table th,#productionPlanBoard .production-plan-month-table td,.production-half-year-table th,.production-half-year-table td{border:1px solid #aeb7c4;padding:6px;text-align:center;white-space:nowrap}
#productionDailyOutputContent .daily-output-table thead th,#productionPlanBoard .production-plan-month-table thead th{position:sticky;top:0;z-index:12;background:#f2f4f7;color:#344054}
#productionDailyOutputContent .daily-output-table td input{width:62px;border:0;background:transparent;text-align:center}
#productionDailyOutputContent .daily-output-table :is(th,td):nth-child(n+6):not(:nth-last-child(-n+3)){width:58px;min-width:58px;max-width:58px;padding-left:2px;padding-right:2px}
#productionDailyOutputContent .daily-output-table td:nth-child(n+6):not(:nth-last-child(-n+3)) input{width:54px;min-width:0;padding-left:1px;padding-right:1px;appearance:textfield;font-variant-numeric:tabular-nums}
#productionDailyOutputContent .daily-output-table td:nth-child(n+6):not(:nth-last-child(-n+3)) input::-webkit-inner-spin-button,#productionDailyOutputContent .daily-output-table td:nth-child(n+6):not(:nth-last-child(-n+3)) input::-webkit-outer-spin-button{margin:0;appearance:none}
#productionDailyOutputContent .daily-order-cell{min-width:116px}
#productionDailyOutputContent .daily-order-identity{display:flex;align-items:center;gap:6px;min-height:28px}
#productionDailyOutputContent .daily-order-image,#productionDailyOutputContent .daily-order-image-empty{display:grid;place-items:center;width:28px;height:28px;min-width:28px;border:1px solid #d8e0eb;border-radius:5px;background:#fff;object-fit:contain;color:#858fa2;font-size:11px}
[data-open-factory-schedule],#productionPlanPage{display:none!important}
#productionDailyOutputContent .daily-order-cell,#productionDailyOutputContent .daily-output-table thead th:first-child,#productionPlanBoard .production-plan-order,#productionPlanBoard .production-plan-month-table thead th:first-child{position:sticky;left:0;z-index:18;min-width:max-content;background:#eef5ff;box-shadow:4px 0 7px rgba(31,49,77,.1)}
#productionDailyOutputContent .daily-output-table thead th:first-child{background:#f2f4f7}
#productionDailyOutputContent .daily-line-heading th,#productionPlanBoard .production-plan-line-heading th{position:sticky;left:0;z-index:17;text-align:left;background:#13d9d9;color:#101828;padding:8px 12px}
#productionDailyOutputContent .daily-line-heading-inner,#productionPlanBoard .production-plan-line-heading span{display:flex;align-items:center;gap:9px}
#productionDailyOutputContent .daily-line-heading-copy{display:inline-flex;align-items:center;font-weight:800}
#productionDailyOutputContent .daily-line-heading-copy small,#productionPlanBoard .production-plan-line-heading small{margin-left:8px;color:#63738e;font-weight:500}
#productionDailyOutputContent .daily-line-empty td,#productionPlanBoard .production-plan-empty td{text-align:left;color:#8792a5;background:#fafbfc}
#productionDailyOutputContent .daily-line-total th{background:#edf1f6;color:#334155}
#productionDailyOutputContent .daily-line-remove td{text-align:right;background:#f5f7fa;border-bottom:2px solid #d9e0ea}
.production-half-year-image{width:54px;height:54px;object-fit:contain;border-radius:8px;background:#f5f7fa}
.production-half-year-image-empty{display:grid;place-items:center;width:54px;height:54px;border-radius:8px;background:#f5f7fa;color:#667085}
#productionPlanSalesDialog,#dailyOutputAddDialog,#dailyLineDialog{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;width:min(760px,92vw);max-height:82vh;overflow:auto}
@media(max-width:900px){#productionDailyOutputContent .daily-primary-actions{justify-content:flex-start}}

/* Compact, consistent primary headers for all business modules. */
.page:not(#dashboard){padding-top:14px}
.page:not(#dashboard)>.title-row h1{
  font-size:18px;
}
.page:not(#dashboard)>.title-row .eyebrow{
  font-size:9px;
}
.page:not(#dashboard)>.title-row .muted{
  font-size:11px;
}
.page:not(#dashboard)>.title-row{
  margin-bottom:15px;
}
/* The active module already has a full title below. Hide the duplicated
   breadcrumb and use a shorter utility bar so the retained title moves up. */
header{
  height:70px;
  justify-content:flex-start;
  gap:14px;
}
#crumb{display:none!important}
header>div:first-child:has(#crumb){display:none}
.header-scripture{display:flex;align-items:center;gap:8px;min-width:0;max-width:min(520px,42vw);padding:8px 12px;border:1px solid #e5e8f0;border-radius:11px;background:linear-gradient(90deg,#f8f7ff,#fff);color:#344054;font-size:12px;font-weight:600;line-height:1.25;white-space:nowrap}.header-scripture q{min-width:0;overflow:hidden;font-weight:700;text-overflow:ellipsis}.header-scripture cite{flex:none;color:#667085;font-size:10px;font-style:normal}.header-scripture-mark{flex:none;color:#6558e8;font-size:14px}.header-presence{display:flex;align-items:center;padding-right:2px}.header-presence-avatar{position:relative;width:31px;height:31px;display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:#6558e8;color:#fff;font-size:12px;font-weight:800;line-height:1;box-shadow:0 0 0 1px #d5d9e4,0 3px 8px #34476726;cursor:default}.header-presence-avatar i{position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border:2px solid #fff;border-radius:50%;background:#1caf68}
.sidebar-avatar-menu-toggle{appearance:none;flex:0 0 29px;margin:0;padding:0;border:0;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}.sidebar-avatar-menu-toggle:hover,.sidebar-avatar-menu-toggle:focus-visible,.sidebar-avatar-menu-toggle[aria-expanded="true"]{transform:scale(1.08);box-shadow:0 0 0 3px #ffffff2b;outline:0}
.threadline-account-dialog{height:min(760px,92vh)!important}.threadline-account-shell{height:100%!important;max-height:none!important}.threadline-account-panel{flex:1 1 auto!important}.threadline-delete-user-button{padding:9px 11px;border:1px solid #df6363;border-radius:8px;background:#c93636;color:#fff;font:750 11px Manrope,"Microsoft YaHei",sans-serif;white-space:nowrap;cursor:pointer}.threadline-delete-user-button:hover,.threadline-delete-user-button:focus-visible{background:#a92828;outline:2px solid #f5bcbc;outline-offset:1px}
.sidebar-current-user-photo,.header-user-photo,.threadline-user-card-photo,.threadline-user-profile-image,.threadline-account-avatar-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}.sidebar-avatar-menu-toggle{overflow:hidden}.header-presence{gap:4px;max-width:390px}.header-presence-avatar{appearance:none;flex:0 0 31px;padding:0;overflow:visible;cursor:pointer}.header-presence-avatar>span{display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border-radius:50%}.header-presence-avatar:hover,.header-presence-avatar:focus-visible{z-index:2;transform:translateY(-2px) scale(1.07);outline:0;box-shadow:0 0 0 2px #b9b5ff,0 6px 13px #34476733}.header-users-overflow{position:relative;display:inline-flex;flex:0 0 auto}.header-users-overflow-toggle{width:34px;height:31px;padding:0;border:1px solid #d5d9e4;border-radius:16px;background:#f3f2ff;color:#5851d1;font:800 10px Manrope,"Microsoft YaHei",sans-serif;cursor:pointer}.header-users-overflow-menu{position:absolute;top:36px;right:0;z-index:120;display:none;width:238px;max-height:330px;overflow:auto;padding:8px;border:1px solid #dfe3ed;border-radius:12px;background:#fff;box-shadow:0 16px 38px #17203335}.header-users-overflow:hover .header-users-overflow-menu,.header-users-overflow:focus-within .header-users-overflow-menu{display:grid;gap:4px}.header-users-overflow-menu>b{padding:7px 8px;color:#59667b;font-size:11px}.header-users-overflow-menu>button{display:flex;align-items:center;gap:9px;width:100%;padding:7px 8px;border:0;border-radius:8px;background:transparent;text-align:left;cursor:pointer}.header-users-overflow-menu>button:hover,.header-users-overflow-menu>button:focus-visible{background:#f2f4fa;outline:0}.header-user-mini-avatar{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;overflow:hidden;border-radius:50%;color:#fff;font-weight:800}.header-users-overflow-menu strong,.header-users-overflow-menu small{display:block}.header-users-overflow-menu strong{color:#28354b;font-size:11px}.header-users-overflow-menu small{margin-top:2px;color:#8490a4;font-size:9px}.threadline-user-profile-dialog{width:min(430px,94vw);border:0;border-radius:17px;padding:0;overflow:hidden;box-shadow:0 22px 70px #17203352}.threadline-user-profile-dialog::backdrop{background:#17203388}.threadline-user-profile-card{padding:24px}.threadline-user-profile-main{display:flex;align-items:center;gap:16px;margin:18px 0;padding:18px;border:1px solid #e2e6ef;border-radius:14px;background:#f8faff}.threadline-user-profile-photo{display:grid;place-items:center;flex:0 0 86px;width:86px;height:86px;overflow:hidden;border-radius:18px;color:#fff;font-size:30px;font-weight:850}.threadline-user-profile-copy>b,.threadline-user-profile-copy>span,.threadline-user-profile-copy>small{display:block}.threadline-user-profile-copy>b{color:#202b40;font-size:19px}.threadline-user-profile-copy>span{margin-top:5px;color:#5e6b82;font-size:12px;font-weight:750}.threadline-user-profile-copy>small{margin-top:7px;color:#15915a;font-size:10px}.threadline-user-profile-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.threadline-user-profile-facts>div{padding:11px;border-radius:10px;background:#f4f6fa}.threadline-user-profile-facts span,.threadline-user-profile-facts b{display:block}.threadline-user-profile-facts span{color:#8390a4;font-size:9px}.threadline-user-profile-facts b{margin-top:4px;color:#344158;font-size:11px;overflow-wrap:anywhere}.threadline-user-profile-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.threadline-user-profile-actions label,.threadline-user-profile-actions button{display:inline-flex!important;align-items:center;justify-content:center;margin:0;white-space:nowrap}.threadline-account-avatar-editor{display:grid;grid-template-columns:78px 1fr;align-items:center;gap:16px;margin-bottom:15px;padding:14px;border:1px solid #e2e7f0;border-radius:13px;background:#f8faff}.threadline-account-avatar-preview{display:grid;place-items:center;width:72px;height:72px;overflow:hidden;border-radius:16px;color:#fff;font-size:25px;font-weight:850}.threadline-account-avatar-editor b,.threadline-account-avatar-editor small{display:block}.threadline-account-avatar-editor small{margin:4px 0 10px;color:#7c889b;font-size:10px}.threadline-account-avatar-editor>div:last-child>div{display:flex;gap:8px}.threadline-avatar-upload-button{display:inline-flex!important;width:auto!important;cursor:pointer}.threadline-user-avatar{overflow:hidden;color:#fff!important}
.module-header-title{
  min-width:0;
  flex:1;
  display:grid;
  align-content:center;
  line-height:1.15;
}
.module-header-title[hidden]{display:none!important}
.module-header-title span{
  margin-bottom:3px;
  color:#758096;
  font-size:9px;
  font-weight:700;
  letter-spacing:.7px;
  text-transform:uppercase;
}
.module-header-title strong{
  overflow:hidden;
  color:#182134;
  font-size:18px;
  font-weight:800;
  letter-spacing:-.4px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.module-header-title small{
  margin-top:3px;
  overflow:hidden;
  color:#8690a2;
  font-size:10px;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.header-actions{margin-left:auto;flex:none}
@media(max-width:1100px){.header-scripture{max-width:300px}.header-scripture cite{display:none}}
@media(max-width:760px){.header-scripture{display:none}}
.page:not(#dashboard)>.title-row>div:first-child{display:none!important}
.page:not(#dashboard)>[data-style-subpage-content]>.title-row.module-title-in-header>div:first-child{display:none!important}
.page:not(#dashboard)>[data-finance-subpage-content]>.title-row.module-title-in-header>div:first-child{display:none!important}
.page:not(#dashboard)>.title-row.module-title-in-header{
  justify-content:flex-end;
  min-height:0;
  margin-bottom:12px;
}
.page:not(#dashboard)>[data-style-subpage-content]>.title-row.module-title-in-header{
  justify-content:flex-end;
  min-height:0;
  margin-bottom:12px;
}
.page:not(#dashboard)>[data-finance-subpage-content]>.title-row.module-title-in-header{
  justify-content:flex-end;
  min-height:0;
  margin-bottom:12px;
}
.page:not(#dashboard)>.title-row.header-only-title{display:none!important}
.page:not(#dashboard)>[data-style-subpage-content]>.title-row.header-only-title{display:none!important}
.page:not(#dashboard)>[data-finance-subpage-content]>.title-row.header-only-title{display:none!important}
.page:not(#dashboard)>.title-row{
  align-items:center;
  gap:18px;
}
.page:not(#dashboard)>.title-row>div:first-child{min-width:0}
.page:not(#dashboard)>.title-row .eyebrow{
  margin-bottom:4px;
  font-size:9px;
  line-height:1.2;
}
.page:not(#dashboard)>.title-row h1{
  margin-bottom:4px;
  line-height:1.18;
  letter-spacing:-.5px;
}
.page:not(#dashboard)>.title-row .muted{
  line-height:1.35;
}
@media(max-width:760px){
  .page:not(#dashboard){padding-top:14px}
  .page:not(#dashboard)>.title-row{align-items:flex-start;flex-wrap:wrap;margin-bottom:16px}
}

/* Keep the five dashboard summary cards typographically and visually aligned. */
#dashboard>.title-row>div:first-child{
  flex:0 0 185px!important;
  min-width:185px!important;
  min-height:88px;
  height:auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:visible;
}
#dashboard>.title-row>div:first-child h1{
  margin:0!important;
  font-size:20px!important;
  line-height:25px!important;
  letter-spacing:-.45px!important;
  white-space:normal;
  overflow-wrap:anywhere;
}
#dashboard>.title-row>div:first-child .eyebrow{
  margin:0 0 5px!important;
  font-size:9px!important;
  line-height:13px!important;
  white-space:nowrap;
}
#dashboard>.title-row>.dashboard-metrics article{
  align-items:flex-start!important;
  min-height:78px!important;
}
#dashboard>.title-row>.dashboard-metrics article:not(.dashboard-calendar-card):not(.dashboard-fabric-due-card):not(.dashboard-production-card){
  display:grid!important;
  grid-template-columns:37px minmax(0,1fr)!important;
  column-gap:9px!important;
}
#dashboard>.title-row>.dashboard-metrics .dashboard-calendar-shortcut,
#dashboard>.title-row>.dashboard-metrics .dashboard-fabric-due-card>button,
#dashboard>.title-row>.dashboard-metrics .dashboard-production-card>button{
  display:grid!important;
  grid-template-columns:37px minmax(0,1fr)!important;
  align-items:start!important;
  column-gap:9px!important;
  padding:11px!important;
  font:inherit!important;
}
#dashboard>.title-row>.dashboard-metrics .metric-icon{
  width:37px!important;
  height:37px!important;
  min-width:37px!important;
  margin:0!important;
  align-self:start!important;
  font-size:19px!important;
  line-height:1!important;
}
#dashboard>.title-row>.dashboard-metrics article>div:last-child>span,
#dashboard>.title-row>.dashboard-metrics article>div:last-child>b,
#dashboard>.title-row>.dashboard-metrics article button>span:last-child>b{
  display:block!important;
  min-height:28px!important;
  color:#667085!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:14px!important;
  letter-spacing:0!important;
}
#dashboard>.title-row>.dashboard-metrics article strong,
#dashboard>.title-row>.dashboard-metrics .dashboard-shipment-pnl-link strong{
  display:block!important;
  margin:1px 0!important;
  font-size:17px!important;
  line-height:21px!important;
  letter-spacing:-.3px!important;
}
html body #dashboard>.title-row>.dashboard-metrics .dashboard-shipment-pnl-link strong{
  font-size:17px!important;
}
#dashboard>.title-row>.dashboard-metrics article small,
#dashboard>.title-row>.dashboard-metrics article button>span:last-child>small{
  display:block!important;
  margin-top:2px!important;
  font-size:9px!important;
  line-height:12px!important;
  font-weight:500!important;
}

/* Sample room, cut sheet and pattern room use one consistent filter row. */
#sampleRoom .sample-room-unified-toolbar,
#sampleRoom .cut-sheet-archive > .toolbar,
#sampleRoom .pattern-archive-card > .toolbar {
  display: grid !important;
  grid-template-columns: minmax(200px, 280px) minmax(20px, 1fr) 170px 125px 125px !important;
  align-items: center;
  justify-content: start;
  gap: 10px !important;
  width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}
#sampleRoom .sample-room-unified-toolbar input,
#sampleRoom .cut-sheet-archive > .toolbar input,
#sampleRoom .pattern-archive-card > .toolbar input {
  min-width: 0;
  width: 100%;
  max-width: 280px;
}
#sampleRoom .sample-room-unified-toolbar select,
#sampleRoom .cut-sheet-archive > .toolbar select,
#sampleRoom .pattern-archive-card > .toolbar select {
  width: 125px;
  min-width: 125px;
  margin-left: 0;
}
#sampleRoom [data-sample-filter-season],
#sampleRoom [data-overview-filter-season],
#sampleRoom [data-cut-season],
#sampleRoom [data-pattern-season] {
  grid-column: 3;
  width: 170px !important;
  min-width: 170px !important;
}
#sampleRoom [data-sample-filter-year],
#sampleRoom [data-overview-filter-year],
#sampleRoom [data-cut-year],
#sampleRoom [data-pattern-year] {
  grid-column: 4;
}
#sampleRoom [data-sample-filter-month],
#sampleRoom [data-overview-filter-month],
#sampleRoom [data-cut-month],
#sampleRoom [data-pattern-month] {
  grid-column: 5;
}
@media (max-width: 720px) {
  #sampleRoom .sample-room-unified-toolbar,
  #sampleRoom .cut-sheet-archive > .toolbar,
  #sampleRoom .pattern-archive-card > .toolbar {
    grid-template-columns: 210px minmax(10px, 1fr) 170px 125px 125px !important;
    min-width: 680px;
  }
}

/* Compact development archives to the same visual density as warehouse rows. */
#sampleRoom .table-card:has([data-sample-filter-search]) th,
#sampleRoom .table-card:has([data-sample-filter-search]) td,
#sampleRoom .cut-sheet-archive th,
#sampleRoom .cut-sheet-archive td,
#sampleRoom .pattern-archive-card th,
#sampleRoom .pattern-archive-card td {
  padding: 9px 8px;
  line-height: 1.3;
  vertical-align: middle;
}
#sampleRoom .sample-archive-image-cell,
#sampleRoom .pattern-archive-image-cell {
  width: 54px;
  min-width: 54px;
  padding-left: 5px !important;
  padding-right: 5px !important;
}
#sampleRoom .sample-archive-image,
#sampleRoom .pattern-archive-image {
  width: 40px;
  height: 40px;
}
#sampleRoom .cut-sheet-archive .cut-spec-image-button {
  width: 40px;
  height: 40px;
  border-radius: 7px;
}
#sampleRoom .development-row-actions,
#sampleRoom .cut-sheet-actions,
#sampleRoom .pattern-row-actions {
  gap: 6px;
}
#sampleRoom .development-action-icon,
#sampleRoom .cut-sheet-actions .icon-btn,
#sampleRoom .pattern-row-actions .icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}
#sampleRoom .cut-sheet-archive,
#sampleRoom .pattern-archive-card {
  overflow: visible !important;
}
#sampleRoom .development-actions-cell,
#sampleRoom .development-row-actions,
#sampleRoom .development-action-icon {
  position: relative;
  overflow: visible !important;
}
#sampleRoom .development-actions-cell {
  z-index: 5;
}
#sampleRoom tr:hover .development-actions-cell,
#sampleRoom .development-action-icon:hover {
  z-index: 1000;
}
#sampleRoom .development-action-icon::after {
  z-index: 1001 !important;
}

/* Development archives share the finance pagination footer treatment. */
.erp-list-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 16px;box-sizing:border-box;border-top:1px solid #e3e7ef;background:#fafbfe;color:#6c778e;font-size:12px}
.erp-list-pagination>span{flex:0 1 auto;line-height:1.4}
.erp-list-pagination>div{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-left:auto;white-space:nowrap}
.erp-list-pagination button{min-height:34px;padding:6px 11px}
.erp-list-pagination button:disabled{opacity:.45;cursor:not-allowed}
.development-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 16px;box-sizing:border-box;border-top:1px solid #e3e7ef;background:#fafbfe;color:#6c778e;font-size:12px}
.development-pagination>span{flex:0 1 auto;line-height:1.4}
.development-pagination>div{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-left:auto;white-space:nowrap}
.development-pagination button{min-height:34px;padding:6px 11px}
.development-pagination button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:600px){
  .erp-list-pagination,
  .development-pagination{flex-wrap:wrap;align-items:flex-start;padding:11px 12px}
  .erp-list-pagination>span,
  .development-pagination>span{flex:1 1 180px}
  .erp-list-pagination>div,
  .development-pagination>div{flex:0 0 auto;max-width:100%;margin-left:auto}
}

/* Complete pattern/cut detail sheets and A4 printing. */
#patternIndependentView,
#cutSheetViewDialog {
  width: min(1540px, 98vw) !important;
  max-width: 98vw !important;
  max-height: 96vh !important;
}
#patternIndependentView .development-detail-sheet,
#cutSheetViewDialog .development-detail-sheet {
  width: 100%;
  max-height: 96vh;
  overflow: hidden;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.development-detail-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.development-detail-scroll {
  overflow: auto;
  min-height: 0;
}
.development-detail-grid {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: auto;
}
.development-detail-grid th,
.development-detail-grid td {
  border: 1px solid #9aa6b8 !important;
  padding: 7px !important;
  text-align: center;
  vertical-align: middle;
}
.development-detail-grid th {
  background: #edf2f8;
  color: #2e3a50;
  font-size: 11px;
}
.development-basic-table td {
  text-align: left;
}
.development-detail-image-cell {
  width: 230px !important;
  min-width: 230px;
  padding: 8px !important;
  text-align: center !important;
  background: #f6f8fb;
}
.development-detail-image,
.development-detail-image-empty {
  display: grid;
  place-items: center;
  width: 210px;
  height: 225px;
  margin: auto;
  object-fit: contain;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
  color: #8792a4;
}
.development-comments {
  min-height: 100px;
  padding: 12px;
  line-height: 1.55;
  white-space: normal;
}
.pattern-archive-image-cell {
  width: 72px;
  min-width: 72px;
  text-align: center !important;
}
.pattern-archive-image {
  display: block;
  width: 54px;
  height: 62px;
  margin: auto;
  object-fit: contain;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
}
.pattern-archive-image-empty {
  color: #98a2b3;
}
.development-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}
.development-actions-head,
.development-actions-cell {
  position: sticky !important;
  right: 0;
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  box-sizing: border-box;
  background: #fff !important;
  z-index: 4;
  box-shadow: -5px 0 10px rgba(39, 50, 74, .08);
}
.development-actions-head {
  z-index: 6;
  background: #f5f7fa !important;
}
.development-action-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d8dcef;
  border-radius: 11px;
  background: #f6f7fb;
  color: #46546c;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .17s ease, box-shadow .17s ease, background .17s ease;
}
.development-action-icon.view { color: #4d62df; background: #eef1ff; }
.development-action-icon.edit { color: #9a6500; background: #fff6e5; }
.development-action-icon.delete { color: #bd3b3b; background: #fff0f0; }
.development-action-icon:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 18px #34476726;
}
.development-action-icon.is-locked {
  color: #9aa3b2;
  background: #f1f3f6;
  border-color: #dfe3e9;
}
.development-action-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 30;
  width: max-content;
  padding: 7px 10px;
  border-radius: 7px;
  background: #27324a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: .15s;
  pointer-events: none;
}
.development-action-icon:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#sampleGarmentDialog {
  width: min(1050px, 96vw) !important;
  max-width: 96vw !important;
}
#sampleGarmentDialog .form-grid {
  align-items: start;
}
.sample-order-number-label {
  grid-column: 1;
}
.sample-order-preview {
  grid-column: 2;
  grid-row: span 4;
  min-height: 245px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #f6f8fb;
}
.sample-order-preview-image,
.sample-order-preview-empty {
  display: grid;
  place-items: center;
  width: 220px;
  height: 235px;
  object-fit: contain;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #8792a4;
  font-size: 12px;
}
.sample-archive-image-cell {
  width: 72px;
  min-width: 72px;
  text-align: center !important;
}
.sample-archive-image {
  display: block;
  width: 54px;
  height: 62px;
  margin: auto;
  object-fit: contain;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
}
.sample-archive-image-empty { color: #98a2b3; }
.development-overview-image-cell {
  width: 50px;
  min-width: 50px;
  padding-left: 7px !important;
  padding-right: 7px !important;
  text-align: center !important;
}
.development-overview-image {
  display: block;
  width: 36px;
  height: 36px;
  margin: auto;
  object-fit: cover;
  object-position: center;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #f4f6fa;
}
#sampleRoom .table-card:has(.development-overview-image-cell) th,
#sampleRoom .table-card:has(.development-overview-image-cell) td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}
#sampleRoom .table-card:has(.development-overview-image-cell) td b {
  font-size: 13px;
}
#sampleRoom .table-card:has(.development-overview-image-cell) td small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.sample-room-icons {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.sample-room-icons.sample-room-icons-top {
  margin-left: auto;
  flex-wrap: nowrap;
}
.sample-room-icons button {
  min-width: 188px;
  height: 47px;
  min-height: 47px;
  max-height: 47px;
  padding: 5px 11px;
  border: 1px solid #dfe5ef;
  border-radius: 15px;
  background: #fff;
  color: #263044;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  text-align: left;
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.sample-room-icons button:hover,
.sample-room-icons button:focus-visible {
  transform: translateY(-3px);
  border-color: #8e8aed;
  background: #fcfcff;
  box-shadow: 0 10px 24px rgba(98,93,232,.16);
  outline: none;
}
.sample-room-symbol {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eaf6ef;
  color: #16815a;
  font-size: 17px;
  transition: transform .18s ease,box-shadow .18s ease;
}
.sample-room-symbol.violet { background:#f0eaff;color:#8e67d7; }
.sample-room-symbol.green { background:#e7f6ef;color:#16815a; }
.sample-room-symbol.amber { background:#fff3de;color:#e99c2d; }
.sample-room-icons button:hover .sample-room-symbol,
.sample-room-icons button:focus-visible .sample-room-symbol { transform:scale(1.08);box-shadow:0 6px 14px rgba(56,65,92,.14); }
.sample-room-icons b { overflow:hidden;color:#263044;font-size:13px;line-height:1.15;text-overflow:ellipsis;white-space:nowrap; }
.sample-room-icons small { overflow:hidden;color:#7a8496;font-size:9px;line-height:1.15;text-overflow:ellipsis;white-space:nowrap; }
#sampleRoom [data-development-overview] tbody tr:not([data-overview-filter-empty]),
#sampleRoom .cut-sheet-archive tbody tr,
#sampleRoom .pattern-archive-card tbody tr,
#sampleRoom .table-card:has([data-sample-filter-search]) tbody tr {
  height:61px!important;
  min-height:61px!important;
  max-height:61px!important;
}
#sampleRoom [data-development-overview] tbody tr:not([data-overview-filter-empty])>td,
#sampleRoom .cut-sheet-archive tbody tr>td,
#sampleRoom .pattern-archive-card tbody tr>td,
#sampleRoom .table-card:has([data-sample-filter-search]) tbody tr>td {
  height:61px!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  box-sizing:border-box;
  vertical-align:middle;
}
#sampleRoom [data-development-overview] tbody td {
  white-space: nowrap;
}
#sampleRoom [data-development-overview] thead th:nth-child(2) {
  min-width: 50px;
  white-space: nowrap;
  word-break: keep-all;
}

/* Fabric/trim tracking rows are intentionally fixed to five compact slots per
   style.  Keep this scoped rule in the static sheet so late runtime styles or
   shared table-card rules cannot expand the rows again. */
#purchases .fabric-tracking-table tbody tr.fabric-track-data-row,
#purchases .fabric-tracking-table tbody tr.fabric-track-reserved-row {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
}
#purchases .fabric-tracking-table tbody tr.fabric-track-data-row > td,
#purchases .fabric-tracking-table tbody tr.fabric-track-reserved-row > td {
  height: 32px !important;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  line-height: 1.1 !important;
  box-sizing: border-box !important;
}
#purchases .fabric-tracking-table .fabric-track-style-cell > .schedule-style-side {
  height: 160px !important;
  min-height: 160px !important;
  max-height: 160px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#purchases .fabric-tracking-table .fabric-track-order b {
  font-size: 11px !important;
  line-height: 12px !important;
}
#purchases .fabric-tracking-table .fabric-track-order small {
  font-size: 9px !important;
  line-height: 10px !important;
}
.sample-order-thumb {
  display:block;
  width:40px;
  height:40px;
  max-width:40px;
  max-height:40px;
  margin:auto;
  border:1px solid #dce3ed;
  border-radius:8px;
  background:#f4f6fa;
  object-fit:contain;
  object-position:center;
}
.production-history-icon{width:38px;height:38px;min-width:38px;padding:0;border:1px solid #c9c7ff;border-radius:10px;background:#f0efff;color:#5148dc;font-size:19px;font-weight:800;cursor:pointer;display:grid;place-items:center}.production-history-icon:hover,.production-history-icon.active{background:#6258e8;color:#fff;border-color:#6258e8}.production-history-inline{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid #dcdcff;border-radius:10px;background:#f7f7ff}.production-history-inline strong{color:#27324a;font-size:14px}.production-history-inline>span{margin-right:auto;color:#75809a;font-size:12px}.production-history-inline label{display:flex;align-items:center;gap:6px;color:#667085;font-size:11px;font-weight:700}.production-history-inline select{min-width:128px;height:34px;padding:4px 28px 4px 9px}
@media(max-width:1180px){
  #sampleRoom .title-row{align-items:flex-start;flex-wrap:wrap}
  .sample-room-icons.sample-room-icons-top{width:100%;margin-left:0;overflow-x:auto}
}
@media(max-width:700px){
  .sample-room-icons{display:grid;grid-template-columns:1fr}
  .sample-room-icons button{min-width:0}
}
.destination-address-locked {
  color: #667085;
  background: #f2f4f7 !important;
  cursor: not-allowed;
}
#sampleRecordDetailDialog,
#sampleRecordEditDialog {
  width: min(1050px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
}
#sampleRecordDetailDialog form,
#sampleRecordEditDialog form {
  max-height: 94vh;
  overflow: auto;
  padding: 28px 32px;
  box-sizing: border-box;
}
.sample-record-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 22px;
  align-items: start;
}
.sample-record-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #d8dee8;
  border-radius: 10px;
  overflow: hidden;
}
.sample-record-detail-grid > div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 11px 13px;
  border-right: 1px solid #e1e6ee;
  border-bottom: 1px solid #e1e6ee;
}
.sample-record-detail-grid b { color: #475467; font-size: 12px; }
.sample-record-detail-image,
.sample-record-detail-image-empty,
.sample-record-edit-image {
  display: grid;
  place-items: center;
  width: 220px;
  height: 245px;
  object-fit: contain;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #8792a4;
}
.sample-record-notes { margin-top: 16px; padding: 13px; border: 1px solid #d8dee8; border-radius: 9px; }
.sample-record-notes p { margin: 7px 0 0; }
.sample-record-edit-preview { grid-column: 2; grid-row: span 4; display: grid; place-items: center; }
.pattern-sheet-grid tfoot[data-pattern-layout-summary] th,
.pattern-sheet-grid tfoot[data-pattern-layout-summary] td {
  border: 1px solid #8d98a8;
  font-weight: 800;
  text-align: center;
}
.pattern-sheet-grid tfoot[data-pattern-layout-summary] tr:first-child th {
  padding: 8px;
  background: #f4f6f9;
  color: #1f2937;
  font-size: 14px;
}
.pattern-sheet-grid [data-pattern-layout-label] {
  min-width: 150px;
  background: #fff200 !important;
  color: #111827 !important;
  white-space: normal;
}
.pattern-sheet-grid [data-pattern-layout-percent] { color: #1f4f9a; }
.pattern-detail-notes p:first-child { display: none; }
@media (max-width: 720px) {
  .sample-record-detail-layout { grid-template-columns: 1fr; }
  .sample-record-detail-grid { grid-template-columns: 1fr; }
  .sample-record-edit-preview { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 720px) {
  .sample-order-preview {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
@media print {
  @page { size: A4 landscape; margin: 7mm; }
  body[data-print-development-detail] > * { display: none !important; }
  body[data-print-development-detail="pattern"] > #patternIndependentView,
  body[data-print-development-detail="cut"] > #cutSheetViewDialog {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body[data-print-development-detail] .development-detail-sheet {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body[data-print-development-detail] .development-detail-scroll {
    overflow: visible !important;
  }
  body[data-print-development-detail] .development-detail-grid {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 8px !important;
  }
  body[data-print-development-detail] .development-detail-grid th,
  body[data-print-development-detail] .development-detail-grid td {
    padding: 3px !important;
    font-size: 8px !important;
  }
  body[data-print-development-detail] .development-detail-head-actions,
  body[data-print-development-detail] .dialog-actions {
    display: none !important;
  }
  body[data-print-development-detail] .development-detail-head {
    margin-bottom: 4mm;
  }
  body[data-print-development-detail] .development-detail-head h2 {
    font-size: 15px !important;
    margin: 2px 0 !important;
  }
  body[data-print-development-detail] .development-detail-head .eyebrow {
    font-size: 8px !important;
  }
  body[data-print-development-detail] .development-detail-image,
  body[data-print-development-detail] .development-detail-image-empty {
    width: 34mm !important;
    height: 38mm !important;
  }
  body[data-print-development-detail] .development-detail-image-cell {
    width: 38mm !important;
    min-width: 38mm !important;
  }
  body[data-print-development-detail] .development-print-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-top: 2.5mm !important;
  }
  body[data-print-development-detail] .pattern-sheet-section-title,
  body[data-print-development-detail] .cut-sheet-section-title {
    padding: 3px 5px !important;
    font-size: 9px !important;
  }
  body[data-print-development-detail] .development-comments {
    min-height: 20mm;
    padding: 4px;
    font-size: 8px;
  }
}
/* Keep the compact fabric/trim inventory identifiers on one readable line. */
#inventory #stockTable tr > :nth-child(1),
#inventory #stockTable tr > :nth-child(5),
#inventory #stockTable tr > :nth-child(6),
#inventory #stockTable tr > :nth-child(7),
#inventory #stockTable tr > :nth-child(10),
#inventory #stockTable tr > :nth-child(11),
#inventory #stockTable tr > :nth-child(12),
#inventory table thead tr > :nth-child(1),
#inventory table thead tr > :nth-child(5),
#inventory table thead tr > :nth-child(6),
#inventory table thead tr > :nth-child(7),
#inventory table thead tr > :nth-child(10),
#inventory table thead tr > :nth-child(11),
#inventory table thead tr > :nth-child(12) {
  white-space: nowrap;
  word-break: keep-all;
}
#inventory table tr > :nth-child(1) { min-width: 48px; }
#inventory table tr > :nth-child(5) { min-width: 72px; }
#inventory table tr > :nth-child(6) { min-width: 78px; }
#inventory table tr > :nth-child(7) { min-width: 92px; }
#inventory table tr > :nth-child(10) { min-width: 76px; }
#inventory table tr > :nth-child(11) { min-width: 72px; }
#inventory table tr > :nth-child(12) { min-width: 78px; }

/* Show the completed trim-purchase record at full working width. */
#completedPurchaseDialog.completed-trim-purchase-dialog {
  width: min(1460px, 97vw);
  max-width: 97vw;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
}
#completedPurchaseDialog.completed-trim-purchase-dialog > form {
  width: 100%;
  min-width: 0 !important;
  max-height: 94vh;
  overflow: auto;
  padding: 26px 30px;
}
#completedPurchaseDialog.completed-trim-purchase-dialog table {
  width: 100%;
  min-width: 1080px;
  table-layout: auto;
}
#completedPurchaseDialog.completed-trim-purchase-dialog th,
#completedPurchaseDialog.completed-trim-purchase-dialog td {
  white-space: nowrap;
}
#dashboard.page{padding-top:25px}
/* Desktop sidebar: reduce the original 248px width by 20%. */
@media (min-width:901px){
  .sidebar{width:198px}
  main{margin-left:198px}
}

/* Inventory table starts directly with its filters; the redundant heading is removed. */
#inventory > .card > .card-title{display:none}
#inventory > .card{padding-top:0}

/* Keep warehouse identifiers and receipt figures readable; overflow stays on the table card. */
#inventory .table-card{overflow-x:auto}
#inventory #stockTable{font-variant-numeric:tabular-nums}
#inventory .table-card table{width:100%;min-width:1180px;table-layout:fixed}
#inventory .table-card th,#inventory .table-card td{padding:11px 6px;font-size:11px;line-height:1.35;vertical-align:middle}
#inventory .table-card th{white-space:nowrap;letter-spacing:.2px}
#inventory .table-card td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#inventory .table-card th:nth-child(1),#inventory .table-card td:nth-child(1){width:58px}
#inventory .table-card th:nth-child(2),#inventory .table-card td:nth-child(2){width:168px;min-width:168px;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
#inventory .table-card th:nth-child(3),#inventory .table-card td:nth-child(3){width:92px;min-width:92px;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
#inventory .table-card th:nth-child(4),#inventory .table-card td:nth-child(4){width:56px}
#inventory .table-card th:nth-child(5),#inventory .table-card td:nth-child(5){width:138px;min-width:138px}
#inventory .table-card th:nth-child(6),#inventory .table-card td:nth-child(6){width:54px;min-width:54px;padding-left:1px;padding-right:1px}
#inventory .table-card th:nth-child(7),#inventory .table-card td:nth-child(7){width:66px;min-width:66px;padding-left:1px;padding-right:1px;text-align:center}
#inventory .table-card th:nth-child(8),#inventory .table-card td:nth-child(8){width:72px;min-width:72px;padding-left:2px;padding-right:2px;text-align:center}
#inventory .table-card th:nth-child(9),#inventory .table-card td:nth-child(9){width:44px;padding-left:2px;padding-right:2px;text-align:center}
#inventory .table-card th:nth-child(10),#inventory .table-card td:nth-child(10){width:60px;padding-left:4px;padding-right:4px;text-align:center}
#inventory .table-card th:nth-child(11),#inventory .table-card td:nth-child(11){width:72px;text-align:center}
#inventory .table-card th:nth-child(12),#inventory .table-card td:nth-child(12){width:78px;text-align:center}
#inventory .table-card th:nth-child(13),#inventory .table-card td:nth-child(13){width:82px;overflow:visible;text-align:center}
#inventory .table-card th:nth-child(14),#inventory .table-card td:nth-child(14){width:126px;min-width:126px;overflow:visible;text-align:center}
#inventory .table-card td small{display:block;margin-top:3px;font-size:10px}
.stock-admin-edit-dialog{width:min(920px,94vw);max-width:94vw}.stock-admin-edit-dialog form{width:100%;box-sizing:border-box}.stock-admin-edit-dialog textarea{resize:vertical}
.inventory-ts-card td:last-child{overflow:visible}.inventory-view-action{position:relative;overflow:visible!important}.inventory-action-count{position:absolute;top:-7px;right:-7px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:2px solid #fff;border-radius:10px;background:#625de8;color:#fff;font-size:9px;font-weight:800;line-height:1;box-sizing:border-box;box-shadow:0 2px 6px #34476735}

/* Authoritative TypeScript inventory workspace. */
#inventory[data-inventory-renderer="typescript-v1"]{padding-top:14px}
.inventory-ts-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.inventory-ts-head h1{margin:2px 0;font-size:24px}
.inventory-ts-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 118px;gap:12px;align-items:stretch;margin-bottom:14px}
.inventory-metric{position:relative;min-width:0;min-height:72px;padding:8px 10px;border:1px solid #e1e6ef;border-radius:12px;background:#fff;color:#344054;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.inventory-metric:hover,.inventory-metric:focus-within{transform:translateY(-3px);border-color:#bbb8f5;background:#fcfcff;box-shadow:0 10px 24px rgba(72,66,164,.14)}
.inventory-metric-main{width:100%;height:100%;border:0;background:transparent;padding:0;display:flex;align-items:center;gap:10px;text-align:left;color:inherit;cursor:pointer}
.inventory-metric-main>.metric-icon{flex:0 0 37px;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.inventory-metric:hover .inventory-metric-main>.metric-icon,.inventory-metric:focus-within .inventory-metric-main>.metric-icon{transform:translateY(-1px) scale(1.1);box-shadow:0 6px 14px rgba(72,66,164,.15);filter:saturate(1.08)}
.inventory-metric-copy{display:grid;min-width:0;gap:0;padding-right:42px}
.inventory-metric-copy b{overflow:hidden;font-size:11px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.inventory-metric strong{font-size:20px;line-height:1.15;color:#1f2a44;white-space:nowrap}
.inventory-metric small{overflow:hidden;color:#758198;font-size:9px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
.inventory-archive{position:absolute;right:8px;top:8px;z-index:1;width:29px;height:29px;padding:6px;border:1px solid #dddafe;border-radius:9px;background:#f6f5ff;color:#6259dc;display:grid;place-items:center;cursor:pointer;transition:background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease}
.inventory-archive svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.inventory-archive:hover,.inventory-archive:focus-visible{transform:translateY(-1px);background:#eae8ff;color:#4f46d8;box-shadow:0 4px 10px rgba(79,70,216,.18);outline:none}
.inventory-archive-banner{padding:8px 12px;margin:0;background:#f5f6ff;color:#4d4ac5}
.inventory-new{align-self:center;height:58px;min-width:118px;padding:0 12px;white-space:nowrap}
.inventory-ts-card{overflow:visible}.inventory-ts-card .toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}
.inventory-search{min-width:300px}.inventory-filter-group{display:flex;gap:7px;align-items:center}.inventory-filter-group select{width:auto;min-width:108px}.inventory-filter-group .inventory-sort{width:44px;min-width:44px;color:transparent;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M6 3v12m0 0-3-3m3 3 3-3M12 15V3m0 0-3 3m3-3 3 3' fill='none' stroke='%2358667d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat}.inventory-filter-group .inventory-sort option{color:#2d384e}
.inventory-table-wrap{overflow-x:auto}.inventory-table-wrap table{min-width:1240px}.inventory-table-wrap th,.inventory-table-wrap td{padding:10px 8px;vertical-align:middle}.inventory-table-wrap td small{display:block;margin-top:3px}
.inventory-table-wrap th:nth-child(4),.inventory-table-wrap td:nth-child(4){width:58px}.inventory-table-wrap th:nth-child(6),.inventory-table-wrap td:nth-child(6){width:90px}.inventory-table-wrap th:nth-child(7),.inventory-table-wrap td:nth-child(7){width:90px}
.inventory-table-wrap th:nth-child(8),.inventory-table-wrap td:nth-child(8),.inventory-table-wrap th:nth-child(9),.inventory-table-wrap td:nth-child(9){width:62px}
.inventory-finished-quantity-stack{display:grid;min-width:72px;gap:2px}.inventory-finished-quantity-stack>span{display:grid;grid-template-columns:minmax(30px,auto) minmax(0,1fr);align-items:center;gap:4px;min-height:18px}.inventory-finished-quantity-stack>span+span{padding-top:2px;border-top:1px solid #e2e7ef}.inventory-finished-quantity-stack small{margin:0!important;color:#65738b;font-size:9px!important;font-weight:700;line-height:1.1;white-space:nowrap}.inventory-finished-quantity-stack b{overflow:visible;color:#17243d;font-size:10.5px;line-height:1.1;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.inventory-finished-quantity-stack b i{margin-left:2px;color:#6c7890;font-size:8px;font-style:normal;font-weight:600}
.inventory-finished-count-stack{min-width:0}.inventory-finished-count-stack>span{display:flex;justify-content:center}.inventory-finished-count-stack b{text-align:center}
.inventory-table-wrap :is(th,td):nth-child(8),.inventory-table-wrap :is(th,td):nth-child(11),.inventory-table-wrap :is(th,td):nth-child(12){width:86px;min-width:86px}
.inventory-foot{margin:10px 2px}.stock-color-value{display:inline-flex;align-items:center;gap:6px}.stock-color-swatch{width:13px;height:13px;border:1px solid #aeb6c3;border-radius:3px}.inventory-colour-stack{display:inline-flex;flex-direction:column;align-items:flex-start;gap:5px}.inventory-colour-line{display:flex;min-height:16px;align-items:center;white-space:nowrap}
.inventory-receipt-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:14px 0 0}.inventory-receipt-choices button{min-height:54px;padding:14px 10px;text-align:center;border:0;border-radius:7px;background:#f0f2f6;color:#47536a;font:700 12px inherit}.inventory-receipt-choices button:hover{background:#e8ebf1}.inventory-receipt-choices small{color:#71809a}
#typedInventoryReceiptChooser{width:min(760px,94vw);max-width:94vw}#typedInventoryReceiptChooser form{padding:24px 26px}
#typedInventoryReceiptDialog{width:min(1040px,94vw);max-width:94vw;max-height:92vh}#typedInventoryReceiptDialog form{max-height:92vh;overflow:auto;padding:26px 30px}#typedInventoryReceiptDialog:has([data-inventory-receipt-category="equipment"]){width:min(900px,94vw)}#typedInventoryReceiptDialog textarea{width:100%;resize:vertical}.inventory-receipt-top{margin-bottom:14px}.inventory-receipt-material,.inventory-receipt-spec{margin:14px 0}.inventory-receipt-date{display:grid;max-width:50%;margin-top:14px}
#typedInventoryViewDialog{width:min(1280px,96vw);max-width:96vw;height:auto;max-height:92vh;padding:0;overflow:hidden;box-sizing:border-box}#typedInventoryViewDialog>.inventory-history-view{width:100%;max-height:92vh;overflow:auto;box-sizing:border-box;padding:26px 30px}#typedInventoryViewDialog .dialog-head{position:sticky;top:-26px;z-index:5;background:#fff;padding-top:26px}#typedInventoryViewDialog .inventory-view-summary{grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px}#typedInventoryViewDialog .packing-table-wrap{max-width:100%;overflow:auto}#typedInventoryViewDialog .packing-list-table{min-width:900px}@media(max-width:760px){#typedInventoryViewDialog{width:98vw;max-width:98vw;max-height:96vh}#typedInventoryViewDialog>.inventory-history-view{max-height:96vh;padding:18px}#typedInventoryViewDialog .dialog-head{top:-18px;padding-top:18px}#typedInventoryViewDialog .inventory-view-summary{grid-template-columns:1fr 1fr}}
#typedInventoryViewDialog .inventory-finished-packing-header{grid-template-columns:minmax(0,1fr) 170px;align-items:stretch;gap:10px;padding:8px}
#typedInventoryViewDialog .inventory-finished-packing-fields{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
#typedInventoryViewDialog .inventory-packing-summary-item{display:flex;min-width:0;min-height:39px;box-sizing:border-box;flex-direction:column;justify-content:center;gap:2px;padding:4px 8px;border:1px solid #d9dee7;border-radius:5px;background:#f8fafc;color:#26354f}
#typedInventoryViewDialog .inventory-packing-summary-item small{color:#6f7b90;font-size:10px;font-weight:700;line-height:1.2}
#typedInventoryViewDialog .inventory-packing-summary-item strong{overflow:hidden;font-size:12px;line-height:1.25;white-space:nowrap;text-overflow:ellipsis}
#typedInventoryViewDialog .inventory-packing-quantity span{display:flex;align-items:baseline;gap:4px;color:#59667a;font-size:10px;white-space:nowrap}
#typedInventoryViewDialog .inventory-packing-quantity span strong{color:#26354f;font-size:13px}
#typedInventoryViewDialog .inventory-packing-quantity span i{width:1px;height:13px;margin:0 3px;background:#cdd4df}
#typedInventoryViewDialog .inventory-packing-operator{grid-column:span 2}
#typedInventoryViewDialog .inventory-packing-style-image{display:flex;align-items:center;justify-content:center;height:83px;min-height:83px;max-height:83px;overflow:hidden;background:#f4f6fa;color:#8a95a8;font-size:11px;font-weight:700}
#typedInventoryViewDialog .inventory-packing-style-image img{width:100%;height:100%;object-fit:contain}
#typedInventoryViewDialog .inventory-packing-table-total th{padding:8px 10px;background:#eef1f5;color:#26354f;font-size:11px;font-weight:700;text-align:right}
#typedInventoryViewDialog .inventory-packing-table-total th b{font-size:13px}
#typedInventoryViewDialog .inventory-packing-carton-header{padding:0!important}.inventory-packing-carton-header>span{display:block}.inventory-packing-carton-mode{margin-bottom:5px;padding:4px 6px;border-bottom:1px solid #cbd5e1;background:#e9e7ff;color:#5148d8;font-size:10px;font-weight:800;line-height:1.2}.inventory-packing-carton-header>span:last-child{padding:0 5px 5px}
#typedInventoryViewDialog .inventory-packing-movements{margin-top:18px}
#typedInventoryViewDialog .inventory-packing-movements .packing-table-wrap{overflow-x:hidden}
#typedInventoryViewDialog .inventory-packing-movement-table{width:100%;min-width:0;max-width:100%;table-layout:fixed}
#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td){height:38px;padding:5px!important;line-height:1.3;text-align:center;white-space:normal;overflow-wrap:anywhere}
#typedInventoryViewDialog .inventory-packing-movement-table th{font-size:11px}
#typedInventoryViewDialog .inventory-packing-movement-table td{font-size:12px;color:#26354f}
#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td):nth-child(1){width:116px}
#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td):nth-child(2),#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td):nth-child(8){width:94px}
#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td):nth-child(3),#typedInventoryViewDialog .inventory-packing-movement-table :is(th,td):nth-child(9){width:108px}
#typedInventoryViewDialog .inventory-packing-movement-table tfoot th{background:#e7ebf1;color:#1f2e49;font-weight:800}
#typedInventoryViewDialog .inventory-packing-edit-history{margin-top:18px}
#typedInventoryViewDialog .inventory-packing-edit-history .packing-table-wrap{overflow-x:hidden}
#typedInventoryViewDialog .inventory-packing-edit-history-table{width:100%;min-width:0;max-width:100%;table-layout:fixed}
#typedInventoryViewDialog .inventory-packing-edit-history-table :is(th,td){height:38px;padding:6px 8px!important;font-size:12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
#typedInventoryViewDialog .inventory-packing-edit-history-table :is(th,td):nth-child(1){width:170px}
#typedInventoryViewDialog .inventory-packing-edit-history-table :is(th,td):nth-child(3){width:130px}
#typedInventoryViewDialog .inventory-packing-edit-history-table td:nth-child(2){text-align:left}
#typedInventoryViewDialog .inventory-packing-dialog-head{display:flex;align-items:center;gap:14px;padding-right:60px}
#typedInventoryViewDialog .inventory-packing-sheet-toolbar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin-left:auto}
#typedInventoryViewDialog .inventory-packing-sheet-icon{position:relative;display:inline-grid;place-items:center;width:38px;height:38px;min-width:38px;padding:0;border:1px solid #cad7e9;border-radius:10px;background:#edf5ff;color:#2767c9;font:800 18px/1 Manrope,"Microsoft YaHei",sans-serif;cursor:pointer;box-shadow:0 2px 5px rgba(39,103,201,.08)}
#typedInventoryViewDialog .inventory-packing-sheet-icon:hover,#typedInventoryViewDialog .inventory-packing-sheet-icon:focus-visible,#typedInventoryViewDialog .inventory-packing-sheet-icon.active{border-color:#5d5bea;background:#625bf6;color:#fff;outline:0;transform:translateY(-1px)}
#typedInventoryViewDialog .inventory-packing-sheet-icon small{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;min-width:17px;height:17px;padding:0 3px;border:2px solid #fff;border-radius:9px;background:#f7b955;color:#513300;font-size:9px;line-height:1}
#typedInventoryViewDialog .inventory-packing-sheet-icon.print{margin-left:4px;background:#f3f5f8;color:#26354f;border-color:#cfd6e2}
#typedInventoryViewDialog .inventory-packing-sheet-stage{margin-top:13px}
#typedInventoryViewDialog .inventory-packing-sheet-stage>[hidden]{display:none!important}
#typedInventoryViewDialog .inventory-packing-sheet-title{margin:0 0 10px;padding:8px 11px;border-left:4px solid #625bf6;background:#f4f5ff;color:#26354f;font-size:13px}
#typedInventoryViewDialog .inventory-packing-sheet-empty{padding:18px;border:1px dashed #ccd5e2;border-radius:8px;background:#f8fafc;color:#78849a;text-align:center}
@media(max-width:1050px){#typedInventoryViewDialog .inventory-finished-packing-fields{grid-template-columns:repeat(3,minmax(0,1fr))}#typedInventoryViewDialog .inventory-packing-operator{grid-column:auto}}
@media(max-width:760px){#typedInventoryViewDialog .inventory-finished-packing-header{grid-template-columns:1fr}#typedInventoryViewDialog .inventory-finished-packing-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#typedInventoryViewDialog .inventory-packing-style-image{height:120px;min-height:120px;max-height:120px}}
@media print{body[data-print-inventory-packing]>*:not(#typedInventoryViewDialog){display:none!important}body[data-print-inventory-packing] #typedInventoryViewDialog[open]{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}body[data-print-inventory-packing] #typedInventoryViewDialog>.inventory-history-view{max-height:none!important;padding:0!important;overflow:visible!important}body[data-print-inventory-packing] #typedInventoryViewDialog .dialog-head{position:static!important;padding:0 0 10px!important}body[data-print-inventory-packing] #typedInventoryViewDialog :is(.inventory-packing-sheet-toolbar,.dialog-head>.icon-btn,.inventory-packing-movements,.inventory-packing-edit-history){display:none!important}body[data-print-inventory-packing] #typedInventoryViewDialog .packing-list-table{width:100%!important;min-width:0!important;table-layout:fixed}body[data-print-inventory-packing] #typedInventoryViewDialog :is(th,td){padding:4px!important;font-size:9px!important}}
#typedFinishedGoodsReceiptDialog{width:min(1380px,97vw);max-width:97vw;max-height:95vh}#typedFinishedGoodsReceiptDialog form{max-height:95vh;overflow:auto;padding:24px 28px;box-sizing:border-box}#typedFinishedGoodsReceiptDialog .packing-list-table input{min-width:48px;width:100%;padding:5px;border:1px solid #cbd5e1;border-radius:4px;text-align:center}#typedFinishedGoodsReceiptDialog h3{margin:18px 0 8px;font-size:14px;color:#1f2937}#typedFinishedGoodsReceiptDialog .secondary{margin-top:8px}#typedFinishedGoodsReceiptDialog .packing-sheet-image img{width:100%;height:100%;object-fit:contain}
.inventory-category-ledgers{display:grid;gap:18px}.inventory-category-ledger{min-width:0}.inventory-category-ledger>h2{margin:0;padding:11px 14px;border-left:4px solid #635bff;background:#f5f6ff;color:#17213b;font-size:15px}.inventory-category-ledger[data-inventory-ledger="fabric"]>h2{border-left-color:#3b82f6;background:#eff6ff}.inventory-category-ledger[data-inventory-ledger="trim"]>h2{border-left-color:#f59e0b;background:#fffbeb}.inventory-category-ledger[data-inventory-ledger="finished-goods"]>h2{border-left-color:#22a06b;background:#ecfdf5}.inventory-category-ledger[data-inventory-ledger="equipment"]>h2{border-left-color:#8b5cf6;background:#f5f3ff}
#inventory .inventory-category-kind{display:grid;place-items:center;width:56px;min-height:34px;padding:4px 6px;border-radius:8px;background:#eef3ff;color:#42536f;font-size:11px;font-weight:800;line-height:1.15;text-align:center;box-sizing:border-box}#inventory .inventory-category-kind.fabric{background:#e7f1ff;color:#245da8}#inventory .inventory-category-kind.trim{background:#fff1dc;color:#986019}#inventory .inventory-category-kind.finished{background:#e4f6ec;color:#197047}#inventory .inventory-category-kind.equipment{background:#efe9ff;color:#6740a4}#inventory .inventory-category-ledger tbody>tr>td:first-child{width:68px}
@media(max-width:1100px){.inventory-ts-metrics{grid-template-columns:repeat(2,minmax(200px,1fr))}.inventory-filter-group{flex-wrap:wrap}.inventory-ts-card .toolbar{align-items:flex-start;flex-direction:column}.inventory-search{width:100%}}
/* TypeScript production overview. Matches the final pre-migration compact layout. */
#production[data-production-renderer="typescript-v1"]>#productionOrderOverview{margin-bottom:18px}
#production[data-production-renderer="typescript-v1"]>.production-title-compact{align-items:center;gap:16px;margin-bottom:10px}
#production[data-production-renderer="typescript-v1"]>.production-title-compact>div:first-child{flex:0 0 220px;min-width:190px}
#production[data-production-renderer="typescript-v1"] .production-header-actions{display:flex;align-items:stretch;justify-content:flex-end;gap:8px;min-width:0;flex:1}
#production[data-production-renderer="typescript-v1"] .production-header-actions #productionQuickNav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;width:100%;max-width:none;margin:0;min-width:0;flex:1 1 0}
#production[data-production-renderer="typescript-v1"] .production-header-actions .style-quick-card{box-sizing:border-box;min-width:0;min-height:66px;height:66px;padding:7px 10px;gap:7px;border-radius:10px}
#production[data-production-renderer="typescript-v1"] .production-header-actions .style-quick-card>span:last-child{min-width:0;overflow:hidden}
#production[data-production-renderer="typescript-v1"] .production-header-actions .metric-icon{width:30px;height:30px;min-width:30px;flex:0 0 30px;font-size:15px}
#production[data-production-renderer="typescript-v1"] .production-header-actions .style-quick-card b{display:block;overflow:hidden;font-size:12px;white-space:nowrap;text-overflow:ellipsis}
#production[data-production-renderer="typescript-v1"] .production-header-actions .style-quick-card small{margin-top:2px;font-size:9px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#production[data-production-renderer="typescript-v1"] .production-header-actions #newProduction{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;align-self:center;height:41px;min-height:41px;min-width:126px;padding:0 12px;white-space:nowrap;flex:0 0 126px}
#production[data-production-renderer="typescript-v1"] .production-overview-shell{padding:0;overflow:hidden}
#production[data-production-renderer="typescript-v1"] .production-overview-metrics{display:flex;min-height:56px;overflow-x:auto;border-bottom:1px solid #e7ebf1;background:#e7ebf1}
#production[data-production-renderer="typescript-v1"] .production-overview-metrics>button{flex:1 1 0;min-width:118px;height:56px;padding:7px 16px;border:0;border-right:1px solid #e7ebf1;border-radius:0;background:#fafbfd;text-align:left;color:inherit;cursor:pointer}
#production[data-production-renderer="typescript-v1"] .production-overview-metrics>button:hover,#production[data-production-renderer="typescript-v1"] .production-overview-metrics>button.active{background:#eef3ff;box-shadow:inset 0 -2px #665ee8}
#production[data-production-renderer="typescript-v1"] .production-overview-metrics small{display:block;color:#7a8699;font-size:10px;font-weight:700;white-space:nowrap}
#production[data-production-renderer="typescript-v1"] .production-overview-metrics b{display:block;margin-top:1px;color:#26354f;font-size:18px;line-height:1.05}
#production[data-production-renderer="typescript-v1"] .production-overview-attention-metric{order:999;min-width:205px!important}
#production[data-production-renderer="typescript-v1"] .production-overview-attention-metric em{display:block;margin-top:1px;color:#7a8699;font-size:9px;font-style:normal;white-space:nowrap}
#production[data-production-renderer="typescript-v1"] .production-overview-toolbar{display:grid;grid-template-columns:minmax(200px,1fr) repeat(3,minmax(120px,180px)) 38px;grid-auto-flow:column;align-items:center;gap:10px;padding:14px 18px;background:#fff;border-bottom:1px solid #e8ebf1;overflow-x:auto}
#production[data-production-renderer="typescript-v1"] .production-overview-toolbar .production-history-icon{grid-column:5;grid-row:1;align-self:center}
#production[data-production-renderer="typescript-v1"] .production-overview-toolbar input,#production[data-production-renderer="typescript-v1"] .production-overview-toolbar select{height:38px;margin:0;padding:0 12px;border:1px solid #d7dde7;border-radius:9px;background:#fff;color:#344054;font:inherit}
#production[data-production-renderer="typescript-v1"] .production-overview-list{display:grid;background:#f7f9fc}
#production[data-production-renderer="typescript-v1"] .production-overview-card{background:#fff;border-bottom:1px solid #e3e7ee}
#production[data-production-renderer="typescript-v1"] .production-overview-card[data-production-overview-view]{cursor:pointer}
#productionOverviewDetailDialog{width:min(920px,94vw);max-height:90vh}
#productionOverviewDetailDialog .production-overview-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#productionOverviewDetailDialog .production-overview-detail-grid>div{display:grid;gap:5px;padding:12px;border:1px solid #e1e6ef;border-radius:10px;background:#f8fafc}
#productionOverviewDetailDialog .production-overview-detail-grid b{color:#71809a;font-size:12px}
#productionOverviewDetailDialog .production-overview-detail-grid span{color:#202b40;font-size:15px;font-weight:750;overflow-wrap:anywhere}
@media(max-width:760px){#productionOverviewDetailDialog .production-overview-detail-grid{grid-template-columns:1fr 1fr}}
#production[data-production-renderer="typescript-v1"] .production-overview-primary{display:grid;grid-template-columns:minmax(225px,1.35fr) minmax(100px,.52fr) minmax(125px,.7fr) repeat(3,minmax(105px,.58fr)) minmax(82px,.45fr) 160px;gap:14px;align-items:center;min-height:54px;padding:5px 18px}
#production[data-production-renderer="typescript-v1"] .production-overview-order{display:flex;align-items:center;min-width:0}
#production[data-production-renderer="typescript-v1"] .production-overview-order img,#production[data-production-renderer="typescript-v1"] .production-overview-placeholder{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;margin-right:9px;border-radius:8px;background:#eef1ff;color:#6f68df;object-fit:cover}
#production[data-production-renderer="typescript-v1"] .production-overview-order span{min-width:0}
#production[data-production-renderer="typescript-v1"] .production-overview-order b,#production[data-production-renderer="typescript-v1"] .production-overview-order strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.production-overview-order b{color:#1f4f9a}.production-overview-order strong{color:#26354f}
#production[data-production-renderer="typescript-v1"] .production-overview-order small,#production[data-production-renderer="typescript-v1"] .production-overview-assignment small,#production[data-production-renderer="typescript-v1"] .production-overview-risk small{display:block;margin-top:2px;color:#7a8699;font-size:10px;line-height:1.25}
#production[data-production-renderer="typescript-v1"] .production-overview-due small,#production[data-production-renderer="typescript-v1"] .production-overview-stage-progress small{display:block;color:#7a8699;font-size:10px;font-weight:700}
#production[data-production-renderer="typescript-v1"] .production-overview-due b,#production[data-production-renderer="typescript-v1"] .production-overview-assignment b{display:block;margin-top:2px;color:#26354f;font-size:12px;white-space:nowrap}
#production[data-production-renderer="typescript-v1"] .production-overview-assignment span{display:block;margin-top:2px;color:#52627b;font-size:11px}
#production[data-production-renderer="typescript-v1"] .production-overview-stage-progress span{display:block;margin-top:2px;color:#667085;font-size:11px;white-space:nowrap}
#production[data-production-renderer="typescript-v1"] .production-overview-stage-progress i{display:block;height:5px;margin-top:4px;border-radius:9px;background:#e8ebf1;overflow:hidden}
#production[data-production-renderer="typescript-v1"] .production-overview-stage-progress em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#675fe6,#8b82ef)}
#production[data-production-renderer="typescript-v1"] .production-overview-risk{text-align:center}.production-risk{display:inline-flex;align-items:center;justify-content:center;min-width:62px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800}.production-risk.green{background:#e2f6e9;color:#16804a}.production-risk.red{background:#ffebe8;color:#b42318}.production-risk.orange{background:#fff1d8;color:#9a5d08}.production-risk.gray{background:#edf0f4;color:#667085}.production-risk.blue{background:#e7efff;color:#245db5}
#production[data-production-renderer="typescript-v1"] .production-overview-actions{display:flex;justify-content:flex-end;gap:6px}.production-overview-icon{width:32px;height:32px;padding:0;border:1px solid #d9dfeb;border-radius:9px;background:#f7f9fc;cursor:pointer;font-size:15px}.production-overview-icon.materials{color:#2767c9;background:#edf5ff}.production-overview-icon.update{color:#97620c;background:#fff5e4}.production-overview-icon.edit{color:#7054b9;background:#f4f0ff}.production-overview-icon.cancel{color:#b42318;background:#fff0ef}
#production[data-production-renderer="typescript-v1"] .production-overview-actions [data-cancel-production]{display:none!important}
@media(max-width:1180px){#production[data-production-renderer="typescript-v1"]>.production-title-compact{align-items:flex-start;flex-wrap:wrap}#production[data-production-renderer="typescript-v1"]>.production-title-compact>div:first-child{flex:1 1 100%}#production[data-production-renderer="typescript-v1"] .production-header-actions{flex:1 1 100%}.production-overview-primary{grid-template-columns:minmax(210px,1.2fr) repeat(3,minmax(105px,1fr))}}
/* TypeScript-owned cutting records: restore the compact final pre-migration
   table without relying on the retired order-image and action patches. */
#productionCuttingContent .cutting-typescript-shell{padding:0;overflow:hidden}
#productionCuttingContent .cutting-record-title{align-items:center;gap:18px;margin:0;padding:15px 18px 13px;border-bottom:1px solid #e7ebf1}
#productionCuttingContent .cutting-record-title-tools{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
#productionCuttingContent .cutting-record-title-tools>input{width:300px;min-width:230px;height:38px;padding:7px 10px;border:1px solid #d8deea;border-radius:8px;background:#fff;color:#27364f}
#productionCuttingContent .cutting-record-filters{display:flex;align-items:end;justify-content:flex-end;gap:9px;flex:0 1 auto;min-width:0}
#productionCuttingContent .cutting-record-filters label{display:grid;gap:4px;color:#475467;font-size:11px;font-weight:700;white-space:nowrap}
#productionCuttingContent .cutting-record-filters input,#productionCuttingContent .cutting-record-filters select{height:36px;margin:0;border:1px solid #d8deea;border-radius:8px;background:#fff;color:#27364f;font:12px inherit}
#productionCuttingContent .cutting-record-filters select{min-width:112px;padding:6px 28px 6px 9px}
#productionCuttingContent .cutting-record-filters input:focus,#productionCuttingContent .cutting-record-filters select:focus{outline:none;border-color:#7869ef;box-shadow:0 0 0 3px rgba(120,105,239,.12)}
#productionCuttingContent .cutting-year-summary{display:flex;gap:18px;flex-wrap:wrap;margin:0;padding:9px 18px;border-bottom:1px solid #e7ebf1;background:#f3f6fa;color:#475467;font-size:12px}
#productionCuttingContent .cutting-year-summary b{margin-right:4px;color:#1f2937;font-size:15px}
#productionCuttingContent .cutting-records-table-wrap{width:100%;max-width:100%;overflow-x:auto}
#productionCuttingContent .cutting-records-table{width:100%;min-width:860px;table-layout:auto}
#productionCuttingContent .cutting-records-table th,#productionCuttingContent .cutting-records-table td{padding:9px 11px;font-size:11px;line-height:1.35;vertical-align:middle}
#productionCuttingContent .cutting-records-table th{white-space:nowrap;letter-spacing:.35px}
#productionCuttingContent .cutting-record-row{height:61px}
#productionCuttingContent .cutting-record-row>td{height:61px;box-sizing:border-box}
#productionCuttingContent .production-record-order-layout{display:inline-flex;align-items:center;gap:9px;min-width:0;max-width:100%;vertical-align:middle;text-align:left}
#productionCuttingContent .production-record-order-image{display:block;width:38px;height:38px;max-width:38px;max-height:38px;flex:0 0 38px;object-fit:cover;object-position:center;border:1px solid #d8dee9;border-radius:7px;background:#f4f6fa;overflow:hidden}
#productionCuttingContent .production-record-order-placeholder{display:grid;place-items:center;color:#98a2b3;font-size:8px;font-weight:700;text-align:center}
#productionCuttingContent .production-record-order-copy{display:block;min-width:0}
#productionCuttingContent .production-record-order-copy b,#productionCuttingContent .production-record-order-copy small{display:block;max-width:205px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#productionCuttingContent .production-record-order-copy small{margin-top:3px;color:#71809b;font-size:10px}
#productionCuttingContent .cutting-fabric-balance b,#productionCuttingContent .cutting-fabric-balance small{display:block;white-space:nowrap}
#productionCuttingContent .cutting-fabric-balance small{margin-top:3px;color:#71809b}
#productionCuttingContent .cutting-record-actions{white-space:nowrap}
#productionCuttingContent .table-icon-action{width:34px;height:34px;margin:0 4px 0 0;padding:0;border:1px solid #d7deea;border-radius:9px;background:#f7f9fc;color:#52617d;font-size:19px;line-height:1;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
#productionCuttingContent .table-icon-action:hover,#productionCuttingContent .table-icon-action:focus-visible{transform:translateY(-2px) scale(1.08);background:#edf1ff;box-shadow:0 5px 12px rgba(51,74,122,.14);color:#3f54be;outline:none}
#productionCuttingContent .table-icon-action.admin{color:#9a6311;background:#fff8e9}
#productionCuttingContent .table-icon-action.admin:hover,#productionCuttingContent .table-icon-action.admin:focus-visible{background:#fff0cc;color:#835000}
@media(max-width:900px){#productionCuttingContent .cutting-record-title,#productionCuttingContent .cutting-record-title-tools{align-items:stretch;flex-direction:column}#productionCuttingContent .cutting-record-filters{justify-content:flex-start;flex-wrap:wrap}#productionCuttingContent .cutting-record-title-tools>input{width:100%;min-width:0}}
/* TypeScript cutting sheet dialog: preserve the final pre-migration table form. */
#productionFabricSheetDialog{width:min(1220px,96vw);max-width:96vw;max-height:94vh;padding:0;overflow:hidden}
#productionFabricSheetDialog>form.fabric-sheet{display:block;max-height:94vh;overflow-y:auto;overflow-x:hidden;padding:28px 32px;box-sizing:border-box;font:14px Manrope,"Microsoft YaHei",sans-serif;color:#172033}
#productionFabricSheetDialog .dialog-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px}
#productionFabricSheetDialog .fabric-sheet-title{position:relative;min-height:92px;margin:0;padding:24px 220px 18px 18px;border:1px solid #303846;text-align:center;font:700 25px/1.25 Georgia,"Times New Roman",serif;letter-spacing:2px;box-sizing:border-box}
#productionFabricSheetDialog .fabric-sheet-order-image{position:absolute;inset:0 0 0 auto;width:205px;margin:0;padding:6px;display:grid;place-items:center;border-left:1px solid #303846;background:#fafbfc;box-sizing:border-box;font:11px Arial,"Microsoft YaHei",sans-serif;letter-spacing:0;color:#7a8496}
#productionFabricSheetDialog .fabric-sheet-order-image img{display:block;width:100%;height:100%;max-height:104px;object-fit:contain;object-position:center}
#productionFabricSheetDialog .fabric-sheet-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #303846;border-top:0}
#productionFabricSheetDialog .fabric-sheet-meta>label{display:grid;grid-template-columns:108px minmax(0,1fr);align-items:center;min-height:46px;margin:0;border-right:1px solid #303846;border-bottom:1px solid #303846;font-size:12px;font-weight:700}
#productionFabricSheetDialog .fabric-sheet-meta>label:nth-child(3n){border-right:0}
#productionFabricSheetDialog .fabric-sheet-meta>label:nth-last-child(-n+3){border-bottom:0}
#productionFabricSheetDialog .fabric-sheet-meta input,#productionFabricSheetDialog .fabric-sheet-meta select{width:100%;min-width:0;min-height:44px;margin:0;padding:7px 9px;border:0;border-left:1px solid #d0d6df;border-radius:0;background:#fff;font:13px inherit;box-sizing:border-box}
#productionFabricSheetDialog [data-cutting-style-presentation]{display:grid;align-content:center;gap:2px;min-height:44px;padding:4px 8px;border-left:1px solid #d0d6df;background:#fff;color:#26354f;box-sizing:border-box}
#productionFabricSheetDialog [data-cutting-style-presentation] b{font-size:12px}#productionFabricSheetDialog [data-cutting-style-presentation] small{font-size:10px;color:#748197}
#productionFabricSheetDialog .cutting-sheet-header{grid-template-columns:1fr 170px}
#productionFabricSheetDialog .cutting-order-header-fields{grid-template-columns:repeat(12,minmax(0,1fr));align-content:start}
#productionFabricSheetDialog .cutting-order-header-fields>.cutting-header-span-4{grid-column:span 4}
#productionFabricSheetDialog .cutting-order-header-fields>.cutting-header-span-3{grid-column:span 3}
#productionFabricSheetDialog .cutting-order-header-fields label{font-size:12px;font-weight:700}
#productionFabricSheetDialog .cutting-order-header-fields input,#productionFabricSheetDialog .cutting-order-header-fields select{margin-top:3px}
#productionFabricSheetDialog .cutting-order-header-fields [data-cutting-style-presentation]{min-height:37.6px;margin-top:3px;padding:7px 12px;border:1px solid #d9dee8;border-radius:8px;background:#f7f9fc}
#productionFabricSheetDialog .cutting-received-title{display:flex;align-items:center;gap:6px}
#productionFabricSheetDialog .cutting-fabric-trace-button{display:inline-grid;place-items:center;width:22px;height:22px;min-width:22px;padding:0;border:1px solid #aaa6f5;border-radius:7px;background:#f0efff;color:#514bd7;font-size:13px;font-weight:800;cursor:pointer}
#productionFabricSheetDialog .cutting-fabric-trace-button:hover{background:#dfddff;color:#3029b8}
#productionFabricSheetDialog .packing-sheet-image img{width:100%;height:100%;object-fit:contain}
#productionFabricSheetDialog .fabric-sheet-section{margin:14px 0 0;padding:12px;border:1px solid #aeb9c8;border-radius:9px;background:#fff;overflow:auto}
#productionFabricSheetDialog .fabric-sheet-section>h3{margin:-12px -12px 12px;padding:9px 12px;border-bottom:1px solid #cbd4e1;border-radius:9px 9px 0 0;background:#f3f6fa;font-size:13px;letter-spacing:.5px}
#productionFabricSheetDialog [data-cutting-size-section]>h3{display:flex;align-items:center;justify-content:space-between;gap:16px}
#productionFabricSheetDialog [data-cutting-size-source]{font-size:11px;font-weight:500;letter-spacing:0;color:#66758d}
#productionFabricSheetDialog .fabric-size-table{width:100%;min-width:0;border:2px solid #394150;border-collapse:collapse;table-layout:fixed}
#productionFabricSheetDialog .fabric-size-table th,#productionFabricSheetDialog .fabric-size-table td{height:38px;padding:5px;border:1px solid #566070;text-align:center;font-size:11px;box-sizing:border-box}
#productionFabricSheetDialog .fabric-size-table th{background:#f2f4f7;font-weight:800;white-space:nowrap}
#productionFabricSheetDialog .fabric-size-table th:first-child,#productionFabricSheetDialog .fabric-size-table td:first-child{width:130px;text-align:left;font-weight:700}
#productionFabricSheetDialog .fabric-size-table input{width:100%;min-width:0;margin:0;padding:7px 2px;border:0;background:#fff;text-align:center;font:inherit;box-sizing:border-box}
#productionFabricSheetDialog .fabric-size-table input[readonly],#productionFabricSheetDialog .fabric-sheet-meta input[readonly]{background:#f7f9fc;color:#26354f}
#productionFabricSheetDialog .fabric-size-table output{display:block;min-height:28px;padding:7px 2px;box-sizing:border-box;font-weight:700;color:#172033}
#productionFabricSheetDialog .fabric-size-table .cutting-source-row{background:#f8fafc}
#productionFabricSheetDialog .fabric-size-table .cutting-plan-row{background:#eef4ff}
#productionFabricSheetDialog .fabric-sheet-total{font-weight:800;background:#f0f3f7}
#productionFabricSheetDialog .fabric-sheet-usage{display:grid;border:1px solid #dce3ed;border-radius:8px;overflow:hidden}
#productionFabricSheetDialog .fabric-sheet-usage-head{display:grid;grid-template-columns:minmax(250px,1fr) 135px 155px;align-items:center;min-height:34px;border-bottom:1px solid #cbd4e1;background:#f3f6fa;color:#53617a;font-size:12px;font-weight:800;text-align:center}
#productionFabricSheetDialog .fabric-sheet-usage-head>span:first-child{text-align:left;padding:7px 10px}
#productionFabricSheetDialog .fabric-sheet-usage-head>span:not(:first-child){height:100%;display:grid;place-items:center;border-left:1px solid #dce3ed}
#productionFabricSheetDialog .fabric-sheet-usage>label{display:grid;grid-template-columns:minmax(250px,1fr) 135px 155px;align-items:center;min-height:46px;margin:0;padding:0;border-bottom:1px solid #dce3ed;background:#fff;font-size:13px;font-weight:700}
#productionFabricSheetDialog .fabric-sheet-usage>label:last-child{border-bottom:0}
#productionFabricSheetDialog .fabric-sheet-usage>label>span{padding:8px 10px}
#productionFabricSheetDialog .fabric-sheet-usage input{width:100%;min-width:0;height:100%;margin:0;padding:7px 9px;border:0;border-left:1px solid #dce3ed;border-radius:0;background:#fff;text-align:center;font:13px inherit;box-sizing:border-box}
#productionFabricSheetDialog .cutting-inspection-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #dce3ed;border-radius:8px 8px 0 0;overflow:hidden}
#productionFabricSheetDialog .cutting-inspection-fields>label{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;min-height:42px;margin:0;padding-left:9px;border-right:1px solid #dce3ed;background:#fafbfd;font-size:13px}
#productionFabricSheetDialog .cutting-inspection-fields>label:last-child{border-right:0}
#productionFabricSheetDialog .cutting-inspection-fields input{width:100%;min-width:0;height:100%;margin:0;padding:7px;border:0;border-left:1px solid #dce3ed;border-radius:0;background:#fff;font:13px inherit;box-sizing:border-box}
#productionFabricSheetDialog .cutting-defect-fabric{margin-top:10px;border:1px solid #dce3ed;border-radius:8px;overflow:hidden;background:#fff8f6}
#productionFabricSheetDialog .cutting-defect-title{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #dce3ed;font-size:13px}
#productionFabricSheetDialog .cutting-defect-title button{padding:5px 9px;font-size:12px}
#productionFabricSheetDialog .cutting-defect-row{display:grid;grid-template-columns:150px 150px minmax(250px,1fr) 42px;border-bottom:1px solid #e4e8ee;background:#fff}
#productionFabricSheetDialog .cutting-defect-row:last-child{border-bottom:0}
#productionFabricSheetDialog .cutting-defect-row>label{display:flex;align-items:center;gap:7px;min-height:40px;margin:0;padding:7px 9px;border-right:1px solid #e4e8ee;white-space:nowrap;font-size:13px}
#productionFabricSheetDialog .cutting-defect-row input{width:100%;min-width:0;margin:0;padding:6px;border:0;background:#fff;text-align:center;font:13px inherit}
#productionFabricSheetDialog .cutting-defect-row .cutting-defect-note input{text-align:left}
#productionFabricSheetDialog .cutting-defect-row>.icon-btn{min-width:42px;border:0;border-radius:0;background:#fff8f6;color:#c54b42;font-size:20px}
#productionFabricSheetDialog .fabric-sheet-notes{padding:10px 12px;border:1px solid #dce3ed;border-top:0;border-radius:0 0 8px 8px}
#productionFabricSheetDialog .fabric-sheet-notes textarea{width:100%;min-height:86px;margin-top:7px;padding:9px;border:1px solid #e0e6ef;border-radius:6px;background:#fff;resize:vertical;box-sizing:border-box;font:13px inherit}
#productionFabricSheetDialog .fabric-stock-link{display:none}
#productionFabricSheetDialog .fabric-sheet-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #e5eaf1}
#productionFabricSheetDialog .edit-history{margin-top:14px}
@media(max-width:760px){#productionFabricSheetDialog>form.fabric-sheet{padding:16px}#productionFabricSheetDialog .fabric-sheet-title{min-height:82px;padding:20px 132px 16px 12px;font-size:17px}#productionFabricSheetDialog .fabric-sheet-order-image{width:118px}#productionFabricSheetDialog .cutting-sheet-header{grid-template-columns:1fr}#productionFabricSheetDialog .cutting-order-header-fields{grid-template-columns:1fr}#productionFabricSheetDialog .cutting-order-header-fields>.cutting-header-span-4,#productionFabricSheetDialog .cutting-order-header-fields>.cutting-header-span-3{grid-column:auto}#productionFabricSheetDialog .fabric-sheet-meta{grid-template-columns:1fr}#productionFabricSheetDialog .fabric-sheet-meta>label,#productionFabricSheetDialog .fabric-sheet-meta>label:nth-child(3n),#productionFabricSheetDialog .fabric-sheet-meta>label:nth-last-child(-n+3){grid-template-columns:92px 1fr;border-right:0;border-bottom:1px solid #303846}#productionFabricSheetDialog .fabric-sheet-meta>label:last-child{border-bottom:0}#productionFabricSheetDialog .fabric-sheet-usage-head,#productionFabricSheetDialog .fabric-sheet-usage>label{grid-template-columns:minmax(140px,1fr) 90px 105px}#productionFabricSheetDialog .cutting-inspection-fields,#productionFabricSheetDialog .cutting-defect-row{grid-template-columns:1fr}#productionFabricSheetDialog .cutting-inspection-fields>label,#productionFabricSheetDialog .cutting-defect-row>label{border-right:0;border-bottom:1px solid #e4e8ee}#productionFabricSheetDialog .cutting-defect-row>.icon-btn{min-height:36px}}
/* TypeScript-owned packing page: preserves the compact final legacy layout. */
#productionPackingContent .packing-record-title-tools{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
#productionPackingContent .packing-record-title-tools>input{width:300px;min-width:230px;height:38px;padding:7px 10px;border:1px solid #d8deea;border-radius:8px;background:#fff;color:#27364f}
#productionPackingContent .packing-record-filters{display:flex;align-items:end;gap:9px;flex-wrap:nowrap}
#productionPackingContent .packing-record-filters label{white-space:nowrap}
#productionPackingContent .packing-year-summary{padding:8px 12px;margin:0}
#productionPackingContent .packing-typescript-shell table th,#productionPackingContent .packing-typescript-shell table td{padding:8px 7px;font-size:12px;vertical-align:middle}
#productionPackingContent .packing-typescript-shell table th{white-space:nowrap}
#productionPackingContent .packing-typescript-shell table small{display:block;margin-top:2px;line-height:1.25}
#productionPackingContent .packing-inventory-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:82px;min-height:32px;padding:5px 9px;border:1px solid #bcd5c8;border-radius:10px;background:#eefaf3;color:#08764a;cursor:pointer;font-weight:700}
#productionPackingContent .packing-save-status{margin:0 0 10px;padding:10px 12px;border:1px solid #b9dfcb;border-radius:10px;background:#eefaf3;color:#08764a;font-weight:700}
#productionPackingForm .packing-location-field small{display:block;margin-top:4px;color:#748198;font-size:11px;font-weight:500}
#productionPackingForm .pack-calculation-note{margin:9px 0;padding:9px 12px;border:1px solid #cbdaf5;border-radius:8px;background:#f2f7ff;color:#31598d;font-size:12px;font-weight:700}
#productionPackingForm .packing-section-mode{display:flex;align-items:center;gap:12px;margin:8px 0;padding:8px 10px;border:1px solid #d9e2f0;border-radius:9px;background:#f8fafc}
#productionPackingForm .packing-section-mode label{display:flex;align-items:center;gap:8px;min-width:260px;font-size:12px;font-weight:800;color:#172554}
#productionPackingForm .packing-section-mode select{width:112px;padding:6px 8px;border:1px solid #aebbd0;border-radius:7px;background:#fff;color:#111827;font-weight:800}
#productionPackingForm .packing-auto-pack-mode{display:inline-flex;align-items:center;justify-content:center;min-width:112px;padding:7px 10px;border:1px solid #b9d4f8;border-radius:7px;background:#eaf3ff;color:#174f91;font-weight:800}
#productionPackingForm .packing-section-mode .pack-calculation-note{flex:1;margin:0;padding:6px 10px}
#productionPackingForm .packing-bottom-sheet{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:1050px){#productionPackingContent .card-title,#productionPackingContent .packing-record-title-tools{align-items:stretch;flex-direction:column}#productionPackingContent .packing-record-filters{flex-wrap:wrap}#productionPackingContent .packing-record-title-tools>input{width:100%;min-width:0}}
/* Restored final packing-list presentation. These rules were historically
   injected by the retired runtime and now live with the TypeScript owner. */
#productionPackingContent .packing-records-table{width:100%;table-layout:auto}
#productionPackingContent .packing-records-table tbody .packing-record-row{height:61px}
#productionPackingContent .packing-records-table tbody .packing-record-row>td{height:61px;box-sizing:border-box}
#productionPackingContent .production-record-order-layout{display:flex;align-items:center;gap:9px;min-width:0;text-align:left}
#productionPackingContent .production-record-order-image{display:grid;place-items:center;width:40px;height:40px;min-width:40px;border-radius:8px;background:#eef1ff;color:#6f68df;font-size:9px;object-fit:cover;overflow:hidden}
#productionPackingContent .production-record-order-copy{display:block;min-width:0}
#productionPackingContent .production-record-order-copy b,#productionPackingContent .production-record-order-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#productionPackingContent .packing-record-row>td:last-child{white-space:nowrap}
#productionPackingContent .packing-inventory-action{transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
#productionPackingContent .packing-inventory-action:hover,#productionPackingContent .packing-inventory-action:focus-visible{transform:translateY(-2px);box-shadow:0 6px 14px rgba(26,109,72,.14);background:#e1f6ea}
#productionPackingDialog,#productionPackingViewDialog{width:min(1220px,96vw);max-width:96vw;max-height:94vh}
#productionPackingDialog form,#productionPackingViewDialog form{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;width:100%;padding:28px 32px;box-sizing:border-box;max-height:94vh;overflow:auto}
.packing-sheet{background:#fff}
.packing-sheet>*{min-width:0;max-width:100%}
.packing-sheet-header{display:grid;grid-template-columns:1fr 170px;gap:14px;border:2px solid #394150;padding:12px;margin:0 0 15px}
.packing-header-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.packing-header-fields label{font-size:12px;font-weight:700}
.packing-header-fields input,.packing-header-fields select{margin-top:3px}
#productionPackingDialog .packing-order-header-fields{grid-template-columns:minmax(180px,1fr) minmax(145px,.8fr) minmax(105px,.55fr);align-content:start}
#productionPackingDialog .packing-order-header-fields .packing-season-field input{max-width:170px}
#productionPackingDialog .packing-order-header-fields .packing-location-field{grid-column:span 2}
#productionPackingDialog .packing-dialog-head-actions{display:flex;align-items:center;gap:8px}
#productionPackingDialog .packing-print-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #d8deea;border-radius:10px;background:#f4f6ff;color:#5149da;font-size:21px}
.packing-sheet-image{min-height:150px;border:1px solid #667085;display:grid;place-items:center;color:#667085;font-weight:700;font-size:12px;overflow:hidden}
.packing-sheet-image img{width:100%;height:100%;object-fit:contain}
.packing-sheet h3{text-align:center;margin:10px 0 7px;font-size:14px;letter-spacing:.4px}
.packing-sheet .packing-table-wrap{width:100%;min-width:0;max-width:100%;overflow:auto;margin-top:16px}
.packing-sheet .packing-table-wrap table{min-width:1000px}
.packing-list-table{border:2px solid #394150;border-collapse:collapse}
.packing-list-table th,.packing-list-table td{border:1px solid #566070!important;text-align:center;padding:5px!important;height:38px;box-sizing:border-box}
.packing-list-table th{background:#f2f4f7;font-size:11px;font-weight:800;white-space:nowrap}
.packing-list-table tfoot th{background:#e5e7eb}
.packing-sheet .packing-table-wrap input,.packing-sheet .packing-table-wrap select{min-width:58px;width:100%;box-sizing:border-box;border:0!important;background:transparent;text-align:center}
.packing-sheet .packing-size-labels{margin-top:12px}
.packing-totals{display:flex;gap:18px;flex-wrap:wrap;margin:15px 0;padding:12px 14px;background:#f3f6fa;border-radius:9px;color:#4a5568}
.packing-totals b{color:#1f2937}
.packing-bottom-sheet{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid #596273;margin:16px 0}
.packing-bottom-sheet>div{padding:9px;border-right:1px solid #596273;min-height:56px}
.packing-bottom-sheet>div:last-child{border-right:0}
.packing-bottom-sheet b,.packing-bottom-sheet span{display:block;font-size:12px}
.packing-bottom-sheet span{margin-top:5px}
.packing-bottom-sheet label{font-size:11px}
.packing-bottom-sheet input{margin-top:4px}
.inventory-finished-issue-dialog{width:min(1450px,96vw);max-width:none}
.inventory-finished-issue-dialog>form{max-height:90vh;overflow:auto}
.inventory-finished-issue-dialog .packing-bottom-sheet{grid-template-columns:repeat(2,minmax(0,1fr))}
.inventory-finished-issue-dialog .packing-list-table input:not([type="checkbox"]){width:100%;min-width:58px;padding:7px 5px;text-align:center}
.inventory-finished-issue-dialog .packing-list-table input[type="checkbox"]{width:18px;height:18px}
.inventory-finished-issue-dialog [data-inventory-issue-carton].selected{background:#eef2ff}
.inventory-finished-issue-dialog .inventory-finished-issue-section{margin:18px 0}
#productionPackingDialog .reject-packing-table{min-width:1540px}
#productionPackingDialog .reject-packing-table select{min-width:132px;width:100%;box-sizing:border-box}
#productionPackingDialog .reject-packing-table input[name="rejectDefectNote"]{min-width:190px;text-align:left}
#productionPackingViewDialog .reject-packing-table{min-width:1320px}
#productionPackingViewDialog [data-packing-shipment-history-host]{margin-top:18px;padding-top:10px;border-top:1px solid #dfe4ec}
#productionPackingViewDialog .packing-history-table{min-width:760px}
@media(max-width:720px){#productionPackingDialog,#productionPackingViewDialog{width:96vw}#productionPackingDialog form,#productionPackingViewDialog form{padding:20px}.packing-sheet-header{grid-template-columns:1fr}.packing-header-fields,#productionPackingDialog .packing-order-header-fields{grid-template-columns:1fr}.packing-bottom-sheet{grid-template-columns:1fr 1fr}.packing-bottom-sheet>div{border-bottom:1px solid #596273}#productionPackingDialog .packing-order-header-fields .packing-location-field{grid-column:auto}}

/* Packing sheets: age-group sizes live in the tables; all columns fit the dialog without horizontal scrolling. */
#productionPackingDialog .packing-size-labels[hidden]{display:none!important}
#productionPackingDialog form,#productionPackingViewDialog form{overflow-x:hidden!important}
#productionPackingDialog .packing-table-wrap,#productionPackingViewDialog .packing-table-wrap{width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:hidden!important}
#productionPackingDialog .packing-list-table,#productionPackingViewDialog .packing-list-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
#productionPackingDialog .packing-list-table th,#productionPackingDialog .packing-list-table td,#productionPackingViewDialog .packing-list-table th,#productionPackingViewDialog .packing-list-table td{min-width:0!important;height:auto!important;padding:3px 2px!important;font-size:9.5px!important;line-height:1.2!important;overflow-wrap:anywhere}
#productionPackingDialog .packing-list-table input,#productionPackingDialog .packing-list-table select{width:100%!important;min-width:0!important;max-width:100%!important;padding:2px 1px!important;font-size:9.5px!important;box-sizing:border-box!important}
#productionPackingDialog .reject-packing-table,#productionPackingViewDialog .reject-packing-table{min-width:0!important}
#productionPackingDialog .reject-packing-table select,#productionPackingDialog .reject-packing-table input[name="rejectDefectNote"]{min-width:0!important;width:100%!important}
/* Give both editable packing-detail tables one-third more vertical room. */
#productionPackingDialog .packing-list-table th,#productionPackingDialog .packing-list-table td{height:32px!important;padding-block:4px!important}
#productionPackingDialog .packing-list-table input,#productionPackingDialog .packing-list-table select{line-height:1.45!important}
/* Packing-list figures are double-sized and every table label/value is solid black. */
#productionPackingDialog .packing-list-table,#productionPackingDialog .packing-list-table th,#productionPackingDialog .packing-list-table td,#productionPackingDialog .packing-list-table input,#productionPackingDialog .packing-list-table select,#productionPackingDialog .packing-list-table button{color:#000!important;-webkit-text-fill-color:#000!important}
#productionPackingDialog .packing-list-table tbody input[type="number"],#productionPackingDialog .packing-list-table tbody input[name="cartonNo"],#productionPackingDialog .packing-list-table tbody input[name="rejectCartonNo"],#productionPackingDialog .packing-list-table [data-packing-row-total],#productionPackingDialog .packing-list-table [data-packing-size-total],#productionPackingDialog .packing-list-table [data-reject-size-total],#productionPackingDialog .packing-list-table [data-packing-main-weight],#productionPackingDialog .packing-list-table [data-packing-main-cartons],#productionPackingDialog .packing-list-table [data-packing-main-total],#productionPackingDialog .packing-list-table [data-reject-packing-weight],#productionPackingDialog .packing-list-table [data-reject-packing-cartons],#productionPackingDialog .packing-list-table [data-reject-packing-total]{font-size:19px!important;font-weight:700!important}
/* Packing table headings are 10% larger and wrap when a narrow column cannot hold the full label. Quantity figures are 20% smaller than the prior 19px display. */
#productionPackingDialog .packing-list-table thead th{font-size:10.45px!important;line-height:1.25!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
#productionPackingDialog .packing-list-table tbody input[type="number"],#productionPackingDialog .packing-list-table [data-packing-row-total],#productionPackingDialog .packing-list-table [data-packing-size-total],#productionPackingDialog .packing-list-table [data-reject-size-total],#productionPackingDialog .packing-list-table [data-packing-main-weight],#productionPackingDialog .packing-list-table [data-packing-main-cartons],#productionPackingDialog .packing-list-table [data-packing-main-total],#productionPackingDialog .packing-list-table [data-reject-packing-weight],#productionPackingDialog .packing-list-table [data-reject-packing-cartons],#productionPackingDialog .packing-list-table [data-reject-packing-total]{font-size:15.2px!important;line-height:1.25!important}
/* Match the good-carton count and reject-type widths; keep the delete action compact. */
#productionPackingDialog .packing-list-table :is(th,td).packing-cartons-column,#productionPackingDialog .reject-packing-table :is(th,td).packing-defect-type-column{width:104px!important}
#productionPackingDialog .reject-packing-table :is(th,td).packing-defect-note-column{width:132px!important}
#productionPackingDialog .packing-list-table :is(th,td).packing-delete-column{width:36px!important;padding-inline:2px!important}
#productionPackingDialog .reject-packing-table thead .packing-defect-type-column{font-size:12.5px!important;line-height:1.25!important}
#productionPackingDialog .reject-packing-table .packing-defect-type-column select{font-size:12px!important;font-weight:700!important;padding:3px 4px!important}
#productionPackingDialog .packing-delete-column button{display:grid;place-items:center;width:28px;height:28px;margin:auto;padding:0!important;font-size:18px!important;line-height:1!important}
@page{size:A4 portrait;margin:8mm}
@media print{body:has(#productionPackingViewDialog[open])>*:not(#productionPackingViewDialog){display:none!important}#productionPackingViewDialog[open]{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}#productionPackingViewDialog[open] form{padding:0!important;overflow:visible!important}#productionPackingViewDialog[open] .dialog-head button,#productionPackingViewDialog[open] .dialog-actions{display:none!important}#productionPackingViewDialog[open] table{width:100%!important;min-width:0!important;table-layout:fixed}#productionPackingViewDialog[open] th,#productionPackingViewDialog[open] td{padding:3px!important;font-size:8px!important}}
@media print{body:has(#productionPackingDialog[open])>*:not(#productionPackingDialog){display:none!important}#productionPackingDialog[open]{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}#productionPackingDialog[open] form{padding:0!important;max-height:none!important;overflow:visible!important}#productionPackingDialog[open] .dialog-head button,#productionPackingDialog[open] .dialog-actions,#productionPackingDialog[open] [data-add-packing-row],#productionPackingDialog[open] [data-add-reject-packing-row],#productionPackingDialog[open] [data-remove-packing-row],#productionPackingDialog[open] [data-remove-reject-packing-row]{display:none!important}#productionPackingDialog[open] table{width:100%!important;min-width:0!important;table-layout:fixed}#productionPackingDialog[open] th,#productionPackingDialog[open] td{font-size:8px!important}}
/* TypeScript-owned income and cost ledger. Keep the migrated page visually
   identical to the former final runtime patch while removing its observers. */
#costs .title-row>#costQuickNav{grid-template-columns:repeat(7,minmax(0,1fr))!important;width:min(1190px,calc(100% - 245px))!important;overflow:visible!important;padding-bottom:2px!important}
#costQuickNav>.monthly-analysis-card,#costQuickNav>#monthlyAnalysisNav>.monthly-analysis-card{min-height:68px!important;min-width:0!important;width:100%!important}
#costQuickNav>#openOverheadLedger{min-height:68px!important;min-width:0!important;width:100%!important;padding:8px 10px!important}
.finance-ledger-actions,.finance-ledger-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.finance-ledger-toolbar{padding:13px 16px;margin-bottom:14px}.finance-ledger-toolbar label{display:flex;align-items:center;gap:6px;font-weight:750}.finance-ledger-toolbar span{margin-left:auto;color:#68748b;font-size:12px}
#financeLedgerPage{max-width:none}
.finance-ledger-metrics{margin-bottom:14px}.finance-ledger-table{overflow:hidden}.finance-ledger-table-scroll{width:100%;overflow-x:hidden;overflow-y:visible}.finance-ledger-table table{width:100%;min-width:0;table-layout:fixed}.finance-ledger-table :is(th,td){box-sizing:border-box;padding:8px 5px;font-size:11.5px;line-height:1.2;vertical-align:top;white-space:normal;overflow-wrap:anywhere}.finance-ledger-table th{font-size:10.5px;line-height:1.2}.finance-ledger-table th:nth-child(1){width:7%}.finance-ledger-table th:nth-child(2){width:9%}.finance-ledger-table th:nth-child(3){width:10%}.finance-ledger-table th:nth-child(4){width:9%}.finance-ledger-table th:nth-child(5){width:11%}.finance-ledger-table th:nth-child(6){width:12%}.finance-ledger-table th:nth-child(7){width:7%}.finance-ledger-table th:nth-child(8){width:10%}.finance-ledger-table th:nth-child(9){width:10%}.finance-ledger-table th:nth-child(10){width:9%}.finance-ledger-table th:nth-child(11){width:6%}.finance-ledger-table td small{display:block;margin-top:3px;color:#758097}.finance-ledger-table :is(.tag,.secondary,.icon-btn){box-sizing:border-box;max-width:100%;min-width:0;white-space:normal}.finance-ledger-table .tag{padding:3px 5px;font-size:10px}.finance-ledger-table :is(.secondary,.icon-btn){padding:5px 6px;font-size:10px}
.finance-ledger-table th:nth-child(6),.invoice-register-table th:nth-child(8),.finance-source-document{width:170px;min-width:170px;max-width:170px}.finance-source-reference,.finance-source-document small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.finance-ledger-table th:nth-child(6),.finance-ledger-table .finance-source-document{width:12%;min-width:0;max-width:none}.finance-ledger-table .finance-source-reference,.finance-ledger-table .finance-source-document small{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
#financeExpenseDialog,#financeSettlementDialog{width:min(980px,96vw);max-height:94vh}#financeExpenseDialog form,#financeSettlementDialog form{padding:26px 30px;max-height:94vh;overflow:auto}
.finance-settlement-preview{padding:12px 14px;background:#f0f7ff;border:1px solid #cfe2ff;border-radius:9px;color:#28466f}
.finance-overhead-link{margin:16px 0 0;padding:14px;border:1px solid #dfe4ef;border-radius:10px;background:#f8f9fc;display:grid;grid-template-columns:1fr 1fr;gap:10px}.finance-overhead-link legend{font-weight:800;padding:0 7px}.finance-overhead-link .finance-overhead-check{display:flex;align-items:center;gap:8px}.finance-overhead-check input{width:auto}.finance-overhead-link small{grid-column:1/-1;color:#6f7b92}
@media(max-width:1100px){#costs .title-row>#costQuickNav{width:100%!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;margin-left:0!important}#costQuickNav .monthly-analysis-card small{display:none}}
@media(max-width:820px){#costs .title-row>#costQuickNav{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:560px){#costs .title-row>#costQuickNav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.finance-overhead-link{grid-template-columns:1fr}}
/* TypeScript-owned invoice and purchase document register. */
#costs .title-row>#costQuickNav{grid-template-columns:repeat(8,minmax(0,1fr))!important;width:min(1280px,calc(100% - 220px))!important}
#openInvoiceRegister{min-height:68px!important;min-width:0!important;width:100%!important}
.invoice-register-toolbar{display:grid;grid-template-columns:minmax(280px,1fr) repeat(4,minmax(125px,165px));gap:10px;align-items:end;padding:14px 16px;margin-bottom:14px}.invoice-register-toolbar label{display:grid;gap:5px;color:#5e6980;font-size:11px;font-weight:750}.invoice-register-toolbar input,.invoice-register-toolbar select{height:39px;margin:0}
.invoice-register-metrics{margin-bottom:14px}.invoice-register-table{overflow:hidden}.invoice-register-table-scroll{overflow:auto}.invoice-register-table table{min-width:1580px}.invoice-register-table td small{display:block;margin-top:3px;color:#758096}.invoice-register-caption{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid #e4e8f0;color:#526078}.invoice-register-notes{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.invoice-register-table tfoot th{background:#29364f;color:#fff;padding:12px}
#invoiceRegisterFixedScrollbar{position:fixed;z-index:1250;bottom:7px;height:18px;overflow-x:auto;overflow-y:hidden;border:1px solid #cfd7e6;border-radius:9px;background:#f7f9fc;box-shadow:0 5px 18px rgba(32,48,78,.18);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease}#invoiceRegisterFixedScrollbar.is-visible{opacity:1;visibility:visible;pointer-events:auto}#invoiceRegisterFixedScrollbar>div{height:1px;pointer-events:none}#invoiceRegisterFixedScrollbar::-webkit-scrollbar{height:14px}#invoiceRegisterFixedScrollbar::-webkit-scrollbar-track{background:#eef2f8;border-radius:8px}#invoiceRegisterFixedScrollbar::-webkit-scrollbar-thumb{background:#8997b2;border:3px solid #eef2f8;border-radius:8px}#invoiceRegisterFixedScrollbar::-webkit-scrollbar-thumb:hover{background:#64738f}
#invoiceRegisterDetailDialog{width:min(820px,94vw)}#invoiceRegisterDetailDialog form{padding:25px 29px}.invoice-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.invoice-detail-grid span{padding:11px 13px;border:1px solid #e1e6ef;border-radius:9px;background:#fafbfd}.invoice-detail-grid small,.invoice-detail-grid b{display:block}.invoice-detail-grid small{color:#7b8495;font-size:10px}.invoice-detail-grid b{margin-top:4px;color:#29364f}
@media(max-width:1100px){#costs .title-row>#costQuickNav{width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}.invoice-register-toolbar{grid-template-columns:1fr 1fr 1fr}}@media(max-width:650px){.invoice-register-toolbar{grid-template-columns:1fr}.invoice-detail-grid{grid-template-columns:1fr}}
/* TypeScript-owned complete order cost archive. */
.cost-record-icon{width:42px;height:42px;display:inline-grid;place-items:center;margin-left:7px;padding:0;border:1px solid #dfe3ed;border-radius:12px;background:#f5f6fa;color:#545fe8;cursor:pointer;vertical-align:middle;transition:.18s}.cost-record-icon:hover,.cost-record-icon:focus-visible{transform:translateY(-3px);background:#6258e8;border-color:#6258e8;color:#fff;box-shadow:0 10px 20px rgba(83,73,214,.24);outline:0}.cost-edit-icon{color:#9a6700;background:#fff8e6;border-color:#f0d99c}.cost-archive-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}.cost-archive-actions .cost-record-icon{margin-left:0}
.order-cost-list-search{position:relative;display:block;width:min(340px,32vw);margin-left:auto}.order-cost-list-search svg{position:absolute;left:12px;top:50%;width:17px;height:17px;transform:translateY(-50%);fill:none;stroke:#69758b;stroke-width:1.8;stroke-linecap:round;pointer-events:none}.order-cost-list-search input{width:100%;height:42px;padding:0 13px 0 38px;border:1px solid #d8deea;border-radius:10px;background:#fff;color:#1d293d;font:inherit;outline:0}.order-cost-list-search input:focus{border-color:#6960ed;box-shadow:0 0 0 3px rgba(105,96,237,.12)}
.finance-order-cost-card>.card-title{align-items:flex-end;gap:18px}.finance-order-cost-toolbar{display:grid!important;grid-template-columns:250px 96px 76px!important;align-items:center;justify-content:end;gap:8px;margin-left:auto;flex:0 0 auto;min-width:438px;max-width:100%;overflow-x:auto}.finance-order-cost-toolbar select,.finance-order-cost-toolbar input{box-sizing:border-box;width:100%!important;height:40px;min-width:0!important;margin:0!important;border:1px solid #d8deea;border-radius:9px;background:#fff;padding:0 10px;color:#1d293d;font:inherit}.finance-order-pagination,.cost-archive-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid #e3e7ef;background:#fafbfe;color:#6c778e;font-size:12px}.finance-order-pagination>div,.cost-archive-pagination>div{display:flex;align-items:center;gap:9px}.finance-order-pagination button,.cost-archive-pagination button{min-height:34px;padding:6px 11px}.finance-order-pagination button:disabled,.cost-archive-pagination button:disabled{opacity:.45;cursor:not-allowed}
#orderCostArchiveDialog{width:min(1500px,97vw);max-width:97vw;max-height:94vh;padding:0}#orderCostArchiveDialog .cost-archive-shell{padding:24px;max-height:94vh;overflow:auto}.cost-archive-filters{display:grid;grid-template-columns:140px 140px 140px minmax(180px,1fr) minmax(260px,2fr);gap:10px;margin:16px 0 8px}.cost-archive-filters select,.cost-archive-filters input{height:42px;border:1px solid #d8deea;border-radius:9px;padding:0 12px;background:#fff}.cost-archive-count{font-size:12px;color:#69758c;margin:8px 0}.cost-archive-table-wrap,.cost-record-table-wrap{overflow:auto;border:1px solid #d9dfe9;border-radius:9px}.cost-archive-table-wrap table,.cost-record-table-wrap table{width:100%;border-collapse:collapse;min-width:1120px}.cost-archive-table-wrap th,.cost-archive-table-wrap td,.cost-record-table-wrap th,.cost-record-table-wrap td{padding:10px;border-bottom:1px solid #e6e9f0;text-align:left;font-size:12px}.cost-archive-table-wrap th,.cost-record-table-wrap th{background:#2d4777;color:#fff;white-space:nowrap}.cost-archive-table-wrap small,.cost-archive-order small{display:block;color:#77839a;margin-top:3px}.cost-archive-order{display:flex;align-items:center;gap:9px}.cost-archive-order img,.cost-archive-order>span{width:44px;height:44px;object-fit:cover;border-radius:8px;background:#eef0fb;display:grid;place-items:center;color:#655ce7;font-size:20px}.cost-archive-empty{text-align:center!important;padding:36px!important;color:#7a8598}
#orderCostArchivePage[data-cost-archive-renderer="typescript-v1"] .cost-archive-shell{padding:20px;overflow:hidden}#orderCostArchivePage .cost-archive-filters{margin-top:0}#orderCostArchivePage .cost-archive-table-wrap{max-height:calc(100vh - 270px);overflow:auto}#orderCostArchivePage .cost-archive-table-wrap th{position:sticky;top:0;z-index:2}

/* TypeScript overhead ledger retains the pre-migration spreadsheet layout. */
#overheadLedgerPage>.title-row{align-items:center;gap:14px}#overheadLedgerModuleNav{display:grid!important;grid-template-columns:repeat(2,minmax(145px,190px))!important;gap:8px!important;margin:0 0 0 auto!important;max-width:390px}#overheadLedgerModuleNav .style-quick-card{min-height:62px!important;height:62px;padding:8px 10px!important;gap:8px!important;border-radius:10px!important}#overheadLedgerModuleNav .style-quick-card.active{border-color:#645cf3;background:#f5f4ff;box-shadow:0 4px 12px rgba(83,76,223,.12)}#overheadLedgerModuleNav .metric-icon{width:38px;height:38px;min-width:38px;font-size:16px;border-radius:9px}#overheadLedgerModuleNav b{font-size:12px}#overheadLedgerModuleNav small{font-size:9px;margin-top:2px;line-height:1.2}.ledger-scope-summary{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px;margin:0 0 14px}.ledger-scope-summary article{background:#fff;border:1px solid #dce2ed;border-radius:12px;padding:14px 16px}.ledger-scope-summary span,.ledger-scope-summary strong,.ledger-scope-summary small{display:block}.ledger-scope-summary span{font-size:12px;color:#66728a}.ledger-scope-summary strong{font-size:20px;margin:5px 0;color:#17233d}.ledger-scope-summary small{font-size:10px;color:#8791a4}.overhead-sheet-card{padding:0;overflow:hidden}.overhead-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px;border-bottom:1px solid #d7deea}.overhead-sheet-head h2{margin:0 0 4px}.overhead-sheet-head p{margin:0;color:#77829a}.overhead-period-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.overhead-period-controls select{min-width:150px}.overhead-period-controls .primary{white-space:nowrap;padding:10px 13px}.overhead-sheet-scroll{overflow:auto;max-width:100%}.overhead-grid-table{min-width:1160px;border-collapse:collapse}.overhead-grid-table th,.overhead-grid-table td{border:1px solid #758099;padding:0;text-align:center}.overhead-grid-table thead>tr:first-child th{background:#4775c5;color:#fff;font-size:15px;padding:12px 8px}.overhead-grid-table .ledger-project-head{min-width:310px;text-align:left;padding-left:16px!important}.ledger-grand-total th{background:#f3f6fb!important;color:#16233d!important;font-size:16px;padding:10px!important}.ledger-month-total-button{width:100%;border:0;background:transparent;color:#17233c;cursor:pointer;font:inherit;font-weight:800;padding:2px}.ledger-month-total-button:hover{color:#5048dc}.ledger-month-total-button small{display:block;font-size:9px;font-weight:600;color:#7a8498;margin-top:2px}.ledger-section-row th{background:#e9edf4;font-weight:800;padding:9px 10px;text-align:left}.ledger-section-row th:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px}.ledger-section-row th:not(:first-child){text-align:right}.ledger-section-actions{display:flex;gap:6px}.ledger-section-row button{border:0;background:#fff;color:#5048dc;border-radius:7px;padding:5px 9px;cursor:pointer}.ledger-section-row .ledger-undo-button{color:#58647c}.ledger-section-row .ledger-undo-button:disabled{opacity:.4;cursor:not-allowed}.ledger-row-name{display:flex;align-items:center;gap:6px;min-width:310px;padding:5px 8px!important}.ledger-child-row .ledger-row-name{padding-left:30px!important;background:#fafbfe}.ledger-child-row td{background:#fafbfe}.ledger-row-number{min-width:20px;font-weight:700}.ledger-branch-toggle,.ledger-branch-toggle-placeholder{width:20px;min-width:20px}.ledger-branch-toggle{border:0;background:transparent;color:#4e59a7;cursor:pointer;font-size:16px;padding:0}.ledger-add-branch{width:24px;height:24px;min-width:24px;border:1px solid #d9deeb;background:#f4f6fa;color:#56617a;border-radius:6px;padding:0;font-size:15px;line-height:22px;text-align:center;cursor:pointer}.ledger-row-name input{width:100%;border:0;background:transparent;padding:7px;font-weight:650}.ledger-row-name input:focus{outline:2px solid #7b75ed;border-radius:5px;background:#fff}.ledger-delete-row{border:0;background:transparent;color:#c74848;font-size:18px;cursor:pointer}.ledger-auto-tag{white-space:nowrap;border-radius:999px;background:#e7f7ee;color:#188452;font-size:10px;font-weight:700;padding:4px 7px}.ledger-auto-tag.reference{background:#e8edff;color:#4455b9}.ledger-reference-row td,.ledger-reference-cell{background:#f3f5ff!important}.ledger-reference-cell .ledger-record-amount{color:#4455b9!important}.ledger-amount-cell{min-width:140px;padding:5px!important}.ledger-record-amount{min-width:92px;border:0;border-bottom:1px dotted #aeb7c8;background:transparent;color:#24334f;text-align:right;padding:7px 5px;font:inherit;font-weight:700;cursor:pointer}.ledger-record-amount:hover{color:#5148df;background:#f1f0ff;border-radius:6px}.ledger-auto-cell{background:#f3faf6}.ledger-auto-cell .ledger-record-amount{border-bottom:0;color:#168354}.ledger-amount-cell small{display:inline-block;min-width:40px;color:#6d7890;text-align:right}.overhead-grid-table tfoot th{background:#26334d;color:#fff;padding:12px;font-size:16px}.ledger-management-total th{background:#e8edff!important;color:#263c91!important;padding:10px!important}.overhead-autosave-note{text-align:right;padding:10px 18px;color:#6f7b93;font-size:13px;background:#fafbfe}#cmtExpenseDialog,#overheadMonthDetailDialog,#overheadRowDetailDialog{width:min(1120px,96vw);max-width:96vw}#cmtExpenseDialog form,#overheadMonthDetailDialog form,#overheadRowDetailDialog form{padding:26px;max-height:90vh;overflow:auto}.overhead-detail-scroll{overflow:auto}.overhead-detail-scroll table{min-width:900px}.ledger-detail-notes{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ledger-delete-entry{border:0;border-radius:7px;padding:6px 9px;color:#b43d3d;background:#fff0f0;cursor:pointer}@media(max-width:1100px){#overheadLedgerPage>.title-row{flex-wrap:wrap}#overheadLedgerModuleNav{order:3;width:100%;margin-left:0!important;max-width:390px}.ledger-scope-summary{grid-template-columns:repeat(2,minmax(180px,1fr))}}@media(max-width:760px){#overheadLedgerModuleNav{grid-template-columns:1fr!important;max-width:320px}.ledger-scope-summary{grid-template-columns:1fr}.overhead-sheet-head{align-items:flex-start;flex-direction:column}.overhead-period-controls{width:100%}.overhead-period-controls select{min-width:0;flex:1}}
#orderCostRecordDialog{width:min(1350px,96vw);max-width:96vw;max-height:94vh;padding:0}#orderCostRecordDialog .cost-record-shell{padding:24px;max-height:94vh;overflow:auto;background:#f7f8fb}#orderCostRecordDialog h3{margin:18px 0 8px}.cost-record-header{display:grid;grid-template-columns:88px repeat(4,1fr);background:#fff;border:1px solid #d8deea;margin:12px 0 16px}.cost-record-header>img,.cost-record-header>span{width:88px;height:78px;object-fit:contain;display:grid;place-items:center;color:#655ce7;font-size:25px}.cost-record-header>div{padding:12px;border-left:1px solid #d8deea}.cost-record-header small,.cost-record-header b{display:block}.cost-record-header small{color:#768198;margin-bottom:5px}.cost-record-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:9px;margin-top:16px}.cost-record-summary article{padding:12px;background:#fff;border:1px solid #d8deea;border-radius:8px}.cost-record-summary span,.cost-record-summary b{display:block}.cost-record-summary span{font-size:11px;color:#768198}.cost-record-summary b{margin-top:5px}
@media(max-width:900px){.cost-archive-filters{grid-template-columns:1fr 1fr}.cost-record-header{grid-template-columns:78px 1fr 1fr}.cost-record-summary{grid-template-columns:1fr 1fr 1fr}.order-cost-list-search{width:min(280px,45vw)}.finance-order-cost-card>.card-title{align-items:flex-start;flex-direction:column}.finance-order-cost-toolbar{width:100%;margin-left:0;justify-content:start}}
/* TypeScript monthly finance analysis.  These selectors intentionally mirror
   the migration baseline; ownership moved, the visible layout did not. */
#costs .title-row>#costQuickNav{display:grid!important;grid-template-columns:repeat(6,minmax(138px,1fr))!important;grid-auto-flow:column!important;gap:8px!important;width:min(1050px,calc(100% - 260px))!important;max-width:none!important;margin:0 0 0 auto!important;overflow-x:auto!important;overflow-y:hidden!important;padding:2px 2px 8px!important}
#costQuickNav>#monthlyAnalysisNav{display:contents}.monthly-analysis-card{min-height:68px;min-width:138px;border:1px solid #e1e5ee;background:#fff;border-radius:11px;padding:8px 10px;display:flex;align-items:center;gap:8px;color:#33415d;cursor:pointer;text-align:left;transition:.18s ease}.monthly-analysis-card:hover{transform:translateY(-2px);border-color:#aaa5ff;box-shadow:0 8px 18px rgba(69,62,170,.13)}.monthly-analysis-card.active{border-color:#625af1;background:#f5f4ff;box-shadow:0 5px 14px rgba(83,76,223,.14)}.monthly-analysis-icon{width:34px;height:34px;min-width:34px;border-radius:9px;background:#eef1ff;color:#574fe0;display:grid;place-items:center;font-weight:850}.monthly-analysis-card b{display:block;font-size:11px;white-space:nowrap}.monthly-analysis-card small{display:block;margin-top:3px;color:#7b8497;font-size:8px;line-height:1.2}#costs #openOverheadLedger{min-width:138px!important;min-height:68px!important;padding:8px 10px!important}.monthly-analysis-sheet{display:grid;gap:14px}.monthly-analysis-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:19px 21px;background:#fff;border:1px solid #e4e8f0;border-radius:13px}.monthly-analysis-head.monthly-analysis-actions{justify-content:flex-end;padding:0;background:transparent;border:0;border-radius:0}.monthly-analysis-head h2{margin:2px 0 3px}.monthly-analysis-head p{margin:0;color:#748096}.monthly-analysis-filters{display:flex;align-items:end;gap:9px}.monthly-analysis-filters label{display:grid;gap:4px;color:#566179;font-size:11px;font-weight:750}.monthly-analysis-filters select{min-width:112px}.monthly-analysis-scroll{overflow:auto}.monthly-analysis-table table{min-width:960px}.monthly-analysis-table td small{display:block;color:#7b8497;margin-top:3px}.monthly-analysis-table tfoot th{background:#29364f;color:#fff;padding:12px}.analysis-total-row td{font-size:15px;background:#f5f7fb}.monthly-analysis-table .up{color:#178452}.monthly-analysis-table .warn{color:#c44949}
.monthly-analysis-table .accounting-major td{background:#ead4ff;font-weight:800;border-top-color:#7f55aa;border-bottom-color:#7f55aa}.monthly-analysis-table .accounting-major td:nth-child(2){font-size:14px}.monthly-analysis-table .accounting-child td:nth-child(2){padding-left:28px}.monthly-analysis-table .accounting-child td:first-child{font-weight:750}.monthly-analysis-table .accounting-major td:first-child,.monthly-analysis-table .accounting-major td:nth-child(3){text-align:center}.monthly-analysis-table th:nth-child(1){width:72px}.monthly-analysis-table th:nth-child(3){width:150px}.monthly-analysis-table th:nth-child(4){width:190px}.monthly-analysis-table th:nth-child(5){width:230px}.accounting-report-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 16px;background:#fff;border:1px solid #e4e8f0;border-radius:12px}.accounting-report-actions span{margin-left:auto;color:#69758d;font-size:13px}.accounting-amount-button{border:0;background:transparent;color:#4f46db;font:inherit;font-weight:800;cursor:pointer;padding:5px 7px;border-radius:7px}.accounting-amount-button:hover{background:#f0efff}#accountingSubjectDialog,#accountingJournalDialog{width:min(1180px,96vw);max-width:96vw}#accountingSubjectDialog form,#accountingJournalDialog form{padding:24px;max-height:92vh;overflow:auto}.accounting-subject-scroll,.accounting-journal-scroll{overflow:auto;margin:14px 0}.accounting-subject-scroll table{min-width:780px}.accounting-journal-scroll table{min-width:1050px}.accounting-subject-scroll input[name="name"]{min-width:280px}.accounting-journal-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:11px 13px;background:#f5f7fb;border-radius:10px}.accounting-journal-toolbar label{display:flex;align-items:center;gap:8px;font-weight:750}.accounting-journal-toolbar span{font-size:13px}.accounting-journal-scroll td small{display:block;margin-top:3px;color:#748096}
.shortage-detail-analysis table{min-width:2700px;border-collapse:collapse}.shortage-detail-analysis caption{padding:12px;background:#263a66;color:#fff;font-size:17px;font-weight:850;letter-spacing:.03em}.shortage-detail-analysis th,.shortage-detail-analysis td{border:1px dotted #566177;padding:7px 8px;text-align:center;vertical-align:middle;white-space:nowrap}.shortage-detail-analysis thead th{background:#eef1f6;color:#26324a;font-size:11px;line-height:1.25}.shortage-detail-analysis td:nth-child(17),.shortage-detail-analysis td:nth-child(19),.shortage-detail-analysis td:nth-child(21),.shortage-detail-analysis td:nth-child(23),.shortage-detail-analysis td:nth-child(25),.shortage-detail-analysis td:nth-child(27){min-width:220px;max-width:300px;text-align:left;white-space:normal;line-height:1.4}.shortage-subtotal td{background:#f2b36f!important;color:#3d2a16;font-weight:850;border-top:2px solid #9f6226!important;border-bottom:2px solid #9f6226!important}
.shortage-detail-analysis :is(th,td):nth-child(5){width:84px!important;min-width:84px!important;max-width:84px!important;font-variant-numeric:tabular-nums}
.sales-profit-summary table{min-width:5050px;border-collapse:collapse}.sales-profit-variance-note{margin:0;padding:10px 14px;color:#66738b;background:#f7f8fb;border-bottom:1px solid #dfe4ed}.sales-profit-summary caption{padding:12px;background:#314a75;color:#fff;font-size:17px;font-weight:850}.sales-profit-summary th,.sales-profit-summary td{border:1px solid #778196;padding:7px 8px;text-align:right;white-space:nowrap}.sales-profit-summary thead th{background:#d5d7db;color:#17233a;text-align:center;font-size:11px}.sales-profit-summary td:nth-child(-n+5){text-align:left}.sales-profit-summary tbody tr:not(.profit-client-subtotal) td:nth-child(10),.sales-profit-summary tbody tr:not(.profit-client-subtotal) td:nth-child(13){background:#fff978}.profit-client-subtotal td{background:#efb375!important;color:#422b13;font-weight:850;border-top:2px solid #9c5b1f!important;border-bottom:2px solid #9c5b1f!important}
/* Sales-profit widths follow the information density instead of equal columns. */
.sales-profit-summary table{width:4310px!important;min-width:4310px!important;table-layout:fixed}
.sales-profit-summary :is(th,td){box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}
.sales-profit-summary thead tr:first-child th:nth-child(1),.sales-profit-summary tbody td:nth-child(1){width:104px!important}
.sales-profit-summary thead tr:first-child th:nth-child(2),.sales-profit-summary tbody td:nth-child(2){width:82px!important}
.sales-profit-summary thead tr:first-child th:nth-child(3),.sales-profit-summary tbody td:nth-child(3){width:112px!important}
.sales-profit-summary thead tr:first-child th:nth-child(4),.sales-profit-summary tbody td:nth-child(4){width:92px!important;max-width:92px!important}
.sales-profit-summary thead tr:first-child th:nth-child(5),.sales-profit-summary tbody td:nth-child(5){width:108px!important;max-width:108px!important}
.sales-profit-summary thead tr:first-child th:nth-child(n+6):nth-child(-n+9),.sales-profit-summary tbody td:nth-child(n+6):nth-child(-n+9){width:78px!important}
.sales-profit-summary thead tr:first-child th:nth-child(n+10):nth-child(-n+13),.sales-profit-summary tbody td:nth-child(n+10):nth-child(-n+13){width:116px!important}
.sales-profit-summary thead tr:first-child th:last-child{width:3036px!important}
.sales-profit-summary thead tr:nth-child(2) th,.sales-profit-summary tbody td:nth-child(n+14){width:92px!important}
.output-cost-analysis table,.pnl-order-analysis table{min-width:1120px;border-collapse:collapse}.output-cost-analysis th,.output-cost-analysis td,.pnl-order-analysis th,.pnl-order-analysis td{border:1px dotted #586276;text-align:right;white-space:nowrap}.output-cost-analysis th:first-child,.output-cost-analysis td:first-child,.pnl-order-analysis th:first-child,.pnl-order-analysis td:first-child{text-align:left;min-width:245px}.output-cost-analysis thead th{background:#6f9f9d;color:#071e2e;text-align:center}.pnl-order-analysis thead th{background:#6287cd;color:#fff;text-align:center}.output-cost-analysis .output-summary-row td,.pnl-order-analysis .pnl-summary-row td{font-weight:850;background:#f5f7fb}.output-cost-analysis .output-section-row td{background:#e8eef6;font-weight:850;text-align:left!important}.output-cost-analysis .output-percent-row td,.pnl-order-analysis .pnl-percent-row td{font-size:11px;color:#59667d;background:#fbfcfe}.pnl-order-analysis .pnl-final-row td{font-weight:900;background:#fff0dc;color:#9a4f00;border-top:2px solid #d9933d}
@media(max-width:1100px){#costs>.title-row{flex-wrap:wrap}#costs .title-row>#costQuickNav{width:100%!important;grid-template-columns:repeat(6,minmax(138px,1fr))!important;margin-left:0!important}}@media(max-width:760px){.monthly-analysis-head{align-items:flex-start;flex-direction:column}.monthly-analysis-filters{width:100%;flex-wrap:wrap}}

/* Final finance quick-navigation baseline: eight equal cards in one row. */
#costs>.title-row>#costQuickNav{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;flex:1 1 100%!important;padding:2px 0!important;display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:8px!important;overflow:visible!important}
#costQuickNav>#monthlyAnalysisNav{display:contents!important}#openFinanceLedger{order:1!important}#openInvoiceRegister{order:2!important}#monthlyAnalysisNav>[data-monthly-analysis="cost"]{order:3!important}#monthlyAnalysisNav>[data-monthly-analysis="profit"]{order:4!important}#monthlyAnalysisNav>[data-monthly-analysis="shortage"]{order:5!important}#monthlyAnalysisNav>[data-monthly-analysis="output"]{order:6!important}#monthlyAnalysisNav>[data-monthly-analysis="pnl"]{order:7!important}#openOverheadLedger{order:8!important}
#costQuickNav>.monthly-analysis-card,#costQuickNav>#monthlyAnalysisNav>.monthly-analysis-card,#costQuickNav>#openOverheadLedger{width:100%!important;min-width:0!important;height:68px!important;min-height:68px!important;max-height:68px!important;padding:8px 7px!important;gap:7px!important;box-sizing:border-box!important;overflow:hidden!important}
#costQuickNav .monthly-analysis-icon,#costQuickNav #openOverheadLedger .metric-icon{width:32px!important;min-width:32px!important;height:32px!important}#costQuickNav .monthly-analysis-card>span:last-child,#costQuickNav #openOverheadLedger>span:last-child{min-width:0!important}#costQuickNav .monthly-analysis-card b,#costQuickNav #openOverheadLedger b{font-size:11px!important;white-space:nowrap!important}#costQuickNav .monthly-analysis-card small,#costQuickNav #openOverheadLedger small{font-size:8px!important;line-height:1.2!important;overflow:hidden!important;text-overflow:ellipsis!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
#costSystemRoot .cost-archive-metric{min-width:0;padding:19px;border:1px solid #ebedf2;border-radius:11px;background:#fff;color:#1d2433;display:flex;align-items:flex-start;gap:13px;text-align:left;font:inherit;cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
#costSystemRoot .cost-archive-metric:hover,#costSystemRoot .cost-archive-metric:focus-visible{transform:translateY(-3px);border-color:#b9b6f5;background:#fcfcff;box-shadow:0 9px 22px rgba(73,67,180,.15);outline:none}
#costSystemRoot .cost-archive-metric>span:last-child{min-width:0}
#costSystemRoot .cost-archive-metric .metric-icon{flex:0 0 37px;transition:transform .18s ease,box-shadow .18s ease}
#costSystemRoot .cost-archive-metric:hover .metric-icon,#costSystemRoot .cost-archive-metric:focus-visible .metric-icon{transform:scale(1.1);box-shadow:0 6px 14px rgba(77,125,231,.18)}
#costSystemRoot .cost-archive-metric .metric-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#costSystemRoot>.metrics>article,#costSystemRoot>.metrics>.cost-archive-metric{height:88px;min-height:88px;padding:10px 14px;align-items:center}
#costSystemRoot>.metrics{align-items:stretch}
@media(max-width:1180px){#costs>.title-row>#costQuickNav{grid-template-columns:repeat(4,minmax(0,1fr))!important}}@media(max-width:650px){#costs>.title-row>#costQuickNav{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* TypeScript-owned floating finance scrollbar. */
.ledger-floating-scrollbar{position:fixed;bottom:0;display:none;height:18px;overflow-x:auto;overflow-y:hidden;z-index:1250;border:1px solid #cbd3df;border-bottom:0;border-radius:9px 9px 0 0;background:#fff;box-shadow:0 -5px 16px rgba(30,42,65,.15)}.ledger-floating-scrollbar.is-visible{display:block}.ledger-floating-scrollbar-spacer{height:1px}.ledger-floating-scrollbar::-webkit-scrollbar{height:14px}.ledger-floating-scrollbar::-webkit-scrollbar-track{background:#eef2f8;border-radius:8px}.ledger-floating-scrollbar::-webkit-scrollbar-thumb{background:#8997b2;border:3px solid #eef2f8;border-radius:8px}
.daily-output-header-dock{position:fixed;z-index:1249;top:0;display:none;overflow:hidden;background:#f2f4f7;box-shadow:0 5px 14px rgba(31,49,77,.18)}
.daily-output-header-dock.is-visible{display:block}
.daily-output-header-dock .daily-output-header-clone{border-collapse:collapse;table-layout:fixed}
.daily-output-header-dock .daily-output-header-clone th{height:42px;box-sizing:border-box;border:1px solid #aeb7c4;padding:6px 2px;background:#f2f4f7;color:#344054;text-align:center;white-space:nowrap}
.daily-output-header-dock .daily-output-header-clone th:first-child{position:sticky;left:0;z-index:2;background:#f2f4f7;box-shadow:4px 0 7px rgba(31,49,77,.1)}

/* TypeScript-owned finance order images. */
.cost-order-image-cell{min-width:180px}.cost-order-image-wrap{display:flex;align-items:center;gap:9px;min-width:max-content}th .cost-order-image-wrap{justify-content:center;flex-direction:column;min-width:92px;gap:5px}.cost-order-style-image{width:46px;height:46px;object-fit:cover;border-radius:9px;flex:none;border:1px solid #dfe4ed;background:#f2f4f8}.cost-order-style-placeholder{display:grid;place-items:center;color:#716be8;font-size:19px}.cost-order-image-copy{min-width:0}.cost-order-image-copy b,.cost-order-image-copy small{display:block}.output-cost-analysis table,.pnl-order-analysis table{width:max-content!important;min-width:0!important;table-layout:auto!important}.output-cost-analysis .cost-order-image-cell,.pnl-order-analysis .cost-order-image-cell{min-width:68px!important;width:1%}.output-cost-analysis th .cost-order-image-wrap,.pnl-order-analysis th .cost-order-image-wrap{min-width:58px;gap:4px}.output-cost-analysis th .cost-order-style-image,.pnl-order-analysis th .cost-order-style-image{width:38px;height:38px;border-radius:7px}
/* Keep every order column as compact as the customer/order/style identity columns above. */
:is(.output-cost-analysis,.pnl-order-analysis) table{width:max-content!important;min-width:0!important;table-layout:fixed!important}
:is(.output-cost-analysis,.pnl-order-analysis) :is(th,td):first-child{width:245px!important;min-width:245px!important;max-width:245px!important}
:is(.output-cost-analysis,.pnl-order-analysis) :is(th,td):nth-child(2){width:70px!important;min-width:70px!important;max-width:70px!important}
:is(.output-cost-analysis,.pnl-order-analysis) :is(th,td):nth-child(n+3):not(:last-child){width:168px!important;min-width:168px!important;max-width:168px!important}
:is(.output-cost-analysis,.pnl-order-analysis) :is(th,td):last-child{width:120px!important;min-width:120px!important;max-width:120px!important}
:is(.output-cost-analysis,.pnl-order-analysis) .cost-order-image-cell{width:168px!important;min-width:168px!important;max-width:168px!important}
:is(.output-cost-analysis,.pnl-order-analysis) th .cost-order-image-wrap{min-width:0;width:100%;box-sizing:border-box}
:is(.output-cost-analysis,.pnl-order-analysis) th .cost-order-image-copy{width:100%;overflow:hidden;text-align:center}
:is(.output-cost-analysis,.pnl-order-analysis) th .cost-order-image-copy :is(b,small){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#costSystemRoot{display:flex;flex-direction:column}#costSystemRoot>.metrics{order:0}#costSystemRoot>.table-card{order:3}#costSystemRoot>.table-card:first-of-type{order:2}#costSystemRoot>.table-card:last-child{order:1;margin-bottom:20px}#costSystemRoot>.table-card:last-child>.card-title{display:block}#costSystemRoot>.table-card:last-child>.card-title>div{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:14px;width:100%}#costSystemRoot>.table-card:last-child>.card-title h2,#costSystemRoot>.table-card:last-child>.card-title p{margin:0;white-space:nowrap;word-break:keep-all}#costSystemRoot>.table-card:last-child{overflow:auto}#costSystemRoot>.table-card:last-child table{width:100%;min-width:1180px;table-layout:auto}#costSystemRoot>.table-card:last-child th{white-space:nowrap;word-break:keep-all;padding:7px 8px}#costSystemRoot>.table-card:last-child tbody tr{height:48px}#costSystemRoot>.table-card:last-child td{padding:4px 7px;line-height:1.15;white-space:nowrap}#costSystemRoot>.table-card:last-child .cost-order-image-cell{min-width:160px}#costSystemRoot>.table-card:last-child .cost-order-image-wrap{gap:7px;min-width:0}#costSystemRoot>.table-card:last-child .cost-order-style-image{width:36px;height:36px;border-radius:7px}#costSystemRoot>.table-card:last-child .cost-order-image-copy b{font-size:12px;line-height:1.15}#costSystemRoot>.table-card:last-child .cost-order-image-copy small{font-size:10px;line-height:1.15}#costSystemRoot>.table-card:last-child td:last-child{white-space:nowrap;min-width:76px}#costSystemRoot>.table-card:last-child td:last-child button{display:inline-grid;width:30px;height:30px;vertical-align:middle;margin:0 2px}@media(max-width:1100px){#costSystemRoot>.table-card:last-child>.card-title>div{grid-template-columns:1fr;gap:4px}#costSystemRoot>.table-card:last-child>.card-title h2,#costSystemRoot>.table-card:last-child>.card-title p{white-space:normal}}
#costSystemRoot>.finance-order-cost-card{overflow-x:hidden!important}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table :is(th,td){box-sizing:border-box;min-width:0!important;padding:6px 4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table th{font-size:10px;letter-spacing:.01em}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table td{font-size:clamp(9px,.72vw,12px);font-variant-numeric:tabular-nums}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table :is(th,td):first-child{width:15%!important;min-width:0!important;max-width:none!important}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table :is(th,td):nth-child(2){width:5%!important}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table :is(th,td):last-child{width:54px!important;min-width:54px!important;max-width:54px!important;overflow:visible!important;text-align:center}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table .order-cost-action-icon{position:relative;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important;margin:0 auto!important;padding:0!important;display:inline-grid!important;place-items:center!important}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table .order-cost-action-icon svg{display:block;width:16px!important;height:16px!important;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table .cost-order-image-wrap{width:100%;min-width:0}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table .cost-order-image-copy{min-width:0;overflow:hidden}#costSystemRoot>.finance-order-cost-card .finance-order-cost-table .cost-order-image-copy :is(b,small){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* TypeScript-owned sample, pattern-room and cut-sheet dialogs. */
#sampleIndependentDialog,#patternIndependentDialog,#patternIndependentView,#cutSheetDialog,#cutSheetViewDialog{width:min(1540px,98vw);max-width:98vw;max-height:96vh;padding:0}#sampleIndependentDialog>form,#patternIndependentDialog>form,#patternIndependentView>form,#cutSheetDialog>form,#cutSheetViewDialog>form{width:100%;max-height:96vh;overflow:hidden;padding:24px;box-sizing:border-box;display:flex;flex-direction:column}.pattern-page-actions{display:flex;align-items:center;gap:10px}.pattern-page-actions button{white-space:nowrap}.module-float-action{position:relative;display:inline-grid;place-items:center;width:48px;height:48px;padding:0;border:1px solid #d8dcef;border-radius:14px;background:linear-gradient(145deg,#fff,#f0efff);color:#5f59e8;font-size:22px;font-weight:800;box-shadow:0 5px 14px #3d389018;cursor:pointer}.module-float-action.pattern{color:#b56a00;background:linear-gradient(145deg,#fff,#fff3df)}.pattern-sheet-basic.has-pattern-image{table-layout:auto}.pattern-order-image-cell{width:220px!important;min-width:220px!important;padding:8px!important;background:#f6f8fb}.pattern-order-image,.cut-order-image{display:block;width:200px;height:230px;object-fit:contain;margin:auto;border:1px solid #d8dee8;border-radius:8px;background:#fff}.pattern-order-image-empty,.cut-order-image-empty{display:grid;place-items:center;width:200px;height:230px;margin:auto;border:1px dashed #c6cfdb;border-radius:8px;color:#8792a4;font-size:12px}.cut-sheet-scroll,.pattern-sheet-scroll{overflow:auto;min-height:0}.cut-sheet-grid{width:100%;min-width:1180px;border-collapse:collapse;background:#fff}.cut-sheet-grid th,.cut-sheet-grid td{border:1px solid #9aa6b8;padding:7px;text-align:center;vertical-align:middle}.cut-sheet-grid th{background:#edf2f8;color:#2e3a50;font-size:11px}.cut-sheet-grid input,.cut-sheet-grid select,.cut-sheet-grid textarea{width:100%;min-width:70px;border:0;background:transparent;padding:7px;font:12px inherit;box-sizing:border-box}.cut-top-data th{width:120px}.cut-top-data td{text-align:left}.cut-order-image-cell{width:245px!important;min-width:245px;background:#f6f8fb}.cut-order-image{width:220px;height:245px}.cut-sheet-section{margin-top:14px;border:1px solid #b7c0ce;border-radius:8px;overflow:hidden}.cut-sheet-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#f3f6fa}.cut-sheet-actions,.cut-template-tools{display:flex;gap:8px;align-items:center}.cut-template-tools{margin-left:auto}.cut-template-tools select{width:210px;max-width:20vw;padding:9px 10px;border:1px solid #dbe1eb;border-radius:9px;background:#fff}.cut-sheet-comments{width:100%;min-height:150px;padding:12px;border:0;resize:vertical;box-sizing:border-box}.cut-sheet-total{font-weight:800;color:#253d70;background:#fff8d8!important}.cut-sheet-measure-name{text-align:left!important;min-width:230px}.cut-template-manager{width:min(760px,92vw);border:0;border-radius:15px;padding:0}.cut-template-manager>div{padding:22px}.cut-template-list{display:grid;gap:9px;margin-top:16px;max-height:55vh;overflow:auto}.cut-template-folder{border:1px solid #dfe5ed;border-radius:12px;overflow:hidden}.cut-template-folder-head{padding:10px 13px;background:#eef3fb}.cut-template-item{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid #e0e5ed;background:#fff}.cut-template-item small{display:block;color:#667085;margin-top:4px}.cut-template-save-dialog{width:min(520px,92vw);max-width:92vw;border:0;border-radius:16px;padding:0}.cut-template-save-dialog>form{padding:22px}.cut-template-save-dialog label{display:grid;gap:7px;margin-top:16px;font-weight:700}.cut-template-save-dialog input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #d6dce7;border-radius:9px}.cut-spec-image-button{position:relative;width:58px;height:68px;padding:0;border:1px solid #d8e1ef;border-radius:9px;background:#f8faff;cursor:pointer;overflow:hidden}.cut-spec-image-button img{width:100%;height:100%;object-fit:contain}.cut-spec-image-empty{display:grid;place-items:center;width:100%;height:100%;color:#68758a;font-size:21px}.cut-spec-image-badge{position:absolute;right:2px;bottom:2px;display:grid;place-items:center;min-width:22px;height:20px;padding:0 4px;border-radius:7px;background:#fff;color:#4f46e5;border:1px solid #cfd5ff;font-size:11px;font-weight:800}.cut-a4-pages{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;padding:18px;background:#eef1f5}.cut-a4-page{position:relative;aspect-ratio:210/297;background:#fff;border:1px solid #cbd3df;display:grid;place-items:center;overflow:hidden}.cut-a4-page img{width:100%;height:100%;object-fit:contain}.cut-a4-page span{position:absolute;left:8px;bottom:8px;padding:3px 7px;border-radius:5px;background:#fff;color:#667085;font-size:11px}.cut-a4-remove{position:absolute;right:8px;top:8px;width:30px;height:30px;border:0;border-radius:50%;background:#fff;color:#d92d20}.cut-a4-empty{grid-column:1/-1;padding:38px;text-align:center;color:#7b8698;background:#fff;border:1px dashed #c3ccda;border-radius:8px}#cutSheetImageManagerDialog{width:min(1120px,96vw);max-height:94vh}#cutSheetImageManagerDialog form{max-height:94vh;overflow:auto;padding:26px 30px}.style-image-manager-main img,.style-image-manager-grid img{max-width:100%;height:160px;object-fit:contain}.style-image-manager-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.style-image-manager-grid section{padding:10px;border:1px solid #dfe4ed;border-radius:10px}.style-image-manager-grid label{display:grid;gap:5px;margin-top:7px;font-size:11px}@media(max-width:1100px){.cut-template-tools{width:100%;order:2}.cut-template-tools select{flex:1;max-width:none}.style-image-manager-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media print{body[data-print-development-detail]>*:not(#cutSheetViewDialog):not(#patternIndependentView){display:none!important}.cut-a4-attachments>.cut-sheet-section-title,.cut-a4-remove,.cut-a4-page span{display:none!important}.cut-a4-pages{display:block!important;padding:0!important}.cut-a4-page{width:210mm!important;height:297mm!important;border:0!important;break-after:page}}

#cutSheetDialog .cut-template-tools{margin-right:90px}#cutSheetDialog .dialog-head>[data-cut-close]{margin-left:10px}

/* Post-TypeScript visual restoration: preserve the final pre-migration
   dashboard header contract without reviving runtime style patches. */
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row{align-items:center;gap:16px;flex-wrap:nowrap}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics{display:grid;grid-template-columns:repeat(5,minmax(112px,1fr));gap:8px;flex:1 1 700px;min-width:650px;margin:0}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics article{height:88px!important;min-height:88px!important;max-height:88px!important;padding:11px;gap:8px;overflow:hidden;align-items:center!important}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics .metric-icon{width:37px!important;height:37px!important;min-width:37px!important;font-size:19px!important;border-radius:9px!important}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics article b,
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics article>div>span{line-height:1.25}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics article small{line-height:1.25;max-height:24px;overflow:hidden}
#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics .dashboard-shipment-pnl-link strong{font-size:15px!important;letter-spacing:-.25px!important;white-space:nowrap}
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-fabric-due-card,
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-production-card{padding:0!important;overflow:hidden}
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-fabric-due-card>button,
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-production-card>button{width:100%;height:100%;padding:11px;border:0;background:transparent;display:grid;grid-template-columns:37px minmax(0,1fr);align-items:start;gap:8px;text-align:left;cursor:pointer;color:inherit;font:inherit}
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-fabric-due-card>button:hover{background:#fff9eb}
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-production-card>button:hover{background:#faf8ff}
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-fabric-due-card>button>span:last-child,
#dashboard[data-dashboard-renderer="typescript-v1"] .dashboard-production-card>button>span:last-child{display:grid;min-width:0}
.dashboard-active-orders-link,.dashboard-shipment-pnl-link{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.dashboard-active-orders-link:hover,.dashboard-active-orders-link:focus-visible{transform:translateY(-2px);border-color:#abc5fa;box-shadow:0 9px 22px rgba(47,103,201,.14);outline:none}
.dashboard-shipment-pnl-link:hover,.dashboard-shipment-pnl-link:focus-visible{transform:translateY(-2px);border-color:#9bd9bc;box-shadow:0 9px 22px rgba(32,145,93,.14);outline:none}
@media(max-width:1200px){#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row{flex-wrap:wrap}#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics{order:3;flex-basis:100%;width:100%;min-width:0}}
@media(max-width:700px){#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics{grid-template-columns:1fr 1fr}#dashboard[data-dashboard-renderer="typescript-v1"]>.title-row>.dashboard-metrics article{height:68px!important;min-height:68px!important;max-height:68px!important}}

/* Restore the final pre-migration Styles & BOM header and filter alignment. */
#styles[data-style-renderer="typescript-v1"]>.title-row{align-items:stretch;gap:14px;flex-wrap:nowrap}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav{display:grid;grid-template-columns:repeat(3,minmax(185px,1fr));gap:10px;margin:0 0 0 auto;min-width:0}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card{height:82px;min-width:0;padding:12px 14px;border-radius:12px;box-shadow:0 2px 8px #25304a08;overflow:hidden}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card .metric-icon{width:54px;height:54px;min-width:54px;flex:0 0 54px;font-size:25px;border-radius:13px}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card>span:last-child{min-width:0;overflow:hidden}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card b,
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card small{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card b{font-size:13px}
#styles[data-style-renderer="typescript-v1"] #styleQuickNav .style-quick-card small{font-size:10px;line-height:1.35}

/* Purchasing parity: keep the final import packing-list form and line layout. */
#typedPackingListForm .packing-exchange-rate{grid-column:1 / -1}
#typedPackingListForm .packing-exchange-rate .secondary{margin-top:7px}
#typedPackingListForm .typed-packing-line{display:grid;grid-template-columns:minmax(190px,1.5fr) repeat(9,minmax(72px,1fr)) 34px;gap:8px;align-items:center;min-width:1120px;padding:12px;margin:9px 0;border:1px solid #e1e6ee;border-radius:8px}
#typedPackingListForm [data-typed-packing-lines]{overflow-x:auto}
#typedPackingListForm .typed-packing-line input,#typedPackingListForm .typed-packing-line select{min-width:0}
@media(max-width:850px){#typedPackingListForm .typed-packing-line{grid-template-columns:minmax(180px,1.5fr) repeat(9,minmax(82px,1fr)) 34px}}
#styles[data-style-renderer="typescript-v1"] #styleClientFilterBar{display:grid;grid-template-columns:minmax(230px,1fr) 165px 165px minmax(290px,320px);align-items:center;gap:10px}
#styles[data-style-renderer="typescript-v1"] #styleClientFilterBar input,
#styles[data-style-renderer="typescript-v1"] #styleClientFilterBar select{width:100%;min-width:0}
@media(max-width:1240px){#styles[data-style-renderer="typescript-v1"]>.title-row{flex-wrap:wrap}#styles[data-style-renderer="typescript-v1"] #styleQuickNav{order:3;width:100%;margin-left:0;grid-template-columns:repeat(3,minmax(0,1fr))}#styles[data-style-renderer="typescript-v1"] #styleClientFilterBar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#styles[data-style-renderer="typescript-v1"] #styleQuickNav,#styles[data-style-renderer="typescript-v1"] #styleClientFilterBar{grid-template-columns:1fr}}

/* TypeScript-owned linked-order images in inventory and purchasing. */
.erp-order-image-layout{display:inline-flex;align-items:center;gap:8px;max-height:42px;vertical-align:middle}.erp-order-row-image,.erp-purchase-order-image{display:block;width:38px;height:38px;flex:0 0 38px;object-fit:cover;border-radius:7px;border:1px solid #dce3ed;background:#f4f6fa}.erp-order-image-text{display:block;min-width:0;line-height:1.35}.erp-order-image-text small{display:block;margin-top:2px}.erp-container-image-strip{display:flex;align-items:center;gap:4px;height:38px;margin-bottom:4px}.erp-container-order-image,.erp-audit-order-image,.erp-packing-line-image{display:block;width:42px;height:42px;flex:0 0 42px;object-fit:cover;border:1px solid #dce3ed;border-radius:8px;background:#f4f6fa}.erp-review-order-card{display:flex;align-items:center;gap:12px;padding:10px 12px;margin:0 0 12px;border:1px solid #e1e6ee;border-radius:10px;background:#f8fafc}

/* TypeScript-owned header search, notifications and help. */
.header-actions #headerGlobalSearch,.header-actions #headerNotifications,.header-actions #headerHelp{width:30px;height:30px;padding:0;border:1px solid transparent;border-radius:9px;display:grid;place-items:center;background:transparent;color:#667085;cursor:pointer;transition:.18s}.header-actions #headerGlobalSearch:hover,.header-actions #headerNotifications:hover,.header-actions #headerHelp:hover{transform:translateY(-2px);background:#f0f2ff;border-color:#d9dcf8;color:#514bd8;box-shadow:0 5px 12px #3447671c}#headerNotifications{position:relative}.notice:after{display:none!important}#headerNotifications.has-notices:after{content:"";display:block!important;position:absolute;width:7px;height:7px;background:#ef6c61;border:2px solid #fff;border-radius:50%;top:1px;right:1px}.header-tool-dialog{width:min(680px,92vw);max-width:92vw}.header-tool-dialog form{max-height:82vh;overflow:auto}.header-tool-dialog [data-global-search-input]{font-size:15px;padding:13px 14px}.global-search-results,.header-notice-list{display:grid;gap:8px;max-height:55vh;overflow:auto}.global-search-result,.header-notice-item{width:100%;border:1px solid #e2e7ef;border-radius:11px;background:#fff;padding:12px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;text-align:left;color:#344054;cursor:pointer}.global-search-result:hover,.header-notice-item:hover{border-color:#bfc3f3;background:#f8f8ff;transform:translateY(-1px)}.global-search-result small,.header-notice-item small{display:block;color:#7b8495;margin-top:3px}.global-search-result i,.header-notice-item i{font-style:normal;color:#625de8;font-size:18px}.global-search-type{padding:5px 8px;border-radius:8px;background:#eef0ff;color:#514bd8;font-size:11px;font-weight:800}.header-tool-empty{padding:30px;text-align:center;color:#8993a4}.header-notice-item{grid-template-columns:40px 1fr auto}.header-notice-item .metric-icon{width:36px;height:36px}.header-help-list{display:grid;gap:10px}.header-help-list article{padding:14px;border:1px solid #e4e8ef;border-radius:11px;background:#fafbfc}.header-help-list p{margin:6px 0 0;color:#667085;line-height:1.6}

/* TypeScript-owned South Africa local outsourcing workbench. */
#localOutsourcePage{padding:0!important;background:#f6f8fc}#localOutsourcePage>.outsource-shell{min-height:100%;display:flex;flex-direction:column;background:#f6f8fc}.outsource-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:#fff;border-bottom:1px solid #e2e7ef}.outsource-head h2{margin:2px 0 0;font-size:23px}.outsource-head p{margin:0;color:#7b8599;font-size:11px}.outsource-workbench-actions{display:flex;align-items:center;gap:8px}.outsource-workbench-actions .icon-btn{width:42px;height:42px;border:1px solid #dce3f0;border-radius:11px;background:#fff;color:#554ce0}.outsource-workbench{display:grid;grid-template-columns:minmax(0,1.28fr) minmax(360px,.72fr);gap:14px;padding:16px 20px 30px;min-height:720px}.outsource-workbench-panel{background:#fff;border:1px solid #dfe5ef;border-radius:14px;overflow:hidden;min-width:0}.outsource-workbench-panel>header{padding:15px 16px;border-bottom:1px solid #e7ebf2}.outsource-workbench-panel h3{margin:0 0 3px;font-size:16px}.outsource-workbench-panel header p{margin:0;color:#7e899c;font-size:11px}.outsource-pending-tools{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:8px;padding:12px 14px;border-bottom:1px solid #edf0f5}.outsource-pending-tools input,.outsource-pending-tools select{width:100%;height:40px;margin:0}.outsource-card-list,.outsource-batch-list{display:grid;align-content:start;gap:9px;padding:12px 14px;max-height:690px;overflow:auto}.outsource-stock-card{display:flex;align-items:center;gap:10px;min-height:64px;padding:9px 11px;border:1px solid #dfe5ef;border-radius:12px;background:#fff;cursor:grab;transition:.18s}.outsource-stock-card:hover,.outsource-batch-card:hover{border-color:#746cf2;box-shadow:0 7px 18px #4f46d21a;transform:translateY(-1px)}.outsource-stock-card img,.outsource-stock-placeholder{width:43px;height:43px;flex:0 0 43px;border-radius:8px;object-fit:cover;background:#eef2f7;display:grid;place-items:center;color:#8490a3}.outsource-stock-card b,.outsource-batch-card b{display:block;color:#26334b;font-size:13px}.outsource-stock-card small,.outsource-batch-card small{display:block;margin-top:2px;color:#758196;font-size:10px;line-height:1.4}.outsource-stock-available{margin-left:auto;text-align:right;white-space:nowrap;color:#40506b;font-weight:800;font-size:11px}.outsource-dropzone{margin:12px 14px 4px;padding:20px 12px;border:2px dashed #a8b5cf;border-radius:12px;background:#f8faff;color:#7f8ba0;text-align:center;font-size:12px}.outsource-dropzone.is-over{border-color:#6258ed;background:#f0efff;color:#5048d8}.outsource-batch-card{position:relative;padding:12px 42px 12px 13px;border:1px solid #dfe5ef;border-radius:12px;background:#fff;cursor:pointer}.outsource-batch-card .outsource-ledger-status{position:absolute;right:9px;top:9px}.outsource-batch-route{margin-top:7px;padding-top:7px;border-top:1px solid #edf0f5;color:#495872;font-size:11px}.outsource-workbench-empty{padding:34px 16px;text-align:center;color:#8a95a8;font-size:12px}.outsource-load-page,.outsource-body{padding:18px 22px 30px}.outsource-load-card,.outsource-section{background:#fff;border:1px solid #e1e6ef;border-radius:13px;overflow:hidden}.outsource-load-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border-bottom:1px solid #e5eaf2}.outsource-load-summary>div{padding:14px;border-right:1px solid #e5eaf2}.outsource-load-summary small,.outsource-table small{display:block;color:#7a869b;font-size:10px}.outsource-load-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px}.outsource-load-form label{display:grid;gap:5px;color:#58657d;font-size:12px;font-weight:700}.outsource-load-form input,.outsource-load-form select,.outsource-load-form textarea{width:100%;box-sizing:border-box}.outsource-load-form .span2{grid-column:span 2}.outsource-load-form .span4{grid-column:1/-1}.outsource-load-material{grid-column:1/-1;display:grid;grid-template-columns:2fr repeat(3,1fr);gap:12px;padding:13px;border:1px solid #dfe5ef;border-radius:11px;background:#f8faff}.outsource-load-material h4{margin:0;align-self:center}.outsource-load-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px}.outsource-table-wrap{overflow:auto;max-height:680px}.outsource-table{width:100%;border-collapse:collapse;min-width:920px}.outsource-table th,.outsource-table td{padding:9px 10px;border-bottom:1px solid #e8ebf1;text-align:left;font-size:12px}.outsource-table th{background:#f7f9fc;color:#69758b;position:sticky;top:0}.outsource-ledger-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-weight:800;font-size:11px;background:#e8efff;color:#315ea8}.outsource-ledger-status.received{background:#e2f5e9;color:#137146}.outsource-ledger-status.closed{background:#edf0f4;color:#566174}.outsource-record-actions{display:flex;gap:6px}.outsource-record-actions button{width:34px;height:34px;border:1px solid #d7def0;background:#f5f7ff;border-radius:10px;color:#5048d8}@media(max-width:900px){.outsource-workbench{grid-template-columns:1fr;min-height:0}.outsource-pending-tools{grid-template-columns:1fr}.outsource-load-summary,.outsource-load-form{grid-template-columns:repeat(2,minmax(0,1fr))}.outsource-load-form .span4,.outsource-load-material{grid-column:1/-1}.outsource-load-material{grid-template-columns:1fr}}

/* TypeScript-owned complete style / technical / size image window. */
#styleImageManagerDialog{width:min(1120px,96vw);max-width:96vw;max-height:94vh;padding:0;border:0;border-radius:18px;background:#fff}
#styleImageManagerDialog::backdrop{background:#17203380}
#styleImageManagerDialog>#styleImageManagerForm{width:100%;max-height:94vh;box-sizing:border-box;padding:26px 30px;overflow:auto;background:#fff}
#styleImageManagerDialog .dialog-head{margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #e5e9f0;background:#fff}
#styleImageManagerDialog .dialog-head h2{margin:0;font-size:22px}
#styleImageManagerDialog [data-style-media-content]{display:block;padding:2px 0 14px}
#styleImageManagerDialog .style-image-manager-main{margin-bottom:10px}
#styleImageManagerDialog .style-image-manager-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#styleImageManagerDialog .style-image-manager-grid section{min-height:0}
#styleImageManagerDialog .style-image-manager-grid input,#styleImageManagerDialog .style-image-manager-main input{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:11px}
#styleImageManagerDialog .dialog-actions{margin:0;padding:14px 0 0;border-top:1px solid #e5e9f0;background:#fff}
@media(max-width:720px){#styleImageManagerDialog>#styleImageManagerForm{padding:16px}#styleImageManagerDialog .style-image-manager-main{grid-template-columns:1fr}#styleImageManagerDialog .style-image-manager-grid{grid-template-columns:1fr}}

/* TypeScript-owned complete order-cost worksheet. */
#detailedOrderCostDialog{width:min(1540px,98vw)!important;max-width:98vw!important;max-height:96vh!important;padding:0!important}#detailedOrderCostDialog .order-cost-analysis-form{width:100%!important;max-height:96vh!important;overflow:auto!important;padding:24px 28px 28px!important;box-sizing:border-box;background:#f7f8fb}.order-cost-analysis-form .dialog-head{position:sticky;top:-24px;z-index:8;background:#f7f8fb;padding:18px 112px 13px 0;margin-bottom:12px;min-height:44px;box-sizing:border-box}.order-cost-analysis-form .dialog-head h2{margin:2px 0 0!important;font-size:25px!important}.order-cost-analysis-form .eyebrow{margin:0;font-size:10px;font-weight:800;color:#63708a;letter-spacing:.08em}.order-cost-header{display:grid;grid-template-columns:92px repeat(6,minmax(120px,1fr));border:1px solid #9aa8be;background:#fff;margin-bottom:14px}.order-cost-header>div:not(.order-cost-photo){padding:12px;border-left:1px solid #c2cad7;display:flex;flex-direction:column;justify-content:center}.order-cost-header small{font-size:11px;color:#68758c;margin-bottom:5px}.order-cost-header b{font-size:13px;color:#18243a}.order-cost-photo{height:84px;display:grid;place-items:center;color:#8a95a8;font-size:10px}.order-cost-photo img{width:100%;height:84px;object-fit:contain;background:#fff}.order-cost-production-actuals{background:#fff;border:1px solid #cfd8e6;border-radius:8px;padding:13px 14px;margin-bottom:14px}.order-cost-actuals-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}.order-cost-actuals-head h3{margin:0;color:#18243a;font-size:15px}.order-cost-actuals-head p{margin:4px 0 0;color:#718098;font-size:11px}.order-cost-actual-grid,.order-cost-defect-grid{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:8px}.order-cost-actual-grid article{padding:9px 10px;border:1px solid #dce3ee;border-radius:7px;background:#f8fafc}.order-cost-actual-grid span,.order-cost-summary span{display:block;color:#68758b;font-size:11px}.order-cost-actual-grid strong,.order-cost-summary strong{display:block;margin-top:4px;color:#17233a;font-size:16px}.order-cost-defect-grid{margin-top:8px}.order-cost-defect-grid span{display:flex;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #eadfdf;border-radius:6px;background:#fffafa;color:#8c6666;font-size:11px}.order-cost-defect-grid span.has-value{background:#fff0ef;border-color:#efb8b3;color:#b42318}.order-cost-section,.order-cost-sales{background:#fff;border:1px solid #d6dce7;border-radius:8px;padding:14px;margin-bottom:14px}.order-cost-section-head,.order-cost-sales-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}.order-cost-section-head>div:last-child,.direct-table-tools,.order-cost-sales-head>div{display:flex;gap:8px;align-items:center}.order-cost-section h3,.order-cost-sales h3{margin:0;color:#18243a;font-size:15px}.order-cost-section p{margin:4px 0 0;color:#718098;font-size:11px}.order-cost-table-wrap{overflow:auto;border:1px solid #263752}.order-cost-sheet{border-collapse:collapse;min-width:1370px;width:100%;font-size:11px}.order-cost-sheet th,.order-cost-sheet td{border:1px solid #9ca9bb;padding:5px 6px;vertical-align:middle}.order-cost-sheet thead th{background:#2c4f86;color:#fff;text-align:center;white-space:nowrap}.order-cost-sheet input,.order-cost-sheet select{min-width:76px;width:100%;height:30px;padding:4px 6px;border:1px solid #d2d8e3;border-radius:3px;font:inherit;background:#fff}.order-cost-sheet td:nth-child(2) input{min-width:150px}.order-cost-sheet .cost-short-input{min-width:48px}.cost-source-cell small{display:block;color:#77839a}.order-cost-row-remove{width:27px;height:27px;border:0;border-radius:6px;background:#fff0f0;color:#c63b3b;cursor:pointer;font-size:17px}.cost-highlight th,.cost-highlight td{background:#fff39a!important;color:#111!important}.cost-positive{color:#07834b!important}.cost-negative{color:#c93636!important}.direct-sheet{min-width:980px}.direct-sheet td:first-child{min-width:210px}.direct-sheet td:nth-child(6) input{min-width:190px}.direct-sheet .direct-row-action{width:42px;text-align:center}.direct-column-head{display:flex;align-items:center;gap:5px;min-width:135px}.direct-column-head input{min-width:100px!important;height:27px!important;background:#fff!important;color:#1d3152!important;font-weight:800}.direct-column-head button{width:23px;height:23px;padding:0;border:0;border-radius:5px;background:#fff0f0;color:#bd3030}.order-cost-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:9px;margin:14px 0}.order-cost-summary article{background:#fff;border:1px solid #d8dfea;border-radius:8px;padding:12px}.order-cost-summary .total{background:#fff8bd;border-color:#e8d351}.order-cost-sales label{font-size:11px}.order-cost-sales .form-grid{grid-template-columns:repeat(6,minmax(130px,1fr))}.order-cost-sales input,.order-cost-sales select{height:38px}.order-cost-sales-head span{padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800}.income-confirmed{background:#e6f7ed;color:#087748}.income-estimated{background:#fff3d8;color:#a25b00}@media(max-width:1050px){.order-cost-header{grid-template-columns:84px repeat(3,1fr)}.order-cost-actual-grid,.order-cost-defect-grid,.order-cost-summary,.order-cost-sales .form-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:650px){#detailedOrderCostDialog .order-cost-analysis-form{padding:16px}.order-cost-header{grid-template-columns:74px 1fr 1fr}.order-cost-summary,.order-cost-sales .form-grid{grid-template-columns:1fr 1fr}}

/* Match all development record rows to the 61px production-order density. */
#sampleRoom [data-development-overview] tbody tr:not([data-overview-filter-empty]),#sampleRoom .table-card:has([data-sample-filter-search]) tbody tr,#sampleRoom .cut-sheet-archive tbody tr,#sampleRoom .pattern-archive-card tbody tr{height:61px!important;min-height:61px!important;max-height:61px!important}
#sampleRoom [data-development-overview] tbody tr:not([data-overview-filter-empty])>td,#sampleRoom .table-card:has([data-sample-filter-search]) tbody tr>td,#sampleRoom .cut-sheet-archive tbody tr>td,#sampleRoom .pattern-archive-card tbody tr>td{height:61px!important;padding-top:5px!important;padding-bottom:5px!important;box-sizing:border-box;vertical-align:middle!important}
#sampleRoom .sample-order-thumb,#sampleRoom .sample-archive-image,#sampleRoom .pattern-archive-image{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important}
#sampleRoom .cut-sheet-archive .cut-spec-image-button{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important}
#sampleRoom .development-action-icon,#sampleRoom .cut-sheet-actions .icon-btn,#sampleRoom .pattern-row-actions .icon-btn{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important}

/* Keep the complete-style viewer header controls separate and print its full contents. */
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .dialog-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-head-actions{position:static!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex:0 0 auto!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-head-actions [data-style-print],#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-head-actions .icon-btn{position:static!important;inset:auto!important;transform:none!important;margin:0!important;flex:0 0 auto!important;white-space:nowrap!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-head-actions .icon-btn:not([data-style-print]){display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border:1px solid #dfe3eb!important;border-radius:12px!important;background:#fff!important;color:#625de8!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-linked-orders-trigger.is-hover-arming{animation:styleLinkedOrdersHoverReady 2s linear}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-basic{grid-template-columns:104px minmax(0,1fr)!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-basic>.style-basic-photo,#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-basic>.style-basic-photo-empty{grid-row:2!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 7px;min-width:0}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts article{min-width:0;padding:6px 8px;border:1px solid #e0e5ee;border-radius:6px;background:#fff}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts b,#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts span{display:block;overflow-wrap:anywhere}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts b{margin-bottom:2px;color:#727d91;font-size:9.5px}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts span{color:#1f2b42;font-size:11px;font-weight:700;line-height:1.25}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-fact-notes{grid-column:1/-1}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-fabric-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-tech-image-button{position:relative;display:block;min-width:0;padding:0;border:1px solid #dfe5ef;border-radius:9px;background:#f8faff;overflow:hidden;cursor:zoom-in}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-tech-image-button img{display:block;width:100%;height:260px;max-height:260px;object-fit:contain;background:#fff}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-tech-image-button span{position:absolute;right:7px;bottom:7px;padding:4px 7px;border-radius:6px;background:#17233dcc;color:#fff;font-size:9px;font-weight:700;opacity:0;transition:opacity .16s ease}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-tech-image-button:hover span,#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-tech-image-button:focus-visible span{opacity:1}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-technical-divider{display:flex;align-items:center;gap:10px;margin:18px 0 12px;padding-top:11px;border-top:2px solid #cbd4e2;color:#35425a}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-technical-divider h3{flex:0 0 auto;margin:0;font-size:13px;line-height:1.25}
#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-technical-divider::after{content:"";height:1px;flex:1 1 auto;background:#dfe5ee}
#styleTechnicalImageDialog{width:min(1040px,94vw);max-width:94vw;max-height:94vh;padding:0;border:0;border-radius:14px;overflow:hidden}
#styleTechnicalImageDialog>form{display:flex;flex-direction:column;max-height:94vh;padding:18px 20px 20px;box-sizing:border-box}
#styleTechnicalImageDialog .dialog-head{flex:none;padding:0 0 12px}
#styleTechnicalImageDialog .style-technical-image-stage{display:grid;min-height:0;place-items:center;overflow:auto;background:#f3f5f9;border:1px solid #dce2ec;border-radius:10px}
#styleTechnicalImageDialog .style-technical-image-stage img{display:block;max-width:100%;max-height:80vh;object-fit:contain}
@media(max-width:820px){#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-facts{grid-template-columns:repeat(2,minmax(0,1fr))}#styleDetailDialog[data-style-detail-layout="baseline-v1"] .style-detail-fabric-grid{grid-template-columns:1fr!important}}
@keyframes styleLinkedOrdersHoverReady{from{outline-color:transparent}to{outline-color:transparent}}
/* Complete-style viewer: remove the obsolete BOM action and print every page in its own page-sized box. */
#styleDetailDialog[data-style-detail-layout="baseline-v1"] [data-add-bom],
#styleDetailDialog[data-style-detail-layout="baseline-v1"] #bomList{display:none!important}
#styleDetailPrintRoot{display:none}
@page styleDetailPortrait{size:A4 portrait;margin:6mm}
@page styleTechPortrait{size:A4 portrait;margin:8mm}
@page styleTechLandscape{size:A4 landscape;margin:8mm}
@media print{
  body[data-print-style-detail="true"]{margin:0!important;background:#fff!important}
  body[data-print-style-detail="true"]>*:not(#styleDetailPrintRoot){display:none!important}
  body[data-print-style-detail="true"]>#styleDetailPrintRoot{display:contents!important}
  body[data-print-style-detail="true"] .style-detail-print-page{box-sizing:border-box!important;margin:0!important;padding:0!important;background:#fff!important;color:#172033!important;font-family:Manrope,"Microsoft YaHei",sans-serif!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  body[data-print-style-detail="true"] .style-detail-print-main-page{display:block!important;width:198mm!important;max-width:198mm!important;page:styleDetailPortrait;font-size:9.5pt!important;overflow:visible!important}
  body[data-print-style-detail="true"] .style-detail-print-title{margin:0 0 4mm!important;padding:0 0 2mm!important;border-bottom:1px solid #dfe4ec;font-size:14pt!important;line-height:1.2!important}
  body[data-print-style-detail="true"] .style-detail-main-sheet{box-sizing:border-box!important;width:100%!important;max-width:100%!important;margin:0!important;overflow:visible!important;zoom:1!important;transform:none!important;break-inside:auto!important;page-break-inside:auto!important}
  body[data-print-style-detail="true"] .style-detail-primary-grid{display:block!important;margin:0!important}
  body[data-print-style-detail="true"] :is(.style-detail-primary-grid>section,.style-detail-grid>section){box-sizing:border-box!important;padding:6px!important;border:1px solid #e2e6ef!important;border-radius:6px!important;background:#f8f9fc!important;break-inside:avoid!important}
  body[data-print-style-detail="true"] .style-detail-basic{display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;gap:4px 10px!important;align-items:start!important}
  body[data-print-style-detail="true"] .style-detail-basic>h3{grid-column:1/-1!important}
  body[data-print-style-detail="true"] .style-detail-basic :is(.style-basic-photo,.style-basic-photo-empty){display:grid!important;grid-row:2!important;place-items:center!important;width:96px!important;height:96px!important;margin:0!important;border:1px solid #dfe4ec!important;border-radius:7px!important;background:#f4f6f9!important;object-fit:contain!important;color:#98a2b3!important}
  body[data-print-style-detail="true"] .style-detail-facts{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px 7px!important;min-width:0!important}
  body[data-print-style-detail="true"] .style-detail-facts article{min-width:0!important;padding:5px 6px!important;border:1px solid #e0e5ee!important;border-radius:6px!important;background:#fff!important}
  body[data-print-style-detail="true"] .style-detail-facts b,body[data-print-style-detail="true"] .style-detail-facts span{display:block!important;overflow-wrap:anywhere!important}
  body[data-print-style-detail="true"] .style-detail-facts b{margin-bottom:2px!important;color:#727d91!important;font-size:8pt!important}
  body[data-print-style-detail="true"] .style-detail-facts span{color:#1f2b42!important;font-size:9.5pt!important;font-weight:700!important;line-height:1.25!important}
  body[data-print-style-detail="true"] .style-detail-fact-notes{grid-column:1/-1!important}
  body[data-print-style-detail="true"] .style-detail-full{margin-top:6px!important;padding-top:5px!important;border-top:1px solid #e4e8ef!important;break-inside:avoid!important}
  body[data-print-style-detail="true"] .style-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  body[data-print-style-detail="true"] .style-detail-fabric-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body[data-print-style-detail="true"] .style-detail-summary{margin-top:3px!important;text-align:right!important}
  body[data-print-style-detail="true"] .style-detail-print-main-page h3{margin:0 0 3px!important;color:#273248!important;font-size:10.5pt!important;line-height:1.25!important}
  body[data-print-style-detail="true"] .style-detail-print-main-page p{margin:0 0 3px!important;color:#667085!important;font-size:9pt!important;line-height:1.25!important;overflow-wrap:anywhere!important}
  body[data-print-style-detail="true"] .style-detail-print-tech-page{display:grid!important;grid-template-rows:minmax(0,1fr)!important;place-items:center!important;break-before:page!important;page-break-before:always!important;break-inside:avoid!important;page-break-inside:avoid!important;overflow:hidden!important}
  body[data-print-style-detail="true"] .style-detail-print-tech-page.has-section-label{grid-template-rows:9mm minmax(0,1fr)!important}
  body[data-print-style-detail="true"] .style-detail-print-tech-page[data-print-orientation="portrait"]{width:194mm!important;height:281mm!important;page:styleTechPortrait}
  body[data-print-style-detail="true"] .style-detail-print-tech-page[data-print-orientation="landscape"]{width:281mm!important;height:194mm!important;page:styleTechLandscape}
  body[data-print-style-detail="true"] .style-detail-print-section-label{box-sizing:border-box!important;align-self:stretch!important;justify-self:stretch!important;width:100%!important;margin:0!important;padding:2mm 0 1mm!important;border-top:1.5px solid #6f7a8d!important;color:#35425a!important;font-size:9pt!important;font-weight:700!important;line-height:1.2!important;text-align:left!important}
  body[data-print-style-detail="true"] .style-detail-print-tech-page img{display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
}

/* Sample record: use the same compact linked-order header as the new cut sheet. */
:is(#sampleIndependentDialog,#sampleRecordEditDialog){width:min(1050px,96vw)!important;max-width:96vw!important;max-height:94vh!important}
:is(#sampleIndependentDialog,#sampleRecordEditDialog)>form{display:grid!important;gap:12px;width:100%!important;max-height:94vh!important;overflow:auto!important;padding:28px 32px!important;box-sizing:border-box}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) :is(.sample-basic-section,.sample-specific-section){border:1px solid #b7c0ce;border-radius:8px;overflow:hidden;background:#fff}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) :is(.sample-basic-section,.sample-specific-section)>h3{margin:0;padding:8px 11px;background:#f3f6fa;color:#2e3a50;font-size:12px}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-basic-table{width:100%;min-width:900px;border-collapse:collapse;table-layout:fixed}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-basic-table :is(th,td){border:1px solid #9aa6b8;padding:4px;text-align:left;vertical-align:middle}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-basic-table th{width:88px;background:#edf2f8;color:#2e3a50;font-size:11px;text-align:center}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-basic-table :is(input,select){width:100%;min-width:0;height:30px;padding:4px 6px;border:0;background:transparent;box-sizing:border-box;font-size:12px}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-order-image-cell{width:220px!important;padding:7px!important;background:#f6f8fb}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-record-edit-preview{display:grid;place-items:center;align-self:stretch}
:is(#sampleIndependentDialog,#sampleRecordEditDialog)>form :is(.sample-record-edit-image,.sample-record-detail-image-empty){width:200px!important;height:220px!important;object-fit:contain}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-specific-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-specific-grid label,:is(#sampleIndependentDialog,#sampleRecordEditDialog)>form>label{display:grid;gap:5px;font-weight:700}
@media(max-width:850px){:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-basic-section{overflow:auto}:is(#sampleIndependentDialog,#sampleRecordEditDialog) .sample-specific-grid{grid-template-columns:1fr}}

/* Keep the cut-sheet editor compact while preserving its complete editable table. */
#cutSheetDialog{width:min(1025px,96vw)!important;max-width:96vw!important;max-height:94vh!important}
#cutSheetDialog>#cutSheetForm{max-height:94vh!important;padding:16px!important}
#cutSheetDialog .dialog-head{padding-block:6px!important;min-height:42px!important}
#cutSheetDialog .cut-sheet-scroll{overflow-y:auto!important;overflow-x:hidden!important}
#cutSheetDialog .cut-sheet-grid{width:100%!important;min-width:0!important;table-layout:fixed!important}
#cutSheetDialog .cut-sheet-grid th,#cutSheetDialog .cut-sheet-grid td{width:auto!important;min-width:0!important;padding:2.5px!important;line-height:1.05!important;font-size:11px!important;overflow-wrap:anywhere}
#cutSheetDialog .cut-sheet-grid input,#cutSheetDialog .cut-sheet-grid select,#cutSheetDialog .cut-sheet-grid textarea{min-width:0!important;padding:2.5px!important;min-height:19px!important;line-height:1.05!important;font-size:11px!important}
#cutSheetDialog .cut-sheet-measure-name{min-width:0!important}
#cutSheetDialog .cut-order-image-cell{width:135px!important;min-width:135px!important}
#cutSheetDialog .cut-order-image,#cutSheetDialog .cut-order-image-empty{width:120px!important;height:135px!important}
#cutSheetDialog .cut-sheet-section{margin-top:6px!important}
#cutSheetDialog .cut-sheet-section-title{padding:4px 6px!important;min-height:20px!important}
#cutSheetDialog .cut-sheet-comments{min-height:68px!important;padding:5px!important}
#cutSheetDialog textarea[name="comments"]{overflow:hidden!important;resize:none!important}
#cutSheetDialog .cut-sheet-grid:has(#cutMeasureRows) th:first-child,#cutSheetDialog .cut-sheet-grid:has(#cutMeasureRows) td:first-child{width:12%!important}
#cutSheetDialog .cut-sheet-grid:has(#cutMeasureRows) th:last-child,#cutSheetDialog .cut-sheet-grid:has(#cutMeasureRows) td:last-child{width:10%!important}
#cutSheetDialog .cut-measure-name-input{display:block;width:100%!important;height:22px!important;min-height:22px!important;overflow:hidden;resize:none;white-space:normal}
#cutSheetDialog[data-cut-language="en"] .cut-sheet-grid:has(#cutMeasureRows) th{height:auto!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;line-height:1.2!important}
#cutSheetDialog[data-cut-language="en"] .cut-measure-name-input{height:44px!important;min-height:44px!important;overflow-y:auto!important;line-height:1.25!important}
#cutSheetDialog .dialog-actions{padding-block:5px!important}

/* Keep the saved cut-sheet viewer aligned with the editor and show full comments. */
#cutSheetViewDialog{width:min(1025px,96vw)!important;max-width:96vw!important;max-height:94vh!important}
#cutSheetViewDialog>form{max-height:94vh!important;padding:16px!important}
#cutSheetViewDialog .dialog-head{padding-block:6px!important;min-height:42px!important}
#cutSheetViewDialog .cut-sheet-scroll{overflow-y:auto!important;overflow-x:hidden!important}
#cutSheetViewDialog .cut-sheet-grid{width:100%!important;min-width:0!important;table-layout:fixed!important}
#cutSheetViewDialog .cut-sheet-grid th,#cutSheetViewDialog .cut-sheet-grid td{width:auto!important;min-width:0!important;padding:2.5px!important;line-height:1.05!important;font-size:11px!important;overflow-wrap:anywhere}
#cutSheetViewDialog .cut-order-image-cell{width:135px!important;min-width:135px!important}
#cutSheetViewDialog .cut-order-image,#cutSheetViewDialog .cut-order-image-empty{width:120px!important;height:135px!important}
#cutSheetViewDialog .cut-sheet-section{margin-top:6px!important}
#cutSheetViewDialog .cut-sheet-section-title{padding:4px 6px!important;min-height:20px!important}
#cutSheetViewDialog .pattern-detail-notes p{white-space:pre-wrap!important;overflow-wrap:anywhere!important}
#cutSheetViewDialog .dialog-actions{padding-block:5px!important}

/* Match the new pattern-room worksheet to the compact cut-sheet editor. */
#patternIndependentDialog{width:min(1025px,96vw)!important;max-width:96vw!important;max-height:94vh!important}
#patternIndependentDialog>#patternIndependentForm{max-height:94vh!important;padding:16px!important}
#patternIndependentDialog .dialog-head{padding-block:6px!important;min-height:42px!important}
#patternIndependentDialog .pattern-dialog-head-actions{display:flex;align-items:center;gap:8px}
#patternIndependentDialog .pattern-print-button{font-size:18px!important}
#patternIndependentDialog .dialog-head h2{font-size:16.5px!important}
#patternIndependentDialog .dialog-head .eyebrow{font-size:12.1px!important}
#patternIndependentDialog .pattern-sheet-scroll{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:auto!important}
#patternIndependentDialog .pattern-sheet-grid{width:100%!important;min-width:0!important;table-layout:fixed!important}
#patternIndependentDialog .pattern-sheet-grid th,#patternIndependentDialog .pattern-sheet-grid td{width:auto!important;min-width:0!important;height:auto!important;padding:3px!important;line-height:1.16!important;font-size:12.1px!important;overflow-wrap:anywhere}
#patternIndependentDialog .pattern-sheet-grid input,#patternIndependentDialog .pattern-sheet-grid select,#patternIndependentDialog .pattern-sheet-grid textarea{min-width:0!important;height:auto!important;padding:3px!important;min-height:21px!important;line-height:1.16!important;font-size:12.1px!important}
#patternIndependentDialog .pattern-size-table tbody th,#patternIndependentDialog .pattern-size-table tbody td{text-align:center!important;vertical-align:middle!important}
#patternIndependentDialog .pattern-size-table tbody input,#patternIndependentDialog .pattern-size-table tbody output{display:block;width:100%;margin:0;text-align:center!important;box-sizing:border-box}
#patternIndependentDialog .pattern-sheet-grid:has([data-pattern-layout-body]) th,#patternIndependentDialog .pattern-sheet-grid:has([data-pattern-layout-body]) td{height:auto!important;padding-inline:1.5px!important;font-size:10.45px!important}
#patternIndependentDialog .pattern-sheet-grid:has([data-pattern-layout-body]) input{height:auto!important;padding-inline:1px!important;font-size:10.45px!important}
#patternIndependentDialog .pattern-order-image-cell{width:135px!important;min-width:135px!important}
#patternIndependentDialog .pattern-order-image,#patternIndependentDialog .pattern-order-image-empty{width:120px!important;height:135px!important}
#patternIndependentDialog .pattern-sheet-section{margin-top:6px!important}
#patternIndependentDialog .pattern-sheet-section-title{height:auto!important;padding:4px 6px!important;min-height:22px!important}
#patternIndependentDialog .pattern-sheet-section-title b{font-size:14.3px!important}
#patternIndependentDialog .pattern-sheet-section-title span{font-size:12.1px!important}
#patternIndependentDialog .pattern-sheet-notes{padding:5px!important;gap:6px!important}
#patternIndependentDialog .pattern-sheet-notes label{font-size:12.1px!important}
#patternIndependentDialog .pattern-sheet-notes textarea{height:auto!important;min-height:75px!important;padding:5px!important;font-size:13.2px!important;line-height:1.35!important}
#patternIndependentDialog .dialog-actions button,#patternIndependentDialog [data-add-pattern-layout]{font-size:13.2px!important}
#patternIndependentDialog .dialog-actions{padding-block:5px!important}

/* Six-month schedule viewport with natural row height and no nested vertical scrollbar. */
.monthly-order-plan-preview{min-height:0!important;height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:hidden!important}
.monthly-order-plan-preview .order-plan-head{padding:8px 4px!important;font-size:12px!important;line-height:1.18!important}
.monthly-order-plan-preview .order-plan-head small{font-size:9.5px!important;line-height:1.18!important}
.monthly-order-plan-preview .order-plan-cell{padding:5px!important;font-size:12px!important}
.monthly-order-plan-preview .order-plan-item{padding:5px!important;margin-bottom:3px!important;font-size:12px!important}
.monthly-order-plan-preview .order-plan-item b{font-size:12px!important}
.monthly-order-plan-preview .order-plan-item small{font-size:10px!important;line-height:1.22!important}
#styleScheduleHeaderDock{position:fixed;z-index:83;top:0;display:none;overflow:hidden;background:#4a83dc;box-shadow:0 5px 14px rgba(31,49,77,.22)}
#styleScheduleHeaderDock.is-visible{display:block}
#styleScheduleHeaderDock>.order-plan-grid{height:100%;align-items:stretch}
#styleScheduleHeaderDock .order-plan-head{display:flex;flex-direction:column;justify-content:center;height:100%;min-height:52px;padding:9px 4px 10px!important;box-sizing:border-box;line-height:1.25!important;overflow:visible}
#styleScheduleHeaderDock .order-plan-head{font-size:12px!important}
#styleScheduleHeaderDock .order-plan-head small{font-size:9.5px!important;line-height:1.3!important;padding-bottom:1px}

/* Desktop-style, two-level measurement-template library. */
#cutTemplateManager.cut-template-manager{width:min(1180px,96vw)!important;max-width:96vw!important;max-height:92vh!important}
#cutTemplateManager .cut-template-manager-shell{display:flex;flex-direction:column;min-height:min(680px,86vh);max-height:92vh;padding:24px 26px!important;overflow:auto;box-sizing:border-box;background:linear-gradient(180deg,#fff 0,#fbfcff 100%)}
#cutTemplateManager .dialog-head{align-items:flex-start;flex:0 0 auto}
#cutTemplateManager .dialog-head .muted{margin-top:5px}
.cut-template-manager-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:14px}
[data-cut-template-folder-create]{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
[data-cut-template-folder-create] input{width:min(280px,40vw);min-width:170px;box-sizing:border-box;padding:10px 12px;border:1px solid #d6dce7;border-radius:9px;background:#fff;color:#28344a;font:inherit;outline:none}
[data-cut-template-folder-create] input:focus{border-color:#7772ef;box-shadow:0 0 0 3px rgba(99,91,230,.12)}
[data-cut-template-folder-create] button{white-space:nowrap}
.cut-template-library-summary{display:flex;align-items:center;gap:18px;flex:0 0 auto;margin:14px 0;padding:10px 13px;border:1px solid #e0e6ef;border-radius:10px;background:#f8fafc;color:#667085;font-size:12px}
.cut-template-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));align-content:start;gap:18px 14px;min-height:330px;padding:12px 4px 24px}
.cut-template-folder-tile{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-width:0;min-height:128px;padding:17px 10px 13px;border:1px solid transparent;border-radius:12px;background:transparent;color:#2f3b52;text-align:center;cursor:pointer;box-shadow:none;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.cut-template-folder-tile:hover,.cut-template-folder-tile:focus-visible{border-color:#cfd8ec;background:#eef4ff;transform:translateY(-1px);outline:none}
.cut-template-folder-tile:active{transform:translateY(0)}
.cut-template-folder-tile .cut-template-folder-icon{display:grid;place-items:center;width:72px;height:58px;font-size:48px;line-height:1;filter:drop-shadow(0 4px 4px rgba(53,75,115,.14))}
.cut-template-folder-tile b{display:block;max-width:100%;overflow:hidden;color:#31405a;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.cut-template-folder-tile small{display:block;color:#7b879b;font-size:10px;line-height:1.2}
.cut-template-folder-view{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;border:1px solid #dfe5ee;border-radius:13px;background:#fff;overflow:hidden}
.cut-template-folder-toolbar{display:flex;align-items:center;gap:12px;min-height:52px;padding:9px 12px;border-bottom:1px solid #e3e8f0;background:#f7f9fc}
.cut-template-folder-toolbar>:last-child{min-width:0}
.cut-template-folder-toolbar b{display:block;overflow:hidden;color:#2f3c53;text-overflow:ellipsis;white-space:nowrap}
.cut-template-folder-toolbar small{display:block;margin-top:2px;color:#7c8798;font-size:10px}
.cut-template-folder-back{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px 11px;border:1px solid #d6ddea;border-radius:8px;background:#fff;color:#45516a;font:inherit;font-weight:700;cursor:pointer}
.cut-template-folder-back:hover{border-color:#bfc9dd;background:#eef3fb}
.cut-template-file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(238px,238px));grid-auto-flow:column;grid-auto-columns:238px;grid-template-rows:max-content;flex:1 1 auto;align-items:start;gap:12px;min-width:0;padding:16px;overflow-x:auto;overflow-y:hidden;scrollbar-gutter:stable;scroll-snap-type:x proximity}
#cutTemplateManager .cut-template-item{position:relative;display:block;flex:0 0 238px;width:238px;min-width:238px;max-width:238px;padding:0;border:1px solid #e2e7ef;border-radius:10px;background:#fff;overflow:hidden;scroll-snap-align:start;box-shadow:0 3px 10px rgba(43,57,86,.05)}
#cutTemplateManager .cut-template-item:hover{border-color:#cfd7e8;box-shadow:0 5px 14px rgba(43,57,86,.09)}
.cut-template-file{display:flex;align-items:flex-start;gap:9px;min-height:118px;padding:12px 34px 11px 11px;box-sizing:border-box;cursor:pointer}
.cut-template-file:hover{background:#f6f7ff}
.cut-template-file input{position:absolute;opacity:0;pointer-events:none}
.cut-template-file-icon{display:grid;place-items:center;width:38px;height:44px;flex:0 0 38px;border-radius:7px;background:#e9efff;color:#4e5fc8;font-size:20px}
.cut-template-file b,.cut-template-file small,.cut-template-file time{display:block}
.cut-template-file b{overflow:hidden;color:#303d55;font-size:12px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.cut-template-file small{margin-top:3px;color:#77839a;font-size:10px;line-height:1.25}
.cut-template-file time{margin-top:6px;color:#98a2b3;font-size:9px}
.cut-template-delete{position:absolute;right:5px;top:5px;width:26px;height:26px;border-radius:7px;background:#fff0ef!important;color:#b42318!important}
.cut-template-browser-button,.cut-template-print{white-space:nowrap}
.cut-template-save-dialog :is(input,select){width:100%;min-height:42px;box-sizing:border-box;padding:11px 12px;border:1px solid #d6dce7;border-radius:9px;background:#fff;color:#28344a;font:inherit}
.cut-template-save-dialog :is(input,select):focus{border-color:#7772ef;outline:none;box-shadow:0 0 0 3px rgba(99,91,230,.12)}
@media(max-width:760px){
  #cutTemplateManager .cut-template-manager-shell{min-height:min(620px,88vh);padding:18px 16px!important}
  .cut-template-manager-actions,[data-cut-template-folder-create]{align-items:stretch;width:100%}
  [data-cut-template-folder-create]{display:grid;grid-template-columns:minmax(0,1fr) auto}
  [data-cut-template-folder-create] input{width:100%;min-width:0}
  .cut-template-library-summary{gap:10px;flex-wrap:wrap}
  .cut-template-folder-grid{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:12px 8px;padding-inline:0}
  .cut-template-folder-tile{min-height:116px;padding:14px 7px 11px}
  .cut-template-folder-tile .cut-template-folder-icon{width:62px;height:51px;font-size:42px}
  .cut-template-folder-toolbar{align-items:flex-start}
  .cut-template-file-grid{grid-template-columns:repeat(auto-fill,minmax(218px,218px));grid-auto-columns:218px;padding:12px;overflow-x:auto;overflow-y:hidden}
  #cutTemplateManager .cut-template-item{flex-basis:218px;width:218px;min-width:218px;max-width:218px}
}

@media print{
  @page{size:landscape;margin:8mm}
  body[data-print-development-detail="pattern-form"]>#patternIndependentDialog[open]#patternIndependentDialog{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}
  body[data-print-development-detail="pattern-form"]>#patternIndependentDialog>#patternIndependentForm{display:block!important;max-height:none!important;overflow:visible!important;padding:0!important}
  body[data-print-development-detail="pattern-form"]>#patternIndependentDialog .pattern-sheet-scroll{overflow:visible!important;max-height:none!important}
  body[data-print-development-detail="pattern-form"]>#patternIndependentDialog .dialog-head{position:static!important}
  body[data-print-development-detail="pattern-form"]>#patternIndependentDialog .pattern-dialog-head-actions,body[data-print-development-detail="pattern-form"]>#patternIndependentDialog .dialog-actions,body[data-print-development-detail="pattern-form"]>#patternIndependentDialog [data-add-pattern-layout]{display:none!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog[open]#cutSheetDialog{display:block!important;position:static!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;box-shadow:none!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog>#cutSheetForm{display:block!important;max-height:none!important;overflow:visible!important;padding:0!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog .cut-sheet-scroll{overflow:visible!important;max-height:none!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog .dialog-head{position:static!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog .cut-template-tools,body[data-print-development-detail="cut"]>#cutSheetDialog .dialog-actions,body[data-print-development-detail="cut"]>#cutSheetDialog [data-cut-remove-measure]{display:none!important}
  body[data-print-development-detail="cut"]>#cutSheetDialog textarea{height:auto!important;overflow:visible!important}
}

/* Use the purchasing-module card height and the 61px production-order row density. */
#sampleRoom .sample-room-icons.sample-room-icons-top button{height:76px!important;min-height:76px!important;max-height:76px!important;padding:10px 12px!important;grid-template-columns:42px minmax(0,1fr)!important;column-gap:10px!important}
#sampleRoom .sample-room-icons.sample-room-icons-top .sample-room-symbol{width:42px!important;height:42px!important;border-radius:11px!important;font-size:20px!important}
#sampleRoom .sample-room-icons.sample-room-icons-top b{font-size:13px!important}
#sampleRoom .sample-room-icons.sample-room-icons-top small{font-size:10px!important}
#typedPurchasingWorkspace .typed-purchase-task{height:61px!important;min-height:61px!important;max-height:61px!important;box-sizing:border-box;padding:7px 18px!important;align-items:center!important}
#typedPurchasingWorkspace .typed-purchase-task .erp-purchase-order-image,#typedPurchasingWorkspace .typed-purchase-task>.metric-icon{width:42px!important;height:42px!important;min-width:42px!important;max-height:42px!important}
#typedPurchasingWorkspace .typed-purchase-task .task-copy{min-width:0;overflow:hidden}
#typedPurchasingWorkspace .typed-purchase-task .task-copy b,#typedPurchasingWorkspace .typed-purchase-task .task-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#typedPurchasingWorkspace table tbody tr{height:61px!important}
#typedPurchasingWorkspace table tbody td{height:61px!important;box-sizing:border-box;padding-top:5px!important;padding-bottom:5px!important;vertical-align:middle!important}

/* Keep local outsource loading visually aligned with the truck-loading workspace. */
#localOutsourcePage .outsource-workbench.truck-layout{grid-template-columns:minmax(0,1fr) minmax(340px,420px)!important;gap:14px!important;align-items:start!important;min-height:1100px;padding:16px 20px 30px}
#localOutsourcePage .outsource-workbench-panel.truck-panel{min-height:1100px;border-radius:14px;overflow:hidden}
#localOutsourcePage .outsource-pending-tools{grid-template-columns:minmax(0,1fr) 180px 150px;padding:9px 12px;gap:7px}
#localOutsourcePage .outsource-pending-tools .truck-search,#localOutsourcePage .outsource-pending-tools .truck-category-filter,#localOutsourcePage .outsource-pending-tools .truck-warehouse-filter{width:100%;height:39px;margin:0;min-width:0}
#localOutsourcePage .outsource-card-list.truck-source-list,#localOutsourcePage .outsource-batch-list.truck-trip-list{max-height:970px;padding:9px 12px;gap:5px}
#localOutsourcePage .outsource-stock-card.truck-source{min-height:46px;padding:6px 9px;transform:none}
#localOutsourcePage .outsource-stock-card.truck-source:hover{transform:none}
#localOutsourcePage .outsource-batch-card.truck-card{position:relative;padding:0;cursor:pointer}
#localOutsourcePage .outsource-batch-card.truck-card:hover{transform:none}
#localOutsourcePage .outsource-batch-card.truck-card{border:1px solid #dfe5ef;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease}
#localOutsourcePage .outsource-batch-card.truck-card.active{border:2px solid #6258ed;box-shadow:0 6px 16px rgba(83,76,218,.12)}
#localOutsourcePage .outsource-batch-card .truck-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;padding:12px 14px;background:#eef3ff;cursor:pointer}
#localOutsourcePage .outsource-batch-card .truck-card-head>div:first-child{min-width:0}
#localOutsourcePage .outsource-batch-card .truck-card-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#21304b;font-size:13px}
#localOutsourcePage .outsource-batch-card .truck-card-head small{margin-top:3px;color:#64728b;font-size:10px}
#localOutsourcePage .outsource-batch-card .truck-card-state{display:flex;align-items:center;gap:7px;flex:0 0 auto}
#localOutsourcePage .outsource-batch-card .truck-status{display:inline-flex;align-items:center;min-height:26px;padding:3px 8px;border-radius:999px;background:#fff4d8;color:#966000;font-size:10px;font-weight:800;white-space:nowrap}
#localOutsourcePage .outsource-batch-card .truck-status.departed{background:#e5efff;color:#285ca6}
#localOutsourcePage .outsource-trip-loads{display:grid;gap:5px;min-height:64px;padding:9px}
#localOutsourcePage .outsource-load-row{grid-template-columns:38px minmax(0,1fr);padding:6px 9px}
#localOutsourcePage .outsource-ledger-image-cell{width:74px;padding:5px!important;text-align:center}
#localOutsourcePage .outsource-ledger-order-image,#localOutsourcePage .outsource-ledger-image-empty{display:grid;place-items:center;width:58px;height:58px;margin:auto;border:1px solid #dce3ed;border-radius:8px;background:#f3f6fa;color:#8792a7;object-fit:contain}
#localOutsourcePage .outsource-table tbody td{vertical-align:middle}
@media(max-width:900px){#localOutsourcePage .outsource-workbench.truck-layout{grid-template-columns:1fr!important;min-height:0}#localOutsourcePage .outsource-workbench-panel.truck-panel{min-height:620px}#localOutsourcePage .outsource-pending-tools{grid-template-columns:1fr}}

/* Dedicated synchronized customs-clearance workspace for trucks and import containers. */
#logisticsCustomsPage .logistics-customs-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}
#logisticsCustomsPage .logistics-customs-head h1{margin:2px 0 4px}
#logisticsCustomsPage .customs-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
#logisticsCustomsPage .customs-summary-card{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:72px;padding:12px 15px;border:1px solid #dfe6f0;border-radius:13px;background:#fff;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
#logisticsCustomsPage .customs-summary-card:hover{border-color:#aaa5ff;background:#faf9ff;box-shadow:0 5px 16px rgba(76,70,200,.08)}
#logisticsCustomsPage .customs-summary-card.active{border-color:#7068ed;background:#f1f0ff;box-shadow:0 0 0 2px rgba(112,104,237,.1)}
#logisticsCustomsPage .customs-summary-card>span{display:grid;gap:4px;min-width:0}
#logisticsCustomsPage .customs-summary-card em{color:#8a94a8;font-size:11px;font-style:normal;font-weight:600;white-space:nowrap}
#logisticsCustomsPage .customs-summary small{color:#77839a;font-weight:700}
#logisticsCustomsPage .customs-summary b{font-size:26px;color:#19253a}
#logisticsCustomsPage .customs-notice{margin:-2px 0 12px;padding:10px 13px;border:1px solid #bfe5cb;border-radius:10px;background:#ecf9f0;color:#167044;font-size:13px;font-weight:700}
#logisticsCustomsPage .customs-filterbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px 210px;gap:9px;padding:12px;border:1px solid #dfe6f0;border-radius:13px 13px 0 0;background:#f8faff}
#logisticsCustomsPage .customs-filterbar.has-period{grid-template-columns:minmax(260px,1fr) 160px 180px 112px 112px}
#logisticsCustomsPage .customs-filterbar :is(input,select){width:100%;min-width:0;height:40px;margin:0}
#logisticsCustomsPage .customs-list{display:grid;align-content:start;gap:5px;box-sizing:border-box;min-height:970px;max-height:970px;padding:8px;overflow:auto;border:1px solid #dfe6f0;border-top:0;border-radius:0 0 13px 13px;background:#fff}
#logisticsCustomsPage .customs-card{display:grid;grid-template-columns:68px minmax(0,1fr) 140px 122px auto;align-items:center;gap:10px;min-height:68px;padding:6px 10px;border:1px solid #e0e6ef;border-left:4px solid #e09b3e;border-radius:10px;background:#fff}
#logisticsCustomsPage .customs-card.ready{border-left-color:#3f82c9}
#logisticsCustomsPage .customs-card.cleared{border-left-color:#31a56a}
#logisticsCustomsPage .customs-kind{display:grid;grid-template-rows:28px auto;place-items:center;gap:2px;min-height:42px;padding:3px 6px;border-radius:8px;background:#edf3ff;color:#315f9e;font-size:10px;font-weight:900}
#logisticsCustomsPage .customs-kind.container{background:#f0eefe;color:#6651a9}
#logisticsCustomsPage .customs-kind-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:rgba(255,255,255,.72);font-size:18px;font-style:normal;line-height:1}
#logisticsCustomsPage .customs-main{min-width:0}
#logisticsCustomsPage .customs-main :is(b,small,p){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#logisticsCustomsPage .customs-main b{color:#1d2a42;font-size:15px}
#logisticsCustomsPage .customs-main small{margin-top:1px;color:#7a8598}
#logisticsCustomsPage .customs-main p{margin:3px 0 0;color:#3f4e68;font-weight:750}
#logisticsCustomsPage .customs-doc-progress{display:grid;grid-template-columns:minmax(70px,1fr) auto;align-items:center;gap:5px}
#logisticsCustomsPage .customs-doc-progress>span{height:7px;border-radius:999px;background:#e8edf4;overflow:hidden}
#logisticsCustomsPage .customs-doc-progress i{display:block;height:100%;border-radius:inherit;background:#4f7fd1}
#logisticsCustomsPage .customs-doc-progress small{grid-column:1/-1;color:#8791a3;font-size:10px}
#logisticsCustomsPage .customs-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px}
#logisticsCustomsPage .customs-clear-action{min-height:34px;white-space:nowrap;padding:7px 10px}
#typedLogisticsCustomsDialog{box-sizing:border-box;width:min(880px,96vw);max-width:96vw;max-height:92vh;padding:0;border:0;border-radius:18px;overflow:hidden}
#typedLogisticsCustomsDialog .customs-detail-form{box-sizing:border-box;width:100%;max-height:92vh;padding:24px 28px;overflow:auto}
#typedLogisticsCustomsDialog .customs-detail-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:13px 0 18px}
#typedLogisticsCustomsDialog .customs-detail-summary span{display:grid;gap:3px;padding:10px 12px;border:1px solid #dfe5ee;border-radius:9px;background:#f8faff}
#typedLogisticsCustomsDialog .customs-detail-summary small{color:#77839a;font-size:11px}
#typedLogisticsCustomsDialog .customs-document-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0 18px}
#typedLogisticsCustomsDialog .customs-document-list article{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px;border:1px solid #dfe5ee;border-radius:9px;background:#fff}
#typedLogisticsCustomsDialog .customs-document-list article>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;font-weight:900}
#typedLogisticsCustomsDialog .customs-document-list .complete>span{background:#e3f6ea;color:#117146}
#typedLogisticsCustomsDialog .customs-document-list .missing>span{background:#fff0dc;color:#a15e00}
#typedLogisticsCustomsDialog .customs-document-list em{color:#77839a;font-size:11px;font-style:normal;white-space:nowrap}
#typedLogisticsCustomsDialog .customs-additional-docs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 20px;margin:9px 0 12px;padding-left:22px;color:#3f4e68}
#typedLogisticsCustomsDialog .customs-legal-note{padding:9px 11px;border-radius:8px;background:#fff7df;color:#765200;font-size:11px;line-height:1.45}
@media(max-width:1000px){#logisticsCustomsPage .customs-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#logisticsCustomsPage .customs-card{grid-template-columns:72px minmax(0,1fr) 125px auto}#logisticsCustomsPage .customs-card>.truck-status{display:none}}
@media(max-width:720px){#logisticsCustomsPage .customs-filterbar,#logisticsCustomsPage .customs-card{grid-template-columns:1fr}#logisticsCustomsPage .customs-summary{grid-template-columns:1fr 1fr}#logisticsCustomsPage .customs-actions{justify-content:flex-start}#logisticsCustomsPage .customs-list{min-height:620px;max-height:none}#typedLogisticsCustomsDialog .customs-detail-summary,#typedLogisticsCustomsDialog .customs-document-list,#typedLogisticsCustomsDialog .customs-additional-docs{grid-template-columns:1fr}}

/* Client style overview: one-third taller cards with proportional typography. */
#clientStyleOverviewPage .client-style-card{grid-template-rows:29px clamp(117px,10.67vw,128px) auto!important}
#clientStyleOverviewPage .client-style-number{font-size:clamp(14.5px,10cqw,18.5px)!important;line-height:1.05!important}
#clientStyleOverviewPage .client-style-number{min-width:0;padding-inline:3px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;word-break:break-word}
#clientStyleOverviewPage .client-style-info{min-width:0;padding:7px!important;background:var(--client-style-tone,#e6f2ff)!important;font-family:Manrope,"Microsoft YaHei",sans-serif!important;font-size:10.8px!important;font-weight:400!important;line-height:1.16!important;overflow-wrap:anywhere;word-break:break-word}
#clientStyleOverviewPage .client-style-info b{font-weight:800!important}
#clientStyleOverviewPage .client-style-info p{margin:0 0 2px!important}
#clientStyleOverviewPage .client-style-info-line,.schedule-style-side .client-style-info-line{display:flex;align-items:flex-start;gap:2px;min-width:0}
#clientStyleOverviewPage .client-style-info-line>b,.schedule-style-side .client-style-info-line>b{flex:0 0 auto;white-space:nowrap}
#clientStyleOverviewPage .client-style-info-line>span,.schedule-style-side .client-style-info-line>span{min-width:0;overflow-wrap:anywhere;word-break:break-word}
#clientStyleOverviewPage .client-style-fabric-line>span,.schedule-style-side .client-style-fabric-line>span{flex:1 1 auto}
#clientStyleOverviewPage .client-style-usage-line,.schedule-style-side .client-style-usage-line{display:flex!important}
.monthly-order-plan-preview .schedule-style-side{background:var(--client-style-tone,#e6f2ff)!important}
.monthly-order-plan-preview .schedule-style-side .schedule-style-info{background:transparent!important}
:is(#styleMonthlyPlanPage,#dashboardMonthlyOrderPlan) .monthly-order-plan-preview .schedule-style-side .client-style-fabric-line{display:flex!important;align-items:flex-start!important;gap:2px!important;margin-bottom:0!important;font-size:10px!important;line-height:1.05!important}
:is(#styleMonthlyPlanPage,#dashboardMonthlyOrderPlan) .monthly-order-plan-preview .schedule-style-side .client-style-fabric-line>span{flex:1 1 auto!important;min-width:0!important;width:auto!important;line-height:1.05!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
#clientStyleOverviewPage .client-style-card::after{top:36px!important;width:clamp(34px,23cqw,45px)!important;height:clamp(34px,23cqw,45px)!important;font-size:clamp(18px,13cqw,24px)!important}

/* Complete-style editor: removable material lines, calculated totals and image previews. */
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-entry-line-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-line-remove{display:grid;place-items:center;width:26px;height:26px;min-width:26px;padding:0;border:1px solid #efc9c9;border-radius:7px;background:#fff5f5;color:#c43f3f;font-size:17px;line-height:1;cursor:pointer}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-line-remove:hover{border-color:#db7777;background:#ffe8e8}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-trim-grid>div{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.55fr) 26px!important;align-items:end!important}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-outwork-total{margin-top:8px!important}
#styleEntryCard[data-style-editor-layout="baseline-v1"] :is([data-style-outwork-total],[data-style-cost-subtotal],[name="discountAmount"],[name="finalPrice"]){background:#eef5ff!important;font-weight:800!important}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-selected-row{display:grid;grid-template-columns:minmax(0,1fr) 26px;align-items:center;gap:5px;width:100%;margin-top:5px}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-preview{display:flex;align-items:center;gap:10px;width:100%;min-width:0;max-width:100%;margin:0;padding:5px 8px;border:1px solid #dce3ed;border-radius:8px;background:#f8fafc;box-sizing:border-box}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-preview[hidden]{display:none!important}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-preview img{display:block;width:64px;height:64px;flex:0 0 64px;border:1px solid #d7deea;border-radius:7px;background:#fff;object-fit:contain}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-preview small{max-width:330px;color:#596579;font-size:11px;overflow-wrap:anywhere}
#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-tech-remove{align-self:center;justify-self:end;margin:0}
@media(max-width:760px){#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-trim-grid>div{grid-template-columns:1fr!important}#styleEntryCard[data-style-editor-layout="baseline-v1"] .style-trim-grid>div>.style-line-remove{justify-self:end}}

/* Fabric purchase order: locked sales-order context and compact three-row layout. */
#typedPurchaseOrderForm .purchase-order-context-grid{display:grid;grid-template-columns:minmax(110px,.5fr) minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
#typedPurchaseOrderForm .purchase-order-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
#typedPurchaseOrderForm :is(.purchase-order-link-row,.purchase-style-number-row){display:grid;grid-template-columns:minmax(0,1fr);width:50%;padding-right:6px}
#typedPurchaseOrderForm .purchase-fabric-material-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px;align-items:start}
#typedPurchaseOrderForm :is(.purchase-order-context-grid,.purchase-order-link-grid,.purchase-order-link-row,.purchase-style-number-row,.purchase-fabric-material-grid)>label{display:grid;gap:5px;min-width:0}
#typedPurchaseOrderForm :is(.purchase-order-context-grid,.purchase-order-link-grid,.purchase-order-link-row,.purchase-style-number-row,.purchase-fabric-material-grid) :is(input,select){width:100%;min-width:0}
#typedPurchaseOrderForm :is(label,small,.muted,.eyebrow,.purchase-need-alert span,.auto-trim-empty){color:#000}
#typedPurchaseOrderForm :is(input:not([type="hidden"]),select){width:100%;min-width:0;height:28px;margin:0;padding:3px 8px;border:1px solid #dfe3eb;border-radius:7px;background:#fff;color:#000;font:12px Manrope,"Microsoft YaHei",sans-serif;line-height:1.2;box-sizing:border-box}
#typedPurchaseOrderForm textarea{width:100%;min-height:56px;margin:0;padding:6px 8px;border:1px solid #dfe3eb;border-radius:7px;background:#fff;color:#000;font:12px Manrope,"Microsoft YaHei",sans-serif;box-sizing:border-box;resize:vertical}
#typedPurchaseOrderForm :is(input:not([type="hidden"]),select,textarea):focus{border-color:#837cf0;outline:0;box-shadow:0 0 0 3px rgba(98,93,232,.12)}
#typedPurchaseOrderForm input[readonly][aria-readonly="true"]{background:#f3f5f8;color:#344054;cursor:default}
@media(max-width:760px){#typedPurchaseOrderForm .purchase-order-context-grid,#typedPurchaseOrderForm .purchase-order-link-grid,#typedPurchaseOrderForm .purchase-fabric-material-grid{grid-template-columns:1fr}#typedPurchaseOrderForm :is(.purchase-order-link-row,.purchase-style-number-row){width:100%;padding-right:0}}

/* Truck loads stay as distinct, readable rows and retain packing-list identity. */
#crossBorderTrucks .truck-dropzone{display:grid;gap:8px}
#crossBorderTrucks .truck-load{min-height:66px;padding:9px 10px;grid-template-columns:46px minmax(0,1fr) auto;gap:10px;border-color:#d8dfeb;background:#fff}
#crossBorderTrucks .truck-load-image{width:46px;height:46px;border-radius:9px}
#crossBorderTrucks .truck-load-copy{display:grid;gap:2px;line-height:1.25}
#crossBorderTrucks .truck-load-title{display:flex;align-items:center;gap:7px;min-width:0}
#crossBorderTrucks .truck-load-title b{font-size:14px;line-height:1.3;white-space:normal;overflow:visible;text-overflow:clip}
#crossBorderTrucks .truck-load-kind{flex:none;padding:2px 7px;border-radius:999px;background:#eef1ff;color:#5148dc;font-size:10px;font-weight:800}
#crossBorderTrucks .truck-load-copy small{font-size:12px;line-height:1.35;white-space:normal;overflow:visible;text-overflow:clip;color:#65728a}
#crossBorderTrucks .truck-load-copy .truck-load-metrics{color:#27344d;font-weight:750}
#crossBorderTrucks .truck-load-copy .truck-load-packing{color:#5b53c8}
#typedLogisticsTripDialog .truck-detail-loads{display:grid;gap:9px;max-height:300px;padding:2px;overflow:auto}
#typedLogisticsTripDialog .truck-load-detail{min-height:76px;padding:11px 12px;grid-template-columns:52px minmax(0,1fr) auto;border:1px solid #dce2ec;border-radius:11px;background:#f9faff}
#typedLogisticsTripDialog .truck-load-detail .truck-load-image{width:52px;height:52px;border-radius:10px}
#typedLogisticsTripDialog .truck-load-detail .truck-load-title{display:flex;align-items:center;gap:8px}
#typedLogisticsTripDialog .truck-load-detail .truck-load-title b{font-size:14px;line-height:1.35}
#typedLogisticsTripDialog .truck-load-detail .truck-load-kind{padding:2px 8px;border-radius:999px;background:#eef1ff;color:#5148dc;font-size:10px;font-weight:800}
#typedLogisticsTripDialog .truck-load-detail .truck-load-copy{display:grid;gap:3px;min-width:0}
#typedLogisticsTripDialog .truck-load-detail .truck-load-copy small{display:block;font-size:12px!important;line-height:1.4;white-space:normal;overflow:visible;text-overflow:clip;color:#5f6d86}
#typedLogisticsTripDialog .truck-load-detail .truck-load-metrics{color:#27344d!important;font-weight:750}
#typedLogisticsTripDialog .truck-load-detail .truck-load-packing{color:#5b53c8!important}

/* Truck detail: two four-field rows, then full-width cargo and notes. */
#typedLogisticsTripDialog #typedLogisticsTripForm{padding:18px 22px!important;gap:10px!important;overflow:hidden!important}
#typedLogisticsTripDialog .truck-form.truck-trip-detail-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:8px 10px}
#typedLogisticsTripDialog .truck-field-route{grid-column:1;grid-row:1}
#typedLogisticsTripDialog .truck-field-date{grid-column:2;grid-row:1}
#typedLogisticsTripDialog .truck-field-departure{grid-column:3;grid-row:1}
#typedLogisticsTripDialog .truck-field-eta{grid-column:4;grid-row:1}
#typedLogisticsTripDialog .truck-field-vehicle{grid-column:1;grid-row:2}
#typedLogisticsTripDialog .truck-field-driver{grid-column:2;grid-row:2}
#typedLogisticsTripDialog .truck-field-border{grid-column:3;grid-row:2}
#typedLogisticsTripDialog .truck-field-broker{grid-column:4;grid-row:2}
#typedLogisticsTripDialog .truck-loaded-cargo{grid-column:1/-1;grid-row:3;min-width:0;align-self:stretch;border:1px solid #dfe5ef;border-radius:11px;background:#f8faff;overflow:hidden}
#typedLogisticsTripDialog .truck-field-notes{grid-column:1/-1;grid-row:4}
#typedLogisticsTripDialog .truck-field-notes textarea{box-sizing:border-box;width:100%;min-height:48px;height:48px;resize:none}
#typedLogisticsTripDialog .truck-loaded-cargo-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #e2e7ef;background:#f1f4f9;color:#27344d}
#typedLogisticsTripDialog .truck-loaded-cargo-head b{font-size:12px}
#typedLogisticsTripDialog .truck-loaded-cargo-head small{color:#748097;font-size:11px}
#typedLogisticsTripDialog .truck-detail-loads.truck-detail-source-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start;gap:5px;max-height:150px;padding:7px;overflow:auto}
#typedLogisticsTripDialog .truck-detail-source{box-sizing:border-box;display:grid;grid-template-columns:52px 42px minmax(0,1fr) 34px;align-items:center;gap:7px;min-height:54px;padding:6px 7px;border:1px solid #dfe5ef;border-radius:9px;background:#fff}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind{display:grid;place-items:center;align-self:stretch;min-height:34px;padding:4px 5px;border-radius:8px;background:#eef3ff;color:#42536f;font-size:10px;font-weight:800;line-height:1.15;text-align:center}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind.fabric{background:#e7f1ff;color:#245da8}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind.trim{background:#fff1dc;color:#986019}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind.finished{background:#e4f6ec;color:#197047}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind.finished.reject{background:#ffe8e5;color:#a3362b}
#typedLogisticsTripDialog .truck-detail-source .truck-source-kind.equipment{background:#efe9ff;color:#6740a4}
#typedLogisticsTripDialog .truck-detail-source .truck-source-image{width:42px;height:42px;border-radius:8px}
#typedLogisticsTripDialog .truck-detail-source .truck-source-copy{display:grid;gap:1px;min-width:0;line-height:1.12}
#typedLogisticsTripDialog .truck-detail-source .truck-source-copy b{display:block;color:#21304b;font-size:12px;white-space:normal;overflow-wrap:anywhere}
#typedLogisticsTripDialog .truck-detail-source .truck-source-copy small{display:block;color:#748097;font-size:10px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
#typedLogisticsTripDialog .truck-detail-source .truck-source-copy .truck-source-order{color:#111827!important;font-weight:750}
#typedLogisticsTripDialog .truck-detail-source .truck-load-packing{color:#5b53c8!important}
#typedLogisticsTripDialog .truck-detail-source .truck-detail-remove{width:30px;height:30px;padding:0;border:0;border-radius:8px;background:#fff0ee;color:#be3d32;font-size:17px!important}
#typedLogisticsTripDialog .truck-docs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin:0!important}
#typedLogisticsTripDialog .truck-docs label{display:flex!important;align-items:center;justify-content:center;gap:5px;min-width:0;padding:7px 5px!important;white-space:nowrap!important;overflow:hidden;font-size:10px!important}
#typedLogisticsTripDialog .truck-docs input[type="checkbox"]{box-sizing:border-box;flex:0 0 14px;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;margin:0!important;padding:0!important}
#typedLogisticsTripDialog [data-logistics-save-trip]{min-height:38px;padding:8px 18px!important;font-size:15px!important;font-weight:800!important}
@media(max-width:900px){#typedLogisticsTripDialog #typedLogisticsTripForm{overflow:auto!important}#typedLogisticsTripDialog .truck-form.truck-trip-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}#typedLogisticsTripDialog :is(.truck-field-route,.truck-field-date,.truck-field-vehicle,.truck-field-driver,.truck-field-departure,.truck-field-eta,.truck-field-border,.truck-field-broker){grid-column:auto!important;grid-row:auto!important}#typedLogisticsTripDialog :is(.truck-loaded-cargo,.truck-field-notes){grid-column:1/-1!important;grid-row:auto!important}#typedLogisticsTripDialog .truck-detail-loads.truck-detail-source-list{grid-template-columns:1fr!important;max-height:240px}#typedLogisticsTripDialog .truck-docs{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Compact vehicle rows while keeping every cargo line visible. */
#crossBorderTrucks .truck-source-list,#crossBorderTrucks .truck-trip-list{align-content:start}
#crossBorderTrucks .truck-source-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:7px 14px 5px}
#crossBorderTrucks .truck-source-filters .truck-category-filter,#crossBorderTrucks .truck-source-filters .truck-warehouse-filter{width:100%;height:39px;margin:0;min-width:0;padding:0 10px;border:1px solid #dce2ec;border-radius:8px;background:#fff;color:#111827}
#crossBorderTrucks .truck-source.has-image{grid-template-columns:56px 42px minmax(0,1fr) 34px;gap:8px;min-height:54px;padding:7px 9px}
#crossBorderTrucks .truck-source>:not(button){pointer-events:none;user-select:none;-webkit-user-drag:none}
#crossBorderTrucks .truck-source .shipment-source-add{pointer-events:auto}
#crossBorderTrucks .truck-source-kind{display:grid;place-items:center;align-self:stretch;min-height:34px;padding:4px 6px;border-radius:8px;background:#eef3ff;color:#42536f;font-size:11px;font-weight:800;line-height:1.15;text-align:center}
#crossBorderTrucks .truck-source-kind.fabric{background:#e7f1ff;color:#245da8}
#crossBorderTrucks .truck-source-kind.trim{background:#fff1dc;color:#986019}
#crossBorderTrucks .truck-source-kind.finished{background:#e4f6ec;color:#197047}
#crossBorderTrucks .truck-source-kind.finished.reject{background:#ffe8e5;color:#a3362b}
#crossBorderTrucks .truck-load-kind.reject,#typedLogisticsTripDialog .truck-load-kind.reject{background:#ffe8e5;color:#a3362b}
#crossBorderTrucks .truck-source-kind.equipment{background:#efe9ff;color:#6740a4}
#crossBorderTrucks .truck-source-image{width:42px;height:42px;border-radius:8px}
#typedLogisticsTripDialog .dialog-head>.icon-btn{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;padding:0!important;border:1px solid #dfe3eb!important;border-radius:12px!important;background:#fff!important;color:#625de8!important;font-size:20px!important}
#crossBorderTrucks .truck-source-copy{line-height:1.08}
#crossBorderTrucks .truck-source-copy b{font-size:13px}
#crossBorderTrucks .truck-source-copy small{font-size:11px;line-height:1.18}
#crossBorderTrucks .truck-source-copy .truck-source-order{color:#111827!important;font-weight:750}
#crossBorderTrucks .truck-source .shipment-source-add{width:34px;height:34px;padding:0;font-size:17px}
#shipments .shipment-board-source-list{align-content:start;gap:5px;padding:9px 12px}
#shipments .shipment-board-source{grid-template-columns:56px 42px minmax(0,1fr) 34px;gap:8px;min-height:54px;padding:7px 9px}
#shipments .shipment-board-source>:not(button){pointer-events:none;user-select:none;-webkit-user-drag:none}
#shipments .shipment-board-source .shipment-source-add{pointer-events:auto;width:34px;height:34px;padding:0;font-size:17px}
#shipments .shipment-source-kind{display:grid;place-items:center;align-self:stretch;min-height:34px;padding:4px 6px;border-radius:8px;background:#e4f6ec;color:#197047;font-size:11px;font-weight:800;line-height:1.15;text-align:center}
#shipments .shipment-source-kind.reject{background:#ffe8e5;color:#a3362b}
#shipments .shipment-board-source :is(.shipment-source-image,.shipment-source-placeholder){width:42px;height:42px;border-radius:8px}
#shipments .shipment-source-copy{min-width:0;line-height:1.08}
#shipments .shipment-source-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#21304b;font-size:13px}
#shipments .shipment-source-copy small{overflow:hidden;text-overflow:ellipsis;margin-top:1px;color:#748097;font-size:11px;line-height:1.18}
#crossBorderTrucks .truck-card-load-list{display:grid;align-content:start;gap:5px;max-height:none;overflow:visible}
#crossBorderTrucks .truck-load{min-height:44px;padding:5px 7px;grid-template-columns:32px minmax(0,1fr) auto;gap:6px}
#crossBorderTrucks .truck-load-image{width:32px;height:32px;border-radius:6px}
#crossBorderTrucks .truck-load-copy{gap:1px;line-height:1.1}
#crossBorderTrucks .truck-load-title{gap:4px}
#crossBorderTrucks .truck-load-title b{font-size:11px;line-height:1.15}
#crossBorderTrucks .truck-load-kind{padding:1px 5px;font-size:8px}
#crossBorderTrucks .truck-load-copy small{font-size:9px;line-height:1.15}
#crossBorderTrucks .truck-load button{width:26px;height:26px}

/* Finished-goods stock views and truck editors use the production packing-list baseline. */
#typedLogisticsPackingViewDialog,#typedLogisticsLoadDialog[data-has-packing-list="true"]{width:min(1220px,96vw)!important;height:min(840px,94vh);max-width:96vw!important;max-height:94vh!important;padding:0;border:0;border-radius:18px;overflow:hidden!important}
#typedLogisticsPackingViewDialog>form,#typedLogisticsLoadDialog[data-has-packing-list="true"] #typedLogisticsLoadForm{box-sizing:border-box;width:100%;height:100%;min-width:0;max-width:100%;overflow-x:hidden!important;overflow-y:auto!important;padding:28px 32px}
#typedLogisticsPackingViewDialog .unified-packing-basic{grid-template-columns:minmax(0,1fr) 170px}
#typedLogisticsPackingViewDialog .packing-header-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
#typedLogisticsPackingViewDialog .packing-header-fields>div{display:grid;gap:3px;padding:8px 10px;border:1px solid #e0e5ed;background:#f8fafc}
#typedLogisticsPackingViewDialog .packing-header-fields small{color:#6f7b90;font-size:11px}
#typedLogisticsPackingViewDialog .packing-header-fields b{color:#1f2937;font-size:13px}
#typedLogisticsPackingViewDialog .packing-sheet-image{box-sizing:border-box;width:170px;height:150px;min-height:150px;object-fit:contain}
#typedLogisticsPackingViewDialog .packing-image-placeholder{background:#f8fafc}
#typedLogisticsPackingViewDialog .unified-packing-table-wrap{overflow-x:hidden!important}
#typedLogisticsPackingViewDialog .unified-packing-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed}
#typedLogisticsPackingViewDialog .unified-packing-table :is(th,td){height:38px;padding:5px!important;font-size:11px;line-height:1.2;white-space:normal;overflow:hidden;word-break:break-word}
#typedLogisticsLoadDialog[data-has-packing-list="true"] #typedLogisticsLoadForm{min-height:0}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select{flex:0 0 auto;min-height:0;margin-top:12px}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .packing-table-wrap{flex:none;width:100%;min-width:0;max-width:100%;overflow-x:hidden!important;border:2px solid #394150;border-radius:0;margin:15px 0}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed;border-collapse:collapse}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select th,#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select td{height:38px;padding:5px!important;border:1px solid #566070!important;font-size:11px;line-height:1.2;white-space:normal;overflow:hidden;word-break:break-word;text-overflow:clip;text-align:center}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select th{background:#f2f4f7;font-weight:800}
#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-select input[type="number"],#typedLogisticsLoadDialog[data-has-packing-list="true"] .truck-carton-no-input{box-sizing:border-box;width:100%;min-width:0;height:30px;padding:2px 1px;border:0;background:transparent;text-align:center;font-size:12px}
@media(max-width:720px){#typedLogisticsPackingViewDialog,#typedLogisticsLoadDialog[data-has-packing-list="true"]{width:96vw!important;max-width:96vw!important}#typedLogisticsPackingViewDialog>form,#typedLogisticsLoadDialog[data-has-packing-list="true"] #typedLogisticsLoadForm{padding:20px}#typedLogisticsPackingViewDialog .unified-packing-basic{grid-template-columns:1fr}#typedLogisticsPackingViewDialog .packing-header-fields{grid-template-columns:1fr 1fr}}

/* South Africa local outsourcing mirrors the compact vehicle-card system. */
#localOutsourcePage .outsource-stock-card.truck-source{grid-template-columns:56px 42px minmax(0,1fr) 34px!important;gap:8px!important;min-height:54px!important;padding:7px 9px!important}
#localOutsourcePage .outsource-stock-card.truck-source>:not(button){pointer-events:none;user-select:none;-webkit-user-drag:none}
#localOutsourcePage .outsource-stock-card .truck-source-kind{display:grid;place-items:center;align-self:stretch;min-height:34px;padding:4px 6px;border-radius:8px;background:#eef3ff;color:#42536f;font-size:11px;font-weight:800;line-height:1.15;text-align:center}
#localOutsourcePage .outsource-stock-card .truck-source-kind.fabric{background:#e7f1ff;color:#245da8}
#localOutsourcePage .outsource-stock-card .truck-source-kind.trim{background:#fff1dc;color:#986019}
#localOutsourcePage .outsource-stock-card .truck-source-kind.finished{background:#e4f6ec;color:#197047}
#localOutsourcePage .outsource-stock-card .truck-source-kind.equipment{background:#efe9ff;color:#6740a4}
#localOutsourcePage .outsource-stock-card .truck-source-kind.extra{background:#eef1f5;color:#596579}
#localOutsourcePage .outsource-stock-card .truck-source-image{width:42px;height:42px;border-radius:8px}
#localOutsourcePage .outsource-stock-card .truck-source-copy{line-height:1.08}
#localOutsourcePage .outsource-stock-card .truck-source-copy b{font-size:13px}
#localOutsourcePage .outsource-stock-card .truck-source-copy small{font-size:11px;line-height:1.18}
#localOutsourcePage .outsource-stock-card .truck-source-copy .truck-source-order{color:#111827!important;font-weight:750}
#localOutsourcePage .outsource-stock-card .shipment-source-add{width:34px;height:34px;padding:0;font-size:17px}
#localOutsourcePage .outsource-trip-loads.truck-card-load-list{display:grid;align-content:start;gap:5px;max-height:none;overflow:visible}
#localOutsourcePage .outsource-load-row{min-height:44px;padding:5px 7px;grid-template-columns:32px minmax(0,1fr) 28px;gap:6px}
#localOutsourcePage .outsource-load-row .truck-load-image{width:32px;height:32px;border-radius:6px}
#localOutsourcePage .outsource-load-row .truck-load-copy b{font-size:11px}
#localOutsourcePage .outsource-load-row .truck-load-copy small{font-size:9px;line-height:1.15}
#localOutsourcePage .outsource-load-row .truck-load-copy{display:grid;gap:1px;min-width:0}
#localOutsourcePage .outsource-load-row .truck-load-title{display:flex;align-items:center;gap:4px;min-width:0}
#localOutsourcePage .outsource-load-row .truck-load-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#localOutsourcePage .outsource-load-row .truck-load-kind{flex:0 0 auto;padding:1px 5px;border-radius:999px;background:#eef1f5;color:#596579;font-size:8px;font-weight:800}
#localOutsourcePage .outsource-load-row .truck-load-kind.fabric{background:#e7f1ff;color:#245da8}
#localOutsourcePage .outsource-load-row .truck-load-kind.trim{background:#fff1dc;color:#986019}
#localOutsourcePage .outsource-load-row .truck-load-kind.finished{background:#e4f6ec;color:#197047}
#localOutsourcePage .outsource-load-row .truck-load-kind.equipment{background:#efe9ff;color:#6740a4}
#localOutsourcePage .outsource-remove-line{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #f3c7c2;border-radius:8px;background:#fff1ef;color:#bd3b2f;font-size:16px;font-weight:800}
#localOutsourcePage .outsource-card-footer{display:flex;justify-content:flex-end;padding:8px 10px 10px}
#localOutsourcePage .outsource-card-footer .primary{min-height:38px;padding:8px 16px;font-weight:800}
#localOutsourcePage .outsource-card-footer .primary:disabled{cursor:not-allowed;opacity:.45}
#localOutsourcePage .outsource-receive-action{background:#16845b!important}

/* Unified table-row viewing: hover the record, then click outside its action buttons. */
.erp-hover-view-row{position:relative;cursor:pointer;transition:transform .18s ease,filter .18s ease}
.erp-hover-view-row>td{transition:background-color .18s ease,border-color .18s ease}
.erp-hover-view-row:hover,.erp-hover-view-row:focus-visible{z-index:2;transform:translateY(-2px);filter:drop-shadow(0 8px 12px rgba(59,64,110,.16));outline:none}
.erp-hover-view-row:hover>td,.erp-hover-view-row:focus-visible>td{background:#f7f7ff!important;border-top-color:#d9d6f6!important;border-bottom-color:#d9d6f6!important}
.erp-hover-view-row:focus-visible{box-shadow:inset 0 0 0 2px rgba(91,79,238,.32)}
.erp-hover-view-row button,.erp-hover-view-row input,.erp-hover-view-row select,.erp-hover-view-row a{cursor:pointer}
.erp-hover-view-card{position:relative;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease}
.erp-hover-view-card:hover,.erp-hover-view-card:focus-visible{z-index:2;transform:translateY(-2px);border-color:#8e86f4!important;box-shadow:0 8px 20px rgba(59,64,110,.14)!important;filter:none;outline:none}
.erp-hover-view-card:focus-visible{box-shadow:0 8px 20px rgba(59,64,110,.14),inset 0 0 0 2px rgba(91,79,238,.28)!important}

/* Shipment, cross-border and outsource histories share one searchable, image-led row pattern. */
:is(.shipment-history-filterbar,.logistics-history-filterbar,.outsource-history-filterbar){display:flex;align-items:flex-end;gap:10px}
.history-record-search{display:grid;gap:5px;width:min(390px,100%);margin:0 auto 0 0;color:#5a6680;font-size:12px;font-weight:800}
.history-record-search input{box-sizing:border-box;width:100%;height:40px;margin:0;padding:8px 11px;border:1px solid #dce2ec;border-radius:8px;background:#fff;color:#2d384e;font:12px Manrope,"Microsoft YaHei",sans-serif}
.outsource-history-filterbar{padding:14px 16px;border-bottom:1px solid #e5eaf2;background:#f8faff}
:is(.shipment-history-table,.logistics-history-content,#localOutsourcePage .outsource-section) .history-record-row{height:66px;min-height:66px}
:is(.shipment-history-table,.logistics-history-content,#localOutsourcePage .outsource-section) .history-record-row>td{height:66px;padding-top:8px!important;padding-bottom:8px!important;vertical-align:top!important}
.history-record-identity{display:flex;align-items:flex-start;gap:9px;min-width:190px;text-align:left}
.history-record-identity>span:last-child{display:block;min-width:0;padding-top:2px}
.history-record-identity b,.history-record-identity small{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-order-image{display:grid!important;place-items:center;width:46px!important;height:46px!important;min-width:46px!important;margin:0!important;border:1px solid #dce3ed!important;border-radius:8px!important;background:#eef2f8!important;color:#8792a7;object-fit:cover!important;overflow:hidden}
.history-order-image-empty{font-size:15px}
#localOutsourcePage .history-record-row .outsource-ledger-order-image,#localOutsourcePage .history-record-row .outsource-ledger-image-empty{width:46px!important;height:46px!important;min-width:46px!important;margin:0!important;object-fit:cover!important}
@media(max-width:760px){:is(.shipment-history-filterbar,.logistics-history-filterbar,.outsource-history-filterbar){align-items:stretch;flex-wrap:wrap}.history-record-search{width:100%}}
#crossBorderTrucks .truck-source .shipment-source-add,#localOutsourcePage .outsource-stock-card .shipment-source-add{display:grid;place-items:center;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border:0!important;border-radius:9px!important;background:#5d55e7!important;color:#fff!important;font-size:18px!important;line-height:1!important;cursor:pointer;box-shadow:0 3px 8px rgba(93,85,231,.2)}
#crossBorderTrucks .truck-source .shipment-source-add:hover,#localOutsourcePage .outsource-stock-card .shipment-source-add:hover{background:#4942c9!important;transform:translateY(-1px)}
#shipments .shipment-board-source .shipment-source-add{display:grid;place-items:center;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border:0!important;border-radius:9px!important;background:#5d55e7!important;color:#fff!important;font-size:18px!important;line-height:1!important;cursor:pointer;box-shadow:0 3px 8px rgba(93,85,231,.2)}
#shipments .shipment-board-source .shipment-source-add:hover{background:#4942c9!important;transform:translateY(-1px)}
#localOutsourcePage .outsource-stock-card.erp-hover-view-card:hover,#localOutsourcePage .outsource-stock-card.erp-hover-view-card:focus-visible{transform:translateY(-2px)!important}

/* Shipment load plans: explicit save dialog and card-level final actions. */
#shipments .shipment-plan-archive-filters{display:none!important}
#shipments .shipment-board-layout{grid-template-columns:minmax(0,1fr) minmax(340px,420px)}
#shipments .shipment-board-plan-list{align-content:start;gap:5px;padding:9px 12px}
#shipments .shipment-board-plan.truck-card{padding:0;border:1px solid #dfe5ef;border-radius:12px;overflow:hidden;background:#fff;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease}
#shipments .shipment-board-plan.truck-card:hover{border-color:#aaa5f7;box-shadow:0 5px 14px rgba(59,64,110,.1)}
#shipments .shipment-board-plan.truck-card.active{border:2px solid #6258ed;box-shadow:0 6px 16px rgba(83,76,218,.12)}
#shipments .shipment-board-plan .truck-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:11px 13px;background:#eef3ff;cursor:pointer}
#shipments .shipment-board-plan .truck-card-head>span:first-child{min-width:0}
#shipments .shipment-board-plan .truck-card-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1e2d49;font-size:13px}
#shipments .shipment-board-plan .truck-card-head small{margin-top:3px;color:#718096;font-size:10px;line-height:1.2}
#shipments .shipment-board-plan .truck-card-state{display:flex;align-items:center;gap:6px;flex:0 0 auto}
#shipments .shipment-board-plan .truck-status{display:inline-flex;align-items:center;min-height:26px;padding:3px 8px;border-radius:999px;background:#fff4d7;color:#8d6200;font-size:10px;font-weight:800;white-space:nowrap}
#shipments .shipment-board-plan .truck-status.departed{background:#e9efff;color:#4155aa}
#shipments .shipment-board-plan .truck-status.received{background:#e5f6ec;color:#197047}
#shipments .shipment-board-plan .truck-delete-trip{display:grid;place-items:center;width:27px!important;height:27px!important;min-width:27px!important;padding:0!important;border:0!important;border-radius:8px!important;background:#fff0ee!important;color:#b42318!important;font-size:17px!important}
#shipments .shipment-board-plan .truck-card-load-list{display:grid;align-content:start;gap:5px;min-height:76px;margin:0;padding:8px;background:#fff;border-radius:0;overflow:visible}
#shipments .shipment-board-plan .truck-empty{display:grid;place-items:center;min-height:58px;border:1px dashed #dfe5ef;border-radius:8px;background:#f8fafc;color:#7b879b;font-size:11px;text-align:center}
#shipments .shipment-board-plan .truck-load{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:6px;min-height:44px;margin:0;padding:5px 7px;border:1px solid #e2e7ef;border-radius:8px;background:#fff}
#shipments .shipment-board-plan .truck-load-image{width:32px;height:32px;border-radius:6px;object-fit:cover}
#shipments .shipment-board-plan .truck-load-copy{display:grid;gap:1px;min-width:0;line-height:1.1}
#shipments .shipment-board-plan .truck-load-title{display:flex;align-items:center;gap:4px;min-width:0}
#shipments .shipment-board-plan .truck-load-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1f2f4a;font-size:11px;line-height:1.15}
#shipments .shipment-board-plan .truck-load-kind{flex:0 0 auto;padding:1px 5px;border-radius:999px;background:#e4f6ec;color:#197047;font-size:8px;font-weight:800}
#shipments .shipment-board-plan .truck-load-kind.reject{background:#ffe8e5;color:#a3362b}
#shipments .shipment-board-plan .truck-load-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;color:#758198;font-size:9px;line-height:1.15}
#shipments .shipment-board-plan .truck-load button{width:26px;height:26px;padding:0}
#shipments .shipment-board-plan .truck-card-footer{display:flex;align-items:center;justify-content:flex-end;margin:0;padding:8px 10px;border-top:1px solid #e7ebf2;background:#fff}
#shipments .shipment-board-plan .truck-card-depart{min-height:34px;padding:7px 13px;font-size:12px;font-weight:800}
#shipments .shipment-board-plan .truck-card-depart:disabled{cursor:not-allowed;opacity:.45}
#typedShipmentPlanDialog{box-sizing:border-box;width:min(1120px,96vw);max-width:96vw;max-height:92vh;padding:0;border:0;border-radius:18px;overflow:hidden}
#typedShipmentPlanDialog>form{box-sizing:border-box;width:100%;max-height:92vh;padding:24px 28px;overflow-x:hidden;overflow-y:auto}
#typedShipmentPlanDialog .dialog-head>.icon-btn{display:grid;place-items:center;width:42px;height:42px;min-width:42px;min-height:42px;padding:0;border:1px solid #dfe3eb;border-radius:12px;background:#fff;color:#625de8;font-size:20px}
#typedShipmentPlanDialog .shipment-plan-truck-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
#typedShipmentPlanDialog .shipment-plan-truck-summary>div{display:grid;gap:3px;padding:9px 11px;border:1px solid #dfe5ee;border-radius:8px;background:#f8faff}
#typedShipmentPlanDialog .shipment-plan-truck-summary small{color:#77839a;font-size:11px}
#typedShipmentPlanDialog .shipment-plan-truck-summary b{color:#1f2f4a;font-size:13px}
#typedShipmentPlanDialog .shipment-plan-truck-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 10px}
#typedShipmentPlanDialog .shipment-plan-truck-form>label{display:grid;gap:4px;min-width:0;color:#58657d;font-size:11px;font-weight:700}
#typedShipmentPlanDialog .shipment-plan-truck-form :is(input,select){box-sizing:border-box;width:100%;min-width:0;height:36px;padding:6px 8px;font-size:12px}
#typedShipmentPlanDialog .shipment-plan-loaded-cargo{grid-column:1/-1;display:grid;gap:7px;margin-top:3px;padding:10px 12px;border:1px solid #dfe5ee;border-radius:10px;background:#f8faff}
#typedShipmentPlanDialog .shipment-plan-loaded-head{display:flex;align-items:center;justify-content:space-between}
#typedShipmentPlanDialog .shipment-plan-loaded-head b,#typedShipmentPlanDialog .shipment-plan-loaded-head small{display:block}
#typedShipmentPlanDialog .shipment-plan-loaded-head b{color:#1f2f4a;font-size:13px}
#typedShipmentPlanDialog .shipment-plan-loaded-head small{margin-top:2px;color:#77839a;font-size:10px}
#typedShipmentPlanDialog .shipment-plan-detail-loads{display:grid;gap:5px;max-height:300px;overflow:auto}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:50px;padding:6px 8px;border:1px solid #dfe5ee;border-radius:8px;background:#fff}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-image{width:38px;height:38px;border-radius:7px;object-fit:cover}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-copy{display:grid;gap:2px;min-width:0}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-title{display:flex;align-items:center;gap:6px}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-title b{color:#1f2f4a;font-size:12px}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-kind{padding:2px 6px;border-radius:999px;background:#e4f6ec;color:#197047;font-size:9px;font-weight:800}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-kind.reject{background:#ffe8e5;color:#a3362b}
#typedShipmentPlanDialog .shipment-plan-detail-loads .truck-load-copy small{color:#758198;font-size:10px}
#typedShipmentPlanDialog .shipment-plan-detail-loads .shipment-load-actions{display:flex;gap:5px}
#typedShipmentPlanDialog .shipment-plan-detail-loads button{width:28px;height:28px;padding:0;border:0;border-radius:7px;background:#fff0ee;color:#b42318}
#typedShipmentPlanDialog .shipment-plan-detail-loads .shipment-load-edit{background:#eef5ff;color:#2767c9}
#typedShipmentPlanDialog .shipment-plan-dialog-actions{justify-content:flex-end}
#typedShipmentPlanDialog [data-shipment-save-plan]{min-height:40px;padding:9px 18px;font-size:14px;font-weight:800}
#shipments .shipment-board-plan-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid #e7ebf2}
#shipments .shipment-plan-complete{min-height:34px;padding:7px 13px;font-size:12px;font-weight:800}
#shipments .shipment-board-plan-footer .shipment-plan-delete{display:grid;place-items:center;flex:0 0 34px;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border:1px solid #ffd2cc!important;border-radius:9px!important;background:#fff0ee!important;color:#b42318!important;font-size:18px!important}
@media(max-width:1180px){#shipments .shipment-board-layout{grid-template-columns:minmax(0,1fr) minmax(350px,44%)}#typedShipmentPlanDialog .shipment-plan-truck-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#shipments .shipment-board-layout{grid-template-columns:1fr}#typedShipmentPlanDialog .shipment-plan-truck-summary{grid-template-columns:1fr 1fr}#typedShipmentPlanDialog .shipment-plan-truck-form{grid-template-columns:1fr}}

/* Local outsource dispatch uses the same modal and draft vehicle-card baseline as truck loading. */
#typedLocalOutsourceDialog{box-sizing:border-box;width:min(1120px,96vw);max-width:96vw;height:auto;max-height:92vh;padding:0;border:0;border-radius:18px;overflow:hidden}
#typedLocalOutsourceDialog[data-has-packing-list="true"]{width:min(1220px,96vw);height:min(840px,94vh);max-height:94vh}
#typedLocalOutsourceDialog>form{box-sizing:border-box;width:100%;height:auto;min-height:0;padding:24px 28px;display:flex;flex-direction:column;gap:12px;overflow-x:hidden;overflow-y:auto;font-size:14px}
#typedLocalOutsourceDialog[data-has-packing-list="true"]>form{height:100%}
#typedLocalOutsourceDialog .dialog-head{flex:0 0 auto;align-items:center;min-height:42px;margin:0 0 2px;padding:0}
#typedLocalOutsourceDialog .dialog-head h2{margin:0;font-size:18px;line-height:1.2}
#typedLocalOutsourceDialog .dialog-head .eyebrow{margin:0 0 7px;font-size:11px;line-height:1.2}
#typedLocalOutsourceDialog .dialog-head .muted{margin:4px 0 0;font-size:12px;line-height:1.35}
#typedLocalOutsourceDialog .dialog-head>.icon-btn{display:grid;place-items:center;width:42px;height:42px;min-width:42px;min-height:42px;padding:0;border:1px solid #dfe3eb;border-radius:12px;background:#fff;color:#625de8;font-size:20px}
#typedLocalOutsourceDialog .logistics-load-preview{flex:0 0 auto;margin:0}
#typedLocalOutsourceDialog .outsource-load-summary{flex:0 0 auto;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0;border:0}
#typedLocalOutsourceDialog .outsource-load-summary>div{padding:8px 10px;border:1px solid #dfe5ee;border-radius:8px;background:#f9faff}
#typedLocalOutsourceDialog .outsource-dialog-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 10px;min-width:0}
#typedLocalOutsourceDialog .outsource-dialog-fields label{display:grid;gap:4px;min-width:0;color:#58657d;font-size:11px;font-weight:700}
#typedLocalOutsourceDialog .outsource-dialog-fields :is(input,select,textarea){box-sizing:border-box;width:100%;min-width:0;height:36px;padding:6px 8px;font-size:12px}
#typedLocalOutsourceDialog .outsource-dialog-fields textarea{height:48px;min-height:48px;resize:none}
#typedLocalOutsourceDialog .outsource-dialog-fields .span2{grid-column:span 2}
#typedLocalOutsourceDialog .outsource-dialog-fields .span3{grid-column:span 3}
#typedLocalOutsourceDialog .outsource-dialog-fields .span4{grid-column:1/-1}
#typedLocalOutsourceDialog .outsource-load-material{grid-column:1/-1;display:grid;grid-template-columns:2fr repeat(3,minmax(0,1fr));gap:10px;padding:10px 12px}
#typedLocalOutsourceDialog .outsource-carton-select{flex:0 0 auto;min-width:0;margin:0}
#typedLocalOutsourceDialog .outsource-carton-select .card-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
#typedLocalOutsourceDialog .outsource-carton-select .card-title h3{margin:0;font-size:15px}
#typedLocalOutsourceDialog .outsource-carton-select .card-title p{margin:3px 0 0;color:#78849a;font-size:11px}
#typedLocalOutsourceDialog .outsource-carton-select .packing-table-wrap{width:100%;min-width:0;max-width:100%;margin:10px 0 0;overflow-x:auto;border:2px solid #394150}
#typedLocalOutsourceDialog .outsource-carton-select table{width:100%;min-width:920px;border-collapse:collapse;table-layout:fixed}
#typedLocalOutsourceDialog .outsource-carton-select th,#typedLocalOutsourceDialog .outsource-carton-select td{height:38px;padding:4px;border:1px solid #566070;text-align:center;font-size:11px}
#typedLocalOutsourceDialog .outsource-carton-select th{background:#f2f4f7;font-weight:800}
#typedLocalOutsourceDialog .outsource-carton-select input[type="number"],#typedLocalOutsourceDialog .outsource-carton-select .truck-carton-no-input{box-sizing:border-box;width:100%;min-width:0;height:29px;padding:2px;border:0;background:transparent;text-align:center;font-size:12px}
#typedLocalOutsourceDialog .outsource-carton-select tr.is-unselected{opacity:.45;background:#f3f4f6}
#typedLocalOutsourceDialog .outsource-loaded-cargo{grid-column:1/-1;display:grid;gap:7px;padding:10px 12px;border:1px solid #dfe5ee;border-radius:10px;background:#f8faff}
#typedLocalOutsourceDialog .outsource-loaded-cargo-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
#typedLocalOutsourceDialog .outsource-loaded-cargo-head b,#typedLocalOutsourceDialog .outsource-loaded-cargo-head small{display:block}
#typedLocalOutsourceDialog .outsource-loaded-cargo-head b{color:#1f2f4a;font-size:13px}
#typedLocalOutsourceDialog .outsource-loaded-cargo-head small{color:#77839a;font-size:10px}
#typedLocalOutsourceDialog .outsource-detail-loads{display:grid;gap:5px;max-height:280px;overflow:auto}
#typedLocalOutsourceDialog .outsource-detail-loads .outsource-load-row{display:grid;grid-template-columns:38px minmax(0,1fr) 28px;align-items:center;gap:8px;min-height:50px;padding:6px 8px;border:1px solid #dfe5ee;border-radius:8px;background:#fff}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-image{width:38px;height:38px;border-radius:7px;object-fit:cover}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-copy{display:grid;gap:2px;min-width:0}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-title{display:flex;align-items:center;gap:6px}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-title b{color:#1f2f4a;font-size:12px}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-kind{padding:2px 6px;border-radius:999px;background:#eef1f5;color:#596579;font-size:9px;font-weight:800}
#typedLocalOutsourceDialog .outsource-detail-loads .truck-load-copy small{color:#758198;font-size:10px}
#typedLocalOutsourceDialog .outsource-load-actions{flex:0 0 auto;margin:0;padding:0;display:flex;justify-content:flex-end;gap:10px}
#localOutsourcePage .outsource-card-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px 10px;border-top:1px solid #e4e9f1;background:#fff}
#localOutsourcePage .outsource-card-footer .truck-card-depart{min-height:34px;padding:7px 13px;font-size:12px;font-weight:800}
#localOutsourcePage .outsource-delete-load{display:grid;place-items:center;flex:0 0 28px;width:28px!important;height:28px!important;min-width:28px!important;padding:0!important;border:0!important;border-radius:8px!important;background:#fff0ee!important;color:#b42318!important;font-size:18px!important}
@media(max-width:760px){#typedLocalOutsourceDialog .outsource-dialog-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#typedLocalOutsourceDialog .outsource-dialog-fields .span2{grid-column:span 2}#typedLocalOutsourceDialog .outsource-load-material{grid-template-columns:1fr 1fr}#typedLocalOutsourceDialog .outsource-load-material h4{grid-column:1/-1}}

/* Finished-goods packing viewer prints only the upper packing sheet on A4 portrait. */
@page inventoryFinishedPacking{size:A4 portrait;margin:6mm}
@media print{
  body[data-print-inventory-packing="true"]{margin:0!important;background:#fff!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open]{page:inventoryFinishedPacking;box-sizing:border-box!important;display:block!important;position:static!important;inset:auto!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open]::backdrop{background:transparent!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open]>.inventory-history-view{box-sizing:border-box!important;display:block!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-finished-packing-header{display:grid!important;grid-template-columns:minmax(0,1fr) 110px!important;align-items:stretch!important;gap:6px!important;width:100%!important;padding:6px!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-finished-packing-fields{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:4px!important;min-width:0!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-packing-operator{grid-column:span 2!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-packing-summary-item{min-width:0!important;min-height:39px!important;padding:4px 6px!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-packing-summary-item :is(strong,span){white-space:nowrap!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[data-inventory-packing-print-quality="good"] .inventory-packing-quality-reject{display:none!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[data-inventory-packing-print-quality="reject"] .inventory-packing-quality-good{display:none!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-packing-style-image{display:flex!important;width:110px!important;height:83px!important;min-height:83px!important;max-height:83px!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .inventory-packing-style-image img{width:100%!important;height:100%!important;object-fit:contain!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] :is(.inventory-packing-movements,.inventory-packing-edit-history){display:none!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] :is(.packing-table-wrap,.inventory-packing-sheet-stage){box-sizing:border-box!important;width:100%!important;max-width:100%!important;overflow:visible!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] .packing-list-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] :is(.inventory-finished-packing-header,.inventory-packing-sheet-stage,h3,table){break-inside:auto}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] tr{break-inside:avoid;break-after:auto}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] thead{display:table-header-group}
  body[data-print-inventory-packing="true"] #typedInventoryViewDialog[open] tfoot{display:table-row-group}
}

/* Cut-sheet and pattern-room records share one compact top-right print action. */
.development-dialog-head-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px;margin-left:8px}
dialog .dialog-head .development-dialog-head-actions>.icon-btn{position:static!important;inset:auto!important;transform:none!important}
.development-print-button svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#cutSheetDialog .cut-dialog-head-actions{display:flex;align-items:center;gap:8px}
#cutSheetDialog .cut-template-tools{margin-right:0}

@page developmentWorksheetPortrait{size:A4 portrait;margin:6mm}
@media print{
  body[data-print-development-worksheet]{margin:0!important;background:#fff!important}
  body[data-print-development-worksheet]>*{display:none!important}
  body[data-print-development-worksheet]>dialog[data-development-print-active][open]{page:developmentWorksheetPortrait;display:block!important;position:static!important;inset:auto!important;box-sizing:border-box!important;width:198mm!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  body[data-print-development-worksheet]>dialog[data-development-print-active][open]::backdrop{display:none!important;background:transparent!important}
  body[data-print-development-worksheet]>dialog[data-development-print-active][open]>form{page:developmentWorksheetPortrait;display:block!important;box-sizing:border-box!important;width:var(--development-worksheet-source-width)!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;zoom:var(--development-worksheet-print-zoom);break-inside:avoid!important;page-break-inside:avoid!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-scroll,.pattern-sheet-scroll){display:block!important;max-height:none!important;overflow:visible!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] .dialog-head{position:static!important;inset:auto!important;min-height:0!important;margin:0 0 6px!important;padding:0 0 6px!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.development-dialog-head-actions,.dialog-actions,.cut-template-tools,.cut-sheet-actions,[data-cut-remove-measure],[data-add-pattern-layout]){display:none!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-grid,.pattern-sheet-grid){width:100%!important;min-width:0!important;max-width:none!important;table-layout:fixed!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-section,.pattern-sheet-section){margin-top:5px!important;border-radius:3px!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-section-title,.pattern-sheet-section-title){min-height:0!important;padding:3px 5px!important;line-height:1.1!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-grid,.pattern-sheet-grid) :is(th,td){height:auto!important;padding:2px 3px!important;line-height:1.08!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(input,select,textarea,output){min-height:0!important;padding:1px 2px!important;line-height:1.08!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-order-image,.cut-order-image-empty,.pattern-order-image,.pattern-order-image-empty){height:108px!important;max-height:108px!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] :is(.cut-sheet-section,.pattern-sheet-section,table,tr,img){break-inside:avoid!important;page-break-inside:avoid!important}
  body[data-print-development-worksheet] dialog[data-development-print-active] textarea{height:auto!important;overflow:visible!important;resize:none!important}
}

/* Production cutting and packing records share the sample-room portrait print treatment. */
.production-record-dialog-head-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px;margin-left:8px}
dialog .dialog-head .production-record-dialog-head-actions>.icon-btn{position:static!important;inset:auto!important;transform:none!important}
.production-record-print-icon{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border:1px solid #d8deea!important;border-radius:10px!important;background:#f4f6ff!important;color:#5149da!important}
.production-record-print-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Warehouse-only readability: enlarge the inventory table type by 10% without resizing its layout. */
#inventory[data-inventory-renderer="typescript-v1"] .inventory-table-wrap th,
#inventory[data-inventory-renderer="typescript-v1"] .inventory-table-wrap td{font-size:12.1px}
#inventory[data-inventory-renderer="typescript-v1"] .inventory-balance-heading{background:#e4f4e8}
#inventory[data-inventory-renderer="typescript-v1"] .stock-unified-table tbody td.inventory-available-cell{background:#eff9f2}
#inventory[data-inventory-renderer="typescript-v1"] .stock-unified-table tbody td.inventory-remaining-cell{background:#eff9f2}
/* Short English warehouse labels apply to every ledger; leave a little room before the date. */
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(6){width:110px;min-width:110px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(7){width:100px;min-width:100px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(10){width:55px;min-width:55px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(12){width:70px;min-width:70px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(13){width:65px;min-width:65px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger]:not([data-inventory-ledger="finished-goods"]) .stock-unified-table :is(th,td):nth-child(14){width:90px;min-width:90px}
/* Keep finished-goods quantity labels and values aligned across every row. */
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-finished-quantity-stack{width:100%;min-width:0;box-sizing:border-box}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-finished-quantity-stack small{min-width:0;overflow:hidden;text-overflow:ellipsis}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-finished-quantity-stack b{justify-self:end;font-size:11.5px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody td:nth-child(11){padding-left:6px;padding-right:6px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody td.inventory-available-cell{padding-left:6px;padding-right:6px}
/* The category and PCS unit are already fixed by this ledger; use their space for readable balances. */
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-table-wrap{overflow-x:hidden}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"]>h2::after{content:" · PCS";color:#67758b;font-size:11px;font-weight:700}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table{width:100%;min-width:0;max-width:100%;table-layout:fixed}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td){min-width:0;padding:8px 3px;overflow-wrap:anywhere}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table thead th{white-space:nowrap;overflow-wrap:normal;word-break:keep-all;line-height:1.15}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-color-value{gap:4px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-color-swatch{width:10px;height:10px;flex:0 0 10px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(1),:nth-child(9)):not([colspan]){display:none}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(2){width:10.5%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(3){width:6%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(4){width:4%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(5){width:9.5%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(6){width:5%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(7){width:9%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(8){width:11%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(10){width:4.5%}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(11),:nth-child(13)){width:11%;min-width:0}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(12),:nth-child(14)){width:5%;min-width:0}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(15){width:8.5%}
/* Fit SECONDARY without taking the colour, date or action columns away. */
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(2){width:10%}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(6){width:7%}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody td:nth-child(6){font-size:10.5px;letter-spacing:-.3px;white-space:nowrap}
/* The three quantity/carton pairs share the same internal rhythm in English. */
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(8),:nth-child(11),:nth-child(13)){width:9%}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(10),:nth-child(12),:nth-child(14)){width:6%}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(15){width:9.5%}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)){padding-left:4px;padding-right:4px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack{width:76px;max-width:100%;margin-left:auto}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack>span{grid-template-columns:34px max-content;column-gap:5px}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack small{font-size:10.5px!important}
html[lang="en"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack b{justify-self:start;font-size:12.5px;text-align:left}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-finished-quantity-stack>span{grid-template-columns:max-content minmax(0,1fr);column-gap:5px}
/* Chinese good/reject labels and each quantity/carton pair use the same alignment. */
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(2){width:10%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(3){width:6.5%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(5){width:11.5%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(6){width:5.5%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(7){width:10%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(8),:nth-child(11),:nth-child(13)){width:8.5%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):is(:nth-child(10),:nth-child(12),:nth-child(14)){width:6%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th,td):nth-child(15){width:9%}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)){padding-left:4px;padding-right:4px}
/* Each group uses one fixed label baseline, independent of how many digits a row contains. */
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack{max-width:100%;margin-left:auto}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack{width:66px}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack>span{grid-template-columns:24px max-content;column-gap:5px}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack small{font-size:10.5px!important}
html[lang="zh-CN"] #inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(8),td:nth-child(11),td:nth-child(13)) .inventory-finished-quantity-stack b{justify-self:start;font-size:12.5px;text-align:left}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table :is(th:nth-child(10),th:nth-child(12),th:nth-child(14)){text-align:center}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table tbody :is(td:nth-child(10),td:nth-child(12),td:nth-child(14)) .inventory-finished-count-stack>span{justify-content:center;padding-left:0}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .erp-order-image-layout{display:flex;min-width:0;width:100%;max-height:none;gap:4px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .erp-order-row-image{width:30px;height:30px;flex-basis:30px}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .erp-order-image-text{overflow:hidden}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .erp-order-image-text :is(b,small){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-colour-line{white-space:normal;overflow-wrap:anywhere}
#typedInventoryViewDialog .inventory-packing-receipts{margin:12px 0 14px}
#typedInventoryViewDialog .inventory-packing-receipts h3{margin:0 0 7px;color:#26354f;font-size:13px}
#typedInventoryViewDialog .inventory-packing-receipts table{width:100%;min-width:0;table-layout:fixed}
#typedInventoryViewDialog .inventory-packing-receipts :is(th,td){padding:7px 6px;font-size:11px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1100px){#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .inventory-table-wrap{overflow-x:auto}#inventory[data-inventory-renderer="typescript-v1"] [data-inventory-ledger="finished-goods"] .stock-unified-table{min-width:920px}}
@media print{body[data-print-inventory-packing] #typedInventoryViewDialog .inventory-packing-receipts{display:none!important}}

@page productionRecordPortrait{size:A4 portrait;margin:6mm}
@media print{
  body[data-print-production-record]{margin:0!important;background:#fff!important}
  body[data-print-production-record]>*{display:none!important}
  body[data-print-production-record]>dialog[data-production-record-print-active][open]{page:productionRecordPortrait;display:block!important;position:static!important;inset:auto!important;box-sizing:border-box!important;width:198mm!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  body[data-print-production-record]>dialog[data-production-record-print-active][open]::backdrop{display:none!important;background:transparent!important}
  body[data-print-production-record]>dialog[data-production-record-print-active][open]>form{page:productionRecordPortrait;display:block!important;box-sizing:border-box!important;width:var(--production-record-source-width)!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;zoom:var(--production-record-print-zoom);break-inside:avoid!important;page-break-inside:avoid!important}
  body[data-print-production-record] dialog[data-production-record-print-active] .dialog-head{position:static!important;inset:auto!important;min-height:0!important;margin:0 0 5px!important;padding:0 0 5px!important}
  body[data-print-production-record] dialog[data-production-record-print-active] .dialog-head h2{margin:0!important;font-size:16px!important;line-height:1.15!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(button,.production-record-dialog-head-actions,.fabric-sheet-actions,.dialog-actions,.edit-history,[data-packing-shipment-history-host]){display:none!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(.packing-sheet-header,.fabric-sheet-section,.reject-carton-section,.packing-bottom-sheet,.packing-totals){margin-top:5px!important;margin-bottom:5px!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(.packing-sheet-header,.fabric-sheet-section){padding:6px!important}
  body[data-print-production-record] dialog[data-production-record-print-active] .fabric-sheet-section>h3{margin:-6px -6px 6px!important;padding:4px 6px!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(.packing-table-wrap,.fabric-sheet-section){max-height:none!important;overflow:visible!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(.packing-list-table,.fabric-size-table){width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(.packing-list-table,.fabric-size-table) :is(th,td){height:auto!important;padding:2px 3px!important;line-height:1.08!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(input,select,textarea,output){min-height:0!important;padding:2px 3px!important;line-height:1.08!important}
  body[data-print-production-record] dialog[data-production-record-print-active] textarea{height:auto!important;overflow:visible!important;resize:none!important}
  body[data-print-production-record] dialog[data-production-record-print-active] :is(table,tr,img,.packing-sheet-header,.fabric-sheet-section,.packing-bottom-sheet,.packing-totals){break-inside:avoid!important;page-break-inside:avoid!important}
}

/* Quarterly style dashboard and merchandiser filters. */
.header-actions #headerQuarterlyDashboard{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;height:30px;padding:0 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:#667085;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;transition:.18s}
.header-actions #headerQuarterlyDashboard span:first-child{font-size:19px;line-height:1}
.header-actions #headerQuarterlyDashboard:hover{transform:translateY(-2px);background:#f0f2ff;border-color:#d9dcf8;color:#514bd8;box-shadow:0 5px 12px #3447671c}
#clientStyleOverviewPage .client-style-toolbar{grid-template-columns:minmax(100px,150px) minmax(130px,180px) minmax(145px,190px) minmax(160px,1fr) auto auto;align-items:center}
#clientStyleOverviewPage .client-style-toolbar>*{min-width:0}
#dashboardMonthlyOrderPlan>.card-title,#styleMonthlyPlanPage .schedule-card>.card-title{gap:10px;flex-wrap:wrap}
#dashboardMonthlyOrderPlan .style-plan-toolbar,#styleMonthlyPlanPage .style-plan-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(125px,max-content) minmax(145px,max-content) minmax(120px,max-content) 34px;gap:8px;width:100%;margin-left:0}
#dashboardMonthlyOrderPlan .style-plan-toolbar input,#styleMonthlyPlanPage .style-plan-toolbar input{width:100%;min-width:0}
#dashboardMonthlyOrderPlan .style-plan-toolbar label,#styleMonthlyPlanPage .style-plan-toolbar label{min-width:0;white-space:nowrap}
#dashboardMonthlyOrderPlan .style-plan-toolbar select,#styleMonthlyPlanPage .style-plan-toolbar select{min-width:0;max-width:160px}
#styleQuarterlyDashboardDialog{width:min(1500px,96vw);max-width:96vw;max-height:92vh;overflow:hidden}
#styleQuarterlyDashboardDialog .style-quarterly-dashboard-shell{display:grid;grid-template-rows:auto minmax(0,1fr);max-height:92vh;padding:20px;gap:14px}
#styleQuarterlyDashboardDialog .dialog-head{gap:15px;align-items:flex-start}
#styleQuarterlyDashboardDialog .dialog-head .icon-btn{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #dfe3eb;border-radius:9px;background:#fff;color:#625de8}
#styleQuarterlyDashboardDialog .dialog-head h2{font-size:21px}
#styleQuarterlyDashboardDialog [data-quarterly-content]{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px}
.style-quarterly-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;color:#344054}
.style-quarterly-toolbar label{display:flex;align-items:center;gap:8px;font-size:12px}
.style-quarterly-toolbar select{min-width:130px;padding:8px;border:1px solid #dfe3eb;border-radius:8px;background:#fff;color:#344054}
.style-quarterly-table-scroll{overflow:auto;min-height:0;border:1px solid #e3e8f1;border-radius:10px}
.style-quarterly-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
.style-quarterly-table :is(th,td){padding:8px 10px;border-right:1px solid #edf0f5;border-bottom:1px solid #edf0f5;white-space:nowrap;font-size:12px}
.style-quarterly-table th{position:sticky;top:0;z-index:2;background:#f2f6fc;color:#4f5d76;font-size:11px}
.style-quarterly-table th:first-child,.style-quarterly-table td:first-child{min-width:125px}
.style-quarterly-table th:nth-child(2),.style-quarterly-table td:nth-child(2){min-width:110px}
.style-quarterly-table th:nth-child(4),.style-quarterly-table td:nth-child(4){min-width:145px}
.style-quarterly-table th:nth-child(n+5){min-width:88px}
.style-quarterly-table td small{display:block;margin-top:3px;color:#7b8799}
.style-quarterly-table .style-table-photo,.style-quarterly-no-image{width:48px;height:48px;object-fit:contain;border-radius:7px;background:#eef2fa;display:grid;place-items:center}
.style-quarterly-table .style-quarterly-number{text-align:right;font-variant-numeric:tabular-nums}
.style-quarterly-table .style-quarterly-total{font-weight:800;color:#225baf;background:#eef5ff}
@media(max-width:1000px){#clientStyleOverviewPage .client-style-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}#dashboardMonthlyOrderPlan .style-plan-toolbar,#styleMonthlyPlanPage .style-plan-toolbar{grid-template-columns:minmax(180px,1fr) repeat(3,minmax(110px,max-content)) 34px;overflow-x:auto}}

#styleClientFilterBar{flex-wrap:wrap;align-items:center}
#styleClientFilterBar [data-style-merchandiser-filter]{min-width:155px}
#styleQuarterlyDashboardDialog .style-quarterly-filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#styleQuarterlyDashboardDialog [data-quarterly-search]{width:230px;max-width:100%;min-width:0;padding:8px;border:1px solid #dfe3eb;border-radius:8px;background:#fff;color:#344054}
#styleQuarterlyDashboardDialog .style-quarterly-toolbar{flex-wrap:wrap}
#styleQuarterlyDashboardDialog .style-quarterly-table :is(th,td){padding:4px 8px;line-height:1.15}
#styleQuarterlyDashboardDialog .style-quarterly-table td small{margin-top:1px}
#styleQuarterlyDashboardDialog .style-quarterly-table .style-table-photo,
#styleQuarterlyDashboardDialog .style-quarterly-no-image{width:34px;height:34px}
#orders .ts-order-merchandiser{display:block;margin-top:3px;color:#69758b;font-size:10px;line-height:1.2;white-space:nowrap}
