interface KpiCardProps {
  label: string;
  value: string | null;
  unit?: string;
  highlight?: boolean;
}

export function KpiCard({ label, value, unit, highlight }: KpiCardProps) {
  return (
    <div
      className={`border rounded-lg p-4 flex flex-col gap-1 ${highlight ? "border-primary/40 bg-primary/5" : ""}`}
    >
      <span className="text-xs text-muted-foreground font-medium uppercase tracking-wide">
        {label}
      </span>
      <span className="text-2xl font-bold tabular-nums">
        {value ?? <span className="text-muted-foreground text-base">—</span>}
        {value && unit && (
          <span className="text-sm font-normal text-muted-foreground ml-1">
            {unit}
          </span>
        )}
      </span>
    </div>
  );
}
