@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import url('../base/variables.css');
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
}

/* CONTENEDOR PRINCIPAL */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  position: relative;
  overflow: hidden;
}
.btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4a8df8 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(74, 141, 248, 0.35);
}

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

.back-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 6px 14px 6px 10px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  margin-bottom: 20px;
}

.back-btn:hover {
  color: blue;
}

.back-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* ══════════════════════════════════════
   LADO IZQUIERDO — Fondo azul claro
   ══════════════════════════════════════ */
.left {
  grid-column: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 22% 40px;
  position: relative;
  overflow: hidden;

  background: linear-gradient(
    145deg,
    #dbeafe 0%,
    #cbe2ff3f 45%,
    #e0f2fe 100%
  );
}

/* Grilla sutil sobre el fondo claro */
.left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 141, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 141, 248, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════
   CARD WRAPPER — contiene SVG + card
   ══════════════════════════════════════ */
.card-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  z-index: 5;
}

/* SVG del borde animado */
.card-border-svg {
  position: absolute;
  top: -3px;
  left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  z-index: 20;
  overflow: visible;
}

#borderRect {
  fill: none;
  stroke: url(#borderGradient);
  stroke-width: 3;
  stroke-linecap: round;
  /* dasharray y dashoffset se inyectan desde JS */
}

/* Card con glassmorphism */
.card {
  width: 100%;
  padding: 44px 40px 36px;
  border-radius: 22px;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 20px 60px rgba(37, 99, 235, 0.13),
    0 4px 16px rgba(37, 99, 235, 0.07);
  position: relative;
  z-index: 5;
}

/* Logo / ícono pequeño */
.card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.card-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(74,141,248,0.15), rgba(37,99,235,0.1));
  border: 1px solid rgba(74, 141, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(74, 141, 248, 0.2);
}

.card-logo-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1e3a5f;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.card .sub-heading {
  text-align: center;
  color: rgba(37, 99, 235, 0.5);
  font-size: 0.82rem;
  font-weight: 400;
  margin-bottom: 28px;
}

.card .sub {
  color: #6b7280;
}

/* ══════════════════════════════════════
   MENSAJES
   ══════════════════════════════════════ */
.error-box {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.875rem;
}

.info-box {
  background: #eff6ff;
  color: #1a4aad;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.875rem;
}

/* ══════════════════════════════════════
   INPUT GROUP
   ══════════════════════════════════════ */
.input-group {
  position: relative;
  margin-bottom: 28px;
}

.input-group .icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #9ca3af;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.input-group .icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.input-group input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 0 10px 26px;
  font-size: 14px;
  color: #111;
  font-family: 'Outfit', sans-serif;
  display: block;
}

/* LÍNEA BASE */
.input-group::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #d1d5db;
}

/* LÍNEA ACTIVA ANIMADA */
.input-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--glow);
}

.input-group:focus-within::after {
  width: 100%;
}

/* LABEL flotante */
.input-group label {
  position: absolute;
  left: 26px;
  top: 10px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Outfit', sans-serif;
  transition: all 0.25s ease;
  pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -14px;
  left: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: #2563eb;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-group:focus-within .icon {
  color: var(--accent);
}

/* TOGGLE PASSWORD */
.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 2;
}

.toggle-password:hover { color: var(--accent); }

.toggle-password svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(74, 141, 248, 0.2);
}

.divider span {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.forgot-link {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 0.82rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 14px;
  display: block;
  text-align: center;
  transition: color 0.2s;
}

.forgot-link:hover { color: var(--accent); }

/* ══════════════════════════════════════
   MANCHAS DECORATIVAS
   ══════════════════════════════════════ */
.mancha {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
  background-color: #bbdefd;
}

.num1 { top: -5%;  left: -5%; }
.num2 { top: 78%;  left: 3%; }
.num3 { top: 2%;   right: 10%; }
.num4 { top: 80%;  right: 10%; }

/* ══════════════════════════════════════
   TAGS FLOTANTES
   ══════════════════════════════════════ */
.subject-tag {
  position: absolute;
  z-index: 2;
  font-size: .72rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 5px 12px;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  animation: movimientoInfinito 5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes movimientoInfinito {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-15px); }
}

