/* ==========================================================================
   AUTH-RECOVERY.CSS — páginas de recuperação de password
   ==========================================================================
   Partilhado por:
     - recovery-senha.html  (pedir link de recuperação)
     - reset-password.html  (definir nova password)

   As duas páginas têm exatamente a mesma estrutura:
     body.bg-light
       form.container.vh-100
         .col-md-4
           .card.shadow-sm.border-0
             .card-body.p-4
               logo + título + alerts + input-groups + botão + link

   Por isso o CSS é um só. Se um dia divergirem, separa-se.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Cartão
   ------------------------------------------------------------------------- */
.card {
  border-radius: 14px;
  transition: box-shadow 0.25s ease;
}

.card.shadow-sm {
  box-shadow: 0 1rem 2rem rgba(15, 35, 70, 0.08) !important;
}

/* Em ecrãs pequenos, cartão mais compacto */
@media (max-width: 480px) {
  .card-body {
    padding: 1.25rem !important;
  }

  h5 {
    font-size: 1.1rem;
  }
}

/* -------------------------------------------------------------------------
   2. Logo
   ------------------------------------------------------------------------- */
.card-body img[alt="icon"] {
  display: block;
  margin: 0 auto 0.5rem;
  max-width: 200px;
}

/* -------------------------------------------------------------------------
   3. Título
   ------------------------------------------------------------------------- */
h5 {
  color: rgb(20, 20, 117);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------------
   4. Parágrafo de instruções
   ------------------------------------------------------------------------- */
.card-body p.text-muted {
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   5. Input groups (email, password, confirmar)
   ------------------------------------------------------------------------- */
.input-group-text {
  background-color: #f1f3f9;
  border-right: 0;
  color: rgb(13, 13, 143);
  font-size: 0.95rem;
}

.input-group .form-control {
  border-left: 0;
}

/* Foco: dá destaque ao conjunto todo em vez de só ao input */
.input-group:focus-within {
  border-radius: 8px;
  box-shadow: 0 0 0 0.2rem rgba(13, 13, 143, 0.15);
  transition: box-shadow 0.15s ease;
}

.input-group .form-control:focus,
.input-group .btn:focus {
  box-shadow: none;
  border-color: #ced4da;
}

.form-control {
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.9rem;
}

.input-group-text {
  border-radius: 8px 0 0 8px;
}

.form-label {
  color: rgb(20, 20, 117);
  font-weight: 500;
  font-size: 0.92rem;
}

/* -------------------------------------------------------------------------
   6. Botão principal (Entrar / Enviar instruções / Redefinir)
   ------------------------------------------------------------------------- */
.btn-primary {
  background-color: rgb(13, 13, 143) !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.6rem 1rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background-color: rgb(20, 20, 117) !important;
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.75;
  cursor: progress;
}

/* -------------------------------------------------------------------------
   7. Botão "mostrar password" (olho)
   ------------------------------------------------------------------------- */
.btn-outline-secondary {
  border-left: 0;
  border-color: #ced4da;
  color: #6c757d;
  border-radius: 0 8px 8px 0;
  transition: color 0.2s ease;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: transparent;
  color: rgb(13, 13, 143);
  border-color: #ced4da;
  box-shadow: none;
}

/* -------------------------------------------------------------------------
   8. Texto de ajuda (ex.: "Mínimo 8 caracteres")
   ------------------------------------------------------------------------- */
.form-text {
  color: #6c757d;
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* -------------------------------------------------------------------------
   9. Links de ação (Voltar ao login, Esqueceu a password?)
   ------------------------------------------------------------------------- */
a.text-decoration-none,
a.text-decoration-none:visited {
  color: rgb(13, 13, 143);
  font-weight: 500;
  transition: color 0.2s ease;
}

a.text-decoration-none:hover {
  color: rgb(20, 20, 117);
  text-decoration: underline !important;
}

/* -------------------------------------------------------------------------
   10. Alerts (erro / sucesso)
   ------------------------------------------------------------------------- */
.alert {
  border-radius: 8px;
  font-size: 0.88rem;
  border: none;
}

.alert-danger {
  background-color: #fdeaea;
  color: #b02a37;
}

.alert-success {
  background-color: #e6f4ea;
  color: #1e7e34;
}

/* -------------------------------------------------------------------------
   11. Reduzir movimento para quem pediu
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}