:root {
    --tiq-green: #86c94b;
    --tiq-green-dark: #3f9959;
    --tiq-green-deep: #287f52;
    --tiq-green-soft: #eaf5df;
    --tiq-ink: #29483f;
    --tiq-muted: #71837d;
    --tiq-line: #dbe7dc;
    --tiq-surface: #ffffff;
    --tiq-page: #f3f8f1;
    --tiq-shadow: 0 14px 35px rgba(39, 91, 61, .09);
}

/* Todas las tablas, también las cabeceras clonadas del scroll y los diálogos.
   Ocultar únicamente los indicadores: la ordenación sigue disponible. */
table thead .DataTables_sort_icon,
table thead .DataTables_sort_wrapper > .ui-icon {
    display: none !important;
}
table.dataTable thead :is(.sorting, .sorting_asc, .sorting_desc, .sorting_asc_disabled, .sorting_desc_disabled) {
    background-image: none !important;
}
table.dataTable thead :is(.sorting, .sorting_asc, .sorting_desc, .sorting_asc_disabled, .sorting_desc_disabled)::before,
table.dataTable thead :is(.sorting, .sorting_asc, .sorting_desc, .sorting_asc_disabled, .sorting_desc_disabled)::after {
    display: none !important;
    content: none !important;
}

html, body { width: 100%; height: 100%; overflow: hidden; }
body { color: var(--tiq-ink); background: var(--tiq-page); font-family: Calibri, Arial, sans-serif; font-size: 14px; }
#fh5co-home, body > #img_logo { display: none !important; }
#main { inset: 0; background: var(--tiq-page); }

#header {
    box-sizing: border-box; height: 76px; padding: 0 24px; display: flex; align-items: center;
    justify-content: space-between; overflow: visible; background: linear-gradient(110deg, var(--tiq-green-deep), #55a95a 58%, var(--tiq-green));
    box-shadow: 0 6px 22px rgba(33, 100, 66, .18); z-index: 20;
}
#header_info { float: none; min-width: 0; display: flex; align-items: center; gap: 24px; }
#header_info #img_logo { position: static; display: block !important; width: 145px; height: 48px; padding: 0; object-fit: contain; flex: 0 0 auto; }
#header h1 { margin: 0; padding: 0; min-width: 0; color: #fff; font-size: 17px; }
#header_title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#header_buttons { float: none; padding: 0; display: flex; gap: 8px; }

.btn_header, .button_little, .button_big {
    box-sizing: border-box !important; align-items: center; justify-content: center;
    margin: 0 !important; border: 1px solid rgba(255,255,255,.34) !important; border-radius: 11px !important;
    background: rgba(255,255,255,.18) !important; box-shadow: none !important;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn_header { width: 44px; height: 44px; }
.btn_header:hover { background: rgba(255,255,255,.3) !important; transform: translateY(-1px); }
.btn_header img, .button_little img { width: 26px; height: 26px; object-fit: contain; }
.release-notes-header-icon {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: #fff;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 16px;
    font-style: italic;
    font-weight: bold;
    line-height: 1;
}
.release-notes-header-label {
    margin-left: 7px;
    color: #fff;
    font-family: Calibri, Arial, sans-serif;
    font-size: 13px;
    font-weight: 750;
}
#btn_release_notes {
    display: inline-flex !important;
    width: auto !important;
    min-width: 44px;
    padding: 0 11px !important;
}

#body {
    box-sizing: border-box; inset: 76px 0 0; padding: 18px; display: grid;
    grid-template-columns: minmax(220px, 17%) minmax(250px, 20%) minmax(480px, 1fr); gap: 16px; overflow: hidden;
}
#body_empresa, #body_centros, #body_fichajes {
    position: relative !important; inset: auto !important; width: auto !important; min-width: 0; min-height: 0; overflow: hidden;
    border: 1px solid var(--tiq-line); border-radius: 17px; background: var(--tiq-surface); box-shadow: var(--tiq-shadow);
}
.manager-role-2 #body { grid-template-columns: minmax(280px, 25%) minmax(540px, 1fr); }
.manager-role-3 #body { grid-template-columns: minmax(0, 1fr); }

.body_header {
    box-sizing: border-box; height: 58px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between;
    color: var(--tiq-ink); background: #fff; border-bottom: 1px solid var(--tiq-line);
}
.body_header_title, .body_header_buttons { float: none; }
.body_header_title h2 { margin: 0; color: var(--tiq-ink); font-size: 17px; line-height: 1.1; }
.body_header_title h2::after { content: ""; display: block; width: 28px; height: 3px; margin-top: 7px; border-radius: 3px; background: var(--tiq-green); }
.body_lista { inset: 58px 0 0 !important; border: 0 !important; border-radius: 0; background: #fff; }

.dataTables_wrapper { height: 100%; color: var(--tiq-ink); }
.dataTables_wrapper .ui-toolbar { box-sizing: border-box; min-height: 54px; padding: 9px 10px !important; border: 0 !important; background: #fff !important; }
.dataTables_wrapper .dataTables_filter { min-height: 36px; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.dataTables_filter input {
    box-sizing: border-box; width: 100% !important; max-width: 170px; height: 36px; margin: 0 !important; padding: 0 12px !important;
    color: var(--tiq-ink); border: 1px solid var(--tiq-line); border-radius: 10px; outline: none; background: #f8fbf7;
}
.dataTables_filter input:focus { border-color: var(--tiq-green); box-shadow: 0 0 0 3px rgba(134,201,75,.16); }
.body_header_buttons { display: flex; gap: 6px; }
.dataTables_filter .body_header_buttons {
    margin-right: 0 !important;
    margin-left: auto !important;
}
#hours_view_mode {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    box-sizing: border-box;
    height: 36px;
    padding: 3px;
    border: 1px solid #d6e7d7;
    border-radius: 10px;
    background: #f2f8f0;
}
#hours_view_mode.is-visible { display: inline-flex; }
#hours_view_mode button {
    box-sizing: border-box;
    min-width: 68px;
    height: 28px;
    padding: 0 10px;
    color: #47705d;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}
#hours_view_mode button:hover { background: #e4f1df; }
#hours_view_mode button.is-active {
    color: #fff;
    background: var(--tiq-green);
    box-shadow: 0 3px 8px rgba(64, 139, 67, .2);
}
.button_little, .button_big {
    width: 36px !important; height: 36px !important; color: #fff !important; border-color: transparent !important;
    background: var(--tiq-green) !important; font-size: 17px !important; font-weight: bold; cursor: pointer;
}
.button_little img { display: block; margin: auto; }
.button_little:hover, .button_big:hover { background: #75b83e !important; transform: translateY(-1px); box-shadow: 0 6px 12px rgba(91,150,57,.2) !important; }

/* Acciones de los paneles: misma presencia que los accesos de cabecera. */
.dataTables_filter .button_little,
.dataTables_filter .button_big {
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #d7e8d4 !important;
    border-radius: 12px !important;
    background: #f1f8ef !important;
    box-shadow: 0 3px 9px rgba(45, 112, 69, .06) !important;
    color: var(--tiq-green-dark) !important;
}
.dataTables_filter .button_little img {
    width: 23px;
    height: 23px;
    filter: brightness(0) saturate(100%) invert(43%) sepia(21%) saturate(1094%) hue-rotate(101deg) brightness(89%) contrast(91%);
}
.dataTables_filter .button_little:hover,
.dataTables_filter .button_big:hover {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--tiq-green-dark), var(--tiq-green)) !important;
    box-shadow: 0 7px 15px rgba(63, 153, 89, .22) !important;
    color: #fff !important;
}
.dataTables_filter .button_little:hover img {
    filter: brightness(0) invert(1);
}

