/* ─── Auth Modal ─── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem 2rem;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.auth-overlay.open .auth-modal {
  transform: translateY(0);
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.auth-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.auth-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-modal .auth-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-form input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 0.7rem;
  margin-top: 0.25rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.auth-google-btn {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
  font-family: inherit;
}

.auth-google-btn:hover {
  background: rgba(0, 0, 0, 0.025);
}

.auth-google-btn svg {
  width: 18px;
  height: 18px;
}

.auth-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.auth-error {
  background: var(--error-bg);
  color: var(--error);
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: none;
}

.auth-error.show {
  display: block;
}
