/* ───────── DESIGN SYSTEM & VARIÁVEIS DE LOGIN ───────── */
:root {
  --login-bg: #06030c; /* Preto profundo com tom violeta */
  --login-preto: #0e0a1b;
  --login-branco: #ffffff;
  
  --login-accent-purple: #7246ff;
  --login-accent-purple-glow: rgba(114, 70, 255, 0.2);
  --login-accent-cyan: #00e5ff;
  --login-accent-cyan-glow: rgba(0, 229, 255, 0.25);
  
  --login-text-muted: #a09bb5;
  --login-border: rgba(255, 255, 255, 0.08);
  --login-border-focus: #7246ff;
  --login-card-bg: rgba(14, 10, 27, 0.65);
  
  /* Fontes */
  --font-outfit: 'Outfit', sans-serif;
  --font-poppins: 'Poppins', sans-serif;
  
  /* Transição */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset Geral de Login */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-poppins);
  color: var(--login-branco);
  background-color: var(--login-bg);
  overflow-x: hidden;
  position: relative;
}

/* Canvas de Partículas */
#login-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Halos Luminosos Traseiros */
.login-glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(114, 70, 255, 0.09) 0%, rgba(0, 229, 255, 0.03) 40%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

/* ───────── HEADER & VOLTAR AO SITE ───────── */
.login-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 32px 5%;
  display: flex;
  justify-content: flex-start;
  z-index: 10;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--login-text-muted);
  text-decoration: none;
  font-family: var(--font-outfit);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.back-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.back-link:hover {
  color: var(--login-accent-cyan);
}

.back-link:hover .back-icon {
  transform: translateX(-4px);
}

/* ───────── CARD CENTRAL DE LOGIN ───────── */
.login-container {
  width: 100%;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
}

.login-wrapper {
  width: 100%;
  max-width: 460px;
  background: var(--login-card-bg);
  border: 1px solid var(--login-border);
  border-radius: 28px;
  padding: 48px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

/* Logo Brand */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--login-branco);
}

.login-brand .logo-svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
}

.login-brand .logo-text {
  font-family: var(--font-outfit);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

/* Intro Títulos */
.login-intro {
  text-align: center;
}

.login-intro h2 {
  font-family: var(--font-outfit);
  font-size: 30px;
  font-weight: 800;
  color: var(--login-branco);
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 14px;
  color: var(--login-text-muted);
  line-height: 1.5;
  margin-top: 8px;
}

/* ───────── FORMULÁRIO DE LOGIN ───────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  position: relative;
  width: 100%;
}

.form-group input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--login-border);
  border-radius: 14px;
  font-family: var(--font-poppins);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
  color: var(--login-branco);
}

/* Foco Neon nos Inputs */
.form-group input:focus {
  border-color: var(--login-accent-purple);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 16px var(--login-accent-purple-glow);
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--login-text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Comportamento Floating Label */
.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label {
  top: -10px;
  left: 10px;
  transform: scale(0.85);
  background: #090610; /* Fundo escuro do card para mesclar */
  padding: 0 8px;
  color: var(--login-accent-purple);
  font-weight: 600;
  border-radius: 4px;
}

/* Revelar Senha Eyeball */
.password-group {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--login-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s;
  z-index: 5;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.toggle-password:hover {
  color: var(--login-accent-cyan);
}

.hidden {
  display: none !important;
}

/* Opções de Checkbox e Password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--login-text-muted);
  user-select: none;
}

.remember-me input {
  display: none;
}

/* Custom Checkbox Estilizado */
.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--login-border);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.02);
}

.remember-me:hover .custom-checkbox {
  border-color: var(--login-accent-cyan);
}

.remember-me input:checked + .custom-checkbox {
  background: var(--login-accent-cyan);
  border-color: var(--login-accent-cyan);
  box-shadow: 0 0 10px var(--login-accent-cyan-glow);
}

.remember-me input:checked + .custom-checkbox::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--login-preto);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password {
  color: var(--login-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: var(--login-accent-cyan);
  text-decoration: underline;
}

/* ───────── BOTÕES PREMIUM ───────── */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 0 32px;
  border-radius: 30px;
  font-family: var(--font-outfit);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.block-btn {
  width: 100%;
}

/* Botão Invertido Premium para Dark Mode */
.botaoPrimario {
  position: relative;
  background: var(--login-branco);
  color: var(--login-preto);
  padding-right: 64px;
  overflow: hidden;
  z-index: 1;
}

.botao-circulo {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--login-preto);
  color: var(--login-branco);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease;
  z-index: -1;
}

.botao-circulo svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.botaoPrimario span {
  display: inline-block;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

/* Hover Animado */
.botaoPrimario:hover {
  color: var(--login-branco);
}

.botaoPrimario:hover span {
  opacity: 0;
  transform: translateX(-12px);
}

.botaoPrimario:hover .botao-circulo {
  width: calc(100% - 12px);
  background: var(--login-preto);
}

.botaoPrimario:hover .botao-circulo svg {
  transform: translateX(4px);
}

/* ───────── FOOTERS DE CARTÃO ───────── */
.login-card-footer {
  text-align: center;
  font-size: 11px;
  color: var(--login-text-muted);
  opacity: 0.8;
  line-height: 1.5;
}

/* ───────── TOAST NOTIFICATIONS ───────── */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--login-preto);
  color: var(--login-branco);
  border: 1px solid var(--login-border);
  padding: 16px 24px;
  border-radius: 16px;
  font-family: var(--font-poppins);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(12px);
}

@keyframes toastIn {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid #00e676;
}

.toast.error {
  border-left: 4px solid #ff5f56;
}

.toast.info {
  border-left: 4px solid var(--login-accent-cyan);
}

/* ───────── AJUSTES RESPONSIVOS ───────── */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 32px 24px;
    gap: 24px;
  }
  .login-intro h2 {
    font-size: 26px;
  }
  .login-header {
    padding: 24px 24px;
  }
}
