:root{
    --navy:#0f172a;
    --navy-deep:#091326;
    --navy-soft:#17233b;
    --green:#22c55e;
    --green-dark:#16a34a;
    --green-soft:#dcfce7;
    --bg:#f7f9fc;
    --text:#0f172a;
    --muted:#64748b;
    --border:#dce4ef;
}

*{
    box-sizing:border-box;
}

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

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input{
    font:inherit;
}

.login-shell{
    min-height:100vh;
    display:grid;
    grid-template-columns:
        minmax(420px, .95fr)
        minmax(520px, 1.05fr);
}


/* ==========================================================
   MARCA
   ========================================================== */

.login-brand{
    min-height:100vh;
    position:relative;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    padding:
        clamp(32px,4vw,58px)
        clamp(36px,5vw,76px);
    color:#fff;
    background:
        radial-gradient(
            circle at 20% 80%,
            rgba(34,197,94,.15),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #111d34 0%,
            #0f172a 48%,
            #091326 100%
        );
}

.brand-top{
    position:relative;
    z-index:4;
    display:flex;
    align-items:center;
    gap:14px;
}

.brand-logo{
    display:block;
    width:190px;
    max-height:55px;
    object-fit:contain;
    object-position:left center;

    /*
     * El logo original tiene texto azul.
     * En fondo oscuro lo convertimos visualmente
     * a blanco conservando el verde.
     */
    filter:
        brightness(0)
        invert(1);
}

.pos-badge{
    border:
        1px solid rgba(34,197,94,.55);
    color:#4ade80;
    border-radius:7px;
    padding:5px 9px;
    font-size:11px;
    line-height:1;
    font-weight:900;
    letter-spacing:.13em;
}

.brand-copy{
    position:relative;
    z-index:4;
    width:min(560px,100%);
    margin-top:
        clamp(90px,13vh,155px);
}

.eyebrow{
    display:block;
    margin-bottom:16px;
    color:#4ade80;
    font-size:12px;
    font-weight:900;
    letter-spacing:.18em;
}

.brand-copy h1{
    margin:0;
    font-size:
        clamp(48px,5vw,76px);
    line-height:.98;
    letter-spacing:-.055em;
}

.brand-copy p{
    width:min(480px,90%);
    margin:25px 0 0;
    color:#aebbd0;
    font-size:
        clamp(16px,1.35vw,19px);
    line-height:1.6;
}

.login-mascot{
    position:absolute;
    z-index:2;
    right:
        clamp(-85px,-4vw,-30px);
    bottom:-50px;
    width:
        clamp(340px,38vw,650px);
    max-height:62vh;
    object-fit:contain;
    object-position:right bottom;
    pointer-events:none;
    user-select:none;
}

.brand-glow{
    position:absolute;
    z-index:1;
    right:-160px;
    bottom:-220px;
    width:620px;
    height:620px;
    border-radius:50%;
    background:
        rgba(34,197,94,.08);
    filter:blur(2px);
}


/* ==========================================================
   ACCESO
   ========================================================== */

.login-access{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    position:relative;
    padding:60px 7vw;
    background:
        radial-gradient(
            circle at 100% 0%,
            #fff 0,
            transparent 34%
        ),
        #f7f9fc;
}

.login-card{
    width:min(470px,100%);
}

.login-kicker{
    display:block;
    margin-bottom:10px;
    color:var(--green-dark);
    font-size:11px;
    font-weight:900;
    letter-spacing:.16em;
}

.login-heading h2{
    margin:0;
    font-size:
        clamp(32px,3vw,42px);
    line-height:1.08;
    letter-spacing:-.04em;
}

.login-heading > p{
    margin:14px 0 32px;
    color:var(--muted);
    font-size:15px;
    line-height:1.55;
}

.login-form{
    display:grid;
    gap:11px;
}

.login-form label{
    font-size:13px;
    font-weight:800;
    color:#334155;
}