table.dataTable { border-collapse: separate !important; border-spacing: 0 5px !important; }
.dataTables_scrollHead { padding: 0 10px; box-sizing: border-box; background: transparent !important; }
.dataTables_scrollHeadInner {
    overflow: hidden;
    border-radius: 9px;
    background: linear-gradient(90deg, #4aa65d 0%, #68ba51 48%, var(--tiq-green) 100%) !important;
}
table.dataTable thead tr { background: transparent !important; }
table.dataTable thead th {
    padding: 11px 9px !important; color: #fff !important; border: 0 !important;
    background: transparent !important; background-image: none !important;
    font-family: "VAG Rounded Std", Calibri, sans-serif; font-size: 12px;
}
table.dataTable thead th:first-child { border-radius: 9px 0 0 9px; }
table.dataTable thead th:last-child { border-radius: 0 9px 9px 0; }
table.dataTable tbody tr { background: #fff !important; }
table.dataTable tbody td { padding: 10px 9px !important; color: #536d65; border-top: 1px solid #e5ece6 !important; border-bottom: 1px solid #e5ece6 !important; background: #fff; }
table.dataTable tbody td:first-child { border-left: 1px solid #e5ece6; border-radius: 9px 0 0 9px; }
table.dataTable tbody td:last-child { border-right: 1px solid #e5ece6; border-radius: 0 9px 9px 0; }
table.dataTable tbody tr:hover td { background: #f0f8e9 !important; }
table.dataTable tbody tr.selected td { background: var(--tiq-green-soft) !important; color: var(--tiq-ink); }
.dataTables_scrollBody { padding: 0 10px; box-sizing: border-box; }
.dataTables_scrollBody { scrollbar-color: var(--tiq-green) transparent; scrollbar-width: thin; }
.dataTables_scrollBody table thead,
.dataTables_scrollBody table tfoot,
.dataTables_scrollFoot,
.dataTables_scrollFootInner,
table.dataTable tfoot { display: none !important; }
.dataTables_info { color: var(--tiq-muted) !important; }

/* Ficha de empresa: misma composición para crear y editar. */
.company-dialog {
    overflow: hidden !important;
    border: 1px solid #d8e8da !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 72px rgba(27, 65, 46, .27) !important;
}
.company-dialog .ui-dialog-titlebar {
    min-height: 58px;
    padding: 0 22px !important;
    display: flex;
    align-items: center;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 18px 18px 0 0 !important;
}
.company-dialog .ui-dialog-title {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.01em;
}
.company-dialog .ui-dialog-titlebar-close {
    width: 32px;
    height: 32px;
    margin-top: -16px;
    border-radius: 9px !important;
    border: 0 !important;
    background: rgba(255,255,255,.18) !important;
}
.company-dialog .ui-dialog-content {
    padding: 24px 26px 20px !important;
    background: #fff;
}
.company-dialog fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.company-dialog fieldset > label:not(.company-settings-title) {
    display: block;
    margin: 0 0 7px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.company-dialog #frm_emp_cif,
.company-dialog #frm_emp_razon {
    width: 100%;
    height: 43px;
    min-height: 43px;
    margin: 0 0 16px;
    padding: 0 13px;
    color: #173d2d;
    font-size: 14px;
    font-weight: 650;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.company-dialog #frm_emp_cif:focus,
.company-dialog #frm_emp_razon:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.company-dialog .company-settings-title {
    display: block;
    margin: 5px 0 10px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.company-dialog .company-setting {
    position: relative;
    margin: 7px 0;
    overflow: hidden;
    border: 1px solid #deebdf;
    border-radius: 11px;
    background: #fbfdfb;
}
.company-dialog .company-setting input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.company-dialog .company-setting label,
.company-dialog .company-setting .ui-checkboxradio-label {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 12px 14px 12px 48px !important;
    color: #345545 !important;
    font-size: 14px;
    font-weight: 650;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.company-dialog .company-setting .ui-checkboxradio-icon,
.company-dialog .company-setting .ui-checkboxradio-icon-space,
.worker-dialog .worker-setting .ui-checkboxradio-icon,
.worker-dialog .worker-setting .ui-checkboxradio-icon-space {
    display: none !important;
}
.company-dialog .company-setting label::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 6px;
    background: #fff;
}
.company-dialog .company-setting .ui-checkboxradio-checked {
    color: #246640 !important;
    background: #f1f9ee !important;
}
.company-dialog .company-setting .ui-checkboxradio-checked::before {
    border-color: #79be48;
    background: #79be48;
    box-shadow: inset 0 0 0 5px #79be48;
}
.company-dialog .company-setting .ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 19px;
    top: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    transform: translateY(-53%);
}
.company-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 14px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.company-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    gap: 8px;
}
.company-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
    box-shadow: none !important;
}
.company-dialog #btn_emp_list,
.company-dialog #btn_fa {
    color: #367d4a !important;
    border: 1px solid #bcd9bf !important;
    background: #fff !important;
}
.company-dialog #btn_grabar {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .2) !important;
}
.company-dialog #btn_cerrar {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}
@media (max-width: 700px) {
    .company-dialog { max-width: calc(100vw - 28px) !important; }
    .company-dialog .ui-dialog-buttonset { flex-wrap: wrap; }
}

.ui-dialog { overflow: hidden; border: 1px solid var(--tiq-line) !important; border-radius: 17px !important; box-shadow: 0 24px 70px rgba(27,65,46,.24) !important; }
.ui-dialog .ui-dialog-titlebar { padding: 14px 18px !important; color: #fff !important; border: 0 !important; background: linear-gradient(100deg, var(--tiq-green-dark), var(--tiq-green)) !important; }
.ui-dialog .ui-dialog-content { padding: 18px !important; color: var(--tiq-ink); background: #fff; }
.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid var(--tiq-line); background: #fff; }
.ui-dialog input, .ui-dialog select, .ui-dialog textarea { box-sizing: border-box; min-height: 38px; border: 1px solid #cedbd0; border-radius: 9px; background: #f9fbf8; }
.ui-dialog .ui-button { border: 0 !important; border-radius: 9px !important; color: #fff !important; background: var(--tiq-green) !important; }

/* Acceso compacto recuperado de la versión anterior del manager. */
.ui-dialog:has(#frm_login) {
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 70px rgba(20,52,37,.25) !important;
}
.ui-dialog:has(#frm_login) .ui-dialog-titlebar {
    padding: 18px 22px !important;
    color: #fff !important;
    background: #258b58 !important;
    font-family: "VAG Rounded Std", Calibri, sans-serif;
}
.ui-dialog:has(#frm_login) #frm_login {
    box-sizing: border-box;
    padding: 16px 22px 8px !important;
    overflow: hidden !important;
}
.ui-dialog:has(#frm_login) #frm_login fieldset { margin: 0; }
.ui-dialog:has(#frm_login) #frm_login label { margin-bottom: 4px; color: var(--tiq-ink); }
.ui-dialog:has(#frm_login) #frm_login input {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    margin-bottom: 9px;
    padding: 0 10px !important;
}
.ui-dialog:has(#frm_login) .ui-dialog-buttonpane { margin: 0; padding: 9px 16px 12px; background: #fbfdfb; }
.ui-dialog:has(#frm_login) .ui-dialog-buttonpane button { min-width: 78px; font-family: "VAG Rounded Std", Calibri, sans-serif; }

@media (max-width: 1180px) {
    #body { grid-template-columns: minmax(210px, 24%) minmax(230px, 27%) minmax(390px, 1fr); gap: 10px; padding: 12px; }
    #header { padding: 0 14px; }
    #header_info { gap: 14px; }
    #header_info #img_logo { width: 120px; }
}
@media (max-width: 900px) {
    #header_title { max-width: 280px; }
    #body {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: clamp(290px, 35vh, 360px) minmax(0, 1fr);
        overflow: hidden;
    }
    #body_fichajes { grid-column: 1 / -1; }
    .manager-role-2 #body { grid-template-columns: minmax(230px, 35%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
    .manager-role-2 #body_fichajes { grid-column: auto; }
}

/* Debe prevalecer sobre la base genérica de diálogos. */
.ui-dialog.company-dialog {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 72px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.company-dialog .ui-dialog-titlebar {
    min-height: 58px;
    padding: 0 22px !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.company-dialog .ui-dialog-content {
    padding: 24px 26px 20px !important;
}
.ui-dialog.company-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 14px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}

/* Mensajes contextuales de los botones. */
.ui-tooltip {
    max-width: 260px;
    padding: 9px 12px !important;
    color: #244937 !important;
    font-family: "VAG Rounded Std", Calibri, sans-serif !important;
    font-size: 13px !important;
    font-weight: 650;
    line-height: 1.25;
    border: 1px solid #cfe5d1 !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    box-shadow: 0 9px 24px rgba(30, 78, 51, .18) !important;
}

/* Avisos breves, sin el contenedor con desplazamiento heredado. */
.ui-dialog.alert-dialog {
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(27, 65, 46, .25) !important;
}
.ui-dialog.alert-dialog .ui-dialog-titlebar {
    min-height: 52px;
    padding: 0 20px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 16px 16px 0 0 !important;
}
.ui-dialog.alert-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 23px 22px 20px !important;
    overflow: visible !important;
    color: #244937;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    background: #fff;
}
.ui-dialog.alert-dialog .ui-dialog-content h1 {
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.ui-dialog.alert-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 12px 20px 15px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.alert-dialog .ui-dialog-buttonpane button {
    min-width: 98px;
    min-height: 38px;
    margin: 0 !important;
    font-weight: 750;
    border: 0 !important;
    border-radius: 9px !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}

/* Listado de trabajadores: compacto y orientado a la consulta. */
.ui-dialog.workers-dialog {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    max-height: 70dvh;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.workers-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    flex: 0 0 54px;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 17px 17px 0 0 !important;
}
.ui-dialog.workers-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.workers-dialog .ui-dialog-content {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100% !important;
    min-height: 0 !important;
    padding: 14px 20px 10px !important;
    overflow: hidden !important;
    background: #fff;
}
.workers-dialog #tbl_trabajadores_wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-self: stretch;
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0;
    height: 100%;
    margin: 0;
}
.workers-dialog #tbl_trabajadores_wrapper > .fg-toolbar:first-child {
    position: relative;
    box-sizing: border-box;
    min-height: 50px;
    padding: 0 0 10px !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100% !important;
}
.workers-dialog #tbl_trabajadores_wrapper > .fg-toolbar:last-child { display: none; }
.workers-dialog #tbl_trabajadores_filter {
    order: 2;
    float: none !important;
    margin: 0;
}
.workers-dialog .worker-status-filter {
    order: 1;
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid #cfe1d1;
    border-radius: 10px;
    background: #f4f9f2;
}
.workers-dialog .worker-status-filter button {
    min-height: 30px;
    padding: 0 12px;
    color: #547064;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}
.workers-dialog .worker-status-filter button.is-active {
    color: #fff;
    background: #78c247;
}
.workers-dialog #tbl_trabajadores_filter input {
    width: 150px;
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.workers-dialog #tbl_trabajadores_filter input:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100% !important;
    border: 0;
}
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scrollHead {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.workers-dialog #tbl_trabajadores thead th {
    height: 44px;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
}
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scrollBody {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box;
    width: 100% !important;
    margin-top: 5px;
    padding: 0 !important;
    overflow-y: auto !important;
}
.workers-dialog #tbl_trabajadores tbody tr td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.workers-dialog #tbl_trabajadores tbody tr.worker-inactive-row td {
    color: #7c4b4b;
    border-color: #efcccc !important;
    background: #fff0f0 !important;
}
.workers-dialog #tbl_trabajadores tbody tr.worker-inactive-row:hover td {
    background: #fbe4e4 !important;
}
.workers-dialog #tbl_trabajadores_info {
    order: 1;
    position: absolute;
    left: 0;
    top: calc(50% - 5px);
    width: auto !important;
    margin: 0 !important;
    transform: translateY(-50%);
    float: none !important;
    padding: 0 !important;
    text-align: left !important;
    color: #5b7768 !important;
    font-size: 13px;
    font-weight: 700;
}
.ui-dialog.workers-dialog .ui-dialog-buttonpane {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.workers-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ui-dialog.workers-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.workers-dialog #btn_qr_list,
.ui-dialog.workers-dialog #btn_qr {
    color: #367d4a !important;
    border: 1px solid #bcd9bf !important;
    background: #fff !important;
}
.ui-dialog.workers-dialog #btn_tra_new {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.workers-dialog #btn_tra_close {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Confirmación de descarga del respaldo. */
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: #fff;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-title { font-size: 16px; font-weight: 750; }
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-content {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0 !important;
    padding: 24px 21px !important;
    overflow: visible !important;
    color: #284d3d;
    background: #fff;
}
.backup-dialog #frm_backup p,
.logout-dialog #frm_logout p { margin: 0; font-size: 14px; line-height: 1.5; }
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-buttonset {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #587266 !important;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid #d5e1d6 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
}
.ui-dialog:is(.backup-dialog, .logout-dialog, .password-dialog, .user-dialog) .ui-dialog-buttonpane button:first-child {
    color: #fff !important;
    border-color: #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.password-dialog #frm_change_pass_form fieldset,
.user-dialog #frm_usuario_form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.password-dialog #frm_change_pass_form label,
.user-dialog #frm_usuario_form label {
    display: block;
    margin: 0 0 6px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.password-dialog #frm_change_pass_form input[type="password"],
.password-dialog #frm_change_pass_form input[type="email"],
.user-dialog #frm_usuario_form input:not([type="hidden"]),
.user-dialog #frm_usuario_form select {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    margin: 0 0 16px;
    padding: 0 11px;
    color: #234737;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.password-dialog #frm_change_pass_form input:last-child { margin-bottom: 0; }
.password-dialog #frm_change_pass_form input:focus,
.user-dialog #frm_usuario_form input:focus,
.user-dialog #frm_usuario_form select:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121,195,71,.16);
}
.ui-dialog.password-dialog .ui-dialog-content,
.ui-dialog.user-dialog .ui-dialog-content {
    max-height: max(80px, calc(100dvh - 160px));
    overflow-y: auto !important;
}

.user-dialog #frm_usuario_form input:last-child { margin-bottom: 0; }
.user-dialog #frm_usuario_form input:disabled {
    color: var(--tiq-muted);
    background: #f2f7f1 !important;
}

/* Menú de funcionalidades avanzadas: mismo lenguaje visual que el resto de formularios. */
.ui-dialog.advanced-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.advanced-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.advanced-dialog .ui-dialog-title { font-size: 16px; font-weight: 750; }
.ui-dialog.advanced-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 18px 20px !important;
    overflow: visible !important;
    background: #fff;
}
.advanced-dialog .advanced-options { display: grid; gap: 9px; }
.advanced-dialog .advanced-option {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    margin: 0 !important;
    padding: 0 42px !important;
    color: #315b47 !important;
    font-family: "VAG Rounded Std", Calibri, sans-serif;
    font-size: 14px;
    font-weight: 750;
    text-align: left;
    border: 1px solid #d6e6d7 !important;
    border-radius: 11px !important;
    background: #f8fbf7 !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.advanced-dialog .advanced-option::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    border: 3px solid #79bf49;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px #e7f3e2;
}
.advanced-dialog .advanced-option::after {
    content: "";
    position: absolute;
    right: 17px;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translateY(-50%) rotate(-45deg);
    border: solid #4c9360;
    border-width: 0 2px 2px 0;
}
.advanced-dialog .advanced-option:hover,
.advanced-dialog .advanced-option:focus {
    color: #246640 !important;
    border-color: #9dce85 !important;
    outline: none;
    background: #eef7eb !important;
    transform: translateY(-1px);
}
.ui-dialog.advanced-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.advanced-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    color: #587266 !important;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid #d5e1d6 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Selección de tamaño para la generación de códigos QR. */
.ui-dialog.qr-size-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.qr-size-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.qr-size-dialog .ui-dialog-title { font-size: 16px; font-weight: 750; }
.ui-dialog.qr-size-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 19px 21px 17px !important;
    overflow: visible !important;
    background: #fff;
}
.qr-size-dialog .qr-size-field label {
    display: block;
    margin: 0 0 7px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.qr-size-dialog .qr-size-select-wrap { position: relative; }
.qr-size-dialog .qr-size-select-wrap::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translateY(-65%) rotate(45deg);
    border: solid #347a4c;
    border-width: 0 2px 2px 0;
    pointer-events: none;
}
.qr-size-dialog #qrsize {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 42px 0 12px;
    color: #234737;
    font-family: "VAG Rounded Std", Calibri, sans-serif;
    font-size: 14px;
    font-weight: 650;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background: #fbfdfb;
}
.qr-size-dialog #qrsize:focus {
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.qr-size-dialog .qr-size-field p {
    margin: 9px 0 0;
    color: #71837d;
    font-size: 12px;
    line-height: 1.35;
}
.ui-dialog.qr-size-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.qr-size-dialog .ui-dialog-buttonset {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.ui-dialog.qr-size-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 15px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.qr-size-dialog #btn_generar_qr {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.qr-size-dialog #btn_cancel_qr {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
    box-shadow: none !important;
}
@media (max-width: 700px) {
    .ui-dialog.advanced-dialog,
    .ui-dialog.qr-size-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* Ficha individual de trabajador. */
.ui-dialog.worker-dialog {
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.worker-dialog .ui-dialog-titlebar {
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 17px 17px 0 0 !important;
}
.ui-dialog.worker-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.worker-dialog .ui-dialog-content {
    max-height: none !important;
    padding: 16px 20px 12px !important;
    overflow: visible !important;
    background: #fff;
}
.worker-dialog fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0;
    padding: 0;
    border: 0;
}
.worker-dialog .worker-field label {
    display: block;
    margin: 0 0 6px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.worker-dialog .worker-field-wide,
.worker-dialog .worker-settings { grid-column: 1 / -1; }
.worker-dialog #frm_tra_nif,
.worker-dialog #frm_tra_nombre,
.worker-dialog #frm_tra_alias,
.worker-dialog #frm_tra_centro,
.worker-dialog #frm_tra_qr {
    box-sizing: border-box;
    width: 100%;
    height: 41px;
    min-height: 41px;
    margin: 0;
    padding: 0 12px;
    color: #173d2d;
    font-size: 14px;
    font-weight: 650;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.worker-dialog #frm_tra_nif:focus,
.worker-dialog #frm_tra_nombre:focus,
.worker-dialog #frm_tra_alias:focus,
.worker-dialog #frm_tra_centro:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.worker-dialog #frm_tra_qr:disabled {
    color: #71887a;
    background: #f2f7f2 !important;
}
.worker-dialog .worker-settings-title {
    display: block;
    margin: 2px 0 7px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.worker-dialog .worker-settings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.worker-dialog .worker-settings-title { grid-column: 1 / -1; }
.worker-dialog .worker-setting {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid #deebdf;
    border-radius: 10px;
    background: #fbfdfb;
}
.worker-dialog .worker-setting input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.worker-dialog .worker-setting label,
.worker-dialog .worker-setting .ui-checkboxradio-label {
    position: relative;
    display: flex !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    margin: 0 !important;
    padding: 0 8px 0 39px !important;
    align-items: center;
    justify-content: center;
    color: #345545 !important;
    font-size: 12px;
    font-weight: 650;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.worker-dialog .worker-setting label::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 6px;
    background: #fff;
}
.worker-dialog .worker-setting .ui-checkboxradio-checked {
    color: #246640 !important;
    background: #f1f9ee !important;
}
.worker-dialog .worker-setting .ui-checkboxradio-checked::before {
    border-color: #79be48;
    background: #79be48;
}
.worker-dialog .worker-setting .ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    transform: translateY(-53%);
}
@media (max-width: 620px) {
    .worker-dialog fieldset { grid-template-columns: 1fr; }
    .worker-dialog .worker-settings { grid-template-columns: 1fr; }
}
.ui-dialog.worker-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.worker-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ui-dialog.worker-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 13px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.worker-dialog #btn_qr,
.ui-dialog.worker-dialog #btn_fa,
.ui-dialog.worker-dialog #btn_reestablecer {
    color: #367d4a !important;
    border: 1px solid #bcd9bf !important;
    background: #fff !important;
}
.ui-dialog.worker-dialog #btn_grabar {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.worker-dialog #btn_cerrar {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Edición de un fichaje. */
.ui-dialog.register-dialog {
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.register-dialog .ui-dialog-titlebar {
    min-height: 54px;
    padding: 0 22px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 18px 18px 0 0 !important;
}
.ui-dialog.register-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.register-dialog .ui-dialog-content {
    max-height: calc(100vh - 170px) !important;
    padding: 18px 22px 14px !important;
    overflow-y: auto !important;
    background: #fff;
}
.register-dialog #frm_fichaje_form fieldset { margin: 0; padding: 0; border: 0; }
.register-dialog #frm_fichaje_form label {
    display: block;
    margin: 0 0 6px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.register-dialog #frm_fichaje_form select,
.register-dialog #frm_fichaje_form input[type="text"],
.register-dialog #frm_fichaje_form textarea {
    box-sizing: border-box;
    min-height: 40px;
    padding: 0 12px;
    color: #173d2d;
    font-size: 14px;
    font-weight: 650;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.register-dialog #frm_fichaje_form select { width: 100%; margin: 0 0 12px; }
.register-dialog #frm_fichaje_form textarea { width: 100%; min-height: 64px; padding: 10px 12px; resize: vertical; }
.register-dialog #frm_fichaje_form select:focus,
.register-dialog #frm_fichaje_form input[type="text"]:focus,
.register-dialog #frm_fichaje_form textarea:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.register-dialog #frm_fichaje_form > fieldset > table:first-of-type {
    margin: 0 0 12px;
}
.register-dialog #frm_fichaje_form > fieldset > table:first-of-type td { padding-right: 12px; }
.register-dialog #frm_fichaje_fecha,
.register-dialog #frm_fichaje_hora { width: 142px; }
.register-dialog #frm_fichaje_form > fieldset > table:nth-of-type(2) {
    width: 100%;
    margin: 0 0 14px;
}
.register-dialog #frm_fichaje_form > fieldset > table:nth-of-type(2) label {
    display: inline-block;
    margin: 0 7px 0 0 !important;
    padding: 8px 12px 8px 30px !important;
    color: #246640 !important;
    border: 1px solid #cfe4d1 !important;
    border-radius: 9px !important;
    background: #f5fbf3 !important;
}
.register-dialog #frm_fichaje_tabs {
    padding: 0 !important;
    border: 1px solid #d9e8da !important;
    border-radius: 12px !important;
    background: #fff !important;
}
.register-dialog #frm_fichaje_tabs .ui-tabs-nav {
    display: flex;
    gap: 4px;
    padding: 6px 6px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #dceadd !important;
    border-radius: 12px 12px 0 0 !important;
    background: #f5f9f4 !important;
}
.register-dialog #frm_fichaje_tabs .ui-tabs-nav li {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    background: transparent !important;
}
.register-dialog #frm_fichaje_tabs .ui-tabs-nav li.ui-tabs-active { background: #fff !important; }
.register-dialog #frm_fichaje_tabs .ui-tabs-nav a {
    padding: 9px 13px !important;
    color: #4d7460 !important;
    font-size: 13px;
    font-weight: 750;
}
.register-dialog #frm_fichaje_tabs .ui-tabs-panel { padding: 16px !important; }
.ui-dialog.register-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 22px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.register-dialog .ui-dialog-buttonpane button {
    min-width: 86px;
    min-height: 38px;
    margin: 0 0 0 8px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.register-dialog .ui-dialog-buttonpane button:first-child {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.register-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Incidencias notificadas. */
.ui-dialog.notices-dialog {
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.notices-dialog .ui-dialog-titlebar {
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.notices-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 14px 20px 10px !important;
    overflow: hidden !important;
    background: #fff;
}
.notices-dialog #tbl_fic_inc_wrapper { margin: 0; }
.notices-dialog #tbl_fic_inc_filter { margin: 0 0 10px; }
.notices-dialog #tbl_fic_inc_filter input {
    width: 150px;
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollHead {
    box-sizing: border-box;
    width: 100% !important;
    padding: 0 !important;
    padding-inline: 0 !important;
    margin: 0 !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.ui-dialog.notices-dialog div#tbl_fic_inc_wrapper div.dataTables_scrollHead {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollHeadInner,
.notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollHeadInner table,
.notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollBody table {
    box-sizing: border-box;
    width: 100% !important;
    table-layout: fixed;
}
.notices-dialog #tbl_fic_inc thead th {
    box-sizing: border-box;
    height: 43px;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
}
.notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollBody {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0 !important;
    max-height: 224px !important;
    margin-top: 5px;
    padding: 0 !important;
}
.notices-dialog #tbl_fic_inc tbody td {
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
.notices-dialog #tbl_fic_inc .notice-employee-cell { width: 26% !important; }
.notices-dialog #tbl_fic_inc .notice-previous-cell { width: 21% !important; }
.notices-dialog #tbl_fic_inc .notice-action-cell { width: 14% !important; text-align: center; }
.notices-dialog #tbl_fic_inc .notice-proposed-cell { width: 21% !important; }
.notices-dialog #tbl_fic_inc .notice-decision-cell { width: 9% !important; text-align: center; }
.notices-dialog #tbl_fic_inc .notice-date,
.notices-dialog #tbl_fic_inc .notice-time {
    display: block;
    white-space: nowrap;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button {
    box-sizing: border-box;
    width: 34px;
    min-width: 34px;
    height: 31px;
    margin: 0;
    padding: 0 !important;
    display: inline-grid;
    place-items: center;
    border-radius: 9px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.aceptar {
    border: 1px solid #58ae48 !important;
    background: #6fc249 !important;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.denegar {
    border: 1px solid #efb1ad !important;
    background: #fff1f0 !important;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button:hover {
    transform: translateY(-1px);
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.aceptar:hover {
    background: #59af3e !important;
    box-shadow: 0 5px 10px rgba(77, 154, 60, .2) !important;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.denegar:hover {
    border-color: #df8f89 !important;
    background: #ffe4e2 !important;
    box-shadow: 0 5px 10px rgba(185, 75, 69, .14) !important;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button .ui-icon {
    width: auto;
    height: auto;
    margin: 0 !important;
    position: static !important;
    display: grid;
    place-items: center;
    overflow: visible;
    text-indent: 0;
    background: none !important;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button .ui-icon::before {
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.aceptar .ui-icon::before {
    content: "\2713";
    color: #fff;
}
.notices-dialog #tbl_fic_inc .notice-decision-cell button.denegar .ui-icon::before {
    content: "\00D7";
    color: #b94c47;
}
.notices-dialog #tbl_fic_inc_info {
    padding: 10px 0 0;
    color: #5b7768 !important;
    font-size: 13px;
    font-weight: 700;
}
.ui-dialog.notices-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.notices-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 0 0 8px !important;
    padding: 0 14px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.notices-dialog .ui-dialog-buttonpane button:first-child {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
}
.ui-dialog.notices-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Vista de horas: cabecera y filas comparten el mismo reparto de columnas. */
#body_fichajes_lista .dataTables_scrollHeadInner,
#body_fichajes_lista .dataTables_scrollHeadInner table,
#body_fichajes_lista .dataTables_scrollBody table {
    box-sizing: border-box;
    width: 100% !important;
    table-layout: fixed;
}
#body_fichajes_lista .record-time-cell { width: 36% !important; }
#body_fichajes_lista .record-employee-cell { width: 46% !important; }
#body_fichajes_lista .record-action-cell { width: 18% !important; }
#body_fichajes_lista.hours-view .hours-date-cell { width: 23% !important; }
#body_fichajes_lista.hours-view .hours-employee-cell { width: 37% !important; }
#body_fichajes_lista.hours-view .hours-duration-cell { width: 22% !important; }
#body_fichajes_lista.hours-view .hours-active-cell { width: 18% !important; }
#body_fichajes_lista .dataTables_scrollHead th,
#body_fichajes_lista .dataTables_scrollBody td {
    box-sizing: border-box;
}
#body_fichajes_lista.hours-view .dataTables_scrollBody {
    padding: 0 10px !important;
}
#body_fichajes_lista.hours-view #tbl_fichajes th,
#body_fichajes_lista.hours-view #tbl_fichajes td {
    box-sizing: border-box;
}
#body_fichajes #tbl_fichajes thead .sorting,
#body_fichajes #tbl_fichajes thead .sorting_asc,
#body_fichajes #tbl_fichajes thead .sorting_desc,
#body_fichajes #tbl_fichajes thead .sorting_asc_disabled,
#body_fichajes #tbl_fichajes thead .sorting_desc_disabled {
    background-image: none !important;
}
#body_fichajes #tbl_fichajes thead th::before,
#body_fichajes #tbl_fichajes thead th::after {
    display: none !important;
}
#body_fichajes #tbl_fichajes thead .DataTables_sort_icon,
#body_fichajes #tbl_fichajes thead .ui-icon,
#body_fichajes #tbl_fichajes thead span[class*="sort"],
#body_fichajes #tbl_fichajes thead .DataTables_sort_wrapper span {
    display: none !important;
}
#body_fichajes #tbl_fichajes thead th,
#body_fichajes #tbl_fichajes thead th * {
    background-image: none !important;
}
#body_fichajes .dataTables_scrollHead,
#body_fichajes .dataTables_scrollBody {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#body_fichajes #tbl_fichajes thead th:not(:last-child) {
    border-right: 0 !important;
}
#body_fichajes #tbl_fichajes tbody td:not(:last-child) {
    border-right: 0 !important;
}
#body_fichajes .dataTables_wrapper { overflow: hidden; }
#body_fichajes .dataTables_scrollHead,
#body_fichajes .dataTables_scrollBody {
    padding-left: 10px !important;
    padding-right: 10px !important;
}
#body_fichajes .dataTables_scrollHead {
    padding-right: calc(10px + var(--records-scrollbar-width, 0px)) !important;
}
#body_fichajes #tbl_fichajes {
    width: 100% !important;
    margin: 0 !important;
}
#body_fichajes_lista.hours-view .hours-active-cell {
    text-align: center !important;
}
.daily-hours-total,
.daily-hours-segments { display: block; }
.daily-hours-total { color: var(--tiq-ink); font-weight: 750; }
.daily-hours-segments {
    margin-top: 2px;
    color: var(--tiq-muted);
    font-size: 10px;
    font-weight: 600;
}
.active-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #65ba4b;
    box-shadow: 0 0 0 3px rgba(101, 186, 75, .16);
    vertical-align: middle;
}
.record-weekday {
    display: block;
    margin-top: 2px;
    color: var(--tiq-muted);
    font-size: 10px;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}
