/* =========================================================
   RESET
========================================================= */

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

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

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: #172033;
    background: #f8fafc;
}


/* =========================================================
   LAYOUT
========================================================= */

.login-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}


/* =========================================================
   SIDEBAR
========================================================= */

.login-sidebar {
    position: relative;

    width: 180px;
    min-width: 180px;

    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 50px 20px 28px;

    color: white;

    background:
        linear-gradient(
            180deg,
            #0757da 0%,
            #0649bd 45%,
            #073a92 100%
        );
}


/* pequeña iluminación */

.login-sidebar::before {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    top: -90px;
    left: -90px;

    border-radius: 50%;

    background: rgba(255,255,255,.07);

    pointer-events: none;
}


/* marca */

.sidebar-brand {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.sidebar-logo {
    width: 62px;
    height: auto;

    margin-bottom: 16px;
}

.sidebar-company {
    display: flex;
    flex-direction: column;

    font-size: 19px;
    line-height: 1.15;
    font-weight: 700;

    letter-spacing: .5px;
}


/* footer sidebar */

.sidebar-footer {
    position: relative;
    z-index: 2;

    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 7px;

    color: rgba(255,255,255,.72);

    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   CONTENIDO DERECHO
========================================================= */

.login-content {
    position: relative;

    flex: 1;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;

    overflow: hidden;

    background:
        url("/img/login/background.png")
        center center /
        cover
        no-repeat;
}


/*
   Capa blanca para que la fotografía apenas se perciba.
*/

.background-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(248,250,252,.87) 0%,
            rgba(248,250,252,.93) 45%,
            rgba(248,250,252,.97) 100%
        );

    backdrop-filter: blur(1px);
}


/* detalle inferior */

.login-content::before {
    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    right: -260px;
    bottom: -270px;

    border: 1px solid rgba(37,99,235,.10);

    border-radius: 50%;

    z-index: 1;
}

.login-content::after {
    content: "";

    position: absolute;

    width: 400px;
    height: 400px;

    right: -200px;
    bottom: -210px;

    border: 1px solid rgba(37,99,235,.08);

    border-radius: 50%;

    z-index: 1;
}


/* =========================================================
   CARD LOGIN
========================================================= */

.login-card {
    position: relative;
    z-index: 10;

    width: 100%;
    max-width: 420px;

    padding: 42px 38px 36px;

    background: rgba(255,255,255,.97);

    border:
        1px solid
        rgba(226,232,240,.95);

    border-radius: 14px;

    box-shadow:
        0 18px 50px rgba(15,23,42,.08),
        0 2px 8px rgba(15,23,42,.04);
}


/* =========================================================
   LOGO
========================================================= */

.login-brand {
    display: flex;
    justify-content: center;

    margin-bottom: 25px;
}

.login-logo {
    max-width: 210px;
    max-height: 65px;

    width: auto;
    height: auto;
}


/* =========================================================
   CABECERA
========================================================= */

.login-header {
    text-align: center;

    margin-bottom: 34px;
}

.login-header h1 {
    color: #172033;

    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;

    margin-bottom: 8px;
}

.login-header p {
    color: #7b8799;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   FORMULARIO
========================================================= */

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #475569;

    font-size: 12px;
    font-weight: 500;
}


/* INPUT WRAPPER */

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;

    left: 14px;
    top: 50%;

    display: flex;

    transform: translateY(-50%);

    color: #94a3b8;

    pointer-events: none;
}


/* INPUT */

.input-wrapper input {
    width: 100%;
    height: 48px;

    padding:
        0
        16px
        0
        44px;

    color: #1e293b;

    font-family: inherit;
    font-size: 13px;

    background: #ffffff;

    border: 1px solid #d8e0ea;

    border-radius: 6px;

    outline: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.input-wrapper input::placeholder {
    color: #9aa5b5;
}

.input-wrapper input:hover {
    border-color: #b8c4d3;
}

.input-wrapper input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37,99,235,.10);
}


/* =========================================================
   BOTÓN
========================================================= */

.login-button {
    width: 100%;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 8px;

    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    border: 0;
    border-radius: 6px;

    cursor: pointer;

    background:
        linear-gradient(
            90deg,
            #1760e8 0%,
            #0757df 100%
        );

    box-shadow:
        0 4px 10px
        rgba(37,99,235,.16);

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

.login-button:hover {
    background:
        linear-gradient(
            90deg,
            #1357d5,
            #064bcc
        );

    box-shadow:
        0 6px 16px
        rgba(37,99,235,.22);
}

.login-button:active {
    transform: translateY(1px);
}


/* =========================================================
   OLVIDÉ CONTRASEÑA
========================================================= */

.forgot-password {
    margin-top: 21px;

    text-align: center;
}

.forgot-password a {
    color: #2563eb;

    font-size: 11px;
    font-weight: 500;

    text-decoration: none;

    transition: color .15s ease;
}

.forgot-password a:hover {
    color: #1d4ed8;

    text-decoration: underline;
}


/* =========================================================
   ERRORES
========================================================= */

.login-error {
    margin-bottom: 20px;

    padding: 12px 14px;

    color: #b42318;

    font-size: 12px;
    line-height: 1.5;

    background: #fef3f2;

    border: 1px solid #fee4e2;

    border-radius: 6px;
}


/* =========================================================
   AVISOS (sesión caducada, etc.)
========================================================= */

.login-notice {
    margin-bottom: 20px;

    padding: 12px 14px;

    color: #92400e;

    font-size: 12px;
    line-height: 1.5;

    text-align: center;

    background: #fffbeb;

    border: 1px solid #fde68a;

    border-radius: 6px;
}


/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 900px) {

    .login-sidebar {
        width: 140px;
        min-width: 140px;
    }

    .login-content {
        padding: 35px;
    }

}


/* =========================================================
   RESPONSIVE MÓVIL
========================================================= */

@media (max-width: 650px) {

    .login-layout {
        display: block;
    }


    /*
     Sidebar se convierte en cabecera
    */

    .login-sidebar {
        width: 100%;
        min-width: 100%;
        min-height: auto;

        height: 92px;

        flex-direction: row;

        padding: 15px 22px;
    }

    .sidebar-brand {
        flex-direction: row;

        gap: 12px;

        text-align: left;
    }

    .sidebar-logo {
        width: 40px;

        margin: 0;
    }

    .sidebar-company {
        font-size: 15px;
    }

    .sidebar-footer {
        width: auto;

        align-items: flex-end;

        font-size: 8px;
    }


    /*
     Contenido
    */

    .login-content {
        min-height:
            calc(100vh - 92px);

        padding: 24px 18px;
    }

    .login-card {
        max-width: 100%;

        padding:
            32px
            24px
            28px;

        border-radius: 12px;
    }

    .login-logo {
        max-width: 190px;
    }

}


/* =========================================================
   MÓVIL PEQUEÑO
========================================================= */

@media (max-width: 420px) {

    .sidebar-footer span:last-child {
        display: none;
    }

    .login-card {
        padding:
            28px
            20px
            26px;
    }

    .login-header h1 {
        font-size: 20px;
    }

}