.orderEditorPage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(180px,1fr) auto auto;min-width:0;overflow:hidden;gap:3px;padding:4px;background:var(--surface,#ededee);color:var(--text,#17374f)}
.orderEditorPage>*{min-width:0}.orderEditorPage .orderEditorHeader{grid-template-columns:minmax(0,29fr) minmax(0,51fr) minmax(0,20fr)}.orderEditorPage .orderEditorDetails{grid-template-columns:minmax(0,1fr)}.orderEditorPage .orderEditorLower{grid-template-columns:minmax(0,38fr) minmax(0,62fr)}.orderEditorPage .orderEditorGrid{min-width:0}.orderEditorPage .orderEditorTotals{grid-template-columns:repeat(3,minmax(65px,.7fr) minmax(80px,1fr))}
.orderEditorHeader{display:grid;grid-template-columns:29% 51% 20%;gap:4px}.orderEditorPage fieldset{border:1px solid #bfc3c7;padding:5px;min-width:0;margin:0}.orderEditorPage legend{font-size:calc(11px * var(--quantum-font-scale,1));padding:0 4px}.orderEditorField{display:flex;align-items:center;gap:5px;margin:2px 0;font-size:calc(11px * var(--quantum-font-scale,1))}.orderEditorField>span{width:115px;flex:none}.orderEditorField>input,.orderEditorField>select,.orderEditorField>textarea{min-width:0;flex:1;padding:2px 4px;border:1px solid #bec2c7;font:inherit;color:inherit;background:var(--input-bg,#fff)}.orderEditorField>input[type=checkbox]{flex:none}.orderEditorHint,.orderEditorNotice{font-size:calc(11px * var(--quantum-font-scale,1));margin:3px;padding:3px}.orderEditorNotice{border-left:3px solid #bd8e28;background:#fff5d8;color:#624a17}.orderEditorSectionTabs,.orderEditorTools,.orderEditorFooter{display:flex;gap:5px;align-items:center}.orderEditorSectionTabs strong{font-size:calc(11px * var(--quantum-font-scale,1));padding:5px}.orderEditorPage button{font:inherit;font-size:calc(11px * var(--quantum-font-scale,1));padding:4px 8px}.orderEditorDetails{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0}.orderEditorTools>input{width:350px;max-width:60%;padding:5px}.orderEditorGrid{min-height:0}.orderEditorGrid td>input{width:100%;border:0;background:transparent;color:inherit;font:inherit;padding:2px;box-sizing:border-box}.orderEditorGrid td>input[inputmode=decimal]{text-align:right}.orderEditorUnsupported{background:#eee;color:#89929b}.orderEditorLower{display:grid;grid-template-columns:38% 62%;gap:5px}.orderEditorLower textarea{height:38px;resize:vertical}.orderEditorTotals{display:grid;grid-template-columns:repeat(3,auto minmax(80px,1fr));gap:4px 8px;margin:4px 0;font-size:calc(11px * var(--quantum-font-scale,1))}.orderEditorTotals dd{text-align:right;background:#fff;margin:0;padding:3px}.orderEditorTotals dt{padding:3px}.orderEditorStatus{flex:1;font-size:calc(11px * var(--quantum-font-scale,1));margin:3px}.orderEditorPage[hidden]{display:none}@media(max-width:1000px){.orderEditorPage{overflow:auto}.orderEditorHeader,.orderEditorLower{grid-template-columns:1fr}.orderEditorTotals{grid-template-columns:auto 1fr auto 1fr}.orderEditorGrid{min-height:300px}}
@media(max-width:1000px){.orderEditorPage .orderEditorHeader,.orderEditorPage .orderEditorLower{grid-template-columns:minmax(0,1fr)}.orderEditorPage .orderEditorTotals{grid-template-columns:minmax(65px,.7fr) minmax(80px,1fr) minmax(65px,.7fr) minmax(80px,1fr)}}

/* FormSiparisYeni: the detail grid fills the workspace; totals stay at the bottom. */
.orderEditorPage{grid-template-rows:auto auto auto minmax(180px,1fr) auto auto;grid-template-areas:'header' 'tabs' 'notice' 'details' 'lower' 'footer';gap:2px;padding:2px;background:#e8e8e8;color:#172f4b}
.orderEditorPage .orderEditorHeader{grid-area:header;grid-template-columns:minmax(280px,29fr) minmax(360px,61fr) minmax(180px,10fr);gap:4px}
.orderEditorPage .orderEditorSectionTabs{grid-area:tabs}
.orderEditorPage .orderEditorNotice{grid-area:notice}
.orderEditorPage .orderEditorDetails{grid-area:details;grid-template-rows:auto minmax(0,1fr);background:#fff}
.orderEditorPage .orderEditorLower{grid-area:lower;grid-template-columns:minmax(260px,30fr) minmax(0,70fr);height:125px;gap:4px}
.orderEditorPage .orderEditorFooter{grid-area:footer;padding-left:0;min-height:29px}
.orderEditorPage fieldset{padding:2px 4px;background:#e8e8e8}
.orderEditorPage legend{padding:0 3px}
.orderEditorHeader .orderEditorField{margin:1px 0;min-height:21px}
.orderEditorHeader .orderEditorField>span{width:85px}
.orderEditorHeader .orderEditorField>.quantumNumberField{flex:1; width:auto;max-width:190px}
.orderEditorHeader .quantumNumberField>input{padding:2px 4px;border:1px solid #bec2c7;font:inherit;color:inherit;background:var(--input-bg,#fff)}
.orderEditorHeader fieldset:first-child .orderEditorField>input,.orderEditorHeader fieldset:first-child .orderEditorField>select{max-width:190px}
.orderEditorHeader fieldset:last-child .orderEditorField>span{width:76px}
.orderEditorSectionTabs{gap:1px;align-items:end}
.orderEditorSectionTabs strong,.orderEditorSectionTabs button,.orderEditorDescriptionTabs button{border:1px solid #b7b7b7;border-bottom:0;background:#e4e4e4;border-radius:3px 3px 0 0;padding:3px 8px;font-weight:normal}
.orderEditorSectionTabs strong,.orderEditorDescriptionTabs button.active{background:#fafafa}
.orderEditorTools{padding:2px 3px;background:#f3f3f3}
.orderEditorTools>input{width:270px;padding:3px}
.orderEditorGrid .qgridSummary{min-height:24px;padding:2px 5px}
.orderEditorDescription{display:flex;flex-direction:column;min-height:0}
.orderEditorDescriptionTabs{display:flex;align-items:end;gap:1px}
.orderEditorDescription .orderEditorField{display:flex;flex:1;min-height:0;margin:0}
.orderEditorDescription .orderEditorField[hidden]{display:none}
.orderEditorDescription .orderEditorField>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.orderEditorDescription textarea{height:100%;resize:none}
.orderEditorAmountBox{min-height:0;overflow:auto}
.orderEditorAmountContent{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px 16px}
.orderEditorLocalAmounts{flex:2 1 360px;min-width:0}
.orderEditorCurrencyAmounts{flex:1 1 240px;min-width:0}
.orderEditorCurrencyAmounts>.orderEditorField{margin:2px 0;min-height:21px}
.orderEditorCurrencyAmounts>.orderEditorField>span{width:110px}
.orderEditorCurrencyAmounts input{text-align:right}
.orderEditorCurrencyTotals{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:5px;margin:2px 0;font-size:calc(11px * var(--quantum-font-scale,1))}
.orderEditorCurrencyTotals dt{padding:2px 0}
.orderEditorCurrencyTotals dd{text-align:right;background:var(--input-bg,#fff);margin:0;padding:2px 5px;border:1px solid #c6c6c6;border-radius:2px;color:inherit}
.orderEditorLocalAmounts>.orderEditorField{min-height:21px;margin:2px 0}
.orderEditorLocalAmounts>.orderEditorField>span{width:auto}
.orderEditorPage .orderEditorTotals{display:grid;grid-template-columns:100px minmax(80px,1fr) 100px minmax(80px,1fr);grid-auto-flow:row;gap:2px 6px;margin:2px 0;clear:both}
.orderEditorTotals dt{padding:2px}.orderEditorTotals dd{padding:2px 5px;border:1px solid #c6c6c6;border-radius:2px;color:#172f4b}
.orderEditorFooterTools{display:flex;gap:4px;min-width:0;overflow:auto}
.orderEditorFooterTools button{white-space:nowrap}
.orderEditorFooter .orderEditorStatus{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.orderEditorFooter>button{white-space:nowrap;flex:none}
@media(max-width:1000px){.orderEditorPage{overflow:auto;grid-template-rows:auto auto auto minmax(300px,1fr) auto auto}.orderEditorPage .orderEditorHeader{grid-template-columns:minmax(250px,1fr) minmax(300px,1.5fr)}.orderEditorPage .orderEditorHeader fieldset:last-child{grid-column:1/-1}.orderEditorPage .orderEditorLower{grid-template-columns:minmax(200px,1fr) minmax(300px,2fr);height:135px}.orderEditorPage .orderEditorFooter{padding-left:0}}
@media(max-width:650px){.orderEditorPage .orderEditorHeader,.orderEditorPage .orderEditorLower{grid-template-columns:minmax(0,1fr)}.orderEditorPage .orderEditorHeader fieldset:last-child{grid-column:auto}.orderEditorPage .orderEditorLower{height:auto}.orderEditorDescription{min-height:110px}.orderEditorPage .orderEditorFooter{flex-wrap:wrap}.orderEditorFooterTools{width:100%}}
.orderEditorHeader fieldset:nth-child(2) .orderEditorField:first-of-type>input{max-width:190px}

/* Match the compact desktop header without changing document values. */
.orderEditorHeader .orderEditorField[hidden]{display:none}
.orderEditorHeader fieldset:nth-child(2) .orderEditorField:first-of-type>input{flex:none;width:190px}
.orderEditorHeader fieldset:nth-child(2) .orderEditorField:nth-of-type(3)>select{flex:none;width:190px}
.orderEditorHeader fieldset:nth-child(2) .orderEditorField:nth-of-type(3)>span{width:115px;white-space:nowrap}
.orderEditorPage .orderEditorHeader{align-items:stretch}
.orderEditorPage .orderEditorFooter{padding-left:0;gap:4px}
.orderEditorFooterTools{flex-shrink:0}
.orderEditorFooterTools button{border:1px solid #bbb;background:#fff;min-height:28px}
.orderEditorFooter>button:nth-last-child(2){margin-left:auto}
.orderEditorPage .orderEditorStatus:empty{display:none}
.orderPage{--invoice-preview-height:230px}
.orderPage .invoicePreviewToggle{padding-top:4px;margin-top:0}
.orderPage .invoiceActions>.invoicePreviewToggle:first-of-type{margin-top:auto}
@media(max-width:1000px){.orderEditorPage .orderEditorFooter{padding-left:0}.orderEditorFooterTools{flex-shrink:1}}

.orderCommandDialog{max-width:96vw;width:1150px;max-height:90vh;overflow:auto}.orderCommandDialog .materialGrid{height:45vh;min-height:200px}.orderCommandDialog form.materialFilters{display:flex;flex-wrap:wrap;gap:12px}.orderCommandDialog form.materialFilters label{display:flex;flex-direction:column;gap:4px}.orderLotDialog{width:1350px;max-width:96vw;max-height:92vh;overflow:auto}.orderLotDialog .materialGrid{height:24vh;min-height:160px}.orderLotDialog .materialFilters{display:flex;flex-wrap:wrap;gap:8px}.orderLotDialog .materialFilters label{display:flex;flex-direction:column;gap:3px}.orderLotDialog>select{width:100%;margin:6px 0}

.transportCardDialog.orderLotDialog form.materialFilters,.transportCardDialog.orderLotDialog div.materialFilters,.transportCardDialog.orderCommandDialog form.materialFilters{display:flex;flex-wrap:wrap;align-items:end;gap:10px}.transportCardDialog.orderLotDialog .materialFilters>label,.transportCardDialog.orderCommandDialog .materialFilters>label{flex:0 1 185px;width:185px}.transportCardDialog.orderLotDialog .materialFilters input,.transportCardDialog.orderCommandDialog .materialFilters input{width:100%;box-sizing:border-box}.transportCardDialog.orderLotDialog .materialFilters>button,.transportCardDialog.orderCommandDialog .materialFilters>button{width:auto;flex:0 0 auto}.transportCardDialog.orderLotDialog .materialFilters>select{width:230px;flex:0 0 auto}

.orderEditorPage .orderEditorTrade{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.orderEditorTradeFields{display:flex;flex:1;flex-wrap:wrap;gap:12px}.orderEditorTradeFields>label{display:grid;grid-template-columns:minmax(140px,1fr) auto auto;gap:6px;flex:1 1 300px}.orderEditorTradeFields>label>span{grid-column:1/-1}.orderEditorTradeFields input{min-width:0;width:100%}.orderEditorTrade>label{display:flex;align-items:center;gap:6px}.orderEditorTrade>label input{width:auto}

/* Shared finance summary and the requested Other-tab placement. */
.orderEditorCustomerRisk{display:flex;flex-wrap:wrap;gap:3px 14px;font-size:calc(11px * var(--quantum-font-scale,1));padding:3px 0}
.orderEditorCustomerActions{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end}
.orderEditorPage .orderEditorOther{grid-area:details;min-height:0;overflow:auto}
.orderEditorPage .orderEditorOther[hidden],.orderEditorPage .orderEditorDetails[hidden]{display:none}
.orderEditorSectionTabs button.active{background:#fafafa;border-bottom-color:#fafafa}

@media(max-width:1100px){.orderEditorPage .orderEditorLower{height:auto;min-height:125px}}
@media(max-width:420px){.orderEditorPage .orderEditorTotals{grid-template-columns:100px minmax(0,1fr)}}
