/* =========================================================
   LOGIN SUPERADMIN
   Grupo Perseo
   Color principal: #041d4f
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --principal: #041d4f;
    --principal-hover: #062867;

    --azul-claro: #eaf0fa;
    --azul-suave: #f4f7fc;

    --blanco: #ffffff;

    --texto: #172033;
    --texto-secundario: #64748b;

    --borde: #dbe2ec;

    --error: #dc2626;
    --error-fondo: #fef2f2;

    --sombra:
        0 20px 60px rgba(4, 29, 79, 0.18);

    --sombra-suave:
        0 8px 25px rgba(4, 29, 79, 0.10);

    --radio: 14px;

    --fuente:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {

    box-sizing: border-box;
}


html {

    width: 100%;
    min-height: 100%;

    margin: 0;
    padding: 0;

    font-family: var(--fuente);

    background: var(--azul-suave);
}


body {

    width: 100%;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    font-family: var(--fuente);

    background:
        linear-gradient(
            135deg,
            #f7f9fc 0%,
            #eef3fa 100%
        );

    color: var(--texto);

    overflow-x: hidden;

    /*
    Centrado vertical y horizontal
    */
    display: flex;

    justify-content: center;

    align-items: center;
}


/* =========================================================
   ELEMENTOS GENERALES
========================================================= */

button,
input {

    font-family: var(--fuente);
}


button {

    cursor: pointer;
}


img {

    max-width: 100%;
}


/* =========================================================
   FIGURA DECORATIVA
========================================================= */

.glow-shape {

    position: fixed;

    width: 420px;
    height: 420px;

    top: -180px;
    right: -140px;

    background:
        radial-gradient(
            circle,
            rgba(4, 29, 79, 0.10) 0%,
            rgba(4, 29, 79, 0.04) 45%,
            transparent 72%
        );

    border-radius: 50%;

    pointer-events: none;

    z-index: 0;
}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.login-container {

    position: relative;

    z-index: 1;

    /*
    Tamaño controlado para PC
    */
    width: min(1000px, calc(100% - 40px));

    /*
    Altura controlada
    */
    height: 610px;

    max-height: calc(100vh - 50px);

    margin: 25px auto;

    display: grid;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);

    background: var(--blanco);

    border-radius: 20px;

    overflow: hidden;

    box-shadow: var(--sombra);

    flex-shrink: 0;
}


/* =========================================================
   PANEL IZQUIERDO / FORMULARIO
========================================================= */

.form-section {

    position: relative;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    padding: 35px 45px;

    background: var(--blanco);

    min-width: 0;

    min-height: 0;

    overflow: hidden;
}


/* =========================================================
   LOGO
========================================================= */

.form-section .logo {

    width: 100%;

    height: auto;

    min-height: 0;

    display: flex;

    justify-content: center;

    align-items: center;

    margin: 0 0 14px 0;

    padding: 0;

    background: transparent;

    border: none;

    border-radius: 0;

    box-shadow: none;

    position: relative;
}


/* =========================================================
   ELIMINAR DECORACIÓN ANTIGUA
========================================================= */

.form-section .logo::before,
.form-section .logo::after {

    content: none !important;

    display: none !important;
}


/* =========================================================
   IMAGEN DEL LOGO
========================================================= */

.form-section .logo img {

    display: block;

    width: 78px;

    height: 78px;

    max-width: 78px;

    max-height: 78px;

    object-fit: contain;

    margin: 0 auto;

    padding: 0;

    background: transparent;

    border: none;

    border-radius: 0;

    box-shadow: none;
}


/* =========================================================
   TÍTULO
========================================================= */

.form-section h2 {

    width: 100%;

    margin: 0;

    padding: 0;

    text-align: center;

    color: var(--principal);

    font-size: 27px;

    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -0.4px;
}


/* =========================================================
   SUBTÍTULO
========================================================= */

.form-section h3 {

    width: 100%;

    margin: 7px 0 24px;

    padding: 0;

    text-align: center;

    color: var(--texto-secundario);

    font-size: 13px;

    line-height: 1.5;

    font-weight: 400;
}


