/* ===== 2026-11: nuevo diseño de la página de inicio de sesión =====
   Solo aplica con <body class="zzLogin"> (index.php). Para regresar al diseño anterior:
   quitar el <link> de este archivo y la clase del body en index.php, y restaurar frm/mainFrm.php.
   Los diálogos Crear cuenta / Recuperar contraseña no se tocan (su estilo vive en estilos.css). */

body.zzLogin {
    --lg-verde: #A9D046;
    --lg-verde-osc: #7FA52A;
    --lg-pizarra: #435059;
    --lg-texto: #3B454B;
    --lg-gris: #6F7A80;
    --lg-borde: #DDE3E0;
    --lg-fondo: #F3F6F1;
    margin: 0;
    background: var(--lg-fondo);
    color: var(--lg-texto);
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.zzLogin .ui-widget, body.zzLogin .ui-widget input, body.zzLogin .ui-widget button { font-family: inherit; }
body.zzLogin #principal { position: static; width: auto; height: auto; top: 0; margin: 0; }

.lgPantalla { display: flex; min-height: 100vh; }

/* ---- panel de marca (izquierda) ---- */
.lgMarca {
    position: relative; overflow: hidden; flex: 0 0 32%; max-width: 440px; min-width: 330px;
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 32px 36px 0; box-sizing: border-box; color: #fff;
    background: linear-gradient(150deg, #B7DA55 0%, #A9D046 45%, #8DB834 100%);
}
.lgMarca::before, .lgMarca::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.lgMarca::before { width: 520px; height: 520px; right: -220px; top: -180px; }
.lgMarca::after  { width: 360px; height: 360px; left: -140px; bottom: -160px; background: rgba(67,80,89,.10); }
.lgMarca > * { position: relative; z-index: 1; }
.lgTextos { margin: auto 0; padding-bottom: 24px; }   /* centrado en el espacio libre sobre la imagen */
/* carrusel de imágenes (agenda / estadísticas): abajo, a todo el ancho del panel verde.
   Ambas imágenes tienen la misma proporción (1100x560) para que no "brinque" al cambiar. */
/* leyenda resaltada sobre el carrusel (también abre la ventana ampliada) */
.lgCarruselLeyenda { flex: none; position: relative; z-index: 1; align-self: center; display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
                     padding: 8px 16px; border-radius: 12px; background: var(--lg-pizarra); color: #fff; cursor: pointer;
                     font-size: 13px; font-weight: 700; line-height: 1.35; text-align: left;
                     box-shadow: 0 6px 18px rgba(47,58,64,.3); animation: lgLlama 2.4s ease-in-out infinite; }
.lgCarruselLeyenda:hover { background: #36424A; }
.lgCarruselLeyenda::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--lg-pizarra); }
.lgLeyendaIco { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--lg-verde); display: flex; align-items: center; justify-content: center; font-size: 15px; }
@keyframes lgLlama { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .lgCarruselLeyenda { animation: none; } }

/* enlace al sitio, debajo del carrusel */
.lgSitio { flex: none; display: block; width: calc(100% + 72px); margin: 0 -36px; padding: 7px 0 8px; text-align: center;
           background: var(--lg-pizarra); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .3px; text-decoration: none; }
