/**
 * Estudio Focal Point - Login Styles (2026)
 * Diseño a pantalla dividida inspirado en la estética corporativa y sobria
 */

.login-viewport {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 40%, #1e40af 0%, #1e3a8a 40%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

/* Efecto de luz ambiental sutil de fondo */
.login-viewport::before {
  content: "";
  position: absolute;
  top: -15%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(30, 58, 138, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

/* Contenedor central a pantalla dividida */
.login-split-card {
  width: 100%;
  max-width: 960px;
  min-height: 480px;
  display: flex;
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Columna Izquierda: Branding */
.login-brand-side {
  flex: 1.1;
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(147, 197, 253, 0.25);
  margin-bottom: 1.5rem;
  animation: brandItemFade 0.6s ease-out 0.2s both;
}

.brand-title {
  font-size: 2.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  animation: brandItemFade 0.7s ease-out 0.35s both;
}

.brand-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: brandItemFade 0.7s ease-out 0.45s both;
}

.brand-description {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 380px;
  border-left: 2px solid rgba(59, 130, 246, 0.6);
  padding-left: 1rem;
  animation: brandItemFade 0.7s ease-out 0.55s both;
}

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

/* Divisor vertical */
.login-divider-line {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 80%, transparent);
  align-self: stretch;
  animation: lineGrow 0.8s ease-out 0.3s both;
}

@keyframes lineGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Columna Derecha: Formulario */
.login-form-side {
  flex: 0.95;
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  animation: brandItemFade 0.7s ease-out 0.4s both;
}

.login-form-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.login-form-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.login-field {
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.login-input-wrap input:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.85);
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.login-input-wrap input::placeholder {
  color: #64748b;
}

.login-toggle-pwd {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.login-toggle-pwd:hover {
  color: #ffffff;
}

.login-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.login-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner para estado de carga */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  display: none;
}

.login-alert.show {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: brandItemFade 0.3s ease-out;
}

.login-alert-error {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

/* Pie de página discreto */
.login-footer-copy {
  position: absolute;
  bottom: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 820px) {
  .login-split-card {
    flex-direction: column;
    min-height: auto;
  }
  .login-divider-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 80%, transparent);
  }
  .login-brand-side, .login-form-side {
    padding: 2.25rem 1.75rem;
  }
  .brand-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .login-viewport {
    padding: 0.75rem;
  }
  .login-brand-side {
    padding: 1.75rem 1.25rem 1.25rem 1.25rem;
    align-items: center;
    text-align: center;
  }
  .brand-title {
    font-size: 1.5rem;
  }
  .login-form-side {
    padding: 1.5rem 1.25rem;
  }
  .login-form-title {
    font-size: 1.35rem;
  }
  .login-input {
    font-size: 16px !important;
    min-height: 46px;
  }
  .login-btn {
    min-height: 48px;
    font-size: 1rem;
  }
}