#body_fichajes_lista .record-date,
#body_fichajes_lista .record-time { white-space: nowrap; }
#body_fichajes_lista.uniform-date-lines .record-date,
#body_fichajes_lista.uniform-date-lines .record-time { display: block; }
/* El título comienza en el mismo punto que los valores de su columna. */
#body_fichajes_lista .dataTables_scrollHead th,
#body_fichajes_lista .dataTables_scrollHead .DataTables_sort_wrapper {
    text-align: left;
}
/* La cabecera visible es una copia sin el id de la tabla original. */
#body_fichajes_lista .dataTables_scrollHead .DataTables_sort_icon,
#body_fichajes_lista .dataTables_scrollHead .ui-icon {
    display: none !important;
}
#body_fichajes_lista .dataTables_scrollHead th {
    background-image: none !important;
}
#body_fichajes_lista .dataTables_scrollHead th,
#body_fichajes_lista #tbl_fichajes tbody td {
    padding-left: 14px !important;
    padding-right: 14px !important;
}
#body_fichajes_lista .dataTables_scrollHead th.hours-active-cell,
#body_fichajes_lista .dataTables_scrollHead th.hours-active-cell .DataTables_sort_wrapper {
    text-align: center;
}
#body_fichajes { container-type: inline-size; container-name: fichajes-panel; }
.record-employee-nif { display: none; }
@container fichajes-panel (min-width: 1100px) {
    .record-employee-nif {
        display: inline-block;
        margin-right: 6px;
        white-space: nowrap;
    }
}

