`},el=async()=>{const U=ht();try{await navigator.clipboard.writeText(U),Le("html"),setTimeout(()=>Le(null),3e3)}catch(jt){console.error("Failed to copy HTML",jt)}},pa=async()=>{const U=ht();try{if(navigator.clipboard&&window.ClipboardItem){const jt=new Blob([U],{type:"text/html"}),Kt=new Blob([U],{type:"text/plain"}),et=new ClipboardItem({"text/html":jt,"text/plain":Kt});await navigator.clipboard.write([et]),Le("rich"),setTimeout(()=>Le(null),3e3)}else await navigator.clipboard.writeText(U),Le("html"),setTimeout(()=>Le(null),3e3)}catch{await navigator.clipboard.writeText(U),Le("html"),setTimeout(()=>Le(null),3e3)}},xn=()=>{const U=ht(),jt=new Blob([U],{type:"text/html"}),Kt=URL.createObjectURL(jt),et=document.createElement("a");et.href=Kt,et.download=`The_Pasta_Lab_Corporate_Email_${h}_${O}.html`,document.body.appendChild(et),et.click(),document.body.removeChild(et),URL.revokeObjectURL(Kt)};return n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-8 space-y-8 animate-fade-in",children:[n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/30 rounded-sm p-6 sm:p-8 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-[#c9a84c]/5 rounded-full blur-3xl pointer-events-none"}),n.jsxs("div",{className:"relative z-10 flex flex-col md:flex-row justify-between items-start md:items-center gap-6",children:[n.jsxs("div",{className:"space-y-2 max-w-2xl",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-[#c9a84c]/10 border border-[#c9a84c]/30 rounded-full text-[#c9a84c] text-xs font-mono-jetbrains tracking-wider uppercase",children:[n.jsx(Fx,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Outlook Daily Corporate Letterhead"})]}),n.jsx("h1",{className:"text-3xl sm:text-4xl font-playfair font-semibold text-[#f0ead6]",children:"Supplier & Creditor Email Template"}),n.jsx("p",{className:"text-sm text-[#a09080] font-light leading-relaxed",children:"Clean, professional corporate letterhead for daily email correspondence with suppliers, creditors, accounts, and partners. Compatible with Microsoft Outlook Desktop, Web, Office 365, Apple Mail, and Gmail."})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3 w-full md:w-auto shrink-0",children:[n.jsxs("button",{onClick:pa,className:"flex-1 md:flex-initial px-5 py-3 bg-[#c9a84c] hover:bg-[#d4b665] text-[#0a0a08] font-bold text-xs uppercase font-mono-jetbrains tracking-wider rounded-sm transition-all cursor-pointer shadow-lg shadow-[#c9a84c]/15 flex items-center justify-center gap-2",children:[Ke==="rich"?n.jsx(Nc,{className:"w-4 h-4 text-emerald-950"}):n.jsx(vc,{className:"w-4 h-4"}),n.jsx("span",{children:Ke==="rich"?"Copied Formatted Text!":"Copy For Outlook Direct Paste"})]}),n.jsxs("button",{onClick:xn,className:"flex-1 md:flex-initial px-4 py-3 border border-[#c9a84c]/40 hover:border-[#c9a84c] text-[#f0ead6] hover:bg-[#c9a84c]/10 text-xs font-mono-jetbrains font-semibold uppercase tracking-wider rounded-sm transition-all cursor-pointer flex items-center justify-center gap-2",children:[n.jsx(dh,{className:"w-4 h-4 text-[#c9a84c]"}),n.jsx("span",{children:"Download .HTML"})]})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[n.jsxs("div",{className:"lg:col-span-5 space-y-6",children:[n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/20 p-5 rounded-sm space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-[#2a261a]",children:[n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] uppercase tracking-widest font-bold",children:"1. Theme Style"}),n.jsxs("div",{className:"inline-flex bg-[#0a0a08] border border-[#c9a84c]/30 rounded p-1 gap-1",children:[n.jsxs("button",{onClick:()=>B("light"),className:`px-3 py-1 text-[11px] font-mono-jetbrains rounded transition-all cursor-pointer flex items-center gap-1.5 ${O==="light"?"bg-[#c9a84c] text-[#0a0a08] font-bold":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx(Ih,{className:"w-3 h-3"}),n.jsx("span",{children:"Executive Light"})]}),n.jsxs("button",{onClick:()=>B("dark"),className:`px-3 py-1 text-[11px] font-mono-jetbrains rounded transition-all cursor-pointer flex items-center gap-1.5 ${O==="dark"?"bg-[#c9a84c] text-[#0a0a08] font-bold":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx(Oh,{className:"w-3 h-3"}),n.jsx("span",{children:"Luxury Dark"})]})]})]}),n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] uppercase tracking-widest font-bold block pt-1",children:"Select Corporate Email Purpose"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:[n.jsxs("button",{onClick:()=>Zt("corporate-general"),className:`p-3 text-left rounded-sm border transition-all cursor-pointer text-xs font-mono-jetbrains col-span-1 sm:col-span-2 ${h==="corporate-general"?"border-[#c9a84c] bg-[#c9a84c]/20 text-[#f0ead6] ring-1 ring-[#c9a84c]/50":"border-[#c9a84c]/20 bg-[#0a0a08] text-[#a09080] hover:border-[#c9a84c]/40"}`,children:[n.jsxs("div",{className:"font-bold text-[#c9a84c] mb-0.5 flex items-center justify-between",children:[n.jsx("span",{children:"📩 General Correspondence (Daily Simple)"}),h==="corporate-general"&&n.jsx("span",{className:"text-[10px] bg-[#c9a84c] text-[#0a0a08] px-2 py-0.5 rounded font-bold",children:"DEFAULT"})]}),n.jsx("div",{className:"text-[11px] text-[#a09080] font-sans",children:"Clean, elegant corporate email layout without notice boxes for daily emails"})]}),n.jsxs("button",{onClick:()=>Zt("corporate-supplier"),className:`p-3 text-left rounded-sm border transition-all cursor-pointer text-xs font-mono-jetbrains ${h==="corporate-supplier"?"border-[#c9a84c] bg-[#c9a84c]/15 text-[#f0ead6]":"border-[#c9a84c]/15 bg-[#0a0a08] text-[#a09080] hover:border-[#c9a84c]/40"}`,children:[n.jsx("div",{className:"font-bold text-[#c9a84c] mb-0.5",children:"🚚 Supplier / Creditor"}),n.jsx("div",{className:"text-[11px] text-[#a09080] font-sans",children:"Daily order & account inquiry"})]}),n.jsxs("button",{onClick:()=>Zt("remittance"),className:`p-3 text-left rounded-sm border transition-all cursor-pointer text-xs font-mono-jetbrains ${h==="remittance"?"border-[#c9a84c] bg-[#c9a84c]/15 text-[#f0ead6]":"border-[#c9a84c]/15 bg-[#0a0a08] text-[#a09080] hover:border-[#c9a84c]/40"}`,children:[n.jsx("div",{className:"font-bold text-[#c9a84c] mb-0.5",children:"💳 Remittance Advice"}),n.jsx("div",{className:"text-[11px] text-[#a09080] font-sans",children:"EFT payment notice to accounts"})]}),n.jsxs("button",{onClick:()=>Zt("facebook-announcement"),className:`p-3 text-left rounded-sm border transition-all cursor-pointer text-xs font-mono-jetbrains col-span-1 sm:col-span-2 ${h==="facebook-announcement"?"border-[#c9a84c] bg-[#c9a84c]/20 text-[#f0ead6] ring-1 ring-[#c9a84c]/50":"border-[#c9a84c]/20 bg-[#0a0a08] text-[#a09080] hover:border-[#c9a84c]/40"}`,children:[n.jsxs("div",{className:"font-bold text-[#c9a84c] mb-0.5 flex items-center justify-between",children:[n.jsx("span",{children:"📢 Facebook Community Opening Announcement (Pickup Only)"}),h==="facebook-announcement"&&n.jsx("span",{className:"text-[10px] bg-[#c9a84c] text-[#0a0a08] px-2 py-0.5 rounded font-bold",children:"SELECTED"})]}),n.jsx("div",{className:"text-[11px] text-[#a09080] font-sans",children:"Ready-to-post Facebook community ad with pickup notice, menu link & admin contact"})]}),n.jsxs("button",{onClick:()=>Zt("customer-order"),className:`p-3 text-left rounded-sm border transition-all cursor-pointer text-xs font-mono-jetbrains col-span-1 sm:col-span-2 ${h==="customer-order"?"border-[#c9a84c] bg-[#c9a84c]/15 text-[#f0ead6]":"border-[#c9a84c]/15 bg-[#0a0a08] text-[#a09080] hover:border-[#c9a84c]/40"}`,children:[n.jsx("div",{className:"font-bold text-[#c9a84c] mb-0.5",children:"🍝 Customer Order Receipt"}),n.jsx("div",{className:"text-[11px] text-[#a09080] font-sans",children:"Craft pasta order confirmation"})]})]})]}),n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/20 p-5 rounded-sm space-y-4",children:[n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] uppercase tracking-widest font-bold block",children:"2. Customize Email Message"}),n.jsxs("div",{className:"p-3 bg-[#0a0a08] border border-[#2a261a] rounded flex flex-wrap gap-4 text-xs font-mono-jetbrains",children:[n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-[#f0ead6]",children:[n.jsx("input",{type:"checkbox",checked:ut,onChange:U=>de(U.target.checked),className:"accent-[#c9a84c] rounded cursor-pointer"}),n.jsx("span",{children:"Header Ref Badge"})]}),n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-[#f0ead6]",children:[n.jsx("input",{type:"checkbox",checked:Ue,onChange:U=>Pe(U.target.checked),className:"accent-[#c9a84c] rounded cursor-pointer"}),n.jsx("span",{children:"Notice Callout Box"})]}),n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-[#f0ead6]",children:[n.jsx("input",{type:"checkbox",checked:Je,onChange:U=>Se(U.target.checked),className:"accent-[#c9a84c] rounded cursor-pointer"}),n.jsx("span",{children:"Button Call-To-Action"})]})]}),n.jsxs("div",{className:"space-y-3.5 text-xs font-mono-jetbrains",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Subject Line"}),n.jsx("input",{type:"text",value:ue,onChange:U=>R(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Salutation Line"}),n.jsx("input",{type:"text",value:ae,onChange:U=>ne(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Ref / Account Code"}),n.jsx("input",{type:"text",value:Y,onChange:U=>le(U.target.value),disabled:!ut,className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none disabled:opacity-40"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Heading / Subtitle"}),n.jsx("input",{type:"text",value:T,onChange:U=>J(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Main Email Body Paragraph"}),n.jsx("textarea",{rows:4,value:Ie,onChange:U=>Ce(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none leading-relaxed"})]}),Ue&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 p-3 bg-[#0a0a08] border border-[#c9a84c]/30 rounded",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] mb-1 uppercase tracking-wider font-bold",children:"Notice Box Heading"}),n.jsx("input",{type:"text",value:He,onChange:U=>rt(U.target.value),className:"w-full bg-[#111110] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] mb-1 uppercase tracking-wider font-bold",children:"Notice Box Details"}),n.jsx("input",{type:"text",value:Ge,onChange:U=>Ve(U.target.value),className:"w-full bg-[#111110] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),Je&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 p-3 bg-[#0a0a08] border border-[#c9a84c]/30 rounded",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] mb-1 uppercase tracking-wider font-bold",children:"Button Text"}),n.jsx("input",{type:"text",value:W,onChange:U=>ke(U.target.value),className:"w-full bg-[#111110] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] mb-1 uppercase tracking-wider font-bold",children:"Button URL"}),n.jsx("input",{type:"text",value:ot,onChange:U=>kt(U.target.value),className:"w-full bg-[#111110] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]})]})]}),n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/20 p-5 rounded-sm space-y-4",children:[n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] uppercase tracking-widest font-bold block",children:"3. Sender Corporate Signature Block"}),n.jsxs("div",{className:"space-y-3.5 text-xs font-mono-jetbrains",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Sender Name"}),n.jsx("input",{type:"text",value:vt,onChange:U=>V(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Job Title"}),n.jsx("input",{type:"text",value:I,onChange:U=>y(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Phone / Landline"}),n.jsx("input",{type:"text",value:d,onChange:U=>x(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Direct Email"}),n.jsx("input",{type:"text",value:C,onChange:U=>D(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Company Name"}),n.jsx("input",{type:"text",value:A,onChange:U=>_(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"ABN / Reg No."}),n.jsx("input",{type:"text",value:Q,onChange:U=>G(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] mb-1 uppercase tracking-wider",children:"Kitchen & HQ Address"}),n.jsx("input",{type:"text",value:fe,onChange:U=>Ze(U.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]})]})]}),n.jsxs("div",{className:"lg:col-span-7 space-y-4",children:[n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/20 p-2 rounded-sm flex flex-wrap justify-between items-center gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsxs("button",{onClick:()=>Ae("visual"),className:`px-3.5 py-1.5 rounded-sm text-xs font-mono-jetbrains uppercase tracking-wider cursor-pointer transition-all flex items-center gap-1.5 ${ie==="visual"?"bg-[#c9a84c] text-[#0a0a08] font-bold":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx(Em,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Outlook Render View"})]}),n.jsxs("button",{onClick:()=>Ae("code"),className:`px-3.5 py-1.5 rounded-sm text-xs font-mono-jetbrains uppercase tracking-wider cursor-pointer transition-all flex items-center gap-1.5 ${ie==="code"?"bg-[#c9a84c] text-[#0a0a08] font-bold":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx(Am,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"HTML Code"})]}),n.jsxs("button",{onClick:()=>Ae("instructions"),className:`px-3.5 py-1.5 rounded-sm text-xs font-mono-jetbrains uppercase tracking-wider cursor-pointer transition-all flex items-center gap-1.5 ${ie==="instructions"?"bg-[#c9a84c] text-[#0a0a08] font-bold":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx(xh,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Outlook Setup Guide"})]})]}),n.jsxs("button",{onClick:pa,className:"px-3 py-1.5 border border-[#c9a84c]/40 hover:border-[#c9a84c] text-[#c9a84c] text-xs font-mono-jetbrains rounded-sm transition-all cursor-pointer flex items-center gap-1",children:[Ke==="rich"?n.jsx(Nc,{className:"w-3.5 h-3.5 text-emerald-400"}):n.jsx(vc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:Ke==="rich"?"Copied Formatted Text!":"Copy For Outlook"})]})]}),ie==="visual"&&n.jsxs("div",{className:"bg-[#050504] border border-[#c9a84c]/30 rounded-sm p-4 sm:p-6 overflow-x-auto shadow-2xl",children:[n.jsxs("div",{className:"flex justify-between items-center mb-4 text-[10px] text-[#a09080] font-mono-jetbrains uppercase tracking-widest",children:[n.jsxs("span",{children:["Microsoft Outlook Letterhead Render (",O==="light"?"Executive Light":"Luxury Dark",")"]}),n.jsx("span",{className:"text-[#c9a84c]",children:"600px Width Standard"})]}),n.jsx("div",{className:"max-w-[600px] mx-auto shadow-2xl rounded border border-[#c9a84c]/20 overflow-hidden",dangerouslySetInnerHTML:{__html:ht()}})]}),ie==="code"&&n.jsxs("div",{className:"bg-[#050504] border border-[#c9a84c]/30 rounded-sm p-4 relative",children:[n.jsxs("div",{className:"flex justify-between items-center mb-3 pb-2 border-b border-[#2a261a]",children:[n.jsx("span",{className:"text-xs text-[#c9a84c] font-mono-jetbrains uppercase tracking-wider font-bold",children:"Outlook-Tested Corporate HTML Source"}),n.jsxs("button",{onClick:el,className:"text-xs text-[#c9a84c] hover:underline font-mono-jetbrains flex items-center gap-1 cursor-pointer",children:[n.jsx(vc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Copy HTML Code"})]})]}),n.jsx("textarea",{readOnly:!0,rows:22,value:ht(),className:"w-full bg-transparent font-mono-jetbrains text-xs text-[#a09080] select-all focus:outline-none resize-y leading-relaxed"})]}),ie==="instructions"&&n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/30 rounded-sm p-6 space-y-6 text-sm text-[#f0ead6] leading-relaxed",children:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-[#c9a84c]/20 pb-3",children:[n.jsx(ti,{className:"w-5 h-5 text-[#c9a84c]"}),n.jsx("h3",{className:"text-xl font-playfair font-semibold",children:"How to Use This Daily Corporate Template in Outlook"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("h4",{className:"text-sm font-bold font-mono-jetbrains text-[#c9a84c] uppercase tracking-wider flex items-center gap-2",children:[n.jsx(Pa,{className:"w-4 h-4 text-emerald-400"}),n.jsx("span",{children:"Method 1: Direct One-Click Copy & Paste (Recommended)"})]}),n.jsxs("ol",{className:"list-decimal list-inside text-xs text-[#a09080] space-y-1.5 pl-2 font-light",children:[n.jsxs("li",{children:["Click the gold ",n.jsx("strong",{className:"text-[#f0ead6]",children:'"Copy For Outlook Direct Paste"'})," button at the top right."]}),n.jsxs("li",{children:["In Outlook (Desktop app, Outlook Web, or Office 365), start a ",n.jsx("strong",{className:"text-[#f0ead6]",children:"New Email"})," to your supplier or creditor."]}),n.jsxs("li",{children:["Click into the email body area and press ",n.jsx("strong",{className:"text-[#f0ead6]",children:"Ctrl + V"})," (Windows) or ",n.jsx("strong",{className:"text-[#f0ead6]",children:"Cmd + V"})," (Mac)."]}),n.jsx("li",{children:"The full executive letterhead header, custom text, notice box, and signature block will appear instantly in your composer!"})]})]}),n.jsxs("div",{className:"space-y-2 pt-2 border-t border-[#2a261a]",children:[n.jsxs("h4",{className:"text-sm font-bold font-mono-jetbrains text-[#c9a84c] uppercase tracking-wider flex items-center gap-2",children:[n.jsx(Pa,{className:"w-4 h-4 text-emerald-400"}),n.jsx("span",{children:"Method 2: Set as Default Outlook Email Signature"})]}),n.jsxs("ol",{className:"list-decimal list-inside text-xs text-[#a09080] space-y-1.5 pl-2 font-light",children:[n.jsxs("li",{children:["In Outlook, go to ",n.jsx("strong",{className:"text-[#f0ead6]",children:"File > Options > Mail > Signatures"})," (or Settings > Signatures in Web)."]}),n.jsxs("li",{children:["Create a new signature called ",n.jsx("strong",{className:"text-[#f0ead6]",children:"The Pasta Lab Executive"}),"."]}),n.jsx("li",{children:"Paste the formatted template into the signature text box and set it as default for new emails."}),n.jsx("li",{children:"Now every email you create starts with your official company letterhead and signature block automatically."})]})]}),n.jsxs("div",{className:"space-y-2 pt-2 border-t border-[#2a261a]",children:[n.jsxs("h4",{className:"text-sm font-bold font-mono-jetbrains text-[#c9a84c] uppercase tracking-wider flex items-center gap-2",children:[n.jsx(Pa,{className:"w-4 h-4 text-emerald-400"}),n.jsx("span",{children:"Method 3: Save as Outlook Stationary Template (.oft)"})]}),n.jsxs("ol",{className:"list-decimal list-inside text-xs text-[#a09080] space-y-1.5 pl-2 font-light",children:[n.jsxs("li",{children:["Click ",n.jsx("strong",{className:"text-[#f0ead6]",children:'"Download .HTML"'}),"."]}),n.jsxs("li",{children:["Open the file in Microsoft Edge or Chrome, press ",n.jsx("strong",{className:"text-[#f0ead6]",children:"Ctrl + A"})," then ",n.jsx("strong",{className:"text-[#f0ead6]",children:"Ctrl + C"}),"."]}),n.jsxs("li",{children:["Paste into Outlook and click ",n.jsx("strong",{className:"text-[#f0ead6]",children:"File > Save As > Outlook Template (*.oft)"}),"."]})]})]})]})]})]})]})},up=({isOpen:E,onClose:O,products:B,cart:h,onAddToCart:L,onOpenCart:ae})=>{const[ne,ue]=k.useState(!1),[R,T]=k.useState(!1),[J,Y]=k.useState(""),[le,Ie]=k.useState(!1),[Ce,Ue]=k.useState([]),[Pe,He]=k.useState([{id:"welcome-1",sender:"agent",text:"Ciao, amore mio! I am Nonna Rosa, your Italian Master Pasta Maker at The Pasta Lab! Speak to me or type a message — ask about our fresh handcrafted pasta, cooking times, wine pairings, or just say 'Add the Linguine to my cart'!",timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}]),[rt,Ge]=k.useState(!0),[Ve,Je]=k.useState(""),[Se,W]=k.useState(null),ke=k.useRef(null),ot=k.useRef(null);k.useEffect(()=>{if(typeof window<"u"&&"speechSynthesis"in window){const V=()=>{const I=window.speechSynthesis.getVoices();I&&I.length>0&&Ue(I)};V(),window.speechSynthesis.onvoiceschanged=V}},[]),k.useEffect(()=>{const V=window.SpeechRecognition||window.webkitSpeechRecognition;if(V){const I=new V;I.continuous=!1,I.interimResults=!0,I.lang="en-US",I.onstart=()=>{ue(!0)},I.onresult=y=>{let A="";for(let _=y.resultIndex;_{console.warn("Speech recognition error:",y.error),ue(!1)},I.onend=()=>{ue(!1)},ke.current=I}else Ge(!1);return()=>{ke.current&&ke.current.abort()}},[]),k.useEffect(()=>{var V;(V=ot.current)==null||V.scrollIntoView({behavior:"smooth"})},[Pe,le]);const kt=async(V,I="audio/wav")=>{try{if(R)return!0;const y=atob(V),A=new Uint8Array(y.length);for(let Q=0;Q{if(!R&&!(I&&await kt(I,y))&&"speechSynthesis"in window)try{window.speechSynthesis.cancel(),window.speechSynthesis.paused&&window.speechSynthesis.resume();const A=new SpeechSynthesisUtterance(V);A.rate=.92,A.pitch=1.15;const _=Ce.length>0?Ce:window.speechSynthesis.getVoices(),Q=_.find(G=>G.lang.startsWith("it")||G.name.toLowerCase().includes("italian"))||_.find(G=>G.name.includes("Alice")||G.name.includes("Paolina")||G.name.includes("Federica"))||_.find(G=>G.lang.includes("en")&&(G.name.includes("Samantha")||G.name.includes("Victoria")||G.name.includes("Karen")||G.name.includes("Google")||G.name.includes("Female")));Q?(A.voice=Q,A.lang=Q.lang):A.lang="en-US",window.speechSynthesis.speak(A)}catch(A){console.error("Speech Synthesis Error:",A)}},de=()=>{var V,I;if(!rt){alert("Speech recognition is not supported in your browser. You can still type queries to Nonna Rosa!");return}if(ne)(V=ke.current)==null||V.stop(),ue(!1);else try{window.speechSynthesis.cancel(),Je(""),(I=ke.current)==null||I.start()}catch(y){console.error("Failed to start speech recognition",y)}},vt=async V=>{var A,_,Q,G,d;const I=V.trim();if(!I||le)return;const y={id:`user-${Date.now()}`,sender:"user",text:I,timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};He(x=>[...x,y]),Y(""),Ie(!0);try{const C=await(await fetch("/api/voice-assistant",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:I,currentCart:h.map(Ae=>({id:Ae.id,name:Ae.name}))})})).json(),D=C.replyText||"Mamma Mia! Nonna Rosa is pleased to assist you with fresh pasta formulation!",Z={id:`agent-${Date.now()}`,sender:"agent",text:D,audioBase64:C.audioBase64||null,audioMimeType:C.audioMimeType||"audio/wav",action:C.action||null,timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};He(Ae=>[...Ae,Z]),ut(D,C.audioBase64,C.audioMimeType);let F;const fe=((_=(A=C.action)==null?void 0:A.productId)==null?void 0:_.toLowerCase())||"",Ze=((G=(Q=C.action)==null?void 0:Q.productName)==null?void 0:G.toLowerCase())||"",ie=I.toLowerCase();if(C.action&&C.action.type==="ADD_TO_CART"&&(F=B.find(Ae=>Ae.id.toLowerCase()===fe||Ae.name.toLowerCase()===Ze||fe&&Ae.id.toLowerCase().includes(fe)||Ze&&Ae.name.toLowerCase().includes(Ze))),!F&&(ie.includes("add")||ie.includes("want")||ie.includes("cart")||ie.includes("order"))&&(F=B.find(Ae=>{const Ke=Ae.name.toLowerCase(),Le=Ae.id.toLowerCase();return ie.includes(Le)||ie.includes(Ke)||ie.includes("linguine")&&(Ke.includes("linguine")||Le.includes("linguine"))||ie.includes("penne")&&(Ke.includes("penne")||Le.includes("penne"))||ie.includes("pappardelle")&&(Ke.includes("pappardelle")||Le.includes("pappardelle"))||ie.includes("rigatoni")&&(Ke.includes("rigatoni")||Le.includes("rigatoni"))||ie.includes("fettuccine")&&(Ke.includes("fettuccine")||Le.includes("fettuccine"))})),F){const Ae=((d=C.action)==null?void 0:d.quantity)||1;for(let Ke=0;KeW(null),5e3),Z.action||(Z.action={type:"ADD_TO_CART",productId:F.id,productName:F.name,quantity:Ae})}}catch(x){console.error("Voice Assistant Error:",x);const C={id:`agent-err-${Date.now()}`,sender:"agent",text:"Mamma Mia! A small draft in the kitchen disrupted our connection. Let me answer again: what fresh pasta would you like to prepare today?",timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};He(D=>[...D,C])}finally{Ie(!1)}};return E?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-md animate-fade-in",children:n.jsxs("div",{className:"relative w-full max-w-2xl bg-[#11110e] border border-[#c9a84c]/30 rounded-2xl shadow-2xl overflow-hidden flex flex-col h-[85vh] max-h-[720px]",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-6 bg-[#181814] border-b border-[#c9a84c]/20",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"relative flex items-center justify-center w-11 h-11 rounded-full bg-gradient-to-br from-[#c9a84c] to-[#96762c] text-[#0a0a08] shadow-md",children:[n.jsx(Px,{className:"w-6 h-6"}),ne&&n.jsx("span",{className:"absolute -top-1 -right-1 w-3.5 h-3.5 bg-red-500 rounded-full animate-ping"})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("h3",{className:"font-serif text-lg font-bold text-[#f0ead6] tracking-wide",children:"Nonna Rosa"}),n.jsx("span",{className:"px-2 py-0.5 text-[10px] font-mono font-medium tracking-wider text-[#c9a84c] bg-[#c9a84c]/10 border border-[#c9a84c]/30 rounded-full uppercase",children:"AI Voice Concierge"})]}),n.jsx("p",{className:"text-xs text-[#a09080]",children:"Master Pasta Artisan · Kitchen Assistant"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("button",{onClick:()=>{const V=!R;T(V),V&&window.speechSynthesis.cancel()},title:R?"Unmute Voice":"Mute Voice",className:`p-2 rounded-lg border transition-all ${R?"border-red-500/30 text-red-400 bg-red-500/10":"border-[#c9a84c]/30 text-[#c9a84c] hover:bg-[#c9a84c]/10"}`,children:R?n.jsx(ip,{className:"w-4 h-4"}):n.jsx(Tm,{className:"w-4 h-4"})}),n.jsx("button",{onClick:O,className:"p-2 text-[#a09080] hover:text-[#f0ead6] hover:bg-white/5 rounded-lg transition-colors",children:n.jsx(li,{className:"w-5 h-5"})})]})]}),Se&&n.jsxs("div",{className:"mx-6 mt-3 p-3 bg-[#7ab860]/15 border border-[#7ab860]/40 rounded-xl flex items-center justify-between text-[#7ab860] text-xs animate-bounce",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Pa,{className:"w-4 h-4 text-[#7ab860] shrink-0"}),n.jsx("span",{className:"font-medium",children:Se})]}),n.jsxs("button",{onClick:ae,className:"flex items-center space-x-1 underline text-[#a1d68a] hover:text-white text-xs font-medium",children:[n.jsxs("span",{children:["View Cart (",h.length,")"]}),n.jsx(km,{className:"w-3 h-3"})]})]}),n.jsxs("div",{className:"flex-1 p-6 overflow-y-auto space-y-4 font-sans text-sm",children:[Pe.map(V=>n.jsx("div",{className:`flex ${V.sender==="user"?"justify-end":"justify-start"}`,children:n.jsxs("div",{className:`max-w-[82%] p-4 rounded-2xl ${V.sender==="user"?"bg-[#c9a84c] text-[#0a0a08] rounded-br-none shadow-md font-medium":"bg-[#1a1a16] text-[#f0ead6] border border-[#c9a84c]/20 rounded-bl-none shadow-sm"}`,children:[V.sender==="agent"&&n.jsxs("div",{className:"flex items-center justify-between border-b border-[#c9a84c]/10 pb-2 mb-2 text-xs text-[#c9a84c]",children:[n.jsxs("span",{className:"font-serif font-bold tracking-wide flex items-center gap-1.5",children:[n.jsx(ls,{className:"w-3.5 h-3.5 text-[#c9a84c]"})," Nonna Rosa"]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("button",{onClick:()=>ut(V.text,V.audioBase64,V.audioMimeType),className:"flex items-center space-x-1 text-[10px] font-medium text-[#c9a84c] hover:text-white bg-[#c9a84c]/10 hover:bg-[#c9a84c]/30 px-2 py-0.5 rounded border border-[#c9a84c]/30 transition-all cursor-pointer",title:"Replay Nonna Rosa's voice",children:[n.jsx(Tm,{className:"w-3 h-3"}),n.jsx("span",{children:"Listen"})]}),n.jsx("span",{className:"text-[10px] text-[#a09080] font-mono",children:V.timestamp})]})]}),n.jsx("p",{className:"leading-relaxed whitespace-pre-wrap",children:V.text}),V.action&&V.action.type==="ADD_TO_CART"&&n.jsxs("div",{className:"mt-3 p-2.5 bg-[#c9a84c]/10 border border-[#c9a84c]/30 rounded-xl flex items-center justify-between text-xs text-[#c9a84c]",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(ai,{className:"w-4 h-4 text-[#c9a84c]"}),n.jsxs("span",{children:["Added ",n.jsx("strong",{children:V.action.productName})," to cart"]})]}),n.jsx("button",{onClick:ae,className:"px-2.5 py-1 bg-[#c9a84c] text-[#0a0a08] font-semibold rounded-md hover:bg-[#d6b75a] transition-colors text-[11px]",children:"Checkout Now"})]}),V.sender==="user"&&n.jsx("div",{className:"text-[10px] text-black/60 font-mono text-right mt-1",children:V.timestamp})]})},V.id)),le&&n.jsx("div",{className:"flex justify-start",children:n.jsxs("div",{className:"bg-[#1a1a16] border border-[#c9a84c]/20 p-4 rounded-2xl rounded-bl-none text-[#c9a84c] flex items-center space-x-3 text-xs",children:[n.jsx(Bh,{className:"w-4 h-4 animate-spin text-[#c9a84c]"}),n.jsx("span",{children:"Nonna Rosa is tasting the sauce and formulating a reply..."})]})}),n.jsx("div",{ref:ot})]}),ne&&n.jsxs("div",{className:"px-6 py-2 bg-[#1f1b0f] border-t border-[#c9a84c]/30 flex items-center justify-between text-xs text-[#c9a84c]",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"w-2.5 h-2.5 bg-red-500 rounded-full animate-ping"}),n.jsx("span",{className:"font-medium",children:"Listening to your voice..."}),Ve&&n.jsxs("span",{className:"text-[#f0ead6] italic max-w-xs truncate",children:['"',Ve,'"']})]}),n.jsx("button",{onClick:de,className:"text-[11px] underline text-[#a09080] hover:text-[#f0ead6]",children:"Stop Listening"})]}),n.jsxs("div",{className:"px-6 py-2 bg-[#141410] border-t border-white/10 overflow-x-auto whitespace-nowrap flex space-x-2 scrollbar-none",children:[n.jsx("span",{className:"text-[11px] text-[#c2b2a2] self-center mr-1 font-mono uppercase tracking-wider font-semibold",children:"Ask:"}),["Add the Linguine to my cart","What fresh pasta is on the menu today?","Which items are gluten-free or vegetarian?","How long do I cook fresh pasta?","Add 2 Penne alla Vodka to my cart"].map((V,I)=>n.jsx("button",{onClick:()=>vt(V),disabled:le,className:"px-3 py-1.5 bg-[#22221c] hover:bg-[#2e2e26] text-[#ffffff] hover:text-[#dfbd5b] border border-[#c9a84c]/30 rounded-full text-xs font-medium transition-colors shrink-0 disabled:opacity-50",children:V},I))]}),n.jsxs("div",{className:"p-4 bg-[#181814] border-t border-[#c9a84c]/20",children:[n.jsxs("form",{onSubmit:V=>{V.preventDefault(),vt(J)},className:"flex items-center space-x-3",children:[n.jsx("button",{type:"button",onClick:de,disabled:le,className:`p-3 rounded-full transition-all shrink-0 ${ne?"bg-red-500 text-white animate-pulse shadow-lg ring-4 ring-red-500/20":"bg-[#c9a84c] text-[#0a0a08] hover:bg-[#d6b75a] shadow-md"}`,title:ne?"Stop Microphone":"Speak to Nonna Rosa",children:ne?n.jsx(Ch,{className:"w-5 h-5"}):n.jsx(jc,{className:"w-5 h-5"})}),n.jsx("input",{type:"text",value:J,onChange:V=>Y(V.target.value),placeholder:ne?"Listening... or type message here":"Ask Nonna Rosa or say 'Add 2 Tagliatelle to cart'...",disabled:le,className:"flex-1 bg-[#0a0a08] border border-[#c9a84c]/30 text-[#f0ead6] placeholder-[#6a6050] px-4 py-3 rounded-xl text-sm focus:outline-none focus:border-[#c9a84c] transition-colors"}),n.jsx("button",{type:"submit",disabled:!J.trim()||le,className:"p-3 bg-[#c9a84c] text-[#0a0a08] rounded-xl hover:bg-[#d6b75a] disabled:opacity-40 disabled:cursor-not-allowed transition-colors shrink-0",children:n.jsx(Mm,{className:"w-5 h-5"})})]}),n.jsxs("div",{className:"mt-2 text-[10px] text-[#6a6050] font-mono text-center flex items-center justify-center space-x-2",children:[n.jsx("span",{children:"Powered by Gemini AI Engine & Web Speech Synthesis"}),n.jsx("span",{children:"·"}),n.jsx("span",{children:"Canberra ACT Depot"})]})]})]})}):null};function dp(){var Tn;const[E,O]=k.useState("home"),[B,h]=k.useState([]),[L,ae]=k.useState(()=>{const r=localStorage.getItem("pasta_custom_products");if(r)try{const S=JSON.parse(r);if(Array.isArray(S)&&S.length>0)return S}catch(S){console.error("Failed to parse custom products",S)}return fn}),ne=r=>{ae(r),localStorage.setItem("pasta_custom_products",JSON.stringify(r))},[ue,R]=k.useState(()=>{const r=localStorage.getItem("pasta_wishlist");return r?JSON.parse(r):[]}),T=r=>{R(S=>{const M=S.includes(r)?S.filter(z=>z!==r):[...S,r];return localStorage.setItem("pasta_wishlist",JSON.stringify(M)),M})},[J,Y]=k.useState(()=>{const r=localStorage.getItem("pasta_sold_out_ids");if(r)try{return JSON.parse(r)}catch{return["penne-vodka"]}return["penne-vodka"]}),[le,Ie]=k.useState(!1),[Ce,Ue]=k.useState(!1),[Pe,He]=k.useState(!1),[rt,Ge]=k.useState(""),[Ve,Je]=k.useState(""),[Se,W]=k.useState("menu"),[ke,ot]=k.useState("menu"),kt=(r="menu")=>{W(r),Ce?O("admin"):(ot(r),Ge(""),Je(""),He(!0))},ut=r=>{r.preventDefault(),rt==="1234"?(Ue(!0),He(!1),W(ke),O("admin")):Je("Invalid Kitchen PIN code. Please try again.")},de=r=>J.includes(r),vt=r=>{Y(S=>{const M=S.includes(r)?S.filter(z=>z!==r):[...S,r];return localStorage.setItem("pasta_sold_out_ids",JSON.stringify(M)),M})},V=r=>r.stockCount??10,I=r=>r.lowStockThreshold??3,y=r=>{if(de(r.id))return!1;const S=V(r),M=I(r);return S<=M},A=(r,S)=>{const M=L.map(z=>{if(z.id===r){const P=z.stockCount??10,ee=Math.max(0,P+S);return{...z,stockCount:ee}}return z});ne(M)},[_,Q]=k.useState(!1),[G,d]=k.useState(null),[x,C]=k.useState({name:"",price:"",weight:"500g",servings:"2",category:"Fresh Hand-Cut",description:"",ingredients:"",chefsTips:"",pairingSauce:"",pairingWine:"",stockCount:"12",lowStockThreshold:"3"}),D=()=>{d(null),C({name:"",price:"28",weight:"500g",servings:"2",category:"Fresh Hand-Cut",description:"",ingredients:"Semolina, Free-Range Eggs, Salt",chefsTips:"Cook in boiling salted water for 3-4 minutes.",pairingSauce:"Sage Butter Reduction",pairingWine:"Yarra Valley Pinot Noir",stockCount:"12",lowStockThreshold:"3"}),Q(!0)},Z=r=>{var S,M,z;d(r),C({name:r.name,price:r.price.toString(),weight:r.weight||"500g",servings:((S=r.servings)==null?void 0:S.toString())||"2",category:r.category||"Fresh Hand-Cut",description:r.description||"",ingredients:r.ingredients?r.ingredients.join(", "):"",chefsTips:r.chefsTips?r.chefsTips.join(", "):"",pairingSauce:((M=r.pairing)==null?void 0:M.sauce)||"",pairingWine:((z=r.pairing)==null?void 0:z.wine)||"",stockCount:(r.stockCount??10).toString(),lowStockThreshold:(r.lowStockThreshold??3).toString()}),Q(!0)},F=r=>{if(r.preventDefault(),!x.name.trim()||!x.price){alert("Please enter a product name and price.");return}const S=parseFloat(x.price);if(isNaN(S)||S<=0){alert("Please enter a valid positive price.");return}const M=parseInt(x.stockCount,10),z=isNaN(M)||M<0?10:M,P=parseInt(x.lowStockThreshold,10),ee=isNaN(P)||P<0?3:P,oe=x.ingredients?x.ingredients.split(",").map(te=>te.trim()).filter(Boolean):["Semolina","Eggs"],ye=x.chefsTips?x.chefsTips.split(",").map(te=>te.trim()).filter(Boolean):["Cook in boiling salted water for 3-4 minutes."];if(G){const te=L.map(ge=>ge.id===G.id?{...ge,name:x.name.trim(),price:S,weight:x.weight,servings:parseInt(x.servings)||2,category:x.category,description:x.description.trim(),ingredients:oe,chefsTips:ye,pairing:{sauce:x.pairingSauce||"Emulsified Butter & Pasta Water",wine:x.pairingWine||"Barossa Valley Shiraz"},stockCount:z,lowStockThreshold:ee}:ge);ne(te)}else{const ge={id:`pasta-${Date.now()}`,name:x.name.trim(),price:S,tagline:`${x.weight||"500g"} · ${x.category||"Fresh Pasta"}`,weight:x.weight||"500g",servings:parseInt(x.servings)||2,category:x.category,description:x.description.trim()||"Custom chef formulation prepared fresh daily.",ingredients:oe,chefsTips:ye,pairing:{sauce:x.pairingSauce||"Butter & Sage Reduction",wine:x.pairingWine||"Clare Valley Riesling"},stockCount:z,lowStockThreshold:ee};ne([ge,...L])}Q(!1)},fe=(r,S)=>{if(window.confirm(`Are you sure you want to permanently delete "${S}" from the menu?`)){const M=L.filter(z=>z.id!==r);ne(M),h(z=>z.filter(P=>P.id!==r)),R(z=>z.filter(P=>P!==r)),Y(z=>z.filter(P=>P!==r))}},Ze=()=>{window.confirm("Reset menu back to factory default 6 signature pasta formulations?")&&(ne(fn),Y(["penne-vodka"]))},ie=()=>{if(!ga)return null;const r=Bx[ga.id]||{calories:600,protein:"25g",carbs:"80g",fat:"15g",sodium:"600mg",fiber:"5g"},S=gt=>typeof gt=="number"?gt:parseInt(gt.replace(/[^0-9]/g,""),10)||0,M=r.calories,z=S(r.protein),P=S(r.carbs),ee=S(r.fat),oe=S(r.sodium),ye=S(r.fiber),te=Math.round(M/2e3*100),ge=Math.round(z/50*100),_e=Math.round(P/275*100),Pt=Math.round(ee/78*100),Mt=Math.round(oe/2300*100),pl=Math.round(ye/28*100),Cn=[{name:"Energy / Calories",val:`${M} kcal`,dv:te,ref:"2,000 kcal"},{name:"Protein",val:r.protein,dv:ge,ref:"50g"},{name:"Carbohydrates",val:r.carbs,dv:_e,ref:"275g"},{name:"Total Fat",val:r.fat,dv:Pt,ref:"78g"},{name:"Dietary Fiber",val:r.fiber,dv:pl,ref:"28g"},{name:"Sodium",val:r.sodium,dv:Mt,ref:"2,300mg"}];return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-[#050504]/90 backdrop-blur-sm animate-fade-in print:hidden",onClick:()=>{ra(null),il("overview")},children:n.jsxs("div",{className:"relative w-full max-w-md bg-[#0a0a08] border border-[#c9a84c]/30 rounded-sm p-6 md:p-8 space-y-5 shadow-2xl shadow-[#c9a84c]/5 max-h-[90vh] overflow-y-auto",onClick:gt=>gt.stopPropagation(),children:[n.jsx("button",{onClick:()=>{ra(null),il("overview")},className:"absolute top-4 right-4 p-1 text-[#a09080] hover:text-[#c9a84c] transition-colors rounded-sm cursor-pointer",title:"Close Nutritional Profile",children:n.jsx(li,{className:"w-5 h-5"})}),n.jsxs("div",{className:"text-center space-y-2 border-b border-[#c9a84c]/20 pb-4",children:[n.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[10px] tracking-[0.3em] text-[#c9a84c] uppercase font-bold font-mono-jetbrains bg-[#161614] px-3 py-1 rounded border border-[#c9a84c]/10",children:[n.jsx(Eo,{className:"w-3.5 h-3.5 animate-pulse"}),n.jsx("span",{children:"LABORATORY REPORT"})]}),n.jsx("h3",{className:"text-2xl font-playfair text-[#f0ead6] font-normal leading-tight mt-2",children:ga.name}),n.jsxs("p",{className:"text-[11px] font-mono-jetbrains text-[#a09080] tracking-wider uppercase mt-1",children:["Spec: ",ga.weight," • Servings: ",ga.servings," portion"]})]}),n.jsxs("div",{className:"flex bg-[#111110] p-1 rounded border border-[#c9a84c]/15",children:[n.jsx("button",{onClick:()=>il("overview"),className:`flex-1 py-1.5 text-[11px] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer ${gn==="overview"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-sm":"text-[#a09080] hover:text-[#f0ead6]"}`,children:"Overview"}),n.jsxs("button",{onClick:()=>il("advanced"),className:`flex-1 py-1.5 text-[11px] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer flex items-center justify-center gap-1.5 ${gn==="advanced"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-sm":"text-[#a09080] hover:text-[#f0ead6]"}`,children:[n.jsx("span",{children:"Advanced Details"}),n.jsx("span",{className:`text-[9px] px-1 py-0.2 rounded font-semibold ${gn==="advanced"?"bg-[#0a0a08]/20 text-[#0a0a08]":"bg-[#c9a84c]/10 text-[#c9a84c]"}`,children:"% DV"})]})]}),gn==="overview"?n.jsxs("div",{className:"space-y-4 animate-fade-in",children:[n.jsx("div",{className:"text-xs text-[#a09080] font-light text-center",children:"Estimated nutritional analysis per standard dry/fresh formulated portion:"}),n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/15 rounded p-3 text-center space-y-1 hover:border-[#c9a84c]/30 transition-colors",children:[n.jsx("span",{className:"text-[9px] text-[#a09080] uppercase tracking-wider font-mono-jetbrains block",children:"Calories"}),n.jsx("span",{className:"text-2xl font-playfair text-[#c9a84c] font-bold block",children:r.calories}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block",children:"kcal"})]}),n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/15 rounded p-3 text-center space-y-1 hover:border-[#c9a84c]/30 transition-colors",children:[n.jsx("span",{className:"text-[9px] text-[#a09080] uppercase tracking-wider font-mono-jetbrains block",children:"Protein"}),n.jsx("span",{className:"text-2xl font-playfair text-[#c9a84c] font-bold block",children:r.protein}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block",children:"g"})]}),n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/15 rounded p-3 text-center space-y-1 hover:border-[#c9a84c]/30 transition-colors",children:[n.jsx("span",{className:"text-[9px] text-[#a09080] uppercase tracking-wider font-mono-jetbrains block",children:"Carbs"}),n.jsx("span",{className:"text-2xl font-playfair text-[#c9a84c] font-bold block",children:r.carbs}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block",children:"g"})]})]}),n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/10 rounded-sm p-4 space-y-3 font-mono-jetbrains text-xs",children:[n.jsxs("div",{className:"flex justify-between border-b border-[#c9a84c]/5 pb-2",children:[n.jsx("span",{className:"text-[#a09080]",children:"Estimated Total Fat"}),n.jsx("span",{className:"text-[#f0ead6] font-semibold",children:r.fat})]}),n.jsxs("div",{className:"flex justify-between border-b border-[#c9a84c]/5 pb-2",children:[n.jsx("span",{className:"text-[#a09080]",children:"Dietary Fiber"}),n.jsx("span",{className:"text-[#f0ead6] font-semibold",children:r.fiber})]}),n.jsxs("div",{className:"flex justify-between pb-1",children:[n.jsx("span",{className:"text-[#a09080]",children:"Estimated Sodium"}),n.jsx("span",{className:"text-[#f0ead6] font-semibold",children:r.sodium})]})]}),n.jsx("div",{className:"text-[10px] text-[#6a6050] leading-relaxed italic text-center font-light pt-2",children:"*All values are calculated estimations based on individual raw ingredients in the formulation, assuming standard cooking guidelines."})]}):n.jsxs("div",{className:"space-y-4 animate-fade-in",children:[n.jsxs("div",{className:"text-xs text-[#a09080] font-light text-center border-b border-[#c9a84c]/10 pb-3",children:["Daily Intake Breakdown (% DV) calculated against standard ",n.jsx("strong",{className:"text-[#c9a84c] font-mono-jetbrains font-normal",children:"2,000 calorie reference diet"}),":"]}),n.jsx("div",{className:"space-y-3",children:Cn.map((gt,Jl)=>n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/10 p-3 rounded-sm space-y-1.5 hover:border-[#c9a84c]/30 transition-colors",children:[n.jsxs("div",{className:"flex justify-between items-center text-xs",children:[n.jsx("span",{className:"font-mono-jetbrains text-[#f0ead6] font-medium",children:gt.name}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[#a09080] text-[11px] font-mono-jetbrains",children:gt.val}),n.jsxs("span",{className:"px-1.5 py-0.5 bg-[#c9a84c]/15 text-[#c9a84c] rounded text-[10px] font-mono-jetbrains font-bold border border-[#c9a84c]/20",children:[gt.dv,"% DV"]})]})]}),n.jsx("div",{className:"h-2 w-full bg-[#0a0a08] rounded-full overflow-hidden border border-[#c9a84c]/10 p-0.5",children:n.jsx("div",{className:"h-full bg-gradient-to-r from-[#a08030] via-[#c9a84c] to-[#e6ca65] rounded-full transition-all duration-500",style:{width:`${Math.min(100,gt.dv)}%`}})}),n.jsxs("div",{className:"flex justify-between text-[9px] font-mono-jetbrains text-[#6a6050]",children:[n.jsxs("span",{children:["Reference: ",gt.ref]}),n.jsx("span",{children:gt.dv>=20?"High source":gt.dv>=10?"Good source":"Low source"})]})]},Jl))}),n.jsx("div",{className:"text-[10px] text-[#6a6050] leading-relaxed italic text-center font-light pt-1",children:"* Percent Daily Values (%DV) are based on FDA guidelines for a 2,000 calorie daily intake."})]}),n.jsx("div",{className:"pt-2",children:n.jsx("button",{onClick:()=>{ra(null),il("overview")},className:"w-full py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-widest font-bold font-playfair hover:bg-[#d4b665] transition-all cursor-pointer rounded-sm uppercase",children:"ACKNOWLEDGE PROFILE"})})]})})},[Ae,Ke]=k.useState(!1),[Le,Zt]=k.useState("apothecary"),[ht,el]=k.useState("customer"),[pa,xn]=k.useState(!1),U=()=>ht==="customer"?Le==="apothecary"?`
SORELLE PASTA LAB
Order Confirmation
Receipt #PL-8924 • Handcrafted Fresh

Dear Valued Client,

Your artisanal pasta formulation has been successfully registered in our laboratory system. Our chefs are preparing your fresh batch with precision.

2x Squid Ink Linguine (500g) $44.00
1x Truffle & Wild Mushroom Tagliatelle (500g) $27.00
TOTAL PAID $71.00 AUD

DISPATCH DETAILS:

Recipient: Alex Porozny • aporozny@gmail.com

Delivery Address: 123 Artisan Way, Canberra ACT 2600

★ Loyalty Credits Earned: +71 CREDITS

`:Le==="rustic"?`
Sorelle Pasta Lab
Grazie for Your Order!

Hand-rolled fresh daily in our kitchen

Ciao Alex,

We are delighted to confirm your order #PL-8924. Your fresh pasta is scheduled for artisanal preparation.

2x Squid Ink Linguine$44.00
1x Truffle Tagliatelle$27.00
Total Paid:$71.00 AUD
`:`
SORELLE PASTA LAB — RECEIPT #PL-8924

Your order has been confirmed and paid.

2x Squid Ink Linguine$44.00
1x Truffle Tagliatelle$27.00
TOTAL$71.00 AUD

Sent from orders@sorellepasta.com to aporozny@gmail.com

`:`
🚨 KITCHEN DISPATCH ALERT — ORDER #PL-8924 NEW ORDER

RECIPIENT: kitchen@sorellepasta.com

CUSTOMER: Alex Porozny (aporozny@gmail.com)

MOBILE: +61 400 123 456

ADDRESS: 123 Artisan Way, Canberra ACT 2600


ITEMS TO PREPARE:

  • 2x Squid Ink Linguine (500g dry formulation)
  • 1x Truffle & Wild Mushroom Tagliatelle (500g fresh formulation)

ORDER TOTAL: $71.00 AUD (Paid via Stripe)

`,jt=()=>{const r=U();navigator.clipboard.writeText(r),xn(!0),setTimeout(()=>xn(!1),2500)},Kt=()=>Ae?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-[#050504]/90 backdrop-blur-sm animate-fade-in print:hidden",onClick:()=>Ke(!1),children:n.jsxs("div",{className:"relative w-full max-w-3xl bg-[#0a0a08] border border-[#c9a84c]/30 rounded-sm p-6 md:p-8 space-y-6 shadow-2xl shadow-[#c9a84c]/5 max-h-[90vh] overflow-y-auto",onClick:r=>r.stopPropagation(),children:[n.jsx("button",{onClick:()=>Ke(!1),className:"absolute top-4 right-4 p-1 text-[#a09080] hover:text-[#c9a84c] transition-colors rounded-sm cursor-pointer",title:"Close Email Templates Preview",children:n.jsx(li,{className:"w-5 h-5"})}),n.jsxs("div",{className:"text-center space-y-2 border-b border-[#c9a84c]/20 pb-4",children:[n.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[10px] tracking-[0.3em] text-[#c9a84c] uppercase font-bold font-mono-jetbrains bg-[#161614] px-3 py-1 rounded border border-[#c9a84c]/10",children:[n.jsx(ti,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"EMAIL TEMPLATE SHOWROOM & ROUTING"})]}),n.jsx("h3",{className:"text-2xl font-playfair text-[#f0ead6] font-normal leading-tight mt-1",children:"Order Confirmation & Dispatch Templates"}),n.jsx("p",{className:"text-xs text-[#a09080] max-w-xl mx-auto font-light",children:"Choose your preferred visual email theme for customer receipts and kitchen alerts, view configured sender/recipient addresses, or copy the HTML."})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 bg-[#111110] p-4 rounded border border-[#c9a84c]/15 font-mono-jetbrains text-xs",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("span",{className:"text-[10px] text-[#c9a84c] uppercase tracking-wider block font-bold",children:"Outbound Sender Email Address:"}),n.jsxs("div",{className:"flex items-center gap-2 text-[#f0ead6] bg-[#0a0a08] px-3 py-2 rounded border border-[#c9a84c]/10",children:[n.jsx(Mm,{className:"w-3.5 h-3.5 text-[#c9a84c] shrink-0"}),n.jsx("span",{className:"truncate",children:"orders@sorellepasta.com"})]}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block",children:"* Configurable via SMTP_FROM_EMAIL"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("span",{className:"text-[10px] text-[#c9a84c] uppercase tracking-wider block font-bold",children:"Kitchen / Admin Notification Email:"}),n.jsxs("div",{className:"flex items-center gap-2 text-[#f0ead6] bg-[#0a0a08] px-3 py-2 rounded border border-[#c9a84c]/10",children:[n.jsx(ti,{className:"w-3.5 h-3.5 text-[#c9a84c] shrink-0"}),n.jsx("span",{className:"truncate",children:"kitchen@sorellepasta.com"})]}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block",children:"* Configurable via ADMIN_NOTIFY_EMAIL"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-[#a09080] font-mono-jetbrains w-24",children:"Recipient Type:"}),n.jsxs("div",{className:"flex-1 flex bg-[#111110] p-1 rounded border border-[#c9a84c]/15",children:[n.jsx("button",{onClick:()=>el("customer"),className:`flex-1 py-1.5 text-[11px] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer ${ht==="customer"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-sm":"text-[#a09080] hover:text-[#f0ead6]"}`,children:"Customer Confirmation Receipt"}),n.jsx("button",{onClick:()=>el("admin"),className:`flex-1 py-1.5 text-[11px] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer ${ht==="admin"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-sm":"text-[#a09080] hover:text-[#f0ead6]"}`,children:"Kitchen Dispatch Alert"})]})]}),ht==="customer"&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-[#a09080] font-mono-jetbrains w-24",children:"Visual Theme:"}),n.jsxs("div",{className:"flex-1 grid grid-cols-3 gap-2",children:[n.jsx("button",{onClick:()=>Zt("apothecary"),className:`py-2 px-3 text-[11px] font-mono-jetbrains uppercase rounded border transition-all cursor-pointer text-center ${Le==="apothecary"?"border-[#c9a84c] bg-[#c9a84c]/15 text-[#c9a84c] font-bold":"border-[#c9a84c]/10 bg-[#111110] text-[#a09080] hover:border-[#c9a84c]/30"}`,children:"1. Apothecary Gold"}),n.jsx("button",{onClick:()=>Zt("rustic"),className:`py-2 px-3 text-[11px] font-mono-jetbrains uppercase rounded border transition-all cursor-pointer text-center ${Le==="rustic"?"border-[#943821] bg-[#943821]/15 text-[#e2826a] font-bold":"border-[#c9a84c]/10 bg-[#111110] text-[#a09080] hover:border-[#c9a84c]/30"}`,children:"2. Rustic Florentine"}),n.jsx("button",{onClick:()=>Zt("minimal"),className:`py-2 px-3 text-[11px] font-mono-jetbrains uppercase rounded border transition-all cursor-pointer text-center ${Le==="minimal"?"border-[#ffffff]/50 bg-[#ffffff]/10 text-[#ffffff] font-bold":"border-[#c9a84c]/10 bg-[#111110] text-[#a09080] hover:border-[#c9a84c]/30"}`,children:"3. Minimalist Studio"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between items-center text-xs text-[#a09080] font-mono-jetbrains",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx(Em,{className:"w-3.5 h-3.5 text-[#c9a84c]"}),"Live Inbox Render Preview"]}),n.jsxs("button",{onClick:jt,className:"flex items-center gap-1.5 px-3 py-1 bg-[#111110] border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#c9a84c] rounded text-[11px] transition-all cursor-pointer",children:[pa?n.jsx(Pa,{className:"w-3.5 h-3.5 text-emerald-400"}):n.jsx(vc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:pa?"Copied HTML!":"Copy Template Code"})]})]}),n.jsx("div",{className:"border border-[#c9a84c]/30 rounded overflow-hidden bg-[#0a0a08] h-80",children:n.jsx("iframe",{title:"Email Preview",srcDoc:U(),className:"w-full h-full border-0 bg-white"})})]}),n.jsxs("div",{className:"flex gap-3 pt-2",children:[n.jsxs("button",{onClick:jt,className:"flex-1 py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-widest font-bold font-playfair hover:bg-[#d4b665] transition-all cursor-pointer rounded-sm uppercase flex items-center justify-center gap-2",children:[n.jsx(Am,{className:"w-4 h-4"}),n.jsx("span",{children:pa?"HTML CODE COPIED TO CLIPBOARD!":"COPY FULL HTML CODE"})]}),n.jsx("button",{onClick:()=>Ke(!1),className:"px-6 py-3 border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#a09080] hover:text-[#f0ead6] text-xs tracking-widest font-mono-jetbrains rounded-sm uppercase transition-all cursor-pointer",children:"CLOSE"})]})]})}):null,[et,Ma]=k.useState(()=>{const r=localStorage.getItem("pasta_credits");return r?parseInt(r,10):0}),pt=r=>{Ma(S=>{const M=S+r;return localStorage.setItem("pasta_credits",M.toString()),M})},[Re,tl]=k.useState([]),[al,hn]=k.useState({}),[ll,ni]=k.useState("all"),[pn,si]=k.useState("all"),[bn,Oa]=k.useState("all"),[dt,$t]=k.useState(""),[ft,ns]=k.useState(""),[Sc,Bl]=k.useState(null),[nl,ba]=k.useState(null),[sl,Ht]=k.useState(null),[ga,ra]=k.useState(null),[gn,il]=k.useState("overview"),[Be,At]=k.useState({productId:"cacio-pepe",customerName:"",customerEmail:"",rating:5,reviewText:""}),[cl,rl]=k.useState({type:null,message:""}),[ql,ss]=k.useState(!1),[is,za]=k.useState(!1),[oa,ii]=k.useState({applicationId:"",locationId:"",isMock:!0,environment:"sandbox"}),[Jt,tt]=k.useState(""),[bt,ya]=k.useState(""),[Yl,cs]=k.useState(""),[mt,rs]=k.useState("pickup"),[Ra,Gl]=k.useState(""),[va,ja]=k.useState(""),[Da,Na]=k.useState(""),[Qe,os]=k.useState(!1),[_a,Ft]=k.useState({number:"",expiry:"",cvc:""}),[Ua,ci]=k.useState(!1),[yn,Wt]=k.useState({type:null,message:""}),[$e,Vl]=k.useState(null),[Ql,Lt]=k.useState(""),[De,Xl]=k.useState(null),[ri,vn]=k.useState(!1),[us,Zl]=k.useState(null),[wc,Et]=k.useState({}),ua=k.useRef(null),oi=k.useRef(null),[ol,ul]=k.useState([]),[ui,ds]=k.useState(!1);k.useEffect(()=>{dl(),di(),Kl()},[]);const dl=async()=>{try{const S=await(await fetch("/api/square-config")).json();ii(S)}catch(r){console.error("Failed to load Square configuration:",r)}},di=async()=>{try{const S=await(await fetch("/api/reviews")).json();tl(S);const M={};fn.forEach(z=>{const P=S.filter(ye=>ye.productId===z.id),ee=P.length,oe=ee>0?P.reduce((ye,te)=>ye+te.rating,0)/ee:5;M[z.id]={total:ee,avg:oe}}),hn(M)}catch(r){console.error("Failed to load reviews:",r)}},Kl=async()=>{ds(!0);try{const S=await(await fetch("/api/orders")).json();ul(S)}catch(r){console.error("Failed to load orders:",r)}finally{ds(!1)}},jn=ol.filter(r=>{if(bn!=="all"&&!r.items.some(M=>M.id===bn))return!1;if(dt||ft){const S=new Date(r.createdAt).getTime();if(dt){const M=new Date(dt);if(M.setHours(0,0,0,0),SM.getTime())return!1}}return!0}),fs=async r=>{const S=r.trim();if(S){vn(!0),Zl(null);try{const M=await fetch(`/api/orders/${S}`);if(!M.ok)throw M.status===404?new Error("Order reference code not found. Please double-check."):new Error("Failed to retrieve order details. Please try again.");const z=await M.json();Xl(z)}catch(M){Zl(M.message||"Connection error"),Xl(null)}finally{vn(!1)}}},ms=(r,S)=>{Et(M=>({...M,[r]:(M[r]||0)+S}))},Tc=r=>{Et(S=>({...S,[r]:0}))},Nn=(r,S)=>{const M=new Date(r).getTime(),z=Date.now(),P=wc[S]||0,ee=(z-M)/(1e3*60)+P,oe=[{key:"received",title:"Order Received & Verified",description:"The recipe has been loaded into our digital kitchen logs and ingredients are queued.",duration:1,icon:ai},{key:"measuring",title:"Measuring & Selection",description:"Culinary engineers are precision-weighing semolina flour and organic eggs.",duration:3,icon:wm},{key:"kneading",title:"Kneading & Extruding",description:"The pasta dough is kneaded and custom extruded through bronze dies for peak sauce grip.",duration:6,icon:hc},{key:"drying",title:"Drying & Conditioning",description:"Our dry-vacuum chambers stabilise moisture levels to prevent starch degradation.",duration:10,icon:Mo},{key:"sealing",title:"Vacuum Sealing & Isolation",description:"The fresh pasta is vacuum-sealed cold to lock in volatile organic aroma molecules.",duration:15,icon:Nm},{key:"dispatched",title:"Dispatched for Delivery",description:"Your fresh package has left our Canberra ACT lab and is out with the local courier.",duration:1/0,icon:Oo}];let ye=0;for(let ge=0;gen.jsxs("div",{className:"space-y-8",children:[n.jsxs("div",{className:"max-w-xl mx-auto",children:[n.jsxs("form",{onSubmit:r=>{r.preventDefault(),fs(Ql)},className:"flex gap-2",children:[n.jsx("div",{className:"relative flex-grow",children:n.jsx("input",{type:"text",required:!0,value:Ql,onChange:r=>Lt(r.target.value),placeholder:"Enter Order Code (e.g. order-xxxx-xxxxx)",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-4 py-3 rounded font-mono-jetbrains placeholder:text-[#6a6050] transition-all"})}),n.jsx("button",{type:"submit",disabled:ri,className:"px-6 py-3 bg-[#c9a84c] hover:bg-[#d4b665] disabled:opacity-50 text-[#0a0a08] text-xs font-mono-jetbrains uppercase tracking-widest font-bold transition-all rounded-sm cursor-pointer",children:ri?"RETRIEVING...":"TRACK PREP"})]}),us&&n.jsx("p",{className:"text-red-400 text-xs mt-3 text-center font-light",children:us})]}),De&&(()=>{const{stages:r,activeIndex:S,stageProgress:M}=Nn(De.createdAt,De.id);return n.jsxs("div",{className:"border border-[#c9a84c]/15 bg-[#0e0e0c] p-6 md:p-8 rounded-sm space-y-6 mt-8 max-w-3xl mx-auto animate-fade-in",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 border-b border-[#c9a84c]/10 pb-4",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] uppercase font-mono-jetbrains text-[#c9a84c] font-bold block mb-1",children:"STATION RECORD FOUND"}),n.jsxs("h3",{className:"text-lg font-playfair font-normal text-[#f0ead6]",children:["Recipient: ",De.customerName]}),n.jsxs("div",{className:"flex flex-wrap gap-x-4 text-[11px] text-[#a09080] mt-1 font-mono-jetbrains",children:[n.jsxs("span",{children:["Ref: ",De.id]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Placed: ",new Date(De.createdAt).toLocaleString()]})]})]}),n.jsxs("div",{className:"text-left sm:text-right",children:[n.jsx("span",{className:"text-[10px] text-[#6a6050] uppercase tracking-wider block font-mono-jetbrains",children:"Total Formulation"}),n.jsxs("span",{className:"text-lg font-playfair font-semibold text-[#c9a84c]",children:["$",De.totalAmount.toFixed(2)]})]})]}),n.jsxs("div",{className:"bg-[#111110] p-3 border border-[#c9a84c]/5 rounded-sm flex flex-col sm:flex-row justify-between sm:items-center gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("span",{className:"text-[9px] text-[#c9a84c] uppercase tracking-widest block font-bold mb-1.5",children:"CONSOLIDATING RECIPES:"}),n.jsx("ul",{className:"grid sm:grid-cols-2 gap-2 text-xs",children:De.items.map((z,P)=>n.jsx("li",{className:"flex justify-between text-[#a09080] font-mono-jetbrains",children:n.jsxs("span",{children:["• ",z.name," (",z.weight||"300g",")"]})},P))})]}),n.jsxs("button",{onClick:()=>Sa(De),className:"px-3.5 py-2 bg-[#c9a84c] hover:bg-[#d4b665] text-[#0a0a08] text-[10px] uppercase font-mono-jetbrains font-bold tracking-wider rounded transition-all cursor-pointer shrink-0 flex items-center justify-center gap-1.5 shadow-sm",title:"Instantly add all items from this tracked order back into your cart",children:[n.jsx(bc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Quick Reorder"})]})]}),n.jsx("div",{className:"relative pl-8 space-y-8 border-l border-[#c9a84c]/10 ml-4 py-2",children:r.map((z,P)=>{const ee=Pms(De.id,1),className:"px-2.5 py-1.5 bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[10px] text-[#f0ead6] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer",title:"Advance time by 1 minute",children:"+1m"}),n.jsx("button",{onClick:()=>ms(De.id,5),className:"px-2.5 py-1.5 bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[10px] text-[#f0ead6] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer",title:"Advance time by 5 minutes",children:"+5m"}),n.jsx("button",{onClick:()=>ms(De.id,15),className:"px-2.5 py-1.5 bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[10px] text-[#f0ead6] font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer",title:"Advance time by 15 minutes",children:"+15m"}),n.jsx("button",{onClick:()=>Tc(De.id),className:"px-2.5 py-1.5 bg-red-950/20 border border-red-500/20 hover:border-red-500 text-[10px] text-red-400 font-mono-jetbrains uppercase tracking-wider rounded transition-all cursor-pointer",title:"Reset to true order creation time",children:"Reset"})]})]}),n.jsx("div",{className:"text-center pt-2",children:n.jsx("button",{onClick:()=>{Xl(null),Lt("")},className:"text-xs tracking-wider uppercase text-[#c9a84c] underline hover:text-[#d4b665]",children:"Clear Tracker"})})]})})()]});k.useEffect(()=>{if(E==="order"&&!oa.isMock&&B.length>0){const r=setTimeout(async()=>{if(document.getElementById("square-card-container")&&window.Square&&!ua.current)try{const M=window.Square.payments(oa.applicationId,oa.locationId);oi.current=M;const z=await M.card();await z.attach("#square-card-container"),ua.current=z}catch(M){console.error("Failed to mount Square Web Payments card element:",M)}},150);return()=>{if(clearTimeout(r),ua.current){try{ua.current.destroy()}catch{}ua.current=null}}}},[E,oa.isMock,oa.applicationId,B.length]);const fl=r=>{if(de(r.id)){Wt({type:"error",message:`"${r.name}" is currently SOLD OUT and cannot be added to your order.`}),O("order");return}h([...B,r]),O("order")},xs=r=>{const S=[...B];S.splice(r,1),h(S)},ml=()=>{h([])},Sa=r=>{let S=0,M=0;const z=[];r.items.forEach(P=>{const ee=L.find(oe=>oe.id===P.id||oe.name.toLowerCase()===P.name.toLowerCase());if(ee)de(ee.id)?M++:(z.push(ee),S++);else{const oe={id:P.id||`reorder-${Date.now()}-${Math.random().toString(36).substring(2,7)}`,name:P.name,price:P.price||28,tagline:`${P.weight||"500g"} · Fresh Hand-Cut`,weight:P.weight||"500g",servings:2,category:"Fresh Hand-Cut",description:"Reordered formulation from past ledger record.",ingredients:["Semolina","Free-Range Eggs"],chefsTips:["Cook in boiling salted water for 3-4 minutes."],pairing:{sauce:"Emulsified Butter & Pasta Water",wine:"Yarra Valley Pinot Noir"}};z.push(oe),S++}}),z.length>0&&h(P=>[...P,...z]),!Jt&&r.customerName&&tt(r.customerName),!bt&&r.customerEmail&&ya(r.customerEmail),!Yl&&r.customerMobile&&cs(r.customerMobile),!Ra&&r.customerAddress&&Gl(r.customerAddress),!va&&r.customerPostcode&&ja(r.customerPostcode),!Da&&r.deliveryInstructions&&Na(r.deliveryInstructions),M>0?Wt({type:"error",message:`Added ${S} item(s) from Order #${r.id} to cart (${M} item(s) skipped as sold out).`}):Wt({type:"success",message:`Added all ${S} item(s) from Order #${r.id} back into your cart!`}),O("order")},hs=B.reduce((r,S)=>r+S.price,0),Sn=B.length>0&&mt==="delivery"?Qe?0:5:0,xl=hs+Sn,hl=async(r,S)=>{r.preventDefault();const M=S||Be.productId,z=Be.customerName.trim(),P=Be.customerEmail.trim(),ee=Be.reviewText.trim(),oe=Be.rating;if(!z){rl({type:"error",message:"Please enter your name."});return}ss(!0),rl({type:null,message:""});const ye=fn.find(ge=>ge.id===M),te=ye?ye.name:"Fresh Pasta";try{const ge=await fetch("/api/reviews",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productId:M,productName:te,customerName:z,customerEmail:P||"anonymous@example.com",rating:oe,reviewText:ee})}),_e=await ge.json();ge.ok&&_e.success?(rl({type:"success",message:"Thank you! Your review has been published."}),At({productId:"cacio-pepe",customerName:"",customerEmail:"",rating:5,reviewText:""}),di()):rl({type:"error",message:_e.error||"Failed to submit review"})}catch(ge){rl({type:"error",message:ge.message||"Server connection failed"})}finally{ss(!1)}},da=async r=>{var te,ge;r.preventDefault();const S=Jt.trim(),M=bt.trim(),z=Yl.trim(),P=Ra.trim(),ee=va.trim(),oe=Da.trim();if(!S||!M||!z){Wt({type:"error",message:"Name, Email, and Mobile number are required."});return}if(mt==="delivery"&&(!P||!ee)){Wt({type:"error",message:"Delivery Address and Postcode are required for local delivery."});return}const ye=B.filter(_e=>de(_e.id));if(ye.length>0){Wt({type:"error",message:`Your order contains sold out formulation(s): ${ye.map(_e=>_e.name).join(", ")}. Please remove sold out items before checking out.`});return}ci(!0),Wt({type:null,message:""});try{let _e="cnon:card-nonce-ok";if(!oa.isMock&&ua.current){const Ha=await ua.current.tokenize();if(Ha.status==="OK")_e=Ha.token;else throw new Error(((ge=(te=Ha.errors)==null?void 0:te[0])==null?void 0:ge.message)||"Square payment tokenization failed")}else await new Promise(Ha=>setTimeout(Ha,1500));const Pt=await fetch("/api/create-square-payment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:_e,amount:xl,customerDetails:{name:S,email:M,mobile:z,address:mt==="pickup"?"Constitution Ave, Canberra ACT 2600":P,postcode:mt==="pickup"?"2600":ee}})}),Mt=await Pt.json();if(!Pt.ok||!Mt.success)throw new Error(Mt.error||Mt.details||"Square payment authorization failed");const pl=Mt.paymentId||`sq_pay_${Date.now()}`,Cn=!!Mt.isMock,gt=await fetch("/api/orders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerName:S,customerEmail:M,customerMobile:z,fulfillmentMethod:mt,customerAddress:mt==="pickup"?"Constitution Ave, Canberra ACT 2600":P,customerPostcode:mt==="pickup"?"2600":ee,deliveryInstructions:mt==="pickup"?"Store Pickup":oe,items:B,totalAmount:xl,paymentIntentId:pl,isMock:Cn})}),Jl=await gt.json();if(gt.ok&&Jl.success){const Ha=Math.floor(xl);pt(Ha),Wt({type:"success",message:"✓ Order placed! A confirmation code has been generated."}),Vl(Jl.order),h([]),tt(""),ya(""),cs(""),Gl(""),ja(""),Na(""),os(!1),Ft({number:"",expiry:"",cvc:""}),Kl()}else throw new Error(Jl.error||"Failed to record the order details")}catch(_e){Wt({type:"error",message:_e.message||"Checkout failed. Please check your card information."})}finally{ci(!1)}},wn=Re.filter(r=>{const S=ll==="all"||r.productId===ll,M=pn==="all"||r.rating===Number(pn);return S&&M}),$l=()=>_?n.jsx("div",{className:"fixed inset-0 z-50 bg-[#0a0a08]/85 backdrop-blur-md flex items-center justify-center p-4 overflow-y-auto animate-fade-in",children:n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/40 rounded-sm max-w-2xl w-full p-6 md:p-8 space-y-6 shadow-2xl relative my-8",children:[n.jsx("button",{onClick:()=>Q(!1),className:"absolute top-4 right-4 text-[#a09080] hover:text-[#f0ead6] p-1.5 transition-colors cursor-pointer",children:n.jsx(li,{className:"w-5 h-5"})}),n.jsxs("div",{className:"flex items-center gap-3 border-b border-[#c9a84c]/20 pb-4",children:[n.jsx("div",{className:"w-10 h-10 rounded-full border border-[#c9a84c]/30 flex items-center justify-center text-[#c9a84c] bg-[#1a1814]",children:G?n.jsx(zo,{className:"w-5 h-5"}):n.jsx(nh,{className:"w-5 h-5"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xl font-playfair font-normal text-[#f0ead6]",children:G?`Edit "${G.name}"`:"Create New Pasta Formulation"}),n.jsx("p",{className:"text-xs text-[#a09080] font-mono-jetbrains",children:G?"Modify dish specifications, pricing, and pairings.":"Add a new fresh pasta creation directly to the active laboratory menu."})]})]}),n.jsxs("form",{onSubmit:F,className:"space-y-4 font-mono-jetbrains text-xs",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] uppercase tracking-wider mb-1.5 font-bold text-[11px]",children:"Pasta Dish Name *"}),n.jsx("input",{type:"text",required:!0,placeholder:"e.g. Saffron Tagliolini with Crab",value:x.name,onChange:r=>C({...x,name:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#c9a84c] uppercase tracking-wider mb-1.5 font-bold text-[11px]",children:"Price ($ AUD) *"}),n.jsx("input",{type:"number",step:"0.01",required:!0,placeholder:"32.00",value:x.price,onChange:r=>C({...x,price:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Portion Weight"}),n.jsx("input",{type:"text",placeholder:"500g",value:x.weight,onChange:r=>C({...x,weight:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Servings"}),n.jsx("input",{type:"text",placeholder:"2",value:x.servings,onChange:r=>C({...x,servings:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Category"}),n.jsxs("select",{value:x.category,onChange:r=>C({...x,category:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none",children:[n.jsx("option",{value:"Fresh Hand-Cut",children:"Fresh Hand-Cut"}),n.jsx("option",{value:"Slow-Dried",children:"Slow-Dried"}),n.jsx("option",{value:"Stuffed / Ravioli",children:"Stuffed / Ravioli"}),n.jsx("option",{value:"Specialty",children:"Specialty"})]})]})]}),n.jsxs("div",{className:"bg-[#0a0a08] border border-[#c9a84c]/30 rounded p-4 space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-[#c9a84c] border-b border-[#c9a84c]/20 pb-2",children:[n.jsx(Rh,{className:"w-4 h-4 text-[#c9a84c]"}),n.jsx("span",{className:"font-bold text-[11px] uppercase tracking-wider",children:"Kitchen Stock & Low Stock Threshold"})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-[#f0ead6] uppercase tracking-wider mb-1 font-bold text-[10px] flex items-center justify-between",children:[n.jsx("span",{children:"Current Stock Quantity *"}),n.jsx("span",{className:"text-[#a09080] font-normal normal-case text-[10px]",children:"(units in kitchen)"})]}),n.jsx("input",{type:"number",min:"0",required:!0,placeholder:"10",value:x.stockCount,onChange:r=>C({...x,stockCount:r.target.value}),className:"w-full bg-[#111110] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-amber-400 uppercase tracking-wider mb-1 font-bold text-[10px] flex items-center gap-1.5",children:[n.jsx(as,{className:"w-3.5 h-3.5 text-amber-400 shrink-0"}),n.jsx("span",{children:"Low Stock Alert Threshold *"})]}),n.jsx("input",{type:"number",min:"0",required:!0,placeholder:"3",value:x.lowStockThreshold,onChange:r=>C({...x,lowStockThreshold:r.target.value}),className:"w-full bg-[#111110] border border-amber-500/40 rounded px-3 py-2 text-[#f0ead6] focus:border-amber-400 focus:outline-none"})]})]}),n.jsxs("p",{className:"text-[10px] text-[#a09080] leading-relaxed",children:["When current stock quantity drops to or below ",n.jsxs("strong",{className:"text-amber-400 font-mono-jetbrains",children:[x.lowStockThreshold||"3"," units"]}),", a ",n.jsx("span",{className:"text-amber-300 font-bold uppercase",children:'"LOW STOCK"'})," warning badge will be displayed across the Kitchen Admin Portal."]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Description & Flavor Profile"}),n.jsx("textarea",{rows:2,placeholder:"Describe the texture, wheat origin, egg ratio, and culinary experience...",value:x.description,onChange:r=>C({...x,description:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Ingredients (comma separated)"}),n.jsx("input",{type:"text",placeholder:"Semolina, Free-Range Egg Yolk, Sea Salt",value:x.ingredients,onChange:r=>C({...x,ingredients:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Chef's Preparation Tips"}),n.jsx("input",{type:"text",placeholder:"Boil in salted water 3 mins, finish in pan with butter",value:x.chefsTips,onChange:r=>C({...x,chefsTips:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Recommended Sauce Pairing"}),n.jsx("input",{type:"text",placeholder:"Brown Butter & Sage Emulsion",value:x.pairingSauce,onChange:r=>C({...x,pairingSauce:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[#a09080] uppercase tracking-wider mb-1 text-[10px]",children:"Recommended Wine Pairing"}),n.jsx("input",{type:"text",placeholder:"Barossa Valley Shiraz or Clare Valley Riesling",value:x.pairingWine,onChange:r=>C({...x,pairingWine:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 rounded px-3 py-2 text-[#f0ead6] focus:border-[#c9a84c] focus:outline-none"})]})]}),n.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-[#c9a84c]/20",children:[n.jsx("button",{type:"button",onClick:()=>Q(!1),className:"px-4 py-2 border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#a09080] hover:text-[#f0ead6] rounded transition-colors cursor-pointer",children:"CANCEL"}),n.jsx("button",{type:"submit",className:"px-6 py-2 bg-[#c9a84c] text-[#0a0a08] font-bold rounded hover:bg-[#d4b665] transition-colors cursor-pointer shadow-lg uppercase tracking-wider",children:G?"UPDATE FORMULATION":"SAVE NEW DISH"})]})]})]})}):null,wa=()=>Pe?n.jsx("div",{className:"fixed inset-0 z-[100] bg-black/85 backdrop-blur-md flex items-center justify-center p-4 animate-fade-in",children:n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/40 rounded-sm p-6 md:p-8 max-w-md w-full shadow-2xl relative",children:[n.jsx("button",{onClick:()=>He(!1),className:"absolute top-4 right-4 text-[#a09080] hover:text-[#f0ead6] transition-colors cursor-pointer",children:n.jsx(li,{className:"w-5 h-5"})}),n.jsxs("div",{className:"text-center space-y-3 mb-6",children:[n.jsx("div",{className:"w-12 h-12 bg-[#c9a84c]/10 border border-[#c9a84c]/30 rounded-full flex items-center justify-center mx-auto text-[#c9a84c]",children:n.jsx(mn,{className:"w-6 h-6"})}),n.jsx("h3",{className:"text-2xl font-playfair font-semibold text-[#f0ead6]",children:"Staff Verification"}),n.jsx("p",{className:"text-xs text-[#a09080] font-mono-jetbrains",children:"Restricted Area. Enter the Kitchen Staff PIN to manage stock, recipes & menu items."})]}),n.jsxs("form",{onSubmit:ut,className:"space-y-5",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-[11px] uppercase font-mono-jetbrains tracking-wider text-[#a09080] mb-2 text-center",children:["Enter Kitchen PIN (Default: ",n.jsx("strong",{className:"text-[#c9a84c]",children:"1234"}),")"]}),n.jsx("input",{type:"password",maxLength:4,autoFocus:!0,value:rt,onChange:r=>{Ge(r.target.value),Je("")},placeholder:"••••",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/40 rounded px-4 py-3 text-center text-2xl font-mono-jetbrains text-[#c9a84c] tracking-[0.5em] focus:border-[#c9a84c] focus:outline-none"}),Ve&&n.jsxs("p",{className:"text-xs text-red-400 mt-2 text-center font-mono-jetbrains flex items-center justify-center gap-1",children:[n.jsx(as,{className:"w-3.5 h-3.5 shrink-0"}),n.jsx("span",{children:Ve})]})]}),n.jsxs("div",{className:"flex gap-3 pt-2",children:[n.jsx("button",{type:"button",onClick:()=>He(!1),className:"flex-1 py-2.5 border border-[#c9a84c]/20 text-[#a09080] hover:text-[#f0ead6] text-xs font-mono-jetbrains uppercase tracking-wider rounded cursor-pointer",children:"Cancel"}),n.jsxs("button",{type:"submit",className:"flex-1 py-2.5 bg-[#c9a84c] text-[#0a0a08] font-bold text-xs font-mono-jetbrains uppercase tracking-wider rounded hover:bg-[#d4b665] transition-all cursor-pointer shadow-lg shadow-[#c9a84c]/20 flex items-center justify-center gap-1.5",children:[n.jsx(mn,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Verify PIN"})]})]})]})]})}):null;return n.jsxs("div",{className:"min-h-screen bg-[#0a0a08] text-[#f0ead6] font-cormorant selection:bg-[#c9a84c] selection:text-[#0a0a08] flex flex-col justify-between",children:[n.jsxs("nav",{id:"app-navigation",className:"print:hidden sticky top-0 z-50 bg-[#0a0a08]/95 backdrop-blur-md border-b border-[#c9a84c]/20 px-6 py-4 md:px-12 flex justify-between items-center transition-all",children:[n.jsx("div",{id:"nav-logo",className:"flex items-center gap-2 cursor-pointer hover:opacity-90 select-none group",onClick:()=>O("home"),children:n.jsx("span",{className:"text-xl md:text-2xl font-playfair font-semibold tracking-wider text-[#f0ead6] group-hover:text-[#c9a84c] transition-colors",children:"THE PASTA LAB"})}),n.jsxs("div",{id:"nav-menu-links",className:"hidden md:flex gap-8 items-center text-[13px] md:text-sm tracking-[0.2em] font-bold text-white",children:[n.jsx("button",{id:"nav-link-home",onClick:()=>O("home"),className:`hover:text-[#ffd766] transition-colors cursor-pointer ${E==="home"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"HOME"}),n.jsx("button",{id:"nav-link-menu",onClick:()=>O("menu"),className:`hover:text-[#ffd766] transition-colors cursor-pointer ${E==="menu"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"MENU"}),n.jsx("button",{id:"nav-link-wishlist",onClick:()=>O("wishlist"),className:`hover:text-[#ffd766] transition-colors cursor-pointer ${E==="wishlist"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"WISHLIST"}),n.jsx("button",{id:"nav-link-reviews",onClick:()=>O("reviews"),className:`hover:text-[#ffd766] transition-colors cursor-pointer ${E==="reviews"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"REVIEWS"}),n.jsx("button",{id:"nav-link-about",onClick:()=>O("about"),className:`hover:text-[#ffd766] transition-colors cursor-pointer ${E==="about"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"ABOUT"}),n.jsx("button",{id:"nav-link-history",onClick:()=>{O("orders-history"),Kl()},className:`hover:text-[#ffd766] transition-colors cursor-pointer flex items-center gap-1 ${E==="orders-history"?"text-[#ffd766] underline font-extrabold":"text-white"}`,children:"HISTORY"})]}),n.jsxs("div",{id:"nav-cart-trigger",className:"flex items-center gap-3",children:[n.jsxs("button",{id:"voice-concierge-btn",onClick:()=>za(!0),className:"flex items-center gap-2 px-3.5 py-2 border border-[#c9a84c]/40 hover:border-[#c9a84c] bg-gradient-to-r from-[#c9a84c]/20 to-[#96762c]/10 text-[#f0ead6] hover:text-[#c9a84c] transition-all cursor-pointer rounded-sm shadow-sm group",title:"Talk to Nonna Rosa (AI Voice Concierge)",children:[n.jsx(jc,{className:"w-4 h-4 text-[#c9a84c] group-hover:scale-110 transition-transform animate-pulse"}),n.jsx("span",{className:"text-[11px] font-mono-jetbrains tracking-wider hidden lg:inline uppercase font-bold text-[#c9a84c]",children:"VOICE AGENT"})]}),n.jsxs("div",{id:"pasta-credits-display",className:"flex items-center gap-1.5 px-3 py-2 border border-[#c9a84c]/20 bg-[#111110] text-[#c9a84c] rounded-sm text-[11px] font-mono-jetbrains tracking-wider select-none hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 transition-all cursor-default",title:"Pasta Credits (1 credit earned per $1 spent. Convert your passion into master chef status!)",children:[n.jsx(hc,{className:"w-4 h-4 text-[#c9a84c] animate-pulse"}),n.jsx("span",{className:"text-[#a09080] font-light hidden xs:inline",children:"CREDITS:"}),n.jsx("span",{className:"font-bold",children:et})]}),n.jsxs("button",{id:"wishlist-btn",onClick:()=>O("wishlist"),className:"flex items-center gap-2 px-4 py-2 border border-[#c9a84c]/20 hover:border-[#c9a84c] bg-[#111110] text-[#c9a84c] transition-all cursor-pointer relative group rounded-sm",title:"View Wishlist",children:[n.jsx(pc,{className:`w-4 h-4 transition-all ${ue.length>0?"fill-[#c9a84c] text-[#c9a84c]":"text-[#c9a84c]/60"}`}),n.jsx("span",{className:"text-[12px] font-mono-jetbrains",children:ue.length}),ue.length>0&&n.jsx("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-[#c9a84c] rounded-full animate-ping"})]}),n.jsxs("button",{id:"cart-btn",onClick:()=>O("order"),className:"flex items-center gap-2 px-4 py-2 border border-[#c9a84c]/20 hover:border-[#c9a84c] bg-[#111110] text-[#c9a84c] transition-all cursor-pointer relative group rounded-sm",children:[n.jsx(ai,{className:"w-4 h-4"}),n.jsx("span",{className:"text-[12px] font-mono-jetbrains",children:B.length}),B.length>0&&n.jsx("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-[#c9a84c] rounded-full animate-ping"})]})]})]}),n.jsxs("div",{id:"mobile-navigation",className:"print:hidden md:hidden flex justify-around items-center border-b border-[#c9a84c]/10 bg-[#0d0d0c] py-2.5 text-[11px] tracking-[0.15em] text-[#a09080]",children:[n.jsx("button",{onClick:()=>O("home"),className:`py-1 ${E==="home"?"text-[#c9a84c] border-b border-[#c9a84c]":""}`,children:"HOME"}),n.jsx("button",{onClick:()=>O("menu"),className:`py-1 ${E==="menu"?"text-[#c9a84c] border-b border-[#c9a84c]":""}`,children:"MENU"}),n.jsxs("button",{onClick:()=>za(!0),className:"py-1 text-[#c9a84c] font-bold flex items-center gap-1",children:[n.jsx(jc,{className:"w-3 h-3 animate-pulse"})," VOICE"]}),n.jsxs("button",{onClick:()=>O("wishlist"),className:`py-1 ${E==="wishlist"?"text-[#c9a84c] border-b border-[#c9a84c]":""}`,children:["WISH (",ue.length,")"]}),n.jsx("button",{onClick:()=>O("reviews"),className:`py-1 ${E==="reviews"?"text-[#c9a84c] border-b border-[#c9a84c]":""}`,children:"REVIEWS"}),n.jsx("button",{onClick:()=>{O("orders-history"),Kl()},className:`py-1 ${E==="orders-history"?"text-[#c9a84c] border-b border-[#c9a84c]":""}`,children:"HISTORY"})]}),n.jsxs("main",{className:"flex-grow",children:[E==="home"&&n.jsxs("div",{id:"view-home",className:"max-w-7xl mx-auto px-6 py-12 md:py-20 space-y-24",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[n.jsxs("div",{className:"space-y-8 animate-fade-in",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("span",{className:"text-[12px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"PREMIUM CANBERRA CRAFT PASTA"}),n.jsxs("h1",{className:"text-5xl md:text-7xl font-playfair font-semibold italic leading-tight text-[#f0ead6]",children:["Precision.",n.jsx("br",{}),"Pasta.",n.jsx("br",{}),"Pleasure."]})]}),n.jsx("p",{className:"text-lg md:text-xl text-[#a09080] leading-relaxed max-w-lg font-light",children:"Hand-rolled at dawn. Vacuum-sealed by eleven. Plated in exactly eight minutes. Culinary standards from Italy, freshly sealed and delivered to your doorstep in Canberra, ACT."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 pt-4",children:[n.jsxs("button",{onClick:()=>O("menu"),className:"px-8 py-4 bg-[#c9a84c] text-[#0a0a08] text-sm tracking-[0.2em] font-semibold font-playfair hover:bg-[#d4b665] transition-all flex items-center justify-center gap-3 cursor-pointer rounded-sm shadow-lg shadow-[#c9a84c]/10 hover:shadow-[#c9a84c]/20",children:["ORDER FRESH PASTA ",n.jsx(km,{className:"w-4 h-4"})]}),n.jsx("button",{onClick:()=>O("reviews"),className:"px-8 py-4 bg-transparent border border-[#c9a84c]/30 text-[#f0ead6] hover:border-[#c9a84c] text-sm tracking-[0.2em] font-semibold font-playfair hover:bg-[#c9a84c]/5 transition-all cursor-pointer rounded-sm",children:"CUSTOMER REVIEWS"})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 pt-10 border-t border-[#c9a84c]/10 text-center md:text-left",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-3xl font-playfair text-[#c9a84c] font-semibold",children:"100%"}),n.jsx("div",{className:"text-[10px] tracking-[0.2em] text-[#a09080] uppercase",children:"Fresh Semolina"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-3xl font-playfair text-[#c9a84c] font-semibold",children:"8 Min"}),n.jsx("div",{className:"text-[10px] tracking-[0.2em] text-[#a09080] uppercase",children:"Ready-to-serve"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-3xl font-playfair text-[#c9a84c] font-semibold",children:"4.9 ★"}),n.jsx("div",{className:"text-[10px] tracking-[0.2em] text-[#a09080] uppercase",children:"Customer Rating"})]})]}),n.jsxs("div",{className:"border border-[#c9a84c]/20 bg-[#0e0e0c]/60 p-4 rounded-sm flex items-start gap-3 max-w-lg animate-fade-in",children:[n.jsx("div",{className:"w-8 h-8 rounded-full border border-[#c9a84c]/20 flex items-center justify-center text-[#c9a84c] bg-[#111110] shrink-0 mt-0.5",children:n.jsx(ls,{className:"w-4 h-4 text-[#c9a84c]"})}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("span",{className:"text-[10px] tracking-widest text-[#c9a84c] uppercase font-bold block",children:"DIETARY OPTIONS AVAILABLE"}),n.jsxs("p",{className:"text-xs text-[#a09080] font-light leading-relaxed",children:["We offer hand-crafted ",n.jsx("span",{className:"text-[#f0ead6] font-medium",children:"Gluten-Free Pasta"})," alternative for all formulations for an additional ",n.jsx("span",{className:"text-[#c9a84c] font-semibold",children:"$2 AUD per serve"}),". Simply toggle the dietary preference on your selected items when building your order."]})]})]})]}),n.jsxs("div",{className:"relative group",children:[n.jsx("div",{className:"absolute inset-0 bg-[#c9a84c]/10 rounded-sm filter blur-xl opacity-30 group-hover:opacity-45 transition-all"}),n.jsx("div",{className:`relative border bg-[#0e0e0c] p-8 md:p-12 text-center rounded-sm space-y-8 transition-all ${de(fn[0].id)?"border-red-900/40 bg-[#0d0909]":"border-[#c9a84c]/20"}`,children:(()=>{const r=L[0]||fn[0],S=de(r.id);return n.jsxs(n.Fragment,{children:[S&&n.jsxs("div",{className:"absolute top-4 right-4 bg-[#8b1e13] text-[#f0ead6] border border-[#e26257]/60 font-mono-jetbrains font-bold text-[10px] tracking-[0.2em] px-3 py-1 uppercase rounded-sm shadow-lg flex items-center gap-1.5 z-10",children:[n.jsx(ha,{className:"w-3.5 h-3.5 text-[#f0ead6]"}),n.jsx("span",{children:"SOLD OUT"})]}),n.jsx("div",{className:"w-16 h-16 mx-auto rounded-full border border-[#c9a84c]/30 flex items-center justify-center text-[#c9a84c] bg-[#111110]",children:n.jsx(ls,{className:"w-6 h-6 animate-pulse"})}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-2xl font-playfair font-normal italic",children:"This Morning's Formulation"}),n.jsx("p",{className:"text-[13px] tracking-[0.1em] text-[#a09080] uppercase",children:r.name})]}),n.jsx("div",{className:"border-y border-[#c9a84c]/10 py-4 max-w-xs mx-auto text-sm text-[#a09080]",children:r.tagline||r.description}),n.jsxs("div",{className:"flex justify-between items-center max-w-xs mx-auto text-[13px] tracking-[0.1em]",children:[n.jsxs("span",{className:"text-[#a09080]",children:["Serves ",r.servings," • ",r.weight]}),n.jsxs("span",{className:"text-[#c9a84c] font-semibold",children:["$",r.price," AUD"]})]}),n.jsxs("div",{className:"flex gap-2.5",children:[S?n.jsxs("button",{disabled:!0,className:"flex-grow py-3 bg-[#1a1414] border border-[#3d2424] text-[#805050] text-xs tracking-[0.2em] font-bold cursor-not-allowed rounded-sm uppercase font-playfair flex items-center justify-center gap-1.5",children:[n.jsx(ha,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"SOLD OUT"})]}):n.jsx("button",{onClick:()=>fl(r),className:"flex-grow py-3 bg-[#161614] border border-[#c9a84c]/40 hover:border-[#c9a84c] hover:bg-[#c9a84c] hover:text-[#0a0a08] transition-all text-xs tracking-[0.2em] uppercase font-bold cursor-pointer rounded-sm",children:"ADD TO ORDER"}),n.jsx("button",{onClick:()=>T(r.id),className:"px-4 py-3 border border-[#c9a84c]/30 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[#c9a84c] rounded-sm transition-all cursor-pointer flex items-center justify-center",title:ue.includes(r.id)?"Remove from saved formulations":"Save formulation for later",children:n.jsx(pc,{className:`w-4 h-4 transition-all ${ue.includes(r.id)?"fill-[#c9a84c]":""}`})})]})]})})()})]})]}),n.jsxs("div",{id:"home-order-tracker",className:"border-t border-[#c9a84c]/10 pt-16 animate-fade-in",children:[n.jsxs("div",{className:"text-center space-y-3 mb-10",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"REAL-TIME MOLECULAR LOGISTICS"}),n.jsx("h2",{className:"text-3xl md:text-4xl font-playfair font-normal",children:"Track Your Pasta Preparation"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-3"}),n.jsx("p",{className:"text-xs md:text-sm text-[#a09080] max-w-lg mx-auto font-light",children:"Input your unique order reference code below to interface with our laboratory preparation progress and shipping status."})]}),It()]})]}),E==="menu"&&n.jsxs("div",{id:"view-menu",className:"max-w-7xl mx-auto px-6 py-12",children:[n.jsxs("div",{className:"text-center space-y-4 mb-12",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"EXPERIMENT WITH TASTE"}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Our Vacuum-Sealed Lab Formulation"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"}),n.jsx("p",{className:"text-sm md:text-base text-[#a09080] max-w-xl mx-auto font-light",children:"Every formulation contains perfectly portioned fresh pasta, fresh cheese or sauce reductions, and precise cooking directions."})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4 mb-8 bg-[#111110] p-4 border border-[#c9a84c]/20 rounded-sm",children:[n.jsxs("div",{className:"text-xs text-[#a09080] font-mono-jetbrains flex items-center gap-2",children:[n.jsx("span",{className:"w-2 h-2 rounded-full bg-[#c9a84c] animate-pulse"}),n.jsxs("span",{children:["Active Menu (",L.length," Formulations)"]}),J.length>0&&n.jsxs("span",{className:"text-red-400 font-bold bg-red-950/80 px-2 py-0.5 rounded border border-red-500/30",children:[J.length," SOLD OUT"]})]}),n.jsxs("div",{className:"flex gap-2.5",children:[n.jsxs("button",{onClick:()=>Ie(!le),className:`px-3.5 py-2 rounded text-xs font-mono-jetbrains tracking-wider uppercase border transition-all cursor-pointer flex items-center gap-2 ${le?"bg-[#c9a84c] text-[#0a0a08] font-bold border-[#c9a84c] shadow-lg shadow-[#c9a84c]/20":"bg-[#0a0a08] text-[#a09080] border-[#c9a84c]/30 hover:border-[#c9a84c] hover:text-[#f0ead6]"}`,title:"Toggle quick stock controls",children:[n.jsx(gc,{className:"w-3.5 h-3.5"}),n.jsxs("span",{children:["QUICK STOCK TOGGLES: ",le?"ON":"OFF"]})]}),n.jsxs("button",{onClick:()=>O("admin"),className:"px-3.5 py-2 bg-[#111110] text-[#c9a84c] border border-[#c9a84c]/40 hover:border-[#c9a84c] hover:bg-[#c9a84c]/10 text-xs rounded font-mono-jetbrains tracking-wider uppercase transition-all cursor-pointer flex items-center gap-1.5",title:"Open full Kitchen Admin Portal to add, edit or remove pasta dishes",children:[n.jsx(Vh,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"KITCHEN ADMIN PORTAL"})]})]})]}),le&&n.jsxs("div",{className:"bg-[#141210] border border-[#c9a84c]/40 p-5 rounded-sm mb-8 flex flex-col md:flex-row justify-between items-center gap-4 text-xs font-mono-jetbrains shadow-xl",children:[n.jsxs("div",{className:"flex items-center gap-3 text-[#c9a84c]",children:[n.jsx(gc,{className:"w-5 h-5 shrink-0 text-[#c9a84c]"}),n.jsxs("div",{children:[n.jsx("strong",{className:"uppercase tracking-wider block font-bold text-sm",children:"Kitchen Staff Quick Controls"}),n.jsxs("span",{className:"text-[#a09080] text-[11px] font-normal leading-relaxed block mt-0.5",children:['Toggle dishes between "In Stock" and "Sold Out". To add new pasta dishes or delete items, visit the ',n.jsx("button",{onClick:()=>O("admin"),className:"text-[#c9a84c] underline font-bold",children:"Kitchen Admin Portal"}),"."]})]})]}),n.jsxs("div",{className:"flex gap-2 shrink-0",children:[n.jsxs("button",{onClick:D,className:"px-3.5 py-2 bg-[#c9a84c] text-[#0a0a08] text-[11px] font-bold rounded hover:bg-[#d4b665] transition-colors cursor-pointer uppercase tracking-wider flex items-center gap-1",children:[n.jsx(Ro,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"ADD DISH"})]}),n.jsx("button",{onClick:()=>{Y([]),localStorage.setItem("pasta_sold_out_ids",JSON.stringify([]))},className:"px-3.5 py-2 bg-[#1d1616] border border-red-400/40 text-red-300 hover:bg-red-400/20 text-[11px] rounded transition-colors cursor-pointer font-bold uppercase tracking-wider",children:"RESTOCK ALL"})]})]}),n.jsx("div",{id:"menu-items-grid",className:"grid md:grid-cols-2 lg:grid-cols-2 gap-8",children:L.map(r=>{var P,ee,oe,ye;const S=al[r.id]||{total:0,avg:5},M=Sc===r.id,z=de(r.id);return n.jsxs("div",{id:`product-card-${r.id}`,className:`border bg-[#0e0e0c] p-6 md:p-8 flex flex-col justify-between transition-all duration-300 relative group rounded-sm ${z?"border-red-900/40 bg-[#0e0a0a]":"border-[#c9a84c]/10 hover:border-[#c9a84c]/40"}`,children:[z?n.jsxs("div",{className:"absolute top-4 right-4 bg-[#8b1e13] text-[#f0ead6] border border-[#e26257]/60 font-mono-jetbrains font-bold text-[10px] tracking-[0.2em] px-3 py-1 uppercase rounded-sm shadow-lg flex items-center gap-1.5 z-10",children:[n.jsx(ha,{className:"w-3.5 h-3.5 text-[#f0ead6]"}),n.jsx("span",{children:"SOLD OUT"})]}):y(r)?n.jsxs("div",{className:"absolute top-4 right-4 bg-amber-950/90 text-amber-200 border border-amber-500/60 font-mono-jetbrains font-bold text-[10px] tracking-[0.15em] px-3 py-1 uppercase rounded-sm shadow-lg flex items-center gap-1.5 z-10 animate-pulse",children:[n.jsx(as,{className:"w-3.5 h-3.5 text-amber-400 shrink-0"}),n.jsxs("span",{children:["LOW STOCK (",V(r)," LEFT)"]})]}):null,n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-start mb-4 pr-24",children:[n.jsxs("span",{className:"text-sm tracking-[0.15em] text-[#ffffff] font-mono-jetbrains font-bold uppercase",children:[r.weight," • SERVES ",r.servings]}),n.jsxs("div",{className:"flex items-center gap-1.5 bg-[#1a1a16] px-3 py-1.5 rounded border border-[#c9a84c]/40",children:[n.jsx(Ea,{className:"w-4 h-4 text-[#ffd766] fill-[#ffd766]"}),n.jsx("span",{className:"text-sm font-mono-jetbrains text-[#ffd766] font-bold",children:S.avg.toFixed(1)}),n.jsxs("span",{className:"text-xs text-[#ffffff] font-medium",children:["(",S.total,")"]})]})]}),n.jsxs("div",{className:"flex justify-between items-baseline mb-2 gap-3",children:[n.jsx("h3",{className:`text-2xl md:text-3xl font-playfair font-bold transition-colors ${z?"text-[#e4d8c8] line-through decoration-red-500/80":"text-white group-hover:text-[#ffd766]"}`,children:r.name}),n.jsxs("span",{className:"text-2xl md:text-3xl font-playfair text-[#ffd766] font-extrabold shrink-0",children:["$",r.price]})]}),n.jsx("p",{className:"text-sm sm:text-base tracking-[0.1em] text-[#ffd766] uppercase font-bold italic mb-4",children:r.tagline}),n.jsx("p",{className:"text-base md:text-lg text-white leading-relaxed font-normal mb-6",children:r.description})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-[#c9a84c]/20",children:[(le||Ce)&&n.jsxs("div",{className:"bg-[#141412] border border-[#c9a84c]/30 p-2.5 rounded text-xs font-mono-jetbrains flex flex-wrap justify-between items-center gap-2 mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[#a09080] text-[11px]",children:"Staff Controls:"}),n.jsxs("span",{className:"text-[#c9a84c] text-[10px] font-bold",children:["Qty: ",V(r)]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{onClick:()=>Z(r),className:"px-2.5 py-1 bg-[#1a1a18] border border-[#c9a84c]/40 hover:border-[#c9a84c] text-[#c9a84c] rounded text-[10px] font-bold uppercase transition-all flex items-center gap-1 cursor-pointer",title:"Edit price, formulation name, ingredients or stock",children:[n.jsx(zo,{className:"w-3 h-3"}),n.jsx("span",{children:"Edit Dish"})]}),n.jsx("button",{onClick:()=>vt(r.id),className:`px-2.5 py-1 rounded text-[10px] font-bold uppercase transition-all flex items-center gap-1 cursor-pointer ${z?"bg-emerald-950/90 text-emerald-300 border border-emerald-500/50 hover:bg-emerald-900/90":"bg-red-950/90 text-red-300 border border-red-500/50 hover:bg-red-900/90"}`,children:z?n.jsxs(n.Fragment,{children:[n.jsx(Pa,{className:"w-3 h-3 text-emerald-400"}),n.jsx("span",{children:"In Stock"})]}):n.jsxs(n.Fragment,{children:[n.jsx(ha,{className:"w-3 h-3 text-red-400"}),n.jsx("span",{children:"Sold Out"})]})})]})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2.5",children:[n.jsxs("div",{className:"flex flex-grow gap-2",children:[z?n.jsxs("button",{disabled:!0,className:"flex-grow py-3.5 bg-[#1a1414] border border-[#3d2424] text-red-300 text-sm tracking-[0.15em] font-bold cursor-not-allowed rounded-sm uppercase font-playfair flex items-center justify-center gap-1.5",title:"This pasta is currently sold out and cannot be ordered",children:[n.jsx(ha,{className:"w-4 h-4"}),n.jsx("span",{children:"SOLD OUT"})]}):n.jsx("button",{onClick:()=>fl(r),className:"flex-grow py-3.5 bg-[#ffd766] text-[#0a0a08] text-sm tracking-[0.15em] font-extrabold hover:bg-[#ffe07d] transition-all cursor-pointer rounded-sm uppercase font-playfair shadow-md",children:"ADD TO ORDER"}),n.jsx("button",{onClick:()=>T(r.id),className:"px-3.5 py-3.5 border border-[#c9a84c]/30 hover:border-[#c9a84c] hover:bg-[#c9a84c]/10 text-[#ffd766] rounded-sm transition-all cursor-pointer flex items-center justify-center shrink-0",title:ue.includes(r.id)?"Remove from saved formulations":"Save formulation for later",children:n.jsx(pc,{className:`w-5 h-5 transition-all ${ue.includes(r.id)?"fill-[#ffd766]":""}`})})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-1.5 shrink-0 sm:w-[270px]",children:[n.jsxs("button",{onClick:()=>{ba(nl===r.id?null:r.id),Bl(null),Ht(null)},className:`px-1 py-3 border transition-all text-xs tracking-wider font-bold flex flex-col sm:flex-row items-center justify-center gap-1 cursor-pointer rounded-sm ${nl===r.id?"border-[#ffd766] bg-[#c9a84c]/20 text-[#ffd766]":"border-[#c9a84c]/40 text-[#ffd766] hover:border-[#ffd766] hover:bg-[#c9a84c]/10"}`,title:"Chef's Laboratory Tips",children:[n.jsx(ls,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:"TIPS"})]}),n.jsxs("button",{onClick:()=>{Ht(sl===r.id?null:r.id),ba(null),Bl(null)},className:`px-1 py-3 border transition-all text-xs tracking-wider font-bold flex flex-col sm:flex-row items-center justify-center gap-1 cursor-pointer rounded-sm ${sl===r.id?"border-[#ffd766] bg-[#c9a84c]/20 text-[#ffd766]":"border-[#c9a84c]/40 text-[#ffd766] hover:border-[#ffd766] hover:bg-[#c9a84c]/10"}`,title:"Sommelier & Food Pairings",children:[n.jsx(yc,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:"PAIRING"})]}),n.jsxs("button",{onClick:()=>{Bl(M?null:r.id),ba(null),Ht(null)},className:`px-1 py-3 border transition-all text-xs tracking-wider font-bold flex flex-col sm:flex-row items-center justify-center gap-1 cursor-pointer rounded-sm ${M?"border-[#ffd766] bg-[#c9a84c]/20 text-[#ffd766]":"border-[#c9a84c]/40 text-[#ffd766] hover:border-[#ffd766] hover:bg-[#c9a84c]/10"}`,title:"Product Reviews",children:[n.jsx(wh,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:"REVIEWS"})]})]})]}),n.jsxs("button",{onClick:()=>ra(r),className:"w-full py-2.5 border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 hover:bg-[#c9a84c]/10 text-white hover:text-[#ffd766] text-xs font-bold tracking-[0.15em] font-mono-jetbrains uppercase transition-all rounded-sm flex items-center justify-center gap-1.5 cursor-pointer",title:"View nutritional facts for the pasta portion",children:[n.jsx(Eo,{className:"w-4 h-4 text-[#ffd766]"}),n.jsx("span",{children:"NUTRITIONAL PROFILE"})]}),nl===r.id&&n.jsxs("div",{className:"mt-4 pt-4 border-t border-[#c9a84c]/10 space-y-4 text-left animate-slide-down",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("h4",{className:"text-sm font-playfair text-[#c9a84c] font-semibold tracking-wider flex items-center gap-1.5",children:[n.jsx(ls,{className:"w-4 h-4 animate-pulse"}),n.jsx("span",{children:"CHEF'S LABORATORY TIPS"})]}),n.jsx("span",{className:"text-[10px] font-mono-jetbrains text-[#a09080] uppercase tracking-wider bg-[#161614] px-2 py-0.5 rounded border border-[#c9a84c]/10",children:"Precision Prep"})]}),n.jsx("div",{className:"space-y-3 bg-[#111110] p-4 border border-[#c9a84c]/15 rounded-sm",children:r.chefsTips&&r.chefsTips.map((te,ge)=>{const _e=te.indexOf(": "),Pt=_e!==-1?te.slice(0,_e):`Tip ${ge+1}`,Mt=_e!==-1?te.slice(_e+2):te;return n.jsxs("div",{className:"flex gap-3 items-start",children:[n.jsxs("div",{className:"w-5 h-5 rounded-full border border-[#c9a84c]/30 text-[#c9a84c] text-[10px] font-mono-jetbrains flex items-center justify-center shrink-0 mt-0.5 bg-[#0a0a08]",children:["0",ge+1]}),n.jsxs("div",{className:"text-sm leading-relaxed",children:[n.jsx("strong",{className:"text-[#f0ead6] font-playfair font-medium block mb-0.5",children:Pt}),n.jsx("span",{className:"text-[#e8e0d0] font-normal text-sm",children:Mt})]})]},ge)})}),n.jsxs("div",{className:"bg-[#1a2810]/30 border border-[#7ab860]/20 p-3 rounded-sm flex items-start gap-2.5",children:[n.jsx(Mo,{className:"w-4 h-4 text-[#7ab860] shrink-0 mt-0.5"}),n.jsx("p",{className:"text-[11px] text-[#7ab860] font-light leading-relaxed",children:"Standard Calibration: Active boiling time of pasta is calibrated to precisely 8 minutes under normal atmospheric pressures in Canberra, ACT. Adjust by ±30 seconds for elevation or desired firmness."})]})]}),sl===r.id&&n.jsxs("div",{id:`product-pairings-${r.id}`,className:"mt-4 pt-4 border-t border-[#c9a84c]/10 space-y-4 text-left animate-slide-down",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("h4",{className:"text-sm font-playfair text-[#c9a84c] font-semibold tracking-wider flex items-center gap-1.5",children:[n.jsx(yc,{className:"w-4 h-4 text-[#c9a84c] animate-pulse"}),n.jsx("span",{children:"SOMMELIER & PANTRY PAIRINGS"})]}),n.jsx("span",{className:"text-[10px] font-mono-jetbrains text-[#a09080] uppercase tracking-wider bg-[#161614] px-2 py-0.5 rounded border border-[#c9a84c]/10",children:"Taste Harmony"})]}),n.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[n.jsx("div",{className:"bg-[#111110] p-4 border border-[#c9a84c]/15 rounded-sm flex flex-col justify-between",children:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2 text-[#c9a84c]",children:[n.jsx(yc,{className:"w-3.5 h-3.5 shrink-0"}),n.jsx("span",{className:"text-[9px] tracking-[0.2em] uppercase font-bold",children:"Recommended Beverage"})]}),n.jsx("h5",{className:"text-base font-playfair text-[#f0ead6] font-semibold mb-1",children:(P=r.pairing)==null?void 0:P.beverage}),n.jsx("p",{className:"text-sm text-[#e8e0d0] font-normal leading-relaxed",children:(ee=r.pairing)==null?void 0:ee.beverageExplanation})]})}),n.jsx("div",{className:"bg-[#111110] p-4 border border-[#c9a84c]/15 rounded-sm flex flex-col justify-between",children:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2 text-[#c9a84c]",children:[n.jsx(wm,{className:"w-3.5 h-3.5 shrink-0"}),n.jsx("span",{className:"text-[9px] tracking-[0.2em] uppercase font-bold",children:"Side Dish & Olive Oil"})]}),n.jsx("h5",{className:"text-base font-playfair text-[#f0ead6] font-semibold mb-1",children:(oe=r.pairing)==null?void 0:oe.side}),n.jsx("p",{className:"text-sm text-[#e8e0d0] font-normal leading-relaxed",children:(ye=r.pairing)==null?void 0:ye.sideExplanation})]})})]}),n.jsxs("div",{className:"bg-[#1c180f]/50 border border-[#c9a84c]/15 p-3 rounded-sm flex items-start gap-2.5",children:[n.jsx(hc,{className:"w-4 h-4 text-[#c9a84c] shrink-0 mt-0.5"}),n.jsx("p",{className:"text-[11px] text-[#a09080] font-light leading-relaxed",children:"Flavor Synergy: This pairing formulation is scientifically crafted to lock in volatiles and balance pH, highlighting the unique terroir of premium ingredients and clean Canberra, ACT water."})]})]}),M&&n.jsxs("div",{className:"mt-4 pt-4 border-t border-[#c9a84c]/10 space-y-4 text-left animate-slide-down",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("h4",{className:"text-sm font-playfair text-[#c9a84c] font-semibold tracking-wider",children:"PRODUCT FEEDBACK"}),n.jsxs("span",{className:"text-xs text-[#a09080]",children:[S.total," Community Reviews"]})]}),n.jsx("div",{className:"max-h-60 overflow-y-auto space-y-3 pr-2",children:Re.filter(te=>te.productId===r.id).length===0?n.jsx("p",{className:"text-xs text-[#a09080] italic py-2",children:"No reviews for this formulation yet. Be the first to review!"}):Re.filter(te=>te.productId===r.id).map(te=>n.jsxs("div",{className:"bg-[#111110] p-3 border border-[#c9a84c]/5 rounded-sm",children:[n.jsxs("div",{className:"flex justify-between items-center mb-1 text-xs",children:[n.jsx("span",{className:"font-semibold text-[#f0ead6]",children:te.customerName}),n.jsx("div",{className:"flex text-[#c9a84c]",children:Array.from({length:te.rating}).map((ge,_e)=>n.jsx(Ea,{className:"w-3 h-3 fill-[#c9a84c] text-[#c9a84c]"},_e))})]}),n.jsx("p",{className:"text-xs text-[#a09080] leading-relaxed font-light",children:te.reviewText||"Verified fresh order"}),n.jsx("span",{className:"text-[9px] text-[#6a6050] block mt-1",children:new Date(te.createdAt).toLocaleDateString()})]},te.id))}),n.jsxs("form",{onSubmit:te=>hl(te,r.id),className:"bg-[#111110] p-4 border border-[#c9a84c]/10 rounded-sm space-y-3",children:[n.jsx("h5",{className:"text-[12px] tracking-wider text-[#c9a84c] font-semibold uppercase",children:"WRITE A REVIEW FOR THIS FORMULATION"}),cl.type&&n.jsx("div",{className:`p-2.5 text-xs rounded border ${cl.type==="success"?"bg-[#1a2810]/80 text-[#7ab860] border-[#7ab860]/20":"bg-[#2a1818]/80 text-[#cc6b6b] border-[#cc6b6b]/20"}`,children:cl.message}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Your Name *"}),n.jsx("input",{type:"text",required:!0,value:Be.customerName,onChange:te=>At({...Be,customerName:te.target.value}),placeholder:"Alessandro R.",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-2.5 py-1.5 rounded"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Star Rating"}),n.jsxs("select",{value:Be.rating,onChange:te=>At({...Be,rating:Number(te.target.value)}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-2 py-1.5 rounded",children:[n.jsx("option",{value:5,children:"⭐⭐⭐⭐⭐ (5/5)"}),n.jsx("option",{value:4,children:"⭐⭐⭐⭐ (4/5)"}),n.jsx("option",{value:3,children:"⭐⭐⭐ (3/5)"}),n.jsx("option",{value:2,children:"⭐⭐ (2/5)"}),n.jsx("option",{value:1,children:"⭐ (1/5)"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Your Comment (Optional)"}),n.jsx("textarea",{value:Be.reviewText,onChange:te=>At({...Be,reviewText:te.target.value}),placeholder:"Share your experience preparing and plating this fresh recipe...",className:"w-full h-16 bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs p-2 rounded resize-none"})]}),n.jsx("button",{type:"submit",disabled:ql,className:"w-full py-2 bg-[#c9a84c] text-[#0a0a08] text-[11px] tracking-widest uppercase font-bold hover:bg-[#d4b665] disabled:opacity-50 transition-colors rounded-sm",children:ql?"SUBMITTING...":"PUBLISH REVIEW"})]})]})]})]},r.id)})})]}),E==="reviews"&&n.jsxs("div",{id:"view-reviews",className:"max-w-5xl mx-auto px-6 py-12",children:[n.jsxs("div",{className:"text-center space-y-4 mb-12",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"CUSTOMER CORRESPONDENCE"}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Lab Reviews & Testimonials"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"}),n.jsx("p",{className:"text-sm md:text-base text-[#a09080] max-w-xl mx-auto font-light",children:"Authentic, unedited reviews published directly from Canberra home cooks after testing our vacuum-sealed kits."})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-12 border border-[#c9a84c]/10 bg-[#0e0e0c] p-6 md:p-8 rounded-sm",children:[n.jsxs("div",{className:"text-center md:border-r border-[#c9a84c]/10 flex flex-col justify-center py-4",children:[n.jsx("div",{className:"text-5xl md:text-6xl font-playfair text-[#c9a84c] font-bold",children:Re.length>0?(Re.reduce((r,S)=>r+S.rating,0)/Re.length).toFixed(1):"4.9"}),n.jsxs("div",{className:"flex justify-center text-[#c9a84c] my-2",children:[n.jsx(Ea,{className:"w-4 h-4 fill-[#c9a84c]"}),n.jsx(Ea,{className:"w-4 h-4 fill-[#c9a84c]"}),n.jsx(Ea,{className:"w-4 h-4 fill-[#c9a84c]"}),n.jsx(Ea,{className:"w-4 h-4 fill-[#c9a84c]"}),n.jsx(Ea,{className:"w-4 h-4 fill-[#c9a84c]"})]}),n.jsx("div",{className:"text-xs tracking-wider text-[#a09080] uppercase font-mono-jetbrains",children:"Aggregate rating"}),n.jsxs("div",{className:"text-[10px] text-[#6a6050] mt-1",children:[Re.length," verified submissions"]})]}),n.jsx("div",{className:"col-span-2 space-y-2 flex flex-col justify-center py-4 px-2 md:px-6",children:[5,4,3,2,1].map(r=>{const S=Re.filter(z=>z.rating===r).length,M=Re.length>0?S/Re.length*100:0;return n.jsxs("div",{className:"flex items-center gap-3 text-xs text-[#a09080]",children:[n.jsx("span",{className:"w-3 text-right",children:r}),n.jsx(Ea,{className:"w-3.5 h-3.5 text-[#c9a84c] fill-[#c9a84c]"}),n.jsx("div",{className:"flex-grow h-1.5 bg-[#161614] rounded-full overflow-hidden border border-[#c9a84c]/5",children:n.jsx("div",{className:"h-full bg-[#c9a84c]",style:{width:`${M||(r===5?85:r===4?12:1)}%`}})}),n.jsxs("span",{className:"w-8 text-right text-[10px] font-mono-jetbrains",children:[S," reviews"]})]},r)})})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-8 bg-[#111110] p-4 border border-[#c9a84c]/10 rounded-sm",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs text-[#c9a84c] tracking-widest font-bold",children:[n.jsx(vm,{className:"w-4 h-4"}),n.jsx("span",{children:"FILTER REVIEWS"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4 w-full sm:w-auto",children:[n.jsxs("select",{value:ll,onChange:r=>ni(r.target.value),className:"bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 text-xs text-[#f0ead6] outline-none px-3 py-2 rounded font-cormorant min-w-[160px] cursor-pointer",children:[n.jsx("option",{value:"all",children:"All Formulations"}),L.map(r=>n.jsx("option",{value:r.id,children:r.name},r.id))]}),n.jsxs("select",{value:pn,onChange:r=>si(r.target.value==="all"?"all":Number(r.target.value)),className:"bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 text-xs text-[#f0ead6] outline-none px-3 py-2 rounded font-cormorant cursor-pointer",children:[n.jsx("option",{value:"all",children:"All Star Ratings"}),n.jsx("option",{value:"5",children:"⭐⭐⭐⭐⭐ 5 Stars"}),n.jsx("option",{value:"4",children:"⭐⭐⭐⭐ 4 Stars"}),n.jsx("option",{value:"3",children:"⭐⭐⭐ 3 Stars"}),n.jsx("option",{value:"2",children:"⭐⭐ 2 Stars"}),n.jsx("option",{value:"1",children:"⭐ 1 Star"})]})]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[n.jsx("div",{className:"md:col-span-2 space-y-6",children:wn.length===0?n.jsxs("div",{className:"text-center py-12 border border-dashed border-[#c9a84c]/20 rounded-sm bg-[#0e0e0c] text-[#a09080]",children:[n.jsx("p",{className:"text-base",children:"No reviews match your selected filters."}),n.jsx("button",{onClick:()=>{ni("all"),si("all")},className:"mt-4 text-xs tracking-wider uppercase underline hover:text-[#c9a84c]",children:"Reset filters"})]}):wn.map(r=>n.jsxs("div",{className:"border border-[#c9a84c]/10 bg-[#0e0e0c] p-6 hover:border-[#c9a84c]/30 transition-all rounded-sm space-y-3",children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold font-playfair text-[#f0ead6] text-lg block",children:r.customerName}),n.jsx("span",{className:"text-[11px] tracking-wider text-[#c9a84c] uppercase font-mono-jetbrains",children:r.productName})]}),n.jsxs("div",{className:"flex flex-col items-end",children:[n.jsx("div",{className:"flex text-[#c9a84c] mb-1",children:Array.from({length:r.rating}).map((S,M)=>n.jsx(Ea,{className:"w-3.5 h-3.5 fill-[#c9a84c] text-[#c9a84c]"},M))}),n.jsx("span",{className:"text-[10px] text-[#6a6050] font-mono-jetbrains",children:new Date(r.createdAt).toLocaleDateString()})]})]}),n.jsxs("p",{className:"text-sm md:text-base text-[#a09080] leading-relaxed font-light italic",children:['"',r.reviewText||"Verified Pasta Lab Formulation customer order. Cooked as directed.",'"']})]},r.id))}),n.jsxs("div",{className:"border border-[#c9a84c]/20 bg-[#111110] p-6 rounded-sm self-start space-y-6",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-xl font-playfair text-[#c9a84c]",children:"Submit General Feedback"}),n.jsx("p",{className:"text-xs text-[#a09080] leading-relaxed",children:"Had our pasta? Share your plating observations and star ratings directly with our kitchen."})]}),cl.type&&n.jsx("div",{className:`p-3 text-xs rounded border ${cl.type==="success"?"bg-[#1a2810]/80 text-[#7ab860] border-[#7ab860]/20":"bg-[#2a1818]/80 text-[#cc6b6b] border-[#cc6b6b]/20"}`,children:cl.message}),n.jsxs("form",{onSubmit:hl,className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[11px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Select Formulation *"}),n.jsx("select",{value:Be.productId,onChange:r=>At({...Be,productId:r.target.value}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-3 py-2.5 rounded font-cormorant",children:fn.map(r=>n.jsx("option",{value:r.id,children:r.name},r.id))})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[11px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Your Name *"}),n.jsx("input",{type:"text",required:!0,value:Be.customerName,onChange:r=>At({...Be,customerName:r.target.value}),placeholder:"Alessandro Rossi",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-3 py-2.5 rounded font-cormorant"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[11px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Email Address *"}),n.jsx("input",{type:"email",required:!0,value:Be.customerEmail,onChange:r=>At({...Be,customerEmail:r.target.value}),placeholder:"alessandro@example.com",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-3 py-2.5 rounded font-cormorant"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[11px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Star Rating"}),n.jsxs("select",{value:Be.rating,onChange:r=>At({...Be,rating:Number(r.target.value)}),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs px-3 py-2.5 rounded font-cormorant",children:[n.jsx("option",{value:5,children:"⭐⭐⭐⭐⭐ 5 Stars (Exceptional)"}),n.jsx("option",{value:4,children:"⭐⭐⭐⭐ 4 Stars (Very Good)"}),n.jsx("option",{value:3,children:"⭐⭐⭐ 3 Stars (Satisfactory)"}),n.jsx("option",{value:2,children:"⭐⭐ 2 Stars (Needs refinement)"}),n.jsx("option",{value:1,children:"⭐ 1 Star (Unsatisfactory)"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[11px] text-[#a09080] uppercase tracking-wider block mb-1",children:"Comments *"}),n.jsx("textarea",{required:!0,value:Be.reviewText,onChange:r=>At({...Be,reviewText:r.target.value}),placeholder:"Describe your dining results: cooking time, creamy consistency, and seasoning precision...",className:"w-full h-24 bg-[#0a0a08] border border-[#c9a84c]/20 focus:border-[#c9a84c] outline-none text-[#f0ead6] text-xs p-3 rounded resize-none font-cormorant"})]}),n.jsx("button",{type:"submit",disabled:ql,className:"w-full py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-[0.2em] font-bold hover:bg-[#d4b665] disabled:opacity-50 transition-colors uppercase font-playfair rounded-sm cursor-pointer",children:ql?"SUBMITTING FORM...":"SUBMIT CORRESPONDENCE"})]})]})]})]}),E==="about"&&n.jsxs("div",{id:"view-about",className:"max-w-4xl mx-auto px-6 py-12 md:py-20",children:[n.jsxs("div",{className:"text-center space-y-4 mb-16",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"OUR MANIFESTO"}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Fresh Pasta, Chemically Decoded"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"})]}),n.jsxs("div",{className:"border border-[#c9a84c]/15 bg-[#0e0e0c] p-8 md:p-12 rounded-sm space-y-8 font-light text-base md:text-lg text-[#a09080] leading-relaxed",children:[n.jsx("p",{children:"The Pasta Lab was established in Canberra, ACT with a highly disciplined objective: to isolate the variable parameters of dining, and deliver absolute pasta consistency."}),n.jsx("p",{children:"Standard restaurant delivery is plagued by thermal dissipation and starch degradation; pasta gets cold, soggy, and sticky in cardboard containers. Our vacuum-sealing process completely bypasses this issue."}),n.jsx("p",{children:"By keeping the hand-rolled semolina sheets completely separate from the emulsifying pecorino fats or reducing San Marzano juices, you get to execute the final 8-minute thermal reduction inside your own pan, resulting in optimal, velvety restaurant plates."}),n.jsxs("div",{className:"border-t border-[#c9a84c]/10 pt-6 mt-6 grid md:grid-cols-2 gap-6 text-sm text-[#a09080]",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mo,{className:"w-5 h-5 text-[#c9a84c] shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-[#f0ead6] block mb-1",children:"Hand-Rolled Daily"}),"Extruded and packaged by 11:00 AM every morning. Delivered cold."]})]}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Oo,{className:"w-5 h-5 text-[#c9a84c] shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-[#f0ead6] block mb-1",children:"Canberra, ACT"}),"Sourced from organic local farms across the capital territory."]})]})]})]})]}),E==="order"&&n.jsxs("div",{id:"view-order",className:"max-w-4xl mx-auto px-6 py-12 print:py-4 print:px-0 print:max-w-none",children:[n.jsx("h2",{className:"text-4xl font-playfair font-normal text-center mb-12 print:hidden",children:$e?"Your Purchase Receipt":"Review Your Order Formulation"}),B.length===0?n.jsxs("div",{className:`${$e?"hidden":""} print:hidden text-center py-16 border border-[#c9a84c]/10 bg-[#0e0e0c] rounded-sm space-y-6`,children:[n.jsx(ai,{className:"w-12 h-12 text-[#c9a84c]/40 mx-auto"}),n.jsx("p",{className:"text-lg text-[#a09080]",children:"Your ordering cart is completely empty."}),n.jsx("button",{onClick:()=>O("menu"),className:"px-8 py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-widest font-bold font-playfair hover:bg-[#d4b665] transition-all cursor-pointer rounded-sm",children:"BROWSE THE MENU"})]}):n.jsxs("div",{className:"grid md:grid-cols-5 gap-8 print:hidden",children:[n.jsxs("div",{className:"md:col-span-3 space-y-4",children:[B.some(r=>de(r.id))&&n.jsxs("div",{className:"bg-[#260f0f] border border-red-500/40 p-3.5 rounded-sm text-xs font-mono-jetbrains text-red-200 flex items-start gap-3 animate-pulse",children:[n.jsx(ha,{className:"w-5 h-5 text-red-400 shrink-0 mt-0.5"}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("strong",{className:"text-red-300 uppercase tracking-wider block font-bold",children:"SOLD OUT ITEMS IN CART"}),n.jsx("p",{className:"text-red-200/90 leading-relaxed font-light text-[11px]",children:"One or more formulations in your cart are currently sold out. Please remove sold out items before checking out."})]})]}),n.jsxs("div",{className:"flex justify-between items-center text-sm text-[#ffd766] font-bold tracking-wider uppercase border-b border-[#c9a84c]/30 pb-2",children:[n.jsxs("span",{children:["Selected items (",B.length,")"]}),n.jsx("button",{onClick:ml,className:"text-red-400 hover:text-red-300 font-bold transition-colors cursor-pointer text-xs",children:"CLEAR ALL"})]}),n.jsx("div",{className:"space-y-3",children:B.map((r,S)=>{const M=de(r.id);return n.jsxs("div",{className:`flex justify-between items-center p-4 border rounded-sm transition-all ${M?"bg-[#1a0f0f] border-red-500/40":"bg-[#0e0e0c] border-[#c9a84c]/20"}`,children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h4",{className:`font-playfair text-lg md:text-xl font-bold ${M?"text-red-300 line-through":"text-white"}`,children:r.name}),M&&n.jsxs("span",{className:"bg-red-950 text-red-300 text-xs font-mono-jetbrains font-bold uppercase tracking-wider px-2 py-0.5 rounded border border-red-500/40 flex items-center gap-1",children:[n.jsx(ha,{className:"w-3 h-3"})," SOLD OUT"]})]}),n.jsxs("span",{className:"text-sm font-medium text-[#e4d8c8] block mt-1",children:[r.weight," • Serves ",r.servings]})]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs("span",{className:"text-lg md:text-xl font-playfair text-[#ffd766] font-bold",children:["$",r.price]}),n.jsx("button",{onClick:()=>xs(S),className:"text-[#e4d8c8] hover:text-red-400 transition-colors p-1.5 cursor-pointer",title:"Remove item",children:n.jsx(Sm,{className:"w-5 h-5"})})]})]},`${r.id}-${S}`)})}),n.jsxs("div",{className:"border-t border-[#c9a84c]/30 pt-4 space-y-3.5 text-base text-[#e4d8c8]",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"font-medium text-white",children:"Subtotal"}),n.jsxs("span",{className:"font-mono-jetbrains text-base md:text-lg font-bold text-white",children:["$",hs.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-bold text-white",children:mt==="pickup"?"Store Pickup":"Local Canberra Delivery"}),n.jsx("span",{className:"block text-xs md:text-sm text-[#e4d8c8]",children:mt==="pickup"?"Constitution Ave, Canberra ACT 2600":Qe?"Emergency Worker Waiver Applied":"$5.00 Flat Rate Canberra Metro"})]}),n.jsx("span",{className:"font-mono-jetbrains text-base md:text-lg font-bold",children:mt==="pickup"?n.jsx("span",{className:"text-[#8cd96a] font-bold",children:"FREE"}):Qe?n.jsx("span",{className:"text-[#8cd96a] font-bold",children:"FREE (Emergency Worker)"}):`$${Sn.toFixed(2)}`})]}),n.jsxs("div",{className:"flex justify-between text-lg md:text-2xl text-white font-playfair border-t border-[#c9a84c]/20 pt-3.5 font-bold",children:[n.jsx("span",{children:"Total Amount (AUD)"}),n.jsxs("span",{className:"text-[#ffd766] font-mono-jetbrains text-xl md:text-2xl font-extrabold",children:["$",xl.toFixed(2)]})]})]})]}),n.jsx("div",{className:"md:col-span-2",children:n.jsxs("div",{className:"border border-[#c9a84c]/30 bg-[#111110] p-6 md:p-7 rounded-sm space-y-6",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("h3",{className:"text-xl font-playfair font-bold text-[#ffd766] flex items-center gap-2",children:[n.jsx(oh,{className:"w-6 h-6 text-[#ffd766]"}),n.jsx("span",{children:"Secure Checkout"})]}),n.jsx("p",{className:"text-xs md:text-sm text-[#e4d8c8]",children:"Processed instantly through PCI-compliant standards."})]}),oa.isMock?n.jsxs("div",{className:"bg-[#c9a84c]/15 text-[#ffd766] border border-[#c9a84c]/40 p-3.5 rounded-sm text-xs leading-relaxed flex gap-2.5",children:[n.jsx(th,{className:"w-5 h-5 shrink-0 mt-0.5 text-[#ffd766]"}),n.jsxs("div",{children:[n.jsx("strong",{className:"font-bold block",children:"Square Sandbox Mode Active"}),n.jsx("span",{className:"block mt-0.5 text-[#e4d8c8]",children:"Square Access Token is not set yet. You can complete test orders using any mock card details!"})]})]}):n.jsxs("div",{className:"bg-[#1a2810]/70 text-[#8cd96a] border border-[#7ab860]/30 p-3 rounded-sm text-xs md:text-sm font-semibold flex items-center gap-2",children:[n.jsx(Nm,{className:"w-5 h-5 text-[#8cd96a]"}),n.jsx("span",{children:"Live Square Web Payments Active"})]}),yn.type&&n.jsx("div",{className:`p-3.5 text-xs md:text-sm rounded border font-medium ${yn.type==="success"?"bg-[#1a2810]/90 text-[#8cd96a] border-[#7ab860]/30":"bg-[#2a1818]/90 text-red-300 border-red-500/30"}`,children:yn.message}),n.jsxs("form",{onSubmit:da,className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-2 font-bold",children:"Choose Fulfillment Method *"}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("button",{type:"button",onClick:()=>rs("pickup"),className:`p-3.5 rounded border text-left transition-all flex flex-col justify-between cursor-pointer ${mt==="pickup"?"bg-[#c9a84c]/20 border-[#ffd766] text-white":"bg-[#0a0a08] border-[#c9a84c]/30 text-[#e4d8c8] hover:border-[#ffd766]"}`,children:[n.jsxs("div",{className:"flex items-center space-x-2 font-bold text-sm text-white",children:[n.jsx(Fh,{className:"w-4 h-4 text-[#ffd766]"}),n.jsx("span",{children:"Store Pickup"})]}),n.jsx("div",{className:"mt-1.5 text-xs text-[#8cd96a] font-extrabold",children:"FREE"}),n.jsx("div",{className:"text-xs text-[#e4d8c8] mt-0.5",children:"Constitution Ave, Canberra"})]}),n.jsxs("button",{type:"button",onClick:()=>rs("delivery"),className:`p-3.5 rounded border text-left transition-all flex flex-col justify-between cursor-pointer ${mt==="delivery"?"bg-[#c9a84c]/20 border-[#ffd766] text-white":"bg-[#0a0a08] border-[#c9a84c]/30 text-[#e4d8c8] hover:border-[#ffd766]"}`,children:[n.jsxs("div",{className:"flex items-center space-x-2 font-bold text-sm text-white",children:[n.jsx(ap,{className:"w-4 h-4 text-[#ffd766]"}),n.jsx("span",{children:"Local Delivery"})]}),n.jsx("div",{className:"mt-1.5 text-xs text-[#ffd766] font-extrabold",children:Qe?"FREE (Waiver)":"$5.00 Flat Rate"}),n.jsx("div",{className:"text-xs text-[#e4d8c8] mt-0.5",children:"Canberra Metro Area"})]})]})]}),mt==="pickup"&&n.jsxs("div",{className:"bg-[#181812] border border-[#c9a84c]/40 p-3.5 rounded text-xs md:text-sm text-white flex items-start gap-2.5",children:[n.jsx(Oo,{className:"w-5 h-5 text-[#ffd766] shrink-0 mt-0.5"}),n.jsxs("div",{className:"space-y-0.5",children:[n.jsx("strong",{className:"text-[#ffd766] block font-serif text-sm md:text-base font-bold",children:"Store Pickup Information"}),n.jsx("p",{className:"text-[#e4d8c8] text-xs md:text-sm leading-relaxed",children:"Constitution Ave, Canberra ACT 2600 — Open Tue-Sun 11:30 AM – 9:00 PM. Your artisan pasta will be freshly packaged ready for collection."})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Full Name *"}),n.jsx("input",{type:"text",required:!0,value:Jt,onChange:r=>tt(r.target.value),placeholder:"Alessandro Rossi",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-cormorant font-medium"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Email Address *"}),n.jsx("input",{type:"email",required:!0,value:bt,onChange:r=>ya(r.target.value),placeholder:"alessandro@example.com",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-cormorant font-medium"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Mobile Number *"}),n.jsx("input",{type:"tel",required:!0,value:Yl,onChange:r=>cs(r.target.value),placeholder:"+61 412 345 678",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-cormorant font-medium"})]}),mt==="delivery"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Delivery Address *"}),n.jsx("input",{type:"text",required:mt==="delivery",value:Ra,onChange:r=>Gl(r.target.value),placeholder:"12 London Circuit, City",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-cormorant font-medium"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Postcode *"}),n.jsx("input",{type:"text",required:mt==="delivery",maxLength:4,value:va,onChange:r=>ja(r.target.value.replace(/\D/g,"")),placeholder:"2601",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-mono-jetbrains font-medium"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Delivery Instructions (Optional)"}),n.jsx("input",{type:"text",value:Da,onChange:r=>Na(r.target.value),placeholder:"Leave at front door / ring bell",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-cormorant font-medium"})]}),n.jsxs("div",{className:"bg-[#181814] border border-[#c9a84c]/30 p-3.5 rounded text-xs md:text-sm text-white flex items-start gap-2.5",children:[n.jsx("input",{type:"checkbox",id:"emergencyWorkerToggle",checked:Qe,onChange:r=>os(r.target.checked),className:"mt-0.5 accent-[#ffd766] w-4 h-4 rounded cursor-pointer shrink-0"}),n.jsxs("label",{htmlFor:"emergencyWorkerToggle",className:"cursor-pointer space-y-0.5",children:[n.jsx("span",{className:"font-bold text-[#ffd766] block text-sm",children:"Emergency Worker / First Responder"}),n.jsx("span",{className:"text-xs md:text-sm text-[#e4d8c8] block leading-relaxed",children:"Check this box if you are an emergency worker (healthcare, police, fire, ambulance) to waive the $5 local delivery fee."})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs md:text-sm text-[#ffd766] uppercase tracking-wider block mb-1 font-bold",children:"Square Payment Card Details *"}),oa.isMock?n.jsxs("div",{className:"space-y-2.5",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#e4d8c8] uppercase tracking-wider block mb-1 font-bold",children:"Card Number"}),n.jsx("input",{type:"text",required:!0,maxLength:19,value:_a.number,onChange:r=>Ft({..._a,number:r.target.value.replace(/\D/g,"").replace(/(.{4})/g,"$1 ").trim()}),placeholder:"4111 1111 1111 1111",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-mono-jetbrains font-medium"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#e4d8c8] uppercase tracking-wider block mb-1 font-bold",children:"Expiry Date"}),n.jsx("input",{type:"text",required:!0,maxLength:5,value:_a.expiry,onChange:r=>Ft({..._a,expiry:r.target.value}),placeholder:"MM/YY",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-mono-jetbrains font-medium"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#e4d8c8] uppercase tracking-wider block mb-1 font-bold",children:"CVC"}),n.jsx("input",{type:"text",required:!0,maxLength:3,value:_a.cvc,onChange:r=>Ft({..._a,cvc:r.target.value.replace(/\D/g,"")}),placeholder:"CVC",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 focus:border-[#ffd766] outline-none text-white text-sm md:text-base px-3.5 py-3 rounded font-mono-jetbrains font-medium"})]})]})]}):n.jsx("div",{className:"space-y-2",children:n.jsx("div",{id:"square-card-container",className:"w-full bg-[#0a0a08] border border-[#c9a84c]/30 p-3 rounded text-sm text-white min-h-[90px]"})})]}),n.jsx("button",{type:"submit",disabled:Ua||B.some(r=>de(r.id)),className:"w-full py-4 bg-[#ffd766] text-[#0a0a08] text-sm md:text-base tracking-[0.2em] font-extrabold hover:bg-[#ffe07d] disabled:opacity-50 disabled:cursor-not-allowed transition-all uppercase font-playfair rounded-sm cursor-pointer mt-3 shadow-lg",children:Ua?"AUTHORISING PAYMENT...":B.some(r=>de(r.id))?"REMOVE SOLD OUT ITEMS TO PAY":`PLACE ORDER - $${xl.toFixed(2)}`})]})]})})]}),$e&&n.jsxs("div",{className:"mt-8 border border-[#7ab860]/30 bg-[#1a2810]/30 p-6 rounded-sm text-center space-y-4 animate-fade-in print:bg-white print:text-black print:border-none print:shadow-none print:p-0 print:m-0 print:w-full",children:[n.jsxs("div",{className:"hidden print:block text-center space-y-1 pb-4 border-b border-black/10 mb-4 text-black",children:[n.jsx("h1",{className:"text-2xl font-playfair font-bold uppercase tracking-wider",children:"THE PASTA LAB"}),n.jsx("p",{className:"text-[9px] font-mono-jetbrains text-gray-500 uppercase tracking-widest",children:"Precision • Pasta • Pleasure • Canberra, ACT"}),n.jsxs("p",{className:"text-[9px] text-gray-400",children:["Date Plated: ",new Date().toLocaleDateString()," ",new Date().toLocaleTimeString()]})]}),n.jsx("div",{className:"print:hidden w-12 h-12 rounded-full bg-[#7ab860]/15 text-[#7ab860] flex items-center justify-center mx-auto",children:n.jsx(Nc,{className:"w-6 h-6"})}),n.jsxs("div",{className:"space-y-1 print:hidden",children:[n.jsx("h3",{className:"text-2xl font-playfair text-[#7ab860] font-semibold",children:"Plating Success!"}),n.jsx("p",{className:"text-sm text-[#a09080]",children:"Your fresh pasta kit is being packaged for shipment."})]}),n.jsxs("div",{className:"border border-[#c9a84c]/10 bg-[#0a0a08] p-4 max-w-md mx-auto text-left text-xs rounded-sm space-y-2 print:bg-white print:text-black print:border-black/20 print:p-6 print:max-w-none print:shadow-none",children:[n.jsxs("div",{className:"flex justify-between border-b border-[#c9a84c]/10 pb-1.5 font-bold print:border-black/20",children:[n.jsx("span",{className:"text-[#c9a84c] print:text-black",children:"ORDER CODE:"}),n.jsx("span",{className:"font-mono-jetbrains",children:$e.id})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Fulfillment Method:"}),n.jsx("span",{className:"text-[#c9a84c] print:text-black font-bold uppercase tracking-wider",children:$e.fulfillmentMethod==="pickup"?"Store Pickup (Constitution Ave)":"Local Canberra Delivery"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Recipient:"}),n.jsx("span",{className:"text-[#f0ead6] print:text-black font-semibold",children:$e.customerName})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Destination Email:"}),n.jsx("span",{className:"text-[#f0ead6] print:text-black",children:$e.customerEmail})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Mobile Phone:"}),n.jsx("span",{className:"text-[#f0ead6] print:text-black",children:$e.customerMobile||"N/A"})]}),$e.fulfillmentMethod!=="pickup"&&n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Delivery Address:"}),n.jsxs("span",{className:"text-[#f0ead6] print:text-black",children:[$e.customerAddress||"N/A",", ACT ",$e.customerPostcode||""]})]}),$e.deliveryInstructions&&n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Instructions:"}),n.jsxs("span",{className:"text-[#f0ead6] print:text-black italic",children:['"',$e.deliveryInstructions,'"']})]}),$e.items&&$e.items.length>0&&n.jsxs("div",{className:"border-t border-b border-[#c9a84c]/10 py-2.5 my-2.5 print:border-black/20",children:[n.jsx("span",{className:"text-[10px] text-[#c9a84c] print:text-black uppercase tracking-wider block mb-1.5 font-bold",children:"FORMULATIONS ORDERED:"}),n.jsx("ul",{className:"space-y-1",children:$e.items.map((r,S)=>n.jsxs("li",{className:"flex justify-between items-center text-[11px] font-mono-jetbrains text-[#f0ead6] print:text-black",children:[n.jsxs("span",{children:["• ",r.name," x1"]}),n.jsxs("span",{children:["$",r.price?Number(r.price).toFixed(2):"0.00"]})]},S))})]}),n.jsxs("div",{className:"space-y-1.5 border-t border-[#c9a84c]/10 pt-2 print:border-black/20",children:[n.jsxs("div",{className:"flex justify-between text-[11px]",children:[n.jsx("span",{className:"text-[#a09080] print:text-gray-500",children:"Fulfillment Fee:"}),n.jsx("span",{className:"text-[#f0ead6] print:text-black font-mono-jetbrains",children:$e.fulfillmentMethod==="pickup"?n.jsx("span",{className:"text-[#7ab860] font-bold",children:"FREE (Store Pickup)"}):$e.totalAmount-(((Tn=$e.items)==null?void 0:Tn.reduce((r,S)=>r+(S.price||0),0))||0)<=0?n.jsx("span",{className:"text-[#7ab860] font-bold",children:"FREE (Emergency Worker Waiver)"}):"$5.00 AUD"})]}),n.jsxs("div",{className:"flex justify-between font-semibold border-t border-[#c9a84c]/10 pt-1.5 print:border-black/20",children:[n.jsx("span",{className:"text-[#a09080] print:text-black font-bold",children:"Transaction Total:"}),n.jsxs("span",{className:"text-[#c9a84c] font-mono-jetbrains print:text-black font-bold text-sm",children:["$",$e.totalAmount.toFixed(2)," AUD"]})]})]})]}),n.jsxs("div",{className:"print:hidden bg-[#c9a84c]/10 border border-[#c9a84c]/25 p-3.5 max-w-md mx-auto rounded-sm text-xs flex items-center gap-3 animate-slide-down",children:[n.jsx(hc,{className:"w-8 h-8 text-[#c9a84c] shrink-0 animate-bounce"}),n.jsxs("div",{className:"text-left",children:[n.jsx("span",{className:"font-playfair text-[#c9a84c] font-bold block tracking-wider",children:"✨ LOYALTY CREDIT ACQUIRED"}),n.jsxs("span",{className:"text-[#a09080] font-light",children:["You earned ",n.jsx("strong",{className:"text-[#f0ead6] font-mono-jetbrains",children:Math.floor($e.totalAmount)})," Pasta Credits! Your new lifetime balance is ",n.jsx("strong",{className:"text-[#c9a84c] font-mono-jetbrains",children:et})," credits."]})]})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 pt-2 print:hidden",children:[n.jsxs("button",{onClick:()=>window.print(),className:"flex items-center gap-2 px-5 py-2.5 bg-[#c9a84c] text-[#0a0a08] text-xs font-bold tracking-widest uppercase rounded-sm hover:bg-[#d4b665] transition-all cursor-pointer shadow-md hover:scale-[1.02] active:scale-95",children:[n.jsx(Hh,{className:"w-4 h-4"}),n.jsx("span",{children:"Print Receipt"})]}),n.jsx("button",{onClick:()=>Vl(null),className:"text-xs tracking-wider uppercase text-[#c9a84c] underline hover:text-[#d4b665]",children:"Close Receipt"})]})]})]}),E==="orders-history"&&n.jsxs("div",{id:"view-orders-history",className:"max-w-4xl mx-auto px-6 py-12 space-y-12",children:[n.jsxs("div",{className:"text-center space-y-4",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"LAB OPERATIONS"}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Order Shipment History"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"}),n.jsx("p",{className:"text-sm text-[#a09080] max-w-xl mx-auto font-light",children:"Secure real-time ledger recording fresh formulations compiled and shipped across the Canberra ACT metropolitan area."})]}),n.jsxs("div",{id:"history-prep-tracker",className:"bg-[#0e0e0c]/80 border border-[#c9a84c]/10 p-6 md:p-8 rounded-sm scroll-mt-24 animate-fade-in",children:[n.jsxs("div",{className:"text-center space-y-2 mb-6",children:[n.jsx("h3",{className:"text-lg font-playfair text-[#c9a84c] tracking-wide",children:"Prep Status Search"}),n.jsx("p",{className:"text-xs text-[#a09080] font-light",children:"Enter a specific order code below to verify its active preparation and logistics phase."})]}),It()]}),ol.length>0&&n.jsxs("div",{className:"bg-[#111110] p-6 border border-[#c9a84c]/10 rounded-sm space-y-4 animate-fade-in",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs text-[#c9a84c] tracking-widest font-bold",children:[n.jsx(vm,{className:"w-4 h-4"}),n.jsx("span",{children:"FILTER SHIPPED LEDGER"})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block font-mono-jetbrains",children:"Pasta Formulation"}),n.jsxs("select",{value:bn,onChange:r=>Oa(r.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 focus:border-[#c9a84c] text-xs text-[#f0ead6] outline-none px-3 py-2.5 rounded font-playfair cursor-pointer transition-colors",children:[n.jsx("option",{value:"all",children:"All Formulations"}),L.map(r=>n.jsx("option",{value:r.id,children:r.name},r.id))]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block font-mono-jetbrains",children:"Start Date"}),n.jsx("input",{type:"date",value:dt,onChange:r=>$t(r.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 focus:border-[#c9a84c] text-xs text-[#f0ead6] outline-none px-3 py-2 rounded font-mono-jetbrains cursor-pointer transition-colors"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] text-[#a09080] uppercase tracking-wider block font-mono-jetbrains",children:"End Date"}),n.jsx("input",{type:"date",value:ft,onChange:r=>ns(r.target.value),className:"w-full bg-[#0a0a08] border border-[#c9a84c]/20 hover:border-[#c9a84c]/50 focus:border-[#c9a84c] text-xs text-[#f0ead6] outline-none px-3 py-2 rounded font-mono-jetbrains cursor-pointer transition-colors"})]})]}),(bn!=="all"||dt||ft)&&n.jsxs("div",{className:"flex justify-between items-center border-t border-[#c9a84c]/10 pt-3 text-xs",children:[n.jsxs("span",{className:"text-[#a09080] font-light",children:["Found ",n.jsx("strong",{className:"text-[#c9a84c] font-mono-jetbrains",children:jn.length})," of ",ol.length," orders matching parameters"]}),n.jsx("button",{onClick:()=>{Oa("all"),$t(""),ns("")},className:"text-red-400 hover:text-red-300 transition-colors text-[10px] tracking-widest uppercase font-mono-jetbrains cursor-pointer",children:"Reset Filters"})]})]}),ui?n.jsx("div",{className:"text-center py-12 text-[#c9a84c]",children:n.jsx("span",{className:"animate-pulse",children:"Loading secure ledger data..."})}):ol.length===0?n.jsxs("div",{className:"text-center py-16 border border-[#c9a84c]/10 bg-[#0e0e0c] rounded-sm space-y-4",children:[n.jsx(jm,{className:"w-12 h-12 text-[#c9a84c]/30 mx-auto"}),n.jsx("p",{className:"text-[#a09080]",children:"No orders have been placed in this system yet."}),n.jsx("button",{onClick:()=>O("menu"),className:"mt-2 px-6 py-2 border border-[#c9a84c]/20 text-[#c9a84c] text-xs uppercase tracking-widest hover:border-[#c9a84c]",children:"Order a Pasta Formulation"})]}):jn.length===0?n.jsxs("div",{className:"text-center py-16 border border-[#c9a84c]/10 bg-[#0e0e0c] rounded-sm space-y-4 animate-fade-in",children:[n.jsx(jm,{className:"w-12 h-12 text-[#c9a84c]/30 mx-auto animate-pulse"}),n.jsx("p",{className:"text-[#a09080]",children:"No orders match the selected filter criteria."}),n.jsx("button",{onClick:()=>{Oa("all"),$t(""),ns("")},className:"mt-2 px-6 py-2 border border-[#c9a84c]/20 text-[#c9a84c] text-xs uppercase tracking-widest hover:border-[#c9a84c]",children:"Clear Active Filters"})]}):n.jsx("div",{className:"space-y-6",children:jn.map(r=>n.jsxs("div",{className:"border border-[#c9a84c]/15 bg-[#0e0e0c] p-6 rounded-sm space-y-4 hover:border-[#c9a84c]/30 transition-all",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-2 border-b border-[#c9a84c]/10 pb-3",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] font-bold uppercase block",children:r.id}),n.jsx("span",{className:"text-[11px] text-[#6a6050] font-mono-jetbrains",children:new Date(r.createdAt).toLocaleString()})]}),n.jsxs("div",{className:"flex items-center flex-wrap gap-2.5",children:[n.jsx("button",{onClick:()=>{Xl(r),Lt(r.id);const S=document.getElementById("history-prep-tracker");S&&S.scrollIntoView({behavior:"smooth",block:"center"})},className:"px-2.5 py-1 bg-[#161614] border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[9px] uppercase font-mono-jetbrains tracking-wider text-[#c9a84c] rounded transition-all cursor-pointer",children:"Track Prep"}),n.jsxs("button",{onClick:()=>Sa(r),className:"px-2.5 py-1 bg-[#c9a84c] hover:bg-[#d4b665] text-[#0a0a08] text-[9px] uppercase font-mono-jetbrains font-bold tracking-wider rounded transition-all cursor-pointer flex items-center gap-1 shadow-sm",title:"Instantly add all items from this order back into your cart",children:[n.jsx(bc,{className:"w-3 h-3"}),n.jsx("span",{children:"Quick Reorder"})]}),r.isMock?n.jsx("span",{className:"text-[10px] tracking-wider uppercase bg-[#c9a84c]/10 text-[#c9a84c] border border-[#c9a84c]/15 px-2 py-0.5 rounded-sm",children:"SANDBOX"}):n.jsx("span",{className:"text-[10px] tracking-wider uppercase bg-[#7ab860]/10 text-[#7ab860] border border-[#7ab860]/15 px-2 py-0.5 rounded-sm",children:"STRIPE PAID"}),n.jsxs("span",{className:"text-lg font-playfair text-[#c9a84c] font-bold",children:["$",r.totalAmount.toFixed(2)]})]})]}),n.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 text-xs text-[#a09080]",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] uppercase text-[#6a6050] tracking-wider block mb-1",children:"Customer & Delivery Info"}),n.jsx("div",{className:"font-semibold text-[#f0ead6]",children:r.customerName}),n.jsx("div",{children:r.customerEmail}),r.customerMobile&&n.jsxs("div",{children:["Mob: ",r.customerMobile]}),r.customerAddress&&n.jsxs("div",{className:"mt-1 font-mono-jetbrains text-[11px] text-[#f0ead6]",children:[r.customerAddress,", ACT ",r.customerPostcode||""]}),r.deliveryInstructions&&n.jsxs("div",{className:"mt-1 text-[#c9a84c] text-[10px] italic",children:['Instructions: "',r.deliveryInstructions,'"']})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] uppercase text-[#6a6050] tracking-wider block mb-1",children:"Formulations"}),n.jsx("ul",{className:"space-y-1 text-[#f0ead6]",children:r.items.map((S,M)=>n.jsxs("li",{className:"flex justify-between font-mono-jetbrains text-[11px]",children:[n.jsxs("span",{children:["• ",S.name]}),n.jsx("span",{className:"text-[#a09080]",children:S.price?`$${S.price}`:""})]},M))})]})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-3 pt-3 border-t border-[#c9a84c]/10",children:[n.jsxs("div",{className:"text-[11px] text-[#a09080] font-mono-jetbrains flex items-center gap-1.5",children:[n.jsx(ai,{className:"w-3.5 h-3.5 text-[#c9a84c]"}),n.jsxs("span",{children:[r.items.length," formulation item",r.items.length!==1?"s":""]})]}),n.jsxs("button",{onClick:()=>Sa(r),className:"w-full sm:w-auto px-4 py-2 bg-[#c9a84c] hover:bg-[#d4b665] text-[#0a0a08] text-xs font-mono-jetbrains font-bold uppercase tracking-wider rounded-sm transition-all cursor-pointer shadow-lg shadow-[#c9a84c]/10 flex items-center justify-center gap-2",children:[n.jsx(bc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"QUICK REORDER ALL ITEMS"})]})]})]},r.id))})]}),E==="wishlist"&&n.jsxs("div",{id:"view-wishlist",className:"max-w-7xl mx-auto px-6 py-12 space-y-12 animate-fade-in",children:[n.jsxs("div",{className:"text-center space-y-4",children:[n.jsx("span",{className:"text-[11px] tracking-[0.4em] text-[#c9a84c] uppercase font-bold block",children:"SAVED RECIPES & DESIRES"}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Your Saved Formulations"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"}),n.jsx("p",{className:"text-sm md:text-base text-[#a09080] max-w-xl mx-auto font-light",children:"Your curated personal archive of experimental pasta formulations. Add them directly to your order or clear them when ready."})]}),ue.length===0?n.jsxs("div",{className:"text-center py-20 border border-[#c9a84c]/10 bg-[#0e0e0c]/60 rounded-sm space-y-6",children:[n.jsx(pc,{className:"w-12 h-12 text-[#c9a84c]/20 mx-auto animate-pulse"}),n.jsx("p",{className:"text-lg text-[#a09080] font-light italic",children:"Your wishlist is currently empty."}),n.jsx("button",{onClick:()=>O("menu"),className:"px-8 py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-widest font-bold font-playfair hover:bg-[#d4b665] transition-all cursor-pointer rounded-sm",children:"EXPLORE THE LABORATORY MENU"})]}):n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex justify-between items-center text-xs text-[#a09080] tracking-wider uppercase border-b border-[#c9a84c]/20 pb-2",children:[n.jsxs("span",{children:["Saved items (",ue.length,")"]}),n.jsx("button",{onClick:()=>{R([]),localStorage.setItem("pasta_wishlist",JSON.stringify([]))},className:"text-red-400 hover:text-red-300 transition-colors cursor-pointer text-[10px]",children:"CLEAR WISHLIST"})]}),n.jsx("div",{id:"wishlist-items-grid",className:"grid md:grid-cols-2 gap-8",children:L.filter(r=>ue.includes(r.id)).map(r=>{const S=al[r.id]||{avg:5},M=de(r.id);return n.jsxs("div",{id:`wishlist-card-${r.id}`,className:`border bg-[#0e0e0c] p-6 md:p-8 flex flex-col justify-between transition-all duration-300 relative group rounded-sm ${M?"border-red-900/40 bg-[#0e0a0a]":"border-[#c9a84c]/20 hover:border-[#c9a84c]/50"}`,children:[M&&n.jsxs("div",{className:"absolute top-4 right-4 bg-[#8b1e13] text-[#f0ead6] border border-[#e26257]/60 font-mono-jetbrains font-bold text-[10px] tracking-[0.2em] px-3 py-1 uppercase rounded-sm shadow-lg flex items-center gap-1.5 z-10",children:[n.jsx(ha,{className:"w-3.5 h-3.5 text-[#f0ead6]"}),n.jsx("span",{children:"SOLD OUT"})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-start mb-4 pr-24",children:[n.jsxs("span",{className:"text-[11px] tracking-[0.15em] text-[#a09080] font-mono-jetbrains uppercase",children:[r.weight," • SERVES ",r.servings]}),n.jsxs("div",{className:"flex items-center gap-1.5 bg-[#161614] px-2.5 py-1 rounded border border-[#c9a84c]/10",children:[n.jsx(Ea,{className:"w-3.5 h-3.5 text-[#c9a84c] fill-[#c9a84c]"}),n.jsx("span",{className:"text-xs font-mono-jetbrains text-[#c9a84c] font-semibold",children:S.avg.toFixed(1)})]})]}),n.jsxs("div",{className:"flex justify-between items-baseline mb-2",children:[n.jsx("h3",{className:`text-2xl font-playfair transition-colors ${M?"text-[#a09080] line-through":"text-[#f0ead6] group-hover:text-[#c9a84c]"}`,children:r.name}),n.jsxs("span",{className:"text-xl font-playfair text-[#c9a84c] font-semibold",children:["$",r.price]})]}),n.jsx("p",{className:"text-[12px] tracking-[0.1em] text-[#c9a84c] uppercase font-bold italic mb-4",children:r.tagline}),n.jsx("p",{className:"text-sm text-[#a09080] leading-relaxed font-light mb-6",children:r.description})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-[#c9a84c]/10",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsxs("div",{className:"flex flex-grow gap-2",children:[M?n.jsxs("button",{disabled:!0,className:"flex-grow py-3 bg-[#1a1414] border border-[#3d2424] text-[#805050] text-xs tracking-[0.2em] font-bold cursor-not-allowed rounded-sm uppercase font-playfair flex items-center justify-center gap-1.5",children:[n.jsx(ha,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"SOLD OUT"})]}):n.jsx("button",{onClick:()=>fl(r),className:"flex-grow py-3 bg-[#c9a84c] text-[#0a0a08] text-xs tracking-[0.2em] font-bold hover:bg-[#d4b665] transition-all cursor-pointer rounded-sm uppercase font-playfair",children:"ADD TO ORDER"}),n.jsx("button",{onClick:()=>T(r.id),className:"px-3.5 py-3 border border-red-400/20 hover:border-red-400 hover:bg-red-400/5 text-red-400 rounded-sm transition-all cursor-pointer flex items-center justify-center shrink-0",title:"Remove from wishlist",children:n.jsx(bh,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-1.5 shrink-0 sm:w-[170px]",children:[n.jsxs("button",{onClick:()=>{ba(r.id),Ht(null),Bl(null),O("menu"),setTimeout(()=>{var z;(z=document.getElementById(`product-card-${r.id}`))==null||z.scrollIntoView({behavior:"smooth",block:"center"})},150)},className:"px-1 py-3 border border-[#c9a84c]/20 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[#c9a84c] text-[10px] tracking-wider font-semibold flex items-center justify-center gap-1 cursor-pointer rounded-sm",children:[n.jsx(ls,{className:"w-3.5 h-3.5 shrink-0"}),n.jsx("span",{children:"TIPS"})]}),n.jsxs("button",{onClick:()=>{Ht(r.id),ba(null),Bl(null),O("menu"),setTimeout(()=>{var z;(z=document.getElementById(`product-card-${r.id}`))==null||z.scrollIntoView({behavior:"smooth",block:"center"})},150)},className:"px-1 py-3 border border-[#c9a84c]/20 hover:border-[#c9a84c] hover:bg-[#c9a84c]/5 text-[#c9a84c] text-[10px] tracking-wider font-semibold flex items-center justify-center gap-1 cursor-pointer rounded-sm",children:[n.jsx(yc,{className:"w-3.5 h-3.5 shrink-0"}),n.jsx("span",{children:"PAIRINGS"})]})]})]}),n.jsxs("button",{onClick:()=>ra(r),className:"w-full py-2 border border-[#c9a84c]/10 hover:border-[#c9a84c]/30 hover:bg-[#c9a84c]/5 text-[#a09080] hover:text-[#c9a84c] text-[10px] tracking-[0.15em] font-mono-jetbrains uppercase transition-all rounded-sm flex items-center justify-center gap-1.5 cursor-pointer",title:"View nutritional facts for the pasta portion",children:[n.jsx(Eo,{className:"w-3.5 h-3.5 text-[#c9a84c]/70"}),n.jsx("span",{children:"NUTRITIONAL PROFILE"})]})]})]},r.id)})})]})]}),E==="admin"&&n.jsx("div",{id:"view-admin",className:"max-w-7xl mx-auto px-6 py-12 space-y-10 animate-fade-in",children:Ce?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"text-center space-y-4 relative",children:[n.jsx("div",{className:"absolute right-0 top-0 hidden md:block",children:n.jsxs("button",{onClick:()=>{Ue(!1),O("home")},className:"px-3.5 py-1.5 bg-[#1a1a18] border border-red-500/30 hover:border-red-500 text-red-400 hover:bg-red-950/60 rounded text-xs font-mono-jetbrains flex items-center gap-1.5 cursor-pointer transition-colors",title:"Lock Kitchen Portal",children:[n.jsx(mn,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"LOCK PORTAL"})]})}),n.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-[#111110] border border-[#c9a84c]/40 rounded-full text-[#c9a84c] text-xs font-mono-jetbrains uppercase tracking-widest",children:[n.jsx(gc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"STAFF & MANAGEMENT PORTAL"})]}),n.jsx("h2",{className:"text-4xl md:text-5xl font-playfair font-normal",children:"Kitchen & Corporate Management"}),n.jsx("div",{className:"w-12 h-[1px] bg-[#c9a84c] mx-auto mt-4"}),n.jsx("p",{className:"text-sm md:text-base text-[#a09080] max-w-2xl mx-auto font-light",children:"Manage kitchen inventory, edit fresh pasta recipes, and generate professional corporate Outlook emails for suppliers and customers."}),n.jsx("div",{className:"md:hidden pt-2",children:n.jsxs("button",{onClick:()=>{Ue(!1),O("home")},className:"px-3.5 py-1.5 bg-[#1a1a18] border border-red-500/30 text-red-400 rounded text-xs font-mono-jetbrains inline-flex items-center gap-1.5 cursor-pointer",children:[n.jsx(mn,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"LOCK PORTAL"})]})})]}),n.jsxs("div",{className:"flex justify-center items-center gap-3 border-b border-[#c9a84c]/20 pb-4 pt-2 flex-wrap",children:[n.jsxs("button",{id:"admin-tab-menu",onClick:()=>W("menu"),className:`px-5 py-2.5 rounded text-xs font-mono-jetbrains uppercase tracking-wider transition-all flex items-center gap-2 cursor-pointer ${Se==="menu"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-lg shadow-[#c9a84c]/20":"bg-[#111110] border border-[#c9a84c]/30 text-[#a09080] hover:text-[#f0ead6] hover:border-[#c9a84c]"}`,children:[n.jsx(gc,{className:"w-4 h-4"}),n.jsx("span",{children:"Kitchen Stock & Menu"})]}),n.jsxs("button",{id:"admin-tab-email",onClick:()=>W("email"),className:`px-5 py-2.5 rounded text-xs font-mono-jetbrains uppercase tracking-wider transition-all flex items-center gap-2 cursor-pointer ${Se==="email"?"bg-[#c9a84c] text-[#0a0a08] font-bold shadow-lg shadow-[#c9a84c]/20":"bg-[#111110] border border-[#c9a84c]/30 text-[#a09080] hover:text-[#f0ead6] hover:border-[#c9a84c]"}`,children:[n.jsx(ti,{className:"w-4 h-4"}),n.jsx("span",{children:"Outlook Email Studio"})]})]}),Se==="menu"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"bg-[#111110] border border-[#c9a84c]/30 p-6 rounded-sm flex flex-col lg:flex-row justify-between items-center gap-6 shadow-xl",children:[n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 md:gap-6 text-center lg:text-left font-mono-jetbrains w-full lg:w-auto",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#a09080] uppercase block",children:"TOTAL DISHES"}),n.jsx("span",{className:"text-2xl font-bold font-playfair text-[#f0ead6]",children:L.length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#a09080] uppercase block",children:"IN STOCK"}),n.jsx("span",{className:"text-2xl font-bold font-playfair text-emerald-400",children:L.filter(r=>!de(r.id)&&!y(r)).length})]}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-xs text-amber-400/90 uppercase block flex items-center justify-center lg:justify-start gap-1",children:[n.jsx(as,{className:"w-3 h-3 text-amber-400 shrink-0"}),n.jsx("span",{children:"LOW STOCK"})]}),n.jsx("span",{className:"text-2xl font-bold font-playfair text-amber-400",children:L.filter(r=>y(r)).length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-[#a09080] uppercase block",children:"SOLD OUT"}),n.jsx("span",{className:"text-2xl font-bold font-playfair text-red-400",children:J.length})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-3 w-full lg:w-auto justify-end",children:[n.jsxs("button",{onClick:D,className:"px-5 py-2.5 bg-[#c9a84c] text-[#0a0a08] font-bold text-xs tracking-wider font-mono-jetbrains uppercase rounded hover:bg-[#d4b665] transition-all cursor-pointer shadow-lg shadow-[#c9a84c]/20 flex items-center gap-2",children:[n.jsx(Ro,{className:"w-4 h-4"}),n.jsx("span",{children:"ADD NEW PASTA DISH"})]}),J.length>0&&n.jsxs("button",{onClick:()=>{Y([]),localStorage.setItem("pasta_sold_out_ids",JSON.stringify([]))},className:"px-4 py-2.5 bg-[#1d1616] border border-red-500/40 text-red-300 hover:bg-red-950/80 text-xs font-mono-jetbrains tracking-wider uppercase rounded transition-colors cursor-pointer flex items-center gap-1.5",children:[n.jsx(Pa,{className:"w-4 h-4 text-emerald-400"}),n.jsx("span",{children:"RESTOCK ALL ITEMS"})]}),n.jsxs("button",{onClick:Ze,className:"px-3.5 py-2.5 border border-[#c9a84c]/20 hover:border-[#c9a84c] text-[#a09080] hover:text-[#f0ead6] text-xs font-mono-jetbrains tracking-wider uppercase rounded transition-colors cursor-pointer flex items-center gap-1.5",title:"Reset menu to default signature dishes",children:[n.jsx(bc,{className:"w-3.5 h-3.5 text-[#c9a84c]"}),n.jsx("span",{children:"RESET MENU"})]})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex justify-between items-center border-b border-[#c9a84c]/20 pb-3 text-xs font-mono-jetbrains uppercase tracking-wider text-[#a09080]",children:[n.jsxs("span",{children:["Active Menu Catalog (",L.length," items)"]}),n.jsx("span",{children:"Manage Stock & Low Stock Thresholds"})]}),n.jsx("div",{className:"grid grid-cols-1 gap-4",children:L.map(r=>{const S=de(r.id),M=y(r),z=V(r),P=I(r);return n.jsxs("div",{className:`p-5 rounded-sm border transition-all flex flex-col md:flex-row justify-between items-start md:items-center gap-4 ${S?"bg-[#140b0b] border-red-900/50 shadow-inner":M?"bg-[#141008] border-amber-500/50 shadow-md":"bg-[#0e0e0c] border-[#c9a84c]/20 hover:border-[#c9a84c]/50"}`,children:[n.jsxs("div",{className:"space-y-1.5 max-w-xl",children:[n.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsx("h3",{className:`text-xl font-playfair ${S?"text-red-300 line-through":"text-[#f0ead6]"}`,children:r.name}),n.jsxs("span",{className:"text-[#c9a84c] font-playfair font-bold text-lg",children:["$",r.price," AUD"]}),n.jsx("span",{className:"text-[10px] font-mono-jetbrains bg-[#1a1a18] border border-[#c9a84c]/20 px-2 py-0.5 rounded text-[#a09080]",children:r.category||"Fresh Hand-Cut"}),S?n.jsxs("span",{className:"bg-red-950 text-red-300 border border-red-500/50 text-[10px] font-mono-jetbrains font-bold px-2 py-0.5 rounded uppercase flex items-center gap-1",children:[n.jsx(ha,{className:"w-3 h-3 text-red-400"}),n.jsx("span",{children:"SOLD OUT"})]}):M?n.jsxs("span",{className:"bg-amber-950/90 text-amber-300 border border-amber-500/60 text-[10px] font-mono-jetbrains font-bold px-2 py-0.5 rounded uppercase flex items-center gap-1 animate-pulse",children:[n.jsx(as,{className:"w-3 h-3 text-amber-400 shrink-0"}),n.jsxs("span",{children:["LOW STOCK (",z," LEFT)"]})]}):n.jsxs("span",{className:"bg-emerald-950/80 text-emerald-300 border border-emerald-500/40 text-[10px] font-mono-jetbrains font-bold px-2 py-0.5 rounded uppercase flex items-center gap-1",children:[n.jsx(Pa,{className:"w-3 h-3 text-emerald-400"}),n.jsxs("span",{children:["IN STOCK (",z," LEFT)"]})]})]}),n.jsx("p",{className:"text-sm text-[#e8e0d0] font-normal leading-relaxed line-clamp-2",children:r.description}),n.jsxs("div",{className:"text-[11px] text-[#6a6050] font-mono-jetbrains flex items-center gap-3 flex-wrap",children:[n.jsxs("span",{children:["Portion: ",r.weight]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Serves: ",r.servings]}),n.jsx("span",{children:"•"}),n.jsxs("span",{className:M?"text-amber-400 font-bold flex items-center gap-1":"text-[#a09080]",children:[M&&n.jsx(as,{className:"w-3 h-3 text-amber-400 inline shrink-0"}),"Kitchen Stock: ",n.jsxs("strong",{className:M?"text-amber-300 font-bold":"text-[#f0ead6]",children:[z," units"]})," (Alert threshold: ≤",P,")"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2.5 w-full md:w-auto justify-end border-t md:border-t-0 border-[#c9a84c]/10 pt-3 md:pt-0 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-1 bg-[#141412] border border-[#c9a84c]/30 rounded px-2 py-1",title:"Adjust current kitchen stock count",children:[n.jsx("span",{className:"text-[10px] font-mono-jetbrains text-[#a09080] uppercase font-bold mr-1",children:"Qty:"}),n.jsx("button",{onClick:()=>A(r.id,-1),className:"w-6 h-6 bg-[#0a0a08] border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#f0ead6] rounded flex items-center justify-center cursor-pointer font-bold text-xs hover:bg-[#c9a84c]/20 transition-colors",title:"Decrease stock count",children:n.jsx(Eh,{className:"w-3 h-3 text-[#c9a84c]"})}),n.jsx("span",{className:`min-w-[24px] text-center font-mono-jetbrains text-xs font-bold ${S?"text-red-400 line-through":M?"text-amber-300":"text-[#f0ead6]"}`,children:z}),n.jsx("button",{onClick:()=>A(r.id,1),className:"w-6 h-6 bg-[#0a0a08] border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#f0ead6] rounded flex items-center justify-center cursor-pointer font-bold text-xs hover:bg-[#c9a84c]/20 transition-colors",title:"Increase stock count",children:n.jsx(Ro,{className:"w-3 h-3 text-[#c9a84c]"})})]}),n.jsx("button",{onClick:()=>vt(r.id),className:`px-3 py-2 rounded text-xs font-mono-jetbrains font-bold uppercase transition-all flex items-center gap-1.5 cursor-pointer ${S?"bg-emerald-950 text-emerald-300 border border-emerald-500/60 hover:bg-emerald-900":"bg-red-950 text-red-300 border border-red-500/60 hover:bg-red-900"}`,title:"Toggle between In Stock and Sold Out",children:S?n.jsxs(n.Fragment,{children:[n.jsx(Pa,{className:"w-3.5 h-3.5 text-emerald-400"}),n.jsx("span",{children:"RESTOCK"})]}):n.jsxs(n.Fragment,{children:[n.jsx(ha,{className:"w-3.5 h-3.5 text-red-400"}),n.jsx("span",{children:"SOLD OUT"})]})}),n.jsxs("button",{onClick:()=>Z(r),className:"px-3 py-2 bg-[#1a1a18] border border-[#c9a84c]/30 hover:border-[#c9a84c] text-[#c9a84c] hover:bg-[#c9a84c]/10 rounded text-xs font-mono-jetbrains transition-colors cursor-pointer flex items-center gap-1",title:"Edit formulation details, price, or stock threshold",children:[n.jsx(zo,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"EDIT"})]}),n.jsxs("button",{onClick:()=>fe(r.id,r.name),className:"px-3 py-2 bg-[#1d1212] border border-red-500/30 hover:border-red-500 text-red-400 hover:bg-red-950 rounded text-xs font-mono-jetbrains transition-colors cursor-pointer flex items-center gap-1",title:"Remove dish permanently from menu",children:[n.jsx(Sm,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"REMOVE"})]})]})]},r.id)})})]})]}),Se==="email"&&n.jsx("div",{className:"pt-2",children:n.jsx(op,{onBackToMenu:()=>W("menu")})})]}):n.jsxs("div",{className:"max-w-md mx-auto my-12 bg-[#111110] border border-[#c9a84c]/30 rounded-sm p-8 text-center space-y-6 shadow-2xl",children:[n.jsx("div",{className:"w-16 h-16 bg-[#c9a84c]/10 border border-[#c9a84c]/30 rounded-full flex items-center justify-center mx-auto text-[#c9a84c]",children:n.jsx(mn,{className:"w-8 h-8"})}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-3xl font-playfair font-semibold text-[#f0ead6]",children:"Restricted Area"}),n.jsx("p",{className:"text-sm text-[#a09080] font-mono-jetbrains",children:"The Kitchen Admin Portal is reserved for staff. Please enter your PIN to access inventory controls."})]}),n.jsxs("button",{onClick:kt,className:"w-full py-3 bg-[#c9a84c] text-[#0a0a08] font-bold text-sm font-mono-jetbrains uppercase tracking-wider rounded hover:bg-[#d4b665] transition-all cursor-pointer shadow-lg shadow-[#c9a84c]/20 flex items-center justify-center gap-2",children:[n.jsx(mn,{className:"w-4 h-4"}),n.jsx("span",{children:"Enter Kitchen PIN"})]})]})})]}),n.jsx("footer",{className:"print:hidden bg-[#0a0a08] border-t border-[#c9a84c]/20 py-12 px-6 text-center text-[#a09080] text-xs",children:n.jsxs("div",{className:"max-w-4xl mx-auto space-y-4",children:[n.jsx("p",{className:"tracking-widest uppercase font-semibold text-[#f0ead6] font-playfair text-sm",children:"THE PASTA LAB"}),n.jsx("p",{children:"Hand-crafted with semolina, flour, eggs, and precision in Canberra, ACT, Australia."}),n.jsx("div",{className:"w-16 h-[1px] bg-[#c9a84c]/30 mx-auto"}),n.jsx("p",{className:"text-[11px] font-mono-jetbrains tracking-wider text-[#6a6050]",children:"admin@thepastalab.com.au • thepastalab.com.au • Canberra ACT 2600"}),n.jsxs("div",{className:"pt-1 flex justify-center items-center gap-6",children:[n.jsxs("button",{onClick:()=>kt("email"),className:"text-[#a09080] hover:text-[#c9a84c] font-mono-jetbrains text-[10px] uppercase tracking-widest inline-flex items-center gap-1.5 cursor-pointer opacity-70 hover:opacity-100 transition-opacity",children:[n.jsx(ti,{className:"w-3 h-3 text-[#c9a84c]"}),n.jsx("span",{children:"Outlook Email Studio"})]}),n.jsx("span",{className:"text-[#a09080]/30",children:"•"}),n.jsxs("button",{onClick:()=>kt("menu"),className:"text-[#a09080] hover:text-[#c9a84c] font-mono-jetbrains text-[10px] uppercase tracking-widest inline-flex items-center gap-1.5 cursor-pointer opacity-50 hover:opacity-100 transition-opacity",children:[n.jsx(mn,{className:"w-3 h-3 text-[#a09080]"}),n.jsx("span",{children:"Staff Access Portal"})]})]}),n.jsx("p",{className:"text-[10px] tracking-[0.3em] uppercase text-[#c9a84c] font-bold pt-1",children:"PRECISION • PASTA • PLEASURE"})]})}),wa(),ie(),Kt(),$l(),n.jsxs("button",{id:"floating-voice-agent-btn",onClick:()=>za(!0),className:"fixed bottom-6 right-6 z-40 p-3.5 md:p-4 bg-gradient-to-r from-[#c9a84c] to-[#96762c] text-[#0a0a08] font-bold rounded-full shadow-2xl hover:scale-105 active:scale-95 transition-all flex items-center gap-2.5 group ring-4 ring-[#c9a84c]/20 cursor-pointer",title:"Speak with Nonna Rosa (AI Voice Concierge)",children:[n.jsxs("div",{className:"relative flex items-center justify-center",children:[n.jsx(jc,{className:"w-5 h-5 group-hover:animate-bounce"}),n.jsx("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-red-500 rounded-full animate-ping"})]}),n.jsx("span",{className:"hidden sm:inline text-xs font-serif font-bold tracking-wide uppercase pr-1",children:"Ask Nonna Rosa"})]}),n.jsx(up,{isOpen:is,onClose:()=>za(!1),products:L,cart:B,onAddToCart:fl,onOpenCart:()=>{za(!1),O("order")}})]})}Lx.createRoot(document.getElementById("root")).render(n.jsx(k.StrictMode,{children:n.jsx(dp,{})}));