/* ============================================================================
   FSC icons — conjunto enxuto de ícones de traço (estilo Lucide, 24-grid).
   Inline para funcionar offline. window.FSCIcon
   ============================================================================ */
const FSC_PATHS = {
  search: <><circle cx="11" cy="11" r="7" /><line x1="21" y1="21" x2="16.5" y2="16.5" /></>,
  calendar: <><rect x="3" y="4.5" width="18" height="16" rx="2" /><line x1="3" y1="9" x2="21" y2="9" /><line x1="8" y1="2.5" x2="8" y2="6" /><line x1="16" y1="2.5" x2="16" y2="6" /></>,
  chevronDown: <polyline points="6 9 12 15 18 9" />,
  chevronRight: <polyline points="9 6 15 12 9 18" />,
  chevronLeft: <polyline points="15 6 9 12 15 18" />,
  sort: <><polyline points="8 9 12 5 16 9" /><polyline points="8 15 12 19 16 15" /></>,
  arrowUpRight: <><line x1="7" y1="17" x2="17" y2="7" /><polyline points="8 7 17 7 17 16" /></>,
  arrowDownRight: <><line x1="7" y1="7" x2="17" y2="17" /><polyline points="17 8 17 17 8 17" /></>,
  x: <><line x1="6" y1="6" x2="18" y2="18" /><line x1="18" y1="6" x2="6" y2="18" /></>,
  filter: <polygon points="3 4 21 4 14 12.5 14 20 10 18 10 12.5" />,
  target: <><circle cx="12" cy="12" r="8.5" /><circle cx="12" cy="12" r="4" /><circle cx="12" cy="12" r="1" fill="currentColor" stroke="none" /></>,
  wallet: <><rect x="3" y="6" width="18" height="13" rx="2.5" /><line x1="3" y1="10.5" x2="21" y2="10.5" /><circle cx="17" cy="15" r="1.2" fill="currentColor" stroke="none" /></>,
  creditCard: <><rect x="2.5" y="5" width="19" height="14" rx="2.5" /><line x1="2.5" y1="10" x2="21.5" y2="10" /></>,
  users: <><circle cx="9" cy="8" r="3.4" /><path d="M3.5 20a5.8 5.8 0 0 1 11 0" /><path d="M15.5 5.3a3.4 3.4 0 0 1 0 6.4" /><path d="M18.5 20a5.8 5.8 0 0 0-3-5.1" /></>,
  list: <><line x1="8" y1="6" x2="21" y2="6" /><line x1="8" y1="12" x2="21" y2="12" /><line x1="8" y1="18" x2="21" y2="18" /><circle cx="4" cy="6" r="1" fill="currentColor" stroke="none" /><circle cx="4" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="4" cy="18" r="1" fill="currentColor" stroke="none" /></>,
  pieChart: <><circle cx="12" cy="12" r="9" /><line x1="12" y1="12" x2="12" y2="3" /><line x1="12" y1="12" x2="19.8" y2="15.5" /></>,
  trendingUp: <><polyline points="3 17 9 11 13 15 21 7" /><polyline points="15 7 21 7 21 13" /></>,
  dashboard: <><rect x="3" y="3" width="7.5" height="8.5" rx="1.5" /><rect x="13.5" y="3" width="7.5" height="5" rx="1.5" /><rect x="13.5" y="10.5" width="7.5" height="10.5" rx="1.5" /><rect x="3" y="14" width="7.5" height="7" rx="1.5" /></>,
  repeat: <><polyline points="17 2 21 6 17 10" /><path d="M3 11V9a4 4 0 0 1 4-4h14" /><polyline points="7 22 3 18 7 14" /><path d="M21 13v2a4 4 0 0 1-4 4H3" /></>,
  swap: <><polyline points="8 3 4 7 8 11" /><line x1="4" y1="7" x2="20" y2="7" /><polyline points="16 13 20 17 16 21" /><line x1="20" y1="17" x2="4" y2="17" /></>,
  coins: <><circle cx="9" cy="9" r="6" /><path d="M16.5 5.2a6 6 0 0 1 0 13.6" /><path d="M9 17.9a6 6 0 0 1-3-1.1" /></>,
  alert: <><path d="M12 4 2.5 20h19L12 4Z" /><line x1="12" y1="10" x2="12" y2="14.5" /><circle cx="12" cy="17.5" r="0.8" fill="currentColor" stroke="none" /></>,
  check: <polyline points="4 12.5 9.5 18 20 6" />,
  download: <><line x1="12" y1="3" x2="12" y2="15" /><polyline points="7 10 12 15 17 10" /><line x1="4" y1="20" x2="20" y2="20" /></>,
  dot: <circle cx="12" cy="12" r="4" fill="currentColor" stroke="none" />,
};

function FSCIcon({ name, size = 18, strokeWidth = 1.9, color = 'currentColor', style }) {
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color}
      strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"
      style={{ display: 'block', flexShrink: 0, ...style }} aria-hidden="true">
      {FSC_PATHS[name] || null}
    </svg>
  );
}
window.FSCIcon = FSCIcon;
