/* Shared browsing patterns; original handlers, status and role rules remain authoritative. */
@media screen{
 body.ui-v2-preview #ofOrderToolbar{margin:12px 0 20px;min-width:0}
 #ofOrderSearch label{display:block;font-size:13px;color:#526177;margin:0}
 #ofOrderSearch input{width:100%;font-size:16px;min-height:48px;box-sizing:border-box;border-radius:12px;padding:12px 14px;border:1px solid #dce3ec;background:#fff}
 #ofOrderActions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
 body.ui-v2-preview #ofOrderActions :is(button,#spOpen){width:auto;min-height:44px;margin:0;padding:10px 14px;border-radius:8px;font-size:14px}
 #ofOrderStates{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px 0 10px;min-width:0}
 #ofOrderStates button{display:flex;align-items:center;gap:6px;flex:none;min-height:44px;white-space:nowrap;padding:8px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:#526177;font-size:14px}
 #ofOrderStates button[aria-pressed=true]{color:#1e40af;border-color:#b8cefa;background:#eff6ff;font-weight:600}
 #ofOrderStates small{font:inherit;font-size:12px;font-variant-numeric:tabular-nums}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #ofOrderStates{display:flex!important;flex-wrap:nowrap!important;max-width:100%;width:100%;box-sizing:border-box;overflow-x:auto!important;overflow-y:hidden;gap:6px}
 body.of-order-list #pageDraftStatus5:not(.pd-error5),body:has(#machineSchedulePanel:not(.hidden)) #pageDraftStatus5:not(.pd-error5){display:none!important}
 #ofOrderSort{display:flex;align-items:center;gap:12px;margin-top:8px}#ofOrderSort label{display:flex;gap:8px;align-items:center;color:#526177;font-size:14px}#ofOrderSort select{min-height:44px;font-size:16px;width:auto}
 body.of-order-list #wbTopActions,body.of-order-list #nhContextActions,body.of-order-detail #wbTopActions,body.of-order-detail #nhContextActions{display:none!important}
 body.of-remote :is(#editOrder,#saveOrderTemplate5,#syncOrderPrograms5,#syncFullManual5,#deleteOrder5,#importOrders5,#exportOrders5,[data-edit-order5],[data-repeat5]){display:none!important}
 body.of-order-list #wbOrderHead{display:none!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList>.order5{display:block!important;padding:18px!important;margin:14px 0!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:first-child{display:flex!important;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid #edf0f4}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:first-child label{display:flex;align-items:center;gap:8px;min-width:0;margin:0}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:first-child .status5{margin-left:auto}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .wb-order-products{display:block!important;padding:12px 0;min-width:0}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .orderline5{display:grid;grid-template-columns:80px minmax(0,1fr);gap:14px;align-items:start;padding:10px 0}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:last-child{display:flex!important;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;border-top:1px solid #edf0f4;padding-top:12px}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:last-child>div{display:block!important;min-width:0}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5>.row5:last-child>nav{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:8px}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell #orderList .order5 nav>button{min-height:44px;font-size:14px}
 #ofOrderHeader{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 16px}
 #ofOrderHeader h1{font-size:24px;font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere}
 #ofOrderHeader p{width:100%;margin:0;color:#526177;font-size:14px;line-height:1.6}
 .of-state{padding:5px 10px;background:#eff6ff;color:#1e40af;border-radius:6px;font-size:13px}
 #ofDetailTools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 20px}
 body.ui-v2-preview #ofDetailTools :is(button,#spOrderOpen){width:auto;margin:0;font-size:14px;padding:10px 14px;min-height:44px}
 #ofDetailTasks{display:flex;flex-direction:column;gap:16px}
 #ofDetailTasks :is(#coOrderPanel,#qhHandoff){margin:0!important;min-width:0}
 #ofMoreActions{margin:20px 0;padding:12px 16px;border:1px solid #dce3ec;border-radius:12px;background:#fff}
 #ofMoreActions>summary{min-height:44px;display:list-item;align-content:center;font-size:14px;color:#334155;cursor:pointer}
 #ofMoreActions nav{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
 #ofMoreActions nav button{min-height:44px;font-size:14px}
 body.of-order-detail #detail>h2{display:none!important}
 body:has(.sc-dialog[open]){overflow:hidden}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell .sc-dialog>header{background:#fff!important;color:#1e293b!important;box-shadow:none!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell .sc-dialog>header h2{color:#1e293b!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell dialog.sc-dialog[open]{overflow:hidden!important;display:flex!important;flex-direction:column}
 #machineSchedulePanel .sc-browse{display:flex;flex-direction:column;gap:12px;margin:16px 0}
 #machineSchedulePanel .sc-search{display:flex;gap:8px;align-items:flex-end}#machineSchedulePanel .sc-search label{flex:1;min-width:0}
 #machineSchedulePanel .sc-search button{flex:none}
 #machineSchedulePanel :is(#scScope,#scStatusTabs){display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;padding:3px 0;scrollbar-width:thin}
 #machineSchedulePanel :is(#scScope,#scStatusTabs) button{flex:none;min-height:44px;padding:8px 12px;font-size:14px;border:1px solid #dce3ec;background:#fff;color:#526177;border-radius:8px;white-space:nowrap}
 #machineSchedulePanel :is(#scScope,#scStatusTabs,#scView) [aria-pressed=true]{background:#eff6ff!important;color:#1e40af!important;border-color:#2563eb!important;font-weight:600}
 #machineSchedulePanel .sc-browse-options{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
 #machineSchedulePanel .sc-browse-options label{flex-direction:row;align-items:center}#machineSchedulePanel .sc-browse-options select{width:auto}
 #machineSchedulePanel #scView{display:flex;gap:6px}#machineSchedulePanel #scView button{min-height:44px;padding:8px 12px;border:1px solid #dce3ec;border-radius:8px}
 #scResults{font-size:13px;color:#526177}#machineSchedulePanel [hidden]{display:none!important}
 #machineSchedulePanel[data-sc-view=list] .sc-machines{grid-template-columns:minmax(0,1fr)!important}
 #machineSchedulePanel[data-sc-view=list] .sc-machine{display:grid;grid-template-columns:minmax(240px,1.2fr) minmax(160px,1fr) minmax(180px,1fr);align-items:center;gap:8px 20px}
 #machineSchedulePanel[data-sc-view=list] .sc-machine-head{grid-row:span 2}#machineSchedulePanel[data-sc-view=list] .sc-machine nav{grid-column:3;grid-row:1/3;margin:0;padding:0;justify-content:flex-end}
 #machineSchedulePanel[data-sc-view=list] .sc-timeline{grid-column:1/-1}
 #machineSchedulePanel[data-sc-view=list] .sc-machine>.sc-warning{grid-column:1/-1}
 #machineSchedulePanel[data-sc-view=list] .sc-availability{font-size:18px}
 #machineSchedulePanel[data-sc-scope=unassigned] .sc-machines{display:none!important}
 #machineSchedulePanel .sc-filters{grid-template-columns:180px 180px;max-width:500px}
 #machineSchedulePanel .sc-filters label:last-child{grid-column:auto}
 #machineSchedulePanel:has(#scBrowse) .sc-filters{display:none!important}
 #machineSchedulePanel .sc-timeline{width:100%;max-width:100%;box-sizing:border-box;overflow:hidden}
 #machineSchedulePanel .sc-timeline span{flex:1 1 0;min-width:0;max-width:100%}
}
@media screen and (max-width:760px){
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #listPage #stats5{display:none!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #listPage>h2{font-size:20px!important;margin:0 0 12px!important}
 #ofOrderToolbar{margin-top:0!important}
 #ofOrderActions{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:6px}
 body.ui-v2-preview #ofOrderActions :is(button,#spOpen){padding:9px 6px;font-size:13px!important;width:100%}
 #ofOrderActions:has(#ofQuickOrder[hidden]){display:flex}
 #ofOrderActions:has(#ofFullOrder[hidden]):not(:has(#ofQuickOrder[hidden])){grid-template-columns:1fr 1fr}
 #ofOrderSort{justify-content:space-between;margin:8px 0}#ofOrderSort label{white-space:nowrap}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #listPage #tags5{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:12px 0}
 body.ui-v2-preview #listPage #tags5 button{min-height:44px;font-size:13px;padding:8px}
 body.ui-v2-preview.wb-pilot #orderList .order5>.row5:first-child{display:flex!important;align-items:center!important;gap:8px;flex-wrap:wrap}
 body.ui-v2-preview #orderList .order5>.row5:first-child label{min-width:0!important;flex:1;overflow-wrap:anywhere}
 body.ui-v2-preview #orderList .order5 .wb-copy-number{font-size:12px!important;min-height:44px!important;padding:8px!important}
 body.ui-v2-preview #orderList .orderline5{display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;gap:12px!important}
 body.ui-v2-preview #orderList .orderline5 .thumb5{width:64px!important;height:64px!important;object-fit:contain!important}
 body.ui-v2-preview #orderList .orderline5 .scheme5{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important;max-height:3.5em}
 body.ui-v2-preview #orderList .order5 nav{justify-content:flex-end;gap:6px;align-items:center}
 body.ui-v2-preview #orderList .order5 nav>button{min-height:44px;font-size:13px!important;padding:8px!important;flex:0 1 auto}
 body.ui-v2-preview #orderList .wb-row-more>summary{min-height:44px;padding:8px;box-sizing:border-box;align-content:center}
 #ofOrderHeader h1{font-size:20px}#ofDetailTools{display:grid;grid-template-columns:1fr 1fr;gap:8px}body.ui-v2-preview #ofDetailTools :is(button,#spOrderOpen){width:100%;font-size:13px}
 #ofDetailTasks :is(#qhHandoff,#coOrderPanel){padding:16px!important;border-radius:12px}
 #ofDetailTasks h2{font-size:18px!important;line-height:1.4}
 #ofMoreActions{padding:10px 12px}#ofMoreActions nav{display:grid;grid-template-columns:1fr 1fr}#ofMoreActions nav button{font-size:13px!important;padding:9px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #machineSchedulePanel .sc-heading{flex-direction:column!important;align-items:stretch!important;gap:12px!important}
 #machineSchedulePanel .sc-heading h1{white-space:nowrap;line-height:1.4}
 #machineSchedulePanel .sc-heading>div{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #scActions{display:flex!important;justify-content:flex-start;gap:8px!important}
 body.fv-refined.ui-v2-preview.fiyaoo-branded.workbench-shell.mt-mobile #scActions button{font-size:14px!important;padding:10px 12px!important}
 #machineSchedulePanel .sc-filters{grid-template-columns:1fr 1fr;max-width:none;gap:10px}
 #machineSchedulePanel .sc-browse-options{gap:8px}#machineSchedulePanel .sc-browse-options label{flex:1 1 40%;min-width:0;white-space:nowrap;gap:6px}#machineSchedulePanel .sc-browse-options select{width:0;flex:1}
 #machineSchedulePanel .sc-browse-options>button{font-size:13px}
 #machineSchedulePanel .sc-summary{font-size:12px;gap:8px;margin:8px 0!important;padding:10px 0!important}
 #machineSchedulePanel[data-sc-view=list] .sc-machine{display:flex!important;gap:6px}
 #machineSchedulePanel[data-sc-view=list] .sc-machine nav{justify-content:flex-start;width:100%;margin-top:8px}
 #machineSchedulePanel[data-sc-view=grid] .sc-machines{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine{padding:12px;gap:8px}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine-head{flex-direction:column;gap:8px}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine-identity{flex-direction:column;align-items:flex-start}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine h2{font-size:15px}
 #machineSchedulePanel[data-sc-view=grid] .sc-availability{font-size:16px}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine nav{flex-direction:column;align-items:stretch}
 #machineSchedulePanel[data-sc-view=grid] .sc-machine nav button{font-size:13px!important;padding:8px!important}
 #machineSchedulePanel[data-sc-view=grid] .sc-timeline{flex-wrap:wrap}
 #machineSchedulePanel[data-sc-view=grid] .sc-timeline span{flex:1 1 40%}
}
@media print{#ofOrderToolbar,#ofOrderHeader,#ofDetailTools,#ofMoreActions,.sc-browse{display:none!important}}