/* =========================================================
   CONTENEDOR DEL FORMULARIO
========================================================= */

.login-form {

    width: 100%;

    max-width: 360px;

    margin: 0 auto;
}


/* =========================================================
   MENSAJE DE ERROR
========================================================= */

.error-message {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 9px;

    margin: 0 0 15px;

    padding: 11px 13px;

    color: var(--error);

    background: var(--error-fondo);

    border: 1px solid #fecaca;

    border-radius: 9px;

    font-size: 12.5px;

    line-height: 1.4;
}


.error-message i {

    flex: 0 0 auto;

    font-size: 14px;
}


/* =========================================================
   GRUPO DE INPUT
========================================================= */

.input-group {

    position: relative;

    width: 100%;

    margin-bottom: 16px;
}


/* =========================================================
   ICONO DEL INPUT
========================================================= */

.input-group > i {

    position: absolute;

    left: 15px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--principal);

    font-size: 14px;

    z-index: 2;

    pointer-events: none;
}


/* =========================================================
   INPUT
========================================================= */

.input-group input {

    width: 100%;

    height: 51px;

    padding:
        19px
        48px
        5px
        44px;

    border: 1px solid var(--borde);

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: var(--texto);

    font-family: var(--fuente);

    font-size: 13.5px;

    line-height: 1.2;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.input-group input:hover {

    border-color: #b9c5d6;
}


.input-group input:focus {

    border-color: var(--principal);

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(4, 29, 79, 0.10);
}


/* =========================================================
   LABEL FLOTANTE
========================================================= */

.input-group label {

    position: absolute;

    left: 44px;

    top: 50%;

    transform: translateY(-50%);

    padding: 0 4px;

    color: #7b8799;

    background: transparent;

    font-family: var(--fuente);

    font-size: 13.5px;

    line-height: 1;

    pointer-events: none;

    transition:
        top 0.18s ease,
        font-size 0.18s ease,
        color 0.18s ease,
        background 0.18s ease;
}


/* =========================================================
   LABEL CON CONTENIDO
========================================================= */

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {

    top: 0;

    transform: translateY(-50%);

    background: var(--blanco);

    color: var(--principal);

    font-size: 10.5px;

    font-weight: 600;
}


/* =========================================================
   PASSWORD
========================================================= */

.password-group input {

    padding-right: 52px;
}


/* =========================================================
   BOTÓN MOSTRAR CONTRASEÑA
========================================================= */

.toggle-password {

    position: absolute;

    top: 50%;

    right: 7px;

    width: 36px;

    height: 36px;

    transform: translateY(-50%);

    display: flex;

    justify-content: center;

    align-items: center;

    border: none;

    border-radius: 8px;

    background: transparent;

    color: #64748b;

    font-size: 14px;

    padding: 0;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.toggle-password:hover {

    background: var(--azul-claro);

    color: var(--principal);
}


.toggle-password:focus-visible {

    outline: 2px solid var(--principal);

    outline-offset: 2px;
}


/* =========================================================
   BOTÓN INGRESAR
========================================================= */

.login-form form > button[type="submit"] {

    width: 100%;

    min-height: 51px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 9px;

    margin-top: 5px;

    padding: 12px 18px;

    border: none;

    border-radius: 10px;

    background: var(--principal);

    color: var(--blanco);

    font-family: var(--fuente);

    font-size: 13.5px;

    font-weight: 600;

    box-shadow:
        0 7px 16px rgba(4, 29, 79, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.login-form form > button[type="submit"]:hover {

    background: var(--principal-hover);

    transform: translateY(-1px);

    box-shadow:
        0 9px 20px rgba(4, 29, 79, 0.24);
}


.login-form form > button[type="submit"]:active {

    transform: translateY(0);

    box-shadow:
        0 5px 12px rgba(4, 29, 79, 0.18);
}


.login-form form > button[type="submit"]:focus-visible {

    outline: 3px solid rgba(4, 29, 79, 0.18);

    outline-offset: 2px;
}


/* =========================================================
   ICONOS FONT AWESOME
========================================================= */

.input-group > i,
.toggle-password i,
.error-message i,
.login-form form > button i,
.admin-overlay > i {

    font-family:
        "Font Awesome 6 Free" !important;

    font-weight: 900 !important;

    font-style: normal !important;
}


/* =========================================================
   FOOTER
========================================================= */

.form-section footer {

    width: 100%;

    margin-top: 22px;

    text-align: center;

    color: #7b8799;

    font-family: var(--fuente);

    font-size: 11px;

    line-height: 1.6;
}


.form-section footer small {

    color: var(--principal);

    font-size: 10.5px;

    font-weight: 600;
}


/* =========================================================
   PANEL DERECHO
========================================================= */

.video-section {

    position: relative;

    min-width: 0;

    min-height: 0;

    display: flex;

    justify-content: center;

    align-items: center;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #041d4f 0%,
            #0a2d68 55%,
            #123c7d 100%
        );
}


/* =========================================================
   DECORACIÓN PANEL DERECHO
========================================================= */

.video-section::before {

    content: "";

    position: absolute;

    width: 420px;

    height: 420px;

    top: -180px;

    right: -170px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,0.10);

    box-shadow:
        0 0 0 45px rgba(255,255,255,0.025),
        0 0 0 90px rgba(255,255,255,0.018);
}


.video-section::after {

    content: "";

    position: absolute;

    width: 280px;

    height: 280px;

    bottom: -140px;

    left: -110px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.035);
}


/* =========================================================
   CONTENIDO PANEL DERECHO
========================================================= */

.admin-overlay {

    position: relative;

    z-index: 2;

    width: min(380px, 80%);

    text-align: center;

    color: var(--blanco);
}


/* =========================================================
   ICONO PANEL DERECHO
========================================================= */

.admin-overlay > i {

    display: inline-flex;

    justify-content: center;

    align-items: center;

    width: 66px;

    height: 66px;

    margin-bottom: 18px;

    border-radius: 17px;

    background:
        rgba(255,255,255,0.10);

    border:
        1px solid rgba(255,255,255,0.15);

    color: var(--blanco);

    font-size: 28px;
}


/* =========================================================
   TÍTULO PANEL DERECHO
========================================================= */

.admin-overlay h2 {

    margin: 0 0 12px;

    color: var(--blanco);

    font-family: var(--fuente);

    font-size: 24px;

    line-height: 1.25;

    font-weight: 700;
}


/* =========================================================
   TEXTO PANEL DERECHO
========================================================= */

.admin-overlay p {

    margin: 0;

    color:
        rgba(255,255,255,0.78);

    font-family: var(--fuente);

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================================
   LAPTOP / PC PEQUEÑA
========================================================= */

@media (max-width: 1000px) {

    .login-container {

        width: min(940px, calc(100% - 30px));

        height: 590px;

        max-height: calc(100vh - 40px);

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 0.95fr);
    }


    .form-section {

        padding: 32px 35px;
    }


    .form-section .logo img {

        width: 74px;

        height: 74px;

        max-width: 74px;

        max-height: 74px;
    }


    .form-section h2 {

        font-size: 26px;
    }


    .admin-overlay h2 {

        font-size: 22px;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 800px) {

    body {

        /*
        Espacio arriba y abajo
        para no pegar el login al borde
        */
        min-height: 100vh;

        padding:
            30px
            0;

        display: flex;

        align-items: center;

        justify-content: center;

        overflow-y: auto;
    }


    .login-container {

        width: min(620px, calc(100% - 30px));

        height: auto;

        max-height: none;

        min-height: 0;

        margin: 0 auto;

        grid-template-columns: 1fr;

        border-radius: 18px;
    }


    .form-section {

        min-height: 600px;

        padding:
            42px
            45px
            38px;

        overflow: visible;
    }


    .video-section {

        display: none;
    }


    .form-section .logo img {

        width: 82px;

        height: 82px;

        max-width: 82px;

        max-height: 82px;
    }


    .form-section h2 {

        font-size: 28px;
    }


    .form-section h3 {

        margin-bottom: 28px;
    }


    .login-form {

        max-width: 420px;
    }
}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 600px) {

    body {

        min-height: 100vh;

        padding:
            24px
            0;

        align-items: center;
    }


    .glow-shape {

        width: 300px;

        height: 300px;

        top: -140px;

        right: -130px;
    }


    .login-container {

        width: calc(100% - 24px);

        margin: 0 auto;

        border-radius: 16px;

        box-shadow:
            0 12px 35px rgba(4, 29, 79, 0.14);
    }


    .form-section {

        min-height: 0;

        padding:
            36px
            24px
            30px;
    }


    .form-section .logo {

        margin-bottom: 14px;
    }


    .form-section .logo img {

        width: 76px;

        height: 76px;

        max-width: 76px;

        max-height: 76px;
    }


    .form-section h2 {

        font-size: 25px;

        letter-spacing: -0.2px;
    }


    .form-section h3 {

        margin-top: 7px;

        margin-bottom: 25px;

        font-size: 13px;
    }


    .login-form {

        max-width: 100%;
    }


    .input-group input {

        height: 52px;

        font-size: 14px;
    }


    .login-form form > button[type="submit"] {

        min-height: 52px;
    }


    .form-section footer {

        margin-top: 24px;
    }
}


/* =========================================================
   CELULAR PEQUEÑO
========================================================= */

@media (max-width: 420px) {

    body {

        padding:
            20px
            0;
    }


    .login-container {

        width: calc(100% - 16px);

        border-radius: 14px;
    }


    .form-section {

        padding:
            32px
            18px
            25px;
    }


    .form-section .logo img {

        width: 68px;

        height: 68px;

        max-width: 68px;

        max-height: 68px;
    }


    .form-section h2 {

        font-size: 23px;
    }


    .form-section h3 {

        font-size: 12.5px;

        margin-bottom: 22px;
    }


    .input-group {

        margin-bottom: 15px;
    }


    .input-group input {

        height: 50px;

        padding-left: 42px;

        font-size: 13px;
    }


    .input-group label {

        left: 42px;

        font-size: 13px;
    }


    .input-group input:focus + label,
    .input-group input:not(:placeholder-shown) + label {

        font-size: 10px;
    }


    .input-group > i {

        left: 14px;

        font-size: 14px;
    }


    .toggle-password {

        right: 6px;

        width: 36px;

        height: 36px;
    }


    .login-form form > button[type="submit"] {

        min-height: 50px;

        font-size: 13px;
    }


    .error-message {

        padding: 10px 12px;

        font-size: 12px;
    }
}


/* =========================================================
   CELULAR MUY PEQUEÑO
========================================================= */

@media (max-width: 340px) {

    body {

        padding:
            16px
            0;
    }


    .form-section {

        padding:
            28px
            14px
            22px;
    }


    .form-section .logo img {

        width: 62px;

        height: 62px;

        max-width: 62px;

        max-height: 62px;
    }


    .form-section h2 {

        font-size: 21px;
    }


    .form-section h3 {

        font-size: 12px;
    }
}


/* =========================================================
   PANTALLAS CON POCA ALTURA
========================================================= */

/*
   Importante:
   Si una PC tiene poca altura, NO intentamos
   mantener el login verticalmente centrado a la fuerza.
   Permitimos scroll para que nada quede cortado.
*/

@media (max-height: 700px) and (min-width: 801px) {

    body {

        min-height: 100vh;

        padding:
            20px
            0;

        align-items: flex-start;

        overflow-y: auto;
    }


    .login-container {

        height: 580px;

        max-height: none;

        margin:
            20px auto;
    }
}


/* =========================================================
   PANTALLAS MUY BAJAS
========================================================= */

@media (max-height: 600px) {

    body {

        align-items: flex-start;

        overflow-y: auto;

        padding-top: 15px;

        padding-bottom: 15px;
    }


    .login-container {

        margin-top: 15px;

        margin-bottom: 15px;
    }
}


/* =========================================================
   ACCESIBILIDAD
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;
    }
}