/* ============================================================
   TELA DE LOGIN — PÁGINA DE RECUPERAÇÃO DE SENHA
   Parte 6/9 da antiga style.css (linhas 2019–2346 do original).
   A ordem das <link> no index.html repete a ordem original do arquivo,
   então a cascata é exatamente a mesma de antes da divisão.
   ============================================================ */

/* ===================== FORGOT PASSWORD PAGE ===================== */
.forgot-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 16px 0;
  /* Mesma limpeza do login: 5 gradientes radiais -> cor sólida (banding em TN). */
  background: var(--color-bg-page);
}

[data-theme="light"] .forgot-page {
  background: var(--color-bg-page);
}

.forgot-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 12px 20px;
  animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.forgot-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 40px;
  position: relative;
  overflow: hidden;
}

.forgot-brand::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(139, 92, 246, 0.12) 35%,
    transparent 70%
  );
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: brandHaloPulse 6s ease-in-out infinite;
}

[data-theme="light"] .forgot-brand::before {
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.14) 0%,
    rgba(139, 92, 246, 0.08) 35%,
    transparent 70%
  );
}

.forgot-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forgot-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-card);
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .forgot-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.forgot-card-header {
  margin-bottom: 24px;
}

.forgot-card-header h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

[data-theme="light"] .forgot-card-header h2 {
  color: #1a1a2e;
}

.forgot-card-header p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

[data-theme="light"] .forgot-card-header p {
  color: var(--color-text-secondary);
}

.forgot-field {
  margin-bottom: 20px;
}

.forgot-field label {
  display: block;
  color: var(--color-text-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-theme="light"] .forgot-field label {
  color: rgba(0, 0, 0, 0.62);
}

.forgot-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.forgot-input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-icon-muted);
  pointer-events: none;
  transition: color 0.25s;
}

[data-theme="light"] .forgot-input-icon {
  color: var(--color-icon-muted);
}

.forgot-input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

[data-theme="light"] .forgot-input-wrapper input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.forgot-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

[data-theme="light"] .forgot-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

.forgot-input-wrapper input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .forgot-input-wrapper input:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: #8b5cf6;
}

.forgot-input-wrapper input:focus ~ .forgot-input-icon,
.forgot-input-wrapper input:focus + .forgot-input-icon {
  color: var(--color-brand-light);
}

.forgot-field.has-error .forgot-input-wrapper input {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.forgot-field.has-error .forgot-input-icon {
  color: var(--color-error);
}

.forgot-field.is-valid .forgot-input-wrapper input {
  border-color: rgba(139, 92, 246, 0.35);
}

.forgot-error-msg {
  display: block;
  color: var(--color-error);
  font-size: 0.72rem;
  margin-top: 4px;
  min-height: 1.2em;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.forgot-field.has-error .forgot-error-msg {
  opacity: 1;
  animation: shakeIn 0.3s ease;
}

.forgot-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.forgot-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.forgot-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.forgot-back-link {
  text-align: center;
  margin-top: 20px;
}

.forgot-back-link p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.forgot-back-link a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-back-link a:hover {
  color: var(--color-brand-light);
}

@media (max-width: 900px) {
  .forgot-container {
    flex-direction: column;
    max-width: 440px;
    height: auto;
    gap: 0;
  }
  .forgot-brand {
    flex: 0 0 auto;
    padding: 16px 20px 10px;
    gap: 4px;
  }
  .forgot-brand .register-alt-crown {
    width: 67px;
  }
  .forgot-form-side {
    flex: 1;
    width: 100%;
    padding: 8px 24px 16px;
  }
  .forgot-card {
    padding: 18px 20px;
    max-width: 100%;
  }
  .forgot-card-header h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .forgot-brand {
    padding: 10px 12px 4px;
  }
  .forgot-brand .register-alt-crown {
    width: 53px;
  }
  .forgot-card {
    padding: 14px 14px;
  }
}

