/**
 * miniSYS-HGP — Lenguaje único de botones (todas las vistas).
 *
 * Pedido: nada de recuadros a 90°. Deben verse profesionales, limpios
 * y justificados: el recuadro se ajusta al texto (sin alto sobrante
 * de 42/44 px) y las esquinas van redondeadas (8 px). Los grupos
 * (cabecera, toolbar, pie de formulario/modal, acciones de fila) van
 * centrados con hueco pareja — no un racimo pegado a la izquierda.
 *
 * Métrica (tokens en minisys-tokens.css):
 *   padding 5×14 · 13px/600 · line 1.2 · radio 8px
 *   icono suelto 30×30 con el mismo radio
 *
 * No son botones (se dejan): KPI/baldosas (.cp-kpi), buscadores,
 * toasts. El chrome (campana, clave, salir) usa la misma altura;
 * en el pie del menú se reparte el ancho, no se infla el alto.
 *
 * !important: esta hoja va última en el bundle y también se recarga
 * al pie del layout (después del CSS de cada módulo) y en pantallas
 * públicas. Pisa radios, min-height y el flex-start de las barras.
 * Safari: width:auto antes de max-content; radio sólido 8px antes
 * de var(); overlay top/right/bottom/left; outline sólido (no color-mix).
 * No se usa :has() como único mecanismo (tablas móviles con data-label).
 */

