/* ============================================
   PORTAL DO POUPADOR - LOGIN MODERNO
   Design: Card Flutuante com Fundo Full-Screen
   ============================================ */

:root {
  /* Cores da Marca */
  --verde-primario: #034d42;
  --verde-secundario: #505d3c;
  --dourado-destaque: #FFB800;
  
  /* Neutros */
  --branco: #ffffff;
  --cinza-claro: #f5f5f5;
  --escuro: #0a1f1c;
  
  /* Funcionais */
  --erro: #dc3545;
  --sucesso: #28a745;
}

/* Reset e Base */
body {
  font-family: "Karla", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container Full-Screen com Gradiente */
.login-container-modern {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1f1c 0%, #034d42 50%, #0a1f1c 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  padding: 15px; /* Reduzido de 20px */
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Elemento Diagonal de Destaque */
.login-container-modern::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40%;
  height: 60%;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 184, 0, 0.1) 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* Card Flutuante */
.login-card-modern {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 2px; /* Bordas afiadas para confiança */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 450px;
  width: 100%;
  padding: 40px 45px; /* Reduzido de 60px 50px */
  animation: slideIn 0.6s ease-out;
  position: relative;
  z-index: 1;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo e Branding */
.brand-wrapper-modern {
  text-align: center;
  margin-bottom: 20px; /* Reduzido de 30px */
}

.brand-wrapper-modern h2 {
  color: var(--verde-primario);
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0 0 0; /* Reduzido de 15px */
  letter-spacing: -0.5px;
}

.brand-wrapper-modern img {
  width: 70px; /* Reduzido de 80px */
  height: 70px;
}

/* Título do Card */
.login-card-description-modern {
  font-size: 18px; /* Reduzido de 20px */
  color: var(--verde-primario);
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px; /* Reduzido de 30px */
  letter-spacing: 0.5px;
}

/* Formulário */
.login-form-modern {
  width: 100%;
}

/* Grupos de Formulário */
.form-group-modern {
  margin-bottom: 16px; /* Reduzido de 20px */
}

.form-group-modern label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 6px; /* Reduzido de 8px */
}

/* Inputs */
.form-control-modern {
  width: 100%;
  padding: 13px 18px; /* Reduzido de 15px 20px */
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 2px; /* Bordas afiadas */
  background: var(--branco);
  color: #333;
  transition: all 0.3s ease;
  font-family: "Karla", sans-serif;
  box-sizing: border-box; /* CORREÇÃO: Incluir padding e border no width */
}

.form-control-modern::placeholder {
  color: #999;
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--verde-primario);
  box-shadow: 0 0 0 3px rgba(3, 77, 66, 0.15);
  transform: translateY(-1px);
}

/* Botões */
.btn-modern {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  box-sizing: border-box; /* CORREÇÃO: Incluir padding e border no width */
}

.btn-primary-modern {
  background: var(--dourado-destaque);
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.3);
}

.btn-primary-modern:hover {
  background: #e6a700;
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.4);
}

.btn-primary-modern:active {
  transform: scale(0.98);
}

.btn-secondary-modern {
  background: transparent;
  color: var(--verde-primario);
  border: 2px solid var(--verde-primario);
  box-sizing: border-box; /* CORREÇÃO: Incluir padding e border no width */
}

.btn-secondary-modern:hover {
  background: var(--verde-primario);
  color: var(--branco);
  transform: scale(1.02);
}

/* Alertas */
.alert-modern {
  padding: 12px 16px;
  border-radius: 2px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.4s ease-out;
}

.alert-danger-modern {
  background: rgba(220, 53, 69, 0.1);
  border-left: 4px solid var(--erro);
  color: #721c24;
}

.alert-success-modern {
  background: rgba(40, 167, 69, 0.1);
  border-left: 4px solid var(--sucesso);
  color: #155724;
}

/* Links */
.forgot-password-link-modern {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--verde-primario);
  text-decoration: none;
  margin: 20px 0;
  transition: color 0.3s ease;
}

.forgot-password-link-modern:hover {
  color: var(--verde-secundario);
  text-decoration: underline;
}

.login-card-footer-text-modern {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: 25px 0 15px 0;
}

.login-card-footer-text-modern a {
  color: var(--verde-primario);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login-card-footer-text-modern a:hover {
  color: var(--dourado-destaque);
  text-decoration: underline;
}

/* Footer Navigation */
.login-card-footer-nav-modern {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.login-card-footer-nav-modern a {
  font-size: 12px;
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login-card-footer-nav-modern a:hover {
  color: var(--verde-primario);
}

/* reCAPTCHA Container */
.recaptcha-container-modern {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

/* Responsivo Mobile */
@media (max-width: 576px) {
  .login-card-modern {
    padding: 40px 30px;
    border-radius: 0;
    max-width: 100%;
    box-shadow: none;
  }
  
  .brand-wrapper-modern h2 {
    font-size: 24px;
  }
  
  .login-card-description-modern {
    font-size: 18px;
  }
  
  .login-container-modern {
    padding: 0;
  }
  
  .login-container-modern::before {
    display: none;
  }
}

/* Animação de Loading (opcional) */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Acessibilidade - Reduzir movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
