// Iconography — small line icons rendered as SVG. Stroke uses currentColor.
const Icon = ({ name, size = 16, style }) => {
  const props = {
    width: size, height: size, viewBox: '0 0 24 24',
    fill: 'none', stroke: 'currentColor', strokeWidth: 1.6,
    strokeLinecap: 'round', strokeLinejoin: 'round',
    style: { display: 'inline-block', flexShrink: 0, ...style },
  };
  const paths = {
    home:        <><path d="M3 11l9-7 9 7"/><path d="M5 10v10h14V10"/></>,
    portfolio:   <><rect x="3" y="4" width="18" height="6" rx="1"/><rect x="3" y="14" width="11" height="6" rx="1"/><rect x="16" y="14" width="5" height="6" rx="1"/></>,
    projects:    <><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 9h18"/><path d="M8 13h6"/></>,
    initiatives: <><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></>,
    ideas:       <><path d="M9 18h6"/><path d="M10 21h4"/><path d="M12 3a6 6 0 00-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0012 3z"/></>,
    components:  <><path d="M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z"/><path d="M12 3v18"/><path d="M4 7.5l8 4.5 8-4.5"/></>,
    tickets:     <><path d="M3 7v3a2 2 0 010 4v3h18v-3a2 2 0 010-4V7H3z"/><path d="M9 7v10"/></>,
    help:        <><circle cx="12" cy="12" r="9"/><path d="M9.5 9a2.5 2.5 0 015 .5c0 1.5-2.5 2-2.5 3.5"/><path d="M12 17h.01"/></>,
    admin:       <><circle cx="12" cy="8" r="3"/><path d="M5 21a7 7 0 0114 0"/><path d="M19 4l1 1 2-2"/></>,
    search:      <><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></>,
    plus:        <><path d="M12 5v14"/><path d="M5 12h14"/></>,
    bell:        <><path d="M6 8a6 6 0 0112 0c0 7 3 7 3 9H3c0-2 3-2 3-9z"/><path d="M10 21a2 2 0 004 0"/></>,
    chat:        <><path d="M21 12a8 8 0 11-3-6.2L21 5l-1 3.5A8 8 0 0121 12z"/></>,
    settings:    <><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3h0a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8v0a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"/></>,
    arrow_right: <><path d="M5 12h14"/><path d="M13 6l6 6-6 6"/></>,
    arrow_left:  <><path d="M19 12H5"/><path d="M11 6l-6 6 6 6"/></>,
    chevron_down:<><path d="M6 9l6 6 6-6"/></>,
    chevron_right:<><path d="M9 6l6 6-6 6"/></>,
    check:       <><path d="M5 12l5 5L20 7"/></>,
    x:           <><path d="M6 6l12 12"/><path d="M18 6L6 18"/></>,
    flag:        <><path d="M5 21V4"/><path d="M5 4h12l-2 4 2 4H5"/></>,
    link:        <><path d="M10 14a4 4 0 005.7 0l3-3a4 4 0 00-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 00-5.7 0l-3 3a4 4 0 005.7 5.7l1-1"/></>,
    file:        <><path d="M14 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V8z"/><path d="M14 3v5h5"/></>,
    calendar:    <><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18"/><path d="M8 3v4"/><path d="M16 3v4"/></>,
    user:        <><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0116 0"/></>,
    users:       <><circle cx="9" cy="8" r="3"/><circle cx="17" cy="9" r="2.5"/><path d="M3 20a6 6 0 0112 0"/><path d="M15 20a6 6 0 016-3"/></>,
    lock:        <><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 018 0v4"/></>,
    eye:         <><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></>,
    flow:        <><rect x="3" y="3" width="6" height="6" rx="1"/><rect x="15" y="15" width="6" height="6" rx="1"/><path d="M9 6h6a3 3 0 013 3v6"/></>,
    bolt:        <><path d="M13 2L3 14h7l-1 8 11-13h-7z"/></>,
    download:    <><path d="M12 4v12"/><path d="M7 11l5 5 5-5"/><path d="M5 20h14"/></>,
    refresh:     <><path d="M3 12a9 9 0 0115-6.7L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 01-15 6.7L3 16"/><path d="M3 21v-5h5"/></>,
    filter:      <><path d="M3 5h18l-7 9v6l-4-2v-4z"/></>,
    sort:        <><path d="M7 4v16"/><path d="M3 8l4-4 4 4"/><path d="M17 20V4"/><path d="M21 16l-4 4-4-4"/></>,
    more:        <><circle cx="12" cy="6" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="18" r="1"/></>,
    book:        <><path d="M4 5a2 2 0 012-2h13v16H6a2 2 0 00-2 2V5z"/><path d="M19 17H6a2 2 0 00-2 2"/></>,
    target:      <><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1"/></>,
    play:        <><path d="M7 5l12 7-12 7V5z"/></>,
    layers:      <><path d="M12 3l9 5-9 5-9-5 9-5z"/><path d="M3 13l9 5 9-5"/><path d="M3 18l9 5 9-5"/></>,
    sparkle:     <><path d="M12 3l1.6 5.4L19 10l-5.4 1.6L12 17l-1.6-5.4L5 10l5.4-1.6z"/></>,
    archive:     <><rect x="3" y="3" width="18" height="5" rx="1"/><path d="M5 8v12a1 1 0 001 1h12a1 1 0 001-1V8"/><path d="M10 12h4"/></>,
    upload:      <><path d="M12 20V8"/><path d="M7 13l5-5 5 5"/><path d="M5 4h14"/></>,
    shield:      <><path d="M12 3l8 3v6c0 5-4 8-8 9-4-1-8-4-8-9V6l8-3z"/></>,
    money:       <><circle cx="12" cy="12" r="9"/><path d="M9 9.5A2.5 2.5 0 0111.5 7h1A2.5 2.5 0 0115 9.5"/><path d="M9 14.5A2.5 2.5 0 0011.5 17h1A2.5 2.5 0 0015 14.5c0-1.5-1-2.5-3-2.5s-3-1-3-2.5"/></>,
    list:        <><path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><circle cx="4" cy="6" r="1"/><circle cx="4" cy="12" r="1"/><circle cx="4" cy="18" r="1"/></>,
    grid:        <><rect x="4" y="4" width="7" height="7" rx="1"/><rect x="13" y="4" width="7" height="7" rx="1"/><rect x="4" y="13" width="7" height="7" rx="1"/><rect x="13" y="13" width="7" height="7" rx="1"/></>,
    kanban:      <><rect x="3" y="3" width="6" height="14" rx="1"/><rect x="11" y="3" width="6" height="10" rx="1"/><rect x="19" y="3" width="2" height="6" rx="1"/></>,
    logout:      <><path d="M9 4H5a1 1 0 00-1 1v14a1 1 0 001 1h4"/><path d="M16 17l5-5-5-5"/><path d="M21 12H10"/></>,
    branch:      <><circle cx="6" cy="6" r="2"/><circle cx="6" cy="18" r="2"/><circle cx="18" cy="12" r="2"/><path d="M6 8v8"/><path d="M6 11a6 6 0 0010 1"/></>,
  };
  return <svg {...props}>{paths[name] || null}</svg>;
};

Object.assign(window, { Icon });
