/* ===== AUTH PAGES - VERSÃO MODERNA 2026 ===== */
/* Sistema de Login Premium com Gradientes e Animações */

/* ===== CONTAINER PRINCIPAL ===== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, 
    #eff6ff 0%, 
    #dbeafe 25%, 
    #bfdbfe 50%, 
    #93c5fd 100%);
  position: relative;
  overflow: hidden;
}

/* Elementos laranja em movimento - Camada 1 (embaixo do vidro) */
.auth-page::before {
  content: '';
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(249, 115, 22, 0.3) 0%, transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(234, 88, 12, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(251, 146, 60, 0.28) 0%, transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.22) 0%, transparent 32%),
    radial-gradient(circle at 20% 60%, rgba(249, 115, 22, 0.2) 0%, transparent 35%);
  animation: orangeMove 25s ease-in-out infinite;
  z-index: 0;
}

@keyframes orangeMove {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% { 
    transform: translate(-50px, 30px) rotate(120deg) scale(1.1);
  }
  66% { 
    transform: translate(30px, -40px) rotate(240deg) scale(0.95);
  }
}

/* Camada de vidro fosco - Camada 2 (por cima dos elementos) */
.auth-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(60px) saturate(150%);
  -webkit-backdrop-filter: blur(60px) saturate(150%);
  z-index: 0;
}

/* ===== CONTAINER DO CARD ===== */

.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

/* ===== CARD DE LOGIN PREMIUM ===== */

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(30, 64, 175, 0.08);
  border: 1px solid rgba(30, 64, 175, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
  overflow: hidden;
}

/* Brilho sutil no topo do card - azul para laranja */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    #1e40af 0%, 
    #2563eb 25%,
    #ea580c 75%,
    #f97316 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}

.auth-card:hover {
  box-shadow: 
    0 25px 30px -5px rgba(0, 0, 0, 0.12),
    0 15px 15px -5px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(30, 64, 175, 0.12);
  transform: translateY(-2px);
}

/* ===== HEADER COM LOGO BADGE ===== */

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-badge {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-shadow: 
    0 10px 15px -3px rgba(30, 64, 175, 0.12),
    0 4px 6px -2px rgba(30, 64, 175, 0.08),
    inset 0 2px 4px 0 rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(30, 64, 175, 0.15);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brilho interno no badge */
.auth-logo-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1.25rem;
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.8) 0%, 
    transparent 60%);
  pointer-events: none;
}

.auth-logo-badge:hover {
  transform: translateY(-3px) rotate(-3deg);
  box-shadow: 
    0 15px 20px -5px rgba(30, 64, 175, 0.18),
    0 6px 8px -2px rgba(30, 64, 175, 0.12),
    inset 0 2px 4px 0 rgba(255, 255, 255, 0.6);
}

.auth-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.auth-header p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

/* ===== INPUTS MODERNOS COM ÍCONES ===== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.form-label i {
  color: #1e40af; /* Azul primário */
  font-size: 0.875rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  font-size: 0.9375rem;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon.focused .input-icon {
  color: #1e40af; /* Azul primário */
  transform: scale(1.1);
}

.modern-input {
  width: 100%;
  height: 48px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1f2937;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.modern-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.modern-input:hover {
  border-color: #d1d5db;
  background: #ffffff;
}

.modern-input:focus {
  outline: none;
  border-color: #1e40af; /* Azul primário */
  background: #ffffff;
  box-shadow: 
    0 0 0 4px rgba(30, 64, 175, 0.12),
    0 2px 4px 0 rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

/* Botão de toggle senha */
.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  border-radius: 0.375rem;
}

.toggle-password:hover {
  color: #1e40af; /* Azul primário */
  background: rgba(30, 64, 175, 0.08);
}

.toggle-password:active {
  transform: scale(0.95);
}

/* ===== CHECKBOX MODERNO ===== */

.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modern-checkbox {
  display: flex;
  align-items: center;
}

.modern-checkbox .form-check-input {
  width: 18px;
  height: 18px;
  margin: 0;
  margin-right: 0.5rem;
  border: 2px solid #d1d5db;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-color: #ffffff;
  position: relative;
}

.modern-checkbox .form-check-input:checked {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%); /* Azul primário */
  border-color: #1e40af;
}

.modern-checkbox .form-check-input:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.625rem;
}

.modern-checkbox .form-check-label {
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

/* ===== BOTÃO DE LOGIN PREMIUM ===== */

.modern-btn-login {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px -1px rgba(30, 64, 175, 0.35),
    0 2px 4px -1px rgba(30, 64, 175, 0.25);
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%); /* Azul primário */
  letter-spacing: 0.025em;
}

/* Gradiente animado de fundo - azul */
.btn-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    #1e40af 0%, 
    #2563eb 50%, 
    #1e40af 100%);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}

.modern-btn-login:hover .btn-gradient {
  opacity: 1;
}

/* Conteúdo do botão */
.btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.btn-content i {
  font-size: 1.125rem;
}

/* Hover effect */
.modern-btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 15px -3px rgba(30, 64, 175, 0.45),
    0 4px 6px -2px rgba(30, 64, 175, 0.35);
}

.modern-btn-login:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 4px -1px rgba(30, 64, 175, 0.35),
    0 1px 2px -1px rgba(30, 64, 175, 0.25);
}

/* Loading state */
.modern-btn-login.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.modern-btn-login.btn-loading .btn-content {
  opacity: 0;
}

.btn-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.modern-btn-login.btn-loading .btn-spinner {
  display: block;
}

.btn-spinner i {
  font-size: 1.25rem;
  color: #ffffff;
}

/* ===== LINKS ===== */

.auth-link {
  font-size: 0.875rem;
  color: #ea580c; /* Laranja accent */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  position: relative;
}

.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ea580c 0%, #f97316 100%); /* Laranja */
  transition: width 0.3s ease-out;
}

.auth-link:hover {
  color: #f97316; /* Laranja mais claro */
}

.auth-link:hover::after {
  width: 100%;
}

/* ===== FOOTER ===== */

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-footer i {
  color: #1e40af; /* Azul primário */
  font-size: 0.875rem;
}

/* ===== MENSAGENS DE ERRO ===== */

.error-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #991b1b;
  font-weight: 500;
  animation: shake 0.4s ease-in-out;
}

.error-message i {
  color: #dc2626;
  font-size: 0.875rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ===== ANIMAÇÕES ===== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVO ===== */

@media (max-width: 640px) {
  .auth-page {
    padding: 1.5rem 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-logo-badge {
    width: 100px;
    height: 100px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.875rem;
  }

  .modern-input {
    height: 46px;
    font-size: 0.875rem;
  }

  .modern-btn-login {
    height: 48px;
    font-size: 0.9375rem;
  }

  .auth-info {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .info-item {
    padding: 0.75rem;
  }

  .checkbox-wrapper {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .auth-container {
    max-width: 100%;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .modern-input {
    padding-left: 2.5rem;
  }

  .input-icon {
    left: 0.875rem;
    font-size: 0.875rem;
  }
}
  .auth-page {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
  }

  .auth-header h1 {
    font-size: 1.375rem;
  }

  .auth-logo {
    width: 56px;
    height: 56px;
  }

  .checkbox-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ===== ACESSIBILIDADE ===== */

.auth-card :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== PREVENÇÃO DE FLASHES ===== */

.auth-page * {
  -webkit-tap-highlight-color: transparent;
}