#login-shell {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: flex;
    min-height: 100vh;
    background: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
}

.login-brand {
    position: relative;
    display: flex;
    flex: 0 0 48%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 48px;
    background: linear-gradient(135deg, #21825c 0%, #3f9a5a 52%, #8bc552 100%);
}
.login-brand::before,
.login-brand::after {
    position: absolute;
    content: "";
    pointer-events: none;
    background: url("svg/Q.svg") center / contain no-repeat;
    opacity: .18;
}
.login-brand::before { width: min(76vw, 680px); height: min(76vw, 680px); left: -8%; top: 13%; }
.login-brand::after { width: 190px; height: 190px; right: -42px; bottom: -45px; opacity: .13; }
.login-brand-logo { position: relative; z-index: 1; display: block; width: min(390px, 90%); height: auto; }

.login-panel {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 48px;
    background: #fbfcfb;
}
#login-panel .ui-dialog {
    position: static !important;
    box-sizing: border-box;
    width: min(420px, 100%) !important;
    height: auto !important;
    margin: 0;
    padding: 34px 36px 25px;
    border: 1px solid #e5ebe6 !important;
    border-radius: 22px !important;
    background: #fff;
    box-shadow: 0 18px 45px rgba(25, 79, 53, .15) !important;
    color: #23382e;
}
#login-shell #login-panel .ui-dialog .ui-dialog-titlebar {
    min-height: 0;
    margin: -34px -36px 0;
    padding: 16px 20px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5ebe6 !important;
    border-radius: 22px 22px 0 0;
    background: #f8faf8 !important;
    background-image: none !important;
    color: #31473a !important;
    text-align: center;
}
#login-panel .ui-dialog-title { float: none; display: block; width: auto; margin: 0; font-size: 22px; font-weight: 600; line-height: 1.35; text-align: center; }
#login-panel .ui-dialog-titlebar-close { display: none; }
#login-panel .ui-dialog-content { box-sizing: border-box; width: auto !important; height: auto !important; min-height: 0 !important; padding: 26px 0 4px !important; overflow: visible; }

