/* Shared final layout contract. Palette remains owned by the existing theme tokens. */
html { min-height:100%; }
body.app-page { min-height:100dvh; width:100%; overflow-x:clip; }
body.app-page .main-content { min-width:0; min-height:100dvh; box-sizing:border-box; }
body.app-page .main-content > .container-fluid {height:100%; max-width:none!important; width:100%!important; min-width:0; box-sizing:border-box; }
/* The development chat is a one-screen app: its height must stay the viewport's, or the message list
   grows the page and the composer ends up below every message ever sent. (agent-platform shares the
   class but is an ordinary scrolling page.) */
body.project-agent-page .main-content > .agent-page-main { height:calc(100dvh - 72px); min-height:min(520px,calc(100dvh - 72px)); }
body.app-page.sidebar-collapsed .main-content { margin-inline:0!important; width:100%!important; max-width:none!important; }
.command-kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.agent-panel, .workspace-pane, .workspace-body { min-width:0; min-height:0; }
.ai-rich-response pre, .ai-table-wrap { max-width:100%; overflow:auto; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid var(--app-primary,#6366f1); outline-offset:3px; }
@media(max-width:991.98px) {
 body.app-page .main-content { margin-inline:0!important; width:100%!important; }
 .workspace-drawer { max-width:100vw!important; }
 .command-header-actions { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
 *, *::before, *::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; }
}
