/* ═══════════════════════════════════════════════════════════════
   EXCELENCIA SCHOOL — Auth Login  (Diseño Glassmorphism)
   Layout: tarjeta centrada + fondo geométrico animado
   ═══════════════════════════════════════════════════════════════ */

:root {
  --blue-950: #060d2e;
  --blue-900: #0a1a6b;
  --blue-800: #0f2d9e;
  --blue-700: #1a3fc4;
  --blue-600: #2557e7;
  --cyan-500: #00c8e8;
  --cyan-400: #00deff;
  --cyan-300: #7ee8f8;
  --white:    #ffffff;
  --ink-900:  #0d1117;
  --ink-700:  #1f2937;
  --ink-500:  #4b5563;
  --ink-300:  #9ca3af;
  --danger:   #ef4444;
  --r-sm:  10px;
  --r-md:  18px;
  --r-lg:  28px;
  --r-xl:  40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-body {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--ink-900);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════
   FONDO ANIMADO
   ══════════════════════════════════════════════════════════════ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
  /* Fondo base */
  background: linear-gradient(145deg, #060d2e 0%, #091660 40%, #0f2d9e 75%, #0a3566 100%);
}

/* --- Orbes de luz -------------------------------------------- */
.auth-shell::before {
  content: "";
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,222,255,0.12) 0%, transparent 65%);
  top: -300px; left: -200px;
  animation: float1 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-shell::after {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,87,231,0.2) 0%, transparent 65%);
  bottom: -250px; right: -150px;
  animation: float2 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes float1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.08); }
}
@keyframes float2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-50px, -30px) scale(1.06); }
}

/* --- Figuras geométricas flotantes --------------------------- */
.auth-shape {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.07;
  animation: morphFloat 15s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-shape--1 {
  width: 340px; height: 340px;
  background: var(--cyan-400);
  top: 5%; right: 8%;
  animation-duration: 18s;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.auth-shape--2 {
  width: 240px; height: 240px;
  background: var(--blue-600);
  bottom: 10%; left: 5%;
  opacity: 0.12;
  animation-duration: 14s;
  animation-direction: alternate-reverse;
  border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
}

.auth-shape--3 {
  width: 160px; height: 160px;
  background: var(--cyan-500);
  top: 50%; left: 3%;
  opacity: 0.08;
  animation-duration: 20s;
}

.auth-shape--4 {
  width: 100px; height: 100px;
  background: var(--blue-500);
  top: 20%; left: 20%;
  opacity: 0.1;
  animation-duration: 11s;
  animation-direction: alternate-reverse;
  border-radius: 50%;
}

@keyframes morphFloat {
  0%   { transform: translate(0,0) rotate(0deg)   scale(1);    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  33%  { transform: translate(20px,-15px) rotate(5deg) scale(1.05); border-radius: 40% 60% 60% 40% / 50% 60% 40% 50%; }
  66%  { transform: translate(-10px,20px) rotate(-4deg) scale(0.97); border-radius: 70% 30% 50% 50% / 40% 60% 40% 60%; }
  100% { transform: translate(15px,10px) rotate(8deg) scale(1.03);  border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
}

/* --- Grid de puntos ------------------------------------------ */
.auth-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   TARJETA GLASSMORPHISM
   ══════════════════════════════════════════════════════════════ */
.auth-card {
  position: relative;
  z-index: 10;
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: var(--r-xl);
  padding: 48px 44px 44px;
  box-shadow:
    0 0 0 1px rgba(0,222,255,0.08),
    0 32px 80px rgba(6,13,46,0.6),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: cardIn 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Línea superior decorativa */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-400), transparent);
  border-radius: 999px;
}

/* ══════════════════════════════════════════════════════════════
   LOGO + NOMBRE (parte superior)
   ══════════════════════════════════════════════════════════════ */
.auth-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 36px;
  animation: fadeUp 0.6s ease 0.1s both;
}

.auth-logo-ring {
  width: 88px; height: 88px;
  border-radius: 26px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  box-shadow:
    0 0 0 4px rgba(0,222,255,0.2),
    0 0 0 8px rgba(0,222,255,0.07),
    0 16px 40px rgba(6,13,46,0.4);
  margin-bottom: 18px;
  overflow: hidden;
}

.auth-logo-ring img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-school-pretitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 4px;
  opacity: 0.9;
}

