/* =========================================================
   LOGIN INSTITUCIONAL V2 — ESCRITORIO, TABLET Y MÓVIL
   ========================================================= */
:root {
    --login-green: #199653;
    --login-green-dark: #0b6036;
    --login-green-deep: #073b25;
    --login-green-soft: #e6f6ec;
    --login-lime: #8bd457;
    --login-ink: #12241b;
    --login-muted: #66766d;
    --login-border: #d8e5dc;
    --login-surface: #ffffff;
    --login-shadow: 0 32px 80px rgba(7, 45, 26, .17);
}

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

body {
    margin: 0;
    background: #eff5f1;
}

.container-login,
.container-login * {
    box-sizing: border-box;
}

.container-login {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(430px, .72fr);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    font-family: "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    background: #0a2518 url('../img/pannel.jpg') center / cover no-repeat;
}

.container-login::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(95deg, rgba(4, 28, 17, .96) 0%, rgba(7, 52, 29, .91) 47%, rgba(7, 38, 24, .62) 70%, rgba(7, 29, 19, .42) 100%);
}

.container-login::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 12%, rgba(92, 224, 143, .16), transparent 25%),
        radial-gradient(circle at 52% 85%, rgba(116, 217, 84, .10), transparent 29%);
}

/* ======================= PANEL IZQUIERDO ======================= */
.container-login .left-panel {
    min-width: 0;
    padding: clamp(42px, 5vw, 84px);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.ambient-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.ambient-shape-one {
    width: 460px;
    height: 460px;
    left: -260px;
    bottom: -250px;
    border: 1px solid rgba(141, 231, 173, .15);
    box-shadow: 0 0 0 70px rgba(132, 225, 166, .035), 0 0 0 140px rgba(132, 225, 166, .025);
}

.ambient-shape-two {
    width: 220px;
    height: 220px;
    right: 8%;
    top: 10%;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(145deg, rgba(255, 255, 255, .04), transparent);
}

.left-content {
    width: min(700px, 100%);
    margin: auto 0;
    position: relative;
    z-index: 1;
}

.left-panel .logo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: clamp(48px, 7vh, 82px);
}

.logo-frame {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: grid;
    place-items: center;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 22px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.left-panel .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-copy {
    min-width: 0;
}

.brand-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #aeddbe;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.left-panel .logo h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 1.5vw, 25px);
    line-height: 1.28;
    font-weight: 820;
    letter-spacing: 1.25px;
    overflow-wrap: anywhere;
}

.left-panel .hero-text {
    max-width: 650px;
    animation: loginFadeUp .72s ease-out both;
}

.hero-badge {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 8px 14px;
    border: 1px solid rgba(195, 238, 210, .20);
    border-radius: 999px;
    color: #e3f7ea;
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: .35px;
}

.hero-badge i {
    color: #7be6a0;
}

.left-panel .descrih1tion {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(42px, 4.25vw, 70px);
    line-height: 1.035;
    font-weight: 790;
    letter-spacing: -2.8px;
    text-wrap: balance;
}

.left-panel .descrih1tion strong {
    color: #91df62;
    font-weight: inherit;
}

.left-panel .description {
    max-width: 620px;
    margin: 0 0 34px;
    color: #d3e4d9;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.72;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 610px;
    margin-bottom: 30px;
}

.feature-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .105);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .045));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
}

.feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #8beaab;
    background: rgba(92, 219, 141, .13);
}

.feature-item strong,
.feature-item small {
    display: block;
}

.feature-item strong {
    margin-bottom: 3px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 760;
}

.feature-item small {
    color: #abc4b4;
    font-size: 10.8px;
    line-height: 1.35;
}

.support-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.left-panel .get-started {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid rgba(132, 231, 169, .40);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(28, 148, 78, .52), rgba(11, 91, 49, .45));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .17);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 760;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.left-panel .get-started i {
    font-size: 18px;
}

.left-panel .get-started:hover,
.left-panel .get-started:focus {
    color: #fff;
    background: linear-gradient(135deg, #22a95f, #0b733d);
    box-shadow: 0 18px 38px rgba(4, 58, 29, .34);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

.support-caption {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8cfc0;
    font-size: 11px;
    font-weight: 600;
}

.support-caption i {
    color: #65db8f;
    font-size: 7px;
    box-shadow: 0 0 0 5px rgba(101, 219, 143, .08);
    border-radius: 50%;
}

.left-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 42px;
    color: rgba(226, 241, 231, .67);
    font-size: 10.8px;
    letter-spacing: .22px;
}

.left-footer i {
    margin-right: 5px;
    color: #75dc99;
}

.footer-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .34);
}

