@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap);

/* ==============================================
   ESTILOS BASE
   ============================================== */

body {
  font-family: Inter, sans-serif;
  background-color: #f9fafb;
}

.gradient-bg {
  background: linear-gradient(135deg, #b077f1 0%, #667eea 100%);
}

.gradient-bg2 {
  background: rgb(251, 253, 255);
}

.card {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .1);
  transition: all .3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1);
}

/* ==============================================
   INPUTS E CAMPOS DE FORMULÁRIO
   ============================================== */

.input-field {
  transition: all .3s ease;
  border: 2px solid #e5e7eb;
}

.input-field:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .2);
}

.input-field:hover:not(:focus):not(.input-error) {
  border-color: #d1d5db;
}

/* Estilo para inputs com erro - NOVO */
.input-error {
  border: 2px solid #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Ícone de toggle de senha - NOVO */
.password-toggle-icon {
  position: absolute;
  right: 16px;
  top: 70%;
  transform: translateY(-50%);
  color: #6b7280;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 10;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.password-toggle-icon:hover {
  color: #4f46e5;
}

.password-toggle-icon:active {
  transform: translateY(-50%) scale(0.9);
}

/* Ajuste no padding do input quando tem ícone de senha */
input[type="password"] + .password-toggle-icon,
input[type="text"] + .password-toggle-icon {
  display: flex;
}

/* Garantir que o input tenha espaço para o ícone */
input[type="password"],
input[type="text"].was-password {
  padding-right: 48px !important;
}

/* ==============================================
   BOTÕES
   ============================================== */

.btn-primary {
  background-color: #4f46e5;
  transition: all .3s ease;
}

.btn-primary:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #10b981;
  transition: all .3s ease;
}

.btn-secondary:hover {
  background-color: #0d9f6e;
  transform: translateY(-2px);
}

/* Estilo do botão com loading - NOVO */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

/* Classe para o botão com efeito de brilho e pulsação */
.btn-shine {
  background-color: #4f46e5;
  color: white;
  font-weight: bold;
  padding: 12px 32px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: pulseButton 2s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(79, 70, 229, 0.7);
  line-height: 1.4;
}

/* Efeito de brilho deslizante */
.btn-shine::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 50%;
  height: 200%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
  animation: shineEffect 3s infinite;
}

/* Hover effect adicional */
.btn-shine:hover {
  background-color: #4338ca;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2);
}

/* ==============================================
   TABS
   ============================================== */

.tab-active {
  background-color: #fff;
  color: #4f46e5;
  font-weight: 600;
}

/* ==============================================
   ÍCONES DE FEATURES
   ============================================== */

.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* ==============================================
   LOGO RESPONSIVO
   ============================================== */

.logo-responsive {
  max-width: 100%;
  height: auto;
  width: 350px;
}

/* ==============================================
   POPUP DE ALERTA
   ============================================== */

/* Estilos para o popup de alerta - ATUALIZADO */
.popup-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 500px;
  transform: translateX(120%);
  transition: transform 0.3s ease-out;
  display: none; /* Oculto por padrão */
}

.popup-alert.show {
  transform: translateX(0);
  display: block; /* Mostrar quando ativo */
}

.alert-error {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.alert-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Overlay escuro para o fundo - NOVO */
#overlay {
  transition: opacity 0.3s ease;
}

/* ==============================================
   MENSAGENS DE ERRO INLINE - NOVO
   ============================================== */

.inline-error-message {
  display: none;
  animation: slideDown 0.3s ease-out;
}

/* ==============================================
   CÓDIGO DE VERIFICAÇÃO
   ============================================== */

.verification-code-input {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.code-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background-color: #ffffff;
  color: #374151;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.code-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  transform: scale(1.05);
}

.code-input:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.code-input.filled {
  background-color: #f3f4f6;
  border-color: #10b981;
  color: #065f46;
}