.lgSitio:hover { color: var(--lg-verde); }
.lgCarrusel { position: relative; flex: none; width: calc(100% + 72px); margin: 0 -36px; aspect-ratio: 1100 / 560; cursor: zoom-in;
              overflow: hidden; border-radius: 10px 10px 0 0; box-shadow: 0 -8px 28px rgba(47,58,64,.25); background: #E6EAE4; }
/* las imágenes tienen proporciones distintas: se muestran completas (contain) sobre el fondo gris claro */
.lgDiapo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; transition: opacity .9s ease; }
.lgLupa { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(47,58,64,.78); color: #fff; font-size: 11.5px; font-weight: 700;
          padding: 4px 9px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.lgCarrusel:hover .lgLupa { opacity: 1; }

/* ventana para ver las imágenes en grande */
.lgVisor { display: none; position: fixed; inset: 0; z-index: 40000; background: rgba(30,38,42,.82); padding: 3vh 3vw; box-sizing: border-box;
           align-items: center; justify-content: center; }
.lgVisor.visible { display: flex; animation: lgAparece .2s ease-out; }
.lgVisorCaja { width: min(1280px, 100%); height: 100%; max-height: 900px; background: #fff; border-radius: 14px; overflow: hidden;
               display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.lgVisorEnc { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 20px; background: var(--lg-verde); color: var(--lg-pizarra); }
.lgVisorTit { font-size: 18px; font-weight: 800; }
.lgVisorNum { font-size: 13px; font-weight: 600; opacity: .8; white-space: nowrap; flex: none; }
.lgVisorTit { min-width: 0; }
.lgVisorCerrar { margin-left: auto; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255,255,255,.35); color: var(--lg-pizarra);
                 font-size: 24px; line-height: 1; cursor: pointer; }
.lgVisorCerrar:hover { background: #fff; }
.lgVisorImg { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; background: #EEF1EC; padding: 16px 64px; }
.lgVisorImg img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.18); background: #fff; }
.lgVisorFlecha { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer;
                 background: var(--lg-pizarra); color: #fff; font-size: 30px; line-height: 40px; opacity: .85; }
.lgVisorFlecha:hover { opacity: 1; }
.lgVisorFlecha.ant { left: 12px; }  .lgVisorFlecha.sig { right: 12px; }
.lgVisorTexto { flex: none; padding: 12px 24px; font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--lg-pizarra); text-align: center;
                background: #F9FFDB; border-bottom: 1px solid #E3EDBE; }
.lgVisorMinis { flex: none; display: flex; justify-content: center; gap: 8px; padding: 12px 16px 14px; overflow-x: auto; }
.lgVisorMinis img { width: 74px; height: 46px; object-fit: cover; object-position: top; border-radius: 5px; cursor: pointer; opacity: .55;
                    border: 2px solid transparent; flex: none; transition: opacity .15s; }
.lgVisorMinis img:hover { opacity: .9; }
.lgVisorMinis img.activa { opacity: 1; border-color: var(--lg-verde); }
@media (max-width: 860px) {
    .lgVisor { padding: 8px; }
    .lgVisorImg { padding: 10px 8px 56px; }
    .lgVisorFlecha { top: auto; bottom: 8px; transform: none; width: 40px; height: 40px; font-size: 26px; line-height: 36px; }
    .lgVisorTexto { font-size: 13.5px; padding: 10px 12px; }
    .lgVisorTit { font-size: 15px; }
}
.lgDiapo.activa { opacity: 1; }
.lgPuntos { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 6px;
            background: rgba(47,58,64,.55); padding: 4px 7px; border-radius: 10px; z-index: 2; }
.lgPuntos button { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: width .3s, background .3s; }
.lgPuntos button.activo { width: 20px; border-radius: 4px; background: #A9D046; }
.lgLogo img { width: 96px; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.lgLema  { margin: 20px 0 10px; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--lg-pizarra); }
.lgLemaSub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: #2F3A40; }
.lgBeneficios { list-style: none; margin: 0; padding: 0; }
.lgBeneficios li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--lg-pizarra); }
.lgBeneficios li span { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--lg-pizarra); color: var(--lg-verde);
                        display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }

/* ---- panel del formulario (derecha) ---- */
.lgPanel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; box-sizing: border-box; }
.lgTarjeta { width: 100%; max-width: 400px; box-sizing: border-box; background: #fff; border-radius: 16px; padding: 36px 36px 30px;
             box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 50px rgba(67,80,89,.12); }
.lgTitulo { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--lg-pizarra); }
.lgSub    { margin: 0 0 26px; font-size: 15px; color: var(--lg-gris); }

