PageSourceSearch

https://ffai-tib.lovable.app/assets/floor._floorId.room._roomId-D_08GbzN.js

js ffai-tib.lovable.app collected 2026-10-03 03:32:38 UTC 512,904 bytes, 23 lines download raw bytes

1import{c as H,w as ca,r as x,x as yr,q as Je,t as v,bi as un,a5 as ue,ac as ma,j as e,a0 as X,a3 as vr,J as V,L as j,F as xn,R as gn,U as hn,N as fn,ai as pa,aj as ua,a9 as bn,a2 as xa,ak as Ss,V as jr,Y as Nr,W as os,C as Cs,aP as yn,ad as ga,ae as ha,af as fa,ag as ba,bp as vn,a7 as ya,aO as yt,H as ls,bH as z,bI as Dt,aE as mr,bm as jn,ah as Nn,bJ as wn,bG as kn,bK as Sn,aG as As,bL as Or,bM as Is,bN as es,aI as wr,am as Ms,a4 as jt,X as Cn,B as Re,b as Ut,aF as ds,n as An,m as In}from"./index-CWHMBte_.js";import{P as dr}from"./Panel-Csk_gV5u.js";import{P as Mn}from"./PageHeader-BRWhOMTt.js";import{u as Rn}from"./useAgentAccess-Jw8Wg2BM.js";import{r as Pn,c as $n,b as Dn,a as Tn}from"./deliverables.functions-CSz135BU.js";import{C as kr}from"./compass-Cdd5N5vC.js";import{L as pr}from"./loader-circle-C8bWfHdc.js";import{R as Fn}from"./rotate-ccw-D8u-qaSy.js";import{C as st}from"./circle-check-B2Wz_37W.js";import{D as ye}from"./download-nj-ZS-fB.js";import{M as ts}from"./map-pin-CzgbZHqc.js";import{H as On,E as va,W as En}from"./wrench-wcZYJNhN.js";import{C as Ln}from"./calendar-Bfw5IV3j.js";import{Z as _n}from"./zap-5YKP5A42.js";import{C as ie}from"./clock-B6DREN58.js";import{T as re}from"./triangle-alert-CySzMDU-.js";import{I as Er}from"./input-Dh5ghECA.js";import{L as nr}from"./label-6UWDe6kL.js";import{P as De}from"./plus-D2-wuwri.js";import{r as Bn}from"./room-exec-Dwwl5A8w.js";import{j as Hn}from"./jamie-welcome-BsKgLj0M.js";import{c as Wn,b as Vn,a as Gn}from"./consultant-kristina-BLslaZ1h.js";import{A as ja}from"./arrow-left-DZnnBOBD.js";import{F as Un,B as _t}from"./file-chart-column-increasing-9jO0Keei.js";import{G as cs}from"./gauge-Zgtfc1ZN.js";import{F as J}from"./file-text-CatqSpC2.js";import{M as Sr}from"./minus-BXO2bJf7.js";import{M as Na}from"./mail-DDf0Pv5X.js";import{P as wa}from"./play-DEQAFbRN.js";import{M as rs}from"./message-square-B-ZwEE_z.js";import{P as ka}from"./pencil-BS3Fg6SG.js";import{T as Sa}from"./telescope-Bd5KdeJc.js";import{M as Ca}from"./message-circle-question-mark-Di7F8glh.js";import"./index-BrfnB0Gn.js";const zn=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Yn=H("activity",zn);const qn=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ze=H("badge-check",qn);const Kn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],ms=H("calendar-days",Kn);const Qn=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],Jn=H("chart-pie",Qn);const Xn=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],tt=H("coins",Xn);const Zn=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Aa=H("cpu",Zn);const ei=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Ia=H("crown",ei);const ti=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],ri=H("dollar-sign",ti);const si=[["path",{d:"M11 20H2",key:"nlcfvz"}],["path",{d:"M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z",key:"au4z13"}],["path",{d:"M11 4H8a2 2 0 0 0-2 2v14",key:"74r1mk"}],["path",{d:"M14 12h.01",key:"1jfl7z"}],["path",{d:"M22 20h-3",key:"vhrsz"}]],Ma=H("door-open",si);const ai=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",ke
1y:"1slcih"}]],ni=H("flame",ai);const ii=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],ps=H("gem",ii);const oi=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]],zt=H("gift",oi);const li=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],Ra=H("hammer",li);const di=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],ci=H("heart",di);const mi=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Pa=H("key-round",mi);const pi=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],$a=H("landmark",pi);const ui=[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]],us=H("microscope",ui);const xi=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],gi=H("package",xi);const hi=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Da=H("presentation",hi);const fi=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],Bt=H("scale",fi);const bi=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ta=H("shield-alert",bi);const yi=[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]],Rs=H("shirt",yi);const vi=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],rt=H("trending-down",vi);const ji=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Pe=H("trending-up",ji);const Ni=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],Fa=H("truck",Ni);const wi=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}
1],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],ki=H("user-round",wi),Si=3;async function Ci(t,r){try{const s=await xn();if(s.length>=Si){v.info("Mission slots full — open My Missions to make room");return}const a=`First Mission · ${t.label}`,i={id:crypto.randomUUID(),title:a,intent:"idea-holder",primary:s.length===0,stages:{...hn(),idea:!0},activities:{...gn(),tools:1}};await fn(i,s.length);try{window.dispatchEvent(new CustomEvent("tib:missions:changed"))}catch{}const d=s.length+1;v.success(`Added to My Missions (slot ${d}) — open Mission Progress to refine`)}catch(s){console.error("[quickstart] seed mission failed",s)}}const Lr=[{key:"profile_complete",title:"Complete your profile",blurb:"Mr FFAI captures your name, role, and goals so every agent knows who you are.",icon:ki,to:"/floor/0/room/welcome",cta:"Meet Mr FFAI"},{key:"membership_chosen",title:"Pick your membership",blurb:"Free is fine — but you need to decide so the right floors and agents unlock.",icon:un,to:"/floor/0/room/general-store",cta:"Open the Store"},{key:"met_agents",title:"Meet your AI team",blurb:"Browse the roster. Knowing who does what makes routing real work 10× faster.",icon:ue,to:"/agents",cta:"Visit Agents"},{key:"took_tour",title:"Take the building tour",blurb:"One pass through the floors so you know where every workstream lives.",icon:kr,to:"/floor/0/room/navigation",cta:"Start the Tour"},{key:"first_mission",title:"Run your First Mission",blurb:"Pick a real problem, hand it to an agent, ship one real deliverable.",icon:ma,cta:"Use the panel →"}],_r=[{id:"sales-followup",label:"Draft a sales follow-up email",agentId:"nova",prompt:"Draft a punchy 120-word follow-up email to a prospect I demoed to last week. Re-frame the value, include one social proof line, and end with a clear next-step CTA."},{id:"sop-outline",label:"Outline an SOP for a recurring task",agentId:"atlas",prompt:"Write a clean SOP for handling a new customer's first 30 days: trigger, owner, step-by-step actions, checks, and the definition of done."},{id:"investor-blurb",label:"Write a one-page investor blurb",agentId:"aiden",prompt:"Produce a tight one-page investor blurb for my business: problem, solution, who we serve, why now, traction signals, and the ask. Crisp, no fluff."},{id:"gtm-brief",label:"Sketch a GTM brief",agentId:"vega",prompt:"Sketch a 90-day go-to-market brief: ICP, primary channel, secondary channel, message pillars, two campaign concepts, and the leading metric I should watch."},{id:"growth-ideas",label:"Find 5 ways to grow revenue this quarter",agentId:"vega",prompt:"Give me 5 concrete, low-cost ways to grow revenue this quarter. For each: the play, why it works, what to do this week, and how to measure it."}];function Ai(){const{profile:t}=ca(),[r,s]=x.useState(null),[a,i]=x.useState(!0),[d,l]=x.useState(_r[0].id),[n,o]=x.useState(""),[c,u]=x.useState(!1),m=yr(Pn),g=!!(t?.onboarding&&t.onboarding.completed_at);x.useEffect(()=>{let b=!1;return(async()=>{const{data:N}=await Je.auth.getUser(),M=N.user?.id;if(!M)return;const{data:$,error:F}=await Je.from("quickstart_progress").select("*").eq("user_id",M).maybeSingle();if(!b){if(F){console.error("[quickstart] load failed",F),v.error("Couldn't load your progress"),i(!1);return}if($)if(g&&!$.profile_complete){const D=await Je.from("quickstart_progress").update({profile_complete:!0}).eq("user_id",M).select("*").single();!b&&!D.error?s(D.data):b||s($)}else s($);else{const D=await Je.from("quickstart_progress").insert({user_id:M,profile_complete:g}).select("*").single();!b&&!D.error&&s(D.data)}i(!1)}})(),()=>{b=!0}},[g]);async function p(b){if(!r||r[b])return;const N={...r,[b]:!0};s(N);const{error:M}=await Je.from("quickstart_progress").update({[b]:!0}).eq("user_id",r.user_id);M&&(v.error("Couldn't save progress"),s(r))}async function y(){if(!r||!window.confirm("Reset the 5-step quickstart? Your checklist progress will be cleared so you can walk through it again."))return;const b={...r,profile_complete:!1,membership_chosen:!1,met_agents:!1,took_tour:!1,first_mission_deliverable_id:null,first_mission_prompt:null,first_mission_agent_id:null,completed_at:null};s(b);const{error:N}=await Je.from("quickstart_progress").update({profile_complete:!1,membership_chosen:!1,met_agents:!1,took_tour:!1,first_mission_deliverable_id:null,first_mission_prompt:null,first_mission_agent_id:null,completed_at:null}).eq("user_id",r.user_id);N?(v.error("Couldn't reset progress"),s(r)):v.success("Quickstart reset — walk through the 5 steps again")}function f(){try{window.sessionStorage.setItem("tib:forceOnboarding","1"),window.dispatchEvent(new Event("tib:forceOnboarding"))}catch{}}const S=b=>r?b.key==="first_mission"?!!r.first_mission_deliverable_id:r[b.key]:!1,h=x.useMemo(()=>r?Lr.filter(b=>S(b)).length:0,[r]),w=Lr.length,I=Math.round(h/w*100),O=h===w;async function P(){if(!r)return;const b=_r.find($=>
1$.id===d),N=n.trim()||b.prompt,M=b.agentId;u(!0);try{const F=(await m({data:{agentId:M,prompt:N,kind:"auto"}})).deliverable,{error:D}=await Je.from("quickstart_progress").update({first_mission_deliverable_id:F.id,first_mission_prompt:N,first_mission_agent_id:M,completed_at:O?new Date().toISOString():null}).eq("user_id",r.user_id);if(D)throw new Error(D.message);s({...r,first_mission_deliverable_id:F.id,first_mission_prompt:N,first_mission_agent_id:M}),v.success("Mission complete — deliverable saved"),Ci(b,N)}catch($){v.error($ instanceof Error?$.message:"Mission failed")}finally{u(!1)}}return a?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(pr,{className:"h-3.5 w-3.5 animate-spin"})," Loading your quickstart…"]}):e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx(X,{className:"h-3 w-3"}),"Quickstart & First Mission"]}),e.jsx("h1",{className:"font-display text-4xl text-foreground glow-text mt-3",children:"Get operational in 15 minutes"}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2",children:"Five steps · One real deliverable · One progress ring"}),e.jsxs("div",{className:"mt-5 flex items-center gap-5",children:[e.jsx(Ri,{pct:I}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-display text-2xl text-primary glow-text leading-none",children:[h," ",e.jsxs("span",{className:"text-foreground/60 text-base",children:["/ ",w]})]}),e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:"Steps complete"}),O&&e.jsx("div",{className:"mt-2 text-[11px] tracking-[0.2em] uppercase text-emerald-300",children:"You're operational"})]})]}),e.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-2",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-sm text-primary glow-text mb-2",children:"Quickstart Checklist"}),e.jsx("div",{className:"space-y-2",children:Lr.map(b=>e.jsx(Ii,{step:b,done:S(b),onGo:()=>{b.key!=="first_mission"&&p(b.key)},onRevisit:b.key==="profile_complete"?f:void 0},b.key))})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-sm text-primary glow-text mb-2",children:"First Mission"}),r?.first_mission_deliverable_id?e.jsx(Mi,{prompt:r.first_mission_prompt??"",agentId:r.first_mission_agent_id??""}):e.jsxs("div",{className:"rounded-md glass border border-primary/25 p-3 space-y-3",children:[e.jsx("div",{className:"text-[11px] tracking-[0.22em] uppercase text-muted-foreground",children:"1 · Pick a real problem"}),e.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:_r.map(b=>e.jsxs("button",{type:"button",onClick:()=>l(b.id),className:`text-left text-xs rounded px-2.5 py-2 border transition ${d===b.id?"border-primary/70 bg-primary/10 text-foreground":"border-border/40 hover:border-primary/40 text-foreground/80"}`,children:[e.jsxs("span",{className:"text-[9px] tracking-[0.22em] uppercase text-primary mr-2",children:["→ ",b.agentId]}),b.label]},b.id))}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:"2 · Or write your own brief (optional)"}),e.jsx("textarea",{value:n,onChange:b=>o(b.target.value),placeholder:"Override the starter with your own brief…",rows:3,className:"w-full glass rounded px-2.5 py-2 text-xs border border-border/40 focus:border-primary/60 outline-none resize-none"})]}),e.jsx("button",{type:"button",onClick:()=>{P()},disabled:c,className:"w-full inline-flex items-center justify-center gap-2 px-3 py-2 rounded-md bg-primary text-primary-foreground text-xs tracking-[0.18em] uppercase hover:opacity-90 disabled:opacity-50 transition",children:c?e.jsxs(e.Fragment,{children:[e.jsx(pr,{className:"h-3.5 w-3.5 animate-spin"})," Running mission…"]}):e.jsxs(e.Fragment,{children:[e.jsx(ma,{className:"h-3.5 w-3.5"})," Run my First Mission"]})}),e.jsx("p",{className:"text-[10px] text-muted-foreground leading-snug",children:"The matched agent will produce a real deliverable saved to your Deliverables list."})]})]})]}),e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsxs("button",{type:"button",onClick:()=>{y()},className:"inline-flex items-center gap-1.5 text-[10px] tracking-[0.22em] uppercase px-2.5 py-1.5 rounded border border-border/50 text-muted-foreground hover:border-primary/60 hover:text-primary transition",title:"Clear checklist progress and start the 5 steps again",children:[e.jsx(Fn,{className:"h-3 w-3"})," Reset 5-step Quickstart"]})})]})}function Ii({step:t,done:r,onGo:s,onRevisit:a}){const i=t.icon;return e.jsxs("div",{className:`flex items-center gap-3 rounded-md border p-2.5 transition ${r?"border-emerald-400/40 bg-emerald-400/5":"border-border/40 hover:border-primary/40 glass"}`,children:[e.jsx("div",{className:"shrink-0",children:r?e.jsx(st,{className:"h-5 w-5 text-emerald-300"}):e.jsx(vr,{className:"h-5 w-5 text-muted-foreground"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(i,{className:"h-3.5 w-3.5 text-primary"}
1),e.jsx("div",{className:"text-xs font-medium text-foreground/95",children:t.title})]}),e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5 leading-snug",children:t.blurb})]}),r&&a?e.jsxs("button",{type:"button",onClick:a,className:"shrink-0 inline-flex items-center gap-1 text-[10px] tracking-[0.2em] uppercase px-2.5 py-1.5 rounded border border-primary/40 text-primary hover:bg-primary hover:text-primary-foreground transition",children:["Revisit",e.jsx(V,{className:"h-3 w-3"})]}):t.to?e.jsxs(j,{to:t.to,onClick:s,className:"shrink-0 inline-flex items-center gap-1 text-[10px] tracking-[0.2em] uppercase px-2.5 py-1.5 rounded border border-primary/40 text-primary hover:bg-primary hover:text-primary-foreground transition",children:[r?"Revisit":t.cta,e.jsx(V,{className:"h-3 w-3"})]}):e.jsx("span",{className:"shrink-0 text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:r?"Done":t.cta})]})}function Mi({prompt:t,agentId:r}){return e.jsxs("div",{className:"rounded-md border border-emerald-400/40 bg-emerald-400/5 p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.24em] uppercase text-emerald-300",children:[e.jsx(st,{className:"h-3.5 w-3.5"})," Mission complete · ",r]}),e.jsx("p",{className:"text-xs text-foreground/85 leading-snug line-clamp-3",children:t}),e.jsxs(j,{to:"/room/$agentId",params:{agentId:r},className:"inline-flex items-center gap-1.5 text-[10px] tracking-[0.2em] uppercase px-2.5 py-1.5 rounded border border-primary/40 text-primary hover:bg-primary hover:text-primary-foreground transition",children:[e.jsx(ye,{className:"h-3 w-3"})," Open ",r,"'s Room"]})]})}function Ri({pct:t}){const i=2*Math.PI*29,d=i-t/100*i;return e.jsxs("svg",{width:64,height:64,className:"-rotate-90",children:[e.jsx("circle",{cx:64/2,cy:64/2,r:29,stroke:"currentColor",strokeWidth:6,fill:"none",className:"text-border/40"}),e.jsx("circle",{cx:64/2,cy:64/2,r:29,stroke:"currentColor",strokeWidth:6,fill:"none",strokeDasharray:i,strokeDashoffset:d,strokeLinecap:"round",className:"text-primary transition-all duration-500"})]})}const Pi="/__l5e/assets-v1/f6c8551e-e9c8-4f80-9ef9-08252c31d2d7/ffai-complex.jpg",$i={url:Pi},Di=[{id:"tower-consultants",label:"Senior Consultants",subtitle:"Human experts on call",blurb:"The top of the Control Tower — where the senior human consultants keep watch. Bring them anything you'd rather not hand to an AI: judgement calls, sensitive deals, last-mile review.",to:"/consultants/senior",top:"21%",left:"27%"},{id:"tower-schedule",label:"Schedule a Session",subtitle:"Book a working call",blurb:"The observation deck. Pick a time on a consultant's calendar for a live working session — strategy, review, or a hand-on-shoulder unblock.",to:"/consultants/schedule",top:"32%",left:"26%"},{id:"tower-help",label:"Help & Support",subtitle:"Humans behind the help desk",blurb:"The mid-tower help desk. Articles, FAQs, and a real support queue when something in TIB isn't behaving — staffed by people, not bots.",to:"/help",top:"57%",left:"25%"},{id:"tower-admin",label:"Admin Deck",subtitle:"Users, access, workspace",blurb:"The control room at the base of the tower. Manage users, roles, agent access, and workspace settings. Admins only.",to:"/admin/users",top:"76%",left:"27%",adminOnly:!0}],Ti={8:{top:"16%",left:"76%"},7:{top:"23%",left:"74%"},6:{top:"30%",left:"76%"},5:{top:"37%",left:"74%"},4:{top:"44%",left:"76%"},3:{top:"51%",left:"74%"},2:{top:"59%",left:"76%"},1:{top:"68%",left:"82%"},0:{top:"78%",left:"72%"}};function Fi(){const t=pa(),r=ua(),s=bn(),[a,i]=x.useState(null),d=x.useMemo(()=>[...t.data??[]].sort((n,o)=>o.id-n.id),[t.data]),l=Di.filter(n=>!n.adminOnly||s);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),"Building Tour · The FFAI Complex"]}),e.jsx("h1",{className:"font-display text-4xl text-foreground glow-text mt-3",children:"Welcome to the FFAI Complex"}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2",children:"Floor G · Find the right floor, the right room, the right person"}
1),e.jsxs("p",{className:"mt-5 text-sm text-foreground/85 max-w-3xl leading-relaxed",children:["Two buildings, one operation. The ",e.jsx("span",{className:"text-primary",children:"Control Tower"})," ","on the left is where the humans work — consultants, support, the people you can actually book a call with. The ",e.jsx("span",{className:"text-primary",children:"Main Building"})," ","on the right is where your AI workforce lives, nine floors of specialists, each with its own rooms. Tap any glowing point to see what's inside."]}),e.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-12",children:[e.jsxs("div",{className:"lg:col-span-8",children:[e.jsx("div",{className:"relative w-full rounded-xl overflow-hidden border border-primary/30 glow-edge bg-black",children:e.jsxs("div",{className:"relative aspect-[16/9]",children:[e.jsx("img",{src:$i.url,alt:"The FFAI Complex — Control Tower on the left, Main Building on the right",className:"absolute inset-0 h-full w-full object-cover"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(180deg, oklch(0.08 0.03 240 / 0.20) 0%, transparent 30%, transparent 70%, oklch(0.06 0.03 240 / 0.45) 100%)"}}),e.jsxs("div",{className:"absolute top-3 left-3 inline-flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/30 text-[10px] tracking-[0.22em] uppercase text-primary",children:[e.jsx(ts,{className:"h-3 w-3"})," Control Tower · Humans"]}),e.jsxs("div",{className:"absolute top-3 right-3 inline-flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/30 text-[10px] tracking-[0.22em] uppercase text-primary",children:["Main Building · AI Workforce ",e.jsx(ts,{className:"h-3 w-3"})]}),l.map(n=>{const o=a?.kind==="tower"&&a.spot.id===n.id;return e.jsx(Ps,{top:n.top,left:n.left,label:n.label,active:o,onClick:()=>i({kind:"tower",spot:n})},n.id)}),d.map(n=>{const o=Ti[n.id];if(!o)return null;const c=r.data?.filter(g=>g.floor_id===n.id)??[],u=a?.kind==="floor"&&a.floor.id===n.id,m=n.id===0?"G":String(n.id);return e.jsx(Ps,{top:o.top,left:o.left,label:`${m} · ${n.name}`,badge:m,active:u,onClick:()=>i({kind:"floor",floor:n,rooms:c})},n.id)})]})}),e.jsx("div",{className:"mt-2 text-[10px] tracking-[0.22em] uppercase text-muted-foreground text-center",children:"Hover or tap a glowing point to explore"})]}),e.jsx("div",{className:"lg:col-span-4 min-w-0 lg:h-[520px]",children:e.jsx(Oi,{selection:a})})]})]})}function Ps({top:t,left:r,label:s,badge:a,active:i,onClick:d}){return e.jsx("button",{type:"button",onClick:d,"aria-label":s,className:"group absolute -translate-x-1/2 -translate-y-1/2",style:{top:t,left:r},children:e.jsxs("span",{className:"relative grid place-items-center",children:[e.jsx("span",{className:`absolute h-7 w-7 rounded-full bg-primary/30 ${i?"animate-none ring-2 ring-primary":"pulse-ring"}`}),e.jsx("span",{className:`relative grid place-items-center h-4 w-4 rounded-full bg-primary text-[9px] font-display tabular-nums text-primary-foreground shadow-[0_0_12px_var(--glow)] ${i?"scale-125":"group-hover:scale-110"} transition`,children:a??""}),e.jsx("span",{className:`absolute top-full mt-2 whitespace-nowrap rounded-md glass border border-primary/30 px-2 py-1 text-[10px] tracking-[0.18em] uppercase text-foreground/90 transition ${i?"opacity-100 translate-y-0":"opacity-0 group-hover:opacity-100 translate-y-1 group-hover:translate-y-0"}`,children:s})]})})}function Oi({selection:t}){if(!t)return e.jsxs("div",{className:"rounded-xl glass border border-primary/20 p-5 h-full min-h-[300px] lg:min-h-0 flex flex-col items-center justify-center text-center overflow-y-auto",children:[e.jsx(ts,{className:"h-6 w-6 text-primary/60 mb-3"}),e.jsx("div",{className:"text-sm text-foreground/85",children:"Pick a glowing point on the map."}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-2 max-w-[260px]",children:"The Control Tower hosts your human team. The Main Building hosts your AI floors. Each point tells you what lives there and lets you walk straight in."})]});if(t.kind==="tower"){const l=t.spot;return e.jsxs("div",{className:"rounded-xl glass border border-primary/30 glow-edge p-5 h-full overflow-y-auto",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary/80",children:"Control Tower · Humans"}),e.jsx("div",{className:"font-display text-2xl text-foreground glow-text mt-1",children:l.label}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:l.subt
1itle}),e.jsx("p",{className:"mt-4 text-sm text-foreground/85 leading-relaxed",children:l.blurb}),e.jsxs(j,{to:l.to,className:"mt-5 inline-flex items-center gap-2 px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:["Go there ",e.jsx(V,{className:"h-3 w-3"})]})]})}const{floor:r,rooms:s}=t,a=r.id===0?"G":String(r.id),i=xa.filter(l=>(Ss(l.id).floor??l.floor)===r.id),d=s[0];return e.jsxs("div",{className:"rounded-xl glass border border-primary/30 glow-edge p-5 h-full overflow-y-auto",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary/80",children:["Main Building · ",r.heading]}),e.jsxs("div",{className:"font-display text-2xl text-foreground glow-text mt-1",children:["Floor ",a," · ",r.name]}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:r.subtitle}),s.length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground mb-2",children:"Rooms"}),e.jsx("div",{className:"space-y-1.5 max-h-[180px] overflow-y-auto pr-1",children:s.map(l=>e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:String(r.id),roomId:l.slug},className:"group flex items-start gap-2 rounded-md border border-white/5 bg-black/20 px-2.5 py-1.5 hover:border-primary/40 hover:bg-primary/5 transition",children:[e.jsx(V,{className:"h-3 w-3 mt-1 text-primary/70 group-hover:text-primary shrink-0"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-sm text-foreground/90 group-hover:text-primary truncate",children:l.name}),e.jsx("span",{className:"block text-[10px] tracking-[0.18em] uppercase text-muted-foreground truncate",children:l.subtitle})]})]},l.id))})]}),i.length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground mb-2",children:"Who you'll meet"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map(l=>{const n=Ss(l.id);return e.jsx(j,{to:"/agent/$agentId",params:{agentId:l.id},className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-[11px] text-foreground/85 hover:border-primary hover:text-primary transition",children:n.name||l.name},l.id)})})]}),e.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[d&&e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:String(r.id),roomId:d.slug},className:"inline-flex items-center gap-2 px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:["Enter Floor ",e.jsx(V,{className:"h-3 w-3"})]}),e.jsx(j,{to:"/floors",className:"inline-flex items-center gap-2 px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"See all floors"})]}),s.length===0&&i.length===0&&e.jsx("div",{className:"text-xs text-muted-foreground italic mt-4",children:"Floor reserved — content coming online."})]})}const Ei=jr({method:"POST"}).handler(Nr("00013998049e1352c1033f97350105f3ae91efb6658c10f189c7659351aa531e")),Li=jr({method:"POST"}).middleware([os]).handler(Nr("2db2ffcbbfa1315ede7c43ce1d6ba17308df8f01912d78f91efac8a37a79028f")),_i=jr({method:"POST"}).middleware([os]).handler(Nr("e404c7b78c6027fd4d8aecaf47dffdc683bb13cc6c92f7feeddda1c8fe9b4eb0"));jr({method:"GET"}).middleware([os]).handler(Nr("d5e14ba49d9cf60a8dbed07ef66919f425f14d1be27c697be9997cfce12c1cbd"));function Bi(){const t=yr(_i),[r,s]=x.useState(null),[a,i]=x.useState({"team-gap-analysis":!1,"hire-profile-generator":!1}),d=async(l,n)=>{s(l);try{await t({data:{feature:l}}),i(o=>({...o,[l]:!0})),v.success(`You're on the early-access list for ${n}.`)}catch(o){const c=o instanceof Error?o.message:"Could not register interest";c.toLowerCase().includes("unauthorized")||c.toLowerCase().includes("no authorization")?v.error("Please sign in to join the waitlist."):v.error(c)}finally{s(null)}};return e.jsxs("section",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-end justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Founder Suite"}),e.jsx("h2",{className:"font-display text-lg mt-1",children:"Built for the person at the top"})]}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"3 tools"})]}),e.jsxs("div",{className:"flex flex-col gap-4 max-w-3xl",children:[e.jsxs(dr,{variant:"strong",className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute -top-16 -right-16 h-48 w-48 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-11 w-11 rounded-lg glass border border-primary/30 grid place-items-center text-primary glow-edge shrink-0",children:e.jsx(kr,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-emerald-400",children:"Live"}),e.jsx("span",{className:"h-1 w-1 rounded-full bg-emerald-400"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"~7 min"})]}),e.jsx("h3",{className:"font-display text-lg mt-1 glow-text",children:"Founder Self
1-Assessment"}),e.jsx("p",{className:"text-xs text-foreground/75 mt-2 leading-relaxed",children:"Score yourself across vision, execution, sales, product, and people. Get a founder archetype, your top strengths and gaps, and a specific next-hire recommendation."}),e.jsxs(j,{to:"/tools/founder-assessment",className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground text-[11px] tracking-[0.22em] uppercase hover:opacity-90 transition",children:["Start Assessment ",e.jsx(V,{className:"h-3.5 w-3.5"})]})]})]})]}),e.jsx(dr,{variant:"strong",className:"relative overflow-hidden",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-11 w-11 rounded-lg glass border border-border/40 grid place-items-center text-foreground/70 shrink-0",children:e.jsx(ue,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-sky-400/90",children:"Coming soon"})}),e.jsx("h3",{className:"font-display text-lg mt-1",children:"Team Gap Analysis"}),e.jsx("p",{className:"text-xs text-foreground/75 mt-2 leading-relaxed",children:"Are you over staffed or under staffed? Map your team across founder archetypes and surface the missing dimension — execution, narrative, technical depth — before your next hire."}),e.jsx("button",{disabled:r==="team-gap-analysis"||a["team-gap-analysis"],onClick:()=>d("team-gap-analysis","Team Gap Analysis"),className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md border border-primary/40 text-primary text-[11px] tracking-[0.22em] uppercase hover:bg-primary/10 transition disabled:opacity-60",children:a["team-gap-analysis"]?e.jsxs(e.Fragment,{children:["On the list ",e.jsx(Cs,{className:"h-3.5 w-3.5"})]}):r==="team-gap-analysis"?e.jsxs(e.Fragment,{children:["Joining ",e.jsx(pr,{className:"h-3.5 w-3.5 animate-spin"})]}):e.jsxs(e.Fragment,{children:["Join early access ",e.jsx(V,{className:"h-3.5 w-3.5"})]})})]})]})}),e.jsx(dr,{variant:"strong",className:"relative overflow-hidden",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-11 w-11 rounded-lg glass border border-border/40 grid place-items-center text-foreground/70 shrink-0",children:e.jsx(yn,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-sky-400/90",children:"Coming soon"})}),e.jsx("h3",{className:"font-display text-lg mt-1",children:"Hire-Profile Generator"}),e.jsx("p",{className:"text-xs text-foreground/75 mt-2 leading-relaxed",children:"Generate a role-specific hiring profile — first engineer, first AE, first ops — tuned to your founder profile and your company's stage."}),e.jsx("button",{disabled:r==="hire-profile-generator"||a["hire-profile-generator"],onClick:()=>d("hire-profile-generator","Hire-Profile Generator"),className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md border border-primary/40 text-primary text-[11px] tracking-[0.22em] uppercase hover:bg-primary/10 transition disabled:opacity-60",children:a["hire-profile-generator"]?e.jsxs(e.Fragment,{children:["On the list ",e.jsx(Cs,{className:"h-3.5 w-3.5"})]}):r==="hire-profile-generator"?e.jsxs(e.Fragment,{children:["Joining ",e.jsx(pr,{className:"h-3.5 w-3.5 animate-spin"})]}):e.jsxs(e.Fragment,{children:["Join early access ",e.jsx(V,{className:"h-3.5 w-3.5"})]})})]})]})})]})]})}const Hi=[{icon:ya,label:"Floors Unlocked",value:"All 9 floors",detail:"Ground through Floor 8 — every operating surface in the building."},{icon:Ma,label:"Rooms Available",value:"Every room, unlimited",detail:"No room caps. Evaluations, Playbooks, Staffing, Newsroom, Strategy Games — all open."},{icon:ue,label:"Agents On Staff",value:"Full senior roster",detail:"Atlas, Vega, Finn, Kai, Moneta, Nova, Ember, Vesper, Wren, Aiden + Jamie concierge."},{icon:tt,label:"Monthly Tokens",value:"5,000 tokens / mo",detail
1:"Plus 1,000 rollover ceiling and a 20% discount on top-up packs."},{icon:On,label:"Human Consults",value:"4 free / quarter",detail:"Live 1-on-1 sessions with a senior FFAI consultant. $400 value each."},{icon:Ln,label:"Strategy Sessions",value:"Monthly war-room",detail:"Recurring 60-min board-style session with your assigned advisor pod."},{icon:_n,label:"Priority Queue",value:"Front of the line",detail:"Work orders, deliverables, and Forge runs jump the queue ahead of lower tiers."},{icon:yt,label:"Vault & Compliance",value:"Full access",detail:"Contract Vault, Compliance Center, Risk & Insurance — no read-only gates."},{icon:zt,label:"Founders Perks",value:"Pilot tier bundle",detail:"Limited Pilot-Tier merch drop, early access to new floors, and a founder badge in the directory."}];function Oa({open:t,onOpenChange:r,trigger:s}){return e.jsxs(ga,{open:t,onOpenChange:r,children:[s,e.jsxs(ha,{className:"max-w-2xl glass-strong border border-primary/40 shadow-[0_0_60px_-10px_oklch(0.78_0.18_230/0.6)] p-0 overflow-hidden",children:[e.jsxs("div",{className:"relative px-6 pt-6 pb-5 border-b border-primary/20 bg-gradient-to-b from-primary/10 to-transparent",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx(Ia,{className:"h-3.5 w-3.5"}),"Founders' Circle · Pilot Tier"]}),e.jsxs(fa,{className:"mt-2 space-y-1",children:[e.jsx(ba,{className:"font-display text-2xl text-foreground glow-text",children:"Everything in the building. Front of every line."}),e.jsx(vn,{className:"text-sm text-foreground/75 leading-relaxed",children:"$249 / month · billed monthly · cancel anytime. The full FFAI station experience with senior consultants on call."})]})]}),e.jsxs("div",{className:"max-h-[60vh] overflow-y-auto px-6 py-5",children:[e.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:Hi.map(a=>{const i=a.icon;return e.jsx("div",{className:"rounded-md glass border border-primary/20 p-3 hover:border-primary/50 transition",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded bg-primary/10 border border-primary/30 grid place-items-center shrink-0",children:e.jsx(i,{className:"h-4 w-4 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:a.label}),e.jsx("div",{className:"font-display text-sm text-primary glow-text leading-tight mt-0.5",children:a.value}),e.jsx("div",{className:"text-[11px] text-foreground/75 leading-snug mt-1",children:a.detail})]})]})},a.label)})}),e.jsxs("div",{className:"mt-5 rounded-md border border-primary/30 bg-primary/5 px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(X,{className:"h-3.5 w-3.5"}),"Pilot Tier Bonus"]}),e.jsx("p",{className:"text-[12px] text-foreground/80 leading-relaxed mt-1.5",children:"Pilot Tier founders lock today's pricing for life and get first access to new floors, agents, and deliverable templates as the building expands."})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2 px-6 py-4 border-t border-primary/20 bg-black/30",children:[e.jsx("button",{type:"button",onClick:()=>r(!1),className:"px-3 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md glass hover:glow-edge",children:"Close"}),e.jsx("button",{type:"button",onClick:()=>r(!1),className:"px-4 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition shadow-[0_0_24px_-6px_oklch(0.78_0.18_230/0.7)]",children:"Go Founder · $249/mo"})]})]})]})}const ft=[{id:"lead",label:"Lead",slaDays:7,terminal:!1,weight:.1},{id:"qualified",label:"Qualified",slaDays:10,terminal:!1,weight:.25},{id:"demo",label:"Demo",slaDays:14,terminal:!1,weight:.4},{id:"proposal",label:"Proposal",slaDays:14,terminal:!1,weight:.6},{id:"closing",label:"Closing",slaDays:10,terminal:!1,weight:.8},{id:"won",label:"Won",slaDays:0,terminal:!0,weight:1},{id:"lost",label:"Lost",slaDays:0,terminal:!0,weight:0}],ae=t=>{const r=new Date;return r.setDate(r.getDate()-t),r.toISOString()},Wi=[{id:"d1",company:"Halcyon Robotics",value:48e3,stage:"lead",ownerAgentId:"nova",enteredStageAt:ae(2),nextStep:"Send the founder a Loom teardown of their pricing page.",source:"content"},{id:"d2",company:"Northwind Bakery",value:12500,stage:"lead",ownerAgentId:"nova",enteredStageAt:ae(9),nextStep:"Re-engage — no reply to first three emails.",source:"outbound"}
1,{id:"d3",company:"Cobalt Freight",value:96e3,stage:"qualified",ownerAgentId:"aiden",enteredStageAt:ae(4),nextStep:"Confirm budget owner before booking the demo.",source:"referral"},{id:"d4",company:"Glassline Studios",value:24e3,stage:"qualified",ownerAgentId:"nova",enteredStageAt:ae(12),nextStep:"Past SLA — push for a calendar hold this week.",source:"content"},{id:"d5",company:"Meridian Dental",value:38e3,stage:"demo",ownerAgentId:"nova",enteredStageAt:ae(6),nextStep:"Send tailored demo flow focused on multi-location ops.",source:"partner"},{id:"d6",company:"Pinegrove Outfitters",value:18e3,stage:"demo",ownerAgentId:"wren",enteredStageAt:ae(16),nextStep:"Past SLA — schedule a follow-up demo with the operations lead.",source:"outbound"},{id:"d7",company:"Avian Analytics",value:144e3,stage:"proposal",ownerAgentId:"nova",enteredStageAt:ae(5),nextStep:"Walk through proposal v2 with their CFO Thursday.",source:"referral"},{id:"d8",company:"Bayline Logistics",value:72e3,stage:"proposal",ownerAgentId:"aiden",enteredStageAt:ae(11),nextStep:"Confirm security review timing.",source:"outbound"},{id:"d9",company:"Sable & Co.",value:56e3,stage:"closing",ownerAgentId:"nova",enteredStageAt:ae(3),nextStep:"Send DocuSign — verbal yes on Monday.",source:"content"},{id:"d10",company:"Orchard Realty",value:28e3,stage:"closing",ownerAgentId:"nova",enteredStageAt:ae(13),nextStep:"Past SLA — surface deal to Aiden for unblock.",source:"partner"},{id:"d11",company:"Tideline Surf Co.",value:16500,stage:"won",ownerAgentId:"nova",enteredStageAt:ae(4),nextStep:"Hand off to Wren for onboarding kickoff.",source:"content"},{id:"d12",company:"Foundry Athletics",value:33e3,stage:"won",ownerAgentId:"wren",enteredStageAt:ae(18),nextStep:"Active customer — expansion conversation in 30 days.",source:"referral"},{id:"d13",company:"Quill & Lark",value:9800,stage:"lost",ownerAgentId:"nova",enteredStageAt:ae(7),nextStep:"Lost to budget — re-touch next quarter.",source:"outbound"},{id:"d14",company:"Ember Coffee Roasters",value:21e3,stage:"demo",ownerAgentId:"vega",enteredStageAt:ae(1),nextStep:"Demo booked for Friday — prep ICP-specific examples.",source:"content"}];function Ht(t){const r=new Date(t).getTime();return Math.max(0,Math.floor((Date.now()-r)/(1e3*60*60*24)))}function Vi(t,r){const s=ft.find(i=>i.id===t)?.slaDays??0;if(s===0)return"calm";const a=Ht(r);return a>=s*2?"alarm":a>=s?"warn":"calm"}
1function Gi(){const[t,r]=x.useState(Wi),s=x.useCallback((l,n)=>{r(o=>o.map(c=>c.id===l&&c.stage!==n?{...c,stage:n,enteredStageAt:new Date().toISOString()}:c))},[]),a=x.useCallback(l=>{r(n=>[{...l,id:`d${Date.now().toString(36)}`,enteredStageAt:new Date().toISOString()},...n])},[]),i=x.useCallback((l,n)=>{r(o=>o.map(c=>c.id===l?{...c,stage:n,enteredStageAt:new Date().toISOString()}:c))},[]),d=x.useMemo(()=>{const l=new Map;for(const n of t){const o=l.get(n.stage)??[];o.push(n),l.set(n.stage,o)}return l},[t]);return{deals:t,byStage:d,moveDeal:s,addDeal:a,setOutcome:i}}function $s(t){return t>=1e6?`$${(t/1e6).toFixed(1)}M`:t>=1e3?`$${Math.round(t/1e3)}K`:`$${t}`}function Ui({deals:t}){const r=t.filter(c=>c.stage!=="won"&&c.stage!=="lost"),s=t.filter(c=>c.stage==="won"),a=t.filter(c=>c.stage==="lost"),i=r.reduce((c,u)=>c+u.value,0),d=r.reduce((c,u)=>{const m=ft.find(g=>g.id===u.stage)?.weight??0;return c+u.value*m},0),l=s.length+a.length===0?0:Math.round(s.length/(s.length+a.length)*100),n=s.length===0?0:Math.round(s.reduce((c,u)=>{const m=new Date(u.enteredStageAt).getTime();return c+Math.max(0,(Date.now()-m)/(1e3*60*60*24))},0)/s.length),o=[{icon:ri,label:"Open Pipeline",value:$s(i),sub:`${r.length} deals in motion`},{icon:ls,label:"Weighted Forecast",value:$s(d),sub:"Probability-weighted"},{icon:Pe,label:"Win Rate",value:`${l}%`,sub:`${s.length} won · ${a.length} lost`},{icon:ie,label:"Avg Cycle",value:n?`${n}d`:"—",sub:"From won deals"}];return e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:o.map(c=>e.jsxs("div",{className:"rounded-lg border border-primary/35 bg-black/90 shadow-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(c.icon,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase",children:c.label})]}),e.jsx("div",{className:"mt-1.5 font-display text-2xl text-foreground glow-text",children:c.value}),e.jsx("div",{className:"text-[10px] tracking-[0.16em] uppercase text-muted-foreground mt-0.5",children:c.sub})]},c.label))})}function zi(t){return t>=1e6?`$${(t/1e6).toFixed(1)}M`:t>=1e3?`$${Math.round(t/1e3)}K`:`$${t}`}function Yi({deals:t}){const r=t.filter(l=>l.stage!=="won"&&l.stage!=="lost"),s=[...r].sort((l,n)=>n.value-l.value)[0],a=[...r].filter(l=>l.id!==s?.id).sort((l,n)=>Ht(n.enteredStageAt)-Ht(l.enteredStageAt))[0],i=r.filter(l=>l.stage==="closing"&&l.id!==s?.id&&l.id!==a?.id).sort((l,n)=>n.value-l.value)[0]??r.filter(l=>l.stage==="proposal"&&l.id!==s?.id&&l.id!==a?.id).sort((l,n)=>n.value-l.value)[0],d=[{tag:"Biggest open",icon:ni,why:"Highest deal value — protect it first.",deal:s},{tag:"Oldest in stage",icon:re,why:"Past stage SLA — break the silence or qualify out.",deal:a},{tag:"Closing soon",icon:X,why:"Within reach this week — clear the last objection.",deal:i}];return e.jsxs("div",{className:"rounded-xl border border-primary/35 bg-black/90 shadow-xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text font-medium",children:"Nova's Deal Coach"}),e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Three deals worth your attention today."})]}),e.jsxs(j,{to:"/agent/$agentId",params:{agentId:"nova"},className:"text-[10px] tracking-[0.22em] uppercase text-primary hover:glow-text inline-flex items-center gap-1.5",children:["Open Nova ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:d.map(l=>e.jsxs("div",{className:"rounded-lg border border-primary/25 bg-black/75 p-4 flex flex-col gap-2 shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(l.icon,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase",children:l.tag})]}),l.deal?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"font-display text-base text-foreground/95",children:l.deal.company}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[zi(l.deal.value)," · stage: ",l.deal.stage]}
1),e.jsx("div",{className:"text-[12px] text-foreground/85 leading-snug mt-1",children:l.deal.nextStep}),e.jsx("div",{className:"text-[10px] tracking-[0.16em] uppercase text-muted-foreground mt-auto pt-2",children:l.why})]}):e.jsx("div",{className:"text-xs text-muted-foreground",children:"Nothing flagged — pipeline is calm."})]},l.tag))})]})}const Cr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nt(t){const r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function xs(t){return"nodeType"in t}function se(t){var r,s;return t?Nt(t)?t:xs(t)&&(r=(s=t.ownerDocument)==null?void 0:s.defaultView)!=null?r:window:window}function gs(t){const{Document:r}=se(t);return t instanceof r}function Yt(t){return Nt(t)?!1:t instanceof se(t).HTMLElement}function Ea(t){return t instanceof se(t).SVGElement}function wt(t){return t?Nt(t)?t.document:xs(t)?gs(t)?t:Yt(t)||Ea(t)?t.ownerDocument:document:document:document}const $e=Cr?x.useLayoutEffect:x.useEffect;function Ar(t){const r=x.useRef(t);return $e(()=>{r.current=t}),x.useCallback(function(){for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r.current==null?void 0:r.current(...a)},[])}function qi(){const t=x.useRef(null),r=x.useCallback((a,i)=>{t.current=setInterval(a,i)},[]),s=x.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[r,s]}function Wt(t,r){r===void 0&&(r=[t]);const s=x.useRef(t);return $e(()=>{s.current!==t&&(s.current=t)},r),s}function qt(t,r){const s=x.useRef();return x.useMemo(()=>{const a=t(s.current);return s.current=a,a},[...r])}function ur(t){const r=Ar(t),s=x.useRef(null),a=x.useCallback(i=>{i!==s.current&&r?.(i,s.current),s.current=i},[]);return[s,a]}function xr(t){const r=x.useRef();return x.useEffect(()=>{r.current=t},[t]),r.current}let Br={};function Ir(t,r){return x.useMemo(()=>{if(r)return r;const s=Br[t]==null?0:Br[t]+1;return Br[t]=s,t+"-"+s},[t,r])}function La(t){return function(r){for(var s=arguments.length,a=new Array(s>1?s-1:0),i=1;i<s;i++)a[i-1]=arguments[i];return a.reduce((d,l)=>{const n=Object.entries(l);for(const[o,c]of n){const u=d[o];u!=null&&(d[o]=u+t*c)}return d},{...r})}}const bt=La(1),gr=La(-1);function Ki(t){return"clientX"in t&&"clientY"in t}function hs(t){if(!t)return!1;const{KeyboardEvent:r}=se(t.target);return r&&t instanceof r}function Qi(t){if(!t)return!1;const{TouchEvent:r}=se(t.target);return r&&t instanceof r}function hr(t){if(Qi(t)){if(t.touches&&t.touches.length){const{clientX:r,clientY:s}=t.touches[0];return{x:r,y:s}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:r,clientY:s}=t.changedTouches[0];return{x:r,y:s}}}return Ki(t)?{x:t.clientX,y:t.clientY}:null}const Vt=Object.freeze({Translate:{toString(t){if(!t)return;const{x:r,y:s}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(s?Math.round(s):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:r,scaleY:s}=t;return"scaleX("+r+") scaleY("+s+")"}},Transform:{toString(t){if(t)return[Vt.Translate.toString(t),Vt.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:s,easing:a}=t;return r+" "+s+"ms "+a}}}),Ds="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ji(t){return t.matches(Ds)?t:t.querySelector(Ds)}const Xi={display:"none"};function Zi(t){let{id:r,value:s}=t;return z.createElement("div",{id:r,style:Xi},s)}function eo(t){let{id:r,announcement:s,ariaLiveType:a="assertive"}=t;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:r,style:i,role:"status","aria-live":a,"aria-atomic":!0},s)}
1function to(){const[t,r]=x.useState("");return{announce:x.useCallback(a=>{a!=null&&r(a)},[]),announcement:t}}const _a=x.createContext(null);function ro(t){const r=x.useContext(_a);x.useEffect(()=>{if(!r)throw new Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function so(){const[t]=x.useState(()=>new Set),r=x.useCallback(a=>(t.add(a),()=>t.delete(a)),[t]);return[x.useCallback(a=>{let{type:i,event:d}=a;t.forEach(l=>{var n;return(n=l[i])==null?void 0:n.call(l,d)})},[t]),r]}const ao={draggable:`
2    To pick up a draggable item, press the space bar.
3    While dragging, use the arrow keys to move the item.
4    Press space again to drop the item in its new position, or press escape to cancel.
5  `},no={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:s}=t;return s?"Draggable item "+r.id+" was moved over droppable area "+s.id+".":"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:s}=t;return s?"Draggable item "+r.id+" was dropped over droppable area "+s.id:"Draggable item "+r.id+" was dropped."},onDragCancel(t){let{active:r}=t;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function io(t){let{announcements:r=no,container:s,hiddenTextDescribedById:a,screenReaderInstructions:i=ao}=t;const{announce:d,announcement:l}=to(),n=Ir("DndLiveRegion"),[o,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),ro(x.useMemo(()=>({onDragStart(m){let{active:g}=m;d(r.onDragStart({active:g}))},onDragMove(m){let{active:g,over:p}=m;r.onDragMove&&d(r.onDragMove({active:g,over:p}))},onDragOver(m){let{active:g,over:p}=m;d(r.onDragOver({active:g,over:p}))},onDragEnd(m){let{active:g,over:p}=m;d(r.onDragEnd({active:g,over:p}))},onDragCancel(m){let{active:g,over:p}=m;d(r.onDragCancel({active:g,over:p}))}}),[d,r])),!o)return null;const u=z.createElement(z.Fragment,null,z.createElement(Zi,{id:a,value:i.draggable}),z.createElement(eo,{id:n,announcement:l}));return s?Dt.createPortal(u,s):u}var K;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(K||(K={}));function fr(){}function Ts(t,r){return x.useMemo(()=>({sensor:t,options:r??{}}),[t,r])}function oo(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return x.useMemo(()=>[...r].filter(a=>a!=null),[...r])}const ve=Object.freeze({x:0,y:0});function lo(t,r){const s=hr(t);if(!s)return"0 0";const a={x:(s.x-r.left)/r.width*100,y:(s.y-r.top)/r.height*100};return a.x+"% "+a.y+"%"}function co(t,r){let{data:{value:s}}=t,{data:{value:a}}=r;return a-s}function mo(t,r){if(!t||t.length===0)return null;const[s]=t;return s[r]}function po(t,r){const s=Math.max(r.top,t.top),a=Math.max(r.left,t.left),i=Math.min(r.left+r.width,t.left+t.width),d=Math.min(r.top+r.height,t.top+t.height),l=i-a,n=d-s;if(a<i&&s<d){const o=r.width*r.height,c=t.width*t.height,u=l*n,m=u/(o+c-u);return Number(m.toFixed(4))}return 0}const uo=t=>{let{collisionRect:r,droppableRects:s,droppableContainers:a}=t;const i=[];for(const d of a){const{id:l}=d,n=s.get(l);if(n){const o=po(n,r);o>0&&i.push({id:l,data:{droppableContainer:d,value:o}})}}return i.sort(co)};function xo(t,r,s){return{...t,scaleX:r&&s?r.width/s.width:1,scaleY:r&&s?r.height/s.height:1}}function Ba(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:ve}function go(t){return function(s){for(var a=arguments.length,i=new Array(a>1?a-1:0),d=1;d<a;d++)i[d-1]=arguments[d];return i.reduce((l,n)=>({...l,top:l.top+t*n.y,bottom:l.bottom+t*n.y,left:l.left+t*n.x,right:l.right+t*n.x}),{...s})}}const ho=go(1);function Ha(t){if(t.startsWith("matrix3d(")){const r=t.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(t.startsWith("matrix(")){const r=t.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function fo(t,r,s){const a=Ha(r);if(!a)return t;const{scaleX:i,scaleY:d,x:l,y:n}=a,o=t.left-l-(1-i)*parseFloat(s),c=t.top-n-(1-d)*parseFloat(s.slice(s.indexOf(" ")+1)),u=i?t.width/i:t.width,m=d?t.height/d:t.height;return{width:u,height:m,top:c,right:o+u,bottom:c+m,left:o}}const bo={ignoreTransform:!1};function Kt(t,r){r===void 0&&(r=bo);let s=t.getBoundingClientRect();if(r.ignoreTransform){const{transform:c,transformOrigin:u}=se(t).getComputedStyle(t);c&&(s=fo(s,c,u))}const{top:a,left:i,width:d,height:l,bottom:n,right:o}=s;return{top:a,left:i,width:d,height:l,bottom:n,right:o}}function Fs(t){return Kt(t,{ignoreTransform:!0})}
5function yo(t){const r=t.innerWidth,s=t.innerHeight;return{top:0,left:0,right:r,bottom:s,width:r,height:s}}function vo(t,r){return r===void 0&&(r=se(t).getComputedStyle(t)),r.position==="fixed"}function jo(t,r){r===void 0&&(r=se(t).getComputedStyle(t));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const d=r[i];return typeof d=="string"?s.test(d):!1})}function fs(t,r){const s=[];function a(i){if(r!=null&&s.length>=r||!i)return s;if(gs(i)&&i.scrollingElement!=null&&!s.includes(i.scrollingElement))return s.push(i.scrollingElement),s;if(!Yt(i)||Ea(i)||s.includes(i))return s;const d=se(t).getComputedStyle(i);return i!==t&&jo(i,d)&&s.push(i),vo(i,d)?s:a(i.parentNode)}return t?a(t):s}function Wa(t){const[r]=fs(t,1);return r??null}function Hr(t){return!Cr||!t?null:Nt(t)?t:xs(t)?gs(t)||t===wt(t).scrollingElement?window:Yt(t)?t:null:null}function Va(t){return Nt(t)?t.scrollX:t.scrollLeft}function Ga(t){return Nt(t)?t.scrollY:t.scrollTop}function ss(t){return{x:Va(t),y:Ga(t)}}var Q;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Q||(Q={}));function Ua(t){return!Cr||!t?!1:t===document.scrollingElement}function za(t){const r={x:0,y:0},s=Ua(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},a={x:t.scrollWidth-s.width,y:t.scrollHeight-s.height},i=t.scrollTop<=r.y,d=t.scrollLeft<=r.x,l=t.scrollTop>=a.y,n=t.scrollLeft>=a.x;return{isTop:i,isLeft:d,isBottom:l,isRight:n,maxScroll:a,minScroll:r}}const No={x:.2,y:.2};function wo(t,r,s,a,i){let{top:d,left:l,right:n,bottom:o}=s;a===void 0&&(a=10),i===void 0&&(i=No);const{isTop:c,isBottom:u,isLeft:m,isRight:g}=za(t),p={x:0,y:0},y={x:0,y:0},f={height:r.height*i.y,width:r.width*i.x};return!c&&d<=r.top+f.height?(p.y=Q.Backward,y.y=a*Math.abs((r.top+f.height-d)/f.height)):!u&&o>=r.bottom-f.height&&(p.y=Q.Forward,y.y=a*Math.abs((r.bottom-f.height-o)/f.height)),!g&&n>=r.right-f.width?(p.x=Q.Forward,y.x=a*Math.abs((r.right-f.width-n)/f.width)):!m&&l<=r.left+f.width&&(p.x=Q.Backward,y.x=a*Math.abs((r.left+f.width-l)/f.width)),{direction:p,speed:y}}function ko(t){if(t===document.scrollingElement){const{innerWidth:d,innerHeight:l}=window;return{top:0,left:0,right:d,bottom:l,width:d,height:l}}const{top:r,left:s,right:a,bottom:i}=t.getBoundingClientRect();return{top:r,left:s,right:a,bottom:i,width:t.clientWidth,height:t.clientHeight}}function Ya(t){return t.reduce((r,s)=>bt(r,ss(s)),ve)}function So(t){return t.reduce((r,s)=>r+Va(s),0)}function Co(t){return t.reduce((r,s)=>r+Ga(s),0)}function qa(t,r){if(r===void 0&&(r=Kt),!t)return;const{top:s,left:a,bottom:i,right:d}=r(t);Wa(t)&&(i<=0||d<=0||s>=window.innerHeight||a>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const Ao=[["x",["left","right"],So],["y",["top","bottom"],Co]];class bs{constructor(r,s){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const a=fs(s),i=Ya(a);this.rect={...r},this.width=r.width,this.height=r.height;for(const[d,l,n]of Ao)for(const o of l)Object.defineProperty(this,o,{get:()=>{const c=n(a),u=i[d]-c;return this.rect[o]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ft{constructor(r){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(s=>{var a;return(a=this.target)==null?void 0:a.removeEventListener(...s)})},this.target=r}add(r,s,a){var i;(i=this.target)==null||i.addEventListener(r,s,a),this.listeners.push([r,s,a])}}function Io(t){const{EventTarget:r}=se(t);return t instanceof r?t:wt(t)}function Wr(t,r){const s=Math.abs(t.x),a=Math.abs(t.y);return typeof r=="number"?Math.sqrt(s**2+a**2)>r:"x"in r&&"y"in r?s>r.x&&a>r.y:"x"in r?s>r.x:"y"in r?a>r.y:!1}var fe;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(fe||(fe={}));function Os(t){t.preventDefault()}function Mo(t){t.stopPropagation()}var B;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(B||(B={}));const Ka={start:[B.Space,B.Enter],cancel:[B.Esc],end:[B.Space,B.Enter,B.Tab]},Ro=(t,r)=>{let{currentCoordinates:s}=r;switch(t.code){case B.Right:return{...s,x:s.x+25};case B.Left:return{...s,x:s.x-25};case B.Down:return{...s,y:s.y+25};case B.Up:return{...s,y:s.y-25}}};class ys{constructor(r){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=r;const{event:{target:s}}=r;this.props=r,this.listeners=new Ft(wt(s)),this.windowListeners=new Ft(se(s)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:r,onStart:s}=this.props,a=r.node.current;a&&qa(a),s(ve)}handleKeyDown(r){if(hs(r)){const{active:s,context:a,options:i}=this.props,{keyboardCodes:d=Ka,coordinateGetter:l=Ro,scrollBehavior:n="smooth"}=i,{code:o}=r;if(d.end.includes(o)){this.handleEnd(r);return}if(d.cancel.includes(o)){this.handleCancel(r);return}const{collisionRect:c}=a.current,u=c?{x:c.left,y:c.top}:ve;this.referenceCoordinates||(this.referenceCoordinates=u);const m=l(r,{active:s,context:a.current,currentCoordinates:u});if(m){const g=gr(m,u),p={x:0,y:0},{scrollableAncestors:y}=a.current;for(const f of y){const S=r.code,{isTop:h,isRight:w,isLeft:I,isBottom:O,maxScroll:P,minScroll:b}=za(f),N=ko(f),M={x:Math.min(S===B.Right?N.right-N.width/2:N.right,Math.max(S===B.Right?N.left:N.left+N.width/2,m.x)),y:Math.min(S===B.Down?N.bottom-N.height/2:N.bottom,Math.max(S===B.Down?N.top:N.top+N.height/2,m.y))},$=S===B.Right&&!w||S===B.Left&&!I,F=S===B.Down&&!O||S===B.Up&&!h;if($&&M.x!==m.x){const D=f.scrollLeft+g.x,ee=S===B.Right&&D<=P.x||S===B.Left&&D>=b.x;if(ee&&!g.y){f.scrollTo({left:D,behavior:n});return}ee?p.x=f.scrollLeft-D:p.x=S===B.Right?f.scrollLeft-P.x:f.scrollLeft-b.x,p.x&&f.scrollBy({left:-p.x,behavior:n});break}else if(F&&M.y!==m.y){const D=f.scrollTop+g.y,ee=S===B.Down&&D<=P.y||S===B.Up&&D>=b.y;if(ee&&!g.x){f.scrollTo({top:D,behavior:n});return}ee?p.y=f.scrollTop-D:p.y=S===B.Down?f.scrollTop-P.y:f.scrollTop-b.y,p.y&&f.scrollBy({top:-p.y,behavior:n});break}}this.handleMove(r,bt(gr(m,this.referenceCoordinates),p))}}}handleMove(r,s){const{onMove:a}=this.props;r.preventDefault(),a(s)}handleEnd(r){const{onEnd:s}=this.props;r.preventDefault(),this.detach(),s()}handleCancel(r){const{onCancel:s}=this.props;r.preventDefault(),this.detach(),s()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ys.activators=[{eventName:"onKeyDown",handler:(t,r,s)=>{let{keyboardCodes:a=Ka,onActivation:i}=r,{active:d}=s;const{code:l}=t.nativeEvent;if(a.start.includes(l)){const n=d.activatorNode.current;return n&&t.target!==n?!1:(t.preventDefault(),i?.({event:t.nativeEvent}),!0)}return!1}}];function Es(t){return!!(t&&"distance"in t)}function Ls(t){return!!(t&&"delay"in t)}class vs{constructor(r,s,a){var i;a===void 0&&(a=Io(r.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=r,this.events=s;const{event:d}=r,{target:l}=d;this.props=r,this.events=s,this.document=wt(l),this.documentListeners=new Ft(this.document),this.listeners=new Ft(a),this.windowListeners=new Ft(se(l)),this.initialCoordinates=(i=hr(d))!=null?i:ve,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:r,props:{options:{activationConstraint:s,bypassActivationConstraint:a}}}=this;if(this.listeners.add(r.move.name,this.handleMove,{passive:!1}),this.listeners.add(r.end.name,this.handleEnd),r.cancel&&this.listeners.add(r.cancel.name,this.handleCancel),this.windowListeners.add(fe.Resize,this.handleCancel),this.windowListeners.add(fe.DragStart,Os),this.windowListeners.add(fe.VisibilityChange,this.handleCancel),this.windowListeners.add(fe.ContextMenu,Os),this.documentListeners.add(fe.Keydown,this.handleKeydown),s){if(a!=null&&a({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ls(s)){this.timeoutId=setTimeout(this.handleStart,s.delay),this.handlePending(s);return}if(Es(s)){this.handlePending(s);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(r,s){const{active:a,onPending:i}=this.props;i(a,r,this.initialCoordinates,s)}handleStart(){const{initialCoordinates:r}=this,{onStart:s}=this.props;r&&(this.activated=!0,this.documentListeners.add(fe.Click,Mo,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fe.SelectionChange,this.removeTextSelection),s(r))}handleMove(r){var s;const{activated:a,initialCoordinates:i,props:d}=this,{onMove:l,options:{activationConstraint:n}}=d;if(!i)return;const o=(s=hr(r))!=null?s:ve,c=gr(i,o);if(!a&&n){if(Es(n)){if(n.tolerance!=null&&Wr(c,n.tolerance))return this.handleCancel();if(Wr(c,n.distance))return this.handleStart()}if(Ls(n)&&Wr(c,n.tolerance))return this.handleCancel();this.handlePending(n,c);return}r.cancelable&&r.preventDefault(),l(o)}handleEnd(){const{onAbort:r,onEnd:s}=this.props;this.detach(),this.activated||r(this.props.active),s()}handleCancel(){const{onAbort:r,onCancel:s}=this.props;this.detach(),this.activated||r(this.props.active),s()}handleKeydown(r){r.code===B.Esc&&this.handleCancel()}removeTextSelection(){var r;(r=this.document.getSelection())==null||r.removeAllRanges()}}const Po={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};
5class js extends vs{constructor(r){const{event:s}=r,a=wt(s.target);super(r,Po,a)}}js.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:s}=t,{onActivation:a}=r;return!s.isPrimary||s.button!==0?!1:(a?.({event:s}),!0)}}];const $o={move:{name:"mousemove"},end:{name:"mouseup"}};var as;(function(t){t[t.RightClick=2]="RightClick"})(as||(as={}));class Do extends vs{constructor(r){super(r,$o,wt(r.event.target))}}Do.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:s}=t,{onActivation:a}=r;return s.button===as.RightClick?!1:(a?.({event:s}),!0)}}];const Vr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class To extends vs{constructor(r){super(r,Vr)}static setup(){return window.addEventListener(Vr.move.name,r,{capture:!1,passive:!1}),function(){window.removeEventListener(Vr.move.name,r)};function r(){}}}To.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:s}=t,{onActivation:a}=r;const{touches:i}=s;return i.length>1?!1:(a?.({event:s}),!0)}}];var Ot;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Ot||(Ot={}));var br;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(br||(br={}));function Fo(t){let{acceleration:r,activator:s=Ot.Pointer,canScroll:a,draggingRect:i,enabled:d,interval:l=5,order:n=br.TreeOrder,pointerCoordinates:o,scrollableAncestors:c,scrollableAncestorRects:u,delta:m,threshold:g}=t;const p=Eo({delta:m,disabled:!d}),[y,f]=qi(),S=x.useRef({x:0,y:0}),h=x.useRef({x:0,y:0}),w=x.useMemo(()=>{switch(s){case Ot.Pointer:return o?{top:o.y,bottom:o.y,left:o.x,right:o.x}:null;case Ot.DraggableRect:return i}},[s,i,o]),I=x.useRef(null),O=x.useCallback(()=>{const b=I.current;if(!b)return;const N=S.current.x*h.current.x,M=S.current.y*h.current.y;b.scrollBy(N,M)},[]),P=x.useMemo(()=>n===br.TreeOrder?[...c].reverse():c,[n,c]);x.useEffect(()=>{if(!d||!c.length||!w){f();return}for(const b of P){if(a?.(b)===!1)continue;const N=c.indexOf(b),M=u[N];if(!M)continue;const{direction:$,speed:F}=wo(b,M,w,r,g);for(const D of["x","y"])p[D][$[D]]||(F[D]=0,$[D]=0);if(F.x>0||F.y>0){f(),I.current=b,y(O,l),S.current=F,h.current=$;return}}S.current={x:0,y:0},h.current={x:0,y:0},f()},[r,O,a,f,d,l,JSON.stringify(w),JSON.stringify(p),y,c,P,u,JSON.stringify(g)])}const Oo={x:{[Q.Backward]:!1,[Q.Forward]:!1},y:{[Q.Backward]:!1,[Q.Forward]:!1}};function Eo(t){let{delta:r,disabled:s}=t;const a=xr(r);return qt(i=>{if(s||!a||!i)return Oo;const d={x:Math.sign(r.x-a.x),y:Math.sign(r.y-a.y)};return{x:{[Q.Backward]:i.x[Q.Backward]||d.x===-1,[Q.Forward]:i.x[Q.Forward]||d.x===1},y:{[Q.Backward]:i.y[Q.Backward]||d.y===-1,[Q.Forward]:i.y[Q.Forward]||d.y===1}}},[s,r,a])}function Lo(t,r){const s=r!=null?t.get(r):void 0,a=s?s.node.current:null;return qt(i=>{var d;return r==null?null:(d=a??i)!=null?d:null},[a,r])}function _o(t,r){return x.useMemo(()=>t.reduce((s,a)=>{const{sensor:i}=a,d=i.activators.map(l=>({eventName:l.eventName,handler:r(l.handler,a)}));return[...s,...d]},[]),[t,r])}var Gt;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Gt||(Gt={}));var ns;(function(t){t.Optimized="optimized"})(ns||(ns={}));const _s=new Map;function Bo(t,r){let{dragging:s,dependencies:a,config:i}=r;const[d,l]=x.useState(null),{frequency:n,measure:o,strategy:c}=i,u=x.useRef(t),m=S(),g=Wt(m),p=x.useCallback(function(h){h===void 0&&(h=[]),!g.current&&l(w=>w===null?h:w.concat(h.filter(I=>!w.includes(I))))},[g]),y=x.useRef(null),f=qt(h=>{if(m&&!s)return _s;if(!h||h===_s||u.current!==t||d!=null){const w=new Map;for(let I of t){if(!I)continue;if(d&&d.length>0&&!d.includes(I.id)&&I.rect.current){w.set(I.id,I.rect.current);continue}const O=I.node.current,P=O?new bs(o(O),O):null;I.rect.current=P,P&&w.set(I.id,P)}return w}return h},[t,d,s,m,o]);return x.useEffect(()=>{u.current=t},[t]),x.useEffect(()=>{m||p()},[s,m]),x.useEffect(()=>{d&&d.length>0&&l(null)},[JSON.stringify(d)]),x.useEffect(()=>{m||typeof n!="number"||y.current!==null||(y.current=setTimeout(()=>{p(),y.current=null},n))},[n,m,p,...a]),{droppableRects:f,measureDroppableContainers:p,measuringScheduled:d!=null};function S(){switch(c){case Gt.Always:return!1;case Gt.BeforeDragging:return s;default:return!s}}}function Ns(t,r){return qt(s=>t?s||(typeof r=="function"?r(t):t):null,[r,t])}function Ho(t,r){return Ns(t,r)}function Wo(t){let{callback:r,disabled:s}=t;const a=Ar(r),i=x.useMemo(()=>
5{if(s||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:d}=window;return new d(a)},[a,s]);return x.useEffect(()=>()=>i?.disconnect(),[i]),i}function Mr(t){let{callback:r,disabled:s}=t;const a=Ar(r),i=x.useMemo(()=>{if(s||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:d}=window;return new d(a)},[s]);return x.useEffect(()=>()=>i?.disconnect(),[i]),i}function Vo(t){return new bs(Kt(t),t)}function Bs(t,r,s){r===void 0&&(r=Vo);const[a,i]=x.useState(null);function d(){i(o=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=o??s)!=null?c:null}const u=r(t);return JSON.stringify(o)===JSON.stringify(u)?o:u})}const l=Wo({callback(o){if(t)for(const c of o){const{type:u,target:m}=c;if(u==="childList"&&m instanceof HTMLElement&&m.contains(t)){d();break}}}}),n=Mr({callback:d});return $e(()=>{d(),t?(n?.observe(t),l?.observe(document.body,{childList:!0,subtree:!0})):(n?.disconnect(),l?.disconnect())},[t]),a}function Go(t){const r=Ns(t);return Ba(t,r)}const Hs=[];function Uo(t){const r=x.useRef(t),s=qt(a=>t?a&&a!==Hs&&t&&r.current&&t.parentNode===r.current.parentNode?a:fs(t):Hs,[t]);return x.useEffect(()=>{r.current=t},[t]),s}function zo(t){const[r,s]=x.useState(null),a=x.useRef(t),i=x.useCallback(d=>{const l=Hr(d.target);l&&s(n=>n?(n.set(l,ss(l)),new Map(n)):null)},[]);return x.useEffect(()=>{const d=a.current;if(t!==d){l(d);const n=t.map(o=>{const c=Hr(o);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,ss(c)]):null}).filter(o=>o!=null);s(n.length?new Map(n):null),a.current=t}return()=>{l(t),l(d)};function l(n){n.forEach(o=>{const c=Hr(o);c?.removeEventListener("scroll",i)})}},[i,t]),x.useMemo(()=>t.length?r?Array.from(r.values()).reduce((d,l)=>bt(d,l),ve):Ya(t):ve,[t,r])}function Ws(t,r){r===void 0&&(r=[]);const s=x.useRef(null);return x.useEffect(()=>{s.current=null},r),x.useEffect(()=>{const a=t!==ve;a&&!s.current&&(s.current=t),!a&&s.current&&(s.current=null)},[t]),s.current?gr(t,s.current):ve}function Yo(t){x.useEffect(()=>{if(!Cr)return;const r=t.map(s=>{let{sensor:a}=s;return a.setup==null?void 0:a.setup()});return()=>{for(const s of r)s?.()}},t.map(r=>{let{sensor:s}=r;return s}))}function qo(t,r){return x.useMemo(()=>t.reduce((s,a)=>{let{eventName:i,handler:d}=a;return s[i]=l=>{d(l,r)},s},{}),[t,r])}function Qa(t){return x.useMemo(()=>t?yo(t):null,[t])}const Vs=[];function Ko(t,r){r===void 0&&(r=Kt);const[s]=t,a=Qa(s?se(s):null),[i,d]=x.useState(Vs);function l(){d(()=>t.length?t.map(o=>Ua(o)?a:new bs(r(o),o)):Vs)}const n=Mr({callback:l});return $e(()=>{n?.disconnect(),l(),t.forEach(o=>n?.observe(o))},[t]),i}function Ja(t){if(!t)return null;if(t.children.length>1)return t;const r=t.children[0];return Yt(r)?r:t}function Qo(t){let{measure:r}=t;const[s,a]=x.useState(null),i=x.useCallback(c=>{for(const{target:u}of c)if(Yt(u)){a(m=>{const g=r(u);return m?{...m,width:g.width,height:g.height}:g});break}},[r]),d=Mr({callback:i}),l=x.useCallback(c=>{const u=Ja(c);d?.disconnect(),u&&d?.observe(u),a(u?r(u):null)},[r,d]),[n,o]=ur(l);return x.useMemo(()=>({nodeRef:n,rect:s,setRef:o}),[s,n,o])}const Jo=[{sensor:js,options:{}},{sensor:ys,options:{}}],Xo={current:{}},cr={draggable:{measure:Fs},droppable:{measure:Fs,strategy:Gt.WhileDragging,frequency:ns.Optimized},dragOverlay:{measure:Kt}};class Et extends Map{get(r){var s;return r!=null&&(s=super.get(r))!=null?s:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(r=>{let{disabled:s}=r;return!s})}getNodeFor(r){var s,a;return(s=(a=this.get(r))==null?void 0:a.node.current)!=null?s:void 0}}const Zo={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Et,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:fr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:cr,measureDroppableContainers:fr,windowRect:null,measuringScheduled:!1},Xa={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:fr,draggableNodes:new Map,over:null,measureDroppableContainers:fr},Qt=x.createContext(Xa),Za=x.createContext(Zo);function el(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Et}}}function tl(t,r){switch(r.type){case K.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case K.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:r.coordinates.x-t.draggable.initialCoordinates.x,y:r.coordinates.y-t.draggable.initialCoordinates.y}}};case K.DragEnd:case K.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case K.RegisterDroppable:{const{element:s}=r,{id:a}
5=s,i=new Et(t.droppable.containers);return i.set(a,s),{...t,droppable:{...t.droppable,containers:i}}}case K.SetDroppableDisabled:{const{id:s,key:a,disabled:i}=r,d=t.droppable.containers.get(s);if(!d||a!==d.key)return t;const l=new Et(t.droppable.containers);return l.set(s,{...d,disabled:i}),{...t,droppable:{...t.droppable,containers:l}}}case K.UnregisterDroppable:{const{id:s,key:a}=r,i=t.droppable.containers.get(s);if(!i||a!==i.key)return t;const d=new Et(t.droppable.containers);return d.delete(s),{...t,droppable:{...t.droppable,containers:d}}}default:return t}}function rl(t){let{disabled:r}=t;const{active:s,activatorEvent:a,draggableNodes:i}=x.useContext(Qt),d=xr(a),l=xr(s?.id);return x.useEffect(()=>{if(!r&&!a&&d&&l!=null){if(!hs(d)||document.activeElement===d.target)return;const n=i.get(l);if(!n)return;const{activatorNode:o,node:c}=n;if(!o.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[o.current,c.current]){if(!u)continue;const m=Ji(u);if(m){m.focus();break}}})}},[a,r,i,l,d]),null}function en(t,r){let{transform:s,...a}=r;return t!=null&&t.length?t.reduce((i,d)=>d({transform:i,...a}),s):s}function sl(t){return x.useMemo(()=>({draggable:{...cr.draggable,...t?.draggable},droppable:{...cr.droppable,...t?.droppable},dragOverlay:{...cr.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function al(t){let{activeNode:r,measure:s,initialRect:a,config:i=!0}=t;const d=x.useRef(!1),{x:l,y:n}=typeof i=="boolean"?{x:i,y:i}:i;$e(()=>{if(!l&&!n||!r){d.current=!1;return}if(d.current||!a)return;const c=r?.node.current;if(!c||c.isConnected===!1)return;const u=s(c),m=Ba(u,a);if(l||(m.x=0),n||(m.y=0),d.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const g=Wa(c);g&&g.scrollBy({top:m.y,left:m.x})}},[r,l,n,a,s])}const Rr=x.createContext({...ve,scaleX:1,scaleY:1});var Ue;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ue||(Ue={}));const nl=x.memo(function(r){var s,a,i,d;let{id:l,accessibility:n,autoScroll:o=!0,children:c,sensors:u=Jo,collisionDetection:m=uo,measuring:g,modifiers:p,...y}=r;const f=x.useReducer(tl,void 0,el),[S,h]=f,[w,I]=so(),[O,P]=x.useState(Ue.Uninitialized),b=O===Ue.Initialized,{draggable:{active:N,nodes:M,translate:$},droppable:{containers:F}}=S,D=N!=null?M.get(N):null,ee=x.useRef({initial:null,translated:null}),k=x.useMemo(()=>{var te;return N!=null?{id:N,data:(te=D?.data)!=null?te:Xo,rect:ee}:null},[N,D]),L=x.useRef(null),[Y,C]=x.useState(null),[_,W]=x.useState(null),G=Wt(y,Object.values(y)),Te=Ir("DndDescribedBy",l),Ye=x.useMemo(()=>F.getEnabled(),[F]),Se=sl(g),{droppableRects:Fe,measureDroppableContainers:at,measuringScheduled:Jt}=Bo(Ye,{dragging:b,dependencies:[$.x,$.y],config:Se.droppable}),oe=Lo(M,N),Xt=x.useMemo(()=>_?hr(_):null,[_]),qe=pn(),Zt=Ho(oe,Se.draggable.measure);al({activeNode:N!=null?M.get(N):null,config:qe.layoutShiftCompensation,initialRect:Zt,measure:Se.draggable.measure});const le=Bs(oe,Se.draggable.measure,Zt),kt=Bs(oe?oe.parentElement:null),Ce=x.useRef({activatorEvent:null,active:null,activeNode:oe,collisionRect:null,collisions:null,droppableRects:Fe,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),er=F.getNodeFor((s=Ce.current.over)==null?void 0:s.id),Ae=Qo({measure:Se.dragOverlay.measure}),nt=(a=Ae.nodeRef.current)!=null?a:oe,Oe=b?(i=Ae.rect)!=null?i:le:null,tr=!!(Ae.
5nodeRef.current&&Ae.rect),it=Go(tr?null:le),Ke=Qa(nt?se(nt):null),de=Uo(b?er??oe:null),Ee=Ko(de),Le=en(p,{transform:{x:$.x-it.x,y:$.y-it.y,scaleX:1,scaleY:1},activatorEvent:_,active:k,activeNodeRect:le,containerNodeRect:kt,draggingNodeRect:Oe,over:Ce.current.over,overlayNodeRect:Ae.rect,scrollableAncestors:de,scrollableAncestorRects:Ee,windowRect:Ke}),rr=Xt?bt(Xt,$):null,sr=zo(de),$r=Ws(sr),Dr=Ws(sr,[le]),_e=bt(Le,$r),Be=Oe?ho(Oe,Le):null,Qe=k&&Be?m({active:k,collisionRect:Be,droppableRects:Fe,droppableContainers:Ye,pointerCoordinates:rr}):null,ar=mo(Qe,"id"),[je,q]=x.useState(null),on=tr?Le:bt(Le,Dr),ln=xo(on,(d=je?.rect)!=null?d:null,le),Tr=x.useRef(null),ws=x.useCallback((te,ce)=>{let{sensor:me,options:He}=ce;if(L.current==null)return;const xe=M.get(L.current);if(!xe)return;const pe=te.nativeEvent,Ne=new me({active:L.current,activeNode:xe,event:pe,options:He,context:Ce,onAbort(Z){if(!M.get(Z))return;const{onDragAbort:we}=G.current,Ie={id:Z};we?.(Ie),w({type:"onDragAbort",event:Ie})},onPending(Z,We,we,Ie){if(!M.get(Z))return;const{onDragPending:Ct}=G.current,Ve={id:Z,constraint:We,initialCoordinates:we,offset:Ie};Ct?.(Ve),w({type:"onDragPending",event:Ve})},onStart(Z){const We=L.current;if(We==null)return;const we=M.get(We);if(!we)return;const{onDragStart:Ie}=G.current,St={activatorEvent:pe,active:{id:We,data:we.data,rect:ee}};Dt.unstable_batchedUpdates(()=>{Ie?.(St),P(Ue.Initializing),h({type:K.DragStart,initialCoordinates:Z,active:We}),w({type:"onDragStart",event:St}),C(Tr.current),W(pe)})},onMove(Z){h({type:K.DragMove,coordinates:Z})},onEnd:ot(K.DragEnd),onCancel:ot(K.DragCancel)});Tr.current=Ne;function ot(Z){return async function(){const{active:we,collisions:Ie,over:St,scrollAdjustedTranslate:Ct}=Ce.current;let Ve=null;if(we&&Ct){const{cancelDrop:At}=G.current;Ve={activatorEvent:pe,active:we,collisions:Ie,delta:Ct,over:St},Z===K.DragEnd&&typeof At=="function"&&await Promise.resolve(At(Ve))&&(Z=K.DragCancel)}L.current=null,Dt.unstable_batchedUpdates(()=>{h({type:Z}),P(Ue.Uninitialized),q(null),C(null),W(null),Tr.current=null;const At=Z===K.DragEnd?"onDragEnd":"onDragCancel";if(Ve){const Fr=G.current[At];Fr?.(Ve),w({type:At,event:Ve})}})}}},[M]),dn=x.useCallback((te,ce)=>(me,He)=>{const xe=me.nativeEvent,pe=M.get(He);if(L.current!==null||!pe||xe.dndKit||xe.defaultPrevented)return;const Ne={active:pe};te(me,ce.options,Ne)===!0&&(xe.dndKit={capturedBy:ce.sensor},L.current=He,ws(me,ce))},[M,ws]),ks=_o(u,dn);Yo(u),$e(()=>{le&&O===Ue.Initializing&&P(Ue.Initialized)},[le,O]),x.useEffect(()=>{const{onDragMove:te}=G.current,{active:ce,activatorEvent:me,collisions:He,over:xe}=Ce.current;if(!ce||!me)return;const pe={active:ce,activatorEvent:me,collisions:He,delta:{x:_e.x,y:_e.y},over:xe};Dt.unstable_batchedUpdates(()=>{te?.(pe),w({type:"onDragMove",event:pe})})},[_e.x,_e.y]),x.useEffect(()=>{const{active:te,activatorEvent:ce,collisions:me,droppableContainers:He,scrollAdjustedTranslate:xe}=Ce.current;if(!te||L.current==null||!ce||!xe)return;const{onDragOver:pe}=G.current,Ne=He.get(ar),ot=Ne&&Ne.rect.current?{id:Ne.id,rect:Ne.rect.current,data:Ne.data,disabled:Ne.disabled}:null,Z={active:te,activatorEvent:ce,collisions:me,delta:{x:xe.x,y:xe.y},over:ot};Dt.unstable_batchedUpdates(()=>{q(ot),pe?.(Z),w({type:"onDragOver",event:Z})})},[ar]),$e(()=>{Ce.current={activatorEvent:_,active:k,activeNode:oe,collisionRect:Be,collisions:Qe,droppableRects:Fe,draggableNodes:M,draggingNode:nt,draggingNodeRect:Oe,droppableContainers:F,over:je,scrollableAncestors:de,scrollAdjustedTranslate:_e},ee.current={initial:Oe,translated:Be}},[k,oe,Qe,Be,M,nt,Oe,Fe,F,je,de,_e]),Fo({...qe,delta:$,draggingRect:Be,pointerCoordinates:rr,scrollableAncestors:de,scrollableAncestorRects:Ee});const cn=x.useMemo(()=>({active:k,activeNode:oe,activeNodeRect:le,activatorEvent:_,collisions:Qe,containerNodeRect:kt,dragOverlay:Ae,draggableNodes:M,droppableContainers:F,droppableRects:Fe,over:je,measureDroppableContainers:at,scrollableAncestors:de,scrollableAncestorRects:Ee,measuringConfiguration:Se,measuringScheduled:Jt,windowRect:Ke}
5),[k,oe,le,_,Qe,kt,Ae,M,F,Fe,je,at,de,Ee,Se,Jt,Ke]),mn=x.useMemo(()=>({activatorEvent:_,activators:ks,active:k,activeNodeRect:le,ariaDescribedById:{draggable:Te},dispatch:h,draggableNodes:M,over:je,measureDroppableContainers:at}),[_,ks,k,le,h,Te,M,je,at]);return z.createElement(_a.Provider,{value:I},z.createElement(Qt.Provider,{value:mn},z.createElement(Za.Provider,{value:cn},z.createElement(Rr.Provider,{value:ln},c)),z.createElement(rl,{disabled:n?.restoreFocus===!1})),z.createElement(io,{...n,hiddenTextDescribedById:Te}));function pn(){const te=Y?.autoScrollEnabled===!1,ce=typeof o=="object"?o.enabled===!1:o===!1,me=b&&!te&&!ce;return typeof o=="object"?{...o,enabled:me}:{enabled:me}}}),il=x.createContext(null),Gs="button",ol="Draggable";function ll(t){let{id:r,data:s,disabled:a=!1,attributes:i}=t;const d=Ir(ol),{activators:l,activatorEvent:n,active:o,activeNodeRect:c,ariaDescribedById:u,draggableNodes:m,over:g}=x.useContext(Qt),{role:p=Gs,roleDescription:y="draggable",tabIndex:f=0}=i??{},S=o?.id===r,h=x.useContext(S?Rr:il),[w,I]=ur(),[O,P]=ur(),b=qo(l,r),N=Wt(s);$e(()=>(m.set(r,{id:r,key:d,node:w,activatorNode:O,data:N}),()=>{const $=m.get(r);$&&$.key===d&&m.delete(r)}),[m,r]);const M=x.useMemo(()=>({role:p,tabIndex:f,"aria-disabled":a,"aria-pressed":S&&p===Gs?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[a,p,f,S,y,u.draggable]);return{active:o,activatorEvent:n,activeNodeRect:c,attributes:M,isDragging:S,listeners:a?void 0:b,node:w,over:g,setNodeRef:I,setActivatorNodeRef:P,transform:h}}function dl(){return x.useContext(Za)}const cl="Droppable",ml={timeout:25};function pl(t){let{data:r,disabled:s=!1,id:a,resizeObserverConfig:i}=t;const d=Ir(cl),{active:l,dispatch:n,over:o,measureDroppableContainers:c}=x.useContext(Qt),u=x.useRef({disabled:s}),m=x.useRef(!1),g=x.useRef(null),p=x.useRef(null),{disabled:y,updateMeasurementsFor:f,timeout:S}={...ml,...i},h=Wt(f??a),w=x.useCallback(()=>{if(!m.current){m.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(h.current)?h.current:[h.current]),p.current=null},S)},[S]),I=Mr({callback:w,disabled:y||!l}),O=x.useCallback((M,$)=>{I&&($&&(I.unobserve($),m.current=!1),M&&I.observe(M))},[I]),[P,b]=ur(O),N=Wt(r);return x.useEffect(()=>{!I||!P.current||(I.disconnect(),m.current=!1,I.observe(P.current))},[P,I]),x.useEffect(()=>(n({type:K.RegisterDroppable,element:{id:a,key:d,disabled:s,node:P,rect:g,data:N}}),()=>n({type:K.UnregisterDroppable,key:d,id:a})),[a]),x.useEffect(()=>{s!==u.current.disabled&&(n({type:K.SetDroppableDisabled,id:a,key:d,disabled:s}),u.current.disabled=s)},[a,d,s,n]),{active:l,rect:g,isOver:o?.id===a,node:P,over:o,setNodeRef:b}}function ul(t){let{animation:r,children:s}=t;const[a,i]=x.useState(null),[d,l]=x.useState(null),n=xr(s);return!s&&!a&&n&&i(n),$e(()=>{if(!d)return;const o=a?.key,c=a?.props.id;if(o==null||c==null){i(null);return}Promise.resolve(r(c,d)).then(()=>{i(null)})},[r,a,d]),z.createElement(z.Fragment,null,s,a?x.cloneElement(a,{ref:l}):null)}const xl={x:0,y:0,scaleX:1,scaleY:1};function gl(t){let{children:r}=t;return z.createElement(Qt.Provider,{value:Xa},z.createElement(Rr.Provider,{value:xl},r))}const hl={position:"fixed",touchAction:"none"},fl=t=>hs(t)?"transform 250ms ease":void 0,bl=x.forwardRef((t,r)=>{let{as:s,activatorEvent:a,adjustScale:i,children:d,className:l,rect:n,style:o,transform:c,transition:u=fl}=t;if(!n)return null;const m=i?c:{...c,scaleX:1,scaleY:1},g={...hl,width:n.width,height:n.height,top:n.top,left:n.left,transform:Vt.Transform.toString(m),transformOrigin:i&&a?lo(a,n):void 0,transition:typeof u=="function"?u(a):u,...o};return z.createElement(s,{className:l,style:g,ref:r},d)}),yl=t=>r=>{let{active:s,dragOverlay:a}=r;const i={},{styles:d,className:l}=t;if(d!=null&&d.active)for(const[n,o]of Object.entries(d.active))o!==void 0&&(i[n]=s.node.style.getPropertyValue(n),s.node.style.setProperty(n,o));if(d!=null&&d.dragOverlay)for(const[n,o]of Object.entries(d.dragOverlay))o!==void 0&&a.node.style.setProperty(n,o);return l!=null&&l.active&&s.node.classList.add(l.active),l!=null&&l.dragOverlay&&a.node.classList.add(l.dragOverlay),function(){for(const[o,c]of Object.entries(i))s.node.style.setProperty(o,c);l!=null&&l.active&&s.node.classList.remove(l.active)}},vl=t=>{let{transform:{initial:r,final:s}}=t;return[{transform:Vt.Transform.toString(r)},{transform:Vt.Transform.toString(s)}]},jl={duration:250,easing:"ease",keyframes:vl,sideEffects:yl({styles:{active:{opacity:"0"}}})};function Nl(t){let{config:r,draggableNodes:s,droppableContainers:a,measuringConfiguration:i}=t;return Ar((d,l)=>{if(r===null)return;const n=s.get(d);if(!n)return;const o=n.node.current;if(!o)return;const c=Ja(l);if(!c)return;const{transform:u}=se(l).getComputedStyle(l),m=Ha(u);if(!m)return;const g=typeof r=="function"?r:wl(r);return qa(o,i.draggable.measure),g({active:{id:d,data:n.data,node:o,rect:i.draggable.measure(o)},draggableNodes:s,dragOverlay:{node:l,rect:i.dragOverlay.measure(c)},droppableContainers:a,measuringConfiguration:i,transform:m})})}function wl(t){const{duration:r,easing:s,sideEffects:a,keyframes:i}={...jl,...t};return d=>{let{active:l,dragOverlay:n,transform:o,...c}=d;if(!r)return;const u={x:n.rect.left-l.rect.left,y:n.rect.top-l.rect.top},m={scaleX:o.scaleX!==1?l.rect.width*o.scaleX/n.rect.width:1,scaleY:o.scaleY!==1?l.rect.height*o.scaleY/n.rect.height:1},g={x:o.x-u.x,y:o.y-u.y,...m},p=i({...c,active:l,dragOverlay:n,transform:{initial:o,final:g}}),[y]=p,f=p[p.length-1];if(JSON.stringify(y)===JSON.stringify(f))return;const S=a?.({active:l,dragOverlay:n,...c}),h=n.node.animate(p,{duration:r,easing:s,fill:"forwards"});return new Promise(w=>{h.onfinish=()=>{S?.(),w()}})}}let Us=0;function kl(t){return x.useMemo(()=>
5{if(t!=null)return Us++,Us},[t])}const Sl=z.memo(t=>{let{adjustScale:r=!1,children:s,dropAnimation:a,style:i,transition:d,modifiers:l,wrapperElement:n="div",className:o,zIndex:c=999}=t;const{activatorEvent:u,active:m,activeNodeRect:g,containerNodeRect:p,draggableNodes:y,droppableContainers:f,dragOverlay:S,over:h,measuringConfiguration:w,scrollableAncestors:I,scrollableAncestorRects:O,windowRect:P}=dl(),b=x.useContext(Rr),N=kl(m?.id),M=en(l,{activatorEvent:u,active:m,activeNodeRect:g,containerNodeRect:p,draggingNodeRect:S.rect,over:h,overlayNodeRect:S.rect,scrollableAncestors:I,scrollableAncestorRects:O,transform:b,windowRect:P}),$=Ns(g),F=Nl({config:a,draggableNodes:y,droppableContainers:f,measuringConfiguration:w}),D=$?S.setRef:void 0;return z.createElement(gl,null,z.createElement(ul,{animation:F},m&&N?z.createElement(bl,{key:N,id:m.id,ref:D,as:n,activatorEvent:u,adjustScale:r,className:o,transition:d,rect:$,style:{zIndex:c,...i},transform:M},s):null))});function tn(t){return t>=1e6?`$${(t/1e6).toFixed(1)}M`:t>=1e3?`$${Math.round(t/1e3)}K`:`$${t}`}function rn({deal:t,dragging:r}){const s=Vi(t.stage,t.enteredStageAt),a=s==="alarm"?"text-destructive":s==="warn"?"text-amber-400":"text-muted-foreground",i=Ht(t.enteredStageAt);return e.jsxs("div",{className:mr("rounded-md border border-primary/25 bg-black/75 p-3 text-left shadow-lg","hover:border-primary/50 hover:bg-black/85 transition",r&&"ring-1 ring-primary/60 shadow-[0_0_40px_-8px_var(--glow)]"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"text-sm text-foreground/95 font-display leading-tight",children:t.company}),e.jsx("div",{className:"text-[11px] text-primary glow-text font-medium",children:tn(t.value)})]}),e.jsxs("div",{className:"mt-1 text-[10px] tracking-[0.16em] uppercase text-muted-foreground",children:[t.ownerAgentId," · ",t.source]}),e.jsx("div",{className:"mt-2 text-[11px] leading-snug text-foreground/80 line-clamp-2",children:t.nextStep}),e.jsx("div",{className:mr("mt-2 text-[10px] tracking-[0.16em] uppercase",a),children:t.stage==="won"||t.stage==="lost"?t.stage:`${i}d in stage`})]})}function Cl({deal:t}){const{attributes:r,listeners:s,setNodeRef:a,isDragging:i}=ll({id:t.id});return e.jsx("div",{ref:a,...r,...s,className:mr("cursor-grab active:cursor-grabbing",i&&"opacity-30"),children:e.jsx(rn,{deal:t})})}function Al({stage:t,deals:r}){const{setNodeRef:s,isOver:a}=pl({id:t.id}),i=r.reduce((l,n)=>l+n.value,0),d=r.length?Math.round(r.reduce((l,n)=>l+Ht(n.enteredStageAt),0)/r.length):0;return e.jsxs("div",{ref:s,className:mr("flex flex-col rounded-lg border bg-black/80 min-h-[220px] transition",a?"border-primary shadow-[0_0_30px_-10px_var(--glow)]":"border-primary/25"),children:[e.jsxs("div",{className:"px-3 py-2 border-b border-primary/20",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-primary glow-text font-medium",children:t.label}),e.jsxs("div",{className:"text-[10px] tracking-[0.16em] uppercase text-muted-foreground mt-0.5",children:[r.length," · ",tn(i),!t.terminal&&r.length>0?` · ${d}d avg`:""]})]}),e.jsx("div",{className:"p-2 flex flex-col gap-2 flex-1",children:r.length===0?e.jsx("div",{className:"text-[10px] tracking-[0.16em] uppercase text-muted-foreground/60 text-center py-6",children:"Drop a deal here"}):r.map(l=>e.jsx(Cl,{deal:l},l.id))})]})}function Il({deals:t,onMove:r}){const s=oo(Ts(js,{activationConstraint:{distance:4}}),Ts(ys)),[a,i]=x.useState(null),d=o=>i(String(o.active.id)),l=o=>{if(i(null),!o.over)return;const c=String(o.active.id),u=String(o.over.id),m=t.find(y=>y.id===c);if(!m||m.stage===u)return;r(c,u);const g=ft.find(y=>y.id===m.stage)?.label??m.stage,p=ft.find(y=>y.id===u)?.label??u;v.success(`Nova logged: ${m.company} moved ${g} → ${p}.`)},n=t.find(o=>o.id===a);return e.jsxs(nl,{sensors:s,onDragStart:d,onDragEnd:l,children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-7 gap-3",children:ft.map(o=>e.jsx(Al,{stage:o,deals:t.filter(c=>c.stage===o.id)},o.id))}),e.jsx(Sl,{children:n?e.jsx(rn,{deal:n,dragging:!0}):null})]})}function Ml({onAdd:t}){const[r,s]=x.useState(!1),[a,i]=x.useState(""),[d,l]=x.useState("25000"),[n,o]=x.useState("lead"),[c,u]=x.useState(""),m=()=>{i(""),l("25000"),o("lead"),u("")},g=()=>{a.trim()&&(t({company:a.trim(),value:Number(d)||0,stage:n,ownerAgentId:"nova",nextStep:c.trim()||"No next step set — Nova will draft one.",source:"outbound"}),s(!1),m())};return e.jsxs(ga,{open:r,onOpenChange:s,children:[e.jsx(jn,{asChild:!0,children:e.jsxs("button",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:[e.jsx(De,{className:"h-3 w-3"})," Add Deal"]})}),e.jsxs(ha,{className:"bg-black/95 border border-primary/40",children:[e.jsx(fa,{children:e.jsx(ba,{className:"font-display tracking-[0.18em] uppercase text-primary",children:"Add a deal"})}),e.jsxs("div",{className:"grid gap-4 py-2",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(nr,{htmlFor:"company",children:"Company"}),e.jsx(Er,{id:"company",value:a,onChange:p=>i(p.target.value),placeholder:"Acme Robotics"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(nr,{htmlFor:"value",children:"Value (USD)"}),e.jsx(Er,{id:"value",type:"number",value:d,onChange:p=>l(p.target.value)})]}),e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(nr,{htmlFor:"stage",children:"Stage"}),e.jsx("select",{id:"stage",value:n,onChange:p=>o(p.target.value),className:"h-9 rounded-md border border-input bg-background px-2 text-sm",children:ft.filter(p=>!p.terminal).map(p=>e.jsx("option",{value:p.id,children:p.label},p.id))})]})]}),e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(nr,{htmlFor:"nextStep",children:"Next step"}),e.jsx(Er,{id:"nextStep",value:c,onChange:p=>u(p.target.value),placeholder:"Send pricing follow-up by Thursday"})]})]}),e.jsx(Nn,{children:e.jsx("button",{onClick:g,className:"px-4 py-2 text-[11px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90",children:"Add Deal"})})]})]})}function Rl(){const{deals:t,moveDeal:r,addDeal:s}=Gi();return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-xl border border-primary/35 bg-black/90 shadow-xl p-5 flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text font-medium",children:"Your Pipeline · Nova"}
5),e.jsx("div",{className:"text-sm text-foreground/85 mt-1",children:"Drag deals between stages. Nova flags what to work on first, then logs every move."})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(Ml,{onAdd:s}),e.jsxs(j,{to:"/agent/$agentId",params:{agentId:"nova"},className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md border border-primary/40 text-primary hover:bg-primary/10 transition",children:["Ask Nova ",e.jsx(V,{className:"h-3 w-3"})]})]})]}),e.jsx(Ui,{deals:t}),e.jsx(Yi,{deals:t}),e.jsxs("div",{className:"rounded-xl border border-primary/35 bg-black/90 shadow-xl p-5",children:[e.jsx("div",{className:"flex items-center justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text font-medium",children:"Deal Board"}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[t.length," deals across ",7," stages"]})]})}),e.jsx(Il,{deals:t,onMove:r})]})]})}const Pl="/assets/room-floor7-board-prep-mrrjV2KD.jpg",$l="/assets/room-floor7-investor-prep-BczZXHPh.jpg",Dl="/assets/room-floor7-ceo-reports-_mY7oLxb.jpg",Tl="/assets/room-floor7-state-of-business-B_h69XNi.jpg",Fl="/assets/room-floor7-conference-rooms-CDLEPfVz.jpg",Ol="/assets/consultant-bobby-DrKVzTNO.jpg",El="/assets/room-floor0-general-store-DDERuRa7.jpg",Ll="/assets/room-floor0-onboarding-Dchl2ryD.jpg",_l="/assets/room-floor0-navigation-DAlflsXL.jpg",Bl="/assets/room-floor0-tool-garage-DNZGocAu.jpg",Hl="/assets/room-floor0-academy-DrQS4ubr.jpg",Wl="/assets/room-floor2-evaluations-Bwszt3LK.jpg",Vl="/assets/room-floor2-sops-CcruUpxY.jpg",Gl="/assets/room-floor2-assessments-BFD9GSFG.jpg",Ul="/assets/room-floor2-consultants-IJXojKdC.jpg",zl="/assets/room-floor2-talent-lounge-Dp1h2cXl.jpg",Yl="/assets/room-floor2-cafe-De7eYkIS.jpg",ql="/assets/room-floor2-newsroom-DZERIsi-.jpg",Kl="/assets/room-floor2-gaming-DfDzHjCM.jpg",Ql="/assets/room-floor3-strategies-DQnZbpn4.jpg",Jl="/assets/room-floor3-promotions-D1he0DQh.jpg",Xl="/assets/room-floor3-analytics-DNHdXcVc.jpg",Zl="/assets/room-floor3-live-promos-DMBwDTAk.jpg",ed="/assets/room-floor3-memberships-WZs7ARyw.jpg",zs="/assets/room-floor4-campaigns-Cwgrj4oh.jpg",td="/__l5e/assets-v1/b6231465-76ee-40a0-8fd3-ccc099b3e1b4/store-membership-explorer-v2.jpg",rd={url:td},sd="/__l5e/assets-v1/04ed2836-0ac3-4cc7-9297-a60718447f4c/store-membership-operator-v2.jpg",ad={url:sd},nd="/__l5e/assets-v1/d5377d98-0780-4e70-b587-7e08469d9bd9/store-membership-founders-v2.jpg",id={url:nd},od="/__l5e/assets-v1/968ddc43-0247-4154-8d7d-facffa27bcea/store-token-starter.jpg",ld={url:od},dd="/__l5e/assets-v1/5e05989a-b684-4b71-b825-141ef10b599b/store-token-operator.jpg",cd={url:dd},md="/__l5e/assets-v1/7d16a464-8074-44c2-8b85-ba8cb8cb1bdf/store-token-command.jpg",pd={url:md},ud="/__l5e/assets-v1/9b70bcf0-83dc-49ad-b24b-b090fdbdb24f/store-ac-readiness.jpg",xd={url:ud},gd="/__l5e/assets-v1/14a6c580-387a-4aaf-b7b6-146b2e434df5/store-ac-deepdive.jpg",hd={url:gd},fd="/__l5e/assets-v1/093b7b74-04c7-42cd-b40b-7fb8f78f1d9b/store-ac-builders.jpg",bd={url:fd},yd="/__l5e/assets-v1/f4583ff6-3aea-44ac-9074-7f2116de08a0/store-gd-manual.jpg",vd={url:yd},jd="/__l5e/assets-v1/014b2f6b-72a5-4189-b4f4-a6b8ba5ac6a9/store-gd-sop.jpg",Nd={url:jd},wd="/__l5e/assets-v1/250e9938-677b-4604-a32b-5d314371c333/store-gd-prompts.jpg",kd={url:wd},Sd="/__l5e/assets-v1/c72d2cf9-dc8b-416a-a5ad-f6dca2044582/store-nv-tee-classic.jpg",Cd={url:Sd},Ad="/__l5e/assets-v1/30d13909-d79a-4370-b80d-be2cab635a8b/store-nv-tee-pilot-logo.jpg",Id={url:Ad},Md="/__l5e/assets-v1/7645f1f5-edc6-4f18-98e1-11e0c63c849a/store-nv-stickers.jpg",Rd={url:Md},Pd="/assets/room-floor4-strategies-C9dN7270.jpg",$d="/assets/room-floor4-channels-BSZFgR_y.jpg",Dd="/assets/room-floor5-sops-BZ5Fg53D.jpg",Td="/assets/room-floor5-logistics-CMGjuDr3.jpg",Fd="/assets/room-floor5-technology-stacks-B4yWqEZu.jpg",Od="/assets/room-floor6-accounting-BN7BxQ-A.jpg",Ed="/assets/room-floor6-purchasing-DkV9e_vs.jpg",Ld="/assets/room-floor6-forecasting-BzcyP1rz.jpg",_d="/assets/room-floor6-pnl-DFb0KOyZ.jpg",Bd="/assets/room-floor8-contract-vault-h05
5ovPo0.jpg",Hd="/assets/room-floor8-contract-drafting-BBKWb2G4.jpg",Wd="/assets/room-floor8-entity-records-CTCdmmox.jpg",Vd="/assets/room-floor8-licenses-permits-CjdSFlw2.jpg",Gd="/assets/room-floor8-intellectual-property-DNLw4EF1.jpg",Ud="/assets/room-floor8-compliance-center-B1r9Dzd4.jpg",zd="/assets/room-floor8-risk-insurance-B9YTnroE.jpg",Ys={"0:welcome":Tn,"0:general-store":El,"0:onboarding":Ll,"0:navigation":_l,"0:tool-garage":Bl,"0:academy":Hl,"2:evaluations":Wl,"2:sops":Vl,"2:assessments":Gl,"2:consultants":Ul,"2:talent-lounge":zl,"2:cafe":Yl,"2:newsroom":ql,"2:gaming":Kl,"3:strategies":Ql,"3:promotions":Jl,"3:analytics":Xl,"3:live-promos":Zl,"3:memberships":ed,"4:campaigns":zs,"4:events":zs,"4:growth-strategies":Pd,"4:channels":$d,"5:operating-procedures":Dd,"5:logistics":Td,"5:technology-stacks":Fd,"6:accounting":Od,"6:purchasing":Ed,"6:forecasting":Ld,"6:pnl":_d,"6:loans-grants":Dn,"7:board-prep":Pl,"7:investor-prep":$l,"7:ceo-reports":Dl,"7:state-of-business":Tl,"7:conference-rooms":Fl,"8:contract-vault":Bd,"8:contract-drafting":Hd,"8:entity-records":Wd,"8:licenses-permits":Vd,"8:intellectual-property":Gd,"8:compliance-center":Ud,"8:risk-insurance":zd,"8:legal-counsel":$n};function Ip(){const{floorId:t,roomId:r}=wn.useParams(),s=kn(),a=Number(t),{floor:i,room:d,siblings:l,isLoading:n}=Sn(a,r),o=pa(),c=ua(),{hasAccess:u}=Rn(),{profile:m}=ca(),g=As.find(q=>q.id===a),p=i?{id:i.id,name:i.name,subtitle:i.subtitle}:g,y=d?{id:d.slug,name:d.name,subtitle:d.subtitle}:Or(a,r)?.room,f=i?.heading??Or(a,r)?.entry.heading??"",S=l.length?l.map(q=>({id:q.slug,name:q.name,subtitle:q.subtitle})):Or(a,r)?.entry.rooms.filter(q=>q.id!==r)??[],[h,w]=x.useState(!0);if(x.useEffect(()=>{const q=window.setTimeout(()=>w(!1),650);return()=>window.clearTimeout(q)},[t,r]),n)return e.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading…"});if(!y||!p)return e.jsxs("div",{className:"p-6",children:[e.jsx(Mn,{eyebrow:"Floor Directory",title:"Room not found",subtitle:"That destination is not on file."}),e.jsx(j,{to:"/",className:"text-xs tracking-[0.2em] uppercase text-primary hover:glow-text",children:"← Return to Command Center"})]});const I=p.id===0?"G":String(p.id),O=Ys[`${p.id}:${y.id}`]??Bn,P=!!Ys[`${p.id}:${y.id}`],b=p.id===0&&y.id==="welcome",N=p.id===0&&y.id==="general-store",M=p.id===0&&y.id==="tool-garage",$=p.id===0&&y.id==="onboarding",F=p.id===0&&y.id==="navigation",D=p.id===2&&y.id==="evaluations",ee=p.id===2&&y.id==="sops",k=p.id===2&&y.id==="assessments",L=p.id===2&&y.id==="consultants",Y=p.id===2&&y.id==="talent-lounge",C=p.id===2&&y.id==="newsroom",_=p.id===2&&y.id==="gaming",W=p.id===3&&y.id==="promotions",G=p.id===3&&y.id==="strategies",Te=p.id===3&&y.id==="analytics",Ye=p.id===3&&y.id==="live-promos",Se=p.id===3&&y.id==="memberships",Fe=p.id===4&&y.id==="campaigns",at=p.id===4&&y.id==="events",Jt=p.id===4&&y.id==="growth-strategies",oe=p.id===4&&y.id==="channels",Xt=p.id===5&&y.id==="technology-stacks",qe=p.id===6&&y.id==="loans-grants",Zt=p.id===6&&y.id==="accounting",le=p.id===6&&y.id==="pnl",kt=p.id===6&&y.id==="forecasting",Ce=p.id===6&&y.id==="purchasing",er=p.id===7&&y.id==="board-prep",Ae=p.id===7&&y.id==="investor-prep",nt=p.id===7&&y.id==="ceo-reports",Oe=p.id===7&&y.id==="state-of-business",tr=p.id===7&&y.id==="conference-rooms",it=p.id===8&&y.id==="contract-vault",Ke=p.id===8&&y.id==="contract-drafting",de=p.id===8&&y.id==="legal-counsel",Ee=p.id===8&&y.id==="entity-records",Le=p.id===8&&y.id==="intellectual-property",rr=p.id===8&&y.id==="licenses-permits",sr=p.id===8&&y.id==="compliance-center",$r=p.id===8&&y.id==="risk-insurance",Dr=p.id===0&&y.id==="academy",_e=o.data?.length??As.length,Be=c.data?.length??0,Qe=xa.filter(q=>u(q.id)).length,ar="Founders' Circle · Pilot Tier",je=m?.display_name?.split(" ")[0]??"Commander";return e.jsxs("div",{className:"relative min-h-[calc(100vh-100px)]",children:[e.jsxs("div",{"aria-hidden":!0,className:"absolute inset-x-0 top-0 pointer-events-none h-[860px]",children:[e.jsx("img",{src:O,alt:"",className:`absolute inset-0 h-full w-full object-cover ${P?"opacity-100":"opacity-30"}`,width:1536,height:896}),e.jsx("div",{className:"absolute inset-0",style:{background:P?G?"linear-gradient(180deg, oklch(0.08 0.03 230 / 0.68) 0%, oklch(0.07 0.03 230 / 0.58) 38%, oklch(0.06 0.03 230 / 0.86) 100%)":"linear-gradient(180deg, oklch(0.10 0.03 230 / 0.35) 0%, oklch(0.08 0.03 230 / 0.20) 40%, oklch(0.07 0.03 230 / 0.55) 100%)":"linear-gradient(180deg, oklch(0.12 0.04 230 / 0.78) 0%, oklch(0.09 0.03 230 / 0.92) 60%, oklch(0.07 0.03 230 / 0.98) 100%)"}}),e.jsx("div",{className:`absolute inset-0 ${P?"opacity-5":"opacity-15"} mix-blend-screen`,style:{backgroundImage:"repeating-linear-gradient(0deg, transparent 0 3px, oklch(0.78 0.18 230 / 0.18) 3px 4px)"}})]}),e.jsxs("div",{className:"relative z-10 p-6",children:[e.jsx("div",{className:"mb-5 flex justify-center",children:e.jsxs("div",{className:"relative inline-flex items-center gap-3 px-8 py-3 rounded-lg glass-strong border border-primary/40 corner-bracket shadow-[0_0_40px_-10px_oklch(0.78_0.18_230/0.6)]",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400 pulse-ring"}),e.jsx("span",{className:"font-display text-2xl tracking-[0.18em] uppercase text-primary glow-text",children:y.name}),e.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400 pulse-ring"})]})}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsxs("button",{onClick:()=>s.history.back(),className:"inline-flex items-center gap-1.5 text-primary/80 hover:text-primary transition",children:[e.jsx(ja,{className:"h-3 w-3"})," Back"]}),e.jsx("span",{className:"opacity-60",children:"/"}),e.jsx(j,{to:"/",className:"hover:text-primary transition",children:"Command Center"}),e.jsx("span",{className:"opacity-60",children:"/"}),e.jsxs(j,{to:"/floors",className:"hover:text-primary transition",children:["Floor ",I]}),e.jsx("span",{className:"opacity-60",children:"/"}
5),e.jsx("span",{className:"text-foreground/80",children:y.name})]}),h&&e.jsxs("div",{className:"pointer-events-none fixed inset-0 z-[80]",children:[e.jsx("div",{className:"absolute inset-0 bg-primary/10 animate-in fade-in duration-300"}),e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-1/2 bg-background border-r border-primary/40 animate-[slideLeft_0.6s_ease-in_forwards]"}),e.jsx("div",{className:"absolute inset-y-0 right-0 w-1/2 bg-background border-l border-primary/40 animate-[slideRight_0.6s_ease-in_forwards]"})]}),e.jsx("style",{children:`
6              @keyframes slideLeft { to { transform: translateX(-100%); } }
7              @keyframes slideRight { to { transform: translateX(100%); } }
8            `})]}),e.jsxs("div",{className:"mt-6 grid gap-6 lg:grid-cols-3 lg:items-start",children:[e.jsxs("div",{className:`lg:col-span-2 rounded-xl corner-bracket border border-primary/30 p-8 relative overflow-hidden ${G?"bg-black/80 border-primary/40 shadow-[0_0_44px_-12px_var(--glow)]":P?"":"glass-strong"}`,children:[P&&e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 -z-0",style:{background:G?"linear-gradient(105deg, oklch(0.06 0.03 240 / 0.94) 0%, oklch(0.06 0.03 240 / 0.88) 52%, oklch(0.06 0.03 240 / 0.44) 80%, oklch(0.06 0.03 240 / 0.18) 100%)":"linear-gradient(105deg, oklch(0.08 0.03 240 / 0.82) 0%, oklch(0.08 0.03 240 / 0.55) 45%, oklch(0.08 0.03 240 / 0.10) 75%, transparent 100%)",backdropFilter:G?"blur(8px)":"blur(2px)",WebkitBackdropFilter:G?"blur(8px)":"blur(2px)"}}),e.jsx("div",{className:"relative",children:b?e.jsx(kc,{displayName:je,floorsCount:_e,roomsCount:Be,agentsCount:Qe,membershipPlan:ar}):N?e.jsx(Cc,{}):M?e.jsx(cc,{}):$?e.jsx(Ai,{}):F?e.jsx(Fi,{}):e.jsxs(e.Fragment,{children:[de&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block absolute top-4 right-4 z-10",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-3 rounded-full border border-primary/40 pulse-ring"}),e.jsxs(j,{to:"/room/$agentId",params:{agentId:"kai"},title:"Open Kai's office",className:"group h-28 w-28 lg:h-32 lg:w-32 rounded-full overflow-hidden border-2 border-primary/70 glow-edge floaty relative block",children:[e.jsx("img",{src:Is,alt:"Kai",className:"h-full w-full object-cover object-top",width:640,height:640}),e.jsx("span",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 text-[9px] tracking-[0.22em] uppercase text-primary bg-background/80 px-2 py-0.5 rounded-full border border-primary/40 whitespace-nowrap",children:"Talk to Kai"})]})]})}),e.jsx("div",{className:"md:hidden mb-4 flex justify-center",children:e.jsx(j,{to:"/room/$agentId",params:{agentId:"kai"},className:"h-24 w-24 rounded-full overflow-hidden border-2 border-primary/70 glow-edge relative block",children:e.jsx("img",{src:Is,alt:"Kai",className:"h-full w-full object-cover object-top",width:640,height:640})})})]}),qe&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block absolute top-4 right-4 z-10",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-3 rounded-full border border-primary/40 pulse-ring"}),e.jsxs(j,{to:"/room/$agentId",params:{agentId:"moneta"},title:"Open Moneta's conference room",className:"group h-28 w-28 lg:h-32 lg:w-32 rounded-full overflow-hidden border-2 border-primary/70 glow-edge floaty relative block",children:[e.jsx("img",{src:es,alt:"Moneta",className:"h-full w-full object-cover object-top",width:640,height:640}),e.jsx("span",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 text-[9px] tracking-[0.22em] uppercase text-primary bg-background/80 px-2 py-0.5 rounded-full border border-primary/40 whitespace-nowrap",children:"Talk to Moneta"})]})]})}),e.jsx("div",{className:"md:hidden mb-4 flex justify-center",children:e.jsx(j,{to:"/room/$agentId",params:{agentId:"moneta"},className:"h-24 w-24 rounded-full overflow-hidden border-2 border-primary/70 glow-edge relative block",children:e.jsx("img",{src:es,alt:"Moneta",className:"h-full w-full object-cover object-top",
8width:640,height:640})})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),"Room Online"]}),e.jsx("h1",{className:`font-display text-4xl text-foreground glow-text mt-3 ${de||qe?"md:pr-40 lg:pr-44":""}`,children:y.name}),e.jsxs("div",{className:`text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2 ${de||qe?"md:pr-40 lg:pr-44":""}`,children:["Floor ",I," · ",p.name," ",p.subtitle," · ",y.subtitle]}),D?e.jsx(Ic,{}):ee?e.jsx(Xc,{}):k?e.jsx("div",{className:"mt-6",children:e.jsx(Bi,{})}):L?e.jsx(Rc,{}):Y?e.jsx(Qc,{}):_?e.jsx(ec,{}):W?e.jsx(sc,{}):Ye?e.jsx(oc,{}):Se?e.jsx(dc,{}):Fe?e.jsx(mc,{}):at?e.jsx(pc,{}):Jt?e.jsx(hc,{}):oe?e.jsx(fc,{}):Xt?e.jsx(yc,{}):qe?e.jsx(jc,{}):Zt?e.jsx(uc,{}):le?e.jsx(Yd,{}):kt?e.jsx(qd,{}):Ce?e.jsx(vm,{}):er?e.jsx(Im,{}):Ae?e.jsx(Mm,{}):nt?e.jsx(Rm,{}):Oe?e.jsx(Pm,{}):tr?e.jsx($m,{}):de?e.jsx(Bc,{}):rr?e.jsx(Vc,{}):sr?e.jsx(Yc,{}):$r?e.jsx(Kc,{}):Dr?e.jsx(Tc,{}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-5 text-sm text-foreground/80 max-w-2xl leading-relaxed",children:["Welcome to the ",e.jsx("span",{className:"text-primary",children:y.name}),". This room is part of"," ",e.jsx("span",{className:"text-primary",children:f})," on Floor ",I,". Your assigned agents and assets for this workstream load here."]}),C?e.jsx(Qd,{}):it?e.jsx(rm,{}):Ke?e.jsx(nm,{}):Ee?e.jsx(fm,{}):Le?e.jsx(zm,{}):G?e.jsx(Em,{}):e.jsxs("div",{className:"mt-6 grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:X,label:"Sessions",value:"12"}),e.jsx(T,{icon:wr,label:"Open WOs",value:"3"}),e.jsx(T,{icon:Un,label:"Deliverables",value:"8"}),e.jsx(T,{icon:ue,label:"Operators",value:"2"})]}),e.jsx("div",{className:"mt-6 flex flex-wrap gap-2",children:C||it||Ke||Ee||Le||G?null:e.jsxs(e.Fragment,{children:[e.jsx(j,{to:"/work-orders",className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Open Work Orders"}),e.jsx(j,{to:"/agents",className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Assign an Agent"}),e.jsx(j,{to:"/knowledge",className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Knowledge Hub"})]})})]})]})})]}),e.jsxs(dr,{title:`Floor ${I} · Other Rooms`,variant:G?"strong":"glass",className:G?"border border-primary/35 bg-black/90 backdrop-blur-none shadow-xl":void 0,children:[e.jsxs("div",{className:"space-y-2",children:[S.map(q=>e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:String(p.id),roomId:q.id},className:"group flex items-center gap-3 p-2.5 rounded-md bg-black/30 border border-white/5 hover:border-primary/50 hover:bg-primary/5 transition",children:[e.jsx("span",{className:"font-display text-[11px] text-primary/60 group-hover:text-primary tabular-nums w-5 text-right",children:"→"}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-sm text-foreground/90 group-hover:text-primary transition truncate",children:q.name}),e.jsx("span",{className:"block text-[10px] tracking-[0.18em] uppercase text-muted-foreground truncate",children:q.subtitle})]})]},q.id)),S.length===0&&e.jsx("div",{className:"text-xs text-muted-foreground italic",children:"No other rooms on this floor."})]}),e.jsx(j,{to:"/",className:"mt-4 inline-block text-[10px] tracking-[0.28em] uppercase text-primary/80 hover:text-primary",children:"← Return to Elevator"})]})]}),it&&e.jsx("div",{className:"mt-6",children:e.jsx(sm,{})}),Ke&&e.jsx("div",{className:"mt-6",children:e.jsx(om,{})}),Ee&&e.jsx("div",{className:"mt-6",children:e.jsx(bm,{})}),Le&&e.jsx("div",{className:"mt-6",children:e.jsx(Ym,{})}),G&&e.jsx("div",{className:"mt-6",children:e.jsx(Lm,{})}),Te&&e.jsx("div",{className:"mt-6",children:e.jsx(Rl,{})})]})]})}const he=[{key:"2026-01",revenue:168400,cogs:24200,payroll:45200,marketing:4100,software:7800,office:6800,other:5900},{key:"2026-02",revenue:178900,cogs:25800,payroll:45800,marketing:5200,softw
8are:8100,office:6800,other:6400},{key:"2026-03",revenue:192600,cogs:27400,payroll:46100,marketing:6900,software:8650,office:6800,other:6800},{key:"2026-04",revenue:211300,cogs:29900,payroll:47200,marketing:8200,software:9080,office:6800,other:7120},{key:"2026-05",revenue:226700,cogs:31200,payroll:47900,marketing:12920,software:10270,office:6800,other:8690},{key:"2026-06",revenue:121500,cogs:16400,payroll:48200,marketing:7430,software:6220,office:6800,other:3100}];function Pr(t){return t.payroll+t.marketing+t.software+t.office+t.other}function Ze(t){return t.revenue-t.cogs}function ke(t){return Ze(t)-Pr(t)}function Ge(t,r){return r===0?0:t/r*100}function Yd(){const t=he,r=t[t.length-1],s=t[t.length-2],a=t.reduce((f,S)=>({revenue:f.revenue+S.revenue,cogs:f.cogs+S.cogs,payroll:f.payroll+S.payroll,marketing:f.marketing+S.marketing,software:f.software+S.software,office:f.office+S.office,other:f.other+S.other}),{revenue:0,cogs:0,payroll:0,marketing:0,software:0,office:0,other:0}),i=a.revenue-a.cogs,d=a.payroll+a.marketing+a.software+a.office+a.other,l=i-d,n=Ge(Ze(r),r.revenue),o=Ge(Ze(s),s.revenue),c=Ge(ke(r),r.revenue),u=Ge(r.revenue-s.revenue,s.revenue),m=ke(r)-ke(s),g=Math.max(...t.map(f=>f.revenue)),p=[{label:"Payroll",amount:r.payroll,cls:"bg-primary"},{label:"Marketing",amount:r.marketing,cls:"bg-fuchsia-400"},{label:"Software",amount:r.software,cls:"bg-sky-400"},{label:"Office",amount:r.office,cls:"bg-amber-400"},{label:"Other",amount:r.other,cls:"bg-muted-foreground"}],y=p.reduce((f,S)=>f+S.amount,0);return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:["The honest scoreboard. Revenue minus what it costs to deliver, minus what it costs to run. Pulls from"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"text-primary underline-offset-2 underline",children:"Your Books"})," ","and feeds"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"text-primary underline-offset-2 underline",children:"Forecasting"}),"."]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:`Revenue · ${U(r.key)}`,value:R(r.revenue,!0),sub:`${u>=0?"+":""}${u.toFixed(1)}% vs ${U(s.key)}`}),e.jsx(A,{label:"Gross Margin",value:`${n.toFixed(1)}%`,sub:`${n-o>=0?"+":""}${(n-o).toFixed(1)} pts MoM`}),e.jsx(A,{label:"Net Income",value:R(ke(r),!0),sub:`${m>=0?"+":""}${R(m,!0)} vs prior`}),e.jsx(A,{label:"Net Margin",value:`${c.toFixed(1)}%`,sub:`YTD net ${R(l,!0)}`})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"6-Month Trend"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Revenue vs Net Income"})]}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-3 rounded-sm bg-primary"}),"Revenue"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-3 rounded-sm bg-emerald-400"}),"Net (positive)"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-3 rounded-sm bg-rose-400"}),"Net (loss)"]})]})]}),e.jsx("div",{className:"flex items-end gap-4 h-48",children:t.map(f=>{const S=Math.max(8,f.revenue/g*170),h=ke(f),w=Math.max(6,Math.abs(h)/g*170),I=h>=0?"bg-emerald-400":"bg-rose-400";return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2 group",children:[e.jsx("div",{className:"text-[10px] text-muted-foreground tabular-nums",children:R(f.revenue,!0)}),e.jsxs("div",{className:"w-full flex items-end gap-1 h-[170px]",children:[e.jsx("div",{className:"flex-1 rounded-t-sm bg-primary/60 group-hover:bg-primary transition shadow-[0_0_12px_var(--glow-soft)]",style:{height:`${S}px`}}),e.jsx("div",{className:`flex-1 rounded-t-sm ${I} opacity-80 group-hover:opacity-100 transition`,style:{height:`${w}px`}})]}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:U(f.key)})]},f.key)})})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-white/5 flex items-baseline justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Statement"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Profit & Loss — Monthly"})]}),e.jsxs("button",{onClick:()=>v.success("P&L exported to CSV"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," Export"]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("th",{className:"text-left font-normal px-4 py-2",children:"Line Item"}),t.map(f=>e.jsx("th",{className:"text-right font-normal px-3 py-2 tabular-nums",children:U(f.key)},f.key)),e.jsx("th",{className:"text-right font-normal px-4 py-2 tabular-nums text-primary/80",children:"YTD"})]})}),e.jsxs("tbody",{className:"[&>tr]:border-t [&>tr]:border-white/5",children:[e.jsx(ge,{label:"Revenue",values:t.map(f=>f.revenue),ytd:a.revenue,bold:!0}),e.jsx(ge,{label:"Cost of Goods",values:t.map(f=>-f.cogs),ytd:-a.cogs,muted:!0}
8),e.jsx(ge,{label:"Gross Profit",values:t.map(f=>Ze(f)),ytd:i,bold:!0,tint:!0}),e.jsx(ge,{label:"  · Gross Margin %",values:t.map(f=>Ge(Ze(f),f.revenue)),ytd:Ge(i,a.revenue),isPct:!0,muted:!0}),e.jsx(ge,{label:"Payroll",values:t.map(f=>-f.payroll),ytd:-a.payroll,muted:!0}),e.jsx(ge,{label:"Marketing",values:t.map(f=>-f.marketing),ytd:-a.marketing,muted:!0}),e.jsx(ge,{label:"Software",values:t.map(f=>-f.software),ytd:-a.software,muted:!0}),e.jsx(ge,{label:"Office & Rent",values:t.map(f=>-f.office),ytd:-a.office,muted:!0}),e.jsx(ge,{label:"Other Opex",values:t.map(f=>-f.other),ytd:-a.other,muted:!0}),e.jsx(ge,{label:"Total Opex",values:t.map(f=>-Pr(f)),ytd:-d,bold:!0}),e.jsx(ge,{label:"Net Income",values:t.map(f=>ke(f)),ytd:l,bold:!0,tint:!0}),e.jsx(ge,{label:"  · Net Margin %",values:t.map(f=>Ge(ke(f),f.revenue)),ytd:Ge(l,a.revenue),isPct:!0,muted:!0})]})]})})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.4fr_1fr]",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:["Operating Expenses · ",U(r.key)]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Where the dollars went"}),e.jsx("div",{className:"flex h-3 w-full rounded-sm overflow-hidden mb-4",children:p.map(f=>e.jsx("div",{className:f.cls,style:{width:`${f.amount/y*100}%`},title:`${f.label} · ${R(f.amount)}`},f.label))}),e.jsx("ul",{className:"space-y-1.5",children:p.map(f=>e.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${f.cls} shrink-0`}),e.jsx("span",{className:"flex-1 text-foreground/85 truncate",children:f.label}),e.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[Math.round(f.amount/y*100),"%"]}),e.jsx("span",{className:"w-20 text-right text-foreground/90 tabular-nums",children:R(f.amount,!0)})]},f.label))})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"AI Read"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"What to notice"}),e.jsxs("ul",{className:"space-y-2 text-xs text-foreground/85",children:[e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["Revenue is up ",e.jsxs("span",{className:"text-emerald-400",children:[u>=0?"+":"",u.toFixed(1),"%"]})," MoM (note June is partial-month)."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["Gross margin sits at ",e.jsxs("span",{className:"text-foreground",children:[n.toFixed(1),"%"]})," — ",n>=80?"healthy SaaS range":n>=60?"solid services range":"tight, review COGS","."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["Payroll is ",e.jsxs("span",{className:"text-foreground",children:[Math.round(r.payroll/r.revenue*100),"%"]})," of revenue this month."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsx("span",{children:"Marketing spend grew sharply in May; watch CAC payback next month."})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["YTD net income: ",e.jsx("span",{className:l>=0?"text-emerald-400":"text-rose-400",children:R(l,!0)})," on ",R(a.revenue,!0)," revenue."]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Your Books"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"purchasing"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Purchasing →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"loans-grants"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Funding →"})]})]})}function ge({label:t,values:r,ytd:s,bold:a,muted:i,tint:d,isPct:l}){const n=m=>l?`${m.toFixed(1)}%`:m<0?`(${R(-m,!0)})`:R(m,!0),o=a?"text-foreground font-medium":i?"text-muted-foreground":"text-foreground
8/85",c=a?"text-foreground font-medium":i?"text-muted-foreground":"text-foreground/85",u=d?"bg-primary/5":"";return e.jsxs("tr",{className:u,children:[e.jsx("td",{className:`px-4 py-1.5 ${o}`,dangerouslySetInnerHTML:{__html:t.replace(/&amp;/g,"&")}}),r.map((m,g)=>e.jsx("td",{className:`px-3 py-1.5 text-right tabular-nums ${c}`,children:n(m)},g)),e.jsx("td",{className:`px-4 py-1.5 text-right tabular-nums ${a?"text-primary":"text-primary/80"}`,children:n(s)})]})}const qs={bull:{label:"Bull",growth:.1,cogsPct:.14,opexGrowth:.03,cls:"border-emerald-400/40 bg-emerald-400/5",dot:"bg-emerald-400"},base:{label:"Base Case",growth:.05,cogsPct:.15,opexGrowth:.02,cls:"border-primary/40 bg-primary/5",dot:"bg-primary"},bear:{label:"Bear",growth:0,cogsPct:.17,opexGrowth:.04,cls:"border-rose-400/40 bg-rose-400/5",dot:"bg-rose-400"}};function qd(){const[t,r]=x.useState("base"),[s,a]=x.useState(0),[i,d]=x.useState(0),[l,n]=x.useState(0),o=vt,c=he[he.length-2],u=c.revenue,m=Pr(c),g=qs[t],p=g.growth+s/100,y=g.opexGrowth,f=1-i/100,S=l*11e3,h=(()=>{const k=[];let L=o;for(let Y=0;Y<12;Y++){const C=new Date(2026,5+Y,1),_=`${C.getFullYear()}-${String(C.getMonth()+1).padStart(2,"0")}`,W=u*Math.pow(1+p,Y+1),G=W*g.cogsPct,Te=m*Math.pow(1+y,Y+1)*f+S,Ye=W-G-Te;L+=Ye,k.push({key:_,revenue:W,cogs:G,opex:Te,net:Ye,cash:L})}return k})(),w=h.reduce((k,L)=>k+L.revenue,0),I=h.reduce((k,L)=>k+L.net,0),O=h[h.length-1].cash,P=h.find(k=>k.net>=0),b=h.find(k=>k.cash<=0),N=Math.min(o,...h.map(k=>k.cash)),M=h.slice(0,6).reduce((k,L)=>k+Math.max(0,-L.net),0)/6,$=M>0?o/M:1/0,F=Math.max(...h.map(k=>k.revenue)),D=Math.max(o,...h.map(k=>k.cash)),ee=Math.min(0,...h.map(k=>k.cash));return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:["Look 12 months ahead with three scenarios — then nudge the levers to stress-test the plan. Forecast starts from"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"text-primary underline-offset-2 underline",children:"last month's P&L"})," ","and"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"text-primary underline-offset-2 underline",children:"cash on hand"}),"."]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:["bull","base","bear"].map(k=>{const L=qs[k],Y=t===k;return e.jsxs("button",{onClick:()=>r(k),className:`text-left rounded-md border p-4 transition ${Y?L.cls:"border-white/5 bg-black/40 hover:border-white/15"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-2 w-2 rounded-full ${L.dot}`}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Scenario"})]}),e.jsx("div",{className:`font-display text-lg mt-1 ${Y?"text-foreground glow-text":"text-foreground/80"}`,children:L.label}),e.jsxs("div",{className:"mt-2 text-[11px] text-muted-foreground space-y-0.5",children:[e.jsxs("div",{children:["Revenue growth: ",e.jsxs("span",{className:"text-foreground/85 tabular-nums",children:[(L.growth*100).toFixed(0),"%/mo"]})]}),e.jsxs("div",{children:["COGS: ",e.jsxs("span",{className:"text-foreground/85 tabular-nums",children:[(L.cogsPct*100).toFixed(0),"% of rev"]})]}),e.jsxs("div",{children:["Opex growth: ",e.jsxs("span",{className:"text-foreground/85 tabular-nums",children:[(L.opexGrowth*100).toFixed(0),"%/mo"]})]})]})]},k)})}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"What-if Levers"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Stress-test the plan"})]}),e.jsx("button",{onClick:()=>{a(0),d(0),n(0),v("Levers reset")},className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Reset"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(Gr,{label:"Growth boost",value:`${s>=0?"+":""}${s.toFixed(1)} pts/mo`,min:-5,max:10,step:.5,current:s,onChange:a,hint:"Adds to monthly revenue growth"}),e.jsx(Gr,{label:"Opex cut",value:`${i.toFixed(0)}%`,min:0,max:30,step:1,current:i,onChange:d,hint:"Cuts every line of operating expense"}),e.jsx(Gr,{label:"New hires",value:`${l}
8 added`,min:0,max:10,step:1,current:l,onChange:n,hint:"~$11k/mo loaded cost per hire"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"12-Month Revenue",value:R(w,!0),sub:`${g.label} scenario`}),e.jsx(A,{label:"12-Month Net",value:R(I,!0),sub:I>=0?"Profitable plan":"Burning cash"}),e.jsx(A,{label:"Ending Cash",value:R(O,!0),sub:`Min along path ${R(N,!0)}`}),e.jsx(A,{label:"Runway",value:b?`${h.indexOf(b)+1} mo`:$===1/0||$>24?"24+ mo":`${$.toFixed(1)} mo`,sub:b?`Cash-out ${U(b.key)}`:"At current burn"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"12-Month Projection"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Revenue path"})]}),P&&e.jsxs("div",{className:"text-[11px] text-emerald-400 tabular-nums",children:["Breakeven · ",U(P.key)]})]}),e.jsx("div",{className:"flex items-end gap-2 h-44",children:h.map(k=>{const L=Math.max(8,k.revenue/F*160),Y=k.net>=0;return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1.5 group",children:[e.jsx("div",{className:"text-[9px] text-muted-foreground tabular-nums opacity-0 group-hover:opacity-100 transition",children:R(k.revenue,!0)}),e.jsx("div",{className:`w-full rounded-t-sm transition ${Y?"bg-primary/60 group-hover:bg-primary":"bg-amber-400/60 group-hover:bg-amber-400"} shadow-[0_0_10px_var(--glow-soft)]`,style:{height:`${L}px`},title:`${U(k.key)} · Rev ${R(k.revenue)} · Net ${R(k.net)}`}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:U(k.key).slice(0,3)})]},k.key)})}),e.jsxs("div",{className:"mt-3 flex items-center gap-4 text-[11px] text-muted-foreground",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-3 rounded-sm bg-primary/70"}),"Profitable month"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-3 rounded-sm bg-amber-400/70"}),"Loss month"]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Cash Trajectory"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Will we run out of money?"}),e.jsxs("div",{className:"relative h-40 border-b border-l border-white/10",children:[e.jsx("div",{className:"absolute inset-0 flex items-end gap-1",children:h.map(k=>{const L=D-ee||1,Y=(D-k.cash)/L*100,C=(D-0)/L*100,_=k.cash<0;return e.jsx("div",{className:"flex-1 relative h-full",title:`${U(k.key)} · ${R(k.cash)}`,children:_?e.jsx("div",{className:"absolute left-0 right-0 bg-rose-400/60",style:{to
8p:`${C}%`,bottom:`${100-Y}%`}}):e.jsx("div",{className:"absolute left-0 right-0 bg-emerald-400/50 shadow-[0_0_10px_rgba(52,211,153,0.4)]",style:{top:`${Y}%`,bottom:`${100-C}%`}})},k.key)})}),e.jsx("div",{className:"absolute left-0 right-0 border-t border-dashed border-white/30",style:{top:`${(D-0)/(D-ee||1)*100}%`},children:e.jsx("span",{className:"absolute -top-4 right-0 text-[9px] text-muted-foreground tabular-nums",children:"$0"})})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:[e.jsx("span",{children:U(h[0].key)}),e.jsx("span",{children:U(h[h.length-1].key)})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-white/5 flex items-baseline justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:["12-Month Forecast · ",g.label]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Month-by-month detail"})]}),e.jsxs("button",{onClick:()=>v.success("Forecast exported to CSV"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," Export"]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("th",{className:"text-left font-normal px-4 py-2",children:"Month"}),e.jsx("th",{className:"text-right font-normal px-3 py-2",children:"Revenue"}),e.jsx("th",{className:"text-right font-normal px-3 py-2",children:"COGS"}),e.jsx("th",{className:"text-right font-normal px-3 py-2",children:"Opex"}),e.jsx("th",{className:"text-right font-normal px-3 py-2",children:"Net"}),e.jsx("th",{className:"text-right font-normal px-4 py-2",children:"Cash"})]})}),e.jsx("tbody",{className:"[&>tr]:border-t [&>tr]:border-white/5",children:h.map(k=>e.jsxs("tr",{children:[e.jsxs("td",{className:"px-4 py-1.5 text-foreground/85",children:[U(k.key)," ",k.key.slice(2,4)]}),e.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-foreground/85",children:R(k.revenue,!0)}),e.jsxs("td",{className:"px-3 py-1.5 text-right tabular-nums text-muted-foreground",children:["(",R(k.cogs,!0),")"]}),e.jsxs("td",{className:"px-3 py-1.5 text-right tabular-nums text-muted-foreground",children:["(",R(k.opex,!0),")"]}),e.jsx("td",{className:`px-3 py-1.5 text-right tabular-nums ${k.net>=0?"text-emerald-400":"text-rose-400"}`,children:k.net<0?`(${R(-k.net,!0)})`:R(k.net,!0)}),e.jsx("td",{className:`px-4 py-1.5 text-right tabular-nums font-medium ${k.cash<0?"text-rose-400":"text-foreground"}`,children:k.cash<0?`(${R(-k.cash,!0)})`:R(k.cash,!0)})]},k.key))})]})})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Assumptions & Notes"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"How this forecast is built"}),e.jsxs("ul",{className:"space-y-2 text-xs text-foreground/85",children:[e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["Starting point: ",e.jsx("span",{className:"text-foreground",children:U(c.key)})," actuals — revenue ",R(u,!0),", opex ",R(m,!0),"."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:["Starting cash: ",e.jsx("span",{className:"text-foreground",children:R(o,!0)})," from Your Books."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsxs("span",{children:[g.label,": revenue compounds at ",e.jsxs("span",{className:"text-foreground",children:[((g.growth+s/100)*100).toFixed(1),"%/mo"]}),", COGS held at ",e.jsxs("span",{className:"text-foreground",children:[(g.cogsPct*100).toFixed(0),"%"]})," of revenue, opex grows ",e.jsxs("span",{className:"text-foreground",children:[(g.opexGrowth*100).toFixed(0),"%/mo"]}),i>0?e.jsxs(e.Fragment,{children:[" with a ",e.jsxs("span",{className:"text-emerald-400",children:[i,"% cut"]})," applied"]}):null,l>0?e.jsxs(e.Fragment,{children:[", plus ",e.jsxs("span",{className:"text-amber-400",children:[l," new hire(s)"]})," at ~$11k/mo each"]}):null,"."]})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsx("span",{children:P?e.jsxs(e.Fragment,{children:["First profitable month: ",e.jsx("span",{className:"text-emerald-400",children:U(P.key)}),"."]}):e.jsx("span",{className:"text-amber-400",children:"No breakeven in 12 months — revisit growth or c
8ost assumptions."})})]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary mt-0.5",children:"→"}),e.jsx("span",{children:b?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-rose-400",children:["Cash runs out in ",U(b.key)]})," — raise, cut, or grow faster."]}):e.jsx(e.Fragment,{children:"Cash stays positive across the 12-month horizon."})})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Profit & Loss"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Your Books →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"loans-grants"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Funding →"}),e.jsx("button",{onClick:()=>v.success("Forecast snapshot saved"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Save Snapshot"})]})]})}function Gr({label:t,value:r,min:s,max:a,step:i,current:d,onChange:l,hint:n}){return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-1",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:t}),e.jsx("span",{className:"text-xs tabular-nums text-primary",children:r})]}),e.jsx("input",{type:"range",min:s,max:a,step:i,value:d,onChange:o=>l(Number(o.target.value)),className:"w-full accent-primary"}),e.jsx("div",{className:"text-[10px] text-muted-foreground mt-1",children:n})]})}const Kd=[{id:"industry",label:"Industry News",tint:"from-sky-500/30 to-sky-500/0",cta:"Choose Industry",articles:[{title:"AI agents now write 38% of small-business SOPs, survey finds",source:"SMB Weekly",time:"12m"},{title:"Federal Reserve signals rate hold through Q3",source:"Reuters",time:"41m"},{title:"OpenAI announces enterprise agent marketplace",source:"TechCrunch",time:"1h"},{title:"Shopify rolls out built-in invoice financing for sellers",source:"Retail Dive",time:"2h"},{title:"California passes new gig-worker classification rules",source:"WSJ",time:"3h"},{title:"Anthropic raises $4B in extended Series E",source:"Bloomberg",time:"5h"},{title:"Stripe adds usage-based billing primitives",source:"The Information",time:"7h"},{title:"Walmart pilots autonomous last-mile delivery in Texas",source:"Axios",time:"9h"}]},{id:"personal",label:"Personal Favorites",tint:"from-fuchsia-500/30 to-fuchsia-500/0",cta:"Pick Favorite",articles:[{title:"How to read a P&L in under 5 minutes",source:"Saved · Founders Daily",time:"Today"},{title:"12 negotiation moves I steal from procurement pros",source:"Saved · First Round",time:"Yesterday"},{title:"Why the best operators journal every Friday",source:"Saved · Lenny's Newsletter",time:"2d"},{title:"The one-page strategy that scaled my agency 4x",source:"Saved · Indie Hackers",time:"4d"},{title:"Inbox zero is a trap — try inbox 12 instead",source:"Saved · HBR",time:"1w"},{title:"Hiring your first ops lead: a 30/60/90 template",source:"Saved · SaaStr",time:"1w"}]},{id:"company",label:"Company News",tint:"from-emerald-500/30 to-emerald-500/0",cta:"Company Name",articles:[{title:"Q2 close completed — revenue up 18% MoM",source:"Internal · Finance",time:"Today"},{title:"New SOP published: Customer Refund Workflow v3",source:"Internal · Ops",time:"Today"},{title:"Welcome Maya R. — joining as Head of Partnerships",source:"Internal · People",time:"Yesterday"},{title:"All-hands on Friday at 10am PT — agenda attached",source:"Internal · Leadership",time:"2d"},{title:"Annual security training due by end of month",source:"Internal · Security",time:"3d"},{title:"Office WiFi upgrade scheduled for Saturday night",source:"Internal · IT",time:"5d"}]}
8,{id:"ffai",label:"FFAI News",tint:"from-amber-500/30 to-amber-500/0",cta:"FFAI Topics",articles:[{title:"TIB v2.4 ships — Newsroom monitors go live",source:"FFAI Product",time:"Just now"},{title:"New agent: Vesper now handles compliance reviews",source:"FFAI Agents",time:"1h"},{title:"Tool Garage adds 6 new starter cabinets",source:"FFAI Product",time:"Today"},{title:"Founders membership renewal window opens Monday",source:"FFAI Memberships",time:"1d"},{title:"Behind the scenes: how we built the SOP Generator",source:"FFAI Blog",time:"3d"},{title:"Community AMA with the FFAI team — next Thursday",source:"FFAI Events",time:"4d"},{title:"New senior consultants added to Control Tower",source:"FFAI Consultants",time:"1w"}]}];function Qd(){return e.jsx("div",{className:"mt-6 grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",children:Kd.map(t=>e.jsx(Jd,{feed:t},t.id))})}function Jd({feed:t}){const r=[...t.articles,...t.articles];return e.jsxs("div",{className:"relative rounded-lg border border-primary/30 bg-black/70 shadow-[0_0_24px_-8px_var(--glow)] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-primary/20 bg-gradient-to-b from-white/5 to-transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:t.label})]}),e.jsx("span",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Live"})]}),e.jsxs("div",{className:"relative h-56 overflow-hidden bg-[radial-gradient(ellipse_at_top,_oklch(0.18_0.05_240)_0%,_oklch(0.06_0.02_240)_70%)]",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none opacity-30 mix-blend-overlay",style:{backgroundImage:"repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(255,255,255,0.06) 2px, rgba(255,255,255,0.06) 3px)"}}),e.jsx("div",{className:"absolute inset-x-0 top-0 h-6 bg-gradient-to-b from-black/80 to-transparent pointer-events-none z-10"}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t from-black/80 to-transparent pointer-events-none z-10"}),e.jsx("div",{className:"animate-news-scroll px-3 py-3 space-y-2.5",children:r.map((s,a)=>e.jsxs("div",{className:"rounded-md border border-white/5 bg-white/[0.03] px-2.5 py-2 hover:border-primary/40 transition",children:[e.jsx("div",{className:"text-[12px] leading-snug text-foreground/90 line-clamp-2",children:s.title}),e.jsxs("div",{className:"mt-1 flex items-center justify-between text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:[e.jsx("span",{className:"truncate",children:s.source}),e.jsx("span",{className:"shrink-0 ml-2 text-primary/70",children:s.time})]})]},`${t.id}-${a}`))})]}),e.jsx("div",{className:"px-2 py-2 border-t border-primary/20 bg-gradient-to-b from-transparent to-white/[0.02]",children:e.jsx("button",{type:"button",className:"w-full px-2 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass hover:glow-edge text-foreground/90",children:t.cta})})]})}function T({icon:t,label:r,value:s}){return e.jsxs("div",{className:"rounded-md glass border border-primary/20 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(t,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-display text-xl text-primary glow-text",children:s})]}),e.jsx("div",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground mt-1",children:r})]})}const Ks=[{id:"cash-crunch",category:"Cash Flow Crunch",prompt:"Payroll hits Friday. AR is 22 days late from your top customer. You have 7 days of cash.",context:"Customer is a $1.2M/yr account. CFO says don't spook them. Bank line has $40k headroom.",choices:[{id:"a",label:"Draw the line, defer one founder paycheck, call the customer's controller personally.",verdict:"best",coachNote:"Buys runway, preserves the relationship, and signals discipline to the team. Founder skin in the game = trust."},{id:"b",label:"Factor the invoice for an 8% haircut.",verdict:"ok",coachNote:"Solves cash today but trains the customer to keep paying late and erodes margin every cycle."},{id:"c",label:"Threaten to halt service until they wire.",verdict:"risky",coachNote:"May win the battle, will likely lose the account at renewal. Use only as the final lever."}]},{id:"star-quits",category:"Key Person Risk",prompt:"Your top salesperson (38% of pipeline) just gave 2 weeks notice for a competitor.",context:"She owns the 5 largest accounts. No non-compete. Comp plan was renegotiated 6 months ago.",choices:[{id:"a",label:"Counter-offer hard — match base + equity grant.",verdict:"risky",coachNote:"Buys 6–12 months at best and teaches the rest of the team that quitting is the path to a raise."},{id:"b",label:"Accept gracefully, lock down account intros this week, and split her book among 2 reps with a 90-day commission bridge.",verdict:"best",coachNote:"Protects revenue, accelerates a succession you needed anyway, and tells the team you're built to absorb losses."},{id:"c",label:"Sue over customer relationships.",verdict:"risky",coachNote:"Legal cost + chilling effect on every future hire. Almost never worth it without a signed non-solicit."}]},{id:"pricing-pressure",category:"Pricing & Margin",prompt:"Biggest customer demands a 15% price cut at renewal or they go to bid.",context:"They're 28% of revenue. Your gross margin on them is 41%. CAC payback on a replacement is 11 months.",choices:[{id:"a",label:"Cut 15% to keep them.",verdict:"risky",coachNote:"Drops margin to 26%. Every other customer will hear about it within a quarter."},{id:"b",label:"Hold price, offer a 2-year lock at 5% off year one, add one premium service line free for 6 months.",verdict:"best",coachNote:"Reframes the negotiation around value and term, not price. Protects the floor for everyone else."},{id:"c",label:"Let them walk and double down on the next 5 mid-market accounts.",verdict:"ok",coachNote:"Healthy long-term, brutal next two quarters. Only choose if you have the cash and a real pipeline."}]},{id:"ai-bet",category:"Build vs. Buy",prompt:"Engineering wants 4 months to build an in-house AI feature. A vendor offers it next week for $4k/mo.",context:"Feature is core to the customer pitch but not your moat. Eng team is already behind on the roadmap.",choices:[{id:"a",label:"Build in-house — it's strategic.",verdict:"risky",coachNote:"Strategic ≠ proprietary. You'll spend the moat budget on a commodity layer competitors are renting."},{id:"b",label:"Buy the vendor, ship in 2 weeks, revisit build only if it becomes a margin or differentiation issue.",verdict:"best",coachNote:"Velocity wins. You can always insource later when the use case is proven."},{id:"c",label:"Do both — vendor today, build in parallel.",verdict:"ok",coachNote:"Doubles spend and divi
8des focus. Only do this if the vendor is genuinely a risk to your roadmap."}]},{id:"bad-hire",category:"Hard People Call",prompt:"Your VP of Marketing (hired 5 months ago) isn't working out. Team morale is dropping.",context:"Strong resume, weak execution. Two direct reports have hinted they may leave.",choices:[{id:"a",label:"Give them another quarter with a tighter scorecard.",verdict:"risky",coachNote:"You already know. Every week you wait costs you two good people and a quarter of momentum."},{id:"b",label:"Part ways this week with a fair severance. Promote the strongest IC to interim lead.",verdict:"best",coachNote:"Clean break, signals high standards, and gives a rising star a real shot. Speed = kindness here."},{id:"c",label:"Sideline them into a 'strategy' role.",verdict:"risky",coachNote:"Everyone sees it. You lose your authority and the VP loses their dignity. Lose-lose."}]}],Xd={best:{label:"Best Play",pill:"bg-emerald-500/15 text-emerald-300 border-emerald-400/40"},ok:{label:"Defensible",pill:"bg-amber-500/15 text-amber-300 border-amber-400/40"},risky:{label:"Risky",pill:"bg-rose-500/15 text-rose-300 border-rose-400/40"}},Zd=[{id:"retro-arcade",label:"Retro Arcade — 80s Cabinet",tagline:"Insert coin. Classics from the golden age.",tint:"from-fuchsia-500/30 via-amber-400/20 to-cyan-400/20",games:[{name:"Pac-Man",href:"https://www.google.com/logos/2010/pacman10-i.html"},{name:"Space Invaders",href:"https://freeinvaders.org/"},{name:"Asteroids",href:"https://freeasteroids.org/"},{name:"Tetris",href:"https://tetris.com/play-tetris"},{name:"Snake",href:"https://playsnake.org/"}]},{id:"console-room",label:"Console Room — 16-Bit Den",tagline:"Plug & play. Browser-native classics.",tint:"from-cyan-400/25 via-primary/20 to-emerald-400/20",games:[{name:"Chess (vs AI)",href:"https://www.chess.com/play/computer"},{name:"2048",href:"https://play2048.co/"},{name:"Sudoku",href:"https://sudoku.com/"},{name:"Solitaire",href:"https://www.solitr.com/"},{name:"Minesweeper",href:"https://minesweeper.online/"}]}];
8function ec(){const[t,r]=x.useState(0),[s,a]=x.useState(null),[i,d]=x.useState({played:0,best:0}),l=Ks[t];function n(){r(c=>(c+1)%Ks.length),a(null)}function o(c){if(s)return;const u=l.choices.find(m=>m.id===c);u&&(a(c),d(m=>({played:m.played+1,best:m.best+(u.verdict==="best"?1:0)})))}return e.jsxs("div",{className:"mt-6 space-y-8",children:[e.jsxs("section",{className:"rounded-xl border border-primary/30 bg-black/40 corner-bracket overflow-hidden",children:[e.jsxs("header",{className:"flex items-center justify-between px-5 py-3 border-b border-primary/20 bg-gradient-to-b from-white/[0.04] to-transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),e.jsx("span",{className:"font-display text-[11px] tracking-[0.28em] uppercase text-primary glow-text",children:"Boardroom Scenarios · Mock Drill"})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground tabular-nums",children:["Round ",i.played," · ",i.best," best-plays"]})]}),e.jsxs("div",{className:"p-5 grid lg:grid-cols-5 gap-5",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary/80",children:l.category}),e.jsx("h3",{className:"font-display text-xl leading-snug text-foreground glow-text",children:l.prompt}),e.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed",children:l.context}),e.jsxs("div",{className:"pt-2 flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:n,className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass hover:glow-edge",children:s?"Next Scenario →":"Skip Scenario"}),e.jsx("button",{type:"button",onClick:()=>v.success("Scenario sent to your AI coach",{description:"We'll workshop this one in your next Café session."}),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary/90 text-primary-foreground hover:opacity-90 transition",children:"Ask the AI Coach"})]})]}),e.jsx("div",{className:"lg:col-span-3 space-y-2.5",children:l.choices.map(c=>{const u=s===c.id,m=s!==null,g=Xd[c.verdict];return e.jsx("button",{type:"button",onClick:()=>o(c.id),disabled:m,className:`w-full text-left rounded-md border p-3 transition ${u?"border-primary/70 bg-primary/10 glow-edge":m?"border-white/5 bg-white/[0.02] opacity-70":"border-white/10 bg-white/[0.03] hover:border-primary/50 hover:bg-primary/5 curs
8or-pointer"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("span",{className:"font-display text-[11px] text-primary/80 tabular-nums mt-0.5 w-5",children:[c.id.toUpperCase(),"."]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm text-foreground/90 leading-snug",children:c.label}),m&&e.jsxs("div",{className:"mt-2 flex items-start gap-2",children:[e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border ${g.pill}`,children:g.label}),e.jsx("p",{className:"text-[12px] text-foreground/75 leading-relaxed flex-1",children:c.coachNote})]})]})]})},c.id)})})]})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-fuchsia-400 pulse-ring"}),e.jsx("h3",{className:"font-display text-[11px] tracking-[0.28em] uppercase text-primary glow-text",children:"Arcade · Take a Break"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Zd.map(c=>e.jsx(tc,{cabinet:c},c.id))})]})]})}function tc({cabinet:t}){return e.jsxs("div",{className:"relative rounded-xl border border-primary/30 bg-gradient-to-b from-black/60 to-black/90 p-3 shadow-[0_0_30px_-10px_var(--glow)]",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:t.label}),e.jsx("span",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Insert Coin"})]}),e.jsxs("div",{className:`relative rounded-lg overflow-hidden border-4 border-black/80 bg-gradient-to-br ${t.tint}`,children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none opacity-30 mix-blend-overlay",style:{backgroundImage:"repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.35) 2px, rgba(0,0,0,0.35) 3px)"}}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{boxShadow:"inset 0 0 60px rgba(0,0,0,0.6)"}}),e.jsxs("div",{className:"relative p-5 min-h-[220px] flex flex-col",children:[e.jsx("div",{className:"font-display text-center text-foreground glow-text tracking-[0.18em] uppercase text-sm",children:"★ Select Game ★"}),e.jsx("div",{className:"mt-1 text-center text-[10px] tracking-[0.22em] uppercase text-foreground/70",children:t.tagline}),e.jsx("ul",{className:"mt-4 grid grid-cols-1 gap-1.5 flex-1",children:t.games.map(r=>e.jsx("li",{children:e.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center justify-between px-3 py-2 rounded border border-black/40 bg-black/40 hover:bg-black/60 hover:border-primary/60 transition",children:[e.jsxs("span",{className:"font-display text-[12px] tracking-[0.18em] uppercase text-foreground/90 group-hover:text-primary",children:["▶ ",r.name]}),e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground group-hover:text-primary/80",children:"Play ↗"})]})},r.name))})]})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between px-2 pt-1",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-rose-500/80 shadow-[0_0_8px_rgba(244,63,94,0.6)]"}),e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-amber-400/80 shadow-[0_0_8px_rgba(251,191,36,0.6)]"}),e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-emerald-400/80 shadow-[0_0_8px_rgba(52,211,153,0.6)]"}),e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-cyan-400/80 shadow-[0_0_8px_rgba(34,211,238,0.6)]"})]}),e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"High Score · You"})]})]})}const Me=[{id:"mar-bogo",name:"March Madness BOGO",channel:"Email + Site Banner",window:"Mar 4 – Mar 12",month:"Mar",status:"Winner",audience:"Existing customers (28k)",spend:4200,revenue:61800,orders:742,newCustomers:41,roas:14.7,takeaway:"Repeat buyers responded fast. Re-run quarterly but cap to 7 days — fatigue set in by day 8."},{id:"mar-referral",name:"Refer-a-Founder $50",channel:"In-app + Email",window:"Mar 10 – Mar 31",month:"Mar",status:"Mixed",audie
8nce:"Active members (4.1k)",spend:1800,revenue:12400,orders:88,newCustomers:88,roas:6.9,takeaway:"Strong CAC ($20) but low volume. Add an in-product nudge after first deliverable — that's the moment people share."},{id:"mar-webinar",name:"P&L Bootcamp Webinar",channel:"LinkedIn Ads + Email",window:"Mar 18",month:"Mar",status:"Winner",audience:"Cold + warm SMB owners",spend:3600,revenue:28900,orders:47,newCustomers:47,roas:8,takeaway:"Best top-of-funnel of the quarter. 312 registrants, 41% show rate. Repeat monthly with a rotating finance topic."},{id:"apr-spring",name:"Spring Reset Bundle (3-mo plan)",channel:"Email + Paid Social",window:"Apr 1 – Apr 14",month:"Apr",status:"Winner",audience:"Lapsed trials (6.8k)",spend:5800,revenue:74200,orders:312,newCustomers:212,roas:12.8,takeaway:"Bundled pricing won back lapsed trials at scale. Bundle as default offer for any trial >30 days cold."},{id:"apr-flash",name:"48-Hour Flash Sale — Tokens 20% Off",channel:"Email + Push",window:"Apr 22 – Apr 23",month:"Apr",status:"Winner",audience:"Token buyers (12k)",spend:900,revenue:38400,orders:514,newCustomers:0,roas:42.7,takeaway:"Highest ROAS of the quarter. Schedule one flash per month; never two in a row (cannibalizes full-price tokens)."},{id:"apr-influencer",name:"Operator Spotlight Series",channel:"Influencer (3 creators)",window:"Apr 8 – Apr 28",month:"Apr",status:"Underperformed",audience:"Cold audiences (~180k)",spend:12500,revenue:9200,orders:31,newCustomers:28,roas:.7,takeaway:"Creators didn't match our ICP. Cut influencer spend in May; reallocate to webinar series that's clearly working."},{id:"may-loyalty",name:"Founders Loyalty Upgrade",channel:"In-app + Concierge",window:"May 1 – May 15",month:"May",status:"Winner",audience:"Operators with 4+ mo tenure",spend:600,revenue:49800,orders:67,newCustomers:0,roas:83,takeaway:"Tier upgrade nudges at the right tenure window converted at 14%. Make this a permanent always-on play."},{id:"may-bf-preview",name:"Memorial Day Preview Drop",channel:"Email + Site Hero",window:"May 24 – May 27",month:"May",status:"Mixed",audie
8nce:"Full list (34k)",spend:2100,revenue:19600,orders:198,newCustomers:22,roas:9.3,takeaway:"Solid but unremarkable. Holiday halo helped opens (+18%). Worth keeping; not worth scaling spend."},{id:"may-webinar2",name:"Pricing Strategy Workshop",channel:"LinkedIn Ads + Partners",window:"May 20",month:"May",status:"Winner",audience:"Cold SMB founders",spend:4100,revenue:36500,orders:58,newCustomers:58,roas:8.9,takeaway:"Confirms the webinar engine. Lock in 1 per month with co-marketing partners to cut CAC further."}],rc={Winner:"bg-emerald-500/15 text-emerald-300 border-emerald-400/40",Mixed:"bg-amber-500/15 text-amber-300 border-amber-400/40",Underperformed:"bg-rose-500/15 text-rose-300 border-rose-400/40"};function E(t){return t>=1e3?`$${(t/1e3).toFixed(t>=1e4?0:1)}k`:`$${t.toLocaleString()}`}function sc(){const t=Me.reduce((n,o)=>n+o.spend,0),r=Me.reduce((n,o)=>n+o.revenue,0),s=Me.reduce((n,o)=>n+o.orders,0),a=Me.reduce((n,o)=>n+o.newCustomers,0),i=r/Math.max(1,t),d=Me.filter(n=>n.status==="Winner"),l={Mar:Me.filter(n=>n.month==="Mar"),Apr:Me.filter(n=>n.month==="Apr"),May:Me.filter(n=>n.month==="May")};return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Every campaign that ran in the last 90 days, what it cost, what it returned, and the one-line lesson you should carry into the next promo. Click any row to copy a winning recipe into your next campaign brief."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[e.jsx(A,{label:"Promos Run",value:String(Me.length),sub:"Last 90 days"}),e.jsx(A,{label:"Total Spend",value:E(t),sub:"All channels"}),e.jsx(A,{label:"Revenue Attributed",value:E(r),sub:`${s.toLocaleString()} orders`}),e.jsx(A,{label:"Blended ROAS",value:`${i.toFixed(1)}×`,sub:`${d.length} winners`}),e.jsx(A,{label:"New Customers",value:a.toLocaleString(),sub:"From promos only"})]}),e.jsx("div",{className:"space-y-5",children:["Mar","Apr","May"].map(n=>{const o=l[n],c=o.reduce((g,p)=>g+p.revenue,0),u=o.reduce((g,p)=>g+p.spend,0),m=c/Math.max(1,u);return e.jsxs("section",{className:"rounded-xl border border-primary/20 bg-black/30 overflow-hidden",children:[e.jsxs("header",{className:"flex items-center justify-between px-5 py-3 border-b border-primary/15 bg-gradient-to-b from-white/[0.04] to-transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary pulse-ring"}),e.jsxs("span",{className:"font-display text-[11px] tracking-[0.28em] uppercase text-primary glow-text",children:[n==="Mar"?"March":n==="Apr"?"April":"May"," 2026"]}),e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground ml-2",children:[o.length," promos"]})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground tabular-nums",children:[E(u)," spend · ",E(c)," revenue · ",m.toFixed(1),"× ROAS"]})]}),e.jsx("div",{className:"divide-y divide-white/5",children:o.map(g=>e.jsx(ac,{promo:g},g.id))})]},n)})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v.success("Winning playbook drafted",{description:"Top 3 winners queued in Sales Playbooks for the next campaign brief."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Promote Winners to Playbook"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"strategies"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Open Sales Playbooks →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"analytics"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"View Pipeline →"})]})]})}function A({label:t,value:r,sub:s}){return e.jsxs("div",{className:"rounded-md glass border border-primary/20 p-3",children:[e.jsx("div",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground",children:t}),e.jsx("div",{className:"font-display text-xl text-primary glow-text mt-1 leading-none tabular-nums",children:r}),s&&e.jsx("div",{className:"text-[10px] text-muted-foreground mt-1",children:s})]})}function ac({promo:t}){const r=rc[t.status],s=t.revenue-t.spend;return e.jsxs("div",{className:"px-5 py-4 hover:bg-primary/[0.04] transition",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-3 items-start",children:[e.jsxs("div",{className:"col-span-12 md:col-span-5",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"font-display text-sm text-foreground
8/95",children:t.name}),e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border ${r}`,children:t.status})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:[t.channel," · ",t.window]}),e.jsxs("div",{className:"text-[11px] text-foreground/65 mt-0.5",children:["Audience: ",t.audience]})]}),e.jsxs("div",{className:"col-span-6 md:col-span-3 grid grid-cols-3 gap-2 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Spend"}),e.jsx("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:E(t.spend)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Revenue"}),e.jsx("div",{className:"font-display text-sm text-primary glow-text tabular-nums",children:E(t.revenue)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"ROAS"}),e.jsxs("div",{className:`font-display text-sm tabular-nums ${t.roas>=5?"text-emerald-300":t.roas>=1.5?"text-amber-300":"text-rose-300"}`,children:[t.roas.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"col-span-6 md:col-span-2 grid grid-cols-2 gap-2 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Orders"}),e.jsx("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:t.orders.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"New"}),e.jsx("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:t.newCustomers})]})]}),e.jsxs("div",{className:"col-span-12 md:col-span-2 text-right",children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Net"}),e.jsxs("div",{className:`font-display text-base tabular-nums ${s>=0?"text-emerald-300":"text-rose-300"}`,children:[s>=0?"+":"−",E(Math.abs(s))]})]})]}),e.jsxs("div",{className:"mt-2 text-[12px] text-foreground/75 leading-relaxed border-l-2 border-primary/40 pl-3",children:[e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-primary/80 mr-2",children:"Takeaway"}),t.takeaway]})]})}const Xe=[{id:"summer-launch",name:"Summer Launch — Founders Bundle",channel:"Email + Site Hero + Paid Social",audience:"Lapsed trials + warm leads (8.2k)",status:"Live",startedAt:"May 28",endsAt:"Jun 14",daysLeft:12,budget:8e3,spent:2940,revenue:41200,orders:187,goalOrders:500,pacing:"Ahead",signal:"Open rate 41% (+9 vs avg). Click-to-buy strongest from email; site hero underperforming — swap creative today.",owner:"Vega"},{id:"token-flash",name:"June Flash — Tokens 25% Off",channel:"Email + Push + In-App Banner",audience:"Token buyers, last 90d (12k)",status:"Ending Soon",startedAt:"Jun 1",endsAt:"Jun 3",daysLeft:1,budget:1200,spent:980,revenue:38600,orders:462,goalOrders:400,pacing:"Ahead",signal:"Goal hit in 36 hours. Hold the line — do NOT extend (cannibalizes June full-price tokens).",owner:"Vega"},{id:"webinar-pricing",name:"Pricing Workshop — June Cohort",channel:"LinkedIn Ads + Partners + Email",audience:"Cold SMB founders (180k reach)",status:"Live",startedAt:"May 22",endsAt:"Jun 17",daysLeft:15,budget:4500,spent:2100,revenue:14800,orders:24,goalOrders:60,pacing:"On Pace",signal:"289 registrants so far. LinkedIn CPL $34 (target $40). Partner co-promo lands Friday — expect 30% lift.",owner:"Atlas"},{id:"referral-evergreen",name:"Refer-a-Founder · Evergreen",channel:"In-app + Concierge nudge",audience:"Active operators (4.4k)",status:"Live",startedAt:"Mar 10",endsAt:"Always-on",daysLeft:999,budget:0,spent:0,revenue:6200,orders:44,goalOrders:60,pacing:"Behind",signal:"Referrals slowing month-over-month. Move share trigger from settings to post-deliverable success screen.",owner:"Nova"},{id:"tier-upgrade",name:"Founders Loyalty Upgrade · Wave 2",channel:"In-app + Concierge call",audience:"Operators 4+ mo tenure (612)",status:"Paused",startedAt:"May 16",endsAt:"Jun 10",daysLeft:8,budget:600,spent:220,revenue:12400,orders:14,goalOrders:25,pacing:"On Pace",signal:"Paused 24h — concierge bandwidth tight. Resume Monday 
8with auto-scheduler enabled.",owner:"Moneta"},{id:"midyear-webinar",name:"Mid-Year P&L Bootcamp",channel:"Email + LinkedIn Ads",audience:"Cold + warm SMB (240k reach)",status:"Scheduled",startedAt:"Jun 9",endsAt:"Jun 24",daysLeft:0,budget:3800,spent:0,revenue:0,orders:0,goalOrders:75,pacing:"On Pace",signal:"Creative + landing page approved. Audiences uploaded. Launches 8am Mon Jun 9.",owner:"Atlas"}],nc={Live:"bg-emerald-500/15 text-emerald-300 border-emerald-400/40","Ending Soon":"bg-amber-500/15 text-amber-300 border-amber-400/40",Paused:"bg-slate-500/15 text-slate-300 border-slate-400/40",Scheduled:"bg-sky-500/15 text-sky-300 border-sky-400/40"},ic={Ahead:"text-emerald-300","On Pace":"text-primary",Behind:"text-rose-300"};function oc(){const t=Xe.filter(n=>n.status==="Live"||n.status==="Ending Soon"),r=Xe.reduce((n,o)=>n+o.spent,0),s=Xe.reduce((n,o)=>n+o.revenue,0),a=Xe.reduce((n,o)=>n+o.orders,0),i=s/Math.max(1,r),d=Xe.filter(n=>n.status==="Ending Soon").length,l=Xe.filter(n=>n.pacing==="Behind"&&n.status!=="Scheduled").length;return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Every promo that's running, paused, or queued to launch this week. Spend, pacing, and the one signal your team should act on next. Updates every 5 minutes from the campaign feeds."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[e.jsx(A,{label:"Live Now",value:String(t.length),sub:`${d} ending soon`}),e.jsx(A,{label:"Spent (MTD)",value:E(r),sub:"Across all campaigns"}),e.jsx(A,{label:"Revenue (MTD)",value:E(s),sub:`${a.toLocaleString()} orders`}),e.jsx(A,{label:"Blended ROAS",value:`${i.toFixed(1)}×`,sub:"Live + scheduled"}),e.jsx(A,{label:"Pacing Alerts",value:String(l),sub:"Promos behind goal"})]}),e.jsxs("div",{className:"rounded-md border border-amber-400/30 bg-amber-500/[0.06] px-4 py-3 flex items-start gap-3",children:[e.jsx(re,{className:"h-4 w-4 text-amber-300 mt-0.5 shrink-0"}),e.jsxs("div",{className:"flex-1 text-[12px] text-foreground/85 leading-relaxed",children:[e.jsx("span",{className:"font-display text-amber-300 mr-2",children:"Heads up"}),"June Flash hits goal in <36 hours — hold to end-date as planned. Referral Evergreen is slipping; move the share trigger to the post-deliverable success screen this week."]}),e.jsx("button",{type:"button",onClick:()=>v.success("Acknowledged",{description:"Alert dismissed for the next 4 hours."}),className:"text-[9px] tracking-[0.22em] uppercase text-amber-300 hover:text-amber-200 shrink-0",children:"Acknowledge"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:Xe.map(n=>e.jsx(lc,{promo:n},n.id))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v.success("New promo draft created",{description:"Atlas will brief the team in your next stand-up."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"+ New Promotion"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"promotions"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Promotion History"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"strategies"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Sales Playbooks →"})]})]})}function lc({promo:t}){const r=nc[t.status],s=ic[t.pacing],a=t.budget>0?Math.min(100,Math.round(t.spent/t.budget*100)):0,i=t.goalOrders>0?Math.min(100,Math.round(t.orders/t.goalOrders*100)):0,d=t.endsAt==="Always-on";return e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 hover:border-primary/40 transition overflow-hidden",children:[e.jsxs("header",{className:"flex items-start justify-between gap-3 px-4 py-3 border-b border-white/5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95 leading-tight",children:t.name}),e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:t.channel})]}),e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border shrink-0 ${r}`,children:t.status})]}),e.jsxs("div",{className:"px-4 py-3 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-3 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Spend"}
8),e.jsx("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:t.budget>0?`${E(t.spent)} / ${E(t.budget)}`:"—"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Revenue"}),e.jsx("div",{className:"font-display text-sm text-primary glow-text tabular-nums",children:E(t.revenue)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Pacing"}),e.jsx("div",{className:`font-display text-sm tabular-nums ${s}`,children:t.pacing})]})]}),t.budget>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-[9px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:[e.jsx("span",{children:"Budget"}),e.jsxs("span",{className:"tabular-nums",children:[a,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:`h-full ${a>=90?"bg-rose-400":a>=70?"bg-amber-400":"bg-primary"}`,style:{width:`${a}%`}})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-[9px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:[e.jsx("span",{children:"Orders vs goal"}),e.jsxs("span",{className:"tabular-nums",children:[t.orders," / ",t.goalOrders]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:`h-full ${i>=100?"bg-emerald-400":i>=60?"bg-primary":"bg-amber-400"}`,style:{width:`${Math.min(100,i)}%`}})})]}),e.jsxs("div",{className:"text-[11px] text-foreground/75 leading-relaxed border-l-2 border-primary/40 pl-3",children:[e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-primary/80 mr-2",children:"Signal"}),t.signal]}),e.jsxs("div",{className:"flex items-center justify-between text-[10px] tracking-[0.22em] uppercase text-muted-foreground pt-1",children:[e.jsxs("span",{children:["Audience: ",e.jsx("span",{className:"text-foreground/80 normal-case tracking-normal",children:t.audience})]}),e.jsx("span",{className:"shrink-0",children:d?"Always-on":`${t.startedAt} – ${t.endsAt} · ${t.daysLeft}d left`})]})]}),e.jsxs("footer",{className:"flex items-center justify-between px-4 py-2.5 border-t border-white/5 bg-white/[0.02]",children:[e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:["Owner · ",e.jsx("span",{className:"text-primary",children:t.owner})]}),e.jsxs("div",{className:"flex gap-1.5",children:[t.status==="Paused"?e.jsx("button",{type:"button",onClick:()=>v.success(`${t.name} resumed`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-emerald-500/15 border border-emerald-400/40 text-emerald-300 hover:bg-emerald-500/25 transition",children:"Resume"}):t.status==="Scheduled"?e.jsx("button",{type:"button",onClick:()=>v.success(`${t.name} launched`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Launch Now"}):e.jsx("button",{type:"button",onClick:()=>v.success(`${t.name} paused`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Pause"}),e.jsx("button",{type:"button",onClick:()=>v.success(`Opened ${t.name}`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Open"})]})]})]})}function dc(){const t=[{id:"explorer",name:"Explorer",price:49,members:412,color:"text-sky-300",ring:"border-sky-400/40"},{id:"operator",name:"Operator",price:129,members:187,color:"text-primary",ring:"border-primary/50"},{id:"founders",name:"Founders' Circle",price:249,members:64,color:"text-amber-300",ring:"border-amber-400/50"}],r=t.reduce((n,o)=>n+o.members,0),s=t.reduce((n,o)=>n+o.members*o.price,0),a=[{id:"r1",name:"Atlas Logistics Co.",tier:"Founders' Circle",in:4,value:249,autopay:!0,risk:"Low"},{id:"r2",name:"Northwind Brewing",tier:"Operator",in:6,value:129,autopay:!0,risk:"Low"},{id:"r3",name:"Bright & Co.",tier:"Operator",in:9,value:129,autopay:!1,risk:"Medium"},{id:"r4",name:"Vanta Studios",tier:"Explorer",in:11,value:49,autopay:!1,risk:"High"},{id:"r5",name:"Harbor Goods",tier:"Founders' Circle",in:14,value:249,autopay:!0,risk:"Low"}],i=[{id:"a1",name:"Vanta Studios",tier:"Explorer",signal:"Hasn't logged in 22 days · 0 work orders MTD",action:"Send Jamie re-engagement DM"},{id:"a2",name:"Pinecrest Foods",tier:"Operator",signal:"Token usage down 68% vs trailing 30d",action:"Schedule a free Atlas consult"},{id:"a3",name:"Lumen & Loom",tier:"Operator",signal:"Opened cancel page twice this week",action:"Trigger save offer · 1 mo at Explorer rate"}],d=[{id:"rf1",name:"Caelum Bakery",referrer:"Harbor Goods",stage:"Trial · day 4",value:129},{id:"rf2",name:"Forge & Field",referrer:"Atlas Logistics Co.",stage:"Demo booked",value:249},{id:"rf3",name:"Solace Spa Group",referrer:"Northwind Brewing",stage:"Pitch sent",value:129},{id:"rf4",name:"True North Outfitters",referrer:"Bright & Co.",stage:"Cold intro",value:49}],l={Low:"text-emerald-300 border-emerald-400/40 bg-emerald-500/10",Medium:"text-amber-300 border-amber-400/40 bg-amber-500/10",High:"text-rose-300 border-rose-400/40 bg-rose-500/10"};return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground
8/80 max-w-3xl leading-relaxed",children:"The full lifecycle of your membership base — who joined, who's about to renew, who's slipping, and who's bringing the next wave in. Numbers refresh nightly from billing and station activity."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Total Members",value:r.toLocaleString(),sub:"Active subscriptions"}),e.jsx(A,{label:"MRR",value:E(s),sub:"Across all 3 tiers"}),e.jsx(A,{label:"30d Retention",value:"94.2%",sub:"Industry benchmark 88%"}),e.jsx(A,{label:"Churn Risk",value:String(i.length),sub:"Need a save play this week"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:t.map(n=>{const o=Math.round(n.members/r*100);return e.jsxs("div",{className:`rounded-xl border ${n.ring} glass-strong p-4`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:`font-display text-sm ${n.color} glow-text`,children:n.name}),e.jsxs("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:["$",n.price,"/mo"]})]}),e.jsxs("div",{className:"mt-3 flex items-end gap-2",children:[e.jsx("div",{className:"font-display text-3xl text-foreground tabular-nums",children:n.members}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:["members · ",o,"%"]})]}),e.jsx("div",{className:"mt-3 h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary",style:{width:`${o}%`}})}),e.jsxs("div",{className:"mt-3 text-[11px] text-foreground/75",children:["MRR · ",e.jsx("span",{className:"text-primary tabular-nums",children:E(n.members*n.price)})]})]},n.id)})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(zt,{className:"h-3.5 w-3.5"})," Rewards"]}),e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"This Month"})]}),e.jsxs("ul",{className:"mt-3 space-y-2 text-[12px] text-foreground/85",children:[e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[e.jsx("span",{children:"Loyalty points issued"}),e.jsx("span",{className:"text-primary tabular-nums",children:"184,200 pts"})]}),e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[e.jsx("span",{children:"Perks redeemed (free consults, token packs)"}),e.jsx("span",{className:"text-primary tabular-nums",children:"73"})]}),e.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[e.jsx("span",{children:"Tier upgrades earned"}),e.jsx("span",{className:"text-primary tabular-nums",children:"12"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Founder badges minted"}),e.jsx("span",{className:"text-primary tabular-nums",children:"4"})]})]}),e.jsx("button",{type:"button",onClick:()=>v.success("Rewards drop scheduled",{description:"Operator+ tiers get a 500-token bonus next Friday."}),className:"mt-4 w-full text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition py-2",children:"Send a Rewards Drop"})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(ie,{className:"h-3.5 w-3.5"})," Renewals · Next 14 Days"]}),e.jsxs("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[E(a.reduce((n,o)=>n+o.value,0))," on the line"]})]}),e.jsx("ul",{className:"mt-3 space-y-2",children:a.map(n=>e.jsxs("li",{className:"grid grid-cols-12 items-center gap-2 text-[12px] border-b border-white/5 pb-2 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"col-span-5 truncate",children:[e.jsx("div",{className:"text-foreground
8/95 truncate",children:n.name}),e.jsx("div",{className:"text-[10px] text-muted-foreground",children:n.tier})]}),e.jsxs("div",{className:"col-span-2 text-center text-foreground/80 tabular-nums",children:[n.in,"d"]}),e.jsx("div",{className:"col-span-2 text-right text-primary tabular-nums",children:E(n.value)}),e.jsxs("div",{className:"col-span-3 flex justify-end gap-1",children:[e.jsx("span",{className:`text-[9px] tracking-[0.18em] uppercase px-1.5 py-0.5 rounded border ${l[n.risk]}`,children:n.risk}),e.jsx("span",{className:`text-[9px] tracking-[0.18em] uppercase px-1.5 py-0.5 rounded border ${n.autopay?"border-emerald-400/40 text-emerald-300 bg-emerald-500/10":"border-amber-400/40 text-amber-300 bg-amber-500/10"}`,children:n.autopay?"Auto":"Manual"})]})]},n.id))}),e.jsx("button",{type:"button",onClick:()=>v.success("Renewal nudge queued",{description:"Manual-pay members get a friendly heads-up 5 days out."}),className:"mt-4 w-full text-[10px] tracking-[0.22em] uppercase rounded-md glass hover:glow-edge py-2",children:"Send Renewal Reminders"})]}),e.jsxs("div",{className:"rounded-xl border border-rose-400/30 bg-rose-500/[0.04] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-rose-300",children:[e.jsx(re,{className:"h-3.5 w-3.5"})," Retention · Save Plays"]}),e.jsxs("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[i.length," at risk"]})]}),e.jsx("ul",{className:"mt-3 space-y-3",children:i.map(n=>e.jsxs("li",{className:"border-b border-white/5 pb-3 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95",children:n.name}),e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:n.tier})]}),e.jsx("div",{className:"text-[11px] text-foreground/75 mt-1",children:n.signal}),e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-primary/80",children:["→ ",n.action]}),e.jsx("button",{type:"button",onClick:()=>v.success(`Save play sent to ${n.name}`),className:"text-[9px] tracking-[0.22em] uppercase px-2 py-1 rounded bg-rose-500/15 border border-rose-400/40 text-rose-200 hover:bg-rose-500/25 transition",children:"Run Play"})]})]},n.id))})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(ue,{className:"h-3.5 w-3.5"})," Recruitment · Referral Pipeline"]}),e.jsxs("span",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[E(d.reduce((n,o)=>n+o.value,0))," pipeline"]})]}),e.jsx("ul",{className:"mt-3 space-y-2",children:d.map(n=>e.jsxs("li",{className:"grid grid-cols-12 items-center gap-2 text-[12px] border-b border-white/5 pb-2 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"col-span-5 truncate",children:[e.jsx("div",{className:"text-foreground/95 truncate",children:n.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground truncate",children:["via ",n.referrer]})]}),e.jsx("div",{className:"col-span-4 text-foreground/80 text-[11px]",children:n.stage}),e.jsxs("div",{className:"col-span-3 text-right text-primary tabular-nums",children:[E(n.value),"/mo"]})]},n.id))}),e.jsx("button",{type:"button",onClick:()=>v.success("Referral campaign launched",{description:"Active members get a $50 station credit for every paid referral."}),className:"mt-4 w-full text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition py-2",children:"Launch Referral Campaign"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"live-promos"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Active Promotions"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"analytics"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"View Pipeline →"})]})]})}function cc(){return e.jsx(bc,{})}function mc(){return e.jsx(gc,{})}function pc(){return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground
8/80 max-w-3xl leading-relaxed",children:["Your single source of truth for what's happening, when. Product launches, webinars, conferences, holidays, and every campaign milestone — all stitched to the campaigns running in ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"campaigns"},className:"text-primary underline-offset-2 underline",children:"Your Campaigns"}),"."]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Events (Next 60d)",value:String(gt.length),sub:"Across all campaigns"}),e.jsx(A,{label:"Major Events",value:String(gt.filter(t=>t.major).length),sub:"Star-tagged moments"}),e.jsx(A,{label:"Webinars",value:String(gt.filter(t=>t.kind==="webinar").length),sub:"Live sessions on deck"}),e.jsx(A,{label:"Launches",value:String(gt.filter(t=>t.kind==="launch").length),sub:"Product & feature drops"})]}),e.jsx(xc,{}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"campaigns"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Your Campaigns"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"growth-strategies"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Growth Strategies →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"channels"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Your Channels →"})]})]})}const gt=[{id:"e1",date:"2026-06-08",title:"Summer Founder Series — LinkedIn boost",kind:"campaign",campaign:"Summer Founder Series",owner:"Vega"},{id:"e2",date:"2026-06-11",title:"Operator Tier upgrade email #2",kind:"campaign",campaign:"Operator Tier Upgrade Push",owner:"Nova"},{id:"e3",date:"2026-06-15",title:"Mid-Year P&L Bootcamp — Webinar launch",kind:"webinar",campaign:"Mid-Year P&L Bootcamp",owner:"Moneta",major:!0},{id:"e4",date:"2026-06-18",title:"Product v4.2 — Feature drop",kind:"launch",owner:"Vega",major:!0},{id:"e5",date:"2026-06-22",title:"Founders' Circle Open House",kind:"milestone",campaign:"Founders' Circle Open House",owner:"Jamie"},{id:"e6",date:"2026-06-25",title:"Operator Tier upgrade — close window",kind:"campaign",campaign:"Operator Tier Upgrade Push",owner:"Nova"},{id:"e7",date:"2026-07-04",title:"Independence Day · email blackout",kind:"holiday"},{id:"e8",date:"2026-07-09",title:"SaaStr Annual — booth + dinner",kind:"conference",owner:"Vega",major:!0},{id:"e9",date:"2026-07-15",title:"Mid-Year P&L Bootcamp — Live session",kind:"webinar",campaign:"Mid-Year P&L Bootcamp",owner:"Moneta"},{id:"e10",date:"2026-07-22",title:"Summer Founder Series — wrap & retro",kind:"campaign",campaign:"Summer Founder Series",owner:"Vega"}],Ur={launch:"bg-fuchsia-400",webinar:"bg-sky-400",campaign:"bg-primary",holiday:"bg-amber-400",conference:"bg-emerald-400",milestone:"bg-rose-400"},zr={launch:"Launch",webinar:"Webinar",campaign:"Campaign",holiday:"Holiday",conference:"Conference",milestone:"Milestone"},Tt={Payroll:"bg-primary","Software & SaaS":"bg-sky-400",Marketing:"bg-fuchsia-400",Contractors:"bg-emerald-400","Office & Rent":"bg-amber-400",Travel:"bg-rose-400","Professional Services":"bg-indigo-400","Cost of Goods":"bg-orange-400",Other:"bg-muted-foreground"},lt=[{id:"t1",date:"2026-06-01",vendor:"Gusto Payroll",category:"Payroll",amount:48200},{id:"t2",date:"2026-06-02",vendor:"AWS",category:"Software & SaaS",amount:5180},{id:"t3",date:"2026-06-02",vendor:"Google Workspace",category:"Software & SaaS",amount:612},{id:"t4",date:"2026-06-03",vendor:"Meta Ads",category:"Marketing",amount:7430},{id:"t5",date:"2026-05-01",vendor:"Gusto Payroll",category:"Payroll",amount:47900},{id:"t6",date:"2026-05-04",vendor:"WeWork — HQ",category:"Office & Rent",amount:6800},{id:"t7",date:"2026-05-06",vendor:"AWS",category:"Software & SaaS",amount:5420},{id:"t8",date:"2026-05-09",vendor:"Meta Ads",category:"Marketing",amount:9120},{id:"t9",date:"2026-05-12",vendor:"LinkedIn Ads",category:"Marketing",amount:3800},{id:"t10",date:"2026-05-14",vendor:"Acme Design Co.",category:"Contractors",amount:4200}
8,{id:"t11",date:"2026-05-18",vendor:"Stripe Fees",category:"Other",amount:2310},{id:"t12",date:"2026-05-22",vendor:"Delta Airlines",category:"Travel",amount:2780},{id:"t13",date:"2026-05-28",vendor:"Cooley LLP",category:"Professional Services",amount:6500},{id:"t14",date:"2026-04-01",vendor:"Gusto Payroll",category:"Payroll",amount:47200},{id:"t15",date:"2026-04-03",vendor:"WeWork — HQ",category:"Office & Rent",amount:6800},{id:"t16",date:"2026-04-07",vendor:"AWS",category:"Software & SaaS",amount:4980},{id:"t17",date:"2026-04-11",vendor:"Meta Ads",category:"Marketing",amount:8200},{id:"t18",date:"2026-04-15",vendor:"Northbeam",category:"Software & SaaS",amount:1450},{id:"t19",date:"2026-04-20",vendor:"Acme Design Co.",category:"Contractors",amount:3800},{id:"t20",date:"2026-04-25",vendor:"FedEx",category:"Cost of Goods",amount:1920},{id:"t21",date:"2026-03-01",vendor:"Gusto Payroll",category:"Payroll",amount:46100},{id:"t22",date:"2026-03-04",vendor:"WeWork — HQ",category:"Office & Rent",amount:6800},{id:"t23",date:"2026-03-09",vendor:"AWS",category:"Software & SaaS",amount:4720},{id:"t24",date:"2026-03-13",vendor:"Meta Ads",category:"Marketing",amount:6900},{id:"t25",date:"2026-03-18",vendor:"Stripe Fees",category:"Other",amount:2180},{id:"t26",date:"2026-02-02",vendor:"Gusto Payroll",category:"Payroll",amount:45800},{id:"t27",date:"2026-02-05",vendor:"WeWork — HQ",category:"Office & Rent",amount:6800},{id:"t28",date:"2026-02-10",vendor:"AWS",category:"Software & SaaS",amount:4510},{id:"t29",date:"2026-02-14",vendor:"Meta Ads",category:"Marketing",amount:5200},{id:"t30",date:"2026-02-22",vendor:"Cooley LLP",category:"Professional Services",amount:4800},{id:"t31",date:"2026-01-04",vendor:"Gusto Payroll",category:"Payroll",amount:45200},{id:"t32",date:"2026-01-06",vendor:"WeWork — HQ",category:"Office & Rent",amount:6800},{id:"t33",date:"2026-01-10",vendor:"AWS",category:"Software & SaaS",amount:4310},{id:"t34",date:"2026-01-15",vendor:"Meta Ads",category:"Marketing",amount:4100},{id:"t35",date:"2026-01-22",vendor:"FedEx",category:"Cost of Goods",amount:1640}],vt=412300;function R(t,r=!1){return r&&Math.abs(t)>=1e3?"$"+(t/1e3).toFixed(t>=1e4?0:1)+"k":"$"+t.toLocaleString(void 0,{maximumFractionDigits:0})}function It(t){return t.slice(0,7)}function U(t){const[r,s]=t.split("-").map(Number);return new Date(r,s-1,1).toLocaleDateString(void 0,{month:"short"})}
8function uc(){const[t,r]=x.useState(!1),a=Array.from(new Set(lt.map(b=>It(b.date)))).sort().map(b=>({key:b,total:lt.filter(N=>It(N.date)===b).reduce((N,M)=>N+M.amount,0)})),i=a[a.length-1],d=a[a.length-2],l=a.slice(-6).reduce((b,N)=>b+N.total,0)/Math.min(6,a.length),n=l>0?vt/l:0,o=d?(i.total-d.total)/d.total*100:0,c=d?.key??i.key,u=lt.filter(b=>It(b.date)===c),m=new Map;for(const b of u)m.set(b.category,(m.get(b.category)??0)+b.amount);const g=Array.from(m.entries()).map(([b,N])=>({category:b,amount:N})).sort((b,N)=>N.amount-b.amount),p=g.reduce((b,N)=>b+N.amount,0),y=new Date("2026-03-05T00:00:00").toISOString().slice(0,10),f=new Map;for(const b of lt.filter(N=>N.date>=y)){const N=f.get(b.vendor)??{amount:0,category:b.category,count:0};N.amount+=b.amount,N.count+=1,f.set(b.vendor,N)}const S=Array.from(f.entries()).map(([b,N])=>({vendor:b,...N})).sort((b,N)=>N.amount-b.amount).slice(0,10),h=S[0]?.amount??1,w=a[a.length-3]?.key,I=[];if(w){const b=new Set([...u.map(N=>N.category),...lt.filter(N=>It(N.date)===w).map(N=>N.category)]);for(const N of b){const M=u.filter(F=>F.category===N).reduce((F,D)=>F+D.amount,0),$=lt.filter(F=>It(F.date)===w&&F.category===N).reduce((F,D)=>F+D.amount,0);I.push({category:N,current:M,prior:$,delta:$>0?(M-$)/$*100:0})}I.sort((N,M)=>Math.abs(M.delta)-Math.abs(N.delta))}const O=Math.max(...a.map(b=>b.total)),P=()=>{v.loading("Connecting to QuickBooks…",{id:"qb"}),setTimeout(()=>{r(!0),v.success("QuickBooks linked · 6 months of activity imported",{id:"qb"})},1200)};return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:["Your books, decoded. See where the money is actually going — top vendors, category mix, month-over-month movers, burn, and runway — all on one screen."," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"text-primary underline-offset-2 underline",children:"Profit & Loss"})," ","lives next door for the margin view."]}),e.jsxs("div",{className:`rounded-md border ${t?"border-emerald-400/40 bg-emerald-400/5":"border-primary/30 bg-black/40"} p-4 flex flex-wrap items-center gap-4`,children:[e.jsx("div",{className:"h-10 w-10 rounded-md grid place-items-center bg-[#2CA01C] text-white font-display text-lg shrink-0",children:"qb"}),e.jsxs("div",{className:"flex-1 min-w-[220px]",children:[e.jsx("div",{className:"text-sm font-medium",children:t?"QuickBooks Online · Connected":"Import from QuickBooks"}),e.jsx("div",{className:"text-[11px] tracking-[0.18em] uppercase text-muted-foreground mt-0.5",children:t?"Last sync: just now · 6 months · 35 transactions":"One click to pull 6 months of vendor activity"})]}),t?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>v.success("Sync triggered — pulling latest activity…"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Sync now"}),e.jsx("button",{onClick:()=>{v("Disconnected from QuickBooks"),r(!1)},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Disconnect"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:P,className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Connect QuickBooks"}),e.jsxs("button",{onClick:()=>v("CSV import coming soon — drag a QuickBooks export here"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(jt,{className:"h-3.5 w-3.5"})," CSV"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Spend · This Month",value:R(i.total,!0),sub:`${o>=0?"+":""}${o.toFixed(1)}% vs last`}),e.jsx(A,{label:"Avg Monthly Burn",value:R(l,!0),sub:"Trailing 6 months"}),e.jsx(A,{label:"Cash on Hand",value:R(vt,!0),sub:"Operating account"}),e.jsx(A,{label:"Runway",value:`${n.toFixed(1)} mo`,sub:"At current burn"})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.4fr_1fr]",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Monthly Burn · 6-month trend"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Where the cash is going"})]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs",children:[o>=0?e.jsx(Pe,{className:"h-3.5 w-3.5 text-amber-400"}):e.jsx(rt,{className:"h-3.5 w-3.5 text-emerald-400"}),e.jsxs("span",{className:o>=0?"text-amber-400":"text-emerald-400",children:[o>=0?"+":"",o.toFixed(1),"% MoM"]}
8)]})]}),e.jsx("div",{className:"flex items-end gap-3 h-40",children:a.map(b=>{const N=Math.max(8,b.total/O*140),M=b.key===i.key;return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2 group",children:[e.jsx("div",{className:"text-[10px] text-muted-foreground group-hover:text-primary transition tabular-nums",children:R(b.total,!0)}),e.jsx("div",{className:`w-full rounded-t-sm ${M?"bg-primary shadow-[0_0_18px_var(--glow-soft)]":"bg-primary/40"} transition group-hover:bg-primary`,style:{height:`${N}px`}}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:U(b.key)})]},b.key)})})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:["Category Mix · ",U(c)]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Where it landed"}),e.jsx("div",{className:"flex h-3 w-full rounded-sm overflow-hidden mb-4",children:g.map(b=>e.jsx("div",{className:Tt[b.category],style:{width:`${b.amount/p*100}%`},title:`${b.category} · ${R(b.amount)}`},b.category))}),e.jsx("ul",{className:"space-y-1.5",children:g.map(b=>e.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${Tt[b.category]} shrink-0`}),e.jsx("span",{className:"flex-1 text-foreground/85 truncate",children:b.category}),e.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[Math.round(b.amount/p*100),"%"]}),e.jsx("span",{className:"w-16 text-right text-foreground/90 tabular-nums",children:R(b.amount,!0)})]},b.category))})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Top Vendors · Last 90 Days"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Who you're paying the most"})]}),e.jsxs("button",{onClick:()=>v.success("Vendor list exported to CSV"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," Export"]})]}),e.jsx("ul",{className:"space-y-2",children:S.map((b,N)=>e.jsxs("li",{className:"grid grid-cols-[28px_1.5fr_1fr_1fr_72px] items-center gap-3 text-xs py-1.5 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"font-display text-primary/60 tabular-nums",children:String(N+1).padStart(2,"0")}),e.jsx("span",{className:"text-foreground/90 truncate",children:b.vendor}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${Tt[b.category]} shrink-0`}),e.jsx("span",{className:"truncate",children:b.category})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-white/5 overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary/70 shadow-[0_0_8px_var(--glow-soft)]",style:{width:`${b.amount/h*100}%`}})}),e.jsxs("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:[b.count,"x"]})]}),e.jsx("span",{className:"text-right text-foreground/90 tabular-nums",children:R(b.amount,!0)})]},b.vendor))})]}),I.length>0&&e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:["Biggest Movers · ",U(w)," → ",U(c)]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"What changed most"}),e.jsx("div",{className:"grid gap-2 md:grid-cols-2",children:I.slice(0,6).map(b=>{const N=b.delta>=0;return e.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-md bg-black/40 border border-white/5",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${Tt[b.category]} shrink-0`}
8),e.jsx("span",{className:"flex-1 text-xs text-foreground/90 truncate",children:b.category}),e.jsxs("span",{className:"text-[11px] text-muted-foreground tabular-nums",children:[R(b.prior,!0)," → ",R(b.current,!0)]}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-xs tabular-nums ${N?"text-amber-400":"text-emerald-400"}`,children:[N?e.jsx(Pe,{className:"h-3 w-3"}):e.jsx(rt,{className:"h-3 w-3"}),N?"+":"",b.delta.toFixed(0),"%"]})]},b.category)})})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Profit & Loss →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"purchasing"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Purchasing →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"loans-grants"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Funding →"})]})]})}function xc(){const t=new Date("2026-06-03T00:00:00"),r=new Date(t),s=(r.getDay()+6)%7;r.setDate(r.getDate()-s);const a=[];for(let u=0;u<6;u++){const m=[];for(let g=0;g<7;g++){const p=new Date(r);p.setDate(r.getDate()+u*7+g),m.push(p)}a.push(m)}const i=u=>u.toISOString().slice(0,10),d=new Map;for(const u of gt){const m=d.get(u.date)??[];m.push(u),d.set(u.date,m)}const l=a[0][0].toLocaleDateString(void 0,{month:"long",year:"numeric"})+" – "+a[5][6].toLocaleDateString(void 0,{month:"long",year:"numeric"}),n=i(t),o=[...gt].filter(u=>u.date>=n).sort((u,m)=>u.date.localeCompare(m.date)),c=o.filter(u=>u.major).slice(0,4);return e.jsxs("section",{className:"rounded-xl border border-primary/20 bg-black/40 p-4",children:[e.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-3 border-b border-white/5 pb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-primary/80",children:"Events Calendar"}),e.jsx("h3",{className:"font-display text-base text-foreground/95 mt-0.5",children:"Marketing & Campaign Timeline"}),e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:l})]}),e.jsx("div",{className:"flex flex-wrap gap-2 text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:Object.keys(zr).map(u=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${Ur[u]}`}),zr[u]]},u))})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-4 mt-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"grid grid-cols-7 gap-1 text-[9px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(u=>e.jsx("div",{className:"text-center",children:u},u))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:a.flat().map(u=>{const m=i(u),g=d.get(m)??[],p=m===n,y=g.some(f=>f.major);return e.jsxs("div",{className:`min-h-[58px] rounded-md border p-1 text-left transition ${p?"border-primary/60 bg-primary/10":y?"border-rose-400/30 bg-rose-500/[0.06]":"border-white/5 bg-white/[0.02] hover:bg-white/[0.05]"}`,title:g.map(f=>`${f.title}${f.owner?` · ${f.owner}`:""}`).join(`
9`),children:[e.jsx("div",{className:`text-[10px] tabular-nums ${p?"text-primary font-semibold":"text-foreground/70"}`,children:u.getDate()}),e.jsxs("div",{className:"mt-1 flex flex-wrap gap-0.5",children:[g.slice(0,4).map(f=>e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${Ur[f.kind]} ${f.major?"ring-1 ring-rose-200/70":""}`},f.id)),g.length>4&&e.jsxs("span",{className:"text-[8px] text-muted-foreground tabular-nums",children:["+",g.length-4]})]})]},m)})})]}),e.jsxs("aside",{className:"rounded-md border border-rose-400/20 bg-rose-500/[0.04] p-3",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-rose-300/90 flex items-center gap-1.5",children:[e.jsx("span",{children:"★"})," Major Events"]}),e.jsxs("ul",{className:"mt-2 space-y-2",children:[c.map(u=>{const m=new Date(u.date+"T00:00:00");return e.jsxs("li",{className:"border-l-2 border-rose-400/50 pl-2",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-rose-200/80 tabular-nums",children:[m.toLocaleDateString(void 0,{month:"short",day:"numeric"})," · ",zr[u.kind]]}
9),e.jsx("div",{className:"text-[12px] text-foreground/90 leading-snug",children:u.title}),u.owner&&e.jsxs("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground mt-0.5",children:["Owner · ",e.jsx("span",{className:"text-primary",children:u.owner})]})]},u.id)}),c.length===0&&e.jsx("li",{className:"text-[11px] text-muted-foreground",children:"No major events on deck — promote one from a campaign."})]}),e.jsxs("div",{className:"mt-3 pt-2 border-t border-white/5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mb-1.5",children:"Next Up"}),e.jsx("ul",{className:"space-y-1",children:o.slice(0,4).map(u=>{const m=new Date(u.date+"T00:00:00");return e.jsxs("li",{className:"flex items-center gap-2 text-[11px] text-foreground/85",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${Ur[u.kind]}`}),e.jsx("span",{className:"tabular-nums text-muted-foreground w-12 shrink-0",children:m.toLocaleDateString(void 0,{month:"short",day:"numeric"})}),e.jsx("span",{className:"truncate",children:u.title})]},u.id)})})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[e.jsx("button",{type:"button",onClick:()=>v.success("Event added to calendar",{description:"Tie it to a campaign so Vega can sequence the run-up."}),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"+ Add Event"}),e.jsx("button",{type:"button",onClick:()=>v.success("Calendar exported",{description:"ICS file generated — drop into Google Calendar or Outlook."}),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Export .ics"})]})]})}function gc(){const t=[{id:"c1",name:"Summer Founder Series",status:"Live",channels:["Email","LinkedIn","YouTube"],goal:"Demos",goalNum:120,actual:87,spend:8400,budget:12e3,ends:"Aug 15",owner:"Vega",signal:"LinkedIn carousel is doing 3.2× the click-rate of email — shift $1.5k from email to LinkedIn this week."},{id:"c2",name:"Operator Tier Upgrade Push",status:"Live",channels:["In-App","Email"],goal:"Upgrades",goalNum:40,actual:22,spend:1100,budget:2500,ends:"Jul 31",owner:"Nova",signal:"Members who took a free consult upgrade at 4× the base rate. Add the consult CTA to the upgrade email."},{id:"c3",name:"Mid-Year P&L Bootcamp",status:"Scheduled",channels:["Webinar","Email"],goal:"Registrations",goalNum:300,actual:0,spend:0,budget:4500,ends:"Aug 22",owner:"Moneta",signal:"Pre-built sequence ready. Launch Monday for the full 14-day runway."},{id:"c4",name:"Spring Reset Bundle",status:"Ended",channels:["Email","Paid Social"],goal:"Orders",goalNum:200,actual:247,spend:6200,budget:6500,ends:"May 28",owner:"Vega",signal:"Beat goal by 24%. Lock as evergreen and rerun in Q1."},{id:"c5",name:"Founders' Circle Open House",status:"Draft",channels:["Email","Referral"],goal:"Sign-ups",goalNum:60,actual:0,spend:0,budget:1800,ends:"TBD",owner:"Jamie",signal:"Needs landing page copy approved before send."}],r={Live:"text-emerald-300 border-emerald-400/40 bg-emerald-500/10",Scheduled:"text-sky-300 border-sky-400/40 bg-sky-500/10",Ended:"text-muted-foreground border-white/10 bg-white/[0.04]",Draft:"text-amber-300 border-amber-400/40 bg-amber-500/10"},s=t.filter(n=>n.status==="Live"),a=t.reduce((n,o)=>n+o.spend,0),i=t.reduce((n,o)=>n+o.budget,0),d=t.reduce((n,o)=>n+o.actual,0),l=t.reduce((n,o)=>n+o.goalNum,0);return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Every marketing campaign you've got in flight, on deck, or wrapped — with the one signal each one is asking you to act on. Plan, brief, launch, and review without leaving the room."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Live Campaigns",value:String(s.length),sub:`${t.length} total tracked`}),e.jsx(A,{label:"Budget Used",value:`${Math.round(a/Math.max(1,i)*100)}%`,sub:`${E(a)} of ${E(i)}`}),e.jsx(A,{label:"Goal Progress",value:`${Math.round(d/Math.max(1,l)*100)}
9%`,sub:`${d.toLocaleString()} / ${l.toLocaleString()}`}),e.jsx(A,{label:"Owners On Deck",value:"4",sub:"Vega · Nova · Moneta · Jamie"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:t.map(n=>{const o=n.budget>0?Math.min(100,Math.round(n.spend/n.budget*100)):0,c=n.goalNum>0?Math.min(100,Math.round(n.actual/n.goalNum*100)):0;return e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 hover:border-primary/40 transition p-4",children:[e.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-white/5 pb-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95",children:n.name}),e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:n.channels.join(" · ")})]}),e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border shrink-0 ${r[n.status]}`,children:n.status})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 text-center mt-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:n.goal}),e.jsxs("div",{className:"font-display text-sm text-primary glow-text tabular-nums",children:[n.actual," / ",n.goalNum]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Spend"}),e.jsxs("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:[E(n.spend)," / ",E(n.budget)]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Ends"}),e.jsx("div",{className:"font-display text-sm text-foreground/90 tabular-nums",children:n.ends})]})]}),e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-[9px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:[e.jsx("span",{children:"Goal pacing"}),e.jsxs("span",{className:"tabular-nums",children:[c,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:`h-full ${c>=100?"bg-emerald-400":c>=60?"bg-primary":"bg-amber-400"}`,style:{width:`${Math.min(100,c)}%`}})})]}),n.budget>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-[9px] tracking-[0.22em] uppercase text-muted-foreground mb-1",children:[e.jsx("span",{children:"Budget"}),e.jsxs("span",{className:"tabular-nums",children:[o,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:`h-full ${o>=90?"bg-rose-400":o>=70?"bg-amber-400":"bg-primary"}`,style:{width:`${o}%`}})})]})]}),e.jsxs("div",{className:"mt-3 text-[11px] text-foreground/75 leading-relaxed border-l-2 border-primary/40 pl-3",children:[e.jsx("span",{className:"text-[9px] tracking-[0.22em] uppercase text-primary/80 mr-2",children:"Signal"}),n.signal]}),e.jsxs("footer",{className:"flex items-center justify-between mt-3 pt-3 border-t border-white/5",children:[e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:["Owner · ",e.jsx("span",{className:"text-primary",children:n.owner})]}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("button",{type:"button",onClick:()=>v.success(`Briefed ${n.name}`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Brief"}),e.jsx("button",{type:"button",onClick:()=>v.success(`Opened ${n.name}`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Open"})]})]})]},n.id)})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v.success("New campaign draft created",{description:"Vega will draft channels, budget, and creative brief overnight."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"+ New Campaign"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"events"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Events Calendar →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"growth-strategies"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Growth Strategies →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"channels"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Your Channels →"})]})]})}function hc(){const t=[{id:"p1",name:"Founder-Led Content Engine",horizon:"Now · 0–30 days",fit:94,effort:"Medium",lift:"+18% pipeline",why:"Your audience converts 3× higher on foun
9der-voice posts. Two reels + one essay per week is the floor.",owner:"Vega"},{id:"p2",name:"Referral Flywheel · Operator Tier",horizon:"Now · 0–30 days",fit:88,effort:"Low",lift:"+12 paid referrals/mo",why:"$50 station credit per converted referral pays back in <2 cycles at current LTV.",owner:"Nova"},{id:"p3",name:"LinkedIn Newsletter Launch",horizon:"Next · 30–90 days",fit:81,effort:"Medium",lift:"+2,400 followers / quarter",why:"Two competitors just launched theirs and are gaining ~300 subs/wk. Window closes by Q4.",owner:"Vega"},{id:"p4",name:"Partner Co-Marketing (3 SaaS)",horizon:"Next · 30–90 days",fit:76,effort:"High",lift:"+1 webinar / mo, shared list of ~14k",why:"Three category-adjacent tools are open to co-hosted webinars. Warm intros already in inbox.",owner:"Atlas"},{id:"p5",name:"Paid Search · Branded + Comparison",horizon:"Later · 90+ days",fit:62,effort:"Medium",lift:"Defend share of voice",why:"Cheap insurance once organic reach plateaus. Not urgent yet.",owner:"Vega"},{id:"p6",name:"Podcast Tour · 6 Shows",horizon:"Later · 90+ days",fit:58,effort:"High",lift:"Brand lift, hard to attribute",why:"Strong long-term play but won't move pipeline this quarter.",owner:"Jamie"}],r=[{label:"Now · 0–30 days",key:"Now · 0–30 days"},{label:"Next · 30–90 days",key:"Next · 30–90 days"},{label:"Later · 90+ days",key:"Later · 90+ days"}];return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:["The growth plays our agents recommend for your stage and audience — scored by fit, ranked by horizon. Promote the ones you're ready to run into ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"campaigns"},className:"text-primary underline-offset-2 underline",children:"Your Campaigns"}),"."]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Plays Reviewed",value:String(t.length),sub:"By Atlas + Vega + Nova"}),e.jsx(A,{label:"High-Fit (≥80)",value:String(t.filter(s=>s.fit>=80).length),sub:"Run these first"}),e.jsx(A,{label:"Quick Wins",value:String(t.filter(s=>s.effort==="Low").length),sub:"Low-effort, high-lift"}),e.jsx(A,{label:"In Flight",value:"2",sub:"Already promoted to campaigns"})]}),e.jsx("div",{className:"space-y-5",children:r.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:s.label}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:t.filter(a=>a.horizon===s.key).map(a=>e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/70 hover:border-primary/40 transition p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95",children:a.name}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Fit"}),e.jsx("div",{className:`font-display text-lg tabular-nums ${a.fit>=85?"text-emerald-300":a.fit>=70?"text-primary":"text-amber-300"}`,children:a.fit})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Effort"}),e.jsx("div",{className:"text-foreground/90",children:a.effort})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Expected lift"}),e.jsx("div",{className:"text-primary",children:a.lift})]})]}),e.jsx("div",{className:"mt-3 text-[11px] text-foreground/75 leading-relaxed border-l-2 border-primary/40 pl-3",children:a.why}),e.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-white/5",children:[e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:["Owner · ",e.jsx("span",{className:"text-primary",children:a.owner})]}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("button",{type:"button",onClick:()=>v.success(`Snoozed ${a.name}`,{description:"Will resurface in your next strategy review."}),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Snooze"}),e.jsx("button",{type:"button",onClick:()=>v.success(`${a.name} promoted to Campaigns`,{description:"Vega is drafting the brief now."}),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Promote → Campaign"})]})]})]},a.id))})]},s.key))})]})}function fc(){const t=[{id:"ch1",name:"Organic Search (SEO)",health:"Strong",trend:"up",visitors:18420,conv:2.8,mrrAttr:11200,note:"Long-tail founder queries are ranking. Refresh top 5 posts quarterly."},{id:"ch2",name:"LinkedIn",health:"Strong",trend:"up",visitors:9840,conv:4.1,mrrAttr:14800,note:"Carousel posts outperforming text 3.2×. Founder-led posts win."},{id:"ch3",name:"Email (List of 12,400)",health:"Steady",trend:"flat",visitors:6210,conv:5.6,mrrAttr:9400,note:"Healthy open rate (38%). Add a weekly digest to lift frequency."},{id:"ch4",name:"Referral / Word of Mouth",health:"Strong",trend:"up",visitors:1820,conv:14.2,mrrAttr:8600,note:"Highest converting channel. Formalize the referral program in Memberships."},{id:"ch5",name:"YouTube",health:"Building",trend:"up",visitors:3100,conv:1.2,mrrAttr:1800,note:"12 videos in. Compounding. Keep a 1/wk cadence for 6 months before judging."},{id:"ch6",name:"Paid Social (Meta)",health:"At Risk",trend:"down",visitors:4200,conv:.9,mrrAttr:1200,note:"CAC up 38% QoQ. Pause and rebuild creative against the LinkedIn winners."},{id:"ch7",name:"Podcast Guesting",health:"Building",trend:"up",visitors:740,conv:6.8,mrrAttr:2400,note:"Small volume, high-intent. Book 1 show every 2 weeks."},{id:"ch8",name:"Partnerships",health:"Steady",trend:"flat",visitors:1240,conv:8.4,mrrAttr:3800,note:"3 active partners. Room for 2 more category-adjacent tools."},{id:"ch9",name:"Instagram",health:"Building",trend:"up",visitors:5200,conv:1.4,mrrAttr:2100,note:"Reels driving most reach. Repurpose LinkedIn carousels as Reels weekly."},{id:"ch10",name:"TikTok",health:"Building",trend:"up",visitors:4100,conv:.8,mrrAttr:900,note:"Early traction with founder POV clips. Post 3×/wk for 90 days before judging."},{id:"ch11",name:"Facebook",health:"Steady",trend:"flat",visitors:2300,conv:1.1,mrrAttr:700,note:"Older audience converts on long-form. Keep as a low-cost retargeting surface."}],r={Strong:"text-emerald-300 border-emerald-400/40 bg-emerald-500/10",Steady:"text-primary border-primary/40 bg-primary/10",Building:"text-sky-300 border-sky-400/40 bg-sky-500/10","At Risk":"text-rose-300 border-rose-400/40 bg-rose-500/10"},s=t.reduce((n,o)=>n+o.visitors,0),a=t.reduce((n,o)=>n+o.mrrAttr,0),i=t.filter(n=>n.health==="At Risk"),d=[...t].sort((n,o)=>o.mrrAttr-n.mrrAttr),l=Math.max(...t.map(n=>n.mrrAttr));return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground
9/80 max-w-3xl leading-relaxed",children:"Every channel customers reach you through, ranked by attributed MRR. Health tells you where to invest, where to hold, and where to pull back. Numbers refresh nightly from analytics."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Active Channels",value:String(t.length),sub:`${t.filter(n=>n.health==="Strong").length} strong · ${i.length} at risk`}),e.jsx(A,{label:"Monthly Visitors",value:s.toLocaleString(),sub:"Across all channels"}),e.jsx(A,{label:"Attributed MRR",value:E(a),sub:"Tracked to source"}),e.jsx(A,{label:"Top Channel",value:d[0].name.split(" ")[0],sub:`${E(d[0].mrrAttr)} MRR`})]}),i.length>0&&e.jsxs("div",{className:"rounded-md border border-rose-400/30 bg-rose-500/[0.06] px-4 py-3 flex items-start gap-3",children:[e.jsx(re,{className:"h-4 w-4 text-rose-300 mt-0.5 shrink-0"}),e.jsxs("div",{className:"flex-1 text-[12px] text-foreground/85 leading-relaxed",children:[e.jsx("span",{className:"font-display text-rose-300 mr-2",children:"At-risk channel"}),i.map(n=>n.name).join(", ")," — pause spend and rebuild creative before the next budget cycle."]})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-3 px-4 py-2 border-b border-white/5 text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("div",{className:"col-span-4",children:"Channel"}),e.jsx("div",{className:"col-span-2 text-right",children:"Visitors"}),e.jsx("div",{className:"col-span-1 text-right",children:"Conv"}),e.jsx("div",{className:"col-span-3",children:"Attributed MRR"}),e.jsx("div",{className:"col-span-2 text-right",children:"Health"})]}),e.jsx("div",{className:"max-h-[360px] overflow-y-auto",children:d.map(n=>{const o=Math.round(n.mrrAttr/l*100),c=n.trend==="up"?Pe:n.trend==="down"?rt:Sr,u=n.trend==="up"?"text-emerald-300":n.trend==="down"?"text-rose-300":"text-muted-foreground";return e.jsxs("div",{className:"grid grid-cols-12 gap-3 items-center px-4 py-3 border-b border-white/5 last:border-0 hover:bg-white/[0.02]",children:[e.jsxs("div",{className:"col-span-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),e.jsx("div",{className:"text-foreground/95 text-sm truncate",children:n.name})]}),e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5 truncate",children:n.note})]}),e.jsx("div",{className:"col-span-2 text-right text-foreground/85 tabular-nums",children:n.visitors.toLocaleString()}),e.jsxs("div",{className:"col-span-1 text-right text-foreground/85 tabular-nums",children:[n.conv,"%"]}),e.jsx("div",{className:"col-span-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"text-primary tabular-nums text-sm shrink-0 w-16",children:E(n.mrrAttr)}),e.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary",style:{width:`${o}%`}})})]})}),e.jsx("div",{className:"col-span-2 flex justify-end",children:e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border ${r[n.health]}`,children:n.health})})]},n.id)})})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v.success("Channel audit queued",{description:"Vega will reassess fit and recommend reallocation by end of week."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Run Channel Audit"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"campaigns"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"← Your Campaigns"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"4",roomId:"growth-strategies"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Growth Strategies →"})]})]})}function bc(){return e.jsx(vc,{})}function yc(){const t=[{id:"s1",name:"Stripe",category:"Payments",seats:"—",cost:0,costNote:"% of revenue",health:"Healthy",renew
9al:"Auto",owner:"Moneta",note:"Core processor. Negotiate rate at $250k MRR."},{id:"s2",name:"QuickBooks Online",category:"Accounting",seats:"3 of 5",cost:90,costNote:"/mo",health:"Healthy",renewal:"Aug 12",owner:"Moneta",note:"On Plus plan. Downgrade to Essentials saves $40/mo if class tracking isn't needed."},{id:"s3",name:"Slack",category:"Comms",seats:"11 of 15",cost:88,costNote:"/mo · annual",health:"Healthy",renewal:"Jan 04",owner:"Atlas",note:"Pro plan. 4 seats unused — reclaim or right-size at renewal."},{id:"s4",name:"HubSpot Starter",category:"CRM",seats:"5 of 5",cost:180,costNote:"/mo",health:"Watch",renewal:"Sep 20",owner:"Vega",note:"At seat cap. Either upgrade tier or move 2 inactive contacts to read-only."},{id:"s5",name:"Notion",category:"Knowledge",seats:"12 of 12",cost:96,costNote:"/mo",health:"Healthy",renewal:"Auto",owner:"Wren",note:"Wiki + SOP backbone. Overlaps slightly with this station — that's fine."},{id:"s6",name:"Zapier",category:"Automation",seats:"—",cost:49,costNote:"/mo",health:"Watch",renewal:"Jul 18",owner:"Finn",note:"Hitting task cap 3 months running. Move 2 heaviest zaps native or upgrade."},{id:"s7",name:"Adobe Creative Cloud",category:"Design",seats:"2 of 2",cost:119,costNote:"/mo",health:"Healthy",renewal:"Mar 02",owner:"Vega",note:"Used. Keep."},{id:"s8",name:"Calendly",category:"Scheduling",seats:"6 of 6",cost:72,costNote:"/mo",health:"Healthy",renewal:"Auto",owner:"Jamie",note:"Standard plan. Workflows feature pays for itself in reminders."},{id:"s9",name:"Loom (legacy)",category:"Recording",seats:"1 of 10",cost:150,costNote:"/mo",health:"At Risk",renewal:"Aug 30",owner:"Atlas",note:"9 unused seats. Cancel at renewal or drop to Free for the one active user."},{id:"s10",name:"Cloudflare Pro",category:"Hosting / CDN",seats:"—",cost:25,costNote:"/mo",health:"Healthy",renewal:"Auto",owner:"Finn",note:"WAF + analytics. 
9Cheap insurance — keep."}],r={Healthy:"text-emerald-300 border-emerald-400/40 bg-emerald-500/10",Watch:"text-amber-300 border-amber-400/40 bg-amber-500/10","At Risk":"text-rose-300 border-rose-400/40 bg-rose-500/10"},s=t.reduce((c,u)=>c+u.cost,0),a=t.filter(c=>!["Auto"].includes(c.renewal)),i=[{id:"h1",name:'MacBook Pro 14" (M3 Pro)',assignee:"You · Operator",purchased:"Mar 2024",warranty:"AppleCare · Mar 2027",status:"In service"},{id:"h2",name:'MacBook Air 13" (M2)',assignee:"Sales Lead",purchased:"Jan 2024",warranty:"AppleCare · Jan 2027",status:"In service"},{id:"h3",name:"Mac mini (M2)",assignee:"Studio · Editing rig",purchased:"Jul 2023",warranty:"Expired",status:"In service"},{id:"h4",name:'iPad Pro 12.9"',assignee:"Showroom kiosk",purchased:"Sep 2022",warranty:"Expired",status:"Refresh due"},{id:"h5",name:"Brother MFC printer",assignee:"Back office",purchased:"—",warranty:"—",status:"In service"},{id:"h6",name:"Square Terminal (x2)",assignee:"Retail counter",purchased:"Nov 2023",warranty:"1-yr expired",status:"In service"},{id:"h7",name:"UniFi Dream Machine + 3 APs",assignee:"Office network",purchased:"May 2024",warranty:"1-yr active",status:"In service"},{id:"h8",name:"Old Dell tower",assignee:"Unassigned",purchased:"2019",warranty:"Expired",status:"Decommission"}],d={"In service":"text-emerald-300 border-emerald-400/40 bg-emerald-500/10","Refresh due":"text-amber-300 border-amber-400/40 bg-amber-500/10",Decommission:"text-rose-300 border-rose-400/40 bg-rose-500/10"},l=[{id:"i1",sku:"FFAI-TEE-PILOT-M",name:"Pilot Tee · Medium",onHand:42,reorderAt:25,value:14,velocity:"8 / mo"},{id:"i2",sku:"FFAI-TEE-PILOT-L",name:"Pilot Tee · Large",onHand:18,reorderAt:25,value:14,velocity:"11 / mo"},{id:"i3",sku:"FFAI-STICKER-PK",name:"Sticker 4-pack",onHand:312,reorderAt:100,value:2,velocity:"60 / mo"},{id:"i4",sku:"FFAI-MANUAL-V2",name:"Field Manual v2",onHand:7,reorderAt:20,value:22,velocity:"9 / mo"},{id:"i5",sku:"FFAI-TOKEN-CARD",name:"Token Gift Card · 500",onHand:86,reorderAt:40,value:5,velocity:"14 / mo"},{id:"i6",sku:"FFAI-BADGE-FNDR",name:"Founder Pin (metal)",onHand:0,reorderAt:30,value:8,velocity:"12 / mo"}],n=l.reduce((c,u)=>c+u.onHand*u.value,0),o=l.filter(c=>c.onHand<=c.reorderAt);return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Your operating stack at a glance — every SaaS subscription, every machine on the network, and the physical SKUs your team ships. Finn watches for waste, expiring renewals, and stock-outs."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Software Tools",value:String(t.length),sub:`${E(s)}/mo · ${E(s*12)}/yr`}),e.jsx(A,{label:"Hardware Assets",value:String(i.length),sub:`${i.filter(c=>c.status==="In service").length} in service`}),e.jsx(A,{label:"Inventory On Hand",value:E(n),sub:`${l.length} active SKUs`}),e.jsx(A,{label:"Action Items",value:String(a.length+o.length+i.filter(c=>c.status!=="In service").length),sub:"Renewals · refreshes · reorders"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(Aa,{className:"h-3.5 w-3.5"})," Software Stack"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[E(s),"/mo"]})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-3 px-4 py-2 border-b border-white/5 text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("div",{className:"col-span-3",children:"Tool"}),e.jsx("div",{className:"col-span-2",children:"Category"}),e.jsx("div",{className:"col-span-1 text-right",children:"Seats"}),e.jsx("div",{className:"col-span-2 text-right",children:"Cost"}),e.jsx("div",{className:"col-span-2",children:"Renewal"}),e.jsx("div",{className:"col-span-2 text-right",children:"Health"})]}),t.map(c=>e.jsxs("div",{className:"grid grid-cols-12 gap-3 items-center px-4 py-2.5 border-b border-white/5 last:border-0 hover:bg-white/[0.02] text-[12px]",children:[e.jsxs("div",{className:"col-span-3 min-w-0",children:[e.jsx("div",{className:"text-foreground
9/95 truncate",children:c.name}),e.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:c.note})]}),e.jsx("div",{className:"col-span-2 text-foreground/80 truncate",children:c.category}),e.jsx("div",{className:"col-span-1 text-right text-foreground/80 tabular-nums",children:c.seats}),e.jsxs("div",{className:"col-span-2 text-right text-primary tabular-nums",children:[c.cost===0?"—":E(c.cost)," ",e.jsx("span",{className:"text-[10px] text-muted-foreground",children:c.costNote})]}),e.jsxs("div",{className:"col-span-2 text-foreground/80",children:[c.renewal,e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[" · ",c.owner]})]}),e.jsx("div",{className:"col-span-2 flex justify-end",children:e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border ${r[c.health]}`,children:c.health})})]},c.id))]}),e.jsxs("div",{className:"mt-2 text-[11px] text-foreground/70 flex flex-wrap gap-x-4 gap-y-1",children:[e.jsxs("span",{children:[e.jsx("span",{className:"text-emerald-300",children:"●"})," Healthy — used, paid, on plan"]}),e.jsxs("span",{children:[e.jsx("span",{className:"text-amber-300",children:"●"})," Watch — near a cap or renewal"]}),e.jsxs("span",{children:[e.jsx("span",{className:"text-rose-300",children:"●"})," At Risk — waste or stalled value"]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(Ra,{className:"h-3.5 w-3.5"})," Hardware & Devices"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[i.length," assets"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:i.map(c=>e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 p-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[13px] text-foreground/95 truncate",children:c.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5",children:[c.assignee," · ",c.purchased]}),e.jsxs("div",{className:"text-[10px] text-foreground/70 mt-0.5",children:["Warranty · ",c.warranty]})]}),e.jsx("span",{className:`text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border shrink-0 ${d[c.status]}`,children:c.status})]},c.id))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(wr,{className:"h-3.5 w-3.5"})," Inventory & SKUs"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsxs("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[E(n)," on hand"]})]}),o.length>0&&e.jsxs("div",{className:"rounded-md border border-amber-400/30 bg-amber-500/[0.06] px-4 py-3 flex items-start gap-3 mb-3",children:[e.jsx(re,{className:"h-4 w-4 text-amber-300 mt-0.5 shrink-0"}),e.jsxs("div",{className:"flex-1 text-[12px] text-foreground/85 leading-relaxed",children:[e.jsx("span",{className:"font-display text-amber-300 mr-2",children:"Reorder now"}),o.map(c=>c.name).join(", ")," — at or below reorder point."]}),e.jsx("button",{type:"button",onClick:()=>v.success("Reorder POs drafted",{description:"Purchasing has the drafts ready for your approval."}),className:"text-[9px] tracking-[0.22em] uppercase px-2 py-1 rounded bg-amber-500/15 border border-amber-400/40 text-amber-200 hover:bg-amber-500/25 transition shrink-0",children:"Draft POs"})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-3 px-4 py-2 border-b border-white/5 text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("div",{className:"col-span-2",children:"SKU"}),e.jsx("div",{className:"col-span-4",children:"Item"}),e.jsx("div",{className:"col-span-2 text-right",children:"On Hand"}),e.jsx("div",{className:"col-span-2 text-right",children:"Reorder At"}),e.jsx("div",{className:"col-span-2 text-right",children:"Velocity"})]}),l.map(c=>{const u=c.onHand<=c.reorderAt,m=c.onHand===0;return e.jsxs("div",{className:`grid grid-cols-12 gap-3 items-center px-4 py-2.5 border-b border-white/5 last:border-0 text-[12px] ${m?"bg-rose-500/[0.05]":u?"bg-amber-500/[0.04]":"hover:bg-white/[0.02]"}
9`,children:[e.jsx("div",{className:"col-span-2 text-foreground/70 font-mono text-[11px] truncate",children:c.sku}),e.jsx("div",{className:"col-span-4 text-foreground/95 truncate",children:c.name}),e.jsx("div",{className:`col-span-2 text-right tabular-nums ${m?"text-rose-300":u?"text-amber-300":"text-foreground/85"}`,children:c.onHand}),e.jsx("div",{className:"col-span-2 text-right text-foreground/70 tabular-nums",children:c.reorderAt}),e.jsx("div",{className:"col-span-2 text-right text-foreground/70 tabular-nums",children:c.velocity})]},c.id)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v.success("Stack audit queued",{description:"Finn will flag waste, expiring contracts, and consolidation candidates by end of week."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Run Stack Audit"}),e.jsx("button",{type:"button",onClick:()=>v.success("Renewal calendar exported",{description:"Synced to your operations calendar with 14-day heads-up alerts."}),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Sync Renewal Calendar"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"purchasing"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Purchasing & Receiving →"})]})]})}function vc(){return e.jsx(Nc,{})}function jc(){const t=[{id:"g1",name:"SBA Community Advantage Grant",amount:5e4,type:"Grant",deadline:"Aug 14",fit:92,status:"Open",why:"You match the small-business + underbanked-market criteria. Moneta has a draft narrative ready."},{id:"g2",name:"State Small Business Credit Initiative (SSBCI)",amount:75e3,type:"Grant",deadline:"Sep 30",fit:84,status:"Open",why:"Your state is funded. Application is light if you've got 12 months of clean books."},{id:"g3",name:"Ascend Founder Fellowship",amount:25e3,type:"Grant",deadline:"Jul 28",fit:78,status:"Open",why:"Soft-money, no equity. Application is essay-heavy — Wren can ghostwrite from your story."},{id:"g4",name:"Local Chamber Growth Award",amount:1e4,type:"Grant",deadline:"Nov 15",fit:71,status:"Open",why:"Low odds but $0 cost to apply. Worth a 2-hour Wren draft."}],r=[{id:"l1",name:"SBA 7(a) Working Capital",amount:25e4,type:"SBA Loan",rate:"Prime + 2.75%",term:"10 yr",monthly:2820,fit:89,why:"Preferred lender match in your area. ~4 weeks to close at your current DSCR."},{id:"l2",name:"Bluevine Line of Credit",amount:1e5,type:"Line of Credit",rate:"~12% APR",term:"Revolving",monthly:0,fit:81,why:"Fast (48 hrs). Hold for seasonal cash crunches, don't run it hot."},{id:"l3",name:"Equipment Financing · Crest Capital",amount:6e4,type:"Equipment",rate:"8.4%",term:"5 yr",monthly:1230,fit:76,why:"Earmarked for the studio refresh. Equipment is its own collateral."},{id:"l4",name:"Revenue-Based Financing · Pipe",amount:8e4,type:"RBF",rate:"6–10% fee",term:"12 mo",monthly:0,fit:64,why:"Non-dilutive but expensive. Only if SBA timeline doesn't work."}],s=[{id:"e1",name:"Operator Angel Syndicate",amount:"$250k–$500k",stage:"Pre-seed",fit:86,lead:"Warm intro via Atlas",why:"Thesis match. Three of their LPs are FFAI members already."},{id:"e2",name:"Founders First Capital Partners",amount:"$100k–$1M",stage:"Revenue-stage",fit:79,lead:"Cold inbound · open form",why:"Revenue-based equity. Friendly to non-traditional founders."},{id:"e3",name:"Strategic check · Vertical SaaS partner",amount:"$500k–$2M",stage:"Strategic",fit:72,lead:"Aiden to broker",why:"Partnership-first. Gives you distribution alongside capital."}],a={Open:"text-emerald-300 border-emerald-400/40 bg-emerald-500/10","Closing Soon":"text-amber-300 border-amber-400/40 bg-amber-500/10",Applied:"text-primary border-primary/40 bg-primary/10"},i=t.reduce((l,n)=>l+n.amount,0),d=r.reduce((l,n)=>l+n.amount,0);return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("div",{className:"rounded-xl border border-primary/30 bg-primary/5 p-4 flex items-start gap-3",children:[e.jsx("div",{className:"h-9 w-9 rounded-full overflow-hidden border border-primary/60 shrink-0",children:e.jsx("img",{src:es,alt:"Moneta",className:"h-full w-full object-cover object-top",
9width:128,height:128})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Moneta · Capital Strategist"}),e.jsxs("p",{className:"text-[13px] text-foreground/90 mt-1 leading-relaxed italic",children:[`"Capital isn't just money — it's `,e.jsx("em",{children:"which"})," money, at ",e.jsx("em",{children:"what"})," cost, in ",e.jsx("em",{children:"what"}),' order. Start with non-dilutive (grants), layer in cheap debt (SBA), and only sell equity for what equity is uniquely good at: speed and partnership."']}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[e.jsx(j,{to:"/room/$agentId",params:{agentId:"moneta"},className:"px-2.5 py-1 text-[10px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Open Moneta's Conference Room →"}),e.jsx("button",{type:"button",onClick:()=>v.success("Capital stack review scheduled",{description:"Moneta will draft a phased fundraising plan and review with you this week."}),className:"px-2.5 py-1 text-[10px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Brief Moneta on Your Goals"})]})]})]}),e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Every funding option matched to your stage, geography, and financials — grants first (free money), then debt (cheapest capital), then equity (most expensive, save for speed or partnership). Fit scores are scored by Moneta against your books, runway, and growth trajectory."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Open Grants",value:String(t.length),sub:`Up to ${E(i)} non-dilutive`}),e.jsx(A,{label:"Loan Options",value:String(r.length),sub:`Up to ${E(d)} debt capacity`}),e.jsx(A,{label:"Equity Leads",value:String(s.length),sub:"2 warm · 1 inbound"}),e.jsx(A,{label:"Stack Readiness",value:"B+",sub:"2 docs from data-room complete"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(zt,{className:"h-3.5 w-3.5"})," Grants · Non-Dilutive"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Apply first"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:t.map(l=>e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 hover:border-primary/40 transition p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95",children:l.name}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:[l.type," · Deadline ",l.deadline]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("div",{className:"font-display text-lg text-primary glow-text tabular-nums",children:E(l.amount)}),e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Up to"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Fit"}),e.jsx("div",{className:`font-display text-base tabular-nums ${l.fit>=85?"text-emerald-300":l.fit>=70?"text-primary":"text-amber-300"}`,children:l.fit})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:"Status"}),e.jsx("span",{className:`inline-block text-[9px] tracking-[0.22em] uppercase px-1.5 py-0.5 rounded border ${a[l.status]}`,children:l.status})]})]}),e.jsx("div",{className:"mt-3 text-[11px] text-foreground/75 leading-relaxed border-l-2 border-primary/40 pl-3",children:l.why}),e.jsxs("div",{className:"flex justify-end gap-1.5 mt-3 pt-3 border-t border-white/5",children:[e.jsx("button",{type:"button",onClick:()=>v.success(`Saved ${l.name} to your watchlist`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded glass hover:glow-edge",children:"Watchlist"}),e.jsx("button",{type:"button",onClick:()=>v.success(`Wren is drafting ${l.name}`,{description:"Draft ready in your work orders within 48 hours."}),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Apply with Wren"})]})]},l.id))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(tt,{className:"h-3.5 w-3.5"})," Loans & Lines · Cheapest Capital"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Apply second"})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-3 px-4 py-2 border-b border-white/5 text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:[e.jsx("div",{className:"col-span-4",children:"Product"}),e.jsx("div",{className:"col-span-2 text-right",children:"Amount"}),e.jsx("div",{className:"col-span-2",children:"Rate"}),e.jsx("div",{className:"col-span-1",children:"Term"}),e.jsx("div",{className:"col-span-2 text-right",children:"Est. Monthly"}),e.jsx("div",{className:"col-span-1 text-right",children:"Fit"})]}),r.map(l=>e.jsxs("div",{className:"grid grid-cols-12 gap-3 items-center px-4 py-2.5 border-b border-white/5 last:border-0 hover:bg-white/[0.02] text-[12px]",children:[e.jsxs("div",{className:"col-span-4 min-w-0",children:[e.jsx("div",{className:"text-foreground
9/95 truncate",children:l.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground truncate",children:[l.type," · ",l.why]})]}),e.jsx("div",{className:"col-span-2 text-right text-primary tabular-nums",children:E(l.amount)}),e.jsx("div",{className:"col-span-2 text-foreground/85",children:l.rate}),e.jsx("div",{className:"col-span-1 text-foreground/85",children:l.term}),e.jsx("div",{className:"col-span-2 text-right text-foreground/85 tabular-nums",children:l.monthly>0?E(l.monthly):"—"}),e.jsx("div",{className:`col-span-1 text-right tabular-nums ${l.fit>=85?"text-emerald-300":l.fit>=70?"text-primary":"text-amber-300"}`,children:l.fit})]},l.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(ps,{className:"h-3.5 w-3.5"})," Equity · Most Expensive · Apply Last"]}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-primary/40 to-transparent"}),e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Use for speed or partnership"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:s.map(l=>e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 hover:border-primary/40 transition p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("div",{className:"font-display text-sm text-foreground/95",children:l.name}),e.jsx("div",{className:`font-display text-base tabular-nums ${l.fit>=85?"text-emerald-300":l.fit>=70?"text-primary":"text-amber-300"}`,children:l.fit})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground mt-1",children:[l.stage," · ",l.amount]}),e.jsx("div",{className:"mt-3 text-[11px] text-foreground/75 leading-relaxed",children:l.why}),e.jsxs("div",{className:"mt-3 pt-3 border-t border-white/5 flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:l.lead}),e.jsx("button",{type:"button",onClick:()=>v.success(`Moneta will warm up the intro to ${l.name}`),className:"px-2.5 py-1 text-[9px] tracking-[0.22em] uppercase rounded bg-primary/15 border border-primary/40 text-primary hover:bg-primary/25 transition",children:"Warm Intro"})]})]},l.id))})]}),e.jsxs("div",{className:"rounded-xl border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:[e.jsx(J,{className:"h-3.5 w-3.5"})," Data Room Readiness"]}),e.jsx("ul",{className:"mt-3 grid grid-cols-1 md:grid-cols-2 gap-2 text-[12px]",children:[{name:"12-month financials (P&L, BS, Cash)",done:!0},{name:"Cap table — clean",done:!0},{name:"Unit economics + LTV/CAC model",done:!0},{name:"Customer references (3 written)",done:!1},{name:"Investor narrative deck (v2)",done:!1},{name:"Use-of-funds plan (24-mo)",done:!1}].map(l=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${l.done?"bg-emerald-400":"bg-amber-400"}`}),e.jsx("span",{className:l.done?"text-foreground/85":"text-foreground/70",children:l.name}),e.jsx("span",{className:`ml-auto text-[9px] tracking-[0.22em] uppercase ${l.done?"text-emerald-300":"text-amber-300"}`,children:l.done?"Ready":"Missing"})]},l.name))}),e.jsx("button",{type:"button",onClick:()=>v.success("Data-room sprint queued",{description:"Moneta + Wren will close the 3 missing items in 7 days."}),className:"mt-4 w-full text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition py-2",children:"Close the Gaps with Moneta + Wren"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast Your Business →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Profit & Loss →"}),e.jsx(j,{to:"/grants",className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Browse Grant Library →"})]})]})}
9function Nc(){const[t,r]=x.useState(""),[s,a]=x.useState(null),[i,d]=x.useState(!1),[l,n]=x.useState(null),o=yr(Ei),c=async m=>{m.preventDefault();const g=t.trim();if(!(!g||i)){d(!0),n(null),a(null);try{const p=await o({data:{question:g}});a(p.reply||"Hmm — I came up empty. Try rephrasing your job.")}catch(p){console.error("[mr-ffai] ask failed",p),n("Mr. FFAI couldn't reach the workshop just now. Try again in a moment.")}finally{d(!1)}}},u=[{id:"free",name:"Free Tools",tag:"Open Access",blurb:"Starter utilities for every operator — no tokens required.",icon:En,accent:"from-sky-400/30 to-sky-400/0",ring:"border-sky-400/40 hover:border-sky-300",glow:"shadow-[0_0_40px_-10px_oklch(0.78_0.18_230/0.55)]",items:["SOP Generator","Prompt Library","ROI Calculator"]},{id:"ffai",name:"FFAI Tools",tag:"Members Only",blurb:"The core FFAI toolkit — workflows, agents, and assessments.",icon:Aa,accent:"from-primary/30 to-primary/0",ring:"border-primary/50 hover:border-primary",glow:"shadow-[0_0_40px_-10px_oklch(0.78_0.18_230/0.7)]",items:["Workflow Mapper","Policy Builder","DISC · HIGH5 · BDC"]},{id:"premium",name:"Premium Tools",tag:"Pro Tier",blurb:"Heavy-iron suite — investor prep, forecasting, neural dashboards.",icon:ps,accent:"from-amber-400/30 to-amber-400/0",ring:"border-amber-400/50 hover:border-amber-300",glow:"shadow-[0_0_40px_-10px_oklch(0.82_0.16_75/0.65)]",items:["Investor Prep Suite","CEO Live Reports","Forecasting Lab"]}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),"Tool Garage · Bays Open"]}),e.jsx("h1",{className:"font-display text-4xl text-foreground glow-text mt-3",children:"Tool Garage"}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2",children:"Floor G · Pick a Cabinet · Or Ask Mr. FFAI"}),e.jsxs("p",{className:"mt-5 text-sm text-foreground/85 max-w-2xl leading-relaxed",children:["Every job in The Internal Brain has a right tool. Browse the three cabinets below —"," ",e.jsx("span",{className:"text-primary",children:"Free"}),", ",e.jsx("span",{className:"text-primary",children:"FFAI"}),", and"," ",e.jsx("span",{className:"text-primary",children:"Premium"})," — or tell ",e.jsx("span",{className:"text-primary",children:"Mr. FFAI"})," ","what you're trying to get done and he'll point you to the right kit."]}),e.jsx("div",{className:"mt-7 grid gap-4 md:grid-cols-3",children:u.map(m=>e.jsxs("div",{className:`group relative rounded-xl border ${m.ring} ${m.glow} glass-strong overflow-hidden transition`,children:[e.jsx("div",{"aria-hidden":!0,className:`absolute inset-x-0 top-0 h-24 bg-gradient-to-b ${m.accent} pointer-events-none`}),e.jsxs("div",{className:"relative p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(m.icon,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground",children:m.tag})]}),e.jsx("div",{className:"font-display text-xl text-foreground glow-text mt-3",children:m.name}),e.jsx("p",{className:"text-xs text-foreground/75 mt-2 leading-relaxed",children:m.blurb}),e.jsx("ul",{className:"mt-4 space-y-1.5",children:m.items.map(g=>e.jsxs("li",{className:"flex items-center gap-2 text-[11px] text-foreground/85",children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/80"}),g]},g))}),e.jsx(j,{to:"/tools/cabinet",className:"mt-4 inline-block text-[10px] tracking-[0.22em] uppercase text-primary/80 hover:text-primary transition",children:"Open Cabinet →"})]})]},m.id))}),e.jsxs("div",{className:"mt-7 relative rounded-xl border border-primary/40 glass-strong p-5 shadow-[0_0_40px_-10px_oklch(0.78_0.18_230/0.55)] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx(Ca,{className:"h-3.5 w-3.5"}),"Ask Mr. FFAI"]}),e.jsxs("div",{className:"grid grid-cols-12 gap-4 mt-3 items-center",children:[e.jsxs("div",{className:"col-span-12 sm:col-span-3 relative flex items-center justify-center min-h-[180px]",children:[e.jsx("div",{className:"absolute inset-x-4 top-1/2 -translate-y-1/2 h-28 rounded-full bg-primary/25 blur-2xl","aria-hidden":!0}),e.jsx("img",{src:In,alt:"Mr. FFAI",className:"relative h-[180px] w-auto object-contain drop-shadow-[0_0_22px_hsl(var(--primary)/0.6)] mr-ffai-float pointer-events-none select-none"})]}),e.jsxs("div",{className:"col-span-12 sm:col-span-9",children:[e.jsx(wc,{text:"Ask me which tools are best for this job — Free, FFAI, or Premium. I'll point you straight to the right kit."}),e.jsxs("form",{onSubmit:c,className:"mt-3 flex flex-col sm:flex-row gap-2",children:[e.jsx("input",{value:t,onChange:m=>r(m.target.value),placeholder:"e.g. I need to onboard a 12-person sales team next month…",disabled:i,className:"flex-1 bg-black/40 border border-primary/30 focus:border-primary outline-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground
9/70"}),e.jsxs("button",{type:"submit",disabled:i||!t.trim(),className:"inline-flex items-center justify-center gap-2 px-4 py-2.5 text-xs tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:[e.jsx(ds,{className:"h-3.5 w-3.5"}),i?"Thinking…":"Ask"]})]}),e.jsx("div",{className:"mt-2 text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Mr. FFAI matches your job to the right Free, FFAI, or Premium tool."}),(s||l)&&e.jsx("div",{className:"mt-4 rounded-md border border-primary/30 bg-black/40 p-3 text-sm text-foreground/90 leading-relaxed whitespace-pre-wrap",children:l?e.jsx("span",{className:"text-destructive/90",children:l}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-primary mr-2",children:"Mr. FFAI"}),s]})})]})]})]})]})}function wc({text:t}){const r=t.split(/(\s+)/);return e.jsxs("div",{className:"text-sm text-primary/90 italic leading-relaxed",children:['"',r.map((s,a)=>s.trim()===""?e.jsx("span",{children:s},a):e.jsx("span",{className:"inline-block ffai-fly-word",style:{animationDelay:`${a*90}ms`},children:s},a)),'"',e.jsx("style",{children:`
10        @keyframes ffaiFlyIn {
11          0% { opacity: 0; transform: translate(-180px, 30px) scale(0.4); filter: blur(4px); }
12          60% { opacity: 1; filter: blur(0); }
13          100% { opacity: 1; transform: translate(0, 0) scale(1); filter: blur(0); }
14        }
15        .ffai-fly-word { opacity: 0; animation: ffaiFlyIn 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
16      `})]})}function kc({displayName:t,floorsCount:r,roomsCount:s,agentsCount:a,membershipPlan:i}){const[d,l]=x.useState(!1),[n,o]=x.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block absolute top-4 right-4 z-10",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-3 rounded-full border border-primary/40 pulse-ring"}),e.jsxs("button",{onClick:()=>l(!0),title:"Play Jamie's welcome video",className:"group h-28 w-28 lg:h-32 lg:w-32 rounded-full overflow-hidden border-2 border-primary/70 glow-edge floaty relative block",children:[e.jsx("img",{src:Ms,alt:"Jamie",className:"h-full w-full object-cover object-top",width:640,height:640}),e.jsx("span",{className:"absolute inset-0 bg-background/40 opacity-0 group-hover:opacity-100 transition grid place-items-center",children:e.jsx("span",{className:"h-10 w-10 rounded-full bg-primary/90 grid place-items-center shadow-[0_0_24px_var(--glow-soft)]",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-primary-foreground ml-0.5",fill:"currentColor",children:e.jsx("path",{d:"M8 5v14l11-7z"})})})}),e.jsx("span",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 text-[9px] tracking-[0.22em] uppercase text-primary bg-background/80 px-2 py-0.5 rounded-full border border-primary/40 whitespace-nowrap",children:"Play Welcome"})]})]})}),e.jsx("div",{className:"md:hidden mb-4 flex justify-center",children:e.jsxs("button",{onClick:()=>l(!0),className:"group h-24 w-24 rounded-full overflow-hidden border-2 border-primary/70 glow-edge relative block",children:[e.jsx("img",{src:Ms,alt:"Jamie",className:"h-full w-full object-cover object-top",width:640,height:640}),e.jsx("span",{className:"absolute inset-0 bg-background/30 grid place-items-center",children:e.jsx("span",{className:"h-9 w-9 rounded-full bg-primary/90 grid place-items-center",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-primary-foreground ml-0.5",fill:"currentColor",children:e.jsx("path",{d:"M8 5v14l11-7z"})})})})]})}),e.jsxs("div",{className:"md:pr-40 lg:pr-44",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),"Jamie · Chief Concierge on Duty"]}),e.jsxs("h1",{className:"font-display text-4xl text-foreground glow-text mt-3",children:["Welcome to FFAI, ",t,"."]}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2",children:"Your Account · Orientation · Next Step"}
16),e.jsxs("p",{className:"mt-5 text-sm text-foreground/85 max-w-2xl leading-relaxed",children:["I'm ",e.jsx("span",{className:"text-primary",children:"Jamie"}),", your concierge inside The Internal Brain. Think of this room as your ",e.jsx("span",{className:"text-primary",children:"account home"})," — a quick read on the floors, rooms, and operators you have access to, plus the membership tier powering your station. When you're ready, the very next stop is ",e.jsx("span",{className:"text-primary",children:"Define Your Mission"})," — that's where we line up what FFAI will actually build, sell, or solve for you."]})]}),e.jsxs("div",{className:"mt-6 grid grid-cols-2 md:grid-cols-4 gap-3 max-w-2xl",children:[e.jsx(T,{icon:ya,label:"Floors Unlocked",value:String(r)}),e.jsx(T,{icon:Ma,label:"Rooms Available",value:String(s)}),e.jsx(T,{icon:ue,label:"Agents On Staff",value:String(a)}),e.jsxs("button",{type:"button",onClick:()=>o(!0),className:"text-left rounded-md glass border border-primary/40 p-3 bg-primary/5 hover:border-primary hover:glow-edge transition cursor-pointer",title:"View Founders' Circle benefits",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(ze,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-display text-[10px] text-primary glow-text",children:"ACTIVE"})]}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-foreground/90 mt-1 leading-tight",children:i}),e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase text-primary/80 mt-1",children:"View Benefits →"})]})]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-2",children:[e.jsxs(j,{to:"/missions",className:"inline-flex items-center gap-2 px-4 py-2.5 text-xs tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition shadow-[0_0_30px_-8px_oklch(0.78_0.18_230/0.7)]",children:[e.jsx(kr,{className:"h-4 w-4"}),"Define Your Mission"]}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"0",roomId:"navigation"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Tour the Building"}),e.jsx(j,{to:"/agents",className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Meet Your Agents"})]}),e.jsxs(j,{to:"/tools/smart-upload",className:"group relative mt-6 block max-w-3xl rounded-xl glass-strong border border-primary/50 p-5 overflow-hidden hover:glow-edge transition",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 opacity-60 pointer-events-none",style:{background:"radial-gradient(circle at 0% 0%, oklch(0.78 0.18 230 / 0.22) 0%, transparent 55%), radial-gradient(circle at 100% 100%, oklch(0.78 0.18 60 / 0.18) 0%, transparent 55%)"}}),e.jsxs("div",{className:"relative flex items-start gap-4",children:[e.jsx("div",{className:"shrink-0 h-12 w-12 rounded-lg bg-primary/15 border border-primary/40 grid place-items-center glow-edge",children:e.jsx(jt,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx(X,{className:"h-3 w-3"})," Already Running a Business?"]}),e.jsx("div",{className:"font-display text-xl text-foreground glow-text mt-1.5",children:"Bring it with you — AI Smart Uploads"}),e.jsxs("p",{className:"mt-2 text-sm text-foreground/85 leading-relaxed",children:["Drop in your ",e.jsx("span",{className:"text-primary",children:"SOPs, contracts, price lists, customer rosters, vendor lists, financials"})," — anything. Our AI reads each file and files it onto the right floor and room automatically. Skip months of setup; be operational in an afternoon."]}),e.jsxs("div",{className:"mt-3 inline-flex items-center gap-2 text-[11px] tracking-[0.22em] uppercase text-primary group-hover:translate-x-0.5 transition",children:["Start Smart Upload ",e.jsx(V,{className:"h-3.5 w-3.5"})]})]})]})]}),d&&e.jsxs("div",{className:"fixed inset-0 z-50 grid place-items-center p-4 sm:p-8 bg-background/90 backdrop-blur-md animate-fade-in",onClick:()=>l(!1),children:[e.jsx("div",{className:"absolute inset-0 grid-overlay opacity-30 pointer-events-none"}),e.jsxs("div",{className:"relative w-full max-w-4xl glass rounded-xl border border-primary/40 glow-edge overflow-hidden",onClick:c=>c.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/40 bg-background/60",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.3em] uppercase text-muted-foreground",children:["Welcome Message · ",e.jsx("span",{className:"text-foreground
16/90 font-display tracking-wider",children:"Jamie"})]}),e.jsxs("button",{onClick:()=>l(!1),className:"inline-flex items-center gap-2 text-[10px] tracking-[0.22em] uppercase px-3 py-1.5 rounded-md glass hover:glow-edge",children:[e.jsx(Cn,{className:"h-3 w-3"})," Close"]})]}),e.jsx("video",{src:Hn,autoPlay:!0,playsInline:!0,controls:!0,className:"w-full h-auto max-h-[75vh] bg-black"})]})]}),e.jsx(Oa,{open:n,onOpenChange:o})]})}const Sc=[{id:"membership",title:"Membership Plans",subtitle:"Pick the tier that powers your station",items:[{id:"explorer",name:"Explorer",blurb:"1 floor · 2 agents · community access",price:"$0",unit:"/mo",icon:ze,cta:"Start Free",bg:rd.url},{id:"operator",name:"Operator",blurb:"All floors · 6 agents · 500 tokens/mo",price:"$79",unit:"/mo",icon:Ia,badge:"Most Popular",cta:"Upgrade",bg:ad.url},{id:"founders",name:"Founders' Circle",blurb:"Unlimited · senior consultants · priority queue",price:"$249",unit:"/mo",icon:X,cta:"Go Founder",bg:id.url}]},{id:"tokens",title:"FFAI Tokens",subtitle:"Fuel for agent runs, deliverables & deep dives",items:[{id:"tok-100",name:"Starter Pack",blurb:"100 tokens",price:"$15",icon:tt,cta:"Buy",bg:ld.url},{id:"tok-500",name:"Operator Pack",blurb:"500 tokens + 50 bonus",price:"$60",icon:tt,badge:"Best Value",cta:"Buy",bg:cd.url},{id:"tok-2000",name:"Command Pack",blurb:"2,000 tokens + 300 bonus",price:"$199",icon:tt,cta:"Buy",bg:pd.url}]},{id:"access",title:"Access Codes",subtitle:"Unlock specialty evaluations & passes",items:[{id:"ai-readiness",name:"AI Readiness Evaluator",blurb:"36-point diagnostic · instant report",price:"$49",icon:cs,cta:"Unlock",bg:xd.url},{id:"deep-dive-200",name:"200pt Deep-Dive Evaluation",blurb:"Full operational + financial scan",price:"$299",icon:us,badge:"Pro",cta:"Unlock",bg:hd.url},{id:"builders-pass",name:"Builder's Pass",blurb:"All-access to Forge Labs for 30 days",price:"$129",icon:Ra,cta:"Unlock",bg:bd.url}]},{id:"guides",title:"Instruction Guides",subtitle:"Playbooks, SOPs & operator manuals",items:[{id:"guide-onboarding",name:"Station Operator Manual",blurb:"PDF · 84 pages",price:"$19",icon:Re,cta:"Add",bg:vd.url},{id:"guide-sop",name:"SOP Pack: Sales & Ops",blurb:"12 ready-to-run SOPs",price:"$39",icon:Re,cta:"Add",bg:Nd.url}
16,{id:"guide-prompts",name:"Prompt Library Vol. 1",blurb:"300+ vetted prompts",price:"$29",icon:Pa,cta:"Add",bg:kd.url}]},{id:"novelties",title:"Station Novelties",subtitle:"Wear the brand, fly the flag",items:[{id:"tee-classic",name:"FFAI Classic Tee",blurb:"Heavyweight cotton · S–3XL",price:"$32",icon:Rs,cta:"Add",bg:Cd.url},{id:"tee-pilot",name:"Pilot Tier Tee",blurb:"Limited Founders' run",price:"$42",icon:Rs,badge:"Limited",cta:"Add",bg:Id.url},{id:"sticker-pack",name:"Operator Sticker Pack",blurb:"8 holographic decals",price:"$12",icon:zt,cta:"Add",bg:Rd.url}]}];function Cc(){return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.32em] uppercase text-primary glow-text",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 pulse-ring"}),"Station Store · Open 24/7"]}),e.jsx("h1",{className:"font-display text-4xl text-foreground glow-text mt-3",children:"Outfit Your Station"}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-2",children:"Memberships · Tokens · Access Codes · Guides · Novelties"}),e.jsx("p",{className:"mt-4 text-sm text-foreground/80 max-w-2xl leading-relaxed",children:"Everything you need to run, fuel, and represent your FFAI station. Plans unlock floors and agents, tokens power the work, access codes open specialty evaluations, and novelties keep the crew looking sharp."}),e.jsxs("div",{className:"mt-5 relative",children:[e.jsx("div",{className:"pointer-events-none absolute -top-2 left-0 right-2 h-6 bg-gradient-to-b from-background/80 to-transparent z-10"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-2 left-0 right-2 h-8 bg-gradient-to-t from-background/90 to-transparent z-10"}),e.jsx("div",{className:"max-h-[440px] overflow-y-auto pr-3 space-y-5 scroll-smooth",style:{scrollbarGutter:"stable"},children:Sc.map(t=>e.jsxs("section",{children:[e.jsxs("div",{className:"sticky top-0 z-[5] -mx-1 px-1 py-1.5 backdrop-blur-md bg-background/40 border-b border-primary/15 mb-2",children:[e.jsx("h2",{className:"font-display text-sm text-primary glow-text",children:t.title}),e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground mt-0.5",children:t.subtitle})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:t.items.map(r=>e.jsx(Ac,{item:r},r.id))})]},t.id))})]}),e.jsxs(j,{to:"/grants",className:"group fixed bottom-6 left-72 z-40 inline-flex items-center gap-3 px-4 py-3 rounded-lg glass-strong border border-amber-400/50 hover:border-amber-300 shadow-[0_0_40px_-10px_oklch(0.82_0.16_75/0.7)] transition","aria-label":"Visit the Grants Program",children:[e.jsx(ja,{className:"h-5 w-5 text-amber-300 animate-pulse"}),e.jsxs("span",{className:"flex flex-col leading-tight",children:[e.jsx("span",{className:"text-[9px] tracking-[0.28em] uppercase text-amber-300/80",children:"Free Funding"}),e.jsx("span",{className:"text-sm font-display text-amber-200 group-hover:text-amber-100",children:"Visit the Grants Program"})]})]})]})}function Ac({item:t}){const r=t.icon,s=!!t.bg,[a,i]=x.useState(!1),d=t.id==="founders",l=()=>i(!0);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`relative overflow-hidden rounded-md border ${s?"border-white/40":"glass border-primary/20"} p-2.5 hover:border-primary/60 hover:glow-edge transition group ${d?"cursor-pointer ring-1 ring-primary/30":""}`,onClick:d?l:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,onKeyDown:d?n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),l())}:void 0,children:[s&&e.jsx("div",{className:"absolute inset-0 bg-cover bg-center transition-transform duration-500 group-hover:scale-[1.04]",style:{backgroundImage:`url(${t.bg})`},"aria-hidden":!0}),e.jsxs("div",{className:"relative",children:[t.badge&&e.jsx("span",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 px-2 py-0.5 text-[8px] tracking-[0.18em] uppercase rounded bg-primary text-primary-foreground shadow whitespace-nowrap z-10",children:t.badge}),e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:`h-7 w-7 rounded ${s?"bg-white/90 border border-white":"bg-primary/10 border border-primary/30"} flex items-center justify-center shrink-0 shadow`,children:e.jsx(r,{className:`h-3.5 w-3.5 ${s?"text-slate-900":"text-primary"}`})}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:`font-display text-base leading-none ${s?"text-slate-900 drop-shadow-[0_1px_0_rgba(255,255,255,0.8)]":"text-primary glow-text"}`,children:t.price}),t.unit&&e.jsx("div",{className:`text-[8px] tracking-[0.2em] uppercase mt-0.5 ${s?"text-slate-800":"text-muted-foreground"}`,children:t.unit})]})]}),s?e.jsxs("div",{className:"mt-12 rounded bg-white/85 backdrop-blur-sm px-2 py-1.5",children:[e.jsx("div",{className:"text-xs font-semibold text-slate-900 leading-tight",children:t.name}),e.jsx("div",{className:"text-[10px] text-slate-700 mt-0.5 leading-snug line-clamp-2",children:t.blurb})]}):e.jsxs("div",{className:"mt-2",children:[e.jsx("div",{className:"text-xs font-medium text-foreground
16/95 leading-tight",children:t.name}),e.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5 leading-snug line-clamp-2",children:t.blurb})]}),e.jsx("button",{type:"button",onClick:d?n=>{n.stopPropagation(),l()}:void 0,className:`mt-2 w-full px-2 py-1.5 text-[9px] tracking-[0.2em] uppercase rounded transition ${s?"bg-slate-900/90 text-white border border-slate-900 hover:bg-slate-900":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary hover:text-primary-foreground"}`,children:t.cta})]})]}),d&&e.jsx(Oa,{open:a,onOpenChange:i})]})}function Ic(){return Jc()}const dt=[{name:"Maya Chen",role:"Head of Operations",hired:"2023-03-14",comp:"$148,000 / yr",trend:"up"},{name:"Devon Carter",role:"Senior Engineer",hired:"2022-08-01",comp:"$165,000 / yr",trend:"up"},{name:"Priya Raman",role:"Customer Success Lead",hired:"2024-01-22",comp:"$112,000 / yr",trend:"flat"},{name:"Jordan Blake",role:"Account Executive",hired:"2024-06-10",comp:"$95,000 / yr + comm",trend:"down"},{name:"Sam Ortiz",role:"Marketing Manager",hired:"2023-11-05",comp:"$98,000 / yr",trend:"up"},{name:"Riley Thompson",role:"Junior Designer",hired:"2024-09-02",comp:"$42 / hr",trend:"flat"},{name:"Alex Park",role:"Office Manager",hired:"2022-05-18",terminated:"2025-02-28",comp:"$58,000 / yr",trend:"down"}],Mt=[{name:"Casey Nguyen",role:"Senior Full-Stack Engineer",stage:"Interviewed"},{name:"Morgan Lee",role:"Founding Account Executive",stage:"Resume Reviewed"},{name:"Taylor Brooks",role:"Head of Finance",stage:"New"},{name:"Jamie Rivera",role:"Product Designer",stage:"Offer Accepted",hireDate:"2026-06-15"},{name:"Quinn Adams",role:"Data Analyst",stage:"Offer Rejected"},{name:"Avery Walsh",role:"Senior Engineer",stage:"Hired",hireDate:"2026-05-01"}],Qs={New:"bg-sky-500/15 text-sky-300 border-sky-500/40","Resume Reviewed":"bg-violet-500/15 text-violet-300 border-violet-500/40",Interviewed:"bg-amber-500/15 text-amber-300 border-amber-500/40","Offer Accepted":"bg-emerald-500/15 text-emerald-300 border-emerald-500/40","Offer Rejected":"bg-rose-500/15 text-rose-300 border-rose-500/40",Hired:"bg-primary/15 text-primary border-primary/40"};function Mc({trend:t}){return t==="up"?e.jsx(Pe,{className:"h-4 w-4 text-emerald-400","aria-label":"Trending up"}):t==="down"?e.jsx(rt,{className:"h-4 w-4 text-rose-400","aria-label":"Trending down"}):e.jsx(Sr,{className:"h-4 w-4 text-muted-foreground","aria-label":"Flat"})}function Rc(){const t=dt.filter(n=>!n.terminated).length,r=dt.filter(n=>n.terminated).length,s=new Date,a=(dt.filter(n=>!n.terminated).reduce((n,o)=>{const c=new Date(o.hired),u=(s.getTime()-c.getTime())/(1e3*60*60*24*365.25);return n+u},0)/Math.max(t,1)).toFixed(1),d=`$${(dt.filter(n=>!n.terminated).reduce((n,o)=>{const c=o.comp.match(/\$([\d,]+)\s*\/\s*(yr|hr)/i);if(!c)return n;const u=Number(c[1].replace(/,/g,""));return n+(c[2].toLowerCase()==="hr"?u*2080:u)},0)/1e3).toFixed(0)}K`,l=dt.filter(n=>!n.terminated).slice(0,3);return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Active Headcount"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:t}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Across all departments"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Avg Tenure"}),e.jsxs("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:[a," yr"]}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Longer tenure = stronger institutional knowledge"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Annualized Payroll"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:d}
16),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Salaries + hourly @ 2,080 hr/yr"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Recent Departures"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:r}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Trailing 12 months"})]})]}),e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-primary/20",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Current Positions"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70",children:"Trend reflects latest evals"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-primary/15",children:[e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Name"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Role"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Hired"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Terminated"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Compensation"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Trend"})]})}),e.jsx("tbody",{children:dt.map(n=>e.jsxs("tr",{className:"border-b border-primary/10 last:border-0 hover:bg-primary/5 transition",children:[e.jsx("td",{className:"px-5 py-3 text-foreground/90 font-medium",children:n.name}),e.jsx("td",{className:"px-5 py-3 text-foreground/80",children:n.role}),e.jsx("td",{className:"px-5 py-3 text-foreground/70",children:n.hired}),e.jsx("td",{className:"px-5 py-3 text-foreground/70",children:n.terminated??e.jsx("span",{className:"text-muted-foreground/50",children:"—"})}),e.jsx("td",{className:"px-5 py-3 text-foreground/80",children:n.comp}),e.jsx("td",{className:"px-5 py-3",children:e.jsx(Mc,{trend:n.trend})})]},n.name))})]})}),e.jsxs("div",{className:"px-5 py-3 border-t border-primary/15 text-[10px] tracking-[0.18em] uppercase text-muted-foreground/70 flex flex-wrap gap-x-4 gap-y-1",children:[e.jsxs("span",{children:[e.jsx(Pe,{className:"inline h-3 w-3 text-emerald-400 -mt-0.5"})," Up = improving evals"]}),e.jsxs("span",{children:[e.jsx(rt,{className:"inline h-3 w-3 text-rose-400 -mt-0.5"})," Down = needs coaching"]}),e.jsxs("span",{children:[e.jsx(Sr,{className:"inline h-3 w-3 text-muted-foreground -mt-0.5"})," Flat = steady performance"]})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Upcoming Performance Reviews"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70 mt-1",children:"Next 30 days · driven by hire anniversaries"}),e.jsx("ul",{className:"mt-3 space-y-2",children:l.map(n=>e.jsxs("li",{className:"flex items-center justify-between text-sm border-b border-primary/10 last:border-0 pb-2 last:pb-0",children:[e.jsxs("span",{className:"text-foreground/90",children:[n.name," ",e.jsxs("span",{className:"text-muted-foreground/70 text-xs",children:["· ",n.role]})]}),e.jsx("span",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:"Due soon"})]},n.name))})]}),e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Staffing Tips"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70 mt-1",children:"From your AI HR advisor"}),e.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-foreground
16/80 leading-relaxed",children:[e.jsx("li",{children:'• Coach "down" trending staff within 2 weeks — most reversals happen in the first month after an eval dip.'}),e.jsx("li",{children:"• Anyone past 2 years tenure should have a documented growth path or comp review on file."}),e.jsxs("li",{children:["• Need to backfill or expand the team? Head to the ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"2",roomId:"talent-lounge"},className:"text-primary underline-offset-4 hover:underline",children:"Talent Lounge"})," to see the live candidate pipeline."]})]})]})]})]})}const Pc=[{id:"workshops",name:"Regular Workshops",tagline:"Live, hands-on sessions on a published calendar",icon:Da,programs:[{id:"w1",title:"AI Foundations for Founders",format:"Live online · 4 sessions",duration:"4 weeks",audience:"Founders & operators",blurb:"From prompt design to a working AI workflow your team will actually use.",status:"Enrolling"},{id:"w2",title:"Mr. FFAI in Practice",format:"Live online · 2 sessions",duration:"2 weeks",audience:"Anyone using TIB",blurb:"Get the most from your in-building AI co-pilot across every floor.",status:"Upcoming"},{id:"w3",title:"Build Your First Agentic Workflow",format:"Workshop · 1 day",duration:"1 day",audience:"Ops & RevOps leads",blurb:"Map a real process, then ship an agent that runs it end-to-end.",status:"Enrolling"}]},{id:"staff-training",name:"Staff Training",tagline:"Role-based programs to upskill your team",icon:ue,programs:[{id:"s1",title:"Sales Team · AI-Assisted Selling",format:"Cohort · 3 sessions",duration:"3 weeks",audience:"Sales reps & managers",blurb
16:"Prospecting, discovery, and follow-up with AI in the loop.",status:"Enrolling"},{id:"s2",title:"Ops Team · SOPs that Run Themselves",format:"Cohort · 4 sessions",duration:"4 weeks",audience:"Ops managers",blurb:"Turn tribal knowledge into executable SOPs with built-in automations.",status:"Upcoming"},{id:"s3",title:"Leadership · Decision Dashboards",format:"Cohort · 2 sessions",duration:"2 weeks",audience:"Founders & C-suite",blurb:"Build the daily and weekly dashboards your leadership cadence actually needs.",status:"On Demand"}]},{id:"custom",name:"Customized for Your Business",tagline:"Private programs built around your stack, data, and goals",icon:_t,programs:[{id:"c1",title:"Private Team Workshop",format:"Private · onsite or virtual",duration:"1–2 days",audience:"Your team",blurb:"Scoped to your industry, your tools, and the outcome you need this quarter.",status:"Custom"},{id:"c2",title:"AI Transformation Sprint",format:"Engagement · 4–8 weeks",duration:"4–8 weeks",audience:"Cross-functional teams",blurb
16:"Discovery → roadmap → 2 shipped pilots with your people in the room.",status:"Custom"},{id:"c3",title:"Executive Briefing",format:"Private · half day",duration:"½ day",audience:"Board & senior leaders",blurb:"Plain-English walk-through of AI risk, ROI, and your next 90 days.",status:"Custom"}]},{id:"ai-courses",name:"AI Courses & Seminars",tagline:"Self-paced learning with certificates",icon:Re,programs:[{id:"a1",title:"AI Literacy 101",format:"Self-paced · 8 modules",duration:"~5 hours",audience:"Everyone",blurb:"What AI can and can't do, what's safe to share, and where to start.",status:"On Demand"},{id:"a2",title:"Prompt Engineering Essentials",format:"Self-paced · 6 modules",duration:"~4 hours",audience:"Knowledge workers",blurb:"Patterns, anti-patterns, and reusable prompt templates you can adapt.",status:"On Demand"},{id:"a3",title:"Governance & Risk for AI Adopters",format:"Seminar · 1 session",duration:"90 min",audience:"Compliance, legal, ops",blurb:"Frameworks for policy, data handling, and human-in-the-loop oversight.",status:"Upcoming"}]}],$c=[{title:"Training Guides Library",detail:"Step-by-step PDFs by role and tool",icon:J},{title:"Workshop Recordings",detail:"Replay past sessions on demand",icon:wa}
16,{title:"Templates & Worksheets",detail:"Downloadable assets used in every class",icon:wr},{title:"Certificates of Completion",detail:"Issued for every cohort & course",icon:ze}],Dc={Enrolling:"text-emerald-300 bg-emerald-400/10 border-emerald-400/30",Upcoming:"text-sky-300 bg-sky-400/10 border-sky-400/30","On Demand":"text-violet-300 bg-violet-400/10 border-violet-400/30",Custom:"text-amber-300 bg-amber-400/10 border-amber-400/30"};function Tc(){return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Live workshops, role-based staff training, business-customized programs, and a growing library of AI courses, seminars, and training materials — all from one room."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Open Cohorts"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:"6"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Self-Paced Courses"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:"12"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Guides & Worksheets"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:"38"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:"Certificates Issued"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:"214"})]})]}),Pc.map(t=>{const r=t.icon;return e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(r,{className:"h-3.5 w-3.5 text-primary"}),t.name]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:t.tagline}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:t.programs.map(s=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3 flex flex-col",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"font-display text-sm text-foreground glow-text",children:s.title}),e.jsx("span",{className:`shrink-0 inline-flex items-center px-2 py-0.5 rounded-sm border text-[9px] tracking-[0.18em] uppercase ${Dc[s.status]}`,children:s.status})]}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground mt-1",children:s.format}),e.jsx("p",{className:"text-[11px] text-foreground/70 mt-2 leading-relaxed flex-1",children:s.blurb}),e.jsxs("div",{className:"text-[10px] text-muted-foreground mt-2",children:[e.jsx("span",{className:"text-foreground/70",children:s.duration})," · ",s.audience]}),e.jsx("button",{onClick:()=>v.success(s.status==="Custom"?`Inquiry sent · ${s.title}`:`Enrolled · ${s.title}`),className:"mt-3 w-full px-3 py-2 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center justify-center gap-1.5",children:s.status==="Custom"?e.jsxs(e.Fragment,{children:[e.jsx(Na,{className:"h-3.5 w-3.5"})," Request Proposal"]}):e.jsxs(e.Fragment,{children:[e.jsx(ms,{className:"h-3.5 w-3.5"})," Enroll"]})})]},s.id))})]},t.id)}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(Re,{className:"h-3 w-3 inline mr-1"})," Training Materials"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Guides, recordings, templates & certificates"}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:$c.map(t=>{const r=t.icon;return e.jsxs("button",{onClick:()=>v.success(`Opening · ${t.title}`),className:"text-left rounded-md border border-white/10 bg-black/40 p-3 hover:border-primary/40 hover:bg-primary/5 transition",children:[e.jsx(r,{className:"h-4 w-4 text-primary"}),e.jsx("div",{className:"font-display text-sm text-foreground mt-2",children:t.title}
16),e.jsx("div",{className:"text-[11px] text-foreground/70 mt-1",children:t.detail})]},t.title)})})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"0",roomId:"general-store"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Station Store →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"conference-rooms"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Human Advisors →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"0",roomId:"tool-garage"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Tool Garage →"})]})]})}const Fc=[{name:"Atlas",role:"General Counsel · AI",specialty:"Day-to-day legal triage, contract review, IP",rate:"Included",status:"online"},{name:"Hartley & Stone LLP",role:"Corporate · Human",specialty:"M&A, financing rounds, complex contracts",rate:"$575/hr",status:"online"},{name:"Marin Sato",role:"Employment · Human",specialty:"PEO, terminations, multi-state HR",rate:"$420/hr",status:"by_appt"},{name:"Greer IP Group",role:"IP · Human",specialty:"Trademark prosecution, patent filings",rate:"$495/hr",status:"online"},{name:"Brennan Tax",role:"Tax · Human",specialty:"Entity structure, R&D credits, state nexus",rate:"$360/hr",status:"by_appt"}],Js=[{id:"M-2241",title:"Series A — term sheet redlines",type:"Financing",counsel:"Hartley & Stone",status:"In Diligence",updated:"2h ago",priority:"High"},{id:"M-2240",title:"Acme MSA dispute · payment cure",type:"Commercial",counsel:"Atlas",status:"Open",updated:"Yesterday",priority:"High"},{id:"M-2238",title:"CA employee separation · severance",type:"Employment",counsel:"Marin Sato",status:"Awaiting Counsel",priority:"Med",updated:"2d ago"},{id:"M-2235",title:"TIBPROTECT™ trademark · class 9 / 42",type:"IP",counsel:"Greer IP Group",status:"In Diligence",priority:"Med",updated:"3d ago"},{id:"M-2230",title:"DE franchise tax remediation",type:"Tax",counsel:"Brennan Tax",status:"Closed",priority:"Low",updated:"1w ago"}],Oc=[{from:"Atlas",at:"11:42a",summary:"Acme's MSA §9.3 is enforceable — recommend 10-day written cure notice before suspension."},{from:"Hartley & Stone",at:"Mon",summary:"Term sheet 2x liquidation preference is non-standard for Series A. Push for 1x non-participating."},{from:"Greer IP Group",at:"Mon",summary:"USPTO Office Action received on TIBPROTECT™ — 6 months to respond, likelihood-of-confusion only."}],Xs=[{party:"Acme Logistics",type:"Payment dispute",exposure:"$48K",stage:"Demand letter sent",next:"Cure window closes Fri"},{party:"Former employee · J. Reyes",type:"Severance negotiation",exposure:"$22K",stage:"Counter-offer",next:"Response by Wed"}];function Ec(t){return t==="online"?{c:"bg-emerald-400",t:"AVAILABLE"}:{c:"bg-amber-400",t:"BY APPOINTMENT"}}function Lc(t){return t==="Open"?"border-amber-500/40 text-amber-300 bg-amber-500/10":t==="In Diligence"?"border-sky-500/40 text-sky-300 bg-sky-500/10":t==="Awaiting Counsel"?"border-violet-500/40 text-violet-300 bg-violet-500/10":"border-white/15 text-muted-foreground bg-black/30"}function _c(t){return t==="High"?"border-red-500/40 text-red-300 bg-red-500/10":t==="Med"?"border-amber-500/40 text-amber-300 bg-amber-500/10":"border-white/15 text-muted-foreground bg-black/30"}
16function Bc(){const[t,r]=x.useState("All"),s=Js.filter(i=>t==="All"||i.status===t),a=Js.filter(i=>i.status!=="Closed").length;return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Bt,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Counsel Bar · Open Line"}),e.jsxs("span",{className:"ml-2 px-2 py-0.5 text-[10px] tracking-[0.22em] uppercase rounded border border-emerald-500/40 text-emerald-300 bg-emerald-500/10",children:[a," OPEN MATTERS"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>v.info("Atlas is on the line. Describe the situation."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center gap-1.5",children:[e.jsx(rs,{className:"h-3 w-3"})," Ask Atlas"]}),e.jsxs("button",{onClick:()=>v.info("Routing your request — outside counsel will respond within 1 business day."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary inline-flex items-center gap-1.5",children:[e.jsx(_t,{className:"h-3 w-3"})," Engage Outside Counsel"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:_t,label:"Open Matters",value:String(a)}),e.jsx(T,{icon:re,label:"Active Disputes",value:String(Xs.length)}),e.jsx(T,{icon:ie,label:"Avg Response",value:"2.4h"}),e.jsx(T,{icon:Bt,label:"YTD Legal Spend",value:"$184K"})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(ue,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Your Counsel Roster"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:Fc.map((i,d)=>{const l=Ec(i.status);return e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3 flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[13px] font-display text-foreground/95",children:i.name}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:i.role})]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${l.c}`}),l.t]})]}),e.jsx("div",{className:"text-[11px] text-foreground/80 leading-snug",children:i.specialty}),e.jsxs("div",{className:"flex items-center justify-between pt-1 border-t border-white/5",children:[e.jsx("span",{className:"text-[10px] tabular-nums text-foreground/70",children:i.rate}),e.jsx("button",{onClick:()=>v.info(`${i.name} will reach out shortly.`),className:"px-2 py-1 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary",children:i.status==="online"?"Start Session":"Request Time"})]})]},d)})})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"xl:col-span-2 rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Active Matters"})]}),e.jsx("div",{className:"flex gap-1",children:["All","Open","In Diligence","Awaiting Counsel","Closed"].map(i=>e.jsx("button",{onClick:()=>r(i),className:`px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border transition ${t===i?"border-primary/60 bg-primary/10 text-primary":"border-white/10 text-muted-foreground hover:text-foreground
16/80"}`,children:i},i))})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Matter"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Type"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Counsel"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Status"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Priority"}),e.jsx("th",{className:"py-2 px-2 text-right font-normal",children:"Updated"})]})}),e.jsxs("tbody",{children:[s.map(i=>e.jsxs("tr",{className:"border-b border-white/5 hover:bg-primary/5",children:[e.jsxs("td",{className:"py-2 px-2",children:[e.jsx("div",{className:"text-[12px] text-foreground/95",children:i.title}),e.jsx("div",{className:"text-[10px] text-muted-foreground tabular-nums",children:i.id})]}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:i.type}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:i.counsel}),e.jsx("td",{className:"py-2 px-2",children:e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${Lc(i.status)}`,children:i.status})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${_c(i.priority)}`,children:i.priority})}),e.jsx("td",{className:"py-2 px-2 text-right text-[10px] text-muted-foreground",children:i.updated})]},i.id)),s.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"py-6 text-center text-muted-foreground italic",children:"No matters match this filter."})})]})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(rs,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Recent Advice"})]}),e.jsx("div",{className:"space-y-2",children:Oc.map((i,d)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-[10px] tracking-[0.22em] uppercase text-primary",children:i.from}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:i.at})]}),e.jsx("div",{className:"text-[11px] text-foreground/85 leading-snug",children:i.summary})]},d))}),e.jsx("button",{onClick:()=>v.info("Opening transcript archive…"),className:"w-full px-3 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary",children:"View Full Transcript Archive"})]})]}),e.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-amber-300 mb-3",children:[e.jsx(re,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase",children:"Active Disputes"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Xs.map((i,d)=>e.jsxs("div",{className:"rounded-md border border-amber-500/20 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"text-[12px] font-display text-foreground/95",children:i.party}),e.jsx("span",{className:"text-[10px] tabular-nums text-amber-300",children:i.exposure})]}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:i.type}),e.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-2 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:"Stage"}),e.jsx("div",{className:"text-foreground/85",children:i.stage})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:"Next"}),e.jsx("div",{className:"text-amber-300/90",children:i.next})]})]})]},d))})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-vault"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Your Contracts →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-drafting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Draft a Contract →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"compliance-center"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Compliance →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"risk-insurance"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Risk & Insurance →"})]})]})}const ct=[{id:"L-001",name:"DE Certificate of Good Standing",jurisdiction:"Delaware",authority:"Division of Corporations",status:"Active",expires:"Mar 1, 2027",daysOut:270,cost:"$50/yr"},{id:"L-002",name:"CA Foreign Qualification",jurisdiction:"California",authority:"Secretary of State",status:"Renewal Due",expires:"Aug 15, 2026",daysOut:73,cost:"$25/yr"},{id:"L-003",name:"NY Sales Tax Certificate",jurisdiction:"New York",authority:"Dept of Taxation",status:"Active",expires:"Jan 31, 2027",daysOut:242,cost:"$0"},{id:"L-004",name:"City of Austin · General Business License",jurisdiction:"Austin, TX",authority:"City Clerk",status:"Renewal Due",expires:"Jul 30, 2026",daysOut:57,cost:"$95/yr"},{id:"L-005",name:"EIN · Federal",jurisdiction:"Federal",authority:"IRS",status:"Active",expires:"—",daysOut:999,cost:"—"},{id:"L-006",name:"WA Reseller Permit",jurisdiction:"Washington",authority:"Dept of Revenue",status:"Pending",expires:"Filed Jun 1",daysOut:999,cost:"$0"},{id:"L-007",name:"MA Foreign Qualification",jurisdiction:"Massachusetts",authority:"Secretary of Commonwealth",status:"Expired",expires:"Apr 12, 2026",daysOut:-52,cost:"$520 + late"}
16,{id:"L-008",name:"SOC 2 Type II Attestation",jurisdiction:"Federal",authority:"AICPA · Schellman",status:"Active",expires:"Oct 5, 2026",daysOut:124,cost:"$28K/yr"}],Hc=[{name:"New State Foreign Qualification",desc:"Register to do business in a new state (sales nexus, hiring, office)."},{name:"Local Business License",desc:"City / county license required where you operate or hire."},{name:"Sales Tax Permit",desc:"Required wherever you cross economic nexus thresholds."},{name:"Specialty Permit",desc:"Reseller, alcohol, professional licensing, import/export."}];function Wc(t){return t==="Active"?"border-emerald-500/40 text-emerald-300 bg-emerald-500/10":t==="Renewal Due"?"border-amber-500/40 text-amber-300 bg-amber-500/10":t==="Pending"?"border-sky-500/40 text-sky-300 bg-sky-500/10":"border-red-500/40 text-red-300 bg-red-500/10"}function Vc(){const[t,r]=x.useState("All"),s=ct.filter(d=>t==="All"||d.status===t),a={active:ct.filter(d=>d.status==="Active").length,due:ct.filter(d=>d.status==="Renewal Due").length,pending:ct.filter(d=>d.status==="Pending").length,expired:ct.filter(d=>d.status==="Expired").length},i=[...ct].filter(d=>d.daysOut>0&&d.daysOut<365).sort((d,l)=>d.daysOut-l.daysOut).slice(0,5);return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ze,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Licenses & Permits Registry"}),a.expired>0&&e.jsxs("span",{className:"px-2 py-0.5 text-[10px] tracking-[0.22em] uppercase rounded border border-red-500/40 text-red-300 bg-red-500/10",children:[a.expired," EXPIRED"]})]}),e.jsxs("button",{onClick:()=>v.info("Wren will scout which licenses you need based on your operating footprint."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 inline-flex items-center gap-1.5",children:[e.jsx(De,{className:"h-3 w-3"})," Add New Permit"]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:st,label:"Active",value:String(a.active)}),e.jsx(T,{icon:ie,label:"Renewal Due",value:String(a.due)}),e.jsx(T,{icon:vr,label:"Pending",value:String(a.pending)}),e.jsx(T,{icon:re,label:"Expired",value:String(a.expired)})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"xl:col-span-2 rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"All Filings"})]}),e.jsx("div",{className:"flex gap-1",children:["All","Active","Renewal Due","Pending","Expired"].map(d=>e.jsx("button",{onClick:()=>r(d),className:`px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border transition ${t===d?"border-primary/60 bg-primary/10 text-primary":"border-white/10 text-muted-foreground hover:text-foreground/80"}`,children:d},d))})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"License"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Jurisdiction"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Status"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Expires"}),e.jsx("th",{className:"py-2 px-2 text-right font-normal",children:"Cost"})]})}),e.jsx("tbody",{children:s.map(d=>e.jsxs("tr",{className:"border-b border-white/5 hover:bg-primary/5",children:[e.jsxs("td",{className:"py-2 px-2",children:[e.jsx("div",{className:"text-[12px] text-foreground
16/95",children:d.name}),e.jsx("div",{className:"text-[10px] text-muted-foreground",children:d.authority})]}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:d.jurisdiction}),e.jsx("td",{className:"py-2 px-2",children:e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${Wc(d.status)}`,children:d.status})}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:d.expires}),e.jsx("td",{className:"py-2 px-2 text-right text-[11px] tabular-nums text-foreground/80",children:d.cost})]},d.id))})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(ie,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Renewal Calendar"})]}),e.jsx("div",{className:"space-y-2",children:i.map(d=>{const l=d.daysOut<=60?"border-amber-500/40 bg-amber-500/5":"border-white/10 bg-black/30";return e.jsxs("div",{className:`rounded-md border p-3 ${l}`,children:[e.jsx("div",{className:"text-[11px] text-foreground/95 leading-snug",children:d.name}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:d.expires}),e.jsxs("span",{className:`text-[10px] tabular-nums ${d.daysOut<=60?"text-amber-300":"text-foreground/70"}`,children:[d.daysOut,"d"]})]})]},d.id)})}),e.jsx("button",{onClick:()=>v.info("Synced renewals — Wren will nudge 60 / 30 / 7 days out."),className:"w-full px-3 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary",children:"Sync to Calendar"})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(X,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Start a New Filing"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-3",children:Hc.map((d,l)=>e.jsxs("button",{onClick:()=>v.info(`Wren is preparing the ${d.name} packet…`),className:"rounded-md border border-dashed border-primary/40 bg-primary/5 hover:bg-primary/10 transition p-3 text-left",children:[e.jsx("div",{className:"text-[12px] font-display text-primary",children:d.name}),e.jsx("div",{className:"mt-1 text-[11px] text-foreground/80 leading-snug",children:d.desc})]},l))})]})]})}const Rt=[{name:"SOC 2 Type II",subtitle:"Trust services criteria · annual",status:"Compliant",score:96,nextMilestone:"Next audit window: Oct 5"},{name:"GDPR",subtitle:"EU data subject rights",status:"Compliant",score:92,nextMilestone:"DPA refresh due Aug 12"},{name:"CCPA / CPRA",subtitle:"California consumer privacy",status:"In Progress",score:78,nextMilestone:"Cookie banner v2 in QA"},{name:"HIPAA",subtitle:"Healthcare data (BAA partners)",status:"Action Needed",score:54,nextMilestone:"Risk assessment overdue 11d"},{name:"PCI DSS",subtitle:"Card data · SAQ-A",status:"Compliant",score:100,nextMilestone:"SAQ-A re-attested"},{name:"ISO 27001",subtitle:"ISMS · planning phase",status:"In Progress",score:41,nextMilestone:"Stage 1 audit: Q1 2027"}],Zs=[{id:"CC-1.1",title:"Access control · MFA enforced",owner:"Aiden",status:"Pass",evidence:"Okta export · 30d"},{id:"CC-2.3",title:"Backups · daily verified",owner:"Aiden",status:"Pass",evidence:"Auto-attached"},{id:"CC-3.4",title:"Employee security training",owner:"Ember",status:"Due",evidence:"3 employees overdue"},{id:"CC-4.1",title:"Vendor risk review",owner:"Atlas",status:"Pass",evidence:"Q2 review on file"},{id:"CC-5.2",title:"Incident response tabletop",owner:"Aiden",status:"Due",evidence:"Last test: 9mo ago"},{id:"CC-6.1",title:"Data retention enforcement",owner:"Vega",status:"Pass",evidence:"Policy active"}],Gc=[{name:"Q2 access review attestation",from:"Aiden",at:"11:02a",status:"Awaiting signoff"},{name:"Vendor SOC 2 — Twilio FY26",from:"Atlas",at:"Yesterday",status:"Indexed"},{name:"Backup verification log (May)",from:"Aiden",at:"Mon",status:"Indexed"},{name:"Security training transcripts",from:"Ember",at:"Sun",status:"Partial · 3 missing"}],Uc=[{at:"11:42a",actor:"Aiden",event:"Auto-collected MFA enforcement evidence"},{at:"10:18a",actor:"Founder",event:"Approved Q2 access review"},{at:"Yesterday",actor:"Atlas",event:"Routed CCPA opt-out request CCPA-241"},{at:"Yesterday",actor:"Aiden",event:"Daily backup verification: pass"},{at:"Mon 4:01p",actor:"Vega",event:"Retention sweep: 1,204 records archived"}];function zc(t){return t==="Compliant"?"border-emerald-500/40 text-emerald-300 bg-emerald-500/10":t==="In Progress"?"border-sky-500/40 text-sky-300 bg-sky-500/10":"border-amber-500/40 text-amber-300 bg-amber-500/10"}function Yc(){const t=Rt.filter(a=>a.status==="Compliant").length,r=Zs.filter(a=>a.status==="Due").length,s=Math.round(Rt.reduce((a,i)=>a+i.score,0)/Rt.length);return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(yt,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Compliance Operations"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>v.info("Auditor pack generated — encrypted ZIP queued for download."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3 w-3"})," Export Auditor Pack"]}),e.jsxs("button",{onClick:()=>v.info("Aiden is running a fresh control sweep across all frameworks."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary inline-flex items-center gap-1.5",children:[e.jsx(Ut,{className:"h-3 w-3"})," Run Control Sweep"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:yt,label:"Frameworks",value:`${t}/${Rt.length}`}),e.jsx(T,{icon:cs,label:"Avg Score",value:`${s}%`}),e.jsx(T,{icon:re,label:"Open Controls",value:String(r)}),e.jsx(T,{icon:ie,label:"Last Sweep",value:"6m ago"})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx($a,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Frameworks"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:Rt.map((a,i)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[13px] font-display text-foreground
16/95",children:a.name}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:a.subtitle})]}),e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${zc(a.status)}`,children:a.status})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px] mb-1",children:[e.jsx("span",{className:"tracking-[0.18em] uppercase text-muted-foreground",children:"Coverage"}),e.jsxs("span",{className:"tabular-nums text-foreground/80",children:[a.score,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-white/5 overflow-hidden",children:e.jsx("div",{className:`h-full ${a.score>=90?"bg-emerald-400/70":a.score>=70?"bg-sky-400/70":"bg-amber-400/70"}`,style:{width:`${a.score}%`}})})]}),e.jsx("div",{className:"text-[11px] text-foreground/80 leading-snug",children:a.nextMilestone})]},i))})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"xl:col-span-2 rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(st,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Continuous Controls"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Control"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Owner"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Status"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Evidence"})]})}),e.jsx("tbody",{children:Zs.map(a=>e.jsxs("tr",{className:"border-b border-white/5 hover:bg-primary/5",children:[e.jsxs("td",{className:"py-2 px-2",children:[e.jsx("div",{className:"text-[12px] text-foreground/95",children:a.title}),e.jsx("div",{className:"text-[10px] text-muted-foreground tabular-nums",children:a.id})]}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:a.owner}),e.jsx("td",{className:"py-2 px-2",children:e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${a.status==="Pass"?"border-emerald-500/40 text-emerald-300 bg-emerald-500/10":"border-amber-500/40 text-amber-300 bg-amber-500/10"}`,children:a.status})}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:a.evidence})]},a.id))})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(jt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Evidence Inbox"})]}),e.jsx("div",{className:"space-y-2",children:Gc.map((a,i)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-[11px] text-foreground/95 leading-snug",children:a.name}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:a.at})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:a.from}),e.jsx("span",{className:`text-[10px] ${a.status==="Indexed"?"text-emerald-300":"text-amber-300"}`,children:a.status})]})]},i))})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Audit Log"})]}),e.jsx("div",{className:"space-y-1.5",children:Uc.map((a,i)=>e.jsxs("div",{className:"flex items-start gap-3 py-1.5 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground w-24 shrink-0",children:a.at}),e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-primary w-16 shrink-0",children:a.actor}
16),e.jsx("span",{className:"text-[11px] text-foreground/85",children:a.event})]},i))})]})]})}const Yr=[{id:"R-01",title:"Customer concentration · top 3 = 48% revenue",category:"Commercial",likelihood:3,impact:5,owner:"Founder",mitigation:"Diversification plan in motion"},{id:"R-02",title:"Data breach via third-party vendor",category:"Cyber",likelihood:2,impact:5,owner:"Aiden",mitigation:"Cyber policy + vendor MFA"},{id:"R-03",title:"Key engineer departure",category:"People",likelihood:3,impact:4,owner:"Ember",mitigation:"Knowledge transfer + key person ins."},{id:"R-04",title:"Wrongful termination claim",category:"Employment",likelihood:2,impact:3,owner:"Atlas",mitigation:"EPLI policy active"},{id:"R-05",title:"Product liability / SaaS outage",category:"Product",likelihood:2,impact:4,owner:"Aiden",mitigation:"E&O policy + uptime SLA"},{id:"R-06",title:"Regulatory change · state privacy",category:"Regulatory",likelihood:4,impact:3,owner:"Atlas",mitigation:"Tracking 11 states quarterly"},{id:"R-07",title:"Office property damage",category:"Property",likelihood:1,impact:3,owner:"Wren",mitigation:"BOP policy"},{id:"R-08",title:"FX exposure · EUR receivables",category:"Financial",likelihood:3,impact:2,owner:"Moneta",mitigation:"Quarterly hedge review"}],ir=[{name:"General Liability",carrier:"Hiscox",coverage:"$2M / $4M agg",premium:"$2,400/yr",renews:"Sep 1, 2026",status:"Active"},{name:"Errors & Omissions",carrier:"Chubb",coverage:"$3M",premium:"$8,100/yr",renews:"Sep 1, 2026",status:"Active"},{name:"Cyber Liability",carrier:"Coalition",coverage:"$2M",premium:"$6,800/yr",renews:"Oct 12, 2026",status:"Active"},{name:"EPLI",carrier:"Travelers",coverage:"$1M",premium:"$3,200/yr",renews:"Nov 3, 2026",status:"Active"},{name:"Directors & Officers",carrier:"AIG",coverage:"$5M",premium:"$11,500/yr",renews:"Jan 15, 2027",status:"Quote Pending"},{name:"Workers' Comp",carrier:"The Hartford",coverage:"Statutory",premium:"$4,900/yr",renews:"Auto",status:"Active"}],qc=[{date:"May 18, 2026",title:"Phishing attempt · finance inbox",severity:"Low",outcome:"Blocked · MFA held"},{date:"Mar 02, 2026",title:"Vendor outage · payments 4h",severity:"Med",outcome:"Service credit · no claim"},{date:"Jan 24, 2026",title:"Employment dispute · resolved at mediation",severity:"Med",outcome:"Settled · within retention"}];function ea(t){return t>=16?"bg-red-500/30 border-red-500/50 text-red-100":t>=10?"bg-amber-500/25 border-amber-500/40 text-amber-100":t>=5?"bg-sky-500/20 border-sky-500/35 text-sky-100":"bg-emerald-500/15 border-emerald-500/30 text-emerald-100"}function Kc(){const t=ir.reduce((a,i)=>a+parseInt(i.premium.replace(/[^0-9]/g,""),10),0),r=ir.reduce((a,i)=>{const d=i.coverage.match(/\$(\d+)M/);return d?a+parseInt(d[1],10):a},0),s=Yr.filter(a=>a.likelihood*a.impact>=12).length;return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ta,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Risk Register & Coverage"}),s>0&&e.jsxs("span",{className:"px-2 py-0.5 text-[10px] tracking-[0.22em] uppercase rounded border border-red-500/40 text-red-300 bg-red-500/10",children:[s," HIGH-SEVERITY"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>v.info("Atlas + Moneta will draft a refreshed risk register for board review."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 inline-flex items-center gap-1.5",children:[e.jsx(J,{className:"h-3 w-3"})," Generate Board Brief"]}),e.jsxs("button",{onClick:()=>v.info("Routing to broker — comparable quotes back in 3–5 days."),className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary inline-flex items-center gap-1.5",children:[e.jsx(_t,{className:"h-3 w-3"})," Request Quote"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:yt,label:"Active Policies",value:String(ir.filter(a=>a.status==="Active").length)}),e.jsx(T,{icon:Bt,label:"Total Coverage",value:`$${r}M`}),e.jsx(T,{icon:tt,label:"Annual Premium",value:`$${(t/1e3).toFixed(1)}K`}),e.jsx(T,{icon:re,label:"High Risks",value:String(s)})]}
16),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-5 gap-4",children:[e.jsxs("div",{className:"xl:col-span-2 rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(cs,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Likelihood × Impact"})]}),e.jsxs("div",{className:"grid grid-cols-[auto_repeat(5,1fr)] gap-1 text-[10px]",children:[e.jsx("div",{}),[1,2,3,4,5].map(a=>e.jsxs("div",{className:"text-center text-muted-foreground tracking-[0.18em]",children:["I",a]},a)),[5,4,3,2,1].map(a=>e.jsxs(x.Fragment,{children:[e.jsxs("div",{className:"text-muted-foreground tracking-[0.18em] pr-1",children:["L",a]}),[1,2,3,4,5].map(i=>{const d=a*i,l=Yr.filter(n=>n.likelihood===a&&n.impact===i);return e.jsx("div",{title:l.map(n=>n.title).join(", "),className:`aspect-square rounded border grid place-items-center font-display tabular-nums ${ea(d)}`,children:l.length>0?l.length:""},`${a}-${i}`)})]},a))]}),e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"h-2 w-2 rounded bg-emerald-500/60"})," Low"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"h-2 w-2 rounded bg-sky-500/60"})," Mod"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"h-2 w-2 rounded bg-amber-500/60"})," High"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"h-2 w-2 rounded bg-red-500/60"})," Critical"]})]})]}),e.jsxs("div",{className:"xl:col-span-3 rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(re,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Risk Register"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Risk"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Cat"}),e.jsx("th",{className:"py-2 px-2 text-center font-normal",children:"L×I"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Owner"}),e.jsx("th",{className:"py-2 px-2 text-left font-normal",children:"Mitigation"})]})}),e.jsx("tbody",{children:Yr.map(a=>{const i=a.likelihood*a.impact;return e.jsxs("tr",{className:"border-b border-white/5 hover:bg-primary/5",children:[e.jsx("td",{className:"py-2 px-2 text-[12px] text-foreground/95",children:a.title}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:a.category}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("span",{className:`inline-block px-1.5 py-0.5 text-[10px] tabular-nums rounded border ${ea(i)}`,children:i})}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:a.owner}),e.jsx("td",{className:"py-2 px-2 text-[11px] text-foreground/80",children:a.mitigation})]},a.id)})})]})})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(yt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Insurance Portfolio"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:ir.map((a,i)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[13px] font-display text-foreground/95",children:a.name}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:a.carrier})]}),e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${a.status==="Active"?"border-emerald-500/40 text-emerald-300 bg-emerald-500/10":"border-sky-500/40 text-sky-300 bg-sky-500/10"}`,children:a.status})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:"Coverage"}
16),e.jsx("div",{className:"text-foreground/85 tabular-nums",children:a.coverage})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:"Premium"}),e.jsx("div",{className:"text-foreground/85 tabular-nums",children:a.premium})]})]}),e.jsxs("div",{className:"text-[10px] text-muted-foreground",children:["Renews ",a.renews]})]},i))})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(ie,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Incident & Claim Log"})]}),e.jsx("div",{className:"space-y-2",children:qc.map((a,i)=>e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-white/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[12px] text-foreground/95 truncate",children:a.title}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:a.date})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${a.severity==="Low"?"border-emerald-500/40 text-emerald-300 bg-emerald-500/10":"border-amber-500/40 text-amber-300 bg-amber-500/10"}`,children:a.severity}),e.jsx("div",{className:"text-[10px] text-foreground/75 mt-1",children:a.outcome})]})]},i))})]})]})}function Qc(){const t=Mt.reduce((i,d)=>(i[d.stage]=(i[d.stage]??0)+1,i),{New:0,"Resume Reviewed":0,Interviewed:0,"Offer Accepted":0,"Offer Rejected":0,Hired:0}),r=Mt.filter(i=>i.stage!=="Hired"&&i.stage!=="Offer Rejected").length,s=t["Offer Accepted"],a=Mt.filter(i=>i.stage==="Hired").length;return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"In Pipeline"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:r}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Active candidates moving through stages"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Offers Accepted"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:s}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Awaiting start date"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Recent Hires"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:a}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Closed in last 90 days"})]}),e.jsxs("div",{className:"rounded-lg glass border border-primary/25 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Avg Time-to-Hire"}),e.jsx("div",{className:"font-display text-2xl text-primary glow-text mt-1",children:"28 d"}),e.jsx("div",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Resume reviewed → offer accepted"})]})]}),e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Pipeline by Stage"}),e.jsxs("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70",children:[Mt.length," total candidates"]})]}),e.jsx("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2",children:Object.keys(t).map(i=>e.jsxs("div",{className:`rounded-md border px-3 py-2 ${Qs[i]}`,children:[e.jsx("div",{className:"text-[9px] tracking-[0.22em] uppercase opacity-80",children:i}),e.jsx("div",{className:"font-display text-xl mt-0.5",children:t[i]})]},i))})]}),e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-primary/20",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Candidate Pipeline"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground
16/70",children:"Sourced by AI · mock data"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground border-b border-primary/15",children:[e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Candidate"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Role"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Stage"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Hire Date"}),e.jsx("th",{className:"text-left font-normal px-5 py-2.5",children:"Next Action"})]})}),e.jsx("tbody",{children:Mt.map(i=>{const d=i.stage==="New"?"Review resume":i.stage==="Resume Reviewed"?"Schedule intro call":i.stage==="Interviewed"?"Decide: offer or pass":i.stage==="Offer Accepted"?"Send onboarding kit":i.stage==="Offer Rejected"?"Log feedback · close req":"Begin onboarding";return e.jsxs("tr",{className:"border-b border-primary/10 last:border-0 hover:bg-primary/5 transition",children:[e.jsx("td",{className:"px-5 py-3 text-foreground/90 font-medium",children:i.name}),e.jsx("td",{className:"px-5 py-3 text-foreground/80",children:i.role}),e.jsx("td",{className:"px-5 py-3",children:e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full border text-[10px] tracking-[0.18em] uppercase ${Qs[i.stage]}`,children:i.stage})}),e.jsx("td",{className:"px-5 py-3 text-foreground/70",children:i.hireDate??e.jsx("span",{className:"text-muted-foreground/50",children:"—"})}),e.jsx("td",{className:"px-5 py-3 text-foreground/70 text-xs",children:d})]},i.name)})})]})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Sourcing Channels"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70 mt-1",children:"Where this pipeline came from"}),e.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-foreground/80",children:[e.jsxs("li",{className:"flex justify-between border-b border-primary/10 pb-2",children:[e.jsx("span",{children:"AI-matched (TIB Talent Net)"}),e.jsx("span",{className:"text-muted-foreground",children:"42%"})]}),e.jsxs("li",{className:"flex justify-between border-b border-primary/10 pb-2",children:[e.jsx("span",{children:"Referrals"}),e.jsx("span",{className:"text-muted-foreground",children:"28%"})]}),e.jsxs("li",{className:"flex justify-between border-b border-primary/10 pb-2",children:[e.jsx("span",{children:"Inbound applications"}),e.jsx("span",{className:"text-muted-foreground",children:"18%"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Outbound sourcing"}),e.jsx("span",{className:"text-muted-foreground",children:"12%"})]})]})]}),e.jsxs("div",{className:"rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Hiring Tips"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/70 mt-1",children:"From your AI recruiting advisor"}),e.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-foreground/80 leading-relaxed",children:[e.jsx("li",{children:'• Candidates sitting in "Interviewed" for 7+ days are 60% more likely to take a competing offer — move fast.'}),e.jsxs("li",{children:["• Always run a DISC or HIGH5 read before the final round (see ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"2",roomId:"assessments"},className:"text-primary underline-offset-4 hover:underline",children:"Team Assessments"}),")."]}),e.jsxs("li",{children:["• Once hired, candidates flow into ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"2",roomId:"consultants"},className:"text-primary underline-offset-4 hover:underline",children:"Staffing"})," as Active Headcount."]})]})]})]})]})}function Jc(){const t=[{icon:X,badge:"Signature · 36 Points",title:"36pt Idea Evaluation",subtitle:"Rapid venture viability scan",description:"A 36-point diagnostic that pressure-tests a raw idea across market, model, moat, and momentum. Designed for founders who need a fast, defensible verdict before committing capital or calendar.",bullets:["Market signal & timing","Problem-solution fit","Monetization & unit economics","Founder-market alignment"],cta:"Launch 36pt Eval",url:"https://www.freedomforgeai.com/36-point-idea-eval"},{icon:Sa,badge:"Premium · 200 Points",title:"200pt Deep Dive Evaluation",subtitle:"Investor-grade venture audit",description:"A 200-point forensic evaluation covering market architecture, competitive topology, financial modeling, operational readiness, team composition, and risk surface — packaged as a board-ready dossier.",bullets:["TAM/SAM/SOM modeling","Competitive moat analysis","5-year financial scenarios","Operational & risk map"],cta:"Launch Deep Dive",url:"https://freedomforgeai.com/copy-of-200-point-idea-evaluation#deep-dive-form--section-1"}];return e.jsxs("div",{className:"mt-6 flex flex-col gap-5 max-w-3xl",children:[t.map(r=>{const s=r.icon;return e.jsxs("div",{className:"relative overflow-hidden rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"absolute -top-16 -right-16 h-56 w-56 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start gap-4 relative",children:[e.jsx("div",{className:"h-12 w-12 rounded-lg glass border border-primary/30 grid place-items-center text-primary glow-edge shrink-0",children:e.jsx(s,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:r.badge}),e.jsx("h3",{className:"font-display text-xl mt-1 glow-text",children:r.title}),e.jsx("div",{className:"text-xs text-muted-foreground tracking-[0.18em] uppercase mt-0.5",children:r.subtitle}
16),e.jsx("p",{className:"text-sm text-foreground/80 mt-3 leading-relaxed",children:r.description}),e.jsx("ul",{className:"mt-4 grid grid-cols-2 gap-x-3 gap-y-1.5",children:r.bullets.map(a=>e.jsxs("li",{className:"text-[11px] text-foreground/75 flex items-center gap-2",children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-primary glow-edge"}),a]},a))}),e.jsxs("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"mt-5 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground text-[11px] tracking-[0.22em] uppercase hover:opacity-90 transition",children:[r.cta," ",e.jsx(V,{className:"h-3.5 w-3.5"})]})]})]})]},r.title)}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"absolute -top-16 -right-16 h-56 w-56 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start gap-4 relative",children:[e.jsx("div",{className:"h-12 w-12 rounded-lg glass border border-primary/30 grid place-items-center text-primary glow-edge shrink-0",children:e.jsx(An,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"On-Demand · AI Expert Team"}),e.jsx("h3",{className:"font-display text-xl mt-1 glow-text",children:"Business Challenges"}),e.jsx("div",{className:"text-xs text-muted-foreground tracking-[0.18em] uppercase mt-0.5",children:"Bring us your hardest problem"}),e.jsx("p",{className:"text-sm text-foreground/80 mt-3 leading-relaxed",children:"Stuck on something specific? Bring any business problem — pricing, hiring, ops, growth — and our AI expert team will help you think it through."}),e.jsx("ul",{className:"mt-4 grid grid-cols-2 gap-x-3 gap-y-1.5",children:["Any topic, any stage","Matched to the right expert","Actionable next steps","Confidential by default"].map(r=>e.jsxs("li",{className:"text-[11px] text-foreground/75 flex items-center gap-2",children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-primary glow-edge"}),r]},r))}),e.jsxs("button",{type:"button",onClick:()=>v.success("Got it — our AI expert team will reach out.",{description:"We'll match your challenge to the right specialist and follow up shortly."}),className:"mt-5 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground text-[11px] tracking-[0.22em] uppercase hover:opacity-90 transition",children:["Get Help From Our AI Experts ",e.jsx(V,{className:"h-3.5 w-3.5"})]})]})]})]})]})}function Xc(){const r=[{title:"Employee Onboarding",description:"Day-1 to Day-30 checklist for new hires."},{title:"Monthly Financial Close",description:"Reconcile, review, report — every month."},{title:"Customer Support Triage",description:"Intake, prioritize, route, resolve."},{title:"Incident Response",description:"Detect, contain, communicate, postmortem."},{title:"Content Publishing",description:"Draft → review → schedule → distribute."},{title:"Vendor Onboarding",description:"Due diligence, contracts, access provisioning."}],s=[{title:"New Agent Onboarding",owner:"Wren",updatedMonthsAgo:1},{title:"Weekly Mission Review",owner:"Atlas",updatedMonthsAgo:3},{title:"Quarterly Compliance Sweep",owner:"Vesper",updatedMonthsAgo:8},{title:"Investor Update Cadence",owner:"Moneta",updatedMonthsAgo:11}];return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx(Zc,{}),e.jsxs("div",{className:"pt-2 border-t border-primary/15",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground mt-4",children:"Operating Playbooks & SOPs"}),e.jsx("div",{className:"text-[11px] text-muted-foreground/80 mt-1",children:"How repeatable work gets done. Separate from your employee handbook above."})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"absolute -top-16 -right-16 h-56 w-56 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start gap-4 relative",children:[e.jsx("div",{className:"h-12 w-12 rounded-lg glass border border-primary/30 grid place-items-center text-primary glow-edge shrink-0",children:e.jsx(J,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"SOP Generator"}),e.jsx("h3",{className:"font-display text-xl mt-1 glow-text",children:"Turn how y
16ou work into a repeatable playbook"}),e.jsx("p",{className:"text-sm text-foreground/80 mt-2 leading-relaxed",children:"Draft a Standard Operating Procedure from scratch or start from a template. Save it here so your team and agents can run it."}),e.jsxs(j,{to:"/tools/sop",className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground text-[11px] tracking-[0.22em] uppercase hover:opacity-90 transition",children:[e.jsx(De,{className:"h-3.5 w-3.5"})," Create New SOP"]})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Starter Templates"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/60",children:"Coming soon"})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3",children:r.map(a=>e.jsx("button",{type:"button",className:"text-left rounded-lg glass border border-primary/20 p-4 hover:glow-edge hover:border-primary/40 transition group",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-foreground/90 group-hover:text-primary transition",children:a.title}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 leading-snug",children:a.description})]})]})},a.title))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Your Saved Playbooks"}),e.jsxs("div",{className:"text-[10px] tracking-[0.2em] uppercase text-amber-400/80 inline-flex items-center gap-1.5",children:[e.jsx(re,{className:"h-3 w-3"})," Review after ",6," months"]})]}),e.jsx("div",{className:"rounded-lg glass border border-primary/20 divide-y divide-primary/10",children:s.map(a=>{const i=a.updatedMonthsAgo>=6;return e.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(J,{className:"h-4 w-4 text-primary shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm text-foreground/90 truncate",children:a.title}),e.jsxs("div",{className:"text-[11px] text-muted-foreground inline-flex items-center gap-2",children:[e.jsxs("span",{children:["Owner · ",a.owner]}),e.jsx("span",{className:"opacity-50",children:"•"}),e.jsx(ie,{className:"h-3 w-3"}),e.jsxs("span",{children:["Updated ",a.updatedMonthsAgo," mo ago"]})]})]})]}),i?e.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-amber-500/15 border border-amber-500/40 text-amber-300 text-[10px] tracking-[0.18em] uppercase",children:[e.jsx(re,{className:"h-3 w-3"})," Needs Review"]}):e.jsx("span",{className:"shrink-0 inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-emerald-500/10 border border-emerald-500/30 text-emerald-300 text-[10px] tracking-[0.18em] uppercase",children:"Current"})]},a.title)})}),e.jsx("div",{className:"mt-2 text-[10px] tracking-[0.2em] uppercase text-muted-foreground/60",children:"Demo data · Saving real SOPs comes online soon"})]})]})}function Zc(){const t=[{title:"Welcome & Company Overview",description:"Mission, values, who we are."},{title:"Code of Conduct",description:"How we treat each other and customers."},{title:"Time Off & PTO",description:"Vacation, sick, holidays, leave."},{title:"Benefits & Perks",description:"Health, retirement, stipends."},{title:"Pay, Hours & Overtime",description:"Schedules, classifications, pay cycles."},{title:"Remote / Hybrid Policy",description:"Where and how we work."},{title:"Harassment & Anti-Discrimination",description:"Zero-tolerance commitments and reporting."},{title:"Health & Safety",description:"Workplace safety and emergency procedures."},{title:"IT & Acceptable Use",description:"Devices, accounts, data, and security basics."},{title:"Confidentiality & IP",description:"What stays in-house and who owns the work."},{title:"Performance & Reviews",description:"Feedback cadence, growth, promotions."},{title:"Offboarding",description:"Returns, knowledge transfer, final pay."}],r=s=>v("Coming soon",{description:`${s} — we'll generate a starter from your company profile.`});return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-xl glass-strong corner-bracket p-5",children:[e.jsx("div",{className:"absolute -top-16 -right-16 h-56 w-56 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start gap-4 relative",children:[e.jsx("div",{className:"h-12 w-12 rounded-lg glass border border-primary/30 grid place-items-center text-primary glow-edge shrink-0",children:e.jsx(Re,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Employee Handbook"}),e.jsx("h3",{className:"font-display text-xl mt-1 glow-text",children:"Your team's source of truth for policies & expectations"}
16),e.jsx("p",{className:"text-sm text-foreground/80 mt-2 leading-relaxed",children:"Build, store, and share your company handbook — PTO, conduct, benefits, IT, and more. Pulled together from your company profile in minutes."}),e.jsxs("button",{type:"button",onClick:()=>r("Generate Employee Handbook"),className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground text-[11px] tracking-[0.22em] uppercase hover:opacity-90 transition",children:[e.jsx(De,{className:"h-3.5 w-3.5"})," Create Handbook"]})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Starter Chapters"}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/60",children:"Coming soon"})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3",children:t.map(s=>e.jsx("button",{type:"button",onClick:()=>r(s.title),className:"text-left rounded-lg glass border border-primary/20 p-4 hover:glow-edge hover:border-primary/40 transition group",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Re,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-foreground/90 group-hover:text-primary transition",children:s.title}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 leading-snug",children:s.description})]})]})},s.title))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center justify-between mb-3",children:e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Your Saved Handbook"})}),e.jsxs("div",{className:"rounded-lg glass border border-primary/20 px-4 py-6 text-center",children:[e.jsx("div",{className:"text-sm text-foreground/80",children:"No handbook saved yet"}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:"Create one above and it will live here for your team to read and edit."})]})]})]})}const be=[{id:"C-001",title:"MSA — Northwind Logistics",party:"Northwind Logistics",category:"Customer",status:"Active",value:"$240,000/yr",effective:"2025-03-01",expires:"2026-03-01",owner:"Atlas",risk:"low"},{id:"C-002",title:"SaaS Subscription — Acme Cloud",party:"Acme Cloud Inc.",category:"Vendor",status:"Active",value:"$48,000/yr",effective:"2025-01-15",expires:"2026-01-15",owner:"Wren",risk:"low"},{id:"C-003",title:"NDA — Helios Partners",party:"Helios Partners",category:"NDA",status:"Active",value:"—",effective:"2025-08-10",expires:"2027-08-10",owner:"Atlas"},{id:"C-004",title:"Employment Agreement — M. Rivera",party:"Maya Rivera",category:"Employment",status:"Active",value:"$135,000/yr",effective:"2026-01-06",expires:"—",owner:"Vega"},{id:"C-005",title:"Reseller Agreement — BlueDrift",party:"BlueDrift APAC",category:"Partnership",status:"Under Review",value:"$420,000 GMV",effective:"—",expires:"—",owner:"Atlas",risk:"med"},{id:"C-006",title:"Office Lease — Suite 1200",party:"Hudson Realty",category:"Real Estate",status:"Active",value:"$11,200/mo",effective:"2024-09-01",expires:"2027-08-31",owner:"Vega",risk:"low"},{id:"C-007",title:"Trademark License — Forge Mark",party:"Forge IP Holdings",category:"IP",status:"Active",value:"$25,000/yr",effective:"2025-05-01",expires:"2028-05-01",owner:"Wren"},{id:"C-008",title:"MSA — Pinecrest Health",party:"Pinecrest Health Group",category:"Customer",status:"Draft",value:"$180,000/yr",effective:"—",expires:"—",owner:"Atlas",risk:"med"},{id:"C-009",title:"DPA — Acme Cloud",party:"Acme Cloud Inc.",category:"Vendor",status:"Active",value:"—",effective:"2025-01-15",expires:"2026-01-15",owner:"Wren"},{id:"C-010",title:"Mutual NDA — Quanta AI",party:"Quanta AI",category:"NDA",status:"Considering",value:"—",effective:"—",expires:"—",owner:"Atlas"},{id:"C-011",title:"Contractor — J. Park",party:"Jordan Park",category:"Employment",status:"Active",value:"$95/hr",effective:"2025-11-01",expires:"2026-05-01",owner:"Vega"},{id:"C-012",title:"Co-marketing — Lumen Labs",party:"Lumen Labs",category:"Partnership",status:"Under Review",value:"—",effective:"—",expires:"—",owner:"Atlas",risk:"high"},{id:"C-013",title:"Patent Assignment — US 11,234,567",party:"Inventor: S. Cho",category:"IP",status:"Active",value:"—",effective:"2024-12-01",expires:"—",owner:"Wren"},{id:"C-014",title:"Warehouse Sublease — Bay 4",party:"Hudson Realty",category:"Real Estate",status:"Expired",value:"$4,800/mo",effective:"2023-06-01",expires:"2025-05-31",owner:"Vega"},{id:"C-015",title:"Order Form — Stripe Atlas",party:"Stripe Inc.",category:"Vendor",status:"Active",value:"$1,200/yr",effective:"2025-02-12",expires:"2026-02-12",owner:"Wren"},{id:"C-016",title:"MSA — Cascade Foods",party:"Cascade Foods Co.",category:"Customer",status:"Active",value:"$310,000/yr",effective:"2024-11-15",expires:"2025-12-31",owner:"Atlas",risk:"med"},{id:"C-017",title:"Influencer Agreement — @forge.daily",party:"Mara Singh",category:"Partnership",status:"Draft",value:"$8,000",effective:"—",expires:"—",owner:"Atlas"},{id:"C-018",title:"Severance Agreement — D. Lee",party:"Daniel Lee",category:"Employment",status:"Archived",value:"$22,000",effective:"2025-04-01",expires:"—",owner:"Vega"}
16,{id:"C-019",title:"NDA — Orion Capital",party:"Orion Capital Partners",category:"NDA",status:"Active",value:"—",effective:"2025-09-22",expires:"2027-09-22",owner:"Atlas"},{id:"C-020",title:"Reseller — Meridian Group",party:"Meridian Group",category:"Partnership",status:"Considering",value:"$600,000 GMV",effective:"—",expires:"—",owner:"Atlas",risk:"high"},{id:"C-021",title:"Copyright Assignment — Brand Kit v3",party:"Studio Halcyon",category:"IP",status:"Active",value:"$12,500",effective:"2025-07-01",expires:"—",owner:"Wren"},{id:"C-022",title:"MSA — Vertex Manufacturing",party:"Vertex Manufacturing",category:"Customer",status:"Under Review",value:"$520,000/yr",effective:"—",expires:"—",owner:"Atlas",risk:"med"},{id:"C-023",title:"Software License — Figma Enterprise",party:"Figma Inc.",category:"Vendor",status:"Active",value:"$18,400/yr",effective:"2025-06-01",expires:"2026-06-01",owner:"Wren"},{id:"C-024",title:"MSA — Harborline Shipping",party:"Harborline Shipping",category:"Customer",status:"Expired",value:"$140,000/yr",effective:"2023-10-01",expires:"2025-09-30",owner:"Atlas"}],em=["Active","Draft","Under Review","Considering","Expired","Archived"],tm=["Customer","Vendor","Employment","NDA","Partnership","IP","Real Estate"],sn=[{id:"atlas",name:"Atlas",role:"Drafting & Negotiation"},{id:"vega",name:"Vega",role:"Review & Redlines"},{id:"wren",name:"Wren",role:"Compliance & Renewals"}];function ta(t){switch(t){case"Active":return"bg-emerald-500/10 border-emerald-500/40 text-emerald-300";case"Draft":return"bg-sky-500/10 border-sky-500/40 text-sky-300";
16case"Under Review":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Considering":return"bg-fuchsia-500/10 border-fuchsia-500/40 text-fuchsia-300";case"Expired":return"bg-rose-500/10 border-rose-500/40 text-rose-300";case"Archived":return"bg-white/5 border-white/15 text-muted-foreground"}}function an(t){if(!t||t==="—")return null;const r=new Date(t).getTime();return Number.isNaN(r)?null:Math.round((r-Date.now())/864e5)}function rm(){const t=be.length,r=be.filter(i=>i.status==="Active").length,s=be.filter(i=>{const d=an(i.expires);return d!==null&&d>=0&&d<=90&&i.status==="Active"}).length,a=be.filter(i=>i.status==="Draft"||i.status==="Under Review").length;return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Counsel Bar"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:sn.map(i=>e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/20",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:i.name[0]}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[11px] text-foreground/90",children:i.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:i.role})]})]},i.id))})]}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"legal-counsel"},className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Ask Counsel"})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:J,label:"Total Contracts",value:String(t)}),e.jsx(T,{icon:ze,label:"Active",value:String(r)}),e.jsx(T,{icon:ie,label:"Expiring ≤90d",value:String(s)}),e.jsx(T,{icon:re,label:"Awaiting Sig",value:String(a)})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("button",{className:"rounded-lg border border-dashed border-primary/40 bg-primary/5 hover:bg-primary/10 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(De,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Upload Existing"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Drop PDF or DOCX — we'll OCR, tag, and file it."}),e.jsx("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:"Drag-drop · or click to browse"})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-drafting"},className:"rounded-lg border border-primary/40 bg-gradient-to-br from-primary/10 to-transparent hover:from-primary/20 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(X,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Draft New"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Atlas drafts from your clause library and templates."}),e.jsxs("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground inline-flex items-center gap-1",children:["Open Drafting Studio ",e.jsx(V,{className:"h-3 w-3"})]})]})]})]})}
16function sm(){const[t,r]=x.useState(null),[s,a]=x.useState(null),[i,d]=x.useState(""),[l,n]=x.useState(be[0].id),o=em.map(p=>({s:p,n:be.filter(y=>y.status===p).length})),c=tm.map(p=>({c:p,n:be.filter(y=>y.category===p).length})),u=be.filter(p=>{if(t&&p.status!==t||s&&p.category!==s)return!1;if(i){const y=i.toLowerCase();if(!p.title.toLowerCase().includes(y)&&!p.party.toLowerCase().includes(y))return!1}return!0}),m=be.find(p=>p.id===l)??u[0]??be[0],g=be.length;return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[200px_1fr_280px] gap-3 min-h-[520px]",children:[e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-3 space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground mb-2",children:"Status"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("button",{onClick:()=>r(null),className:`w-full flex justify-between items-center px-2 py-1 rounded text-[11px] ${t===null?"bg-primary/15 text-primary":"text-foreground/75 hover:bg-white/5"}`,children:[e.jsx("span",{children:"All"}),e.jsx("span",{className:"tabular-nums text-muted-foreground",children:g})]}),o.map(({s:p,n:y})=>e.jsxs("button",{onClick:()=>r(t===p?null:p),className:`w-full flex justify-between items-center px-2 py-1 rounded text-[11px] ${t===p?"bg-primary/15 text-primary":"text-foreground/75 hover:bg-white/5"}`,children:[e.jsx("span",{children:p}),e.jsx("span",{className:"tabular-nums text-muted-foreground",children:y})]},p))]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground mb-2",children:"Category"}),e.jsx("div",{className:"space-y-1",children:c.map(({c:p,n:y})=>e.jsxs("button",{onClick:()=>a(s===p?null:p),className:`w-full flex justify-between items-center px-2 py-1 rounded text-[11px] ${s===p?"bg-primary/15 text-primary":"text-foreground/75 hover:bg-white/5"}`,children:[e.jsx("span",{children:p}),e.jsx("span",{className:"tabular-nums text-muted-foreground",children:y})]},p))})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 flex flex-col",children:[e.jsxs("div",{className:"p-3 border-b border-white/5 flex flex-wrap items-center gap-2 justify-between",children:[e.jsx("input",{value:i,onChange:p=>d(p.target.value),placeholder:"Search contracts, parties…",className:"flex-1 min-w-[160px] bg-black/40 border border-white/10 rounded px-3 py-1.5 text-xs text-foreground/90 placeholder:text-muted-foreground/60 focus:outline-none focus:border-primary/50"}),e.jsxs("div",{className:"text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[u.length," of ",g]})]}),e.jsx("div",{className:"flex-1 overflow-auto max-h-[440px]",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground sticky top-0 bg-black/60 backdrop-blur",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Contract"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Status"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Value"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Expires"})]})}),e.jsxs("tbody",{children:[u.map(p=>{const y=p.id===m.id,f=an(p.expires);return e.jsxs("tr",{onClick:()=>n(p.id),className:`cursor-pointer border-t border-white/5 ${y?"bg-primary/10":"hover:bg-white/[0.03]"}`,children:[e.jsxs("td",{className:"px-3 py-2.5",children:[e.jsx("div",{className:"text-foreground/90 truncate max-w-[280px]",children:p.title}),e.jsxs("div",{className:"text-[10px] text-muted-foreground tracking-[0.12em] uppercase",children:[p.id," · ",p.party]})]}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md border text-[9px] tracking-[0.18em] uppercase ${ta(p.status)}`,children:p.status})}),e.jsx("td",{className:"px-3 py-2.5 text-foreground/80 tabular-nums",children:p.value}
16),e.jsxs("td",{className:"px-3 py-2.5 text-foreground/80 tabular-nums",children:[p.expires,f!==null&&f>=0&&f<=90&&e.jsxs("span",{className:"ml-2 text-[9px] text-amber-300",children:["· ",f,"d"]})]})]},p.id)}),u.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-3 py-8 text-center text-muted-foreground",children:"No contracts match those filters."})})]})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-3 space-y-3 overflow-auto",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground",children:m.id}),e.jsx("div",{className:"font-display text-base text-foreground glow-text leading-tight",children:m.title}),e.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:m.party})]}),e.jsx("span",{className:`shrink-0 inline-flex items-center px-2 py-0.5 rounded-md border text-[9px] tracking-[0.18em] uppercase ${ta(m.status)}`,children:m.status})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[11px]",children:[e.jsxs("div",{className:"rounded bg-black/40 border border-white/5 p-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Category"}),e.jsx("div",{className:"text-foreground/90",children:m.category})]}),e.jsxs("div",{className:"rounded bg-black/40 border border-white/5 p-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Value"}),e.jsx("div",{className:"text-foreground/90",children:m.value})]}),e.jsxs("div",{className:"rounded bg-black/40 border border-white/5 p-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Effective"}),e.jsx("div",{className:"text-foreground/90 tabular-nums",children:m.effective})]}),e.jsxs("div",{className:"rounded bg-black/40 border border-white/5 p-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Expires"}),e.jsx("div",{className:"text-foreground/90 tabular-nums",children:m.expires})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground mb-1.5",children:"Linked Agent"}),e.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-primary/5 border border-primary/20 px-2 py-1.5",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:m.owner[0]}),e.jsx("span",{className:"text-[11px] text-foreground/90",children:m.owner}),e.jsx("span",{className:"ml-auto text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Owner"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground mb-1.5",children:"Timeline"}),e.jsxs("ul",{className:"space-y-1.5 text-[11px] text-foreground/80",children:[e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary/70",children:"●"}),"Drafted by ",m.owner," · ",m.effective!=="—"?m.effective:"pending"]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary/70",children:"●"}),"Reviewed by Vega · clauses 4, 7, 12 flagged"]}),e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-primary/70",children:"●"}),"Signed by both parties"]}),m.status==="Active"&&e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-emerald-400/80",children:"●"}),"Filed in vault · indexed for search"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 pt-2",children:[e.jsx("button",{className:"px-2 py-1.5 text-[10px] tracking-[0.2em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"View Document"}),e.jsx("button",{className:"px-2 py-1.5 text-[10px] tracking-[0.2em] uppercase rounded-md glass hover:glow-edge",children:"Renew"}),e.jsx("button",{className:"px-2 py-1.5 text-[10px] tracking-[0.2em] uppercase rounded-md glass hover:glow-edge",children:"Amend"}),e.jsx("button",{className:"px-2 py-1.5 text-[10px] tracking-[0.2em] uppercase rounded-md glass hover:glow-edge",children:"Send for Sig"})]})]})]}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground
16/60",children:"Demo data · live contract storage and AI extraction coming online soon"})]})}const is=[{id:"msa",name:"Master Services Agreement",category:"Sales",description:"Umbrella terms for ongoing client work, with SOWs.",est:"~3 min"},{id:"sow",name:"Statement of Work",category:"Sales",description:"Scoped engagement with deliverables and milestones.",est:"~2 min"},{id:"nda-mutual",name:"Mutual NDA",category:"Sales",description:"Two-way confidentiality for early conversations.",est:"~1 min"},{id:"nda-oneway",name:"One-Way NDA",category:"Sales",description:"Protect what you're about to share, one direction.",est:"~1 min"},{id:"reseller",name:"Reseller / Channel Agreement",category:"Sales",description:"Authorize a partner to resell with margins and territory.",est:"~3 min"},{id:"employment",name:"Employment Agreement",category:"People",description:"Full-time hire with comp, IP, and termination terms.",est:"~3 min"},{id:"contractor",name:"Independent Contractor",category:"People",description:"1099 / freelance terms with IP assignment.",est:"~2 min"},{id:"vendor",name:"Vendor / Supplier Agreement",category:"Vendors",description:"Buy goods or services from a vendor on your terms.",est:"~2 min"},{id:"dpa",name:"Data Processing Addendum",category:"Vendors",description:"GDPR/CCPA-style DPA bolt-on for vendors handling data.",est:"~2 min"},{id:"license-ip",name:"IP / Trademark License",category:"IP",description:"License a mark, copyright, or patent in or out.",est:"~3 min"},{id:"lease",name:"Commercial Lease / Sublease",category:"Real Estate",description:"Office, warehouse, or pop-up space terms.",est:"~3 min"},{id:"custom",name:"Custom — Describe It",category:"Custom",description:"Tell Atlas what you need and he'll draft from scratch.",est:"varies"}],am=["All","Sales","People","Vendors","IP","Real Estate","Custom"],nn=[{id:"confidentiality",name:"Confidentiality",body:"Each party shall hold the other party's Confidential Information in strict confidence and shall not disclose it to any third party without prior written consent, except as required by law."},{id:"ip-assignment",name:"IP Assignment",body:"All work product, inventions, and deliverables created under this Agreement shall be the sole and exclusive property of Party A, and Party B hereby assigns all right, title, and interest therein."},{id:"indemnification",name:"Indemnification",body:"Each party shall indemnify, defend, and hold harmless the other party from and against any third-party claims arising out of the indemnifying party's breach of this Agreement or gross negligence."},{id:"limitation-liability",name:"Limitation of Liability",body:"EXCEPT FOR BREACHES OF CONFIDENTIALITY OR INDEMNIFICATION OBLIGATIONS, NEITHER PARTY'S AGGREGATE LIABILITY SHALL EXCEED THE FEES PAID UNDER THIS AGREEMENT IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM."},{id:"termination",name:"Termination for Convenience",body:"Either party may terminate this Agreement for any reason upon thirty (30) days' prior written notice to the other party."},{id:"non-compete",name:"Non-Compete (12 mo)",body:"For a period of twelve (12) months following termination, Party B shall not, directly or indirectly, engage in any business that competes with Party A within the defined Territory."},{id:"dispute-arbitration",name:"Dispute Resolution — Arbitration",body:"Any dispute arising out of or relating to this Agreement shall be resolved by binding arbitration administered by the American Arbitration Association in accordance with its Commercial Arbitration Rules."},{id:"force-majeure",name:"Force Majeure",body:"Neither party shall be liable for any failure or delay in performance caused by events beyond its reasonable control, including acts of God, war, pandemic, or governmental action."},{id:"assignment",name:"Assignment",body:"Neither party may assign this Agreement without the prior written consent of the other party, except in connection with a merger, acquisition, or sale of substantially all assets."},{id:"audit",name:"Audit Rights",body:"Party A may, upon thirty (30) days' notice and no more than once per calendar year, audit Party B's records relevant to this Agreement during normal business hours."}];function nm(){const t=is.length,r=nn.length;return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Counsel Bar"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:sn.map(s=>e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/20",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:s.name[0]}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[11px] text-foreground
16/90",children:s.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:s.role})]})]},s.id))})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-vault"},className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:bg-primary/10 transition inline-flex items-center gap-1.5",children:["Open Vault ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:J,label:"Templates",value:String(t)}),e.jsx(T,{icon:Re,label:"Clauses",value:String(r)}),e.jsx(T,{icon:X,label:"Drafts In Progress",value:"0"}),e.jsx(T,{icon:ds,label:"Sent for Sig",value:"0"})]})]})}function im(t){switch(t){case"Drafting":return"bg-sky-500/10 border-sky-500/40 text-sky-300";case"Awaiting Vega":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Ready to Sign":return"bg-emerald-500/10 border-emerald-500/40 text-emerald-300"}}function om(){const t=yr(Li);return e.jsx(lm,{generateContract:t})}function lm({generateContract:t}){const[r,s]=x.useState("All"),[a,i]=x.useState(is[0]),[d,l]=x.useState("Freedom Forge AI, Inc."),[n,o]=x.useState(""),[c,u]=x.useState(""),[m,g]=x.useState("12 months, auto-renew"),[p,y]=x.useState(""),[f,S]=x.useState("Delaware"),[h,w]=x.useState(""),[I,O]=x.useState(""),[P,b]=x.useState(!1),[N,M]=x.useState([]),$=is.filter(C=>r==="All"||C.category===r),F=C=>{i(C),document.getElementById("drafting-studio")?.scrollIntoView({behavior:"smooth",block:"start"})},D=async()=>{if(!n.trim()){v.error("Add a counterparty (Party B) before drafting.");return}b(!0),O("");try{const C=await t({data:{templateKind:a.name,partyA:d,partyB:n,effectiveDate:c||void 0,term:m||void 0,value:p||void 0,jurisdiction:f||void 0,specialTerms:h||void 0}});O(C.markdown);const _={id:`D-${Math.random().toString(36).slice(2,7).toUpperCase()}`,title:`${a.name} — ${n}`,templateName:a.name,agent:"Atlas",status:"Drafting",createdAt:Date.now(),markdown:C.markdown};M(W=>[_,...W]),v.success("Atlas drafted the contract. Review or send to Vega.")}catch(C){const _=C instanceof Error?C.message:"Drafting failed";v.error(_)}finally{b(!1)}},ee=C=>{const _=`
17
18## Inserted Clause — ${C.name}
19> Vega review: clause inserted from library — confirm fit before signature.
20
21${C.body}
22`;O(W=>W?W+_:`# Working Draft
23${_}`),v.success(`Inserted "${C.name}" — flagged for Vega.`)},k=C=>{M(_=>_.map(W=>W.id===C?{...W,status:"Awaiting Vega"}:W)),v.success("Sent to Vega for review.")},L=C=>{M(_=>_.map(W=>W.id===C?{...W,status:"Ready to Sign"}:W)),v.success("Filed in the Vault.")},Y=C=>{M(_=>_.map(W=>W.id===C?{...W,status:"Ready to Sign"}:W)),v.success("Sent for signature (demo). E-sign integration coming soon.")};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Template Gallery"}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Pick a starting point — Atlas pre-fills the studio below."})]}),e.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:am.map(C=>e.jsx("button",{onClick:()=>s(C),className:`px-2.5 py-1 rounded-md text-[10px] tracking-[0.2em] uppercase border transition ${r===C?"bg-primary/15 border-primary/50 text-primary":"bg-black/30 border-white/10 text-foreground/70 hover:border-primary/30"}`,children:C},C))})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:$.map(C=>{const _=C.id===a.id;return e.jsxs("button",{onClick:()=>F(C),className:`text-left rounded-lg border p-3 transition ${_?"border-primary/60 bg-primary/10":"border-white/10 bg-black/30 hover:border-primary/40 hover:bg-primary/5"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase",children:C.name})]}
23),e.jsx("p",{className:"mt-1.5 text-xs text-foreground/80 leading-snug",children:C.description}),e.jsxs("div",{className:"mt-2 flex items-center justify-between text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:[e.jsx("span",{children:C.category}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(ie,{className:"h-3 w-3"}),C.est]})]})]},C.id)})})]}),e.jsxs("div",{id:"drafting-studio",className:"grid grid-cols-1 lg:grid-cols-[280px_1fr_240px] gap-3 min-h-[560px]",children:[e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground mb-1",children:"Template"}),e.jsx("div",{className:"rounded-md bg-primary/10 border border-primary/30 px-2 py-1.5 text-[11px] text-primary",children:a.name})]}),e.jsx(mt,{label:"Party A",value:d,onChange:l,placeholder:"Your entity"}),e.jsx(mt,{label:"Party B",value:n,onChange:o,placeholder:"Counterparty"}),e.jsx(mt,{label:"Effective Date",value:c,onChange:u,placeholder:"2026-01-01"}),e.jsx(mt,{label:"Term",value:m,onChange:g,placeholder:"12 months, auto-renew"}),e.jsx(mt,{label:"Value / Fees",value:p,onChange:y,placeholder:"$120,000/yr"}),e.jsx(mt,{label:"Governing Law",value:f,onChange:S,placeholder:"Delaware"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground mb-1",children:"Special Terms"}),e.jsx("textarea",{value:h,onChange:C=>w(C.target.value),placeholder:"Anything bespoke: SLA tiers, milestones, non-solicit window, exclusivity, etc.",rows:4,className:"w-full bg-black/40 border border-white/10 rounded px-2 py-1.5 text-xs text-foreground/90 placeholder:text-muted-foreground/60 focus:outline-none focus:border-primary/50 resize-y"})]}),e.jsxs("button",{onClick:D,disabled:P,className:"w-full px-3 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[e.jsx(X,{className:"h-3.5 w-3.5"}),P?"Atlas is drafting…":"Draft with Atlas"]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 flex flex-col",children:[e.jsxs("div",{className:"p-3 border-b border-white/5 flex items-center justify-between",children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-primary glow-text",children:"Live Preview"}),e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:I?`${I.split(/\s+/).length} words`:"empty"})]}),e.jsxs("div",{className:"flex-1 overflow-auto max-h-[560px] p-5",children:[P&&!I&&e.jsx("div",{className:"h-full grid place-items-center text-center",children:e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-primary",children:[e.jsx(X,{className:"h-4 w-4 animate-pulse"}),e.jsx("span",{className:"text-[11px] tracking-[0.24em] uppercase",children:"Atlas is drafting…"})]}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground max-w-xs mx-auto",children:"Numbered clauses, defined terms, and a signature block — about 10 seconds."})]})}),!P&&!I&&e.jsx("div",{className:"h-full grid place-items-center text-center",children:e.jsxs("div",{children:[e.jsx(J,{className:"h-8 w-8 mx-auto text-muted-foreground/50"}),e.jsxs("p",{className:"mt-3 text-sm text-foreground/80",children:["Pick a template and hit ",e.jsx("span",{className:"text-primary",children:"Draft with Atlas"}),"."]}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Your live draft will render here, ready for Vega to redline."})]})}),I&&e.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[12px] leading-relaxed text-foreground/90",children:I})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-3 space-y-2 overflow-auto max-h-[620px]",children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground",children:"Clause Library"}
23),e.jsx("p",{className:"text-[10px] text-muted-foreground/80 leading-snug",children:"Click to append — inserted clauses are flagged for Vega review."}),e.jsx("div",{className:"space-y-1.5",children:nn.map(C=>e.jsxs("button",{onClick:()=>ee(C),className:"w-full text-left rounded-md bg-black/40 border border-white/10 hover:border-primary/40 hover:bg-primary/5 px-2 py-2 transition group",title:C.body,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-foreground/90 group-hover:text-primary truncate",children:C.name}),e.jsx(De,{className:"h-3 w-3 text-primary/70 shrink-0"})]}),e.jsxs("div",{className:"mt-0.5 text-[9px] tracking-[0.16em] uppercase text-muted-foreground/70 line-clamp-1",children:[C.body.slice(0,60),"…"]})]},C.id))})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-white/5 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Drafts in Progress"}),e.jsx("div",{className:"text-[10px] text-muted-foreground",children:"Session list — file in Vault to persist."})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:[N.length," draft",N.length===1?"":"s"]})]}),N.length===0?e.jsx("div",{className:"p-6 text-center text-xs text-muted-foreground",children:"No drafts yet. Atlas will queue them here as you generate."}):e.jsx("div",{className:"overflow-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Draft"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Template"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Agent"}),e.jsx("th",{className:"text-left font-normal px-3 py-2",children:"Status"}),e.jsx("th",{className:"text-right font-normal px-3 py-2",children:"Actions"})]})}),e.jsx("tbody",{children:N.map(C=>e.jsxs("tr",{className:"border-t border-white/5",children:[e.jsxs("td",{className:"px-3 py-2.5",children:[e.jsx("div",{className:"text-foreground/90 truncate max-w-[280px]",children:C.title}),e.jsxs("div",{className:"text-[10px] text-muted-foreground tracking-[0.12em] uppercase",children:[C.id," · ",new Date(C.createdAt).toLocaleTimeString()]})]}),e.jsx("td",{className:"px-3 py-2.5 text-foreground/80",children:C.templateName}),e.jsx("td",{className:"px-3 py-2.5 text-foreground/80",children:C.agent}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md border text-[9px] tracking-[0.18em] uppercase ${im(C.status)}`,children:C.status})}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsxs("div",{className:"flex items-center gap-1.5 justify-end",children:[e.jsx("button",{onClick:()=>O(C.markdown),className:"px-2 py-1 text-[9px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Resume"}),e.jsx("button",{onClick:()=>k(C.id),className:"px-2 py-1 text-[9px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Send to Vega"}),e.jsx("button",{onClick:()=>L(C.id),className:"px-2 py-1 text-[9px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"File in Vault"}),e.jsx("button",{onClick:()=>Y(C.id),className:"px-2 py-1 text-[9px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90",children:"Send for Sig"})]})})]},C.id))})]})})]}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground/60",children:"Demo: drafts live in this session · DB persistence and e-signature coming online soon"})]})}function mt({label:t,value:r,onChange:s,placeholder:a}){return e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.24em] uppercase text-muted-foreground mb-1",children:t}),e.jsx("input",{value:r,onChange:i=>s(i.target.value),placeholder:a,className:"w-full bg-black/40 border border-white/10 rounded px-2 py-1.5 text-xs text-foreground
23/90 placeholder:text-muted-foreground/60 focus:outline-none focus:border-primary/50"})]})}const dm=[{id:"atlas",name:"Atlas",role:"Formation & Filings"},{id:"vega",name:"Vega",role:"Bylaws & Resolutions"},{id:"wren",name:"Wren",role:"Compliance & Agent"}],cm={legalName:"Forge & Foundry AI, Inc.",dba:"FFAI",ein:"••-•••4821",formationDate:"2023-04-12",state:"Delaware",entityType:"C-Corporation",registeredAgent:"Harvard Business Services, Inc.",principalAddress:"16192 Coastal Hwy, Lewes, DE 19958",fiscalYearEnd:"Dec 31"},mm=[{name:"Alex Rivera",role:"CEO & Director",since:"2023-04-12"},{name:"Priya Shah",role:"CTO & Director",since:"2023-04-12"},{name:"Jordan Kim",role:"CFO",since:"2024-02-01"},{name:"Lin Vasquez",role:"Independent Director",since:"2025-01-15"},{name:"Daniel Cho",role:"Corporate Secretary",since:"2023-04-12"}],ra={Formation:[{name:"Certificate of Incorporation",type:"Filed",date:"2023-04-12",status:"Current",owner:"Atlas"},{name:"EIN Confirmation Letter (CP 575)",type:"IRS",date:"2023-04-20",status:"Current",owner:"Atlas"},{name:"Initial Action of Incorporator",type:"Internal",date:"2023-04-15",status:"Current",owner:"Vega"},{name:"Stockholder Consent — Initial",type:"Internal",date:"2023-04-18",status:"Current",owner:"Vega"},{name:"Foreign Qualification — California",type:"Filed",date:"2023-09-04",status:"Current",owner:"Wren"},{name:"Foreign Qualification — New York",type:"Filed",date:"2024-03-22",status:"Needs Update",owner:"Wren"}],Governance:[{name:"Bylaws — Restated v2",type:"Internal",date:"2024-08-01",status:"Current",owner:"Vega"},{name:"Board Charter — Audit Committee",type:"Internal",date:"2025-01-30",status:"Current",owner:"Vega"},{name:"Board Consent — Series Seed Approval",type:"Internal",date:"2024-06-12",status:"Current",owner:"Vega"},{name:"Board Resolution — Option Pool Refresh",type:"Internal",date:"2025-03-04",status:"Current",owner:"Vega"},{name:"Stockholder Meeting Minutes — 2024",type:"Internal",date:"2024-12-18",status:"Current",owner:"Vega"},{name:"Conflict of Interest Policy",type:"Internal",date:"2023-11-02",status:"Needs Update",owner:"Vega"},{name:"Code of Conduct",type:"Internal",date:"2023-11-02",status:"Current",owner:"Vega"}],Ownership:[{name:"Stock Purchase Agreement — Founders",type:"Executed",date:"2023-04-25",status:"Current",owner:"Atlas"},{name:"83(b) Election — A. Rivera",type:"IRS",date:"2023-05-02",status:"Current",owner:"Atlas"},{name:"83(b) Election — P. Shah",type:"IRS",date:"2023-05-02",status:"Current",owner:"Atlas"},{name:"Series Seed Preferred — Closing Set",type:"Executed",date:"2024-06-20",status:"Current",owner:"Atlas"},{name:"SAFE — Cascade Ventures",type:"Executed",date:"2023-10-11",status:"Current",owner:"Atlas"},{name:"Equity Incentive Plan (2023)",type:"Internal",date:"2023-06-01",status:"Current",owner:"Vega"},{name:"Cap Table — Carta Export Q3 2025",type:"Snapshot",date:"2025-10-01",status:"Current",owner:"Wren"}],Filings:[{name:"Delaware Annual Report — 2024",type:"Filed",date:"2024-02-28",status:"Current",owner:"Wren"},{name:"Delaware Franchise Tax — 2024",type:"Paid",date:"2024-02-28",status:"Current",owner:"Wren"},{name:"California Statement of Information",type:"Filed",date:"2024-09-15",status:"Current",owner:"Wren"},{name:"BOI Report (FinCEN) — Initial",type:"Filed",date:"2024-01-04",status:"Current",owner:"Wren"},{name:"Form 1120 — FY2024",type:"IRS",date:"2025-04-10",status:"Current",owner:"Wren"},{name:"Delaware Annual Report — 2025",type:"Filed",date:"—",status:"Needs Update",owner:"Wren"}],Licenses:[{name:"California Seller's Permit",type:"License",date:"2023-09-04",status:"Current",owner:"Wren"},{name:"NYC Business License",type:"License",date:"2024-03-22",status:"Current",owner:"Wren"},{name:"Lewes, DE Business License",type:"License",date:"2023-05-01",status:"Expired",owner:"Wren"},{name:"Trademark — FFAI Wordmark",type:"USPTO",date:"2024-11-19",status:"Current",owner:"Atlas"},{name:"Trademark — TIB Logo",type:"USPTO",date:"2025-02-08",status:"Current",owner:"Atlas"}]},pm=["Formation","Governance","Ownership","Filings","Licenses"],um=["Current","Needs Update","Expired"];function sa(t){switch(t){case"Current":return"bg-emerald-500/10 border-emerald-500/40 text-emerald-300";
23case"Needs Update":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Expired":return"bg-rose-500/10 border-rose-500/40 text-rose-300"}}const Pt={Common:"bg-primary/70","Preferred-Seed":"bg-emerald-500/70","Option Pool":"bg-sky-500/70",SAFE:"bg-fuchsia-500/70"},Lt=[{name:"Alex Rivera",cls:"Common",shares:32e5,pct:32,vested:"78%"},{name:"Priya Shah",cls:"Common",shares:32e5,pct:32,vested:"78%"},{name:"Cascade Ventures",cls:"Preferred-Seed",shares:15e5,pct:15,vested:"—"},{name:"Option Pool (Unallocated)",cls:"Option Pool",shares:12e5,pct:12,vested:"—"},{name:"Jordan Kim",cls:"Common",shares:4e5,pct:4,vested:"55%"},{name:"Lumen Angels SPV",cls:"SAFE",shares:5e5,pct:5,vested:"—"}],xm=Lt.reduce((t,r)=>t+r.shares,0),gm=[{name:"Delaware Franchise Tax",due:"Mar 1",status:"Due Soon"},{name:"Delaware Annual Report",due:"Mar 1",status:"Due Soon"},{name:"Registered Agent Renewal",due:"Apr 12",status:"On Track"},{name:"BOI Report Update",due:"Past 30d",status:"Overdue"}];function hm(t){switch(t){case"On Track":return"bg-emerald-400";case"Due Soon":return"bg-amber-400";case"Overdue":return"bg-rose-400"}}function fm(){return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Records Bar"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:dm.map(t=>e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/20",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:t.name[0]}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[11px] text-foreground/90",children:t.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:t.role})]})]},t.id))})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"compliance-center"},className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center gap-1.5",children:["Open Compliance ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:ze,label:"Entity Status",value:"Good Standing"}),e.jsx(T,{icon:$a,label:"Jurisdiction",value:"DE · C-Corp"}),e.jsx(T,{icon:ue,label:"Cap Table Holders",value:String(Lt.length)}),e.jsx(T,{icon:ie,label:"Next Filing",value:"Annual · 42d"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>v.info("Drop a PDF/DOCX here — Wren will OCR, tag, and file it."),className:"rounded-lg border border-dashed border-primary/40 bg-primary/5 hover:bg-primary/10 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(jt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Upload Document"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Drop PDF or DOCX — we'll OCR, tag, and file under the right tab."}),e.jsx("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:"Drag-drop · or click to browse"})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-drafting"},className:"rounded-lg border border-primary/40 bg-gradient-to-br from-primary/10 to-transparent hover:from-primary/20 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(X,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Generate Resolution"})]}
23),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Have Atlas draft a board consent, resolution, or written action."}),e.jsxs("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground inline-flex items-center gap-1",children:["Open Drafting Studio ",e.jsx(V,{className:"h-3 w-3"})]})]})]})]})}function bm(){const[t,r]=x.useState(cm),[s,a]=x.useState(!1),[i,d]=x.useState("Formation"),[l,n]=x.useState(null),[o,c]=x.useState(""),u=ra[i].filter(m=>{if(l&&m.status!==l)return!1;if(o){const g=o.toLowerCase();if(!m.name.toLowerCase().includes(g)&&!m.type.toLowerCase().includes(g))return!1}return!0});return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[300px_1fr_300px] gap-3 min-h-[560px]",children:[e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Entity Profile"})]}),e.jsxs("button",{onClick:()=>a(m=>!m),className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground hover:text-primary inline-flex items-center gap-1",children:[e.jsx(ka,{className:"h-3 w-3"}),s?"Done":"Edit"]})]}),e.jsx("div",{className:"space-y-2.5",children:[["Legal Name","legalName"],["DBA","dba"],["EIN","ein"],["Formation Date","formationDate"],["State","state"],["Entity Type","entityType"],["Registered Agent","registeredAgent"],["Principal Address","principalAddress"],["Fiscal Year End","fiscalYearEnd"]].map(([m,g])=>e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground mb-0.5",children:m}),s?e.jsx("input",{value:t[g],onChange:p=>r(y=>({...y,[g]:p.target.value})),className:"w-full bg-black/40 border border-white/10 rounded px-2 py-1 text-xs text-foreground/90 focus:outline-none focus:border-primary/50"}):e.jsx("div",{className:"text-xs text-foreground/90",children:t[g]})]},g))}),e.jsxs("div",{className:"pt-3 border-t border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[e.jsx(ue,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Officers & Directors"})]}),e.jsx("div",{className:"space-y-1.5",children:mm.map(m=>e.jsxs("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-foreground/90 truncate",children:m.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground truncate",children:m.role})]}),e.jsxs("div",{className:"text-[10px] tabular-nums text-muted-foreground shrink-0",children:["since ",m.since]})]},m.name))})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 flex flex-col min-h-0",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-3",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Records Library"})]}),e.jsx("div",{className:"flex flex-wrap gap-1 border-b border-white/10 pb-2",children:pm.map(m=>e.jsxs("button",{onClick:()=>d(m),className:`px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md transition ${i===m?"bg-primary/15 text-primary border border-primary/40":"text-muted-foreground hover:text-foreground/90 border border-transparent"}`,children:[m,e.jsx("span",{className:"ml-1.5 text-[9px] tabular-nums opacity-70",children:ra[m].length})]},m))}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1 min-w-[180px]",children:[e.jsx(Ut,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx("input",{value:o,onChange:m=>c(m.target.value),placeholder:"Search records…",className:"w-full bg-black/40 border border-white/10 rounded pl-7 pr-2 py-1.5 text-xs text-foreground
23/90 placeholder:text-muted-foreground/60 focus:outline-none focus:border-primary/50"})]}),e.jsx("button",{onClick:()=>n(null),className:`px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border transition ${l===null?"border-primary/40 bg-primary/10 text-primary":"border-white/10 text-muted-foreground hover:text-foreground/90"}`,children:"All"}),um.map(m=>e.jsx("button",{onClick:()=>n(m===l?null:m),className:`px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border transition ${l===m?sa(m):"border-white/10 text-muted-foreground hover:text-foreground/90"}`,children:m},m))]}),e.jsx("div",{className:"mt-3 flex-1 overflow-auto",children:e.jsxs("table",{className:"w-full text-[11px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[9px] tracking-[0.22em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"text-left font-normal py-2 pr-2",children:"Document"}),e.jsx("th",{className:"text-left font-normal py-2 pr-2",children:"Type"}),e.jsx("th",{className:"text-left font-normal py-2 pr-2",children:"Date"}),e.jsx("th",{className:"text-left font-normal py-2 pr-2",children:"Status"}),e.jsx("th",{className:"text-left font-normal py-2 pr-2",children:"Owner"}),e.jsx("th",{className:"text-right font-normal py-2",children:"Actions"})]})}),e.jsxs("tbody",{children:[u.map(m=>e.jsxs("tr",{className:"border-b border-white/5 hover:bg-primary/5 transition",children:[e.jsx("td",{className:"py-2 pr-2 text-foreground/90",children:m.name}),e.jsx("td",{className:"py-2 pr-2 text-muted-foreground",children:m.type}),e.jsx("td",{className:"py-2 pr-2 tabular-nums text-muted-foreground",children:m.date}),e.jsx("td",{className:"py-2 pr-2",children:e.jsx("span",{className:`px-1.5 py-0.5 rounded border text-[9px] tracking-[0.18em] uppercase ${sa(m.status)}`,children:m.status})}),e.jsx("td",{className:"py-2 pr-2 text-muted-foreground",children:m.owner}),e.jsx("td",{className:"py-2 text-right",children:e.jsxs("div",{className:"inline-flex items-center gap-1",children:[e.jsx("button",{onClick:()=>v.info(`Viewing ${m.name}`),className:"p-1 rounded hover:bg-white/5 text-muted-foreground hover:text-primary",children:e.jsx(va,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>v.success(`Downloading ${m.name}`),className:"p-1 rounded hover:bg-white/5 text-muted-foreground hover:text-primary",children:e.jsx(ye,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>v.info(`Replace ${m.name}`),className:"p-1 rounded hover:bg-white/5 text-muted-foreground hover:text-primary",children:e.jsx(jt,{className:"h-3.5 w-3.5"})})]})})]},m.name)),u.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"py-6 text-center text-muted-foreground italic",children:"No records match."})})]})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(Jn,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Cap Table"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"flex h-3 w-full overflow-hidden rounded border border-white/10",children:Object.keys(Pt).map(m=>{const g=Lt.filter(p=>p.cls===m).reduce((p,y)=>p+y.pct,0);return g===0?null:e.jsx("div",{className:`${Pt[m]}`,style:{width:`${g}%`},title:`${m} ${g.toFixed(1)}%`},m)})}),e.jsx("div",{className:"mt-2 grid grid-cols-2 gap-x-2 gap-y-1 text-[10px]",children:Object.keys(Pt).map(m=>{const g=Lt.filter(p=>p.cls===m).reduce((p,y)=>p+y.pct,0);return e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${Pt[m]}`}),e.jsx("span",{className:"text-muted-foreground truncate",children:m}),e.jsxs("span",{className:"ml-auto tabular-nums text-foreground/80",children:[g.toFixed(1),"%"]})]},m)})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"text-[9px] tracking-[0.24em] uppercase text-muted-foreground",children:"Top Holders"}),Lt.map(m=>e.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm shrink-0 ${Pt[m.cls]}`}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-foreground
23/90 truncate",children:m.name}),e.jsxs("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground truncate",children:[m.cls," · ",m.vested==="—"?"—":`vested ${m.vested}`]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsxs("div",{className:"tabular-nums text-foreground/85",children:[m.pct.toFixed(1),"%"]}),e.jsx("div",{className:"text-[9px] tabular-nums text-muted-foreground",children:m.shares.toLocaleString()})]})]},m.name))]}),e.jsxs("div",{className:"pt-3 border-t border-white/5 space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-[10px] tracking-[0.18em] uppercase",children:[e.jsx("span",{className:"text-muted-foreground",children:"Fully Diluted"}),e.jsx("span",{className:"tabular-nums text-foreground/90",children:xm.toLocaleString()})]}),e.jsx("button",{onClick:()=>v.info("Carta-style ledger view coming soon."),className:"w-full px-2 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded border border-primary/30 text-primary hover:bg-primary/10 transition",children:"Open Ledger"})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[e.jsx(yt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Compliance Strip"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:gm.map(m=>e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-3 flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-2 w-2 rounded-full ${hm(m.status)}`}),e.jsx("span",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:m.status})]}),e.jsx("div",{className:"text-sm text-foreground/90",children:m.name}),e.jsxs("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:["Due ",m.due]}),e.jsxs("div",{className:"flex gap-1.5 mt-1",children:[e.jsx("button",{onClick:()=>v.success(`${m.name} marked filed.`),className:"flex-1 px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border border-primary/30 text-primary hover:bg-primary/10 transition",children:"Mark Filed"}),e.jsx("button",{onClick:()=>v.info(`Opening ${m.name}…`),className:"px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border border-white/10 text-muted-foreground hover:text-foreground/90",children:"Open"})]})]},m.name))})]})]})}const ne=[{id:"PO-2026-0142",vendor:"Dell Technologies",category:"Software & SaaS",issued:"2026-05-22",expected:"2026-06-05",status:"partial",items:[{sku:"LAT-7450",name:"Latitude 7450 laptop",ordered:6,received:4,unit:1850},{sku:"DOCK-WD22",name:"WD22 docking station",ordered:6,received:6,unit:285}],notes:"2 laptops back-ordered — ETA Jun 8"},{id:"PO-2026-0141",vendor:"Iron Mountain",category:"Office & Rent",issued:"2026-05-18",expected:"2026-05-30",status:"overdue",items:[{sku:"SHRED-Q2",name:"Q2 secure shredding service",ordered:1,received:0,unit:1240}],notes:"Vendor unresponsive · escalate"},{id:"PO-2026-0140",vendor:"AWS",category:"Software & SaaS",issued:"2026-05-15",expected:"2026-06-01",status:"received",items:[{sku:"RI-2026-H2",name:"EC2 reserved instances · H2 prepay",ordered:1,received:1,unit:18400}]},{id:"PO-2026-0139",vendor:"HubSpot",category:"Marketing",issued:"2026-05-12",expected:"2026-06-12",status:"sent",items:[{sku:"MKT-PRO-25",name:"Marketing Hub Pro · 25 seats / annual",ordered:25,received:0,unit:720}]},{id:"PO-2026-0138",vendor:"Staples Business",category:"Office & Rent",issued:"2026-05-10",expected:"2026-05-20",status:"received",items:[{sku:"PAPER-LTR",name:"Letter paper · case",ordered:12,received:12,unit:38},{sku:"INK-HP-58",name:"HP 58A toner",ordered:4,received:4,unit:142},{sku:"CHAIR-ERG",name:"Ergonomic task chair",ordered:3,received:3,unit:410}]},{id:"PO-2026-0137",vendor:"Figma",category:"Software & SaaS",issued:"2026-05-08",expected:"2026-05-20",status:"received",items:[{sku:"FIG-ORG-30",name:"Organization plan · 30 editors",ordered:30,received:30,unit:45}]},{id:"PO-2026-0136",vendor:"Slack (Salesforce)",category:"Software & SaaS",issued:"2026-05-05",expected:"2026-05-15",status:"received",items:[{sku:"SLK-BIZ-40",name:"Business+ · 40 seats / annual",ordered:40,received:40,unit:150}]},{id:"PO-2026-0135",vendor:"Brex",category:"Other",issued:"2026-05-03",expected:"2026-05-10",status:"draft",items:[{sku:"CARD-FEE",name:"Quarterly card service fees",ordered:1,received:0,unit:480}],notes:"Awaiting CFO approval"}
23],pt={draft:{label:"Draft",cls:"text-foreground/70 bg-white/5 border-white/10",dot:"bg-white/40"},sent:{label:"Sent",cls:"text-sky-300 bg-sky-400/10 border-sky-400/30",dot:"bg-sky-400"},partial:{label:"Partial",cls:"text-amber-300 bg-amber-400/10 border-amber-400/30",dot:"bg-amber-400"},received:{label:"Received",cls:"text-emerald-300 bg-emerald-400/10 border-emerald-400/30",dot:"bg-emerald-400"},overdue:{label:"Overdue",cls:"text-rose-300 bg-rose-400/10 border-rose-400/30",dot:"bg-rose-400"}};function ut(t){return t.items.reduce((r,s)=>r+s.ordered*s.unit,0)}function aa(t){return t.items.reduce((r,s)=>r+s.received*s.unit,0)}function ym(t){const r=t.items.reduce((a,i)=>a+i.ordered,0),s=t.items.reduce((a,i)=>a+i.received,0);return r>0?s/r*100:0}function vm(){const[t,r]=x.useState("all"),[s,a]=x.useState(ne[0].id),i=t==="all"?ne:ne.filter(h=>h.status===t),d=ne.find(h=>h.id===s)??ne[0],l=ne.filter(h=>h.status==="sent"||h.status==="partial"||h.status==="draft"),n=l.reduce((h,w)=>h+(ut(w)-aa(w)),0),o=ne.filter(h=>h.status==="overdue").length,c=ne.filter(h=>h.status==="received"&&h.issued.startsWith("2026-05")).reduce((h,w)=>h+ut(w),0),u=ne.filter(h=>h.status==="received").length,m=u/(u+o||1)*100,g=new Map;for(const h of ne)g.set(h.vendor,(g.get(h.vendor)??0)+ut(h));const p=Array.from(g.entries()).map(([h,w])=>({vendor:h,amount:w})).sort((h,w)=>w.amount-h.amount).slice(0,6),y=p[0]?.amount??1,f=ne.filter(h=>h.status==="sent"||h.status==="partial"||h.status==="overdue").sort((h,w)=>h.expected.localeCompare(w.expected)),S=["all","draft","sent","partial","received","overdue"];return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:["Purchase orders, vendor commitments, and receiving — in one place. Track what's on order, what's landed, and what's stuck. Numbers feed"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"text-primary underline-offset-2 underline",children:"Your Books"})," ","and"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"text-primary underline-offset-2 underline",children:"Forecast"}),"."]}),e.jsxs("div",{className:"rounded-md border border-primary/30 bg-black/40 p-4 flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-md grid place-items-center bg-primary/15 text-primary shrink-0",children:e.jsx(gi,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-[220px]",children:[e.jsx("div",{className:"text-sm font-medium",children:"Purchasing Desk"}),e.jsxs("div",{className:"text-[11px] tracking-[0.18em] uppercase text-muted-foreground mt-0.5",children:[ne.length," orders · ",l.length," open · ",o," overdue"]})]}),e.jsxs("button",{onClick:()=>v.success("New purchase order draft created · PO-2026-0143"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center gap-1.5",children:[e.jsx(De,{className:"h-3.5 w-3.5"})," New PO"]}),e.jsxs("button",{onClick:()=>v("Vendor directory coming online"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ue,{className:"h-3.5 w-3.5"})," Vendors"]}),e.jsxs("button",{onClick:()=>v.success("Purchase orders exported to CSV"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," Export"]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Open Commitments",value:R(n,!0),sub:`${l.length} open POs`}),e.jsx(A,{label:"Received · MTD",value:R(c,!0),sub:"May 2026"}),e.jsx(A,{label:"On-Time Rate",value:`${m.toFixed(0)}%`,sub:"Trailing 90 days"}),e.jsx(A,{label:"Overdue",value:String(o),sub:o>0?"Needs attention":"All clear"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Receiving Dock · Upcoming"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"What's en route"})]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Fa,{className:"h-3.5 w-3.5"})," ",f.length," inbound"]})]}),e.jsxs("ul",{className:"space-y-2",children:[f.map(h=>{const w=pt[h.status],I=ut(h)-aa(h);return e.jsxs("li",{onClick:()=>a(h.id),className:"grid grid-cols-[110px_1fr_120px_100px_90px_28px] items-center gap-3 text-xs py-2 px-2 -mx-2 rounded-md cursor-pointer border-b border-white/5 last:border-0 hover:bg-white/[0.03] transition",children:[e.jsx("span",{className:"font-display text-primary/70 tabular-nums text-[11px]",children:h.id}
23),e.jsx("span",{className:"text-foreground/90 truncate",children:h.vendor}),e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase w-fit ${w.cls}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${w.dot}`}),w.label]}),e.jsxs("span",{className:"text-muted-foreground tabular-nums text-[11px]",children:["ETA ",h.expected.slice(5)]}),e.jsx("span",{className:"text-right text-foreground/90 tabular-nums",children:R(I,!0)}),e.jsx(V,{className:"h-3.5 w-3.5 text-muted-foreground"})]},h.id)}),f.length===0&&e.jsx("li",{className:"text-xs text-muted-foreground py-3 text-center",children:"No inbound deliveries."})]})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.3fr_1fr]",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"flex items-baseline justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Purchase Orders"}),e.jsxs("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:[i.length," matching"]})]})}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:S.map(h=>{const w=t===h,I=h==="all"?"All":pt[h].label,O=h==="all"?ne.length:ne.filter(P=>P.status===h).length;return e.jsxs("button",{onClick:()=>r(h),className:`px-2.5 py-1 text-[10px] tracking-[0.18em] uppercase rounded-sm border transition ${w?"bg-primary text-primary-foreground border-primary":"glass hover:glow-edge border-white/10 text-foreground/80"}`,children:[I," · ",O]},h)})}),e.jsx("ul",{className:"space-y-1",children:i.map(h=>{const w=pt[h.status],I=h.id===d.id,O=ym(h);return e.jsxs("li",{onClick:()=>a(h.id),className:`grid grid-cols-[110px_1fr_90px_90px] items-center gap-3 text-xs px-2 py-2 rounded-md cursor-pointer transition border ${I?"bg-primary/10 border-primary/40":"bg-transparent border-transparent hover:bg-white/[0.03]"}`,children:[e.jsx("span",{className:"font-display text-primary/70 tabular-nums text-[11px]",children:h.id}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-foreground/90 truncate",children:h.vendor}),e.jsx("div",{className:"h-1 mt-1 rounded-full bg-white/5 overflow-hidden",children:e.jsx("div",{className:`h-full ${h.status==="overdue"?"bg-rose-400/70":"bg-primary/70"}`,style:{width:`${O}%`}})})]}),e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase w-fit ${w.cls}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${w.dot}`}),w.label]}),e.jsx("span",{className:"text-right text-foreground/90 tabular-nums",children:R(ut(h),!0)})]},h.id)})})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:d.id}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:d.vendor})]}),e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase ${pt[d.status].cls}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${pt[d.status].dot}`}),pt[d.status].label]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-[11px] mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Issued"}),e.jsx("div",{className:"text-foreground/90 tabular-nums mt-0.5",children:d.issued})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Expected"}),e.jsx("div",{className:"text-foreground/90 tabular-nums mt-0.5",children:d.expected})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Category"}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 mt-0.5",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-sm ${Tt[d.category]}`}
23),e.jsx("span",{className:"text-foreground/90",children:d.category})]})]})]}),e.jsx("div",{className:"space-y-2 mb-3",children:d.items.map(h=>{const w=h.received>=h.ordered,I=w?st:vr;return e.jsxs("div",{className:"flex items-center gap-2.5 text-xs p-2 rounded-md bg-black/40 border border-white/5",children:[e.jsx(I,{className:`h-3.5 w-3.5 shrink-0 ${w?"text-emerald-400":"text-muted-foreground"}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-foreground/90 truncate",children:h.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground tabular-nums",children:[h.sku," · ",R(h.unit)," ea"]})]}),e.jsxs("span",{className:"text-[11px] text-muted-foreground tabular-nums",children:[h.received," / ",h.ordered]}),e.jsx("span",{className:"w-16 text-right text-foreground/90 tabular-nums",children:R(h.ordered*h.unit,!0)})]},h.sku)})}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-white/10 text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:"PO Total"}),e.jsx("span",{className:"font-display text-base text-primary tabular-nums",children:R(ut(d))})]}),d.notes&&e.jsxs("div",{className:"mt-3 text-[11px] text-amber-300/90 bg-amber-400/5 border border-amber-400/20 rounded-md p-2",children:[e.jsx("span",{className:"font-medium",children:"Note · "}),d.notes]}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.status!=="received"&&e.jsx("button",{onClick:()=>v.success(`${d.id} marked received in full`),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Mark Received"}),e.jsx("button",{onClick:()=>v("Vendor contacted · expect a response within 1 business day"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Contact Vendor"}),e.jsxs("button",{onClick:()=>v.success(`${d.id} PDF generated`),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3 w-3"})," PDF"]})]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"flex items-baseline justify-between mb-4",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Vendor Spend · All POs"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Where commitments concentrate"})]})}),e.jsx("ul",{className:"space-y-2",children:p.map((h,w)=>e.jsxs("li",{className:"grid grid-cols-[28px_1.5fr_1fr_90px] items-center gap-3 text-xs py-1.5 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"font-display text-primary/60 tabular-nums",children:String(w+1).padStart(2,"0")}),e.jsx("span",{className:"text-foreground/90 truncate",children:h.vendor}),e.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-white/5 overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary/70 shadow-[0_0_8px_var(--glow-soft)]",style:{width:`${h.amount/y*100}%`}})}),e.jsx("span",{className:"text-right text-foreground/90 tabular-nums",children:R(h.amount,!0)})]},h.vendor))})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"accounting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Your Books →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Profit & Loss →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"loans-grants"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Funding →"})]})]})}const or={date:"2026-06-18",time:"10:00 AM PT",location:"Virtual · TIB Boardroom",daysAway:15},jm={ready:{label:"Ready",cls:"text-emerald-300 bg-emerald-400/10 border-emerald-400/30"},draft:{label:"Draft",cls:"text-amber-300 bg-amber-400/10 border-amber-400/30"},"owner-needed":{label:"Needs Owner",cls:"text-rose-300 bg-rose-400/10 border-rose-400/30"}},lr=[{id:"a1",title:"Revenue & Bookings",owner:"CEO",minutes:10,status:"ready",sourceFloor:"7",sourceRoom:"ceo-reports"},{id:"a2",title:"P&L Review",owner:"CFO",minutes:12,status:"ready",sourceFloor:"6",sourceRoom:"pnl"},{id:"a3",title:"Cash & Runway",owner:"CFO",minutes:8,status:"ready",sourceFloor:"6",sourceRoom:"forecasting"},{id:"a4",title:"Strategic Initiatives",owner:"CEO",minutes:15,status:"draft",sourceFloor:"7",sourceRoom:"state-of-business"}
23,{id:"a5",title:"Risks & Mitigations",owner:"COO",minutes:10,status:"draft",sourceFloor:"7",sourceRoom:"state-of-business"},{id:"a6",title:"Board Asks · Approvals",owner:"CEO",minutes:5,status:"owner-needed"}],Nm={attached:{label:"Attached",cls:"text-emerald-300",dot:"bg-emerald-400"},generating:{label:"Generating",cls:"text-sky-300",dot:"bg-sky-400"},pending:{label:"Pending",cls:"text-amber-300",dot:"bg-amber-400"}},qr=[{id:"p1",name:"P&L · May 2026",kind:"PDF",status:"attached",size:"248 KB"},{id:"p2",name:"12-Month Cash Forecast",kind:"XLSX",status:"attached",size:"1.1 MB"},{id:"p3",name:"KPI Dashboard Snapshot",kind:"PDF",status:"generating",size:"—"},{id:"p4",name:"Minutes · Q1 Board Meeting",kind:"PDF",status:"attached",size:"184 KB"},{id:"p5",name:"Top Risks Register",kind:"PDF",status:"pending",size:"—"},{id:"p6",name:"Strategic Initiatives Brief",kind:"PDF",status:"pending",size:"—"}],Kr=[{id:"b1",name:"M. Patel",role:"Chair · Independent",sent:!0},{id:"b2",name:"S. Okafor",role:"Independent Director",sent:!0},{id:"b3",name:"J. Chen",role:"Investor · Series Seed",sent:!1},{id:"b4",name:"L. Romero",role:"Investor · Series Seed",sent:!1},{id:"b5",name:"You",role:"Founder & CEO",sent:!0}],na=[{id:"ai1",title:"Tighten Q3 hiring plan",owner:"CEO",due:"2026-06-15",status:"On track"},{id:"ai2",title:"Renegotiate AWS reserved tier",owner:"CFO",due:"2026-06-10",status:"On track"},{id:"ai3",title:"Customer concentration review",owner:"COO",due:"2026-06-30",status:"At risk"},{id:"ai4",title:"Update cap table for SAFE convert",owner:"CFO",due:"2026-06-12",status:"Done"}],Qr={prospect:{label:"Prospect",cls:"text-foreground/70 bg-white/5 border-white/10"},intro:{label:"Intro",cls:"text-sky-300 bg-sky-400/10 border-sky-400/30"},diligence:{label:"Diligence",cls:"text-amber-300 bg-amber-400/10 border-amber-400/30"},"term-sheet":{label:"Term Sheet",cls:"text-violet-300 bg-violet-400/10 border-violet-400/30"},closed:{label:"Closed",cls:"text-emerald-300 bg-emerald-400/10 border-emerald-400/30"}},xt=[{id:"i1",name:"A. Khan",firm:"Wavelength Capital",check:15e5,stage:"term-sheet",lastTouch:"2026-06-02",nextStep:"Sign term sheet"},{id:"i2",name:"R. Liang",firm:"Northstar Ventures",check:1e6,stage:"diligence",lastTouch:"2026-05-30",nextStep:"Send data room access"},{id:"i3",name:"P. Mendes",firm:"Open Field",check:5e5,stage:"diligence",lastTouch:"2026-05-28",nextStep:"Customer reference calls"},{id:"i4",name:"D. Yoshida",firm:"Arc Angels",check:25e4,stage:"diligence",lastTouch:"2026-05-25",nextStep:"Founder Q&A · Wed"},{id:"i5",name:"E. Bauer",firm:"Stripe Founders Fund",check:75e4,stage:"intro",lastTouch:"2026-05-22",nextStep:"Schedule 2nd meeting"},{id:"i6",name:"M. Singh",firm:"Founders Lane",check:35e4,stage:"intro",lastTouch:"2026-05-18",nextStep:"Share deck v3"},{id:"i7",name:"T. Romero",firm:"Vertex Seed",check:5e5,stage:"intro",lastTouch:"2026-05-15",nextStep:"Partner mtg pending"},{id:"i8",name:"K. Brennan",firm:"Foundation Capital",check:1e6,stage:"prospect",lastTouch:"2026-05-10",nextStep:"Warm intro from A. Khan"},{id:"i9",name:"S. Devi",firm:"Tide Ventures",check:3e5,stage:"prospect",lastTouch:"2026-05-08",nextStep:"Cold outreach · LinkedIn"},{id:"i10",name:"J. Park",firm:"Quiet Capital",check:5e5,stage:"prospect",lastTouch:"2026-05-05",nextStep:"Awaiting reply"},{id:"i11",name:"N. Alvarez",firm:"Pre-Seed Collective",check:1e5,stage:"closed",lastTouch:"2026-04-22",nextStep:"Wire received"},{id:"i12",name:"B. Whitman",firm:"Whitman Angel Syndicate",check:25e4,stage:"closed",lastTouch:"2026-04-18",nextStep:"SAFE countersigned"}],$t={name:"Seed",target:25e5,closeDate:"2026-08-30"},Jr=[{id:"dr1",name:"Pitch deck · v3",ready:!0},{id:"dr2",name:"P&L · 18 months",ready:!0},{id:"dr3",name:"12-month forecast model",ready:!0},{id:"dr4",name:"Cap table · post-SAFE",ready:!0},{id:"dr5",name:"Customer contracts · top 10",ready:!1},{id:"dr6",name:"Founder bios & references",ready:!0},{id:"dr7",name:"IP register",ready:!1},{id:"dr8",name:"Customer references list",ready:!1}],ia=[{id:"ct1",label:"Founders",pct:62,cls:"bg-primary"}
23,{id:"ct2",label:"Option Pool",pct:12,cls:"bg-sky-400"},{id:"ct3",label:"Pre-Seed",pct:8,cls:"bg-violet-400"},{id:"ct4",label:"New Round",pct:18,cls:"bg-emerald-400"}],Xr=[{id:"fin",name:"Financial",score:78,trend:"up",delta:4,commentary:"Strong margin expansion; runway holding above 9 months at current burn.",icon:tt},{id:"cust",name:"Customer",score:71,trend:"flat",delta:0,commentary:"Retention steady at 94% NRR; top 3 logos still 41% of revenue.",icon:ci},{id:"ops",name:"Operational",score:82,trend:"up",delta:3,commentary:"On-time delivery at 96%; overdue POs cleared this week.",icon:Fa},{id:"team",name:"Team",score:74,trend:"down",delta:-2,commentary:"Two senior eng reqs open >45 days; eNPS softened to 38 from 42.",icon:ue},{id:"strat",name:"Strategic",score:69,trend:"up",delta:5,commentary:"Roadmap velocity up; AI feature wedge resonates in 4 of 5 advisor calls.",icon:ls}],wm=[{id:"r1",title:"Customer concentration · top 3 = 41% of revenue",category:"Customer",likelihood:"Med",impact:"High",owner:"COO",mitigation:"In progress"},{id:"r2",title:"Senior engineering hiring lag",category:"Team",likelihood:"High",impact:"Med",owner:"Head of Eng",mitigation:"In progress"},{id:"r3",title:"AWS reserved tier renewal · price hike risk",category:"Operational",likelihood:"Med",impact:"Med",owner:"CFO",mitigation:"Open"},{id:"r4",title:"Pending SOC 2 Type II audit window",category:"Legal",likelihood:"Med",impact:"High",owner:"CTO",mitigation:"In progress"},{id:"r5",title:"Marketing channel saturation · LinkedIn ads",category:"Operational",likelihood:"High",impact:"Low",owner:"CMO",mitigation:"Open"},{id:"r6",title:"Co-founder vesting cliff · 12 months out",category:"Legal",likelihood:"Low",impact:"High",owner:"Legal",mitigation:"Mitigated"}],oa=t=>t==="High"?"text-rose-300 bg-rose-400/10 border-rose-400/30":t==="Med"?"text-amber-300 bg-amber-400/10 border-amber-400/30":"text-foreground/70 bg-white/5 border-white/10",km=t=>t==="Mitigated"?"text-emerald-300 bg-emerald-400/10 border-emerald-400/30":t==="In progress"?"text-sky-300 bg-sky-400/10 border-sky-400/30":"text-amber-300 bg-amber-400/10 border-amber-400/30",la=[{id:"adv-darrel",name:"Darrel Vaughn",role:"Enterprise Transformation",specialty:"Org-wide transformation, change management, operating model redesign",initials:"DV",tone:"bg-violet-400/15 text-violet-300",photo:Wn},{id:"adv-thomas",name:"Thomas Appling",role:"AI Governance",specialty:"AI strategy, governance frameworks, risk and compliance for AI rollouts",initials:"TA",tone:"bg-emerald-400/15 text-emerald-300",photo:Vn},{id:"adv-kristina",name:"Kristina Martinelli",role:"Strategic Growth",specialty:"Growth strategy, market expansion, pricing and positioning",initials:"KM",tone:"bg-sky-400/15 text-sky-300",photo:Gn},{id:"adv-bobby",name:"Bobby",role:"AI Integration & Development",specialty:"AI implementation, integrations, and hands-on build with your team",initials:"BB",tone:"bg-amber-400/15 text-amber-300",photo:Ol}],Sm=[{id:"cr-strat",name:"Strategy Room",tagline:"Quarterly priorities, market positioning, big bets",advisors:["adv-darrel","adv-bobby"],lastSession:"May 28"},{id:"cr-numbers",name:"Numbers Room",tagline:"Margins, runway, fundraising readiness",advisors:["adv-thomas","adv-darrel"],lastSession:"Jun 01"},{id:"cr-growth",name:"Growth Room",tagline:"Pipeline, pricing, channels",advisors:["adv-kristina","adv-thomas"],lastSession:"May 30"}],Cm=[{id:"s1",date:"Jun 01",room:"Numbers Room",topic:"Pre-board P&L walk-through",advisor:"Thomas Appling"},{id:"s2",date:"May 30",room:"Growth Room",topic:"Pricing test design · Pro tier",advisor:"Kristina Martinelli"},{id:"s3",date:"May 28",room:"Strategy Room",topic:"Q3 priorities draft",advisor:"Darrel Vaughn"},{id:"s4",date:"May 24",room:"Numbers Room",topic:"Investor pipeline review",advisor:"Thomas Appling"},{id:"s5",date:"May 19",room:"Growth Room",topic:"Channel mix rebalance",advisor:"Bobby"}],Am=["Quarterly Planning","Board Prep Rehearsal","Pricing Workshop","Risk Review"];function Im(){const t=lr.reduce((i,d)=>i+d.minutes,0),r=lr.filter(i=>i.status==="ready").length,s=qr.filter(i=>i.status==="attached").length,a=Kr.filter(i=>i.sent).length;return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("p",{className:"text-sm text-foreground
23/80 max-w-3xl leading-relaxed",children:["Your pre-meeting war room. Agenda, board pack, pre-read distribution, and the talking points that turn data from ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"text-primary underline-offset-2 underline",children:"P&L"})," and"," ",e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"text-primary underline-offset-2 underline",children:"Forecast"})," into a confident board narrative."]}),e.jsxs("div",{className:"rounded-md border border-primary/30 bg-gradient-to-r from-primary/10 to-transparent p-4 flex flex-wrap items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-md grid place-items-center bg-primary/15 text-primary shrink-0",children:e.jsx(ms,{className:"h-6 w-6"})}),e.jsxs("div",{className:"flex-1 min-w-[220px]",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Next Board Meeting"}),e.jsxs("div",{className:"font-display text-xl text-foreground glow-text mt-0.5",children:[or.date," · ",or.time]}),e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:or.location})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-display text-3xl text-primary tabular-nums",children:or.daysAway}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"days away"})]}),e.jsx("button",{onClick:()=>v.success("Calendar invites sent to 5 board members"),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Send Invites"})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(A,{label:"Agenda",value:`${r} / ${lr.length}`,sub:`${t} min total`}),e.jsx(A,{label:"Board Pack",value:`${s} / ${qr.length}`,sub:"Artifacts attached"}),e.jsx(A,{label:"Pre-Reads Sent",value:`${a} / ${Kr.length}`,sub:"Members notified"}),e.jsx(A,{label:"Open Actions",value:String(na.filter(i=>i.status!=="Done").length),sub:"From last meeting"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Meeting Agenda"}),e.jsxs("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:[t,"-minute working session"]})]}),e.jsxs("button",{onClick:()=>v.success("Agenda exported to PDF"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," PDF"]})]}),e.jsx("ul",{className:"space-y-1.5",children:lr.map((i,d)=>{const l=jm[i.status];return e.jsxs("li",{className:"grid grid-cols-[28px_1fr_70px_60px_110px_90px] items-center gap-3 text-xs py-2 px-2 -mx-2 rounded-md hover:bg-white/[0.03] transition",children:[e.jsx("span",{className:"font-display text-primary/60 tabular-nums",children:String(d+1).padStart(2,"0")}),e.jsx("span",{className:"text-foreground/90",children:i.title}),e.jsx("span",{className:"text-muted-foreground text-[11px]",children:i.owner}),e.jsxs("span",{className:"text-muted-foreground tabular-nums text-[11px]",children:[i.minutes," min"]}),e.jsx("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase w-fit ${l.cls}`,children:l.label}),i.sourceFloor&&i.sourceRoom?e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:i.sourceFloor,roomId:i.sourceRoom},className:"text-[11px] text-primary hover:underline inline-flex items-center gap-1 justify-end",children:"Source →"}):e.jsx("button",{onClick:()=>v("Assigning owner…"),className:"text-[11px] text-amber-300 hover:underline text-right",children:"Assign owner"})]},i.id)})})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.4fr_1fr]",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Board Pack"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Artifacts & attachments"}),e.jsx("ul",{className:"space-y-2",children:qr.map(i=>{const d=Nm[i.status];return e.jsxs("li",{className:"grid grid-cols-[1fr_60px_100px_90px] items-center gap-3 text-xs p-2 rounded-md bg-black/40 border border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(J,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}
23),e.jsx("span",{className:"text-foreground/90 truncate",children:i.name})]}),e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:i.kind}),e.jsxs("span",{className:`inline-flex items-center gap-1.5 text-[10px] tracking-[0.18em] uppercase ${d.cls}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),d.label]}),i.status==="attached"?e.jsx("button",{onClick:()=>v.success(`${i.name} downloaded`),className:"text-[11px] text-primary hover:underline text-right",children:"Download"}):e.jsx("button",{onClick:()=>v.success(`${i.name} generation queued`),className:"text-[11px] text-amber-300 hover:underline text-right",children:"Generate"})]},i.id)})})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Pre-Read Distribution"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Board members"}),e.jsx("ul",{className:"space-y-2",children:Kr.map(i=>e.jsxs("li",{className:"flex items-center gap-3 text-xs p-2 rounded-md bg-black/40 border border-white/5",children:[e.jsx("div",{className:"h-7 w-7 rounded-full grid place-items-center bg-primary/15 text-primary font-display text-[11px] shrink-0",children:i.name.split(" ").map(d=>d[0]).join("").slice(0,2)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-foreground/90 truncate",children:i.name}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:i.role})]}),i.sent?e.jsxs("span",{className:"text-[10px] tracking-[0.18em] uppercase text-emerald-300 inline-flex items-center gap-1",children:[e.jsx(st,{className:"h-3 w-3"})," Sent"]}):e.jsxs("button",{onClick:()=>v.success(`Pre-read sent to ${i.name}`),className:"text-[10px] tracking-[0.18em] uppercase text-amber-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(Na,{className:"h-3 w-3"})," Send"]})]},i.id))})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"AI Talking Points"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Sound confident, anchored in the numbers"})]}),e.jsxs("button",{onClick:()=>v.success("Talking points refreshed from latest data"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(X,{className:"h-3.5 w-3.5"})," Refresh"]})]}),e.jsxs("ul",{className:"space-y-2 text-sm text-foreground/85",children:[e.jsxs("li",{className:"flex gap-2.5",children:[e.jsx("span",{className:"text-primary mt-1",children:"▸"}),e.jsxs("span",{children:["Revenue is up ",e.jsx("span",{className:"text-foreground",children:"34%"})," over the last 6 months, with gross margin expanding from 86% to 87%."]})]}),e.jsxs("li",{className:"flex gap-2.5",children:[e.jsx("span",{className:"text-primary mt-1",children:"▸"}),e.jsxs("span",{children:["Cash on hand is ",e.jsx("span",{className:"text-foreground",children:R(vt)})," · runway sits at ~9.1 months at current burn — comfortably past the next milestone."]})]}),e.jsxs("li",{className:"flex gap-2.5",children:[e.jsx("span",{className:"text-primary mt-1",children:"▸"}),e.jsxs("span",{children:["Investor pipeline carries ",e.jsx("span",{className:"text-foreground",children:"$1.5M committed"})," on a $2.5M seed; term sheet active with Wavelength Capital."]})]}),e.jsxs("li",{className:"flex gap-2.5",children:[e.jsx("span",{className:"text-primary mt-1",children:"▸"}
23),e.jsxs("span",{children:["Top risk is ",e.jsx("span",{className:"text-foreground",children:"customer concentration"})," — top 3 logos = 41% of revenue. Mitigation: 4 enterprise pilots in diligence."]})]}),e.jsxs("li",{className:"flex gap-2.5",children:[e.jsx("span",{className:"text-primary mt-1",children:"▸"}),e.jsx("span",{children:"Asks: approve Q3 hiring plan (3 senior eng), ratify SAFE conversion, greenlight pricing test for Pro tier."})]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Action Items · From Last Meeting"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"What's still open"}),e.jsx("ul",{className:"space-y-1.5",children:na.map(i=>e.jsxs("li",{className:"grid grid-cols-[1fr_80px_100px_80px] items-center gap-3 text-xs py-2 px-2 -mx-2 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"text-foreground/90",children:i.title}),e.jsx("span",{className:"text-muted-foreground text-[11px]",children:i.owner}),e.jsx("span",{className:"text-muted-foreground tabular-nums text-[11px]",children:i.due}),e.jsx("span",{className:`text-[10px] tracking-[0.18em] uppercase text-right ${i.status==="Done"?"text-emerald-300":i.status==="At risk"?"text-rose-300":"text-sky-300"}`,children:i.status})]},i.id))})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"ceo-reports"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Live Dashboard →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"state-of-business"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Business Health →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"investor-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Investor Prep →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"P&L →"})]})]})}
23function Mm(){const[t,r]=x.useState(xt[0].id),s=xt.find(o=>o.id===t)??xt[0],a=xt.filter(o=>o.stage==="closed"||o.stage==="term-sheet").reduce((o,c)=>o+c.check,0),i=a/$t.target*100,l=Jr.filter(o=>o.ready).length/Jr.length*100,n=["prospect","intro","diligence","term-sheet","closed"];return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"The fundraising staging area. Move investors through the pipeline, keep the data room airtight, and refine the founder narrative until every door opens cleanly."}),e.jsxs("div",{className:"rounded-md border border-primary/30 bg-gradient-to-r from-primary/10 to-transparent p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-4 mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Active Round"}),e.jsxs("div",{className:"font-display text-xl text-foreground glow-text mt-0.5",children:[$t.name," · ",R($t.target)," target"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"font-display text-2xl text-primary tabular-nums",children:[i.toFixed(0),"%"]}),e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"to close"})]})]}),e.jsx("div",{className:"h-2 w-full rounded-full bg-white/5 overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary shadow-[0_0_12px_var(--glow-soft)]",style:{width:`${Math.min(i,100)}%`}})}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 mt-3 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Committed"}),e.jsx("div",{className:"text-foreground/90 tabular-nums font-display text-base mt-0.5",children:R(a)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Remaining"}),e.jsx("div",{className:"text-foreground/90 tabular-nums font-display text-base mt-0.5",children:R($t.target-a)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Close Target"}),e.jsx("div",{className:"text-foreground/90 tabular-nums font-display text-base mt-0.5",children:$t.closeDate})]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Investor Pipeline"}),e.jsxs("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:[xt.length," investors in flight"]})]}),e.jsxs("button",{onClick:()=>v.success("Investor added to pipeline"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(De,{className:"h-3.5 w-3.5"})," Add"]})]}),e.jsx("div",{className:"grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-5",children:n.map(o=>{const c=Qr[o],u=xt.filter(g=>g.stage===o),m=u.reduce((g,p)=>g+p.check,0);return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:`px-2 py-1 rounded-sm border text-[10px] tracking-[0.18em] uppercase text-center ${c.cls}`,children:[c.label," · ",u.length]}),e.jsx("div",{className:"text-[10px] text-muted-foreground text-center tabular-nums",children:R(m,!0)}),e.jsx("div",{className:"space-y-1.5",children:u.map(g=>{const p=g.id===s.id;return e.jsxs("button",{onClick:()=>r(g.id),className:`w-full text-left p-2 rounded-md border transition ${p?"bg-primary/10 border-primary/40":"bg-black/40 border-white/5 hover:border-white/15"}`,children:[e.jsx("div",{className:"text-xs text-foreground/90 truncate",children:g.name}),e.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:g.firm}),e.jsx("div",{className:"text-[11px] text-primary tabular-nums mt-1",children:R(g.check,!0)})]},g.id)})})]},o)})})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:s.firm}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:s.name}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3 text-[11px]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Check Size"}
23),e.jsx("div",{className:"text-foreground/90 tabular-nums font-display text-base mt-0.5",children:R(s.check)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Stage"}),e.jsx("div",{className:"mt-0.5",children:e.jsx("span",{className:`inline-flex px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase ${Qr[s.stage].cls}`,children:Qr[s.stage].label})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Last Touch"}),e.jsx("div",{className:"text-foreground/90 tabular-nums mt-0.5",children:s.lastTouch})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground tracking-[0.18em] uppercase text-[10px]",children:"Next Step"}),e.jsx("div",{className:"text-foreground/90 mt-0.5",children:s.nextStep})]})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.jsx("button",{onClick:()=>v.success(`Follow-up logged for ${s.name}`),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition",children:"Log Touch"}),e.jsx("button",{onClick:()=>v("Data room link sent"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Share Data Room"}),e.jsx("button",{onClick:()=>v("Stage advanced"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Advance Stage →"})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:["Data Room · ",l.toFixed(0),"% ready"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Diligence artifacts"})]}),e.jsx("button",{onClick:()=>v.success("Data room opened in new tab"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Open"})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-white/5 overflow-hidden mb-3",children:e.jsx("div",{className:"h-full bg-primary",style:{width:`${l}%`}})}),e.jsx("ul",{className:"space-y-1.5",children:Jr.map(o=>e.jsxs("li",{className:"flex items-center gap-2.5 text-xs p-2 rounded-md bg-black/40 border border-white/5",children:[o.ready?e.jsx(st,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0"}):e.jsx(vr,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),e.jsx("span",{className:"flex-1 text-foreground/90 truncate",children:o.name}),o.ready?e.jsx("span",{className:"text-[10px] tracking-[0.18em] uppercase text-emerald-300",children:"Ready"}):e.jsx("button",{onClick:()=>v.success(`${o.name} marked ready`),className:"text-[10px] tracking-[0.18em] uppercase text-amber-300 hover:underline",children:"Mark Ready"})]},o.id))})]})]}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1.4fr_1fr]",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Founder Narrative"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"The three slides that matter"})]}),e.jsxs("button",{onClick:()=>v.success("Narrative polished by AI"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(X,{className:"h-3.5 w-3.5"})," Polish"]})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:[{title:"Problem",body:"Founders waste weeks each quarter pulling numbers from 6 tools just to brief investors and the board."},{title:"Solution",body:"TIB consolidates books, forecast, pipeline, and risk into one always-current operating picture."},{title:"Why Now",body:"AI agents make running a complete back-office feasible without a 5-person finance team."}].map(o=>e.jsxs("div",{className:"p-3 rounded-md bg-black/40 border border-white/5",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-primary/70",children:o.title}
23),e.jsx("p",{className:"text-xs text-foreground/85 mt-1.5 leading-relaxed",children:o.body})]},o.title))})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Cap Table Snapshot"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Post-round"}),e.jsx("div",{className:"flex h-3 w-full rounded-sm overflow-hidden mb-3",children:ia.map(o=>e.jsx("div",{className:o.cls,style:{width:`${o.pct}%`},title:`${o.label} · ${o.pct}%`},o.id))}),e.jsx("ul",{className:"space-y-1.5",children:ia.map(o=>e.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${o.cls} shrink-0`}),e.jsx("span",{className:"flex-1 text-foreground/85",children:o.label}),e.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[o.pct,"%"]})]},o.id))}),e.jsx("button",{onClick:()=>v("Full cap table opening…"),className:"mt-3 w-full px-3 py-2 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Open Full Cap Table"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"P&L →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"board-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Board Prep →"})]})]})}function Rm(){const t=he[he.length-1],r=he[he.length-2],s=t.revenue*12,a=r.revenue*12,i=s-a,d=Ze(t)/t.revenue*100,l=Pr(t),n=vt/l,o=Math.max(...he.map(g=>g.revenue)),c=Math.min(...he.map(g=>ke(g))),m=Math.max(...he.map(g=>ke(g)))-c||1;return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"Your live operating picture. The numbers above the line, the trend behind them, and the one signal that needs your attention today."}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[e.jsx(A,{label:"MRR",value:R(t.revenue,!0),sub:`ARR ${R(s,!0)}`}),e.jsx(A,{label:"Net New ARR",value:R(i,!0),sub:`${i>=0?"+":""}${(i/a*100).toFixed(1)}% MoM`}),e.jsx(A,{label:"Gross Margin",value:`${d.toFixed(1)}%`,sub:`${t.revenue>=r.revenue?"↑":"↓"} from ${(Ze(r)/r.revenue*100).toFixed(1)}%`}),e.jsx(A,{label:"Cash on Hand",value:R(vt,!0),sub:"Operating account"}),e.jsx(A,{label:"Runway",value:`${n.toFixed(1)} mo`,sub:"At current burn"}),e.jsx(A,{label:"Headcount",value:"24",sub:"3 open reqs"})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"6-Month Trend"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Revenue & net income"})]}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] tracking-[0.18em] uppercase",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-primary/60"})," Revenue"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-emerald-400"})," Net"]})]})]}),e.jsxs("div",{className:"relative h-48",children:[e.jsx("div",{className:"absolute inset-0 flex items-end gap-3",children:he.map(g=>{const p=Math.max(8,g.revenue/o*170);return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"text-[10px] text-muted-foreground tabular-nums",children:R(g.revenue,!0)}),e.jsx("div",{className:"w-full rounded-t-sm bg-primary/40 hover:bg-primary/60 transition",style:{height:`${p}px`}}),e.jsx("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:U(g.key)})]},g.key)})}),e.jsx("div",{className:"absolute inset-0 flex items-end gap-3 pointer-events-none pb-7",children:he.map(g=>{const p=ke(g),y=(p-c)/m*140+20;return e.jsx("div",{className:"flex-1 flex justify-center",style:{height:`${y}px`},children:e.jsx("div",{className:`h-2.5 w-2.5 rounded-full shadow-[0_0_10px_var(--glow-soft)] ${p>=0?"bg-emerald-400":"bg-rose-400"}`})},g.key)})})]})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(ls,{className:"h-3.5 w-3.5 text-sky-400"})," Sales Pulse"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-1",children:"3 new logos"}
23),e.jsxs("ul",{className:"text-xs text-foreground/80 space-y-1.5 mt-3",children:[e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Top deal"}),e.jsxs("span",{children:["Acme Co · ",R(48e3)]})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Pipeline"}),e.jsx("span",{children:R(384e3,!0)})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Coverage"}),e.jsx("span",{className:"text-emerald-300",children:"2.4×"})]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(Yn,{className:"h-3.5 w-3.5 text-emerald-400"})," Ops Pulse"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-1",children:"96% on-time"}),e.jsxs("ul",{className:"text-xs text-foreground/80 space-y-1.5 mt-3",children:[e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Work orders"}),e.jsx("span",{children:"14 open · 3 due wk"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Overdue POs"}),e.jsx("span",{className:"text-amber-300",children:"1"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"SLA breaches"}),e.jsx("span",{className:"text-emerald-300",children:"0"})]})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(ue,{className:"h-3.5 w-3.5 text-violet-400"})," People Pulse"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-1",children:"24 · 3 open"}),e.jsxs("ul",{className:"text-xs text-foreground/80 space-y-1.5 mt-3",children:[e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Open reqs"}),e.jsx("span",{children:"3 (2 senior eng)"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"eNPS"}),e.jsx("span",{className:"text-amber-300",children:"38 ↓ from 42"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Attrition"}),e.jsx("span",{className:"text-emerald-300",children:"3.2% TTM"})]})]})]})]}),e.jsxs("div",{className:"rounded-md border border-amber-400/30 bg-amber-400/5 p-4 flex items-start gap-3",children:[e.jsx(re,{className:"h-5 w-5 text-amber-300 shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-amber-300",children:"Today's Signal"}),e.jsx("div",{className:"text-sm text-foreground/90 mt-0.5",children:"Cash runway dropped 0.8 months this week as marketing spend ramped. Review the spike before it compounds — payroll runs Friday."})]}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition shrink-0",children:"Open Forecast"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"pnl"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"P&L →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"forecasting"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Forecast →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"6",roomId:"purchasing"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Purchasing →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"board-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Board Prep →"})]})]})}function Pm(){const t=Math.round(Xr.reduce((o,c)=>o+c.score,0)/Xr.length),r=t>=80?"Strong":t>=70?"Healthy":t>=60?"Stable":"Watch",s=t>=80?"text-emerald-300":t>=70?"text-sky-300":t>=60?"text-amber-300":"text-rose-300",a=64,i=2*Math.PI*a,d=t/100*i,l=["Gross margin · 86 → 87%","Revenue growth · +6.8% MoM","On-time delivery · 92 → 96%","Pipeline coverage · 1.8× → 2.4×"],n=["Customer concentration · top 3 at 41%","eNPS · 42 → 38","Senior eng hiring · 47 days open","Marketing CAC · up 18% MoM"];return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground
23/80 max-w-3xl leading-relaxed",children:"The honest scorecard. Five dimensions, one composite score, and the risk register that keeps strategy grounded in reality."}),e.jsxs("div",{className:"rounded-md border border-primary/30 bg-gradient-to-r from-primary/10 to-transparent p-5 flex flex-wrap items-center gap-6",children:[e.jsxs("div",{className:"relative h-40 w-40 shrink-0",children:[e.jsxs("svg",{viewBox:"0 0 160 160",className:"absolute inset-0 -rotate-90",children:[e.jsx("circle",{cx:"80",cy:"80",r:a,fill:"none",stroke:"oklch(1 0 0 / 0.08)",strokeWidth:"10"}),e.jsx("circle",{cx:"80",cy:"80",r:a,fill:"none",stroke:"var(--primary)",strokeWidth:"10",strokeLinecap:"round",strokeDasharray:`${d} ${i}`,style:{filter:"drop-shadow(0 0 8px var(--glow-soft))"}})]}),e.jsx("div",{className:"absolute inset-0 grid place-items-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"font-display text-4xl text-foreground tabular-nums glow-text",children:t}),e.jsx("div",{className:"text-[9px] tracking-[0.28em] uppercase text-muted-foreground",children:"of 100"})]})})]}),e.jsxs("div",{className:"flex-1 min-w-[220px]",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Business Health"}),e.jsx("div",{className:`font-display text-2xl mt-1 ${s}`,children:r}),e.jsx("p",{className:"text-sm text-foreground/80 mt-2 max-w-lg leading-relaxed",children:"Financials and operations are pulling weight; team and customer dimensions are where the next quarter's attention should land. No red flags, but two amber signals worth naming in the board narrative."})]})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-5",children:Xr.map(o=>{const c=o.icon,m=o.trend==="up"?Pe:o.trend==="down"?rt:Sr,g=o.trend==="up"?"text-emerald-300":o.trend==="down"?"text-rose-300":"text-muted-foreground";return e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{className:"h-3.5 w-3.5 text-primary"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:o.name})]}),e.jsx(m,{className:`h-3.5 w-3.5 ${g}`})]}),e.jsxs("div",{className:"flex items-baseline gap-2 mt-2",children:[e.jsx("div",{className:"font-display text-3xl text-foreground tabular-nums glow-text",children:o.score}),o.delta!==0&&e.jsxs("div",{className:`text-[11px] tabular-nums ${g}`,children:[o.delta>0?"+":"",o.delta]})]}),e.jsx("p",{className:"text-[11px] text-foreground/75 mt-2 leading-relaxed",children:o.commentary})]},o.id)})}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(Ta,{className:"h-3 w-3 inline mr-1"})," Risk Register"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5",children:"Top 6 risks"})]}),e.jsxs("button",{onClick:()=>v.success("Risk register exported"),className:"px-3 py-1.5 text-[11px] tracking-[0.18em] uppercase rounded-md glass hover:glow-edge inline-flex items-center gap-1.5",children:[e.jsx(ye,{className:"h-3.5 w-3.5"})," Export"]})]}),e.jsx("ul",{className:"space-y-1.5",children:wm.map(o=>e.jsxs("li",{className:"grid grid-cols-[1fr_90px_80px_80px_90px_110px] items-center gap-3 text-xs py-2 px-2 -mx-2 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"text-foreground/90 truncate",children:o.title}),e.jsx("span",{className:"text-muted-foreground text-[11px]",children:o.category}),e.jsx("span",{className:`text-center inline-flex justify-center px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase ${oa(o.likelihood)}`,children:o.likelihood}),e.jsx("span",{className:`text-center inline-flex justify-center px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase ${oa(o.impact)}`,children:o.impact}),e.jsx("span",{className:"text-muted-foreground text-[11px]",children:o.owner}),e.jsx("span",{className:`text-center inline-flex justify-center px-2 py-0.5 rounded-sm border text-[10px] tracking-[0.18em] uppercase ${km(o.mitigation)}`,children:o.mitigation})]},o.id))})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-emerald-400/30 bg-emerald-400/5 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-emerald-300 flex items-center gap-1.5",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"})," Improving"]}),e.jsx("ul",{className:"mt-3 space-y-1.5",children:l.map(o=>
23e.jsxs("li",{className:"text-xs text-foreground/85 flex gap-2",children:[e.jsx("span",{className:"text-emerald-300",children:"↑"}),o]},o))})]}),e.jsxs("div",{className:"rounded-md border border-amber-400/30 bg-amber-400/5 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-amber-300 flex items-center gap-1.5",children:[e.jsx(rt,{className:"h-3.5 w-3.5"})," Slipping"]}),e.jsx("ul",{className:"mt-3 space-y-1.5",children:n.map(o=>e.jsxs("li",{className:"text-xs text-foreground/85 flex gap-2",children:[e.jsx("span",{className:"text-amber-300",children:"↓"}),o]},o))})]})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground flex items-center gap-1.5",children:[e.jsx(X,{className:"h-3 w-3 text-primary"})," AI Read"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"This quarter, in three paragraphs"}),e.jsxs("div",{className:"space-y-3 text-sm text-foreground/85 leading-relaxed",children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:"Strengths."})," Financial fundamentals are sound — gross margin is expanding, runway is comfortably past the next milestone, and ops is executing on time. The business looks investable from a fundamentals lens."]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:"Watch items."})," Customer concentration and senior engineering hiring are the two amber dimensions. Neither is acute, but both compound if ignored for a quarter — and both are the kind of detail investors notice in diligence."]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:"Recommended focus."})," Close one of the four enterprise pilots in diligence to dilute concentration risk. In parallel, decide this week whether to keep the senior eng search in-house or engage a retained recruiter — 47 days open is the inflection point."]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"ceo-reports"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Live Dashboard →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"board-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Board Prep →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"conference-rooms"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Strategy Sessions →"})]})]})}function $m(){return e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx("p",{className:"text-sm text-foreground/80 max-w-3xl leading-relaxed",children:"A standing table with your AI advisors. Pick a room, pick a topic, and walk out with sharper thinking — not just notes."}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-4",children:la.map(t=>e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4 flex flex-col items-center text-center",children:[t.photo?e.jsx("img",{src:t.photo,alt:t.name,loading:"lazy",width:160,height:160,className:`h-20 w-20 rounded-full object-cover glow-edge ring-1 ring-primary/30 ${t.id==="adv-kristina"?"object-top":""}`}):e.jsx("div",{className:`h-20 w-20 rounded-full grid place-items-center font-display text-base ${t.tone}`,children:t.initials}),e.jsx("div",{className:"font-display text-base text-foreground glow-text mt-3",children:t.name}),e.jsx("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground mt-0.5",children:t.role}),e.jsx("p",{className:"text-[11px] text-foreground/70 mt-2 leading-relaxed flex-1",children:t.specialty}),e.jsxs("button",{onClick:()=>v.success(`Session booked with ${t.name}`),className:"mt-3 w-full px-3 py-2 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center justify-center gap-1.5",children:[e.jsx(ms,{className:"h-3.5 w-3.5"})," Book Session"]})]},t.id))}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Sm.map(t=>{const r=t.advisors.map(s=>la.find(a=>
23a.id===s)).filter(Boolean);return e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4 flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(Da,{className:"h-3.5 w-3.5 text-primary"}),"Conference Room"]}),e.jsx("div",{className:"font-display text-xl text-foreground glow-text mt-1",children:t.name}),e.jsx("p",{className:"text-xs text-foreground/75 mt-2 leading-relaxed flex-1",children:t.tagline}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:r.map(s=>e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border border-white/10 text-[10px] tracking-[0.18em] uppercase ${s.tone}`,children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current opacity-80"}),s.name.split(" ")[0]]},s.id))}),e.jsxs("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground mt-3",children:["Last session · ",t.lastSession]}),e.jsxs("button",{onClick:()=>v.success(`Session starting in the ${t.name}`),className:"mt-3 w-full px-3 py-2 text-[11px] tracking-[0.18em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center justify-center gap-1.5",children:[e.jsx(wa,{className:"h-3.5 w-3.5"})," Start Session"]})]},t.id)})}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsxs("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:[e.jsx(rs,{className:"h-3 w-3 inline mr-1"})," Recent Sessions"]}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Pick up where you left off"}),e.jsx("ul",{className:"space-y-1.5",children:Cm.map(t=>e.jsxs("li",{className:"grid grid-cols-[60px_140px_1fr_140px_90px] items-center gap-3 text-xs py-2 px-2 -mx-2 rounded-md hover:bg-white/[0.03] transition border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"text-muted-foreground text-[11px] tabular-nums",children:t.date}),e.jsx("span",{className:"text-foreground/85",children:t.room}),e.jsx("span",{className:"text-foreground/90 truncate",children:t.topic}),e.jsx("span",{className:"text-muted-foreground text-[11px] truncate",children:t.advisor}),e.jsx("button",{onClick:()=>v.success(`Resuming · ${t.topic}`),className:"text-[11px] text-primary hover:underline text-right",children:"Resume →"})]},t.id))})]}),e.jsxs("div",{className:"rounded-md border border-primary/20 bg-black/60 p-4",children:[e.jsx("div",{className:"text-[10px] tracking-[0.28em] uppercase text-muted-foreground",children:"Session Templates"}),e.jsx("div",{className:"font-display text-lg text-foreground glow-text mt-0.5 mb-3",children:"Pre-built playbooks"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Am.map(t=>e.jsx("button",{onClick:()=>v.success(`${t} template loaded`),className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:t},t))})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"board-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Board Prep →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"state-of-business"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Business Health →"}),e.jsx(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"7",roomId:"investor-prep"},className:"px-3 py-2 text-xs tracking-[0.18em] uppercase rounded-md glass hover:glow-edge",children:"Investor Prep →"})]})]})}const Dm=[{id:"nova",name:"Nova",role:"Sales Accelerator"},{id:"vega",name:"Vega",role:"Revenue Strategy"}],et=[{id:"outbound-smb",name:"SMB Outbound · 14-Day Sprint",category:"Cold Outbound",winRate:18,avgCycle:"21d",acv:"$4.8k",uses:312,summary:"Multi-touch email + LinkedIn sprint for sub-50 FTE accounts. Built for repeatable, BDR-led volume.",stages:[{name:"Prospect",conversion:"100% → 42%",moves:[{title:"Build ICP list (Apollo + LinkedIn Sales Nav)",detail
23:"Filter: 10–50 FTE, US, raised seed in last 18mo, no current sales tool."},{title:"Tier accounts A/B/C",detail:"Tier A = perfect ICP + warm signal. Bias touches 60/30/10 by tier."}]},{name:"Engage",conversion:"42% → 19%",moves:[{title:"Day 1 — Pattern interrupt email",detail:"Subject under 4 words. One-sentence observation, one-sentence ask. No deck."},{title:"Day 3 — LinkedIn connect, no pitch",detail:"Reference the email; offer a 1-line teardown of their funnel."},{title:"Day 7 — Loom teardown",detail:"90-second screen rec on their pricing page. End with: 'worth 12 min?'"},{title:"Day 14 — Break-up email",detail:"'Closing the loop' — release them. Reply rate spike on this touch."}]},{name:"Discovery",conversion:"19% → 64%",moves:[{title:"Open with their words",detail:"Mirror the exact phrase they used in reply. Don't pitch in the first 8 minutes."},{title:"Pain → Cost → Timeline",detail:"Quantify the pain in dollars before talking solution."}]},{name:"Close",conversion:"64% → 18%",moves:[{title:"Mutual action plan",detail:"Shared doc with milestones, signers, dates. Send within 24h of demo."},{title:"Soft trial close",detail:"'If we lined up X, would Friday work to start?' before sending paper."}]}]},{id:"inbound-plg",name:"Inbound · PLG Hand-Raiser",category:"Inbound",winRate:34,avgCycle:"9d",acv:"$2.1k",uses:488,summary:"Convert self-serve trial signups that hit the 'talk to sales' button. Fast, light-touch, mostly closing.",stages:[{name:"Triage",conversion:"100% → 88%",moves:[{title:"Score in <5 min",detail:"Use product usage + firmographics. Auto-route hot leads to live chat."}]},{name:"Connect",conversion:"88% → 61%",moves:[{title:"Speed-to-lead < 5 min",detail:"Every minute past 5 cuts conversion ~10%. Page the AE on Slack."},{title:"30-min call slot only",detail:"PLG leads are warm — don't oversell with a 60-min demo."}]},{name:"Close",conversion:"61% → 34%",moves:[{title:"Lead with usage data",detail:"'You've already shipped X — here's what your team unlocks at the next tier.'"},{title:"Annual prepay nudge",detail:"Offer 2 months free for annual. ~40% take it."}]}]},{id:"enterprise-meddic",name:"Enterprise MEDDIC · Multi-Threaded",category:"Enterprise",winRate:27,avgCycle:"118d",acv:"$84k",uses:41,summary:"6-figure deals into orgs with procurement, security review, and >3 stakeholders. Champion-led.",stages:[{name:"Qualify (MEDDIC)",conversion:"100% → 55%",moves:[{title:"Map M-E-D-D-I-C explicitly",detail:"Don't advance without Metrics, Economic Buyer, Decision Criteria, Process, Identified Pain, Champion."},{title:"Champion test",detail:"Will they take a 1:1 prep call before your exec meeting? If no, they're not the champion."}]},{name:"Validate",conversion:"55% → 41%",moves:[{title:"Technical win",detail:"Run a scoped POC with success criteria signed by the EB upfront."},{title:"Security & legal in parallel",detail:"Kick off SOC 2 / MSA review at POC start, not after verbal."}]},{name:"Negotiate",conversion:"41% → 27%",moves:[{title:"Concession ladder",detail:"Pre-define what you'll trade (term length, ramp, payment terms) and what you won't (price floor, SLA)."},{title:"Procurement playbook",detail:"Loop procurement in week 6, not week 14. Bring the EB into pricing conversations once."}]}]},{id:"renewals-net-retention",name:"Renewals · Net Retention Push",category:"Renewals",winRate:91,avgCycle:"30d",acv:"$11.4k",uses:156,summary:"90-day pre-renewal motion to lift gross + net retention. Built for CSMs co-piloted by AEs.",stages:[{name:"T-90 Health Check",conversion:"100% → 96%",moves:[{title:"Score account health",detail:"Usage trend, exec sponsor, support tickets, NPS. Red accounts get an AE attached."}]},{name:"T-60 Value Review",conversion:"96% → 93%",moves:[{title:"Quantified value recap",detail:"Bring receipts: hours saved, revenue influenced, tickets deflected."},{title:"Expansion plant",detail:"Surface 1 logical add-on. Don't push — plant it."}]},{name:"T-30 Close",conversion:"93% → 91%",moves:[{title:"Auto-renew + multi-year",detail:"Offer 5% discount for 2yr lock. ~30% take it; lifts NRR."}]}]},{id:"winback-lapsed",name:"Win-Back · 90-Day Lapsed",category:"Win-Back",winRate:12,avgCycle:"18d",acv:"$3.2k",uses:64,summary:"Re-open conversations with churned or stalled accounts. Honest, light-touch, no pitch decks.",stages:[{name:"Diagnose",conversion:"100% → 38
23%",moves:[{title:"Read the exit notes",detail:"Don't reach out until you can name the reason they left in one sentence."}]},{name:"Reach Out",conversion:"38% → 22%",moves:[{title:"'We fixed X' email",detail:"Reference their exact complaint and the change. No CTA except 'worth another look?'"}]},{name:"Reactivate",conversion:"22% → 12%",moves:[{title:"Risk-free re-onboarding",detail:"Offer a 30-day no-charge return with white-glove setup."}]}]}],Tm=[{objection:"Send me some info.",response:"Happy to — what's the one question you'd want answered first? I'll send a 90-sec Loom on exactly that."},{objection:"We're already using [competitor].",response:"Good — most of our best customers came from them. What's the one thing you wish it did better?"},{objection:"No budget right now.",response:"Hear you. If we built the case and it paid for itself in Q1, would budget be a blocker — or just timing?"},{objection:"Send me a proposal.",response:"I will, but I need 10 min first so it's actually useful. What's the worst-case ROI you'd need to see?"},{objection:"Call me back next quarter.",response:"Will do — and so I don't waste your time, what changes by then that makes this a 'yes'?"},{objection:"Your price is too high.",response:"Compared to what? If we're 3x the alternative, that's a value conversation, not a price one."}],Fm=[{competitor:"Incumbent SaaS A",theirStrength:"Brand + procurement-friendly",ourWedge:"10x faster time-to-value, no SI required",trap:"Ask: 'How long was your last rollout?'"},{competitor:"Open-source DIY",theirStrength:"Zero license cost",ourWedge:"Total cost of ownership: support, hosting, eng hours",trap:"Quantify FTE-hours/year spent maintaining it."},{competitor:"Point Tool B",theirStrength:"Cheap, narrow feature",ourWedge:"Integrated workflow — no stitching, no Zapier tax",trap:"Count their current integrations bill."},{competitor:"In-house build",theirStrength:"Custom fit",ourWedge:"18-mo roadmap risk vs. shipping next week",trap:"'What does eng's roadmap look like without this?'"}],Om=["Cold Outbound","Inbound","Enterprise","Renewals","Win-Back","Channel"];function Zr(t){switch(t){case"Cold Outbound":return"bg-sky-500/10 border-sky-500/40 text-sky-300";
23case"Inbound":return"bg-emerald-500/10 border-emerald-500/40 text-emerald-300";case"Enterprise":return"bg-fuchsia-500/10 border-fuchsia-500/40 text-fuchsia-300";case"Renewals":return"bg-primary/10 border-primary/40 text-primary";case"Win-Back":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Channel":return"bg-violet-500/10 border-violet-500/40 text-violet-300"}}function Em(){const t=et.reduce((s,a)=>s+a.uses,0),r=Math.round(et.reduce((s,a)=>s+a.winRate*a.uses,0)/t);return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/35 bg-black/80 px-4 py-3 flex flex-wrap items-center gap-3 justify-between shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"Sales Coach Bar"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:Dm.map(s=>e.jsxs(j,{to:"/agent/$agentId",params:{agentId:s.id},className:"flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/20 hover:glow-edge transition",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:s.name[0]}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[11px] text-foreground/90",children:s.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:s.role})]})]},s.id))})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"analytics"},className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center gap-1.5",children:["Open Pipeline ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:Re,label:"Active Playbooks",value:String(et.length)}),e.jsx(T,{icon:Pe,label:"Blended Win Rate",value:`${r}%`}),e.jsx(T,{icon:wr,label:"Deals Run",value:String(t)}),e.jsx(T,{icon:X,label:"Top Move",value:"Loom Teardown"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("button",{onClick:()=>v.info("Nova will scaffold a new playbook — ICP, stages, moves, and scripts."),className:"rounded-lg border border-primary/35 bg-black/75 hover:bg-black/85 transition p-4 text-left shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(De,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Build a Playbook"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Start from a template or your last 10 closed-won deals."})]}),e.jsxs("button",{onClick:()=>v.info("Nova will generate a discovery script tuned to your ICP and last objection patterns."),className:"rounded-lg border border-primary/35 bg-black/75 hover:bg-black/85 transition p-4 text-left shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(J,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Generate Discovery Script"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"BANT, MEDDIC, or custom — pain-first, no pitching."})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"3",roomId:"live-promos"},className:"rounded-lg border border-primary/35 bg-black/75 hover:bg-black/85 transition p-4 text-left shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(zt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Pair with a Promo"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Attach an active offer to lift conversion on the playbook."}),e.jsxs("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground inline-flex items-center gap-1",children:["Open Active Promotions ",e.jsx(V,{className:"h-3 w-3"})]})]})]})]})}
23function Lm(){const[t,r]=x.useState(et[0].id),[s,a]=x.useState(null),[i,d]=x.useState(""),l=et.filter(o=>!(s&&o.category!==s||i&&!o.name.toLowerCase().includes(i.toLowerCase()))),n=et.find(o=>o.id===t)??et[0];return e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[300px_1fr_300px] gap-3 min-h-[620px]",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/95 p-4 space-y-3 shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(Re,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Playbook Library"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Ut,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx("input",{value:i,onChange:o=>d(o.target.value),placeholder:"Search playbooks…",className:"w-full pl-7 pr-2 py-1.5 text-xs rounded-md bg-black/50 border border-white/10 focus:border-primary/50 outline-none"})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:Om.map(o=>e.jsx("button",{onClick:()=>a(s===o?null:o),className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${s===o?Zr(o):"border-white/10 text-muted-foreground hover:text-foreground/90"}`,children:o},o))}),e.jsxs("div",{className:"space-y-2 pt-1",children:[l.map(o=>e.jsxs("button",{onClick:()=>r(o.id),className:`w-full text-left rounded-md border p-2.5 transition ${o.id===t?"border-primary/60 bg-primary/10 glow-edge":"border-white/10 bg-black/40 hover:border-primary/40"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"text-[12px] text-foreground/95 leading-snug",children:o.name}),e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${Zr(o.category)} shrink-0`,children:o.category})]}),e.jsxs("div",{className:"mt-1.5 grid grid-cols-3 gap-1 text-[10px] tabular-nums",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Win "}),e.jsxs("span",{className:"text-emerald-300",children:[o.winRate,"%"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Cyc "}),e.jsx("span",{className:"text-foreground/80",children:o.avgCycle})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"ACV "}),e.jsx("span",{className:"text-foreground/80",children:o.acv})]})]})]},o.id)),l.length===0&&e.jsx("div",{className:"text-xs text-muted-foreground italic py-4 text-center",children:"No playbooks match."})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/95 p-4 space-y-4 shadow-xl",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-display text-lg text-primary glow-text",children:n.name}),e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${Zr(n.category)}`,children:n.category})]}),e.jsx("p",{className:"mt-1 text-xs text-foreground/75 max-w-2xl",children:n.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>v.info(`Nova attached "${n.name}" to your active pipeline.`),className:"px-2.5 py-1 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 inline-flex items-center gap-1.5",children:[e.jsx(ds,{className:"h-3 w-3"})," Run This Play"]}),e.jsxs("button",{onClick:()=>v.info(`Forking "${n.name}" — Nova will tailor it to your last 10 deals.`),className:"px-2.5 py-1 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary inline-flex items-center gap-1.5",children:[e.jsx(ka,{className:"h-3 w-3"})," Fork & Tune"]})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 text-center",children:[e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 py-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Win Rate"}),e.jsxs("div",{className:"text-sm text-emerald-300 tabular-nums",children:[n.winRate,"%"]})]}),e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 py-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Avg Cycle"}
23),e.jsx("div",{className:"text-sm text-foreground/90 tabular-nums",children:n.avgCycle})]}),e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 py-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Avg ACV"}),e.jsx("div",{className:"text-sm text-foreground/90 tabular-nums",children:n.acv})]}),e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 py-2",children:[e.jsx("div",{className:"text-[9px] tracking-[0.2em] uppercase text-muted-foreground",children:"Deals Run"}),e.jsx("div",{className:"text-sm text-foreground/90 tabular-nums",children:n.uses})]})]}),e.jsx("div",{className:"space-y-3",children:n.stages.map((o,c)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-display text-[11px] text-primary tabular-nums",children:["0",c+1]}),e.jsx("span",{className:"text-[12px] tracking-[0.18em] uppercase text-foreground/95",children:o.name})]}),e.jsx("span",{className:"text-[10px] tabular-nums text-emerald-300/90",children:o.conversion})]}),e.jsx("div",{className:"mt-2 space-y-2",children:o.moves.map((u,m)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-primary shrink-0 shadow-[0_0_6px_var(--glow)]"}),e.jsxs("div",{className:"leading-snug",children:[e.jsx("div",{className:"text-[12px] text-foreground/95",children:u.title}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:u.detail})]})]},m))})]},c))})]}),e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/95 p-4 space-y-4 shadow-xl",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[e.jsx(Ca,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Objection Handling"})]}),e.jsx("div",{className:"space-y-2",children:Tm.map((o,c)=>e.jsxs("details",{className:"rounded-md border border-white/10 bg-black/40 p-2.5 group",children:[e.jsxs("summary",{className:"cursor-pointer text-[11px] text-foreground/90 list-none flex items-center justify-between gap-2",children:[e.jsxs("span",{children:['"',o.objection,'"']}),e.jsx(V,{className:"h-3 w-3 text-muted-foreground group-open:rotate-90 transition"})]}),e.jsx("div",{className:"mt-2 text-[11px] text-primary/90 leading-snug border-l border-primary/40 pl-2",children:o.response})]},c))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[e.jsx(Bt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Competitive Battlecards"})]}),e.jsx("div",{className:"space-y-2",children:Fm.map((o,c)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-2.5",children:[e.jsx("div",{className:"text-[11px] text-foreground/95",children:o.competitor}),e.jsxs("div",{className:"mt-1.5 space-y-1 text-[10px] leading-snug",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground tracking-[0.18em] uppercase mr-1",children:"Their edge:"}),e.jsx("span",{className:"text-foreground/80",children:o.theirStrength})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-primary tracking-[0.18em] uppercase mr-1",children:"Our wedge:"}),e.jsx("span",{className:"text-foreground/90",children:o.ourWedge})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-amber-300/90 tracking-[0.18em] uppercase mr-1",children:"Trap:"}),e.jsx("span",{className:"text-foreground/80",children:o.trap})]})]})]},c))})]})]})]})})}const _m=[{id:"atlas",name:"Atlas",role:"Trademarks & Filings"},{id:"vega",name:"Vega",role:"Copyrights & Assignments"},{id:"wren",name:"Wren",role:"Renewals & Monitoring"}],ht=[{name:"FFAI (wordmark)",type:"Trademark",registration:"USPTO 7,214,882",jurisdiction:"US · Class 9, 42",filed:"2024-02-11",expires:"2034-11-19",status:"Registered",owner:"Atlas"},{name:"TIB Building Logo",type:"Trademark",registration:"USPTO 7,301,455",jurisdiction:"US · Class 42",filed:"2024-08-04",expires:"2035-02-08",status:"Registered",owner:"Atlas"},{name:"The Intelligence Building",type:"Trademark",registration:"USPTO 98/445,210",jurisdiction:"US · Class 42",filed:"2025-01-30",expires:"—",status:"Pending",owner:"Atlas"},{name:"FFAI (EU wordmark)",type:"Trademark",registration:"EUIPO 019108221",jurisdiction:"EU · Class 9, 42",filed:"2024-09-12",expires:"2034-09-12",status:"Registered",owner:"Atlas"},{name:"Mr. FFAI Avatar Artwork",type:"Copyright",registration:"VA 2-385-119",jurisdiction:"US Copyright Office",filed:"2024-03-08",expires:"—",status:"Registered",owner:"Vega"},{name:"TIB Floor Plan Illustrations",type:"Copyright",registration:"VA 2-401-882",jurisdiction:"US Copyright Office",filed:"2024-07-22",expires:"—",status:"Registered",owner:"Vega"},{name:"Onboarding Voice Scripts (Jamie)",type:"Copyright",registration:"TX 9-118-440",jurisdiction:"US Copyright Office",filed:"2024-11-04",expires:"—",status:"Registered",owner:"Vega"},{name:"Agent Routing Method",type:"Patent",registration:"App. 18/445,612",jurisdiction:"USPTO · Provisional → Non-Prov",filed:"2024-05-14",expires:"2044-05-14",status:"Pending",owner:"Atlas"},{name:"Multi-Floor Memory Architecture",type:"Patent",registration:"Provisional 63/812,004",jurisdiction:"USPTO",filed:"2025-02-02",expires:"2026-02-02",status:"Renewal Due",owner:"Atlas"},{name:"Prompt Library v1 (proprietary)",type:"Trade Secret",registration:"Internal Vault #TS-014",jurisdiction:"Internal",filed:"2023-09-01",expires:"—",status:"Registered",owner:"Vega"},{name:"Agent Persona Tuning Recipes",type:"Trade Secret",registration:"Internal Vault #TS-022",jurisdiction:"Internal",filed:"2024-01-18",expires:"—",status:"Registered",owner:"Vega"},{name:"ffai.com",type:"Domain",registration:"GoDaddy",jurisdiction:"ICANN",filed:"2023-04-10",expires:"2027-04-10",status:"Registered",owner:"Wren"},{name:"intelligencebuilding.app",type:"Domain",registration:"Cloudflare",jurisdiction:"ICANN",filed:"2024-02-01",expires:"2026-02-01",status:"Renewal Due",owner:"Wren"},{name:"ffai.legacy-redirect.com",type:"Domain",registration:"Namecheap",jurisdiction:"ICANN",filed:"2023-05-22",expires:"2024-05-22",status:"Abandoned",owner:"Wren"}],Bm=["All","Trademark","Copyright","Patent","Trade Secret","Domain"],Hm=["Registered","Pending","Renewal Due","Abandoned"];function da(t){switch(t){case"Registered":return"bg-emerald-500/10 border-emerald-500/40 text-emerald-300";
23case"Pending":return"bg-sky-500/10 border-sky-500/40 text-sky-300";case"Renewal Due":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Abandoned":return"bg-rose-500/10 border-rose-500/40 text-rose-300"}}function Wm(t){switch(t){case"Trademark":return ze;case"Copyright":return J;case"Patent":return us;case"Trade Secret":return Pa;case"Domain":return kr}}const Vm=[{name:"FFAI.AI (squat attempt)",source:"Domain monitor",flagged:"3d ago",severity:"High"},{name:"FFAi-pro on Etsy",source:"Marketplace sweep",flagged:"6d ago",severity:"Medium"},{name:"Forge & Foundry Coffee Co.",source:"USPTO TESS watch",flagged:"12d ago",severity:"Low"},{name:"tib-app.com (typo squat)",source:"Domain monitor",flagged:"2w ago",severity:"Medium"}],Gm=[{name:"intelligencebuilding.app · renewal",due:"Feb 1",days:28},{name:"Multi-Floor Memory · non-provisional conversion",due:"Feb 2",days:29},{name:"EU wordmark · maintenance declaration",due:"Sep 12",days:252},{name:"FFAI wordmark · §8 declaration",due:"Nov 19",days:320}];function Um(t){switch(t){case"High":return"bg-rose-500/10 border-rose-500/40 text-rose-300";case"Medium":return"bg-amber-500/10 border-amber-500/40 text-amber-300";case"Low":return"bg-sky-500/10 border-sky-500/40 text-sky-300"}}function zm(){const t={trademarks:ht.filter(r=>r.type==="Trademark").length,copyrights:ht.filter(r=>r.type==="Copyright").length,patents:ht.filter(r=>r.type==="Patent").length,renewals:ht.filter(r=>r.status==="Renewal Due").length};return e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-primary/30 bg-black/40 px-4 py-3 flex flex-wrap items-center gap-3 justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase text-primary glow-text",children:"IP Counsel Bar"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:_m.map(r=>e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 rounded-md glass border border-primary/20",children:[e.jsx("span",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-primary/60 to-primary/20 grid place-items-center text-[10px] font-display text-primary-foreground",children:r.name[0]}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[11px] text-foreground/90",children:r.name}),e.jsx("div",{className:"text-[9px] tracking-[0.18em] uppercase text-muted-foreground",children:r.role})]})]},r.id))})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"compliance-center"},className:"px-3 py-1.5 text-[10px] tracking-[0.22em] uppercase rounded-md bg-primary text-primary-foreground hover:opacity-90 transition inline-flex items-center gap-1.5",children:["Open Compliance ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(T,{icon:ze,label:"Trademarks",value:String(t.trademarks)}),e.jsx(T,{icon:J,label:"Copyrights",value:String(t.copyrights)}),e.jsx(T,{icon:us,label:"Patents Filed",value:String(t.patents)}),e.jsx(T,{icon:ie,label:"Renewals Due",value:String(t.renewals)})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("button",{onClick:()=>v.info("Atlas will run a USPTO TESS clearance search and report likelihood-of-confusion risk."),className:"rounded-lg border border-dashed border-primary/40 bg-primary/5 hover:bg-primary/10 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Trademark Search"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Clear a new mark before you file. Atlas runs TESS + common-law sweeps."})]}),e.jsxs(j,{to:"/floor/$floorId/room/$roomId",params:{floorId:"8",roomId:"contract-drafting"},className:"rounded-lg border border-primary/40 bg-gradient-to-br from-primary/10 to-transparent hover:from-primary/20 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(X,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Draft IP Assignment"})]}
23),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Confirmatory assignment, work-for-hire, or NDA — generated in Drafting."}),e.jsxs("div",{className:"mt-1 text-[10px] tracking-[0.18em] uppercase text-muted-foreground inline-flex items-center gap-1",children:["Open Drafting Studio ",e.jsx(V,{className:"h-3 w-3"})]})]}),e.jsxs("button",{onClick:()=>v.info("Drop a logo, manuscript, or source archive — Vega will tag and file under the right class."),className:"rounded-lg border border-dashed border-primary/40 bg-primary/5 hover:bg-primary/10 transition p-4 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(jt,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[11px] tracking-[0.22em] uppercase glow-text",children:"Register New Asset"})]}),e.jsx("div",{className:"mt-1.5 text-sm text-foreground/85",children:"Upload artwork, code, or specimen — we'll route to USPTO or Copyright Office."})]})]})]})}function Ym(){const[t,r]=x.useState("All"),[s,a]=x.useState(null),[i,d]=x.useState(""),l=ht.filter(n=>{if(t!=="All"&&n.type!==t||s&&n.status!==s)return!1;if(i){const o=i.toLowerCase();if(!n.name.toLowerCase().includes(o)&&!n.registration.toLowerCase().includes(o))return!1}return!0});return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-3 min-h-[560px]",children:[e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(ps,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"IP Portfolio"})]}),e.jsxs("div",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground",children:[l.length," of ",ht.length," assets"]})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 border-b border-white/10 pb-2",children:Bm.map(n=>e.jsx("button",{onClick:()=>r(n),className:`px-2.5 py-1 text-[10px] tracking-[0.18em] uppercase rounded ${t===n?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground/90 hover:bg-white/5"}`,children:n},n))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1 min-w-[180px]",children:[e.jsx(Ut,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx("input",{value:i,onChange:n=>d(n.target.value),placeholder:"Search marks, registration #…",className:"w-full pl-7 pr-2 py-1.5 text-xs rounded-md bg-black/50 border border-white/10 focus:border-primary/50 outline-none"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Hm.map(n=>e.jsx("button",{onClick:()=>a(s===n?null:n),className:`px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border ${s===n?da(n):"border-white/10 text-muted-foreground hover:text-foreground/90"}`,children:n},n))})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10px] tracking-[0.2em] uppercase text-muted-foreground border-b border-white/10",children:[e.jsx("th",{className:"text-left py-2 px-2 font-normal",children:"Asset"}),e.jsx("th",{className:"text-left py-2 px-2 font-normal",children:"Reg #"}),e.jsx("th",{className:"text-left py-2 px-2 font-normal",children:"Jurisdiction"}),e.jsx("th",{className:"text-left py-2 px-2 font-normal",children:"Expires"}),e.jsx("th",{className:"text-left py-2 px-2 font-normal",children:"Status"}),e.jsx("th",{className:"text-right py-2 px-2 font-normal",children:"Actions"})]})}),e.jsxs("tbody",{children:[l.map((n,o)=>{const c=Wm(n.type);return e.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{className:"h-3.5 w-3.5 text-primary/80 shrink-0"}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-foreground
23/95",children:n.name}),e.jsxs("div",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:[n.type," · ",n.owner]})]})]})}),e.jsx("td",{className:"py-2 px-2 text-foreground/80 tabular-nums",children:n.registration}),e.jsx("td",{className:"py-2 px-2 text-foreground/80",children:n.jurisdiction}),e.jsx("td",{className:"py-2 px-2 text-foreground/80 tabular-nums",children:n.expires}),e.jsx("td",{className:"py-2 px-2",children:e.jsx("span",{className:`px-2 py-0.5 text-[10px] tracking-[0.18em] uppercase rounded border ${da(n.status)}`,children:n.status})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[e.jsx("button",{onClick:()=>v.info(`Opening ${n.name}…`),title:"View",className:"h-7 w-7 grid place-items-center rounded hover:bg-white/10 text-muted-foreground hover:text-primary",children:e.jsx(va,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>v.info(`Downloading certificate for ${n.name}…`),title:"Download certificate",className:"h-7 w-7 grid place-items-center rounded hover:bg-white/10 text-muted-foreground hover:text-primary",children:e.jsx(ye,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>
23v.info(`Wren scheduled a renewal reminder for ${n.name}.`),title:"Schedule renewal",className:"h-7 w-7 grid place-items-center rounded hover:bg-white/10 text-muted-foreground hover:text-primary",children:e.jsx(ie,{className:"h-3.5 w-3.5"})})]})})]},o)}),l.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"py-8 text-center text-muted-foreground italic",children:"No assets match these filters."})})]})]})})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(ie,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Upcoming Deadlines"})]}),e.jsx("div",{className:"space-y-2",children:Gm.map((n,o)=>{const c=n.days<=30?"border-amber-500/40 bg-amber-500/5":"border-white/10 bg-black/30";return e.jsxs("div",{className:`rounded-md border p-3 ${c}`,children:[e.jsx("div",{className:"text-[11px] text-foreground/95 leading-snug",children:n.name}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsxs("span",{className:"text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:["Due ",n.due]}),e.jsxs("span",{className:`text-[10px] tabular-nums ${n.days<=30?"text-amber-300":"text-foreground/70"}`,children:[n.days,"d"]})]})]},o)})}),e.jsx("button",{onClick:()=>v.info("Synced renewals to your calendar — Wren will nudge you 30 days out."),className:"w-full mt-1 px-3 py-2 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary",children:"Sync to Calendar"})]})]}),e.jsxs("div",{className:"rounded-lg border border-primary/20 bg-black/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(Sa,{className:"h-4 w-4"}),e.jsx("span",{className:"text-[10px] tracking-[0.28em] uppercase glow-text",children:"Brand Watch & Enforcement"})]}),e.jsxs("button",{onClick:()=>v.info("Atlas will draft a cease-and-desist for the selected target."),className:"px-2.5 py-1 text-[10px] tracking-[0.22em] uppercase rounded-md glass border border-primary/30 hover:glow-edge text-primary inline-flex items-center gap-1.5",children:[e.jsx(Bt,{className:"h-3 w-3"})," Draft C&D"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-3",children:Vm.map((n,o)=>e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"text-[12px] text-foreground/95 leading-snug",children:n.name}),e.jsx("span",{className:`px-1.5 py-0.5 text-[9px] tracking-[0.18em] uppercase rounded border ${Um(n.severity)}`,children:n.severity})]}),e.jsx("div",{className:"mt-2 text-[10px] tracking-[0.18em] uppercase text-muted-foreground",children:n.source}),e.jsxs("div",{className:"mt-0.5 text-[10px] text-muted-foreground",children:["Flagged ",n.flagged]}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("button",{onClick:()=>v.info(`Reviewing ${n.name}…`),className:"flex-1 px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border border-white/10 text-muted-foreground hover:text-foreground/90",children:"Review"}),e.jsx("button",{onClick:()=>v.info(`Dismissed ${n.name}.`),className:"px-2 py-1 text-[10px] tracking-[0.18em] uppercase rounded border border-white/10 text-muted-foreground hover:text-foreground/90",children:"Dismiss"})]})]},o))})]})]})}export{Ip as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.