/* Visor común: el PDF aprovecha el espacio disponible sin desplazar la página. */
body .modal.bootbox.bootboxCompacto.visorPDFPRLCAE .modal-dialog {
    width: calc(100vw - 32px) !important;
    max-width: none !important;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    min-height: 0 !important;
    margin: 16px auto;
}
body .modal.visorPDFPRLCAE .modal-content { height: 100%; display: flex; }
body .modal.visorPDFPRLCAE .modal-header,
body .modal.visorPDFPRLCAE .modal-footer { flex: 0 0 auto; padding: .65rem 1rem; }
body .modal.visorPDFPRLCAE .modal-title { font-size: 1rem; }
body .modal.visorPDFPRLCAE .modal-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; }
body .visorPDFContenidoPRLCAE,
body .visorPDFPRLCAE .bootbox-body { height: 100%; min-height: 0; }
body .visorPDFContenidoPRLCAE { display: flex; flex-direction: column; background: #525659; }
body .visorPDFMarcoPRLCAE { display: block; width: 100%; height: 100%; flex: 1 1 auto; min-height: 0; border: 0; background: #525659; }
body .visorPDFMarcoPRLCAE[hidden] { display: none; }
body .visorPDFEstadoPRLCAE { margin: auto; padding: 2rem; color: #fff; }
body .visorPDFContenidoPRLCAE > [role="alert"] { background: #fff; margin: 0; }
body .visorPDFRevisionPRLCAE { flex: 0 0 auto; padding: .45rem .75rem; border-top: 1px solid #dee2e6; background: #fff; }
body .visorPDFRevisionPRLCAE label { display: block; margin: 0 0 .25rem; color: #34495e; font-size: .75rem; font-weight: 600; }
body .visorPDFRevisionPRLCAE label span { color: #687887; font-weight: 400; }
body .visorPDFRevisionPRLCAE textarea { min-height: 2.8rem; max-height: 5rem; padding: .35rem .5rem; font-size: .8rem; resize: vertical; }
body .visorPDFErrorRevisionPRLCAE { margin: .2rem 0 0; color: #b02a37; font-size: .75rem; }
body .visorPDFErrorRevisionPRLCAE:empty { display: none; }
body .modal.visorPDFPRLCAE [data-bb-handler="validar"],
body .modal.visorPDFPRLCAE [data-bb-handler="validar"]:hover,
body .modal.visorPDFPRLCAE [data-bb-handler="validar"]:focus,
body .modal.visorPDFPRLCAE [data-bb-handler="validar"]:active { background: #218838; border-color: #218838; color: #fff; transition: none; transform: none; }
body .modal.visorPDFPRLCAE [data-bb-handler="rechazar"],
body .modal.visorPDFPRLCAE [data-bb-handler="rechazar"]:hover,
body .modal.visorPDFPRLCAE [data-bb-handler="rechazar"]:focus,
body .modal.visorPDFPRLCAE [data-bb-handler="rechazar"]:active { background: #c82333; border-color: #c82333; color: #fff; transition: none; transform: none; }
@media (max-width: 576px) {
    body .modal.bootbox.bootboxCompacto.visorPDFPRLCAE .modal-dialog { width: 100% !important; height: 100vh; height: 100dvh; margin: 0; }
    body .modal.visorPDFPRLCAE .modal-content { border-radius: 0; }
}

/* Modales alineados con el patrón Bootstrap 4 utilizado en Portal_Empleado. */
body .modal {
    color: #212529;
}

body .modal-content {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: .3rem;
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .15);
}

body .modal .modal-header {
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #fff !important;
    color: #212529 !important;
}

body .modal .modal-title {
    min-width: 0;
    margin-right: 8px;
    color: #212529 !important;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body .modal .modal-header .close {
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    padding: 0;
    color: #6c757d !important;
    font-size: 1.5rem;
    line-height: 1;
    opacity: .75;
}

body .modal .modal-header .close:hover {
    opacity: 1;
}

body .modal .modal-body {
    padding: 1rem;
    background: #fff;
}

body .modal-body .form-group {
    margin-bottom: 1rem;
}

body .modal .modal-body label {
    margin-bottom: .25rem;
    color: #212529;
    font-size: .75rem;
    font-weight: 400;
}

/* Los avisos de Validate deben destacar también dentro de los modales. */
body .modal-body label.error,
body .modal-body .invalid-feedback {
    color: #dc3545;
    white-space: normal;
}
body .modal-body .form-control.error,
body .modal-body .select2-selection.error {
    border-color: #dc3545;
}
body .modal-body input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 13px;
}
body .modal .modal-body .form-control,
body .modal .modal-body .custom-file-label {
    min-height: 31px;
    height: 31px;
    padding: .25rem .5rem;
    border-color: #c8d5e0;
    border-radius: .25rem;
    box-shadow: none;
    font-size: .875rem;
}

body .modal .modal-body textarea.form-control {
    height: auto;
    min-height: 86px;
}

/* El icono comparte exactamente la altura del campo, incluidos los calendarios. */
body .modal .modal-body .input-group > .input-group-prepend,
body .modal .modal-body .input-group > .input-group-append { height: 31px; }
body .modal .modal-body .input-group-text,
body .modal .modal-body .input-group-append > .btn,
body .modal .modal-body .input-group-prepend > .btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 31px;
    min-height: 31px;
    padding: 0 9px;
    border-color: #c8d5e0;
    font-size: 13px;
    line-height: 1;
}
body .modal .modal-body .input-group-text > svg,
body .modal .modal-body .input-group .btn > svg { width: 13px; height: 13px; }
body .modal .modal-body .select2-container { max-width: 100%; }
body .modal .modal-body .select2-selection--single { min-height: 31px; height: 31px; }
body .modal .modal-body .select2-selection--single .select2-selection__rendered { line-height: 29px; font-size: 13px; }

/* Tipo documental: Select2 y el botón informativo comparten la misma caja.
 * La altura mínima del tema de Select2 no debe superar la del input-group. */
body .modal .modal-body .tipoDocumentalSelectorPRLCAE {
    --alto-tipo-documental: 31px;
    align-items: flex-start;
    flex-wrap: nowrap;
}
body .modal .modal-body .tipoDocumentalSelectorPRLCAE > select:not(.select2-hidden-accessible),
body .modal .modal-body .tipoDocumentalSelectorPRLCAE > .select2-container,
body .modal .modal-body .tipoDocumentalSelectorPRLCAE .select2-selection--single,
body .modal .modal-body .tipoDocumentalSelectorPRLCAE > .input-group-append,
body .modal .modal-body .tipoDocumentalSelectorPRLCAE > .input-group-append > .btn {
    box-sizing: border-box !important;
    height: var(--alto-tipo-documental) !important;
    min-height: var(--alto-tipo-documental) !important;
    max-height: var(--alto-tipo-documental) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
body .modal .modal-body .tipoDocumentalSelectorPRLCAE .select2-selection--single {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
body .modal .modal-body .tipoDocumentalSelectorPRLCAE .select2-selection__rendered,
body .modal .modal-body .tipoDocumentalSelectorPRLCAE .select2-selection__arrow {
    height: calc(var(--alto-tipo-documental) - 2px) !important;
    line-height: calc(var(--alto-tipo-documental) - 2px) !important;
}
body .modal .modal-body .tipoDocumentalSelectorPRLCAE > .input-group-append > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body .modal-body .form-control:focus,
body .modal-body .custom-file-input:focus ~ .custom-file-label {
    border-color: #2585b2;
    box-shadow: 0 0 0 .15rem rgba(37, 133, 178, .16);
}

body .modal-body .custom-file-label {
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #536574;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 100px;
}

body .modal-body .custom-file-label::after {
    height: 29px;
    padding-top: .3rem;
    border-left-color: #c8d5e0;
    background: #edf4f8;
    color: #244d6d;
    font-weight: 600;
}

body .modal .modal-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #fff !important;
}

body .modal-footer .btn,
body .modal-body > .btn,
body .modal-body .caeAccionesDocumentos .btn {
    font-weight: 400;
}

body .modal .btn-primary {
    border-color: #2e6da4;
    background-color: #337ab7;
}

body .modal .btn-primary:hover,
body .modal .btn-primary:focus {
    border-color: #204d74;
    background-color: #286090;
}

/* Botones de ayuda pequeños con el estilo usado en Portal_Empleado. */
body #contenedorBase #botones .btn-info.ayudaPRLCAE,
body #contenedorBase .cabeceraAdministracionCAE .btn-info.ayudaPRLCAE {
    min-width: 0 !important;
    min-height: 31px !important;
    height: 31px !important;
    padding: .25rem .5rem !important;
    border-radius: .2rem !important;
    font-size: .875rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    box-shadow: none;
}

body #contenedorBase #botones .btn-info.ayudaPRLCAE:focus,
body #contenedorBase .cabeceraAdministracionCAE .btn-info.ayudaPRLCAE:focus {
    box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .25);
}

/* También se normalizan las pestañas que aparecen dentro de modales, como
 * el detalle de expediente, con el mismo aspecto Bootstrap de Portal_Empleado. */
body .modal .nav-tabs {
    border-bottom: 1px solid #dee2e6;
    background: transparent !important;
}

body .modal .nav-tabs .nav-link {
    padding: .25rem .5rem;
    color: #495057 !important;
    font-size: .875rem;
    font-weight: 400 !important;
    border: 1px solid transparent !important;
    border-radius: .25rem .25rem 0 0 !important;
}

body .modal .nav-tabs .nav-link:hover,
body .modal .nav-tabs .nav-link:focus {
    color: #0056b3 !important;
    border-color: #e9ecef #e9ecef #dee2e6 !important;
}

body .modal .nav-tabs .nav-link.active {
    color: #495057 !important;
    background: #fff !important;
    border-color: #dee2e6 #dee2e6 #fff !important;
}

/* Zona de firma manuscrita con el patrón de Portal_Empleado. Se usa en los
 * formularios cuya firma debe validarse con IA antes de registrar el PDF. */
body .cajaFirmaIA {
    width: 100%;
    max-width: 300px;
    height: 150px;
    min-height: 150px;
    margin: 0 auto;
    border: dashed 1px #53777a;
    border-radius: 0;
    box-shadow: inset 0 0 5px 1px #ddd;
    background: #fff;
    text-align: center;
    overflow: hidden;
    touch-action: none;
    transition: .2s;
}

body .cajaFirmaIA canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* Pistas de uso cortas, junto al contenido que explican. */
body .ayudaContextualPRLCAE {
    margin: 0 10px 8px;
    padding: 6px 9px;
    border-left: 3px solid #17a2b8;
    background: #f8f9fa;
    color: #495057;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
}

body .ayudaContextualPRLCAE i {
    margin-right: 4px;
    color: #17a2b8;
}

body .modal .select2-container--bootstrap4 .select2-selection {
    min-height: 31px;
    border-color: #c8d5e0;
}

body .modal .select2-container--bootstrap4 .select2-selection__rendered {
    line-height: 29px;
}

body .modal .select2-container--bootstrap4 .select2-selection--single {
    height: 31px;
}

body .modal .select2-container--bootstrap4 .select2-selection__arrow {
    height: 29px;
}

body #modalCAE_Documentos .caeFiltrosDocumentos {
    margin-bottom: 14px !important;
    padding: 10px 12px;
    border: 1px solid #d7e2eb;
    border-left: 4px solid #1d789f;
    border-radius: 4px;
    background: #f6fafc;
}

body #modalCAE_Documentos #tablaCAE_Documentos {
    height: 220px !important;
    margin-bottom: 16px;
    border: 1px solid #d7e2eb;
    border-radius: 4px;
    overflow: hidden;
}

body #modalCAE_Documentos .caeAccionesDocumentos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0 !important;
}

body #modalCAE_Documentos .caeAccionesDocumentos .btn {
    margin-right: 0;
}

body .modal .tabulator {
    font-size: 11px;
}

body .tabulator .accionesTablaCAE,
body .tabulator .btn-tabla {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
}

body .tabulator .accionesTablaCAE .btn,
body .tabulator .btn-tabla .btn {
    width: 100%;
    min-height: 29px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
}

@media (max-width: 767.98px) {
    body .modal-dialog {
        max-width: calc(100% - 16px);
        margin: 8px auto;
    }

    body .modal .modal-header {
        padding: 1rem;
    }

    body .modal .modal-body {
        max-height: calc(100vh - 150px);
        padding: 1rem;
        overflow-y: auto;
    }

    body .modal .modal-footer {
        flex-wrap: wrap;
        padding: 1rem;
    }

    body .modal .modal-footer .btn {
        flex: 0 0 auto;
    }

    body #modalCAE_Documentos #tablaCAE_Documentos {
        height: 190px !important;
    }
}

