/* ═══════════════════════════════════════════════════════
   SHARED NAVIGATION
   Canonical nav styles used across all CrowdHum pages.
   Homepage (index.html) is the reference implementation.
   ═══════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(6, 10, 20, 0.6);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(6, 10, 20, 0.85);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Shift nav down when promo banner is visible */
.promo-banner:not(.dismissed) ~ .nav {
  top: 40px;
}

.nav-logo {
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo .crowd {
  font-weight: 700;
}

.nav-logo .hum {
  font-weight: 300;
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .signin {
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 6px 18px;
  border-radius: var(--r-pill);
  transition: all 0.2s;
}

.nav-links .signin:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

/* Help button (used on create page) */
.nav-links .help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-links .help-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #fff);
}

/* Pro Settings gear (dashboard nav) */
.nav-settings-gear {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
  cursor: pointer;
  transition: all 0.2s;
}

.nav-settings-gear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #fff);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-settings-gear:focus-visible {
  outline: 2px solid var(--cyan, #06b6d4);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .nav-links a:not(.signin) {
    display: none;
  }
}

/* Auth bar container — gap between pills */
#auth-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ═══ User pill (signed-in state) ═══ */
.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-pill, 999px);
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.2s;
  cursor: pointer;
}
.nav-user-pill:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
}
.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  object-fit: cover;
}
.nav-user-avatar--initials {
  background: linear-gradient(135deg, var(--cyan, #06b6d4), var(--magenta, #d946ef));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border: none;
}
.nav-user-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary, #fff);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-sign-out {
  font-size: 0.7rem;
  color: var(--text-tertiary, rgba(255,255,255,0.35));
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  font-family: inherit;
}
.nav-sign-out:hover {
  color: #ef4444;
  border-color: #ef4444;
}
.nav-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.nav-dashboard-text-link {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-dashboard-text-link:hover {
  color: var(--text-primary);
}
