/* Compact order sheets: primary fields, line grid, then supporting information. */
.order-sheet{--sheet-surface:#eef0f2;--sheet-border:#bcc4cd;--sheet-tab:#d7dce2;min-width:0}
.dark .order-sheet{--sheet-surface:#252830;--sheet-border:#484c56;--sheet-tab:#333740}
.order-sheet [hidden],[data-sheet-tabs]>[hidden]{display:none!important}
.sheet-tabs{display:flex;gap:3px;overflow-x:auto;border-bottom:1px solid var(--sheet-border,var(--line));margin:0;padding:0}
.sheet-tabs button{flex:0 0 auto;min-width:115px;border:1px solid var(--sheet-border,var(--line));border-bottom:0;border-radius:0;padding:7px 14px;background:var(--sheet-tab,#d7dce2);color:var(--ink);text-align:left;white-space:nowrap;font-size:12px}
.sheet-tabs button[aria-selected=true]{background:var(--sheet-surface,#eef0f2);box-shadow:inset 0 2px #bc2838;font-weight:600}
.sheet-tabs-ready>[data-sheet-pane]>legend,.sheet-tabs-ready>details[data-sheet-pane]>summary{display:none}
.order-sheet [data-sheet-pane]{margin:0;border-radius:0;box-shadow:none}
.order-sheet .sheet-primary{padding:10px 12px;background:var(--sheet-surface);border:1px solid var(--sheet-border);border-top:0}
.sheet-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 26px;margin:0}
.sheet-fields>div{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.sheet-fields dt,.sheet-fields label{font-size:12px;color:var(--muted);font-weight:400;margin:0}
.sheet-fields dd{margin:0;padding:4px 7px;background:var(--paper);border:1px solid var(--sheet-border);min-height:28px;box-sizing:border-box;overflow-wrap:anywhere}
.order-sheet .heading{margin:10px 0;align-items:center;gap:12px}
.order-sheet .heading h1,.order-sheet .heading.order-hero h1.order-hero-reg{font-size:19px!important;letter-spacing:0;margin:0}
.order-sheet .heading h2{font-size:13px;margin:3px 0 0;font-weight:400;color:var(--muted)}
.order-desktop .heading p,.order-desktop .heading .order-hero-number{display:none}
.order-sheet .heading .actions{gap:5px;justify-content:flex-end}
.order-sheet .heading .actions .button,.order-sheet .heading .actions button{padding:5px 8px;min-height:30px}
.order-sheet .order-status-control{background:none;border:0;box-shadow:none;padding:8px 0 0;margin:8px 0 0;gap:16px;border-top:1px solid var(--sheet-border);align-items:center}
.order-sheet .order-status-control h2{display:none}
.order-sheet .order-status-control>div:first-child{margin:0}
.order-sheet .order-status-fields{gap:8px;align-items:center}
.order-sheet .order-status-fields>div{display:flex;align-items:center;gap:8px}
.order-sheet .order-status-fields label{margin:0;white-space:nowrap;font-weight:400}
.order-sheet .order-status-fields select,.order-sheet .order-status-fields button{min-height:30px;min-width:0;padding:5px 8px;font-size:12px}
.order-sheet .order-blocks{margin:12px 0;border-radius:0;box-shadow:none;overflow:visible}
.order-sheet .block-toolbar{padding:7px 10px;background:var(--sheet-surface);border-bottom:1px solid var(--sheet-border)}
.order-sheet .block-toolbar h2{font-size:13px;margin:0}
.order-sheet .block-toolbar .button,.order-sheet .job-block-heading button,.order-sheet .job-block-heading .button{padding:4px 8px;min-height:28px}
.order-sheet .job-block-heading{padding:5px 10px;border-top:0;font-size:12px}
.order-sheet .job-block-heading:not(:has(.badge)){display:none}
.order-sheet td,.order-sheet th{padding:6px 8px;font-size:12px}
.order-sheet .order-lines-table th{white-space:nowrap}
.order-sheet .order-lines-table th:nth-child(n+3):nth-child(-n+7),.order-sheet .order-lines-table td:nth-child(n+3):nth-child(-n+7){text-align:right}
.order-sheet .order-lines-table .line-description{width:100%}
.order-sheet .line-description small{font-size:10px;color:var(--muted)}
.order-sheet .line-discount{flex-wrap:nowrap;justify-content:flex-end}
.order-sheet .line-discount button,.order-sheet .line-actions button{padding:4px 6px;min-height:28px}
.order-sheet .line-actions form{margin:0 0 4px}
.order-sheet .line-actions details{font-size:11px}
.order-sheet .sheet-footer{margin-top:12px}
.order-sheet .sheet-footer>[data-sheet-pane]{padding:12px;background:var(--sheet-surface);border:1px solid var(--sheet-border);border-top:0}
.order-sheet .sheet-footer>[data-sheet-pane]>h2{display:none}
.sheet-total-layout{display:flex;align-items:flex-start;gap:35px;flex-wrap:wrap}
.sheet-totals{margin:0;width:300px;max-width:100%}
.sheet-totals>div{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:3px 0}
.sheet-totals dt{font-size:12px}.sheet-totals dd{margin:0;min-width:125px;text-align:right;background:var(--paper);border:1px solid var(--sheet-border);padding:3px 7px;font-variant-numeric:tabular-nums}
.sheet-totals>div:last-child{font-weight:700}.sheet-total-layout .vat-totals{font-size:12px}
.order-sheet .sales-actions{margin:12px 0 0}.order-sheet .sales-actions form{margin:0}
.order-sheet .sales-table table{min-width:750px}.order-sheet .sales-table .sale-description{min-width:180px;width:100%}
.order-sheet .sales-table td:nth-child(n+4):nth-child(-n+8){text-align:right;white-space:nowrap}
.order-sheet .sales-table th:nth-child(n+4):nth-child(-n+8){text-align:right}
.line-entry{padding:10px 12px;background:var(--sheet-surface,#eef0f2)}
.line-entry header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.line-entry header h3{font-size:13px;margin:0}.line-entry header a{font-size:11px}
.line-entry .line-mode{margin:0 0 8px;gap:4px}
.line-entry .line-mode button{font-size:12px;min-height:30px!important;padding:5px 10px}
.line-entry input,.line-entry select{min-height:32px!important;padding:5px 7px;font-size:12px;margin:0}
.line-entry form>div,.line-entry .line-entry-fields>div{margin-bottom:0}
.line-entry .line-errors:empty{display:none}
.line-entry label{font-size:11px;font-weight:400;margin-bottom:3px}
.line-entry [data-item-status]{margin:4px 0;font-size:11px}.line-entry [data-item-status]:empty{display:none}
.line-entry .line-search-results{max-height:168px;margin:4px 0}.line-entry .line-search-results:empty{display:none}
.line-entry .line-result{min-height:32px;padding:5px 8px;font-size:12px;gap:12px}
.line-entry .line-result>span:first-child{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}.line-entry .line-result small{font-size:11px;margin:0}
.line-entry .line-selected{padding:6px 8px;margin:0;min-height:32px;box-sizing:border-box}
.line-entry .line-selected>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px}.line-entry .line-selected small{margin:0;font-size:11px}
.line-entry .line-entry-fields{grid-template-columns:1.2fr .65fr 1.3fr .65fr .65fr 1fr;gap:8px;margin-top:8px}
.line-entry .line-entry-fields>div[hidden]+div{grid-column:auto}
.line-entry [data-price-hint]{font-size:10px;margin-top:3px}
.line-entry .line-entry-footer{margin-top:8px;padding-top:8px;font-size:12px}
.line-entry .line-entry-footer .primary{min-height:32px;font-size:12px;padding:5px 12px}
.line-entry .line-manual-fields{gap:8px}.line-entry .line-added{padding:6px;margin:0 0 8px;font-size:12px}
.sale-line-form{display:grid;grid-template-columns:2fr 1.5fr 1fr .65fr 1fr .65fr auto;align-items:end;gap:8px}
.sale-line-form>div{min-width:0;margin:0}.sale-line-form input,.sale-line-form select{width:100%;box-sizing:border-box}
.sale-line-form .sale-line-feedback{grid-column:1/-1;order:2;margin:0;font-size:11px}
.sale-line-form .errorlist{grid-column:1/-1}.sale-line-form .helptext{font-size:10px}
.order-sheet .template-suggestions{padding:7px 12px;font-size:12px}
.order-editor .order-form-sections{max-width:none;margin:0;display:block}
.order-editor.record-form{max-width:none;padding:12px}
.order-editor .order-form-group,.order-editor .order-extra-fields .order-form-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 22px!important;margin:0;border-radius:0;padding:12px}
.order-editor .order-extra-fields{margin:0}
.order-editor .order-form-group .field{margin:0;min-width:0}
.order-editor .order-basics-help{font-size:11px}
.order-editor .order-form-group .field-title,.order-editor .order-form-group .field-complaint{grid-column:auto}
.order-editor .order-form-group label{font-size:12px;font-weight:400}
.order-editor .order-form-group .field small{font-size:11px}
.order-editor .order-form-group textarea{height:65px;min-height:65px}
.order-editor .order-basics .field-title input{font-size:13px!important}
.order-editor .related-create{margin-top:5px;font-size:11px;min-height:28px}
.order-editor .form-actions{margin-top:12px}
@media(min-width:1051px){
 .line-entry form[data-line-entry]{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(0,3fr);gap:0 12px;align-items:start}
 .line-entry .line-mode,.line-entry .line-errors,.line-entry .line-entry-footer,.line-entry noscript{grid-column:1/-1}
 .line-entry .line-entry-fields{margin-top:0;grid-column:2;display:flex;gap:8px}
 .line-entry .line-entry-fields>div{flex:1}.line-entry .line-entry-fields>div:nth-child(3){flex:1.5}
 .line-entry [data-item-picker],.line-entry [data-manual-fields]{grid-column:1}
 .line-entry .line-search-results:not(:empty){position:absolute;z-index:20;width:min(550px,calc(100vw - 70px));box-shadow:0 4px 10px #0003;border:1px solid var(--line)}
}
@media(max-width:1050px){.sheet-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 15px}.sale-line-form{grid-template-columns:repeat(3,minmax(0,1fr))}.order-editor .order-form-group,.order-editor .order-extra-fields .order-form-group{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .sheet-fields{grid-template-columns:1fr}.sheet-fields>div{grid-template-columns:100px minmax(0,1fr)}
 .order-sheet .heading{flex-wrap:wrap}.order-sheet .heading .actions{justify-content:flex-start}
 .order-sheet .order-status-fields>div{display:block}.order-sheet .order-status-fields{display:flex;flex-wrap:wrap}.order-sheet .order-status-control{display:block}
 .order-sheet .order-status-control>div:first-child{margin-bottom:7px}.order-sheet .order-status-fields label{margin-bottom:3px}
 .sheet-tabs button{min-height:40px;min-width:100px}.line-entry .line-mode{display:flex}.line-entry .line-mode button{flex:1;min-height:40px!important;white-space:nowrap}
 .line-entry .line-entry-fields,.sale-line-form{grid-template-columns:1fr 1fr}.sale-line-form .sale-field-product_select,.sale-line-form .sale-field-product_code{grid-column:1/-1}
 .line-entry input,.line-entry select,.line-entry .line-entry-footer .primary{min-height:40px!important}
 .line-entry .line-result{min-height:42px}.line-entry .line-selected>div{display:block}.line-entry .line-selected small{margin-top:3px}
 .order-editor .order-form-group,.order-editor .order-extra-fields .order-form-group{grid-template-columns:1fr}
 .order-sheet .line-discount{justify-content:flex-start}.order-sheet .order-lines-table td:nth-child(n){text-align:left}
 .order-sheet .line-actions button,.order-sheet .line-discount button{min-height:40px}
}
@media print{.sheet-tabs,.line-entry,.order-sheet .order-status-control{display:none!important}.order-sheet [data-sheet-pane][hidden]{display:block!important}}