/* Estilo común de módulos, siguiendo la paleta azul y los controles sencillos
 * de Portal_Empleado y el patrón de paneles de Coordinación de clientes. */
body main > #contenedorBase,
body main > #contenedorAdministracionCAE {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    width: auto;
    max-width: none;
    margin: 6px 10px 0 0;
    text-align: center;
}

body #contenedorBase,
body #contenedorAdministracionCAE {
    color: #212529;
}

body #contenedorBase h2,
body #contenedorAdministracionCAE h2 {
    color: #14283d;
}

body #contenedorBase .form-control,
body #contenedorAdministracionCAE .form-control,
body #contenedorBase .select2-container--bootstrap4 .select2-selection,
body #contenedorAdministracionCAE .select2-container--bootstrap4 .select2-selection {
    border-color: #c8d5e0;
    border-radius: .25rem;
    color: #495057;
    box-shadow: none;
}

body #contenedorBase .form-control:focus,
body #contenedorAdministracionCAE .form-control:focus,
body #contenedorBase .select2-container--bootstrap4.select2-container--focus .select2-selection,
body #contenedorAdministracionCAE .select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #337ab7;
    box-shadow: 0 0 0 .15rem rgba(51, 122, 183, .16);
}

body #contenedorBase .btn-primary,
body #contenedorAdministracionCAE .btn-primary {
    border-color: #2e6da4;
    background-color: #337ab7;
}

