* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: white;
}

/* Video de fondo */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.85) contrast(1.15);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(11, 36, 71, 0.75) 0%,
    rgba(50, 76, 128, 0.7) 100%
  );
  z-index: -1;
}

/* Botón para regresar al inicio */
.back-home {
  position: absolute;
  top: 30px;
  left: 30px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.95rem;
}

.back-home:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Contenedor principal centrado */
.login-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.content-wrapper {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 60px;
}

/* Sección de bienvenida */
.welcome-section {
  flex: 1;
  padding-right: 20px;
}

.welcome-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  color: white;
  letter-spacing: -1.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.welcome-subtitle {
  font-size: 3.2rem;
  font-weight: 700;
  color: #a8c6ff;
  margin-bottom: 25px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.welcome-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  max-width: 90%;
}

/* Línea divisora */
.divider-line {
  width: 1px;
  height: 380px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.5),
    transparent
  );
  margin: 0 20px;
  position: relative;
}

.divider-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #a8c6ff;
  border-radius: 50%;
}

.divider-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #a8c6ff;
  border-radius: 50%;
}

/* Sección del formulario */
.form-section {
  flex: 1;
  max-width: 400px;
}

.form-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 35px;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 15px;
}

.form-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, #a8c6ff, #5b7dbb);
  border-radius: 2px;
}

/* Formulario */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
}

.input-label {
  display: block;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.3px;
  padding-left: 5px;
}

.clean-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 1.05rem;
  color: white;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  backdrop-filter: blur(8px);
}

.clean-input:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.clean-input:focus {
  outline: none;
  border-color: #a8c6ff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 0 0 3px rgba(168, 198, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.clean-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

/* Botón de login */
.clean-login-btn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, #5b7dbb 0%, #324c80 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.clean-login-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.clean-login-btn:hover::before {
  width: 300px;
  height: 300px;
}

.clean-login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 25px rgba(91, 125, 187, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.2);
}

.clean-login-btn:active {
  transform: translateY(-1px);
}

/* Divisor de cuenta */
.account-divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.account-divider::before,
.account-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

.account-divider span {
  padding: 0 18px;
  background: rgba(11, 36, 71, 0.5);
  position: relative;
  z-index: 1;
}

/* Enlace de registro */
.clean-register-link {
  display: block;
  width: 100%;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-size: 1rem;
}

.clean-register-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* --- TOAST --- */
.toast {
  position: fixed;
  top: 30px;
  right: 30px;
  padding: 16px 24px 16px 50px;
  border-radius: 10px;
  font-weight: 600;
  color: white;
  z-index: 2000;
  animation: slideInOut 4s ease-in-out forwards;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.75);
}

.toast::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
}

.toast.success {
  background: rgba(76, 175, 80, 0.9);
}

.toast.error {
  background: rgba(244, 67, 54, 0.9);
}

@keyframes slideInOut {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }

  10% {
    opacity: 1;
    transform: translateX(0);
  }

  90% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    max-width: 90%;
    gap: 50px;
  }
  
  .welcome-title {
    font-size: 3.5rem;
  }
  
  .welcome-subtitle {
    font-size: 2.8rem;
  }
  
  .divider-line {
    height: 320px;
  }
}

@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  
  .welcome-section {
    padding-right: 0;
    max-width: 600px;
  }
  
  .welcome-title {
    font-size: 3rem;
  }
  
  .welcome-subtitle {
    font-size: 2.4rem;
  }
  
  .welcome-text {
    font-size: 1.1rem;
    max-width: 100%;
    margin-bottom: 20px;
  }
  
  .divider-line {
    width: 80%;
    height: 1px;
    margin: 20px auto;
    background: linear-gradient(
      to right,
      transparent,
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0.5),
      transparent
    );
  }
  
  .divider-line::before,
  .divider-line::after {
    display: none;
  }
  
  .form-section {
    max-width: 400px;
    width: 100%;
  }
  
  .form-title {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .form-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .back-home {
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .login-center {
    padding: 20px 15px;
  }
  
  .content-wrapper {
    gap: 30px;
  }
  
  .welcome-title {
    font-size: 2.6rem;
  }
  
  .welcome-subtitle {
    font-size: 2rem;
  }
  
  .welcome-text {
    font-size: 1rem;
  }
  
  .form-title {
    font-size: 1.7rem;
    margin-bottom: 25px;
  }
  
  .clean-input {
    padding: 15px 18px;
  }
  
  .clean-login-btn,
  .clean-register-link {
    padding: 15px;
  }
  
  .back-home {
    top: 15px;
    left: 15px;
    padding: 7px 14px;
    font-size: 0.85rem;
  }
}

/* Animación sutil para entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-wrapper {
  animation: fadeInUp 0.8s ease-out;
}

.form-section {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Contenedor de contraseña */
.password-group {
  position: relative;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input {
  padding-right: 55px !important;
}

/* Botón de mostrar/ocultar contraseña */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  padding: 0;
}

.toggle-password:hover {
  color: #a8c6ff;
  background: rgba(168, 198, 255, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.toggle-password:active {
  transform: translateY(-50%) scale(0.95);
}

/* Iconos de ojo */
.toggle-password i {
  position: absolute;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.show-icon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.hide-icon {
  opacity: 0;
  transform: scale(0) rotate(-180deg);
}

/* Estado cuando la contraseña es visible */
.password-input[type="text"] ~ .toggle-password .show-icon {
  opacity: 0;
  transform: scale(0) rotate(180deg);
}

.password-input[type="text"] ~ .toggle-password .hide-icon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

/* Efecto de pulsación al hacer click */
@keyframes passwordTogglePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 198, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(168, 198, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 198, 255, 0);
  }
}

.toggle-password:focus {
  outline: none;
  animation: passwordTogglePulse 1s;
}

/* Efecto de brillo en hover */
.toggle-password::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 198, 255, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
  z-index: -1;
}

.toggle-password:hover::after {
  width: 100%;
  height: 100%;
}

/* Para el campo de admin */
.admin-input ~ .toggle-password {
  color: rgba(168, 198, 255, 0.8);
}

.admin-input ~ .toggle-password:hover {
  color: #ffffff;
  background: rgba(168, 198, 255, 0.25);
}

/* Responsive */
@media (max-width: 480px) {
  .password-input {
    padding-right: 50px !important;
  }
  
  .toggle-password {
    width: 32px;
    height: 32px;
    right: 10px;
  }
  
  .toggle-password i {
    font-size: 1rem;
  }
}

/* Efecto especial para el primer uso */
@keyframes firstToggleBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(-50%);
  }
  40% {
    transform: translateY(-60%);
  }
  60% {
    transform: translateY(-55%);
  }
}

.toggle-password.first-use {
  animation: firstToggleBounce 2s ease-in-out;
}