// icons.jsx — line icon system for IMS redesign
// Exposes window.Icon ({name, size, ...}) and window.BrandMark
const ICON_PATHS = {
  home: <><path d="M3.5 10.7 12 4l8.5 6.7"/><path d="M5.5 9.5V19a1 1 0 0 0 1 1h3.5v-5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5h3.5a1 1 0 0 0 1-1V9.5"/></>,
  grid: <><rect x="3.5" y="3.5" width="7" height="7" rx="2"/><rect x="13.5" y="3.5" width="7" height="7" rx="2"/><rect x="3.5" y="13.5" width="7" height="7" rx="2"/><rect x="13.5" y="13.5" width="7" height="7" rx="2"/></>,
  paper: <><path d="M6 3.5h7l5 5V20a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1Z"/><path d="M13 3.5V8a1 1 0 0 0 1 1h4"/><path d="M8.5 13h7M8.5 16.5h5"/></>,
  heart: <path d="M12 20s-7-4.3-9.2-8.5C1.3 8.6 2.6 5.2 6 5.2c2 0 3.2 1.2 4 2.4.8-1.2 2-2.4 4-2.4 3.4 0 4.7 3.4 3.2 6.3C19 15.7 12 20 12 20Z"/>,
  profile: <><circle cx="12" cy="8" r="3.6"/><path d="M5.5 19.5c.6-3.3 3.2-5.2 6.5-5.2s5.9 1.9 6.5 5.2"/></>,
  settings: <><circle cx="12" cy="12" r="3"/><path d="M19.4 13.5a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5v.2a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V9a1.6 1.6 0 0 0 1.5 1h.2a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1Z"/></>,
  logout: <><path d="M14 8.5V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-2.5"/><path d="M10 12h10m0 0-3-3m3 3-3 3"/></>,
  search: <><circle cx="11" cy="11" r="6.5"/><path d="m20 20-3.4-3.4"/></>,
  bell: <><path d="M6 9a6 6 0 0 1 12 0c0 5 2 6 2 6H4s2-1 2-6Z"/><path d="M10 19a2 2 0 0 0 4 0"/></>,
  globe: <><circle cx="12" cy="12" r="8.5"/><path d="M3.5 12h17M12 3.5c2.3 2.3 3.5 5.3 3.5 8.5S14.3 18.2 12 20.5C9.7 18.2 8.5 15.2 8.5 12S9.7 5.8 12 3.5Z"/></>,
  plus: <path d="M12 5v14M5 12h14"/>,
  chevDown: <path d="m6 9 6 6 6-6"/>,
  chevLeft: <path d="m15 6-6 6 6 6"/>,
  chevRight: <path d="m9 6 6 6-6 6"/>,
  thumbUp: <><path d="M7 10v9H4.5a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1H7Z"/><path d="M7 10l3.5-6.5a2 2 0 0 1 2.7.5c.4.5.5 1.1.3 1.7L12.5 9H18a2 2 0 0 1 2 2.3l-1 6A2 2 0 0 1 17 19H7"/></>,
  thumbDown: <><path d="M17 14V5h2.5a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H17Z"/><path d="M17 14l-3.5 6.5a2 2 0 0 1-2.7-.5c-.4-.5-.5-1.1-.3-1.7L11.5 15H6a2 2 0 0 1-2-2.3l1-6A2 2 0 0 1 7 5h10"/></>,
  comment: <path d="M20 11.5a7.5 7.5 0 0 1-10.7 6.8L4 19.5l1.3-5A7.5 7.5 0 1 1 20 11.5Z"/>,
  eye: <><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"/><circle cx="12" cy="12" r="2.8"/></>,
  bookmark: <path d="M6.5 3.5h11a1 1 0 0 1 1 1v15.7a.5.5 0 0 1-.8.4L12 16.5l-5.7 4.1a.5.5 0 0 1-.8-.4V4.5a1 1 0 0 1 1-1Z"/>,
  share: <><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="6" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path d="m8.2 10.8 7.6-3.6m0 9.6L8.2 13.2"/></>,
  gift: <><path d="M4 11.5h16V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7.5Z"/><path d="M3 8.5h18v3H3zM12 8.5V20"/><path d="M12 8.5S11 4 8.5 4 6 7 8.5 8.5M12 8.5S13 4 15.5 4 18 7 15.5 8.5"/></>,
  calendar: <><rect x="3.5" y="5" width="17" height="15.5" rx="2"/><path d="M3.5 9.5h17M8 3.5v3M16 3.5v3"/></>,
  filter: <path d="M4 6h16M7 12h10M10 18h4"/>,
  sort: <><path d="M7 4v16m0 0-3-3m3 3 3-3"/><path d="M17 20V4m0 0-3 3m3-3 3 3"/></>,
  star: <path d="m12 3.5 2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 17l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9L12 3.5Z"/>,
  award: <><circle cx="12" cy="9" r="5.5"/><path d="m8.5 13.5-1.5 7 5-2.5 5 2.5-1.5-7"/><path d="m12 6.2.9 1.9 2 .3-1.5 1.4.4 2-1.8-1-1.8 1 .4-2L9.1 8.4l2-.3.9-1.9Z" fill="currentColor" stroke="none"/></>,
  image: <><rect x="3.5" y="4.5" width="17" height="15" rx="2"/><circle cx="8.5" cy="9.5" r="1.8"/><path d="m4 17 4.5-4.5 4 4L16 13l4 4"/></>,
  upload: <><path d="M12 16V5m0 0-4 4m4-4 4 4"/><path d="M5 15v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3"/></>,
  close: <path d="M6 6l12 12M18 6 6 18"/>,
  check: <path d="m5 12.5 4.5 4.5L19 7"/>,
  checkCircle: <><circle cx="12" cy="12" r="8.5"/><path d="m8.5 12 2.5 2.5L16 9.5"/></>,
  xCircle: <><circle cx="12" cy="12" r="8.5"/><path d="M9 9l6 6M15 9l-6 6"/></>,
  users: <><circle cx="9" cy="8" r="3.2"/><path d="M3.5 19c.5-2.9 2.8-4.6 5.5-4.6s5 1.7 5.5 4.6"/><path d="M16 5.2a3.2 3.2 0 0 1 0 6M17.5 14.6c2.2.4 3.7 1.9 4 4.4"/></>,
  bulb: <><path d="M9 17.5h6M10 20.5h4"/><path d="M12 3.5A6 6 0 0 0 8 14c.8.7 1 1.3 1 2.2h6c0-.9.2-1.5 1-2.2a6 6 0 0 0-4-10.5Z"/></>,
  tag: <><path d="M3.5 11V5a1.5 1.5 0 0 1 1.5-1.5h6l9 9a1.5 1.5 0 0 1 0 2.1l-5.4 5.4a1.5 1.5 0 0 1-2.1 0l-9-9Z"/><circle cx="7.5" cy="7.5" r="1.4" fill="currentColor" stroke="none"/></>,
  phone: <path d="M5 4h3l1.5 4-2 1.5a11 11 0 0 0 4.5 4.5l1.5-2 4 1.5v3a1.5 1.5 0 0 1-1.6 1.5A14.5 14.5 0 0 1 3.5 5.6 1.5 1.5 0 0 1 5 4Z"/>,
  mail: <><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m4 7 8 5.5L20 7"/></>,
  edit: <><path d="M5 19h3l9.5-9.5a2 2 0 0 0-2.8-2.8L5 16v3Z"/><path d="m13.5 7.5 3 3"/></>,
  coins: <><ellipse cx="9" cy="7" rx="5.5" ry="2.8"/><path d="M3.5 7v5c0 1.5 2.5 2.8 5.5 2.8"/><ellipse cx="15" cy="13" rx="5.5" ry="2.8"/><path d="M9.5 13.8V17c0 1.5 2.5 2.8 5.5 2.8s5.5-1.3 5.5-2.8v-4"/></>,
  trendUp: <path d="M4 15l5-5 3 3 6-7m0 0h-4m4 0v4"/>,
  trendDown: <path d="M4 9l5 5 3-3 6 7m0 0h-4m4 0v-4"/>,
  network: <><circle cx="6" cy="6" r="2.5"/><circle cx="18" cy="9" r="2.5"/><circle cx="9" cy="18" r="2.5"/><path d="m8 7 8 1.5M8 16l1-7"/></>,
  hand: <><path d="M8 13V6.5a1.5 1.5 0 0 1 3 0V12m0-1V5.5a1.5 1.5 0 0 1 3 0V12m0-.5V7a1.5 1.5 0 0 1 3 0v6.5c0 3.5-2.3 6.5-6 6.5-2.5 0-4-1-5.2-2.8l-2-3c-.6-1 .2-2.3 1.4-2l1.8.9"/></>,
  dollar: <path d="M12 3v18M16 7c0-1.7-1.8-2.5-4-2.5S8 5.5 8 7.5 9.8 10 12 10.5s4 1 4 3-1.8 3-4 3-4-1-4-2.5"/>,
};

window.Icon = function Icon({ name, size = 22, strokeWidth = 1.7, style, className }) {
  const p = ICON_PATHS[name];
  if (!p) return null;
  return (
    <svg viewBox="0 0 24 24" width={size} height={size} fill="none"
      stroke="currentColor" strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"
      style={style} className={className} aria-hidden="true">
      {p}
    </svg>
  );
};

window.BrandMark = function BrandMark() {
  return (
    <svg viewBox="0 0 24 24" fill="none" stroke="#fff" strokeWidth="1.9" strokeLinecap="round" strokeLinejoin="round">
      <path d="M9.5 18h5M10.5 20.5h3"/>
      <path d="M12 3.2A6 6 0 0 0 8 13.8c.8.7 1.1 1.4 1.1 2.4h5.8c0-1 .3-1.7 1.1-2.4A6 6 0 0 0 12 3.2Z"/>
    </svg>
  );
};
