// Seed data for TradesFlow demo
// Trades, prospects, jobs, customers, AI scripts - everything the demo needs.

const TRADES = {
  hvac: {
    id: 'hvac',
    label: 'HVAC',
    longLabel: 'HVAC & Refrigeration',
    accent: 'hvac',
    unit: 'system',
    icon: 'climate',
    customerSample: 'Mrs. Patel, Coogee',
    sampleEnquiry: 'Ducted AC not cooling upstairs - Randwick',
    licence: 'ARCtick RTA-AU12841',
  },
  plumbing: {
    id: 'plumbing',
    label: 'Plumbing',
    longLabel: 'Plumbing & Gas',
    accent: 'plumbing',
    unit: 'fixture',
    icon: 'wrench',
    customerSample: 'Moreno, Illawarra Rd',
    sampleEnquiry: 'Hot water system replace - Moreno, Marrickville',
    licence: 'NSW Plumbing L.156782',
  },
  solar: {
    id: 'solar',
    label: 'Solar',
    longLabel: 'Solar Installation',
    accent: 'solar',
    unit: 'kW system',
    icon: 'sun',
    customerSample: 'Nguyen, Earlwood',
    sampleEnquiry: '6.6kW rooftop system - Nguyen, Earlwood',
    licence: 'CEC A1428091',
  },
  electrical: {
    id: 'electrical',
    label: 'Electrical',
    longLabel: 'Electrical Contracting',
    accent: 'electrical',
    unit: 'circuit',
    icon: 'bolt',
    customerSample: 'Harper Café, Newtown',
    sampleEnquiry: 'Switchboard upgrade + RCD - Harper Café',
    licence: 'NSW EC 228431',
  },
  roofing: {
    id: 'roofing',
    label: 'Roofing',
    longLabel: 'Roofing & Gutters',
    accent: 'roofing',
    unit: 'sqm',
    icon: 'home',
    customerSample: 'Whitford, Newport',
    sampleEnquiry: 'Metal re-roof + new gutters - Newport',
    licence: 'NSW Roof L.998712',
  },
  fire: { id: 'fire', label: 'Fire', longLabel: 'Fire Protection & Safety', accent: 'electrical', unit: 'system', icon: 'shield', customerSample: 'Cole Towers Strata', sampleEnquiry: 'AS1851 annual fire service - Cole Towers', licence: 'FPA-AU 28841' },
  security: { id: 'security', label: 'Security', longLabel: 'Security & CCTV', accent: 'electrical', unit: 'camera', icon: 'shield', customerSample: 'Harper Café', sampleEnquiry: '6-camera IP install + NVR - Harper Café', licence: 'NSW Master Licence 000109482' },
  garage: { id: 'garage', label: 'Garage', longLabel: 'Garage Doors & Motors', accent: 'electrical', unit: 'door', icon: 'home', customerSample: 'Whitford Residence', sampleEnquiry: 'Sectional door motor replace - Whitford', licence: 'NSW Builder L.228412' },
  glass: { id: 'glass', label: 'Glass', longLabel: 'Glass & Glazing', accent: 'roofing', unit: 'panel', icon: 'home', customerSample: 'Harper Café shopfront', sampleEnquiry: 'Shopfront glass replace - Harper Café', licence: 'AGGA Member 9412' },
  fencing: { id: 'fencing', label: 'Fencing', longLabel: 'Fencing & Gates', accent: 'roofing', unit: 'metre', icon: 'home', customerSample: 'Patel Residence', sampleEnquiry: '42m Colorbond fence + gate - Patel', licence: 'NSW Builder L.998821' },
  concrete: { id: 'concrete', label: 'Concrete', longLabel: 'Concrete & Paving', accent: 'roofing', unit: 'sqm', icon: 'home', customerSample: 'Chen Driveway', sampleEnquiry: 'Driveway resurface 68sqm - Chen', licence: 'NSW Builder L.338192' },
  construction: { id: 'construction', label: 'Construction', longLabel: 'Construction & Renos', accent: 'roofing', unit: 'project', icon: 'home', customerSample: 'Loomis Fit-out', sampleEnquiry: 'Office fit-out variation - Loomis', licence: 'NSW Builder L.118471' },
  landscaping: { id: 'landscaping', label: 'Landscaping', longLabel: 'Landscaping & Gardens', accent: 'solar', unit: 'sqm', icon: 'sun', customerSample: 'Whitford Garden', sampleEnquiry: 'Paved courtyard 42sqm - Whitford', licence: 'LNA Member AU-441' },
  painting: { id: 'painting', label: 'Painting', longLabel: 'Painting & Decorating', accent: 'roofing', unit: 'sqm', icon: 'home', customerSample: 'Chen Family', sampleEnquiry: 'Full interior repaint 180sqm - Chen', licence: 'MPA NSW Member 77821' },
  cleaning: { id: 'cleaning', label: 'Cleaning', longLabel: 'Commercial Cleaning', accent: 'electrical', unit: 'site', icon: 'sparkles', customerSample: 'IGA Bondi Jct', sampleEnquiry: '5-day recurring contract - IGA Bondi Jct', licence: 'BSCAA Member 11284' },
  pest: { id: 'pest', label: 'Pest', longLabel: 'Pest Control', accent: 'plumbing', unit: 'treatment', icon: 'bolt', customerSample: 'Moreno Residence', sampleEnquiry: 'General pest treatment - Moreno', licence: 'NSW Pest Mgmt L.5-118' },
  pool: { id: 'pool', label: 'Pool', longLabel: 'Pool Service & Installation', accent: 'plumbing', unit: 'system', icon: 'sun', customerSample: 'Singh Residence', sampleEnquiry: 'Pump + filter replace - Singh', licence: 'SPASA Member NSW-4412' },
};

// The signed-in business the user is "viewing as"
const BUSINESS = {
  name: 'Hartley Trade Services',
  owner: 'Dan Hartley',
  admin: 'Ellie Hartley',
  abn: '43 128 889 221',
  city: 'Sydney',
  suburb: 'Botany',
  phone: '02 9314 8821',
  email: 'ellie@hartleytrades.com.au',
  primaryTrade: 'hvac',
};

