/* Email/password sign-in panel — shared across every page that offers it
   (dashboard, profile) as a fallback alongside "Sign in with Google".
   Loaded via each page's own extraStyles, not globally, matching the
   existing per-page CSS convention (see dashboard.css / profile.css). */

.email-auth-toggle {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--primary, #d1039e);
  text-decoration: none;
  cursor: pointer;
}
.email-auth-toggle:hover { text-decoration: underline; }

.email-auth-panel {
  display: none;
  margin-top: 16px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}

.email-auth-tabs {
  display: flex;
  border-radius: 10px;
  background: #f3f4f6;
  padding: 3px;
  margin-bottom: 12px;
}
.email-auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.email-auth-tab.active {
  background: #fff;
  color: var(--primary, #d1039e);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.email-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.email-auth-input:focus {
  outline: none;
  border-color: var(--primary, #d1039e);
  box-shadow: 0 0 0 3px rgba(209, 3, 158, 0.12);
}

.email-auth-submit {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary, #d1039e), var(--primary-dark, #5b026b));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.email-auth-submit:hover { opacity: 0.92; }
.email-auth-submit:active { transform: translateY(1px); }
.email-auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.email-auth-forgot {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #6b7280;
  text-decoration: none;
  text-align: center;
}
.email-auth-forgot:hover { color: var(--primary, #d1039e); text-decoration: underline; }

.email-auth-error {
  display: none;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.82rem;
}

.email-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  width: 100%;
  max-width: 320px;
  color: #9ca3af;
  font-size: 0.78rem;
}
.email-auth-divider::before,
.email-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Sign-up email OTP step — swaps in over the tabs/form/forgot-link while
   verifying an address; see wireEmailAuthPanel() in auth.js. */
.email-auth-otp-step {
  margin-top: 16px;
  width: 100%;
  max-width: 320px;
}
.email-auth-otp-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #4b5563;
  text-align: center;
}
.email-auth-otp-input {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding-left: 18px; /* offsets the letter-spacing so digits look centered */
}
.email-auth-otp-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
}
.email-auth-otp-links a {
  color: #6b7280;
  text-decoration: none;
  cursor: pointer;
}
.email-auth-otp-links a:hover { color: var(--primary, #d1039e); text-decoration: underline; }
.email-auth-otp-links a.disabled {
  pointer-events: none;
  opacity: 0.6;
  text-decoration: none;
}
