
/* ==================================================
   SISRED - SISTEMA INTEGRAL DE GESTION
   Inicio de sesion institucional
   ================================================== */

:root {
    --primary: #0C4DA2;
    --primary-dark: #072E72;
    --primary-light: #2D73D6;
    --white: #ffffff;
    --light: #f8f9fb;
    --gray: #6b7280;
    --text: #1f2937;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    --radius: 26px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--light);
    color: var(--text);
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* PANEL IZQUIERDO */

.left-panel {
    position: relative;
    display: flex;
    flex: 1.1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 50px 40px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(
        135deg,
        #061f4b 0%,
        #0b2b67 50%,
        #0C4DA2 100%
    );
}

.overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(45, 115, 214, 0.24),
            transparent 45%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(255, 255, 255, 0.08),
            transparent 40%
        );
    pointer-events: none;
}

.brand {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.brand .logo {
    display: block;
    width: min(230px, 65%);
    height: auto;
    max-height: 180px;
    object-fit: contain;
    margin: 0 auto 28px;
}

.brand h1 {
    margin-bottom: 8px;
    color: var(--white);
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 700;
    letter-spacing: 4px;
}

.brand h3 {
    margin-bottom: 20px;
    color: #dce9ff;
    font-size: clamp(17px, 2vw, 23px);
    font-weight: 500;
}

.brand p {
    max-width: 440px;
    margin: 0 auto 24px;
    color: #e4ecfa;
    font-size: 15px;
    line-height: 1.8;
}

.brand .line {
    width: 90px;
    height: 4px;
    margin: 0 auto 22px;
    border-radius: 5px;
    background: #84BD00;
}

.brand span {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.8;
}

.left-panel footer {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 1;
    color: #dce9ff;
    font-size: 12px;
    text-align: center;
}

/* PANEL DERECHO */

.right-panel {
    display: flex;
    flex: 0.9;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 45px 35px;
    background: var(--light);
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 42px 38px;
    border: 1px solid #e8edf4;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.icon-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 24px;
    border-radius: 20px;
    color: var(--white);
    background: var(--primary);
    font-size: 27px;
}

.login-card h2 {
    margin-bottom: 8px;
    color: #172b4d;
    font-size: 27px;
    font-weight: 600;
    text-align: center;
}

.login-card > p {
    margin-bottom: 30px;
    color: var(--gray);
    font-size: 14px;
    text-align: center;
}

.login-card form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

.login-card .input-group {
    flex-wrap: nowrap;
}

.login-card .input-group-text {
    justify-content: center;
    min-width: 46px;
    border-color: #dce2ea;
    background: #f5f7fa;
    color: var(--primary);
}

.login-card .form-control {
    min-width: 0;
    min-height: 48px;
    border-color: #dce2ea;
    font-family: inherit;
    font-size: 13px;
    box-shadow: none;
}

.login-card .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(12, 77, 162, 0.10);
}

.login-card .input-group .btn {
    border-color: #dce2ea;
}

.login-card .d-flex.justify-content-between {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}

.login-card input[type="checkbox"] {
    margin-right: 5px;
    accent-color: var(--primary);
}

.login-card a {
    color: var(--primary);
    text-decoration: none;
}

.login-card a:hover {
    text-decoration: underline;
}

.btn-login {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-login:focus-visible {
    outline: 3px solid #84BD00;
    outline-offset: 3px;
}

.version {
    margin-top: 25px;
    color: #9ca3af;
    font-size: 11px;
    text-align: center;
}

/* ADAPTACION A DISPOSITIVOS MOVILES */

@media (max-width: 900px) {
    .left-panel {
        flex: 0.85;
        padding: 35px 22px;
    }

    .right-panel {
        flex: 1.15;
        padding: 30px 20px;
    }

    .login-card {
        padding: 32px 25px;
    }
}

@media (max-width: 650px) {
    .login-wrapper {
        flex-direction: column;
    }

    .left-panel {
        flex: none;
        min-height: 260px;
        padding: 35px 22px 45px;
    }

    .brand .logo {
        width: 110px;
        max-height: 90px;
        margin-bottom: 12px;
    }

    .brand h1 {
        margin-bottom: 4px;
        font-size: 32px;
    }

    .brand h3 {
        margin-bottom: 10px;
        font-size: 17px;
    }

    .brand p {
        margin-bottom: 12px;
        font-size: 12px;
    }

    .brand .line {
        margin-bottom: 10px;
    }

    .brand span {
        font-size: 12px;
    }

    .left-panel footer {
        bottom: 10px;
        font-size: 10px;
    }

    .right-panel {
        flex: 1;
        padding: 28px 18px;
    }

    .login-card {
        max-width: 440px;
        padding: 30px 23px;
        border-radius: 18px;
    }

    .login-card h2 {
        font-size: 24px;
    }
}

@media (max-height: 650px) and (min-width: 651px) {
    .left-panel,
    .right-panel {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .brand .logo {
        width: 130px;
        max-height: 100px;
        margin-bottom: 12px;
    }

    .brand h1 {
        font-size: 36px;
    }

    .brand h3 {
        margin-bottom: 10px;
    }

    .brand p {
        margin-bottom: 12px;
    }

    .brand .line {
        margin-bottom: 12px;
    }

    .login-card {
        padding: 25px 30px;
    }

    .icon-top {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
        font-size: 21px;
    }

    .login-card h2 {
        font-size: 23px;
    }

    .login-card > p {
        margin-bottom: 18px;
    }

    .version {
        margin-top: 15px;
    }
}
