/* SF Symbols–style line icons (24x24, stroke 1.7) */
const Icon = ({ name, size = 18, color, stroke = 1.7, fill = 'none' }) => {
  const s = size;
  const props = {
    width: s, height: s, viewBox: '0 0 24 24',
    fill, stroke: color || 'currentColor', strokeWidth: stroke,
    strokeLinecap: 'round', strokeLinejoin: 'round',
  };
  const paths = {
    dashboard: <><rect x="3" y="3" width="8" height="10" rx="1.5"/><rect x="13" y="3" width="8" height="6" rx="1.5"/><rect x="3" y="15" width="8" height="6" rx="1.5"/><rect x="13" y="11" width="8" height="10" rx="1.5"/></>,
    people:    <><circle cx="9" cy="9" r="3.5"/><path d="M2.5 19.5c0-3.3 2.9-5.5 6.5-5.5s6.5 2.2 6.5 5.5"/><circle cx="17" cy="8" r="2.8"/><path d="M15.5 13.6c.5-.1 1-.1 1.5-.1 2.9 0 5 1.7 5 4.4"/></>,
    calendar:  <><rect x="3.5" y="5" width="17" height="15.5" rx="2.2"/><path d="M3.5 10h17"/><path d="M8 3v4M16 3v4"/><circle cx="8" cy="14" r="0.9" fill="currentColor"/><circle cx="12" cy="14" r="0.9" fill="currentColor"/><circle cx="16" cy="14" r="0.9" fill="currentColor"/></>,
    car:       <><path d="M5 16v2.5a.5.5 0 0 0 .5.5h2A.5.5 0 0 0 8 18.5V17M16 17v1.5a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5V16"/><path d="M3.5 13c0-.6.3-1.1.8-1.4l1-.6 1.6-3.6c.3-.6.9-1 1.5-1h7.2c.7 0 1.3.4 1.5 1l1.6 3.6 1 .6c.5.3.8.8.8 1.4V16c0 .6-.4 1-1 1H4.5c-.6 0-1-.4-1-1v-3z"/><circle cx="7.5" cy="14" r="1" fill="currentColor"/><circle cx="16.5" cy="14" r="1" fill="currentColor"/></>,
    chart:     <><path d="M3 21V3"/><path d="M3 21h18"/><rect x="6.5" y="12" width="3" height="6" rx="0.6"/><rect x="11" y="8" width="3" height="10" rx="0.6"/><rect x="15.5" y="4.5" width="3" height="13.5" rx="0.6"/></>,
    gear:      <><circle cx="12" cy="12" r="3"/><path d="M12 2.5v2.7M12 18.8v2.7M21.5 12h-2.7M5.2 12H2.5M18.7 5.3l-1.9 1.9M7.2 16.8l-1.9 1.9M18.7 18.7l-1.9-1.9M7.2 7.2 5.3 5.3"/></>,
    plus:      <><path d="M12 5v14M5 12h14"/></>,
    search:    <><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></>,
    download:  <><path d="M12 4v12"/><path d="M7 11l5 5 5-5"/><path d="M4 20h16"/></>,
    upload:    <><path d="M12 20V8"/><path d="M7 13l5-5 5 5"/><path d="M4 4h16"/></>,
    trash:     <><path d="M4 7h16"/><path d="M9 7V4.5A1.5 1.5 0 0 1 10.5 3h3A1.5 1.5 0 0 1 15 4.5V7"/><path d="M6 7l1 12.5A1.5 1.5 0 0 0 8.5 21h7a1.5 1.5 0 0 0 1.5-1.5L18 7"/><path d="M10 11v6M14 11v6"/></>,
    edit:      <><path d="M14.5 4.5 19.5 9.5 8 21H3v-5z"/><path d="M13 6l5 5"/></>,
    check:     <><path d="M5 12.5l4.5 4.5L19 7.5"/></>,
    x:         <><path d="M6 6l12 12M18 6L6 18"/></>,
    chevR:     <><path d="M9 5l7 7-7 7"/></>,
    chevD:     <><path d="M5 9l7 7 7-7"/></>,
    arrowUp:   <><path d="M12 19V5M5 12l7-7 7 7"/></>,
    arrowDn:   <><path d="M12 5v14M5 12l7 7 7-7"/></>,
    arrowRt:   <><path d="M5 12h14M12 5l7 7-7 7"/></>,
    dot:       <><circle cx="12" cy="12" r="5" fill="currentColor" stroke="none"/></>,
    file:      <><path d="M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8z"/><path d="M14 3v5h5"/></>,
    money:     <><circle cx="12" cy="12" r="9"/><path d="M14.5 9c-.5-.8-1.5-1.2-2.5-1.2-1.7 0-3 1-3 2.4 0 1.3 1 2 2.5 2.3l1 .2c1.5.3 2.5 1 2.5 2.3 0 1.4-1.3 2.4-3 2.4-1.3 0-2.3-.5-2.8-1.4"/><path d="M12 6v1.8M12 16.5V18"/></>,
    bell:      <><path d="M6 16V11a6 6 0 1 1 12 0v5l1.5 2H4.5z"/><path d="M10 21a2 2 0 0 0 4 0"/></>,
    pin:       <><path d="M12 14v7"/><path d="M9 3h6l-1 6 3 3H7l3-3z"/></>,
    home:      <><path d="M3 11l9-7 9 7"/><path d="M5 10v9.5A.5.5 0 0 0 5.5 20h13a.5.5 0 0 0 .5-.5V10"/></>,
    location:  <><path d="M12 21s-7-6.5-7-12a7 7 0 1 1 14 0c0 5.5-7 12-7 12z"/><circle cx="12" cy="9" r="2.5"/></>,
    phone:     <><path d="M5 4h3l1.5 4-2 1.5a12 12 0 0 0 7 7l1.5-2 4 1.5v3a1.5 1.5 0 0 1-1.5 1.5C9 20.5 3.5 15 3.5 5.5A1.5 1.5 0 0 1 5 4z"/></>,
    mail:      <><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3.5 6.5L12 13l8.5-6.5"/></>,
    clock:     <><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3.2 2"/></>,
    sparkle:   <><path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8"/></>,
    filter:    <><path d="M3 5h18"/><path d="M6 12h12"/><path d="M10 19h4"/></>,
    eye:       <><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></>,
  };
  return <svg {...props}>{paths[name] || null}</svg>;
};

window.Icon = Icon;
