/* ==========================================================================
   Estilos de Fondo Animado Logístico y Formulario Login - ISL MOVIL
   ========================================================================== */

:root {
  --form-bg-light: rgba(255, 255, 255, 0.95);
  --form-bg-dark: rgba(20, 27, 44, 0.95);
  --form-text-light: #1e293b;
  --form-text-dark: #f1f5f9;
  --input-bg-light: #eff5ff;
  --input-bg-dark: #eff5ff;
  --input-border-light: #cbd5e1;
  --input-border-dark: #cbd5e1;
  --input-text-light: #1e293b;
  --input-text-dark: #1e293b;
  --form-shadow-light: 0 20px 45px -10px rgba(29, 78, 216, 0.28), 0 0 25px rgba(59, 130, 246, 0.18);
  --form-shadow-dark: 0 20px 50px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Base Body y Contenedor Principal */
body.wrapperlogin {
  background: url('../img/empresa/wallpaper_main.png') center center / cover no-repeat fixed !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Overlay animado logístico */
.logistics-bg-animated {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.logistics-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 50%, rgba(255, 255, 255, 0) 0%, rgba(240, 246, 255, 0.15) 100%);
}

/* Pulso de radar en almacenes de la derecha */
.logistics-radar {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
  animation: radarPulse 3.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.logistics-radar.radar-1 {
  right: 20%;
  top: 45%;
  width: 90px;
  height: 90px;
  animation-delay: 0s;
}

.logistics-radar.radar-2 {
  right: 8%;
  top: 41%;
  width: 70px;
  height: 70px;
  animation-delay: 1.5s;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.3);
    opacity: 0.9;
  }

  70% {
    transform: scale(1.6);
    opacity: 0.15;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Pins de ubicación parpadeantes */
.logistics-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444, 0 0 20px rgba(239, 68, 68, 0.6);
}

.logistics-pin.pin-1 {
  right: 22.5%;
  top: 44.5%;
}

.logistics-pin.pin-2 {
  right: 9.3%;
  top: 40.5%;
}

.logistics-pin.pin-3 {
  right: 24.8%;
  top: 61.5%;
}

.pin-pulse {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.4);
  animation: pinPing 2s ease-out infinite;
}

@keyframes pinPing {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Partículas flotantes de ruta de logística */
.logistics-particles .particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
  animation: floatParticle 8s ease-in-out infinite;
}

.logistics-particles .p1 {
  right: 30%;
  top: 55%;
  width: 7px;
  height: 7px;
  animation-duration: 6s;
}

.logistics-particles .p2 {
  right: 42%;
  top: 72%;
  width: 9px;
  height: 9px;
  animation-duration: 9s;
  animation-delay: 1s;
}

.logistics-particles .p3 {
  right: 18%;
  top: 48%;
  width: 6px;
  height: 6px;
  animation-duration: 7s;
  animation-delay: 2s;
}

.logistics-particles .p4 {
  right: 55%;
  top: 80%;
  width: 8px;
  height: 8px;
  animation-duration: 8s;
  animation-delay: 0.5s;
}

.logistics-particles .p5 {
  right: 12%;
  top: 38%;
  width: 6px;
  height: 6px;
  animation-duration: 10s;
  animation-delay: 3s;
}

@keyframes floatParticle {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }

  50% {
    transform: translate(-30px, -25px) scale(1.3);
    opacity: 0.85;
  }
}

/* Estructura wrapper del Login */
.be-wrapper.be-login {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  width: 100%;
}

.be-wrapper.be-login .be-content {
  width: 100%;
  padding: 20px 0;
}

.be-wrapper.be-login .main-content {
  width: 100%;
}

