/* ============================================================
   LEONIX ERP — Split-Screen Login (2026 Redesign)
   ============================================================ */

/* Reset del fondo anterior para la pantalla de login */
#login-screen {
  background: none !important;
  display: flex !important;
  flex-direction: row !important;
  min-height: 100vh !important;
  width: 100vw !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 0; left: 0;
  z-index: 999;
  perspective: none !important;
  align-items: stretch !important;
  padding: 0 !important;
  justify-content: flex-start !important;
}

/* Ocultar elementos del fondo antiguo */
#login-screen .background-orb,
#login-screen .orbital-ring,
#login-screen .cyber-grid,
#login-screen .cyber-particles {
  display: none !important;
}

#login-screen.hidden {
  display: none !important;
}

/* ============================================================
   PANEL IZQUIERDO — Azul
   ============================================================ */
.ls-left {
  width: 50%;
  background: linear-gradient(135deg, #3b5bfc 0%, #2248f0 40%, #1a3de0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Círculo decorativo de fondo */
.ls-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  bottom: -200px;
  left: -100px;
  pointer-events: none;
}
.ls-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.ls-logo-wrap {
  margin-bottom: 20px;
}
.ls-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.25));
}

.ls-brand {
  text-align: center;
  margin-bottom: 32px;
}
.ls-brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  margin: 0 0 4px 0;
}
.ls-brand-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

.ls-tagline {
  text-align: center;
  max-width: 320px;
  margin-bottom: 40px;
}
.ls-tagline-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.4;
}
.ls-tagline-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin: 0;
}

.ls-features {
  display: flex;
  gap: 28px;
  justify-content: center;
}
.ls-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.ls-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  backdrop-filter: blur(4px);
}
.ls-feature-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ============================================================
   PANEL DERECHO — Blanco
   ============================================================ */
.ls-right {
  width: 50%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  flex-shrink: 0;
  position: relative;
}

.ls-form-wrap {
  width: 100%;
  max-width: 360px;
}

.ls-welcome {
  text-align: center;
  margin-bottom: 28px;
}
.ls-welcome-title {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px 0;
}
.ls-welcome-emoji {
  font-size: 22px;
  display: block;
  margin-bottom: 8px;
}
.ls-welcome-sub {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Campos del formulario */
.ls-field {
  margin-bottom: 16px;
}
.ls-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ls-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ls-input-icon {
  position: absolute;
  left: 14px;
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
}
.ls-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ls-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.ls-input-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  font-size: 14px;
  transition: color 0.2s;
}
.ls-input-toggle:hover { color: #2563eb; }

/* Row: remember + forgot */
.ls-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.ls-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.ls-remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
}
.ls-remember-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6b7280;
}
.ls-forgot {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
.ls-forgot:hover { text-decoration: underline; }

/* Botón principal */
.ls-btn {
  width: 100%;
  height: 48px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  position: relative;
  overflow: hidden;
}
.ls-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}
.ls-btn:active {
  transform: translateY(0);
}
.ls-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.ls-btn-arrow {
  font-size: 16px;
  transition: transform 0.2s;
}
.ls-btn:hover .ls-btn-arrow {
  transform: translateX(4px);
}
.ls-btn .spinner {
  width: 20px;
  height: 20px;
}

/* Tenant display */
.ls-tenant-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.ls-tenant-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ls-tenant-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 14px;
}
.ls-tenant-text small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ls-tenant-text span {
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}
.ls-tenant-change {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.ls-tenant-change:hover {
  background: #e0e7ff;
  color: #2563eb;
}

/* ============================================================
   ANIMACIÓN DE LOGIN EXITOSO — "Puertas que se abren"
   ============================================================ */
@keyframes slideOutLeft {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-105%); opacity: 0; }
}
@keyframes slideOutRight {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(105%); opacity: 0; }
}

#login-screen.login-success-anim .ls-left {
  animation: slideOutLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
#login-screen.login-success-anim .ls-right {
  animation: slideOutRight 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================================
   RESPONSIVE — Pantallas pequeñas
   ============================================================ */
@media (max-width: 768px) {
  #login-screen {
    flex-direction: column !important;
    overflow-y: auto !important;
    position: relative !important;
  }
  .ls-left {
    width: 100%;
    padding: 40px 24px 32px;
    min-height: auto;
  }
  .ls-right {
    width: 100%;
    padding: 36px 24px 48px;
  }
  .ls-features {
    gap: 20px;
  }
  .ls-right { min-height: 100vh; }
}
