// Forge — CDMO submersible-pump tenant fixture (Tritan Pumps Pvt Ltd)
// Babel-standalone in-browser pattern. NO ES imports / exports.
// Single global: const PUMP_TENANT = { ... };

const PUMP_TENANT = {
  // ── Tenant identity ────────────────────────────────────────────────
  tenant: {
    id: "tritan",
    name: "Tritan Pumps Pvt Ltd",
    site: "Vadodara, IN",
    erp: "Forge-native",
    founded: 2014,
    employees: 340,
    revenue_cr: 78,
  },

  // ── Hero program: 500 pumpsets for Helios AgriFlow ────────────────
  program: {
    id: "PGM-M27418-HELIOS-500",
    code: "M-27418",
    name: "M-27418 · 1.0 HP / 4\" private-label pumpset",
    customer: "Helios AgriFlow Pvt Ltd",
    qty: 500,
    due_date: "2026-06-24",
    revision: "B",
    lead: "Karan V.",
    progress: 0.12,
    nextMilestone: "Pilot lot dispatch",
    nextDate: "2026-05-20",
    phase: "Industrialize",
  },

  // ── KPI strip ──────────────────────────────────────────────────────
  kpis: [
    { k: "Active SKUs",      v: "117", d: "+4 wk",         trend: "up"   },
    { k: "Open RFQs",        v: "3",   d: "₹4.2 Cr",       trend: "up"   },
    { k: "WOs scheduled",    v: "4",   d: "500 unit hero", trend: "flat" },
    { k: "Open ECOs",        v: "2",   d: "1 critical",    trend: "flat" },
    { k: "Audits due 30d",   v: "5",   d: "1 overdue",     trend: "down" },
    { k: "Line-readiness %", v: "86%", d: "+3 pt",         trend: "up"   },
  ],

  // ── Navigation (16 ids, pump-CDMO labels) ──────────────────────────
  nav: [
    { g: "Program", items: [
      { id: "dashboard",    label: "Overview",                       icon: "Home"      },
      { id: "onboarding",   label: "Customer Onboarding",            icon: "Sparkle"   },
    ]},
    { g: "Plan", items: [
      { id: "plc",          label: "Pump Lifecycle",                 icon: "Satellite" },
      { id: "gantt",        label: "Schedule · plan://",             icon: "Calendar"  },
      { id: "lifecycle",    label: "Pump Workflow (FSM)",            icon: "Flow"      },
    ]},
    { g: "Build", items: [
      { id: "ebom",         label: "E-BOM · Pump+Motor",             icon: "Tree"      },
      { id: "ebomtombom",   label: "E-BOM → M-BOM",                  icon: "Diff"      },
      { id: "mbom",         label: "M-BOM · Routing",                icon: "Factory"   },
      { id: "workflows",    label: "Workflow Hub · build://",        icon: "Flow"      },
      { id: "eco",          label: "ECO · Change Orders",            icon: "Git"       },
      { id: "approvals",    label: "Approvals",                      icon: "Check"     },
      { id: "erp",          label: "ERP Release",                    icon: "Plug"      },
    ]},
    { g: "Line", items: [
      { id: "line",         label: "Line · line://",                 icon: "Factory"   },
      { id: "analytics",    label: "Analytics",                      icon: "BarChart"  },
      { id: "connectors",   label: "Connectors",                     icon: "Link"      },
    ]},
    { g: "Traveler", items: [
      { id: "traveler",     label: "Station Console · traveler://",  icon: "Wrench"    },
    ]},
    { g: "Governance", items: [
      { id: "auditor",      label: "Auditor · ledger",               icon: "Check"     },
    ]},
    { g: "Organization", items: [
      { id: "people",       label: "People & HR",                    icon: "Person"    },
      { id: "docs",         label: "Documents",                      icon: "File"      },
      { id: "maintenance",  label: "Maintenance",                    icon: "Wrench"    },
      { id: "integrations", label: "Integrations",                   icon: "DB"        },
    ]},
  ],

  // ── Parts catalog (flat tree, motor + pump) ────────────────────────
  parts: [
    // Top-level pumpset
    { num: "00.00", p: null,    name: "M-27418 · 1.0HP 4\" submersible pumpset", qty: 1,  cost_inr: 8420, tolerance: "—",        lead_time_days: 0,  supplier: "in-house" },

    // Level-2: Motor sub-assembly (10.xx) and Pump sub-assembly (20.xx)
    { num: "10.00", p: "00.00", name: "Motor sub-assembly W42-22-2.0",           qty: 1,  cost_inr: 4350, tolerance: "—",        lead_time_days: 0,  supplier: "in-house" },
    { num: "20.00", p: "00.00", name: "Pump sub-assembly 4\" 3-stage",           qty: 1,  cost_inr: 2980, tolerance: "—",        lead_time_days: 0,  supplier: "in-house" },
    { num: "30.00", p: "00.00", name: "Cable & accessory kit",                   qty: 1,  cost_inr: 720,  tolerance: "—",        lead_time_days: 14, supplier: "in-house" },
    { num: "40.00", p: "00.00", name: "Packaging & branding kit",                qty: 1,  cost_inr: 370,  tolerance: "—",        lead_time_days: 12, supplier: "in-house" },

    // Motor leaves (10.xx)
    { num: "10.01", p: "10.00", name: "Motor Base LHP",                          qty: 1,  cost_inr: 480,  tolerance: "±0.10mm",  lead_time_days: 35, supplier: "Athena Castings" },
    { num: "10.02", p: "10.00", name: "Upper Bearing Housing",                   qty: 1,  cost_inr: 320,  tolerance: "±0.05mm",  lead_time_days: 30, supplier: "Athena Castings" },
    { num: "10.03", p: "10.00", name: "Lower Bearing Housing",                   qty: 1,  cost_inr: 295,  tolerance: "±0.05mm",  lead_time_days: 30, supplier: "Athena Castings" },
    { num: "10.04", p: "10.00", name: "Rotor Shaft SS410",                       qty: 1,  cost_inr: 410,  tolerance: "Ø17.98 +0/-0.01", lead_time_days: 28, supplier: "Vega Shafts" },
    { num: "10.05", p: "10.00", name: "Rotor Stamping Al-die",                   qty: 1,  cost_inr: 540,  tolerance: "±0.05mm",  lead_time_days: 30, supplier: "Elara Stamping" },
    { num: "10.06", p: "10.00", name: "Stator Stack 120SL",                      qty: 1,  cost_inr: 690,  tolerance: "Ø119.94 ±0.03", lead_time_days: 30, supplier: "Elara Stamping" },
    { num: "10.07", p: "10.00", name: "Stator Tube 4\"",                         qty: 1,  cost_inr: 285,  tolerance: "±0.10mm",  lead_time_days: 25, supplier: "Kestrel Tubing" },
    { num: "10.08", p: "10.00", name: "GM Bushing 22×28×30 (top)",               qty: 1,  cost_inr: 95,   tolerance: "H7/g6",    lead_time_days: 21, supplier: "Athena Castings" },
    { num: "10.09", p: "10.00", name: "GM Bushing 22×28×30 (mid-A)",             qty: 1,  cost_inr: 95,   tolerance: "H7/g6",    lead_time_days: 21, supplier: "Athena Castings" },
    { num: "10.10", p: "10.00", name: "GM Bushing 22×28×30 (mid-B)",             qty: 1,  cost_inr: 95,   tolerance: "H7/g6",    lead_time_days: 21, supplier: "Athena Castings" },
    { num: "10.11", p: "10.00", name: "GM Bushing 22×28×30 (bottom)",            qty: 1,  cost_inr: 95,   tolerance: "H7/g6",    lead_time_days: 21, supplier: "Athena Castings" },
    { num: "10.12", p: "10.00", name: "Copper Winding 1.0HP 120SL",              qty: 1,  cost_inr: 980,  tolerance: "R=8.6Ω ±5%", lead_time_days: 21, supplier: "Indus Copper Mills" },
    { num: "10.13", p: "10.00", name: "Stator Frame",                            qty: 1,  cost_inr: 240,  tolerance: "±0.10mm",  lead_time_days: 28, supplier: "Athena Castings" },
    { num: "10.14", p: "10.00", name: "Bottom Plate",                            qty: 1,  cost_inr: 170,  tolerance: "±0.10mm",  lead_time_days: 28, supplier: "Athena Castings" },
    { num: "10.15", p: "10.00", name: "Cable Gland",                             qty: 1,  cost_inr: 65,   tolerance: "—",        lead_time_days: 18, supplier: "Halcyon Insulation" },
    { num: "10.16", p: "10.00", name: "Bearing 6202ZZ (top)",                    qty: 1,  cost_inr: 110,  tolerance: "C3 class", lead_time_days: 14, supplier: "in-house" },
    { num: "10.17", p: "10.00", name: "Bearing 6202ZZ (bottom)",                 qty: 1,  cost_inr: 110,  tolerance: "C3 class", lead_time_days: 14, supplier: "in-house" },
    { num: "10.18", p: "10.00", name: "Insulation Kraft Paper",                  qty: 1,  cost_inr: 55,   tolerance: "—",        lead_time_days: 18, supplier: "Halcyon Insulation" },
    { num: "10.19", p: "10.00", name: "Slot Wedge",                              qty: 24, cost_inr: 8,    tolerance: "—",        lead_time_days: 18, supplier: "Halcyon Insulation" },
    { num: "10.20", p: "10.00", name: "Mech Seal · oil chamber",                 qty: 1,  cost_inr: 180,  tolerance: "—",        lead_time_days: 25, supplier: "in-house" },

    // Pump leaves (20.xx)
    { num: "20.01", p: "20.00", name: "Impeller W42 stage A",                    qty: 1,  cost_inr: 360,  tolerance: "±0.5g balance", lead_time_days: 32, supplier: "Athena Castings" },
    { num: "20.02", p: "20.00", name: "Impeller W42 stage B",                    qty: 1,  cost_inr: 360,  tolerance: "±0.5g balance", lead_time_days: 32, supplier: "Athena Castings" },
    { num: "20.03", p: "20.00", name: "Impeller W42 stage C",                    qty: 1,  cost_inr: 360,  tolerance: "±0.5g balance", lead_time_days: 32, supplier: "Athena Castings" },
    { num: "20.04", p: "20.00", name: "Stage Casing 25A",                        qty: 3,  cost_inr: 145,  tolerance: "±0.05mm",  lead_time_days: 35, supplier: "Spire Foundry" },
    { num: "20.05", p: "20.00", name: "Stage Bowl 86mm",                         qty: 3,  cost_inr: 165,  tolerance: "±0.05mm",  lead_time_days: 35, supplier: "Spire Foundry" },
    { num: "20.06", p: "20.00", name: "Pump Shaft SS410",                        qty: 1,  cost_inr: 380,  tolerance: "Ø15.97 +0/-0.01", lead_time_days: 28, supplier: "Vega Shafts" },
    { num: "20.07", p: "20.00", name: "NRV 1.5\" 86mm CI (legacy)",              qty: 1,  cost_inr: 220,  tolerance: "—",        lead_time_days: 35, supplier: "Spire Foundry" },
    { num: "20.08", p: "20.00", name: "NRV Spring",                              qty: 1,  cost_inr: 25,   tolerance: "—",        lead_time_days: 18, supplier: "in-house" },
    { num: "20.09", p: "20.00", name: "Adopter 86mm",                            qty: 1,  cost_inr: 195,  tolerance: "±0.05mm",  lead_time_days: 30, supplier: "Athena Castings" },
    { num: "20.10", p: "20.00", name: "Foot Valve Cover 70mm",                   qty: 1,  cost_inr: 110,  tolerance: "±0.10mm",  lead_time_days: 30, supplier: "Athena Castings" },
    { num: "20.11", p: "20.00", name: "Suction Strainer SS304",                  qty: 1,  cost_inr: 145,  tolerance: "—",        lead_time_days: 25, supplier: "Kestrel Tubing" },
    { num: "20.12", p: "20.00", name: "Discharge Adapter 1.5\"",                 qty: 1,  cost_inr: 180,  tolerance: "±0.10mm",  lead_time_days: 30, supplier: "Athena Castings" },
    { num: "20.13", p: "20.00", name: "Pump Coupling",                           qty: 1,  cost_inr: 240,  tolerance: "H7",       lead_time_days: 30, supplier: "Vega Shafts" },
    { num: "20.14", p: "20.00", name: "O-ring 86×3 (stage seal)",                qty: 3,  cost_inr: 18,   tolerance: "—",        lead_time_days: 14, supplier: "in-house" },
    { num: "20.15", p: "20.00", name: "O-ring 70×2.5 (foot valve)",              qty: 1,  cost_inr: 14,   tolerance: "—",        lead_time_days: 14, supplier: "in-house" },
    { num: "20.16", p: "20.00", name: "O-ring 50×2 (adapter)",                   qty: 1,  cost_inr: 12,   tolerance: "—",        lead_time_days: 14, supplier: "in-house" },
    { num: "20.17", p: "20.00", name: "Wear Ring SS304",                         qty: 3,  cost_inr: 75,   tolerance: "Ø86 H7",   lead_time_days: 28, supplier: "Kestrel Tubing" },
    { num: "20.18", p: "20.00", name: "Stage Bolt M8×40",                        qty: 8,  cost_inr: 6,    tolerance: "8.8 grade", lead_time_days: 7,  supplier: "in-house" },
    { num: "20.19", p: "20.00", name: "Outer Sleeve 86mm",                       qty: 1,  cost_inr: 220,  tolerance: "±0.10mm",  lead_time_days: 30, supplier: "Kestrel Tubing" },
    { num: "20.20", p: "20.00", name: "Top Bracket Pump",                        qty: 1,  cost_inr: 165,  tolerance: "±0.10mm",  lead_time_days: 30, supplier: "Athena Castings" },

    // Cable & accessory leaves (30.xx)
    { num: "30.01", p: "30.00", name: "Submersible Cable 3C×1.5 sqmm 30m",       qty: 1,  cost_inr: 480,  tolerance: "—",        lead_time_days: 14, supplier: "Indus Copper Mills" },
    { num: "30.02", p: "30.00", name: "Cable Joint Kit (heat-shrink)",           qty: 1,  cost_inr: 95,   tolerance: "—",        lead_time_days: 12, supplier: "Halcyon Insulation" },
    { num: "30.03", p: "30.00", name: "Capacitor 25µF 440V (run)",               qty: 1,  cost_inr: 145,  tolerance: "±5%",      lead_time_days: 14, supplier: "in-house" },

    // Packaging leaves (40.xx)
    { num: "40.01", p: "40.00", name: "Master Carton 5-ply",                     qty: 1,  cost_inr: 110,  tolerance: "—",        lead_time_days: 10, supplier: "in-house" },
    { num: "40.02", p: "40.00", name: "Helios brand artwork sleeve",             qty: 1,  cost_inr: 35,   tolerance: "—",        lead_time_days: 8,  supplier: "in-house" },
    { num: "40.03", p: "40.00", name: "Serial label · MRP sticker",              qty: 1,  cost_inr: 12,   tolerance: "—",        lead_time_days: 7,  supplier: "in-house" },
    { num: "40.04", p: "40.00", name: "Warranty card · IS:8034",                 qty: 1,  cost_inr: 8,    tolerance: "—",        lead_time_days: 7,  supplier: "in-house" },
    { num: "40.05", p: "40.00", name: "Foam end-cap pair",                       qty: 1,  cost_inr: 45,   tolerance: "—",        lead_time_days: 10, supplier: "in-house" },

    // Variant parts referenced by other SKUs (M-26102 / M-31507)
    { num: "10.06b", p: "10.00", name: "Stator Stack 100SL (0.75HP variant)",    qty: 1,  cost_inr: 540,  tolerance: "Ø99.94 ±0.03", lead_time_days: 30, supplier: "Elara Stamping" },
    { num: "10.12b", p: "10.00", name: "Copper Winding 0.75HP 100SL",            qty: 1,  cost_inr: 760,  tolerance: "R=11.2Ω ±5%", lead_time_days: 21, supplier: "Indus Copper Mills" },
    { num: "10.04c", p: "10.00", name: "Rotor Shaft SS410 5HP",                  qty: 1,  cost_inr: 980,  tolerance: "Ø22.97 +0/-0.01", lead_time_days: 32, supplier: "Vega Shafts" },
    { num: "10.06c", p: "10.00", name: "Stator Stack 180SL (5HP)",               qty: 1,  cost_inr: 1480, tolerance: "Ø179.92 ±0.03", lead_time_days: 35, supplier: "Elara Stamping" },
    { num: "10.12c", p: "10.00", name: "Copper Winding 5HP 180SL",               qty: 1,  cost_inr: 2950, tolerance: "R=2.4Ω ±5%", lead_time_days: 25, supplier: "Indus Copper Mills" },
    { num: "20.01c", p: "20.00", name: "Impeller W62 5HP stage A",               qty: 1,  cost_inr: 720,  tolerance: "±0.5g balance", lead_time_days: 35, supplier: "Athena Castings" },
    { num: "20.01d", p: "20.00", name: "Impeller W62 5HP stage B",               qty: 1,  cost_inr: 720,  tolerance: "±0.5g balance", lead_time_days: 35, supplier: "Athena Castings" },
    { num: "20.01e", p: "20.00", name: "Impeller W62 5HP stage C",               qty: 1,  cost_inr: 720,  tolerance: "±0.5g balance", lead_time_days: 35, supplier: "Athena Castings" },
    { num: "20.01f", p: "20.00", name: "Impeller W62 5HP stage D",               qty: 1,  cost_inr: 720,  tolerance: "±0.5g balance", lead_time_days: 35, supplier: "Athena Castings" },
    { num: "20.01g", p: "20.00", name: "Impeller W62 5HP stage E",               qty: 1,  cost_inr: 720,  tolerance: "±0.5g balance", lead_time_days: 35, supplier: "Athena Castings" },
    { num: "20.06c", p: "20.00", name: "Pump Shaft SS410 5HP",                   qty: 1,  cost_inr: 920,  tolerance: "Ø19.97 +0/-0.01", lead_time_days: 30, supplier: "Vega Shafts" },
    { num: "20.07b", p: "20.00", name: "NRV 1.5\" 86mm HS S.G.-400 (post ECO-0051)", qty: 1, cost_inr: 410, tolerance: "—",     lead_time_days: 38, supplier: "Spire Foundry" },
    { num: "20.07c", p: "20.00", name: "NRV 2\" 110mm HS S.G.-400 (5HP)",        qty: 1,  cost_inr: 540,  tolerance: "—",        lead_time_days: 42, supplier: "Spire Foundry" },
  ],

  // ── BOMs · 3 SKUs ──────────────────────────────────────────────────
  boms: [
    {
      sku: "M-27418",
      lines: [
        { part_num: "10.01", qty: 1, position: "Motor base" },
        { part_num: "10.02", qty: 1, position: "Top end" },
        { part_num: "10.03", qty: 1, position: "Bottom end" },
        { part_num: "10.04", qty: 1, position: "Rotating element" },
        { part_num: "10.05", qty: 1, position: "Rotor core" },
        { part_num: "10.06", qty: 1, position: "Stator core" },
        { part_num: "10.07", qty: 1, position: "Motor body" },
        { part_num: "10.08", qty: 1, position: "Top bushing" },
        { part_num: "10.09", qty: 1, position: "Mid-A bushing" },
        { part_num: "10.10", qty: 1, position: "Mid-B bushing" },
        { part_num: "10.11", qty: 1, position: "Bottom bushing" },
        { part_num: "10.12", qty: 1, position: "Stator winding" },
        { part_num: "10.13", qty: 1, position: "Frame" },
        { part_num: "10.14", qty: 1, position: "Base plate" },
        { part_num: "10.15", qty: 1, position: "Cable entry" },
        { part_num: "10.16", qty: 1, position: "Bearing top" },
        { part_num: "10.17", qty: 1, position: "Bearing bottom" },
        { part_num: "10.18", qty: 1, position: "Slot insulation" },
        { part_num: "10.19", qty: 24, position: "Slot wedges" },
        { part_num: "10.20", qty: 1, position: "Mech seal" },
        { part_num: "20.01", qty: 1, position: "Impeller A" },
        { part_num: "20.02", qty: 1, position: "Impeller B" },
        { part_num: "20.03", qty: 1, position: "Impeller C" },
        { part_num: "20.04", qty: 3, position: "Stage casings" },
        { part_num: "20.05", qty: 3, position: "Stage bowls" },
        { part_num: "20.06", qty: 1, position: "Pump shaft" },
        { part_num: "20.07", qty: 1, position: "NRV (legacy CI · pending ECO-0051)" },
        { part_num: "20.09", qty: 1, position: "Adopter" },
        { part_num: "20.13", qty: 1, position: "Coupling" },
        { part_num: "30.01", qty: 1, position: "Power cable 30m" },
      ],
    },
    {
      sku: "M-26102",
      lines: [
        { part_num: "10.01", qty: 1, position: "Motor base (V4 chassis · post ECO-0042)" },
        { part_num: "10.02", qty: 1, position: "Top end" },
        { part_num: "10.03", qty: 1, position: "Bottom end" },
        { part_num: "10.04", qty: 1, position: "Rotor shaft" },
        { part_num: "10.05", qty: 1, position: "Rotor core" },
        { part_num: "10.06b", qty: 1, position: "Stator 100SL" },
        { part_num: "10.07", qty: 1, position: "Motor body" },
        { part_num: "10.12b", qty: 1, position: "Winding 0.75HP" },
        { part_num: "10.13", qty: 1, position: "Frame" },
        { part_num: "10.14", qty: 1, position: "Base plate" },
        { part_num: "10.16", qty: 1, position: "Bearing top" },
        { part_num: "10.17", qty: 1, position: "Bearing bottom" },
        { part_num: "20.01", qty: 1, position: "Impeller A" },
        { part_num: "20.02", qty: 1, position: "Impeller B" },
        { part_num: "20.04", qty: 2, position: "Stage casings" },
        { part_num: "20.05", qty: 2, position: "Stage bowls" },
        { part_num: "20.06", qty: 1, position: "Pump shaft" },
        { part_num: "20.07", qty: 1, position: "NRV" },
        { part_num: "20.09", qty: 1, position: "Adopter" },
        { part_num: "30.01", qty: 1, position: "Power cable" },
      ],
    },
    {
      sku: "M-31507",
      lines: [
        { part_num: "10.01", qty: 1, position: "Motor base (heavy)" },
        { part_num: "10.02", qty: 1, position: "Top end (5HP)" },
        { part_num: "10.03", qty: 1, position: "Bottom end (5HP)" },
        { part_num: "10.04c", qty: 1, position: "Rotor shaft 22mm" },
        { part_num: "10.05", qty: 1, position: "Rotor core" },
        { part_num: "10.06c", qty: 1, position: "Stator 180SL" },
        { part_num: "10.07", qty: 1, position: "Motor body" },
        { part_num: "10.08", qty: 1, position: "Bushing top" },
        { part_num: "10.09", qty: 1, position: "Bushing mid-A" },
        { part_num: "10.10", qty: 1, position: "Bushing mid-B" },
        { part_num: "10.11", qty: 1, position: "Bushing bottom" },
        { part_num: "10.12c", qty: 1, position: "Winding 5HP" },
        { part_num: "10.13", qty: 1, position: "Frame" },
        { part_num: "10.14", qty: 1, position: "Base plate" },
        { part_num: "10.15", qty: 1, position: "Cable gland (5HP)" },
        { part_num: "10.16", qty: 1, position: "Bearing top" },
        { part_num: "10.17", qty: 1, position: "Bearing bottom" },
        { part_num: "10.18", qty: 1, position: "Insulation" },
        { part_num: "10.19", qty: 36, position: "Slot wedges" },
        { part_num: "10.20", qty: 1, position: "Mech seal" },
        { part_num: "20.01c", qty: 1, position: "Impeller stage A" },
        { part_num: "20.01d", qty: 1, position: "Impeller stage B" },
        { part_num: "20.01e", qty: 1, position: "Impeller stage C" },
        { part_num: "20.01f", qty: 1, position: "Impeller stage D" },
        { part_num: "20.01g", qty: 1, position: "Impeller stage E" },
        { part_num: "20.04", qty: 5, position: "Stage casings" },
        { part_num: "20.05", qty: 5, position: "Stage bowls" },
        { part_num: "20.06c", qty: 1, position: "Pump shaft 20mm" },
        { part_num: "20.07c", qty: 1, position: "NRV 2\" SG-400" },
        { part_num: "20.09", qty: 1, position: "Adopter" },
        { part_num: "20.11", qty: 1, position: "Strainer" },
        { part_num: "20.12", qty: 1, position: "Discharge adapter" },
        { part_num: "20.13", qty: 1, position: "Coupling" },
        { part_num: "20.19", qty: 1, position: "Outer sleeve" },
        { part_num: "30.01", qty: 1, position: "Power cable" },
      ],
    },
  ],

  // ── Cost cascade · per SKU rolled-up RMC + history ────────────────
  cost_cascade: [
    {
      sku: "M-27418",
      pump_rmc: 2980,
      motor_rmc: 4350,
      conversion_pct: 21,
      freight_pct: 3,
      total_inr: 9300,
      history: [
        { q: "2024Q1", total_inr: 8780 },
        { q: "2024Q2", total_inr: 8920 },
        { q: "2024Q3", total_inr: 9050 },
        { q: "2024Q4", total_inr: 9180 },
        { q: "2025Q1", total_inr: 9290 },
        { q: "2025Q2", total_inr: 9340 },
        { q: "2025Q3", total_inr: 9270 },
        { q: "2025Q4", total_inr: 9300 },
      ],
    },
    {
      sku: "M-26102",
      pump_rmc: 2240,
      motor_rmc: 3380,
      conversion_pct: 21,
      freight_pct: 3,
      total_inr: 7140,
      history: [
        { q: "2024Q1", total_inr: 6720 },
        { q: "2024Q2", total_inr: 6880 },
        { q: "2024Q3", total_inr: 6990 },
        { q: "2024Q4", total_inr: 7120 },
        { q: "2025Q1", total_inr: 7220 },
        { q: "2025Q2", total_inr: 7270 },
        { q: "2025Q3", total_inr: 7180 },
        { q: "2025Q4", total_inr: 7140 },
      ],
    },
    {
      sku: "M-31507",
      pump_rmc: 7820,
      motor_rmc: 11240,
      conversion_pct: 21,
      freight_pct: 3,
      total_inr: 24210,
      history: [
        { q: "2024Q1", total_inr: 22850 },
        { q: "2024Q2", total_inr: 23210 },
        { q: "2024Q3", total_inr: 23590 },
        { q: "2024Q4", total_inr: 23980 },
        { q: "2025Q1", total_inr: 24320 },
        { q: "2025Q2", total_inr: 24410 },
        { q: "2025Q3", total_inr: 24180 },
        { q: "2025Q4", total_inr: 24210 },
      ],
    },
  ],

  // ── Routing · 7 stations ───────────────────────────────────────────
  routing: [
    { id: "s1", seq: 1, name: "Receiving",                  owner: "Aryan M.", cycle_min: 8,  station_type: "inbound"     },
    { id: "s2", seq: 2, name: "Incoming Inspect",           owner: "Aryan M.", cycle_min: 12, station_type: "qa-inbound"  },
    { id: "s3", seq: 3, name: "Storage",                    owner: "Priya I.", cycle_min: 5,  station_type: "warehouse"   },
    { id: "s4", seq: 4, name: "Machine Shop",               owner: "Rohit B.", cycle_min: 22, station_type: "machining"   },
    { id: "s5", seq: 5, name: "Motor Assy + Winding",       owner: "Neha G.",  cycle_min: 38, station_type: "assembly"    },
    { id: "s6", seq: 6, name: "No-load + Pressure Test",    owner: "Neha G.",  cycle_min: 18, station_type: "test"        },
    { id: "s7", seq: 7, name: "Pump Assy + Final Test",     owner: "Rohit B.", cycle_min: 25, station_type: "final"       },
  ],

  // ── Quality gates · 30 CTQ checks ──────────────────────────────────
  quality_gates: [
    { gate_id: "QG-01", station: "s2", ctq_param: "Rotor shaft Ø",            instrument: "Digital caliper 0.01mm",   ref_doc: "QC-DIM-04 rev C", spec: "17.97-17.99mm",            effect_if_failed: "Bearing fit reject",  severity: "high"   },
    { gate_id: "QG-02", station: "s2", ctq_param: "Pump shaft Ø",             instrument: "Digital caliper 0.01mm",   ref_doc: "QC-DIM-05 rev B", spec: "15.96-15.98mm",            effect_if_failed: "Coupling fit reject", severity: "high"   },
    { gate_id: "QG-03", station: "s2", ctq_param: "Stator bore",              instrument: "Bore gauge 50-160",        ref_doc: "QC-DIM-12 rev A", spec: "119.91-119.97mm",          effect_if_failed: "Air-gap NCR",         severity: "critical"},
    { gate_id: "QG-04", station: "s2", ctq_param: "Impeller hub Ø",           instrument: "Bore gauge 10-25",         ref_doc: "QC-DIM-22 rev A", spec: "16.00-16.03mm",            effect_if_failed: "Slip on shaft",       severity: "high"   },
    { gate_id: "QG-05", station: "s2", ctq_param: "Casing flatness",          instrument: "Surface plate + DTI",      ref_doc: "QC-DIM-31 rev A", spec: "<0.05mm TIR",              effect_if_failed: "Stage leakage",       severity: "med"    },
    { gate_id: "QG-06", station: "s4", ctq_param: "Rotor stamping concentricity", instrument: "V-block + DTI",         ref_doc: "QC-DIM-08 rev B", spec: "TIR <0.04mm",              effect_if_failed: "Vibration",           severity: "high"   },
    { gate_id: "QG-07", station: "s4", ctq_param: "Stator stack press fit",   instrument: "Hydraulic press load cell",ref_doc: "QC-PRO-03 rev A", spec: "12-18 kN steady",          effect_if_failed: "Stack loose",         severity: "high"   },
    { gate_id: "QG-08", station: "s5", ctq_param: "Winding turns count (per phase)", instrument: "Coil counter visual + meter", ref_doc: "QC-ELEC-09 rev C", spec: "240 turns ±2",      effect_if_failed: "Power output low",    severity: "critical"},
    { gate_id: "QG-09", station: "s5", ctq_param: "Winding resistance Ph-N",  instrument: "Milliohm meter 4-wire",    ref_doc: "QC-ELEC-12 rev B", spec: "8.6Ω ±5%",                 effect_if_failed: "Wrong winding",       severity: "critical"},
    { gate_id: "QG-10", station: "s5", ctq_param: "IR test 500V DC",          instrument: "Megger MIT420",            ref_doc: "QC-ELEC-15 rev A", spec: ">100 MΩ",                  effect_if_failed: "Insulation failure",  severity: "critical"},
    { gate_id: "QG-11", station: "s5", ctq_param: "HV test 1500V AC 1 min",   instrument: "Hipot tester 5kV",         ref_doc: "QC-ELEC-18 rev B", spec: "No breakdown",             effect_if_failed: "Field shock risk",    severity: "critical"},
    { gate_id: "QG-12", station: "s5", ctq_param: "Surge test 2kV",           instrument: "Surge analyzer",           ref_doc: "QC-ELEC-22 rev A", spec: "Pattern match ±5%",        effect_if_failed: "Inter-turn short",    severity: "high"   },
    { gate_id: "QG-13", station: "s6", ctq_param: "No-load current",          instrument: "Clamp meter true-RMS",     ref_doc: "QC-ELEC-30 rev C", spec: "1.8-2.2A @ 230V",          effect_if_failed: "Bearing drag",        severity: "high"   },
    { gate_id: "QG-14", station: "s6", ctq_param: "No-load RPM",              instrument: "Optical tacho",            ref_doc: "QC-ELEC-31 rev B", spec: "2840-2880 rpm",            effect_if_failed: "Slip excess",         severity: "med"    },
    { gate_id: "QG-15", station: "s6", ctq_param: "Hydro pressure test",      instrument: "Pressure gauge 0-20 bar",  ref_doc: "QC-HYD-04 rev B",  spec: "1.5× rated · hold 5min",   effect_if_failed: "Body leak",           severity: "critical"},
    { gate_id: "QG-16", station: "s6", ctq_param: "Leak test (pump body)",    instrument: "Visual + dye",             ref_doc: "QC-HYD-05 rev A",  spec: "Zero seepage",             effect_if_failed: "Field return",        severity: "critical"},
    { gate_id: "QG-17", station: "s6", ctq_param: "Rotor dynamic balance",    instrument: "Schenck dynamic balancer", ref_doc: "QC-MECH-08 rev B", spec: "±0.5g residual",           effect_if_failed: "Vibration / bearing wear", severity: "high" },
    { gate_id: "QG-18", station: "s6", ctq_param: "Vibration · running",      instrument: "Accelerometer + analyzer", ref_doc: "QC-MECH-12 rev A", spec: "<2.5 mm/s RMS",            effect_if_failed: "Premature wear",      severity: "med"    },
    { gate_id: "QG-19", station: "s7", ctq_param: "Impeller axial clearance", instrument: "Feeler gauge",             ref_doc: "QC-DIM-44 rev A", spec: "0.30-0.35mm",              effect_if_failed: "Rub / efficiency loss", severity: "high"  },
    { gate_id: "QG-20", station: "s7", ctq_param: "Pump output @ rated head", instrument: "Performance test rig",     ref_doc: "QC-HYD-12 rev C",  spec: "≥40 LPM @ 22m",            effect_if_failed: "BEE star drop",       severity: "critical"},
    { gate_id: "QG-21", station: "s7", ctq_param: "Pump efficiency",          instrument: "Performance test rig",     ref_doc: "QC-HYD-15 rev B",  spec: "≥3-star band",             effect_if_failed: "BEE non-compliance",  severity: "critical"},
    { gate_id: "QG-22", station: "s7", ctq_param: "Sealing torque (adapter)", instrument: "Torque wrench",            ref_doc: "QC-MECH-22 rev A", spec: "18-22 Nm",                 effect_if_failed: "Adapter leak",        severity: "med"    },
    { gate_id: "QG-23", station: "s7", ctq_param: "NRV functional cycle test", instrument: "Cycle test fixture",      ref_doc: "QC-HYD-20 rev A",  spec: "Pass 100 cycles",          effect_if_failed: "Backflow",            severity: "high"   },
    { gate_id: "QG-24", station: "s7", ctq_param: "Cable color & polarity",   instrument: "Visual + multimeter",      ref_doc: "QC-ELEC-40 rev A", spec: "R-Y-B per IS:8034",        effect_if_failed: "Wrong rotation",      severity: "high"   },
    { gate_id: "QG-25", station: "s7", ctq_param: "Earth continuity",         instrument: "Bond tester 25A",          ref_doc: "QC-ELEC-42 rev A", spec: "<0.1Ω",                    effect_if_failed: "Shock hazard",        severity: "critical"},
    { gate_id: "QG-26", station: "s7", ctq_param: "Serial label · brand artwork", instrument: "Visual + barcode scanner", ref_doc: "QC-LBL-02 rev B", spec: "Helios artwork rev B",    effect_if_failed: "Customer reject",     severity: "med"    },
    { gate_id: "QG-27", station: "s7", ctq_param: "MRP sticker compliance",   instrument: "Visual",                   ref_doc: "QC-LBL-04 rev A", spec: "Per LM Act",               effect_if_failed: "Statutory NCR",       severity: "high"   },
    { gate_id: "QG-28", station: "s7", ctq_param: "Carton seal integrity",    instrument: "Visual + pull gauge",      ref_doc: "QC-PKG-01 rev A", spec: "5N min hold",              effect_if_failed: "In-transit damage",   severity: "low"    },
    { gate_id: "QG-29", station: "s7", ctq_param: "Dispatch note match",      instrument: "ERP scan",                 ref_doc: "QC-PKG-04 rev A", spec: "Serial ↔ DN ↔ PO",         effect_if_failed: "Wrong ship",          severity: "high"   },
    { gate_id: "QG-30", station: "s7", ctq_param: "Final visual + paint finish", instrument: "Visual std panel",      ref_doc: "QC-VIS-01 rev B", spec: "Class A finish",           effect_if_failed: "Cosmetic reject",     severity: "low"    },
  ],

  // ── PFMEA · 12 modes ───────────────────────────────────────────────
  pfmea: [
    { mode: "Wrong tag/labelling",                effect: "Customer rejection at receipt",          cause: "Manual sticker swap",                       S: 2, O: 3, D: 2, RPN: 12,  current_control: "Visual + barcode at QG-26",   recommended_action: "Auto-print label from serial pool" },
    { mode: "Unbalanced impeller",                effect: "Vibration, bearing failure in <500h",    cause: "Casting porosity / poor balance",            S: 8, O: 2, D: 3, RPN: 48,  current_control: "Dynamic balance QG-17",        recommended_action: "Tighten incoming AQL on impellers" },
    { mode: "Stator winding short (inter-turn)",  effect: "Motor burnout in field",                 cause: "Insulation damage during winding",          S: 9, O: 1, D: 4, RPN: 36,  current_control: "Surge test QG-12 + IR QG-10", recommended_action: "Add automated insulation tester" },
    { mode: "NRV body crack under cycling",       effect: "Backflow → field return",                cause: "C.I. fatigue at 86mm thin section",          S: 7, O: 4, D: 5, RPN: 140, current_control: "100-cycle test QG-23",         recommended_action: "Material upgrade to S.G.-400 (ECO-0051)" },
    { mode: "Insufficient impeller clearance",    effect: "Rub, efficiency loss, BEE star drop",    cause: "Stack-up tolerance",                         S: 6, O: 3, D: 4, RPN: 72,  current_control: "Feeler gauge QG-19",           recommended_action: "GD&T rev to position-tolerance scheme" },
    { mode: "Rotor bar fracture",                 effect: "Loss of torque, motor stall",            cause: "Die-cast Al porosity",                       S: 8, O: 1, D: 6, RPN: 48,  current_control: "X-ray sampling 1/lot",         recommended_action: "Increase X-ray sample to 100% on new lots" },
    { mode: "Bearing seizure",                    effect: "Motor failure in field",                 cause: "Wrong bearing class / contamination",        S: 8, O: 2, D: 3, RPN: 48,  current_control: "C3 spec verified at GR + clean assy", recommended_action: "Sealed-source bearings only" },
    { mode: "Pump leakage at adapter",            effect: "Water ingress to motor",                 cause: "O-ring pinch, low seal torque",              S: 5, O: 3, D: 3, RPN: 45,  current_control: "Torque wrench QG-22",          recommended_action: "Pneumatic torque tool with data log" },
    { mode: "Wrong cable color",                  effect: "Wrong rotation in field",                cause: "Operator error during dressing",             S: 3, O: 2, D: 2, RPN: 12,  current_control: "Visual QG-24",                 recommended_action: "Color-coded poka-yoke fixture" },
    { mode: "Foundation foot crack",              effect: "Mounting failure during install",        cause: "Casting void in motor base",                 S: 6, O: 2, D: 4, RPN: 48,  current_control: "Visual + dye penetrant 1/lot", recommended_action: "Move foot to forging route" },
    { mode: "Wrong winding turns count",          effect: "Power output low / current high",        cause: "Manual count error",                         S: 8, O: 2, D: 4, RPN: 64,  current_control: "Resistance check QG-09",       recommended_action: "Automated winding machine with counter" },
    { mode: "Brand artwork mis-print",            effect: "Customer reject at dispatch",            cause: "Old artwork file used",                      S: 4, O: 4, D: 2, RPN: 32,  current_control: "First-piece sign-off per lot", recommended_action: "Artwork pulled live from PLM" },
  ],

  // ── Suppliers · 7 partners ─────────────────────────────────────────
  suppliers: [
    { id: "SUP-01", name: "Athena Castings",      category: "Aluminium / brass castings",   location: "Rajkot, IN",    lead_time_days: 35, audit_score_pct: 91, last_audit: "2026-01-18", status: "approved",    parts_supplied: ["10.01","10.02","10.03","10.08","10.09","10.10","10.11","10.13","10.14","20.01","20.02","20.03","20.09","20.10","20.12","20.20"] },
    { id: "SUP-02", name: "Spire Foundry",        category: "C.I. / S.G.-iron body castings", location: "Kolhapur, IN", lead_time_days: 42, audit_score_pct: 84, last_audit: "2026-02-04", status: "blocked",     parts_supplied: ["20.04","20.05","20.07","20.07b","20.07c"], note: "EHS finding under review" },
    { id: "SUP-03", name: "Kestrel Tubing",       category: "SS pump pipes / strainers",      location: "Surat, IN",    lead_time_days: 25, audit_score_pct: 89, last_audit: "2026-03-02", status: "approved",    parts_supplied: ["10.07","20.11","20.17","20.19"] },
    { id: "SUP-04", name: "Elara Stamping",       category: "Rotor / stator stamping",        location: "Pune, IN",     lead_time_days: 30, audit_score_pct: 78, last_audit: "2026-02-20", status: "approved",    parts_supplied: ["10.05","10.06","10.06b","10.06c"] },
    { id: "SUP-05", name: "Indus Copper Mills",   category: "Copper winding wire / cable",    location: "Bhavnagar, IN",lead_time_days: 21, audit_score_pct: 93, last_audit: "2026-01-30", status: "approved",    parts_supplied: ["10.12","10.12b","10.12c","30.01"] },
    { id: "SUP-06", name: "Vega Shafts",          category: "SS rotor / pump shafts",         location: "Coimbatore, IN", lead_time_days: 28, audit_score_pct: 87, last_audit: "2026-03-12", status: "approved",  parts_supplied: ["10.04","10.04c","20.06","20.06c","20.13"] },
    { id: "SUP-07", name: "Halcyon Insulation",   category: "Kraft paper / wedge / glands",   location: "Aurangabad, IN", lead_time_days: 18, audit_score_pct: 82, last_audit: "2026-02-12", status: "conditional", parts_supplied: ["10.15","10.18","10.19","30.02"] },
  ],

  // ── Vendor Audit Template (VQP 2.0) ────────────────────────────────
  vendor_audit_template: {
    name: "VQP 2.0 — Vendor Qualification Protocol",
    rev: "2.0",
    tabs: [
      { tab: "Legal / Statutory", criteria: [
        { id: "L01", text: "GST registration valid & active" },
        { id: "L02", text: "ISO 9001 certificate · in date" },
        { id: "L03", text: "MSDS available for all hazardous chemicals" },
        { id: "L04", text: "PF / ESI compliance affidavit" },
        { id: "L05", text: "Fire safety NOC current" },
        { id: "L06", text: "Environmental clearance (CTE/CTO)" },
        { id: "L07", text: "Factories Act registration" },
        { id: "L08", text: "Contract Labour Act compliance" },
      ]},
      { tab: "QMS", criteria: [
        { id: "Q01", text: "Documented procedures for all critical processes" },
        { id: "Q02", text: "Calibration records · all gauges in date" },
        { id: "Q03", text: "NCR rate < 2% rolling 90d" },
        { id: "Q04", text: "CAPA closure SLA (target: 21d)" },
        { id: "Q05", text: "Internal audit cadence (quarterly minimum)" },
        { id: "Q06", text: "Management review meetings logged" },
        { id: "Q07", text: "Training matrix · current per role" },
        { id: "Q08", text: "Supplier development plan in place" },
        { id: "Q09", text: "Document control & revision history" },
        { id: "Q10", text: "Customer complaints log & trend analysis" },
        { id: "Q11", text: "Lot traceability records (forward + backward)" },
        { id: "Q12", text: "FAI process (PPAP-equivalent) for new parts" },
        { id: "Q13", text: "MSA / Cp / Cpk evidence on critical CTQs" },
        { id: "Q14", text: "GD&T capability demonstrated" },
        { id: "Q15", text: "Statistical process control on key processes" },
        { id: "Q16", text: "Records retention policy ≥7 years" },
      ]},
      { tab: "EHS", criteria: [
        { id: "E01", text: "Hazard identification & risk register" },
        { id: "E02", text: "PPE issuance logs" },
        { id: "E03", text: "Emergency evacuation drills (semi-annual)" },
        { id: "E04", text: "Fire extinguisher service records" },
        { id: "E05", text: "First-aid certified personnel on each shift" },
        { id: "E06", text: "Effluent treatment plant (where applicable)" },
        { id: "E07", text: "Hazardous waste manifest log" },
        { id: "E08", text: "Noise / dust exposure monitoring" },
        { id: "E09", text: "Machine guarding & LOTO compliance" },
        { id: "E10", text: "Incident / near-miss reporting culture" },
      ]},
      { tab: "Process", criteria: [
        { id: "P01", text: "Process flow diagram up to date" },
        { id: "P02", text: "Control plan per CTQ with reaction plan" },
        { id: "P03", text: "Tooling change protocol & first-piece approval" },
        { id: "P04", text: "Setup approval before production run" },
        { id: "P05", text: "In-process inspection cadence defined" },
        { id: "P06", text: "Final inspection per AQL plan" },
        { id: "P07", text: "Quarantine / hold area for non-conforming" },
        { id: "P08", text: "Heat treatment / surface finish records" },
        { id: "P09", text: "Material certificates (mill TC) on file" },
        { id: "P10", text: "Tool life monitoring & replacement triggers" },
        { id: "P11", text: "Environmental controls (temp / humidity)" },
        { id: "P12", text: "Packaging & shipping spec adherence" },
      ]},
    ],
  },

  // ── Audit case · Helios AgriFlow (auditor visited their facility) ─
  audit_case: {
    supplier: "Helios AgriFlow Pvt Ltd",
    auditor: "Priya I.",
    score_pct: 87,
    status: "conditional",
    date: "2026-04-10",
    notes: "Fundamentals strong; statistical capability needs investment before full approval. Conditional with 60-day plan.",
    tabs: [
      { tab: "Legal / Statutory", score_pct: 100, findings: [
        { id: "L01", result: "pass", note: "GSTIN current" },
        { id: "L02", result: "pass", note: "ISO 9001 valid till 2027-03" },
        { id: "L03", result: "pass" },
        { id: "L04", result: "pass" },
        { id: "L05", result: "pass" },
        { id: "L06", result: "pass" },
        { id: "L07", result: "pass" },
        { id: "L08", result: "pass" },
      ]},
      { tab: "QMS", score_pct: 78, findings: [
        { id: "Q01", result: "pass" },
        { id: "Q02", result: "pass" },
        { id: "Q03", result: "pass", note: "1.4% NCR rolling" },
        { id: "Q04", result: "fail", note: "CAPA closure 38d avg vs 21d target" },
        { id: "Q05", result: "pass" },
        { id: "Q06", result: "pass" },
        { id: "Q07", result: "partial", note: "Training matrix dated Q3-25" },
        { id: "Q08", result: "pass" },
        { id: "Q09", result: "pass" },
        { id: "Q10", result: "pass" },
        { id: "Q11", result: "pass" },
        { id: "Q12", result: "pass" },
        { id: "Q13", result: "fail", note: "No MSA on CTQ Ø17.98 shaft" },
        { id: "Q14", result: "pass" },
        { id: "Q15", result: "fail", note: "SPC charts not maintained on stator bore" },
        { id: "Q16", result: "pass" },
      ]},
      { tab: "EHS", score_pct: 92, findings: [
        { id: "E01", result: "pass" },
        { id: "E02", result: "pass" },
        { id: "E03", result: "pass" },
        { id: "E04", result: "pass" },
        { id: "E05", result: "pass" },
        { id: "E06", result: "pass" },
        { id: "E07", result: "partial", note: "Manifest log gap Feb-25" },
        { id: "E08", result: "pass" },
        { id: "E09", result: "pass" },
        { id: "E10", result: "pass" },
      ]},
      { tab: "Process", score_pct: 85, findings: [
        { id: "P01", result: "pass" },
        { id: "P02", result: "pass" },
        { id: "P03", result: "pass" },
        { id: "P04", result: "pass" },
        { id: "P05", result: "partial", note: "Inspection cadence inconsistent on 2nd shift" },
        { id: "P06", result: "pass" },
        { id: "P07", result: "pass" },
        { id: "P08", result: "pass" },
        { id: "P09", result: "pass" },
        { id: "P10", result: "fail", note: "Tool-life log not maintained on lathe-3" },
        { id: "P11", result: "pass" },
        { id: "P12", result: "pass" },
      ]},
    ],
  },

  // ── Work orders ────────────────────────────────────────────────────
  work_orders: [
    {
      id: "WO-44219", sku: "M-27418", customer: "Helios AgriFlow Pvt Ltd", qty: 500,
      status: "in-progress", scheduled_start: "2026-04-22", scheduled_end: "2026-06-20",
      station_progress: { s1: 0.45, s2: 0.32, s3: 0.28, s4: 0.18, s5: 0.10, s6: 0.06, s7: 0.04 },
      serial_pool_prefix: "TPX-H",
    },
    {
      id: "WO-44220", sku: "M-26102", customer: "Internal stock (post ECO-0042)", qty: 50,
      status: "completed", scheduled_start: "2026-03-10", scheduled_end: "2026-03-25",
      station_progress: { s1: 1.0, s2: 1.0, s3: 1.0, s4: 1.0, s5: 1.0, s6: 1.0, s7: 1.0 },
      serial_pool_prefix: "TPX-A",
    },
    {
      id: "WO-44221", sku: "M-31507", customer: "Pilot · 5HP scale-up", qty: 10,
      status: "pilot", scheduled_start: "2026-04-15", scheduled_end: "2026-05-05",
      station_progress: { s1: 1.0, s2: 1.0, s3: 1.0, s4: 0.6, s5: 0.3, s6: 0, s7: 0 },
      serial_pool_prefix: "TPX-P",
    },
    {
      id: "WO-44222", sku: "AFTERMARKET-SPARES-Q2", customer: "Channel partners · spares", qty: 200,
      status: "scheduled", scheduled_start: "2026-05-08", scheduled_end: "2026-05-28",
      station_progress: { s1: 0, s2: 0, s3: 0, s4: 0, s5: 0, s6: 0, s7: 0 },
      serial_pool_prefix: "TPX-S",
    },
  ],

  // ── In-flight unit travelers (10 from WO-44219) ───────────────────
  travelers: [
    { serial: "TPX-H-0001", wo: "WO-44219", current_station: "s7", completed_stations: ["s1","s2","s3","s4","s5","s6"], dimensions: { rotor_shaft_dia: 17.98, stator_bore: 119.94, impeller_clearance: 0.32 }, photos: ["/photos/TPX-H-0001-rotor.jpg","/photos/TPX-H-0001-final.jpg"], status: "ok" },
    { serial: "TPX-H-0002", wo: "WO-44219", current_station: "s7", completed_stations: ["s1","s2","s3","s4","s5","s6"], dimensions: { rotor_shaft_dia: 17.97, stator_bore: 119.95, impeller_clearance: 0.33 }, photos: ["/photos/TPX-H-0002-rotor.jpg"], status: "ok" },
    { serial: "TPX-H-0003", wo: "WO-44219", current_station: "s6", completed_stations: ["s1","s2","s3","s4","s5"], dimensions: { rotor_shaft_dia: 17.98, stator_bore: 119.93, impeller_clearance: 0.31 }, photos: ["/photos/TPX-H-0003-stator.jpg"], status: "ok" },
    { serial: "TPX-H-0004", wo: "WO-44219", current_station: "s6", completed_stations: ["s1","s2","s3","s4","s5"], dimensions: { rotor_shaft_dia: 17.99, stator_bore: 119.96, impeller_clearance: 0.34 }, photos: ["/photos/TPX-H-0004-winding.jpg"], status: "ok" },
    { serial: "TPX-H-0005", wo: "WO-44219", current_station: "s5", completed_stations: ["s1","s2","s3","s4"], dimensions: { rotor_shaft_dia: 17.98, stator_bore: 119.94, impeller_clearance: null }, photos: ["/photos/TPX-H-0005-shaft.jpg"], status: "ok" },
    { serial: "TPX-H-0006", wo: "WO-44219", current_station: "s5", completed_stations: ["s1","s2","s3","s4"], dimensions: { rotor_shaft_dia: 18.00, stator_bore: 119.93, impeller_clearance: null }, photos: [], status: "hold", hold_reason: "Rotor shaft Ø out of spec — pending dispo" },
    { serial: "TPX-H-0007", wo: "WO-44219", current_station: "s4", completed_stations: ["s1","s2","s3"], dimensions: { rotor_shaft_dia: 17.98, stator_bore: null, impeller_clearance: null }, photos: ["/photos/TPX-H-0007-machined.jpg"], status: "ok" },
    { serial: "TPX-H-0008", wo: "WO-44219", current_station: "s4", completed_stations: ["s1","s2","s3"], dimensions: { rotor_shaft_dia: 17.97, stator_bore: null, impeller_clearance: null }, photos: [], status: "ok" },
    { serial: "TPX-H-0009", wo: "WO-44219", current_station: "s3", completed_stations: ["s1","s2"], dimensions: {}, photos: [], status: "ok" },
    { serial: "TPX-H-0010", wo: "WO-44219", current_station: "s2", completed_stations: ["s1"], dimensions: {}, photos: [], status: "ok" },
  ],

  // ── ECOs ───────────────────────────────────────────────────────────
  eco: [
    {
      id: "ECO-0042",
      title: "V5 → V4 carryover for M-26102 (cost-down)",
      originator: "Devansh A.",
      status: "approved",
      date_raised: "2025-11-10",
      date_approved: "2025-12-01",
      justification: "V5 chassis underutilized at 0.75HP rating; V4 chassis matches duty cycle and shaves ₹2,800/unit RMC. No performance impact at rated head.",
      parts_affected: [
        { old: "10.01-V5 Motor Base LHP",         new: "10.01 Motor Base LHP (V4)" },
        { old: "10.13-V5 Stator Frame",           new: "10.13 Stator Frame (V4)" },
        { old: "10.07-V5 Stator Tube 4\" V5",     new: "10.07 Stator Tube 4\" (V4)" },
        { old: "10.06b-V5 Stator Stack 100SL V5", new: "10.06b Stator Stack 100SL (V4)" },
      ],
      cost_delta_inr: -2800,
      approval_chain: [
        { role: "Design Eng",     name: "Devansh A.", at: "2025-11-10", status: "approved" },
        { role: "Cost Eng",       name: "Karan V.",   at: "2025-11-15", status: "approved" },
        { role: "Plant Director", name: "Meera S.",   at: "2025-12-01", status: "approved" },
      ],
    },
    {
      id: "ECO-0051",
      title: "NRV body redesign C.I. → S.G.-400 (HS variant)",
      originator: "Ishaan R.",
      status: "in-review",
      date_raised: "2026-04-15",
      justification: "5 field returns from Helios AgriFlow reporting NRV body cracking under pressure cycling on 86mm 2.0 variant. Material upgrade to S.G.-400 grade improves fatigue life ~4× per Spire Foundry test data. Affects all M-27418 going forward.",
      parts_affected: [
        { old: "20.07 NRV 1.5\" 86mm CI", new: "20.07b NRV 1.5\" 86mm HS S.G.-400" },
      ],
      cost_delta_inr: 190,
      approval_chain: [
        { role: "Compliance Lead", name: "Ishaan R.",  at: "2026-04-15", status: "approved" },
        { role: "Design Eng",      name: "Devansh A.", at: "2026-04-22", status: "approved" },
        { role: "Plant Director",  name: "Meera S.",   at: null,         status: "pending"  },
      ],
    },
  ],

  // ── Field returns (TPX-A pool · NRV cracking → ECO-0051) ──────────
  field_returns: [
    { rma: "RMA-2026-018", serial: "TPX-A-0017", date_returned: "2026-04-02", customer: "Helios AgriFlow Pvt Ltd", failure: "NRV body cracked", root_cause: "fatigue from pressure cycling C.I. body", linked_eco: "ECO-0051" },
    { rma: "RMA-2026-021", serial: "TPX-A-0023", date_returned: "2026-04-05", customer: "Helios AgriFlow Pvt Ltd", failure: "NRV body cracked", root_cause: "fatigue from pressure cycling C.I. body", linked_eco: "ECO-0051" },
    { rma: "RMA-2026-024", serial: "TPX-A-0029", date_returned: "2026-04-08", customer: "Helios AgriFlow Pvt Ltd", failure: "NRV body cracked + leak", root_cause: "fatigue from pressure cycling C.I. body", linked_eco: "ECO-0051" },
    { rma: "RMA-2026-027", serial: "TPX-A-0031", date_returned: "2026-04-11", customer: "Helios AgriFlow Pvt Ltd", failure: "NRV cracking, partial backflow", root_cause: "fatigue from pressure cycling C.I. body", linked_eco: "ECO-0051" },
    { rma: "RMA-2026-030", serial: "TPX-A-0044", date_returned: "2026-04-14", customer: "Helios AgriFlow Pvt Ltd", failure: "NRV body cracked", root_cause: "fatigue from pressure cycling C.I. body", linked_eco: "ECO-0051" },
  ],

  // ── Compliance (BEE / IS) ──────────────────────────────────────────
  compliance: {
    schedules: [
      { name: "BEE Schedule 6 — Three-phase Squirrel Cage Induction Motors", applicable: false, reason: "Single-phase domestic" },
      { name: "BEE Schedule 7 — Agricultural Pump Sets",                     applicable: true,  current_rating: "3-star" },
      { name: "IS:8034 — Submersible Pumpsets",                              applicable: true,  status: "compliant" },
      { name: "IS:9079 — Single-phase induction motors",                     applicable: true,  status: "compliant" },
    ],
    star_rating: "3-star",
    certifications: ["IS:8034", "BEE Schedule 7"],
    star_rating_decision_tree: [
      { hp_class: "0.5-1.0", efficiency_pct_min: 36, star_band: "3-star" },
      { hp_class: "0.5-1.0", efficiency_pct_min: 40, star_band: "4-star" },
      { hp_class: "0.5-1.0", efficiency_pct_min: 44, star_band: "5-star" },
      { hp_class: "1.0-2.0", efficiency_pct_min: 40, star_band: "3-star" },
      { hp_class: "1.0-2.0", efficiency_pct_min: 44, star_band: "4-star" },
      { hp_class: "1.0-2.0", efficiency_pct_min: 48, star_band: "5-star" },
      { hp_class: "2.0-5.0", efficiency_pct_min: 44, star_band: "3-star" },
      { hp_class: "2.0-5.0", efficiency_pct_min: 48, star_band: "4-star" },
    ],
  },

  // ── Aftermarket / spares catalog ──────────────────────────────────
  aftermarket: [
    { sku: "SP-GMB-22",   name: "GM Bearing Bush 22×28×30",                mrp_inr: 180   },
    { sku: "SP-IMP-W42A", name: "Impeller W42 stage A",                    mrp_inr: 540   },
    { sku: "SP-IMP-W42B", name: "Impeller W42 stage B",                    mrp_inr: 540   },
    { sku: "SP-NRV-86HS", name: "NRV 1.5\" 86mm HS S.G.-400 (post-ECO)",   mrp_inr: 620   },
    { sku: "SP-STT-4",    name: "Stator Tube 4\"",                         mrp_inr: 460   },
    { sku: "SP-CGL-01",   name: "Cable Gland",                             mrp_inr: 110   },
    { sku: "SP-FVC-70",   name: "Foot Valve Cover 70mm",                   mrp_inr: 170   },
    { sku: "SP-COUP-01",  name: "Pump Coupling",                           mrp_inr: 380   },
  ],

  // ── Signed event ledger · Helios timeline (~30 events) ────────────
  ledger: [
    { event_id: "E-0001", ts: "2026-02-14T10:23Z", type: "rfq_received",          mode: "forge", actor: "Karan V.",   summary: "RFQ from Helios AgriFlow: 500 units 1.0HP 4-inch",                ref: "RFQ-2026-0042" },
    { event_id: "E-0002", ts: "2026-02-15T14:05Z", type: "design_match",          mode: "forge", actor: "Devansh A.", summary: "Matched RFQ specs to M-27418 platform · rev B",                  ref: "M-27418" },
    { event_id: "E-0003", ts: "2026-02-18T09:40Z", type: "quote_sent",            mode: "forge", actor: "Karan V.",   summary: "Quote sent: ₹4.65 Cr for 500 units, 8-week LT, 30% advance",      ref: "QT-2026-0042" },
    { event_id: "E-0004", ts: "2026-02-26T16:12Z", type: "po_received",           mode: "forge", actor: "Karan V.",   summary: "Helios PO received · ₹4.65 Cr · advance 30% confirmed",          ref: "PO-HEL-9981" },
    { event_id: "E-0005", ts: "2026-03-02T11:18Z", type: "vendor_audit_started",  mode: "forge", actor: "Priya I.",   summary: "Vendor audit cycle started: Spire, Athena, Elara, Indus",        ref: "VQP-2026-Q1" },
    { event_id: "E-0006", ts: "2026-03-10T08:00Z", type: "wo_released",           mode: "forge", actor: "Meera S.",   summary: "WO-44220 released — 50 units M-26102 internal stock (V4)",      ref: "WO-44220" },
    { event_id: "E-0007", ts: "2026-03-12T15:45Z", type: "vendor_audit_completed",mode: "forge", actor: "Priya I.",   summary: "Spire Foundry audit · score 84% · BLOCKED (EHS finding)",        ref: "AUD-SUP-02" },
    { event_id: "E-0008", ts: "2026-03-18T10:00Z", type: "routing_revised",       mode: "forge", actor: "Devansh A.", summary: "Routing for M-27418 published · 7 stations, 128 min cycle",     ref: "ROUT-M27418-rB" },
    { event_id: "E-0009", ts: "2026-03-20T12:30Z", type: "gates_published",       mode: "forge", actor: "Ishaan R.",  summary: "30 quality gates published for M-27418 program",                 ref: "QG-PKG-M27418" },
    { event_id: "E-0010", ts: "2026-03-25T17:20Z", type: "station_complete",      mode: "forge", actor: "Neha G.",    summary: "WO-44220 completed · 50/50 units shipped to internal stock",    ref: "WO-44220" },
    { event_id: "E-0011", ts: "2026-04-02T09:15Z", type: "field_return_logged",   mode: "forge", actor: "Ishaan R.",  summary: "RMA-2026-018 from Helios · NRV cracking · TPX-A-0017",          ref: "RMA-2026-018" },
    { event_id: "E-0012", ts: "2026-04-05T14:50Z", type: "field_return_logged",   mode: "forge", actor: "Ishaan R.",  summary: "RMA-2026-021 from Helios · NRV cracking · TPX-A-0023",          ref: "RMA-2026-021" },
    { event_id: "E-0013", ts: "2026-04-08T11:30Z", type: "field_return_logged",   mode: "forge", actor: "Ishaan R.",  summary: "RMA-2026-024 from Helios · NRV cracking + leak · TPX-A-0029",   ref: "RMA-2026-024" },
    { event_id: "E-0014", ts: "2026-04-10T13:00Z", type: "vendor_audit_completed",mode: "forge", actor: "Priya I.",   summary: "Helios AgriFlow facility audit · 87% · CONDITIONAL",            ref: "AUD-HELIOS-2026Q2" },
    { event_id: "E-0015", ts: "2026-04-11T16:40Z", type: "field_return_logged",   mode: "forge", actor: "Ishaan R.",  summary: "RMA-2026-027 · NRV cracking · trend confirmed across 4 returns", ref: "RMA-2026-027" },
    { event_id: "E-0016", ts: "2026-04-14T08:55Z", type: "field_return_logged",   mode: "forge", actor: "Ishaan R.",  summary: "RMA-2026-030 · 5th NRV return · escalated to Design",           ref: "RMA-2026-030" },
    { event_id: "E-0017", ts: "2026-04-15T10:10Z", type: "eco_raised",            mode: "forge", actor: "Ishaan R.",  summary: "ECO-0051 raised · NRV C.I. → S.G.-400 redesign",                ref: "ECO-0051" },
    { event_id: "E-0018", ts: "2026-04-15T12:00Z", type: "wo_released",           mode: "forge", actor: "Meera S.",   summary: "WO-44221 released · 10-unit pilot M-31507 (5HP scale-up)",     ref: "WO-44221" },
    { event_id: "E-0019", ts: "2026-04-18T09:30Z", type: "pilot_started",         mode: "forge", actor: "Rohit B.",   summary: "M-31507 pilot lot started at machine shop",                      ref: "WO-44221" },
    { event_id: "E-0020", ts: "2026-04-22T08:00Z", type: "wo_released",           mode: "forge", actor: "Meera S.",   summary: "WO-44219 released · 500 units M-27418 for Helios",             ref: "WO-44219" },
    { event_id: "E-0021", ts: "2026-04-22T11:25Z", type: "eco_in_review",         mode: "forge", actor: "Devansh A.", summary: "ECO-0051 design review approved · pending Plant Director",     ref: "ECO-0051" },
    { event_id: "E-0022", ts: "2026-04-23T07:45Z", type: "prod_started",          mode: "forge", actor: "Aryan M.",   summary: "WO-44219 receiving started · first 50 units in-bound",         ref: "WO-44219·s1" },
    { event_id: "E-0023", ts: "2026-04-24T10:15Z", type: "station_complete",      mode: "forge", actor: "Aryan M.",   summary: "Incoming inspect cleared first 32 units · QG-01..QG-05 pass",  ref: "WO-44219·s2" },
    { event_id: "E-0024", ts: "2026-04-25T14:30Z", type: "test_passed",           mode: "forge", actor: "Neha G.",    summary: "M-31507 pilot · winding pass HV 1500V on first 3 units",       ref: "WO-44221·QG-11" },
    { event_id: "E-0025", ts: "2026-04-26T09:00Z", type: "bee_certified",         mode: "forge", actor: "Ishaan R.",  summary: "M-27418 BEE 3-star recertification confirmed for 2026",         ref: "BEE-S7-M27418" },
    { event_id: "E-0026", ts: "2026-04-27T11:20Z", type: "spare_order_received",  mode: "forge", actor: "Karan V.",   summary: "Channel partner order · 200 mixed spares Q2",                   ref: "WO-44222" },
    { event_id: "E-0027", ts: "2026-04-28T08:30Z", type: "pilot_passed",          mode: "forge", actor: "Rohit B.",   summary: "M-31507 pilot batch 1 (3 units) passed final test",            ref: "WO-44221·s7" },
    { event_id: "E-0028", ts: "2026-04-28T15:40Z", type: "test_passed",           mode: "forge", actor: "Neha G.",    summary: "WO-44219 · 18/500 units passed motor no-load test",            ref: "WO-44219·s6" },
    { event_id: "E-0029", ts: "2026-04-29T07:50Z", type: "dispatch_created",      mode: "forge", actor: "Karan V.",   summary: "Dispatch note draft for first pilot lot to Helios (20 units)", ref: "DN-2026-0118" },
    { event_id: "E-0030", ts: "2026-04-29T12:00Z", type: "customer_acceptance",   mode: "forge", actor: "Karan V.",   summary: "Helios pre-acceptance walkthrough scheduled at 2026-05-15",     ref: "ACC-HEL-2026-Q2" },
  ],

  // ── Customer entity (Helios AgriFlow context) ──────────────────────
  customer: {
    id: "CUST-HELIOS",
    name: "Helios AgriFlow Pvt Ltd",
    location: "Ahmedabad, IN",
    relationship: "Private-label",
    sla: {
      otd_target_pct: 95,
      ar_terms_days: 60,
      warranty_months: 24,
      defect_ppm_target: 2500,
    },
    contacts: [
      { role: "Head — Procurement",  name: "Helios — Procurement Lead",  email: "procurement@helios-agriflow.example" },
      { role: "Head — Quality",      name: "Helios — Quality Lead",      email: "quality@helios-agriflow.example" },
      { role: "Head — Brand",        name: "Helios — Brand Lead",        email: "brand@helios-agriflow.example" },
    ],
    relationship_started: "2024-08",
    cumulative_units_shipped: 1820,
    cumulative_value_cr: 16.4,
  },

  // ── People · Tritan team referenced across this fixture ───────────
  people: [
    { id: "P-01", name: "Aryan M.",   role: "Receiving / Incoming Inspect Operator", station: "s1+s2" },
    { id: "P-02", name: "Priya I.",   role: "Storage / QA Audit Lead",               station: "s3"   },
    { id: "P-03", name: "Rohit B.",   role: "Machine Shop / Pump Assy Lead",         station: "s4+s7"},
    { id: "P-04", name: "Neha G.",    role: "Motor Assy / Test Operator",            station: "s5+s6"},
    { id: "P-05", name: "Karan V.",   role: "Sales Engineering Lead",                station: "—"    },
    { id: "P-06", name: "Meera S.",   role: "Plant Director",                        station: "—"    },
    { id: "P-07", name: "Devansh A.", role: "Design Engineer",                       station: "—"    },
    { id: "P-08", name: "Ishaan R.",  role: "Compliance Lead",                       station: "—"    },
  ],

  // ── Design envelope · pump-design depth (added by pump-design agent) ──
  // Feeds <ScreenHeadCurve>, <ScreenMotorSizing>, <ScreenComplianceVerifier>.
  // Hydraulic & cavitation parameters per SKU; impeller/suction geometry
  // for NPSH math; measured efficiency for BEE star checks.
  // ADDITIVE only — does not modify existing keys other agents depend on.
  design: {
    duty_envelope: [
      {
        sku: "M-27418",
        label: "1.0HP · 4\" Helios",
        hp: 1.0,
        rated_q_lpm: 40,
        rated_h_m: 22,
        rpm: 2900,
        impeller_eye_d_mm: 38,      // 4" submersible stage A eye
        suction_lift_m: -3.0,        // 3 m submerged (typical borewell)
        friction_m: 0.5,
        eff_meas_pct: 41,            // BEE rig measurement
        hydro_test_bar: 33,          // IS:8034 cl. 9.1 — 1.5× rated head
        ir_meg_ohm: 200,             // QG-10 reading
        hv_kv_ac_min: 1.5,           // IS:8034 cl. 10.3
        impeller_clearance_mm: 0.32  // QG-19 reading, mid of 0.30-0.35 band
      },
      {
        sku: "M-26102",
        label: "0.75HP · V4 carryover",
        hp: 0.75,
        rated_q_lpm: 36,
        rated_h_m: 18,
        rpm: 2900,
        impeller_eye_d_mm: 34,
        suction_lift_m: -2.5,
        friction_m: 0.4,
        eff_meas_pct: 38,
        hydro_test_bar: 27,
        ir_meg_ohm: 280,
        hv_kv_ac_min: 1.5,
        impeller_clearance_mm: 0.30
      },
      {
        sku: "M-31507",
        label: "5HP · pilot scale-up",
        hp: 5.0,
        rated_q_lpm: 95,
        rated_h_m: 32,
        rpm: 2900,
        impeller_eye_d_mm: 52,
        suction_lift_m: -4.0,
        friction_m: 0.8,
        eff_meas_pct: 49,
        hydro_test_bar: 48,
        ir_meg_ohm: 180,
        hv_kv_ac_min: 1.5,
        impeller_clearance_mm: 0.34
      }
    ]
  },
};

// expose to global scope (Babel-standalone pattern)
if (typeof window !== 'undefined') window.PUMP_TENANT = PUMP_TENANT;
