/* MH Customer responsive header stabilization - 2026-10-27.
   Only the authenticated header and typography. Do not touch sessions/animations. */
#app:not(.hidden) > header.top {
  box-sizing:border-box!important;
  height:auto!important; min-height:72px!important;
  max-height:none!important;
  padding:12px clamp(12px,2vw,30px)!important;
  display:flex!important; align-items:center!important;
  justify-content:space-between!important; flex-wrap:wrap!important;
  column-gap:20px!important; row-gap:12px!important;
  overflow:visible!important;
}
#app:not(.hidden) > header.top .brand-main {
  min-width:0!important; max-width:100%!important;
  display:flex!important; align-items:center!important;
  flex:0 1 auto!important; gap:12px!important;
}
#app:not(.hidden) > header.top .brand-main > div {
  min-width:0!important;
}
#app:not(.hidden) > header.top .brand-main span {
  display:block!important;
  white-space:normal!important; overflow-wrap:normal!important;
  font-size:clamp(17px,0.45vw + 13px,21px)!important; line-height:1.4!important;
}
#app:not(.hidden) > header.top .brand-main small {
  font-size:clamp(13px,0.25vw + 11px,15px)!important; line-height:1.4!important;
}
#app:not(.hidden) > header.top .top-actions {
  min-width:0!important; max-width:100%!important; width:auto!important;
  display:flex!important; align-items:center!important;
  flex:0 1 auto!important; flex-wrap:wrap!important;
  justify-content:flex-end!important;
  column-gap:10px!important; row-gap:8px!important;
}
#app:not(.hidden) > header.top .top-actions > div {
  min-width:0!important; max-width:min(100%,310px)!important;
}
#app:not(.hidden) > header.top :is(#userName,#userEmail,#ownerBadge) {
  font-size:clamp(14px,0.25vw + 12px,17px)!important;
  line-height:1.45!important; overflow-wrap:anywhere!important;
}
#app:not(.hidden) > header.top .top-language {
  width:clamp(115px,12vw,165px)!important;
  max-width:100%!important; min-height:43px!important; font-size:clamp(15px,0.25vw + 12px,17px)!important;
}
#app:not(.hidden) > header.top #logoutBtn {
  min-height:43px!important; font-size:clamp(15px,0.25vw + 12px,17px)!important;
  white-space:nowrap!important;
}
@media(max-width:840px){
  #app:not(.hidden) > header.top {align-items:stretch!important; flex-direction:column!important;}
  #app:not(.hidden) > header.top .brand-main,
  #app:not(.hidden) > header.top .top-actions {width:100%!important; justify-content:space-between!important;}
  #app:not(.hidden) > header.top .top-actions > div {flex:1 1 145px!important;}
}
@media(max-width:430px){
  #app:not(.hidden) > header.top .top-actions {justify-content:space-between!important;gap:8px!important;}
  #app:not(.hidden) > header.top .top-language {width:clamp(106px,34vw,145px)!important;}
  #app:not(.hidden) > header.top .top-actions > div {flex:1 1 110px!important;}
  #app:not(.hidden) > header.top .brand-main span {font-size:17px!important;}
}

/* v3: Keep logo, menu, and brand title together on narrow/tablet layouts. */
@media(max-width:840px) {
  #app:not(.hidden) > header.top .brand-main {
    justify-content:flex-start!important;
    gap:10px!important;
  }
}
/* v3: Override the earlier 12px mobile back-button rule without removing it. */
@media(max-width:370px) {
  html body #app:not(.hidden) > header.top .top-actions #mhEasyBack {
    font-size:14px!important;
    line-height:1.25!important;
    padding:5px!important;
    min-height:43px!important;
  }
}