body #contenedorBase .btn-primary:hover,
body #contenedorBase .btn-primary:focus,
body #contenedorAdministracionCAE .btn-primary:hover,
body #contenedorAdministracionCAE .btn-primary:focus {
    border-color: #204d74;
    background-color: #286090;
}

body #contenedorBase [class*="panelFiltros"],
body #contenedorAdministracionCAE [class*="panelFiltros"] {
    border-color: #cfd8e6;
    border-left-color: #4d6f9d;
    border-radius: 4px;
    background-color: #f4f7fb;
}

body #contenedorBase .tabulator,
body #contenedorAdministracionCAE .tabulator {
    border-color: #cfd8e6;
    background-color: #fff;
    color: #212529;
}

body #contenedorBase .tabulator .tabulator-header,
body #contenedorBase .tabulator .tabulator-header .tabulator-col,
body #contenedorAdministracionCAE .tabulator .tabulator-header,
body #contenedorAdministracionCAE .tabulator .tabulator-header .tabulator-col {
    background-color: #212529 !important;
    color: #fff !important;
}

body #contenedorBase .tabulator .tabulator-row,
body #contenedorAdministracionCAE .tabulator .tabulator-row {
    border-bottom-color: #d4dbe4;
}

body #contenedorBase .tabulator .tabulator-row .tabulator-cell,
body #contenedorAdministracionCAE .tabulator .tabulator-row .tabulator-cell {
    border-right-color: #d4dbe4;
}

