// Tiny inline SVG icon set (stroke-based, 16x16 viewBox)
const Icon = ({ name, size = 16, className = "", style }) => {
  const props = { width: size, height: size, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", className: "icon " + className, style };
  const paths = {
    dashboard: <><rect x="2" y="2" width="5.5" height="5.5" rx="1"/><rect x="8.5" y="2" width="5.5" height="3" rx="1"/><rect x="8.5" y="6" width="5.5" height="8" rx="1"/><rect x="2" y="8.5" width="5.5" height="5.5" rx="1"/></>,
    plus: <><path d="M8 3.5v9M3.5 8h9"/></>,
    chart: <><path d="M2.5 13.5h11"/><path d="M4.5 11V7.5M7.5 11V5M10.5 11V8.5M13 11V4"/></>,
    users: <><circle cx="6" cy="6" r="2.5"/><path d="M2 13.5c.4-1.9 2.2-3 4-3s3.6 1.1 4 3"/><circle cx="11.5" cy="6.5" r="2"/><path d="M11.5 10.5c1.4 0 2.7.6 3 2"/></>,
    settings: <><circle cx="8" cy="8" r="1.6"/><path d="M8 1.5v2M8 12.5v2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M1.5 8h2M12.5 8h2M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"/></>,
    gauge: <><path d="M2 11.5a6 6 0 1 1 12 0"/><path d="M8 11.5l3-3.5"/><circle cx="8" cy="11.5" r="1"/></>,
    bolt: <><path d="M9 1.5L3.5 9h4l-.5 5.5L12.5 7h-4z"/></>,
    droplet: <><path d="M8 1.5C6 4 3.5 6.5 3.5 9.5a4.5 4.5 0 0 0 9 0C12.5 6.5 10 4 8 1.5z"/></>,
    wifi: <><path d="M2 6a9 9 0 0 1 12 0"/><path d="M4 8.5a6 6 0 0 1 8 0"/><path d="M6 11a3 3 0 0 1 4 0"/><circle cx="8" cy="13" r="0.5" fill="currentColor"/></>,
    phone: <><path d="M3 3.5c0-.6.4-1 1-1h1.5l1.5 3.5-2 1.2c.7 1.5 1.8 2.6 3.3 3.3L9.5 8.5l3.5 1.5V11.5c0 .6-.4 1-1 1A9.5 9.5 0 0 1 3 3.5z"/></>,
    search: <><circle cx="7" cy="7" r="4"/><path d="M10 10l3 3"/></>,
    bell: <><path d="M4 6a4 4 0 1 1 8 0c0 4 1.5 5 1.5 5h-11s1.5-1 1.5-5z"/><path d="M6.5 13.5a1.5 1.5 0 0 0 3 0"/></>,
    download: <><path d="M8 2v7.5"/><path d="M5 7l3 3 3-3"/><path d="M3 12.5h10"/></>,
    filter: <><path d="M2 3h12l-4.5 5v5l-3-1.5V8z"/></>,
    upload: <><path d="M8 13V5"/><path d="M5 8l3-3 3 3"/><path d="M3 12.5v1h10v-1"/></>,
    camera: <><rect x="2" y="4.5" width="12" height="9" rx="1.5"/><circle cx="8" cy="9" r="2.5"/><path d="M5.5 4.5l1-1.5h3l1 1.5"/></>,
    image: <><rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="5.5" cy="6.5" r="1"/><path d="M2.5 11l3-3 3.5 3.5 1.5-1.5L13.5 13"/></>,
    chevronDown: <><path d="M4 6l4 4 4-4"/></>,
    chevronRight: <><path d="M6 4l4 4-4 4"/></>,
    check: <><path d="M3 8.5l3 3 7-7"/></>,
    edit: <><path d="M11.5 2l2.5 2.5L6 12.5l-3 .5.5-3z"/></>,
    trash: <><path d="M3 4.5h10M6 4.5V3h4v1.5M5 4.5l.5 8.5h5L11 4.5"/></>,
    eye: <><path d="M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z"/><circle cx="8" cy="8" r="2"/></>,
    arrowUp: <><path d="M8 13V3"/><path d="M4 7l4-4 4 4"/></>,
    arrowDown: <><path d="M8 3v10"/><path d="M4 9l4 4 4-4"/></>,
    sparkle: <><path d="M8 2v3M8 11v3M2 8h3M11 8h3M4 4l2 2M10 10l2 2M4 12l2-2M10 6l2-2"/></>,
    sheet: <><rect x="2.5" y="2" width="11" height="12" rx="1.5"/><path d="M2.5 6h11M2.5 10h11M6 2v12M10 2v12"/></>,
    folder: <><path d="M2 4.5c0-.6.4-1 1-1h3l1.5 1.5h5c.6 0 1 .4 1 1v6c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1z"/></>,
    mail: <><rect x="2" y="3.5" width="12" height="9" rx="1.5"/><path d="M2.5 4.5L8 9l5.5-4.5"/></>,
    flag: <><path d="M3.5 14V2.5M3.5 2.5h8L9.5 5l2 2.5h-8"/></>,
    help: <><circle cx="8" cy="8" r="6"/><path d="M6.5 6.5a1.5 1.5 0 0 1 3 0c0 1-1.5 1.2-1.5 2.2M8 11.5v.01"/></>,
    logout: <><path d="M9 3.5H4c-.6 0-1 .4-1 1v7c0 .6.4 1 1 1h5"/><path d="M11 5.5l2.5 2.5L11 10.5M13 8H7"/></>,
    sliders: <><path d="M3 4h2M9 4h4M3 8h6M11 8h2M3 12h2M7 12h6"/><circle cx="6" cy="4" r="1.5" fill="var(--panel)"/><circle cx="10" cy="8" r="1.5" fill="var(--panel)"/><circle cx="6" cy="12" r="1.5" fill="var(--panel)"/></>,
    building: <><rect x="3" y="2" width="10" height="12" rx="1"/><path d="M5.5 5h1M9.5 5h1M5.5 8h1M9.5 8h1M5.5 11h1M9.5 11h1"/></>,
    user: <><circle cx="8" cy="5.5" r="2.5"/><path d="M3 13.5c.6-2.4 2.8-3.5 5-3.5s4.4 1.1 5 3.5"/></>,
  };
  return <svg {...props}>{paths[name] || null}</svg>;
};
window.Icon = Icon;
