/* =====================================================
   RESET
===================================================== */

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

/* =====================================================
   VARIABLES
===================================================== */

:root {
  --azul: #0b4f9c;
  --azul-oscuro: #08376d;
  --naranja: #f39c12;
  --blanco: #ffffff;
  --gris: #d9e2ef;
}

/* =====================================================
   BODY
===================================================== */

body {
  font-family: "Nunito Sans", sans-serif;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #06274d, #0b4f9c);
  overflow-x: hidden;
}

/* =====================================================
   COLLAGE FOTOGRÁFICO DEL LOGIN
===================================================== */

.login-fondos {
  position: fixed;
  inset: 0;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);

  width: 100%;
  height: 100vh;

  background: #06274d;

  overflow: hidden;

  pointer-events: none;

  z-index: 0;
}

/* =====================================================
   FOTOGRAFÍAS
===================================================== */

.login-fondo {
  min-width: 0;
  min-height: 0;

  background-color: #06274d;

  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  filter: brightness(0.88) saturate(0.86) contrast(0.98);
}

/* =====================================================
   ASIGNACIÓN DE FONDOS
===================================================== */

.login-fondo-1 {
  background-image: var(--login-fondo-1, none);
}

.login-fondo-2 {
  background-image: var(--login-fondo-2, none);
}

.login-fondo-3 {
  background-image: var(--login-fondo-3, none);
}

.login-fondo-4 {
  background-image: var(--login-fondo-4, none);
}

/* =====================================================
   CAPA DE VIDRIO SOBRE TODO EL COLLAGE
===================================================== */

.login-fondos::after {
  content: "";

  position: absolute;
  inset: 0;

  z-index: 5;

  background:
    radial-gradient(
      circle at center,
      rgba(2, 22, 55, 0.22) 0%,
      rgba(4, 34, 72, 0.14) 52%,
      rgba(5, 37, 70, 0.1) 100%
    ),
    rgba(8, 38, 74, 0.06);

  backdrop-filter: saturate(0.92);
  -webkit-backdrop-filter: saturate(0.92);

  pointer-events: none;
}

/* =====================================================
   PORTAL
===================================================== */

.portal {
  width: 100%;
  min-height: 100vh;

  position: relative;
  z-index: 1;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 40px;
}

/* =====================================================
   CÍRCULO
===================================================== */

.circulo {
  width: 700px;
  height: 700px;

  position: relative;

  border-radius: 50%;

  background: #06274df1;

  border: 2px solid #06274df1;

  backdrop-filter: blur(8px);

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow:
    0 0 60px rgba(248, 248, 248, 0.699),
    inset 0 0 40px rgba(255, 255, 255, 0.05);
}

/* =====================================================
   LOGIN
===================================================== */

.login {
  position: relative;

  z-index: 2;

  width: 340px;

  text-align: center;
}

/* =====================================================
   LOGO
===================================================== */

.logo-contenedor {
  width: 170px;
  height: 170px;

  margin: 0 auto 20px;

  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.05),
    0 0 25px rgba(255, 255, 255, 0.03);

  backdrop-filter: blur(6px);
}

.logo {
  width: 95px;

  margin: 0;
}

/* =====================================================
   TÍTULOS
===================================================== */

.login h1 {
  color: white;

  font-size: 2rem;

  font-weight: 800;
}

.login h2 {
  color: var(--gris);

  font-size: 1rem;

  font-weight: 400;

  margin-bottom: 35px;
}

/* =====================================================
   CAMPOS
===================================================== */

.campo {
  display: flex;
  align-items: center;

  gap: 12px;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 12px;

  padding: 15px 18px;

  margin-bottom: 18px;
}

.campo i {
  color: white;

  font-size: 1rem;
}

.campo input {
  flex: 1;

  background: none;

  border: none;

  outline: none;

  color: white;

  font-size: 1rem;

  font-family: inherit;
}

.campo input::placeholder {
  color: #c8d4e7;
}

/* =====================================================
   BOTÓN
===================================================== */

.btn-ingresar {
  width: 100%;

  margin-top: 10px;

  height: 55px;

  border: none;

  border-radius: 12px;

  background: var(--naranja);

  color: white;

  font-size: 1rem;

  font-weight: 700;

  cursor: pointer;

  transition: 0.3s;
}

.btn-ingresar:hover {
  background: #d98208;

  transform: translateY(-3px);
}

/* =====================================================
   RELOJ
===================================================== */

.reloj {
  position: absolute;

  width: 680px;
  height: 680px;

  border-radius: 50%;

  pointer-events: none;

  z-index: 1;
}

/* =====================================================
   MARCAS DEL RELOJ
===================================================== */

.marca {
  position: absolute;

  top: 0;
  left: 50%;

  width: 3px;
  height: 16px;

  background: rgba(255, 255, 255, 0.35);

  border-radius: 3px;

  transform-origin: center 340px;

  transition: 0.15s;
}

.marca.activa {
  background: #ffd54a;

  box-shadow:
    0 0 10px #ffd54a,
    0 0 20px #ffd54a;
}

