// Zeranda sample data — realistic (not all-zeros) so the redesign feels alive.
window.ZD_DATA = {
  user: { name: "Alex Carter", email: "alex.carter@gmail.com", initial: "A" },

  // Currency — one home/display currency; foreign amounts convert against `rates`
  // (rate = value of 1 unit of that currency in the home currency).
  fx: {
    home: 'USD',
    rates: { USD: 1, EUR: 1.08, GBP: 1.27 },
    currencies: [
      { code:'USD', name:'US Dollar' },
      { code:'EUR', name:'Euro' },
      { code:'GBP', name:'British Pound' },
    ],
  },

  // Settings — account, plan, integrations, preferences, privacy.
  settings: {
    plan: { name:'Plus', trial:true, scanLimit:'Unlimited', maxAccounts:5, trialDaysLeft:59, trialTotal:60, trialEnds:'July 31, 2026' },
    profile: { userId:'767b665e-8321-4e30-894d-7c02ae514f09', country:'United States' },
    // `granted` = the access scopes each inbox approved. The primary inbox (Personal)
    // has read + contacts; calendar + send were added to Zeranda after it first
    // connected, so they're off until reconnected. The other inboxes are fully
    // connected — so Settings + the inbox picker show a healthy-vs-limited contrast.
    // Globex (a4) is `paused` — the user switched its syncing off (access intact),
    // which drives the neutral "syncing paused" treatment across the app.
    accounts: [
      { id:'a1', email:'alex.carter@gmail.com', nickname:'Personal', provider:'google',    primary:true,  status:'connected', lastSync:'2 min ago', connectedOn:'March 2026', paused:false, granted:['read','contacts'] },
      { id:'a2', email:'alex.c.projects@gmail.com', nickname:'Projects', provider:'google',     primary:false, status:'connected', lastSync:'9 min ago', connectedOn:'May 2026',   paused:false, granted:['read','calendar','send','contacts'] },
      { id:'a3', email:'alex@acme.co',      nickname:'Acme',     provider:'microsoft',  primary:false, status:'connected', lastSync:'1 hr ago',  connectedOn:'May 2026',   paused:false, granted:['read','calendar','send','contacts'] },
      { id:'a4', email:'a.carter@globex.io',    nickname:'Globex',   provider:'microsoft',  primary:false, status:'connected', lastSync:'3 hr ago',  connectedOn:'June 2026',  paused:false,  granted:['read','calendar','send','contacts'] },
    ],
    prefs: { push:false, billReminders:true, packageUpdates:true, emailNotifs:true, people:false, scanFreq:'Daily' },
    privacy: { retention:'90 days', aiProcessing:true },
  },

  // “What needs attention” — pre-prioritized for the Priority Inbox (sev: urgent|soon|info)
  attention: [
    { id:'a0', kind:'task',    icon:'alert-circle',   sev:'urgent', title:'URGENT: Create the deck for tonight’s presentation', meta:'Urgent subject · action required', when:'Today', age:'55m' },
    { id:'a1', kind:'task',    icon:'corner-up-left', sev:'urgent', title:'Reply to landlord about lease renewal', meta:'Follow-up · flagged high', when:'Today', age:'2h' },
    { id:'a3', kind:'bill',    icon:'shield',         sev:'soon',   title:'Geico auto insurance — $142.00', meta:'Insurance · due in 3 days', when:'Jun 9', age:'' },
    { id:'a2', kind:'package', icon:'package',        sev:'soon',   title:'AirPods Pro — out for delivery', meta:'Amazon · arriving by 9 PM', when:'Today', age:'' },
    { id:'a4', kind:'event',   icon:'check-circle-2', sev:'info',   title:'Weekly inbox synced — 0 issues', meta:'128 emails sorted · all categorized', when:'2m ago', age:'' },
  ],

  briefing: {
    summary: 'Focus on the client deck first — it’s due tonight and still unstarted. Two replies are waiting on you, and there’s $329.21 in bills landing this week. Everything else is on track; nothing overdue.',
    outlook: [
      { day:'Today', label:'AI Assistant Best Practices', meta:'8:00 PM · webinar', tint:'purple' },
      { day:'Tomorrow', label:'Email Deliverability 101', meta:'9:30 PM · prep needed', tint:'gold' },
      { day:'Thu', label:'Connected GTM Stack', meta:'Late evening session', tint:'teal' },
    ],
  },

  // KPI bento — tinted tiles with trend + sparkline
  kpis: [
    { id:'bills', label:'Upcoming bills', icon:'dollar-sign', tint:'gold',   value:'$329.21', sub:'4 due this week', to:'bills',    trend:{dir:'up',  pct:'8%',  good:false}, spark:[6,8,7,9,8,11,12] },
    { id:'pkgs',  label:'Active packages', icon:'package',    tint:'teal',   value:'3',       sub:'1 arriving today', to:'packages', trend:{dir:'flat',pct:'0%',  good:true},  spark:[2,3,2,4,3,3,3] },
    { id:'events',label:'Upcoming events', icon:'calendar',   tint:'purple', value:'7',       sub:'7 this week',      to:'calendar', trend:{dir:'up',  pct:'1',   good:true},  spark:[1,2,1,3,2,2,3] },
    { id:'tasks', label:'Pending tasks',   icon:'check-square',tint:'blue',  value:'14',      sub:'2 due today',      to:'tasks',    trend:{dir:'down',pct:'3',   good:true},  spark:[18,17,16,15,16,15,14] },
    { id:'subs',  label:'Monthly subs',    icon:'trending-up', tint:'green',  value:'$124.96', sub:'5 active',         to:'subs',     trend:{dir:'down',pct:'4%',  good:true},  spark:[140,135,130,128,126,125,125] },
    { id:'spend', label:'7-day spending',  icon:'shopping-cart',tint:'pink',  value:'$335.40', sub:'8 purchases',      to:'bills',    trend:{dir:'up',  pct:'12%', good:false}, spark:[40,60,55,90,120,110,335] },
  ],

  // Bill categories — used by the table filter + the edit category picker
  billCategories: [
    { id:'utilities',  label:'Utilities',        tint:'gold',   icon:'zap' },
    { id:'insurance',  label:'Insurance',        tint:'blue',   icon:'shield' },
    { id:'healthcare', label:'Healthcare',       tint:'pink',   icon:'heart-pulse' },
    { id:'rent',       label:'Rent / Mortgage',  tint:'purple', icon:'home' },
    { id:'subscription',label:'Subscriptions',   tint:'green',  icon:'credit-card' },
    { id:'food',       label:'Food & Dining',    tint:'red',    icon:'utensils' },
    { id:'transport',  label:'Transport',        tint:'teal',   icon:'car' },
    { id:'taxes',      label:'Taxes & Fees',     tint:'gold',   icon:'landmark' },
  ],

  bills: [
    { id:'b1', merchant:'Geico',                  cat:'Insurance',       catId:'insurance',  catTint:'blue',   icon:'shield',     ccy:'USD', amountVal:142,     due:'Jun 9',  dueISO:'2026-06-09', status:'pending', account:'Auto policy ••4821',  confidence:92, recurring:true,
      items:[ { label:'Liability coverage', amt:98 }, { label:'Collision & comprehensive', amt:38 }, { label:'Roadside assistance', amt:6 } ] },
    { id:'b2', merchant:'Pacific Gas & Electric', cat:'Utilities',       catId:'utilities',  catTint:'gold',   icon:'zap',        ccy:'USD', amountVal:63.2,    due:'Jun 18', dueISO:'2026-06-18', status:'pending', account:'Acct ••0097',        confidence:88,
      items:[ { label:'Electricity', meta:'320 kWh', amt:41.6 }, { label:'Gas usage', amt:14.4 }, { label:'Service & delivery', amt:7.2 } ] },
    { id:'b3', merchant:'Verizon',                cat:'Utilities',       catId:'utilities',  catTint:'gold',   icon:'smartphone', ccy:'USD', amountVal:89.12,   due:'May 13', dueISO:'2026-05-13', status:'overdue', account:'Wireless ••3310',    confidence:95,
      items:[ { label:'Unlimited plan', meta:'5G', amt:70 }, { label:'Hotspot add-on', amt:10 }, { label:'Taxes & fees', amt:9.12 } ] },
    { id:'b4', merchant:'Blue Cross',             cat:'Healthcare',      catId:'healthcare', catTint:'pink',   icon:'heart-pulse',ccy:'USD', amountVal:210,     due:'Jun 3',  dueISO:'2026-06-03', status:'overdue', account:'Member ••7745',      confidence:90,
      items:[ { label:'Monthly premium', amt:186 }, { label:'Dental add-on', amt:24 } ] },
    { id:'b5', merchant:'Greystar (Rent)',        cat:'Rent / Mortgage', catId:'rent',       catTint:'purple', icon:'home',       ccy:'USD', amountVal:2400,    due:'Jun 1',  dueISO:'2026-06-01', status:'paid',    account:'Unit 4B',            confidence:99,
      items:[ { label:'Base rent', amt:2280 }, { label:'Parking space', meta:'1 spot', amt:120 } ] },
    { id:'b6', merchant:'State Farm Auto',        cat:'Insurance',       catId:'insurance',  catTint:'blue',   icon:'shield',     ccy:'USD', amountVal:96.4,    due:'Jun 22', dueISO:'2026-06-22', status:'pending', account:'Policy ••1180',      confidence:84,
      items:[ { label:'Auto coverage', amt:84 }, { label:'Roadside assistance', amt:12.4 } ] },
    { id:'b7', merchant:'Precision Auto Care',    cat:'Utilities',       catId:'utilities',  catTint:'gold',   icon:'car',        ccy:'USD', amountVal:569.63,  due:'Apr 14', dueISO:'2026-04-14', status:'overdue', account:'Invoice ••5521',     confidence:81, payLink:'https://pay.zeranda.example/inv-5521', attachments:[{ id:'b7a1', name:'invoice-5521.pdf', size:184320 }, { id:'b7a2', name:'service-photos.jpg', size:521000 }],
      items:[ { label:'Engine oil change', meta:'5W-30 · 5 qt', amt:89 }, { label:'Front brake pads', meta:'Replacement', amt:229 }, { label:'Air filter', amt:42 }, { label:'Labor', meta:'3 hrs', amt:165 }, { label:'Sales tax', meta:'8.5%', amt:44.63 } ] },
    { id:'b8', merchant:'IRS Quarterly',          cat:'Taxes & Fees',    catId:'taxes',      catTint:'gold',   icon:'landmark',   ccy:'USD', amountVal:540,     due:'Jun 15', dueISO:'2026-06-15', status:'pending', account:'EIN ••2290',         confidence:97,
      items:[ { label:'Q2 estimated income tax', amt:540 } ] },
    { id:'b9', merchant:'Adobe Systems EU',       cat:'Utilities',       catId:'utilities',  catTint:'gold',   icon:'palette',    ccy:'EUR', amountVal:59.99,   due:'May 25', dueISO:'2026-05-25', status:'paid',    account:'Team ••6034',        confidence:93, recurring:true, attachments:[{ id:'b9a1', name:'adobe-receipt-may.pdf', size:96000 }],
      items:[ { label:'Creative Cloud All Apps', amt:49.99 }, { label:'Extra storage', meta:'100 GB', amt:10 } ] },
  ],

  receipts: [
    { id:'r1', merchant:'Amazon',      icon:'shopping-cart', tint:'gold',  detail:'AirPods Pro (2nd gen)',  order:'#114-228', items:[ { label:'AirPods Pro (2nd gen)', qty:1, amt:249 } ], ccy:'USD', amountVal:249,   date:'May 30', dateISO:'2026-05-30', cat:'Shopping',      type:'purchase', source:true, attachments:[{ id:'r1a1', name:'amazon-order-114228.pdf', size:122000 }] },
    { id:'r2', merchant:'Whole Foods', icon:'shopping-bag',  tint:'green', detail:'In-store groceries',     order:'POS ••7782', items:[ { label:'Organic produce', amt:32.1 }, { label:'Pantry staples', amt:28.5 }, { label:'Household & cleaning', amt:25.8 } ],ccy:'USD', amountVal:86.4,  date:'May 28', dateISO:'2026-05-28', cat:'Food & Dining', type:'purchase', source:true, attachments:[] },
    { id:'r3', merchant:'Experian',    icon:'file-text',     tint:'blue',  detail:'Annual credit report',   order:'#2476644', items:[ { label:'Annual credit report', meta:'Complimentary', amt:0 } ],  ccy:'USD', amountVal:0,     date:'May 26', dateISO:'2026-05-26', cat:'Services',      type:'statement',source:true, attachments:[{ id:'r3a1', name:'Experian-CreditReport.pdf', size:240000 }] },
    { id:'r4', merchant:'Verizon',     icon:'smartphone',    tint:'teal',  detail:'Wireless bill receipt',  order:'#VZ-88214', items:[ { label:'Unlimited plan', amt:70 }, { label:'Hotspot add-on', amt:10 }, { label:'Taxes & fees', amt:9.12 } ], ccy:'USD', amountVal:89.12,  date:'May 13', dateISO:'2026-05-13', cat:'Utilities',     type:'purchase', source:true, attachments:[{ id:'r4a1', name:'VerizonReceipt_VZ88214.pdf', size:88000 }] },
    { id:'r5', merchant:'ChatGPT',     icon:'sparkles',      tint:'green', detail:'Team plan · annual',     order:'#sub_1TQM', items:[ { label:'ChatGPT Team', meta:'Annual · 1 seat', qty:1, amt:300 } ], ccy:'USD', amountVal:300, date:'Apr 25', dateISO:'2026-04-25', cat:'Subscriptions', type:'purchase', source:true, attachments:[] },
    { id:'r6', merchant:'Uber',        icon:'car',           tint:'teal',  detail:'Trip · Airport → Home',  order:'#A93-118', items:[ { label:'Trip fare', amt:26.5 }, { label:'Booking fee', amt:2.3 }, { label:'Tip', amt:3 } ],  ccy:'USD', amountVal:31.8,  date:'May 24', dateISO:'2026-05-24', cat:'Transport',     type:'purchase', source:true, attachments:[] },
    { id:'r7', merchant:'Jaza Store',  icon:'shopping-bag',  tint:'gold',  detail:'Order invoice',          order:'#JZ-4471', items:[ { label:'Order subtotal', amt:100 } ],  ccy:'USD', amountVal:100,   date:'Apr 14', dateISO:'2026-04-14', cat:'Shopping',      type:'purchase', source:false,attachments:[{ id:'r7a1', name:'invoice.png', size:312000 }] },
    { id:'r8', merchant:'Apple',       icon:'smartphone',    tint:'purple',detail:'Refund · iCloud+ 2TB',   order:'#MX9920', items:[ { label:'iCloud+ 2TB', meta:'Refund', amt:-9.99 } ],   ccy:'USD', amountVal:-9.99, date:'May 22', dateISO:'2026-05-22', cat:'Subscriptions', type:'refund',   source:true, attachments:[] },
    { id:'r9', merchant:'Best Buy',    icon:'shopping-cart', tint:'red',   detail:'Return · damaged item',  order:'#1063', items:[ { label:'Returned item', meta:'Damaged', amt:-34.99 } ],      ccy:'USD', amountVal:-34.99, date:'Sep 15', dateISO:'2025-09-15', cat:'Shopping',      type:'refund',   source:true, attachments:[] },
  ],

  packages: [
    { id:'p1', name:'AirPods Pro (2nd gen)', carrier:'Amazon Logistics', tracking:'TBA303914...', status:'Out for delivery', pct:75, tint:'teal', eta:'Today by 9 PM', trackUrl:'https://track.amazon.com/tracking/TBA303914', items:[ { label:'AirPods Pro (2nd gen)', qty:1 }, { label:'USB-C charging cable', qty:1 }, { label:'Ear tips — S / M / L', qty:3, meta:'pairs' } ] },
    { id:'p2', name:'Nike Pegasus 41',       carrier:'UPS',              tracking:'1Z999AA10...', status:'In transit',       pct:50, tint:'gold', eta:'Wed, Jun 4', trackUrl:'https://www.ups.com/track?tracknum=1Z999AA10', items:[ { label:'Nike Pegasus 41 — Black', qty:1, meta:'US 10' } ] },
    { id:'p3', name:'Thorne Vitamins',       carrier:'USPS',             tracking:'9400 1112...', status:'Label created',    pct:25, tint:'blue', eta:'Fri, Jun 6', items:[ { label:'Basic Nutrients 2/day', qty:1 }, { label:'Vitamin D/K2 liquid', qty:1 }, { label:'Magnesium Bisglycinate', qty:1 } ] },
  ],

  // Events carry a real `dateISO` so the month grid can place them; spread across
  // June 2026 so the per-day dots actually have something to show. Sources tie
  // each one back to one of the connected inboxes.
  events: [
    { id:'e1c', title:'Call with landlord',          day:1, start:16, end:16.5,  tint:'teal',   kind:'Call',        location:'Phone',                 date:'Mon, Jun 1, 2026',  dateISO:'2026-06-01', when:'Today · 4:00 PM',  notes:'Confirm lease-renewal terms before the Jun 15 deadline.', source:{ from:'Maple Grove Properties', sender:'leasing@maplegrove.com', mailbox:'alex.c.projects@gmail.com', subject:'Lease renewal — please call to confirm', receivedISO:'2026-05-27' } },
    { id:'e1b', title:'Budget review with Zeranda',  day:1, start:18, end:18.75, tint:'gold',   kind:'Routine',     location:'Personal',              date:'Mon, Jun 1, 2026',  dateISO:'2026-06-01', when:'Today · 6:00 PM',  notes:'Monthly check-in on spending vs. plan.', mailbox:'alex.c.projects@gmail.com' },
    { id:'e1d', title:'Call with accountant',        start:18.5, end:19.25, tint:'blue',   kind:'Call',        location:'Phone',                 date:'Mon, Jun 1, 2026',  dateISO:'2026-06-01', when:'Today · 6:30 PM',  notes:'Go over Q2 estimates ahead of the review.', mailbox:'alex@acme.co' },
    { id:'e1',  needsApproval:true, title:'AI Assistant Best Practices', day:1, start:20, end:21,    tint:'purple', kind:'Webinar',     location:'Zoom webinar',          date:'Mon, Jun 1, 2026',  dateISO:'2026-06-01', when:'Today · 8:00 PM',  notes:'Live session on getting the most from your assistant. Prep: review last week’s questions.', source:{ from:'Zeranda Events', sender:'webinars@zeranda.com', mailbox:'alex@acme.co', subject:'You’re registered: AI Assistant Best Practices', receivedISO:'2026-05-24' } },
    { id:'e2',  title:'Dentist — cleaning',          day:2, start:16, end:17,    tint:'teal',   kind:'Appointment', location:'Bright Smile Dental',   date:'Tue, Jun 2, 2026',  dateISO:'2026-06-02', when:'Tue, Jun 2 · 4:00 PM', notes:'Routine cleaning. Bring insurance card.', source:{ from:'Bright Smile Dental', sender:'appointments@brightsmile.com', mailbox:'alex.carter@gmail.com', subject:'Your cleaning appointment is confirmed', receivedISO:'2026-05-28' } },
    { id:'e4',  title:'Quarterly business review',   start:11,  end:12.5, tint:'blue',   kind:'Meeting',     location:'Boardroom A',           date:'Wed, Jun 3, 2026',  dateISO:'2026-06-03', notes:'Q2 numbers walkthrough with the leadership team.', source:{ from:'Acme Ops', sender:'ops@acme.co', mailbox:'alex@acme.co', subject:'QBR agenda + deck', receivedISO:'2026-05-30' } },
    { id:'e3',  title:'Team sync',                   day:4, start:18, end:19,    tint:'gold',   kind:'Meeting',     location:'Google Meet',           date:'Thu, Jun 4, 2026',  dateISO:'2026-06-04', when:'Thu, Jun 4 · 6:00 PM', notes:'Weekly status and blockers.', mailbox:'alex@acme.co' },
    { id:'e5',  title:'Lease signing deadline',      start:9,   end:9.5,  tint:'red',    kind:'Reminder',    location:'',                      date:'Fri, Jun 5, 2026',  dateISO:'2026-06-05', notes:'Return the signed lease before end of day.', source:{ from:'Maple Grove Properties', sender:'leasing@maplegrove.com', mailbox:'alex.c.projects@gmail.com', subject:'Action needed: signed lease', receivedISO:'2026-05-29' } },
    { id:'e6',  needsApproval:true, title:'Project kickoff',             start:14,  end:15,   tint:'purple', kind:'Meeting',     location:'Google Meet',           date:'Tue, Jun 9, 2026',  dateISO:'2026-06-09', notes:'New engagement kickoff with the Acme team.', source:{ from:'Acme PMO', sender:'pmo@acme.co', mailbox:'alex@acme.co', subject:'Kickoff invite', receivedISO:'2026-06-02' } },
    { id:'e7',  title:'Flight to San Francisco',     start:7,   end:10,   tint:'gold',   kind:'Reminder',    location:'SFO · UA 738',          date:'Fri, Jun 12, 2026', dateISO:'2026-06-12', notes:'Check in 24 hours before departure.', source:{ from:'United Airlines', sender:'noreply@united.com', mailbox:'a.carter@globex.io', subject:'Your itinerary — UA 738', receivedISO:'2026-06-01' } },
    { id:'e8',  title:'Client dinner',               start:19.5, end:21,  tint:'teal',   kind:'Appointment', location:'Quince, San Francisco', date:'Fri, Jun 12, 2026', dateISO:'2026-06-12', notes:'Dinner with Globex leadership.', source:{ from:'Globex', sender:'events@globex.io', mailbox:'a.carter@globex.io', subject:'Dinner confirmed', receivedISO:'2026-06-03' } },
    { id:'e9',  title:'Design review',               start:15,  end:16,   tint:'blue',   kind:'Meeting',     location:'Figma + Meet',          date:'Tue, Jun 16, 2026', dateISO:'2026-06-16', notes:'Review v2 flows.', mailbox:'alex@acme.co' },
    { id:'e10', title:'Dentist — follow-up',         start:10,  end:10.5, tint:'teal',   kind:'Appointment', location:'Bright Smile Dental',   date:'Thu, Jun 18, 2026', dateISO:'2026-06-18', source:{ from:'Bright Smile Dental', sender:'appointments@brightsmile.com', mailbox:'alex.carter@gmail.com', subject:'Follow-up reminder', receivedISO:'2026-06-10' } },
    { id:'e11', needsApproval:true, title:'Board meeting',               start:13,  end:14.5, tint:'purple', kind:'Meeting',     location:'HQ · 12th floor',       date:'Tue, Jun 23, 2026', dateISO:'2026-06-23', notes:'Quarterly board sync.', source:{ from:'Globex Board', sender:'board@globex.io', mailbox:'a.carter@globex.io', subject:'Board pack', receivedISO:'2026-06-15' } },
    { id:'e12', title:'Adobe CC renewal',            start:9,   end:9.25, tint:'gold',   kind:'Reminder',    location:'',                      date:'Wed, Jun 24, 2026', dateISO:'2026-06-24', notes:'$59.99 — renews automatically.', source:{ from:'Adobe', sender:'billing@adobe.com', mailbox:'alex.carter@gmail.com', subject:'Your plan renews soon', receivedISO:'2026-06-17' } },
    { id:'e13', title:'Month-end budget review',     start:18,  end:18.75, tint:'gold',  kind:'Routine',     location:'Personal',              date:'Tue, Jun 30, 2026', dateISO:'2026-06-30', notes:'Close out June spending.', mailbox:'alex.c.projects@gmail.com' },
  ],

  tasks: [
    { id:'t1', title:'Reply to landlord about lease renewal', type:'Follow Up', typeTint:'purple', prio:'High', prioTint:'red',
      due:'Jun 5', dueISO:'2026-06-05', source:'Landlord · email',
      ctx:'Landlord asked whether you intend to renew the lease before the June 15 deadline.', action:'Draft a reply confirming renewal intent.',
      subtasks:[
        { id:'t1s1', label:'Confirm renewal terms & rent', done:true },
        { id:'t1s2', label:'Draft reply email', done:false },
        { id:'t1s3', label:'Send before Jun 15', done:false },
      ] },
    { id:'t2', title:'Set up budget check-in routine', type:'Commitment', typeTint:'blue', prio:'Medium', prioTint:'gold',
      due:'Jun 9', dueISO:'2026-06-09', source:'You · Zeranda chat',
      ctx:'You asked Zeranda to help set up a recurring monthly budget review.', action:'Create a simple budget check-in routine.',
      subtasks:[
        { id:'t2s1', label:'Pick a monthly date', done:true },
        { id:'t2s2', label:'Choose categories to track', done:true },
        { id:'t2s3', label:'Add recurring calendar event', done:false },
        { id:'t2s4', label:'Set a reminder', done:false },
        { id:'t2s5', label:'Review first month', done:false },
      ] },
    { id:'t3', title:'Submit application details', type:'Follow Up', typeTint:'purple', prio:'Medium', prioTint:'gold',
      due:'Jun 12', dueISO:'2026-06-12', source:'Onboarding · email',
      ctx:'Onboarding email requested missing application details to proceed.', action:'Send the requested documents.',
      subtasks:[
        { id:'t3s1', label:'Gather requested documents', done:true },
        { id:'t3s2', label:'Fill remaining fields', done:false },
        { id:'t3s3', label:'Submit form', done:false },
        { id:'t3s4', label:'Confirm receipt', done:false },
      ] },
  ],

  // Smart notifications — priority: high(red) | med(amber) | low(green/info)
  notifications: [
    { id:'n1', priority:'high', icon:'alert-circle',  title:'Blue Cross payment is overdue', meta:'$210.00 · was due Jun 3', when:'1h ago', unread:true },
    { id:'n2', priority:'high', icon:'corner-up-left', title:'Reply needed: lease renewal', meta:'Landlord · flagged high', when:'2h ago', unread:true },
    { id:'n3', priority:'med',  icon:'package',        title:'AirPods Pro out for delivery', meta:'Amazon · arriving by 9 PM today', when:'3h ago', unread:true },
    { id:'n4', priority:'med',  icon:'shield',         title:'Geico insurance due soon', meta:'$142.00 · due in 3 days', when:'5h ago', unread:false },
    { id:'n5', priority:'med',  icon:'calendar-clock', title:'Webinar starts at 8:00 PM', meta:'AI Assistant Best Practices', when:'6h ago', unread:false },
    { id:'n6', priority:'low',  icon:'check-circle-2', title:'Inbox synced securely', meta:'128 emails sorted · 0 issues', when:'2m ago', unread:false },
    { id:'n7', priority:'low',  icon:'credit-card',    title:'Spotify renewed', meta:'$11.99 · Premium · receipt saved', when:'1d ago', unread:false },
  ],

  // Spending breakdown by category (last 7 days) — powers the donut
  spending: {
    total: '$335.40', caption: 'Last 7 days · 8 purchases',
    categories: [
      { label:'Shopping',      amount:'$156.00', pct:46, color:'#A855F7' },
      { label:'Food & dining', amount:'$86.40',  pct:26, color:'#E2913C' },
      { label:'Subscriptions', amount:'$47.50',  pct:14, color:'#15A36B' },
      { label:'Transport',     amount:'$28.00',  pct:8,  color:'#14A89B' },
      { label:'Other',         amount:'$17.50',  pct:6,  color:'#8A8A90' },
    ],
  },

  // Banking — bank & credit-card statements detected from the inbox, grouped by institution.
  banking: {
    accountTypes: [
      { id:'all',        label:'All' },
      { id:'credit',     label:'Credit Card', tint:'purple', icon:'credit-card' },
      { id:'checking',   label:'Checking',    tint:'blue',   icon:'wallet' },
      { id:'savings',    label:'Savings',     tint:'teal',   icon:'piggy-bank' },
      { id:'investment', label:'Investment',  tint:'gold',   icon:'trending-up' },
      { id:'loan',       label:'Loan',        tint:'red',    icon:'banknote' },
    ],
    institutions: [
      { id:'chase', name:'Chase', type:'savings', icon:'landmark', account:'Savings ••4821', mailbox:'alex.carter@gmail.com', sender:'no-reply@alerts.chase.com', statements: [
        { id:'h0', period:'May 2026 · from PDF', periodISO:'2026-05-31', amountLabel:'Amount', pages:1, status:'new', files:[
          { name:'Chase-Notice-May-2026.pdf', kind:'PDF', pages:1, size:96000 },
        ] },
        { id:'h1', period:'May 1 – May 31, 2026', periodISO:'2026-05-31', amount:'$12,480.10', amountVal:12480.1, amountLabel:'Closing balance', pages:4, status:'new', files:[
          { name:'Chase-Savings-May-2026.pdf', kind:'PDF', pages:4, size:262144 },
          { name:'Transactions-May-2026.csv', kind:'CSV', size:18432 },
        ] },
        { id:'h2', period:'Apr 1 – Apr 30, 2026', periodISO:'2026-04-30', amount:'$11,215.00', amountVal:11215,   amountLabel:'Closing balance', pages:4, status:'reviewed' },
        { id:'h3', period:'Mar 1 – Mar 31, 2026', periodISO:'2026-03-31', amount:'$10,877.40', amountVal:10877.4, amountLabel:'Closing balance', pages:3, status:'reviewed' },
      ] },
      { id:'amex', name:'American Express', type:'credit', icon:'credit-card', account:'Card ••7012', mailbox:'alex.c.projects@gmail.com', sender:'statements@americanexpress.com', statements: [
        { id:'c1', period:'May 2026 statement', periodISO:'2026-05-25', amount:'$1,842.00', amountVal:1842, amountLabel:'Amount due',  pages:2, status:'due',  due:'Jun 18', files:[
          { name:'Amex-Card-May-2026.pdf', kind:'PDF', pages:2, size:198656 },
          { name:'Rewards-Summary.pdf', kind:'PDF', pages:1, size:81920 },
        ] },
        { id:'c2', period:'Apr 2026 statement', periodISO:'2026-04-25', amount:'$1,230.00', amountVal:1230, amountLabel:'Amount paid', pages:2, status:'paid' },
      ] },
      { id:'fidelity', name:'Fidelity Investments', type:'investment', icon:'trending-up', account:'Brokerage ••3310', mailbox:'alex.carter@gmail.com', sender:'no-reply@fidelity.com', statements: [
        { id:'z1', period:'May 1 – May 31, 2026', periodISO:'2026-05-31', amount:'$61,294.00', amountVal:61294, amountLabel:'Portfolio value', pages:6, status:'new', files:[
          { name:'Fidelity-Holdings-May-2026.pdf', kind:'PDF', pages:6, size:401408 },
          { name:'PnL-Statement-May-2026.csv', kind:'CSV', size:24576 },
          { name:'Tax-Statement-2026.pdf', kind:'PDF', pages:3, size:153600 },
        ] },
        { id:'z2', period:'Apr 1 – Apr 30, 2026', periodISO:'2026-04-30', amount:'$58,421.00', amountVal:58421, amountLabel:'Portfolio value', pages:5, status:'reviewed' },
      ] },
      { id:'bofa', name:'Bank of America', type:'checking', icon:'wallet', account:'Checking ••0097', mailbox:'alex@acme.co', sender:'alerts@bankofamerica.com', statements: [
        { id:'x1', period:'May 1 – May 31, 2026', periodISO:'2026-05-31', amount:'$8,630.00', amountVal:8630, amountLabel:'Closing balance', pages:3, status:'new' },
      ] },
      { id:'sofi', name:'SoFi', type:'loan', icon:'banknote', account:'Loan ••5521', mailbox:'a.carter@globex.io', sender:'no-reply@sofi.com', statements: [
        { id:'l1', period:'May 2026 loan statement', periodISO:'2026-05-20', amount:'$1,420.00', amountVal:1420, amountLabel:'Payment due', pages:1, status:'due', due:'Jun 5' },
      ] },
    ],
  },

  subs: [
    { id:'s1', name:'Adobe Creative Cloud', plan:'All Apps', amount:'$59.99', cycle:'Monthly', next:'Jun 24', nextISO:'2026-06-24', status:'active',   tint:'red',   icon:'palette' },
    { id:'s2', name:'Netflix',  plan:'Premium', amount:'$22.99', cycle:'Monthly', next:'Jun 12', nextISO:'2026-06-12', status:'active',   tint:'red',   icon:'clapperboard' },
    { id:'s3', name:'OpenAI',   plan:'Plus',    amount:'$20.00', cycle:'Monthly', next:'Jun 28', nextISO:'2026-06-28', status:'trial',    tint:'green', icon:'sparkles', trialEnds:'Jun 28' },
    { id:'s4', name:'Spotify',  plan:'Premium', amount:'$11.99', cycle:'Monthly', next:'Jun 21', nextISO:'2026-06-21', status:'active',   tint:'green', icon:'music' },
    { id:'s5', name:'iCloud+',  plan:'2 TB',    amount:'$9.99',  cycle:'Monthly', next:'Jun 7',  nextISO:'2026-06-07', status:'active',   tint:'blue',  icon:'cloud' },
    { id:'s6', name:'1Password', plan:'Families', amount:'$35.88', cycle:'Yearly', next:'Aug 3',  nextISO:'2026-08-03', status:'active',   tint:'blue',  icon:'key-round' },
    { id:'s7', name:'Notion',   plan:'Plus',    amount:'$10.00', cycle:'Monthly', next:'—',      nextISO:'',           status:'paused',   tint:'gold',  icon:'file-text' },
    { id:'s8', name:'Disney+',  plan:'Standard', amount:'$13.99', cycle:'Monthly', next:'—',     nextISO:'',           status:'canceled', tint:'purple',icon:'clapperboard' },
  ],

  // ---- People — a relationship directory auto-built from the inbox -------------
  // Every contact Zeranda has seen across the connected mailboxes, grouped into
  // relationship categories. No profile pictures are assumed — the UI renders a
  // deterministic colour avatar from each person's address. Counts, first/last
  // contact and recent threads are derived from scanned mail; `needsReply` marks
  // people waiting on you, `vip` marks the ones you've starred.
  peopleCategories: [
    { id:'family',     label:'Family',      tint:'pink',   icon:'heart' },
    { id:'friends',    label:'Friends',     tint:'teal',   icon:'smile' },
    { id:'colleagues', label:'Colleagues',  tint:'blue',   icon:'briefcase' },
    { id:'clients',    label:'Clients',     tint:'purple', icon:'handshake' },
    { id:'vendors',    label:'Vendors',     tint:'gold',   icon:'store' },
    { id:'finance',    label:'Finance',     tint:'green',  icon:'landmark' },
  ],

  people: [
    // ---- Family ----
    { id:'pp1', name:'Emma Carter', email:'emma.carter@gmail.com', cat:'family', role:'Sister', org:'', phone:'+1 (415) 555-0192',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com','alex.c.projects@gmail.com'], vip:true, needsReply:false,
      total:248, sent:120, received:128, firstISO:'2019-02-11', lastISO:'2026-06-23',
      threads:[
        { dir:'in',  subject:'Re: Mom’s birthday plans 🎉', snippet:'Booked the restaurant for Saturday — can you pick up the cake?', dateISO:'2026-06-23', mailbox:'alex.carter@gmail.com' },
        { dir:'out', subject:'Flight details for the trip', snippet:'Forwarding the itinerary, landing Friday morning.', dateISO:'2026-06-18', mailbox:'alex.carter@gmail.com' },
        { dir:'in',  subject:'Photos from last weekend', snippet:'Sharing the album — turned out great!', dateISO:'2026-06-09', mailbox:'alex.c.projects@gmail.com' },
      ] },
    { id:'pp2', name:'Robert Carter', email:'robert.carter@gmail.com', cat:'family', role:'Father', org:'', phone:'+1 (415) 555-0143',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:true,
      total:96, sent:41, received:55, firstISO:'2018-08-02', lastISO:'2026-06-20',
      threads:[
        { dir:'in',  subject:'Insurance renewal question', snippet:'Can you check whether the auto policy auto-renews this month?', dateISO:'2026-06-20', mailbox:'alex.carter@gmail.com' },
        { dir:'out', subject:'Re: Weekend call', snippet:'Sunday evening works — I’ll call around 7.', dateISO:'2026-06-12', mailbox:'alex.carter@gmail.com' },
      ] },
    { id:'pp3', name:'Susan Carter', email:'susan.carter@gmail.com', cat:'family', role:'Mother', org:'', phone:'',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:false,
      total:74, sent:30, received:44, firstISO:'2018-09-14', lastISO:'2026-06-15',
      threads:[
        { dir:'in', subject:'Recipe you asked for', snippet:'Here’s the chili recipe — measurements are approximate!', dateISO:'2026-06-15', mailbox:'alex.carter@gmail.com' },
      ] },

    // ---- Friends ----
    { id:'pp4', name:'Jake Miller', email:'jake.miller@gmail.com', cat:'friends', role:'Friend', org:'', phone:'+1 (628) 555-0117',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:true, needsReply:false,
      total:312, sent:160, received:152, firstISO:'2017-05-20', lastISO:'2026-06-22',
      threads:[
        { dir:'in',  subject:'Trip planning — June long weekend', snippet:'Found two cabins near Tahoe, sending links. Which one?', dateISO:'2026-06-22', mailbox:'alex.carter@gmail.com' },
        { dir:'out', subject:'Re: Concert tickets', snippet:'Grabbed 2 — section 104. You owe me $90 😄', dateISO:'2026-06-14', mailbox:'alex.carter@gmail.com' },
        { dir:'in',  subject:'Gym schedule', snippet:'Switching to mornings next week, you in?', dateISO:'2026-06-05', mailbox:'alex.carter@gmail.com' },
      ] },
    { id:'pp5', name:'Rachel Adams', email:'rachel.adams@gmail.com', cat:'friends', role:'Friend', org:'', phone:'',
      mailbox:'alex.c.projects@gmail.com', mailboxes:['alex.c.projects@gmail.com'], vip:false, needsReply:false,
      total:58, sent:25, received:33, firstISO:'2020-01-30', lastISO:'2026-05-29',
      threads:[
        { dir:'in', subject:'Book club pick', snippet:'Voting for the next read closes Friday.', dateISO:'2026-05-29', mailbox:'alex.c.projects@gmail.com' },
      ] },
    { id:'pp6', name:'Chris Baker', email:'chris.baker@outlook.com', cat:'friends', role:'Friend', org:'', phone:'',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:false,
      total:41, sent:18, received:23, firstISO:'2021-06-11', lastISO:'2026-04-18',
      threads:[
        { dir:'out', subject:'Re: Side project repo', snippet:'Pushed the latest — check the README.', dateISO:'2026-04-18', mailbox:'alex.carter@gmail.com' },
      ] },

    // ---- Colleagues (Acme) ----
    { id:'pp7', name:'Sarah Chen', email:'sarah.chen@acme.co', cat:'colleagues', role:'Engineering Manager', org:'Acme', phone:'+1 (212) 555-0166',
      mailbox:'alex@acme.co', mailboxes:['alex@acme.co'], vip:true, needsReply:false,
      total:184, sent:88, received:96, firstISO:'2026-05-04', lastISO:'2026-06-23',
      threads:[
        { dir:'in',  subject:'QBR agenda + deck', snippet:'Adding you as a presenter — slide 6 is yours.', dateISO:'2026-06-23', mailbox:'alex@acme.co' },
        { dir:'out', subject:'Re: Sprint planning', snippet:'Capacity looks fine, I’ll take the migration ticket.', dateISO:'2026-06-19', mailbox:'alex@acme.co' },
        { dir:'in',  subject:'1:1 notes', snippet:'Recap of what we discussed + next steps.', dateISO:'2026-06-11', mailbox:'alex@acme.co' },
      ] },
    { id:'pp8', name:'David Park', email:'david.park@acme.co', cat:'colleagues', role:'Backend Engineer', org:'Acme', phone:'',
      mailbox:'alex@acme.co', mailboxes:['alex@acme.co'], vip:false, needsReply:true,
      total:132, sent:70, received:62, firstISO:'2026-05-06', lastISO:'2026-06-21',
      threads:[
        { dir:'in',  subject:'Code review needed — auth PR', snippet:'Can you take a pass before EOD? Blocking the release.', dateISO:'2026-06-21', mailbox:'alex@acme.co' },
        { dir:'out', subject:'Re: Staging deploy', snippet:'Rolled back, root-causing now.', dateISO:'2026-06-16', mailbox:'alex@acme.co' },
      ] },
    { id:'pp9', name:'Lena Fischer', email:'lena.fischer@acme.co', cat:'colleagues', role:'Project Manager', org:'Acme', phone:'',
      mailbox:'alex@acme.co', mailboxes:['alex@acme.co'], vip:false, needsReply:false,
      total:97, sent:44, received:53, firstISO:'2026-05-12', lastISO:'2026-06-17',
      threads:[
        { dir:'in', subject:'Kickoff invite', snippet:'Calendar hold sent for the new engagement.', dateISO:'2026-06-17', mailbox:'alex@acme.co' },
      ] },

    // ---- Clients (Globex) ----
    { id:'pp10', name:'Emily Watson', email:'emily.watson@globex.io', cat:'clients', role:'VP Product', org:'Globex', phone:'+1 (415) 555-0321',
      mailbox:'a.carter@globex.io', mailboxes:['a.carter@globex.io'], vip:true, needsReply:true,
      total:143, sent:71, received:72, firstISO:'2026-06-01', lastISO:'2026-06-24',
      threads:[
        { dir:'in',  subject:'Board pack — please review', snippet:'Need your section back before the Tuesday board meeting.', dateISO:'2026-06-24', mailbox:'a.carter@globex.io' },
        { dir:'out', subject:'Re: Dinner confirmed', snippet:'Looking forward to it — Quince at 7:30.', dateISO:'2026-06-12', mailbox:'a.carter@globex.io' },
        { dir:'in',  subject:'Contract amendment', snippet:'Legal sent the redlines, attaching here.', dateISO:'2026-06-04', mailbox:'a.carter@globex.io' },
      ] },
    { id:'pp11', name:'Michael Torres', email:'michael.torres@globex.io', cat:'clients', role:'Board Member', org:'Globex', phone:'',
      mailbox:'a.carter@globex.io', mailboxes:['a.carter@globex.io'], vip:false, needsReply:false,
      total:64, sent:28, received:36, firstISO:'2026-06-02', lastISO:'2026-06-15',
      threads:[
        { dir:'in', subject:'Re: Q3 targets', snippet:'Agree with the direction — let’s discuss at the board.', dateISO:'2026-06-15', mailbox:'a.carter@globex.io' },
      ] },
    { id:'pp12', name:'Nina Albert', email:'nina.a@globex.io', cat:'clients', role:'Events Lead', org:'Globex', phone:'',
      mailbox:'a.carter@globex.io', mailboxes:['a.carter@globex.io'], vip:false, needsReply:false,
      total:39, sent:17, received:22, firstISO:'2026-06-03', lastISO:'2026-06-11',
      threads:[
        { dir:'in', subject:'Dinner reservation details', snippet:'Confirmed table for 6 at Quince, Friday.', dateISO:'2026-06-11', mailbox:'a.carter@globex.io' },
      ] },

    // ---- Vendors / service providers ----
    { id:'pp13', name:'Karen Lewis', email:'leasing@maplegrove.com', cat:'vendors', role:'Leasing Manager', org:'Maple Grove Properties', phone:'+1 (415) 555-0288',
      mailbox:'alex.c.projects@gmail.com', mailboxes:['alex.c.projects@gmail.com'], vip:false, needsReply:true,
      total:23, sent:9, received:14, firstISO:'2025-03-01', lastISO:'2026-06-19',
      threads:[
        { dir:'in',  subject:'Lease renewal — please call to confirm', snippet:'We need your decision before the June 15 deadline.', dateISO:'2026-06-19', mailbox:'alex.c.projects@gmail.com' },
        { dir:'in',  subject:'Action needed: signed lease', snippet:'Returning the signed document keeps your rate locked.', dateISO:'2026-06-08', mailbox:'alex.c.projects@gmail.com' },
      ] },
    { id:'pp14', name:'Dr. Laura Bennett', email:'laura.bennett@brightsmile.com', cat:'vendors', role:'Dentist', org:'Bright Smile Dental', phone:'',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:false,
      total:17, sent:6, received:11, firstISO:'2024-11-20', lastISO:'2026-06-10',
      threads:[
        { dir:'in', subject:'Follow-up reminder', snippet:'Your follow-up cleaning is on Jun 18 at 10 AM.', dateISO:'2026-06-10', mailbox:'alex.carter@gmail.com' },
      ] },
    { id:'pp15', name:'Tom Becker', email:'tom.becker@gmail.com', cat:'vendors', role:'Handyman', org:'', phone:'+1 (628) 555-0455',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:false,
      total:11, sent:5, received:6, firstISO:'2025-10-04', lastISO:'2026-05-22',
      threads:[
        { dir:'out', subject:'Re: Quote for kitchen fix', snippet:'Approved — when can you start?', dateISO:'2026-05-22', mailbox:'alex.carter@gmail.com' },
      ] },

    // ---- Finance ----
    { id:'pp16', name:'Mark Reynolds', email:'mark@summitaccounting.com', cat:'finance', role:'Accountant', org:'Summit Accounting', phone:'+1 (212) 555-0390',
      mailbox:'alex@acme.co', mailboxes:['alex@acme.co','alex.carter@gmail.com'], vip:false, needsReply:true,
      total:52, sent:24, received:28, firstISO:'2025-01-15', lastISO:'2026-06-22',
      threads:[
        { dir:'in',  subject:'Q2 estimated taxes — action needed', snippet:'Please confirm the income figures so I can finalize.', dateISO:'2026-06-22', mailbox:'alex@acme.co' },
        { dir:'out', subject:'Re: Documents for filing', snippet:'Uploaded the receipts to the shared folder.', dateISO:'2026-06-03', mailbox:'alex.carter@gmail.com' },
      ] },
    { id:'pp17', name:'Sophie Bernard', email:'sophie.bernard@adobe.com', cat:'finance', role:'Account Manager', org:'Adobe', phone:'',
      mailbox:'alex.carter@gmail.com', mailboxes:['alex.carter@gmail.com'], vip:false, needsReply:false,
      total:14, sent:4, received:10, firstISO:'2025-06-01', lastISO:'2026-06-17',
      threads:[
        { dir:'in', subject:'Your plan renews soon', snippet:'Creative Cloud renews Jun 24 for $59.99.', dateISO:'2026-06-17', mailbox:'alex.carter@gmail.com' },
      ] },
  ],
};