/* Clientes, ficha de cliente, centro e informes: mismo lenguaje visual que Trabajadores. */
.ui-dialog.clients-dialog,
.ui-dialog.client-dialog,
.ui-dialog.center-dialog,
.ui-dialog.report-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.clients-dialog .ui-dialog-titlebar,
.ui-dialog.client-dialog .ui-dialog-titlebar,
.ui-dialog.center-dialog .ui-dialog-titlebar,
.ui-dialog.report-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 17px 17px 0 0 !important;
}
.ui-dialog.clients-dialog .ui-dialog-title,
.ui-dialog.client-dialog .ui-dialog-title,
.ui-dialog.center-dialog .ui-dialog-title,
.ui-dialog.report-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.clients-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 14px 20px 10px !important;
    overflow: hidden !important;
    background: #fff;
}
.ui-dialog.client-dialog .ui-dialog-content,
.ui-dialog.center-dialog .ui-dialog-content,
.ui-dialog.report-dialog .ui-dialog-content {
    min-height: 0 !important;
    max-height: calc(100vh - 150px) !important;
    padding: 16px 20px 14px !important;
    overflow: auto !important;
    background: #fff;
}
.ui-dialog.clients-dialog .ui-dialog-buttonpane,
.ui-dialog.client-dialog .ui-dialog-buttonpane,
.ui-dialog.center-dialog .ui-dialog-buttonpane,
.ui-dialog.report-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.clients-dialog .ui-dialog-buttonset,
.ui-dialog.client-dialog .ui-dialog-buttonset,
.ui-dialog.center-dialog .ui-dialog-buttonset,
.ui-dialog.report-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.ui-dialog.clients-dialog .ui-dialog-buttonpane button,
.ui-dialog.client-dialog .ui-dialog-buttonpane button,
.ui-dialog.center-dialog .ui-dialog-buttonpane button,
.ui-dialog.report-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    color: #367d4a !important;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid #bcd9bf !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.ui-dialog.clients-dialog .ui-dialog-buttonpane button:nth-child(2),
.ui-dialog.client-dialog .ui-dialog-buttonpane button:nth-child(2),
.ui-dialog.center-dialog .ui-dialog-buttonpane button:nth-child(3),
.ui-dialog.report-dialog .ui-dialog-buttonpane button:first-child {
    color: #fff !important;
    border-color: #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.clients-dialog .ui-dialog-buttonpane button:last-child,
.ui-dialog.client-dialog .ui-dialog-buttonpane button:last-child,
.ui-dialog.center-dialog .ui-dialog-buttonpane button:last-child,
.ui-dialog.report-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border-color: #d5e1d6 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Listado de clientes. */
.ui-dialog.clients-dialog {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 28px);
}
.ui-dialog.clients-dialog .ui-dialog-titlebar { flex: 0 0 54px; }
.ui-dialog.clients-dialog .ui-dialog-content {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100% !important;
}
.ui-dialog.clients-dialog .ui-dialog-buttonpane {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
}
.clients-dialog #tbl_clientes_wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-self: stretch;
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0;
    height: 100%;
    margin: 0;
}
.clients-dialog #tbl_clientes_wrapper > .fg-toolbar:first-child {
    position: relative;
    box-sizing: border-box;
    min-height: 50px;
    padding: 0 0 10px !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100% !important;
}
.clients-dialog #tbl_clientes_wrapper > .fg-toolbar:last-child { display: none; }
.clients-dialog #tbl_clientes_filter { float: none !important; margin: 0; }
.clients-dialog #tbl_clientes_filter input {
    width: 165px;
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.clients-dialog #tbl_clientes_filter input:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100% !important;
    border: 0;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHead {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHeadInner,
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHeadInner table,
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollBody table {
    box-sizing: border-box;
    width: 100% !important;
    table-layout: fixed;
}
.clients-dialog #tbl_clientes_wrapper .client-cif-cell { width: 12% !important; }
.clients-dialog #tbl_clientes_wrapper .client-name-cell { width: 34% !important; }
.clients-dialog #tbl_clientes_wrapper .client-limit-cell { width: 8% !important; }
.clients-dialog #tbl_clientes_wrapper .client-companies-cell { width: 9% !important; }
.clients-dialog #tbl_clientes_wrapper .client-employees-cell { width: 10% !important; }
.clients-dialog #tbl_clientes_wrapper .client-active-cell { width: 8% !important; }
.clients-dialog #tbl_clientes_wrapper .client-records-cell { width: 10% !important; }
.clients-dialog #tbl_clientes_wrapper .client-delete-cell {
    box-sizing: border-box;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    text-align: center !important;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHead th.client-cif-cell {
    border-radius: 9px 0 0 9px !important;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHead th.client-records-cell {
    border-radius: 0 9px 9px 0 !important;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollHead th.client-delete-cell {
    color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
}
.clients-dialog #tbl_clientes thead th {
    height: 44px;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
}
.clients-dialog #tbl_clientes_wrapper .dataTables_scrollBody {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box;
    width: 100% !important;
    margin-top: 5px;
    padding: 0 !important;
    overflow-y: auto !important;
}
.clients-dialog #tbl_clientes tbody tr td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.clients-dialog #tbl_clientes_wrapper .client-limit-cell,
.clients-dialog #tbl_clientes_wrapper .client-companies-cell,
.clients-dialog #tbl_clientes_wrapper .client-employees-cell,
.clients-dialog #tbl_clientes_wrapper .client-active-cell,
.clients-dialog #tbl_clientes_wrapper .client-records-cell {
    text-align: center !important;
}
.clients-dialog #tbl_clientes tbody tr.client-inactive-row td {
    color: #7c4b4b;
    border-color: #efcccc !important;
    background: #fff0f0 !important;
}
.clients-dialog #tbl_clientes tbody tr.client-inactive-row:hover td {
    background: #fbe4e4 !important;
}
.clients-dialog #tbl_clientes_info {
    position: absolute;
    left: 0;
    top: calc(50% - 5px);
    width: auto !important;
    margin: 0 !important;
    transform: translateY(-50%);
    float: none !important;
    padding: 0 !important;
    text-align: left !important;
    color: #5b7768 !important;
    font-size: 13px;
    font-weight: 700;
}

