.order-hub{position:fixed;inset:0;z-index:12000;color:#10243f;font:var(--oms-font-base)/1.5 var(--oms-font-family)}
.order-hub[hidden],.order-hub [hidden]{display:none!important}
.order-hub__backdrop{position:absolute;inset:0;background:rgba(10,30,50,.55);backdrop-filter:blur(2px)}
.order-hub__dialog{position:relative;width:min(1560px,calc(100vw - 40px));height:min(960px,calc(100dvh - 40px));margin:20px auto;background:#fff;border-radius:16px;box-shadow:0 24px 70px rgba(9,35,62,.3);overflow:hidden;display:flex;flex-direction:column;outline:none}
.order-hub .order-hub__close{position:absolute;z-index:10;right:20px;top:16px;width:40px;min-height:40px;padding:9px!important}
.order-hub__header{grid-column:1;grid-row:1;display:grid;grid-template-columns:minmax(210px,.95fr) minmax(0,2.4fr);align-items:center;gap:16px;min-width:0}.order-hub__identity{min-width:0}.order-hub__header h2{margin:2px 0 0!important;font-size:var(--oms-font-xl);line-height:1.25;letter-spacing:-.02em;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.order-hub__eyebrow{font-size:var(--oms-font-sm);font-weight:var(--oms-font-weight-heading);letter-spacing:.09em;text-transform:uppercase;color:#31577d}
.order-hub__summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px}.order-hub__summary p{margin:0;color:#647a90;font-size:var(--oms-font-sm);overflow-wrap:anywhere}.order-hub__pill{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e9f3ff;color:#165493;font-weight:var(--oms-font-weight-heading);font-size:var(--oms-font-sm);white-space:nowrap}
.order-hub__status{padding:16px 70px 0 22px;text-align:center;color:#58718b;flex-shrink:0}.order-hub__status.order-hub__error,.order-hub__inline-error{color:#a32732}.order-hub__inline-error:empty{display:none}
.order-hub__announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.order-hub__content{min-height:0;min-width:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 252px;grid-template-rows:auto auto auto minmax(0,1fr);gap:14px 20px;padding:20px 22px;overflow:hidden}
/* Every metric reserves the same label, value and detail rows while orders change. */
.order-hub__financials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(180px,1.6fr);align-items:stretch;min-width:0}
.order-hub__metric{display:grid;grid-template-rows:28px 29px 21px;align-content:start;padding:6px 16px;min-width:0;border-left:1px solid #dce6f0}
.order-hub__metric-label{display:flex;align-items:center;gap:8px;min-width:0;color:#647a90;font-size:var(--oms-font-sm);white-space:nowrap}
.order-hub__metric strong{display:block;align-self:center;font-size:var(--oms-font-lg);line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.order-hub__metric small{display:block;align-self:center;min-height:21px;color:#647a90;font-size:var(--oms-font-sm);line-height:21px;white-space:nowrap}
.order-hub__metric--delivery strong{font-size:var(--oms-font-base)}
.order-hub__delivery-pill{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:24px;padding:2px 8px;border-radius:999px;font-size:var(--oms-font-xs);font-weight:var(--oms-font-weight-label);line-height:20px;white-space:nowrap;background:#edf0f4;color:#40546b}
.order-hub__delivery-pill[data-tone="info"]{background:#e9f3ff;color:#165493}
.order-hub__delivery-pill[data-tone="success"]{background:#e5f5eb;color:#176836}
.order-hub__delivery-pill[data-tone="danger"]{background:#fdebed;color:#aa2839}
.order-hub__metric--balance strong{color:#b6293c}.order-hub__metric--paid strong,.order-hub__positive{color:#24834b}
.order-hub button,.order-hub a.order-hub__button{box-sizing:border-box;min-height:var(--oms-control-h);border:1px solid var(--oms-action-secondary-border)!important;background:var(--oms-action-secondary)!important;color:var(--oms-action-primary)!important;border-radius:var(--oms-control-radius)!important;padding:9px 12px!important;font-family:var(--oms-font-family)!important;font-size:var(--oms-font-sm)!important;font-weight:var(--oms-font-weight-label)!important;line-height:1.3!important;text-decoration:none!important;cursor:pointer;box-shadow:none!important;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.order-hub button:hover,.order-hub a.order-hub__button:hover{background:var(--oms-action-secondary-hover)!important;border-color:var(--oms-action-secondary-border)!important;text-decoration:none!important}
.order-hub button.order-hub__button--primary,.order-hub button.btn.primary,.order-hub .quick-modal-actions button.btn:not(.secondary):not(.danger),.order-hub .order-scheduler-hub button.btn:not(.secondary):not(.danger){background:var(--oms-action-primary)!important;color:#fff!important;border-color:var(--oms-action-primary)!important}
.order-hub button.order-hub__button--primary:hover,.order-hub button.btn.primary:hover,.order-hub .quick-modal-actions button.btn:not(.secondary):not(.danger):hover,.order-hub .order-scheduler-hub button.btn:not(.secondary):not(.danger):hover{background:var(--oms-action-primary-hover)!important;color:#fff!important;border-color:var(--oms-action-primary-hover)!important}
.order-hub button:disabled{opacity:.5;cursor:not-allowed}.order-hub button:focus-visible,.order-hub a:focus-visible,.order-hub input:focus-visible,.order-hub select:focus-visible,.order-hub textarea:focus-visible,.order-hub summary:focus-visible{outline:3px solid var(--oms-focus-ring)!important;outline-offset:2px}
.order-hub__icon,.order-hub__close img{width:19px;height:19px;object-fit:contain;flex:none}.order-hub__icon{filter:invert(20%) sepia(19%) saturate(2057%) hue-rotate(170deg) brightness(92%) contrast(92%)}.order-hub__icon[src$="xero.svg"]{filter:none;width:23px;height:23px}.order-hub__button--primary .order-hub__icon{filter:brightness(0) invert(1)}.order-hub__button--primary .order-hub__icon[src$="xero.svg"]{filter:none}
.order-hub__tabs{grid-column:1;grid-row:3;display:flex;min-width:0;border:1px solid #dce6f0;border-radius:7px;margin:0;overflow-x:auto;gap:0;scrollbar-width:thin}.order-hub .order-hub__tab{flex:1;border:0!important;border-radius:0!important;min-height:44px;padding:10px 12px!important;white-space:nowrap;background:transparent!important}.order-hub .order-hub__tab:hover{background:#f0f6fd!important}.order-hub .order-hub__tab[aria-selected="true"]{color:#123f6d!important;background:#e9f3ff!important;box-shadow:inset 0 -3px #153d65!important}
.order-hub__layout{display:contents}.order-hub__main{grid-column:1;grid-row:4;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.order-hub__panel{min-width:0;min-height:100%;padding:2px 2px 10px;outline:none;box-sizing:border-box}.order-hub__aside{grid-column:2;grid-row:1/5;padding:46px 0 0 20px;border-left:1px solid #dce6f0;overflow:auto;overscroll-behavior:contain;min-height:0;min-width:0}.order-hub__aside h3{margin:0 0 5px;font-size:var(--oms-font-lg);line-height:1.3}.order-hub__aside h4{padding-top:13px;margin:15px 0 8px;border-top:1px solid #dce6f0;font-size:var(--oms-font-sm)}
.order-hub button.order-hub__action{width:100%;display:flex!important;text-align:left;justify-content:flex-start;gap:9px;margin:5px 0;font-size:var(--oms-font-sm)!important;min-height:var(--oms-control-h);padding:8px 10px!important}.order-hub__admin{padding-top:14px;margin-top:14px;border-top:1px solid #dce6f0}.order-hub__admin summary{display:flex;align-items:center;gap:9px;cursor:pointer;font-weight:var(--oms-font-weight-heading);padding:8px 0}.order-hub button.order-hub__danger{color:var(--oms-action-danger-text)!important;background:var(--oms-action-danger)!important;border-color:var(--oms-action-danger-border)!important}.order-hub button.order-hub__danger:hover{background:var(--oms-action-danger-hover)!important;border-color:var(--oms-action-danger-border)!important}.order-hub button.order-hub__danger:focus-visible{outline-color:var(--oms-action-danger-border)!important}
.order-hub__section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 16px}.order-hub__section-head h3,.order-hub__panel h3{margin:0 0 3px;font-size:var(--oms-font-lg);letter-spacing:-.02em}.order-hub__section-head p{margin:4px 0;color:#647a90;font-size:var(--oms-font-sm)}.order-hub__section-head>button{flex-shrink:0;font-size:var(--oms-font-sm)!important}.order-hub__hint{color:#647a90;font-size:var(--oms-font-sm)}.order-hub__table-wrap{min-width:0;max-width:100%;overflow-x:auto}.order-hub__table{width:100%;border-collapse:collapse;table-layout:auto}.order-hub__table th,.order-hub__table td{padding:12px 8px;border-bottom:1px solid #e2eaf2;text-align:left;vertical-align:middle}.order-hub__table th{color:#38516b;background:#f5f8fb;font-size:var(--oms-font-sm);white-space:nowrap}.order-hub__table td{font-size:var(--oms-font-sm)}.order-hub__table button{font-size:var(--oms-font-sm)!important;min-height:var(--oms-control-h);white-space:nowrap}.order-hub__product{min-width:180px}.order-hub__product strong{display:block}.order-hub__product small{display:block;margin-top:4px;color:#647a90;line-height:1.45}.order-hub__table .order-hub__state-cell{width:88px;text-align:center}
.order-hub__state{display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:auto}
.order-hub__state .order-hub__icon{display:block;margin:0}.order-hub__state--yes .order-hub__icon{filter:invert(36%) sepia(81%) saturate(367%) hue-rotate(93deg) brightness(91%)}.order-hub__state--no .order-hub__icon{filter:invert(25%) sepia(62%) saturate(1460%) hue-rotate(325deg) brightness(93%)}
.order-hub__empty{padding:28px;text-align:center;color:#63778b}.order-hub__cards{display:grid;gap:10px}.order-hub__card{padding:12px;border:1px solid #dce6f0;border-radius:9px}.order-hub__card p{white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0}.order-hub__card small{color:#647a90}.order-hub__card .order-hub__pill{margin-left:10px}
/* Embedded forms inherit the Hub pane width; standalone modal sizing stays separate. */
.order-hub__form{display:grid;gap:12px;width:100%;min-width:0;max-width:none;box-sizing:border-box}.order-hub__form h3{margin:0}.order-hub label{font-weight:600}.order-hub__form label{display:grid;gap:5px}.order-hub input:not([type="checkbox"]):not([type="radio"]),.order-hub select,.order-hub textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid #b9cadb;border-radius:7px;padding:10px;font:inherit;color:#10243f;background:white;min-height:var(--oms-control-h)}.order-hub textarea{resize:vertical}.order-hub__form-actions,.order-hub .quick-modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}.order-hub__back{justify-self:start;margin-bottom:8px}.order-hub__secondary-tools{display:flex;gap:8px;margin:14px 0}.order-hub__secondary-tools button{font-size:var(--oms-font-sm)!important}.order-hub__product-note{margin:14px 0;padding:12px;border:1px solid #efd798;border-radius:8px;background:#fff8e8;color:#76500d;font-size:var(--oms-font-sm)}.order-hub__product-note p{margin:4px 0 0;white-space:pre-wrap}
.order-hub__presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.order-hub__presets button{text-align:left;justify-content:flex-start;min-height:64px}.order-hub__presets small{display:block;font-size:var(--oms-font-sm);font-weight:400;color:#647a90}.order-hub__presets .order-hub__icon{width:22px;height:22px}.order-hub__stock-product{padding:16px;margin:16px 0;background:#f2f7fd;border:1px solid #dce6f0;border-radius:var(--oms-control-radius);color:var(--oms-action-primary)}.order-hub__stock-product p{margin:5px 0 0;font-size:var(--oms-font-sm)}.order-hub__assign-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}.order-hub__stock-list{display:grid;gap:10px;margin-top:12px}.order-hub__stock{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #dce6f0;border-radius:8px;cursor:pointer}.order-hub__stock:has(input:checked){background:#e9f3ff;border-color:#79a9d8}.order-hub__stock input{margin:4px 0}.order-hub__stock small,.order-hub__stock em{display:block;color:#647a90;font-size:var(--oms-font-sm);margin-top:5px}.order-hub__stock em{color:#9b660a}.order-hub__selection{background:#f5f8fc;padding:14px;border-radius:9px}.order-hub__selection button{width:100%;margin-top:12px}.order-hub__selection p{font-size:var(--oms-font-sm)}
.order-hub .customer-email-embedded,.order-hub .sms-thread-embedded{width:100%;max-height:none;background:none;padding:0;border:0;box-shadow:none}.order-hub .customer-email-embedded .quick-modal,.order-hub .sms-thread-embedded .quick-modal{width:100%;max-width:none;max-height:none;border:0;box-shadow:none;padding:0;margin:0}.order-hub .customer-email-html-editor{border:1px solid #b9cadb;padding:12px;min-height:180px;border-radius:8px;max-height:none;overflow:auto}.order-hub .ai-improve-actions{display:flex;align-items:center;gap:8px}.order-hub .ai-improve-action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media(max-width:1150px){.order-hub__header{grid-template-columns:1fr;gap:10px}.order-hub__financials{border:1px solid #dce6f0;border-radius:8px}.order-hub__metric{padding:7px 10px}.order-hub__metric:first-child{border-left:0}.order-hub__content{grid-template-columns:minmax(0,1fr) 220px;column-gap:14px}.order-hub__aside{padding-left:14px}.order-hub__section-head{flex-wrap:wrap}.order-hub__assign-layout{grid-template-columns:1fr}}
@media(max-width:800px){
.order-hub__dialog{width:100%;height:100dvh;margin:0;border-radius:0}
.order-hub__content{grid-template-columns:minmax(0,1fr);padding:14px;gap:10px}
.order-hub__header{padding:0;gap:10px}.order-hub__identity{padding-right:48px}.order-hub__header h2{font-size:var(--oms-font-lg)}
.order-hub .order-hub__close{right:14px;top:14px}
.order-hub__layout{display:block;grid-column:1;grid-row:4;overflow:auto;min-height:0;overscroll-behavior:contain}
.order-hub__main{overflow:visible;scrollbar-gutter:auto}.order-hub__panel{min-height:0}
.order-hub__aside{border-left:0;border-top:1px solid #dce6f0;padding:16px 0 0;margin-top:18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;overflow:visible}
.order-hub__aside h3,.customer-hub__action-context,.order-hub__admin{grid-column:1/-1}
.order-hub__metric{padding:6px 8px}.order-hub__metric strong{font-size:var(--oms-font-base)}.order-hub__metric-label{font-size:var(--oms-font-xs)}
.order-hub__tabs{overflow-x:auto}.order-hub .order-hub__tab{flex:none;min-width:88px;padding:10px!important}
.order-hub__presets{grid-template-columns:1fr}.order-hub__product{min-width:160px}.order-hub__table th,.order-hub__table td{padding:9px 6px}
}
@media(max-width:550px){.order-hub__financials{grid-template-columns:repeat(3,minmax(0,1fr))}.order-hub__metric{grid-template-rows:24px 25px;}.order-hub__metric:not(.order-hub__metric--delivery)>small{display:none}.order-hub__metric--delivery{grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:28px 25px;column-gap:8px;border-left:0;border-top:1px solid #dce6f0}.order-hub__metric--delivery .order-hub__metric-label{grid-column:1/-1}.order-hub__metric--delivery small{text-align:right}.order-hub__metric--delivery strong{margin:0}}
@media(max-height:650px) and (min-width:801px){.order-hub__dialog{height:calc(100dvh - 20px);margin:10px auto}.order-hub__content{padding-top:14px;padding-bottom:14px;row-gap:10px}.order-hub__aside{padding-top:48px}}
@media(prefers-reduced-motion:no-preference){.order-hub__dialog{animation:order-hub-in .15s ease-out}@keyframes order-hub-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}}

.order-hub .order-hub__form-actions.ai-inline-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important}.order-hub .order-hub__form-actions.ai-inline-actions>.ai-improve-btn,.order-hub .order-hub__form-actions.ai-inline-actions>.voice-dictation-actions{margin-right:auto!important}.order-hub .customer-email-embedded-root .quick-modal{width:100%;max-width:none;max-height:none;margin:0;padding:0;box-shadow:none;background:transparent}.order-hub .customer-email-embedded-root .quick-modal-actions{flex-wrap:wrap}

.order-hub .ai-improve-inline{min-width:0;padding:14px;margin-top:16px;border:1px solid #b9cadb;border-radius:7px;background:#f5f8fc}.order-hub .ai-improve-inline .quick-modal{box-sizing:border-box;min-width:0;margin:0!important;padding:0!important;width:100%!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important}.order-hub .ai-improve-inline .ai-suggestion-box,.order-hub .ai-improve-inline .ai-improve-actions{min-width:0}.order-hub .ai-improve-inline .ai-suggestion-box{border-radius:7px!important}

.order-hub__section-view{display:grid;gap:12px}.order-hub__section-view>.order-hub__back{justify-self:start;margin:0}.order-hub__form.order-hub__composer{display:grid;gap:9px;width:100%;max-width:none;box-sizing:border-box;padding:14px;border:1px solid #dce6f0;border-radius:10px;background:#fff}.order-hub__composer>label{font-weight:var(--oms-font-weight-label)}.order-hub__composer-actions{min-height:42px}.order-hub__composer-actions .voice-dictation-actions{margin-right:auto}.order-hub__composer-actions>.ai-improve-btn{margin-right:auto}.order-hub__selected-files{display:flex;flex-wrap:wrap;gap:8px;font-size:var(--oms-font-sm);color:#58718b;overflow-wrap:anywhere}.order-hub__selected-files:empty{display:none}.order-hub__selected-file{display:grid;grid-template-columns:42px minmax(0,1fr) 28px;align-items:center;gap:7px;max-width:260px;padding:6px;border:1px solid #dce6f0;border-radius:8px;background:#fff}.order-hub__selected-file img{width:42px;height:42px;border-radius:5px;object-fit:cover}.order-hub .order-hub__selected-file button{min-height:28px;width:28px;padding:0!important;border:0!important;font-size:var(--oms-font-lg)!important}.order-hub__history-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:2px}.order-hub__history-heading h4{margin:0;font-size:var(--oms-font-sm)}.order-hub__history-heading span{font-size:var(--oms-font-sm);color:#647a90}.order-hub__history{display:grid;gap:10px}.order-hub__history-card{padding:14px;border:1px solid #dce6f0;border-radius:9px;background:#fff}.order-hub__history-card p{margin:9px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.order-hub__history-meta{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.order-hub__history-meta span{font-size:var(--oms-font-sm);color:#647a90;text-align:right}.order-hub__notes-view{gap:10px}.order-hub__notes-view .order-hub__history{gap:0;border-top:1px solid #dce6f0}.order-hub__notes-view .order-hub__history-card{position:relative;padding:15px 10px 15px 30px;border:0;border-bottom:1px solid #dce6f0;border-radius:0;background:transparent}.order-hub__notes-view .order-hub__history-card p{margin-top:6px}.order-hub__issue-title{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.order-hub__issue-title h3{margin:0}.order-hub__issue-title p{margin:5px 0 0;color:#647a90}.order-hub__issue-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}.order-hub__issue-file{display:grid;gap:6px;padding:8px;border:1px solid #dce6f0;border-radius:9px;color:#153d65;text-decoration:none;font-size:var(--oms-font-sm);overflow-wrap:anywhere}.order-hub__issue-file:hover{background:#eef6ff;border-color:#86afd6;text-decoration:none}.order-hub__issue-file img,.order-hub__file-icon{width:100%;height:92px;border-radius:6px;object-fit:cover;background:#e9f0f7}.order-hub__file-icon{display:flex;align-items:center;justify-content:center;font-weight:var(--oms-font-weight-heading);color:#647a90}.order-hub__file-button{box-sizing:border-box;min-height:var(--oms-control-h);border:1px solid #b8cde1;border-radius:8px;padding:9px 12px;background:#fff;color:#153d65;display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer;font-weight:var(--oms-font-weight-label)!important}.order-hub__file-button:hover{background:#eef6ff;border-color:#86afd6}.order-hub__file-button input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none}.order-hub__replacement-products{display:grid;gap:9px;margin:0;padding:14px;border:1px solid #dce6f0;border-radius:9px}.order-hub__replacement-products legend{padding:0 5px;font-weight:var(--oms-font-weight-label)}.order-hub__replacement-products label{display:flex;align-items:flex-start;gap:9px;padding:8px;border-radius:7px;background:#f7faff}.order-hub__replacement-products input{margin-top:3px}.order-hub__replacement-products button{justify-self:end;margin-top:4px}
@media(max-width:650px){.order-hub__history-meta,.order-hub__issue-title{align-items:flex-start;flex-direction:column}.order-hub__history-meta span{text-align:left}.order-hub__composer-actions>*{flex:1 1 auto}.order-hub__composer-actions .voice-dictation-actions{flex:1 1 100%;margin-right:0}.order-hub__replacement-products button{width:100%}}

/* Shared-control layouts keep descriptions flexible and transient states compact. */
.order-hub__panel{padding:4px 6px 12px}
.order-hub__assign-layout.has-selection{grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr)}
.order-hub__stock-search{display:grid;gap:8px;padding:4px;margin:0 -4px}
.order-hub__stock-empty{padding:24px;border:1px dashed var(--oms-border-strong);border-radius:var(--oms-control-radius);background:var(--oms-surface-soft);text-align:center;margin-top:16px}
.order-hub__stock-empty p{font-size:var(--oms-font-sm);color:var(--oms-muted);margin:8px 0 16px}
.order-hub__stock-empty p:last-child{margin-bottom:0}
.order-hub__selection{align-self:start;height:auto}
.order-hub__selection h4{margin:0 0 12px}
.order-hub__contact-workspace{display:grid;grid-template-columns:200px minmax(0,1fr);gap:20px;align-items:start}
.order-hub__contact-presets{padding:4px 0}
.order-hub__contact-presets h3{margin:0 0 8px}
.order-hub__contact-presets h4{margin:24px 0 10px}
.order-hub__contact-presets .order-hub__presets{grid-template-columns:1fr;gap:8px}
.order-hub__contact-presets .order-hub__presets button{min-height:44px;width:100%;padding:12px!important}
.order-hub__contact-presets button[aria-pressed="true"],.order-hub .workspace-tabs button[aria-pressed="true"]{background:var(--oms-action-secondary-hover)!important;border-color:var(--oms-action-primary)!important;color:var(--oms-action-primary)!important}
.order-hub__contact-presets .order-hub__presets small{margin-top:4px}
.order-hub__contact-composer{min-width:0}
.order-hub__panel:has(>.order-hub-tools){height:100%;padding-bottom:0}
.order-hub__panel>.order-hub-tools{height:100%;min-height:0}
.order-hub__panel>.order-hub-tools>.order-hub-tools__header{flex-shrink:0}
.order-hub__panel h4{font-size:var(--oms-font-base);font-weight:var(--oms-font-weight-heading)}
@media(max-width:1100px){.order-hub__contact-workspace{grid-template-columns:1fr}.order-hub__contact-presets .order-hub__presets{grid-template-columns:repeat(2,minmax(0,1fr))}.order-hub__assign-layout.has-selection{grid-template-columns:1fr}}
@media(max-width:650px){.order-hub__contact-presets .order-hub__presets{grid-template-columns:1fr}.order-hub__panel>.order-hub-tools{min-height:540px;height:75dvh}}

/* Customer, communications and integration sections share the Hub control system. */
.order-hub__contact-tabs{display:flex;gap:8px;margin:0 0 18px;width:max-content;max-width:100%}
.order-hub__contact-tabs button{min-width:104px}
.order-hub__customer-view>.order-hub__cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.order-hub__customer-view .order-hub__card{min-width:0;overflow-wrap:anywhere}
.order-hub__customer-view .order-hub__card h4{margin:0 0 10px}
.order-hub__customer-view .order-hub__card:last-child:nth-child(odd){grid-column:1/-1}
.order-hub__customer-view [data-customer-form]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:100%;max-width:none}
.order-hub__customer-view [data-customer-form]>label{display:grid;align-content:start;gap:7px;margin:0}
.order-hub__customer-view [data-customer-form]>.order-hub__hint,.order-hub__customer-view [data-customer-form]>.order-hub__form-actions,.order-hub__customer-view [data-customer-form]>[role="alert"]{grid-column:1/-1}
.order-hub button.order-hub__open-control{border-radius:4px!important;white-space:nowrap;min-height:38px}
.order-hub__customer-view td{vertical-align:middle}
.order-hub__xero-view .order-hub__cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.order-hub__activity-details{margin-top:10px;font-size:var(--oms-font-sm);color:var(--oms-muted)}
.order-hub__activity-details summary{cursor:pointer;color:var(--oms-action-primary);font-weight:var(--oms-font-weight-label)}
.order-hub .sms-thread-embedded-root .quick-modal{position:static;inset:auto;display:flex;flex-direction:column;width:100%!important;max-width:none!important;max-height:none!important;overflow:visible!important;margin:0;padding:0;border:0;box-shadow:none;background:transparent}
.order-hub .sms-thread-embedded-root .sms-thread-head{padding:0 0 16px;display:block}
.order-hub .sms-thread-head h3{margin:0 0 4px}
.order-hub .sms-thread-head p{margin:0;font-size:var(--oms-font-sm);color:var(--oms-muted)}
.sms-thread-conversation-tabs{display:flex;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:thin;gap:0;border:1px solid var(--oms-border-strong);border-radius:var(--oms-control-radius) var(--oms-control-radius) 0 0;}
.order-hub .sms-thread-conversation-tabs button{flex:1 0 150px;border:0!important;border-radius:0!important;min-height:44px;white-space:nowrap;padding:12px 18px!important;background:#fff!important;box-shadow:none!important;}
.order-hub .sms-thread-conversation-tabs button+button{border-left:1px solid var(--oms-border)!important;}
.order-hub .sms-thread-conversation-tabs button[aria-selected="true"]{background:var(--oms-action-secondary-hover)!important;box-shadow:inset 0 -3px var(--oms-action-primary)!important;}
.sms-thread-conversation{min-width:0;border:1px solid var(--oms-border-strong);border-top:0;padding:16px 18px 0;background:#fff;}
.sms-thread-conversation>h4{margin:0 0 16px;font-size:var(--oms-font-base);}
.order-hub .sms-thread-embedded-root .sms-thread-scroll{display:flex;flex-direction:column;gap:20px;max-height:360px;min-height:100px;overflow:auto;padding:4px 0 18px;background:transparent;border:0;border-radius:0;}
.order-hub .sms-thread-embedded-root .sms-thread-message{max-width:85%;border:0;padding:0;background:transparent;box-shadow:none;overflow-wrap:anywhere;}
.order-hub .sms-thread-message__body{padding:12px 16px;border-radius:12px;margin:0;background:var(--oms-surface-soft);font-size:var(--oms-font-sm);line-height:1.5;}
.order-hub .sms-thread-message-outbound,.order-hub .sms-thread-message-auto{margin-left:auto;}
.order-hub .sms-thread-message-inbound{margin-right:auto;}
.order-hub .sms-thread-message-outbound .sms-thread-message__body{background:var(--oms-action-secondary-hover);}
.order-hub .sms-thread-message .sms-thread-meta{display:block;margin:5px 0 0;padding:0 2px;color:var(--oms-muted);font-size:var(--oms-font-xs,12px);font-weight:var(--oms-font-weight-body);line-height:1.5;}
.order-hub .sms-thread-message-outbound .sms-thread-meta,.order-hub .sms-thread-message-auto .sms-thread-meta{text-align:right;}
.sms-thread-empty{padding:20px 0 24px;color:var(--oms-muted);}
.sms-thread-empty strong{font-weight:var(--oms-font-weight-body);}
.sms-thread-empty p{margin:6px 0 0;font-size:var(--oms-font-sm);}
.sms-thread-composer{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 16px;border:1px solid var(--oms-border-strong);border-top:0;border-radius:0 0 var(--oms-control-radius) var(--oms-control-radius);padding:var(--oms-action-inset);background:#fff;}
.order-hub .sms-thread-type{display:flex;align-items:center;gap:16px;min-width:0;margin:0;font-size:var(--oms-font-sm);font-weight:var(--oms-font-weight-label);}
.order-hub .sms-thread-type select{width:280px;max-width:100%;margin:0;}
.sms-thread-composer>[data-sms-preview-status]{flex-basis:100%;margin:0;font-size:var(--oms-font-sm);}
.sms-thread-composer>[data-sms-preview-status]:empty{display:none;}
.sms-thread-preview{flex-basis:100%;min-width:0;margin-top:8px;padding:16px;border:1px solid var(--oms-border);border-radius:var(--oms-control-radius);background:var(--oms-surface-soft);}
.sms-thread-preview p{font-size:var(--oms-font-sm);white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 20px;}
@media(max-width:650px){.sms-thread-conversation{padding:14px 12px 0;}.order-hub .sms-thread-type{width:100%;display:grid;gap:7px;}.order-hub .sms-thread-type select{width:100%;}.sms-thread-composer{padding:16px 12px;}.sms-thread-composer>button{width:100%;}.sms-thread-conversation-tabs button{flex-basis:140px;}}
.order-hub .order-hub__back{display:none!important}
@media(max-width:650px){.order-hub__customer-view>.order-hub__cards,.order-hub__customer-view [data-customer-form],.order-hub__xero-view .order-hub__cards{grid-template-columns:1fr}.order-hub__contact-tabs{width:auto}.order-hub__contact-tabs button{flex:1}.order-hub .sms-thread-embedded-root .sms-thread-message{max-width:96%}}

.order-hub__action[aria-current="page"]{background:var(--oms-action-secondary-hover)!important;border-color:var(--oms-action-primary)!important;}

#hubEmailComposer #customerEmailCancelBtn{display:none!important;}

/* Loading feedback floats above the shell; switching must never move its rows. */
.order-hub--loading .order-hub__dialog::before{content:"";position:absolute;z-index:11;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--oms-action-secondary-hover),var(--oms-action-primary),var(--oms-action-secondary-hover));background-size:200% 100%;pointer-events:none}
@media(prefers-reduced-motion:no-preference){.order-hub--loading .order-hub__dialog::before{animation:hub-loading 1.2s linear infinite}@keyframes hub-loading{to{background-position:-200% 0}}}

/* Status changes form one compact task, with related fields aligned together. */
.order-hub__status-form{grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;align-items:start;gap:16px 20px;padding:12px 0}
.order-hub__status-heading,.order-hub__status-form>[data-status-help],.order-hub__status-form>label:has([data-status-note]),.order-hub__status-form>.order-hub__form-actions,.order-hub__status-form>[data-status-error]{grid-column:1/-1}
.order-hub__status-heading h3{margin:0!important}.order-hub__status-heading p{margin:6px 0 0!important}
.order-hub__status-form>label{margin:0!important;align-content:start;gap:7px}
.order-hub__status-form>[data-status-help]{margin:0!important}
.order-hub__status-form>[data-status-help]:empty{display:none}
.order-hub__status-form textarea{min-height:100px}
.order-hub__status-form>.order-hub__form-actions{padding-top:2px}
@media(max-width:650px){.order-hub__status-form{grid-template-columns:minmax(0,1fr);gap:14px;padding:8px 0}}

.order-hub__status-field{display:grid;align-content:start;gap:7px;min-width:0}
.order-hub__status-label{font-weight:var(--oms-font-weight-label)}
.order-hub__status-picker{position:relative;min-width:0}
.order-hub .order-hub__status-trigger{width:100%;display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:var(--oms-control-h);padding:10px 14px!important;color:var(--oms-text)!important;text-align:left;font-weight:var(--oms-font-weight-label)}
.order-hub__status-trigger [data-status-value]{min-width:0;overflow-wrap:anywhere}
.order-hub__status-trigger .order-hub__icon{flex-shrink:0}
.order-hub__status-options{position:absolute;z-index:15;top:calc(100% + 4px);left:0;right:0;max-height:290px;overflow:auto;padding:4px;background:var(--oms-surface,#fff);border:1px solid var(--oms-border-strong,#b9cadb);border-radius:var(--oms-control-radius);box-shadow:0 8px 22px #10243f1f}
.order-hub .order-hub__status-option{display:block!important;width:100%;text-align:left;min-height:38px;padding:8px 10px!important;border:0!important;border-radius:4px!important;box-shadow:none!important}
.order-hub .order-hub__status-option[aria-selected="true"]{background:var(--oms-action-secondary-hover)!important;color:var(--oms-action-primary)!important}
.order-hub .order-hub__status-option[aria-disabled="true"]{color:var(--oms-muted,#7b8b9c)!important;background:transparent!important;opacity:.65;cursor:help}
.order-hub .order-hub__status-option:focus-visible{outline:2px solid var(--oms-action-primary);outline-offset:-2px}

.order-hub__payments-table td:last-child,.order-hub__payments-table th:last-child{text-align:right;font-variant-numeric:tabular-nums;}
.order-hub__positive>.order-hub__icon{filter:invert(36%) sepia(81%) saturate(367%) hue-rotate(93deg) brightness(91%);}

/* Typed notes share the same flat controls and spacing as the Hub. */
.order-hub__note-type-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-weight:var(--oms-font-weight-label)}
.order-hub__note-types{display:flex;gap:0;border:1px solid #b8cde1;border-radius:8px;overflow:hidden}
.order-hub .order-hub__note-types button{border:0!important;border-radius:0!important;min-width:126px;box-shadow:none!important;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.order-hub .order-hub__note-types button+button{border-left:1px solid #b8cde1!important}
.order-hub .order-hub__note-types button[aria-pressed="true"]{background:#e8f3ff!important;color:#153d65!important}
.order-hub__note-types img,.order-hub__note-type img{width:18px;height:18px;flex-shrink:0}
.order-hub__note-visibility{margin:0;color:#647a90;font-size:var(--oms-font-sm);line-height:1.5}
.order-hub__note-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.order-hub__note-author{position:relative;line-height:1.5;overflow-wrap:anywhere}
.order-hub__note-author::before{content:"";position:absolute;left:-20px;top:.75em;transform:translateY(-50%);width:8px;height:8px;border:2px solid #153d65;border-radius:50%;background:#fff;box-sizing:content-box}
.order-hub .order-hub__note-type{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;background:#f0f3f6;color:#52687d;font-size:var(--oms-font-sm);font-weight:var(--oms-font-weight-label);line-height:1.4;text-align:left}
.order-hub .order-hub__note-type--delivery{background:#e8f3ff;color:#153d65}
.order-hub__stock-choices{display:grid;gap:12px}
.order-hub__stock-choice{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;border:1px solid #dce6f0;border-radius:8px}
.order-hub__stock-choice p{margin:5px 0;color:#647a90;overflow-wrap:anywhere}
@media(max-width:650px){.order-hub__stock-choice{align-items:flex-start;flex-direction:column}.order-hub__note-types{max-width:100%}.order-hub .order-hub__note-types button{min-width:110px}}

.order-hub__sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Linked replacements stay separate from bought product fulfilment. */
.order-hub__replacement-items{min-width:0;margin-top:20px;padding-top:18px;border-top:1px solid var(--oms-border,#dce6f0)}
.order-hub__replacement-items .order-hub__section-head{align-items:center;margin-bottom:12px}
.order-hub__replacement-items .order-hub__section-head>div{min-width:0}
.order-hub__replacement-items .order-hub__section-head h3{margin:0 0 5px}
.order-hub__replacement-items .order-hub__section-head p{margin:0;color:var(--oms-muted,#647a90)}
.order-hub__replacement-items .order-hub__open-control{flex:0 0 auto;width:auto;height:auto;min-height:38px;padding:8px 12px;border:1px solid var(--oms-border-strong,#b8cde1);border-radius:7px;color:var(--oms-action-primary,#153d65);font-weight:var(--oms-font-weight-label);line-height:1.2;text-align:center;text-decoration:none;white-space:nowrap}
.order-hub__replacement-items .order-hub__open-control:hover{background:var(--oms-action-secondary-hover,#eef6ff);border-color:var(--oms-action-primary,#153d65)}
.order-hub__replacement-items.is-empty .order-hub__section-head{margin-bottom:0}
.order-hub__replacement-items.is-empty [data-hub-replacements]{display:none}
.order-hub__replacement-list{border:1px solid var(--oms-border,#dce6f0);border-radius:8px;overflow:hidden}
.order-hub__replacement-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;background:#fff}
.order-hub__replacement-row+.order-hub__replacement-row{border-top:1px solid var(--oms-border,#dce6f0)}
.order-hub__replacement-row strong,.order-hub__replacement-row small{display:block}
.order-hub__replacement-row small{margin-top:4px;color:var(--oms-muted,#647a90)}
.order-hub__replacement-result{display:flex;align-items:center;gap:12px;flex-shrink:0}
.order-hub__replacement-date,.order-hub__replacement-expected{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e8f3ff;color:#153d65;font-size:var(--oms-font-sm);font-weight:var(--oms-font-weight-label)}
.order-hub__replacement-date{background:#e8f5eb;color:#28683c}
@media(max-width:650px){.order-hub__replacement-row,.order-hub__replacement-result{align-items:flex-start;flex-direction:column}.order-hub__replacement-result{gap:8px}}

/* Grid-based Hub views must shrink with the pane instead of inheriting a child's max-content width. */
.order-hub__section-view{grid-template-columns:minmax(0,1fr)}

/* Notes filtering and classification never replace the active composer. */
.order-hub__note-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #b8cde1;border-radius:8px;overflow:hidden;margin-bottom:8px}
.order-hub .order-hub__note-filters button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;border:0!important;border-radius:0!important;padding:10px!important;background:#fff!important;box-shadow:none!important;white-space:normal}
.order-hub .order-hub__note-filters button+button{border-left:1px solid #b8cde1!important}
.order-hub .order-hub__note-filters button[aria-selected="true"]{background:#e8f3ff!important;color:#153d65!important;box-shadow:inset 0 -3px #153d65!important}
.order-hub__note-filters img,.order-hub__note-actions img{width:18px;height:18px;flex-shrink:0}
.order-hub__note-count{font-size:var(--oms-font-sm);color:#526b84;font-variant-numeric:tabular-nums}
.order-hub__notes-view .order-hub__history-card.order-hub__note-card--delivery{background:#f0f7ff;border-bottom-color:#c8ddf1}
.order-hub__note-actions{display:flex;justify-content:flex-end;margin-top:10px}
.order-hub .order-hub__note-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px!important;font-size:var(--oms-font-sm)}
.order-hub__notes-view .order-hub__history-heading{flex-wrap:wrap;gap:12px;margin-top:6px}
.order-hub__notes-view .order-hub__history-heading [hidden]{display:none!important}
.order-hub__notes-view .order-hub__inline-error:empty{display:none}
@media(max-width:650px){
 .order-hub .order-hub__note-filters button{gap:5px;padding:10px 5px!important;font-size:12px!important;flex-wrap:wrap}
 .order-hub__note-filters img{display:none}
 .order-hub__notes-view .order-hub__history-meta{align-items:flex-start;gap:8px;flex-wrap:wrap}
}
