/* SME Focus Workspace 0.71 — visible layout differentiation.
   Never affects customers, fullscreen wallboard, or dashboard editing. */
/* Reflow auto rows. Fixed original widget spans left blank grid slots. */
body.sme-premium-ui[data-sme-focus-route="dashboard"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]):not([data-sme-density-fallback="all"]):not(.command-wallboard) #dashboardWidgets:not(.editing){
 display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:14px!important
}
body.sme-premium-ui[data-sme-focus-route="dashboard"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]):not([data-sme-density-fallback="all"]) #dashboardWidgets:not(.editing) > .dash-widget{
 grid-column:span 6!important;grid-row:auto!important;height:auto!important;min-height:180px!important
}
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="simplified"]:not([data-sme-density-fallback="all"]) #dashboardWidgets:not(.editing) > .dash-widget,
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="balanced"]:not([data-sme-density-fallback="all"]) #dashboardWidgets:not(.editing) > :is([data-dashboard-widget="kpi_summary"],[data-dashboard-widget="workflow_attention"],[data-dashboard-widget="delay_watch"]){grid-column:span 12!important}
body.sme-premium-ui[data-sme-focus-route="dashboard"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #dashboardWidgets:not(.editing) > .dash-widget > .dash-card-body{overflow:visible!important;max-height:none!important}
/* Independent route marker, not a body class that can arrive after rendering. */
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="simplified"]:not([data-sme-density-fallback="all"]) #dashboardWidgets:not(.editing) > .dash-widget:not(:is([data-dashboard-widget="kpi_summary"],[data-dashboard-widget="workflow_attention"],[data-dashboard-widget="delay_watch"])){display:none!important}
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="balanced"]:not([data-sme-density-fallback="all"]) #dashboardWidgets:not(.editing) > .dash-widget:not(:is([data-dashboard-widget="kpi_summary"],[data-dashboard-widget="workflow_attention"],[data-dashboard-widget="delay_watch"],[data-dashboard-widget="current_workload"],[data-dashboard-widget="dispatch_live"],[data-dashboard-widget="turnaround_performance"])){display:none!important}
/* Present action queues above secondary reports instead of pages of widgets. */
body.sme-premium-ui:is([data-sme-focus-route="manager"],[data-sme-focus-route="writer"]):is([data-sme-density="balanced"],[data-sme-density="simplified"]):not(.command-wallboard):not(.customer-portal-mode) #page{display:flex!important;flex-direction:column;gap:0!important}
body.sme-premium-ui:is([data-sme-focus-route="manager"],[data-sme-focus-route="writer"]):is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > *{min-width:0!important}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .manager-morning-brief{order:1}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .quickbar{order:2}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .table-panel{order:3}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .manager-cross-panel{order:4}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .manager-bottleneck-panel{order:5}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > :is(.shift-handoff-panel,.manager-resolution-panel,.manager-targets-standard,.manager-flow-panel,.kpis){order:6}
body.sme-premium-ui[data-sme-focus-route="manager"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .kpis{display:none!important}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .writer-brief{order:1}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .writer-kpis{order:2}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .customer-request-panel{order:3}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .quickbar{order:4}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .writer-table-panel{order:5}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .shift-handoff-panel{order:6}
body.sme-premium-ui[data-sme-focus-route="manager"][data-sme-density="simplified"] #page .manager-brief-columns > div:nth-child(2){display:none!important}
@media(max-width:850px){
 body.sme-premium-ui[data-sme-focus-route="dashboard"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #dashboardWidgets:not(.editing) > .dash-widget{grid-column:span 12!important;min-height:0!important}
}

/* Keep operational notices first; move secondary analysis below the daily queue. */
body.sme-premium-ui:is([data-sme-focus-route="manager"],[data-sme-focus-route="writer"]):is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > *{order:8}
body.sme-premium-ui:is([data-sme-focus-route="manager"],[data-sme-focus-route="writer"]):is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > :is(.page-error,.authority-strip,.completeness-notice){order:0}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .role-daily-plan{order:3}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .customer-request-panel{order:4}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .quickbar{order:5}
body.sme-premium-ui[data-sme-focus-route="writer"]:is([data-sme-density="balanced"],[data-sme-density="simplified"]) #page > .writer-table-panel{order:6}
/* A small, obvious KPI summary without hiding any live warning. */
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="balanced"] #dashboardWidgets:not(.editing) [data-dashboard-widget="kpi_summary"] .dashboard-kpis > .dash-kpi:nth-child(n+5):not(.alert):not(.warn),
body.sme-premium-ui[data-sme-focus-route="dashboard"][data-sme-density="simplified"] #dashboardWidgets:not(.editing) [data-dashboard-widget="kpi_summary"] .dashboard-kpis > .dash-kpi:nth-child(n+4):not(.alert):not(.warn){display:none!important}

/* Reduce filter noise on Writer pages while keeping the selected filter
   accessible. Detailed restores the full set of 13 views. */
body.sme-premium-ui[data-sme-focus-route="writer"][data-sme-density="simplified"] #page > .quickbar .quick-left > button.pill-btn:nth-of-type(n+7):not(.active),
body.sme-premium-ui[data-sme-focus-route="writer"][data-sme-density="balanced"] #page > .quickbar .quick-left > button.pill-btn:nth-of-type(n+11):not(.active){
 display:none!important
}
