body.login-body {
    background: linear-gradient(180deg, #eef8f4 0%, #f7f9fb 100%);
}

.theme-institucional {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.institucional-shell {
    width: 100%;
    max-width: 980px;
    min-height: 518px;
    display: grid;
    grid-template-columns: 1.18fr .96fr;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 85px rgba(23, 37, 84, .18);
}

.institucional-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    color: #fff;
    background: linear-gradient(145deg, #0c8a45, #006f37);
}

.institucional-brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.institucional-brand .login-logo {
    max-width: 240px;
    max-height: 145px;
    margin-bottom: 26px;
}

.institucional-brand h1 {
    margin: 0;
    font-size: clamp(3rem, 1vw, 1rem);
    font-weight: 900;
    line-height: .86;
    letter-spacing: -5px;
    text-transform: uppercase;
}

.institucional-brand h6 {
    margin: 18px 0 0;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.institucional-brand-subtitle {
    margin: 18px auto 0;
    max-width: 430px;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.18;
    text-transform: uppercase;
}

.institucional-orb {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
}

.institucional-orb-one {
    width: 260px;
    height: 260px;
    right: -75px;
    bottom: -80px;
}

.institucional-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 52px;
    background: #fff;
}

.institucional-form-box {
    width: 100%;
    max-width: 336px;
}

.theme-institucional .login-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.theme-institucional .login-card .login-logo,
.theme-institucional .login-card .login-logo-placeholder {
    display: none;
}

.theme-institucional .login-title {
    color: #006f37;
    font-size: 1.55rem;
    font-weight: 800;
}

.theme-institucional .login-subtitle {
    color: #687282;
    font-size: .95rem;
}

.theme-institucional .form-label {
    font-weight: 700;
    font-size: .88rem;
    color: #111827;
}

/* Si quieres ocultar labels en este theme, cambia display:block por display:none */
.theme-institucional .form-label {
    display: block;
}

.theme-institucional .form-control {
    min-height: 52px;
    border: 1px solid rgba(0, 132, 83, .20);
    border-radius: 9px;
    background: rgba(0, 132, 83, .045);
    padding: .78rem 1rem;
}

.theme-institucional .form-control:focus {
    border-color: rgba(0, 132, 83, .52);
    background: #fff;
    box-shadow: 0 0 0 .22rem rgba(0, 132, 83, .10);
}

/* Validación general */
.theme-institucional .was-validated .form-control:valid,
.theme-institucional .form-control.is-valid {
    border-color: rgba(0, 132, 83, .55);
}

.theme-institucional .was-validated .form-control:invalid,
.theme-institucional .form-control.is-invalid {
    border-color: #ff3b55;
}

.theme-institucional .invalid-feedback {
    color: #ff2f49;
    font-size: .84rem;
}

.theme-institucional .valid-feedback {
    color: #007a3d;
    font-size: .84rem;
}

/* ================================
   PASSWORD + BOTÓN OJO CORREGIDO
================================ */

.theme-institucional .input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    position: relative;
}

.theme-institucional .input-group.has-validation {
    align-items: stretch;
}

.theme-institucional .input-group.has-validation .form-control.login-password-input {
    min-height: 52px;
    flex: 1 1 auto;
    width: 1%;
    border: 1px solid rgba(0, 132, 83, .20);
    border-right: 0;
    border-radius: 9px 0 0 9px !important;
    background: rgba(0, 132, 83, .045);
    padding: .78rem 1rem;
    box-shadow: none;
}

/* Evita el ícono de validación de Bootstrap dentro del input password */
.theme-institucional .input-group.has-validation .login-password-input.is-valid,
.theme-institucional .input-group.has-validation .login-password-input.is-invalid,
.theme-institucional .was-validated .input-group.has-validation .login-password-input:valid,
.theme-institucional .was-validated .input-group.has-validation .login-password-input:invalid {
    background-image: none !important;
    padding-right: 1rem !important;
}

/* Estado inválido del password */
.theme-institucional .was-validated .input-group.has-validation .login-password-input:invalid,
.theme-institucional .input-group.has-validation .login-password-input.is-invalid {
    border-color: #ff3b55;
}

/* Estado válido del password */
.theme-institucional .was-validated .input-group.has-validation .login-password-input:valid,
.theme-institucional .input-group.has-validation .login-password-input.is-valid {
    border-color: rgba(0, 132, 83, .55);
}

/* Botón ojo como botón real a la derecha */
.theme-institucional .input-group.has-validation .btn-toggle-password {
    position: relative;
    top: auto;
    right: auto;
    z-index: 2;
    width: 48px;
    min-height: 52px;
    border: 1px solid #ced4da;
    border-left: 1px solid #ced4da;
    border-radius: 0 9px 9px 0 !important;
    background: #f8f9fa;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-institucional .input-group.has-validation .btn-toggle-password:hover,
.theme-institucional .input-group.has-validation .btn-toggle-password:focus {
    background: #e9ecef;
    color: #006f37;
    box-shadow: none;
}

/* Feedback debajo del grupo */
.theme-institucional .input-group.has-validation .invalid-feedback,
.theme-institucional .input-group.has-validation .valid-feedback {
    flex-basis: 100%;
    width: 100%;
    margin-top: .35rem;
}

/* Botón principal */
.theme-institucional .btn-login {
    min-height: 44px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(90deg, #006f37, #00a34f);
    color: #fff;
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 14px 26px rgba(0, 132, 83, .28);
}

.theme-institucional .btn-login:hover {
    color: #fff;
    background: linear-gradient(90deg, #005f31, #008f47);
}

.theme-institucional .login-links,
.theme-institucional .text-center.mt-4 {
    text-align: left !important;
}

.theme-institucional .login-links a,
.theme-institucional .login-card a {
    color: #007a3d;
    font-size: .92rem;
    text-decoration: none;
}

.theme-institucional .login-links a:hover,
.theme-institucional .login-card a:hover {
    text-decoration: underline;
}

.theme-institucional .login-footer-text {
    display: none;
}

/* reCAPTCHA */
.theme-institucional .g-recaptcha {
    transform-origin: left top;
}

/* Responsive */
@media (max-width: 991px) {
    .theme-institucional {
        padding: 0;
    }

    .institucional-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border-radius: 0;
    }

    .institucional-brand {
        display: none;
    }

    .institucional-form-area {
        min-height: 100vh;
        padding: 32px 24px;
    }

    .institucional-form-box {
        max-width: 420px;
    }
}

@media (max-width: 576px) {
    .institucional-form-area {
        padding: 24px 18px;
    }

    .institucional-form-box {
        max-width: 100%;
    }

    .theme-institucional .login-title {
        font-size: 1.35rem;
    }
}


/* Iconos izquierdos solo para theme institucional */
.theme-institucional .mb-3:has(#login),
.theme-institucional .mb-3:has(#usuario),
.theme-institucional .mb-3:has(#correo),
.theme-institucional .mb-3:has(#password),
.theme-institucional .mb-3:has(#pwd),
.theme-institucional .mb-3:has(#password2) {
    position: relative;
}

.theme-institucional .mb-3:has(#login)::before {
    content: "\f007";
}

.theme-institucional .mb-3:has(#usuario)::before {
    content: "\f007";
}

.theme-institucional .mb-3:has(#correo)::before {
    content: "\f0e0";
}

.theme-institucional .mb-3:has(#pwd)::before,
.theme-institucional .mb-3:has(#password)::before,
.theme-institucional .mb-3:has(#password2)::before {
    content: "\f023";
}

.theme-institucional .mb-3:has(#login)::before,
.theme-institucional .mb-3:has(#usuario)::before,
.theme-institucional .mb-3:has(#correo)::before,
.theme-institucional .mb-3:has(#pwd)::before,
.theme-institucional .mb-3:has(#password)::before,
.theme-institucional .mb-3:has(#password2)::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 43px;
    z-index: 4;
    color: rgba(0, 132, 83, .65);
    font-size: 16px;
    pointer-events: none;
}

/* Espacio para icono */
.theme-institucional #login,
.theme-institucional #usuario,
.theme-institucional #correo,
.theme-institucional #pwd,
.theme-institucional #password,
.theme-institucional #password2 {
    padding-left: 44px !important;
}

/* Ajuste especial para password con botón ojo */
.theme-institucional .input-group.has-validation #pwd,
.theme-institucional .input-group.has-validation #password,
.theme-institucional .input-group.has-validation #password2 {
    padding-left: 44px !important;
    padding-right: 1rem !important;
}

