/* ============================================================================
   ACEF - dashboard.css : KPIs, graficas (SVG), donut, barras.
   Paleta corporativa CEF / Udima.
   ========================================================================== */

.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.1rem; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.kpi-value { font-size: 1.7rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.kpi-label { font-size: .8rem; font-weight: 600; color: var(--text-soft); margin-top: .15rem; }
.kpi-hint { font-size: .7rem; color: var(--muted); margin-top: .1rem; }

/* --- Charts genericas ----------------------------------------------------- */
.chart { width: 100%; height: auto; display: block; }
.chart-empty { color: var(--muted); text-align: center; padding: 1.5rem; font-size: .85rem; }
.axis-label { font-size: 9px; fill: var(--muted); }

/* --- Barras horizontales -------------------------------------------------- */
.hbars { display: flex; flex-direction: column; gap: .55rem; }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: .6rem; }
.hbar-label { font-size: .82rem; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: #e8f0e9; border-radius: 999px; height: 10px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #a8e000); border-radius: 999px; }
.hbar-val { font-size: .82rem; font-weight: 600; text-align: right; color: var(--text); }

/* --- Donut ---------------------------------------------------------------- */
.donut-wrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex-shrink: 0; }
.donut-total { font-size: 22px; font-weight: 700; fill: var(--primary-dark); }
.donut-cap { font-size: 10px; fill: var(--muted); }
.legend { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 140px; }
.legend-item { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: .5rem; font-size: .82rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-label { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-val { font-weight: 600; }

/* --- Cabecera de evento --------------------------------------------------- */
.event-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.event-total { text-align: right; }
.event-total .kpi-value { font-size: 2.2rem; color: var(--primary-dark); }

/* --- Chips (campos detectados) ------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: var(--primary-soft); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .7rem; font-size: .8rem; font-family: var(--mono); color: var(--primary-dark); }
.chip em { font-style: normal; color: var(--accent-dark); font-weight: 650; margin-left: .25rem; }