// Cold-outreach prospect list (81 Australian trades businesses)
// Each slug drives ?for=<slug> personalization on the landing page.
const PROSPECTS = {
  'proximity-plumbing': {
    slug: 'proximity-plumbing',
    business: 'Proximity Plumbing',
    trade: 'plumbing',
    city: 'Sydney',
    firstName: 'James',
    reviews: 2302,
    rating: 4.9,
    website: 'proximityplumbing.com.au',
    note: 'With 2,302 Google reviews, your admin person is drowning in quote follow-ups. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Multi-tech team',
  },
  'sydney-park-plumbing': {
    slug: 'sydney-park-plumbing',
    business: 'Sydney Park Plumbing',
    trade: 'plumbing',
    city: 'Sydney',
    firstName: 'Sam',
    reviews: 150,
    rating: 4.8,
    website: 'sydneyparkplumbing.com.au',
    note: '150 reviews at 4.8★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team',
  },
  'melbourne-metro-plumbing-group': {
    slug: 'melbourne-metro-plumbing-group',
    business: 'Melbourne Metro Plumbing Group',
    trade: 'plumbing',
    city: 'Melbourne',
    firstName: 'Ryan',
    reviews: 239,
    rating: 4.9,
    website: 'melbournemetroplumbing.com.au',
    note: '239 reviews at 4.9★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team of 3–8',
  },
  'butler-plumbing-pty-ltd': {
    slug: 'butler-plumbing-pty-ltd',
    business: 'Butler Plumbing Pty Ltd',
    trade: 'plumbing',
    city: 'Melbourne',
    firstName: 'Mason',
    reviews: 354,
    rating: 4.7,
    website: 'butlerplumbing.com.au',
    note: '354 reviews at 4.7★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team of 3–8',
  },
  'tj-johnson-commercial-plumbing': {
    slug: 'tj-johnson-commercial-plumbing',
    business: 'TJ Johnson Commercial Plumbing',
    trade: 'plumbing',
    city: 'Melbourne',
    firstName: 'Dan',
    reviews: 6,
    rating: 5,
    website: 'tjjohnson.com.au',
    note: 'Boutique shop (6 reviews). 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team',
  },
  'vic-plumbing-drainage': {
    slug: 'vic-plumbing-drainage',
    business: 'Vic Plumbing & Drainage',
    trade: 'plumbing',
    city: 'Melbourne',
    firstName: 'Steves',
    reviews: 37,
    rating: 4.9,
    website: 'vicplumbingdrainage.com.au',
    note: 'Boutique shop (37 reviews). 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team of 3–8',
  },
  'plumbdog': {
    slug: 'plumbdog',
    business: 'Plumbdog',
    trade: 'plumbing',
    city: 'Perth',
    firstName: 'Large',
    reviews: 1217,
    rating: 4.5,
    website: 'plumbdog.com.au',
    note: '1,217 reviews at 4.5★ - quote turnaround is eating into field time. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Large team',
  },
  'swans-professional-plumbing': {
    slug: 'swans-professional-plumbing',
    business: 'Swan\'s Professional Plumbing',
    trade: 'plumbing',
    city: 'Perth',
    firstName: 'Jesse',
    reviews: 214,
    rating: 4.9,
    website: 'swansprofessionalplumbing.com.au',
    note: '214 reviews at 4.9★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team of 3–8',
  },
  'tap-doctor-plumbing-perth': {
    slug: 'tap-doctor-plumbing-perth',
    business: 'Tap Doctor Plumbing Perth',
    trade: 'plumbing',
    city: 'Perth',
    firstName: 'Jozsef',
    reviews: 1701,
    rating: 4.6,
    website: 'tapdoctor.com.au',
    note: 'With 1,701 Google reviews, your admin person is drowning in quote follow-ups. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team of 3–8',
  },
  'the-plumbing-co': {
    slug: 'the-plumbing-co',
    business: 'The Plumbing Co.',
    trade: 'plumbing',
    city: 'Perth',
    firstName: 'Jordan',
    reviews: 103,
    rating: 5,
    website: 'theplumbingco.com.au',
    note: '103 reviews at 5★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team',
  },
  'bg-plumbing-gas-services-perth': {
    slug: 'bg-plumbing-gas-services-perth',
    business: 'BG Plumbing & Gas Services Perth',
    trade: 'plumbing',
    city: 'Perth',
    firstName: 'Billy',
    reviews: 116,
    rating: 4.9,
    website: 'bgplumbing.com.au',
    note: '116 reviews at 4.9★ - tight team, every quote matters. 24/7 work means quotes happen at odd hours. AI drafts from the photos your tech already took.',
    teamSize: 'Team',
  },
  'air-elite': {
    slug: 'air-elite',
    business: 'Air Elite',
    trade: 'hvac',
    city: 'Melbourne',
    firstName: 'Liam',
    reviews: 290,
    rating: 4.8,
    website: 'airelite.com.au',
    note: '290 reviews at 4.8★ - tight team, every quote matters. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'melbourne-hvac-services': {
    slug: 'melbourne-hvac-services',
    business: 'Melbourne HVAC Services',
    trade: 'hvac',
    city: 'Melbourne',
    firstName: 'Kelly',
    reviews: 50,
    rating: 5,
    website: 'melbournehvacservices.com.au',
    note: 'Boutique shop (50 reviews). Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'airfit-air-conditioning': {
    slug: 'airfit-air-conditioning',
    business: 'Airfit Air-Conditioning',
    trade: 'hvac',
    city: 'Melbourne',
    firstName: 'Matt',
    reviews: 745,
    rating: 4.8,
    website: 'airfit.com.au',
    note: '745 reviews at 4.8★ - quote turnaround is eating into field time. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Small family op',
  },
  'xrcc': {
    slug: 'xrcc',
    business: 'XRCC',
    trade: 'hvac',
    city: 'Melbourne',
    firstName: 'Xavier',
    reviews: 67,
    rating: 4.9,
    website: 'xrcc.com.au',
    note: 'Boutique shop (67 reviews). Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'hpacs-air-conditioning': {
    slug: 'hpacs-air-conditioning',
    business: 'HPACS Air Conditioning',
    trade: 'hvac',
    city: 'Melbourne',
    firstName: 'James',
    reviews: 45,
    rating: 4.9,
    website: 'hpacs.com.au',
    note: 'Boutique shop (45 reviews). Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'alliance-climate-control': {
    slug: 'alliance-climate-control',
    business: 'Alliance Climate Control',
    trade: 'hvac',
    city: 'Sydney',
    firstName: 'Large',
    reviews: 2650,
    rating: 4.9,
    website: 'allianceclimatecontrol.com.au',
    note: 'With 2,650 Google reviews, your admin person is drowning in quote follow-ups. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Large team',
  },
  'ab-sydney-air-conditioning': {
    slug: 'ab-sydney-air-conditioning',
    business: 'AB Sydney Air Conditioning',
    trade: 'hvac',
    city: 'Sydney',
    firstName: 'Andrea',
    reviews: 145,
    rating: 5,
    website: 'absydneyaircon.com.au',
    note: '145 reviews at 5★ - tight team, every quote matters. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team',
  },
  'hvac-industries-pty-ltd': {
    slug: 'hvac-industries-pty-ltd',
    business: 'HVAC Industries Pty Ltd',
    trade: 'hvac',
    city: 'Sydney',
    firstName: 'Nima',
    reviews: 6,
    rating: 5,
    website: 'hvacindustries.com.au',
    note: 'Boutique shop (6 reviews). Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'simmonds-heating-and-cooling': {
    slug: 'simmonds-heating-and-cooling',
    business: 'Simmonds Heating And Cooling',
    trade: 'hvac',
    city: 'Adelaide',
    firstName: 'Toby',
    reviews: 250,
    rating: 4.8,
    website: 'simmonds.com.au',
    note: '250 reviews at 4.8★ - tight team, every quote matters. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Small family op',
  },
  'aba-air-conditioning': {
    slug: 'aba-air-conditioning',
    business: 'ABA Air Conditioning',
    trade: 'hvac',
    city: 'Adelaide',
    firstName: 'Shaun',
    reviews: 331,
    rating: 4.7,
    website: 'abaairconditioning.com.au',
    note: '331 reviews at 4.7★ - tight team, every quote matters. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team of 3–8',
  },
  'metro-air-conditioning': {
    slug: 'metro-air-conditioning',
    business: 'Metro Air Conditioning',
    trade: 'hvac',
    city: 'Adelaide',
    firstName: 'Joe',
    reviews: 160,
    rating: 5,
    website: 'metroacsa.com.au',
    note: '160 reviews at 5★ - tight team, every quote matters. Quote follow-ups on ducted/split installs - AI drafts them from site photos before the admin even sees them.',
    teamSize: 'Team',
  },
  'brisbane-electrical-contractors': {
    slug: 'brisbane-electrical-contractors',
    business: 'Brisbane Electrical Contractors',
    trade: 'electrical',
    city: 'Brisbane',
    firstName: 'Jackson',
    reviews: 200,
    rating: 4.9,
    website: 'becontractors.com.au',
    note: '200 reviews at 4.9★ - tight team, every quote matters. CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team',
  },
  'dlg-electrical': {
    slug: 'dlg-electrical',
    business: 'DLG Electrical',
    trade: 'electrical',
    city: 'Brisbane',
    firstName: 'David',
    reviews: 193,
    rating: 4.9,
    website: 'dlgelectrical.com.au',
    note: '193 reviews at 4.9★ - tight team, every quote matters. CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team of 3–8',
  },
  'dawson-electric': {
    slug: 'dawson-electric',
    business: 'Dawson Electric',
    trade: 'electrical',
    city: 'Brisbane',
    firstName: 'Sam',
    reviews: 369,
    rating: 4.8,
    website: 'dawsonelectric.com.au',
    note: '369 reviews at 4.8★ - tight team, every quote matters. CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team of 3–8',
  },
  'your-electrical-expert': {
    slug: 'your-electrical-expert',
    business: 'Your Electrical Expert',
    trade: 'electrical',
    city: 'Brisbane',
    firstName: 'Alex',
    reviews: 981,
    rating: 4.9,
    website: 'yourelectricalexpert.com.au',
    note: '981 reviews at 4.9★ - quote turnaround is eating into field time. CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team of 3–8',
  },
  'orange-electrical': {
    slug: 'orange-electrical',
    business: 'Orange Electrical',
    trade: 'electrical',
    city: 'Brisbane',
    firstName: 'Kerry',
    reviews: 81,
    rating: 4.8,
    website: 'orange-electrical.com.au',
    note: 'Boutique shop (81 reviews). CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team',
  },
  'mcl-electrical-installations': {
    slug: 'mcl-electrical-installations',
    business: 'MCL Electrical Installations',
    trade: 'electrical',
    city: 'Adelaide',
    firstName: 'Isaiah',
    reviews: 66,
    rating: 4.9,
    website: 'mclelectrical.com.au',
    note: 'Boutique shop (66 reviews). CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team',
  },
  'cornell-electrical-pty-ltd': {
    slug: 'cornell-electrical-pty-ltd',
    business: 'Cornell Electrical Pty Ltd',
    trade: 'electrical',
    city: 'Adelaide',
    firstName: 'Jake',
    reviews: 165,
    rating: 4.9,
    website: 'cornellelectrical.com.au',
    note: '165 reviews at 4.9★ - tight team, every quote matters. CoES, cable reports, switchboard photos - AI turns them into itemized quotes in seconds.',
    teamSize: 'Team of 3–8',
  },
  'roof-repairs-perth-wa': {
    slug: 'roof-repairs-perth-wa',
    business: 'Roof Repairs Perth WA',
    trade: 'roofing',
    city: 'Perth',
    firstName: 'Josh',
    reviews: 187,
    rating: 4.9,
    website: 'roofrepairsperthwa.com.au',
    note: '187 reviews at 4.9★ - tight team, every quote matters. Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Team',
  },
  'perth-re-roofing': {
    slug: 'perth-re-roofing',
    business: 'Perth Re-Roofing',
    trade: 'roofing',
    city: 'Perth',
    firstName: 'John',
    reviews: 45,
    rating: 4.8,
    website: 'perthreroofing.com.au',
    note: 'Boutique shop (45 reviews). Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Multi-tech team',
  },
  'virtue-roofing-wa': {
    slug: 'virtue-roofing-wa',
    business: 'Virtue Roofing WA',
    trade: 'roofing',
    city: 'Perth',
    firstName: 'Jake',
    reviews: 30,
    rating: 5,
    website: 'virtueroofing.com.au',
    note: 'Boutique shop (30 reviews). Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Team',
  },
  'prime-roofing-and-gutters': {
    slug: 'prime-roofing-and-gutters',
    business: 'Prime Roofing and Gutters',
    trade: 'roofing',
    city: 'Perth',
    firstName: 'Casey',
    reviews: 25,
    rating: 4.9,
    website: 'primeroofingperth.com.au',
    note: 'Boutique shop (25 reviews). Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Team',
  },
  'clean-space-co': {
    slug: 'clean-space-co',
    business: 'Clean Space Co',
    trade: 'roofing',
    city: 'Gold Coast',
    firstName: 'Aaron',
    reviews: 277,
    rating: 5,
    website: 'cleanspaceco.com.au',
    note: '277 reviews at 5★ - tight team, every quote matters. Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Multi-tech team',
  },
  'radiant-roof-repairs': {
    slug: 'radiant-roof-repairs',
    business: 'Radiant Roof Repairs',
    trade: 'roofing',
    city: 'Gold Coast',
    firstName: 'Alex',
    reviews: 123,
    rating: 4.7,
    website: 'radiantroofrepairs.com.au',
    note: '123 reviews at 4.7★ - tight team, every quote matters. Metal re-roofs and gutter jobs quoted off drone/ladder photos - no more 2-page Word docs.',
    teamSize: 'Team',
  },
  'solarthoughts': {
    slug: 'solarthoughts',
    business: 'SolarThoughts',
    trade: 'solar',
    city: 'Brisbane',
    firstName: 'Sud',
    reviews: 113,
    rating: 5,
    website: 'solarthoughts.com.au',
    note: '113 reviews at 5★ - tight team, every quote matters. STC rebate math, CEC tracking, battery-ready wiring - the stuff ServiceM8 never quite nailed.',
    teamSize: 'Team',
  },
  'green-solar': {
    slug: 'green-solar',
    business: 'Green Solar',
    trade: 'solar',
    city: 'Brisbane',
    firstName: 'Paul',
    reviews: 187,
    rating: 4.9,
    website: 'greensolar.com.au',
    note: '187 reviews at 4.9★ - tight team, every quote matters. STC rebate math, CEC tracking, battery-ready wiring - the stuff ServiceM8 never quite nailed.',
    teamSize: 'Team of 3–8',
  },
  'paramount-energy-hq': {
    slug: 'paramount-energy-hq',
    business: 'Paramount Energy HQ',
    trade: 'solar',
    city: 'Brisbane',
    firstName: 'Josh',
    reviews: 160,
    rating: 5,
    website: 'paramountenergy.com.au',
    note: '160 reviews at 5★ - tight team, every quote matters. STC rebate math, CEC tracking, battery-ready wiring - the stuff ServiceM8 never quite nailed.',
    teamSize: 'Team of 3–8',
  },
  'optimum-solar-energy': {
    slug: 'optimum-solar-energy',
    business: 'Optimum Solar Energy',
    trade: 'solar',
    city: 'Brisbane',
    firstName: 'Ryan',
    reviews: 113,
    rating: 5,
    website: 'optimumsolar.com.au',
    note: '113 reviews at 5★ - tight team, every quote matters. STC rebate math, CEC tracking, battery-ready wiring - the stuff ServiceM8 never quite nailed.',
    teamSize: 'Team',
  },
  'hybrid-solar-solutions': {
    slug: 'hybrid-solar-solutions',
    business: 'Hybrid Solar Solutions',
    trade: 'solar',
    city: 'Brisbane',
    firstName: 'Shane',
    reviews: 309,
    rating: 4.8,
    website: 'hybridsolarsolutions.com.au',
    note: '309 reviews at 4.8★ - tight team, every quote matters. STC rebate math, CEC tracking, battery-ready wiring - the stuff ServiceM8 never quite nailed.',
    teamSize: 'Team',
  },
  'general-painting-contractors': {
    slug: 'general-painting-contractors',
    business: 'General Painting Contractors',
    trade: 'painting',
    city: 'Sydney',
    firstName: 'Matt',
    reviews: 104,
    rating: 5,
    website: 'generalpaintingcontractors.com.au',
    note: '104 reviews at 5★ - tight team, every quote matters. Interior/exterior quotes from room-by-room photos, sqm calculated automatically.',
    teamSize: 'Team of 3–8',
  },
  'upscale-painting-decorating': {
    slug: 'upscale-painting-decorating',
    business: 'Upscale Painting & Decorating',
    trade: 'painting',
    city: 'Sydney',
    firstName: 'Esmayel',
    reviews: 83,
    rating: 5,
    website: 'upscalepainting.com.au',
    note: 'Boutique shop (83 reviews). Interior/exterior quotes from room-by-room photos, sqm calculated automatically.',
    teamSize: 'Team of 3–8',
  },
  'premier-painting-company': {
    slug: 'premier-painting-company',
    business: 'Premier Painting Company',
    trade: 'painting',
    city: 'Sydney',
    firstName: 'Anthony',
    reviews: 71,
    rating: 4.9,
    website: 'premierpaintingcompany.com.au',
    note: 'Boutique shop (71 reviews). Interior/exterior quotes from room-by-room photos, sqm calculated automatically.',
    teamSize: 'Team of 3–8',
  },
  'c-star-painting': {
    slug: 'c-star-painting',
    business: 'C STAR Painting',
    trade: 'painting',
    city: 'Sydney',
    firstName: 'Sami',
    reviews: 98,
    rating: 5,
    website: 'cstarpainting.com.au',
    note: 'Boutique shop (98 reviews). Interior/exterior quotes from room-by-room photos, sqm calculated automatically.',
    teamSize: 'Team of 3–8',
  },
  'ficus-landscape-group': {
    slug: 'ficus-landscape-group',
    business: 'Ficus Landscape Group',
    trade: 'landscaping',
    city: 'Melbourne',
    firstName: 'Oscar',
    reviews: 7,
    rating: 5,
    website: 'ficuslandscape.com.au',
    note: 'Boutique shop (7 reviews). Landscape designs → itemized material + labour quotes in minutes.',
    teamSize: 'Team',
  },
  'better-yard-commercial-gardening': {
    slug: 'better-yard-commercial-gardening',
    business: 'Better Yard Commercial Gardening',
    trade: 'landscaping',
    city: 'Melbourne',
    firstName: 'Cameron',
    reviews: 18,
    rating: 5,
    website: 'betteryard.com.au',
    note: 'Boutique shop (18 reviews). Landscape designs → itemized material + labour quotes in minutes.',
    teamSize: 'Team',
  },
  'poolzone-pool-maintenance': {
    slug: 'poolzone-pool-maintenance',
    business: 'Poolzone Pool Maintenance',
    trade: 'pool',
    city: 'Gold Coast',
    firstName: 'Tristan',
    reviews: 51,
    rating: 4.8,
    website: 'poolzone.com.au',
    note: 'Boutique shop (51 reviews). Equipment replacement and regular-service quotes from pump-room photos.',
    teamSize: 'Team',
  },
  'gold-coast-pool-cleaning': {
    slug: 'gold-coast-pool-cleaning',
    business: 'Gold Coast Pool Cleaning',
    trade: 'pool',
    city: 'Gold Coast',
    firstName: 'Wayne',
    reviews: 23,
    rating: 5,
    website: 'goldcoastpoolcleaning.com.au',
    note: 'Boutique shop (23 reviews). Equipment replacement and regular-service quotes from pump-room photos.',
    teamSize: 'Team',
  },
  'poolclean-service-and-maintenance': {
    slug: 'poolclean-service-and-maintenance',
    business: 'PoolClean Service and Maintenance',
    trade: 'pool',
    city: 'Gold Coast',
    firstName: 'Michael',
    reviews: 23,
    rating: 5,
    website: 'poolclean.com.au',
    note: 'Boutique shop (23 reviews). Equipment replacement and regular-service quotes from pump-room photos.',
    teamSize: 'Team',
  },
  'competitive-pest-services': {
    slug: 'competitive-pest-services',
    business: 'Competitive Pest Services',
    trade: 'pest',
    city: 'Sydney',
    firstName: 'Shannon',
    reviews: 338,
    rating: 4.9,
    website: 'competitivepestservices.com.au',
    note: '338 reviews at 4.9★ - tight team, every quote matters. Inspection reports + treatment quotes generated from the tech\'s voice note.',
    teamSize: 'Team',
  },
  'commercial-pest-control-sydney': {
    slug: 'commercial-pest-control-sydney',
    business: 'Commercial Pest Control Sydney',
    trade: 'pest',
    city: 'Sydney',
    firstName: 'Parashar',
    reviews: 105,
    rating: 5,
    website: 'commercialpestcontrolsydney.com.au',
    note: '105 reviews at 5★ - tight team, every quote matters. Inspection reports + treatment quotes generated from the tech\'s voice note.',
    teamSize: 'Team',
  },
  'masters-pest-control-sydney': {
    slug: 'masters-pest-control-sydney',
    business: 'Masters Pest Control Sydney',
    trade: 'pest',
    city: 'Sydney',
    firstName: 'Mackenzie',
    reviews: 311,
    rating: 5,
    website: 'masterspestcontrol.com.au',
    note: '311 reviews at 5★ - tight team, every quote matters. Inspection reports + treatment quotes generated from the tech\'s voice note.',
    teamSize: 'Team',
  },
  'safe-pest-control-sydney': {
    slug: 'safe-pest-control-sydney',
    business: 'Safe Pest Control Sydney',
    trade: 'pest',
    city: 'Sydney',
    firstName: 'Darcy',
    reviews: 256,
    rating: 5,
    website: 'safepestcontrol.net.au',
    note: '256 reviews at 5★ - tight team, every quote matters. Inspection reports + treatment quotes generated from the tech\'s voice note.',
    teamSize: 'Team',
  },
  'pest-power-sydney': {
    slug: 'pest-power-sydney',
    business: 'Pest Power Sydney',
    trade: 'pest',
    city: 'Sydney',
    firstName: 'Sam',
    reviews: 287,
    rating: 5,
    website: 'pestpower.com.au',
    note: '287 reviews at 5★ - tight team, every quote matters. Inspection reports + treatment quotes generated from the tech\'s voice note.',
    teamSize: 'Team of 3–8',
  },
  'yes-cleaning': {
    slug: 'yes-cleaning',
    business: 'Yes Cleaning',
    trade: 'cleaning',
    city: 'Melbourne',
    firstName: 'Kim',
    reviews: 189,
    rating: 5,
    website: 'yescleaning.com.au',
    note: '189 reviews at 5★ - tight team, every quote matters. Recurring contract pricing based on site walk-throughs + scope notes.',
    teamSize: 'Team of 3–8',
  },
  'cleaney': {
    slug: 'cleaney',
    business: 'CLEANEY',
    trade: 'cleaning',
    city: 'Melbourne',
    firstName: 'Restaurant',
    reviews: 73,
    rating: 5,
    website: 'cleaney.com.au',
    note: 'Boutique shop (73 reviews). Recurring contract pricing based on site walk-throughs + scope notes.',
    teamSize: 'Team',
  },
  'supas-cleaning': {
    slug: 'supas-cleaning',
    business: 'Supa\'s Cleaning',
    trade: 'cleaning',
    city: 'Melbourne',
    firstName: 'Supa',
    reviews: 78,
    rating: 5,
    website: 'supascleaning.com.au',
    note: 'Boutique shop (78 reviews). Recurring contract pricing based on site walk-throughs + scope notes.',
    teamSize: 'Team',
  },
  'spiffy-clean': {
    slug: 'spiffy-clean',
    business: 'Spiffy Clean',
    trade: 'cleaning',
    city: 'Melbourne',
    firstName: 'Office',
    reviews: 50,
    rating: 4.9,
    website: 'spiffyclean.com.au',
    note: 'Boutique shop (50 reviews). Recurring contract pricing based on site walk-throughs + scope notes.',
    teamSize: 'Team',
  },
  'newcastle-building': {
    slug: 'newcastle-building',
    business: 'Newcastle Building',
    trade: 'construction',
    city: 'Newcastle',
    firstName: 'Barry',
    reviews: 15,
    rating: 5,
    website: 'newcastlebuilding.com.au',
    note: 'Boutique shop (15 reviews). Variations and progress claims drafted from site-visit notes.',
    teamSize: 'Team',
  },
  'stratum-constructions': {
    slug: 'stratum-constructions',
    business: 'Stratum Constructions',
    trade: 'construction',
    city: 'Newcastle',
    firstName: 'Garreth',
    reviews: 2,
    rating: 5,
    website: 'stratumconstructions.com.au',
    note: 'Boutique shop (2 reviews). Variations and progress claims drafted from site-visit notes.',
    teamSize: 'Team',
  },
  'buildingwise-construction': {
    slug: 'buildingwise-construction',
    business: 'Buildingwise Construction',
    trade: 'construction',
    city: 'Newcastle',
    firstName: 'Peter',
    reviews: 14,
    rating: 4.7,
    website: 'buildingwise.com.au',
    note: 'Boutique shop (14 reviews). Variations and progress claims drafted from site-visit notes.',
    teamSize: 'Team',
  },
  'safe-qld-fire-protection': {
    slug: 'safe-qld-fire-protection',
    business: 'Safe QLD Fire Protection',
    trade: 'fire',
    city: 'Brisbane',
    firstName: 'Lockie',
    reviews: 27,
    rating: 5,
    website: 'safeqld.com.au',
    note: 'Boutique shop (27 reviews). AS1851 inspection routines + fire-protection quotes from site-visit notes.',
    teamSize: 'Team of 3–8',
  },
  'essential-fire-protection': {
    slug: 'essential-fire-protection',
    business: 'Essential Fire Protection',
    trade: 'fire',
    city: 'Brisbane',
    firstName: 'David',
    reviews: 27,
    rating: 5,
    website: 'essentialfireprotection.com.au',
    note: 'Boutique shop (27 reviews). AS1851 inspection routines + fire-protection quotes from site-visit notes.',
    teamSize: 'Team',
  },
  'safety-and-fire-experts': {
    slug: 'safety-and-fire-experts',
    business: 'Safety And Fire Experts',
    trade: 'fire',
    city: 'Brisbane',
    firstName: 'John',
    reviews: 27,
    rating: 5,
    website: 'safetyandfireexperts.com.au',
    note: 'Boutique shop (27 reviews). AS1851 inspection routines + fire-protection quotes from site-visit notes.',
    teamSize: 'Team',
  },
  'fort-security-systems': {
    slug: 'fort-security-systems',
    business: 'Fort Security Systems',
    trade: 'security',
    city: 'Sydney',
    firstName: 'Nick',
    reviews: 282,
    rating: 5,
    website: 'fortsecurity.com.au',
    note: '282 reviews at 5★ - tight team, every quote matters. Camera/alarm fit-outs quoted from floor plans and site photos.',
    teamSize: 'Team',
  },
  'piosec': {
    slug: 'piosec',
    business: 'PIOSEC',
    trade: 'security',
    city: 'Sydney',
    firstName: 'Amir',
    reviews: 80,
    rating: 5,
    website: 'piosec.com.au',
    note: 'Boutique shop (80 reviews). Camera/alarm fit-outs quoted from floor plans and site photos.',
    teamSize: 'Team',
  },
  'alarm-doctor': {
    slug: 'alarm-doctor',
    business: 'Alarm Doctor',
    trade: 'security',
    city: 'Sydney',
    firstName: 'Basel',
    reviews: 219,
    rating: 4.9,
    website: 'alarmdoctor.com.au',
    note: '219 reviews at 4.9★ - tight team, every quote matters. Camera/alarm fit-outs quoted from floor plans and site photos.',
    teamSize: 'Team',
  },
  'sm-security-services': {
    slug: 'sm-security-services',
    business: 'SM Security Services',
    trade: 'security',
    city: 'Sydney',
    firstName: 'Stefan',
    reviews: 149,
    rating: 5,
    website: 'smsecurityservices.com.au',
    note: '149 reviews at 5★ - tight team, every quote matters. Camera/alarm fit-outs quoted from floor plans and site photos.',
    teamSize: 'Team',
  },
  'melbourne-garage-door-repairs': {
    slug: 'melbourne-garage-door-repairs',
    business: 'Melbourne Garage Door Repairs',
    trade: 'garage',
    city: 'Melbourne',
    firstName: 'Isaac',
    reviews: 259,
    rating: 4.9,
    website: 'melbournegaragedoorrepairs.com.au',
    note: '259 reviews at 4.9★ - tight team, every quote matters. Motor + panel replacement quotes drafted from a single on-site photo.',
    teamSize: 'Team of 3–8',
  },
  'roller-doors-melbourne': {
    slug: 'roller-doors-melbourne',
    business: 'Roller Doors Melbourne',
    trade: 'garage',
    city: 'Melbourne',
    firstName: 'Fred',
    reviews: 88,
    rating: 4.9,
    website: 'rollerdoorsmelbourne.com.au',
    note: 'Boutique shop (88 reviews). Motor + panel replacement quotes drafted from a single on-site photo.',
    teamSize: 'Team',
  },
  'jims-garage-doors-melbourne': {
    slug: 'jims-garage-doors-melbourne',
    business: 'Jims Garage Doors Melbourne',
    trade: 'garage',
    city: 'Melbourne',
    firstName: 'Mick',
    reviews: 9,
    rating: 5,
    website: 'jimsgaragedoors.com.au',
    note: 'Boutique shop (9 reviews). Motor + panel replacement quotes drafted from a single on-site photo.',
    teamSize: 'Team',
  },
  'conker-concreting': {
    slug: 'conker-concreting',
    business: 'Conker Concreting',
    trade: 'concrete',
    city: 'Brisbane',
    firstName: 'Heather',
    reviews: 100,
    rating: 4.9,
    website: 'conker.com.au',
    note: 'Boutique shop (100 reviews). Slab and driveway quotes from a tape measure and a phone photo.',
    teamSize: 'Team',
  },
  'silverback-concreting': {
    slug: 'silverback-concreting',
    business: 'Silverback Concreting',
    trade: 'concrete',
    city: 'Brisbane',
    firstName: 'Matt',
    reviews: 46,
    rating: 4.9,
    website: 'silverbackconcreting.com.au',
    note: 'Boutique shop (46 reviews). Slab and driveway quotes from a tape measure and a phone photo.',
    teamSize: 'Team',
  },
  'about-town-concrete-contractors': {
    slug: 'about-town-concrete-contractors',
    business: 'About Town Concrete Contractors',
    trade: 'concrete',
    city: 'Brisbane',
    firstName: 'Dane',
    reviews: 12,
    rating: 4.7,
    website: 'abouttownconcrete.com.au',
    note: 'Boutique shop (12 reviews). Slab and driveway quotes from a tape measure and a phone photo.',
    teamSize: 'Team',
  },
  'fences-adelaide': {
    slug: 'fences-adelaide',
    business: 'Fences Adelaide',
    trade: 'fencing',
    city: 'Adelaide',
    firstName: 'Demi',
    reviews: 30,
    rating: 4.6,
    website: 'fencesadelaide.com.au',
    note: 'Boutique shop (30 reviews). Linear-metre pricing + materials quoted from a walk-the-line video.',
    teamSize: 'Team',
  },
  'reliance-fencing-adelaide': {
    slug: 'reliance-fencing-adelaide',
    business: 'Reliance Fencing Adelaide',
    trade: 'fencing',
    city: 'Adelaide',
    firstName: 'Steve',
    reviews: 33,
    rating: 4.8,
    website: 'reliancefencing.com.au',
    note: 'Boutique shop (33 reviews). Linear-metre pricing + materials quoted from a walk-the-line video.',
    teamSize: 'Team',
  },
  'active-fencing-and-retaining': {
    slug: 'active-fencing-and-retaining',
    business: 'Active Fencing and Retaining',
    trade: 'fencing',
    city: 'Adelaide',
    firstName: 'Chelsea',
    reviews: 109,
    rating: 4.7,
    website: 'activefencing.com.au',
    note: '109 reviews at 4.7★ - tight team, every quote matters. Linear-metre pricing + materials quoted from a walk-the-line video.',
    teamSize: 'Team',
  },
  'valente-fencing': {
    slug: 'valente-fencing',
    business: 'Valente Fencing',
    trade: 'fencing',
    city: 'Adelaide',
    firstName: 'Peter',
    reviews: 38,
    rating: 5,
    website: 'valentefencing.com.au',
    note: 'Boutique shop (38 reviews). Linear-metre pricing + materials quoted from a walk-the-line video.',
    teamSize: 'Team',
  },
  'affordable-glass-perth': {
    slug: 'affordable-glass-perth',
    business: 'Affordable Glass Perth',
    trade: 'glass',
    city: 'Perth',
    firstName: 'Michael',
    reviews: 126,
    rating: 4.9,
    website: 'affordableglass.com.au',
    note: '126 reviews at 4.9★ - tight team, every quote matters. Shopfront and residential glass quotes from measured-up photos.',
    teamSize: 'Team',
  },
  'professional-glass-maintenance': {
    slug: 'professional-glass-maintenance',
    business: 'Professional Glass & Maintenance',
    trade: 'glass',
    city: 'Perth',
    firstName: 'Mark',
    reviews: 147,
    rating: 4.7,
    website: 'professionalglass.com.au',
    note: '147 reviews at 4.7★ - tight team, every quote matters. Shopfront and residential glass quotes from measured-up photos.',
    teamSize: 'Team',
  },
  'obrien-glass-perth': {
    slug: 'obrien-glass-perth',
    business: 'O\'Brien Glass Perth',
    trade: 'glass',
    city: 'Perth',
    firstName: 'Kriss',
    reviews: 356,
    rating: 4.8,
    website: 'obrien.com.au',
    note: '356 reviews at 4.8★ - tight team, every quote matters. Shopfront and residential glass quotes from measured-up photos.',
    teamSize: 'Team of 3–8',
  },
};