/* Usuarios: mismo diseño de listado que Clientes. */
.ui-dialog.users-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.users-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 17px 17px 0 0 !important;
}
.ui-dialog.users-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.users-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 14px 20px 10px !important;
    overflow: hidden !important;
    background: #fff;
}
.ui-dialog.users-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.users-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.ui-dialog.users-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    color: #367d4a !important;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid #bcd9bf !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.ui-dialog.users-dialog .ui-dialog-buttonpane button:nth-child(2) {
    color: #fff !important;
    border-color: #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.users-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border-color: #d5e1d6 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.ui-dialog.users-dialog {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 28px);
}
.ui-dialog.users-dialog .ui-dialog-titlebar { flex: 0 0 54px; }
.ui-dialog.users-dialog .ui-dialog-content {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100% !important;
}
.ui-dialog.users-dialog .ui-dialog-buttonpane {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
}
.users-dialog #tbl_usuarios_wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-self: stretch;
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0;
    height: 100%;
    margin: 0;
}
.users-dialog #tbl_usuarios_wrapper > .fg-toolbar:first-child {
    position: relative;
    box-sizing: border-box;
    min-height: 50px;
    padding: 0 0 10px !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100% !important;
}
.users-dialog #tbl_usuarios_wrapper > .fg-toolbar:last-child { display: none; }
.users-dialog #tbl_usuarios_filter { float: none !important; margin: 0; }
.users-dialog #tbl_usuarios_filter input {
    width: 165px;
    height: 36px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.users-dialog #tbl_usuarios_filter input:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100% !important;
    border: 0;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHead {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHeadInner,
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHeadInner table,
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollBody table {
    box-sizing: border-box;
    width: 100% !important;
    table-layout: fixed;
}
.users-dialog #tbl_usuarios_wrapper .client-cif-cell { width: 12% !important; }
.users-dialog #tbl_usuarios_wrapper .client-name-cell { width: 34% !important; }
.users-dialog #tbl_usuarios_wrapper .client-limit-cell { width: 8% !important; }
.users-dialog #tbl_usuarios_wrapper .client-companies-cell { width: 9% !important; }
.users-dialog #tbl_usuarios_wrapper .client-employees-cell { width: 10% !important; }
.users-dialog #tbl_usuarios_wrapper .client-active-cell { width: 8% !important; }
.users-dialog #tbl_usuarios_wrapper .client-records-cell { width: 10% !important; }
.users-dialog #tbl_usuarios_wrapper .client-delete-cell {
    box-sizing: border-box;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    text-align: center !important;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHead th.client-cif-cell {
    border-radius: 9px 0 0 9px !important;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHead th.client-records-cell {
    border-radius: 0 9px 9px 0 !important;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollHead th.client-delete-cell {
    color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
}
.users-dialog #tbl_usuarios thead th {
    height: 44px;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
}
.users-dialog #tbl_usuarios_wrapper .dataTables_scrollBody {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box;
    width: 100% !important;
    margin-top: 5px;
    padding: 0 !important;
    overflow-y: auto !important;
}
.users-dialog #tbl_usuarios tbody tr td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.users-dialog #tbl_usuarios_wrapper .client-limit-cell,
.users-dialog #tbl_usuarios_wrapper .client-companies-cell,
.users-dialog #tbl_usuarios_wrapper .client-employees-cell,
.users-dialog #tbl_usuarios_wrapper .client-active-cell,
.users-dialog #tbl_usuarios_wrapper .client-records-cell {
    text-align: center !important;
}
.users-dialog #tbl_usuarios tbody tr.client-inactive-row td {
    color: #7c4b4b;
    border-color: #efcccc !important;
    background: #fff0f0 !important;
}
.users-dialog #tbl_usuarios tbody tr.client-inactive-row:hover td {
    background: #fbe4e4 !important;
}
.users-dialog #tbl_usuarios_info {
    position: absolute;
    left: 0;
    top: calc(50% - 5px);
    width: auto !important;
    margin: 0 !important;
    transform: translateY(-50%);
    float: none !important;
    padding: 0 !important;
    text-align: left !important;
    color: #5b7768 !important;
    font-size: 13px;
    font-weight: 700;
}
.users-dialog #tbl_usuarios_wrapper .user-name-cell { width: 34% !important; }
.users-dialog #tbl_usuarios_wrapper .user-company-cell,
.users-dialog #tbl_usuarios_wrapper .user-center-cell { width: 33% !important; }
.users-dialog #tbl_usuarios { height: auto !important; }
.ui-dialog.users-dialog .ui-dialog-buttonpane button:first-child { color: #fff !important; border-color: #7cbf49 !important; background: #81c64a !important; box-shadow: 0 7px 14px rgba(92,165,57,.18) !important; }

/* Ficha de cliente. */
.client-dialog #frm_cliente_form fieldset,
.center-dialog #frm_centro_form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.client-dialog #frm_cliente_form fieldset > label:not(.ui-checkboxradio-label),
.center-dialog #frm_centro_form fieldset > label:not(.ui-checkboxradio-label) {
    display: block;
    margin: 0 0 6px;
    color: #284d3d;
    font-size: 13px;
    font-weight: 750;
}
.client-dialog #frm_cliente_form input[type="text"],
.center-dialog #frm_centro_form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin: 0 0 11px;
    padding: 0 11px;
    color: #234737;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fbfdfb !important;
}
.client-dialog #frm_cliente_form input[type="text"]:focus,
.center-dialog #frm_centro_form input[type="text"]:focus {
    outline: none;
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.client-dialog label[for="frm_cliente_inactivo"],
.center-dialog label[for="frm_cen_inc"] {
    min-height: 38px;
    margin: 2px 0 12px !important;
    padding: 0 13px !important;
    color: #367d4a !important;
    font-weight: 750;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #f4f9f2 !important;
}
.client-dialog label[for="frm_cliente_inactivo"].ui-state-active,
.center-dialog label[for="frm_cen_inc"].ui-state-active {
    color: #fff !important;
    border-color: #70bb43 !important;
    background: #81c64a !important;
}
.client-dialog .client-status-setting {
    position: relative;
    margin: 2px 0 12px;
    overflow: hidden;
    border: 1px solid #deebdf;
    border-radius: 11px;
    background: #fbfdfb;
}
.client-dialog .client-status-setting input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.client-dialog .client-status-setting label,
.client-dialog .client-status-setting .ui-checkboxradio-label {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 14px 0 48px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #345545 !important;
    font-size: 14px;
    font-weight: 650;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.client-dialog .client-status-setting .ui-checkboxradio-icon,
.client-dialog .client-status-setting .ui-checkboxradio-icon-space {
    display: none !important;
}
.client-dialog .client-status-setting label::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 5px;
    background: #fff;
}
.client-dialog .client-status-setting label.ui-checkboxradio-label.ui-checkboxradio-checked {
    color: #246640 !important;
    background: #f1f9ee !important;
}
.client-dialog .client-status-setting label.ui-checkboxradio-label.ui-checkboxradio-checked::before {
    border-color: #79be48;
    background: #79be48;
}
.client-dialog .client-status-setting label.ui-checkboxradio-label.ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 19px;
    top: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    transform: translateY(-53%);
}
.client-dialog #frm_cliente_form h4 {
    margin: 3px 0 7px;
    color: #284d3d;
    font-size: 14px;
}
.client-dialog #frm_cliente_form table {
    overflow: hidden;
    border-spacing: 0;
    border: 1px solid #e0ebe1;
    border-radius: 11px;
    background: #f8fbf7;
}
.client-dialog #frm_cliente_form table td {
    padding: 8px 11px;
    border-bottom: 1px solid #e5eee5;
}
.client-dialog #frm_cliente_form table tr:last-child td { border-bottom: 0; }
.client-dialog #frm_cliente_form table td:last-child {
    color: #2f8c5a;
    font-weight: 800;
}

/* Informe: opciones agrupadas en tarjetas y controles legibles. */
.report-dialog #frm_fichaje_informe > h2,
.report-dialog #frm_fichaje_informe fieldset h2 {
    margin: 0 0 10px;
    color: #284d3d;
    font-size: 16px;
    line-height: 1.2;
}
.report-dialog #frm_fichaje_informe fieldset {
    margin: 0 0 12px;
    padding: 13px;
    border: 1px solid #e0ebe1;
    border-radius: 12px;
    background: #f8fbf7;
}
.report-dialog #frm_fichaje_informe fieldset form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}
.report-dialog #frm_fichaje_informe fieldset form h2 { flex: 0 0 100%; }
.report-dialog #frm_fichaje_informe hr { display: none; }
.report-dialog .report-worker-filter-header {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.report-dialog .report-worker-filter-header > span {
    color: #284d3d;
    font-size: 14px;
    font-weight: 750;
}
.report-dialog .report-worker-scope {
    padding: 3px;
    display: inline-flex;
    gap: 2px;
    border: 1px solid #cfe1d1;
    border-radius: 10px;
    background: #fff;
}
.report-dialog .report-worker-scope button {
    min-height: 30px;
    padding: 0 12px;
    color: #367d4a;
    font-size: 12px;
    font-weight: 750;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}
.report-dialog .report-worker-scope button.is-active {
    color: #fff;
    background: #79c447;
}
.report-dialog .report-worker-combo {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    color: #284d3d;
}
.report-dialog .report-worker-combo summary {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 0 40px 0 12px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #284d3d;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    outline: none;
    background: #fff !important;
    cursor: pointer;
    list-style: none;
}
.report-dialog .report-worker-combo summary::-webkit-details-marker { display: none; }
.report-dialog .report-worker-combo summary::after {
    content: "⌄";
    position: absolute;
    right: 13px;
    top: 9px;
    color: #367d4a;
    font-size: 18px;
    line-height: 1;
}
.report-dialog .report-worker-combo[open] summary {
    border-color: #75bc49 !important;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .16);
}
.report-dialog .report-worker-combo[open] summary::after { transform: rotate(180deg); }
.report-dialog .report-worker-options {
    position: absolute;
    z-index: 5;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    box-sizing: border-box;
    max-height: 220px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #cfe1d1;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(39, 91, 61, .17);
}
.report-dialog .report-worker-option {
    position: relative;
    min-height: 38px;
    padding: 7px 9px 7px 36px;
    display: flex;
    align-items: center;
    color: #345545;
    font-size: 12px;
    font-weight: 650;
    border-radius: 8px;
    cursor: pointer;
}
.report-dialog .report-worker-option:hover { background: #f1f8ef; }
.report-dialog .report-worker-option input {
    position: absolute;
    left: 10px;
    opacity: 0;
    pointer-events: none;
}
.report-dialog .report-worker-check {
    position: absolute;
    left: 10px;
    top: 50%;
    box-sizing: border-box;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 5px;
    background: #fff;
}
.report-dialog .report-worker-option input:checked + .report-worker-check {
    border-color: #79be48;
    background: #79be48;
}
.report-dialog .report-worker-option input:checked + .report-worker-check::after {
    content: "✓";
    position: absolute;
    left: 3px;
    top: 1px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}
.report-dialog .report-worker-empty {
    padding: 12px;
    color: var(--tiq-muted);
    font-size: 12px;
    text-align: center;
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label {
    position: relative;
    box-sizing: border-box;
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 12px 9px 40px !important;
    display: inline-flex;
    flex: 1 1 145px;
    align-items: center;
    justify-content: center;
    color: #367d4a !important;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fff !important;
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-icon,
.report-dialog #frm_fichaje_informe .ui-checkboxradio-icon-space {
    display: none !important;
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 6px;
    background: #fff;
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-state-active {
    color: #fff !important;
    border-color: #70bb43 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
    box-shadow: 0 6px 13px rgba(92, 165, 57, .16);
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-state-active::before,
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-checkboxradio-checked::before {
    border-color: #fff;
    background: #fff;
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-state-active::after,
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 17px;
    top: 50%;
    color: #4ca65e;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-54%);
}
.report-dialog #frm_fichaje_informe .ui-checkboxradio-label.ui-state-focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(121, 195, 71, .18) !important;
}
.report-dialog #frm_fichaje_informe_filtro_rango_div {
    box-sizing: border-box;
    flex: 0 0 100%;
    margin-top: 2px;
    padding: 10px;
    border-radius: 10px;
    background: #edf5eb;
}
.report-dialog #frm_fichaje_informe_filtro_rango_div table { width: 100%; }
.report-dialog #frm_fichaje_informe_filtro_rango_div input {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 9px !important;
    background: #fff !important;
}

@media (max-width: 700px) {
    .ui-dialog:is(.report-dialog, .notices-dialog, .register-dialog).mobile-flex-dialog-open {
        display: flex !important;
    }
    .ui-dialog.clients-dialog,
    .ui-dialog.client-dialog,
    .ui-dialog.center-dialog,
    .ui-dialog.report-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
    .ui-dialog.report-dialog {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        height: 80vh !important;
        height: 80dvh !important;
        max-height: 80vh !important;
        max-height: 80dvh !important;
        margin: 0 !important;
        flex-direction: column;
        transform: translate(-50%, -50%);
    }
    .ui-dialog.report-dialog .ui-dialog-titlebar,
    .ui-dialog.report-dialog .ui-dialog-buttonpane {
        flex: 0 0 auto;
    }
    .ui-dialog.report-dialog .ui-dialog-content {
        flex: 1 1 auto;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
    .ui-dialog.clients-dialog .ui-dialog-content,
    .ui-dialog.client-dialog .ui-dialog-content,
    .ui-dialog.center-dialog .ui-dialog-content,
    .ui-dialog.report-dialog .ui-dialog-content {
        padding-left: 13px !important;
        padding-right: 13px !important;
    }
    .report-dialog #frm_fichaje_informe .ui-checkboxradio-label { flex-basis: 100%; }
}

/* Trabajadores: dos cabeceras visibles y columna técnica de borrado fuera de la franja verde. */
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scrollHeadInner,
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scrollHeadInner table,
.workers-dialog #tbl_trabajadores_wrapper .dataTables_scrollBody table {
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    table-layout: fixed;
}
.workers-dialog #tbl_trabajadores .worker-nif-cell {
    width: 28% !important;
}
.workers-dialog #tbl_trabajadores .worker-delete-cell {
    box-sizing: border-box;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    text-align: center !important;
}
.workers-dialog .dataTables_scrollHead th.worker-nif-cell {
    border-radius: 9px 0 0 9px !important;
}
.workers-dialog .dataTables_scrollHead th.worker-name-cell {
    border-radius: 0 9px 9px 0 !important;
}
.workers-dialog .dataTables_scrollHead th.worker-delete-cell {
    color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
}

