.portal-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  border-bottom: 1px solid rgba(176, 203, 228, .15);
  background: rgba(7, 18, 31, .95);
  color: #edf5fb;
  backdrop-filter: blur(16px);
}
.portal-nav-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: min(100% - 2rem, 1320px);
  min-height: 72px;
  margin: 0 auto;
}
.portal-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .62rem;
  color: #f4f8fc;
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: -.035em;
  text-decoration: none;
}
.portal-brand img { border-radius: 11px; object-fit: contain; }
.portal-brand strong { color: #61e6c3; }
.portal-nav-panel {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: .2rem;
  min-width: 0;
}
.portal-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55rem .62rem;
  border-radius: 999px;
  color: #c1cfdd;
  font: 650 .86rem/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease;
}
.portal-nav-link:hover, .portal-nav-link:focus-visible { color: #78ebcd; background: rgba(97, 230, 195, .08); }
.portal-nav-tool { color: #81c2ff; }
.portal-nav-tool:hover, .portal-nav-tool:focus-visible { color: #b9dcff; background: rgba(115, 186, 255, .1); }
.portal-nav-cta { padding-inline: .9rem; color: #07121f; background: #61e6c3; font-weight: 780; }
.portal-nav-cta:hover, .portal-nav-cta:focus-visible { color: #07121f; background: #8bf0d5; }
.portal-nav-spacer { flex: 1 1 1rem; }
.portal-nav-divider { width: 1px; height: 24px; margin: 0 .25rem; background: rgba(176, 203, 228, .2); }
.portal-nav-user { padding: 0 .55rem; color: #b8c8d6; font-size: .82rem; white-space: nowrap; }
.portal-theme-toggle { min-width: 40px; min-height: 40px; margin: 0 .15rem; border: 1px solid rgba(176, 203, 228, .28); border-radius: 50%; color: #edf5fb; background: transparent; }
.portal-theme-toggle:hover { border-color: #61e6c3; }
.portal-nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; padding: 10px; border: 1px solid rgba(176, 203, 228, .25); border-radius: 12px; background: transparent; }
.portal-nav-toggle span { display: block; width: 100%; height: 2px; margin: 4px 0; border-radius: 2px; background: #eaf2f8; }

@media (max-width: 1120px) {
  .portal-nav-shell { flex-wrap: wrap; justify-content: space-between; gap: 0; min-height: 68px; }
  .portal-nav-toggle { display: block; }
  .portal-nav-panel { display: none; flex: 1 0 100%; align-items: stretch; justify-content: flex-start; flex-wrap: wrap; gap: .25rem; padding: .2rem 0 1rem; }
  .portal-header.is-open .portal-nav-panel { display: flex; }
  .portal-nav-spacer { display: none; }
  .portal-nav-link { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .portal-nav-shell { width: calc(100% - 1.1rem); min-height: 62px; }
  .portal-brand img { width: 35px; height: 35px; }
  .portal-nav-panel { display: none; flex-direction: column; align-items: stretch; }
  .portal-header.is-open .portal-nav-panel { display: flex; }
  .portal-nav-divider { width: 100%; height: 1px; margin: .25rem 0; }
  .portal-nav-link { width: 100%; min-height: 44px; padding-inline: .8rem; }
  .portal-nav-user { padding: .5rem .8rem; }
  .portal-theme-toggle { align-self: flex-start; margin: .3rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-nav-link { transition: none; }
}
