.login-page {
    min-height: 100vh;
    background: #f4f4f3;
    color: #382818;
    overflow-x: hidden;
    width: 100%;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
    overflow: hidden;
    background: #fff;
}

.login-visual {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    padding: clamp(2rem, 5vw, 4.5rem);
    background:
        linear-gradient(90deg, rgba(56, 40, 24, .94) 0%, rgba(56, 40, 24, .80) 46%, rgba(144, 128, 96, .25) 100%),
        url("../images/hero-tribunal-virtual-v3.png") center right / cover no-repeat;
    color: #fff;
}

.login-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(56, 40, 24, .24));
    border-right: 1px solid rgba(255, 255, 255, .18);
    pointer-events: none;
}

.login-home-link {
    position: absolute;
    z-index: 2;
    top: clamp(1.5rem, 3vw, 2.5rem);
    left: clamp(1.5rem, 4vw, 4rem);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
    text-decoration: none;
}

.login-home-link:hover,
.login-home-link:focus {
    color: #fff;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.login-visual-title {
    margin: 0;
    font-size: clamp(2.15rem, 4.2vw, 4.25rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0;
}

.login-visual-subtitle {
    max-width: 600px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: 1rem;
    line-height: 1.55;
}

.login-panel {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: #fff;
    box-shadow: -24px 0 70px rgba(56, 40, 24, .16);
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-shell-wide {
    grid-template-columns: minmax(0, 1fr) minmax(680px, 46vw);
    width: 100vw;
}

.login-form-wrap-wide {
    max-width: 720px;
}

.registro-hp {
    height: 0;
    left: -9999px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 0;
}

.login-panel-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.85rem;
}

.login-panel-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.login-title {
    margin: 0;
    color: #382818;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0;
}

.login-caption {
    margin-top: .45rem;
    color: #5f574a;
    font-size: .92rem;
}

.login-field {
    position: relative;
}

.login-field .mdi {
    position: absolute;
    top: 50%;
    left: .95rem;
    transform: translateY(-50%);
    color: #908060;
    font-size: 1.1rem;
    pointer-events: none;
}

.login-field .form-control {
    min-height: 46px;
    padding-left: 2.7rem;
    border-color: #e0ded8;
    border-radius: 8px;
    font-size: .95rem;
}

.login-field .form-control:focus {
    border-color: #908060;
    box-shadow: 0 0 0 .18rem rgba(144, 128, 96, .18);
}

.login-security-note {
    display: flex;
    gap: .65rem;
    margin: .9rem 0 1.25rem;
    padding: .8rem .9rem;
    border: 1px solid #ece6d7;
    border-radius: 8px;
    background: #f8f7f4;
    color: #5f574a;
    font-size: .84rem;
    line-height: 1.45;
}

.login-security-note .mdi {
    color: #908060;
    font-size: 1.05rem;
    line-height: 1.35;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .95rem 0;
    color: #5f574a;
    font-size: .88rem;
}

.login-options .form-check-input {
    border-color: #c9c1aa;
}

.login-options .form-check-input:checked {
    background-color: #581010;
    border-color: #581010;
}

.login-small-link {
    color: #581010;
    font-weight: 700;
    text-decoration: none;
}

.login-small-link:hover,
.login-small-link:focus {
    color: #701010;
    text-decoration: underline;
}

.btn-login-primary {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: #581010;
    color: #fff;
    font-weight: 700;
}

.btn-login-primary:hover,
.btn-login-primary:focus {
    background: #701010;
    color: #fff;
}

.login-legal {
    margin: 1.15rem 0 0;
    color: #5f574a;
    font-size: .82rem;
    line-height: 1.5;
}

.login-footer-link {
    margin-top: 1.35rem;
    text-align: center;
}

.login-footer-link-compact {
    margin-top: .65rem;
}

.login-footer-link a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #581010;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.login-footer-link a:hover,
.login-footer-link a:focus {
    color: #701010;
}

.login-footer-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1.35rem;
}

.login-footer-actions a {
    align-items: center;
    color: #581010;
    display: inline-flex;
    font-size: .88rem;
    font-weight: 700;
    gap: .35rem;
    text-decoration: none;
}

.login-footer-actions a:hover,
.login-footer-actions a:focus {
    color: #701010;
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .login-page {
        display: flex;
        align-items: center;
        padding: 1rem;
        background:
            linear-gradient(180deg, rgba(244, 244, 243, .92), rgba(244, 244, 243, .96)),
            url("../images/hero-tribunal-virtual-v3.png") center / cover no-repeat;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        border: 1px solid #e0ded8;
        border-radius: 8px;
        box-shadow: 0 18px 45px rgba(56, 40, 24, .12);
    }

    .login-shell-wide {
        width: 100%;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        width: min(100%, 760px);
        min-height: auto;
        margin: 0 auto;
        padding: 2rem;
        box-shadow: none;
    }
}

@media (max-width: 575.98px) {
    .login-page {
        align-items: stretch;
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-panel {
        width: 100%;
        min-height: 100vh;
        padding: 1.5rem;
        box-shadow: none;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: .65rem;
    }

    .login-footer-actions {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: .65rem;
    }
}