/* Las tablas de empresas, usuarios e invitaciones siguen la cuadrícula usada
 * en el resto de los listados PRL/CAE. */
body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator,
body #contenedorBase #tablaCAE_Invitaciones.tabulator {
    border: 1px solid #d5dde5;
    border-radius: 3px;
}

body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator .tabulator-header,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator .tabulator-header,
body #contenedorBase #tablaCAE_Invitaciones.tabulator .tabulator-header {
    border-bottom: 1px solid #15191d;
}

body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator .tabulator-header .tabulator-col,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator .tabulator-header .tabulator-col,
body #contenedorBase #tablaCAE_Invitaciones.tabulator .tabulator-header .tabulator-col {
    border-right: 1px solid #53606b;
}

body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator .tabulator-row,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator .tabulator-row,
body #contenedorBase #tablaCAE_Invitaciones.tabulator .tabulator-row {
    border-bottom: 1px solid #dbe2e8;
    background: #fff;
}

body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator .tabulator-row.tabulator-row-even,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator .tabulator-row.tabulator-row-even,
body #contenedorBase #tablaCAE_Invitaciones.tabulator .tabulator-row.tabulator-row-even {
    background: #f8fafc;
}

body #contenedorAdministracionCAE #tablaEmpresasAdministracionCAE.tabulator .tabulator-row .tabulator-cell,
body #contenedorAdministracionCAE #tablaUsuariosAdministracionCAE.tabulator .tabulator-row .tabulator-cell,
body #contenedorBase #tablaCAE_Invitaciones.tabulator .tabulator-row .tabulator-cell {
    border-right: 1px solid #cbd5df;
}

