/* Owned section menus, shared by the Hub's React and static applications.
   Menus live above scroll containers but remain inside their own viewport. */
html:root .hub-section-picker { position:relative; width:100%; min-width:0; }
html:root .hub-section-picker>.hub-section-trigger {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  gap:16px!important; width:100%!important; min-width:0!important; height:44px!important;
  min-height:44px!important; padding:5px 12px!important; margin:0!important;
  border:1px solid var(--hub-theme-line,#cbd5c5)!important; border-radius:9px!important;
  background:var(--hub-theme-panel,#fffefb)!important; color:var(--hub-theme-ink,#111a19)!important;
  box-shadow:0 1px 3px #111a1908; text-align:left!important; cursor:pointer; font-family:inherit;
}
html:root .hub-section-copy { display:grid!important; flex:1; gap:1px!important; min-width:0; text-align:left!important; }
html:root .hub-section-copy small { display:block!important; color:var(--hub-theme-muted,#5c6b60)!important; font:600 10px/13px Inter,Arial,sans-serif!important; letter-spacing:.03em; text-transform:none; }
html:root .hub-section-copy strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit!important; font:650 13px/17px Inter,Arial,sans-serif!important; letter-spacing:0; }
html:root .hub-section-trigger>svg { flex:none; width:16px; height:16px; color:var(--hub-theme-muted,#5c6b60); }
html:root .hub-section-trigger::after, html:root .hub-section-trigger::before { content:none!important; }
html:root .hub-section-trigger[aria-expanded="true"] { border-color:#809076!important; }
html:root .hub-section-trigger[aria-expanded="true"]>svg { transform:rotate(180deg); }
html:root .hub-section-panel {
  position:fixed; z-index:11000; box-sizing:border-box; width:min(300px,calc(100vw - 16px));
  max-height:min(360px,calc(100dvh - 80px)); overflow-y:auto; overscroll-behavior:contain;
  padding:5px; margin:0; border:1px solid var(--hub-theme-line,#cbd5c5); border-radius:11px;
  background:var(--hub-theme-panel,#fffefb); color:var(--hub-theme-ink,#111a19);
  box-shadow:0 12px 32px #0003; font-family:Inter,Arial,sans-serif;
}
html:root .hub-section-panel[hidden] { display:none!important; }
html:root .hub-section-panel .hub-section-option {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  gap:12px!important; width:100%!important; min-width:0!important; min-height:42px!important;
  height:auto!important; margin:0!important; padding:10px!important; border:1px solid transparent!important;
  border-radius:6px!important; background:transparent!important; color:var(--hub-theme-ink,#111a19)!important;
  font:550 13px/20px Inter,Arial,sans-serif!important; text-align:left!important; cursor:pointer;
}
html:root .hub-section-option>span { min-width:0; overflow-wrap:anywhere; }
html:root .hub-section-option>svg { flex:none; width:16px; height:16px; visibility:hidden; }
html:root .hub-section-option[aria-checked="true"]>svg { visibility:visible; }
html:root .hub-section-panel .hub-section-option[aria-checked="true"] { background:var(--hub-theme-raised,#eef1e9)!important; color:var(--hub-theme-accent,#284239)!important; }
html:root .hub-section-panel .hub-section-option:is(:hover,:focus-visible) { background:var(--hub-theme-raised,#eef1e9)!important; border-color:#809076!important; outline:none!important; }
html:root .hub-section-panel .hub-section-search { position:sticky; top:0; display:block; box-sizing:border-box; width:100%; min-width:0; height:40px; margin:0 0 5px; padding:0 10px; border:1px solid var(--hub-theme-line,#cbd5c5); border-radius:6px; background:var(--hub-theme-panel,#fffefb); color:var(--hub-theme-ink,#111a19); font:400 14px/20px Inter,Arial,sans-serif; }
html:root .hub-section-panel .hub-section-option strong { display:block; color:inherit!important; font:650 12px/18px Inter,Arial,sans-serif; overflow-wrap:anywhere; }
html:root .hub-section-panel .hub-section-option small { display:block; color:var(--hub-theme-muted,#5c6b60)!important; font:400 11px/17px Inter,Arial,sans-serif; overflow-wrap:anywhere; }
html:root .hub-section-empty { padding:18px 10px; color:var(--hub-theme-muted,#5c6b60); font:400 13px/20px Inter,Arial,sans-serif; }
html:root .mobile-app-section-select { display:none; }
.ws-app-workspace.is-hub-embedded .mobile-app-section-select,
html:root[data-surface="hub"] .mobile-app-section-select {
  display:block!important; position:relative; z-index:2; box-sizing:border-box;
  width:min(280px,100%); min-width:0; height:44px; min-height:44px;
  margin:0; padding:0; border:0; background:transparent;
}
.ws-app-workspace.is-hub-embedded :is(.finance-sidebar,.documents-sidebar) { z-index:2!important; overflow:visible!important; }
.ws-app-workspace.is-hub-embedded :is(.finance-sidebar>nav,.documents-sidebar>nav,.onboarding-top-nav,.clients-top-nav,.io-embedded-nav,.ms-top-nav) { display:none!important; }
.ws-app-workspace.is-hub-embedded :is(.onboarding-shell,.clients-workspace,.io-workspace,.ms-workspace)>.mobile-app-section-select { margin:7px 14px; width:min(280px,calc(100% - 28px)); }
.ws-app-workspace.is-hub-embedded .onboarding-shell { display:grid!important; grid-template-columns:minmax(0,1fr)!important; grid-template-rows:58px minmax(0,1fr); height:100%; min-height:0; overflow:hidden; }
.ws-app-workspace.is-hub-embedded .onboarding-main { min-height:0; overflow:auto; }
.ws-app-workspace.is-hub-embedded .god-section-nav { display:flex; padding:7px 0; margin:0 0 12px; border:0; background:transparent!important; }
/* Static-app source buttons stay in place: their original handlers retain
   permissions, unsaved-edit protection and routing. Only presentation changes. */
html:root[data-surface="hub"] .sidebar.section-nav-enhanced { overflow:visible!important; }
html:root[data-surface="hub"] .sidebar.section-nav-enhanced>:not(.hub-section-bar):not(.saved-filter) { display:none!important; }
html:root[data-surface="hub"] .sidebar.section-nav-enhanced .hub-section-bar { display:flex; width:min(280px,100%); min-width:0; align-items:center; gap:8px; }
html:root[data-surface="hub"] .sidebar.section-nav-enhanced .hub-section-bar.is-bidding { position:relative; width:min(572px,100%); }
html:root[data-surface="hub"] .sidebar.section-nav-enhanced .saved-filter { display:block!important; }
html:root[data-surface="hub"] .sidebar.section-nav-enhanced .saved-filter>summary { display:flex!important; align-items:center!important; justify-content:space-between!important; height:44px!important; min-height:44px!important; }
html:root .hub-section-bar .hub-section-new-bid { display:inline-flex; align-items:center; justify-content:center; flex:none; gap:7px; min-width:100px; height:44px; margin:0; padding:0 14px; border:1px solid #284239; border-radius:9px; background:#284239; color:#fffefb; font:750 13px/18px Inter,Arial,sans-serif; white-space:nowrap; cursor:pointer; }
html:root[data-surface="hub"] .tk-app>.sidebar>.tk-mobile-nav { display:block!important; width:min(280px,100%)!important; }
html:root[data-surface="hub"] .tk-app>.sidebar>nav { display:none!important; }
.tk-mobile-nav .mobile-app-section-select { display:block!important; }
@media (max-width:700px) and (hover:none) and (pointer:coarse) {
  html:root .mobile-app-section-select { display:block; box-sizing:border-box; height:58px; min-height:58px; width:100%; padding:7px 10px; background:var(--hub-theme-raised,#eef1e9); }
  html:root :is(.finance-sidebar,.documents-sidebar,.tk-mobile-nav)>.mobile-app-section-select { height:44px; min-height:44px; padding:0; }
}
/* An embedded toolbar also needs to fit a narrow desktop app pane. */
@media (max-width:700px) {
  html:root .hub-section-panel .hub-section-search { font-size:16px; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced { padding:7px 9px!important; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced .hub-section-bar { flex:1; width:auto; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced .hub-section-bar.is-bidding { width:100%; }
  html:root .hub-section-new-bid { min-width:90px; padding:0 9px; gap:4px; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced .saved-filter { position:static; width:68px!important; flex:0 0 68px!important; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced .saved-filter>summary { font:650 12px/18px Inter,Arial,sans-serif!important; padding:0 8px!important; height:44px!important; min-height:44px!important; }
  html:root[data-surface="hub"] .sidebar.section-nav-enhanced .saved-filter-menu { right:auto!important; left:0!important; width:min(320px,100%)!important; max-height:calc(100dvh - 76px); overflow-y:auto; }
}
@media (max-width:340px) {
  html:root .hub-section-bar .hub-section-new-bid { min-width:40px; width:40px; padding:0; font-size:0; gap:0; }
  html:root .hub-section-new-bid>span { font-size:20px; }
}
@media print { .mobile-app-section-select,.hub-section-panel,.hub-section-bar { display:none!important; } }
