export function BarChart({ title, items }) {
  return (
    <section className="card chart-card">
      <h3>{title}</h3>
      <div className="bars">
        {items.map((item) => (
          <div key={item.label} className="bar-row">
            <span>{item.label}</span>
            <div className="bar-track">
              <div className="bar-fill" style={{ width: `${item.value}%` }} />
            </div>
          </div>
        ))}
      </div>
    </section>
  );
}