/* Las ayudas y los procedimientos usan un ancho de lectura limitado, texto
 * alineado y espaciado para listas, tablas y párrafos en todos los módulos. */
body #modalAyuda .modal-dialog,
body [id*="modalAyuda"] .modal-dialog {
    width: calc(100% - 32px);
    max-width: 480px;
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

body #modalAyuda .modal-header h5,
body [id*="modalAyuda"] .modal-header h5 {
    min-width: 0;
    margin-right: 8px;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body #modalAyuda .modal-dialog .modal-content,
body [id*="modalAyuda"] .modal-dialog .modal-content {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: calc(100vh - 48px);
}

body #modalAyuda .modal-dialog .modal-content .modal-body,
body [id*="modalAyuda"] .modal-dialog .modal-content .modal-body {
    flex: 0 1 auto;
    max-height: calc(100vh - 160px);
    min-height: 0;
    overflow: auto;
    color: #343a40;
    font-size: .9375rem;
    line-height: 1.55;
    text-align: left;
    overflow-wrap: anywhere;
}

body #modalAyuda .modal-body p,
body [id*="modalAyuda"] .modal-body p {
    margin: 0 0 .75rem;
}

body #modalAyuda .modal-body p:last-child,
body [id*="modalAyuda"] .modal-body p:last-child {
    margin-bottom: 0;
}

body #modalAyuda .modal-body h1,
body #modalAyuda .modal-body h2,
body #modalAyuda .modal-body h3,
body #modalAyuda .modal-body h4,
body [id*="modalAyuda"] .modal-body h1,
body [id*="modalAyuda"] .modal-body h2,
body [id*="modalAyuda"] .modal-body h3,
body [id*="modalAyuda"] .modal-body h4 {
    margin: 1rem 0 .5rem;
    color: #1f4e79;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

body #modalAyuda .modal-body h1:first-child,
body #modalAyuda .modal-body h2:first-child,
body #modalAyuda .modal-body h3:first-child,
body #modalAyuda .modal-body h4:first-child,
body [id*="modalAyuda"] .modal-body h1:first-child,
body [id*="modalAyuda"] .modal-body h2:first-child,
body [id*="modalAyuda"] .modal-body h3:first-child,
body [id*="modalAyuda"] .modal-body h4:first-child {
    margin-top: 0;
}

body #modalAyuda .modal-body ul,
body #modalAyuda .modal-body ol,
body [id*="modalAyuda"] .modal-body ul,
body [id*="modalAyuda"] .modal-body ol {
    margin: .25rem 0 .9rem;
    padding-left: 1.35rem;
}

body #modalAyuda .modal-body li,
body [id*="modalAyuda"] .modal-body li {
    margin-bottom: .35rem;
}

body #modalAyuda .modal-body table,
body [id*="modalAyuda"] .modal-body table {
    width: 100%;
    margin: .5rem 0 1rem;
    border-color: #dee2e6;
    font-size: .875rem;
}

body #modalAyuda .modal-body th,
body #modalAyuda .modal-body td,
body [id*="modalAyuda"] .modal-body th,
body [id*="modalAyuda"] .modal-body td {
    padding: .45rem .55rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

body #modalAyuda .modal-body pre,
body [id*="modalAyuda"] .modal-body pre {
    max-width: 100%;
    overflow: auto;
    padding: .65rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    background: #f8f9fa;
    white-space: pre-wrap;
}

body #modalCAE_AccionesDocumento .modal-footer > .btn:not([data-dismiss]) {
    border-color: #cfd8e6;
    background: #fff;
    color: #337ab7;
}

body #modalCAE_AccionesDocumento .modal-footer > .btn:not([data-dismiss]):hover,
body #modalCAE_AccionesDocumento .modal-footer > .btn:not([data-dismiss]):focus {
    border-color: #9cb7cc;
    background: #f4f7fb;
    color: #286090;
}

body #modalCAE_AccionesDocumento #btnCAE_BajaDocumento {
    border-color: #dc3545;
    color: #bd2130;
}

body #modalCAE_AccionesDocumento #btnCAE_BajaDocumento:hover,
body #modalCAE_AccionesDocumento #btnCAE_BajaDocumento:focus {
    background: #fff5f5;
    color: #a71d2a;
}

