/* ============================================================
   SGBI
   Sistema de Gestión de Bienestar Institucional
   Hoja de estilos principal
   ============================================================ */


/* ============================================================
   VARIABLES GENERALES
   ============================================================ */

:root {
    --sgbi-primary: #101e4b;
    --sgbi-primary-light: #2f4d8a;
    --sgbi-secondary: #12bce5;
    --sgbi-secondary-dark: #079bc3;

    --sgbi-white: #ffffff;

    --sgbi-background: #f4f7fb;

    --sgbi-text: #1d2740;
    --sgbi-muted: #6c7588;

    --sgbi-border: #dfe5ef;

    --sgbi-danger: #b42318;
    --sgbi-danger-bg: #fff1f0;

    --sgbi-success: #157347;
    --sgbi-success-bg: #eaf8f0;

    --sgbi-warning: #997404;
    --sgbi-warning-bg: #fff8db;

    --sgbi-info: #055160;
    --sgbi-info-bg: #e8f8fc;

    --sgbi-shadow:
        0 20px 50px rgba(16, 30, 75, 0.13);
}


/* ============================================================
   RESET
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    min-height: 100%;
}


body {
    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color: var(--sgbi-text);

    background: var(--sgbi-background);
}


img {
    max-width: 100%;
}


/* ============================================================
   LOGIN
   ============================================================ */

.login-body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}


.login-wrapper {
    width: 100%;
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(500px, 56%)
        minmax(420px, 44%);
}


/* ============================================================
   PANEL IZQUIERDO
   ============================================================ */

.login-brand-panel {
    position: relative;

    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow: hidden;

    padding: 55px 70px;

    background:
        linear-gradient(
            145deg,
            #081332 0%,
            #101e4b 52%,
            #294a87 100%
        );

    color: var(--sgbi-white);
}


.brand-content {
    position: relative;

    z-index: 5;

    width: 100%;
    max-width: 720px;
}


/* ============================================================
   LOGO
   ============================================================ */

.brand-logo-container {
    width: 100%;
    max-width: 560px;

    padding: 18px 22px;

    margin-bottom: 40px;

    background: var(--sgbi-white);

    border-radius: 20px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.18);
}


.brand-logo {
    display: block;

    width: 100%;
    max-width: 520px;

    height: auto;

    max-height: 210px;

    margin: 0 auto;

    object-fit: contain;
}


/* ============================================================
   TEXTO INSTITUCIONAL
   ============================================================ */

.brand-system {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--sgbi-secondary);

    font-size: 18px;
    font-weight: 800;

    letter-spacing: 6px;
}


.brand-text h1 {
    max-width: 650px;

    margin: 0 0 24px 0;

    color: var(--sgbi-white);

    font-size: clamp(40px, 4vw, 62px);

    font-weight: 300;

    line-height: 1.08;
}


.brand-text h1 strong {
    display: block;

    margin-top: 5px;

    font-weight: 700;
}


.brand-text p {
    max-width: 610px;

    margin: 0;

    color: rgba(255, 255, 255, 0.82);

    font-size: 18px;

    line-height: 1.7;
}


.brand-footer {
    position: absolute;

    left: 70px;
    bottom: 28px;

    z-index: 5;

    color: rgba(255, 255, 255, 0.65);

    font-size: 13px;
}


/* ============================================================
   DECORACIÓN PANEL IZQUIERDO
   ============================================================ */

.brand-decoration {
    position: absolute;

    border-radius: 50%;

    background:
        rgba(
            18,
            188,
            229,
            0.11
        );
}


.decoration-one {
    width: 440px;
    height: 440px;

    top: -170px;
    right: -170px;
}


.decoration-two {
    width: 280px;
    height: 280px;

    right: 20px;
    bottom: 35px;
}


.decoration-three {
    width: 160px;
    height: 160px;

    left: -60px;
    bottom: 120px;
}


/* ============================================================
   PANEL DERECHO
   ============================================================ */

.login-form-panel {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 40px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f4f7fb 100%
        );
}


/* ============================================================
   TARJETA LOGIN
   ============================================================ */

.login-card {
    width: 100%;
    max-width: 480px;

    padding: 48px;

    background: var(--sgbi-white);

    border:
        1px solid rgba(16, 30, 75, 0.06);

    border-radius: 24px;

    box-shadow: var(--sgbi-shadow);
}


.login-mobile-logo {
    display: none;
}


/* ============================================================
   CABECERA LOGIN
   ============================================================ */

