/* =========================================================
   auth.css — Sign in, Sign up, Forgot password pages
   Design system: Cormorant Garamond / Libre Baskerville
   ========================================================= */

/* Layout */
.auth-page {
  min-height: 100vh;
  background: #FAFAF9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 4px;
  padding: 2.5rem 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.06);
}

.auth-logo {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #1C1917;
  text-decoration: none;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.auth-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #0C0A09;
  margin: 0 0 0.375rem;
  line-height: 1.2;
}

.auth-subheading {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.875rem;
  color: #44403C;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* Form elements */
.form-field {
  margin-bottom: 1.125rem;
}

.form-field label {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1C1917;
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="text"] {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.9375rem;
  color: #0C0A09;
  background: #FAFAF9;
  border: 1px solid rgba(28, 25, 23, 0.25);
  border-radius: 3px;
  outline: none;
  transition: border-color 150ms ease;
  box-sizing: border-box;
}

.form-field input:focus {
  border-color: #CA8A04;
  background: #ffffff;
}

.form-field input.input-error {
  border-color: #b91c1c;
}

.field-error {
  display: none;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.75rem;
  color: #b91c1c;
  margin-top: 0.3rem;
}

.field-error.visible {
  display: block;
}

/* Password strength */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 3px;
  background: #e7e5e4;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 200ms ease, background-color 200ms ease;
}

.strength-fill[data-level="1"] { width: 25%; background: #b91c1c; }
.strength-fill[data-level="2"] { width: 50%; background: #d97706; }
.strength-fill[data-level="3"] { width: 75%; background: #CA8A04; }
.strength-fill[data-level="4"] { width: 100%; background: #15803d; }

.strength-label {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.6875rem;
  color: #78716c;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.form-check input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #CA8A04;
}

.form-check label {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8125rem;
  color: #44403C;
  line-height: 1.5;
  cursor: pointer;
}

.form-check a {
  color: #CA8A04;
  text-decoration: underline;
}

/* Submit button */
.btn-auth {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  background: #1C1917;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  text-align: center;
  letter-spacing: 0.01em;
  position: relative;
}

.btn-auth:hover {
  background: #0C0A09;
  transform: translateY(-2px);
}

.btn-auth:disabled {
  background: #78716c;
  cursor: not-allowed;
  transform: none;
}

.btn-auth.loading::after {
  content: '';
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #a8a29e;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e7e5e4;
}

/* OAuth buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.875rem;
  color: #1C1917;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.2);
  border-radius: 3px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  text-decoration: none;
}

.btn-oauth:hover {
  background: #FAFAF9;
  border-color: #1C1917;
  transform: translateY(-2px);
}

/* Footer links */
.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e7e5e4;
  text-align: center;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8125rem;
  color: #44403C;
}

.auth-footer a {
  color: #CA8A04;
  text-decoration: underline;
}

.forgot-link {
  float: right;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8125rem;
  color: #CA8A04;
  text-decoration: underline;
}

/* Form-level error */
.form-error-banner {
  display: none;
  padding: 0.625rem 0.875rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 3px;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8125rem;
  color: #b91c1c;
  margin-bottom: 1.125rem;
}

.form-error-banner.visible {
  display: block;
}

/* Success message */
.form-success-banner {
  display: none;
  padding: 0.875rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 3px;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.875rem;
  color: #15803d;
  margin-bottom: 1.125rem;
  line-height: 1.5;
}

.form-success-banner.visible {
  display: block;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }
}
