.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  height: var(--header-h);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease-out);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.brand:hover { opacity: 0.88; }

.header-nav { display: flex; gap: 4px; flex: 1; }

.nav-link {
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all 0.2s var(--ease-out);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.nav-link-badge {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.header-sell {
  font-weight: 800;
  border-radius: 12px;
  padding: 9px 18px;
}

.notif-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  transition: background 0.2s, transform 0.2s;
}

.notif-btn:hover { background: var(--primary-light); transform: scale(1.04); }

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid white;
}

.user-menu-wrap { position: relative; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.user-chip:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.user-name { font-weight: 700; font-size: 0.88rem; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: fadeInUp 0.2s var(--ease-out) both;
}

.user-dropdown[hidden] {
  display: none !important;
}

.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  border: none;
  border-radius: 10px;
  background: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

.user-dropdown a:hover, .user-dropdown button:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.user-dropdown button:last-child {
  color: var(--danger);
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  padding-top: 14px;
}

.user-dropdown button:last-child:hover {
  background: #fef2f2;
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell main { flex: 1; }

.site-footer {
  position: relative;
  margin-top: auto;
  background: #0c1222;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.footer-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 5% 0%, rgba(13, 148, 136, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 100%, rgba(249, 115, 22, 0.2), transparent 50%);
  pointer-events: none;
}

.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 48px;
  padding: 64px 0 44px;
}

.footer-brand { max-width: 380px; }

.footer-logo { display: inline-flex; margin-bottom: 18px; }

.footer-tagline {
  margin: 0 0 22px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-badge {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
}

.footer-col a {
  display: block;
  padding: 7px 0;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s, transform 0.15s;
}

.footer-col a:hover { color: #5eead4; transform: translateX(3px); }

.footer-bottom {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 0 32px;
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.97);
}

.header-search {
  flex: 1;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-search:focus-within {
  background: var(--surface);
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: var(--focus-ring);
}

.header-search svg { color: var(--text-muted); flex-shrink: 0; }

.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}

.header-search input:focus { outline: none; box-shadow: none; }
.header-search input::placeholder { color: var(--text-muted); }

.mobile-header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.mobile-header-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.95rem;
}

.mobile-header-search input:focus { outline: none; }

.desktop-only { display: flex; }

@media (max-width: 900px) {
  .header-nav { display: none; }
  .header-sell { display: none; }
  .desktop-only { display: none !important; }
  .header-inner { gap: 12px; }
  .header-actions .btn-ghost,
  .header-actions .btn-primary { display: none; }
  .header-actions .notif-btn { display: none; }
}

@media (max-width: 480px) {
  .header-inner { gap: 8px; }
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: var(--surface-2);
  border-radius: 12px;
  cursor: pointer;
  place-items: center;
  transition: background 0.2s;
}

.mobile-menu-btn:hover { background: var(--primary-light); }

.mobile-drawer {
  border-top: 1px solid var(--border);
  padding: 12px 16px 16px;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  animation: fadeInUp 0.2s ease both;
  box-shadow: var(--shadow);
}

.mobile-drawer:not([hidden]) {
  display: flex;
}

@media (min-width: 901px) {
  .mobile-drawer {
    display: none !important;
  }
}

.mobile-drawer a, .mobile-drawer button {
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-align: left;
  border: none;
  background: none;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
}

.mobile-drawer a.active, .mobile-drawer a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

@media (max-width: 900px) {
  .mobile-menu-btn { display: grid; }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 36px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .footer-columns { grid-template-columns: 1fr; }
}