// Pipeline columns
const STAGES = [
  { id: 'enquiry', label: 'Enquiry', dot: 'var(--ink-40)' },
  { id: 'site-visit', label: 'Site visit', dot: 'var(--ink-40)' },
  { id: 'quoting', label: 'Quoting', dot: 'var(--accent)' },
  { id: 'approved', label: 'Approved', dot: 'var(--sage)' },
  { id: 'scheduled', label: 'Scheduled', dot: 'var(--sage)' },
  { id: 'in-progress', label: 'In progress', dot: 'var(--accent)' },
  { id: 'invoiced', label: 'Invoiced', dot: 'var(--ink-40)' },
  { id: 'paid', label: 'Paid', dot: 'var(--sage-dark)' },
];

// Jobs per trade. Each job has: id, title, customer, address, stage, value, age, tech initials
const JOBS_BY_TRADE = {
  hvac: [
    { id: 'J-1047', title: 'Ducted AC retrofit', customer: 'Coogee Dental Studio', address: 'Coogee', stage: 'enquiry', value: 14200, age: '2h', tech: 'DH', hot: true },
    { id: 'J-1046', title: 'Split system replace ×2', customer: 'Patel, Randwick', address: 'Randwick', stage: 'enquiry', value: null, age: '5h', tech: null },
    { id: 'J-1044', title: '7.1kW Daikin install', customer: 'Wu Residence', address: 'Ashfield', stage: 'site-visit', value: null, age: '1d', tech: 'DN' },
    { id: 'J-1042', title: 'Cassette unit replace', customer: 'Harper Café', address: 'Newtown', stage: 'quoting', value: 8420, age: '2d', tech: 'DH' },
    { id: 'J-1039', title: 'Ducted zoning upgrade', customer: 'Chen Family', address: 'Mosman', stage: 'quoting', value: 6800, age: '3d', tech: 'DN', flagged: 'Asbestos flag' },
    { id: 'J-1033', title: 'Commercial RTU service', customer: 'IGA Bondi Jct', address: 'Bondi Junction', stage: 'approved', value: 3200, age: '5d', tech: 'DH' },
    { id: 'J-1029', title: '2×5kW splits - office fit', customer: 'Loomis Legal', address: 'Surry Hills', stage: 'scheduled', value: 9600, age: '1w', tech: 'DN', scheduledFor: 'Thu 9:00' },
    { id: 'J-1024', title: 'VRF pipework + controls', customer: 'Greenpoint Gym', address: 'Alexandria', stage: 'in-progress', value: 24800, age: '10d', tech: 'DH+DN', progress: 0.6 },
    { id: 'J-1017', title: 'Annual service × 6 units', customer: 'Chatswood Dental', address: 'Chatswood', stage: 'invoiced', value: 1840, age: '2w', tech: 'DH' },
    { id: 'J-1011', title: 'Split install + isolator', customer: 'Singh, Earlwood', address: 'Earlwood', stage: 'paid', value: 3650, age: '3w', tech: 'DN' },
  ],
  plumbing: [
    { id: 'J-1047', title: 'Hot water system replace', customer: 'Moreno', address: '12 Illawarra Rd', stage: 'enquiry', value: 2840, age: '4h', tech: 'PH', hot: true },
    { id: 'J-1046', title: 'Burst main emergency', customer: 'Nowak, Glebe', address: 'Glebe', stage: 'enquiry', value: null, age: '1h', tech: null, hot: true },
    { id: 'J-1045', title: 'Leaking mixer tap', customer: 'Wu Residence', address: 'Ashfield', stage: 'site-visit', value: 320, age: '1d', tech: 'DN' },
    { id: 'J-1042', title: 'Bathroom roughin', customer: 'Patel Reno', address: 'Marrickville', stage: 'quoting', value: 6200, age: '2d', tech: 'PH' },
    { id: 'J-1039', title: 'Gas hob install + cert', customer: 'Kim, Leichhardt', address: 'Leichhardt', stage: 'quoting', value: 780, age: '3d', tech: 'DN' },
    { id: 'J-1033', title: 'Blocked sewer main', customer: 'Maccas Drive-Thru', address: 'Mascot', stage: 'approved', value: 1400, age: '5d', tech: 'PH' },
    { id: 'J-1029', title: 'Full bathroom rough+fit', customer: 'Loomis', address: 'Surry Hills', stage: 'scheduled', value: 9600, age: '1w', tech: 'DN', scheduledFor: 'Thu 9:00' },
    { id: 'J-1024', title: 'Café grease trap install', customer: 'Harper Café', address: 'Newtown', stage: 'in-progress', value: 4800, age: '10d', tech: 'PH+DN', progress: 0.6 },
    { id: 'J-1017', title: 'Tap + isolator - strata', customer: 'Elm St Strata', address: 'Glebe', stage: 'invoiced', value: 540, age: '2w', tech: 'PH' },
    { id: 'J-1011', title: 'HWS install + relief valve', customer: 'Singh, Earlwood', address: 'Earlwood', stage: 'paid', value: 1650, age: '3w', tech: 'DN' },
  ],
  solar: [
    { id: 'J-1047', title: '6.6kW rooftop + Powerwall', customer: 'Nguyen', address: 'Earlwood', stage: 'enquiry', value: 15800, age: '3h', tech: 'SB', hot: true },
    { id: 'J-1046', title: '10kW commercial', customer: 'Harper Café', address: 'Newtown', stage: 'enquiry', value: null, age: '6h', tech: null },
    { id: 'J-1044', title: '13kW + battery backup', customer: 'Greenpoint Gym', address: 'Alexandria', stage: 'site-visit', value: null, age: '1d', tech: 'SB' },
    { id: 'J-1042', title: 'Panel + inverter upgrade', customer: 'Chen', address: 'Mosman', stage: 'quoting', value: 9400, age: '2d', tech: 'SB' },
    { id: 'J-1039', title: '5kW + STC assign', customer: 'Patel', address: 'Marrickville', stage: 'quoting', value: 6800, age: '3d', tech: 'SB' },
    { id: 'J-1033', title: 'Inverter replace - Fronius', customer: 'Loomis', address: 'Surry Hills', stage: 'approved', value: 2200, age: '5d', tech: 'SB' },
    { id: 'J-1029', title: '8.8kW + export limit', customer: 'Kim', address: 'Leichhardt', stage: 'scheduled', value: 11200, age: '1w', tech: 'SB', scheduledFor: 'Thu 7:30' },
    { id: 'J-1024', title: '30kW commercial', customer: 'IGA Bondi Jct', address: 'Bondi Jct', stage: 'in-progress', value: 38400, age: '10d', tech: 'SB+KL', progress: 0.5 },
    { id: 'J-1017', title: 'Tilt frame + 6 panels', customer: 'Whitford', address: 'Newport', stage: 'invoiced', value: 2840, age: '2w', tech: 'SB' },
    { id: 'J-1011', title: '6.6kW STC-rebated', customer: 'Singh', address: 'Earlwood', stage: 'paid', value: 5450, age: '3w', tech: 'KL' },
  ],
  electrical: [
    { id: 'J-1047', title: 'Switchboard + RCD upgrade', customer: 'Harper Café', address: 'Newtown', stage: 'enquiry', value: 3600, age: '2h', tech: 'EC', hot: true },
    { id: 'J-1046', title: 'Safety switch failure', customer: 'Elm St Strata', address: 'Glebe', stage: 'enquiry', value: null, age: '30m', tech: null, hot: true },
    { id: 'J-1044', title: 'Kitchen circuits × 3', customer: 'Wu Residence', address: 'Ashfield', stage: 'site-visit', value: null, age: '1d', tech: 'EC' },
    { id: 'J-1042', title: 'Data cabling - 12 drops', customer: 'Loomis Legal', address: 'Surry Hills', stage: 'quoting', value: 4200, age: '2d', tech: 'EC' },
    { id: 'J-1039', title: 'EV charger 22kW install', customer: 'Chen', address: 'Mosman', stage: 'quoting', value: 3200, age: '3d', tech: 'EC' },
    { id: 'J-1033', title: 'Emergency lighting test', customer: 'IGA Bondi Jct', address: 'Bondi Jct', stage: 'approved', value: 820, age: '5d', tech: 'EC' },
    { id: 'J-1029', title: 'Fit-out - 18 GPOs + lights', customer: 'Loomis', address: 'Surry Hills', stage: 'scheduled', value: 7600, age: '1w', tech: 'EC', scheduledFor: 'Thu 9:00' },
    { id: 'J-1024', title: 'Three-phase upgrade', customer: 'Greenpoint Gym', address: 'Alexandria', stage: 'in-progress', value: 12400, age: '10d', tech: 'EC+KL', progress: 0.7 },
    { id: 'J-1017', title: 'Sensor lights × 6', customer: 'Chatswood Dental', address: 'Chatswood', stage: 'invoiced', value: 1240, age: '2w', tech: 'EC' },
    { id: 'J-1011', title: 'CoES + certify', customer: 'Singh', address: 'Earlwood', stage: 'paid', value: 650, age: '3w', tech: 'KL' },
  ],
  roofing: [
    { id: 'J-1047', title: 'Metal re-roof 140sqm', customer: 'Whitford', address: 'Newport', stage: 'enquiry', value: 28400, age: '5h', tech: 'RF', hot: true },
    { id: 'J-1046', title: 'Storm damage - 8 tiles', customer: 'Patel', address: 'Randwick', stage: 'enquiry', value: null, age: '1h', tech: null, hot: true },
    { id: 'J-1044', title: 'Box gutter + flashings', customer: 'Wu Residence', address: 'Ashfield', stage: 'site-visit', value: null, age: '1d', tech: 'RF' },
    { id: 'J-1042', title: 'Colorbond re-sheet 110sqm', customer: 'Harper Café', address: 'Newtown', stage: 'quoting', value: 18600, age: '2d', tech: 'RF' },
    { id: 'J-1039', title: 'Skylight × 2 + flashings', customer: 'Chen', address: 'Mosman', stage: 'quoting', value: 4400, age: '3d', tech: 'RF' },
    { id: 'J-1033', title: 'Gutter clean + repair', customer: 'IGA Bondi Jct', address: 'Bondi Jct', stage: 'approved', value: 1100, age: '5d', tech: 'RF' },
    { id: 'J-1029', title: 'Terracotta repoint + ridge', customer: 'Loomis', address: 'Surry Hills', stage: 'scheduled', value: 6800, age: '1w', tech: 'RF', scheduledFor: 'Thu 7:00' },
    { id: 'J-1024', title: 'Commercial membrane re-do', customer: 'Greenpoint Gym', address: 'Alexandria', stage: 'in-progress', value: 22400, age: '10d', tech: 'RF+LK', progress: 0.4 },
    { id: 'J-1017', title: 'Valley iron replace', customer: 'Chatswood Dental', address: 'Chatswood', stage: 'invoiced', value: 1840, age: '2w', tech: 'RF' },
    { id: 'J-1011', title: 'Ridge cap + pointing', customer: 'Singh', address: 'Earlwood', stage: 'paid', value: 2250, age: '3w', tech: 'LK' },
  ],
};

