
:root {
    --nami-navy: #07552E;
    --nami-blue: #087D3F;
    --nami-light-blue: #28A65A;
    --nami-salmon: #FF8615;
    --nami-green: #58A932;
    --nami-cream: #FFFDF7;
    --nami-white: #FFFFFF;
    --nami-text: #183326;
    --nami-gray: #68796E;
    --nami-border: #D8E8DB;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    min-height: 100%;
    background: var(--nami-cream);
}

body {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--nami-text);
    background:
        radial-gradient(
            circle at 6% 15%,
            rgba(255, 134, 21, 0.17),
            transparent 22%
        ),
        radial-gradient(
            circle at 92% 84%,
            rgba(40, 166, 90, 0.14),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #FFF9F0 0%,
            #FFFFFF 50%,
            #F2FAF3 100%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    overflow-x: hidden;
}

/* DECORACIÓN IZQUIERDA */

body::before {
    content: '';
    position: fixed;
    z-index: 0;
    width: 430px;
    height: 430px;
    left: -245px;
    bottom: -195px;
    border-radius: 50%;
    border: 45px solid rgba(8, 125, 63, 0.08);
    box-shadow:
        0 0 0 35px rgba(40, 166, 90, 0.055),
        0 0 0 70px rgba(8, 125, 63, 0.025);
    pointer-events: none;
}

/* DECORACIÓN DERECHA */

body::after {
    content: '';
    position: fixed;
    z-index: 0;
    width: 260px;
    height: 260px;
    right: -120px;
    top: -110px;
    border-radius: 50%;
    background:
        linear-gradient(
            145deg,
            rgba(88, 169, 50, 0.18),
            rgba(255, 134, 21, 0.10)
        );
    pointer-events: none;
}

/* CONTENEDOR */

.login-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 470px;
}

/* TARJETA */

.login-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(7, 85, 46, 0.08);
    border-radius: 28px;
    padding: 38px 35px 32px;
    box-shadow:
        0 30px 75px rgba(7, 85, 46, 0.13),
        0 5px 18px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
}

.login-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 5px;
    background:
        linear-gradient(
            90deg,
            var(--nami-navy),
            var(--nami-blue),
            var(--nami-light-blue),
            var(--nami-salmon)
        );
}

/* MARCA */

.brand {
    width: 100%;
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    width: 100%;
    max-width: 245px;
    margin: 0 auto 17px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo-img {
    display: block;
    width: 100%;
    max-width: 245px;
    height: auto;
    object-fit: contain;
}

.brand p {
    max-width: 330px;
    margin: 0 auto;
    color: var(--nami-gray);
    font-size: 14px;
    line-height: 1.55;
}

/* ALERTAS */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin-bottom: 19px;
    padding: 13px 14px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.45;
}

.alert i {
    margin-top: 2px;
}

.alert-error {
    color: #9A3028;
    background: #FFF1F0;
    border: 1px solid #FFD1CC;
}

.alert-success {
    color: #27643B;
    background: #F0FAF2;
    border: 1px solid #CCE9D4;
}

/* FORMULARIO */

.form-group {
    width: 100%;
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--nami-text);
    font-size: 14px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--nami-blue);
    background: #EAF7ED;
    pointer-events: none;
}

.input-icon i {
    font-size: 17px;
}

.telefono-prefix {
    position: absolute;
    z-index: 2;
    left: 59px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nami-navy);
    font-size: 15px;
    font-weight: 800;
    pointer-events: none;
}

