#pragma once // KPI card — displays a key metric with trend. // Usage: // #include "core/icons_tabler.h" // float history[] = {10, 12, 11, 15, 18, 17, 20}; // kpi_card("Revenue", 20000.0f, 12.5f, history, 7, "$%.0f", TI_CASH); // // Shows: // - Optional icon (Tabler glyph) + label (small, muted) on top row // - Value (large font) // - Delta badge (green TI_TRENDING_UP / red TI_TRENDING_DOWN) // - Sparkline of history (auto Y by default; fixed Y in overload v1.4) void kpi_card(const char* label, float value, float delta_percent, const float* history = nullptr, int history_count = 0, const char* format = "%.1f", const char* icon = nullptr); // Fixed Y-scale variant (v1.4): el sparkline interno usa [y_min, y_max] // absolutos. Util para metricas con dominio conocido (CPU%/RAM% -> 0,100) // donde la comparacion visual entre cards exige misma escala. void kpi_card(const char* label, float value, float delta_percent, const float* history, int history_count, float y_min, float y_max, const char* format = "%.1f", const char* icon = nullptr);