/* Profile owns workspace switching; surfaces and accent reuse the approved palette. */
body.ux-r311 #appScreen > .app-header { flex-wrap:nowrap; gap:12px; }
body.ux-r311 .profile-mini { min-width:0; flex:1; }
body.ux-r311 .profile-mini > div { min-width:0; }
body.ux-r311 #topName { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-workspace-label { display:block; max-width:100%; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ux-muted); font-size:11px; line-height:1.3; }
.profile-workspace-label[hidden] { display:none; }
body.ux-r311 .header-actions { flex-shrink:0; }
body.ux-r311 .app-menu-toggle svg { width:20px; height:20px; }
body.ux-r311 .profile-context-trigger { cursor:pointer; pointer-events:auto; }
body.ux-r311 .profile-context-trigger .avatar-menu-indicator svg { width:14px; height:14px; }
body.ux-r311 .profile-context-trigger[aria-expanded=true] .avatar-menu-indicator { transform:rotate(180deg); }
body.ux-r311 #profileContextPopover {
  position:fixed; inset:auto; z-index:10090; min-width:0;
  padding:12px; border:1px solid var(--ux-line)!important; border-radius:var(--r-lg);
  background:var(--ux-panel)!important; box-shadow:var(--shadow-sm)!important;
  overflow:auto; overscroll-behavior:contain; scroll-padding:12px;
  transform-origin:top left; animation:workspace-popover-in 160ms ease both;
}
.profile-context-identity { display:grid; gap:5px; padding:6px 8px 14px; }
.profile-context-identity strong { color:var(--ux-text); font-size:16px; line-height:1.35; overflow-wrap:anywhere; }
.profile-context-identity small { color:var(--ux-muted); font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
body.ux-r311 #profileContextPopover .profile-context-open {
  display:flex; justify-content:space-between; align-items:center; width:100%;
  padding:12px 9px; min-height:44px; margin:0 0 10px; border-radius:var(--r-sm);
  background:var(--primary-dim)!important; color:var(--primary-light)!important; border-color:transparent!important; box-shadow:none!important;
  font-size:13px; font-weight:700; line-height:1.4;
}
body.ux-r311 #profileContextPopover .profile-context-open:is(:hover,:focus-visible,:active) {
  background:var(--primary-dim)!important; color:var(--primary-light)!important; box-shadow:none!important; filter:none!important;
}
.profile-context-open svg { width:18px; height:18px; flex:none; }
body.ux-r311 #profileContextPopover .workspace-popover-section { color:var(--ux-muted); padding:12px 9px 6px; font-size:10px; line-height:1.4; }
body.ux-r311 #profileContextPopover .workspace-popover-item { background:transparent; min-height:58px; border-radius:var(--r-sm); padding:9px; }
body.ux-r311 #profileContextPopover .workspace-popover-item.selected { background:var(--primary-dim); }
body.ux-r311 #profileContextPopover .workspace-popover-item b { color:var(--ux-text); font-size:13px; line-height:1.4; }
body.ux-r311 #profileContextPopover .workspace-popover-item small { color:var(--ux-muted); font-size:11px; line-height:1.4; }
body.ux-r311 #profileContextPopover .workspace-popover-icon { color:var(--primary-light); background:var(--primary-dim); border-color:transparent; border-radius:var(--r-sm); }
body.ux-r311 #profileContextPopover .workspace-popover-check { color:var(--primary-light); }
body.ux-r311 #profileContextPopover .workspace-popover-lock { color:var(--primary-light); background:var(--primary-dim); border-color:var(--ux-line); }
body.ux-r311 #profileContextPopover .workspace-popover-add { color:var(--primary-light); background:transparent; border-color:var(--ux-line); padding:12px 9px 8px; line-height:1.4; }
body.ux-r311 #profileContextPopover .workspace-popover-add > span:first-child { color:var(--primary-light); background:var(--primary-dim); }
body.ux-r311 #profileContextPopover .workspace-add-copy { display:grid; place-items:start; gap:3px; width:auto; height:auto; background:none!important; border-radius:0; font-size:13px; }
.workspace-add-copy small { font-weight:400; font-size:11px; color:var(--ux-muted); }
body.ux-r311 #profileContextPopover button:focus-visible { outline:2px solid var(--primary-light); outline-offset:2px; }
body.ux-r311 #profileContextPopover button:disabled { opacity:.55; cursor:wait; }
@media (hover:hover) {
  body.ux-r311 #profileContextPopover .workspace-popover-item:hover,
  body.ux-r311 #profileContextPopover .workspace-popover-add:hover { background:var(--primary-dim); }
}
@media (min-width:901px) { body.ux-r311 .app-menu-toggle { display:none!important; } }
@media (max-width:380px) {
  body.ux-r311 #appScreen > .app-header { gap:8px!important; }
  body.ux-r311 .profile-mini { gap:8px!important; }
  body.ux-r311 .profile-mini h2 { font-size:16px!important; }
  body.ux-r311 .header-actions { gap:3px!important; }
  body.ux-r311 .header-actions .icon-btn { width:40px!important; min-width:40px; padding:8px!important; }
}
@media (prefers-reduced-motion:reduce) {
  body.ux-r311 #profileContextPopover { animation:none; }
  body.ux-r311 .profile-context-trigger .avatar-menu-indicator,
  body.ux-r311 #profileContextPopover button { transition:none!important; }
}

/* One account entry on desktop; mobile keeps its approved structure. */
.sidebar-brand .brand-logo{display:block;width:38px;height:38px;flex:none;border-radius:10px}
@media(min-width:901px){
 body.ux-r311 #sidebarUser{display:none!important}
 body.ux-r311 #appScreen > .app-header{padding-block:18px;min-height:88px}
 body.ux-r311 .profile-mini{gap:14px}
 body.ux-r311 #topName{font-size:20px;line-height:1.35}
 body.ux-r311 .profile-workspace-label{font-size:12px;margin-top:3px}
 body.ux-r311 .header-actions{gap:10px}
}