/* Centro: contenido compacto y checkbox idéntico a los de Empresa. */
.ui-dialog.center-dialog .ui-dialog-content {
    max-height: none !important;
    overflow: visible !important;
}
.center-dialog .center-setting {
    position: relative;
    margin: 2px 0 0;
    overflow: hidden;
    border: 1px solid #deebdf;
    border-radius: 11px;
    background: #fbfdfb;
}
.center-dialog .center-setting input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.center-dialog .center-setting label,
.center-dialog .center-setting .ui-checkboxradio-label {
    position: relative;
    display: flex !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 14px 0 48px !important;
    align-items: center;
    justify-content: center;
    color: #345545 !important;
    font-size: 14px;
    font-weight: 650;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.center-dialog .center-setting .ui-checkboxradio-icon,
.center-dialog .center-setting .ui-checkboxradio-icon-space {
    display: none !important;
}
.center-dialog .center-setting label::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 6px;
    background: #fff;
}
.center-dialog .center-setting .ui-checkboxradio-checked {
    color: #246640 !important;
    background: #f1f9ee !important;
}
.center-dialog .center-setting .ui-checkboxradio-checked::before {
    border-color: #79be48;
    background: #79be48;
}
.center-dialog .center-setting .ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 19px;
    top: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    transform: translateY(-53%);
}

/* Registro: Entrada, Salida y No computar comparten el mismo control. */
.register-dialog .register-action-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}
.register-dialog .register-action-setting {
    position: relative;
    overflow: hidden;
    border: 1px solid #deebdf;
    border-radius: 10px;
    background: #fbfdfb;
}
.register-dialog .register-action-setting input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.register-dialog .register-action-setting label,
.register-dialog .register-action-setting .ui-checkboxradio-label {
    position: relative;
    display: flex !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 10px 0 40px !important;
    align-items: center;
    color: #345545 !important;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.register-dialog .register-action-setting .ui-checkboxradio-icon,
.register-dialog .register-action-setting .ui-checkboxradio-icon-space {
    display: none !important;
}
.register-dialog .register-action-setting label::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border: 1px solid #bed4c0;
    border-radius: 6px;
    background: #fff;
}
.register-dialog .register-action-setting .ui-checkboxradio-checked {
    color: #246640 !important;
    background: #f1f9ee !important;
}
.register-dialog .register-action-setting .ui-checkboxradio-checked::before {
    border-color: #79be48;
    background: #79be48;
}
.register-dialog .register-action-setting .ui-checkboxradio-checked::after {
    content: "✓";
    position: absolute;
    left: 16px;
    top: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transform: translateY(-54%);
}

/* Incidencias notificadas. */
.ui-dialog.incidents-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.incidents-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.incidents-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.incidents-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.incidents-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.ui-dialog.incidents-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
    box-shadow: none !important;
}
.ui-dialog.incidents-dialog .ui-dialog-buttonpane button:not(:last-child) {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.incidents-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Selector de registros a mostrar. */
.ui-dialog.filter-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.filter-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 0 21px !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
    border-radius: 17px 17px 0 0 !important;
}
.ui-dialog.filter-dialog .ui-dialog-title {
    font-size: 16px;
    font-weight: 750;
}
.ui-dialog.filter-dialog .ui-dialog-content {
    min-height: 0 !important;
    padding: 18px 20px !important;
    overflow: visible !important;
    background: #fff;
}
.filter-dialog #frm_fichaje_filtro fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.filter-dialog #frm_fichaje_filtro form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-label {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 0 !important;
    padding: 11px 10px 11px 38px !important;
    color: #367d4a !important;
    font-size: 13px;
    font-weight: 750;
    text-align: left;
    border: 1px solid #cfe1d1 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-icon,
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-icon-space {
    display: none !important;
}
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-label::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 15px;
    height: 15px;
    transform: translateY(-50%);
    border: 1px solid #a9c9ae;
    border-radius: 50%;
    background: #fff;
}
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-checked {
    color: #fff !important;
    border-color: #70bb43 !important;
    background: linear-gradient(100deg, #44a563, #83c849) !important;
    box-shadow: 0 6px 13px rgba(92, 165, 57, .16) !important;
}
.filter-dialog #frm_fichaje_filtro .ui-checkboxradio-checked::before {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 4px #4ca65e;
}
.filter-dialog #frm_fichaje_filtro_rango_div {
    box-sizing: border-box;
    grid-column: 1 / -1;
    margin-top: 2px;
    padding: 11px;
    border: 1px solid #e0ebe1;
    border-radius: 10px;
    background: #f4f9f2;
}
.filter-dialog #frm_fichaje_filtro_rango_div table { width: 100%; }
.filter-dialog #frm_fichaje_filtro_rango_div input {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cfe1d1 !important;
    border-radius: 9px !important;
    background: #fff !important;
}
.ui-dialog.filter-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.filter-dialog .ui-dialog-buttonpane button {
    min-height: 38px;
    margin: 0 0 0 8px !important;
    padding: 0 14px !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.filter-dialog .ui-dialog-buttonpane button:first-child {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
.ui-dialog.filter-dialog .ui-dialog-buttonpane button:last-child {
    color: #587266 !important;
    border: 1px solid #d5e1d6 !important;
    background: transparent !important;
}

/* Etiqueta del filtro activo en la barra de registros. */
#active_filter_chip {
    box-sizing: border-box;
    min-height: 34px;
    max-width: min(360px, 40vw);
    margin: 0 !important;
    padding: 0 7px 0 12px !important;
    display: none;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    color: #2d7045 !important;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    border: 1px solid #bcd9bf !important;
    border-radius: 17px !important;
    background: #eef7eb !important;
    box-shadow: none !important;
    cursor: pointer;
}
#active_filter_chip.is-visible { display: inline-flex !important; }
#active_filter_chip .active-filter-text {
    overflow: hidden;
    text-overflow: ellipsis;
}
#active_filter_chip .active-filter-close {
    display: inline-grid;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    border-radius: 50%;
    background: #6db843;
}
#active_filter_chip:hover {
    border-color: #75bc49 !important;
    background: #e6f3e2 !important;
}

@media (max-width: 700px) {
    .ui-dialog.notices-dialog {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        box-sizing: border-box;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 82vh !important;
        max-height: 82dvh !important;
        margin: 0 !important;
        flex-direction: column;
        transform: translate(-50%, -50%);
    }
    .ui-dialog.notices-dialog .ui-dialog-titlebar,
    .ui-dialog.notices-dialog .ui-dialog-buttonpane {
        flex: 0 0 auto;
    }
    .ui-dialog.notices-dialog .ui-dialog-titlebar {
        min-height: 52px;
        padding: 0 15px !important;
    }
    .ui-dialog.notices-dialog .ui-dialog-content {
        flex: 1 1 auto;
        box-sizing: border-box;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 12px 10px 8px !important;
        overflow: hidden !important;
    }
    .notices-dialog #tbl_fic_inc_filter {
        width: 100%;
        margin-bottom: 9px;
    }
    .notices-dialog #tbl_fic_inc_filter input {
        width: 100% !important;
        max-width: none;
    }
    .notices-dialog #tbl_fic_inc_wrapper .dataTables_scrollBody {
        max-height: 45vh !important;
        max-height: 45dvh !important;
    }
    .notices-dialog #tbl_fic_inc thead th,
    .notices-dialog #tbl_fic_inc tbody td {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 11px;
        line-height: 1.2;
    }
    .notices-dialog #tbl_fic_inc .notice-employee-cell { width: 25% !important; }
    .notices-dialog #tbl_fic_inc .notice-previous-cell { width: 21% !important; }
    .notices-dialog #tbl_fic_inc .notice-action-cell { width: 14% !important; }
    .notices-dialog #tbl_fic_inc .notice-proposed-cell { width: 20% !important; }
    .notices-dialog #tbl_fic_inc .notice-decision-cell { width: 10% !important; }
    .notices-dialog #tbl_fic_inc .notice-decision-cell button {
        box-sizing: border-box;
        width: 30px;
        min-width: 30px;
        height: 29px;
        padding: 0 !important;
    }
    .ui-dialog.notices-dialog .ui-dialog-buttonpane {
        padding: 10px !important;
    }
    .ui-dialog.notices-dialog .ui-dialog-buttonpane button {
        min-height: 38px;
        margin-left: 7px !important;
    }
    .ui-dialog.register-dialog {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        box-sizing: border-box;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: 88vh !important;
        height: 88dvh !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        margin: 0 !important;
        flex-direction: column;
        transform: translate(-50%, -50%);
    }
    .ui-dialog.register-dialog .ui-dialog-titlebar,
    .ui-dialog.register-dialog .ui-dialog-buttonpane {
        flex: 0 0 auto;
    }
    .ui-dialog.register-dialog .ui-dialog-titlebar {
        min-height: 52px;
        padding: 0 16px !important;
    }
    .ui-dialog.register-dialog .ui-dialog-content {
        flex: 1 1 auto;
        box-sizing: border-box;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 14px 13px 12px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    .ui-dialog.register-dialog .ui-dialog-buttonpane {
        padding: 10px 13px !important;
    }
    .ui-dialog.register-dialog .ui-dialog-buttonpane button {
        min-width: 76px;
        min-height: 38px;
        margin-left: 7px !important;
    }
    .register-dialog #frm_fichaje_form > fieldset > table:first-of-type {
        width: 100%;
        table-layout: fixed;
    }
    .register-dialog #frm_fichaje_form > fieldset > table:first-of-type td:nth-child(1),
    .register-dialog #frm_fichaje_form > fieldset > table:first-of-type td:nth-child(3) {
        width: calc(50% - 5px);
        padding: 0 !important;
    }
    .register-dialog #frm_fichaje_form > fieldset > table:first-of-type td:nth-child(2) { width: 10px; }
    .register-dialog #frm_fichaje_fecha,
    .register-dialog #frm_fichaje_hora { width: 100%; }
    .register-dialog .register-action-settings,
    .filter-dialog #frm_fichaje_filtro form { grid-template-columns: 1fr; }
    .register-dialog #frm_fichaje_tabs .ui-tabs-nav { gap: 0; }
    .register-dialog #frm_fichaje_tabs .ui-tabs-nav li {
        flex: 1 1 0;
        min-width: 0;
    }
    .register-dialog #frm_fichaje_tabs .ui-tabs-nav a {
        box-sizing: border-box;
        width: 100%;
        padding: 9px 4px !important;
        font-size: 11px;
        text-align: center;
        white-space: normal;
    }
    .register-dialog #frm_fichaje_tabs .ui-tabs-panel { padding: 12px !important; }
    .register-dialog #frm_fichaje_imagen {
        max-width: 100%;
        height: auto !important;
    }
    .ui-dialog.filter-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* Manager en móvil: filtros plegables y registros siempre accesibles. */
