/* ITNAVERSE_HEADER_VISIBILITY_FIX_V1022 */

/*
 V1.0.22 is intentionally high-specificity and loaded after previous UI layers.
 It fixes authenticated page headers that became white/light while title text stayed white.
*/

html.iv22-auth body .iv22-header,
html.iv22-auth body header.iv22-header,
html.iv22-auth body .topbar.iv22-header,
html.iv22-auth body .app-header.iv22-header,
html.iv22-auth body .page-header.iv22-header,
html.iv22-auth body .shell-header.iv22-header,
html.iv22-auth body .shell-top.iv22-header,
html.iv22-auth body [class*="header"].iv22-header {
  position:relative!important;
  background:
    radial-gradient(circle at 92% -10%, rgba(85,103,255,.22), transparent 36%),
    radial-gradient(circle at 8% 0%, rgba(34,207,235,.12), transparent 32%),
    linear-gradient(145deg,#0c2b4d 0%,#0a2443 55%,#0a1d37 100%)!important;
  background-color:#0a2443!important;
  border:1px solid rgba(125,170,226,.20)!important;
  color:#f8fbff!important;
  box-shadow:
    0 12px 36px rgba(2,17,38,.28),
    inset 0 1px 0 rgba(255,255,255,.035)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}

html.iv22-auth body .iv22-header::before {
  content:""!important;
  position:absolute!important;
  inset:0!important;
  pointer-events:none!important;
  border-radius:inherit!important;
  background:linear-gradient(100deg,rgba(255,255,255,.025),transparent 42%,rgba(78,127,255,.06))!important;
}

/* All title/copy inside authenticated header */
html.iv22-auth body .iv22-header,
html.iv22-auth body .iv22-header h1,
html.iv22-auth body .iv22-header h2,
html.iv22-auth body .iv22-header h3,
html.iv22-auth body .iv22-header h4,
html.iv22-auth body .iv22-header strong,
html.iv22-auth body .iv22-header b,
html.iv22-auth body .iv22-header .title,
html.iv22-auth body .iv22-header [class*="title"],
html.iv22-auth body .iv22-header [class*="heading"] {
  color:#ffffff!important;
  opacity:1!important;
  text-shadow:0 1px 1px rgba(0,0,0,.10)!important;
}

html.iv22-auth body .iv22-header p,
html.iv22-auth body .iv22-header small,
html.iv22-auth body .iv22-header .subtitle,
html.iv22-auth body .iv22-header .muted {
  color:#aebfd4!important;
  opacity:1!important;
}

/* Header links/buttons */
html.iv22-auth body .iv22-header a,
html.iv22-auth body .iv22-header button {
  color:#f8fbff!important;
  opacity:1!important;
}

html.iv22-auth body .iv22-header a:not(.primary):not(.btn-primary),
html.iv22-auth body .iv22-header button:not(.primary):not(.btn-primary) {
  background:rgba(17,48,82,.72)!important;
  border-color:rgba(142,179,224,.16)!important;
}

/* Keep Admin/action CTA vivid */
html.iv22-auth body .iv22-header .primary,
html.iv22-auth body .iv22-header .btn-primary,
html.iv22-auth body .iv22-header a[href*="admin"] {
  background:linear-gradient(135deg,#4b86ff,#7659ff)!important;
  color:#fff!important;
  border-color:rgba(130,147,255,.40)!important;
}

/* Notification control */
html.iv22-auth body .iv22-header [class*="notif"],
html.iv22-auth body .iv22-header [class*="bell"] {
  color:#fff!important;
  background:rgba(17,48,82,.72)!important;
}

/* Keep logo visible if header contains an image */
html.iv22-auth body .iv22-header img {
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  mix-blend-mode:normal!important;
}

/* Compact mobile header */
@media(max-width:700px){
  html.iv22-auth body .iv22-header{
    min-height:92px!important;
    padding:14px 16px!important;
    border-radius:24px!important;
    gap:10px!important;
  }
  html.iv22-auth body .iv22-header h1,
  html.iv22-auth body .iv22-header h2,
  html.iv22-auth body .iv22-header h3,
  html.iv22-auth body .iv22-header .title,
  html.iv22-auth body .iv22-header [class*="title"]{
    font-size:clamp(20px,5.6vw,30px)!important;
    line-height:1.05!important;
    letter-spacing:-.035em!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  html.iv22-auth body .iv22-header a,
  html.iv22-auth body .iv22-header button{
    min-height:52px!important;
    min-width:52px!important;
    border-radius:16px!important;
  }
}

/* Very narrow iPhone */
@media(max-width:390px){
  html.iv22-auth body .iv22-header{
    padding:12px!important;
  }
  html.iv22-auth body .iv22-header h1,
  html.iv22-auth body .iv22-header h2,
  html.iv22-auth body .iv22-header h3,
  html.iv22-auth body .iv22-header .title,
  html.iv22-auth body .iv22-header [class*="title"]{
    font-size:21px!important;
  }
}

/* Explicitly defeat known legacy/light panel classes when used as top header */
html.iv22-auth body .iv22-header.legacy-light-panel,
html.iv22-auth body .iv22-header.iv21-launcher-surface,
html.iv22-auth body .iv22-header.card,
html.iv22-auth body .iv22-header.panel {
  background:
    radial-gradient(circle at 92% -10%, rgba(85,103,255,.22), transparent 36%),
    linear-gradient(145deg,#0c2b4d,#081e39)!important;
  color:#fff!important;
}
