.sales-toolbar input{flex:1;min-width:200px}
.sales-toolbar select{width:180px}
.sales-order-group{border-top:1px solid var(--line)}
.sales-order-group>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;background:#fff}
.sales-order-group>summary::before{content:'›';font-size:24px;color:var(--blue)}
.sales-order-group[open]>summary::before{content:'⌄'}
.sales-order-group>summary>span:first-of-type{flex:1;min-width:0}
.sales-order-group>summary>span:last-of-type{text-align:right}
.sales-order-group small{display:block}
.sales-order-group>summary:hover{background:#f5faff}
.sales-cost-summary{margin-top:4px;white-space:normal;line-height:1.6}
.sales-group-actions{display:flex;gap:8px;flex-wrap:wrap;padding:0 20px 14px}
.sales-status{white-space:normal;min-width:125px}
.sales-status .badge{margin:2px}
.sales-import-more>summary,.sales-extra>summary,.sales-line-extra>summary,.sales-preview>summary{cursor:pointer;color:var(--blue);font-weight:600}
.sales-import-more button{margin-top:8px}
.sales-order-group .actions{min-width:130px}
.record-count [data-sales-more]{margin-left:16px}
#salesOrderEditor{width:min(1560px,calc(100vw - 28px))}
.sales-header-summary{padding:20px 23px;background:#f5faff}
.sales-header-summary p{margin:8px 0}
.sales-header-summary small{display:block;color:var(--muted)}
.sales-editor-body{padding:0 23px 23px}
.sales-cost-fields{margin:0;border:1px solid var(--line);border-radius:10px;padding:14px 16px;background:#f8fbfe}
.sales-cost-fields legend{font-size:14px;font-weight:600;color:#435d70;padding:0 6px}
.sales-cost-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.sales-cost-fields p{margin:12px 0 0;color:var(--muted);font-size:13px;line-height:1.7}
.sales-extra .form-grid{padding:16px 0 0}
.sales-matrix-toolbar{display:flex;gap:18px;align-items:end;justify-content:space-between;flex-wrap:wrap;margin:8px 0 14px}
.sales-matrix-toolbar>div:first-child{flex:1;min-width:240px}
.sales-matrix-toolbar h3{margin:0 0 7px;font-size:17px}
.sales-matrix-toolbar p{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.sales-add-size{width:270px;max-width:100%}
.sales-add-size>label{display:block;margin-bottom:6px;font-size:13px;color:#435d70}
.sales-add-size>div{display:flex;gap:8px}
.sales-add-size input{flex:1;min-width:0}
.sales-add-size button{flex-shrink:0}
.sales-matrix-wrap{border:1px solid var(--line);border-radius:11px;margin:0 0 14px;max-height:62vh;overflow:auto;background:#fff}
.sales-matrix{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}
.sales-matrix th,.sales-matrix td{padding:10px 8px;border-right:1px solid #e3eaf0;border-bottom:1px solid #e3eaf0;max-width:none;min-width:88px;overflow:visible;vertical-align:top;white-space:normal}
.sales-matrix th{position:sticky;top:0;z-index:1;text-align:center;background:#eef5fb;color:#35586f;line-height:1.6}
.sales-matrix th:first-child{text-align:left;min-width:210px}
.sales-matrix tbody tr:nth-child(even){background:#f8fbfe}
.sales-matrix tbody tr:hover{background:#f3f8fd}
.sales-matrix input,.sales-matrix select,.sales-matrix textarea{font-size:14px}
.sales-matrix input,.sales-matrix select{max-width:none;padding:9px 7px}
.sales-matrix td:not(.sales-matrix-product) input[type=text]{width:98px}
.sales-matrix td:not(.sales-matrix-product) input[data-sales-field=color],.sales-matrix td:not(.sales-matrix-product) input[data-sales-field=liningColor]{width:84px}
.sales-matrix .sales-matrix-product{min-width:210px;width:auto}
.sales-matrix-product select{width:190px}
.sales-matrix-product .item-pick-trigger{display:block;margin:7px 0;font-size:12px}
.sales-row-number{display:inline-block;color:var(--blue);font-size:12px;font-weight:600;margin-bottom:7px}
.sales-product-name{display:block;font-size:13px;line-height:1.6;overflow-wrap:anywhere;max-width:220px}
.sales-matrix .sales-line-picture{min-width:124px;width:124px}
.sales-line-picture .sku-card{display:flex;flex-direction:column;min-width:0;gap:6px;align-items:center;max-width:108px;text-align:center}
.sales-line-picture .sku-copy{min-width:0;max-width:108px}
.sales-line-picture .sku-copy b,.sales-line-picture .sku-copy span{overflow-wrap:anywhere;white-space:normal}
.sales-line-picture .sku-copy small{display:none}
.sales-line-picture .sku-photo,.sales-line-picture .sku-photo img,.sales-line-picture .sku-placeholder{width:64px;height:64px}
.sales-line-picture .sku-placeholder{display:inline-flex;align-items:center;justify-content:center;white-space:normal;text-align:center}
.sales-matrix .sales-size-cell,.sales-matrix .sales-size-heading{min-width:74px;width:74px;text-align:center}
.sales-size-cell input{width:58px;text-align:center;padding:9px 5px}
.sales-matrix .sales-quantity-total,.sales-matrix .sales-total-heading{min-width:102px;width:102px;text-align:center;background:#fff9e8}
.sales-quantity-total output{display:block;padding-top:10px;color:#244e6b;font-size:18px;font-weight:700}
.sales-matrix .sales-matrix-price{min-width:114px;width:auto}
.sales-matrix-price input{width:88px}
.sales-matrix-price small{display:block;margin-top:10px;line-height:1.6;font-size:12px}
.sales-matrix .sales-matrix-extra{min-width:180px;width:180px}
.sales-matrix-extra>button{margin-top:12px}
.sales-line-extra>summary{font-size:13px;line-height:1.7}
.sales-line-extra .field{margin-top:12px;min-width:0}
.sales-line-extra textarea{width:164px}
.sales-line-extra input[type=date]{width:164px}
.sales-matrix tfoot th,.sales-matrix tfoot td{background:#edf5fb;border-bottom:0;vertical-align:middle;font-weight:600}
.sales-matrix tfoot th{position:static;text-align:left}
.sales-matrix tfoot .sales-quantity-total output{padding-top:0}
.sales-preview{margin-top:22px}
.sales-preview>summary{margin-bottom:8px}
.sales-preview .muted{margin-bottom:10px}
#salesTotals{margin-right:auto;align-self:center;color:var(--blue);line-height:1.7}
#salesOrderEditor .dialog-actions{flex-wrap:wrap}
@media(max-width:850px){
 .sales-order-group>summary{gap:12px;padding:15px}
 .sales-order-group>summary>span:last-of-type{max-width:42%}
 .sales-order-group>summary b,.sales-order-group>summary small{overflow-wrap:anywhere}
 .sales-order-group td{white-space:normal;min-width:110px}
 .sales-cost-grid{gap:12px}
}
@media(max-width:520px){
 .sales-toolbar select{width:100%}
 .sales-editor-body{padding:0 14px 14px}
 .sales-cost-grid{grid-template-columns:1fr}
 .sales-cost-fields{padding:12px}
 .sales-matrix-toolbar{align-items:start}
 .sales-add-size{width:100%}
 .sales-matrix-wrap{max-height:58vh}
 #salesTotals{flex-basis:100%;font-size:13px}
 .sales-order-group>summary{flex-wrap:wrap}
 .sales-order-group>summary>span:last-of-type{max-width:none;flex-basis:100%;text-align:left;padding-left:21px}
 .sales-header-summary{padding:16px 14px}
}