.principal {
  height: 28px;

  width: 4px;

  background: rgba(255, 255, 255, 0.65);
}

.marca.blanca {
  background: #e8f1ff;

  box-shadow:
    0 0 10px #e8f1ff,
    0 0 20px #e8f1ff;
}

/* =====================================================
   MENSAJES LOGIN
===================================================== */

.mensaje-login {
  margin-top: 20px;

  min-height: 24px;

  color: #ffd54a;

  font-size: 0.95rem;

  font-weight: 600;
}

/* =====================================================
   RESPONSIVE - PORTAL INSTITUCIONAL
===================================================== */

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .portal {
    min-height: 100svh;

    padding: 24px 16px;
  }

  .circulo {
    width: 100%;
    max-width: 460px;

    height: auto;
    min-height: 0;

    border-radius: 28px;

    padding: 42px 24px;

    box-shadow:
      0 0 45px rgba(0, 0, 0, 0.3),
      inset 0 0 30px rgba(255, 255, 255, 0.04);
  }

  /* En celular ocultamos el reloj para priorizar
     comodidad, legibilidad y espacio del formulario */

  .reloj {
    display: none;
  }

  .login {
    width: 100%;

    max-width: 340px;
  }

  .logo-contenedor {
    width: 140px;
    height: 140px;

    margin-bottom: 18px;
  }

  .logo {
    width: 82px;
  }

  .login h1 {
    font-size: 1.75rem;

    line-height: 1.2;
  }

  .login h2 {
    font-size: 0.98rem;

    margin-top: 8px;
    margin-bottom: 28px;
  }

  .campo {
    padding: 14px 16px;

    margin-bottom: 15px;
  }

  .campo input {
    font-size: 1rem;
  }

  .btn-ingresar {
    height: 52px;

    margin-top: 8px;
  }

  .mensaje-login {
    margin-top: 16px;

    font-size: 0.9rem;
  }
}

/* =====================================================
   CELULARES PEQUEÑOS
===================================================== */

@media (max-width: 420px) {
  .portal {
    padding: 16px 12px;
  }

  .circulo {
    border-radius: 24px;

    padding: 34px 20px;
  }

  .logo-contenedor {
    width: 120px;
    height: 120px;

    margin-bottom: 16px;
  }

  .logo {
    width: 72px;
  }

  .login h1 {
    font-size: 1.55rem;
  }

  .login h2 {
    font-size: 0.92rem;

    margin-bottom: 24px;
  }

  .campo {
    padding: 13px 14px;
  }

  .btn-ingresar {
    height: 50px;
  }
}

/* =====================================================
   VOLVER AL SITIO PÚBLICO
===================================================== */

.btn-volver-sitio {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  margin-top: 18px;

  color: #e8f1ff;

  text-decoration: none;

  font-size: 0.92rem;

  font-weight: 700;

  transition: 0.25s;
}

.btn-volver-sitio:hover {
  color: #ffd54a;

  transform: translateX(-4px);
}

.texto-acceso {
  color: #ffffff;
}