#btn_mobile_filters, #mobile_company_center_panel { display: none; }
@media (max-width: 900px) {
    html, body { height: auto; min-height: 100%; overflow: auto; }
    .ui-tooltip { display: none !important; }
    #main { position: relative; min-height: 100dvh; height: auto; overflow: visible; }
    #header {
        position: sticky;
        top: 0;
        height: 82px;
        padding: 0 14px;
        z-index: 30;
    }
    #header_info { gap: 8px; }
    #header_info #img_logo { width: 118px; height: 44px; }
    #header h1 { display: none; }
    #header_buttons { gap: 5px; }
    .btn_header { width: 37px; height: 37px; }
    .btn_header img { width: 22px; height: 22px; }
    #btn_release_notes { width: 37px !important; min-width: 37px; padding: 0 !important; }
    .release-notes-header-label { display: none; }
    #body {
        position: static !important;
        display: flex;
        flex-direction: column;
        height: calc(100dvh - 82px);
        min-height: calc(100dvh - 82px);
        padding: 12px;
        overflow: visible;
    }
    #btn_mobile_filters {
        box-sizing: border-box;
        width: 100%;
        min-height: 52px;
        margin: 0 0 12px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #244937;
        font-family: "VAG Rounded Std", Calibri, sans-serif;
        font-size: 15px;
        font-weight: 750;
        border: 1px solid #d5e7d6 !important;
        border-radius: 13px !important;
        background: linear-gradient(105deg, #f6fbf4, #eaf6e7) !important;
        box-shadow: 0 5px 15px rgba(30, 78, 51, .06);
    }
    #btn_mobile_filters b {
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        color: #fff;
        border-radius: 50%;
        background: #75bd48;
        transition: transform .18s ease;
    }
    #btn_mobile_filters b::before {
        content: '';
        display: block;
        width: 9px;
        height: 9px;
        margin-top: 5px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(225deg);
    }
    #body.mobile-filters-collapsed #btn_mobile_filters b { transform: rotate(180deg); }
    #mobile_company_center_panel {
        display: block;
        margin: 0 0 12px;
        padding: 11px;
        border: 1px solid #dbe9dc;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 7px 20px rgba(30, 78, 51, .06);
    }
    #body.mobile-filters-collapsed #mobile_company_center_panel { display: none; }
    .mobile-selector-row {
        position: relative;
        display: grid;
        grid-template-columns: 67px minmax(0, 1fr) 44px;
        gap: 8px;
        align-items: center;
    }
    .mobile-selector-row--center { grid-template-columns: 67px minmax(0, 1fr) 44px 44px; }
    .mobile-selector-row + .mobile-selector-row { margin-top: 9px; }
    .mobile-selector-row label {
        color: var(--tiq-ink);
        font-family: "VAG Rounded Std", Calibri, sans-serif;
        font-size: 13px;
        font-weight: 700;
    }
    .mobile-selector-row select {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        height: 44px;
        padding: 0 48px 0 12px;
        color: var(--tiq-ink);
        border: 1px solid #cddfd0;
        border-radius: 11px;
        outline: 0;
        appearance: none;
        -webkit-appearance: none;
        background: #fbfdfb;
        font: 600 13px "VAG Rounded Std", Calibri, sans-serif;
    }
    .mobile-selector-row::after {
        position: absolute;
        content: '';
        right: 68px;
        top: 50%;
        width: 8px;
        height: 8px;
        margin-top: -6px;
        border: solid #237c50;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        pointer-events: none;
    }
    .mobile-selector-row--center::after { right: 120px; }
    .mobile-selector-row select:focus {
        border-color: var(--tiq-green);
        box-shadow: 0 0 0 3px rgba(134, 201, 75, .16);
    }
    .mobile-selector-add {
        display: none;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #d2e4d3;
        border-radius: 11px;
        place-items: center;
        color: #237c50;
        background: #f3f9f2;
        font: 400 29px/1 Arial, sans-serif;
        cursor: pointer;
    }
    .mobile-selector-add.is-allowed { display: grid; }
    .mobile-selector-add:hover { color: #fff; border-color: var(--tiq-green); background: var(--tiq-green); }
    .mobile-selector-action {
        display: grid;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #d2e4d3;
        border-radius: 11px;
        place-items: center;
        background: #f3f9f2;
        cursor: pointer;
    }
    .mobile-selector-action img { width: 23px; height: 23px; filter: brightness(0) saturate(100%) invert(33%) sepia(27%) saturate(1234%) hue-rotate(102deg) brightness(86%) contrast(91%); }
    .mobile-selector-action:hover { border-color: var(--tiq-green); background: var(--tiq-green); }
    .mobile-selector-action:hover img { filter: brightness(0) invert(1); }
    #body_empresa, #body_centros { display: none !important; }
    #body_empresa, #body_centros, #body_fichajes {
        width: 100% !important;
        min-height: 0;
        margin: 0 0 12px;
        overflow: visible;
        border-radius: 15px;
    }
    #body_empresa, #body_centros {
        height: min(235px, 25dvh) !important;
        max-height: min(235px, 25dvh) !important;
        display: flex;
        flex-direction: column;
    }
    #body_empresa .body_lista,
    #body_centros .body_lista {
        display: block;
        flex: 1 1 auto;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important;
    }
    .body_header { height: 54px; padding: 0 13px; }
    .body_header_title h2 { font-size: 16px; }
    .body_lista { position: static !important; height: auto !important; min-height: 0 !important; }
    #body_empresa .dataTables_wrapper,
    #body_centros .dataTables_wrapper {
        display: flex;
        flex-direction: column;
        height: 100% !important;
        min-height: 0;
    }
    #body_fichajes .dataTables_wrapper {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        height: 100% !important;
        min-height: 0;
    }
    #body_empresa .dataTables_scroll,
    #body_centros .dataTables_scroll {
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        flex-direction: column;
    }
    #body_empresa .dataTables_scrollHead,
    #body_centros .dataTables_scrollHead { display: none !important; }
    #body_empresa .dataTables_scrollBody,
    #body_centros .dataTables_scrollBody {
        height: auto !important;
        flex: 1 1 auto;
        min-height: 0 !important;
        max-height: none !important;
    }
    #body_fichajes {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
        overflow: hidden;
    }
    #body_fichajes > .body_header {
        flex: 0 0 54px;
        min-height: 54px;
    }
    #body.mobile-filters-collapsed #body_fichajes { min-height: 0; }
    #body_fichajes .body_lista {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0 !important;
        overflow: hidden !important;
    }
    #body_fichajes .dataTables_scroll {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        min-height: 0;
    }
    /* Solo las filas ceden espacio; controles y cabecera nunca se comprimen. */
    #body_fichajes .dataTables_wrapper > .fg-toolbar {
        flex: 0 0 auto;
        height: auto !important;
    }
    #body_fichajes .dataTables_scrollHead,
    #body_fichajes .dataTables_scrollFoot {
        flex: 0 0 auto;
    }
    #body_fichajes .dataTables_scrollBody {
        flex: 1 1 0;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
    #body_fichajes .dataTables_scrollBody table {
        height: auto !important;
    }
    /* En móvil Activo es solo un indicador; el espacio se devuelve a los datos. */
    #body_fichajes #body_fichajes_lista.hours-view .dataTables_scrollBody {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #body_fichajes #body_fichajes_lista.hours-view .dataTables_scrollHead {
        padding-left: 10px !important;
        padding-right: calc(10px + var(--records-scrollbar-width, 0px)) !important;
    }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(1),
    #body_fichajes_lista.hours-view .dataTables_scrollBody td:nth-child(1) { width: 24% !important; }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(2),
    #body_fichajes_lista.hours-view .dataTables_scrollBody td:nth-child(2) { width: 42% !important; }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(3),
    #body_fichajes_lista.hours-view .dataTables_scrollBody td:nth-child(3) { width: 22% !important; }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(4),
    #body_fichajes_lista.hours-view .dataTables_scrollBody td:nth-child(4) {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(4) {
        font-size: 0 !important;
    }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(1) {
        font-size: 0 !important;
    }
    #body_fichajes_lista.hours-view .dataTables_scrollHead th:nth-child(1)::after {
        content: 'Día' !important;
        display: inline !important;
        font-size: 11px;
    }
    .dataTables_wrapper .ui-toolbar { min-height: 52px; padding: 8px !important; }
    #body_empresa .dataTables_filter,
    #body_centros .dataTables_filter,
    #body_fichajes .dataTables_filter {
        box-sizing: border-box;
        width: 100%;
        float: none !important;
        display: flex !important;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    #body_fichajes .dataTables_filter {
        display: grid !important;
        grid-template-columns: minmax(90px, 1fr) auto;
        gap: 7px;
        align-items: center;
    }
    #body_empresa .dataTables_filter input,
    #body_centros .dataTables_filter input,
    #body_fichajes .dataTables_filter input {
        order: 1;
        flex: 1 1 0;
        min-width: 90px;
        width: 100% !important;
        max-width: none !important;
    }
    #body_empresa .dataTables_filter .body_header_buttons,
    #body_centros .dataTables_filter .body_header_buttons,
    #body_fichajes .dataTables_filter .body_header_buttons {
        order: 2;
        flex: 0 0 auto;
        justify-self: end;
        margin: 0 !important;
        float: none !important;
    }
    #body_fichajes #active_filter_chip {
        display: none !important;
    }
    #body_fichajes_lista:not(.hours-view) .record-time-cell { width: 30% !important; }
    #body_fichajes_lista:not(.hours-view) .record-employee-cell { width: 46% !important; }
    #body_fichajes_lista:not(.hours-view) .record-action-cell {
        width: 24% !important;
        min-width: 72px !important;
    }
    #body_fichajes_lista:not(.hours-view) .record-date-time,
    #body_fichajes_lista:not(.hours-view) .record-date,
    #body_fichajes_lista:not(.hours-view) .record-time,
    #body_fichajes_lista:not(.hours-view) .record-weekday {
        display: block;
        white-space: nowrap;
    }
    #body_fichajes_lista:not(.hours-view) .record-date-time { line-height: 1.25; }
    #body_fichajes_lista:not(.hours-view) .record-weekday {
        margin-top: 2px;
        color: var(--tiq-muted);
        font-size: 10px;
        font-weight: 500;
        text-transform: capitalize;
    }
    .dataTables_filter .button_little,
    .dataTables_filter .button_big {
        width: 44px !important;
        height: 44px !important;
        border-radius: 13px !important;
    }
    .dataTables_filter .button_little img {
        width: 26px;
        height: 26px;
    }
    .dataTables_scrollHead,
    .dataTables_scrollBody { padding-left: 7px; padding-right: 7px; }
    table.dataTable thead th { padding: 10px 6px !important; font-size: 11px; }
    table.dataTable tbody td { padding: 9px 6px !important; font-size: 12px; }
}

