/* ================================================
   SIREPA-i · Login renovado (panel lateral + calendario cívico)
   Panel blanco sólido con la caja de ingreso: el login nunca compite con las fotos ni con las animaciones
   festivas, que se dibujan sobre el lado del calendario. Colores del sistema: marino #102a4c, azul #1363D0.
   ================================================ */

.login-v2 {
    --lg-marino: #102a4c;
    --lg-azul: #1363D0;
    --lg-azul-osc: #0d4a9e;
    /* Neutros con un leve tinte azul, los mismos del calendario (fondo #eef2f7, bordes #d5dde8) */
    --lg-tinta: #1b2a41;
    --lg-suave: #56657d;
    --lg-icono: #6b7d96;
    --lg-campo: #f3f7fc;
    --lg-linea: #d5dde8;
    --lg-celeste: #E8F2F7;      /* --sirepai-primary-light */
    --lg-cielo: #F2F9FF;        /* --sirepai-primary-very-light */
    --lg-panel: 440px;
    --lg-ease: cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    min-height: 100vh;
    background: #eef2f7;
    color: var(--lg-tinta);
    font-family: 'Poppins', system-ui, sans-serif;
}
.login-v2 *, .login-v2 *::before, .login-v2 *::after { box-sizing: border-box; }

.lg { min-height: 100vh; display: grid; grid-template-columns: var(--lg-panel) minmax(0, 1fr); }

/* Panel lateral sólido */
.lg-panel {
    position: sticky; top: 0; z-index: 30; height: 100vh; min-height: 640px; overflow-y: auto;
    display: flex; flex-direction: column; align-items: center;
    padding: 26px clamp(20px, 3vw, 36px) 18px;
    background: linear-gradient(180deg, var(--lg-cielo) 0, #fff 260px); border-right: 1px solid var(--lg-linea); box-shadow: 8px 0 32px -16px rgba(16, 42, 76, .3);
}
.lg-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--lg-marino), var(--lg-azul)); }
.lg-col { width: 100%; max-width: 360px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 8px 0; }

