// Inline SVG icon library (lucide-style stroke icons).
// Single source — used everywhere as <Icon.Name size=... />

const ICON_DEFS = {
  Dashboard: <g><rect x="3" y="3" width="7" height="9" rx="1"/><rect x="14" y="3" width="7" height="5" rx="1"/><rect x="14" y="12" width="7" height="9" rx="1"/><rect x="3" y="16" width="7" height="5" rx="1"/></g>,
  Briefcase: <g><rect x="2" y="7" width="20" height="14" rx="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></g>,
  Users: <g><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></g>,
  Brain: <g><path d="M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 1 1-5 0V18a2 2 0 0 1-2-2v-2a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2V6a2.5 2.5 0 0 1 4-2"/><path d="M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 1 0 5 0V18a2 2 0 0 0 2-2v-2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2V6a2.5 2.5 0 0 0-4-2"/></g>,
  Message: <g><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></g>,
  Building: <g><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v8h4"/><path d="M18 9h2a2 2 0 0 1 2 2v11h-4"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/></g>,
  Bar: <g><path d="M3 3v18h18"/><rect x="7" y="13" width="3" height="5" rx="0.5"/><rect x="12" y="9" width="3" height="9" rx="0.5"/><rect x="17" y="5" width="3" height="13" rx="0.5"/></g>,
  Settings: <g><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-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.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 1.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.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 2.8 2.8l-.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"/><circle cx="12" cy="12" r="3"/></g>,
  Search: <g><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></g>,
  Bell: <g><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></g>,
  Sparkles: <g><path d="M12 3l1.8 5L19 10l-5.2 1.9L12 17l-1.8-5.1L5 10l5.2-1.9z"/><path d="M19 17l.9 2.1L22 20l-2.1.9L19 23l-.9-2.1L16 20l2.1-.9z"/><path d="M5 4l.6 1.6L7.2 6.2 5.6 6.8 5 8.4l-.6-1.6L2.8 6.2l1.6-.6z"/></g>,
  ChevronRight: <g><path d="m9 6 6 6-6 6"/></g>,
  ChevronDown: <g><path d="m6 9 6 6 6-6"/></g>,
  ChevronLeft: <g><path d="m15 6-6 6 6 6"/></g>,
  ChevronUp: <g><path d="m18 15-6-6-6 6"/></g>,
  ChevronsUpDown: <g><path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/></g>,
  Plus: <g><path d="M12 5v14"/><path d="M5 12h14"/></g>,
  Filter: <g><path d="M22 3H2l8 9.46V19l4 2v-8.54z"/></g>,
  X: <g><path d="M18 6 6 18"/><path d="M6 6l12 12"/></g>,
  Check: <g><path d="M20 6 9 17l-5-5"/></g>,
  CheckCircle: <g><circle cx="12" cy="12" r="9"/><path d="m9 12 2 2 4-4"/></g>,
  CheckCheck: <g><path d="M18 6 7 17l-3-3"/><path d="m22 10-7.5 7.5L13 16"/></g>,
  Phone: <g><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.89.72 2.77a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.31-1.31a2 2 0 0 1 2.11-.45c.88.35 1.81.59 2.77.72A2 2 0 0 1 22 16.92Z"/></g>,
  PhoneCall: <g><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.89.72 2.77a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.31-1.31a2 2 0 0 1 2.11-.45c.88.35 1.81.59 2.77.72A2 2 0 0 1 22 16.92Z"/><path d="M14 2a9 9 0 0 1 8 7.94"/><path d="M14 6a5 5 0 0 1 4 4"/></g>,
  PhoneIn: <g><polyline points="16 2 16 8 22 8"/><line x1="22" y1="2" x2="16" y2="8"/><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.89.72 2.77a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.31-1.31a2 2 0 0 1 2.11-.45c.88.35 1.81.59 2.77.72A2 2 0 0 1 22 16.92Z"/></g>,
  MessageCircle: <g><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></g>,
  WhatsApp: { custom: 'whatsapp' },
  Send: <g><path d="M22 2 11 13"/><path d="M22 2 15 22l-4-9-9-4z"/></g>,
  File: <g><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/><path d="M16 13H8"/><path d="M16 17H8"/></g>,
  FileSearch: <g><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/><circle cx="11.5" cy="14.5" r="2.5"/><path d="m13.3 16.3 1.7 1.7"/></g>,
  Calendar: <g><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4"/><path d="M8 2v4"/><path d="M3 10h18"/></g>,
  CalendarClock: <g><rect x="3" y="4" width="18" height="14" rx="2"/><path d="M16 2v4"/><path d="M8 2v4"/><path d="M3 10h12"/><circle cx="18" cy="18" r="4"/><path d="M18 16v2l1.5 1"/></g>,
  Clock: <g><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></g>,
  MapPin: <g><path d="M20 10c0 7-8 12-8 12s-8-5-8-12a8 8 0 0 1 16 0z"/><circle cx="12" cy="10" r="3"/></g>,
  Dollar: <g><line x1="12" y1="2" x2="12" y2="22"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></g>,
  Wallet: <g><path d="M19 7H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2z"/><path d="M16 14h.01"/><path d="M19 7V5a2 2 0 0 0-2-2H6"/></g>,
  TrendUp: <g><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/></g>,
  TrendDown: <g><polyline points="22 17 13.5 8.5 8.5 13.5 2 7"/><polyline points="16 17 22 17 22 11"/></g>,
  ArrowUp: <g><path d="M12 19V5"/><path d="m5 12 7-7 7 7"/></g>,
  ArrowDown: <g><path d="M12 5v14"/><path d="m5 12 7 7 7-7"/></g>,
  ArrowRight: <g><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></g>,
  ArrowLeft: <g><path d="M19 12H5"/><path d="m12 19-7-7 7-7"/></g>,
  ArrowUpRight: <g><path d="M7 17 17 7"/><path d="M7 7h10v10"/></g>,
  Star: <g><polygon points="12 2 15.1 8.3 22 9.3 17 14.1 18.2 21 12 17.8 5.8 21 7 14.1 2 9.3 8.9 8.3"/></g>,
  Bookmark: <g><path d="m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"/></g>,
  BookmarkPlus: <g><path d="m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"/><line x1="12" y1="7" x2="12" y2="13"/><line x1="9" y1="10" x2="15" y2="10"/></g>,
  More: <g><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="5" cy="12" r="1.4" fill="currentColor" stroke="none"/></g>,
  Mic: <g><rect x="9" y="2" width="6" height="13" rx="3"/><path d="M19 11a7 7 0 0 1-14 0"/><line x1="12" y1="19" x2="12" y2="22"/></g>,
  Volume: <g><polygon points="11 5 6 9 2 9 2 15 6 15 11 19"/><path d="M15.5 8.5a5 5 0 0 1 0 7"/><path d="M19 5a9 9 0 0 1 0 14"/></g>,
  Play: <g><polygon points="6 4 20 12 6 20 6 4" fill="currentColor" stroke="none"/></g>,
  PlayCircle: <g><circle cx="12" cy="12" r="9"/><polygon points="10 8 16 12 10 16 10 8" fill="currentColor"/></g>,
  Pause: <g><rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/></g>,
  User: <g><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></g>,
  UserPlus: <g><circle cx="9" cy="8" r="4"/><path d="M2 21a7 7 0 0 1 14 0"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></g>,
  UserCheck: <g><circle cx="9" cy="8" r="4"/><path d="M2 21a7 7 0 0 1 14 0"/><polyline points="16 11 19 14 23 10"/></g>,
  Eye: <g><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7"/><circle cx="12" cy="12" r="3"/></g>,
  Download: <g><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g>,
  AlertCircle: <g><circle cx="12" cy="12" r="9"/><line x1="12" y1="8" x2="12" y2="13"/><circle cx="12" cy="16.5" r="0.8" fill="currentColor" stroke="none"/></g>,
  Info: <g><circle cx="12" cy="12" r="9"/><line x1="12" y1="11" x2="12" y2="16"/><circle cx="12" cy="8" r="0.8" fill="currentColor" stroke="none"/></g>,
  Zap: <g><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></g>,
  Shield: <g><path d="M12 2 4 6v6c0 5 3.5 9 8 10 4.5-1 8-5 8-10V6z"/><path d="m9 12 2 2 4-4"/></g>,
  Globe: <g><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z"/></g>,
  Languages: <g><path d="m5 8 6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></g>,
  Paperclip: <g><path d="m21.4 11.05-9.19 9.19a6 6 0 0 1-8.49-8.48l9.2-9.19a4 4 0 0 1 5.66 5.65l-9.2 9.2a2 2 0 0 1-2.83-2.83l8.49-8.48"/></g>,
  Smile: <g><circle cx="12" cy="12" r="9"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><line x1="9" y1="9" x2="9.01" y2="9"/><line x1="15" y1="9" x2="15.01" y2="9"/></g>,
  Meh: <g><circle cx="12" cy="12" r="9"/><line x1="8" y1="15" x2="16" y2="15"/><line x1="9" y1="9" x2="9.01" y2="9"/><line x1="15" y1="9" x2="15.01" y2="9"/></g>,
  Frown: <g><circle cx="12" cy="12" r="9"/><path d="M16 16s-1.5-2-4-2-4 2-4 2"/><line x1="9" y1="9" x2="9.01" y2="9"/><line x1="15" y1="9" x2="15.01" y2="9"/></g>,
  Activity: <g><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></g>,
  Target: <g><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" fill="currentColor" stroke="none"/></g>,
  Pin: <g><line x1="12" y1="17" x2="12" y2="22"/><path d="M5 17h14v-1.7c0-.5-.3-1-.7-1.2L17 13V9a4 4 0 0 0-8-2h2v3a3 3 0 0 1-1.6 2.7l-1.6.9c-.5.2-.8.7-.8 1.3z"/></g>,
  ThumbsUp: <g><path d="M7 10v12"/><path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H7"/></g>,
  ThumbsDown: <g><path d="M17 14V2"/><path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H17"/></g>,
  Hand: <g><path d="M18 11V6a2 2 0 0 0-4 0v5"/><path d="M14 11V4a2 2 0 0 0-4 0v7"/><path d="M10 11V6a2 2 0 0 0-4 0v9"/><path d="M18 11a4 4 0 0 1 4 4v2a7 7 0 0 1-14 0v-1"/></g>,
  Bot: <g><rect x="3" y="8" width="18" height="13" rx="2"/><circle cx="8.5" cy="14.5" r="1" fill="currentColor" stroke="none"/><circle cx="15.5" cy="14.5" r="1" fill="currentColor" stroke="none"/><path d="M12 8V4"/><circle cx="12" cy="3" r="1.2"/></g>,
  Megaphone: <g><path d="M3 11v3a4 4 0 0 0 4 4l1.7 4.2a1 1 0 0 0 1.8 0L12 18"/><path d="M21 5v14L7 14V10z"/></g>,
  Inbox: <g><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/></g>,
  Logout: <g><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></g>,
  List: <g><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></g>,
  Grid: <g><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/></g>,
  Wand: <g><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="m17.8 11.8 1.4 1.4"/><path d="m10.8 11.8-1.4 1.4"/><path d="m17.8 6.2 1.4-1.4"/><path d="m7 17 10-10"/><path d="m2 22 5-5"/></g>,
  Notebook: <g><path d="M2 6a2 2 0 0 1 2-2h13a3 3 0 0 1 3 3v13a3 3 0 0 1-3 3H4a2 2 0 0 1-2-2z"/><path d="M2 9h2"/><path d="M2 13h2"/><path d="M2 17h2"/></g>,
  Refresh: <g><path d="M21 12a9 9 0 1 1-3-6.7L21 8"/><polyline points="21 3 21 8 16 8"/></g>,
  Loader: <g><line x1="12" y1="2" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="22"/><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"/><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"/><line x1="2" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="22" y2="12"/><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"/><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"/></g>,
  Flame: <g><path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.4-.5-2.4-1.5-3.5C8 7 8 4 8 4s-3 3-3 7c0 4 3 5 3 5 .5 0 1-.2 1-1.5z"/><path d="M14 16a4 4 0 0 1-8 0c0-1.5 1.2-3 3-4l1 1c.5-1.5 2-2.5 2-4 0 0 5 2 5 7a4 4 0 0 1-3 4z"/></g>,
  Copy: <g><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g>,
  External: <g><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></g>,
  Sliders: <g><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></g>,
  Layers: <g><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></g>,
  Crosshair: <g><circle cx="12" cy="12" r="9"/><line x1="22" y1="12" x2="18" y2="12"/><line x1="6" y1="12" x2="2" y2="12"/><line x1="12" y1="6" x2="12" y2="2"/><line x1="12" y1="22" x2="12" y2="18"/></g>,
  Trash: <g><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></g>,
  Edit: <g><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z"/></g>,
  Headphones: <g><path d="M3 18v-6a9 9 0 0 1 18 0v6"/><path d="M21 19a2 2 0 0 1-2 2h-1v-7h3z"/><path d="M3 19a2 2 0 0 0 2 2h1v-7H3z"/></g>,
  Hash: <g><line x1="4" y1="9" x2="20" y2="9"/><line x1="4" y1="15" x2="20" y2="15"/><line x1="10" y1="3" x2="8" y2="21"/><line x1="16" y1="3" x2="14" y2="21"/></g>,
  Cpu: <g><rect x="4" y="4" width="16" height="16" rx="2"/><rect x="9" y="9" width="6" height="6"/><line x1="9" y1="2" x2="9" y2="4"/><line x1="15" y1="2" x2="15" y2="4"/><line x1="9" y1="20" x2="9" y2="22"/><line x1="15" y1="20" x2="15" y2="22"/><line x1="20" y1="9" x2="22" y2="9"/><line x1="20" y1="14" x2="22" y2="14"/><line x1="2" y1="9" x2="4" y2="9"/><line x1="2" y1="14" x2="4" y2="14"/></g>,
  Network: <g><rect x="9" y="2" width="6" height="6" rx="1"/><rect x="2" y="16" width="6" height="6" rx="1"/><rect x="16" y="16" width="6" height="6" rx="1"/><path d="M5 16v-3a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v3"/><path d="M12 8v3"/></g>,
  Mail: <g><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m22 7-10 6L2 7"/></g>,
  Flag: <g><path d="M4 22V3"/><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V4s-1 1-4 1-5-2-8-2-4 1-4 1"/></g>,
  GraduationCap: <g><path d="M22 10 12 4 2 10l10 6 10-6Z"/><path d="M6 12v5c3 3 9 3 12 0v-5"/></g>,
  Tag: <g><path d="M20.59 13.41 13.42 20.58a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></g>,
  PieChart: <g><path d="M21.21 15.89A10 10 0 1 1 8 2.83"/><path d="M22 12A10 10 0 0 0 12 2v10z"/></g>,
  Workflow: <g><rect x="3" y="3" width="8" height="6" rx="1"/><rect x="13" y="15" width="8" height="6" rx="1"/><path d="M7 9v2a3 3 0 0 0 3 3h4a3 3 0 0 1 3 3v2"/></g>,
  Wave: <g><path d="M2 12c2 0 2-3 4-3s2 6 4 6 2-9 4-9 2 12 4 12 2-3 4-3"/></g>,
  Lock: <g><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></g>,
  Dot: <g><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/></g>,
  PanelLeft: <g><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="9" y1="3" x2="9" y2="21"/></g>,
};