/* ======================= PANEL DERECHO ======================= */
.container-login .right-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(30px, 4vw, 66px);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 95% 5%, rgba(99, 205, 137, .15), transparent 26%),
        linear-gradient(180deg, rgba(248, 251, 249, .97), rgba(237, 245, 240, .97));
    border-left: 1px solid rgba(255, 255, 255, .48);
    box-shadow: -22px 0 70px rgba(3, 31, 17, .22);
    backdrop-filter: blur(19px);
    -webkit-backdrop-filter: blur(19px);
}

.right-panel-decoration {
    position: absolute;
    width: 380px;
    height: 380px;
    right: -220px;
    top: -210px;
    border: 1px solid rgba(21, 142, 76, .10);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(21, 142, 76, .025), 0 0 0 110px rgba(21, 142, 76, .02);
    pointer-events: none;
}

.container-login .login-form {
    width: min(445px, 100%);
    padding: clamp(34px, 3.4vw, 50px);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(211, 227, 217, .92);
    border-radius: 30px;
    background: rgba(255, 255, 255, .965);
    box-shadow: var(--login-shadow);
    animation: loginScaleIn .68s cubic-bezier(.16, 1, .3, 1) both;
}

.container-login .login-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 34px;
    right: 34px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, transparent, #51c77d, #9edb55, transparent);
    opacity: .85;
}

.login-form .login-header {
    margin-bottom: 32px;
}

.login-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--login-green-dark);
    background: var(--login-green-soft);
    font-size: 10px;
    font-weight: 820;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.secure-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #75847b;
    font-size: 10.5px;
    font-weight: 700;
}

.secure-status i {
    color: var(--login-green);
    font-size: 10px;
}

.login-form .login-header h1 {
    margin: 0 0 10px;
    color: var(--login-ink);
    font-size: clamp(31px, 2.35vw, 39px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.35px;
}

.login-form .login-header .subtitle {
    margin: 0;
    color: var(--login-muted);
    font-size: 13.2px;
    line-height: 1.6;
}

.login-u {
    margin: 0;
}

.container-login .form-group {
    position: relative;
    margin: 0 0 17px;
}

.container-login .form-group label {
    display: block;
    margin: 0 0 8px;
    color: #34463c;
    font-size: 11.5px;
    font-weight: 770;
}

.input-shell {
    position: relative;
}

.container-login .form-control-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    z-index: 2;
    color: #87988e;
    font-size: 14px;
    transform: translateY(-50%);
    transition: color .2s ease, transform .2s ease;
    pointer-events: none;
}

.container-login .input-shell:focus-within .form-control-icon {
    color: var(--login-green);
    transform: translateY(-50%) scale(1.04);
}

.right-panel input[type="text"],
.right-panel input[type="password"] {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 47px !important;
    border: 1px solid var(--login-border);
    border-radius: 14px;
    outline: none;
    color: #14251b !important;
    background: #f8fbf9;
    font-family: inherit;
    font-size: 14px;
    font-weight: 540;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.right-panel input[type="text"]::placeholder,
.right-panel input[type="password"]::placeholder {
    color: #98a69e;
    opacity: 1;
}

.right-panel input[type="text"]:hover,
.right-panel input[type="password"]:hover {
    border-color: #c5d8ca;
    background: #fff;
}

.right-panel input[type="text"]:focus,
.right-panel input[type="password"]:focus {
    border-color: var(--login-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(25, 150, 83, .105), 0 10px 25px rgba(20, 89, 49, .055);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #87968e;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--login-green-dark);
    background: var(--login-green-soft);
    outline: none;
}

.right-panel .login-button {
    width: 100%;
    min-height: 55px;
    margin-top: 7px;
    padding: 0 12px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #27a960 0%, #0c713e 100%);
    box-shadow: 0 15px 31px rgba(14, 118, 62, .25);
    font-family: inherit;
    font-size: 12.2px;
    font-weight: 820;
    letter-spacing: .72px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button-icon {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .15);
    transition: transform .2s ease, background .2s ease;
}

.right-panel .login-button:hover,
.right-panel .login-button:focus {
    color: #fff;
    filter: brightness(1.035);
    box-shadow: 0 19px 38px rgba(14, 118, 62, .31);
    transform: translateY(-2px);
    outline: none;
}

.right-panel .login-button:hover .button-icon,
.right-panel .login-button:focus .button-icon {
    background: rgba(255, 255, 255, .21);
    transform: translateX(2px);
}

.right-panel .login-button:active {
    transform: translateY(0);
}

.access-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px 0 0;
    color: #8a9890;
    font-size: 10.4px;
    line-height: 1.4;
    text-align: center;
}

.access-note i {
    color: #65a97e;
}

#resultLogin {
    width: 100%;
    text-align: center;
}

#resultLogin .alert {
    margin: 17px 0 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}

#resultLogin .alert-danger {
    color: #8f2424;
    background: #fdecec;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: #98a59e;
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .55px;
    text-transform: uppercase;
}

.social-divider::before,
.social-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e6ede8;
}

.redes-sociales {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
}

