/* Login SISNOMI - estilos propios, prefijo lg- para no chocar con Login.css */

@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700);

:root {
    --lg-brand: #1b5a7c;
    --lg-brand-hover: #226f99;
    --lg-accent: #7fc2e4;
    --lg-ink: #ffffff;
    --lg-ink-soft: rgba(255, 255, 255, 0.66);
}

html, body {
    height: 100%;
    width: 100%;
}

body.lg-body {
    margin: 0;
    font-family: 'Raleway', sans-serif;
    background: #0b1b24;
    overflow: hidden;
}

/* ---------- Fondo: carrusel con crossfade + Ken Burns ---------- */

.lg-screen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #123246, #071119);
}

.lg-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
    will-change: opacity, transform;
}

.lg-slide.is-active {
    opacity: 1;
    animation: lgKenBurns 20s ease-out forwards;
}

@keyframes lgKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.09); }
}

/* Velo para que el formulario sea legible sobre cualquier foto */
.lg-screen::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(100deg, rgba(5, 18, 26, 0.30) 0%, rgba(5, 18, 26, 0.52) 42%, rgba(5, 18, 26, 0.84) 100%);
}

/* ---------- Layout ---------- */

.lg-center {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 100vh;
    /* Padding inferior mayor = centrado optico: sube la tarjeta ~38px del centro exacto */
    padding: 24px clamp(16px, 6vw, 96px) 100px;
    box-sizing: border-box;
}

.lg-seal {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 3;
    opacity: 0;
    animation: lgFade .8s ease-out .9s forwards;
}

.lg-seal img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ---------- Tarjeta ---------- */

.lg-card {
    width: 360px;
    max-width: 100%;
    padding: 38px 34px 30px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(9, 26, 36, 0.52);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: var(--lg-ink);
}

/* Sin backdrop-filter (navegadores viejos) se compensa con mas opacidad */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .lg-card {
        background: rgba(9, 26, 36, 0.88);
    }
}

.lg-title {
    margin: 0 0 34px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .2px;
    text-align: center;
}

/* Si se vuelve a usar subtitulo, el margen inferior pasa a el */
.lg-title + .lg-subtitle {
    margin-top: -28px;
}

.lg-subtitle {
    margin: 0 0 34px;
    font-size: 13px;
    font-weight: 400;
    color: var(--lg-ink-soft);
    text-align: center;
}

/* ---------- Campos con label flotante ---------- */

.lg-field {
    position: relative;
    margin-bottom: 18px;
}

.lg-field input {
    width: 100%;
    height: 56px;
    padding: 22px 46px 6px 15px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--lg-ink);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .25s ease, background-color .25s ease;
}

.lg-field input:hover {
    border-color: rgba(255, 255, 255, 0.36);
}

.lg-field input:focus {
    outline: 0;
    border-color: var(--lg-accent);
    background: rgba(255, 255, 255, 0.10);
}

.lg-field input::-webkit-input-placeholder { color: transparent; }
.lg-field input::-moz-placeholder { color: transparent; opacity: 1; }
.lg-field input:-ms-input-placeholder { color: transparent; }

.lg-field label {
    position: absolute;
    top: 18px;
    left: 16px;
    color: var(--lg-ink-soft);
    font-size: 15px;
    pointer-events: none;
    transform-origin: left top;
    transition: transform .2s cubic-bezier(.4, 0, .2, 1), color .2s ease;
}

.lg-field input:focus + label,
.lg-field input:not(:placeholder-shown) + label,
.lg-field input:-webkit-autofill + label {
    transform: translateY(-11px) scale(.74);
    color: var(--lg-accent);
}

/* Linea de foco que crece desde el centro */
.lg-field::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    left: 50%;
    height: 2px;
    border-radius: 2px;
    background: var(--lg-accent);
    transition: left .3s cubic-bezier(.4, 0, .2, 1), right .3s cubic-bezier(.4, 0, .2, 1);
}

.lg-field:focus-within::after {
    right: 0;
    left: 0;
}

