/* Sidebar pages keep independent scrolling for navigation and content. */
body.app-shell { display: flex; width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.app-shell > .sidebar { position: relative; top: auto; left: auto; flex: 0 0 220px; width: 220px; height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; z-index: 200; }
body.app-shell > .sidebar > .brand, body.app-shell > .sidebar > .user-section { flex-shrink: 0; }
body.app-shell > .sidebar > .nav { flex: 1 0 auto; }
body.app-shell > .main { flex: 1 1 0; min-width: 0; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scroll-padding-top: 24px; -webkit-overflow-scrolling: touch; }
body.app-shell > .sidebar-overlay { display: none; }
@media (max-width: 768px) {
    body.app-shell > .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(220px, calc(100vw - 48px)); height: 100vh; height: 100dvh; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s; }
    body.app-shell > .sidebar.open { visibility: visible; transform: translateX(0); }
    body.app-shell > .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 150; }
}
@media (prefers-reduced-motion: reduce) { body.app-shell > .sidebar { transition: none; } }