/* El resaltado conserva el tamaño y la tipografía de cada tabla. */
mark.coincidenciaPRLCAE { background: #fff176; color: inherit; padding: 0; font: inherit; }

/* Base común de Tabulator. Las columnas y los estados pertenecen a cada módulo. */
body #contenedorBase .tabulator,
body .modal .tabulator { border: 1px solid #cfd8e3; background: #fff; font-size: 11px; }
body #contenedorBase .tabulator .tabulator-header,
body .modal .tabulator .tabulator-header,
body #contenedorBase .tabulator .tabulator-header .tabulator-col,
body .modal .tabulator .tabulator-header .tabulator-col {
    background: #212529;
    color: #fff;
    border-color: #454b50;
    font-size: 10px;
    font-weight: 600;
}
body #contenedorBase .tabulator .tabulator-header .tabulator-col-content,
body .modal .tabulator .tabulator-header .tabulator-col-content { padding: 7px 6px; }
body #contenedorBase .tabulator .tabulator-row,
body .modal .tabulator .tabulator-row { min-height: 32px; background: #fff; }
body #contenedorBase .tabulator .tabulator-row.tabulator-row-even,
body .modal .tabulator .tabulator-row.tabulator-row-even { background: #f6f8fa; }
body #contenedorBase .tabulator .tabulator-row .tabulator-cell,
body .modal .tabulator .tabulator-row .tabulator-cell { padding: 4px 6px; border-color: #d3dce6; font-size: 11px; }
body #contenedorBase .tabulator .tabulator-row:hover,
body .modal .tabulator .tabulator-row:hover { background: #edf4fa; }
body #contenedorBase .tabulator .tabulator-row.tabulator-selected,
body .modal .tabulator .tabulator-row.tabulator-selected { background: #dcebf7; }
body .tabulator .tabulator-tableholder .tabulator-placeholder .tabulator-placeholder-contents {
    width: 100%;
    padding: 24px 12px;
    color: #647381;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}
/* Tabulator 5.2 puede conservar el placeholder al filtrar durante setData.
   Sólo se oculta cuando hay filas renderizadas; errores y vacíos siguen visibles. */
body .tabulator-tableholder:has(> .tabulator-table > .tabulator-row:not(.tabulator-calcs)) > .tabulator-placeholder { display: none; }
body .tabulator .tabulator-placeholder-contents p { margin: 0; font-size: inherit; font-weight: inherit !important; }
body .tabulator .tabulator-placeholder-contents .text-muted { color:inherit !important; }
body .tabulator .tabulator-placeholder-contents .text-danger { color: #b02a37 !important; }

/* Los filtros se ajustan sin recortar controles ni solaparse con las acciones. */
body #contenedorBase [class*="panelFiltros"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    height: auto !important;
    min-height: 51px;
    padding: 8px 10px;
    border: 1px solid #cbd8e5;
    border-left: 4px solid #50749a;
    border-radius: 3px;
    background: #f4f7fb;
}
body #contenedorBase [class*="panelFiltros"] > .form-control,
body #contenedorBase [class*="panelFiltros"] > .select2-container { max-width: 100% !important; }
@media (max-width: 767.98px) {
    body #contenedorBase [class*="panelFiltros"] > .form-control,
    body #contenedorBase [class*="panelFiltros"] > .select2-container { flex: 1 1 200px; width: auto !important; min-width: 0; }
    body #contenedorBase #titulo { white-space: normal; font-size: 20px; }
}

/* Acciones de documentos: una fila compacta y reconocible en todas las tablas. */
body .tabulator .accionesDocumentoPRLCAE,
body .table .accionesDocumentoPRLCAE,
body .accionesTablaPRLCAE {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: max-content;
    max-width: 100%;
    min-height: 27px;
    white-space: nowrap !important;
}
body .tabulator .accionesDocumentoPRLCAE .accionDocumentoPRLCAE,
body .table .accionesDocumentoPRLCAE .accionDocumentoPRLCAE,
body .tabulator .accionDocumentoPRLCAE,
body .table .accionDocumentoPRLCAE,
body .tabulator .accionTablaPRLCAE,
body .table .accionTablaPRLCAE,
body .accionesTablaPRLCAE .accionTablaPRLCAE {
    box-sizing: border-box;
    display: inline-flex !important;
    flex: 0 0 27px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 27px !important;
    min-width: 27px !important;
    height: 27px !important;
    min-height: 27px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
body .accionesDocumentoPRLCAE .accionDocumentoPRLCAE > *,
body .accionDocumentoPRLCAE > *,
body .accionTablaPRLCAE > * {
    pointer-events: none;
}

/* Los filtros conservan la misma altura y fuente al activar Select2. */
body .indicadorFiltrosPRLCAE {
    display: inline-flex;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 31px;
    color: #355d78;
}
body #contenedorBase .fechaFiltroPRLCAE {
    flex: 0 1 170px;
    width: 170px;
    max-width: 100%;
    min-width: 140px;
    height: 31px;
}
body #contenedorBase .fechaFiltroPRLCAE > .form-control {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
    max-width: none !important;
    height: 31px !important;
    min-height: 31px;
    font-size: 12px;
    padding: 4px 8px;
}
body #contenedorBase .fechaFiltroPRLCAE .input-group-append,
body #contenedorBase .fechaFiltroPRLCAE .input-group-prepend { height: 31px; }
body #contenedorBase .fechaFiltroPRLCAE .btn,
body #contenedorBase .fechaFiltroPRLCAE .input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 31px !important;
    min-height: 31px;
    padding: 0;
    border-color: #c8d7e4;
    color: #527492;
    background: #fff;
    font-size: 13px;
    line-height: 1;
}
body #contenedorBase .fechaFiltroPRLCAE .btn > svg { width: 13px; height: 13px; }
body #contenedorBase .fechaFiltroPRLCAE .btn:hover { background: #edf4fa; }
body [class*="panelFiltros"] .form-control,
body [class*="panelFiltros"] .select2-selection--single {
    min-height:31px;
    height:31px !important;
    font-size:12px !important;
}
body [class*="panelFiltros"] .select2-selection--single .select2-selection__rendered {
    line-height:29px !important;
    font-size:12px !important;
    text-align:left;
}
body [class*="panelFiltros"] .select2-selection--single .select2-selection__arrow { height:29px; }

/* Select2 Bootstrap4 centraba el indicador desde mitad de control con altura fija. */
body .select2-container .select2-selection--single .select2-selection__arrow {
    top: 0 !important;
    right: 3px;
    bottom: 0 !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
body .select2-container .select2-selection--single .select2-selection__arrow b {
    top: 50% !important;
    left: 50% !important;
    margin-top: -2px !important;
    margin-left: -4px !important;
}

/* Tabla compartida del selector de destinatarios en entregas de lectura. */
body .modal .tablaSelectorEmpleadosContenedor {
    max-height: min(56vh, 520px);
    overflow-y: auto;
    border: 1px solid #d2dbe4;
    border-radius: 4px;
    background: #fff;
}
body .modal .tablaSelectorEmpleadosPRLCAE {
    margin: 0;
    color: #263746;
    font-size: 11px;
}
body .modal .tablaSelectorEmpleadosPRLCAE thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 7px 9px;
    border-color: #343a40;
    background: #212529;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
    white-space: nowrap;
}
body .modal .tablaSelectorEmpleadosPRLCAE tbody td {
    padding: 5px 9px;
    border-color: #d8e0e7;
    font-size: 11px;
    vertical-align: middle;
}
body .modal .tablaSelectorEmpleadosPRLCAE tbody tr:hover { background: #eef5fb; }
body .modal .tablaSelectorEmpleadosPRLCAE th:first-child,
body .modal .tablaSelectorEmpleadosPRLCAE td:first-child {
    width: 36px;
    text-align: center;
}
body .modal .tablaSelectorEmpleadosPRLCAE input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: middle;
    accent-color: #1769aa;
}
body .modal .selectorEmpleadosAcciones { gap: 12px; }
body .modal .selectorEmpleadosBotones { display: flex; flex-wrap: wrap; gap: 6px; }
body .modal .selectorEmpleadosBotones .btn,
body .modal .selectorEmpleadosAcciones { min-height: 31px; }
body .modal .selectorEmpleadosAcciones #selectorEmpleadosContador {
    padding: 0;
    border: 0;
    background: transparent;
    color: #243443;
    font-size: 13px;
    font-weight: 600;
}
body .modal #selectorEmpleadosContador {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    body .modal .selectorEmpleadosAcciones { align-items: flex-start !important; flex-direction: column; }
    body .modal .tablaSelectorEmpleadosPRLCAE { min-width: 720px; }
}

.tipoDocumentalSelectorPRLCAE { width: 100%; min-width: 0; }
.tipoDocumentalSelectorPRLCAE > .select2-container { flex: 1 1 auto; width: 1% !important; min-width: 0; }
.tipoDocumentalSelectorPRLCAE > .form-control:not(.select2-hidden-accessible) { flex: 1 1 auto; width: 1%; min-width: 0; }
.tipoDocumentalSelectorPRLCAE .input-group-append .btn { min-width: 42px; }
.bootboxInfoTipoDocumentalPRLCAE .bootbox-body dt { margin-bottom: .25rem; }
.bootboxInfoTipoDocumentalPRLCAE .bootbox-body dd { white-space: pre-wrap; }
.cae-acciones-revision{display:flex;flex-wrap:nowrap;gap:4px;justify-content:center}.cae-acciones-revision .btn{padding:3px 6px;min-width:25px}.go-rama{border-bottom:1px solid #d8e0e7;padding:8px}.go-rama summary{cursor:pointer}.go-rama summary .btn{float:right}.go-hijos{padding-left:18px;clear:both}.go-hoja{padding:5px}.go-contactos .form-row>.btn{margin:8px 5px}.go-archivo{overflow:auto;max-height:70vh}
body.paginaExpedienteCompletoCAE #CAE_DetalleResumen{display:none!important}body.paginaExpedienteCompletoCAE #CAE_InvitacionesObra{display:none}body.paginaExpedienteCompletoCAE .cae-empresas-subseccion th:nth-child(3),body.paginaExpedienteCompletoCAE .cae-empresas-subseccion td:nth-child(3){display:none}
