/* DevHub Console v10 — layout raiz corrigido; uma unica rolagem. */
html:has(body.console-page), body.console-page { height:100%; min-height:0; overflow:hidden !important; }
body.console-page .topbar { position:fixed; inset:0 0 auto 0; height:64px; z-index:40; }
body.console-page .app-shell { display:grid !important; grid-template-columns:238px minmax(0,1fr) !important; grid-template-rows:1fr !important; height:calc(100dvh - 64px) !important; min-height:0 !important; margin-top:64px !important; max-width:none !important; overflow:hidden !important; }
body.console-page .sidebar { position:static !important; height:100% !important; min-height:0 !important; overflow-y:auto !important; overflow-x:hidden !important; }
body.console-page .console-content { display:flex !important; flex-direction:column !important; width:100% !important; height:100% !important; min-height:0 !important; max-width:none !important; overflow:hidden !important; padding:10px 18px 8px !important; }
body.console-page .console-content > .welcome { flex:0 0 auto !important; }
body.console-page.chat-mode .console-content > .welcome { display:none !important; }
body.console-page .console-content > .view { flex:1 1 auto !important; width:100% !important; height:auto !important; min-height:0 !important; overflow:hidden !important; }
body.console-page.chat-mode #view-playground { display:flex !important; flex-direction:column !important; }
body.console-page #view-playground .chat-studio { display:grid !important; grid-template-columns:minmax(0,1fr) !important; grid-template-rows:1fr !important; width:100% !important; height:100% !important; min-height:0 !important; max-height:none !important; overflow:hidden !important; }
body.console-page #view-playground .chat-history { display:none !important; }
body.console-page #view-playground .chat-main { display:flex !important; flex-direction:column !important; height:100% !important; min-height:0 !important; overflow:hidden !important; }
body.console-page #view-playground .studio-toolbar { flex:0 0 auto !important; }
body.console-page #view-playground .studio-canvas { flex:1 1 auto !important; height:auto !important; min-height:0 !important; max-height:none !important; overflow-y:auto !important; overflow-x:hidden !important; }
body.console-page #view-playground .studio-composer { flex:0 0 auto !important; max-height:220px; overflow:auto; }
@media (max-width:700px) {
  body.console-page .app-shell { display:flex !important; flex-direction:column !important; grid-template-columns:none !important; height:calc(100dvh - 64px) !important; margin-top:64px !important; }
  body.console-page .sidebar { flex:0 0 48px !important; width:100% !important; height:48px !important; max-height:48px !important; overflow:hidden !important; padding:6px 9px !important; }
  body.console-page .sidebar nav { display:flex !important; flex-direction:row !important; width:100%; height:36px; overflow-x:auto !important; overflow-y:hidden !important; scrollbar-width:none; }
  body.console-page .sidebar nav::-webkit-scrollbar { display:none; }
  body.console-page .nav-link { flex:0 0 auto !important; min-height:34px !important; padding:7px 9px !important; font-size:10px !important; }
  body.console-page .console-content { flex:1 1 auto !important; height:auto !important; min-height:0 !important; padding:6px !important; }
  body.console-page.chat-mode .console-content { height:auto !important; }
  body.console-page #view-playground .chat-studio { height:100% !important; min-height:0 !important; border-radius:12px !important; }
  body.console-page #view-playground .studio-toolbar { flex-wrap:wrap; padding:8px 9px !important; }
  body.console-page #view-playground .studio-brand { flex:1 1 125px; min-width:0; }
  body.console-page #view-playground .studio-selects { flex:0 1 auto; max-width:55%; }
  body.console-page #newChatTop { order:3; width:100%; min-height:30px; justify-content:center; }
  body.console-page #view-playground .studio-canvas { padding:12px 9px 6px !important; }
  body.console-page #view-playground .studio-composer { max-height:190px; margin:5px !important; padding:9px !important; }
}
@media (max-width:420px) {
  body.console-page .topbar { height:56px; }
  body.console-page .app-shell { height:calc(100dvh - 56px) !important; margin-top:56px !important; }
}
