/* V158.1 Portal Clarity, option 1. Presentation only; canonical runtime remains V150. */
html[data-mpd-release="central-v150-calm-hybrid"] #app.portal > .shell > .topbar{
  height:auto!important;min-height:64px!important;gap:10px!important;
  padding:10px 18px!important;align-items:center!important;
}
#app.portal > .shell > .topbar .top-identity{min-width:0!important;flex:1 1 160px}
#app.portal > .shell > .topbar .top-identity > b,
#app.portal > .shell > .topbar .top-identity > span{
  display:block!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;
}
#app.portal > .shell > .topbar .top-identity > b{font-size:16px!important;line-height:1.3!important}
#app.portal > .shell > .topbar .top-identity > span{font-size:12px!important;line-height:1.5!important}
#app.portal > .shell > .topbar .top-actions{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;
  justify-content:flex-end!important;gap:8px!important;min-width:0!important;
}
/* The identity already shows sync time. Keep the actual Sync action. */
#app.portal > .shell > .topbar .top-sync-pill{display:none!important}
#app.portal > .shell > .topbar .admin-preview-select{min-width:0!important;max-width:100%!important}
#app.portal > .shell > .topbar .admin-preview-select select{min-width:0!important;max-width:100%!important}
#app.portal > .shell > .topbar .clarity-live-action{min-height:40px;white-space:nowrap}

@media (max-width:1439px){
  html[data-mpd-release="central-v150-calm-hybrid"] #app.portal > .shell > .topbar{
    display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;
  }
  #app.portal > .shell > .topbar .top-identity{grid-column:2;grid-row:1}
  #app.portal > .shell > .topbar .top-actions{grid-column:1/-1;justify-content:flex-start!important}
}
@media (min-width:861px){
  /* Retain V148's authorised button and handler; discard its old floating presentation. */
  html[data-mpd-release="central-v150-calm-hybrid"] .sidebar .nav-v158 [data-v148-company-admin-launch]{
    position:static!important;inset:auto!important;transform:none!important;
    width:100%!important;min-height:44px!important;margin:0!important;
    padding:9px 11px!important;background:transparent!important;color:inherit!important;
    box-shadow:none!important;border:0!important;font:inherit!important;font-size:13px!important;
  }
  /* Live activity now opens through the header or existing sidebar action. */
  #app.portal #liveLogPanel.collapsed{display:none!important}
  #app.portal #liveLogPanel .live-log-tab{display:none!important}
}
@media (max-width:860px){
  html[data-mpd-release="central-v150-calm-hybrid"] #app.portal > .shell > .topbar{
    grid-template-columns:minmax(0,1fr)!important;padding:9px 12px!important;
  }
  #app.portal > .shell > .topbar .top-identity{grid-column:1;grid-row:1}
  #app.portal > .shell > .topbar .clarity-live-action{display:none!important}
  #app.portal > .shell > .topbar .top-actions{width:100%!important;overflow:visible!important}
}

/* Limit page cleanup to the six reviewed workspaces; do not restyle dialogs or forms. */
html[data-mpd-release="central-v150-calm-hybrid"] body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="shipments"],[data-section="updates"]) #main > .command-mast{
  padding:18px 20px!important;margin-bottom:12px!important;min-height:0!important;gap:16px!important;
}
html[data-mpd-release="central-v150-calm-hybrid"] body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="shipments"],[data-section="updates"]) #main > .command-mast h1{
  font-size:clamp(22px,2.2vw,30px)!important;line-height:1.2!important;margin:0 0 6px!important;
}
html[data-mpd-release="central-v150-calm-hybrid"] body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="shipments"],[data-section="updates"]) #main > .command-mast .mast-left > p:not(.eyebrow){
  font-size:13px!important;line-height:1.5!important;margin:0!important;
}
body[data-section="projects"] #main .projects-command-head-v1082 .project-command-tools-v1062 [data-action="newProject"],
body[data-section="orders"] #main .orders-active-dashboard > header [data-action="newOrder"]{display:none!important}
html[data-mpd-release="central-v150-calm-hybrid"] body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="updates"]) #main .filters{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))!important;
  gap:10px!important;padding:12px!important;align-items:center!important;min-width:0!important;
}
body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="updates"]) #main .filters:before{display:none!important}
body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="updates"]) #main .filters :is(input,select){
  width:100%!important;min-width:0!important;min-height:42px!important;font-size:13px!important;
}
body[data-section="updates"] #main .updates-toolbar-v1329{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px!important;padding:16px!important}
body[data-section="updates"] #main .updates-toolbar-v1329 > .filters{flex:1 1 480px!important;margin:0!important}
@media (max-width:860px){
  html[data-mpd-release="central-v150-calm-hybrid"] body:is([data-section="tasks"],[data-section="projects"],[data-section="orders"],[data-section="updates"]) #main .filters{grid-template-columns:1fr!important}
}
