.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 35, 31, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 101;
  backdrop-filter: blur(6px);
}

.login-modal {
  background: var(--home-surface, #ffffff);
  padding: 2rem;
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--home-shadow, 0 18px 50px rgba(21, 45, 38, 0.12));
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-modal h2,
.auth-card h2 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  color: var(--home-ink, #18231f);
  line-height: 1.15;
}

.login-modal .subtitle,
.auth-card .subtitle {
  font-size: 0.9rem;
  color: var(--home-muted, #5f6f69);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.login-modal form,
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.login-modal input,
.auth-card input {
  padding: 0.75rem;
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  color: var(--home-ink, #18231f);
  font-size: 1rem;
  width: 100%;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-modal input::placeholder,
.auth-card input::placeholder {
  color: #8a9893;
  color: color-mix(in srgb, var(--home-muted, #5f6f69) 72%, white);
}

.login-modal input:focus,
.auth-card input:focus {
  border-color: var(--home-primary, #0f766e);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-modal .field-label,
.auth-card .field-label {
  color: var(--home-ink, #18231f);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
}

.auth-state {
  margin-bottom: 1.25rem;
}

.auth-state-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--home-surface-soft, #eef7f4);
  color: var(--home-primary, #0f766e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.code-input {
  text-align: center;
  letter-spacing: 0.3rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.login-modal button,
.auth-card button {
  padding: 0.75rem;
  background: var(--home-primary, #0f766e);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-modal button:hover,
.auth-card button:hover {
  background: var(--home-primary-dark, #0b5f59);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
  transform: translateY(-1px);
}

.login-modal button:disabled,
.auth-card button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.social-login {
  margin: 0.75rem 0 1rem;
}

.google-login-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  color: var(--home-ink, #18231f);
  background: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.google-login-btn:hover {
  border-color: var(--home-primary, #0f766e);
  color: var(--home-primary-dark, #0b5f59);
  box-shadow: var(--home-shadow-soft, 0 10px 28px rgba(21, 45, 38, 0.08));
}

.google-icon {
  flex: 0 0 auto;
}

/* === Rodapé === */
.footer-text {
  font-size: 0.85rem;
  color: var(--home-muted, #5f6f69);
  cursor: pointer;
  margin: 0.7rem 0 0;
  user-select: none;
}

.footer-text a {
  color: var(--home-primary, #0f766e);
  font-weight: 800;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.privacy-consent {
  cursor: default;
  line-height: 1.45;
}

.forgot-helper {
  color: var(--home-muted, #5f6f69);
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

.forgot-success {
  background: var(--home-surface-soft, #eef7f4);
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  color: var(--home-primary-dark, #0b5f59);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: left;
}

.forgot-success p {
  margin: 0.35rem 0 0;
}

.modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.login-modal .secondary-btn,
.auth-card .secondary-btn {
  background: transparent;
  border: 1px solid var(--home-border, #d8e3df);
  color: var(--home-ink, #18231f);
}

.login-modal .secondary-btn:hover,
.auth-card .secondary-btn:hover {
  background: var(--home-surface-soft, #eef7f4);
  border-color: var(--home-primary, #0f766e);
  color: var(--home-primary-dark, #0b5f59);
  box-shadow: none;
}

/* === Standalone Auth Page (Update Password) === */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--home-bg, #f7faf8);
  padding: 1rem;
  color: var(--home-ink, #18231f);
}

.auth-card {
  background: var(--home-surface, #ffffff);
  padding: 2rem;
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--home-shadow, 0 18px 50px rgba(21, 45, 38, 0.12));
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--home-ink, #18231f);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem;
  font-size: 1rem;
}

.success-message {
  padding: 1.5rem;
  background: var(--home-surface-soft, #eef7f4);
  border: 1px solid var(--home-border, #d8e3df);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.success-message p {
  color: var(--home-primary-dark, #0b5f59);
  font-weight: 600;
  margin-bottom: 1rem;
}

.success-message a {
  display: inline-block;
  background: var(--home-primary, #0f766e);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
}

.success-message a:hover {
  background: var(--home-primary-dark, #0b5f59);
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--home-danger, #dc2626);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
