/* ============================================================
 * Login — rediseño "Oleada B" (V6)
 * Pantalla dividida: panel de marca a la izquierda + tarjeta
 * de acceso con efecto cristal a la derecha.
 * Sustituye a login__style1.css. Para revertir, restaurar el
 * enlace a style1 y el marcado anterior de login.html.
 * ============================================================ */

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(160deg, #0c1f4d 0%, #1e3a8a 38%, #1e40af 64%, #2563eb 100%);
  position: relative;
  overflow-x: hidden;
}

/* Surcos de campo: líneas diagonales muy sutiles sobre el fondo */
body.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    transparent 0px,
    transparent 26px,
    rgba(255, 255, 255, 0.025) 26px,
    rgba(255, 255, 255, 0.025) 28px
  );
  pointer-events: none;
}

/* Manchas de luz flotantes */
.login-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  animation: blob-float 14s ease-in-out infinite;
}

.login-blob--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.55), transparent 70%);
}

.login-blob--2 {
  width: 360px;
  height: 360px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35), transparent 70%);
  animation-delay: -7s;
}

.login-blob--3 {
  width: 260px;
  height: 260px;
  top: 40%;
  left: 42%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.3), transparent 70%);
  animation-delay: -3.5s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(24px, -28px) scale(1.06); }
}

/* ---------- Estructura dividida ---------- */
.login-split {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* Panel de marca (izquierda) */
.login-brand {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 5rem;
  color: #ffffff;
}

.login-brand .brand-logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(2, 11, 31, 0.35);
}

.login-brand h1 {
  font-size: clamp(2.1rem, 3.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.login-brand h1 .brand-accent {
  background: linear-gradient(90deg, #93c5fd, #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand .brand-claim {
  font-size: 1.08rem;
  color: rgba(226, 236, 252, 0.85);
  max-width: 34rem;
  line-height: 1.6;
  margin: 0 0 2.4rem;
}

.login-brand .brand-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.login-brand .brand-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #eaf2ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.login-brand .brand-features i {
  color: #93c5fd;
}

/* Panel del formulario (derecha) */
.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

/* Tarjeta cristal */
.login-card {
  width: 100%;
  max-width: 430px;
  padding: 2.6rem 2.4rem 2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 30px 70px rgba(2, 11, 31, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: card-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card .card-header-login {
  text-align: center;
  margin-bottom: 1.8rem;
}

.login-card .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.8rem;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.35);
}

.login-card h2 {
  color: #16275c;
  font-weight: 800;
  font-size: 1.45rem;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}

.login-card .card-subtitle-login {
  color: #64748b;
  font-size: 0.92rem;
  margin: 0;
}

/* Formulario */
.login-card .form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.login-card .input-group-text {
  background: rgba(248, 250, 252, 0.9);
  border: 2px solid #e2e8f0;
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: #64748b;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.login-card .form-control {
  padding: 0.8rem 1rem;
  border-radius: 0 12px 12px 0;
  border: 2px solid #e2e8f0;
  border-left: none;
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.login-card .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.login-card .input-group:focus-within .input-group-text {
  border-color: #3b82f6;
  color: #2563eb;
}

.login-card .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.login-card .form-check-label {
  font-size: 0.875rem;
  color: #475569;
}

/* Botón de entrada */
.btn-login {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border: none;
  padding: 0.85rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 12px 26px rgba(30, 64, 175, 0.35);
}

.btn-login:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(30, 64, 175, 0.45);
  color: #fff;
}

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

/* Errores */
.login-card .alert {
  border-radius: 12px;
  border: none;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
}

.login-card .alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Pie */
.login-card .footer-text {
  text-align: center;
  margin-top: 1.7rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.login-card .footer-text small {
  color: #94a3b8;
  font-size: 0.78rem;
}

.login-legal-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.9rem;
}

.login-legal-links a {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-legal-links a:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .login-brand { display: none; }
  .login-panel { padding: 2rem 1.25rem; }
}

@media (max-width: 575.98px) {
  .login-card { padding: 2rem 1.4rem 1.6rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .login-blob { animation: none; }
  .login-card { animation: none; }
  .btn-login,
  .login-card .form-control,
  .login-card .input-group-text { transition: none; }
}