/* Ayuda y procedimientos: tamaño modal-xl de Portal_Empleado y un único
 * formato de lectura en todas las pantallas PRL/CAE. */
body .btn-info.ayudaPRLCAE {
    box-sizing: border-box;
    flex: 0 0 31px;
    width: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    height: 31px !important;
    margin-left: 3px;
    padding: .25rem .5rem !important;
    border-radius: .2rem;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    box-shadow: none;
}

body .cabeceraCAE .grupoAyudaPRLCAE,
body .cabeceraAdministracionCAE .grupoAyudaPRLCAE {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex;
    gap: 3px;
    align-items: center;
    transform: translateY(-50%);
}

body #contenedorBase .cabeceraCAE .grupoAyudaPRLCAE .btn-info.ayudaPRLCAE,
body .cabeceraAdministracionCAE .grupoAyudaPRLCAE .btn-info.ayudaPRLCAE {
    position: static !important;
    top: auto !important;
    right: auto !important;
    min-width: 31px;
    transform: none !important;
}

body .modal.modalAyudaPRLCAE .modal-dialog {
    width: calc(100% - 32px);
    max-width: 480px;
    height: auto;
    margin: 1.75rem auto;
}

body .modal.modalAyudaPRLCAE .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: .3rem;
    background: #fff;
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .15);
}

body .modal.modalAyudaPRLCAE .modal-header,
body .modal.modalAyudaPRLCAE .modal-footer {
    flex: 0 0 auto;
}

body .modal.modalAyudaPRLCAE .modal-title {
    min-width: 0;
    margin-right: 8px;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body .modal.modalAyudaPRLCAE .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding: 1rem;
    background: #fff;
    color: #343a40;
    font-size: .9375rem;
    line-height: 1.55;
    text-align: left;
    overflow-wrap: anywhere;
}

body .modal.modalAyudaPRLCAE .modal-body p {
    margin: 0 0 .75rem;
}

body .modal.modalAyudaPRLCAE .modal-body p:last-child {
    margin-bottom: 0;
}

