/* GVF primary navigation. Keep independent of legacy page styles. */
.topbar.app-header {
  height: auto; min-height: 72px; gap: 24px; padding: 12px max(24px, calc((100% - 1280px) / 2));
  flex-wrap: wrap; z-index: 1000;
}
.app-brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ink); text-decoration: none; font-weight: 750; white-space: nowrap; }
.app-brand img { width: 42px; height: 42px; object-fit: contain; }
.app-navigation { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 20px; min-width: 0; }
.app-primary-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.app-nav-link, .app-nav-group > summary, .app-nav-action, .app-menu-toggle {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 11px;
  border: 0; border-radius: 8px; background: transparent; color: #40564b;
  font: inherit; font-size: .9375rem; font-weight: 650; line-height: 1.4; text-decoration: none; cursor: pointer; text-align: left;
}
.app-primary-nav > .app-nav-link, .app-nav-group > summary { white-space: nowrap; }
.app-nav-link:hover, .app-nav-action:hover, .app-nav-group > summary:hover { background: #f0f5f2; color: var(--green-dark); }
.app-nav-link.is-current, .app-nav-group.is-current > summary { background: #e4f0e9; color: var(--green-dark); }
.app-header :is(a, button, summary):focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.app-nav-group { position: relative; flex: 0 0 auto; }
.app-nav-group > summary { list-style: none; }
.app-nav-group > summary::-webkit-details-marker { display: none; }
.app-nav-group > summary::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 4px; flex: 0 0 auto; }
.app-nav-group[open] > summary { background: #edf3ef; color: var(--green-dark); }
.app-nav-group[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.app-nav-dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px; max-width: calc(100vw - 32px); padding: 7px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 45, 33, .16); }
.app-nav-dropdown .app-nav-link, .app-nav-action { width: 100%; white-space: normal; overflow-wrap: anywhere; }
.app-account { margin-left: auto; padding-left: 16px; border-left: 1px solid var(--line); }
.app-account-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-signout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.app-nav-action[hidden], .app-menu-toggle[hidden] { display: none; }
.app-menu-toggle { display: none; border: 1px solid var(--line); background: #edf3ef; color: var(--green-dark); }
@media (max-width: 76rem) {
  .topbar.app-header { gap: 0 16px; padding: 10px 16px; }
  .app-menu-toggle:not([hidden]) { display: flex; margin-left: auto; }
  .app-navigation { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
  .app-primary-nav { flex-direction: column; align-items: stretch; gap: 3px; }
  .app-nav-group > summary { justify-content: space-between; }
  .app-nav-dropdown { position: static; min-width: 0; max-width: none; margin: 4px 0 6px 12px; padding: 2px 0 2px 8px; border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; }
  .app-account { margin: 0; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .app-account-name { max-width: none; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  .app-header[data-nav-ready] .app-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 16px 20px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(20, 45, 33, .12); }
  .app-header[data-nav-ready][data-menu-open] .app-navigation { display: flex; }
}
@media (prefers-reduced-motion: no-preference) {
  .app-nav-link, .app-nav-action, .app-nav-group > summary { transition: background-color .12s ease; }
}