/* En anchuras intermedias se pliegan los filtros sin convertir el resto en móvil. */
@media (min-width: 701px) and (max-width: 900px) {
    html, body { height: 100%; min-height: 0; overflow: hidden; }
    #main { height: 100%; min-height: 0; overflow: hidden; }
    #header {
        position: relative;
        top: auto;
        height: 76px;
        padding: 0 14px;
    }
    #header_info { gap: 14px; }
    #header_info #img_logo { width: 120px; height: 48px; }
    #header h1 { display: block; font-size: 17px; }
    #header_buttons { gap: 8px; }
    .btn_header { width: 44px; height: 44px; }
    .btn_header img { width: 26px; height: 26px; }
    #btn_release_notes { width: auto !important; min-width: 44px; padding: 0 11px !important; }
    .release-notes-header-label { display: inline; }
    #body {
        height: calc(100vh - 76px);
        min-height: 0;
        padding: 12px;
    }
    .body_header { height: 58px; padding: 0 14px; }
    .body_header_title h2 { font-size: 17px; }
    #body_fichajes > .body_header { flex-basis: 58px; min-height: 58px; }
    .dataTables_wrapper .ui-toolbar { min-height: 54px; padding: 9px 10px !important; }
    .dataTables_filter .button_little,
    .dataTables_filter .button_big {
        width: 40px !important;
        height: 40px !important;
        border-radius: 12px !important;
    }
    .dataTables_filter .button_little img { width: 23px; height: 23px; }
    #body_fichajes_lista:not(.hours-view) .record-time-cell { width: 36% !important; }
    #body_fichajes_lista:not(.hours-view) .record-employee-cell { width: 46% !important; }
    #body_fichajes_lista:not(.hours-view) .record-action-cell {
        width: 18% !important;
        min-width: 0 !important;
    }
    #body_fichajes_lista:not(.hours-view) .record-date-time { display: block; }
    #body_fichajes_lista:not(.hours-view) .record-date,
    #body_fichajes_lista:not(.hours-view) .record-time { display: inline !important; }
    #body_fichajes_lista:not(.hours-view) .record-weekday { display: block; }
    table.dataTable thead th { padding: 11px 9px !important; font-size: 12px; }
    table.dataTable tbody td { padding: 10px 9px !important; font-size: inherit; }
}

@media (max-width: 700px) {
    #body_fichajes .dataTables_filter #hours_view_mode.is-visible {
        grid-column: 1 / -1;
        width: 100%;
        height: 38px;
        justify-self: stretch;
    }
    #hours_view_mode button {
        flex: 1 1 50%;
        height: 30px;
    }
}

/* Aviso de mantenimiento mostrado después del acceso al manager. */
.ui-dialog.maintenance-dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 28px);
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: #fff;
    box-shadow: 0 28px 70px rgba(27, 65, 46, .28) !important;
}
.ui-dialog.maintenance-dialog .ui-dialog-titlebar {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 0 22px !important;
    border: 0 !important;
    border-radius: 17px 17px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.maintenance-dialog .ui-dialog-title {
    font-size: 17px;
    font-weight: 750;
}
.ui-dialog.maintenance-dialog .ui-dialog-content {
    box-sizing: border-box;
    width: 100% !important;
    padding: 22px 24px 18px !important;
    overflow: visible !important;
    color: #284d3d;
    background: #fff;
}
.maintenance-schedule {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #d8e8d9;
    border-radius: 10px;
    background: #f2f8f1;
}
.maintenance-date {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 58px;
    height: 58px;
    color: #fff;
    border-radius: 9px;
    background: #328d5a;
}
.maintenance-date strong {
    font-size: 25px;
    line-height: 1;
}
.maintenance-date span {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 800;
}
.maintenance-time {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}
.maintenance-time strong {
    color: #183f30;
    font-size: 16px;
}
.maintenance-time span {
    color: #577065;
    font-size: 13px;
    line-height: 1.4;
}
.maintenance-dialog p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
}
.maintenance-dialog .maintenance-lead {
    color: #183f30;
    font-weight: 750;
}
.maintenance-dialog .maintenance-note {
    margin-bottom: 0;
    color: #577065;
}
.ui-dialog.maintenance-dialog .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 13px 20px !important;
    border-top: 1px solid #e3eee4 !important;
    background: #f8fbf7;
}
.ui-dialog.maintenance-dialog .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    float: none !important;
}
.ui-dialog.maintenance-dialog .ui-dialog-buttonpane button {
    min-height: 40px;
    margin: 0 !important;
    padding: 0 15px !important;
    font-weight: 750;
    border-radius: 9px !important;
}
.ui-dialog.maintenance-dialog .maintenance-dismiss-button {
    color: #367d4a !important;
    border: 1px solid #bcd9bf !important;
    background: #fff !important;
}
.ui-dialog.maintenance-dialog .maintenance-accept-button {
    color: #fff !important;
    border: 1px solid #7cbf49 !important;
    background: #81c64a !important;
    box-shadow: 0 7px 14px rgba(92, 165, 57, .18) !important;
}
@media (max-width: 600px) {
    .ui-dialog.maintenance-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
    .ui-dialog.maintenance-dialog .ui-dialog-titlebar {
        min-height: 54px;
        padding: 0 17px !important;
    }
    .ui-dialog.maintenance-dialog .ui-dialog-content {
        padding: 17px 16px 15px !important;
    }
    .maintenance-schedule {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 11px;
        padding: 12px;
    }
    .maintenance-date {
        width: 52px;
        height: 52px;
    }
    .maintenance-time strong { font-size: 15px; }
    .ui-dialog.maintenance-dialog .ui-dialog-buttonpane { padding: 10px !important; }
    .ui-dialog.maintenance-dialog .ui-dialog-buttonset {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .ui-dialog.maintenance-dialog .ui-dialog-buttonpane button {
        min-width: 0;
        padding: 0 12px !important;
    }
}

/* Novedades de la versión: resumen consultable desde la cabecera. */
.ui-dialog.release-notes-dialog {
    overflow: hidden;
    border: 1px solid #d8e8da !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 72px rgba(27, 65, 46, .27) !important;
}
.ui-dialog.release-notes-dialog .ui-dialog-titlebar {
    min-height: 58px;
    padding: 0 22px !important;
    display: flex;
    align-items: center;
    border-radius: 18px 18px 0 0 !important;
    background: linear-gradient(105deg, #2f8c5a, #8bce48) !important;
}
.ui-dialog.release-notes-dialog .ui-dialog-title {
    font-size: 17px;
    font-weight: 750;
}
.ui-dialog.release-notes-dialog .ui-dialog-content {
    max-height: min(620px, calc(100vh - 190px));
    padding: 24px 26px !important;
    overflow-y: auto;
    background: #fff;
    scrollbar-color: var(--tiq-green) transparent;
    scrollbar-width: thin;
}
.release-notes-version {
    margin: 0 0 6px;
    color: #699e43;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
}
.release-notes h2 {
    margin: 0;
    color: #244d3c;
    font-family: "VAG Rounded Std", Calibri, sans-serif;
    font-size: 24px;
    line-height: 1.15;
}
.release-notes-intro {
    max-width: 560px;
    margin: 9px 0 22px;
    color: var(--tiq-muted);
    font-size: 14px;
    line-height: 1.45;
}
.release-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.release-notes-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid #dce9dd;
    border-radius: 13px;
    background: #fbfdfb;
}
.release-notes-card-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}
.release-notes-badge {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: #fff;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--tiq-green-dark), var(--tiq-green));
    font-family: "VAG Rounded Std", Calibri, sans-serif;
    font-size: 17px;
    font-weight: bold;
}
.release-notes-card-heading p {
    margin: 0 0 2px;
    color: #70924b;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.release-notes-card h3 {
    margin: 0;
    color: #294d3d;
    font-family: "VAG Rounded Std", Calibri, sans-serif;
    font-size: 16px;
    line-height: 1.2;
}
.release-notes-card ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.release-notes-card li {
    position: relative;
    margin: 0 0 11px;
    padding-left: 17px;
    color: #527066;
    font-size: 13px;
    line-height: 1.4;
}
.release-notes-card li:last-child { margin-bottom: 0; }
.release-notes-card li::before {
    content: "";
    position: absolute;
    top: .5em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tiq-green);
}
.ui-dialog.release-notes-dialog .ui-dialog-buttonpane {
    margin: 0;
    padding: 12px 18px !important;
    border-top: 1px solid var(--tiq-line);
    background: #fbfdfb;
}
.ui-dialog.release-notes-dialog .ui-dialog-buttonset { float: none; display: flex; justify-content: flex-end; }
.ui-dialog.release-notes-dialog .ui-dialog-buttonpane button {
    min-width: 108px;
    min-height: 40px;
    color: #fff !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #4aa65d, #83c84a) !important;
}
.ui-dialog.release-notes-dialog .ui-dialog-buttonpane button.release-notes-dismiss-button {
    color: #478c4d !important;
    border: 1px solid #b9d9bb !important;
    background: #fff !important;
    background-image: none !important;
}
@media (max-width: 600px) {
    .ui-dialog.release-notes-dialog {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        z-index: 1002 !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: calc(100vh - 20px) !important;
        height: calc(100dvh - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden !important;
        isolation: isolate;
        transform: none !important;
        pointer-events: auto !important;
    }
    .ui-dialog.release-notes-dialog.mobile-flex-dialog-open {
        display: flex !important;
    }
    .ui-dialog.release-notes-dialog .ui-dialog-titlebar { min-height: 54px; flex: 0 0 54px; padding: 0 17px !important; }
    .ui-dialog.release-notes-dialog .ui-dialog-content {
        position: relative;
        z-index: 1;
        box-sizing: border-box;
        width: 100% !important;
        height: auto !important;
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        padding: 19px 17px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
    .ui-dialog.release-notes-dialog .ui-dialog-buttonpane {
        position: relative;
        z-index: 3;
        box-sizing: border-box;
        width: 100% !important;
        flex: 0 0 auto;
        pointer-events: auto !important;
    }
    .ui-dialog.release-notes-dialog .ui-dialog-buttonset {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
    }
    .ui-dialog.release-notes-dialog .ui-dialog-buttonpane button {
        position: relative;
        z-index: 1;
        margin: 0 !important;
        pointer-events: auto !important;
        touch-action: manipulation;
        cursor: pointer;
    }
    .ui-dialog.release-notes-dialog .ui-dialog-buttonpane button.release-notes-dismiss-button {
        min-width: 0;
    }
    .release-notes h2 { font-size: 21px; }
    .release-notes-grid { grid-template-columns: 1fr; }
    .release-notes-card { padding: 15px; }
}
