/* Card 4 — solo chrome operativo · NO alterar layout nativo del dashboard 🔒 */

/* Ocultar ruido operativo (feedback QA) */
#liveModeBadge,
#suite-scope-bar,
#fluidityBanner,
#debug-bar {
    display: none !important;
}

/* Header — una fila compacta, sin aplastar tipografía del dashboard */
header.panel.mx-4.mt-4 {
    position: relative !important;
    top: auto !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0.5rem 0.75rem 0 !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}
header.panel > .flex.items-center.gap-4.flex-wrap {
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    justify-content: flex-end !important;
}
header.panel .flex-col:has(#selAnalitica) > .flex.items-center.justify-between {
    display: none !important;
}
header.panel .flex-col:has(#selAnalitica) {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.25rem !important;
}
header.panel .flex-col:has(select.text-amber-400),
header.panel .flex-col:has(select option[value="rigido"]) {
    display: none !important;
}
header.panel .flex-col.gap-1 label {
    display: none !important;
}
header.panel .flex-col.gap-1 {
    gap: 0 !important;
}
header.panel #subtEmpresa {
    display: none !important;
}
header.panel > .flex.items-center.gap-4 > .w-10.h-10 {
    display: none !important;
}
header.panel h1.outfit.text-xl {
    font-size: 0.95rem !important;
    white-space: nowrap;
}

/* Herramientas matriz en cabecera — solo icono + title (ayuda al hover) */
.suite-header-icon-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 2px;
}
.suite-header-matrix-tools {
    margin-left: 0 !important;
}
.suite-icon-tool-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    min-width: 32px;
    min-height: 32px;
    padding: 0.35rem !important;
}
#btn-db-settings.suite-icon-tool-btn {
    letter-spacing: 0 !important;
    text-transform: none !important;
}
.suite-colpin .suite-colpin-label {
    display: none !important;
}
#header-tools-group #btn-logout-qa.suite-icon-tool-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    justify-content: center;
}
#btn-proy-consistency-ia.suite-icon-tool-btn {
    min-width: 32px;
    min-height: 32px;
}

/* Pulsador Fluidez en fila tabs */
.suite-fluidity-btn {
    display: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.suite-fluidity-btn.visible { display: inline-flex; }
.suite-fluidity-pop {
    display: none;
    position: fixed;
    z-index: 99990;
    max-width: min(92vw, 400px);
    padding: 8px 10px;
    border-radius: 8px;
    background: #1a1408;
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fcd34d;
    font-size: 0.68rem;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.suite-fluidity-pop.open { display: block; }

/* Resumen ejecutivo — columnas Prev. rem. + Previsto anual (chrome suite_exec_normalize) */
#view-exec .panel.overflow-hidden table {
    min-width: 1120px !important;
}
#view-exec .col-prev-anual-exec-h,
#view-exec .col-prev-anual-exec {
    min-width: 88px;
}

/* Pie suite — sin margen extra */
body.custom-scrollbar .suite-footer {
    margin-top: 0 !important;
}

/* Auditoría Técnica — tabla compacta + desviación YTD */
#audit-grid-table.audit-compact {
    font-size: 0.62rem !important;
    min-width: 1080px !important;
}
#audit-grid-table.audit-compact th,
#audit-grid-table.audit-compact td {
    padding: 2px 5px !important;
    line-height: 1.15 !important;
}
#audit-grid-table.audit-compact th.w-\[300px\] {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
}
#audit-grid-table.audit-compact .truncate.max-w-\[280px\] {
    max-width: 185px !important;
}
#audit-grid-table.audit-compact .col-ppto,
#audit-grid-table.audit-compact .col-real {
    font-size: 0.58rem !important;
    white-space: nowrap;
}
#audit-grid-table.audit-compact thead th {
    font-size: 0.58rem !important;
}
#audit-grid-table.audit-compact thead th .text-\[9px\] {
    font-size: 0.55rem !important;
}
#audit-grid-table.audit-compact thead th .text-\[8px\] {
    font-size: 0.5rem !important;
}
#audit-grid-table.audit-compact .col-ytd-ppto,
#audit-grid-table.audit-compact .col-ytd-real {
    font-size: 0.6rem !important;
    min-width: 72px;
    max-width: 88px;
}
#audit-grid-table.audit-compact .col-desv-ytd {
    min-width: 46px;
    max-width: 52px;
    vertical-align: middle;
    background: rgba(30, 58, 138, 0.12);
    border-left: 1px solid rgba(51, 65, 85, 0.5);
}
#audit-grid-table.audit-compact .audit-ytd-lbl {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #93c5fd;
}
#audit-grid-table.audit-compact .audit-ytd-head {
    font-size: 0.55rem !important;
    line-height: 1.1;
    color: #93c5fd;
}
#audit-grid-table.audit-compact .audit-ytd-sub {
    font-size: 0.48rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
#audit-grid-table.audit-compact .audit-ytd-desv {
    font-weight: 800;
    font-size: 0.58rem;
}
#audit-grid-table.audit-compact .audit-ytd-cumpl {
    font-size: 0.5rem;
    color: #94a3b8;
    margin-top: 1px;
}
#audit-grid-table.audit-compact .audit-desv-fav { color: #34d399; }
#audit-grid-table.audit-compact .audit-desv-unfav { color: #f87171; }
#audit-grid-table.audit-compact .audit-desv-neutral { color: #64748b; opacity: 0.5; }
#audit-grid-table.audit-compact tfoot td {
    font-size: 0.62rem !important;
}
#view-audit .panel.overflow-hidden {
    min-height: 320px !important;
    height: auto !important;
    max-height: none !important;
}
#view-audit > .flex.items-center.justify-between {
    padding-top: 0.5rem !important;
    padding-bottom: 0.25rem !important;
}

/* Resumen ejecutivo — franja negra total + leyenda cumpl. en la misma fila */
#view-exec table thead th:first-child .flex.items-center.justify-between {
    gap: 8px;
    min-width: 0;
    align-items: center;
}
#view-exec table thead th:first-child .flex.items-center.justify-between > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#view-exec table thead th:first-child .suite-thead-actions button {
    font-size: 8px !important;
    padding: 2px 6px !important;
    line-height: 1.2;
}

#view-exec #tfoot-ejecutivo td.suite-tfoot-brand {
    text-transform: none;
    letter-spacing: normal;
    vertical-align: middle;
}
#view-exec .suite-tfoot-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}
#view-exec .suite-tfoot-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
#view-exec .cumpl-legend-chip-tfoot {
    margin-left: auto;
}
#view-exec #tfoot-ejecutivo tr td:not(.suite-tfoot-brand) {
    vertical-align: middle;
}

#view-exec .suite-chip-saldo-inv {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 1px 6px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    background: rgba(125, 211, 252, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(125, 211, 252, 0.35);
    vertical-align: middle;
    flex-shrink: 0;
    cursor: help;
}