.tag-math { background: var(--yellow); top: 7%;    left: 5%;   animation-delay: 0s; }
.tag-sci  { background: var(--mint);   top: 14%;   right: 10%; animation-delay: 1s; }
.tag-lit  { background: var(--pink);   bottom: 18%; left: 6%;  animation-delay: 2s; }
.tag-hist { background: var(--blue);   bottom: 12%; right: 15%; animation-delay: 1.5s; }
.tag-comp { background: var(--coral);  top: 5%;   left: 20%; animation-delay: 0.5s; }
.tag-eng  { background: var(--yellow); top: 40%;   right: 20%; animation-delay: 2.5s; }
.tag-art  { background: var(--mint);   top: 60%;   left: 15%; animation-delay: 1.2s; }
.tag-music{ background: var(--pink);   top: 50%;   right: 25%; animation-delay: 0.8s; }
.tag-phys { background: var(--blue);   top: 30%;   left: 25%; animation-delay: 1.8s; }
.tag-bio  { background: var(--coral);  top: 20%;  right: 5%;  animation-delay: 0.3s; }

/* ══════════════════════════════════════
   LADO DERECHO (SLIDER)
   ══════════════════════════════════════ */
.right {
  grid-column: 2;
  position: relative;
  overflow: hidden;
}

.right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to right, rgba(219, 234, 254, 0.6) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.slider {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active { opacity: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 60, 120, 0.55) 0%,
    rgba(10, 30, 80, 0.65) 100%
  );
}

/* TEXTO DEL SLIDER */
.contenido {
  position: absolute;
  bottom: 100px;
  right: 50px;
  left: 50px;
  text-align: right;
  z-index: 2;
  color: white;
  width: 80%;
}

.contenido h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #a8d8f0, #ffffff 50%, #b5ead7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(74,141,248,0.4));
}

.contenido p {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.80);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   TÍTULO KLASSY
   ══════════════════════════════════════ */
.titulo-central {
  position: absolute;
  top: 15%;
  right: 3%;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', sans-serif;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 8px;
  z-index: 10;
  white-space: nowrap;
  background: linear-gradient(
    135deg,
    #4a8df8 0%,
    #71b2fd 30%,
    #70eaff 70%,
    #7dd3c8 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 5px rgba(74, 239, 248, 0.5));
  mix-blend-mode: normal;
}

/* ══════════════════════════════════════
   📱 MOBILE PERSONALIZADO (TU DISEÑO)
   ══════════════════════════════════════ */
@media (max-width: 768px) {

  /* Layout general */
  .login-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  /* ❌ Eliminamos slider */
  .right {
    display: none;
  }

  /* ✅ Ajustamos fondo */
  .left {
    padding: 80px 20px 40px;
    align-items: center;
    justify-content: center;
  }

  /* ✅ TÍTULO ARRIBA CENTRADO */
  .titulo-central {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    letter-spacing: 4px;
    text-align: center;
  }

  /* ✅ FORM CENTRADO Y NO FULL WIDTH */
  .card-wrapper {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .card {
    padding: 30px 24px;
    border-radius: 18px;
  }

  /* Inputs cómodos */
  .input-group input {
    font-size: 16px;
  }

  /* Botón más usable */
  .btn {
    padding: 15px;
    font-size: 16px;
  }

  /* ✅ MANTENER TAGS (pero ordenados) */
  .subject-tag {
    font-size: 0.65rem;
    padding: 4px 10px;
    opacity: 0.85;
  }

  /* Reubicar para que no estorben */
  .tag-math { top: 10%; left: 5%; }
  .tag-sci  { top: 12%; right: 5%; }
  .tag-lit  { bottom: 12%; left: 5%; }
  .tag-hist { bottom: 10%; right: 5%; }

  .tag-comp { top: 25%; left: 8%; }
  .tag-eng  { top: 30%; right: 8%; }
  .tag-art  { bottom: 25%; left: 10%; }
  .tag-music{ bottom: 28%; right: 10%; }

  .tag-phys { top: 45%; left: 6%; }
  .tag-bio  { top: 50%; right: 6%; }

  /* Opcional: suavizar manchas */
  .mancha {
    width: 150px;
    height: 150px;
    filter: blur(60px);
    opacity: 0.25;
  }
}