/* ─── Familia: acciones con texto ───
 * Funcionarios: no aplastar iconos de fila (.func-act), cabeceras de bloque
 * a todo el ancho (.func-block-toggle), FAB, cierre de panel, segmentos
 * (Listas separadas / Con foto) ni el botón de passkey. Esta hoja se recarga
 * al pie y pisa el CSS del módulo si no se excluyen.
 * 58.17: tampoco pestañas (.tkt-tab, .sgh-tab, .ca-tab) ni KPIs/chips
 * de usuarios (.usr-summary-item, .usr-chip): width:max-content + min-width:0
 * los dejaba en círculos de 30 px superpuestos sobre la planilla.
 * 58.18: .ca-obs-btn es un botón de celda a ancho 100%; max-content lo
 * hacía pintar el texto encima de Estado y Actividad.
 * 58.38: .far-tab (Registrar/Recientes) y .ms-nav-c-btn-* (Personalizar
 * menú) no pueden ir a max-content: en móvil se superponían. .far-btn
 * se deja al CSS del módulo (pie Limpiar/Registrar a 100 %).
 * 58.83: .fsta-tab (Historial/Bovinas/Cintas) igual que .far-tab: si no,
 * «Historial» tapa «Bovinas». .fsta-btn (Registrar salida) a 100 % en móvil.
 * 58.86: .actstd-tab / .actstd-chip (Estad. Soporte) igual: si no, Gráfico
 * tapa Listado y las pastillas de demanda quedan en recuadros de 28 px.
 * 58.39: botones del formulario público de firma HIS (.cf-submit,
 * .cf-block-btn, .cf-review-btn): max-content + nowrap recortaba
 * «¿No reconoces el correo o está mal escrito?» y amontonaba el pie.
 * 58.42: formulario público de carnet (.cn-btn, .cn-mat-del, .cn-chip-x,
 * .cn-linkbtn): la barra Continuar/Enviar debe llenar el ancho, no
 * encogerse al texto.
 * 58.43: portal de funcionarios (.fp-btn, .fp-step-btn, .fp-reveal,
 * .fp-pin-btn, .lg-btn-primary/.lg-btn-ghost del login institucional).
 * 58.48: menú hamburguesa (.fp-menu), Ver documento PDF y cierre del visor.
 * 58.58: candado de la ficha (.fp-lock) — 44×44 a la derecha del campo.
 * 58.95: Restablecer contraseña del portal (.fp-login-reset) — 44 px a todo el ancho.
 * 58.69: chips de control de acceso (.ca-vista-chip, .ca-summary-item)
 * no van a recuadro 30×30; el módulo los deja pastilla al texto.
 * .ca-tab ya estaba excluido (es <a>, no button).
 * 58.78: perfil (.pf-btn, .pf-nav-btn, .pf-act-tab) — max-content
 * aplastaba «Cambiar foto», el menú de secciones y Registrar passkey.
 * 59.06: tarjetas de modelo de acta en Equipos (.inv-model-card) son
 * celdas de grilla, no pastillas max-content + nowrap.
 * 59.11: pastillas de servicio en Equipos (.ia-chip): min-height 0 +
 * overflow del renglón las recortaba por abajo (flecha de scroll).
button:not(.cp-kpi):not([class*="-kpi"]):not(.minisys-toast__close):not(.ms-nav-drop-btn):not(.ms-app-header-icon):not(.ms-app-header-customize):not(.hub-btn):not(.ver-btn):not(.ms-nav-c-move):not(.ms-nav-c-vis):not(.ms-nav-c-grip):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not(.func-seg-btn):not(.func-filter-pop-close):not(.func-auth-passkey):not([class*="passkey"]):not(.pf-btn):not(.pf-nav-btn):not(.pf-act-tab):not(.sgh-tab):not(.prod-nav-item):not(.tkt-tab):not(.usr-summary-item):not(.usr-chip):not(.ca-tab):not(.ca-obs-btn):not(.ca-vista-chip):not(.ca-summary-item):not(.vfy-btn):not(.tkt-act-btn):not(.far-tab):not(.fsta-tab):not(.actstd-tab):not(.actstd-chip):not(.ms-nav-c-btn-ghost):not(.ms-nav-c-btn-primary):not(.ms-nav-c-btn-danger):not(.cf-submit):not(.cf-block-btn):not(.cf-review-btn):not(.cf-btn-link):not(.cf-servicio-trigger):not(.cn-btn):not(.cn-mat-del):not(.cn-chip-x):not(.cn-linkbtn):not(.fp-btn):not(.fp-btn-ghost):not(.fp-step-btn):not(.fp-reveal):not(.fp-pin-btn):not(.lg-btn-primary):not(.lg-btn-ghost):not(.lg-toggle):not(.fp-menu):not(.fp-acta-pdf-btn):not(.fp-pdf-close):not(.fp-lock):not(.fp-login-reset):not(.inv-model-card):not(.ia-chip),
input[type="button"],
input[type="submit"],
input[type="reset"],
a.btn,
.btn,
[class*="-btn"]:not(.minisys-toast__close):not(.ms-nav-drop-btn):not(.ms-app-header-icon):not(.hub-btn):not(.ver-btn):not(.func-seg-btn):not(.func-btn-icon):not(.ca-obs-btn):not([class*="passkey"]):not(.pf-btn):not(.pf-nav-btn):not(.vfy-btn):not(.tkt-act-btn):not([class*="vfy-btn"]):not(.ms-nav-c-btn-ghost):not(.ms-nav-c-btn-primary):not(.ms-nav-c-btn-danger):not(.far-btn):not(.fsta-btn):not(.actstd-btn):not(.cf-block-btn):not(.cf-review-btn):not(.cn-btn):not(.fp-btn):not(.fp-btn-ghost):not(.fp-step-btn):not(.fp-pin-btn):not(.lg-btn-primary):not(.lg-btn-ghost):not(.fp-acta-pdf-btn),
[class*="btn--"]:not([class*="vfy-btn"]),
[class^="btn-"]:not(.ms-app-header-icon):not(.minisys-notify-bell):not(.func-btn-icon),
.ms-sidebar-tool,
.prod-empty-cta,
.func-filter-btn,
.minisys-birthday-thanks,
.minisys-confirm-btn,
.content-wrapper .cp-btn,
.content-wrapper .cp-view,
.content-wrapper .prod-btn-primary,
.content-wrapper .prod-btn-secondary,
.content-wrapper .prod-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ms-btn-gap, 6px);
    box-sizing: border-box;
    /* Safari: valor sólido primero; el token pisa si está definido. */
    border-radius: 8px !important;
    border-radius: var(--ms-btn-radius, 8px) !important;
    width: auto !important;
    width: max-content !important;
    max-width: 100%;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: var(--ms-btn-pad-y, 5px) var(--ms-btn-pad-x, 14px) !important;
    font-family: inherit;
    font-size: var(--ms-btn-font, 0.8125rem) !important;
    font-weight: var(--ms-btn-weight, 500) !important;
    line-height: var(--ms-btn-line, 1.2) !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-grow: 0;
    flex-shrink: 0;
    box-shadow: none !important;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* El icono no infla el botón: misma caja óptica que la letra. */
