/**
 * Signed-in investor header — single full-width command bar (all viewports)
 */

:root {
  --ir-shell-h: 56px;
  --ir-shell-bg: #070708;
  --ir-shell-line: rgba(240, 240, 250, 0.1);
  --ir-shell-accent: rgba(126, 176, 255, 0.85);
}

body.investor-shell-header-active {
  --nav-h: var(--ir-shell-h);
  --ticker-h: 0px;
  --site-header-h: calc(var(--ir-shell-h) + env(safe-area-inset-top, 0px));
}

body.investor-shell-header-active #vortex-ticker-bar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.investor-shell-header-active #root nav.fixed {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#teravex-investor-shell-header.ir-investor-shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1000005;
  pointer-events: auto;
  box-sizing: border-box;
  min-height: calc(var(--ir-shell-h) + env(safe-area-inset-top, 0px));
  height: calc(var(--ir-shell-h) + env(safe-area-inset-top, 0px));
  padding:
    env(safe-area-inset-top, 0px)
    max(1.15rem, env(safe-area-inset-right, 0px))
    0
    max(1.15rem, env(safe-area-inset-left, 0px));
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%),
    var(--ir-shell-bg);
  border-bottom: 1px solid var(--ir-shell-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

#teravex-investor-shell-header .ir-shell-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

#teravex-investor-shell-header .ir-shell-status {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 240, 250, 0.92);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 176, 255, 0.35);
  background: rgba(126, 176, 255, 0.08);
}

#teravex-investor-shell-header .vortex-nav-brand {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(46vw, 360px);
  gap: 0.55rem !important;
}

#teravex-investor-shell-header .teravex-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

#teravex-investor-shell-header .vortex-nav-title {
  font-size: 0.72rem !important;
  letter-spacing: 0.1em !important;
  color: rgba(240, 240, 250, 0.88) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#teravex-investor-shell-header .ir-shell-division {
  width: 1px;
  height: 1.25rem;
  background: rgba(240, 240, 250, 0.14);
  flex-shrink: 0;
}

#teravex-investor-shell-header .ir-shell-context {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 240, 250, 0.42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#teravex-investor-shell-header .ir-header-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.2rem;
  margin-left: auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
  order: 2;
}

#teravex-investor-shell-header .ir-shell-left {
  order: 1;
}

#teravex-investor-shell-header .ir-shell-header-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 0.2rem;
}

.inv-signout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.inv-signout-icon .ir-header-icon-svg--logout,
.inv-signout-icon .ir-header-icon-svg {
  width: 22px;
  height: 22px;
}

.inv-signout-text {
  line-height: 1.2;
}

#teravex-investor-shell-header .ir-icon-btn,
#teravex-investor-shell-header .ir-logout-header-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  min-width: max(44px, var(--ir-header-icon-size, 24px));
  min-height: max(44px, var(--ir-header-icon-size, 24px));
  height: max(44px, var(--ir-header-icon-size, 24px));
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ir-header-icon-color, #8a8a8a);
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#teravex-investor-shell-header .ir-icon-btn svg,
#teravex-investor-shell-header .ir-icon-btn img,
#teravex-investor-shell-header .ir-logout-header-btn svg,
#teravex-investor-shell-header .ir-header-icon-img {
  pointer-events: none;
}

#teravex-investor-shell-header .ir-static-menu-btn,
#teravex-investor-shell-header .ir-react-menu-btn,
.support-header .ir-static-menu-btn,
.support-header .ir-react-menu-btn {
  flex-shrink: 0;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

html:not(.access-granted) #teravex-investor-shell-header,
html:has(#access-gate:not([hidden])) #teravex-investor-shell-header {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ir-header-actions .ir-static-menu-btn {
  order: 99;
}

#teravex-investor-shell-header .ir-burger span {
  background: rgba(240, 240, 250, 0.88);
}

body.investor-shell-header-active .ir-header.ir-investor-shell-header {
  top: 0 !important;
}

@media (max-width: 768px) {
  :root {
    --ir-shell-h: 52px;
  }

  #teravex-investor-shell-header .ir-shell-context,
  #teravex-investor-shell-header .ir-shell-division {
    display: none;
  }

  #teravex-investor-shell-header .vortex-nav-title {
    display: none;
  }

  #teravex-investor-shell-header .vortex-nav-brand {
    max-width: 42vw;
  }

  #teravex-investor-shell-header .ir-shell-header-actions {
    gap: 0.2rem;
  }
}

@media (min-width: 1024px) {
  #teravex-investor-shell-header {
    padding-left: max(1.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.75rem, env(safe-area-inset-right, 0px));
  }

  #teravex-investor-shell-header .vortex-nav-brand {
    max-width: min(520px, 38vw);
  }
}
