/* Two levels of navigation: main areas in the header, pages below. */
.window {display:flex; flex-direction:column;}
.site-header {height:68px; flex:0 0 68px; display:flex; align-items:center; gap:28px; padding:0 28px; border-bottom:1px solid #e8e9ed; background:#fff; z-index:40;}
.site-header .brand {padding:0; gap:9px;}
.site-header .brand-mark {width:30px; height:30px; font-size:26px;}
.site-header .brand-word {font-size:24px; letter-spacing:-.8px;}
.site-header .brand-caption {display:none;}
.top-nav {display:flex; gap:4px; align-items:center; min-width:0;}
.top-nav-item {min-height:40px; padding:10px 15px; border-radius:7px; font-size:14px; font-weight:600; white-space:nowrap; color:#24262d;}
.top-nav-item:hover, .top-nav-item.expanded {background:#f0f0f4;}
.top-nav-item.current {background:#eceef3;}
.header-tools {display:flex; align-items:center; gap:12px; margin-left:auto; min-width:0;}
.header-tools .profile-button {min-height:36px; padding:5px 9px; border-radius:6px; background:#f3f4f6; gap:7px;}
.header-tools .profile-copy strong {font-size:12px; max-width:140px; overflow:hidden; text-overflow:ellipsis;}
.header-tools .avatar {height:24px; width:24px; border-radius:4px;}
.header-tools .profile-arrow .icon {height:15px; width:15px;}
.header-tools .connection {padding:0; gap:6px;}
.header-tools .connection span:last-child {display:none;}
.main-pane.glass {flex:1; height:auto; max-height:none;}
.section-bar {display:flex; align-items:center; flex:0 0 auto; min-width:0; min-height:62px; gap:24px; padding:10px 28px; background:#fff; border-bottom:1px solid #e8e9ed;}
.current-group {font-size:13px; font-weight:600; color:#6b7280; padding-right:24px; border-right:1px solid #e0e3e9; white-space:nowrap;}
.section-nav {display:flex; align-items:center; gap:22px; min-width:0; overflow:auto; scrollbar-width:thin;}
.section-nav .navigation-link {white-space:nowrap; padding:12px 0; border-radius:0; border-bottom:2px solid transparent; font-size:13px;}
.section-nav .navigation-link:hover {background:none; color:#1d4ed8;}
.section-nav .navigation-link.active {background:none; color:#1d4ed8; border-bottom-color:#2563eb; font-weight:600;}
.section-bar .search {margin-left:auto; flex:0 0 220px; width:220px; height:34px; background:#f8f9fb; border:1px solid #e5e7eb;}
.section-bar .search input {min-width:0; width:100%;}
.section-bar .search kbd {background:none;}
.navigation-panel {position:fixed; top:67px; left:128px; width:min(1000px,calc(100% - 156px)); max-height:calc(100dvh - 86px); overflow:auto; padding:24px 28px 32px; background:#fff; border:1px solid #eceef2; border-radius:0 0 16px 16px; z-index:50; box-shadow:0 18px 40px #17203915 !important; overscroll-behavior:contain;}
.navigation-panel-heading {display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px;}
.navigation-panel-heading>strong {font-size:14px; color:#6b7280; font-weight:500;}
.navigation-panel-heading .icon-button {width:30px; height:30px;}
.navigation-columns {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px;}
.navigation-column {min-width:0;}
.navigation-column h3 {font-size:13px; font-weight:600; margin-bottom:13px; color:#24262d; padding:0 10px;}
.navigation-link {display:block; padding:10px; color:#30333b; font-size:14px; line-height:1.4; border-radius:6px; overflow-wrap:anywhere;}
.navigation-link:hover {background:#f5f6f8;}
.navigation-link.active {background:#eff4ff; color:#1d4ed8;}
.navigation-action {display:flex; align-items:center; text-align:left; gap:7px; padding:10px; min-height:40px; width:100%; border-radius:6px; color:#2563eb; font-size:13px;}
.navigation-action .icon {width:16px; height:16px;}
.navigation-scrim {position:fixed; inset:68px 0 0; z-index:35; background:#18213b0b; cursor:default;}
.navigation-scrim:hover {background:#18213b0b;}
.menu-toggle {display:none;}
.content, #finance-content {padding:28px;}
.catalog-view .workspace-grid {grid-template-columns:minmax(0,1fr);}
.catalog-view .context-panels {display:none;}
.catalog-view .filter-bar {flex-direction:row; align-items:center; justify-content:flex-end;}
.catalog-view .filter-row {width:auto;}
@media(min-width:768px) and (max-width:1199px) {
  .site-header {gap:20px; padding:0 20px;}
  .top-nav-item {padding:10px 12px; font-size:13px;}
  .header-tools {gap:8px;}
  .header-tools .profile-copy {display:none;}
  .header-tools .connection {display:none;}
  .section-bar {padding:9px 20px; gap:16px; flex-wrap:wrap;}
  .current-group {padding-right:16px;}
  .section-nav {flex:1; gap:18px;}
  .section-bar .search {flex-basis:190px; width:190px;}
  .content, #finance-content {padding:24px 20px;}
  .navigation-panel {left:116px; width:calc(100% - 136px);}
}
@media(max-width:900px) and (min-width:768px) {
  .section-bar .current-group {display:none;}
  .section-bar .search {flex-basis:170px; width:170px;}
  .section-nav {gap:15px;}
}
@media(max-width:767px) {
  .window, .window.sidebar-compact {display:flex;}
  .site-header {height:60px; flex-basis:60px; gap:12px; padding:0 16px;}
  .site-header .brand-word {font-size:23px;}
  .site-header .brand-mark {width:28px; height:28px; font-size:24px;}
  .top-nav {display:none;}
  .menu-toggle {display:inline-grid; width:36px; height:36px; margin-left:-5px;}
  .header-tools .connection, .header-tools .profile-copy, .header-tools .profile-arrow {display:none;}
  .header-tools .profile-button {padding:6px;}
  .section-bar {min-height:0; padding:0 16px 12px; gap:0; flex-wrap:wrap; align-content:flex-start;}
  .current-group {display:block; border:0; padding:12px 0 0; width:100%; font-size:12px; color:#64748b;}
  .section-nav {flex:0 0 100%; width:100%; gap:20px; margin-bottom:10px; scrollbar-width:none;}
  .section-nav .navigation-link {padding:12px 0 10px; font-size:13px; min-height:42px;}
  .section-bar .search {margin:0; flex:0 0 100%; width:100%; height:38px;}
  .section-bar .search input {font-size:16px;}
  .section-bar .search kbd {display:none;}
  .navigation-panel {inset:60px 0 0; width:100%; height:calc(100dvh - 60px); max-height:none; border:0; border-radius:0; padding:18px 20px max(24px,env(safe-area-inset-bottom));}
  .navigation-panel-heading {margin-bottom:14px;}
  .navigation-panel-heading>strong {font-size:17px; font-weight:600; color:#1f2937;}
  .navigation-panel-heading .icon-button {width:40px; height:40px;}
  .navigation-scrim {inset:60px 0 0;}
  .mobile-navigation-group {border-bottom:1px solid #e5e7eb; padding:4px 0;}
  .mobile-navigation-group>summary {display:flex; align-items:center; justify-content:space-between; font-size:16px; font-weight:600; padding:15px 0; cursor:pointer; list-style:none;}
  .mobile-navigation-group>summary::-webkit-details-marker {display:none;}
  .mobile-navigation-group[open]>summary>.icon {transform:rotate(180deg);}
  .mobile-navigation-group .navigation-columns {grid-template-columns:minmax(0,1fr); gap:18px; padding:4px 0 20px;}
  .navigation-column h3 {color:#6b7280; font-size:12px; font-weight:500; margin-bottom:5px;}
  .navigation-link, .navigation-action {min-height:44px; padding:12px 10px;}
  .content, #finance-content {padding:22px 14px max(24px,env(safe-area-inset-bottom));}
  .catalog-view .filter-bar {align-items:stretch;}
  .catalog-view .filter-row {width:100%;}
}
