/* ===== FONDO DEL LOGIN ===== */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #3730a3; /* Fondo oscuro profesional */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center; /* Centra el contenido */
  position: relative;
  overflow: hidden;
}

/* ===== CANVAS DE LA RED ANIMADA ===== */
#network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.login-container {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  left: 0;
  right: 0;
  max-width: 400px;
  width: 100%;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.08);
  padding: 2.5rem 2rem;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== LOGO Y TÍTULO ===== */
.logo-section {
  text-align: center;
  margin-bottom: 30px;
}

.logo-section h1 {
  color: #991b1b;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.logo-section p {
  color: #64748b;
  font-size: 14px;
}

/* ===== FORMULARIO ===== */
.form-group {
  margin-bottom: 20px;
  position: relative;
  overflow: hidden; /* <-- Añade esto */
}

.form-group input {
  width: 100%;
  box-sizing: border-box; /* <-- Añade esto */
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8fafc;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: #1e3a8a;
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group input::placeholder {
  color: #94a3b8;
}

/* ===== BOTÓN DE INICIO DE SESIÓN ===== */
.loginButton {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1e3a8a, #3730a3);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.loginButton::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.loginButton:hover::before {
  left: 100%;
}

.loginButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.loginButton:active {
  transform: translateY(0);
}

/* ===== MENSAJES DE ERROR ===== */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 480px) {
  .login-container {
    margin: 20px;
    padding: 30px 25px;
  }

  .logo-section h1 {
    font-size: 24px;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 41, 59, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 32px rgba(30, 41, 59, 0.18);
  text-align: center;
  max-width: 350px;
  width: 100%;
}
.modal-content h2 {
  margin-bottom: 1rem;
  color: #1e3a8a;
  font-size: 1.3rem;
}
.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}
.modal-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  color: #fff;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.modal-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.modal-btn:hover::before {
  left: 100%;
}

.modal-btn.promotor {
  background: linear-gradient(90deg, #1e3a8a 0%, #3730a3 100%);
}
.modal-btn.promotor:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}
.modal-btn.dashboard {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}
.modal-btn.dashboard:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}
