/* ==========================================================
   LOGIN INLOP V2 — VIDEO BACKGROUND
   Panel objetivo: 370px × 254px
   No modifica la lógica de autenticación.
   ========================================================== */

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

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

body {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;

    /* Fallback si el video no carga */
    background: #071a2d url('../assets/images/login-inlop.jpg') center center / cover no-repeat;

    position: relative;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

/* VIDEO: capa inferior absoluta a toda la pantalla */
.login-background-video {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    min-width: 100vw;
    min-height: 100vh;

    object-fit: cover;
    object-position: center center;
    transform: scale(0.992);

    display: block;
    z-index: 0 !important;
    pointer-events: none;
}

/* Overlay sutil */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 1 !important;
}

/* LOGIN: siempre por encima del video */
.wrapper {
    position: relative !important;
    z-index: 10 !important;

    width: 370px;
    height: 254px;
    flex: 0 0 370px;

    margin-left: 8%;
    transform: translateY(105px);

    padding: 18px 22px;

    color: #fff;
    background: rgba(10, 18, 28, 0.58);

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

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

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wrapper h1 {
    margin: 0 0 12px;
    text-align: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 38px;
    margin: 0 0 10px;
}

.input-box input {
    width: 100%;
    height: 38px;
    padding: 0 42px 0 15px;

    color: #fff;
    font-size: 14px;
    font-weight: 400;

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

    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 20px;
    outline: none;
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.88);
}

.input-box input:focus {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.input-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    line-height: 1;
    pointer-events: none;
}

.wrapper .btn {
    width: 100%;
    height: 38px;
    margin-top: 2px;

    border: 0;
    outline: none;
    border-radius: 20px;

    background: #f4511e;
    color: #fff;

    box-shadow: 0 5px 14px rgba(244, 81, 30, 0.28);

    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 38px;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.wrapper .btn:hover {
    background: #ff5b24;
    box-shadow: 0 7px 18px rgba(244, 81, 30, 0.36);
    transform: translateY(-1px);
}

.wrapper .btn:active {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .wrapper {
        margin-left: 5%;
    }
}

@media (max-width: 600px) {
    body {
        justify-content: center;
        padding: 20px;
    }

    .wrapper {
        width: min(370px, calc(100vw - 40px));
        height: auto;
        min-height: 254px;
        flex-basis: auto;
        margin-left: 0;
        padding: 18px 20px;
    }
}


/* ==========================================================
   LOGIN INLOP V2 — MOBILE
   Fondo vertical 1080x1920 + login glassmorphism.
   Desktop permanece sin cambios.
   ========================================================== */

@media (max-width: 600px) {

    html,
    body {
        width: 100%;
        height: 100%;
        min-height: 100dvh;
        min-width: 0;
    }

    body {
        padding: 0;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    /* Video vertical exclusivo para móvil */
    .login-background-video {
        display: none !important;
    }

    .login-background-video-mobile {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-width: 100vw !important;
        min-height: 100dvh !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important;
        display: block !important;
        z-index: 0 !important;
        pointer-events: none;
    }

    /* Overlay ligeramente más oscuro para garantizar legibilidad */
    body::before {
        background: rgba(0, 0, 0, 0.16);
        z-index: 1 !important;
    }

    /* Login móvil: más ligero y transparente */
    .wrapper {
        position: relative !important;
        z-index: 10 !important;

        width: calc(100vw - 36px);
        max-width: 390px;
        height: auto;
        min-height: 0;
        flex: 0 1 auto;

        margin: 115px 0 0 0;
        padding: 22px 18px 20px;

        background: rgba(5, 18, 31, 0.52);
        border: 1px solid rgba(255, 255, 255, 0.26);
        border-radius: 18px;

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

        box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.32),
            inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    .wrapper h1 {
        margin: 0 0 16px;
        font-size: 25px;
        line-height: 1.1;
    }

    .wrapper .input-box {
        height: 46px;
        margin-bottom: 12px;
    }

    .input-box input {
        height: 46px;
        padding: 0 48px 0 16px;
        font-size: 15px;
        background: rgba(255, 255, 255, 0.10);
        border-color: rgba(255, 255, 255, 0.38);
        border-radius: 24px;
    }

    .input-box i {
        right: 16px;
        font-size: 18px;
    }

    .wrapper .btn {
        height: 46px;
        margin-top: 3px;
        border-radius: 24px;
        font-size: 16px;
        line-height: 46px;
    }
}

/* Pantallas móviles pequeñas */
@media (max-width: 380px) {
    .wrapper {
        width: calc(100vw - 28px);
        margin-top: 95px;
        padding: 19px 15px 17px;
    }

    .wrapper h1 {
        font-size: 23px;
        margin-bottom: 13px;
    }

    .wrapper .input-box,
    .input-box input,
    .wrapper .btn {
        height: 43px;
    }

    .wrapper .btn {
        line-height: 43px;
    }
}