/* Posicionamiento Desktop (cuadro rojo en la zona izquierda) */
@media (min-width: 992px) {
  .splash-container {
    width: 440px;
    max-width: 90%;
    margin-left: 11%;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* Posicionamiento Pantallas Grandes (ajuste proporcional) */
@media (min-width: 1400px) {
  .splash-container {
    margin-left: 13%;
  }
}

/* Posicionamiento Responsive (Tablet y Móvil - Centrado horizontalmente) */
@media (max-width: 991px) {
  .splash-container {
    width: 400px;
    max-width: 92%;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

/* Panel del Formulario con Borde Degradado y Sombra */
.splash-container .panel {
  border: 2.5px solid transparent !important;
  border-radius: 24px !important;
  /* background-image: linear-gradient(var(--card-bg, #ffffff), var(--card-bg, #ffffff)), 
                    linear-gradient(135deg, #1d4ed8 0%, #3b82f6 40%, #ef4444 75%, #60a5fa 100%) !important; */
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow: var(--card-shadow, var(--form-shadow-light)) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.splash-container .panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -10px rgba(29, 78, 216, 0.35), 0 0 35px rgba(59, 130, 246, 0.25) !important;
}

.splash-container .panel-heading {
  padding: 30px 25px 15px 25px !important;
  background: transparent !important;
  border-bottom: none !important;
  text-align: center;
}

.splash-container .panel-heading img.logo-img {
  max-width: 100%;
  height: auto;
  margin: 0 auto 15px auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.splash-container .splash-description {
  display: block;
  font-size: 14px;
  color: #64748b;
  margin-top: 8px;
  font-weight: 500;
}

.splash-container .panel-body {
  padding: 15px 30px 35px 30px !important;
}

/* Campos de Texto / Inputs */
.splash-container .form-control {
  height: 48px;
  border-radius: 12px !important;
  background-color: #eff5ff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-size: 15px;
  padding: 10px 16px;
  transition: all 0.25s ease;
  box-shadow: none !important;
}

.splash-container .form-control::placeholder {
  color: #64748b !important;
  opacity: 0.85;
}

.splash-container .form-control:focus {
  border-color: #3b82f6 !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18) !important;
}

.splash-container .form-control:-webkit-autofill,
.splash-container .form-control:-webkit-autofill:hover,
.splash-container .form-control:-webkit-autofill:focus,
.splash-container .form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 40px #eff5ff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  transition: background-color 5000s ease-in-out 0s;
}

.splash-container .form-group {
  margin-bottom: 20px;
}

/* Botón de Inicio de Sesión */
.splash-container .login-submit {
  margin-top: 25px;
  margin-bottom: 0;
}

.splash-container .btn-primary {
  width: 100%;
  height: 48px;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.25s ease !important;
  cursor: pointer;
}

.splash-container .btn-primary:hover,
.splash-container .btn-primary:focus {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5) !important;
  transform: translateY(-1px);
}

.splash-container .btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3) !important;
}

/* Soporte para Modo Oscuro (Dark Theme) */
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: var(--form-bg-dark);
    --card-shadow: var(--form-shadow-dark);
    --input-bg: var(--input-bg-light);
    --input-border: var(--input-border-light);
    --input-text: var(--input-text-light);
  }

  body.wrapperlogin {
    background-image: linear-gradient(rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.35)),
      url('../img/empresa/wallpaper_main.png') !important;
  }

  .splash-container .splash-description {
    color: #64748b;
  }

  .splash-container .form-control {
    background-color: #eff5ff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
  }

  .splash-container .form-control:focus {
    background-color: #ffffff !important;
    color: #1e293b !important;
  }
}

/* Soporte clase explicita dark/light */
body.dark-mode,
[data-theme="dark"] body.wrapperlogin {
  --card-bg: var(--form-bg-dark);
  --card-shadow: var(--form-shadow-dark);
  --input-bg: var(--input-bg-light);
  --input-border: var(--input-border-light);
  --input-text: var(--input-text-light);
}

body.dark-mode .splash-container .splash-description,
[data-theme="dark"] .splash-container .splash-description {
  color: #64748b;
}

body.dark-mode .splash-container .form-control,
[data-theme="dark"] .splash-container .form-control {
  background-color: #eff5ff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

body.dark-mode .splash-container .form-control:focus,
[data-theme="dark"] .splash-container .form-control:focus {
  background-color: #ffffff !important;
  color: #1e293b !important;
}