const Icon = {};
Object.keys(ICON_DEFS).forEach((name) => {
  Icon[name] = function I({ size = 16, className = '', strokeWidth = 1.75, style }) {
    const def = ICON_DEFS[name];
    if (def && def.custom === 'whatsapp') {
      return (
        <svg width={size} height={size} viewBox="0 0 24 24" className={className} style={style}
             fill="currentColor" xmlns="http://www.w3.org/2000/svg">
          <path d="M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.85.48 3.65 1.4 5.24L2 22l4.99-1.5a9.9 9.9 0 0 0 5.05 1.38h.01c5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01A9.84 9.84 0 0 0 12.04 2zm0 18.13a8.2 8.2 0 0 1-4.19-1.15l-.3-.18-2.96.89.89-2.89-.2-.31a8.22 8.22 0 0 1-1.27-4.38c0-4.54 3.7-8.23 8.24-8.23 2.2 0 4.27.86 5.83 2.42a8.18 8.18 0 0 1 2.41 5.83c-.01 4.54-3.7 8.23-8.45 8z"/>
          <path d="M16.56 14.2c-.25-.13-1.47-.73-1.7-.81-.23-.08-.39-.13-.56.13-.16.25-.64.81-.78.97-.14.16-.29.18-.54.06-.25-.13-1.04-.38-1.97-1.22-.73-.65-1.22-1.45-1.36-1.7-.14-.25-.02-.39.11-.51.11-.11.25-.29.38-.43.13-.14.16-.25.25-.41.08-.16.04-.31-.02-.43-.06-.13-.56-1.35-.77-1.85-.2-.49-.41-.42-.57-.43H8.5c-.16 0-.43.06-.66.31-.23.25-.86.84-.86 2.05 0 1.21.88 2.38 1 2.55.13.16 1.73 2.65 4.2 3.71 1.47.63 2.04.69 2.78.58.44-.06 1.36-.55 1.55-1.09.19-.54.19-1 .14-1.09-.06-.1-.22-.16-.46-.29z"/>
        </svg>
      );
    }
    return (
      <svg xmlns="http://www.w3.org/2000/svg"
        width={size} height={size} viewBox="0 0 24 24"
        fill="none" stroke="currentColor" strokeWidth={strokeWidth}
        strokeLinecap="round" strokeLinejoin="round"
        className={className} style={style} aria-hidden="true">
        {def}
      </svg>
    );
  };
});

