// ============================================================
// icons.jsx — lean icon set (stroke-based, 16px default)
// ============================================================
function Icon({ name, size = 16, stroke = 1.5 }) {
  const p = { width: size, height: size, fill: 'none', stroke: 'currentColor', strokeWidth: stroke, strokeLinecap: 'round', strokeLinejoin: 'round', viewBox: '0 0 24 24' };
  const paths = {
    dashboard: <g><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></g>,
    projects: <g><path d="M3 7h18"/><path d="M3 12h18"/><path d="M3 17h18"/><circle cx="7" cy="7" r="1.3" fill="currentColor"/><circle cx="13" cy="12" r="1.3" fill="currentColor"/><circle cx="10" cy="17" r="1.3" fill="currentColor"/></g>,
    workflow: <g><rect x="3" y="9" width="5" height="6"/><rect x="16" y="9" width="5" height="6"/><rect x="9.5" y="4" width="5" height="6"/><rect x="9.5" y="14" width="5" height="6"/><path d="M8 12h1.5"/><path d="M14.5 12H16"/></g>,
    archive: <g><rect x="3" y="4" width="18" height="4"/><path d="M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8"/><path d="M10 12h4"/></g>,
    rda: <g><path d="M6 3h9l4 4v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/><path d="M14 3v5h5"/><path d="M8 13h8"/><path d="M8 17h5"/></g>,
    benchmark: <g><path d="M3 20h18"/><rect x="5" y="12" width="3" height="8"/><rect x="10.5" y="8" width="3" height="12"/><rect x="16" y="4" width="3" height="16"/></g>,
    comm: <g><path d="M3 6h18v11H8l-5 4V6z"/><path d="M7 10h10"/><path d="M7 13h6"/></g>,
    docs: <g><path d="M6 3h8l4 4v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/><path d="M8 11h8"/><path d="M8 15h5"/></g>,
    vendors: <g><rect x="3" y="8" width="18" height="12"/><path d="M3 8l3-4h12l3 4"/><path d="M10 12h4"/></g>,
    reports: <g><path d="M4 4h16v16H4z"/><path d="M8 16V9"/><path d="M12 16v-5"/><path d="M16 16v-8"/></g>,
    alerts: <g><path d="M12 3a6 6 0 0 0-6 6v4l-2 3h16l-2-3V9a6 6 0 0 0-6-6z"/><path d="M10 19a2 2 0 0 0 4 0"/></g>,
    audit: <g><circle cx="11" cy="11" r="6"/><path d="M15.5 15.5 20 20"/><path d="M11 8v3l2 2"/></g>,
    settings: <g><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1A2 2 0 1 1 4.4 17l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1A2 2 0 1 1 7 4.4l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1A2 2 0 1 1 19.6 7l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></g>,
    chat: <g><path d="M20 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v10z"/></g>,
    sparkle: <g><path d="M12 3l1.8 4.7L18.5 9l-4.7 1.3L12 15l-1.8-4.7L5.5 9l4.7-1.3z"/><path d="M19 16l.8 2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-1z"/></g>,
    search: <g><circle cx="11" cy="11" r="7"/><path d="M16 16l4 4"/></g>,
    bell: <g><path d="M6 8a6 6 0 0 1 12 0v5l2 3H4l2-3z"/><path d="M10 19a2 2 0 0 0 4 0"/></g>,
    x: <g><path d="M18 6 6 18"/><path d="M6 6l12 12"/></g>,
    chev_r: <path d="M9 6l6 6-6 6"/>,
    chev_l: <path d="M15 6l-6 6 6 6"/>,
    chev_d: <path d="M6 9l6 6 6-6"/>,
    plus: <g><path d="M12 5v14"/><path d="M5 12h14"/></g>,
    filter: <path d="M4 5h16l-6 8v6l-4-2v-4z"/>,
    download: <g><path d="M12 3v13"/><path d="M7 12l5 5 5-5"/><path d="M4 21h16"/></g>,
    upload: <g><path d="M12 21V8"/><path d="M7 12l5-5 5 5"/><path d="M4 3h16"/></g>,
    file_pdf: <g><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/><path d="M9 13h1.5a1.5 1.5 0 0 1 0 3H9"/><path d="M9 13v6"/><path d="M13.5 13h2v6"/><path d="M13.5 16h2"/></g>,
    send: <g><path d="M3 20l18-8L3 4l3 8z"/><path d="M6 12h15"/></g>,
    attach: <path d="M21 12l-9 9a5 5 0 1 1-7-7l9-9a3.5 3.5 0 0 1 5 5l-9 9a2 2 0 0 1-3-3l8-8"/>,
    sun: <g><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5L19 19M5 19l1.5-1.5M17.5 6.5L19 5"/></g>,
    moon: <path d="M20 14a8 8 0 1 1-10-10 6 6 0 0 0 10 10z"/>,
    logout: <g><path d="M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5"/><path d="M16 17l5-5-5-5"/><path d="M21 12H10"/></g>,
    file: <g><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6z"/><path d="M14 3v6h6"/></g>,
    mail: <g><rect x="3" y="5" width="18" height="14"/><path d="M3 7l9 6 9-6"/></g>,
    check: <path d="M4 12l5 5L20 6"/>,
    gantt: <g><path d="M3 5h4"/><path d="M7 10h8"/><path d="M5 15h12"/><path d="M10 20h7"/></g>,
    grid: <g><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></g>,
    command: <path d="M9 3a3 3 0 1 1-3 3v12a3 3 0 1 1 3-3h6a3 3 0 1 1-3 3V6a3 3 0 1 1 3 3H9"/>,
    menu: <g><path d="M4 6h16"/><path d="M4 12h16"/><path d="M4 18h16"/></g>,
    eye: <g><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></g>,
    'eye-off': <g><path d="M2 12s3.5-7 10-7c2.5 0 4.6 1 6.3 2.3"/><path d="M22 12s-3.5 7-10 7c-2.5 0-4.6-1-6.3-2.3"/><path d="M9.9 4.2A10 10 0 0 1 12 4"/><path d="M14.5 14.5a3 3 0 0 1-4.2-4.2"/><path d="M3 3l18 18"/></g>,
    copy: <g><rect x="9" y="9" width="11" height="11"/><path d="M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"/></g>,
    refresh: <g><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/><path d="M3 21v-5h5"/></g>,
    users: <g><circle cx="9" cy="8" r="3.5"/><path d="M3 20c0-3.5 2.5-6 6-6s6 2.5 6 6"/><circle cx="17" cy="9" r="3"/><path d="M21 20c0-2.5-1.8-4.5-4-5"/></g>,
    key: <g><circle cx="8" cy="15" r="4"/><path d="M11 12l10-10"/><path d="M17 6l3 3"/></g>,
    site: <g><path d="M4 21V9l8-5 8 5v12"/><path d="M9 21V13h6v8"/></g>,
    eur: <g><path d="M18 5a7 7 0 1 0 0 14"/><path d="M4 10h10"/><path d="M4 14h10"/></g>,
    shield: <path d="M12 3l8 3v6c0 5-3.5 9-8 9s-8-4-8-9V6z"/>,
    warning_tri: <g><path d="M12 3l10 18H2z"/><path d="M12 10v5"/><path d="M12 18h.01"/></g>,
    arrow_up: <g><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></g>,
    arrow_down: <g><path d="M12 5v14"/><path d="M5 12l7 7 7-7"/></g>,
    info: <g><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></g>,
    link: <g><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7L11.5 7"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7L12.5 17"/></g>,
    palette: <g><path d="M12 3a9 9 0 1 0 0 18c1.5 0 2-1 2-2 0-1.5-1-2-1-3 0-1 1-2 2-2h2a4 4 0 0 0 4-4 9 9 0 0 0-9-7z"/><circle cx="7.5" cy="10.5" r="1" fill="currentColor"/><circle cx="12" cy="7.5" r="1" fill="currentColor"/><circle cx="16.5" cy="10.5" r="1" fill="currentColor"/></g>,
    factory: <g><path d="M3 21V10l5 3V10l5 3V7l8 5v9z"/><path d="M7 17h2"/><path d="M12 17h2"/><path d="M17 17h2"/></g>,
    coins: <g><ellipse cx="9" cy="7" rx="6" ry="3"/><path d="M3 7v5c0 1.7 2.7 3 6 3s6-1.3 6-3V7"/><path d="M3 12v5c0 1.7 2.7 3 6 3s6-1.3 6-3v-5"/><ellipse cx="17" cy="15" rx="4" ry="2"/></g>,
    package: <g><path d="M3 7l9-4 9 4-9 4z"/><path d="M3 7v10l9 4 9-4V7"/><path d="M12 11v10"/></g>,
    calendar: <g><rect x="3" y="5" width="18" height="16" rx="1"/><path d="M3 10h18"/><path d="M8 3v4"/><path d="M16 3v4"/></g>,
    cloud: <g><path d="M7 18a5 5 0 0 1-1-9.9 6 6 0 0 1 11.5 1.5A4 4 0 0 1 17 18z"/></g>,
    box: <g><path d="M3 7l9-4 9 4v10l-9 4-9-4z"/><path d="M3 7l9 4 9-4"/><path d="M12 11v10"/></g>,
    signature: <g><path d="M3 17c2 0 3-2 5-5s3-5 5-5 2 3 0 5-4 2-2 5 5 2 10 0"/><path d="M3 21h18"/></g>,
    sliders: <g><path d="M4 6h10"/><path d="M18 6h2"/><circle cx="16" cy="6" r="2"/><path d="M4 12h4"/><path d="M12 12h8"/><circle cx="10" cy="12" r="2"/><path d="M4 18h14"/><path d="M20 18h0"/><circle cx="18" cy="18" r="2"/></g>,
    trash: <g><path d="M4 7h16"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13"/><path d="M9 7V4h6v3"/></g>,
    edit: <g><path d="M4 20h4l11-11-4-4L4 16z"/><path d="M14 5l4 4"/></g>,
    flow: <g><rect x="3" y="4" width="5" height="5"/><rect x="16" y="4" width="5" height="5"/><rect x="3" y="15" width="5" height="5"/><rect x="16" y="15" width="5" height="5"/><path d="M8 6.5h8"/><path d="M8 17.5h8"/><path d="M5.5 9v6"/><path d="M18.5 9v6"/></g>,
    git_branch: <g><circle cx="6" cy="5" r="2"/><circle cx="6" cy="19" r="2"/><circle cx="18" cy="12" r="2"/><path d="M6 7v10"/><path d="M6 12h10"/></g>,
    receipt: <g><path d="M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2z"/><path d="M8 8h8"/><path d="M8 12h8"/><path d="M8 16h5"/></g>,
    history: <g><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l3 2"/></g>,
    lock: <g><rect x="5" y="11" width="14" height="10" rx="1"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></g>,
    import: <g><path d="M12 3v13"/><path d="M7 12l5 5 5-5"/><path d="M4 21h16"/><path d="M4 3h6"/></g>,
  };
  return <svg {...p}>{paths[name] || paths.dashboard}</svg>;
}
Object.assign(window, { Icon });