body .modal.modalAyudaPRLCAE .modal-body h1,
body .modal.modalAyudaPRLCAE .modal-body h2,
body .modal.modalAyudaPRLCAE .modal-body h3,
body .modal.modalAyudaPRLCAE .modal-body h4 {
    margin: 1rem 0 .5rem;
    color: #1f4e79;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

body .modal.modalAyudaPRLCAE .modal-body h1:first-child,
body .modal.modalAyudaPRLCAE .modal-body h2:first-child,
body .modal.modalAyudaPRLCAE .modal-body h3:first-child,
body .modal.modalAyudaPRLCAE .modal-body h4:first-child {
    margin-top: 0;
}

body .modal.modalAyudaPRLCAE .modal-body ul,
body .modal.modalAyudaPRLCAE .modal-body ol {
    margin: .25rem 0 .9rem;
    padding-left: 1.35rem;
}

body .modal.modalAyudaPRLCAE .modal-body li {
    margin-bottom: .35rem;
}

body .modal.modalAyudaPRLCAE .modal-body table {
    width: 100%;
    margin: .5rem 0 1rem;
    border-color: #dee2e6;
    font-size: .875rem;
}

body .modal.modalAyudaPRLCAE .modal-body th,
body .modal.modalAyudaPRLCAE .modal-body td {
    padding: .45rem .55rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

body .modal.modalAyudaPRLCAE .modal-body pre {
    max-width: 100%;
    overflow: auto;
    padding: .65rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    background: #f8f9fa;
    white-space: pre-wrap;
}

@media (max-width: 767.98px) {
    body .modal.modalAyudaPRLCAE .modal-dialog {
        width: calc(100% - 16px);
        max-width: 480px;
        margin: 8px auto;
    }

    body .modal.modalAyudaPRLCAE .modal-content {
        max-height: calc(100vh - 16px);
    }

    body .modal.modalAyudaPRLCAE .modal-body {
        max-height: calc(100vh - 150px);
    }
}

/* Bootbox comparte una caja compacta y centrada para alertas, confirmaciones,
 * formularios y diálogos con contenido largo. */
body .bootbox.bootboxCompacto .modal-dialog {
    width: calc(100% - 32px) !important;
    max-width: 400px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body .bootbox.bootboxCompacto .modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 32px);
}

/* El selector de catálogo necesita espacio para su tabla, también en Trabajadores. */
body .bootbox.bootboxCompacto.selectorTiposDocumentalesPRLCAE .modal-dialog {
    width: calc(100vw - 48px) !important;
    max-width: 1320px !important;
}
body .bootbox.selectorTiposDocumentalesPRLCAE .modal-content { max-height: calc(100dvh - 32px); }
body .bootbox.selectorTiposDocumentalesPRLCAE .modal-body { overflow-y: auto; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-cell {
    font-size: 11px !important;
    white-space: normal;
    overflow-wrap: anywhere;
    border-right: 1px solid #cfd8e3;
}
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-row { border-bottom: 1px solid #cfd8e3; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-col { font-size: 10px !important; min-width: 0; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-header-filter input {
    width: 100%;
    height: 31px;
    min-height: 31px;
    font-size: 12px !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-header-filter { min-width: 0; }
body .bootbox.selectorTiposDocumentalesPRLCAE .selector-tipos-check-header { display: flex; width: 100%; min-height: 24px; align-items: center; justify-content: center; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-row.tipo-elegido { background: #e1f1e8; box-shadow: inset 3px 0 #28734a; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-row.tipo-bloqueado { color: #6c757d; background: #f0f2f4; opacity: .65; cursor: default; }
body .bootbox.selectorTiposDocumentalesPRLCAE .tabulator .tabulator-row.tipo-bloqueado .tabulator-cell { cursor: default; }
body .bootbox.selectorTiposDocumentalesPRLCAE .seleccionar-tipo { width: 27px; height: 27px; min-height: 27px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
body .bootbox.selectorTiposDocumentalesPRLCAE input.seleccionar-tipo[type="checkbox"],
body .bootbox.selectorTiposDocumentalesPRLCAE input.seleccionar-todos-tipos[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; cursor: pointer; accent-color: #337ab7; }
body .bootbox.selectorTiposDocumentalesPRLCAE .seleccionar-tipo[aria-pressed="true"] { background: #28734a; border-color: #28734a; color: #fff; }
body .bootbox.selectorTiposDocumentalesPRLCAE .selector-tipos-ayuda { font-size: 12px; color: #40566c; }
body .bootbox.selectorTiposDocumentalesPRLCAE .selector-tipos-seleccion { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
body .bootbox.selectorTiposDocumentalesPRLCAE .selector-tipos-elegido { min-width: 0; overflow-wrap: anywhere; }
body .bootbox.selectorTiposDocumentalesPRLCAE .cambiar-seleccion { flex: 0 0 auto; height: 31px; }
@media (max-width: 575.98px) {
    body .bootbox.bootboxCompacto.selectorTiposDocumentalesPRLCAE .modal-dialog { width: calc(100vw - 16px) !important; }
}

@media (max-width: 575.98px) {
    body .bootbox.bootboxCompacto .modal-dialog {
        width: calc(100% - 16px) !important;
        max-width: none !important;
    }
}

