/* ── Auth Modal ─────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.auth-overlay.open { opacity: 1; pointer-events: all; }

.auth-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(440px, 95vw);
  background: var(--warm-white);
  border-radius: 24px;
  z-index: 201;
  opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 24px 60px rgba(44,74,46,0.15);
}
.auth-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; pointer-events: all;
}

.auth-head {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--light-sage);
  padding: 0.25rem;
  border-radius: 50px;
}
.auth-tab {
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sage);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.auth-tab.active {
  background: white;
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(44,74,46,0.12);
}

.auth-body { padding: 1.5rem; }

.auth-field { margin-bottom: 1rem; }
.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.auth-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: white;
  color: var(--charcoal);
  transition: border-color 0.2s;
  outline: none;
}
.auth-field input:focus { border-color: var(--sage); }

.auth-error {
  display: none;
  background: #fde8e8;
  color: #c0392b;
  font-size: 0.82rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.auth-submit { width: 100%; justify-content: center; }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

/* ── Nav auth controls ──────────────────────────────────────────────────── */
.nav-auth { display: flex; align-items: center; gap: 0.75rem; }

.nav-signin {
  background: transparent;
  color: var(--forest);
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.nav-signin:hover { border-color: var(--forest); background: var(--light-sage); }

/* ── User menu ──────────────────────────────────────────────────────────── */
.user-menu { position: relative; display: none; align-items: center; }

.user-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--light-sage);
  border: none; border-radius: 50px;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  color: var(--forest);
  transition: background 0.2s;
}
.user-btn:hover { background: #d8eada; }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem); right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.4rem;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(44,74,46,0.12);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 150;
}
.user-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.user-dropdown button {
  width: 100%; text-align: left;
  padding: 0.6rem 0.8rem;
  border: none; background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; color: var(--charcoal);
  cursor: pointer; border-radius: 8px;
  transition: background 0.2s;
}
.user-dropdown button:hover { background: var(--light-sage); color: var(--forest); }
