// Sample data + tiny inline icon components (Lucide-style strokes).

// ──────────────── Icons ────────────────
const Icon = ({ d, fill, size = 18, sw = 1.75, children, style }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill={fill || "none"}
       stroke="currentColor" strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round"
       style={style}>
    {d ? <path d={d} /> : children}
  </svg>
);

const I = {
  home: (p) => <Icon {...p}><path d="M3 11l9-8 9 8"/><path d="M5 10v10h14V10"/></Icon>,
  calendar: (p) => <Icon {...p}><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></Icon>,
  doc: (p) => <Icon {...p}><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M9 13h6M9 17h6"/></Icon>,
  book: (p) => <Icon {...p}><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5z"/><path d="M4 5.5v14"/></Icon>,
  shield: (p) => <Icon {...p}><path d="M12 2l8 4v6c0 5-3.5 9-8 10-4.5-1-8-5-8-10V6l8-4z"/></Icon>,
  user: (p) => <Icon {...p}><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8"/></Icon>,
  laptop: (p) => <Icon {...p}><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M2 20h20"/></Icon>,
  dollar: (p) => <Icon {...p}><path d="M12 2v20M17 6H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></Icon>,
  bell: (p) => <Icon {...p}><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10 21a2 2 0 0 0 4 0"/></Icon>,
  search: (p) => <Icon {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></Icon>,
  help: (p) => <Icon {...p}><circle cx="12" cy="12" r="10"/><path d="M9.1 9a3 3 0 0 1 5.8 1c0 2-3 2.5-3 4.5"/><path d="M12 18h.01"/></Icon>,
  check: (p) => <Icon {...p}><path d="m4 12 5 5L20 6"/></Icon>,
  arrow: (p) => <Icon {...p}><path d="M5 12h14M13 6l6 6-6 6"/></Icon>,
  arrowL: (p) => <Icon {...p}><path d="M19 12H5M11 6l-6 6 6 6"/></Icon>,
  plus: (p) => <Icon {...p}><path d="M12 5v14M5 12h14"/></Icon>,
  more: (p) => <Icon {...p}><circle cx="5" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="19" cy="12" r="1.5"/></Icon>,
  zoom: (p) => <Icon {...p}><rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3z"/></Icon>,
  pen: (p) => <Icon {...p}><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4z"/></Icon>,
  github: (p) => <Icon {...p} fill="currentColor" sw={0}><path d="M12 .5C5.7.5.5 5.7.5 12c0 5.1 3.3 9.4 7.8 10.9.6.1.8-.2.8-.6v-2.1c-3.2.7-3.9-1.4-3.9-1.4-.5-1.3-1.3-1.7-1.3-1.7-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.7-1.6-2.6-.3-5.3-1.3-5.3-5.7 0-1.3.4-2.3 1.2-3.1-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.2 1.2.9-.3 1.9-.4 2.9-.4s2 .1 2.9.4c2.2-1.5 3.2-1.2 3.2-1.2.6 1.6.2 2.8.1 3.1.7.8 1.2 1.8 1.2 3.1 0 4.4-2.7 5.4-5.3 5.7.4.4.8 1.1.8 2.2v3.2c0 .3.2.7.8.6 4.5-1.5 7.8-5.8 7.8-10.9C23.5 5.7 18.3.5 12 .5z"/></Icon>,
  slack: (p) => <Icon {...p} fill="currentColor" sw={0}><path d="M5 15a2 2 0 1 1-2-2h2zm1 0a2 2 0 1 1 4 0v5a2 2 0 1 1-4 0zM9 5a2 2 0 1 1 2-2v2zm0 1a2 2 0 1 1 0 4H4a2 2 0 1 1 0-4zm10 3a2 2 0 1 1 2 2h-2zm-1 0a2 2 0 1 1-4 0V4a2 2 0 1 1 4 0zm-3 10a2 2 0 1 1-2 2v-2zm0-1a2 2 0 1 1 0-4h5a2 2 0 1 1 0 4z"/></Icon>,
  fig: (p) => <Icon {...p}><circle cx="9" cy="6" r="3"/><circle cx="9" cy="12" r="3"/><circle cx="9" cy="18" r="3"/><circle cx="15" cy="6" r="3"/><circle cx="15" cy="12" r="3"/></Icon>,
  notion: (p) => <Icon {...p}><rect x="4" y="3" width="16" height="18" rx="2"/><path d="M9 7v10M9 7l6 10V7"/></Icon>,
  sun: (p) => <Icon {...p}><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></Icon>,
  moon: (p) => <Icon {...p}><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></Icon>,
  paint: (p) => <Icon {...p}><path d="M19 11h2a2 2 0 0 1 0 4h-1v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v4z"/><circle cx="9" cy="9" r="1"/><circle cx="13" cy="7" r="1"/></Icon>,
  layout: (p) => <Icon {...p}><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/></Icon>,
  download: (p) => <Icon {...p}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"/></Icon>,
  clock: (p) => <Icon {...p}><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></Icon>,
  play: (p) => <Icon {...p} fill="currentColor" sw={0}><path d="M6 4l14 8-14 8z"/></Icon>,
  package: (p) => <Icon {...p}><path d="M16.5 9.4 7.5 4.21M21 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16zM3.27 6.96 12 12.01l8.73-5.05M12 22.08V12"/></Icon>,
  lock: (p) => <Icon {...p}><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 1 1 8 0v4"/></Icon>,
  sparkle: (p) => <Icon {...p}><path d="M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5z"/><path d="M19 14v4M17 16h4M5 17v3M3.5 18.5h3"/></Icon>,
  wave: (p) => <Icon {...p}><path d="M2 17s2-3 5-3 5 3 8 3 5-3 7-3M2 11s2-3 5-3 5 3 8 3 5-3 7-3"/></Icon>,
  family: (p) => <Icon {...p}><circle cx="9" cy="7" r="3"/><circle cx="17" cy="9" r="2"/><path d="M3 21c0-3.3 2.7-6 6-6s6 2.7 6 6M14 21c0-2.2 1.8-4 4-4s4 1.8 4 4"/></Icon>,
  heart: (p) => <Icon {...p}><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></Icon>,
  tooth: (p) => <Icon {...p}><path d="M12 5.5c-2-1.5-5-1-6 1s.5 5 1 7 0 5 2 6 2-3 3-3 1 4 3 3 1.5-4 2-6 2-5 1-7-4-2.5-6-1z"/></Icon>,
  eye: (p) => <Icon {...p}><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></Icon>,
  shield2: (p) => <Icon {...p}><path d="M12 2 4 5v6c0 5 3.5 9 8 10 4.5-1 8-5 8-10V5z"/><path d="m9 12 2 2 4-4"/></Icon>,
  mail: (p) => <Icon {...p}><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 7L22 7"/></Icon>,
  edit: (p) => <Icon {...p}><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4z"/></Icon>,
  upload: (p) => <Icon {...p}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/></Icon>,
  external: (p) => <Icon {...p}><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3"/></Icon>,
  flag: (p) => <Icon {...p}><path d="M4 22V4M4 4h13l-2 4 2 4H4"/></Icon>,
  gift: (p) => <Icon {...p}><rect x="3" y="8" width="18" height="4" rx="1"/><path d="M12 8v13M5 12v8a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-8M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5"/></Icon>,
  building: (p) => <Icon {...p}><rect x="4" y="2" width="16" height="20" rx="2"/><path d="M9 22v-4h6v4M8 6h.01M12 6h.01M16 6h.01M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01"/></Icon>,
  briefcase: (p) => <Icon {...p}><rect x="2" y="7" width="20" height="14" rx="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></Icon>,
  globe: (p) => <Icon {...p}><circle cx="12" cy="12" r="10"/><path d="M2 12h20M12 2a15 15 0 0 1 0 20A15 15 0 0 1 12 2z"/></Icon>,
  monitor: (p) => <Icon {...p}><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8M12 17v4"/></Icon>,
  phone: (p) => <Icon {...p}><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></Icon>,
  headset: (p) => <Icon {...p}><path d="M3 14V11a9 9 0 0 1 18 0v3"/><rect x="2" y="14" width="5" height="7" rx="2"/><rect x="17" y="14" width="5" height="7" rx="2"/></Icon>,
  keyboard: (p) => <Icon {...p}><rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h12"/></Icon>,
  star: (p) => <Icon {...p}><path d="m12 2 3.1 6.3L22 9.3l-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></Icon>,
  trophy: (p) => <Icon {...p}><path d="M6 9H4.5a2.5 2.5 0 0 1 0-5H6M18 9h1.5a2.5 2.5 0 0 0 0-5H18M4 22h16M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22M18 2H6v7a6 6 0 0 0 12 0z"/></Icon>,
  refresh: (p) => <Icon {...p}><path d="M21 12a9 9 0 0 0-15.5-6.4L1 9M3 12a9 9 0 0 0 15.5 6.4L23 15M1 4v5h5M23 20v-5h-5"/></Icon>,
  trash: (p) => <Icon {...p}><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></Icon>,
  x: (p) => <Icon {...p}><path d="M18 6 6 18M6 6l12 12"/></Icon>,
  copy: (p) => <Icon {...p}><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></Icon>,
};

// avatar palette
const AVATAR_COLORS = [
  "#0ea5e9", "#a855f7", "#f97316", "#10b981",
  "#ef4444", "#6366f1", "#06b6d4", "#eab308",
  "#ec4899", "#14b8a6"
];
const avatarBg = (name) => {
  let h = 0; for (const c of name) h = (h * 31 + c.charCodeAt(0)) & 0xfff;
  return AVATAR_COLORS[h % AVATAR_COLORS.length];
};
const initials = (name) => name.split(" ").map(p => p[0]).slice(0, 2).join("").toUpperCase();

const Avatar = ({ name, size = "md" }) => (
  <div className={"avatar " + (size === "lg" ? "avatar-lg" : size === "sm" ? "" : "avatar-md")}
       style={{ background: avatarBg(name), width: size === "sm" ? 28 : undefined, height: size === "sm" ? 28 : undefined, fontSize: size === "sm" ? 11 : undefined }}>
    {initials(name)}
  </div>
);

// ──────────────── Personas ────────────────
const PERSONAS = {
  eng: {
    role: "Software Engineer",
    team: "Platform · Voice Infrastructure",
    manager: "Aarav Mehta",
    managerRole: "Engineering Manager, Platform",
    location: "Los Angeles, CA · Hybrid",
    startDate: "May 11, 2026",
    tools: ["GitHub", "Slack", "Linear", "Datadog", "AWS Console"],
    badge: "ENG-2641",
  },
  design: {
    role: "Product Designer",
    team: "Design · Agent Experience",
    manager: "Priya Iyer",
    managerRole: "Design Director",
    location: "Los Angeles, CA · Hybrid",
    startDate: "May 11, 2026",
    tools: ["Figma", "FigJam", "Notion", "Linear", "Slack"],
    badge: "DES-118",
  },
  sales: {
    role: "Account Executive",
    team: "Sales · Mid-Market",
    manager: "Marcus Reed",
    managerRole: "VP, Mid-Market Sales",
    location: "Los Angeles, CA · Hybrid",
    startDate: "May 11, 2026",
    tools: ["Salesforce", "Outreach", "Gong", "Slack", "LinkedIn Sales Nav"],
    badge: "AE-204",
  },
};

const NEW_HIRE = { name: "Riley Park", first: "Riley" };

// ──────────────── Onboarding plan (timeline) ────────────────
// Each task knows which "phase" it belongs to: day1 / week1 / month1
const TASKS = (persona) => {
  const eng = persona === "eng";
  const des = persona === "design";
  const sal = persona === "sales";
  return [
    // Day 1
    { id: "t1", phase: "day1", title: "Welcome video from CEO", kind: "media", time: "8:30 AM", duration: "5 min", icon: "play", required: true },
    { id: "t2", phase: "day1", title: "Sign offer letter & NDA", kind: "doc", time: "9:00 AM", duration: "10 min", icon: "pen", required: true, count: "2 docs" },
    { id: "t3", phase: "day1", title: "I-9 employment verification", kind: "doc", time: "9:30 AM", duration: "8 min", icon: "doc", required: true },
    { id: "t4", phase: "day1", title: "Setup Convoso SSO + 2FA", kind: "task", time: "10:00 AM", duration: "5 min", icon: "lock", required: true },
    { id: "t5", phase: "day1", title: "1:1 with " + (eng ? "Aarav (Eng Manager)" : des ? "Priya (Design Director)" : "Marcus (Sales VP)"), kind: "meeting", time: "11:00 AM", duration: "30 min", icon: "zoom", required: true },
    { id: "t6", phase: "day1", title: "Team welcome lunch", kind: "meeting", time: "12:30 PM", duration: "1 hr", icon: "gift", required: false },
    { id: "t7", phase: "day1", title: eng ? "Clone repo + run convoso-core locally" : des ? "Set up Figma + clone design library" : "Salesforce account & Outreach access", kind: "task", time: "2:00 PM", duration: "1 hr", icon: eng ? "github" : des ? "fig" : "briefcase", required: true },

    // Week 1
    { id: "t8", phase: "week1", title: "Complete W-4 tax withholding", kind: "doc", duration: "10 min", icon: "doc", required: true },
    { id: "t9", phase: "week1", title: "Direct deposit setup", kind: "doc", duration: "5 min", icon: "dollar", required: true },
    { id: "t10", phase: "week1", title: "Enroll in benefits & insurance", kind: "task", duration: "20 min", icon: "shield", required: true, deadline: "30 days" },
    { id: "t11", phase: "week1", title: "Code of Conduct training", kind: "training", duration: "25 min", icon: "book", required: true },
    { id: "t12", phase: "week1", title: "Security & data privacy training", kind: "training", duration: "30 min", icon: "shield2", required: true },
    { id: "t13", phase: "week1", title: eng ? "Onboarding deep-dive: voice infra" : des ? "Design system intro · with Priya" : "Convoso platform demo training", kind: "training", duration: "1 hr", icon: "play", required: false },
    { id: "t14", phase: "week1", title: "Coffee chat with team buddy · " + (eng ? "Sam Liu" : des ? "Devon Cole" : "Maya Cruz"), kind: "meeting", duration: "30 min", icon: "wave", required: false },

    // Month 1
    { id: "t15", phase: "month1", title: "30-day check-in with manager", kind: "meeting", duration: "45 min", icon: "calendar", required: true },
    { id: "t16", phase: "month1", title: "HIPAA & call recording compliance", kind: "training", duration: "40 min", icon: "shield2", required: true },
    { id: "t17", phase: "month1", title: eng ? "Ship first PR" : des ? "Present first design crit" : "First closed-won deal", kind: "task", duration: "self-paced", icon: "trophy", required: false },
    { id: "t18", phase: "month1", title: "Choose 401(k) contribution", kind: "doc", duration: "10 min", icon: "dollar", required: false },
    { id: "t19", phase: "month1", title: "Quarterly all-hands attendance", kind: "meeting", duration: "1 hr", icon: "calendar", required: false },
  ];
};

// Track which tasks are "done" by phase (matches the onboardingProgress tweak).
const COMPLETED_BY_PROGRESS = {
  day1:   new Set(["t1", "t2"]),
  week1:  new Set(["t1","t2","t3","t4","t5","t6","t7","t8"]),
  done:   new Set(["t1","t2","t3","t4","t5","t6","t7","t8","t9","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19"]),
};

// ──────────────── Meetings (calendar) ────────────────
const MEETINGS = [
  { day: "Mon", date: "May 11", items: [
    { time: "9:00 AM",  end: "9:30",   title: "Welcome breakfast",           with: "People Ops",          loc: "DTLA HQ · 4F",      status: "accepted" },
    { time: "11:00 AM", end: "11:30",  title: "1:1 with Aarav Mehta",        with: "Aarav Mehta",         loc: "Zoom",              status: "accepted", primary: true },
    { time: "1:00 PM",  end: "1:45",   title: "IT Setup · Laptop & SSO",     with: "Marcus IT",           loc: "DTLA HQ · IT Bar",  status: "accepted" },
    { time: "3:30 PM",  end: "4:30",   title: "Eng team standup",            with: "Platform team",       loc: "Zoom",              status: "tentative" },
  ]},
  { day: "Tue", date: "May 12", items: [
    { time: "10:00 AM", end: "11:00",  title: "Codebase walkthrough",        with: "Sam Liu (buddy)",     loc: "Zoom",              status: "accepted" },
    { time: "2:00 PM",  end: "2:30",   title: "Benefits Q&A · Optional",     with: "Lila Park (HR)",      loc: "Zoom",              status: "tentative" },
  ]},
  { day: "Wed", date: "May 13", items: [
    { time: "9:30 AM",  end: "10:00",  title: "Daily standup",               with: "Platform team",       loc: "Zoom",              status: "accepted", recurring: true },
    { time: "12:30 PM", end: "1:30",   title: "Lunch & Learn · Convoso AI",  with: "Whole company",       loc: "DTLA HQ · Cafe",    status: "tentative" },
  ]},
  { day: "Thu", date: "May 14", items: [
    { time: "10:00 AM", end: "11:00",  title: "Engineering all-hands",       with: "Engineering",         loc: "Zoom",              status: "accepted" },
    { time: "3:00 PM",  end: "3:30",   title: "1:1 buddy check-in",          with: "Sam Liu",             loc: "Zoom",              status: "accepted" },
  ]},
  { day: "Fri", date: "May 15", items: [
    { time: "9:00 AM",  end: "9:30",   title: "Sprint planning",             with: "Platform team",       loc: "Zoom",              status: "tentative" },
    { time: "4:30 PM",  end: "5:30",   title: "Friday social",               with: "Whole company",       loc: "DTLA HQ · Lounge",  status: "tentative" },
  ]},
];

// ──────────────── Documents ────────────────
const DOCS = [
  { id: "d1", title: "Offer Letter", category: "Employment", pages: 4, status: "signed", signedOn: "May 9", priority: "high" },
  { id: "d2", title: "Mutual NDA", category: "Legal", pages: 2, status: "signed", signedOn: "May 9", priority: "high" },
  { id: "d3", title: "Employee Handbook Acknowledgement", category: "Policy", pages: 1, status: "pending", due: "May 11", priority: "high" },
  { id: "d4", title: "Form I-9 · Employment Eligibility", category: "Government", pages: 3, status: "pending", due: "May 11", priority: "high" },
  { id: "d5", title: "Form W-4 · Federal Tax Withholding", category: "Government", pages: 2, status: "pending", due: "May 15", priority: "med" },
  { id: "d6", title: "California State Tax DE-4", category: "Government", pages: 2, status: "pending", due: "May 15", priority: "med" },
  { id: "d7", title: "Direct Deposit Authorization", category: "Payroll", pages: 1, status: "pending", due: "May 15", priority: "med" },
  { id: "d8", title: "IP Assignment Agreement", category: "Legal", pages: 5, status: "pending", due: "May 18", priority: "med" },
  { id: "d9", title: "Code of Conduct Acknowledgement", category: "Policy", pages: 1, status: "pending", due: "May 22", priority: "low" },
  { id: "d10", title: "401(k) Election Form", category: "Benefits", pages: 2, status: "pending", due: "Jun 11", priority: "low" },
  { id: "d11", title: "Emergency Contact Form", category: "Personal", pages: 1, status: "pending", due: "May 22", priority: "low" },
];

// ──────────────── Training ────────────────
const TRAININGS = [
  { id: "tr1", title: "Welcome to Convoso", category: "Culture", duration: "12 min", lessons: 3, progress: 100, instructor: "Nathan Stearns, CEO", required: true, color: "#84cc16" },
  { id: "tr2", title: "Code of Conduct", category: "Compliance", duration: "25 min", lessons: 6, progress: 60, instructor: "Lila Park, People Ops", required: true, color: "#0ea5e9" },
  { id: "tr3", title: "Security & Data Privacy", category: "Compliance", duration: "30 min", lessons: 8, progress: 25, instructor: "Diana Ortega, CISO", required: true, color: "#ef4444" },
  { id: "tr4", title: "HIPAA & Call Recording Compliance", category: "Compliance", duration: "40 min", lessons: 10, progress: 0, instructor: "Diana Ortega, CISO", required: true, color: "#a855f7" },
  { id: "tr5", title: "Convoso Platform 101", category: "Product", duration: "1 hr 5 min", lessons: 14, progress: 0, instructor: "Maya Cruz, Product", required: true, color: "#f97316" },
  { id: "tr6", title: "Voice Infrastructure Deep-dive", category: "Engineering", duration: "1 hr 30 min", lessons: 11, progress: 0, instructor: "Aarav Mehta", required: false, color: "#14b8a6" },
  { id: "tr7", title: "Working Async at Convoso", category: "Culture", duration: "18 min", lessons: 4, progress: 0, instructor: "Priya Iyer", required: false, color: "#eab308" },
  { id: "tr8", title: "Inclusive Workplace", category: "Compliance", duration: "45 min", lessons: 9, progress: 0, instructor: "Lila Park, People Ops", required: true, color: "#ec4899" },
];

// ──────────────── Insurance plans ────────────────
const PLANS = [
  {
    id: "blue-pref", name: "Blue PPO Preferred", carrier: "Anthem Blue Cross",
    type: "PPO", network: "Nationwide",
    premium: 184, employer: 612, deductible: 500, oop: 4500,
    copay: 25, specialist: 45,
    perks: ["No referrals", "Best network coverage", "Anywhere in network"],
    badge: "Most chosen",
  },
  {
    id: "blue-core", name: "Blue HMO Core", carrier: "Anthem Blue Cross",
    type: "HMO", network: "California",
    premium: 92, employer: 488, deductible: 250, oop: 3000,
    copay: 15, specialist: 25,
    perks: ["Lowest copays", "Designated PCP required", "California-only network"],
  },
  {
    id: "kp-hdhp", name: "Kaiser HDHP + HSA", carrier: "Kaiser Permanente",
    type: "HDHP", network: "Kaiser-only",
    premium: 64, employer: 412, deductible: 1750, oop: 5000,
    copay: 0, specialist: 0,
    perks: ["HSA-eligible (Convoso adds $1,200/yr)", "Lowest premium", "Tax-free spending"],
    badge: "Best for healthy",
  },
];

const DENTAL_PLANS = [
  { id: "delta-ppo", name: "Delta Dental PPO", premium: 18, employer: 42, perks: ["100% preventive", "$2,000 annual max", "Includes ortho"] },
  { id: "delta-basic", name: "Delta Dental Basic", premium: 8, employer: 24, perks: ["Cleanings + x-rays", "$1,000 annual max"] },
  { id: "decline-d", name: "Decline dental", premium: 0, employer: 0, perks: ["Decline coverage"] },
];

const VISION_PLANS = [
  { id: "vsp", name: "VSP Vision Plus", premium: 6, employer: 14, perks: ["1 exam / yr", "$200 frame allowance", "Contacts covered"] },
  { id: "vsp-basic", name: "VSP Vision Basic", premium: 3, employer: 8, perks: ["1 exam / yr", "$120 frame allowance"] },
  { id: "decline-v", name: "Decline vision", premium: 0, employer: 0, perks: ["Decline coverage"] },
];

// ──────────────── Equipment ────────────────
const EQUIPMENT = [
  { id: "e1", name: "MacBook Pro 14\" M4", spec: "32 GB · 1 TB · Space Black", status: "shipped", eta: "Arrives May 10", icon: "laptop" },
  { id: "e2", name: "Studio Display 27\"", spec: "Standard glass · Tilt stand", status: "shipped", eta: "Arrives May 10", icon: "monitor" },
  { id: "e3", name: "Logitech MX Keys", spec: "Graphite · Bluetooth", status: "shipped", eta: "Arrives May 10", icon: "keyboard" },
  { id: "e4", name: "Sony WH-1000XM5", spec: "Black · Noise-canceling", status: "processing", eta: "Ships May 12", icon: "headset" },
  { id: "e5", name: "iPhone 15 Pro", spec: "Optional · 256 GB", status: "available", eta: "Add to order", icon: "phone" },
];

// ──────────────── Profile sample ────────────────
const PROFILE = {
  legalName: "Riley Alex Park",
  preferred: "Riley",
  pronouns: "they / them",
  email: "riley.park@convoso.com",
  personalEmail: "rileypark@gmail.com",
  phone: "+1 (213) 555-0142",
  dob: "1996-08-14",
  ssnLast4: "•••-••-4982",
  address: "1217 Hope St, Apt 8B, Los Angeles, CA 90015",
  emergency: { name: "Jordan Park", relation: "Sibling", phone: "+1 (310) 555-0190" },
  ethnicity: "Prefer not to say",
  veteran: "No",
  shirtSize: "M",
};

// expose to globals
Object.assign(window, {
  Icon, I, Avatar, avatarBg, initials,
  PERSONAS, NEW_HIRE,
  TASKS, COMPLETED_BY_PROGRESS,
  MEETINGS, DOCS, TRAININGS,
  PLANS, DENTAL_PLANS, VISION_PLANS,
  EQUIPMENT, PROFILE,
});
