.ops-workspace .content{max-width:1440px;margin:auto}
.ops-workspace .quantity-table{min-width:0;table-layout:fixed;width:100%}
.ops-workspace .quantity-table th:first-child{width:52%}
.ops-workspace .quantity-table th{white-space:normal}
.ops-workspace .quantity-table td{overflow-wrap:anywhere;white-space:normal}
.ops-workspace .quantity-table td:nth-child(n+2){font-weight:700}
.ops-workspace form>.actions{margin-top:12px}
.ops-workspace details summary{cursor:pointer;margin-block:10px;font-weight:700}
.ops-progress-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ops-progress-heading h2{margin:4px 0 12px}
.ops-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));list-style:none;padding:0;gap:10px;margin:16px 0}
.ops-progress li{display:flex;gap:8px;border:1px solid #dce3eb;border-radius:12px;padding:12px;background:#f5f7fb}
.ops-progress li.done{background:#edf8f2;border-color:#b9dfc9;color:#175c3e}
.ops-progress li>span{font-size:20px;line-height:1.2}
.ops-progress li small{display:block;margin-top:6px;line-height:1.4}
.ops-stage-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.ops-stage-form label{min-width:220px;flex:1}
.ops-stage-form button{margin-bottom:8px}
.ops-copies{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.ops-copies span{border-radius:8px;padding:5px 8px;font-size:12px;background:#eef1f5;color:#546477}
.ops-copies .ready{background:#e8f6ee;color:#175c3e;font-weight:700}
.ops-stage{display:inline-block;background:#eaf0fa;color:#17354e;border-radius:8px;padding:6px 8px}
@media(max-width:900px){.ops-progress{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .ops-workspace .quantity-table th:first-child{width:40%}
 .ops-workspace .quantity-table th{font-size:9px;letter-spacing:0;padding:10px 3px}
 .ops-workspace .quantity-table td{font-size:12px;padding:12px 3px}
 .ops-workspace .quantity-table td small{font-size:11px}
 .ops-workspace .panel{padding:16px}
 .ops-progress{grid-template-columns:1fr}
}

/* Billing stays focused: choose an order, save a status or upload one copy. */
.ops-workspace header{margin-bottom:16px}
.ops-order-picker{display:flex;align-items:end;gap:12px;margin:18px 0}
.ops-order-picker label{flex:1;margin:0;max-width:720px}
.ops-order-picker button,.ops-order-picker>a{margin-bottom:8px}
.ops-order-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;margin:20px 0 16px}
.ops-order-heading h2{font-size:18px;margin:0 0 6px}
.ops-order-heading p{color:var(--muted);margin:0;font-size:12px}
.ops-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:14px}
.ops-quick-grid>.panel{margin:0;padding:20px}
.ops-quick-grid h2{font-size:16px;margin:0 0 12px}
.ops-quick-grid label{margin-bottom:12px}
.ops-quick-grid small{display:block;margin-top:8px;font-size:11px}
.ops-quick-grid input[type=file]{padding:8px;font-size:12px}
.ops-upload-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.ops-upload-footer small{margin:0}
.ops-workspace .ops-fold{padding:14px 20px;margin-bottom:8px}
.ops-workspace .ops-fold>summary{margin:0;display:list-item;font-size:13px}
.ops-fold>summary span{font-size:11px;color:var(--muted);font-weight:400;margin-left:8px}
.ops-fold[open]>summary{margin-bottom:16px}
.ops-subsection{margin-top:20px;padding-top:12px;border-top:1px solid var(--line)}
.ops-shipment-lines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
.ops-complete{margin-top:16px}
@media(max-width:700px){.ops-quick-grid{grid-template-columns:1fr}.ops-order-heading,.ops-order-picker{flex-wrap:wrap}.ops-order-picker label{flex-basis:100%}.ops-shipment-lines{grid-template-columns:1fr}.ops-workspace h1{font-size:26px}}

.ops-pending-banner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;margin:14px 0;background:#fff4e5;border:1px solid #f0d29b;border-radius:10px;position:sticky;top:8px;z-index:2}
.ops-pending-banner a{color:#774d0c}
.ops-pending-banner>span{font-size:11px;color:#786a55;margin-left:auto}
.ops-pending-banner [hidden]{display:none}
.ops-order-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.ops-order-filters label{flex:1;min-width:150px;margin-bottom:0}
.ops-order-filters label:nth-of-type(3){flex:2}
.ops-order-filters>button,.ops-order-filters>a{margin-bottom:8px}
.ops-results{font-size:11px;margin:6px 0 14px}
@media(max-width:600px){.ops-pending-banner>span{margin-left:0}.ops-order-filters label{flex-basis:100%}.ops-order-picker{margin-top:12px}}

.ops-custom-dates{display:flex;gap:10px;flex:2;min-width:280px}.ops-custom-dates[hidden]{display:none}.ops-order-filters>label:last-of-type{flex:2}
@media(max-width:600px){.ops-custom-dates{flex-basis:100%;min-width:0;flex-wrap:wrap}}

.ops-order-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.ops-flow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;margin:18px 0}
.ops-flow-step{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px 8px;border:2px solid transparent;color:var(--step-ink);background:var(--step-bg);border-radius:12px}
.ops-flow-step::after{content:'→';position:absolute;left:calc(100% + 5px);top:35%;color:#8997a8;font-size:20px}
.ops-flow-step:last-child::after{display:none}
.ops-flow-step svg{width:26px;height:26px}.ops-flow-step strong{font-size:12px}.ops-flow-step small{font-size:10px;font-weight:400}
.ops-flow-step.is-selected{border-color:var(--step-ink)}
.step-order_received,.ops-status-order_received{--step-bg:#e9f2ff;--step-ink:#24568d}
.step-proforma_sent,.ops-status-proforma_sent{--step-bg:#f1eafd;--step-ink:#69419a}
.step-payment_received,.ops-status-payment_received{--step-bg:#e3f4f2;--step-ink:#14665e}
.step-goods_packed,.ops-status-goods_packed,.ops-status-partially_dispatched{--step-bg:#fff0d9;--step-ink:#875800}
.step-goods_dispatched,.ops-status-goods_dispatched,.ops-status-completed{--step-bg:#e4f5e9;--step-ink:#226b40}
.ops-status-cancelled{--step-bg:#ffe8e9;--step-ink:#9b2434}
.ops-stage[class*=ops-status-]{background:var(--step-bg);color:var(--step-ink)}
.ops-step-panel[hidden]{display:none}.ops-step-panel{padding:20px;margin-bottom:12px}
.ops-step-actions{display:flex;align-items:center;flex-wrap:wrap;gap:20px}.ops-step-actions>form:first-child{flex:1;min-width:240px}.ops-step-panel small{display:block;margin-top:8px;font-size:11px}
.ops-step-panel input[type=file]{padding:8px}.ops-dispatch-details{margin-top:20px}
.ops-copies details{min-width:90px}.ops-copies details summary{border-radius:7px;padding:5px 8px;font-size:11px;margin:0}
.ops-copies details a{display:block;white-space:normal;font-size:11px;margin-top:8px;max-width:220px}
[data-upload-result]{padding:8px;border-radius:8px;background:#edf6fa}.ops-upload-error{color:#9b2434}
@media(max-width:700px){.ops-flow{display:flex;overflow:auto;padding-bottom:6px;gap:20px}.ops-flow-step{min-width:130px;flex-shrink:0}.ops-order-tabs .button{font-size:11px;padding:9px 11px}.ops-step-actions>form{flex-basis:100%}}

.ops-completion-label{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0 0}.ops-completion-label strong{font-size:13px}.ops-completion-label span{color:var(--muted);font-size:11px}
.ops-flow-step{min-height:118px;padding-top:16px}.ops-flow-step:not(.is-complete){background:#f3f5f8;color:#748196;border:1px dashed #cbd4df}
.ops-flow-step:not(.is-complete).is-selected{border:2px solid #294e79;box-shadow:0 0 0 3px #e3ecf7}
.ops-flow-step.is-complete{border:1px solid var(--step-ink);background:var(--step-bg);color:var(--step-ink)}
.ops-done-tick{position:absolute;right:9px;top:8px;background:var(--step-ink);color:white;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:12px}
.ops-flow-step.is-complete small{font-weight:750}.ops-step-time{font-size:9px;font-weight:400;line-height:1.4}.ops-flow-step.is-complete::after{color:var(--step-ink)}
/* Completion is a single unmistakable state, independent of the step type. */
.ops-flow-step.is-complete{--step-bg:#e4f5e9;--step-ink:#226b40;background:#e4f5e9;color:#226b40;border-color:#3c8a59}
.ops-flow-step.is-complete .ops-done-tick{background:#226b40;color:#fff}
.ops-flow-step.is-complete::after{color:#3c8a59}
.ops-pending-banner{background:#fff0f1;border-color:#ed8793;border-left:5px solid #c92539}
.ops-pending-banner a,.ops-pending-banner strong{color:#b71f32;font-weight:850;font-size:16px}
.ops-pending-banner>span{color:#8e3f4a;font-weight:600}

.ops-invoice-balance{border-top:1px solid var(--line);margin-top:20px;padding-top:14px}.ops-invoice-review{border-top:1px solid var(--line);padding:10px 0}.ops-invoice-review summary{font-size:12px}.ops-invoice-review label{font-size:12px}.ops-invoice-dispatch{margin-top:16px}

.ops-mark-dispatched{background:#226b40;border-color:#226b40;font-size:14px;padding:12px 22px}.ops-mark-dispatched:disabled{background:#d9dfe6;color:#6b7888;border-color:#d9dfe6;cursor:not-allowed}

/* Pending product balances use the same compact presentation for all office roles. */
.ops-pending-products{margin:.65rem 0;padding:.65rem .85rem;background:#fff5f5;border:1px solid #f1c4c8;border-radius:12px;max-width:100%;color:#a51c30}
.ops-pending-products summary{cursor:pointer}.ops-pending-products ul{padding:0;list-style:none;margin:.5rem 0 0}
.ops-pending-products li{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.3rem .8rem;padding:.45rem 0;border-top:1px solid #f2d9dc;overflow-wrap:anywhere}
.ops-pending-products li span{color:#4b576a}.ops-pending-products p{margin:.5rem 0}

.ops-retention-notice{padding:12px 16px;border:1px solid #cddbea;background:#eef4fa;border-radius:12px;font-size:.9rem;color:#29445e}

.ops-pending-order-breakdown{padding:.75rem 0;border-bottom:1px solid #e2e7ef}.ops-pending-order-breakdown:last-child{border-bottom:0}

.ops-cancel-order,.ops-cancelled-notice{padding:12px 16px;border:1px solid #e5b4ba;border-radius:12px;margin:12px 0;color:#a32336;background:#fff4f5}.ops-cancel-order summary{cursor:pointer}.ops-cancel-order form{max-width:640px;margin-top:12px}.ops-cancel-button{background:#aa283b;color:#fff}.ops-cancelled-notice p{margin:.4rem 0}

/* Cancellation is a separate state from urgent pending and successful dispatch. */
.ops-status-cancelled{--step-bg:#eee8f5;--step-ink:#684286}
.ops-cancel-order,.ops-cancelled-notice{border-color:#d7c9e4;background:#f3eff8;color:#684286}
.ops-cancel-button{background:#75518e;border-color:#75518e;color:#fff}
.ops-cancel-button:hover{background:#624178;border-color:#624178}
.ops-order-tabs a[href*="status=cancelled"][aria-current="page"]{background:#75518e;border-color:#75518e;color:#fff}

.ops-pending-banner.is-clear{background:#eef1f5;border-color:#d1d9e3;border-left-color:#708094;color:#465569}.ops-pending-banner.is-clear a{color:#465569}

/* Compact additions use existing colours and native controls. */
.ops-report-group { padding: 14px 0; border-bottom: 1px solid #dce4ee; }
.ops-report-group > summary { cursor: pointer; padding: 8px 0; }
.ops-report-group small { display: block; margin-top: 5px; }
/* Shared billing workspace: same typography and surfaces as the owner admin. */
.ops-workspace{background:#f4f6fa}
.ops-sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#fff;border-right:1px solid var(--line);padding:28px 18px 20px;display:flex;flex-direction:column;overflow:auto;z-index:5}
.ops-brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-weight:750;font-size:17px;margin-bottom:36px}.ops-brand small{display:block;font-size:9px;letter-spacing:1.6px;color:var(--muted);margin-top:5px}.ops-brand .brand-mark{width:39px;height:42px}
.ops-nav-label{font-size:10px;letter-spacing:1.5px;color:var(--muted);margin:18px 12px 9px}.ops-sidebar nav{display:grid;gap:4px}.ops-sidebar nav a{padding:12px;border-radius:8px;color:#617084;font-weight:600;display:flex;align-items:center;justify-content:space-between}.ops-sidebar nav a:hover{background:#f4f6fa}.ops-sidebar nav a.active{background:#faedef;color:var(--accent)}.ops-sidebar nav a>span{padding:2px 7px;border-radius:5px;font-size:11px;background:#fff}
.ops-sidebar-account{margin-top:auto;padding:24px 0 0;display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}.ops-sidebar-account>div{min-width:0}.ops-sidebar-account strong{font-size:12px}.ops-sidebar-account small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.ops-sidebar-account .avatar{flex-shrink:0}
.ops-main-workspace{margin-left:248px;min-width:0}.ops-topbar{min-height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 32px;color:var(--muted);font-size:12px}.ops-topbar strong{color:var(--ink);font-weight:600;margin-left:7px}.ops-scope-pill{padding:7px 10px;border:1px solid #e2e7ee;border-radius:20px;font-size:11px;color:#526175;white-space:nowrap}
.ops-workspace .content{max-width:1500px;padding:30px 32px 20px;min-width:0}.ops-workspace header.ops-page-heading{margin:0 0 20px}.ops-page-heading .muted{margin:8px 0 0;font-size:13px}.ops-page-heading h1{font-size:30px;letter-spacing:-.8px}.ops-session-actions{margin-bottom:20px}.ops-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 22px}.ops-overview>a,.ops-overview>div{padding:22px;background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--ink);min-width:0}.ops-overview span{font-size:12px;color:var(--muted)}.ops-overview strong{display:block;font-size:32px;font-weight:700;line-height:1.2;margin:14px 0 9px}.ops-overview small{font-size:11px;color:var(--muted)}.ops-overview .ops-overview-pending{border-top:3px solid #b62938}.ops-overview-pending strong{color:#b62938}.ops-workspace .ops-order-tabs{gap:6px}.ops-workspace .ops-order-tabs .button{font-size:12px;padding:10px 12px}.ops-workspace .panel{box-shadow:0 3px 12px #19273903}.ops-workspace .table-wrap{border:1px solid var(--line);border-radius:9px}.ops-workspace .table-wrap th{padding:14px 12px}.ops-workspace .table-wrap td{padding:17px 12px}.ops-signed-out .content{max-width:480px;padding-top:10vh}.ops-signed-out .ops-page-heading{padding:0 6px}.ops-signed-out .panel.editor{padding:28px}.ops-signed-out form{display:grid;gap:17px}.ops-signed-out details form{margin-top:15px}.ops-signed-out .ops-page-heading h1{font-size:32px}
@media(max-width:1100px){.ops-sidebar{width:218px;padding-inline:13px}.ops-main-workspace{margin-left:218px}.ops-workspace .content{padding:24px}.ops-topbar{padding-inline:24px}.ops-overview{gap:10px}.ops-overview>a,.ops-overview>div{padding:17px}}
@media(max-width:820px){.ops-sidebar{position:static;width:auto;border-right:0;border-bottom:1px solid var(--line);padding:16px 20px;overflow:visible}.ops-brand{margin:0 0 15px}.ops-sidebar nav{display:flex;flex-wrap:wrap;gap:5px}.ops-sidebar nav a{padding:9px 11px;font-size:12px;gap:7px}.ops-sidebar .ops-nav-label,.ops-sidebar-account{display:none}.ops-sidebar nav[aria-label="Workspace settings"]{margin-top:7px}.ops-main-workspace{margin-left:0}.ops-topbar{min-height:60px;padding:14px 20px}.ops-workspace .content{padding:22px 20px}.ops-overview{gap:9px}.ops-overview strong{font-size:28px}.ops-overview small{line-height:1.5;display:block}.ops-workspace .ops-page-heading h1{font-size:28px}}
@media(max-width:480px){.ops-sidebar{padding:15px 14px}.ops-brand{font-size:16px}.ops-sidebar nav a{font-size:11px;padding:8px}.ops-topbar{align-items:flex-start;flex-direction:column;gap:9px;padding:14px 16px}.ops-workspace .content{padding:22px 14px}.ops-overview{grid-template-columns:1fr 1fr}.ops-overview>div:last-child{grid-column:1/-1;padding:13px 16px;display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center}.ops-overview>div:last-child strong{font-size:24px;margin:0;grid-column:2;grid-row:1/3}.ops-overview>div:last-child small{grid-column:1}.ops-overview>a{padding:16px 13px}.ops-overview strong{font-size:28px}.ops-signed-out .content{padding-top:7vh}.ops-signed-out .panel.editor{padding:22px}.ops-workspace .ops-session-actions{justify-content:flex-end}}