// Focus job - the one we step through in the AI quote generator demo, per trade
const FOCUS_JOB = {
  hvac: {
    id: 'J-1044',
    title: '7.1kW Daikin install',
    customer: 'Wu Residence',
    customerPhone: '0412 881 203',
    address: '42 Frederick St, Ashfield NSW 2131',
    description: 'Family home, single story. Wants a split system in the main living room. Says it gets hot by 10am.',
    photos: [
      { label: 'Living room wall', caption: 'North-facing wall, 3.2m ceiling, no existing penetration', tone: '#cfc5b3' },
      { label: 'Outdoor yard', caption: 'South side, near meter box, 2.1m clearance to fence', tone: '#b3bdb0' },
      { label: 'Switchboard', caption: 'Existing 63A main, 2× RCDs, space for another pole', tone: '#c4bcac' },
      { label: 'Under-eaves run', caption: 'Roughly 7m pipe run wall-to-unit, one 90° bend', tone: '#bcb2a0' },
    ],
    notes: 'Customer wants Daikin. 7.1kW should do it - north-facing glass but decent eaves. 7m pipe run, easy penetration through brick veneer wall. Will need to core through render. Existing switchboard has room for one more pole + RCD. Asbestos in eaves? Pre-1980 home - worth a flag.',
    voiceNote: '02:14',
  },
  plumbing: {
    id: 'J-1042',
    title: 'Bathroom roughin - 2-bed reno',
    customer: 'Patel Reno',
    customerPhone: '0422 118 904',
    address: '16 Marrickville Rd, Marrickville NSW 2204',
    description: 'Second bathroom added to a 1920s terrace. Rough-in + fit-off.',
    photos: [
      { label: 'Existing main', caption: '20mm copper main under house, 80yr old', tone: '#b9b0a0' },
      { label: 'Room layout', caption: '2.4×1.8m, toilet on external wall, shower opposite', tone: '#cac0ad' },
      { label: 'Waste run', caption: 'Needs to drop through hardwood floor into crawl space', tone: '#c0b7a6' },
      { label: 'Hot water', caption: 'Existing HWS 8yrs old - might size up', tone: '#bdb4a2' },
    ],
    notes: 'Rough-in for second bathroom in terrace. 1920s, hardwood floor, solid brick. Need to trench under floor for waste - ~4.5m run to existing stack. Copper mains look brittle, recommend repipe. HWS capacity ok if not simultaneous with kitchen.',
    voiceNote: '03:02',
  },
  solar: {
    id: 'J-1042',
    title: 'Panel + inverter upgrade',
    customer: 'Chen Family',
    customerPhone: '0415 772 461',
    address: '28 Avenue Rd, Mosman NSW 2088',
    description: 'Existing 4kW from 2014, inverter failed. Wants to expand + battery-ready.',
    photos: [
      { label: 'Existing array', caption: '16× 250W panels, tilt mount, southwest pitch', tone: '#c0b8a6' },
      { label: 'Roof shading', caption: 'Jacaranda shade 2–4pm in summer', tone: '#b5b0a0' },
      { label: 'Inverter', caption: 'SMA 4kW, 2014 model, dead', tone: '#bdb4a2' },
      { label: 'Meter + switchboard', caption: 'Single-phase, 63A, room for battery', tone: '#c4bcac' },
    ],
    notes: 'Chen wants to keep existing panels working where possible but new inverter + 6 more panels. Shade from jacaranda 2hrs arvo - string layout matters. Single phase; export-limit if going >10kW. Battery-ready install. STC zone 3.',
    voiceNote: '02:48',
  },
  electrical: {
    id: 'J-1042',
    title: 'Data cabling - 12 drops',
    customer: 'Loomis Legal',
    customerPhone: '02 9211 4082',
    address: '118 Crown St, Surry Hills NSW 2010',
    description: 'Law firm fit-out, top floor of heritage terrace.',
    photos: [
      { label: 'Comms cabinet', caption: '12U wall-mount, existing patch panel 50%', tone: '#c0b8a6' },
      { label: 'Ceiling access', caption: 'Suspended tile, clear 300mm above', tone: '#bdb4a2' },
      { label: 'Desk zones', caption: 'Open-plan pods, 4× zones × 3 drops', tone: '#c4bcac' },
      { label: 'Floor plan', caption: 'Hand-drawn by building manager', tone: '#b9b0a0' },
    ],
    notes: 'Cat6A, 12 drops, 4 pods × 3. Run through ceiling tiles to existing cabinet. Cabinet has capacity. Heritage - no chasing. Need certified test per drop. One drop wants fibre future-ready, add empty conduit.',
    voiceNote: '02:21',
  },
  roofing: {
    id: 'J-1042',
    title: 'Colorbond re-sheet 110sqm',
    customer: 'Harper Café',
    customerPhone: '0409 334 818',
    address: '82 King St, Newtown NSW 2042',
    description: 'Café storage + staff room above kitchen. Corrugated iron end-of-life, leaking.',
    photos: [
      { label: 'Roof overview', caption: '110sqm, 15° pitch, two valleys', tone: '#bdb4a2' },
      { label: 'Leak area', caption: 'Valley flashing rusted through, active drip', tone: '#b5ada0' },
      { label: 'Structure', caption: 'Timber battens, mostly sound, 3 soft', tone: '#c0b8a6' },
      { label: 'Access', caption: 'Rear lane access, scaffold goes over neighbour', tone: '#cac0ad' },
    ],
    notes: 'Existing iron is Zincalume, maybe 30yrs old. Strip and re-sheet in Colorbond (client choice: Monument). Replace 3 soft battens. New valley flashings and gutter. Scaffold over neighbour - need permission, factor in. Skylight optional per client.',
    voiceNote: '02:37',
  },
};