button:not(.cp-kpi):not([class*="-kpi"]):not(.ms-nav-drop-btn):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not([class*="passkey"]):not(.pf-btn):not(.pf-act-tab) > i,
button:not(.cp-kpi):not([class*="-kpi"]):not(.ms-nav-drop-btn):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not([class*="passkey"]):not(.pf-btn):not(.pf-act-tab) > .fas,
button:not(.cp-kpi):not([class*="-kpi"]):not(.ms-nav-drop-btn):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not([class*="passkey"]):not(.pf-btn):not(.pf-act-tab) > .far,
button:not(.cp-kpi):not([class*="-kpi"]):not(.ms-nav-drop-btn):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not([class*="passkey"]):not(.pf-btn):not(.pf-act-tab) > svg,
a.btn > i,
.btn > i,
[class*="-btn"]:not(.ms-nav-drop-btn):not([class*="passkey"]):not(.pf-btn):not(.pf-nav-btn) > i,
[class^="btn-"] > i,
.ms-sidebar-tool > i,
.minisys-confirm-btn > i,
.minisys-birthday-thanks > i {
    font-size: 0.9em;
    line-height: 1;
    width: 1em;
    text-align: center;
    flex-shrink: 0;
}

button:disabled,
button[disabled],
input[type="button"]:disabled,
input[type="submit"]:disabled,
.btn[disabled],
[class*="-btn"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

button:not(.cp-kpi):focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
a.btn:focus-visible,
.btn:focus-visible,
[class*="-btn"]:focus-visible,
.minisys-confirm-btn:focus-visible {
    outline: 2px solid var(--primary-blue, #00609c);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    button:not(.cp-kpi):not([class*="-kpi"]):not(.minisys-toast__close):not(.ms-nav-drop-btn):not(.ms-app-header-icon):not(.ms-app-header-customize):not(.hub-btn):not(.ver-btn):not(.ms-nav-c-move):not(.ms-nav-c-vis):not(.ms-nav-c-grip):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not(.func-seg-btn):not(.func-filter-pop-close):not(.func-auth-passkey):not([class*="passkey"]):not(.pf-btn):not(.pf-nav-btn):not(.pf-act-tab):not(.sgh-tab):not(.prod-nav-item):not(.tkt-tab):not(.usr-summary-item):not(.usr-chip):not(.ca-tab):not(.ca-obs-btn):not(.ca-vista-chip):not(.ca-summary-item):not(.vfy-btn):not(.tkt-act-btn):not(.far-tab):not(.fsta-tab):not(.actstd-tab):not(.actstd-chip):not(.ms-nav-c-btn-ghost):not(.ms-nav-c-btn-primary):not(.ms-nav-c-btn-danger):not(.cf-submit):not(.cf-block-btn):not(.cf-review-btn):not(.cf-btn-link):not(.cf-servicio-trigger):not(.cn-btn):not(.cn-mat-del):not(.cn-chip-x):not(.cn-linkbtn):not(.fp-btn):not(.fp-btn-ghost):not(.fp-step-btn):not(.fp-reveal):not(.fp-pin-btn):not(.lg-btn-primary):not(.lg-btn-ghost):not(.lg-toggle):not(.fp-menu):not(.fp-acta-pdf-btn):not(.fp-pdf-close):not(.fp-lock):not(.fp-login-reset):not(.inv-model-card):not(.ia-chip):not(.ops-auth-btn),
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    a.btn,
    .btn,
    [class*="-btn"]:not(.minisys-toast__close):not(.ms-nav-drop-btn):not(.ms-app-header-icon):not(.hub-btn):not(.ver-btn):not(.func-seg-btn):not(.func-btn-icon):not(.ca-obs-btn):not([class*="passkey"]):not(.pf-btn):not(.pf-nav-btn):not(.vfy-btn):not(.tkt-act-btn):not([class*="vfy-btn"]):not(.ms-nav-c-btn-ghost):not(.ms-nav-c-btn-primary):not(.ms-nav-c-btn-danger):not(.far-btn):not(.fsta-btn):not(.actstd-btn):not(.cf-block-btn):not(.cf-review-btn):not(.cn-btn):not(.fp-btn):not(.fp-btn-ghost):not(.fp-step-btn):not(.fp-pin-btn):not(.lg-btn-primary):not(.lg-btn-ghost):not(.fp-acta-pdf-btn),
    [class^="btn-"]:not(.ms-app-header-icon):not(.minisys-notify-bell):not(.func-btn-icon),
    .content-wrapper [class*="-toolbar"] button:not(.func-seg-btn):not(.func-act):not(.func-block-toggle):not(.func-fab):not(.func-btn-icon):not(.sgh-tab):not(.prod-nav-item):not(.tkt-tab):not(.usr-chip):not(.ca-tab):not(.ca-obs-btn):not(.ca-vista-chip):not(.ca-summary-item):not(.hub-btn):not(.ia-chip):not(.ops-auth-btn),
    .content-wrapper .doc-controls-container button,
    .func-filter-btn,
    .minisys-confirm-btn {
        width: auto !important;
        min-height: 0 !important;
        height: auto !important;
        padding: var(--ms-btn-pad-y, 5px) var(--ms-btn-pad-x, 14px) !important;
        font-size: var(--ms-btn-font, 0.8125rem) !important;
        line-height: var(--ms-btn-line, 1.2) !important;
        border-radius: 8px !important;
        border-radius: var(--ms-btn-radius, 8px) !important;
    }
}

/* 59.11 — Equipos: pastillas de servicio enteras (no recorte ni min-height 0). */
.content-wrapper .ia-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px !important;
    height: auto !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    line-height: 1.25 !important;
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    width: auto !important;
}
.content-wrapper .ia-chips {
    overflow: visible !important;
    flex-shrink: 0;
    height: auto !important;
    max-height: none !important;
}
@media (max-width: 900px) {
    .content-wrapper .ia-chip { min-height: 44px !important; }
}

/* ─── Solo icono: mismo alto que el de texto, radio 8px (no cuadrado) ─── */
.btn-menu,
.ms-sidebar-icon-btn,
.cp-iconbtn,
.cp-modal-close,
.far-icon-btn,
.ia-icon-btn,
.prod-icon-btn,
.prod-btn-icon,
.usr-icon-btn,
.ca-icon-btn,
.sgh-icon-btn,
.his-icon-btn,
.doc-act-btn,
[class*="-act-btn"]:not(.prod-btn-primary):not(.prod-btn-ghost):not(.prod-btn-secondary):not(.tkt-act-btn),
[class*="-icon-btn"],
.minisys-notify-icon-btn {
    width: var(--ms-btn-icon, 30px) !important;
    min-width: var(--ms-btn-icon, 30px) !important;
    height: var(--ms-btn-icon, 30px) !important;
    min-height: var(--ms-btn-icon, 30px) !important;
    padding: 0 !important;
    font-size: 0.8125rem !important;
    line-height: 1 !important;
    gap: 0 !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    border-radius: var(--ms-btn-radius, 8px) !important;
    box-shadow: none !important;
}

.btn-menu,
.ms-sidebar-icon-btn,
.cp-iconbtn > i,
.prod-btn-icon > i,
[class*="-icon-btn"] > i,
[class*="-act-btn"] > i {
    font-size: 0.85rem;
}

/* ─── Pie del menú: campana / clave / salir ───
 * Misma altura 30px. Se reparte el ancho de la fila. Radio 8px. */
.footer-actions .btn-action,
.footer-actions .btn-logout,
.footer-actions .minisys-notify-bell {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--ms-btn-icon, 30px) !important;
    min-height: var(--ms-btn-icon, 30px) !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    flex: 1 1 0 !important;
    border-radius: 8px !important;
    border-radius: var(--ms-btn-radius, 8px) !important;
    box-shadow: none !important;
}