.password-label{
    margin-top:9px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.input-wrap{
    height:56px;
    display:flex;
    align-items:center;
    border:1px solid var(--border);
    border-radius:13px;
    background:#fff;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.input-wrap:focus-within{
    border-color:var(--green);
    box-shadow:
        0 0 0 4px
        rgba(34,197,94,.11);
}

.input-icon{
    width:49px;
    flex:0 0 49px;
    display:grid;
    place-items:center;
    color:#94a3b8;
    font-weight:800;
}

.input-wrap input{
    width:100%;
    height:100%;
    min-width:0;
    padding:0 12px 0 0;
    border:0;
    outline:0;
    background:transparent;
    color:var(--text);
    font-size:15px;
}

.input-wrap input::placeholder{
    color:#a7b2c2;
}

.password-toggle{
    height:100%;
    padding:0 17px;
    border:0;
    background:transparent;
    color:#475569;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.login-submit{
    width:100%;
    min-height:57px;
    margin-top:15px;
    padding:0 19px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:0;
    border-radius:13px;
    background:var(--navy);
    color:#fff;
    font-weight:850;
    cursor:pointer;
    box-shadow:
        0 10px 25px
        rgba(15,23,42,.12);
    transition:
        transform .15s ease,
        background .15s ease;
}

.login-submit:hover{
    background:#17233b;
    transform:translateY(-1px);
}

.login-submit .arrow{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border-radius:9px;
    background:var(--green);
    color:#052e16;
    font-size:18px;
}

.login-alert{
    margin:0 0 24px;
    padding:14px 15px;
    display:flex;
    gap:12px;
    align-items:flex-start;
    border:1px solid #fecaca;
    border-radius:12px;
    background:#fff7f7;
    color:#991b1b;
}

.login-alert > span{
    width:25px;
    height:25px;
    flex:0 0 25px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#fee2e2;
    font-weight:900;
}

.login-alert strong{
    display:block;
    font-size:13px;
}

.login-alert p{
    margin:3px 0 0;
    font-size:12px;
}

.login-help{
    margin-top:29px;
    padding-top:22px;
    border-top:1px solid var(--border);
    display:grid;
    gap:4px;
    color:#475569;
    font-size:13px;
}

.login-help span{
    font-weight:800;
}

.login-help small{
    color:#94a3b8;
    font-size:12px;
}

.login-footer{
    width:min(470px,100%);
    position:absolute;
    bottom:28px;
    display:flex;
    justify-content:space-between;
    gap:20px;
    color:#94a3b8;
    font-size:11px;
}

.mobile-brand{
    display:none;
}


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

@media (max-width:980px){

    .login-shell{
        grid-template-columns:
            minmax(320px,.8fr)
            minmax(430px,1.2fr);
    }

    .login-brand{
        padding:36px;
    }

    .brand-copy{
        margin-top:100px;
    }

    .brand-copy h1{
        font-size:48px;
    }

    .login-mascot{
        right:-110px;
        width:470px;
        opacity:.9;
    }

    .login-access{
        padding:
            55px
            clamp(32px,6vw,65px);
    }

}

@media (max-width:760px){

    .login-shell{
        display:block;
        min-height:100vh;
    }

    .login-brand{
        display:none;
    }

    .login-access{
        min-height:100vh;
        justify-content:flex-start;
        padding:
            max(42px,8vh)
            22px
            90px;
    }

    .mobile-brand{
        width:min(470px,100%);
        display:flex;
        align-items:center;
        gap:10px;
        margin:0 auto 52px;
    }

    .mobile-brand img{
        width:145px;
        max-height:45px;
        object-fit:contain;
        object-position:left center;
    }

    .mobile-brand span{
        padding:4px 7px;
        border:1px solid #86efac;
        border-radius:6px;
        color:#15803d;
        font-size:10px;
        font-weight:900;
        letter-spacing:.12em;
    }

    .login-card{
        margin:0 auto;
    }

    .login-heading h2{
        font-size:34px;
    }

    .login-footer{
        position:static;
        margin:60px auto 0;
        flex-direction:column;
        gap:4px;
    }

}

@media (max-width:420px){

    .login-access{
        padding-left:18px;
        padding-right:18px;
    }

    .mobile-brand{
        margin-bottom:38px;
    }

    .login-heading h2{
        font-size:30px;
    }

    .login-heading > p{
        margin-bottom:27px;
    }

    .input-wrap{
        height:54px;
    }

}
