/* Order workspace: persistent history alongside the three tabs. */
#editor.order-editor{width:min(1240px,96vw);max-width:1240px;max-height:94vh;padding:0;border:0;border-radius:12px;overflow:auto;background:#fff}
#editor.order-editor>header{position:sticky;top:0;z-index:4;background:#fff;padding:20px 24px;border-bottom:1px solid #e2e8ef;margin:0}
.order-editor #editor-body{padding:0}.order-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;min-height:58vh}.order-main{padding:22px 24px;min-width:0}.order-history{border-left:1px solid #e2e8ef;background:#f7f9fc;padding:22px 18px}.order-history h3{margin:0 0 24px;font-size:18px}.history-event{position:relative;border-left:2px solid #dbe4ef;padding:0 0 24px 14px;line-height:1.45}.history-event:before{content:'';position:absolute;left:-5px;top:5px;width:8px;height:8px;background:#5398da;border-radius:50%}.history-event strong{font-size:13px;font-weight:600;display:block}.history-event time,.history-event small{display:block;color:#718093;font-size:11px;margin-top:4px}.order-card-tabs{margin:20px 0 24px}.order-card-tabs button{padding:12px 16px}.order-editor .card-status{margin:0;gap:16px;justify-content:space-between}.card-status span{font-size:12px;color:#65748a}.order-editor .payment-section{margin:0}.payment-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:24px}.payment-summary>div{padding:16px;background:#f3f7fb;border:1px solid #e3ebf3;border-radius:8px}.payment-summary small{display:block;color:#6d7b8d;font-size:12px}.payment-summary strong{display:block;font-size:22px;margin-top:8px}.payment-summary .credit{color:#24865c}.payment-buttons{display:flex;gap:12px;padding-top:10px}.button.payment-accept{background:#319166;color:#fff;border-color:#319166}.button.payment-refund{background:#f9e9eb;color:#a9434e;border-color:#edcbd0}.button.payment-refund:hover{background:#f5dce0}.payment-refund:disabled{opacity:.4}.order-editor>footer{position:sticky;bottom:0;z-index:4;background:#fff;border-top:1px solid #e2e8ef;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0}.order-footer-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}.order-editor .total{margin:0;white-space:nowrap}.order-editor .total small,.order-editor .total strong{display:block}.order-editor .total strong{font-size:24px}.order-editor .form-error{margin:12px 24px}.print-menu{position:relative}.print-menu>summary{list-style:none;cursor:pointer;white-space:nowrap}.print-menu>div{position:absolute;right:0;bottom:calc(100% + 10px);min-width:235px;background:#fff;box-shadow:0 8px 35px #24324430;border:1px solid #e0e7ef;border-radius:8px;padding:6px;z-index:8}.print-menu .button{width:100%;text-align:left;border:0;white-space:nowrap;background:#fff}.print-menu .button:hover{background:#eef5fc}.return-choice{display:flex;gap:12px;margin:24px 0}.stock-tabs{margin-bottom:18px;flex-wrap:wrap}#report-results{margin-top:18px}.tab-panel[hidden]{display:none!important}
@media(max-width:850px){.order-layout{grid-template-columns:1fr}.order-history{border-left:0;border-top:1px solid #e2e8ef}.order-history .history-event{padding-bottom:14px}.order-editor>footer{align-items:flex-end}.order-footer-actions{max-width:70%}.payment-summary strong{font-size:18px}}
@media(max-width:560px){.order-main{padding:16px}.payment-summary{grid-template-columns:1fr}.order-editor>footer{flex-direction:column;align-items:stretch;padding:12px 16px}.order-footer-actions{max-width:none}.order-editor .works-controls{display:flex;flex-direction:column}.card-status{flex-wrap:wrap}.order-card-tabs button{padding:10px}.order-editor .total strong{font-size:20px}.return-choice{flex-direction:column}}

.sale-search{margin-bottom:20px}.sale-search>input{width:100%;margin-top:8px}.sale-search #sale-results{max-height:260px;overflow-y:auto;margin-top:8px;border-radius:7px}.sale-product{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;text-align:left;background:#fff;border:1px solid #e0e7ef;color:#344356}.sale-product+.sale-product{border-top:0}.sale-product span{min-width:0}.sale-product strong{display:block;font-size:14px;font-weight:600}.sale-product small{display:block;color:#7b899a;margin-top:5px;font-size:12px}.sale-product b{font-size:14px;white-space:nowrap}.sale-product:hover,.sale-product[aria-selected="true"]{background:#edf5ff}.sale-product:disabled{opacity:.5;cursor:default}.sale-search #sale-search-status{margin:10px 0}
