/* ═══════════════════════════════════════════════════════════════
   🔐 PASSWORD RECOVERY MODAL - PEQUENO, ELEGANTE E PROFISSIONAL
   ═══════════════════════════════════════════════════════════════ */

/* Modal Container - Compacto e Centralizado */
#recoveryModal .modal-dialog {
  max-width: 360px;
  margin: 0 auto;
}

#recoveryModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Backdrop Elegante */
#recoveryModal.show ~ .modal-backdrop {
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.4);
}

/* Header Minimalista */
#recoveryModal .modal-header {
  border-bottom: none;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  position: relative;
}

#recoveryModal .modal-header h5 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1a252f;
  margin: 0;
  text-align: center;
  flex: 1;
}

#recoveryModal .btn-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  transition: opacity 0.2s;
}

#recoveryModal .btn-close:hover {
  opacity: 1;
}

/* Botão Voltar */
.btn-back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-back:hover {
  color: #D3BA70;
}

/* Body Padding Otimizado */
#recoveryModal .modal-body {
  padding: 24px;
  text-align: center;
}

#recoveryModal .modal-body p {
  margin: 0 0 20px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

#recoveryModal .modal-body p strong {
  color: #1a252f;
}

/* Inputs de Token - 6 Quadrados Elegantes */
.token-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.token-digit {
  width: 50px;
  height: 56px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: #1a252f;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f9fafb;
}

.token-digit:focus {
  outline: none;
  border-color: #D3BA70;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(211, 186, 112, 0.1);
  transform: translateY(-2px);
}

.token-digit.filled {
  border-color: #D3BA70;
  background: #fffbf0;
}

.token-digit.error {
  border-color: #ef4444;
  background: #fef2f2;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Botão Reenviar Código */
.btn-link {
  background: none;
  border: none;
  color: #D3BA70;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 12px;
  transition: opacity 0.2s;
}

.btn-link:hover {
  opacity: 0.8;
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.input-group {
  position: relative;
}

.input-group .form-control {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1a252f;
  transition: all 0.25s;
  background: #f9fafb;
}

.input-group .form-control:focus {
  outline: none;
  border-color: #D3BA70;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(211, 186, 112, 0.1);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #6b7280;
}

.password-toggle i {
  display: block;
  width: 20px;
  height: 20px;
}

/* Lista de Requisitos de Senha */
.password-requirements {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  text-align: left;
}

.password-requirements p {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px;
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-requirements li {
  font-size: 12px;
  color: #6b7280;
  padding: 6px 0 6px 24px;
  position: relative;
  transition: color 0.2s;
}

.password-requirements li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #ef4444;
  font-size: 14px;
}

.password-requirements li.valid {
  color: #10b981;
}

.password-requirements li.valid::before {
  content: '✓';
  color: #10b981;
}

/* Mensagens de Erro */
.error-message {
  margin-top: 8px;
  font-size: 12px;
  color: #ef4444;
  text-align: left;
  display: none;
}

.error-message.show {
  display: block;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer Compacto */
#recoveryModal .modal-footer {
  border-top: none;
  padding: 16px 24px 20px;
  gap: 12px;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

#recoveryModal .modal-footer button {
  height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  padding: 0 24px;
}

#recoveryModal .modal-footer .btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

#recoveryModal .modal-footer .btn-secondary:hover {
  background: #e5e7eb;
  transform: scale(1.02);
}

#recoveryModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #D3BA70 0%, #c4a95e 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(211, 186, 112, 0.3);
}

#recoveryModal .modal-footer .btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(211, 186, 112, 0.4);
}

#recoveryModal .modal-footer .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* States - Transição entre Steps */
.recovery-step {
  display: none;
  animation: fadeOut 0.25s;
}

.recovery-step.active {
  display: block;
  animation: fadeIn 0.25s;
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Toast de Sucesso Compacto */
.success-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
}

.success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon i {
  font-size: 24px;
}

.toast-text {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsivo Mobile */
@media (max-width: 480px) {
  #recoveryModal .modal-dialog {
    max-width: 90vw;
    margin: 0 auto;
  }

  #recoveryModal .modal-header,
  #recoveryModal .modal-body,
  #recoveryModal .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .token-digit {
    width: 44px;
    height: 50px;
    font-size: 20px;
  }

  #recoveryModal .modal-footer {
    flex-direction: column !important;
  }

  #recoveryModal .modal-footer button {
    width: 100% !important;
  }

  .success-toast {
    padding: 14px 24px;
    font-size: 14px;
  }

  .toast-icon i {
    font-size: 20px;
  }
}

/* Animação de Sucesso */
.success-animation {
  text-align: center;
  padding: 20px;
}

.success-animation i {
  font-size: 48px;
  color: #10b981;
  animation: scaleIn 0.5s;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

