.bo-mobile-menu-toggle, .bo-mobile-menu-header, .bo-mobile-menu-section, .bo-mobile-menu-shade { display: none; }
.bo-mobile-menu-scroll, .bo-mobile-menu-group { display: contents; }
.bo-mobile-menu-group[hidden] { display: none; }

@media (max-width: 900px) {
  body { --bo-window-left: 0px; }
  body, .app-shell { height: 100dvh; }
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); }
  .app-frame, body.secondary-nav-collapsed .app-frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(100dvh - 56px); }
  .app-frame > .primary-nav { display: none; }
  .brandbar { height: 56px; min-width: 0; padding: 0 8px; gap: 8px; }
  .brandbar h1 { font-size: 22px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .brandbar-actions { gap: 6px; flex-shrink: 0; }
  .brandbar .status-pill { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brandbar .auth-logout-button { padding: 6px; min-height: 44px; }
  .bo-mobile-menu-toggle, .bo-mobile-menu-close {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
    width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 25px;
  }
  .bo-mobile-menu-toggle { color: #176e97; }
  body.auth-pending .bo-mobile-menu-toggle, body.auth-locked .bo-mobile-menu-toggle { display: none; }
  .app-frame > .secondary-nav, body.secondary-nav-collapsed .app-frame > .secondary-nav {
    position: fixed !important; inset: 0 auto 0 0; z-index: 19020 !important;
    display: flex; flex-direction: column; width: min(360px, 92vw); height: 100dvh;
    margin: 0; padding: 0; background: #f7f8f9; color: #24343d;
    overflow: hidden; visibility: hidden; pointer-events: none;
  }
  body.bo-mobile-menu-open .app-frame > .secondary-nav { visibility: visible; pointer-events: auto; }
  .bo-mobile-menu-open .bo-mobile-menu-shade { display: block; position: fixed; inset: 0; width: 100%; height: 100dvh; padding: 0; border: 0; background: #0007; z-index: 19010; }
  .bo-mobile-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; min-height: 64px; padding: 8px 12px 8px 20px; border-bottom: 1px solid #d5dde1; }
  .bo-mobile-menu-title { font-size: 16px; }
  .bo-mobile-menu-scroll { display: block; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 8px 10px max(20px, env(safe-area-inset-bottom)); scrollbar-gutter: stable; }
  .bo-mobile-menu-group { display: block; }
  .bo-mobile-menu-group[hidden] { display: none; }
  .bo-mobile-menu-section { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 3px; background: transparent; color: inherit; text-align: left; font: inherit; font-size: 15px; cursor: pointer; }
  .bo-mobile-menu-section:disabled { opacity: .5; cursor: default; }
  .bo-mobile-menu-section.active { color: #076e99; font-weight: 600; }
  .bo-mobile-menu-section .nav-icon { width: 22px; height: 22px; flex: 0 0 22px; }
  .bo-mobile-menu-caret { margin-left: auto; width: 8px; height: 8px; flex-shrink: 0; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
  .bo-mobile-menu-section[aria-expanded="true"] .bo-mobile-menu-caret { transform: rotate(225deg); }
  .bo-mobile-menu-group > .workspace-panel, body.secondary-nav-collapsed .bo-mobile-menu-group > .workspace-panel { display: block; padding: 0 0 6px 14px; }
  .bo-mobile-menu-group > .workspace-panel[hidden], body.secondary-nav-collapsed .bo-mobile-menu-group > .workspace-panel[hidden] { display: none; }
  .bo-mobile-menu-group .section-title, .secondary-nav .secondary-nav-pin, .secondary-nav .secondary-nav-tab { display: none !important; }
  .bo-mobile-menu-group .tree-section { margin: 0; padding: 0 0 4px; }
  .bo-mobile-menu-group .tree-heading { display: flex; margin: 0; padding: 0; min-height: 44px; gap: 4px; font-size: 13px; flex-wrap: wrap; }
  .bo-mobile-menu-group .tree-heading strong { flex: 1; min-width: 0; }
  .bo-mobile-menu-group .tree-action, .bo-mobile-menu-group .tree-caret { min-width: 44px; min-height: 44px; }
  .bo-mobile-menu-group .tree-caret { position: relative; width: 44px; height: 44px; border: 0; flex: 0 0 44px; }
  .bo-mobile-menu-group .tree-caret::before { content: ''; position: absolute; left: 18px; top: 19px; border: solid transparent; border-width: 6px 5px 0; border-top-color: currentColor; }
  .bo-mobile-menu-group .tree-link { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; border-left: 2px solid #d5dde1; }
  .bo-mobile-menu-group .tree-link[hidden], .bo-mobile-menu-group .tree-section[hidden] { display: none; }
  .bo-mobile-menu-group .tree-section:not(.open) .tree-link { display: none; }
  .bo-mobile-menu-group .tree-link.active { background: #dfedf4; border-left-color: #0a81b0; color: #086990; font-weight: 600; }
  .content { padding: 18px 12px; --content-x-padding: 12px; --content-y-padding: 18px; }
  .content-header h2 { font-size: 23px; }
  .panel-header { flex-wrap: wrap; gap: 10px; }
  .page-search { max-width: 100%; min-width: 0; }
}
@media (max-width: 600px) {
  .brandbar [data-theme-label] { display: none; }
  .brandbar h1 { font-size: 20px; }
}
