.oq-switch{display:flex;gap:6px}.oq-switch .btn{gap:10px}.oq-switch span{font-variant-numeric:tabular-nums}.oq-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,260px);gap:18px}.oq-tools label{display:block;margin:0 0 8px;font-size:13px;font-weight:600}.oq-tools input,.oq-tools select{width:100%;margin:0;min-height:46px}.oq-result{font-size:13px;color:#6b586b;margin:18px 0 12px}.oq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.oq-order{background:#fff;border:1px solid #e7dce2;border-radius:16px;padding:22px;min-width:0}.oq-meta,.oq-customer,.oq-payment,.oq-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.oq-meta .btn{padding:0;min-height:36px}.oq-customer{margin-top:10px;align-items:baseline}.oq-customer h2{font-size:18px;line-height:1.35;margin:0;overflow-wrap:anywhere}.oq-customer strong{white-space:nowrap;font-variant-numeric:tabular-nums}.oq-lines{line-height:1.55;color:#6b586b;overflow-wrap:anywhere;min-height:45px;margin:12px 0 18px}.oq-payment{font-size:12px;border-top:1px solid #eee5e9;padding:15px 0;flex-wrap:wrap}.oq-payment span:first-child{font-weight:600}.oq-actions .btn:first-child{flex:1}.oq-list{display:grid;gap:12px}.oq-list .oq-order{display:grid;grid-template-columns:170px minmax(180px,1fr) 250px;gap:8px 22px}.oq-list .oq-meta{grid-row:span 2;flex-direction:column;align-items:flex-start;justify-content:center}.oq-list .oq-customer{grid-column:2;margin:0}.oq-list .oq-lines{grid-column:2;min-height:0;margin:0}.oq-list .oq-payment{grid-column:2;grid-row:3;border:0;padding:0}.oq-list .oq-actions{grid-column:3;grid-row:1 / span 3}.oq-empty{padding:40px;line-height:1.6}.oq-empty h2{font-size:22px}.oq-complete{color:#356046;font-weight:600}.st-rows{background:#fff;border:1px solid #e7dce2;border-radius:18px;overflow:hidden}.st-row{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:24px;border-bottom:1px solid #eee5e9}.st-row:last-child{border:0}.st-row h2{margin:0 0 7px;font-size:18px}.st-row p{margin:0;color:#6b586b;line-height:1.5}.st-form label{display:block;margin:18px 0 8px;font-weight:600;font-size:14px}.st-form input:not([type=checkbox]),.st-form select,.st-form textarea{width:100%;max-width:100%;margin:0}.st-form textarea{min-height:100px;resize:vertical}.st-form .st-check{display:flex;align-items:center;gap:12px;font-weight:400;line-height:1.5}.st-check input{width:20px;height:20px;flex:none;accent-color:#352238}.st-note{line-height:1.6;color:#6b586b;font-size:13px}.st-form fieldset{border:1px solid #e7dce2;border-radius:12px;padding:16px;margin:20px 0}.st-form legend{padding:0 8px;font-weight:600}.st-form .modal-actions{position:sticky;bottom:-28px;background:#fff;padding:18px 0 0;z-index:1}.st-option{border-top:1px solid #eee5e9;padding:14px 0;display:flex;align-items:center;justify-content:space-between;gap:15px}.st-option p{margin:4px 0}.st-policy{white-space:pre-line;line-height:1.6}.btn:focus-visible,.oq-tools input:focus-visible,.oq-tools select:focus-visible{outline:3px solid #b44212;outline-offset:3px}@media(max-width:1150px){.oq-list .oq-order{display:block}.oq-list .oq-meta{flex-direction:row}.oq-list .oq-customer{margin-top:10px}.oq-list .oq-lines{margin:12px 0}.oq-list .oq-payment{padding:12px 0}}@media(max-width:650px){.oq-grid{grid-template-columns:1fr}.oq-tools{grid-template-columns:1fr;gap:12px}.oq-order{padding:18px}.oq-customer{flex-wrap:wrap}.oq-actions .btn{padding:12px;font-size:13px}.oq-switch{width:100%}.oq-switch .btn{flex:1}.st-row{padding:20px;gap:16px;align-items:flex-start}.st-row .btn{padding:10px;font-size:13px}.st-row p{font-size:13px}.st-form .modal-actions{bottom:-20px}.oq-empty{padding:24px}}

.st-rights{margin-top:10px;font-size:13px;line-height:1.6}.st-rights summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.st-rights ul{padding-left:20px}.st-rights li{margin:8px 0}.oq-tools input::placeholder{color:#705c6e;opacity:1}
@media(max-width:650px){.page-heading:has(.oq-switch){flex-direction:column;align-items:stretch;gap:18px}.page-heading:has(.oq-switch) h1{white-space:normal}.oq-lines{min-height:0}.st-option{align-items:flex-start}.st-option small{overflow-wrap:anywhere}}

/* Compact history rows: reference, customer, amount/payment and actions share two aligned lines. */
@media(min-width:1200px){
 .oq-list{gap:10px}
 .oq-list .oq-order{display:grid;grid-template-columns:100px minmax(140px,1fr) minmax(165px,210px) minmax(180px,230px);grid-template-rows:auto auto;align-items:center;gap:5px 20px;padding:14px 20px;border-radius:12px}
 .oq-list .oq-meta{grid-column:1;grid-row:1 / span 2;gap:5px;align-items:flex-start;justify-content:center}
 .oq-list .oq-meta .btn{min-height:24px;font-size:12px}
 .oq-list .oq-customer{display:contents}
 .oq-list .oq-customer h2{grid-column:2;grid-row:1;font-size:16px}
 .oq-list .oq-customer strong{grid-column:3;grid-row:1;font-size:14px}
 .oq-list .oq-lines{grid-column:2;grid-row:2;margin:0;font-size:13px;min-height:0;line-height:1.4}
 .oq-list .oq-payment{grid-column:3;grid-row:2;padding:0;border:0;gap:3px 12px;justify-content:flex-start;line-height:1.4}
 .oq-list .oq-actions{grid-column:4;grid-row:1 / span 2;gap:10px}
 .oq-list .oq-actions .btn{min-height:40px;padding:9px 12px;font-size:12px}
 .oq-list .oq-complete{font-size:13px}
}
@media(max-width:1199px){.oq-list .oq-order{padding:14px 18px;border-radius:12px}.oq-list .oq-lines{margin:8px 0;min-height:0}.oq-list .oq-payment{padding:10px 0}.oq-list .oq-actions .btn{min-height:44px}}

/* Settings controls stay independent from the customer and promo editors. */
dialog:has(.st-form){box-sizing:border-box;width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:24px;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
dialog:has(.st-form) .gr-modal-heading{align-items:flex-start;gap:16px;margin-bottom:18px}
dialog:has(.st-form) .gr-modal-heading h2{flex:1;min-width:0;line-height:1.3}
dialog:has(.st-form) .gr-modal-heading>.btn{flex:none;min-height:44px}
.st-form{min-width:0;max-width:100%}
.st-form label.st-check{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:12px;min-height:44px;margin:6px 0;padding:8px 0;font-size:14px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.st-form label.st-check>input[type=checkbox]{box-sizing:border-box;flex:none;width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;max-height:20px;padding:0;margin:0;accent-color:#352238;cursor:pointer}
.st-form fieldset{min-width:0;margin:18px 0;padding:14px 16px}
.st-form legend{max-width:100%;white-space:normal;line-height:1.5}
.st-form input:not([type=checkbox]),.st-form select,.st-form textarea{box-sizing:border-box;min-width:0;font-size:15px}
.st-form input:not([type=checkbox]),.st-form select{min-height:44px}
.st-form .modal-actions{bottom:-24px;padding:16px 0 4px;border-top:1px solid #eee5e9;gap:10px;flex-wrap:wrap}
.st-form .modal-actions>.btn{min-height:44px}
.st-form :focus-visible{outline:3px solid #a54317;outline-offset:3px}
.st-country-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin:12px 0}
@media(max-width:500px){dialog:has(.st-form){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:18px}dialog:has(.st-form) .gr-modal-heading{gap:12px}dialog:has(.st-form) .gr-modal-heading h2{font-size:21px}.st-country-grid{grid-template-columns:minmax(0,1fr);gap:0}.st-form .modal-actions{bottom:-18px}.st-form .modal-actions>.btn{flex:1}.st-form fieldset{padding:12px}}