.volver-sitio-publico {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  margin-top: 18px;

  color: #ffffff;

  font-size: 0.9rem;

  font-weight: 700;

  text-decoration: none;

  opacity: 0.9;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.volver-sitio-publico:hover {
  color: #ffffff;

  opacity: 1;

  transform: translateY(-2px);
}

/* =====================================================
   SELECTOR DE ROLES
===================================================== */

.selector-roles {
  width: 100%;

  text-align: center;
}

.selector-roles[hidden] {
  display: none;
}

.opciones-roles {
  display: flex;
  flex-direction: column;

  gap: 12px;

  margin-top: 22px;
}

.btn-rol-portal {
  width: 100%;

  min-height: 55px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 13px 18px;

  border: 1px solid rgba(255, 255, 255, 0.22);

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.1);

  color: var(--blanco);

  font-family: inherit;

  font-size: 1rem;

  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.btn-rol-portal:hover {
  background: var(--naranja);

  border-color: var(--naranja);

  transform: translateY(-2px);
}

.btn-rol-portal:disabled {
  opacity: 0.65;

  cursor: not-allowed;

  transform: none;
}

.btn-volver-cuenta {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  margin-top: 22px;

  padding: 0;

  border: none;

  background: transparent;

  color: #e8f1ff;

  font-family: inherit;

  font-size: 0.9rem;

  font-weight: 700;

  cursor: pointer;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.btn-volver-cuenta:hover {
  color: #ffd54a;

  transform: translateX(-3px);
}

@media (max-width: 420px) {
  .btn-rol-portal {
    min-height: 50px;

    font-size: 0.95rem;
  }

  .btn-volver-cuenta {
    font-size: 0.86rem;
  }
}
/* =====================================================
   SOLICITUD DE ACCESO - ALUMNO CON CURSADA COMPLETA
===================================================== */

.acceso-nuevo-alumno {
  width: 100%;

  margin-top: 4px;
  padding-top: 18px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.texto-nuevo-alumno {
  margin-bottom: 10px;

  color: #dce8f7;

  font-size: 0.86rem;
  font-weight: 600;

  line-height: 1.4;
}

/* Botón secundario.
   No debe competir visualmente con "Ingresar con Google". */

.btn-solicitar-acceso {
  width: 100%;

  min-height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  padding: 10px 16px;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;

  background: rgba(255, 255, 255, 0.06);

  color: #ffffff;

  font-family: inherit;

  font-size: 0.9rem;
  font-weight: 700;

  cursor: pointer;

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.btn-solicitar-acceso i {
  color: #ffd54a;

  font-size: 0.95rem;

  transition: color 0.22s ease;
}

.btn-solicitar-acceso:hover {
  background: rgba(255, 255, 255, 0.11);

  border-color: rgba(255, 213, 74, 0.75);

  transform: translateY(-2px);
}

.btn-solicitar-acceso:hover i {
  color: var(--naranja);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {
  .acceso-nuevo-alumno {
    padding-top: 16px;
  }

  .texto-nuevo-alumno {
    font-size: 0.83rem;
  }

  .btn-solicitar-acceso {
    min-height: 44px;

    font-size: 0.87rem;
  }
}

@media (max-width: 420px) {
  .acceso-nuevo-alumno {
    padding-top: 14px;
  }

  .texto-nuevo-alumno {
    font-size: 0.8rem;
  }

  .btn-solicitar-acceso {
    min-height: 43px;

    padding: 9px 12px;

    font-size: 0.84rem;
  }
}
/* =====================================================
   VISTA SOLICITUD DE ACCESO - ALUMNO
===================================================== */

/*
   La solicitud necesita un poco más de ancho que
   el login normal porque contiene más información.
*/

body:has(#vistaSolicitudAlumno:not([hidden])) .login {
  width: 460px;
}

/* Logo más compacto únicamente en esta vista */

body:has(#vistaSolicitudAlumno:not([hidden])) .logo-contenedor {
  width: 160px;
  height: 160px;

  margin-bottom: 5px;
}

body:has(#vistaSolicitudAlumno:not([hidden])) .logo {
  width: 95px;
}

/* Título institucional */

body:has(#vistaSolicitudAlumno:not([hidden])) .login h1 {
  font-size: 1.8rem;
}

body:has(#vistaSolicitudAlumno:not([hidden])) .login h2 {
  margin-top: 2px;
  margin-bottom: 20px;
}

/* =====================================================
   TEXTOS DE LA SOLICITUD
===================================================== */

.titulo-solicitud-alumno {
  margin-bottom: 6px;

  color: #ffffff;

  font-size: 0.92rem;
  font-weight: 600;

  line-height: 1.3;

  white-space: nowrap;
}

.descripcion-solicitud-alumno {
  margin-bottom: 14px;

  color: #dce8f7;

  font-size: 0.84rem;
  font-weight: 600;

  line-height: 1.3;
}

/* =====================================================
   BOTÓN VERIFICAR GOOGLE
===================================================== */

#vistaSolicitudAlumno #btnGoogleSolicitud {
  min-height: 44px;

  margin-bottom: 14px;
}

/* =====================================================
   CAMPOS
===================================================== */

#vistaSolicitudAlumno .campo {
  min-height: 48px;

  padding: 12px 16px;

  margin-bottom: 12px;
}

/* =====================================================
   VOLVER
===================================================== */

#vistaSolicitudAlumno .btn-volver-cuenta {
  margin-top: 10px;
}

/* =====================================================
   MENSAJE DE VERIFICACIÓN
===================================================== */

#vistaSolicitudAlumno .mensaje-login {
  margin-top: 10px;

  min-height: 18px;

  font-size: 0.86rem;

  line-height: 1.25;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {
  body:has(#vistaSolicitudAlumno:not([hidden])) .login {
    width: 100%;
    max-width: 340px;
  }

  .titulo-solicitud-alumno {
    font-size: 0.86rem;

    white-space: normal;
  }

  .descripcion-solicitud-alumno {
    font-size: 0.82rem;
  }
}
/* =====================================================
   AJUSTE BOTÓN ENVIAR SOLICITUD
===================================================== */

#vistaSolicitudAlumno form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#vistaSolicitudAlumno .campo {
  margin-bottom: 0;
}

#vistaSolicitudAlumno #btnEnviarSolicitud {
  width: 70%;
  max-width: 300px;

  height: 48px;
  min-height: 48px;

  margin: 4px auto 0;

  background: var(--naranja);
  color: var(--azul-oscuro);

  font-size: 0.95rem;
  font-weight: 800;

  box-shadow: none;
}

#vistaSolicitudAlumno #btnEnviarSolicitud i {
  color: var(--azul-oscuro);
}

#vistaSolicitudAlumno #btnEnviarSolicitud:hover {
  background: #d98208;
  color: var(--azul-oscuro);
}

#vistaSolicitudAlumno #btnEnviarSolicitud:hover i {
  color: var(--azul-oscuro);
}

#vistaSolicitudAlumno .btn-volver-cuenta {
  margin-top: 8px;
}
