
/* v157 - Dashboard estable definitivo: sin cambio de estilos al hacer clic */

/* No permitir que scripts anteriores oculten o cambien la visibilidad del dashboard */
.dashboard-page,
.dashboard-page .kpis,
body.route-dashboard-home .dashboard-page,
body.route-dashboard-home .dashboard-page .kpis{
  visibility:visible!important;
  opacity:1!important;
}

/* KPIs principales: 5 tarjetas reales */
body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis),
.dashboard-page .kpis:not(.cashier-kpis){
  display:grid!important;
  grid-template-columns:repeat(5,minmax(190px,1fr))!important;
  gap:14px!important;
  width:100%!important;
  overflow:visible!important;
  align-items:stretch!important;
}

body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis) .kpi,
.dashboard-page .kpis:not(.cashier-kpis) .kpi{
  min-width:0!important;
  min-height:104px!important;
  padding:14px 16px!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  column-gap:12px!important;
  align-items:center!important;
}

/* Ocultar sexta tarjeta heredada si el componente viejo todavía la pinta */
body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis) .kpi:nth-child(n+6),
.dashboard-page .kpis:not(.cashier-kpis) .kpi:nth-child(n+6){
  display:none!important;
}

body.route-dashboard-home .dashboard-page .kpi b,
.dashboard-page .kpi b{
  font-size:20px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

body.route-dashboard-home .dashboard-page .kpi small,
.dashboard-page .kpi small{
  display:block!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  font-size:10px!important;
  line-height:1.08!important;
  letter-spacing:-.01em!important;
  text-transform:none!important;
}

/* Evita saltos visuales causados por reglas viejas de uppercase o recortes */
.dashboard-page .kpi small{
  text-transform:none!important;
}

/* Distribución responsiva sin scroll horizontal */
@media(max-width:1320px){
  body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis),
  .dashboard-page .kpis:not(.cashier-kpis){
    grid-template-columns:repeat(5,minmax(170px,1fr))!important;
  }
  body.route-dashboard-home .dashboard-page .kpi small,
  .dashboard-page .kpi small{
    font-size:9.4px!important;
  }
}
@media(max-width:1120px){
  body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis),
  .dashboard-page .kpis:not(.cashier-kpis){
    grid-template-columns:repeat(3,minmax(190px,1fr))!important;
  }
}
@media(max-width:720px){
  body.route-dashboard-home .dashboard-page .kpis:not(.cashier-kpis),
  .dashboard-page .kpis:not(.cashier-kpis){
    grid-template-columns:1fr!important;
  }
}
