.card.kpi{
  background: var(--pylo-card-bg);
  border-radius: var(--pylo-radius);
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: box-shadow .15s ease, transform .15s ease;
  cursor: default;
}
.card.kpi:hover{ box-shadow: 0 6px 18px rgba(0,0,0,.10); transform: translateY(-1px); }
.kpi-title{ font-weight:600; font-size:12px; color: var(--pylo-muted); margin-bottom:8px; }
.kpi-value{ font-weight:700; font-size:24px; line-height:1.2; }
.kpi-delta{ margin-top:6px; font-size:12px; font-weight:600; }
.kpi-delta.positive{ color: var(--pylo-green); }
.kpi-delta.negative{ color: var(--pylo-red); }
.kpi-delta.neutral{ color: var(--pylo-blue); }

/* === GRID GERAL DE KPIs === */
.dashboard-cards{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 1100px){
  .dashboard-cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .dashboard-cards{ grid-template-columns: 1fr; }
}

/* Engajamento primeiro e 2 colunas */
.card.kpi[data-kpi="engagement"]{
  order:-1;
  grid-column: span 2;
}
@media (max-width: 640px){
  .card.kpi[data-kpi="engagement"]{ grid-column: auto; }
}

/* Alturas e tipografia consistentes */
.card.kpi{ min-height:128px; display:flex; flex-direction:column; justify-content:center; }
.kpi-title{ font:600 12px/1.1 var(--pylo-font, Montserrat, system-ui); color:var(--pylo-muted,#6b7280); margin-bottom:6px; }
.kpi-value{ font:700 28px/1 var(--pylo-font, Montserrat, system-ui); letter-spacing:-0.01em; }
.kpi-delta{ margin-top:4px; font:600 12px/1 var(--pylo-font, Montserrat, system-ui); }
.kpi-delta.positive{ color:#10b981; }
.kpi-delta.negative{ color:#ef4444; }
.kpi-delta.neutral{ color:#6b7280; }

.kpi-sub{
  margin-top: 4px;
  font: 500 12px/1.2 var(--pylo-font);
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-sub a{
  color: #0ea5e9;
  text-decoration: none;
}
.kpi-sub a:hover{ text-decoration: underline; }

#kpi-lastclick {
  display: block;
  max-width: 260px;   /* ajusta o limite do card */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