.auth-school-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.auth-school-name span {
  color: var(--cyan-400);
}

.auth-school-location {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   HEADER DEL FORMULARIO
   ══════════════════════════════════════════════════════════════ */
.auth-card__header {
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease 0.15s both;
}

.auth-card__header h2 {
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.auth-card__header p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/* Alerta */
.auth-alert {
  background: rgba(0,222,255,0.12);
  color: var(--cyan-300);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.88rem;
  border-left: 3px solid var(--cyan-400);
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════════
   FORMULARIO
   ══════════════════════════════════════════════════════════════ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.6s ease 0.2s both;
}

.auth-form__field {
  margin-bottom: 18px;
}

.auth-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

/* Input con ícono */
.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  transition: opacity 0.2s;
  opacity: 0.45;
}

.auth-input-wrap .input-icon svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-form input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(255,255,255,0.12);
  font-size: 0.97rem;
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-form input::placeholder { color: rgba(255,255,255,0.3); }

.auth-form input:focus {
  outline: none;
  border-color: var(--cyan-400);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(0,222,255,0.15);
}

.auth-form input:focus ~ .input-icon,
.auth-input-wrap:focus-within .input-icon {
  opacity: 0.9;
}

.auth-error {
  color: #fca5a5;
  font-size: 0.8rem;
  margin-top: 6px;
  font-weight: 600;
}

/* Fila recordar / olvidé */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  margin-top: -2px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.auth-check input[type="checkbox"] {
  width: 15px; height: 15px;
  border-radius: 4px;
  accent-color: var(--cyan-400);
  cursor: pointer;
  padding: 0;
}

.auth-check--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-check--disabled input { cursor: not-allowed; }

.auth-link {
  color: var(--cyan-400);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-link:hover { opacity: 0.8; text-decoration: underline; }

.auth-link--disabled {
  color: rgba(255,255,255,0.3);
  cursor: not-allowed;
  pointer-events: none;
  font-weight: 500;
}

/* Botón submit */
.auth-btn {
  width: 100%;
  border: none;
  padding: 15px;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--blue-950);
  background: linear-gradient(135deg, var(--cyan-400) 0%, var(--cyan-500) 100%);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,222,255,0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

/* Shimmer al hover */
.auth-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,222,255,0.45);
  filter: brightness(1.05);
}

.auth-btn:hover::after { transform: translateX(100%); }
.auth-btn:active { transform: translateY(0); }

/* Divisor */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.2);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* Footer */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  animation: fadeUp 0.6s ease 0.25s both;
}

.auth-footer a {
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-footer a:hover { color: var(--cyan-400); }

/* ══════════════════════════════════════════════════════════════
   Ocultar panel derecho/izquierdo (diseño sin split)
   ══════════════════════════════════════════════════════════════ */
.auth-card__left  { display: none; }
.auth-brand--mobile { display: none; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .auth-shell { padding: 0; align-items: flex-start; }
  .auth-shell::before,
  .auth-shell::after { display: none; }

  .auth-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    padding: 40px 24px 40px;
    border: none;
    box-shadow: none;
    animation: none;
    background: linear-gradient(160deg, #080f2a, #0c1d72);
  }

  .auth-card::before { display: none; }

  .auth-logo-ring { width: 76px; height: 76px; border-radius: 20px; }
  .auth-card__header h2 { font-size: 1.35rem; }
  .auth-form input { padding: 14px 16px 14px 44px; font-size: 1rem; }
  .auth-btn { padding: 15px; font-size: 1rem; }
  .auth-footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 400px) {
  .auth-card { padding: 36px 18px 36px; }
}
