/* Shared site header: size must remain identical on every page. */
:root {
  --site-header-blue: #1677ff;
  --site-header-text: #334155;
  --site-header-muted: #64748b;
  --site-header-border: rgba(226, 232, 240, 0.85);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  min-height: 72px;
  border-bottom: 1px solid var(--site-header-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(18px);
}

.site-header * {
  box-sizing: border-box;
}

.site-header__inner {
  display: flex;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
}

.site-header__brand {
  display: inline-flex;
  min-width: 214px;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  text-decoration: none;
}

.site-header__logo {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2388ff 0%, #006bff 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.22);
}

.site-header__logo svg {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px;
}

.site-header__brand-text strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.site-header__brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--site-header-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  height: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-header__nav::-webkit-scrollbar {
  display: none;
}

.site-header__nav-item {
  position: relative;
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--site-header-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.site-header__nav-item svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  color: currentColor;
}

.site-header__nav-item:hover {
  background: rgba(22, 119, 255, 0.06);
  color: var(--site-header-blue);
}

.site-header__nav-item.is-active {
  background: rgba(22, 119, 255, 0.08);
  color: var(--site-header-blue);
}

.site-header__nav-item.is-active::after {
  position: absolute;
  right: 12px;
  bottom: -18px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--site-header-blue);
  content: "";
  pointer-events: none;
}

.site-header__actions {
  position: relative;
  display: inline-flex;
  min-width: 132px;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.site-header__login {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--site-header-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.site-header__login:hover {
  background: rgba(22, 119, 255, 0.06);
  color: var(--site-header-blue);
}

.site-header__login svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
}

.site-header__user-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
}

@media (max-width: 920px) {
  .site-header {
    height: auto;
    min-height: 72px;
  }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-header__brand,
  .site-header__actions {
    min-width: 0;
  }

  .site-header__nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .site-header__nav-item.is-active::after {
    bottom: -7px;
  }
}

/* Specificity guard: older page styles used body-scope header selectors. */
body .site-header {
  height: 72px;
  min-height: 72px;
  border-bottom: 1px solid var(--site-header-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

body .site-header__inner {
  height: 100%;
  max-width: 1480px;
  padding-right: 24px;
  padding-left: 24px;
}

body .site-header__logo {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

body .site-header__logo svg {
  width: 22px !important;
  height: 22px !important;
}

body .site-header__nav-item {
  height: 40px;
  padding-right: 12px;
  padding-left: 12px;
  font-size: 14px;
  font-weight: 600;
}

body .site-header__nav-item svg {
  width: 16px !important;
  height: 16px !important;
}
