// BILLING & ANALYTICS PLATFORM — Master Data Layer
// Exposed as window.BILLING_DATA
// Numbers calibrated to an AmLaw-200 $300M firm (85 partners / 142 associates / 53 paralegals)

const BILLING_DATA = {
  firmProfile: {
    annualTargetRevenue: 312_000_000,
    ytdRevenue: 187_240_000,
    ytdExpenses: 96_410_000,
    partners: 85,
    associates: 142,
    paralegals: 53,
    totalTimekeepers: 280,
    blendedRate: 785,
    avgPartnerComp: 1_920_000,
    avgAssociateComp: 285_000,
  },

  kpis: {
    // Financial health
    ytdBilled: 204_820_000,
    ytdCollected: 173_880_000,
    ytdWorked: 218_540_000,
    realizationWorked: 93.7,        // billed/worked
    realizationBilled: 84.9,        // collected/billed
    realizationOverall: 79.6,       // collected/worked
    // WIP & AR
    wipTotal: 38_420_000,
    wipAgedOver60: 8_210_000,
    arTotal: 52_180_000,
    arOver90: 9_390_000,              // 18.0% of AR
    dso: 87,                          // days sales outstanding
    // Trust
    trustTotal: 14_620_000,
    trustAccounts: 42,
    trustReconciledPct: 100,
    // Operating
    utilizationAvg: 1_682,            // billable hours YTD pro-rated to annual
    utilizationTarget: 1_900,
    leverageRatio: 2.29,              // (associates + paralegals) / partners
    monthlyBurnRate: 8_030_000,
    // Alerts
    pastDueInvoices: 34,
    budgetBreaches: 7,
    trustAlerts: 2,
    missingTime: 18,                  // timekeepers with < target hours this week
  },

  // ── Time entries (recent 15) ──
  timeEntries: [
    { id: 'TE-18422', date: '2026-04-20', timekeeper: 'M. Kirkland', role: 'Partner', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', hours: 3.4, rate: 1250, amount: 4250, task: 'L110', narrative: 'Review and revise MSJ opposition draft; call with co-counsel re MFW argument.', billable: true, status: 'Unbilled' },
    { id: 'TE-18421', date: '2026-04-20', timekeeper: 'L. Torres', role: 'Senior Associate', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', hours: 6.2, rate: 720, amount: 4464, task: 'L120', narrative: 'Draft Daubert motion; research Kumho Tire extensions to technical experts.', billable: true, status: 'Unbilled' },
    { id: 'TE-18420', date: '2026-04-20', timekeeper: 'J. Park', role: 'Associate', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', hours: 4.8, rate: 540, amount: 2592, task: 'L320', narrative: 'Second-level review, 240 documents privilege-coded; drafted privilege log updates.', billable: true, status: 'Unbilled' },
    { id: 'TE-18419', date: '2026-04-19', timekeeper: 'M. Kirkland', role: 'Partner', matter: 'Pacific Shipping Antitrust', matterId: 'M-2024-0456', hours: 2.1, rate: 1250, amount: 2625, task: 'L240', narrative: 'Client call re settlement parameters; prepare for MDL hearing.', billable: true, status: 'Unbilled' },
    { id: 'TE-18418', date: '2026-04-19', timekeeper: 'R. Vasquez', role: 'Of Counsel', matter: 'Thornton Estate', matterId: 'M-2024-0189', hours: 5.6, rate: 950, amount: 5320, task: 'L230', narrative: 'Expert report finalization; calls with Dr. Mitchell re methodology supplementation.', billable: true, status: 'Unbilled' },
    { id: 'TE-18417', date: '2026-04-19', timekeeper: 'A. Petrov', role: 'Senior Associate', matter: 'Blackwell IP', matterId: 'M-2024-0611', hours: 7.2, rate: 710, amount: 5112, task: 'P240', narrative: 'Claim construction research; drafted Markman argument outline for claims 1, 4, 7.', billable: true, status: 'Unbilled' },
    { id: 'TE-18416', date: '2026-04-18', timekeeper: 'L. Torres', role: 'Senior Associate', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', hours: 4.4, rate: 720, amount: 3168, task: 'L120', narrative: 'Research Zuckerberg progeny and Chancery trend; drafted transitional footnote.', billable: true, status: 'Unbilled' },
    { id: 'TE-18415', date: '2026-04-18', timekeeper: 'S. Chen', role: 'Associate', matter: 'Harbor District', matterId: 'M-2024-0488', hours: 3.8, rate: 520, amount: 1976, task: 'L250', narrative: 'Research CEQA analogue arguments for NEPA challenge; compiled state-by-state survey.', billable: true, status: 'Unbilled' },
    { id: 'TE-18414', date: '2026-04-18', timekeeper: 'M. Kirkland', role: 'Partner', matter: 'Sterling Pharma FCPA', matterId: 'M-2024-0701', hours: 1.6, rate: 1250, amount: 2000, task: 'L120', narrative: 'Successor liability memo review; provide comments.', billable: true, status: 'Unbilled' },
    { id: 'TE-18413', date: '2026-04-17', timekeeper: 'J. Park', role: 'Associate', matter: 'Chen v. Atlas Financial', matterId: 'M-2024-0522', hours: 8.0, rate: 540, amount: 4320, task: 'L320', narrative: 'First-level review, 910 emails; flagged 47 for privilege and 22 hot documents.', billable: true, status: 'Unbilled' },
    { id: 'TE-18412', date: '2026-04-17', timekeeper: 'L. Torres', role: 'Senior Associate', matter: 'Chen v. Atlas Financial', matterId: 'M-2024-0522', hours: 3.2, rate: 720, amount: 2304, task: 'L120', narrative: 'PSLRA scienter research; Tellabs analysis memo draft.', billable: true, status: 'Unbilled' },
    { id: 'TE-18411', date: '2026-04-17', timekeeper: 'A. Petrov', role: 'Senior Associate', matter: 'Blackwell IP', matterId: 'M-2024-0611', hours: 2.4, rate: 710, amount: 1704, task: 'P360', narrative: 'Obviousness combination analysis for claim 4.', billable: true, status: 'Unbilled' },
    { id: 'TE-18410', date: '2026-04-16', timekeeper: 'S. Chen', role: 'Associate', matter: 'NovaTech Merger Review', matterId: 'M-2024-0230', hours: 5.0, rate: 520, amount: 2600, task: 'C100', narrative: 'Regulatory filing review; HSR threshold analysis.', billable: true, status: 'Billed' },
    { id: 'TE-18409', date: '2026-04-16', timekeeper: 'M. Kirkland', role: 'Partner', matter: 'Marshall Employment', matterId: 'M-2024-0261', hours: 0.5, rate: 1250, amount: 625, task: 'L120', narrative: 'Client call; discovery status update.', billable: true, status: 'Billed' },
    { id: 'TE-18408', date: '2026-04-16', timekeeper: 'Internal', role: 'Admin', matter: 'Firm — Training', matterId: null, hours: 1.5, rate: 0, amount: 0, task: null, narrative: 'FRCP 37(e) CLE — recorded non-billable.', billable: false, status: 'Recorded' },
  ],

  // ── WIP by matter (work-in-process not yet billed) ──
  wipByMatter: [
    { matterId: 'M-2024-0312', matter: 'Redstone v. Meridian', client: 'Redstone Capital LLC', billingPartner: 'M. Kirkland', wip: 842_400, oldest: 74, entries: 184, budget: 1_200_000, budgetBurn: 70.2, status: 'Over budget soon', afa: 'Hourly' },
    { matterId: 'M-2024-0456', matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', billingPartner: 'M. Kirkland', wip: 2_100_000, oldest: 41, entries: 312, budget: 3_500_000, budgetBurn: 60.0, status: 'On track', afa: 'Capped Fee' },
    { matterId: 'M-2024-0522', matter: 'Chen v. Atlas Financial', client: 'Atlas Financial Grp.', billingPartner: 'L. Torres', wip: 412_180, oldest: 28, entries: 96, budget: 900_000, budgetBurn: 45.8, status: 'On track', afa: 'Hourly' },
    { matterId: 'M-2024-0611', matter: 'Blackwell IP Infringement', client: 'Blackwell Industries', billingPartner: 'A. Petrov', wip: 567_240, oldest: 32, entries: 148, budget: 800_000, budgetBurn: 70.9, status: 'On track', afa: 'Contingency+Hourly' },
    { matterId: 'M-2024-0189', matter: 'Thornton Estate Probate Contest', client: 'Thornton Estate Tr.', billingPartner: 'R. Vasquez', wip: 395_820, oldest: 22, entries: 104, budget: 500_000, budgetBurn: 79.2, status: 'Watch', afa: 'Hourly' },
    { matterId: 'M-2024-0701', matter: 'Sterling Pharma FCPA', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', wip: 890_120, oldest: 18, entries: 172, budget: 2_200_000, budgetBurn: 40.5, status: 'On track', afa: 'Hourly + Success Fee' },
    { matterId: 'M-2024-0488', matter: 'Harbor District Eminent Domain', client: 'Harbor District Auth.', billingPartner: 'L. Torres', wip: 234_100, oldest: 45, entries: 68, budget: 650_000, budgetBurn: 36.0, status: 'On track', afa: 'Hourly' },
    { matterId: 'M-2024-0230', matter: 'NovaTech Merger Review', client: 'NovaTech Inc.', billingPartner: 'S. Chen', wip: 178_000, oldest: 15, entries: 42, budget: 450_000, budgetBurn: 39.6, status: 'On track', afa: 'Fixed Fee' },
    { matterId: 'M-2024-0215', matter: 'Greenfield Environmental Class Action', client: 'Greenfield Corp.', billingPartner: 'M. Kirkland', wip: 1_340_000, oldest: 52, entries: 276, budget: 1_800_000, budgetBurn: 74.4, status: 'Watch', afa: 'Hourly' },
    { matterId: 'M-2024-0259', matter: 'White Collar — DOJ Investigation', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', wip: 445_800, oldest: 38, entries: 88, budget: 1_500_000, budgetBurn: 29.7, status: 'On track', afa: 'Hourly' },
    { matterId: 'M-2024-0261', matter: 'Marshall Employment Dispute', client: 'Marshall Manufacturing', billingPartner: 'M. Kirkland', wip: 87_000, oldest: 24, entries: 28, budget: 150_000, budgetBurn: 58.0, status: 'On track', afa: 'Capped Fee' },
    { matterId: 'M-2024-0265', matter: 'Chen v. Atlas — Securities Fraud', client: 'Atlas Financial Grp.', billingPartner: 'L. Torres', wip: 1_000_000, oldest: 68, entries: 210, budget: 1_200_000, budgetBurn: 83.3, status: 'Over budget soon', afa: 'Hourly' },
  ],

  // ── Missing time / timekeeper compliance ──
  missingTime: [
    { timekeeper: 'D. Reyes', role: 'Associate', hoursThisWeek: 18.2, target: 40, missingDays: 2, lastEntry: '2d ago' },
    { timekeeper: 'K. Nguyen', role: 'Associate', hoursThisWeek: 22.5, target: 40, missingDays: 1, lastEntry: '1d ago' },
    { timekeeper: 'P. Okonkwo', role: 'Senior Associate', hoursThisWeek: 12.0, target: 40, missingDays: 3, lastEntry: '3d ago' },
    { timekeeper: 'T. Bauer', role: 'Paralegal', hoursThisWeek: 24.0, target: 35, missingDays: 1, lastEntry: '1d ago' },
    { timekeeper: 'E. Lindqvist', role: 'Associate', hoursThisWeek: 8.4, target: 40, missingDays: 4, lastEntry: '4d ago' },
  ],

  // ── Pre-bills pipeline ──
  preBills: [
    { id: 'PB-4812', matter: 'Redstone v. Meridian', matterId: 'M-2024-0312', client: 'Redstone Capital LLC', billingPartner: 'M. Kirkland', period: 'Mar 2026', stage: 'Partner Review', amount: 412_800, writedown: 18_400, writedownPct: 4.5, entries: 84, dueToClient: '2026-04-25', reviewDays: 3 },
    { id: 'PB-4811', matter: 'Pacific Shipping Antitrust', matterId: 'M-2024-0456', client: 'Pacific Shipping Co.', billingPartner: 'M. Kirkland', period: 'Mar 2026', stage: 'Client Portal', amount: 1_042_000, writedown: 58_200, writedownPct: 5.6, entries: 198, dueToClient: '2026-04-22', reviewDays: 1 },
    { id: 'PB-4810', matter: 'Chen v. Atlas — Securities Fraud', matterId: 'M-2024-0265', client: 'Atlas Financial Grp.', billingPartner: 'L. Torres', period: 'Mar 2026', stage: 'Draft', amount: 285_600, writedown: 0, writedownPct: 0, entries: 64, dueToClient: '2026-04-28', reviewDays: 6 },
    { id: 'PB-4809', matter: 'Blackwell IP Infringement', matterId: 'M-2024-0611', client: 'Blackwell Industries', billingPartner: 'A. Petrov', period: 'Mar 2026', stage: 'LEDES Export', amount: 322_100, writedown: 8_200, writedownPct: 2.5, entries: 72, dueToClient: '2026-04-21', reviewDays: 0 },
    { id: 'PB-4808', matter: 'Thornton Estate Probate Contest', matterId: 'M-2024-0189', client: 'Thornton Estate Tr.', billingPartner: 'R. Vasquez', period: 'Mar 2026', stage: 'Sent', amount: 198_400, writedown: 6_800, writedownPct: 3.4, entries: 52, dueToClient: '2026-04-18', reviewDays: 0 },
    { id: 'PB-4807', matter: 'Sterling Pharma FCPA', matterId: 'M-2024-0701', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', period: 'Mar 2026', stage: 'Client Portal', amount: 488_500, writedown: 22_400, writedownPct: 4.6, entries: 96, dueToClient: '2026-04-23', reviewDays: 2 },
    { id: 'PB-4806', matter: 'Greenfield Environmental Class Action', matterId: 'M-2024-0215', client: 'Greenfield Corp.', billingPartner: 'M. Kirkland', period: 'Mar 2026', stage: 'Partner Review', amount: 682_000, writedown: 34_100, writedownPct: 5.0, entries: 140, dueToClient: '2026-04-24', reviewDays: 4 },
    { id: 'PB-4805', matter: 'Harbor District Eminent Domain', matterId: 'M-2024-0488', client: 'Harbor District Auth.', billingPartner: 'L. Torres', period: 'Mar 2026', stage: 'Draft', amount: 134_700, writedown: 0, writedownPct: 0, entries: 32, dueToClient: '2026-04-30', reviewDays: 8 },
  ],

  // ── Invoices (20) ──
  invoices: [
    { id: 'INV-2026-0842', matter: 'Redstone v. Meridian', client: 'Redstone Capital LLC', billingPartner: 'M. Kirkland', issued: '2026-02-15', due: '2026-03-15', amount: 389_200, paid: 389_200, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0841', matter: 'Redstone v. Meridian', client: 'Redstone Capital LLC', billingPartner: 'M. Kirkland', issued: '2026-03-18', due: '2026-04-18', amount: 442_100, paid: 0, balance: 442_100, status: 'Open', daysOutstanding: 2 },
    { id: 'INV-2026-0840', matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', billingPartner: 'M. Kirkland', issued: '2026-02-28', due: '2026-03-28', amount: 1_180_000, paid: 1_180_000, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0839', matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', billingPartner: 'M. Kirkland', issued: '2026-03-30', due: '2026-04-30', amount: 1_042_000, paid: 520_000, balance: 522_000, status: 'Partial', daysOutstanding: 0 },
    { id: 'INV-2026-0838', matter: 'Thornton Estate Probate Contest', client: 'Thornton Estate Tr.', billingPartner: 'R. Vasquez', issued: '2026-01-10', due: '2026-02-10', amount: 198_400, paid: 0, balance: 198_400, status: 'Disputed', daysOutstanding: 69 },
    { id: 'INV-2026-0837', matter: 'Blackwell IP Infringement', client: 'Blackwell Industries', billingPartner: 'A. Petrov', issued: '2026-03-22', due: '2026-04-22', amount: 322_100, paid: 0, balance: 322_100, status: 'Open', daysOutstanding: 0 },
    { id: 'INV-2026-0836', matter: 'Chen v. Atlas — Securities Fraud', client: 'Atlas Financial Grp.', billingPartner: 'L. Torres', issued: '2025-12-28', due: '2026-01-27', amount: 284_200, paid: 100_000, balance: 184_200, status: 'Overdue', daysOutstanding: 83 },
    { id: 'INV-2026-0835', matter: 'Chen v. Atlas — Securities Fraud', client: 'Atlas Financial Grp.', billingPartner: 'L. Torres', issued: '2025-10-15', due: '2025-11-14', amount: 178_300, paid: 0, balance: 178_300, status: 'Overdue', daysOutstanding: 157 },
    { id: 'INV-2026-0834', matter: 'Sterling Pharma FCPA', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', issued: '2026-03-01', due: '2026-04-01', amount: 488_500, paid: 488_500, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0833', matter: 'Sterling Pharma FCPA', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', issued: '2026-01-28', due: '2026-02-27', amount: 412_000, paid: 412_000, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0832', matter: 'Greenfield Environmental Class Action', client: 'Greenfield Corp.', billingPartner: 'M. Kirkland', issued: '2026-02-05', due: '2026-03-07', amount: 602_100, paid: 300_000, balance: 302_100, status: 'Overdue', daysOutstanding: 44 },
    { id: 'INV-2026-0831', matter: 'Harbor District Eminent Domain', client: 'Harbor District Auth.', billingPartner: 'L. Torres', issued: '2026-03-12', due: '2026-04-11', amount: 134_700, paid: 134_700, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0830', matter: 'NovaTech Merger Review', client: 'NovaTech Inc.', billingPartner: 'S. Chen', issued: '2026-03-20', due: '2026-04-19', amount: 178_000, paid: 0, balance: 178_000, status: 'Open', daysOutstanding: 1 },
    { id: 'INV-2026-0829', matter: 'Marshall Employment Dispute', client: 'Marshall Manufacturing', billingPartner: 'M. Kirkland', issued: '2026-02-22', due: '2026-03-24', amount: 87_000, paid: 87_000, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0828', matter: 'White Collar — DOJ Investigation', client: 'Sterling Pharmaceuticals', billingPartner: 'M. Kirkland', issued: '2026-03-14', due: '2026-04-13', amount: 445_800, paid: 0, balance: 445_800, status: 'Overdue', daysOutstanding: 7 },
    { id: 'INV-2026-0827', matter: 'Greenfield Environmental Class Action', client: 'Greenfield Corp.', billingPartner: 'M. Kirkland', issued: '2025-12-05', due: '2026-01-04', amount: 892_000, paid: 892_000, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0826', matter: 'Blackwell IP Infringement', client: 'Blackwell Industries', billingPartner: 'A. Petrov', issued: '2026-02-18', due: '2026-03-20', amount: 278_400, paid: 278_400, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0825', matter: 'Thornton Estate Probate Contest', client: 'Thornton Estate Tr.', billingPartner: 'R. Vasquez', issued: '2025-11-10', due: '2025-12-10', amount: 142_100, paid: 0, balance: 142_100, status: 'Disputed', daysOutstanding: 131 },
    { id: 'INV-2026-0824', matter: 'Redstone v. Meridian', client: 'Redstone Capital LLC', billingPartner: 'M. Kirkland', issued: '2025-12-15', due: '2026-01-14', amount: 512_000, paid: 512_000, balance: 0, status: 'Paid', daysOutstanding: 0 },
    { id: 'INV-2026-0823', matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', billingPartner: 'M. Kirkland', issued: '2025-11-20', due: '2025-12-20', amount: 988_400, paid: 988_400, balance: 0, status: 'Paid', daysOutstanding: 0 },
  ],

  // ── AR aging buckets ──
  arAging: {
    buckets: [
      { range: '0-30', amount: 22_140_000, count: 78, pct: 42.4 },
      { range: '31-60', amount: 14_280_000, count: 52, pct: 27.4 },
      { range: '61-90', amount: 6_370_000, count: 31, pct: 12.2 },
      { range: '91+', amount: 9_390_000, count: 34, pct: 18.0 },
    ],
    byClient: [
      { client: 'Atlas Financial Grp.', total: 1_620_500, b030: 0, b3160: 100_000, b6190: 400_000, b91plus: 1_120_500, disputeCount: 1, contact: 'GC — K. Whitman' },
      { client: 'Greenfield Corp.', total: 1_194_200, b030: 482_100, b3160: 410_000, b6190: 302_100, b91plus: 0, disputeCount: 0, contact: 'CFO — D. Alvarez' },
      { client: 'Thornton Estate Tr.', total: 340_500, b030: 0, b3160: 0, b6190: 0, b91plus: 340_500, disputeCount: 2, contact: 'Trustee — P. Thornton' },
      { client: 'Sterling Pharmaceuticals', total: 445_800, b030: 0, b3160: 445_800, b6190: 0, b91plus: 0, disputeCount: 0, contact: 'GC — S. Okafor' },
      { client: 'Pacific Shipping Co.', total: 522_000, b030: 522_000, b3160: 0, b6190: 0, b91plus: 0, disputeCount: 0, contact: 'GC — R. Marquez' },
      { client: 'Blackwell Industries', total: 322_100, b030: 322_100, b3160: 0, b6190: 0, b91plus: 0, disputeCount: 0, contact: 'VP Legal — J. Harper' },
      { client: 'Redstone Capital LLC', total: 442_100, b030: 442_100, b3160: 0, b6190: 0, b91plus: 0, disputeCount: 0, contact: 'GC — H. Bishop' },
      { client: 'NovaTech Inc.', total: 178_000, b030: 178_000, b3160: 0, b6190: 0, b91plus: 0, disputeCount: 0, contact: 'CFO — L. Tran' },
    ],
    // Top aged-out invoices for escalation
    escalation: [
      { invoice: 'INV-2026-0835', client: 'Atlas Financial Grp.', matter: 'Chen v. Atlas — Securities Fraud', amount: 178_300, days: 157, ownedBy: 'L. Torres', actions: ['Called 2×', 'Letter sent', 'Partner escalation'], nextStep: 'Demand letter' },
      { invoice: 'INV-2026-0825', client: 'Thornton Estate Tr.', matter: 'Thornton Estate Probate Contest', amount: 142_100, days: 131, ownedBy: 'R. Vasquez', actions: ['Dispute under review'], nextStep: 'Resolution call 2026-04-25' },
      { invoice: 'INV-2026-0836', client: 'Atlas Financial Grp.', matter: 'Chen v. Atlas — Securities Fraud', amount: 184_200, days: 83, ownedBy: 'L. Torres', actions: ['Called 1×'], nextStep: 'Follow-up call' },
      { invoice: 'INV-2026-0838', client: 'Thornton Estate Tr.', matter: 'Thornton Estate Probate Contest', amount: 198_400, days: 69, ownedBy: 'R. Vasquez', actions: ['Dispute logged'], nextStep: 'Partner resolution' },
    ],
  },

  disputes: [
    { invoice: 'INV-2026-0838', client: 'Thornton Estate Tr.', matter: 'Thornton Estate Probate Contest', amount: 198_400, disputed: 42_100, reason: 'Billing increment objection (0.1h vs 0.25h)', opened: '2026-02-08', status: 'In review', owner: 'R. Vasquez' },
    { invoice: 'INV-2026-0825', client: 'Thornton Estate Tr.', matter: 'Thornton Estate Probate Contest', amount: 142_100, disputed: 22_400, reason: 'Duplicate work alleged on 3 entries', opened: '2025-11-29', status: 'Escalated', owner: 'R. Vasquez' },
    { invoice: 'INV-2026-0836', client: 'Atlas Financial Grp.', matter: 'Chen v. Atlas — Securities Fraud', amount: 284_200, disputed: 184_200, reason: 'Fee cap threshold question', opened: '2026-02-14', status: 'Under negotiation', owner: 'L. Torres' },
    { invoice: 'INV-2026-0832', client: 'Greenfield Corp.', matter: 'Greenfield Environmental Class Action', amount: 602_100, disputed: 62_100, reason: 'Senior-partner rate challenge on paralegal tasks', opened: '2026-03-25', status: 'In review', owner: 'M. Kirkland' },
  ],

  // ── Trust (IOLTA) accounts ──
  trustAccounts: [
    { id: 'IOLTA-042', client: 'Redstone Capital LLC', matter: 'Redstone v. Meridian', balance: 450_000, reserve: 250_000, deposits30d: 0, disbursements30d: 80_000, lastReconciled: '2026-04-15', status: 'Reconciled' },
    { id: 'IOLTA-041', client: 'Pacific Shipping Co.', matter: 'Pacific Shipping Antitrust', balance: 2_100_000, reserve: 500_000, deposits30d: 1_000_000, disbursements30d: 420_000, lastReconciled: '2026-04-15', status: 'Reconciled' },
    { id: 'IOLTA-040', client: 'Blackwell Industries', matter: 'Blackwell IP Infringement', balance: 320_000, reserve: 100_000, deposits30d: 0, disbursements30d: 58_000, lastReconciled: '2026-04-15', status: 'Reconciled' },
    { id: 'IOLTA-039', client: 'Sterling Pharmaceuticals', matter: 'Sterling Pharma FCPA', balance: 1_800_000, reserve: 800_000, deposits30d: 500_000, disbursements30d: 488_500, lastReconciled: '2026-04-15', status: 'Reconciled' },
    { id: 'IOLTA-038', client: 'Harbor District Auth.', matter: 'Harbor District Eminent Domain', balance: 125_000, reserve: 50_000, deposits30d: 75_000, disbursements30d: 134_700, lastReconciled: '2026-04-15', status: 'Reconciled' },
    { id: 'IOLTA-037', client: 'Thornton Estate Tr.', matter: 'Thornton Estate Probate Contest', balance: 28_400, reserve: 10_000, deposits30d: 0, disbursements30d: 0, lastReconciled: '2026-03-15', status: 'Reconciliation overdue' },
    { id: 'IOLTA-036', client: 'Greenfield Corp.', matter: 'Greenfield Environmental Class Action', balance: 4_000_000, reserve: 1_500_000, deposits30d: 2_000_000, disbursements30d: 602_100, lastReconciled: '2026-04-15', status: 'Variance flagged' },
  ],
  trustLedger: [
    { id: 'TL-2041', date: '2026-04-19', account: 'IOLTA-041', kind: 'Disbursement', amount: -112_400, note: 'Expert witness — Dr. Mitchell invoice', approvedBy: 'M. Kirkland' },
    { id: 'TL-2040', date: '2026-04-18', account: 'IOLTA-039', kind: 'Disbursement', amount: -488_500, note: 'INV-2026-0834 payment transfer', approvedBy: 'M. Kirkland' },
    { id: 'TL-2039', date: '2026-04-17', account: 'IOLTA-036', kind: 'Deposit', amount: 2_000_000, note: 'Client replenishment — settlement reserve', approvedBy: 'M. Kirkland' },
    { id: 'TL-2038', date: '2026-04-15', account: 'IOLTA-041', kind: 'Deposit', amount: 1_000_000, note: 'Client replenishment', approvedBy: 'M. Kirkland' },
    { id: 'TL-2037', date: '2026-04-14', account: 'IOLTA-040', kind: 'Disbursement', amount: -58_000, note: 'Filing fees — Markman submission', approvedBy: 'A. Petrov' },
    { id: 'TL-2036', date: '2026-04-12', account: 'IOLTA-038', kind: 'Disbursement', amount: -134_700, note: 'INV-2026-0831 payment transfer', approvedBy: 'L. Torres' },
    { id: 'TL-2035', date: '2026-04-10', account: 'IOLTA-038', kind: 'Deposit', amount: 75_000, note: 'Client replenishment', approvedBy: 'L. Torres' },
    { id: 'TL-2034', date: '2026-04-08', account: 'IOLTA-042', kind: 'Disbursement', amount: -80_000, note: 'Expert retainer — Dr. Mitchell', approvedBy: 'M. Kirkland' },
  ],

  // ── Rate card ──
  rateCard: {
    standard: [
      { role: 'Equity Partner', low: 1100, avg: 1250, high: 1450, headcount: 48 },
      { role: 'Non-Equity Partner', low: 900, avg: 1050, high: 1150, headcount: 37 },
      { role: 'Of Counsel', low: 850, avg: 950, high: 1050, headcount: 12 },
      { role: 'Senior Associate', low: 650, avg: 720, high: 810, headcount: 44 },
      { role: 'Mid-Level Associate', low: 560, avg: 620, high: 680, headcount: 58 },
      { role: 'Junior Associate', low: 480, avg: 540, high: 600, headcount: 40 },
      { role: 'Paralegal', low: 320, avg: 380, high: 440, headcount: 53 },
      { role: 'Staff Attorney', low: 400, avg: 450, high: 500, headcount: 18 },
    ],
    clientOverrides: [
      { client: 'Pacific Shipping Co.', effective: '2026-01-01', partnerRate: 1100, associateRate: 650, paralegalRate: 340, vsStandardPct: -10.4, note: 'Global rate agreement; MDL engagement.' },
      { client: 'Greenfield Corp.', effective: '2025-07-01', partnerRate: 1150, associateRate: 680, paralegalRate: 360, vsStandardPct: -6.2, note: 'Two-year preferred-provider agreement.' },
      { client: 'Atlas Financial Grp.', effective: '2026-01-15', partnerRate: 1200, associateRate: 700, paralegalRate: 380, vsStandardPct: -3.1, note: 'Tier-2 client bundle; capped at 1200/hr.' },
      { client: 'Sterling Pharmaceuticals', effective: '2026-02-01', partnerRate: 1250, associateRate: 720, paralegalRate: 380, vsStandardPct: 0, note: 'Standard rates; no override.' },
      { client: 'Redstone Capital LLC', effective: '2025-11-15', partnerRate: 1250, associateRate: 720, paralegalRate: 380, vsStandardPct: 0, note: 'Standard rates.' },
      { client: 'Harbor District Auth.', effective: '2026-03-01', partnerRate: 950, associateRate: 560, paralegalRate: 320, vsStandardPct: -22.3, note: 'Municipality discount.' },
    ],
    pendingRequests: [
      { id: 'RR-101', client: 'Marshall Manufacturing', requestedBy: 'M. Kirkland', current: 1250, proposed: 1150, effective: '2026-05-01', reason: 'Competitive RFP — matching Cravath offer', submitted: '2026-04-14', status: 'Pending GC approval' },
      { id: 'RR-100', client: 'NovaTech Inc.', requestedBy: 'S. Chen', current: 520, proposed: 560, effective: '2026-07-01', reason: 'Mid-year associate rate adjustment', submitted: '2026-04-10', status: 'Pending CFO approval' },
      { id: 'RR-099', client: 'Blackwell Industries', requestedBy: 'A. Petrov', current: 710, proposed: 760, effective: '2026-06-01', reason: 'Senior associate promotion to counsel track', submitted: '2026-04-05', status: 'Approved' },
    ],
  },

  // ── Realization funnel + breakdowns ──
  realization: {
    funnel: {
      worked: 218_540_000,
      billed: 204_820_000,
      collected: 173_880_000,
    },
    byMatter: [
      { matter: 'Pacific Shipping Antitrust', worked: 12_400_000, billed: 11_800_000, collected: 10_950_000, workBillPct: 95.2, billCollectPct: 92.8, overallPct: 88.3 },
      { matter: 'Redstone v. Meridian', worked: 4_820_000, billed: 4_120_000, collected: 3_680_000, workBillPct: 85.5, billCollectPct: 89.3, overallPct: 76.3 },
      { matter: 'Greenfield Environmental Class Action', worked: 8_240_000, billed: 7_420_000, collected: 6_420_000, workBillPct: 90.0, billCollectPct: 86.5, overallPct: 77.9 },
      { matter: 'Sterling Pharma FCPA', worked: 6_180_000, billed: 5_940_000, collected: 5_940_000, workBillPct: 96.1, billCollectPct: 100, overallPct: 96.1 },
      { matter: 'Blackwell IP Infringement', worked: 3_250_000, billed: 3_050_000, collected: 2_728_000, workBillPct: 93.8, billCollectPct: 89.4, overallPct: 83.9 },
      { matter: 'Chen v. Atlas — Securities Fraud', worked: 2_800_000, billed: 2_350_000, collected: 1_804_000, workBillPct: 83.9, billCollectPct: 76.8, overallPct: 64.4 },
      { matter: 'Thornton Estate Probate Contest', worked: 1_420_000, billed: 1_260_000, collected: 920_000, workBillPct: 88.7, billCollectPct: 73.0, overallPct: 64.8 },
      { matter: 'Harbor District Eminent Domain', worked: 1_810_000, billed: 1_720_000, collected: 1_720_000, workBillPct: 95.0, billCollectPct: 100, overallPct: 95.0 },
    ],
    byAttorney: [
      { attorney: 'M. Kirkland', role: 'Partner', worked: 5_180_000, billed: 4_920_000, collected: 4_420_000, overallPct: 85.3, hours: 1540 },
      { attorney: 'L. Torres', role: 'Senior Associate', worked: 2_410_000, billed: 2_280_000, collected: 1_980_000, overallPct: 82.2, hours: 1720 },
      { attorney: 'J. Park', role: 'Associate', worked: 1_180_000, billed: 1_140_000, collected: 1_060_000, overallPct: 89.8, hours: 1880 },
      { attorney: 'A. Petrov', role: 'Senior Associate', worked: 1_920_000, billed: 1_840_000, collected: 1_700_000, overallPct: 88.5, hours: 1680 },
      { attorney: 'R. Vasquez', role: 'Of Counsel', worked: 2_840_000, billed: 2_680_000, collected: 2_200_000, overallPct: 77.5, hours: 1420 },
      { attorney: 'S. Chen', role: 'Associate', worked: 890_000, billed: 860_000, collected: 820_000, overallPct: 92.1, hours: 1760 },
    ],
    byPractice: [
      { practice: 'Litigation', worked: 98_420_000, billed: 92_820_000, collected: 78_410_000, overallPct: 79.7 },
      { practice: 'Corporate', worked: 52_140_000, billed: 49_680_000, collected: 43_220_000, overallPct: 82.9 },
      { practice: 'IP', worked: 28_410_000, billed: 27_120_000, collected: 24_180_000, overallPct: 85.1 },
      { practice: 'Regulatory', worked: 21_820_000, billed: 20_120_000, collected: 16_940_000, overallPct: 77.6 },
      { practice: 'Tax', worked: 17_750_000, billed: 15_080_000, collected: 11_130_000, overallPct: 62.7 },
    ],
    writedowns: [
      { reason: 'Pre-bill haircut', count: 142, amount: 4_820_000 },
      { reason: 'Fee-cap trigger', count: 38, amount: 2_180_000 },
      { reason: 'Client dispute credit', count: 22, amount: 1_240_000 },
      { reason: 'LEDES rejection (task code)', count: 64, amount: 980_000 },
      { reason: 'Budget overrun (courtesy)', count: 12, amount: 620_000 },
      { reason: 'Write-off — uncollectable', count: 8, amount: 920_000 },
    ],
    monthlyTrend: [
      // Last 12 months: worked / billed / collected in $M
      { m: 'May 25', worked: 22.1, billed: 21.4, collected: 18.9 },
      { m: 'Jun 25', worked: 23.4, billed: 22.0, collected: 19.3 },
      { m: 'Jul 25', worked: 21.8, billed: 20.6, collected: 18.1 },
      { m: 'Aug 25', worked: 20.2, billed: 19.1, collected: 17.0 },
      { m: 'Sep 25', worked: 24.6, billed: 23.0, collected: 20.4 },
      { m: 'Oct 25', worked: 26.1, billed: 24.4, collected: 21.2 },
      { m: 'Nov 25', worked: 25.8, billed: 24.1, collected: 20.8 },
      { m: 'Dec 25', worked: 22.4, billed: 20.9, collected: 16.8 },
      { m: 'Jan 26', worked: 24.2, billed: 22.8, collected: 19.1 },
      { m: 'Feb 26', worked: 26.3, billed: 24.6, collected: 20.6 },
      { m: 'Mar 26', worked: 27.8, billed: 25.9, collected: 22.1 },
      { m: 'Apr 26', worked: 14.2, billed: 12.9, collected: 10.4 }, // partial month
    ],
  },

  // ── Profitability ──
  profitability: {
    byMatter: [
      { matter: 'Pacific Shipping Antitrust', revenue: 11_800_000, directCost: 4_960_000, overheadAlloc: 2_360_000, margin: 4_480_000, marginPct: 38.0, flagged: false },
      { matter: 'Sterling Pharma FCPA', revenue: 5_940_000, directCost: 2_140_000, overheadAlloc: 1_188_000, margin: 2_612_000, marginPct: 44.0, flagged: false },
      { matter: 'Redstone v. Meridian', revenue: 4_120_000, directCost: 2_480_000, overheadAlloc: 824_000, margin: 816_000, marginPct: 19.8, flagged: true },
      { matter: 'Greenfield Environmental Class Action', revenue: 7_420_000, directCost: 3_180_000, overheadAlloc: 1_484_000, margin: 2_756_000, marginPct: 37.1, flagged: false },
      { matter: 'Blackwell IP Infringement', revenue: 3_050_000, directCost: 1_340_000, overheadAlloc: 610_000, margin: 1_100_000, marginPct: 36.1, flagged: false },
      { matter: 'Chen v. Atlas — Securities Fraud', revenue: 2_350_000, directCost: 1_610_000, overheadAlloc: 470_000, margin: 270_000, marginPct: 11.5, flagged: true },
      { matter: 'Harbor District Eminent Domain', revenue: 1_720_000, directCost: 920_000, overheadAlloc: 344_000, margin: 456_000, marginPct: 26.5, flagged: false },
      { matter: 'Thornton Estate Probate Contest', revenue: 1_260_000, directCost: 780_000, overheadAlloc: 252_000, margin: 228_000, marginPct: 18.1, flagged: true },
    ],
    byPractice: [
      { practice: 'Litigation', revenue: 92_820_000, margin: 28_740_000, marginPct: 30.9 },
      { practice: 'Corporate', revenue: 49_680_000, margin: 19_620_000, marginPct: 39.5 },
      { practice: 'IP', revenue: 27_120_000, margin: 11_040_000, marginPct: 40.7 },
      { practice: 'Regulatory', revenue: 20_120_000, margin: 6_680_000, marginPct: 33.2 },
      { practice: 'Tax', revenue: 15_080_000, margin: 3_920_000, marginPct: 26.0 },
    ],
    leverageByPartner: [
      { partner: 'M. Kirkland', practice: 'Litigation', originations: 24_820_000, workingRevenue: 14_620_000, associates: 7, paralegals: 3, leverage: 3.6, margin: 5_040_000 },
      { partner: 'E. Hartwell', practice: 'Corporate', originations: 18_420_000, workingRevenue: 11_840_000, associates: 5, paralegals: 2, leverage: 2.8, margin: 4_120_000 },
      { partner: 'D. Nakamura', practice: 'IP', originations: 12_180_000, workingRevenue: 8_920_000, associates: 4, paralegals: 2, leverage: 3.0, margin: 3_360_000 },
      { partner: 'R. Vasquez', practice: 'Litigation', originations: 9_840_000, workingRevenue: 6_420_000, associates: 3, paralegals: 1, leverage: 2.0, margin: 1_780_000 },
      { partner: 'C. Oduya', practice: 'Regulatory', originations: 11_620_000, workingRevenue: 7_840_000, associates: 4, paralegals: 2, leverage: 3.0, margin: 2_620_000 },
    ],
  },

  // ── Budgets ──
  budgets: [
    { matter: 'Redstone v. Meridian', client: 'Redstone Capital LLC', phase: 'Trial Prep', budget: 1_200_000, actual: 842_400, remaining: 357_600, burnPct: 70.2, etc: 280_000, eac: 1_122_400, varPct: -6.5, status: 'On track', asOf: '2026-04-19' },
    { matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', phase: 'Discovery', budget: 3_500_000, actual: 2_100_000, remaining: 1_400_000, burnPct: 60.0, etc: 1_100_000, eac: 3_200_000, varPct: -8.6, status: 'On track', asOf: '2026-04-19' },
    { matter: 'Chen v. Atlas — Securities Fraud', client: 'Atlas Financial Grp.', phase: 'MTD Briefing', budget: 1_200_000, actual: 1_000_000, remaining: 200_000, burnPct: 83.3, etc: 320_000, eac: 1_320_000, varPct: 10.0, status: 'Over budget', asOf: '2026-04-19' },
    { matter: 'Sterling Pharma FCPA', client: 'Sterling Pharmaceuticals', phase: 'Investigation', budget: 2_200_000, actual: 890_120, remaining: 1_309_880, burnPct: 40.5, etc: 1_400_000, eac: 2_290_120, varPct: 4.1, status: 'Watch', asOf: '2026-04-19' },
    { matter: 'Blackwell IP Infringement', client: 'Blackwell Industries', phase: 'Markman', budget: 800_000, actual: 567_240, remaining: 232_760, burnPct: 70.9, etc: 180_000, eac: 747_240, varPct: -6.6, status: 'On track', asOf: '2026-04-19' },
    { matter: 'Thornton Estate Probate Contest', client: 'Thornton Estate Tr.', phase: 'Pre-Trial', budget: 500_000, actual: 395_820, remaining: 104_180, burnPct: 79.2, etc: 180_000, eac: 575_820, varPct: 15.2, status: 'Over budget', asOf: '2026-04-19' },
    { matter: 'Greenfield Environmental Class Action', client: 'Greenfield Corp.', phase: 'Class Cert', budget: 1_800_000, actual: 1_340_000, remaining: 460_000, burnPct: 74.4, etc: 620_000, eac: 1_960_000, varPct: 8.9, status: 'Watch', asOf: '2026-04-19' },
    { matter: 'Harbor District Eminent Domain', client: 'Harbor District Auth.', phase: 'Valuation', budget: 650_000, actual: 234_100, remaining: 415_900, burnPct: 36.0, etc: 320_000, eac: 554_100, varPct: -14.8, status: 'On track', asOf: '2026-04-19' },
    { matter: 'NovaTech Merger Review', client: 'NovaTech Inc.', phase: 'Regulatory', budget: 450_000, actual: 178_000, remaining: 272_000, burnPct: 39.6, etc: 220_000, eac: 398_000, varPct: -11.6, status: 'On track', asOf: '2026-04-19' },
    { matter: 'Marshall Employment Dispute', client: 'Marshall Manufacturing', phase: 'Discovery', budget: 150_000, actual: 87_000, remaining: 63_000, burnPct: 58.0, etc: 58_000, eac: 145_000, varPct: -3.3, status: 'On track', asOf: '2026-04-19' },
  ],

  // ── AFAs ──
  afas: [
    { id: 'AFA-012', matter: 'Pacific Shipping Antitrust', client: 'Pacific Shipping Co.', type: 'Capped Fee', cap: 3_500_000, worked: 2_100_000, billed: 1_980_000, capUsedPct: 56.6, status: 'Active', trigger: 'Cap at $3.5M; hourly above 3.5M at 50%', perfDelta: '+$220K vs equivalent hourly', exitDate: '2026-12-31' },
    { id: 'AFA-011', matter: 'Blackwell IP Infringement', client: 'Blackwell Industries', type: 'Contingency + Hourly', cap: null, worked: 567_240, billed: 322_100, capUsedPct: null, status: 'Active', trigger: '30% of net recovery + 40% hourly', perfDelta: 'At-risk: $244K unbilled', exitDate: 'Resolution' },
    { id: 'AFA-010', matter: 'Sterling Pharma FCPA', client: 'Sterling Pharmaceuticals', type: 'Hourly + Success Fee', cap: null, worked: 890_120, billed: 890_120, capUsedPct: null, status: 'Active', trigger: 'Hourly + 15% bonus on DPA resolution', perfDelta: 'Pending outcome', exitDate: 'DPA execution' },
    { id: 'AFA-009', matter: 'NovaTech Merger Review', client: 'NovaTech Inc.', type: 'Fixed Fee', cap: 450_000, worked: 178_000, billed: 178_000, capUsedPct: 39.6, status: 'Active', trigger: 'Single fixed fee; out-of-scope billed hourly', perfDelta: '+$62K vs equivalent hourly', exitDate: 'Close of transaction' },
    { id: 'AFA-008', matter: 'Marshall Employment Dispute', client: 'Marshall Manufacturing', type: 'Capped Fee', cap: 150_000, worked: 87_000, billed: 87_000, capUsedPct: 58.0, status: 'Active', trigger: 'Cap at $150K; hourly above', perfDelta: '+$12K vs equivalent hourly', exitDate: 'Resolution' },
    { id: 'AFA-007', matter: 'Greenfield — Prior Year', client: 'Greenfield Corp.', type: 'Subscription', cap: null, worked: 2_800_000, billed: 3_000_000, capUsedPct: null, status: 'Closed', trigger: 'Monthly retainer $250K × 12', perfDelta: '+$200K vs utilization', exitDate: '2025-12-31' },
  ],

  // ── eBilling status ──
  ebilling: [
    { client: 'Pacific Shipping Co.', system: 'LEDES 1998B', submitted30d: 4, accepted: 4, rejected: 0, avgApproveDays: 7, openQueries: 0 },
    { client: 'Greenfield Corp.', system: 'LEDES 2000', submitted30d: 3, accepted: 2, rejected: 1, avgApproveDays: 12, openQueries: 2 },
    { client: 'Atlas Financial Grp.', system: 'Tymetrix 360', submitted30d: 2, accepted: 1, rejected: 1, avgApproveDays: 18, openQueries: 3 },
    { client: 'Sterling Pharmaceuticals', system: 'LEDES 1998B', submitted30d: 5, accepted: 5, rejected: 0, avgApproveDays: 9, openQueries: 0 },
    { client: 'Blackwell Industries', system: 'Legal Tracker', submitted30d: 2, accepted: 2, rejected: 0, avgApproveDays: 6, openQueries: 0 },
  ],

  // ── Forecast ──
  forecast: {
    monthly12: [
      { m: 'May 26', pipeline: 26.4, committed: 22.8 },
      { m: 'Jun 26', pipeline: 28.1, committed: 23.6 },
      { m: 'Jul 26', pipeline: 27.2, committed: 22.4 },
      { m: 'Aug 26', pipeline: 25.8, committed: 21.0 },
      { m: 'Sep 26', pipeline: 28.6, committed: 22.2 },
      { m: 'Oct 26', pipeline: 30.1, committed: 23.1 },
      { m: 'Nov 26', pipeline: 29.0, committed: 22.4 },
      { m: 'Dec 26', pipeline: 24.2, committed: 18.0 },
      { m: 'Jan 27', pipeline: 27.5, committed: 20.6 },
      { m: 'Feb 27', pipeline: 28.9, committed: 21.4 },
      { m: 'Mar 27', pipeline: 31.2, committed: 23.0 },
      { m: 'Apr 27', pipeline: 30.1, committed: 22.2 },
    ],
    pipelineStage: [
      { stage: 'Pitch submitted', matters: 18, expectedRev: 24_800_000 },
      { stage: 'Panel interview', matters: 12, expectedRev: 18_400_000 },
      { stage: 'Selected — negotiating', matters: 6, expectedRev: 12_200_000 },
      { stage: 'Engagement letter out', matters: 4, expectedRev: 8_620_000 },
      { stage: 'Kickoff scheduled', matters: 3, expectedRev: 5_100_000 },
    ],
    partnerComp: [
      { partner: 'M. Kirkland', projectedOrig: 28_500_000, projectedComp: 2_420_000, vsPriorYr: 12.4 },
      { partner: 'E. Hartwell', projectedOrig: 21_200_000, projectedComp: 1_980_000, vsPriorYr: 7.8 },
      { partner: 'D. Nakamura', projectedOrig: 14_800_000, projectedComp: 1_640_000, vsPriorYr: 4.2 },
      { partner: 'C. Oduya', projectedOrig: 13_400_000, projectedComp: 1_580_000, vsPriorYr: 18.1 },
      { partner: 'R. Vasquez', projectedOrig: 10_900_000, projectedComp: 1_240_000, vsPriorYr: -2.8 },
    ],
  },

  // ── Activity log ──
  activity: [
    { id: 'BL-A-001', time: '10:48 AM', actor: 'M. Kirkland', action: 'Approved pre-bill', target: 'PB-4812 — Redstone v. Meridian — $412,800', severity: 'info' },
    { id: 'BL-A-002', time: '10:32 AM', actor: 'L. Torres', action: 'Logged dispute', target: 'INV-2026-0836 — Atlas Financial fee-cap', severity: 'warn' },
    { id: 'BL-A-003', time: '10:12 AM', actor: 'Billing Ops', action: 'Exported LEDES file', target: 'Pacific Shipping Co. · March batch', severity: 'info' },
    { id: 'BL-A-004', time: '09:54 AM', actor: 'System', action: 'Trust reconciliation variance flagged', target: 'IOLTA-036 — Greenfield Corp.', severity: 'error' },
    { id: 'BL-A-005', time: '09:41 AM', actor: 'CFO Office', action: 'Approved rate request', target: 'RR-099 — Blackwell Industries senior associate', severity: 'info' },
    { id: 'BL-A-006', time: '09:20 AM', actor: 'A. Petrov', action: 'Submitted time entry', target: 'TE-18417 — Blackwell IP — 7.2h', severity: 'info' },
    { id: 'BL-A-007', time: '08:58 AM', actor: 'Collections', action: 'Escalated overdue invoice', target: 'INV-2026-0835 — Atlas 157 days', severity: 'warn' },
    { id: 'BL-A-008', time: '08:30 AM', actor: 'System', action: 'Budget threshold alert', target: 'Chen v. Atlas — 83.3% of budget consumed', severity: 'warn' },
    { id: 'BL-A-009', time: 'Yesterday', actor: 'M. Kirkland', action: 'Created AFA', target: 'AFA-012 — Pacific Shipping capped fee', severity: 'info' },
    { id: 'BL-A-010', time: 'Yesterday', actor: 'Billing Ops', action: 'Write-off posted', target: 'Uncollectable — $48,200 — Prior client', severity: 'warn' },
    { id: 'BL-A-011', time: 'Yesterday', actor: 'L. Torres', action: 'Amended time entry', target: 'TE-18322 — narrative detail added for LEDES', severity: 'info' },
    { id: 'BL-A-012', time: '2 days ago', actor: 'System', action: 'Pre-bill generated', target: 'PB-4805 — Harbor District — auto-draft', severity: 'info' },
    { id: 'BL-A-013', time: '2 days ago', actor: 'GC — Pacific Shipping', action: 'Approved invoice via portal', target: 'INV-2026-0840 — $1,180,000', severity: 'info' },
    { id: 'BL-A-014', time: '3 days ago', actor: 'System', action: 'Missing time alert', target: '18 timekeepers below week target', severity: 'warn' },
    { id: 'BL-A-015', time: '3 days ago', actor: 'CFO Office', action: 'Approved rate card', target: 'Standard rate card — 2026 Q2', severity: 'info' },
  ],
};

window.BILLING_DATA = BILLING_DATA;
