/* Shared shell only: independent navigation/workspace scrolling. Child views keep their own styles. */
html:has(body.shell-scroll), body.shell-scroll { height:100%; overflow:hidden; }
body.shell-scroll .app { height:100dvh; min-height:0; width:100%; overflow:hidden; grid-template-rows:auto minmax(0,1fr); }
body.shell-scroll .topbar { position:relative; z-index:60; }
body.shell-scroll .profile-chip { width:auto; min-width:76px; padding-inline:14px; border-radius:999px; white-space:nowrap; }
body.shell-scroll .workspace { height:100%; min-height:0; overflow:hidden; align-items:stretch; padding-bottom:16px; grid-template-columns:var(--lnb-width) minmax(0,1fr); }
body.shell-scroll .lnb { height:100%; min-height:0; display:grid; }
body.shell-scroll .lnb-rail { min-height:0; height:100%; }
body.shell-scroll .lnb-panel { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
body.shell-scroll .workspace-pages { min-height:0; height:100%; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; padding-bottom:180px; }
body.shell-scroll .workspace-frame { min-width:560px; }
body.shell-scroll .app-connections-rail { margin-top:auto; flex-shrink:0; gap:3px; }
.app-connections-rail small { font-size:9px; color:#7c8981; font-weight:500; }
body.connections-active #floating-chat, body.connections-active #floating-result-heading, body.connections-active #msg-floating-chat, body.connections-active #msg-floating-result-heading { display:none!important; }
body.connections-active .workspace-pages { padding-bottom:0; }
body.connections-active .lnb-balance, body.connections-active .lnb-primary-actions { display:none; }
body.connections-active .workspace-frame[data-workspace="connections"] { height:100%!important; min-height:0; min-width:0; }
body.shell-scroll.floating-split .workspace, body.shell-scroll.msg-floating-split .workspace { min-height:0; }
body.shell-scroll.floating-split .workspace-pages, body.shell-scroll.msg-floating-split .workspace-pages { height:auto; padding-bottom:24px; }
@media(max-width:980px) {
 body.shell-scroll .workspace { --lnb-width:92px; padding-right:12px; gap:12px; }
 body.shell-scroll .lnb { grid-template-columns:92px 0; }
 body.shell-scroll .lnb-panel { visibility:hidden; padding:0; }
 body.shell-scroll .header-platform-name { font-size:clamp(16px,3vw,26px); }
 body.shell-scroll .topbar { padding-inline:16px; }
 body.shell-scroll .utility-actions .utility-button, body.shell-scroll .utility-divider { display:none; }
}

/* Server shell retains its CDP/MA layout; messaging uses its existing independent scroll area. */
body.shell-scroll .workspace > .lnb {position:relative;top:auto;height:100%;}
.profile-chip {width:auto;min-width:76px;padding-inline:14px;border-radius:999px;white-space:nowrap;}
.app-connections-rail {margin-top:auto;flex-shrink:0;gap:3px;}

/* Only the messaging workspace replaces the shared MA entry actions. */
.messaging-primary-actions {display:none;}
body.message-chat-active .lnb-primary-actions:not(.messaging-primary-actions) {display:none;}
body.message-chat-active .messaging-primary-actions {display:grid;}
.messaging-primary-actions .lnb-action-button {width:100%;border:0;font:inherit;text-align:left;cursor:pointer;}