// The AI quote stream - line items arrive one-by-one with delays
// Each line: { delay (ms since prev), text, qty, rate, total, note }
const QUOTE_STREAMS = {
  hvac: {
    preamble: 'Analyzing 4 photos and your notes…',
    clarifying: {
      question: 'Pre-1980 home - you mentioned asbestos in eaves. Want me to add an asbestos-check line item and compliance note?',
      yes: 'Added. Item includes 3rd-party swab test + certified disposal if positive.',
      no: 'Skipped. Added a note for the tech to confirm on-site.',
    },
    items: [
      { delay: 800, text: 'Supply 7.1kW Daikin Cora split system (FTXM71T / RXM71T)', qty: 1, rate: 2480, total: 2480, note: '5yr warranty, R32' },
      { delay: 900, text: 'Supply copper pipe set, insulated, 7m run', qty: 7, unit: 'm', rate: 42, total: 294 },
      { delay: 700, text: 'Supply R32 refrigerant top-up (factory charge covers 5m)', qty: 0.4, unit: 'kg', rate: 85, total: 34 },
      { delay: 1100, text: 'Supply electrical - 20A isolator, cable, conduit', qty: 1, rate: 185, total: 185 },
      { delay: 950, text: 'Supply condensate drain + wall brackets', qty: 1, rate: 95, total: 95 },
      { delay: 1000, text: 'Install labour - head unit, core-drill brick veneer', qty: 3, unit: 'h', rate: 140, total: 420 },
      { delay: 850, text: 'Install labour - outdoor condenser, pad, brackets', qty: 2, unit: 'h', rate: 140, total: 280 },
      { delay: 1000, text: 'Install labour - pipe run, insulation, commissioning', qty: 2.5, unit: 'h', rate: 140, total: 350 },
      { delay: 900, text: 'Electrical connection + isolator install (L2 sparkie)', qty: 1.5, unit: 'h', rate: 165, total: 248 },
      { delay: 1100, text: 'ARCtick refrigerant log + commissioning report', qty: 1, rate: 85, total: 85 },
      { delay: 1200, text: 'Remove + dispose old unit (if present)', qty: 1, rate: 120, total: 120, optional: true },
    ],
    clarifyingLine: { text: 'Asbestos check - 3rd-party swab test (eaves penetration)', qty: 1, rate: 240, total: 240, note: 'Added per your answer' },
    summary: { subtotal: 4591, gst: 459.10, total: 5050.10 },
  },
  plumbing: {
    preamble: 'Reading 4 photos and voice note (03:02)…',
    clarifying: {
      question: 'Copper mains look brittle in photo 1 - recommend repipe for full rough-in? Adds ~$1,400.',
      yes: 'Added repipe line + updated waste plan.',
      no: 'Skipped. Flagged as risk note on quote.',
    },
    items: [
      { delay: 800, text: 'Supply - PEX-b pipe, fittings, manifolds (2-bath roughin)', qty: 1, rate: 620, total: 620 },
      { delay: 900, text: 'Supply - 100mm PVC-DWV stack + fittings', qty: 4.5, unit: 'm', rate: 68, total: 306 },
      { delay: 700, text: 'Supply - WC pan connector, flush kit, p-trap set', qty: 1, rate: 165, total: 165 },
      { delay: 1100, text: 'Supply - shower mixer, arm, rose (client spec)', qty: 1, rate: 420, total: 420 },
      { delay: 950, text: 'Supply - vanity tapware + basin waste', qty: 1, rate: 280, total: 280 },
      { delay: 1000, text: 'Labour - trench under floor, waste run 4.5m', qty: 3, unit: 'h', rate: 130, total: 390 },
      { delay: 850, text: 'Labour - roughin hot/cold, pressure test', qty: 4, unit: 'h', rate: 130, total: 520 },
      { delay: 1000, text: 'Labour - fit-off, commissioning, silicone', qty: 2.5, unit: 'h', rate: 130, total: 325 },
      { delay: 900, text: 'Gas compliance (if HWS relocated)', qty: 1, rate: 180, total: 180, optional: true },
      { delay: 1100, text: 'Council inspection booking + certificate', qty: 1, rate: 220, total: 220 },
    ],
    clarifyingLine: { text: 'Repipe hot/cold mains to HWS tie-in', qty: 1, rate: 1400, total: 1400, note: 'Added - brittle copper risk' },
    summary: { subtotal: 3426, gst: 342.60, total: 3768.60 },
  },
  solar: {
    preamble: 'Reading 4 photos and voice note (02:48)…',
    clarifying: {
      question: 'Jacaranda shade 2–4pm - split the new panels onto a second MPPT to protect output?',
      yes: 'Added - Fronius Primo GEN24 with 2 MPPT channels.',
      no: 'Single MPPT noted. Expect ~15% drop during shade window.',
    },
    items: [
      { delay: 800, text: 'Supply - 6× Jinko Tiger NEO 440W panels', qty: 6, rate: 198, total: 1188 },
      { delay: 900, text: 'Supply - Fronius Primo 5.0-1 inverter (5kW)', qty: 1, rate: 1850, total: 1850 },
      { delay: 700, text: 'Supply - DC isolators, combiner box, cabling', qty: 1, rate: 340, total: 340 },
      { delay: 1100, text: 'Supply - rail + clamp kit, tilt mounts', qty: 6, rate: 42, total: 252 },
      { delay: 950, text: 'Supply - battery-ready AC-coupled wiring (future)', qty: 1, rate: 280, total: 280 },
      { delay: 1000, text: 'Labour - panel install, rail + roof penetrations', qty: 5, unit: 'h', rate: 120, total: 600 },
      { delay: 850, text: 'Labour - inverter removal + replacement', qty: 2, unit: 'h', rate: 120, total: 240 },
      { delay: 1000, text: 'Labour - DC/AC wiring, switchboard tie-in', qty: 3, unit: 'h', rate: 140, total: 420 },
      { delay: 900, text: 'CEC installer sign-off + grid connection form', qty: 1, rate: 180, total: 180 },
      { delay: 1100, text: 'STC rebate assignment (applied as discount below)', qty: 1, rate: 0, total: 0, note: 'see STC line' },
      { delay: 1200, text: 'STC rebate - Zone 3, 16 certs @ $36', qty: -16, unit: 'STC', rate: 36, total: -576, isRebate: true },
    ],
    clarifyingLine: { text: 'Upgrade - Fronius Primo GEN24 dual-MPPT (shade-aware)', qty: 1, rate: 420, total: 420, note: 'vs Primo 5.0-1' },
    summary: { subtotal: 4774, gst: 477.40, total: 5251.40 },
  },
  electrical: {
    preamble: 'Reading 4 photos and voice note (02:21)…',
    clarifying: {
      question: 'Heritage listing - should I include a "no chasing" clause and quote surface-mount conduit alternative?',
      yes: 'Added surface conduit alt + heritage clause.',
      no: 'Ceiling-only routing confirmed in primary scope.',
    },
    items: [
      { delay: 800, text: 'Supply - Cat6A cable, 305m reel', qty: 1, rate: 380, total: 380 },
      { delay: 900, text: 'Supply - RJ45 jacks + wall plates × 12', qty: 12, rate: 18, total: 216 },
      { delay: 700, text: 'Supply - patch panel ports + patch cords', qty: 12, rate: 22, total: 264 },
      { delay: 1100, text: 'Supply - 20mm conduit + brackets (fibre future)', qty: 15, unit: 'm', rate: 8, total: 120 },
      { delay: 950, text: 'Labour - cable pull through ceiling, 12 drops', qty: 6, unit: 'h', rate: 145, total: 870 },
      { delay: 1000, text: 'Labour - terminations, 24 ends + patch panel', qty: 3, unit: 'h', rate: 145, total: 435 },
      { delay: 850, text: 'Labour - fluke cert test each drop, report', qty: 2, unit: 'h', rate: 145, total: 290 },
      { delay: 1000, text: 'Empty 20mm conduit run for future fibre', qty: 1, rate: 180, total: 180 },
      { delay: 900, text: 'Compliance - Cabling Registry record, CoES', qty: 1, rate: 120, total: 120 },
    ],
    clarifyingLine: { text: 'Heritage surface conduit alt - 1 pod quoted', qty: 1, rate: 340, total: 340, note: 'optional per heritage officer' },
    summary: { subtotal: 2875, gst: 287.50, total: 3162.50 },
  },
  roofing: {
    preamble: 'Reading 4 photos and voice note (02:37)…',
    clarifying: {
      question: 'Scaffold needs to go over neighbour - add neighbour-access variation clause to the quote?',
      yes: 'Added variation - +1 day contingency, permission form template included.',
      no: 'Left out. Risk note placed on quote.',
    },
    items: [
      { delay: 800, text: 'Supply - Colorbond Monument sheeting, 110sqm', qty: 110, unit: 'sqm', rate: 58, total: 6380 },
      { delay: 900, text: 'Supply - valley flashings, ridge cap, barge', qty: 1, rate: 640, total: 640 },
      { delay: 700, text: 'Supply - Colorbond gutter, new downpipes × 3', qty: 24, unit: 'm', rate: 32, total: 768 },
      { delay: 1100, text: 'Supply - replacement battens × 3 (6m)', qty: 3, rate: 48, total: 144 },
      { delay: 950, text: 'Supply - sarking, foam closures, fasteners', qty: 1, rate: 420, total: 420 },
      { delay: 1000, text: 'Labour - strip existing iron, debris-safe', qty: 8, unit: 'h', rate: 110, total: 880 },
      { delay: 850, text: 'Labour - re-sheet + flashings install', qty: 16, unit: 'h', rate: 110, total: 1760 },
      { delay: 1000, text: 'Labour - gutter + downpipe install', qty: 4, unit: 'h', rate: 110, total: 440 },
      { delay: 900, text: 'Scaffold hire (rear + gable), 3 days', qty: 3, unit: 'day', rate: 280, total: 840 },
      { delay: 1100, text: 'Waste removal - old iron to recycler', qty: 1, rate: 340, total: 340 },
    ],
    clarifyingLine: { text: 'Neighbour-access variation clause + 1 day contingency', qty: 1, rate: 440, total: 440, note: 'permission form included' },
    summary: { subtotal: 12612, gst: 1261.20, total: 13873.20 },
  },
};

