/*
  HK Universe v7.1.4 – Header Final Lock
  Loaded with cache-bust after all old header styles.
*/

html body .topbar.hk-header-final,
html body header.topbar.hk-header-final{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:auto!important;
  left:0!important;
  height:76px!important;
  min-height:76px!important;
  max-height:76px!important;
  z-index:5000!important;

  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:18px!important;

  box-sizing:border-box!important;
  padding:10px 18px!important;
  overflow:visible!important;

  background:rgba(4,8,22,.92)!important;
  backdrop-filter:blur(24px)!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
}

html body .topbar.hk-header-final *,
html body header.topbar.hk-header-final *{
  box-sizing:border-box;
}

html body .topbar.hk-header-final > *,
html body header.topbar.hk-header-final > *{
  grid-column:auto!important;
  grid-row:auto!important;
  justify-self:auto!important;
  align-self:center!important;
  float:none!important;
  min-width:0;
}

html body .topbar.hk-header-final .hk-header-brand,
html body .topbar.hk-header-final .brand{
  order:1!important;
  flex:0 0 245px!important;
  width:245px!important;
  max-width:245px!important;

  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  color:#fff!important;
  text-decoration:none!important;
  overflow:hidden!important;
  position:relative!important;
  z-index:2!important;
}

html body .topbar.hk-header-final .brand-core{
  flex:0 0 48px!important;
  width:48px!important;
  height:48px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:18px!important;
}

html body .topbar.hk-header-final .brand-text{
  display:grid!important;
  min-width:0!important;
  line-height:1.05!important;
}

html body .topbar.hk-header-final .brand-text strong,
html body .topbar.hk-header-final .brand-text small{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

html body .topbar.hk-header-final .hk-header-search,
html body .topbar.hk-header-final .search{
  order:2!important;
  flex:1 1 560px!important;
  min-width:240px!important;
  max-width:940px!important;

  display:flex!important;
  align-items:center!important;
  margin:0!important;
  position:relative!important;
  z-index:1!important;
}

html body .topbar.hk-header-final .hk-header-right{
  order:3!important;
  margin-left:auto!important;
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:720px!important;

  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:10px!important;

  position:relative!important;
  z-index:10!important;
  overflow:visible!important;
}

html body .topbar.hk-header-final .creator-top-link{
  order:1!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  color:#fff!important;
  margin:0!important;
}

html body .topbar.hk-header-final .system-time{
  order:2!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  margin:0!important;
}

html body .topbar.hk-header-final .hk-notification-bell{
  order:3!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  transform:none!important;
  z-index:12!important;
}

html body .topbar.hk-header-final .notify-button{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:17px!important;
  margin:0!important;
  line-height:1!important;
}

html body .topbar.hk-header-final .notify-button span{
  top:-8px!important;
  right:-8px!important;
}

html body .topbar.hk-header-final .hk-identity-chip{
  order:4!important;
  flex:0 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:390px!important;
  margin:0!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  z-index:11!important;
}

html body .topbar.hk-header-final .identity-info{
  min-width:0!important;
}

html body .topbar.hk-header-final .identity-info strong{
  max-width:145px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

html body .topbar.hk-header-final .identity-info small{
  max-width:150px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

html body .topbar.hk-header-final .identity-actions{
  flex:0 0 auto!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
}

html body .topbar.hk-header-final .identity-actions a{
  white-space:nowrap!important;
}

/* Notification panel remains viewport safe. */
html body .topbar.hk-header-final .notify-panel,
html body .notify-panel{
  position:fixed!important;
}

/* Kill legacy user zone side effects if cached markup appears. */
html body .topbar.hk-header-final .topbar-user-zone{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:10px!important;
  position:static!important;
  inset:auto!important;
  transform:none!important;
}

/* Medium desktop */
@media(max-width:1280px){
  html body .topbar.hk-header-final,
  html body header.topbar.hk-header-final{
    gap:12px!important;
    padding-inline:14px!important;
  }
  html body .topbar.hk-header-final .hk-header-brand,
  html body .topbar.hk-header-final .brand{
    flex-basis:230px!important;
    width:230px!important;
    max-width:230px!important;
  }
  html body .topbar.hk-header-final .hk-header-search,
  html body .topbar.hk-header-final .search{
    flex-basis:360px!important;
  }
  html body .topbar.hk-header-final .hk-identity-chip{
    max-width:340px!important;
  }
  html body .topbar.hk-header-final .identity-actions a{
    padding:7px 9px!important;
  }
}

/* Tablet */
@media(max-width:1080px){
  html body .topbar.hk-header-final .hk-header-search,
  html body .topbar.hk-header-final .search,
  html body .topbar.hk-header-final .system-time{
    display:none!important;
  }
  html body .topbar.hk-header-final .hk-header-brand,
  html body .topbar.hk-header-final .brand{
    flex:1 1 auto!important;
    width:auto!important;
    max-width:none!important;
  }
  html body .topbar.hk-header-final .hk-header-right{
    max-width:520px!important;
  }
}

/* Small tablet */
@media(max-width:860px){
  html body .topbar.hk-header-final .creator-top-link{
    display:none!important;
  }
  html body .topbar.hk-header-final .identity-actions a:not(.primary){
    display:none!important;
  }
  html body .topbar.hk-header-final .hk-identity-chip{
    max-width:230px!important;
  }
  html body .topbar.hk-header-final .identity-info strong{
    max-width:105px!important;
  }
}

/* Mobile */
@media(max-width:680px){
  html body .topbar.hk-header-final,
  html body header.topbar.hk-header-final{
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
    padding:8px 10px!important;
    gap:8px!important;
  }
  html body .topbar.hk-header-final .brand-core{
    width:42px!important;
    height:42px!important;
    flex-basis:42px!important;
    border-radius:15px!important;
  }
  html body .topbar.hk-header-final .brand-text strong{
    max-width:135px!important;
    font-size:.95rem!important;
  }
  html body .topbar.hk-header-final .brand-text small{
    display:none!important;
  }
  html body .topbar.hk-header-final .hk-header-right{
    gap:8px!important;
    max-width:none!important;
  }
  html body .topbar.hk-header-final .identity-info,
  html body .topbar.hk-header-final .identity-actions{
    display:none!important;
  }
  html body .topbar.hk-header-final .hk-identity-chip{
    padding:5px!important;
    min-width:auto!important;
    max-width:none!important;
    border-radius:18px!important;
  }
  html body .topbar.hk-header-final .identity-avatar,
  html body .topbar.hk-header-final .identity-orb{
    width:42px!important;
    height:42px!important;
    border-radius:15px!important;
  }
  html body .topbar.hk-header-final .notify-button{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    border-radius:15px!important;
  }
}

/* Very small */
@media(max-width:440px){
  html body .topbar.hk-header-final .brand-text{
    display:none!important;
  }
  html body .topbar.hk-header-final .hk-header-brand,
  html body .topbar.hk-header-final .brand{
    flex:1 1 0!important;
  }
}