/* Marca */
.lg-marca { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lg-logo { position: relative; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, var(--lg-celeste) 70%) !important; box-shadow: 0 0 0 6px var(--lg-cielo), inset 0 0 0 1px #cfdcf0; display: grid; place-items: center; margin-bottom: 12px; }
.lg-logo img { width: 44px; height: 44px; }
.lg-logo .logo-santa-hat { position: absolute; top: -14px; right: -6px; transform: rotate(18deg) scale(.8); }
.lg-nombre { margin: 0; font-size: 27px; font-weight: 600; color: var(--lg-marino); letter-spacing: .01em; line-height: 1.1; }
.lg-nombre i { font-style: normal; font-weight: 300; color: var(--lg-azul); }
.lg-sub { margin: 4px 0 0; font-size: 13px; font-weight: 400; color: var(--lg-suave); }

/* Mensaje de temporada: el mismo de siempre (clases holiday-message de cada fiesta), como cinta compacta */
.lg-marca .holiday-message {
    margin: 12px 0 0 !important; padding: 5px 14px !important; border-radius: 999px !important;
    font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.4 !important;
    max-width: 100%; animation: none !important;
}

/* Nos renovamos */
.lg-renovado {
    position: relative; display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 40px 12px 14px; border-radius: 12px;
    background: var(--lg-cielo);
    border: 1px solid #cfdcf0;
    animation: lgAparece .5s var(--lg-ease) both .2s;
}
.lg-renovado-ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--lg-azul); color: #fff; display: grid; place-items: center; font-size: 15px; }
.lg-renovado strong { display: block; font-size: 14px; color: var(--lg-marino); }
.lg-renovado p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--lg-suave); }
.lg-renovado-cerrar { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--lg-suave); cursor: pointer; }
.lg-renovado-cerrar:hover { background: var(--lg-celeste); color: var(--lg-marino); }
@keyframes lgAparece { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Caja de ingreso */
.lg-caja { position: relative; background: #fff; border: 1px solid var(--lg-linea); border-radius: 12px; padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 14px;
    box-shadow: 0 1px 2px rgba(16, 42, 76, .06), 0 14px 32px -20px rgba(16, 42, 76, .38); }
.lg-h1 { margin: 0 0 2px; text-align: center; font-size: 21px; font-weight: 600; color: var(--lg-marino); }
.lg-status { margin: 0; padding: 9px 12px; border-radius: 8px; background: #ecfdf3; color: #14532d; font-size: 14px; }

.lg-campo { display: flex; flex-direction: column; gap: 5px; }
.lg-input { position: relative; }
.lg-input > i.lg-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--lg-icono); font-size: 15px; pointer-events: none; transition: color 150ms ease; }
.lg-input:focus-within > i.lg-ico { color: var(--lg-azul); }
.lg-input input {
    width: 100%; height: 52px; padding: 19px 14px 5px 42px !important; margin: 0 !important;
    border: 1px solid var(--lg-linea); border-radius: 8px; background: var(--lg-campo);
    font: 400 15px 'Poppins', system-ui, sans-serif; color: var(--lg-tinta);
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.lg-input input:hover { border-color: #a9bcd6; }
.lg-input input:focus { outline: none; background: #fff; border-color: var(--lg-azul); box-shadow: 0 0 0 3px rgba(19, 99, 208, .2); }
.lg-input label {
    position: absolute; left: 42px; top: 50%; transform: translateY(-50%); margin: 0;
    font-size: 15px; font-weight: 400; color: var(--lg-icono); pointer-events: none; transform-origin: left center;
    transition: transform 160ms var(--lg-ease), color 160ms ease;
}
.lg-input input:focus + label, .lg-input input:not(:placeholder-shown) + label { transform: translateY(-118%) scale(.78); color: var(--lg-azul); font-weight: 600; }
.lg-campo.is-error input { border-color: #b3261e; }
.lg-campo.is-error .lg-input label { color: #a61b14; }
.lg-error { margin: 0; font-size: 13px; color: #b3261e; font-weight: 500; }
.lg-aviso { margin: 0; padding: 6px 10px; border-radius: 6px; background: #fef3c7; color: #713f12; font-size: 13px; font-weight: 500; }
.lg-input input#password { padding-right: 52px !important; }
.lg-ver { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--lg-suave); cursor: pointer; display: grid; place-items: center; font-size: 16px; }
.lg-ver:hover { background: var(--lg-celeste); color: var(--lg-azul); }

.lg-fila { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-link { font-size: 13.5px; color: var(--lg-azul); text-underline-offset: 3px; }
.lg-link:hover { color: var(--lg-azul-osc); }

/* Avisos push (misma casilla y lógica de siempre) */
.lg-caja .push-login { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13.5px; color: var(--lg-suave); cursor: pointer; line-height: 1.4; }
.lg-caja .push-login[hidden] { display: none; }
.lg-caja .push-login input[type="checkbox"] { position: static !important; left: auto !important; opacity: 1 !important; width: 17px; height: 17px; margin: 2px 0 0 !important; accent-color: var(--lg-azul); flex: none; }
.lg-caja .push-login i { color: var(--lg-azul); margin-right: 2px; }

.lg-btn {
    position: relative; height: 50px; border: 0; border-radius: 8px; background: var(--lg-azul-osc); color: #fff; cursor: pointer;
    font: 600 14.5px 'Poppins', system-ui, sans-serif; letter-spacing: .02em;
    box-shadow: 0 4px 12px -4px rgba(13, 74, 158, .6), inset 0 1px 0 rgba(255, 255, 255, .12); transition: background 200ms ease, box-shadow 200ms ease, transform 120ms var(--lg-ease);
}
/* Azul oscuro del sistema; al pasar el mouse, un punto más profundo */
.lg-btn:hover { background: #0a3b80; box-shadow: 0 6px 16px -4px rgba(13, 74, 158, .65), inset 0 1px 0 rgba(255, 255, 255, .12); }
.lg-btn:active { transform: scale(.98); }
.lg-btn[aria-disabled="true"] { cursor: progress; background: #0a3b80; }
.lg-btn-in { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.lg-spin { width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: lgGiro 700ms linear infinite; }
@keyframes lgGiro { to { transform: rotate(360deg); } }
.lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.is-temblor { animation: lgTemblor 320ms cubic-bezier(.645, .045, .355, 1); }
@keyframes lgTemblor { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }

/* Próxima fecha cívica y app */
/* En escritorio el calendario ya muestra las fechas; la tarjeta queda para el celular */
.lg-efem { display: none; }
.lg-efem { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--lg-cielo); border: 1px solid var(--lg-linea); font-size: 14px; font-weight: 500; color: var(--lg-tinta); }
.lg-efem span { display: block; font-size: 12.5px; font-weight: 400; color: var(--lg-suave); }
.lg-app { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--lg-linea); border-radius: 12px; background: var(--lg-cielo); }
.lg-app[hidden] { display: none; }
.lg-app img { flex: none; width: 84px; height: 84px; border-radius: 8px; border: 1px solid var(--lg-linea); background: #fff; }
.lg-app-txt { min-width: 0; }
.lg-app-txt strong { display: block; font-size: 13.5px; color: var(--lg-marino); }
.lg-app-txt p { margin: 2px 0 6px; font-size: 12.5px; color: var(--lg-suave); line-height: 1.4; }
.lg-app-acc { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.lg-app-acc .pwa-qr-pc { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--lg-azul); color: var(--lg-azul); background: #fff; cursor: pointer; }
.lg-app-acc .pwa-qr-pc[hidden] { display: none; }
.lg-app-acc a { font-size: 12.5px; font-weight: 600; color: var(--lg-azul); }
.lg-app-movil { display: none; flex-direction: column; gap: 8px; }
.lg-app-movil .pwa-btn-instalar { height: 46px; border-radius: 8px; border: 1px solid var(--lg-azul); background: #fff; color: var(--lg-azul); font-weight: 600; font-size: 14px; cursor: pointer; }
.lg-app-movil .pwa-btn-instalar[hidden] { display: none; }
.lg-app-movil .pwa-link-ayuda { text-align: center; font-size: 13px; color: var(--lg-azul); }
.lg-ente { margin: 10px 0 0; font-size: 12.5px; color: var(--lg-icono); text-align: center; }

.login-v2 :focus-visible { outline: 3px solid rgba(19, 99, 208, .55); outline-offset: 2px; }

/* Calendario cívico */
.lg-cal { position: sticky; top: 0; height: 100vh; min-height: 640px; padding: 24px clamp(20px, 2.5vw, 40px); }
.cc { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.cc-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-titulo { margin: 0; font-size: 21px; font-weight: 600; color: var(--lg-marino); }
.cc-nav { display: flex; align-items: center; gap: 6px; }
.cc-flecha, .cc-hoy-btn { height: 40px; min-width: 40px; border: 1px solid var(--lg-linea); border-radius: 8px; background: #fff; color: var(--lg-marino); cursor: pointer; display: grid; place-items: center; font-size: 14px; transition: background-color 150ms ease, border-color 150ms ease; }
.cc-hoy-btn { padding: 0 14px; font: 500 14px 'Poppins', system-ui, sans-serif; }
.cc-hoy-btn[hidden] { display: none; }
.cc-flecha:hover, .cc-hoy-btn:hover { background: var(--lg-celeste); border-color: #a9bcd6; color: var(--lg-azul); }
.cc-sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--lg-suave); padding-left: 4px; }
.cc-marco { position: relative; flex: 1; min-height: 0; display: grid; overflow: hidden; }
.cc-grid { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.cc-grid.cc-entra-sig { animation: ccSig 240ms var(--lg-ease) both; }
.cc-grid.cc-entra-ant { animation: ccAnt 240ms var(--lg-ease) both; }
@keyframes ccSig { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ccAnt { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.cc-celda { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid #d5dde8; background: rgba(255, 255, 255, .6); }
.cc-celda.is-vacia { border-style: dashed; background: transparent; }
.cc-n { position: absolute; left: 8px; top: 6px; z-index: 2; font-size: 13.5px; font-weight: 600; color: #94a0b2; }
.cc-celda.is-hoy { border: 2px solid var(--lg-azul); background: #fff; }
.cc-celda.is-hoy .cc-n { color: var(--lg-azul); }
.cc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: ccFoto 600ms var(--lg-ease) both; animation-delay: calc(120ms + var(--d, 0) * 70ms); }
@keyframes ccFoto { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
.cc-celda.is-foto { border-color: transparent; }
.cc-celda.is-foto::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(10, 20, 40, .82) 0%, rgba(10, 20, 40, .25) 50%, transparent 72%); }
.cc-celda.is-foto .cc-n { color: #13233f; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 0 7px; }
.cc-celda.is-foto.is-hoy { outline: 3px solid var(--lg-azul); outline-offset: 2px; }
.cc-tit { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 2; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cc-celda:not(.is-foto) .cc-tit { color: #9f1239; font-size: 11.5px; }
/* Fecha cívica sin foto (22/11/2026): solo el título, en marino; si además es feriado queda en vino */
.cc-celda.is-texto { background: rgba(232, 240, 252, .75); border-color: #c9dbf7; }
.cc-celda.is-texto:not(.is-feriado) .cc-tit { color: #102a4c; }
.cc-chip { position: absolute; right: 7px; top: 6px; z-index: 2; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.cc-chip-hoy { color: #fff; background: var(--lg-azul); }
.cc-chip-fer { color: #9f1239; background: #ffe4e6; }
.cc-vacio { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 12px 18px; border-radius: 10px; background: #fff; border: 1px solid #d5dde8; font-size: 14px; color: var(--lg-suave); }

/* Animaciones festivas: solo sobre el lado del calendario (nunca encima del formulario) */
.login-v2 .holiday-decorations,
.login-v2 .santa-flying-container { left: var(--lg-panel) !important; right: 0 !important; width: auto !important; }
.login-v2 .holiday-decorations { z-index: 20 !important; pointer-events: none; }
.login-v2 .holiday-decorations .interactive-decor,
.login-v2 .holiday-decorations button { pointer-events: auto; }

@media (max-width: 1280px) { .cc-tit { font-size: 11px; } }
@media (max-width: 1000px) {
    .login-v2 { background: #fff; }
    .lg { grid-template-columns: minmax(0, 1fr); }
    .lg-panel { position: static; height: auto; min-height: 100vh; box-shadow: none; border-right: 0; }
    .lg-cal { display: none; }
    .lg-efem:not([hidden]) { display: block; }
    .login-v2 .holiday-decorations, .login-v2 .santa-flying-container { left: 0 !important; }
    .login-v2 .holiday-decorations { z-index: 5 !important; }
    .lg-panel { z-index: auto; }
}
@media (max-width: 767.98px) {
    .lg-app { display: none !important; }
    .lg-app-movil { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
    .is-temblor, .cc-img, .cc-grid, .lg-renovado { animation: none !important; }
    .lg-spin { animation-duration: 1.6s; }
    .lg-input input, .lg-input label, .lg-btn { transition: none; }
}

/* Pantallas bajas (1366×768 y similares): panel más compacto para que la caja y el QR entren sin desplazarse */
@media (min-width: 1001px) and (max-height: 860px) {
    .lg-panel { padding-top: 16px; padding-bottom: 10px; }
    .lg-col { gap: 10px; padding: 0; }
    .lg-logo { width: 54px; height: 54px; margin-bottom: 6px; }
    .lg-logo img { width: 32px; height: 32px; }
    .lg-nombre { font-size: 23px; }
    .lg-sub { font-size: 12.5px; }
    .lg-marca .holiday-message { margin-top: 8px !important; }
    .lg-renovado { padding: 9px 38px 9px 12px; }
    .lg-renovado-ico { flex-basis: 30px; width: 30px; height: 30px; }
    .lg-caja { padding: 16px 20px 14px; gap: 10px; }
    .lg-h1 { font-size: 19px; }
    .lg-input input { height: 48px; }
    .lg-btn { height: 46px; }
    .lg-app { padding: 8px 10px; }
    .lg-app img { width: 68px; height: 68px; }
    .lg-ente { margin-top: 6px; }
}