.form-control {
    width: 100%;
    height: 58px;
    padding: 0 15px 0 100px;
    border: 1.5px solid var(--nami-border);
    border-radius: 15px;
    outline: none;
    background: #FFFFFF;
    color: var(--nami-text);
    font-size: 16px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.form-control:hover {
    border-color: #B8D5C2;
}

.form-control:focus {
    border-color: var(--nami-blue);
    box-shadow: 0 0 0 4px rgba(8, 125, 63, 0.11);
    background: #FFFFFF;
}

.form-control::placeholder {
    color: #9AA99E;
}

/* BOTÓN CONTINUAR */

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border: 0;
    border-radius: 15px;
    background:
        linear-gradient(
            110deg,
            var(--nami-navy) 0%,
            var(--nami-blue) 100%
        );
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 13px 25px rgba(8, 125, 63, 0.25);
    transition:
        transform .15s ease,
        filter .15s ease,
        box-shadow .15s ease;
}

.btn-login:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow:
        0 16px 30px rgba(8, 125, 63, 0.30);
}

.btn-login:active {
    transform: scale(.985);
}

.btn-login:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
}

.btn-login i {
    margin-left: 9px;
}

/* INFORMACIÓN SMS */

.login-help {
    width: 100%;
    margin-top: 20px;
    text-align: center;
    color: #718276;
    font-size: 12px;
    line-height: 1.65;
}

.login-help i {
    margin-right: 5px;
    color: var(--nami-green);
}

/* FOOTER */

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    margin-top: 19px;
    color: #748579;
    font-size: 12px;
    text-align: center;
}

.footer::before,
.footer::after {
    content: '';
    width: 35px;
    height: 1px;
    background: #D4E4D6;
}

.footer a {
    color: var(--nami-blue);
    font-weight: 800;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* TABLET */

@media (max-width: 768px) {
    body {
        padding: 22px 16px;
    }

    .login-wrapper {
        max-width: 440px;
    }
}

/* CELULAR */

@media (max-width: 520px) {
    body {
        min-height: 100dvh;
        padding:
            max(12px, env(safe-area-inset-top))
            13px
            max(12px, env(safe-area-inset-bottom));
        align-items: center;
    }

    body::before {
        width: 230px;
        height: 230px;
        left: -145px;
        bottom: -120px;
        border-width: 26px;
    }

    body::after {
        width: 150px;
        height: 150px;
        right: -80px;
        top: -65px;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-card {
        padding: 25px 20px 21px;
        border-radius: 23px;
    }

    .brand {
        margin-bottom: 21px;
    }

    .brand-logo {
        max-width: 190px;
        margin-bottom: 12px;
    }

    .brand-logo-img {
        max-width: 190px;
    }

    .brand p {
        max-width: 280px;
        font-size: 13px;
        line-height: 1.45;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-control {
        height: 54px;
        font-size: 16px;
    }

    .input-icon {
        width: 33px;
        height: 33px;
    }

    .btn-login {
        height: 54px;
    }

    .login-help {
        margin-top: 16px;
        font-size: 11.5px;
    }

    .footer {
        margin-top: 14px;
        font-size: 11px;
    }

    .footer::before,
    .footer::after {
        width: 25px;
    }
}

/* CELULAR CON PANTALLA BAJA */

@media (max-width: 520px) and (max-height: 720px) {
    body {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .login-card {
        padding: 19px 18px 17px;
        border-radius: 20px;
    }

    .brand {
        margin-bottom: 16px;
    }

    .brand-logo {
        max-width: 155px;
        margin-bottom: 8px;
    }

    .brand-logo-img {
        max-width: 155px;
    }

    .brand p {
        max-width: 250px;
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 13px;
    }

    .form-group label {
        margin-bottom: 7px;
        font-size: 13px;
    }

    .form-control {
        height: 50px;
    }

    .btn-login {
        height: 50px;
        font-size: 15px;
    }

    .login-help {
        margin-top: 12px;
        font-size: 10.5px;
        line-height: 1.5;
    }

    .footer {
        margin-top: 10px;
    }
}

/* CELULARES MUY ANGOSTOS */

@media (max-width: 360px) {
    .login-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-logo,
    .brand-logo-img {
        max-width: 170px;
    }

    .form-control {
        padding-left: 94px;
    }

    .telefono-prefix {
        left: 56px;
    }
}
