/* ============================================================
   JIT BATCH — Icon set (inline SVG, 24x24, 2px stroke line icons)
   Robust under React re-renders, fully offline. Exposes window.Icon.
   ============================================================ */
const ICON_PATHS = {
  dashboard: '<rect x="3" y="3" width="7" height="9" rx="1.5"/><rect x="14" y="3" width="7" height="5" rx="1.5"/><rect x="14" y="12" width="7" height="9" rx="1.5"/><rect x="3" y="16" width="7" height="5" rx="1.5"/>',
  factory: '<path d="M3 21h18M4 21V11l5 3v-3l5 3v-3l5 3v7"/><rect x="6" y="5" width="2.5" height="4" rx="0.5"/>',
  flask: '<path d="M9 3h6M10 3v6.5L5.2 18.2A1.5 1.5 0 0 0 6.5 20.5h11a1.5 1.5 0 0 0 1.3-2.3L14 9.5V3"/><path d="M7.5 14.5h9"/>',
  clipboard: '<rect x="5" y="4" width="14" height="17" rx="2"/><rect x="9" y="2.5" width="6" height="4" rx="1"/><path d="M9 11h6M9 15h4"/>',
  users: '<circle cx="9" cy="7.5" r="3"/><path d="M3 20a6 6 0 0 1 12 0"/><path d="M16 4.7a3 3 0 0 1 0 5.6"/><path d="M18.5 20a6 6 0 0 0-3.2-5.3"/>',
  package: '<path d="M3 7.5l9-4.5 9 4.5v9l-9 4.5-9-4.5z"/><path d="M3 7.5l9 4.5 9-4.5"/><path d="M12 12v9"/>',
  silo: '<path d="M5 6c0-1.7 3.1-3 7-3s7 1.3 7 3v12c0 1.7-3.1 3-7 3s-7-1.3-7-3z"/><path d="M5 6c0 1.7 3.1 3 7 3s7-1.3 7-3"/>',
  truck: '<rect x="1.5" y="6" width="12" height="9" rx="1"/><path d="M13.5 9h3.5l3 3.2V15h-6.5z"/><circle cx="6" cy="18" r="2"/><circle cx="17" cy="18" r="2"/><path d="M8 18h7M1.5 15h2.5"/>',
  bell: '<path d="M6 9.5a6 6 0 0 1 12 0c0 5 2 6 2 6H4s2-1 2-6z"/><path d="M10 21a2 2 0 0 0 4 0"/>',
  chart: '<path d="M3 3v18h18"/><path d="M7 16v-4M12 16V8M17 16v-6"/>',
  settings: '<path d="M4 7h9M4 12h3M4 17h9"/><circle cx="16" cy="7" r="2.4"/><circle cx="10" cy="12" r="2.4"/><circle cx="16" cy="17" r="2.4"/>',
  search: '<circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/>',
  plus: '<path d="M12 5v14M5 12h14"/>',
  play: '<path d="M7 4.5v15l13-7.5z" fill="currentColor" stroke="none"/>',
  pause: '<rect x="6" y="5" width="3.6" height="14" rx="1" fill="currentColor" stroke="none"/><rect x="14.4" y="5" width="3.6" height="14" rx="1" fill="currentColor" stroke="none"/>',
  stop: '<rect x="6" y="6" width="12" height="12" rx="2" fill="currentColor" stroke="none"/>',
  reset: '<path d="M4 9a8 8 0 1 1-1.2 4.2"/><path d="M3.5 4v5h5"/>',
  check: '<path d="M5 12.5l4.5 4.5L19 7"/>',
  x: '<path d="M6 6l12 12M18 6L6 18"/>',
  chevronR: '<path d="M9 6l6 6-6 6"/>',
  chevronD: '<path d="M6 9l6 6 6-6"/>',
  download: '<path d="M12 3v12M7 11l5 5 5-5M5 20h14"/>',
  filter: '<path d="M3 5h18l-7 8.2V20l-4-2v-4.8z"/>',
  droplet: '<path d="M12 3s6 5.7 6 10.5a6 6 0 0 1-12 0C6 8.7 12 3 12 3z"/>',
  layers: '<path d="M12 3l9 5-9 5-9-5z"/><path d="M3 13l9 5 9-5"/>',
  gauge: '<path d="M4 18a9 9 0 1 1 16 0"/><path d="M12 14l4-4"/><circle cx="12" cy="14.5" r="1.4" fill="currentColor" stroke="none"/>',
  activity: '<path d="M2 12h4l3 8 4-16 3 8h6"/>',
  cpu: '<rect x="6" y="6" width="12" height="12" rx="2"/><rect x="9.5" y="9.5" width="5" height="5" rx="1"/><path d="M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3"/>',
  signal: '<path d="M5 12.5a10 10 0 0 1 14 0M8 15.5a6 6 0 0 1 8 0"/><circle cx="12" cy="18.5" r="1.2" fill="currentColor" stroke="none"/>',
  triangle: '<path d="M12 3.2l9 16.3H3z"/><path d="M12 9.5v4.5"/><circle cx="12" cy="17.2" r="0.8" fill="currentColor" stroke="none"/>',
  alertCircle: '<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5"/><circle cx="12" cy="16.3" r="0.8" fill="currentColor" stroke="none"/>',
  info: '<circle cx="12" cy="12" r="9"/><path d="M12 11v5.5"/><circle cx="12" cy="7.8" r="0.9" fill="currentColor" stroke="none"/>',
  checkCircle: '<circle cx="12" cy="12" r="9"/><path d="M8 12l3 3 5-6"/>',
  clock: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5.2l3.2 2"/>',
  edit: '<path d="M4 20l4.5-1L19 8.5l-3.5-3.5L5 15.5z"/><path d="M14 6.5l3.5 3.5"/>',
  save: '<path d="M5 4h11l3 3v13H5z"/><path d="M8 4v5h7V4M8 20v-6h8v6"/>',
  trash: '<path d="M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13"/>',
  arrowUp: '<path d="M12 19V5M6 11l6-6 6 6"/>',
  arrowDown: '<path d="M12 5v14M6 13l6 6 6-6"/>',
  moreV: '<circle cx="12" cy="5" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="19" r="1.4" fill="currentColor" stroke="none"/>',
  fileText: '<path d="M6 3h8l5 5v13H6z"/><path d="M14 3v5h5"/><path d="M9 13h6M9 17h4"/>',
  fileSheet: '<path d="M6 3h8l5 5v13H6z"/><path d="M14 3v5h5"/><path d="M8.5 13h7M8.5 17h7M12 11v9"/>',
  wrench: '<path d="M16 4a4 4 0 0 1-5.3 5.3L5 15l4 4 5.7-5.7A4 4 0 0 1 20 8z"/>',
  zap: '<path d="M13 2L4 14h7l-2 8 9-12h-7z"/>',
  thermometer: '<path d="M12 4a2 2 0 0 1 2 2v8.2a4 4 0 1 1-4 0V6a2 2 0 0 1 2-2z"/>',
  power: '<path d="M12 3v9"/><path d="M6.5 7a8 8 0 1 0 11 0"/>',
  phone: '<path d="M5 4h4l2 5-2.5 1.8a12 12 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z"/>',
  mapPin: '<path d="M12 21s7-6 7-12a7 7 0 0 0-14 0c0 6 7 12 7 12z"/><circle cx="12" cy="9" r="2.5"/>',
  chartLine: '<path d="M3 3v18h18"/><path d="M6 15l4-4 3 3 5-6"/>',
  beaker: '<path d="M8 3h8M9 3v5l-4 9a1.5 1.5 0 0 0 1.4 2.1h11.2A1.5 1.5 0 0 0 19 17l-4-9V3"/>',
  building: '<rect x="4" y="3" width="16" height="18" rx="1"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2"/><path d="M4 21h16"/>',
  refresh: '<path d="M4 9a8 8 0 0 1 13.5-3L20 8M20 4v4h-4"/><path d="M20 15a8 8 0 0 1-13.5 3L4 16M4 20v-4h4"/>',
  database: '<ellipse cx="12" cy="6" rx="7" ry="3"/><path d="M5 6v6c0 1.7 3.1 3 7 3s7-1.3 7-3V6"/><path d="M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6"/>',
  truckSide: '<rect x="2" y="7" width="11" height="8" rx="1"/><path d="M13 9h4l3 3v3h-7z"/><circle cx="6" cy="17.5" r="1.8"/><circle cx="16.5" cy="17.5" r="1.8"/>',
  list: '<path d="M8 6h13M8 12h13M8 18h13M3.5 6h.01M3.5 12h.01M3.5 18h.01"/>',
  calendar: '<rect x="4" y="5" width="16" height="16" rx="2"/><path d="M4 9h16M8 3v4M16 3v4"/>',
  user: '<circle cx="12" cy="8" r="3.5"/><path d="M5 20a7 7 0 0 1 14 0"/>',
  lock: '<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/>',
  globe: '<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18"/>',
  hardDrive: '<rect x="3" y="13" width="18" height="7" rx="2"/><path d="M5.5 13l2.5-8h8l2.5 8"/><circle cx="7.5" cy="16.5" r="0.8" fill="currentColor" stroke="none"/>',
  sliders: '<path d="M4 6h10M4 12h6M4 18h10"/><circle cx="17" cy="6" r="2.5"/><circle cx="13" cy="12" r="2.5"/><circle cx="17" cy="18" r="2.5"/>',
  eye: '<path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/>',
  menu: '<path d="M4 6h16M4 12h16M4 18h16"/>',
  arrowRight: '<path d="M5 12h14M13 6l6 6-6 6"/>',
};

function Icon({ name, size = 18, className = "", style = {} }) {
  const inner = ICON_PATHS[name] || ICON_PATHS.info;
  return React.createElement("svg", {
    width: size, height: size, viewBox: "0 0 24 24", fill: "none",
    stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round",
    className, style, dangerouslySetInnerHTML: { __html: inner },
  });
}
window.Icon = Icon;
