*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1a56ff;
  --blue-mid: #4f75ff;
  --dark: #111320;
  --muted: #6b7280;
  --white: #ffffff;
  --border: #e2e6f0;
  --off: #f7f8fc;
  --cyan: #00d4ff;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 2rem;
}

/* =========================
   LOGO
========================= */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover { text-decoration: none; }

.logo-box {
  width: 44px;
  height: 44px;
  /* border-radius: 10px; */
  object-fit: contain;
  /* padding: 4px; */
  transition: transform 0.2s ease;
}

.logo:hover .logo-box {
  transform: scale(1.05);
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.5px;
}

.logo-accent {
  color: #1a56ff;
}

/* =========================
   DESKTOP NAV
========================= */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--dark);
  background: var(--off);
  text-decoration: none;
}

.nav-link.active {
}

/* =========================
   RIGHT SIDE
========================= */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: var(--blue);
  color: #fff;
  padding: 11px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(26, 86, 255, 0.25);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--blue-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 86, 255, 0.35);
  color: #fff;
  text-decoration: none;
}

/* =========================
   HAMBURGER
========================= */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--dark);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: var(--off);
  border-color: var(--blue);
  color: var(--blue);
}

/* =========================
   MOBILE NAV
========================= */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--border);
}

.nav-mobile .nav-link {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 16px;
}

.nav-cta-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 14px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 16px rgba(26, 86, 255, 0.3);
  transition: all 0.2s ease;
}

.nav-cta-mobile:hover {
  background: var(--blue-mid);
  color: #fff;
  text-decoration: none;
}

.nav-mobile.show {
  display: flex;
}

/* =========================
   LOGGED-IN NAV
========================= */
.nav-desktop-logged-in {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-desktop-logged-in.hidden {
  display: none;
}

.nav-desktop.hidden {
  display: none;
}

.nav-mobile.hidden {
  display: none !important;
}

/* =========================
   PROFILE WRAPPER
========================= */
.profile-wrapper {
  position: relative;
}

#profileIcon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--off);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.2s ease;
}

#profileIcon:hover {
  border-color: var(--blue);
  background: rgba(26, 86, 255, 0.06);
  transform: scale(1.05);
}

/* =========================
   PROFILE CARD
========================= */
.profile-card {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 260px;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  z-index: 1001;

  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-card.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: var(--dark);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

#logged-in-username {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white) !important;
  margin-bottom: 4px;
}

#logged-in-usermail {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5) !important;
  margin-bottom: 4px;
  word-break: break-all;
}

#logged-in-userrole {
  font-size: 12px;
  font-weight: 500;
  color: var(--cyan) !important;
  letter-spacing: 0.5px;
  background: rgba(0, 212, 255, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-card .btn-light {
  display: block;
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.profile-card .btn-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
  text-decoration: none;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-cta { display: none; }
  .menu-btn { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  .header-inner { height: 70px; }
  .logo-text { font-size: 22px; }
  .logo-box { width: 42px; height: 42px; }

  .profile-card {
    min-width: 220px;
    right: -10px;
  }
}

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