// Custom SOFIA mark — minimalist enterprise feel
Icon.SofiaMark = function SofiaMark({ size = 20, className = '' }) {
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" className={className} fill="none">
      <defs>
        <linearGradient id="sofiaGradL" x1="0" y1="0" x2="24" y2="24" gradientUnits="userSpaceOnUse">
          <stop offset="0" stopColor="#4f46e5"/>
          <stop offset="0.6" stopColor="#7c3aed"/>
          <stop offset="1" stopColor="#a855f7"/>
        </linearGradient>
      </defs>
      <rect x="3" y="3" width="18" height="18" rx="5" fill="url(#sofiaGradL)"/>
      <path d="M9 9.5C9 8.12 10.12 7 11.5 7h2.4c1.18 0 2.1.92 2.1 2.1 0 1.18-.92 2.1-2.1 2.1H11.5c-1.38 0-2.5 1.12-2.5 2.5S10.12 16.2 11.5 16.2H14a2 2 0 0 1 0 4h-2.5"
            stroke="#fff" strokeWidth="1.8" strokeLinecap="round" fill="none"/>
    </svg>
  );
};

// Solucersa logomark — sharp geometric S (used on top-left + workspace)
Icon.SolucersaMark = function SolucersaMark({ size = 20, className = '' }) {
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" className={className} fill="none">
      <rect x="2" y="2" width="20" height="20" rx="5" fill="#0a0a14"/>
      <path d="M16 8c0-1.7-1.6-3-3.7-3H9.3C7.5 5 6 6.3 6 8s1.5 3 3.3 3h5.4c1.8 0 3.3 1.3 3.3 3s-1.5 3-3.3 3H9.3c-2.1 0-3.7-1.3-3.7-3"
            stroke="#fff" strokeWidth="1.6" strokeLinecap="round" fill="none"/>
    </svg>
  );
};

window.Icon = Icon;