.redes-sociales a {
    width: 37px;
    height: 37px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dee9e2;
    border-radius: 12px;
    color: #66766d;
    background: #f8fbf9;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 5px 14px rgba(28, 71, 44, .035);
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.redes-sociales a:hover,
.redes-sociales a:focus {
    color: var(--login-green-dark);
    border-color: #b9d9c5;
    background: var(--login-green-soft);
    box-shadow: 0 8px 18px rgba(32, 111, 61, .10);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

.verifica-sunat {
    margin-top: 26px;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #e5ece8;
}

.verifica-sunat div {
    min-width: 0;
}

.verifica-sunat strong,
.verifica-sunat span {
    display: block;
}

.verifica-sunat strong {
    margin-bottom: 3px;
    color: #627169;
    font-size: 10.2px;
    font-weight: 780;
    letter-spacing: .25px;
    text-transform: uppercase;
}

.verifica-sunat span {
    color: #9aa69f;
    font-size: 9.8px;
}

.verifica-sunat img {
    width: 108px;
    max-width: 40%;
    height: auto;
    display: block;
    opacity: .68;
    filter: grayscale(1);
}

.right-copyright {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 18px;
    margin: 0;
    color: #91a097;
    font-size: 9.8px;
    text-align: center;
    letter-spacing: .18px;
}

/* ======================= ANIMACIONES ======================= */
@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loginScaleIn {
    from { opacity: 0; transform: translateY(14px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .left-panel .hero-text,
    .container-login .login-form {
        animation: none;
    }

    .container-login * {
        scroll-behavior: auto !important;
    }
}

/* ======================= TABLET Y LAPTOP PEQUEÑA ======================= */
@media screen and (max-width: 1180px) {
    .container-login {
        grid-template-columns: minmax(0, 1fr) minmax(405px, .82fr);
    }

    .container-login .left-panel {
        padding: 42px;
    }

    .left-panel .descrih1tion {
        font-size: clamp(40px, 5vw, 58px);
    }

    .feature-strip {
        grid-template-columns: 1fr;
        max-width: 470px;
    }

    .container-login .right-panel {
        padding: 28px;
    }
}

@media screen and (max-height: 760px) and (min-width: 768px) {
    .container-login .left-panel {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .left-panel .logo {
        margin-bottom: 30px;
    }

    .left-panel .descrih1tion {
        font-size: clamp(36px, 4vw, 54px);
        margin-bottom: 17px;
    }

    .left-panel .description {
        margin-bottom: 22px;
        line-height: 1.55;
    }

    .feature-strip {
        margin-bottom: 20px;
    }

    .container-login .login-form {
        padding-top: 34px;
        padding-bottom: 34px;
    }

    .login-form .login-header {
        margin-bottom: 23px;
    }

    .social-divider {
        margin-top: 18px;
    }

    .verifica-sunat {
        margin-top: 20px;
    }
}

/* ======================= CELULAR =======================
   En móvil se muestra únicamente:
   - Usuario
   - Contraseña
   - Botón de ingreso
   ====================================================== */
@media screen and (max-width: 767px) {
    body {
        background: #f1f7f3;
    }

    .container-login {
        min-height: 100vh;
        min-height: 100dvh;
        display: block;
        overflow: auto;
        background:
            radial-gradient(circle at 50% -8%, rgba(59, 177, 107, .16), transparent 34%),
            linear-gradient(180deg, #f9fcfa 0%, #edf5f0 100%);
    }

    .container-login::before,
    .container-login::after,
    .container-login .left-panel,
    .right-panel-decoration,
    .right-copyright {
        display: none !important;
    }

    .container-login .right-panel {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .container-login .login-form {
        width: 100%;
        max-width: 392px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        animation: none;
    }

    .container-login .login-form::before,
    .login-form .login-header,
    .access-note,
    .social-divider,
    .redes-sociales,
    .verifica-sunat {
        display: none !important;
    }

    .container-login .form-group {
        margin-bottom: 14px;
    }

    .container-login .form-group label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .container-login .form-control-icon {
        left: 18px;
        color: #71847a;
        font-size: 15px;
    }

    .right-panel input[type="text"],
    .right-panel input[type="password"] {
        height: 58px;
        padding-left: 49px !important;
        border-color: #d3e2d8;
        border-radius: 17px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 10px 28px rgba(20, 74, 43, .075);
        font-size: 15px;
    }

    .password-toggle {
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .right-panel .login-button {
        min-height: 58px;
        margin-top: 4px;
        border-radius: 17px;
        box-shadow: 0 16px 32px rgba(16, 122, 65, .23);
        font-size: 12px;
    }

    #resultLogin .alert {
        margin-top: 14px;
    }
}

@media screen and (max-width: 370px) {
    .container-login .right-panel {
        padding: 17px;
    }

    .right-panel .login-button {
        font-size: 11.2px;
    }
}
