// Sahh icons — consistent stroke library
const Icon = ({ name, size = 16, color = "currentColor", strokeWidth = 1.7 }) => {
  const props = {
    width: size, height: size, viewBox: "0 0 24 24", fill: "none",
    stroke: color, strokeWidth, strokeLinecap: "round", strokeLinejoin: "round",
    style: { display: "block", flexShrink: 0 },
  };
  switch (name) {
    case "arrow":   return <svg {...props}><path d="M5 12h14M13 5l7 7-7 7"/></svg>;
    case "arrow-up-right": return <svg {...props}><path d="M7 17L17 7M9 7h8v8"/></svg>;
    case "check":   return <svg {...props}><path d="M5 12l5 5L20 7"/></svg>;
    case "check-c": return <svg {...props}><circle cx="12" cy="12" r="10"/><path d="M8 12l3 3 5-6"/></svg>;
    case "x":       return <svg {...props}><path d="M6 6l12 12M18 6L6 18"/></svg>;
    case "menu":    return <svg {...props}><path d="M3 6h18M3 12h18M3 18h18"/></svg>;
    case "qr":      return <svg {...props}><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 14h3v3M21 14v3M14 17v4h3M17 21h4M21 18v3"/></svg>;
    case "shield":  return <svg {...props}><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6l8-3z"/><path d="M9 12l2 2 4-4"/></svg>;
    case "spark":   return <svg {...props}><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"/></svg>;
    case "leaf":    return <svg {...props}><path d="M11 20A7 7 0 014 13V8a5 5 0 015-5h11v5a7 7 0 01-7 7h-2"/><path d="M2 22l9-9"/></svg>;
    case "chef":    return <svg {...props}><path d="M6 13a4 4 0 110-8 4 4 0 016-3 4 4 0 016 3 4 4 0 110 8H6z"/><path d="M6 13v6a2 2 0 002 2h8a2 2 0 002-2v-6"/></svg>;
    case "chart":   return <svg {...props}><path d="M3 21V5M3 21h18M7 17V11M11 17V8M15 17v-4M19 17V6"/></svg>;
    case "trend":   return <svg {...props}><path d="M3 17l6-6 4 4 8-8M14 7h7v7"/></svg>;
    case "scan":    return <svg {...props}><path d="M4 7V5a2 2 0 012-2h2M16 3h2a2 2 0 012 2v2M20 17v2a2 2 0 01-2 2h-2M8 21H6a2 2 0 01-2-2v-2M4 12h16"/></svg>;
    case "list":    return <svg {...props}><path d="M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01"/></svg>;
    case "star":    return <svg {...props}><path d="M12 3l2.7 5.5 6.1.9-4.4 4.3 1 6-5.4-2.8L6.6 19.7l1-6L3.2 9.4l6.1-.9z"/></svg>;
    case "users":   return <svg {...props}><circle cx="9" cy="8" r="4"/><path d="M2 21v-2a5 5 0 015-5h4a5 5 0 015 5v2M19 8a3 3 0 010 6M22 21v-2a4 4 0 00-3-3.9"/></svg>;
    case "user":    return <svg {...props}><circle cx="12" cy="8" r="4"/><path d="M4 21v-1a6 6 0 016-6h4a6 6 0 016 6v1"/></svg>;
    case "settings":return <svg {...props}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 01-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"/></svg>;
    case "globe":   return <svg {...props}><circle cx="12" cy="12" r="10"/><path d="M2 12h20M12 2a15 15 0 010 20M12 2a15 15 0 000 20"/></svg>;
    case "bolt":    return <svg {...props}><path d="M13 2L3 14h7l-1 8 10-12h-7l1-8z"/></svg>;
    case "play":    return <svg {...props}><path d="M5 3v18l15-9z"/></svg>;
    case "pause":   return <svg {...props}><rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/></svg>;
    case "phone":   return <svg {...props}><rect x="6" y="2" width="12" height="20" rx="2"/><path d="M11 18h2"/></svg>;
    case "tablet":  return <svg {...props}><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M11 17h2"/></svg>;
    case "plus":    return <svg {...props}><path d="M12 5v14M5 12h14"/></svg>;
    case "minus":   return <svg {...props}><path d="M5 12h14"/></svg>;
    case "info":    return <svg {...props}><circle cx="12" cy="12" r="10"/><path d="M12 8h.01M11 12h1v4h1"/></svg>;
    case "search":  return <svg {...props}><circle cx="11" cy="11" r="7"/><path d="M16 16l5 5"/></svg>;
    case "bell":    return <svg {...props}><path d="M6 8a6 6 0 0112 0c0 7 3 9 3 9H3s3-2 3-9M10 21a2 2 0 004 0"/></svg>;
    case "mail":    return <svg {...props}><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>;
    case "lock":    return <svg {...props}><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 118 0v4"/></svg>;
    case "doc":     return <svg {...props}><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><path d="M14 2v6h6"/></svg>;
    case "fire":    return <svg {...props}><path d="M12 22a7 7 0 01-7-7c0-3 2-5 4-7-1 3 2 4 2 4s2-2 1-6c2 2 7 5 7 9a7 7 0 01-7 7z"/></svg>;
    case "drop":    return <svg {...props}><path d="M12 2c4 5 7 8 7 12a7 7 0 01-14 0c0-4 3-7 7-12z"/></svg>;
    case "scale":   return <svg {...props}><path d="M3 7h18M7 7l-3 7a4 4 0 008 0l-3-7M17 7l-3 7a4 4 0 008 0l-3-7M12 3v18M5 21h14"/></svg>;
    case "carrot":  return <svg {...props}><path d="M3 21l8-8M11 13a4 4 0 015.7-5.7L21 11l-2 2-4 4-2 2-2-2zM14 5l2-2M19 8l2-2"/></svg>;
    case "compass": return <svg {...props}><circle cx="12" cy="12" r="10"/><path d="M16 8l-2 6-6 2 2-6z"/></svg>;
    case "stack":   return <svg {...props}><path d="M12 3l9 5-9 5-9-5 9-5z"/><path d="M3 13l9 5 9-5M3 18l9 5 9-5"/></svg>;
    case "store":   return <svg {...props}><path d="M3 9l1-5h16l1 5M3 9v10a2 2 0 002 2h14a2 2 0 002-2V9M3 9h18M9 21V13h6v8"/></svg>;
    case "calendar":return <svg {...props}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>;
    case "download":return <svg {...props}><path d="M12 3v12M6 11l6 6 6-6M4 21h16"/></svg>;
    case "chev":    return <svg {...props}><path d="M9 6l6 6-6 6"/></svg>;
    case "chev-d":  return <svg {...props}><path d="M6 9l6 6 6-6"/></svg>;
    case "moh":     return <svg {...props}><path d="M12 2L4 5v7c0 5 3 9 8 10 5-1 8-5 8-10V5l-8-3z"/><path d="M12 7v8M8 11h8"/></svg>;
    default: return <svg {...props}><circle cx="12" cy="12" r="9"/></svg>;
  }
};

window.Icon = Icon;
