* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --azul: #0c2f67;
  --azul-suave: #204b8f;
  --verde: #0f6a3b;
  --verde-claro: #1f8d53;
  --rojo: #c81f25;
  --rojo-claro: #de2b30;
  --dorado: #caa12b;
  --crema: #fffdf7;
  --fondo-1: #eef3ef;
  --fondo-2: #e8efe7;
  --texto: #1f2e27;
  --blanco: #ffffff;
  --sombra: 0 20px 45px rgba(0, 0, 0, 0.12);
  --sombra-boton: 0 10px 22px rgba(0, 0, 0, 0.14);
}

body {
  min-height: 100vh;
  color: var(--texto);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at top right, rgba(202,161,43,0.10) 0%, rgba(202,161,43,0) 30%),
    linear-gradient(135deg, #f7faf7 0%, #eef3ef 35%, #e5ece6 100%);
  position: relative;
  overflow-x: hidden;
}

/* Detalles decorativos del fondo */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  filter: blur(2px);
  pointer-events: none;
}

body::before {
  width: 340px;
  height: 340px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(15,106,59,0.12) 0%, rgba(15,106,59,0) 70%);
}

body::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -70px;
  background: radial-gradient(circle, rgba(12,47,103,0.10) 0%, rgba(12,47,103,0) 72%);
}

/* CONTENEDOR PRINCIPAL */
.pantalla-login {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 16px;
  position: relative;
  z-index: 1;
}

/* TARJETA PRINCIPAL */
.card-login {
  width: 100%;
  max-width: 820px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(252,252,248,0.96) 100%);
  border: 1px solid #dce6dc;
  border-radius: 30px;
  box-shadow: var(--sombra);
  padding: 42px 42px 46px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

/* Franja superior decorativa */
.card-login::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: linear-gradient(90deg, var(--verde) 0%, var(--dorado) 50%, var(--rojo) 100%);
}

/* Sombra interna suave */
.card-login::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(202,161,43,0.14);
  pointer-events: none;
}

