.nav {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  height: 60px !important;
  padding: 0 18px !important;
  background: linear-gradient(135deg, #0f172a, #111827) !important;
  color: #e5e7eb !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.28) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3000;
  overflow: visible;
}


.nav a,
.nav button {
  color: #e5e7eb !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  font-size: 16px !important;
  transition: opacity 150ms ease, color 150ms ease;
}

/* Reserve space under fixed nav so content doesn't overlap */
body,
body.site-body,
body[class*="app-"] {
  padding-top: 60px;
}

.nav a:hover,
.nav button:hover {
  color: #c7d2fe;
  opacity: 0.9;
}

.nav button {
  background: none;
  border: 1px solid rgba(255,255,255,0.25) !important;
  border-radius: 14px;
  padding: 6px 12px !important;
  cursor: pointer;
}

.nav .spacer {
  flex: 1;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-brand { font-weight: 700; }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.nav form {
  margin: 0;
}

.nav-account {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-account__toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 6px 12px;
  color: #e5e7eb;
  font-weight: 600;
  cursor: pointer;
}
.nav-account__toggle:hover {
  background: rgba(255,255,255,0.12);
}

.nav-account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 4000;
}

.nav-account.nav-account--open .nav-account__menu {
  display: flex;
}

.nav-account__menu a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #e5e7eb !important;
  text-decoration: none !important;
  font-size: 15px !important;
}
.nav-account__menu a:hover {
  background: rgba(255,255,255,0.08);
  color: #c7d2fe !important;
}

@media (max-width: 768px) {
  .nav-account {
    width: 100%;
  }
  .nav-account__menu {
    position: static;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    height: 60px;
    gap: 10px;
    padding: 0 14px;
  }
  .nav .spacer { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0f172a, #111827);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 3500;
  }
  .nav.nav-open .nav-links { display: flex; }
  .nav-links a,
  .nav-links button,
  .nav-links .nav-account__toggle {
    width: 100%;
    text-align: left;
  }
  /* Stack account dropdown full-width under the toggle */
  .nav-account {
    width: 100%;
    align-items: center;
  }
  .nav-account__toggle {
    width: 140px;
    text-align: left;
    margin-left: 0;
  }
  .nav-account__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: auto;
    min-width: 180px;
    margin-top: 0;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border-radius: 10px;
  }
}