#frm_login_form, #frm_login_form fieldset { margin: 0; padding: 0; border: 0; }
.login-description { margin: 0 0 18px; color: #526158; font-size: 14px; line-height: 1.45; text-align: center; }
.login-note { margin: -5px 0 22px; padding: 10px 12px; border-radius: 9px; background: #edf6ee; color: #256345; font-size: 13px; line-height: 1.4; text-align: center; }
.login-note .login-app-link { color: #176d4b; font-weight: 700; text-decoration: underline; }
.login-note .login-app-link:hover, .login-note .login-app-link:focus { color: #0d4f35; }
#frm_login_form label { display: block; margin: 0 0 8px; color: #526158; font-size: 14px; font-weight: 600; }
#frm_login_form input[type="text"], #frm_login_form input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    margin: 0 0 20px;
    padding: 0 15px;
    border: 1px solid #d8e1da !important;
    border-radius: 10px !important;
    outline: 0;
    background: #fff;
    color: #23382e;
    font: 16px "Segoe UI", Arial, sans-serif;
}
#frm_login_form input:focus { border-color: #21825c !important; box-shadow: 0 0 0 3px rgba(33,130,92,.14); }
.password-field { position: relative; }
#frm_login_form .password-field input { padding-right: 52px; }
.password-toggle,
.password-toggle.ui-button {
    position: absolute;
    top: 0;
    right: 0;
    bottom: auto;
    display: grid;
    box-sizing: border-box;
    width: 52px !important;
    height: 52px !important;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 10px 10px 0 !important;
    place-items: center;
    background: transparent !important;
    box-shadow: none !important;
    color: #21825c !important;
    cursor: pointer;
}
.password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.password-toggle:hover { color: #176d4b; }

#login-panel .ui-dialog-buttonpane { margin: 4px 0 0; padding: 0; border: 0; background: transparent; }
#login-panel .ui-dialog-buttonset { float: none; }
#login-shell #login-panel .ui-dialog-buttonpane button {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    margin: 0;
    border: 0 !important;
    border-radius: 10px !important;
    background: #83c448 !important;
    color: #fff !important;
    font: 600 16px "Segoe UI", Arial, sans-serif;
}
#login-shell #login-panel .ui-dialog-buttonpane button:hover { background: #73b43c !important; }
.login-recovery { position: relative; top: -8px; margin-bottom: -8px; padding-top: 0; text-align: center; }
.login-recovery button { padding: 0; border: 0; background: transparent; color: #21825c; font: 600 14px "Segoe UI", Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.login-recovery button:hover { color: #176d4b; }

.recovery-dialog { border: 1px solid #e1e9e3 !important; border-radius: 18px !important; background: #fff !important; box-shadow: 0 26px 70px rgba(18,67,45,.28) !important; overflow: hidden !important; }
.recovery-dialog .ui-dialog-titlebar { padding: 25px 28px 0 !important; border: 0 !important; background: #fff !important; color: #31473a !important; font: 600 20px "Segoe UI", Arial, sans-serif; }
.recovery-dialog .ui-dialog-content { box-sizing: border-box; height: auto !important; padding: 18px 28px 22px !important; background: #fff; color: #526158; }
.recovery-description { margin: 0 0 18px; }
#frm_recover_password fieldset { margin: 0; padding: 0; border: 0; }
#frm_recover_password label { display: block; margin: 0 0 7px; font-weight: 600; }
#frm_recover_password input { box-sizing: border-box; width: 100%; height: 46px; margin: 0 0 17px; padding: 0 12px; }
.recovery-dialog .ui-dialog-buttonpane { margin: 0; padding: 0 28px 25px; border: 0; background: #fff; }
.ui-widget-overlay { background: rgba(24,62,43,.18) !important; opacity: 1 !important; }

/* Carga: sin GIF heredado, cabecera ni barras de desplazamiento. */
.wait-dialog {
    border: 1px solid #e1e9e3 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 26px 70px rgba(18,67,45,.24), 0 4px 14px rgba(18,67,45,.1) !important;
    overflow: hidden !important;
}
.wait-dialog .ui-dialog-titlebar,
.wait-dialog .ui-resizable-handle { display: none !important; }
.wait-dialog .ui-dialog-content {
    box-sizing: border-box;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 29px 30px !important;
    overflow: hidden !important;
    background: #fff;
}
.loading-indicator { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #31473a; text-align: center; }
.loading-indicator p { margin: 0; font: 600 15px "Segoe UI", Arial, sans-serif; }
.loading-spinner {
    display: block;
    width: 38px;
    height: 38px;
    border: 4px solid rgba(33,130,92,.16);
    border-top-color: #21825c;
    border-radius: 50%;
    animation: tiqapp-spin .75s linear infinite;
}
@keyframes tiqapp-spin { to { transform: rotate(360deg); } }

/* Antes de encoger la tarjeta de acceso, se pasa a la composición vertical. */
@media (max-width: 1160px) {
    #login-shell { display: block; overflow-y: auto; }
    .login-brand { display: flex; height: 180px; min-height: 180px; padding: 0 28px; }
    .login-brand::before { width: 300px; height: 300px; left: -35px; top: -56px; }
    .login-brand-logo { width: min(270px, 78%); }
    .login-panel { min-height: calc(100vh - 180px); padding: 30px 20px 38px; align-items: flex-start; }
    #login-panel .ui-dialog { padding: 28px 24px 22px; border-radius: 18px !important; box-shadow: 0 12px 32px rgba(25,79,53,.13) !important; }
    #login-shell #login-panel .ui-dialog .ui-dialog-titlebar { margin: -28px -24px 0; border-radius: 18px 18px 0 0; }
}