.login-header {
    margin-bottom: 34px;
}


.login-badge {
    display: inline-block;

    padding: 8px 15px;

    margin-bottom: 17px;

    background:
        rgba(
            18,
            188,
            229,
            0.12
        );

    color: var(--sgbi-primary-light);

    border-radius: 30px;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.8px;

    text-transform: uppercase;
}


.login-header h2 {
    margin: 0 0 10px 0;

    color: var(--sgbi-primary);

    font-size: 36px;
    font-weight: 750;
}


.login-header p {
    margin: 0;

    color: var(--sgbi-muted);

    font-size: 15px;

    line-height: 1.6;
}


/* ============================================================
   FORMULARIOS
   ============================================================ */

.form-group-sgbi {
    margin-bottom: 22px;
}


.form-group-sgbi .form-label {
    display: block;

    margin-bottom: 8px;

    color: var(--sgbi-text);

    font-size: 14px;

    font-weight: 600;
}


.input-group-sgbi {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
}


.input-icon {
    position: absolute;

    left: 17px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    pointer-events: none;

    color: var(--sgbi-primary-light);

    font-size: 20px;
}


.form-control-sgbi {
    display: block;

    width: 100%;
    height: 56px;

    padding: 0 48px;

    border:
        1px solid var(--sgbi-border);

    border-radius: 13px;

    outline: none;

    background: var(--sgbi-white);

    color: var(--sgbi-text);

    font-family: inherit;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.form-control-sgbi::placeholder {
    color: #9aa3b2;
}


.form-control-sgbi:hover {
    border-color: #bec8d8;
}


.form-control-sgbi:focus {
    border-color: var(--sgbi-secondary);

    box-shadow:
        0 0 0 4px
        rgba(
            18,
            188,
            229,
            0.13
        );
}


.password-input {
    padding-right: 55px;
}


.password-toggle {
    position: absolute;

    top: 50%;
    right: 12px;

    z-index: 10;

    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: var(--sgbi-muted);

    font-size: 19px;

    cursor: pointer;

    border-radius: 8px;
}


.password-toggle:hover {
    color: var(--sgbi-primary);

    background: #f4f7fb;
}


/* ============================================================
   BOTÓN PRINCIPAL
   ============================================================ */

.btn-login-sgbi {
    width: 100%;
    height: 57px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 4px;

    padding: 0 20px;

    border: none;

    border-radius: 13px;

    background:
        linear-gradient(
            90deg,
            var(--sgbi-primary),
            var(--sgbi-primary-light)
        );

    color: var(--sgbi-white);

    font-family: inherit;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    text-align: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}


.btn-login-sgbi:hover {
    transform: translateY(-1px);

    filter: brightness(1.05);

    box-shadow:
        0 10px 25px
        rgba(
            16,
            30,
            75,
            0.22
        );
}


.btn-login-sgbi i {
    color: var(--sgbi-secondary);

    font-size: 20px;
}


/* ============================================================
   SOPORTE
   ============================================================ */

.login-support {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-top: 26px;

    padding: 14px 15px;

    background: #f6f8fc;

    border-radius: 12px;

    color: var(--sgbi-muted);

    font-size: 12px;

    line-height: 1.5;
}


.login-support i {
    flex-shrink: 0;

    color: var(--sgbi-secondary-dark);

    font-size: 17px;
}


/* ============================================================
   FOOTER LOGIN
   ============================================================ */

.login-footer {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 28px;

    padding-top: 21px;

    border-top:
        1px solid var(--sgbi-border);

    color: #8d96a5;

    font-size: 11px;

    text-align: center;
}


.login-footer span:first-child {
    color: var(--sgbi-primary);

    font-weight: 800;
}


.footer-dot {
    color: var(--sgbi-secondary);
}


/* ============================================================
   ALERTAS PROPIAS Y BOOTSTRAP
   ============================================================ */

.alert {
    width: 100%;

    margin-bottom: 22px;

    padding: 14px 16px;

    border-radius: 11px;

    font-size: 14px;

    line-height: 1.5;
}


.alert-danger {
    color: var(--sgbi-danger);

    background: var(--sgbi-danger-bg);

    border: 1px solid #f3c5c1;
}


.alert-success {
    color: var(--sgbi-success);

    background: var(--sgbi-success-bg);

    border: 1px solid #bae5cc;
}


.alert-warning {
    color: var(--sgbi-warning);

    background: var(--sgbi-warning-bg);

    border: 1px solid #eedb87;
}


.alert-info {
    color: var(--sgbi-info);

    background: var(--sgbi-info-bg);

    border: 1px solid #b7e5ee;
}


/* ============================================================
   CAMBIO DE CONTRASEÑA
   ============================================================ */

.password-page-body {
    min-height: 100vh;

    background:
        linear-gradient(
            135deg,
            #f4f7fb 0%,
            #ffffff 50%,
            #eaf8fc 100%
        );
}


.password-page-wrapper {
    width: 100%;
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 35px 20px;
}


.password-card {
    width: 100%;
    max-width: 570px;

    padding: 45px;

    background: var(--sgbi-white);

    border:
        1px solid rgba(16, 30, 75, 0.07);

    border-radius: 25px;

    box-shadow:
        0 20px 60px rgba(16, 30, 75, 0.13);
}


.password-logo {
    margin-bottom: 25px;

    text-align: center;
}


.password-logo img {
    display: block;

    width: 100%;
    max-width: 330px;

    height: auto;

    margin: 0 auto;
}


.password-header {
    margin-bottom: 30px;

    text-align: center;
}


.password-icon {
    width: 65px;
    height: 65px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    background:
        rgba(
            18,
            188,
            229,
            0.12
        );

    border-radius: 18px;

    color: var(--sgbi-primary);

    font-size: 30px;
}


.password-header h1 {
    margin: 0 0 12px;

    color: var(--sgbi-primary);

    font-size: 30px;

    font-weight: 700;
}


.password-header p {
    margin: 0;

    color: var(--sgbi-muted);

    font-size: 14px;

    line-height: 1.6;
}


.password-requirements {
    margin-bottom: 25px;

    padding: 17px 20px;

    background: #f4f8fc;

    border-radius: 13px;

    color: var(--sgbi-muted);

    font-size: 13px;

    line-height: 1.6;
}


.requirements-title {
    margin-bottom: 9px;

    color: var(--sgbi-primary);

    font-weight: 700;
}


.password-requirements ul {
    margin: 0;

    padding-left: 21px;
}


.password-requirements li {
    margin-bottom: 3px;
}


.password-user {
    margin-top: 28px;

    padding-top: 22px;

    border-top:
        1px solid var(--sgbi-border);

    text-align: center;

    color: var(--sgbi-muted);

    font-size: 13px;
}


.password-user i {
    margin-right: 5px;

    color: var(--sgbi-secondary-dark);
}


.password-logout {
    margin-top: 13px;

    text-align: center;
}


.password-logout a {
    color: var(--sgbi-primary-light);

    font-size: 13px;

    font-weight: 600;

    text-decoration: none;
}


.password-logout a:hover {
    color: var(--sgbi-secondary-dark);
}


/* ============================================================
   UTILIDADES BÁSICAS
   ============================================================ */

.text-decoration-none {
    text-decoration: none !important;
}


.d-grid {
    display: grid;
}


/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .login-wrapper {
        grid-template-columns:
            minmax(430px, 52%)
            minmax(390px, 48%);
    }


    .login-brand-panel {
        padding:
            50px
            45px;
    }


    .brand-footer {
        left: 45px;
    }


    .brand-text h1 {
        font-size: 44px;
    }


    .login-form-panel {
        padding: 30px;
    }


    .login-card {
        padding: 40px 35px;
    }

}


/* ============================================================
   RESPONSIVE - MÓVIL / TABLET
   ============================================================ */

@media (max-width: 900px) {

    .login-wrapper {
        display: block;
    }


    .login-brand-panel {
        display: none;
    }


    .login-form-panel {
        min-height: 100vh;

        padding: 25px 20px;
    }


    .login-card {
        max-width: 520px;
    }


    .login-mobile-logo {
        display: block;

        margin-bottom: 30px;

        text-align: center;
    }


    .login-mobile-logo img {
        display: block;

        width: 100%;
        max-width: 330px;

        height: auto;

        margin: 0 auto;
    }

}


/* ============================================================
   RESPONSIVE - TELÉFONOS
   ============================================================ */

@media (max-width: 576px) {

    .login-form-panel {
        align-items: flex-start;

        padding:
            20px
            14px;
    }


    .login-card {
        margin-top: 15px;

        padding:
            30px
            22px;

        border-radius: 20px;
    }


    .login-header h2 {
        font-size: 29px;
    }


    .login-mobile-logo img {
        max-width: 280px;
    }


    .password-card {
        padding:
            32px
            22px;
    }


    .password-header h1 {
        font-size: 26px;
    }

}