.minisys-mobile-session-strip .btn-action {
    flex: 0 0 auto !important;
    width: var(--ms-btn-icon, 30px) !important;
    min-width: var(--ms-btn-icon, 30px) !important;
    height: var(--ms-btn-icon, 30px) !important;
    min-height: var(--ms-btn-icon, 30px) !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    border-radius: var(--ms-btn-radius, 8px) !important;
}

/* Pestañas del centro de avisos: misma altura, se reparte el ancho. */
.minisys-notify-tab {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: var(--ms-btn-pad-y, 5px) 10px !important;
    border-radius: 8px !important;
    border-radius: var(--ms-btn-radius, 8px) !important;
}

/* Cerrar del toast: no es un botón de acción; queda discreto. */
.minisys-toast__close {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 2px !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    flex-grow: 0 !important;
}

/*
 * KPI: no se listan arriba a propósito (son baldosas). Si un selector
 * amplio las rozara, el módulo (carnet-panel.css) manda el padding.
 */

/* Buscadores: campos, no botones. */
input[type="search"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/*
 * ─── Grupos: centrados y justificados (no pegados a la izquierda) ───
 *
 * El botón sigue al texto (width:max-content + flex-grow:0). Si el padre
 * queda en flex-start, el racimo se ve miserable a la izquierda. Aquí se
 * centra el grupo y se reparte con el mismo gap: un botón queda en el
 * medio; varios forman una fila centrada, no space-between a los bordes
 * (eso dejaría el primero y el último pegados a las puntas).
 *
 * No se toca: pie del menú (.footer-actions, ya se reparte), pestañas de
 * avisos, KPI, buscadores, burbujas de chat, celdas de usuario.
 * No se vuelve a estirar el botón a 44×100%.
 */

.content-wrapper [class*="-toolbar-actions"]:not(.hub-toolbar-actions),
.content-wrapper [class*="-appbar-actions"],
.content-wrapper [class*="-bulk-actions"]:not(.ca-bulk-actions),
.content-wrapper [class*="-form-actions"],
.content-wrapper [class*="-modal-footer"],
.content-wrapper [class*="-modal-actions"],
.content-wrapper [class*="-sheet-actions"],
.content-wrapper [class*="-pane-foot"],
.content-wrapper [class*="-row-actions"],
.content-wrapper [class*="-actions-cell"],
.content-wrapper .func-header-actions,
.content-wrapper .func-view-bar,
.content-wrapper .ver-toolbar-actions,
.content-wrapper .act-toolbar-actions,
.content-wrapper .cp-head-actions,
.content-wrapper .cp-bulk-actions,
.content-wrapper .cp-row-actions,
.content-wrapper .doc-actions,
.minisys-confirm-actions,
.pwd-dock {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    gap: 8px 12px;
    box-sizing: border-box;
    text-align: center;
}

/*
 * Celdas de tabla NO son flex: display:flex en un <td> saca la celda del
 * modelo de tabla y descuadra todas las columnas. Solo en escritorio:
 * en ≤900px las filas son tarjetas (display:block).
 */
@media (min-width: 901px) {
    .content-wrapper td.doc-col-actions,
    .content-wrapper td[class*="-col-actions"],
    .content-wrapper td[data-label="Acciones"],
    .content-wrapper td[data-label="Acción"] {
        display: table-cell !important;
        vertical-align: middle;
    }
}

/*
 * Franjas a renglón completo: el racimo queda en el centro óptico.
 * Cabecera de página (header/head-actions) también: si el grupo siguiera
 * al ancho del texto, justify-content:center no se nota y vuelve a verse
 * un recuadro miserable a la izquierda. Las toolbar-actions no se fuerzan
 * aquí para que buscador + botones puedan compartir fila en escritorio.
 */
.content-wrapper [class*="-form-actions"],
.content-wrapper [class*="-bulk-actions"]:not(.ca-bulk-actions),
.content-wrapper [class*="-modal-footer"],
.content-wrapper [class*="-modal-actions"],
.content-wrapper [class*="-sheet-actions"],
.content-wrapper [class*="-pane-foot"],
.content-wrapper .func-header-actions,
.content-wrapper .cp-head-actions,
.content-wrapper .cp-bulk-actions,
.minisys-confirm-actions,
.pwd-dock {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    min-width: 0;
}

.content-wrapper [class*="-header-actions"],
.content-wrapper [class*="-head-actions"],
.content-wrapper .usr-header-actions,
.content-wrapper .act-header-actions {
    justify-content: flex-end !important;
    width: auto;
    flex: 0 0 auto;
}
.pwd-logout-wrap {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/*
 * Filtros de funcionarios: el módulo los oculta (display:none) y los
 * muestra cuando aplica. No forzar flex aquí o aparecerían siempre.
 */
.content-wrapper .func-filter-btns {
    justify-content: center !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

/*
 * Toolbar en columna (móvil, minisys-layout): align-items:stretch + botón
 * max-content deja el control a la izquierda. El buscador sigue al 100%
 * por su propia width; los botones se centran en el eje cruzado.
 */
@media (max-width: 1100px) {
    .content-wrapper [class*="-toolbar"]:not([class*="-toolbar-actions"]),
    .content-wrapper .act-toolbar,
    .content-wrapper .net-toolbar,
    .content-wrapper .doc-controls-container {
        align-items: center !important;
        justify-content: center !important;
    }

    .content-wrapper [class*="-toolbar"] input,
    .content-wrapper .act-toolbar input,
    .content-wrapper .net-toolbar input,
    .content-wrapper .doc-controls-container input,
    .content-wrapper [class*="-toolbar"] [type="search"],
    .content-wrapper [class*="-toolbar"] [class*="search-box"] {
        width: 100% !important;
        max-width: 100% !important;
        align-self: stretch;
    }

    /*
     * En pantallas chicas la cabecera/toolbar ocupan el renglón: si el
     * grupo siguiera al ancho del texto, justify-content:center no se
     * nota y el racimo vuelve a la izquierda.
     */
    .content-wrapper [class*="-header-actions"]:not(.usr-header-actions),
    .content-wrapper [class*="-head-actions"],
    .content-wrapper [class*="-toolbar-actions"]:not(.hub-toolbar-actions),
    .content-wrapper .func-header-actions,
    .content-wrapper .cp-head-actions,
    .content-wrapper .ver-toolbar-actions,
    .content-wrapper .act-toolbar-actions {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
        min-width: 0;
        justify-content: center !important;
    }

    /*
     * Carnet móvil estiraba .cp-btn a width:100%. El lenguaje unificado
     * es al texto; el grupo (arriba) ya está centrado.
     */
    .content-wrapper .cp-head-actions .cp-btn,
    .content-wrapper .cp-bulk-actions .cp-btn,
    .content-wrapper [class*="-form-actions"] [class*="-btn"],
    .content-wrapper [class*="-form-actions"] button {
        flex: 0 0 auto !important;
        width: auto !important;
        width: max-content !important;
    }
}

/* Vacío (sin listado): el CTA no queda a la izquierda del recuadro. */
.content-wrapper [class*="-empty"]:not(td):not(tr):not(th),
.content-wrapper .prod-empty,
.content-wrapper .cp-empty,
.content-wrapper .usr-empty {
    text-align: center;
}

.content-wrapper [class*="-empty"] > button,
.content-wrapper [class*="-empty"] > a.btn,
.content-wrapper [class*="-empty"] > [class*="-btn"],
.content-wrapper .prod-empty-cta {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
}

/*
 * Barra institucional: Personalizar abraza el texto; campana / clave / salir
 * son cuadrados 36×36 (44 en móvil). No usar width:auto en los iconos:
 * los dejaba aplastados junto a Personalizar.
 */
.ms-app-header .ms-app-header-customize {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none;
    height: 36px !important;
    min-height: 36px !important;
}

.ms-app-header .ms-app-header-icon,
.ms-app-header .minisys-notify-bell {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
}

@media (max-width: 900px) {
    .ms-app-header .ms-app-header-icon,
    .ms-app-header .minisys-notify-bell,
    .ms-app-header .btn-menu {
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
    }
    .ms-app-header .ms-app-header-customize {
        height: 44px !important;
        min-height: 44px !important;
    }
}

/*
 * Pie de panel/modal (Cancelar / Guardar): el recuadro a 30px del
 * lenguaje de iconos + flex-basis 0% dejaba el texto salido y los
 * dos botones superpuestos (visto en /sysusergest/sysactfc.php).
 * Esta hoja se recarga al pie: gana al CSS de cada módulo.
 */
.prod-panel-footer,
.prod-guardia-actions,
.content-wrapper [class*="-panel-footer"],
.content-wrapper [class*="-form-footer"],
.content-wrapper .minisys-confirm-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.prod-panel-footer > button,
.prod-guardia-actions > button,
.content-wrapper [class*="-panel-footer"] > button,
.content-wrapper [class*="-form-footer"] > button {
    width: auto !important;
    min-width: 8.5rem !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    padding: 8px 16px !important;
    flex: 1 1 8.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

/*
 * Acciones de fila en tablas: solo icono 36×36. El texto (si lo había)
 * queda en title para el tooltip. No se aplica a pies de formulario.
 * 58.35 — no incluir a.tkt-act-btn: el Abrir de tickets lleva etiqueta
 * (icono+texto); data-label="Acción" lo aplastaba a 36×36.
 */
.content-wrapper table td[data-label="Acciones"] button,
.content-wrapper table td[data-label="Acción"] button,
.content-wrapper table td[class*="actions"] button,
.content-wrapper table .prod-actions button,
.content-wrapper table .func-actions-row button,
.content-wrapper table .pc-actions button,
.content-wrapper .cp-row-actions button {
    font-size: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    flex: 0 0 36px !important;
    overflow: hidden !important;
}

.content-wrapper table td[data-label="Acciones"] button > i,
.content-wrapper table td[data-label="Acción"] button > i,
.content-wrapper table td[class*="actions"] button > i,
.content-wrapper table .prod-actions button > i,
.content-wrapper table .func-actions-row button > i,
.content-wrapper table .pc-actions button > i,
.content-wrapper .cp-row-actions button > i {
    font-size: 0.9rem !important;
    width: auto !important;
    line-height: 1;
}

/*
 * 58.38 — Pie de «Personalizar menú»: Restablecer / Cancelar / Guardar.
 * Esta hoja se recarga al pie; sin !important, width:max-content +
 * flex-shrink:0 superponía Restablecer encima de Guardar en teléfono.
 * Columna a 100 %, 44 px, hueco para el home indicator.
 */
.ms-nav-c-foot {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-width: 0 !important;
}
.ms-nav-c-foot > button {
    flex: 1 1 8rem !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 10px 14px !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

@media (max-width: 900px) {
    .ms-nav-c-foot {
        flex-direction: column !important;
        align-items: stretch !important;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .ms-nav-c-foot > button {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /*
     * Farmacia: pie Limpiar / Registrar salida a todo el ancho (44 px).
     * .far-btn salió del selector genérico; aquí se fuerza el tamaño táctil.
     */
    body.ms-far-page .far-form-foot {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    body.ms-far-page .far-form-foot .far-btn,
    body.ms-far-page .far-appbar-actions .far-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        height: auto !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        overflow: visible !important;
    }
}

/*
 * 58.99 — Control de acceso: barra de masivos en UN grupo flex
 * (Página / filtrados / Limpiar / conteo / Eliminar o Solicitar).
 * [class*="-bulk-actions"] + justify-content:center dejaba el borrar
 * colgando en un renglón vacío. Acá gana al pie (esta hoja se recarga
 * después del CSS del módulo). Safari: 16px en toques; min-height 44.
 */
body.ms-ca-page .content-wrapper .ca-bulk-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-content: center !important;
    text-align: left;
    min-width: 0;
    max-width: 100%;
}

body.ms-ca-page .content-wrapper .ca-bulk-bar .ca-bulk-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-content: center !important;
    width: auto !important;
    max-width: 100%;
    flex: 0 0 auto !important;
    min-width: 0;
    margin-left: 0;
    text-align: left;
}

@media (max-width: 1100px) {
    body.ms-ca-page .content-wrapper .ca-bulk-bar .ca-btn,
    body.ms-ca-page .content-wrapper .ca-bulk-bar button {
        min-height: 44px !important;
        height: auto !important;
        padding: 10px 14px !important;
        font-size: 16px !important;
    }

    body.ms-ca-page .content-wrapper .ca-bulk-bar .ca-bulk-page,
    body.ms-ca-page .content-wrapper .ca-bulk-bar .ca-bulk-count {
        min-height: 44px;
        font-size: 16px;
    }
}

/*
 * 59.09 — Botones del modal PIN. El reset global los estiraba a 100 %
 * y apilaba Cancelar / Confirmar; la passkey quedaba como un círculo.
 * Vive en esta hoja (se recarga al pie) para no perderse al regenerar
 * el bundle.
 */
.ops-auth-foot .ops-auth-btn,
button.ops-auth-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 140px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}
button.ops-auth-btn--ghost {
    background: #e8eef4 !important;
    color: #0f172a !important;
    border: 1px solid #c5d7e8 !important;
}
button.ops-auth-btn--ok {
    background: #00609c !important;
    color: #ffffff !important;
    border: 1px solid #00609c !important;
}
.ops-auth-foot {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}
.ops-auth-panel .ops-auth-passkey.ms-passkey-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    height: auto !important;
    border-radius: 12px !important;
}
