/* Keep the WB app shell fixed; long pages scroll inside their own content. */
@media(min-width:621px){
 html,body{height:100%;overflow:hidden}
 .wb-shell{height:100dvh;min-height:0;overflow:hidden}
 .wb-shell>main{display:flex;flex-direction:column;height:100%;min-width:0;min-height:0;overflow:hidden}
 .wb-sidebar{height:100%;min-height:0;flex-shrink:0}
 .wb-topbar{flex-shrink:0}
 .wb-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 .wb-content>.wb-section{height:100%;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
 #wbCollection,#wbOrders,#wbProducts{display:flex;flex-direction:column;overflow:hidden}
 #wbDraftPanel,#wbTaskPanel{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 #wbCollection .wb-table-wrap,#wbOrders>.wb-table-wrap,#wbProducts>.wb-table-wrap{flex:1;min-height:0;max-height:none;overflow:auto}
 #wbCollection .wb-section-head,#wbCollection .wb-subtabs,#wbCollection .wb-toolbar,#wbCollection .wb-pager,#wbOrders>.wb-section-head,#wbOrders>.wb-toolbar,#wbOrders>.wb-order-tabs,#wbOrders>.wb-pager,#wbOrders>p,#wbOrders>.wb-sync-status,#wbProducts>.wb-section-head,#wbProducts>.wb-toolbar,#wbProducts>.wb-pager,#wbProducts>p,#wbProducts>.wb-sync-status{flex-shrink:0}
}
.wb-order-table th{white-space:nowrap}
.wb-order-table .wb-order-supply{white-space:nowrap;min-width:125px}
.wb-content:has(>#wbOrders:not([hidden])){padding:6px}
#wbOrders .wb-order-toolbar{gap:6px;margin-top:0;padding:6px 8px}
#wbOrders .wb-order-toolbar input,#wbOrders .wb-order-toolbar select{width:auto;min-width:0}
#wbOrders #wbOrderAccount{width:118px}
#wbOrders #wbOrderStatus{width:110px}
#wbOrders #wbOrderKeyword{width:158px}
#wbOrders #wbOrderPreset{width:100px}
#wbOrders .wb-actions{gap:5px;margin-left:auto}
#wbOrders .wb-order-tabs{margin:0;padding:0 8px 4px;gap:4px}
#wbOrders .wb-order-tabs .wb-subtabs{padding:0}
#wbOrders .wb-order-tabs .wb-subtabs button{min-height:28px;padding:2px 8px;display:inline-flex;align-items:center;gap:4px;font-size:11px}
#wbOrderTabs [data-order-count]{font-variant-numeric:tabular-nums;font-size:10px;line-height:16px;padding:0 4px;border-radius:3px;background:#eef2f7}
#wbOrderTabs .active [data-order-count]{color:var(--wb-accent);background:var(--wb-accent-soft)}
#wbOrders>.wb-table-wrap{margin:0 6px 6px}
#wbOrders .wb-order-table tbody tr{height:60px}
#wbOrders .wb-order-table table{table-layout:fixed;min-width:1600px;width:100%}
#wbOrders .wb-order-table th,#wbOrders .wb-order-table td{text-align:center;vertical-align:middle;padding:6px 4px}
#wbOrders .wb-order-table td{min-width:0;max-width:none}
#wbOrders .wb-order-table tbody td>p{max-width:none;margin:3px auto 0;text-align:center;line-height:1.45}
#wbOrders .wb-order-table .wb-order-code,#wbOrders .wb-order-table td.wb-order-code>p{text-align:left;white-space:nowrap}
#wbOrders .wb-order-table td.wb-order-code>p{overflow:hidden;text-overflow:ellipsis}
#wbOrders .wb-order-table button{text-align:center}
#wbOrders .wb-order-table .wb-order-supply{min-width:0;white-space:nowrap;font-size:10px}
#wbOrders .wb-order-table tbody td:nth-child(4) button,#wbOrders .wb-order-create-supply button{white-space:nowrap;padding:3px 4px}
#wbOrders .wb-order-columns>col:nth-child(1){width:1.6032%}
#wbOrders .wb-order-columns>col:nth-child(2){width:1.8704%}
#wbOrders .wb-order-columns>col:nth-child(3){width:6.1%}
#wbOrders .wb-order-columns>col:nth-child(4){width:2.8056%}
#wbOrders .wb-order-columns>col:nth-child(5){width:3.8744%}
#wbOrders .wb-order-columns>col:nth-child(6){width:4.0080%}
#wbOrders .wb-order-columns>col:nth-child(7){width:5.6780%}
#wbOrders .wb-order-columns>col:nth-child(8){width:7.3480%}
#wbOrders .wb-order-columns>col:nth-child(9){width:7.7488%}
#wbOrders .wb-order-columns>col:nth-child(10){width:5.3440%}
#wbOrders .wb-order-columns>col:nth-child(11){width:3.8744%}
#wbOrders .wb-order-columns>col:nth-child(12){width:3.0728%}
#wbOrders .wb-order-columns>col:nth-child(13){width:3.7408%}
#wbOrders .wb-order-columns>col:nth-child(14){width:4.0080%}
#wbOrders .wb-order-columns>col:nth-child(15){width:4.0080%}
#wbOrders .wb-order-columns>col:nth-child(16){width:3.6072%}
#wbOrders .wb-order-columns>col:nth-child(17){width:6.4128%}
#wbOrders .wb-order-columns>col:nth-child(18){width:4.8096%}
#wbOrders .wb-order-columns>col:nth-child(19){width:3.92%}
#wbOrders .wb-order-columns>col:nth-child(20){width:4.8096%}
#wbOrders .wb-order-columns>col:nth-child(21){width:4.1416%}
#wbOrders .wb-order-columns>col:nth-child(22){width:7.2144%}
#wbOrders .wb-product-image{display:block;margin:auto}
#wbOrders .wb-order-image-cell{position:relative;width:64px;min-width:64px}
#wbOrders .wb-order-thumb{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:40px;height:50px;max-height:calc(100% - 8px);padding:0;border:1px solid var(--wb-line);background:#fff;border-radius:4px;overflow:hidden}
#wbOrders .wb-order-thumb .wb-product-image{width:100%;height:100%;object-fit:contain}
#wbOrders .wb-order-cost{min-width:56px;min-height:24px}
#wbOrders .wb-order-reference{text-decoration:line-through;text-decoration-thickness:1px}
#wbOrders .wb-order-cancelled .wb-order-profit{color:#b42318}
#wbOrders .wb-order-status{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#475569;white-space:nowrap}
#wbOrders .wb-order-status.is-delivered{border-color:#bbf7d0;background:#f0fdf4;color:#15803d}
#wbOrders .wb-order-status.is-new{border-color:#ddd6fe;background:#f5f3ff;color:#6d28d9}
#wbOrders .wb-order-status.is-pending{border-color:#fde68a;background:#fffbeb;color:#92400e}
#wbOrders .wb-order-status.is-shipping{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
#wbOrders .wb-order-status.is-cancelled{border-color:#fecaca;background:#fff1f2;color:#b91c1c}
#wbOrders .wb-order-status.is-warning{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
#wbOrderSummary th,#wbOrderSummary td{position:sticky;top:auto;bottom:0;z-index:1;background:var(--wb-accent-soft);border-top:1px solid var(--wb-line);font-variant-numeric:tabular-nums}
#wbOrderSummary strong{font-weight:650}
#wbOrderSummary small{display:block;font-size:10px;line-height:1.5;color:var(--wb-muted)}
#wbOrderPager{justify-content:flex-end;gap:4px;padding:0;font-size:11px;white-space:nowrap}
#wbOrderProgressOpen{margin-left:auto;min-height:24px;padding:3px 8px;font-size:11px}
.wb-order-progress-dialog{width:min(720px,calc(100vw - 24px))}
#wbOrderSyncStatus{max-height:55dvh;overflow:auto;flex-shrink:1}
#wbOrderSyncStatus p{margin:0;padding:8px 0;overflow-wrap:anywhere}
#wbOrderSyncStatus p+p{border-top:1px solid var(--wb-line)}
#wbOrderProgressError:empty{display:none}
.wb-order-image-dialog{width:min(760px,94vw)}
.wb-order-image-dialog #wbOrderImage{display:block;width:100%;height:min(68vh,760px);object-fit:contain;background:var(--wb-accent-soft)}
.wb-order-image-dialog h2{max-width:90%;overflow-wrap:anywhere}
#wbOrderPager [aria-current="page"]{color:#fff;background:var(--wb-accent);border-color:var(--wb-accent)}
#wbProducts .wb-row-actions{display:flex;flex-wrap:nowrap;gap:4px;align-items:center;justify-content:center;max-width:none;width:max-content;margin:auto}
#wbProducts .wb-row-actions button{white-space:nowrap}
#wbProducts .wb-catalog-table td:last-child{min-width:280px}
#wbProducts #wbProductSyncMeta{margin:0 0 0 8px;font-size:11px}
.wb-required-star{color:#b42318;margin-left:3px}
.wb-field-label{display:inline-flex;align-items:center}
#wbEditForm .wb-required-missing{border-color:#b42318;background:#fff5f4;outline:1px solid #b42318;outline-offset:1px}
#wbEditForm .wb-required-missing:focus{outline-width:2px}
.wb-quick-vendor-rules .wb-bulk-vendor{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.wb-quick-vendor-rules .wb-bulk-vendor input{flex:1;min-width:160px}
@media(min-width:621px){
 #wbOrders{height:auto;flex:0 1 auto;max-height:100%}
 #wbOrders>.wb-table-wrap{flex:0 1 auto}
}
@media(max-width:620px){
 #wbOrders .wb-actions{margin-left:0;flex-wrap:wrap}
}