/* LOGO INSTITUCIONAL */
.logo-login {
  width: 500px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 28px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

/* TITULOS */
.titulo-principal {
  font-size: 2.7rem;
  color: var(--azul);
  margin-bottom: 8px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.subtitulo-principal {
  font-size: 1.35rem;
  color: var(--verde);
  margin-bottom: 24px;
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.subtitulo-principal::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 110px;
  height: 4px;
  background: linear-gradient(90deg, var(--verde), var(--dorado));
  transform: translateX(-50%);
  border-radius: 999px;
}

/* BLOQUE DE BIENVENIDA */
.bloque-bienvenida {
  margin: 12px auto 30px;
  max-width: 700px;
  background: linear-gradient(135deg, #fffefb 0%, #f9f7ef 100%);
  border: 1px solid #eee4bf;
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.bloque-bienvenida h3 {
  font-size: 2.2rem;
  color: var(--rojo);
  margin-bottom: 10px;
  font-weight: 800;
}

.texto-ingreso {
  font-size: 1.12rem;
  color: #2b3c33;
  margin-bottom: 18px;
  font-weight: 600;
}

.texto-institucional {
  max-width: 620px;
  margin: 0 auto 12px;
  font-size: 1rem;
  line-height: 1.75;
  color: #3a4b41;
}

.texto-institucional:last-child {
  margin-bottom: 0;
}

/* BOTONES */
.opciones-ingreso {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

.btn-ingreso {
  display: block;
  width: 100%;
  text-decoration: none;
  color: white;
  font-size: 1.18rem;
  font-weight: 800;
  padding: 19px 22px;
  border-radius: 18px;
  box-shadow: var(--sombra-boton);
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

/* brillo decorativo en los botones */
.btn-ingreso::before {
  content: "";
  position: absolute;
  top: 0;
  left: -18%;
  width: 36%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-22deg);
  transition: left 0.5s ease;
}

.btn-ingreso:hover::before {
  left: 115%;
}

.btn-ingreso:hover {
  transform: translateY(-4px) scale(1.01);
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.btn-ingreso:active {
  transform: translateY(-1px) scale(0.995);
}

.btn-ingresar {
  background: linear-gradient(135deg, #0d6a3b 0%, #198a50 45%, #27a260 100%);
}


/* PEQUEÑO BORDE DORADO ABAJO */
.opciones-ingreso::after {
  content: "";
  display: block;
  width: 170px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, var(--dorado) 20%, var(--dorado) 80%, transparent 100%);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .card-login {
    max-width: 760px;
    padding: 34px 26px 38px;
  }

  .titulo-principal {
    font-size: 2.3rem;
  }

  .subtitulo-principal {
    font-size: 1.2rem;
  }

  .bloque-bienvenida {
    padding: 22px 18px;
  }

  .bloque-bienvenida h3 {
    font-size: 1.95rem;
  }
}

@media (max-width: 768px) {
.logo-login {
  width: 380px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 22px;
}

  .card-login {
    border-radius: 24px;
    padding: 28px 18px 30px;
  }

  .card-login::after {
    inset: 10px;
    border-radius: 18px;
  }

  .logo-login {
    width: 120px;
  }

  .titulo-principal {
    font-size: 2rem;
  }

  .subtitulo-principal {
    font-size: 1.05rem;
    margin-bottom: 20px;
  }

  .bloque-bienvenida h3 {
    font-size: 1.7rem;
  }

  .texto-ingreso {
    font-size: 1rem;
  }

  .texto-institucional {
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .btn-ingreso {
    font-size: 1.05rem;
    padding: 16px 14px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .card-login {
    padding: 24px 14px 28px;
  }

.logo-login {
  width: 300px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px;
}

  .titulo-principal {
    font-size: 1.58rem;
  }

  .subtitulo-principal {
    font-size: 0.95rem;
    padding-bottom: 8px;
  }

  .subtitulo-principal::after {
    width: 90px;
    height: 3px;
  }

  .bloque-bienvenida {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .bloque-bienvenida h3 {
    font-size: 1.45rem;
  }

  .texto-ingreso {
    font-size: 0.95rem;
  }

  .texto-institucional {
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .opciones-ingreso {
    gap: 14px;
  }

  .btn-ingreso {
    font-size: 1rem;
    padding: 15px 12px;
  }
}

/* BOTÓN ADMINISTRADOR */

.btn-admin {
  background: linear-gradient(135deg, #2d2d2d, #1a1a1a, #000000);
  color: #ffffff;
  border: 2px solid #ffd700; /* Borde dorado para destacar */
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.btn-admin:hover {
  background: linear-gradient(135deg, #3d3d3d, #2a2a2a, #111111);
  border-color: #ffed4a;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* BOTÓN DOCENTE */
.btn-docente {
  background: linear-gradient(
    135deg,
    #c81f25 0%,
    #e85b24 50%,
    #f2b705 100%
  );
  color: #ffffff;
  border: none;
}

.admin-login {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.admin-login[hidden] { display: none; }
.campo-contrasena { display: flex; align-items: stretch; gap: 6px; }
.campo-contrasena input { flex: 1; min-width: 0; width: 100%; }
.campo-contrasena button, #otro-correo {
  padding: 10px; min-height: 44px; border: 1px solid #a7b6ad;
  border-radius: 10px; background: #fff; color: #194e36; cursor: pointer;
  font: inherit;
}
.ayuda-acceso { display: inline-block; padding: 12px 0; color: #194e36; text-decoration: underline; }
.admin-login button:disabled { opacity: .65; cursor: wait; }
.campo-contrasena button:focus-visible, .ayuda-acceso:focus-visible, #otro-correo:focus-visible {
  outline: 3px solid #a87900; outline-offset: 3px;
}

.admin-login label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2b3c33;
}

.admin-login input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd8d2;
  font-size: 1rem;
}

.admin-login input:focus {
  outline: none;
  border-color: var(--dorado);
  box-shadow: 0 0 0 3px rgba(202,161,43,0.18);
}

.admin-login input.campo-error {
  border-color: var(--rojo-claro);
  background: #fdeceb;
}

.mensaje-login {
  color: var(--rojo);
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 1.2em;
}

/* ================= MODALES ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 16, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 50;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.oculto {
  display: none;
}

.modal-caja {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--crema);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: var(--sombra);
  border: 1px solid #dce6dc;
  animation: slideUp 0.25s ease;
}

.modal-cerrar {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #6b7a71;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.modal-cerrar:hover {
  background: rgba(0,0,0,0.06);
  color: var(--texto);
}

.modal-titulo {
  font-size: 1.5rem;
  color: var(--azul);
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.modal-subtitulo {
  font-size: 0.95rem;
  color: #5b6b61;
  text-align: center;
  margin-bottom: 22px;
}

.modal-opciones {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-tipo-nuevo {
  background: linear-gradient(135deg, #0d6a3b 0%, #198a50 45%, #27a260 100%);
}

.btn-tipo-antiguo {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-suave) 100%);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .modal-caja {
    padding: 26px 20px 24px;
    border-radius: 18px;
  }
}

/* =========================================
   BOTÓN DOCENTE - INDEPENDIENTE
   ROJO → NARANJA → AMARILLO
   ========================================= */

.btn-docente {
  background: linear-gradient(
    135deg,
    #c81f25 0%,
    #e85b24 50%,
    #f2b705 100%
  ) !important;

  color: #ffffff !important;
  border: none !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.30);
}

/* Hover */
.btn-docente:hover {
  background: linear-gradient(
    135deg,
    #d9232a 0%,
    #f06a24 50%,
    #ffd21a 100%
  ) !important;

  color: #ffffff !important;
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

/* Cuando se presiona */
.btn-docente:active {
  transform: translateY(-1px) scale(0.995);
}

/* Brillo del botón */
.btn-docente::before {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0) 100%
  );
}
