/* Site header — desktop + mobile drawer */
.site-header {
  --header-green: #219066;
  --header-green-dark: #1a7352;
  --header-text: #333;
  --header-muted: #888;
  --header-height: 64px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 200;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
  padding: 8px 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.site-header__logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.site-header__name {
  font-size: 22px;
  font-weight: 500;
  color: #5f5f5f;
  white-space: nowrap;
}

.site-header__tagline {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--header-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--header-text);
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__toggle-icon,
.site-header__toggle-icon::before,
.site-header__toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.site-header__toggle-icon {
  position: relative;
}

.site-header__toggle-icon::before,
.site-header__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-header__toggle-icon::before {
  top: -6px;
}

.site-header__toggle-icon::after {
  top: 6px;
}

.site-header--open .site-header__toggle-icon {
  background: transparent;
}

.site-header--open .site-header__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header--open .site-header__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-header__overlay {
  display: none;
}

.site-header__nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.site-header__nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--header-text);
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s;
}

.site-header__nav a:first-child {
  margin-left: 0;
}

.site-header__nav a:hover {
  color: var(--header-green);
}

.site-header__nav a.active {
  color: var(--header-green);
  font-weight: 500;
  position: relative;
}

.site-header__nav a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--header-green);
  border-radius: 2px;
}

.site-header__nav .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.site-header__user span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 140px;
}

.site-header__user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__vip {
  flex-shrink: 0;
  vertical-align: middle;
}

.site-header__nav-divider {
  display: none;
}

@media (max-width: 1100px) {
  .site-header__tagline {
    display: none;
  }
}

@media (max-width: 991px) {
  .site-header__toggle {
    display: flex;
  }

  .site-header__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    z-index: 201;
  }

  .site-header--open .site-header__overlay {
    opacity: 1;
    visibility: visible;
  }

  .site-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 202;
    width: min(300px, 86vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: calc(var(--header-height) + 16px) 20px 24px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
  }

  .site-header--open .site-header__nav {
    transform: translateX(0);
  }

  .site-header__nav a {
    margin: 0;
    padding: 14px 12px;
    font-size: 16px;
    border-radius: 10px;
    max-width: none;
    white-space: normal;
  }

  .site-header__user span {
    max-width: none;
  }

  .site-header__nav a:hover,
  .site-header__nav a.active {
    background: #f0f9f5;
  }

  .site-header__nav a.active::after {
    display: none;
  }

  .site-header__nav-divider {
    display: block;
    height: 1px;
    background: #eef0f3;
    margin: 8px 0;
  }

  body.site-header--open {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .site-header__logo {
    width: 36px;
    height: 36px;
  }

  .site-header__name {
    font-size: 18px;
  }
}

