.global-header {
  position: fixed;
  z-index: 90;
  top: env(safe-area-inset-top);
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-height);
  padding: 0 15px;
  border: 0;
  border-bottom: 1px solid #dfe2e6;
  border-radius: 0;
  color: #090b0f;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header-brand {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 155px;
  max-width: 340px;
  height: 100%;
  margin: 0;
  padding: 2px 0 2px 7px;
  border: 0;
  color: #090b0f;
  background: transparent;
  gap: 4px;
  text-align: left;
}
.header-logo-mark {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.14));
}
.header-brand-wordmark {
  display: block;
  width: clamp(150px, 18vw, 205px);
  max-width: calc(100% - 58px);
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.1));
}
.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: flex-end;
  height: 100%;
  gap: 2px;
  margin-left: clamp(22px, 2.6vw, 38px);
}
.header-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  padding: 2px 0 1px;
  border: 0;
  color: #090b0f;
  background: transparent;
  font-size: .75rem;
  font-weight: 500;
  gap: 0;
}
.header-action:hover,.header-action:focus-visible { color: #090b0f; }
.notification-action { width: 82px; }
.profile-action { width: 58px; }
.signout-action { width: 66px; }
.header-action-icon { display: grid; place-items: center; height: 29px; }
.header-action-icon svg { width: 25px; height: 25px; }
.header-badge { position: absolute; top: 1px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: var(--red); font-size: .52rem; font-weight: 700; }
.profile-action img { width: 29px; height: 29px; border: 1.5px solid #090b0f; border-radius: 50%; object-fit: cover; }
.signout-action svg,.signout-action svg path:last-child { color: #090b0f; stroke: #090b0f; }
@media (max-width:700px) {
  .global-header { padding: 0 6px; }
  .global-header--home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(15px, 4vw, 22px);
  }
  .header-brand {
    width: 100%;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    padding: 2px 0 2px 4px;
    gap: 3px;
  }
  .header-logo-mark { width: 34px; height: 34px; }
  .header-brand-wordmark {
    width: min(112px, calc(100% - 37px));
    max-width: calc(100% - 37px);
  }
  .header-actions {
    width: auto;
    gap: 0;
    margin-left: 0;
  }
  .header-action {
    min-width: 0;
    padding-inline: 0;
    font-size: .61rem;
    line-height: 1;
  }
  .notification-action { width: 69px; }
  .profile-action { width: 47px; }
  .signout-action { width: 55px; }
  .header-action > span:last-child { white-space: nowrap; }
  .header-action-icon { height: 27px; }
  .header-action-icon svg { width: 23px; height: 23px; }
  .profile-action img { width: 27px; height: 27px; }
}
@media (max-width:390px) {
  .global-header { padding: 0 4px; }
  .global-header--home { column-gap: 14px; }
  .header-brand { padding-left: 3px; gap: 2px; }
  .header-logo-mark { width: 30px; height: 30px; }
  .header-brand-wordmark {
    width: min(108px, calc(100% - 32px));
    max-width: calc(100% - 32px);
  }
  .header-action { font-size: .57rem; }
  .notification-action { width: 66px; }
  .profile-action { width: 44px; }
  .signout-action { width: 52px; }
  .header-action-icon { height: 25px; }
  .header-action-icon svg { width: 21px; height: 21px; }
  .profile-action img { width: 25px; height: 25px; }
}
@media (max-width:350px) {
  .global-header--home { column-gap: 10px; }
  .header-brand-wordmark { width: min(94px, calc(100% - 31px)); }
  .notification-action { width: 61px; }
  .profile-action { width: 41px; }
  .signout-action { width: 49px; }
  .header-action { font-size: .54rem; }
}


/* Inner-page navigation header: Back + centred page name + compact actions. */
.global-header--page {
  display: grid;
  grid-template-columns: minmax(92px,1fr) auto minmax(92px,1fr);
  align-items: center;
  padding: 0 12px;
}
.page-header-back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  height: 100%;
  padding: 0 6px 0 0;
  border: 0;
  color: #090b0f;
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  gap: 3px;
}
.page-header-back svg { width: 23px; height: 23px; }
.page-header-title {
  min-width: 0;
  overflow: hidden;
  color: #090b0f;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-header-actions { display: flex; align-items: center; justify-self: end; height: 100%; gap: 14px; }
.page-header-action { position: relative; display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 0; color: #090b0f; background: transparent; }
.page-header-action svg { width: 24px; height: 24px; }
.page-notification-action { transform: translate(-4px, 2px); }
.page-profile-action img { width: 29px; height: 29px; border: 1.5px solid #090b0f; border-radius: 50%; object-fit: cover; }
.page-header-badge { top: -2px; left: auto; right: -5px; }
@media (max-width:700px) {
  .global-header--page { grid-template-columns: minmax(82px,1fr) auto minmax(82px,1fr); padding: 0 8px; }
  .page-header-back { font-size: .83rem; }
  .page-header-back svg { width: 22px; height: 22px; }
  .page-header-title { font-size: .96rem; }
  .page-header-actions { gap: 10px; }
  .page-header-action { width: 30px; height: 30px; }
  .page-header-action svg { width: 23px; height: 23px; }
  .page-profile-action img { width: 28px; height: 28px; }
}
@media (max-width:390px) {
  .global-header--page { grid-template-columns: minmax(75px,1fr) auto minmax(75px,1fr); padding: 0 6px; }
  .page-header-actions { gap: 7px; }
  .page-header-title { max-width: 142px; }
}
