/* Shared application shell. Broadcast overlays have their own document and palette. */
html[data-cmae-shell]{
 color-scheme:dark;
 --bs-body-bg:#182127;
 --bs-body-bg-rgb:24,33,39;
 --bs-body-color:#edf2f5;
 --bs-body-color-rgb:237,242,245;
 --bs-secondary-bg:#202a31;
 --bs-secondary-bg-rgb:32,42,49;
 --bs-tertiary-bg:#131b20;
 --bs-tertiary-bg-rgb:19,27,32;
 --bs-border-color:#455761;
 --bs-secondary-color:#b8c5cd;
 background:var(--bs-tertiary-bg);
}
html[data-cmae-shell] body{background-color:var(--bs-tertiary-bg);color:var(--bs-body-color)}
html[data-cmae-shell] .app-wrapper{min-height:100vh;min-height:100dvh;background:var(--bs-tertiary-bg)}
html[data-cmae-shell] .app-main{min-width:0;background-color:var(--bs-tertiary-bg)}
html[data-cmae-shell] .app-header,html[data-cmae-shell] .app-footer{background-color:var(--bs-secondary-bg);color:var(--bs-body-color);border-color:var(--bs-border-color)}
html[data-cmae-shell] .app-main .card{--bs-card-bg:#202a31;--bs-card-color:#edf2f5;--bs-card-border-color:#455761;--bs-card-cap-bg:#172127;--bs-card-cap-color:#edf2f5}
html[data-cmae-shell] .app-main .card.bg-white,html[data-cmae-shell] .app-main .card-body.bg-white,html[data-cmae-shell] .app-main .card-header.bg-light{background-color:var(--bs-secondary-bg)!important;color:var(--bs-body-color)!important}
html[data-cmae-shell] tr.clickable-row:hover{background-color:#35434a}

/* One native scroll container: brand stays visible, all expanded links remain reachable. */
html[data-cmae-shell] body.layout-fixed .app-sidebar{
 display:flex;flex-direction:column;align-self:start;
 height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;
 min-height:0;overflow:hidden;
}
html[data-cmae-shell] body.layout-fixed .app-sidebar>.sidebar-brand{flex:0 0 auto}
html[data-cmae-shell] body.layout-fixed .app-sidebar>.sidebar-wrapper{
 flex:1 1 0;min-height:0;height:auto!important;max-height:100%;
 overflow-x:hidden!important;overflow-y:auto!important;
 overscroll-behavior-y:contain;touch-action:pan-y;
 scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#71838f #202a31;
 padding-bottom:max(1rem,env(safe-area-inset-bottom));
}
html[data-cmae-shell] .sidebar-wrapper::-webkit-scrollbar-thumb{background-color:#71838f;border-radius:4px}
html[data-cmae-shell] .sidebar-wrapper .sidebar-menu{flex-wrap:nowrap}
