// icons.jsx — restrained line icons. 1.5px stroke, 20×20 default.
// Geometry only — no decorative flourishes.

const ic = (path, props = {}) => function Icon({ size = 20, stroke = 1.5, color = 'currentColor', ...rest }) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
         fill="none" stroke={color} strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round" {...rest}>
      {path}
    </svg>
  );
};

const IconArrowRight  = ic(<><path d="M5 12h14"/><path d="m13 6 6 6-6 6"/></>);
const IconArrowUpRight= ic(<><path d="M7 17 17 7"/><path d="M8 7h9v9"/></>);
const IconCheck       = ic(<path d="m5 12 5 5L20 7"/>);
const IconShield      = ic(<><path d="M12 3 4 6v6c0 5 3.5 8.5 8 9 4.5-.5 8-4 8-9V6l-8-3Z"/><path d="m9 12 2 2 4-4"/></>);
const IconLock        = ic(<><rect x="4" y="11" width="16" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></>);
const IconMail        = ic(<><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m4 7 8 6 8-6"/></>);
const IconFileText    = ic(<><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/><path d="M8 13h8"/><path d="M8 17h5"/></>);
const IconUsers       = ic(<><circle cx="9" cy="8" r="3.2"/><path d="M3 20c0-3 2.7-5 6-5s6 2 6 5"/><circle cx="17" cy="9" r="2.6"/><path d="M15 20c0-2.4 2-4 4-4s2.5 1 2.5 4"/></>);
const IconClock       = ic(<><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></>);
const IconDatabase    = ic(<><ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5"/><path d="M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6"/></>);
const IconFlag        = ic(<><path d="M5 21V4"/><path d="M5 4h11l-2 3 2 3H5"/></>);
const IconLayers      = ic(<><path d="m12 3 9 5-9 5-9-5 9-5Z"/><path d="m3 13 9 5 9-5"/></>);
const IconSparkle     = ic(<><path d="M12 4v4M12 16v4M4 12h4M16 12h4M6.5 6.5l2.5 2.5M15 15l2.5 2.5M6.5 17.5 9 15M15 9l2.5-2.5"/></>);
const IconBoxArchive  = ic(<><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8"/><path d="M10 12h4"/></>);
const IconReceipt     = ic(<><path d="M6 3h12v18l-3-2-3 2-3-2-3 2V3Z"/><path d="M9 8h6M9 12h6M9 16h4"/></>);
const IconClipboard   = ic(<><rect x="6" y="4" width="12" height="17" rx="2"/><rect x="9" y="2" width="6" height="4" rx="1"/><path d="M9 11h6M9 15h4"/></>);
const IconBuilding    = ic(<><rect x="4" y="3" width="16" height="18" rx="1"/><path d="M8 7h2M14 7h2M8 11h2M14 11h2M8 15h2M14 15h2"/></>);
const IconShieldCheck = IconShield;
const IconChevronDown = ic(<path d="m6 9 6 6 6-6"/>);
const IconLogo        = function ({ size = 22, color = 'currentColor' }) {
  // Geometric monogram for Auto-Council — abstract 'A' built from two beams + horizontal bar
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" fill="none">
      <rect x="1.5" y="1.5" width="21" height="21" rx="6" stroke={color} strokeWidth="1.5"/>
      <path d="M7 17 12 7l5 10" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
      <path d="M9 14h6" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
    </svg>
  );
};

Object.assign(window, {
  IconArrowRight, IconArrowUpRight, IconCheck, IconShield, IconLock, IconMail,
  IconFileText, IconUsers, IconClock, IconDatabase, IconFlag, IconLayers,
  IconSparkle, IconBoxArchive, IconReceipt, IconClipboard, IconBuilding,
  IconShieldCheck, IconChevronDown, IconLogo
});