// Activity log (shared shape)
const ACTIVITY = [
  { when: 'Today 09:14', who: 'Ellie', what: 'Created job J-1044 from Wu Residence enquiry' },
  { when: 'Today 11:02', who: 'Dan (tech)', what: 'Site visit - uploaded 4 photos + voice note' },
  { when: 'Today 11:44', who: 'AI', what: 'Generated quote draft - 11 line items, $5,050.10' },
  { when: 'Today 12:10', who: 'Ellie', what: 'Edited: removed "remove old unit" line' },
  { when: 'Today 12:12', who: 'Ellie', what: 'Sent quote to Wu Residence via SMS + email' },
];


// For the 12 unseeded trades, reuse the closest seeded trade's demo data
// (jobs/focus job/quote stream). Landing personalization still uses real trade name.
const _TRADE_FALLBACK = {
  fire: 'electrical', security: 'electrical', garage: 'electrical',
  glass: 'roofing', fencing: 'roofing', concrete: 'roofing',
  construction: 'roofing', landscaping: 'roofing', painting: 'roofing',
  cleaning: 'electrical', pest: 'plumbing', pool: 'plumbing',
};
Object.entries(_TRADE_FALLBACK).forEach(([k, v]) => {
  JOBS_BY_TRADE[k] = JOBS_BY_TRADE[v];
  FOCUS_JOB[k] = FOCUS_JOB[v];
  QUOTE_STREAMS[k] = QUOTE_STREAMS[v];
});

Object.assign(window, { TRADES, BUSINESS, PROSPECTS, STAGES, JOBS_BY_TRADE, FOCUS_JOB, QUOTE_STREAMS, ACTIVITY });
