import React from 'react'

interface ChartCardProps {
  title: string
  subtitle: string
  icon: React.ReactNode
  children: React.ReactNode
}

export const ChartCard: React.FC<ChartCardProps> = ({ title, subtitle, icon, children }) => (
  <div className="bg-slate-900 border border-slate-800 rounded-xl p-4 space-y-3">
    <div className="flex items-center gap-2">
      {icon}
      <div>
        <h3 className="text-sm font-semibold text-white leading-tight">{title}</h3>
        <p className="text-xs text-slate-500 leading-tight">{subtitle}</p>
      </div>
    </div>
    {children}
  </div>
)
