/* =========================================================
   auth.css — Sign in, Sign up, Forgot password pages
   Design system: 2026 Alhora brand — Newsreader / Instrument Sans
   Ink #211A12 · Paper #F5EFE3 · Terracotta #A63A2B
   ========================================================= */

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

.auth-card {
  background: #FBF7EE;
  border: 1px solid rgba(33, 26, 18, 0.16);
  border-radius: 4px;
  padding: 2.5rem 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 2px 12px rgba(33, 26, 18, 0.06);
}

.auth-logo {
  display: block;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 500;
  color: #211A12;
  text-decoration: none;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.auth-heading {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: #211A12;
  margin: 0 0 0.375rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.auth-subheading {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.9375rem;
  color: #4A4136;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

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

.form-field label {
  display: block;
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #211A12;
  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: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9375rem;
  color: #211A12;
  background: #FBF7EE;
  border: 1px solid rgba(33, 26, 18, 0.16);
  border-radius: 8px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-sizing: border-box;
}

.form-field input:focus {
  border-color: #A63A2B;
  background: #FBF7EE;
  box-shadow: 0 0 0 3px rgba(166, 58, 43, 0.35);
}

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

.field-error {
  display: none;
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  color: #9C2B1D;
  margin-top: 0.3rem;
}

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

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

.strength-bar {
  height: 3px;
  background: #EDE5D4;
  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: #9C2B1D; }
.strength-fill[data-level="2"] { width: 50%; background: #B94434; }
.strength-fill[data-level="3"] { width: 75%; background: #A63A2B; }
.strength-fill[data-level="4"] { width: 100%; background: #2F5D50; }

.strength-label {
  font-family: 'Spline Sans Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.6875rem;
  color: #6E6353;
}

/* 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: #A63A2B;
}

.form-check label {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.8125rem;
  color: #4A4136;
  line-height: 1.5;
  cursor: pointer;
}

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

/* Submit button */
.btn-auth {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #F3ECDD;
  background: #A63A2B;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  text-align: center;
  letter-spacing: 0.02em;
  position: relative;
}

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

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

.btn-auth.loading::after {
  content: '';
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgba(243, 236, 221, 0.35);
  border-top-color: #F3ECDD;
  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: #6E6353;
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(33, 26, 18, 0.16);
}

/* 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: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #211A12;
  background: #FBF7EE;
  border: 1px solid rgba(33, 26, 18, 0.16);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  text-decoration: none;
}

.btn-oauth:hover {
  background: #F5EFE3;
  border-color: #211A12;
  transform: translateY(-2px);
}

/* Footer links */
.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(33, 26, 18, 0.16);
  text-align: center;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.8125rem;
  color: #4A4136;
}

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

.forgot-link {
  float: right;
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #A63A2B;
  text-decoration: underline;
}

/* Form-level error */
.form-error-banner {
  display: none;
  padding: 0.625rem 0.875rem;
  background: rgba(156, 43, 29, 0.08);
  border: 1px solid rgba(156, 43, 29, 0.3);
  border-radius: 8px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.8125rem;
  color: #9C2B1D;
  margin-bottom: 1.125rem;
}

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

/* Success message */
.form-success-banner {
  display: none;
  padding: 0.875rem;
  background: rgba(47, 93, 80, 0.08);
  border: 1px solid rgba(47, 93, 80, 0.3);
  border-radius: 8px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.875rem;
  color: #2F5D50;
  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;
  }
}