.lg-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    color: rgba(255, 255, 255, 0.42);
    transform: translateY(-50%);
    transition: color .25s ease;
}

.lg-field:focus-within .lg-icon {
    color: var(--lg-accent);
}

button.lg-icon {
    padding: 4px 6px;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 1;
}

button.lg-icon:hover {
    color: var(--lg-ink);
}

button.lg-icon:focus {
    outline: 1px dotted rgba(255, 255, 255, 0.5);
}

/* El autocompletado de Chrome pinta el input de amarillo; lo neutralizamos */
.lg-field input:-webkit-autofill,
.lg-field input:-webkit-autofill:hover,
.lg-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lg-ink);
    -webkit-box-shadow: 0 0 0 60px #14313f inset;
    caret-color: var(--lg-ink);
}

/* ---------- Aviso de Bloq Mayus ---------- */

.lg-caps {
    display: flex;
    align-items: center;
    max-height: 0;
    margin-top: -12px;
    overflow: hidden;
    opacity: 0;
    color: #ffd479;
    font-size: 12px;
    transition: max-height .25s ease, opacity .25s ease, margin .25s ease;
}

.lg-caps.is-on {
    max-height: 30px;
    margin-top: -8px;
    margin-bottom: 10px;
    opacity: 1;
}

.lg-caps i {
    margin-right: 6px;
}

/* ---------- Boton ---------- */

.lg-btn-wrap {
    position: relative;
    margin-top: 24px;
}

.lg-btn-wrap input.lg-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 9px;
    background: var(--lg-brand);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .25s ease, transform .12s ease;
}

.lg-btn-wrap input.lg-btn:hover {
    background: var(--lg-brand-hover);
    box-shadow: 0 10px 24px rgba(27, 90, 124, 0.45);
}

.lg-btn-wrap input.lg-btn:active {
    transform: translateY(1px);
}

.lg-btn-wrap input.lg-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(127, 194, 228, 0.45);
}

.lg-btn-wrap.is-loading input.lg-btn {
    color: transparent;
    pointer-events: none;
    opacity: .85;
}

.lg-btn-wrap.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lgSpin .7s linear infinite;
}

@keyframes lgSpin {
    to { transform: rotate(360deg); }
}

.lg-help {
    margin: 22px 0 0;
    color: var(--lg-ink-soft);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.lg-help strong {
    display: block;
    color: var(--lg-ink);
    font-weight: 600;
}

/* ---------- Entrada escalonada ---------- */

.lg-reveal {
    opacity: 0;
    animation: lgIn .55s cubic-bezier(.16, 1, .3, 1) forwards;
}

.lg-d1 { animation-delay: .10s; }
.lg-d2 { animation-delay: .18s; }
.lg-d3 { animation-delay: .26s; }
.lg-d4 { animation-delay: .34s; }
.lg-d5 { animation-delay: .42s; }

@keyframes lgIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes lgFade {
    to { opacity: 1; }
}

/* ---------- Responsive ---------- */

/* Ventana baja: se quita el centrado optico y se permite scroll */
@media (min-width: 768px) and (max-height: 640px) {
    body.lg-body {
        overflow: auto;
    }

    .lg-center {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

@media (max-width: 767px) {
    body.lg-body {
        overflow: auto;
    }

    .lg-center {
        justify-content: center;
        padding: 80px 18px 32px;
    }

    .lg-card {
        width: 100%;
        padding: 30px 22px 26px;
    }

    .lg-seal {
        top: 14px;
        right: 50%;
        transform: translateX(50%);
    }

    .lg-screen::after {
        background: linear-gradient(180deg, rgba(5, 18, 26, 0.55) 0%, rgba(5, 18, 26, 0.78) 100%);
    }
}

/* ---------- Accesibilidad: sin movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
    .lg-slide.is-active { animation: none; }
    .lg-slide { transition-duration: .01ms; }
    .lg-reveal,
    .lg-seal { animation: none; opacity: 1; }
    .lg-field::after { transition: none; }
    .lg-btn-wrap.is-loading::after { animation-duration: 2s; }
}