.lgCampo    { margin-bottom: 16px; }
.lgEtiqueta { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--lg-texto); }
.lgCaja     { position: relative; }
body.zzLogin .lgTarjeta input[type=text],
body.zzLogin .lgTarjeta input[type=password] {
    width: 100%; height: 46px; box-sizing: border-box; padding: 0 14px;
    border: 1.5px solid var(--lg-borde); border-radius: 10px; background: #FAFBFA;
    font-size: 16px; font-weight: 600; color: var(--lg-texto); outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
body.zzLogin .lgTarjeta #txtPassword { padding-right: 48px; }
body.zzLogin .lgTarjeta input[type=text]:focus,
body.zzLogin .lgTarjeta input[type=password]:focus { border-color: var(--lg-verde); background: #fff; box-shadow: 0 0 0 4px rgba(169,208,70,.22); }
body.zzLogin .lgTarjeta input::placeholder { color: #AAB3B0; font-weight: 400; text-transform: none; }

/* "mostrar contraseña": el checkbox original (#chkMostrar) queda oculto y la etiqueta es el botón del ojo */
.lgOculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lgOjo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px;
         display: flex; align-items: center; justify-content: center; cursor: pointer; color: #9AA5A1; }
.lgOjo:hover { background: #EEF2EE; color: var(--lg-pizarra); }
.lgOjo svg { width: 20px; height: 20px; }
.lgOjo .lgOjoAbierto { display: none; }
#chkMostrar:checked + .lgOjo { color: var(--lg-verde-osc); }
#chkMostrar:checked + .lgOjo .lgOjoAbierto { display: block; }
#chkMostrar:checked + .lgOjo .lgOjoCerrado { display: none; }
#chkMostrar:focus-visible + .lgOjo { box-shadow: 0 0 0 3px rgba(169,208,70,.45); }

.lgFilaRecu { display: flex; justify-content: flex-end; margin: -6px 0 18px; }
body.zzLogin #lblRecu { font-size: 13px; font-weight: 600; color: var(--lg-verde-osc); text-decoration: none; }
body.zzLogin #lblRecu:hover { text-decoration: underline; }

.lgCaptcha { display: flex; justify-content: center; margin-bottom: 16px; min-height: 78px; }

/* respuesta del servidor (inici__ar.php): se quita el fondo amarillo en línea y se muestra como aviso */
body.zzLogin #lblMensaje { margin: 0; font-size: 14px; font-weight: 600; color: #8A5A00; text-align: left; }
body.zzLogin #lblMensaje:not(:empty) { margin-bottom: 16px; padding: 10px 12px; background: #FFF6DD; border-left: 4px solid #F2B705; border-radius: 8px; line-height: 1.45; }
body.zzLogin #lblMensaje span { background: none !important; color: inherit !important; }

.lgBoton { width: 100%; height: 48px; border-radius: 10px; font-size: 15px; font-weight: 800; letter-spacing: .4px; cursor: pointer;
           transition: background .15s, box-shadow .15s, transform .05s; font-family: inherit; }
.lgBoton:active { transform: translateY(1px); }
.lgBotonPrin { border: none; color: #fff; background: var(--lg-pizarra); box-shadow: 0 6px 16px rgba(67,80,89,.25); }
.lgBotonPrin:hover { background: #36424A; }
.lgBotonSec  { border: 1.5px solid var(--lg-verde); color: var(--lg-pizarra); background: #fff; }
.lgBotonSec:hover { background: #F4FADF; }
body.zzLogin #btnIniciar, body.zzLogin #btnCrear { width: 100%; }
body.zzLogin #btnIniciar.ocupado { cursor: wait; opacity: .75; box-shadow: none; }

/* pantalla "Ingresando a ZZAssistant..." (acceso correcto, mientras abre el sistema) */
.lgIngresando { display: none; position: fixed; inset: 0; z-index: 30000; background: rgba(243,246,241,.97);
                flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.lgIngresando.visible { display: flex; animation: lgAparece .2s ease-out; }
.lgIngresandoLogo  { width: 90px; height: auto; margin-bottom: 26px; }
.lgIngresandoTexto { margin-top: 18px; font-size: 20px; font-weight: 800; color: var(--lg-pizarra); }
.lgIngresandoSub   { margin-top: 6px; font-size: 14px; color: var(--lg-gris); }
@keyframes lgAparece { from { opacity: 0; } to { opacity: 1; } }

.lgSeparador { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; font-size: 13px; color: var(--lg-gris); text-align: center; }
.lgSeparador::before, .lgSeparador::after { content: ""; flex: 1; height: 1px; background: var(--lg-borde); }
body.zzLogin #lblFamilia { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--lg-texto); text-align: center; }

.lgPie { margin-top: 22px; font-size: 12px; color: #98A29E; text-align: center; }
.lgPie a { color: inherit; }

/* pantallas bajas (laptop 768px): se compacta el panel verde para que la imagen se vea completa */
@media (max-height: 860px) and (min-width: 861px) {
    .lgMarca { padding-top: 20px; }
    .lgLogo img { width: 70px; }
    .lgLema { margin: 12px 0 6px; font-size: 22px; }
    .lgLemaSub { margin-bottom: 12px; font-size: 13.5px; line-height: 1.4; }
    .lgBeneficios li { margin-bottom: 6px; font-size: 13px; }
    .lgTextos { padding-bottom: 10px; }
    .lgCarruselLeyenda { margin-bottom: 8px; font-size: 12px; padding: 6px 14px; }
    .lgLeyendaIco { width: 26px; height: 26px; font-size: 13px; }
    .lgLogo img { width: 60px; }
    .lgBeneficios li { margin-bottom: 5px; }
}

/* ---- tableta / teléfono: la marca se vuelve un encabezado compacto ---- */
@media (max-width: 860px) {
    .lgPantalla { flex-direction: column; }
    .lgMarca { flex: none; flex-direction: row; align-items: center; gap: 16px; padding: 18px 16px 70px; }
    .lgLogo img { width: 64px; }
    .lgLema { margin: 0; font-size: 19px; }
    .lgLemaSub, .lgBeneficios, .lgCarrusel, .lgCarruselLeyenda, .lgSitio { display: none; }
    .lgTextos { margin: 0; padding: 0; display: flex; align-items: center; gap: 16px; }
    .lgPanel { justify-content: flex-start; padding: 0 16px 28px; margin-top: -54px; position: relative; z-index: 2; }
    .lgTarjeta { padding: 26px 20px 22px; }
}
@media (max-width: 360px) {
    .lgTarjeta { padding: 22px 12px 18px; }
    .lgCaptcha { transform: scale(.9); transform-origin: center; }
}