.code-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: shake 0.5s ease-in-out;
}

/* ==============================================
   INDICADOR DE FORÇA DE SENHA - NOVO
   ============================================== */

.password-strength {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

.password-strength-weak {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.password-strength-medium {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.password-strength-strong {
  background-color: #f0fdf4;
  color: #059669;
  border: 1px solid #86efac;
}

/* ==============================================
   SEÇÕES DE DADOS
   ============================================== */

.data-section .accordion-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-left: 4px solid #4f46e5;
}

.data-section .accordion-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: none;
}

/* Animação de entrada para formulários - NOVO */
.data-section {
  animation: fadeIn 0.4s ease-out;
}

/* ==============================================
   ANIMAÇÕES
   ============================================== */

/* Animação de shake para elementos com erro - NOVO */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
  animation: shake 0.5s ease-in-out;
}

/* Animação de pulsação para o botão */
@keyframes pulseButton {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

/* Animação do efeito de brilho */
@keyframes shineEffect {
  0% {
    left: -50%;
  }
  100% {
    left: 150%;
  }
}

/* Animação slideDown - NOVO */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação fadeIn - NOVO */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spinner de loading - NOVO */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
  animation: spin 1s linear infinite;
}

/* ==============================================
   RESPONSIVIDADE
   ============================================== */

@media screen and (max-width: 768px) {
  .logo-responsive {
    width: 250px;
  }
  
  .verification-code-input {
    gap: 10px;
    margin: 16px 0;
  }
  
  .code-input {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

@media screen and (max-width: 640px) {
  /* Popup responsivo - NOVO */
  .popup-alert {
    left: 10px;
    right: 10px;
    top: 10px;
    min-width: auto;
    max-width: none;
    transform: translateY(-120%);
  }
  
  .popup-alert.show {
    transform: translateY(0);
  }
  
  .inline-error-message {
    font-size: 0.875rem;
    padding: 12px;
  }
  
  /* Ajuste do ícone de senha em mobile */
  .password-toggle-icon {
    right: 12px;
    font-size: 18px;
    width: 20px;
    height: 20px;
  }
  
  /* Garantir padding adequado no input em mobile */
  input[type="password"],
  input[type="text"].was-password {
    padding-right: 44px !important;
  }
}

@media screen and (max-width: 576px) {
  .btn-shine {
    padding: 10px 24px;
    font-size: 14px;
  }
  
  .verification-code-input {
    gap: 8px;
    margin: 12px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 10px;
  }
  
  .code-input {
    width: 40px;
    height: 40px;
    font-size: 18px;
    min-width: 40px;
    flex-shrink: 0;
  }
}

@media screen and (max-width: 480px) {
  .logo-responsive {
    width: 200px;
  }
}

@media screen and (max-width: 400px) {
  .verification-code-input {
    gap: 6px;
    padding: 0 5px;
  }
  
  .code-input {
    width: 35px;
    height: 35px;
    font-size: 16px;
    min-width: 35px;
  }
  
  /* Ajustes adicionais para ícone de senha em telas pequenas */
  .password-toggle-icon {
    right: 10px;
    font-size: 16px;
    width: 18px;
    height: 18px;
  }
  
  input[type="password"],
  input[type="text"].was-password {
    padding-right: 40px !important;
  }
  
  /* Reduzir padding geral dos inputs em telas pequenas */
  .input-field {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

@media screen and (max-width: 320px) {
  .verification-code-input {
    gap: 4px;
    justify-content: space-between;
  }
  
  .code-input {
    width: 32px;
    height: 32px;
    font-size: 14px;
    min-width: 32px;
  }
  
  /* Ajustes para telas muito pequenas */
  .password-toggle-icon {
    right: 8px;
    font-size: 14px;
    width: 16px;
    height: 16px;
  }
  
  input[type="password"],
  input[type="text"].was-password {
    padding-right: 36px !important;
  }
}