
@keyframes fadeInBody {
  from { opacity: 0; transform: scale(1.01); }
  to   { opacity: 1; transform: scale(1); }
}

/* ====== Contenedor principal ====== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

/* ====== Tarjeta de login (efecto vidrio) ====== */
.glass {
  background: #ffffffb9;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  padding: 30px 40px;
  width: 420px;
  text-align: center;
  transition: transform 0.3s ease;
  animation: fadeInCard 0.5s ease forwards;
}

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

.glass:hover {
  transform: scale(1.02);
}

/* ====== Logo animado NEURO ====== */
.neuro-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  animation: fadeSlide 1s ease-out forwards;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.neuro-svg-anim {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));
  transition: transform 0.5s ease;
}

.neuro-svg-anim:hover {
  transform: scale(1.05);
}

/* ====== Subtítulo ====== */
.motto {
  color: #555;
  font-size: 18px;
  margin: 0 0 30px 0;
  animation: fadeInText 0.6s ease;
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Formulario ====== */
form {
  width: 80%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.form-group {
  width: 100%;
  margin-bottom: 12px;
  box-sizing: border-box;
}

/* ====== Inputs ====== */
input {
  width: 100%;
  padding: 14px 16px; /* Igualamos padding con el botón */
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1.5px 4px rgba(0, 0, 0, 0.08); /* más suave */
  text-align: center;
  font-size: 17px;
  font-family: 'Poppins', sans-serif;
  color: #1a1a1a;
  outline: none;
  box-sizing: border-box;
}

/* Campo contraseña con icono */
.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #777;
  font-size: 22px;
  user-select: none;
  transition: color 0.3s ease;
}

.toggle-password.active {
  color: #004aad;
}

/* ====== Botón principal ====== */
button {
  width: 100%;
  padding: 14px 16px; /* Igual al input */
  background: linear-gradient(90deg, #3663a5ab, #185b9dbd);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 5px;
  box-sizing: border-box; /* evita expansión extra */
}

button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #4c87dfab, #227bd3bd);
}

/* ====== Enlaces secundarios ====== */
.message {
  font-size: 16px;
  color: #000;
  text-align: center;
  margin-top: 15px;
  line-height: 1.4;
}

.message a {
  color: #004aad;
  text-decoration: none;
  font-weight: 500;
}

.message a:hover {
  text-decoration: underline;
}

/* ====== Toast superior ====== */
.toast-banner {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  border-radius: 8px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  animation: fadein 0.8s ease forwards;
}

@keyframes fadein {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ====== Responsividad ====== */
@media (max-width: 768px) {
  .glass {
    width: 85%;
    padding: 25px 20px;
  }

  input, button {
    font-size: 16px;
  }
}

/* ===== Fade out, in ==== */
body {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.2s ease, filter 0.3s ease;
}

body.fade-in {
  opacity: 1;
  filter: blur(0);
}

body.fade-out {
  opacity: 0;
  filter: blur(6px);
}