/* global window */

// ====================== Formatters ======================
window.fmtIDR = (n) => "Rp " + new Intl.NumberFormat("id-ID").format(Math.round(n));
window.fmtShort = (n) => {
  const a = Math.abs(n);
  if (a >= 1e12) return "Rp " + (n / 1e12).toFixed(1) + "T";
  if (a >= 1e9) return "Rp " + (n / 1e9).toFixed(1) + "M";
  if (a >= 1e6) return "Rp " + (n / 1e6).toFixed(1) + "jt";
  if (a >= 1e3) return "Rp " + (n / 1e3).toFixed(0) + "rb";
  return "Rp " + n;
};
window.fmtNum = (n) => new Intl.NumberFormat("id-ID").format(Math.round(n));
window.fmtPct = (n, d = 1) => n.toFixed(d) + "%";

// ====================== Company ======================
window.COMPANY = {
  name: "PT Nusantara Niaga Sejahtera",
  shortName: "Nusantara Niaga",
  tagline: "Distributor consumer goods nasional · est. 2003",
  user: { name: "Bayu Wirasena", role: "Sales Director", initials: "BW", tone: "primary" },
  outlets: 12480,
  reps: 84,
  fiscalYear: "FY 2025",
  asOf: "26 Mei 2026 · 10:42 WIB",
};

// ====================== Regions ======================
window.REGIONS = [
  { id: "jbd", name: "Jabodetabek",       manager: "Rina Anggraini",  target: 5_200_000_000, actual: 4_920_000_000, outlets: 3120, reps: 22, color: "primary" },
  { id: "jbr", name: "Jawa Barat",        manager: "Hendra Saputra",  target: 3_400_000_000, actual: 3_580_000_000, outlets: 2240, reps: 16, color: "emerald" },
  { id: "jts", name: "Jateng-DIY",        manager: "Sri Wahyuni",     target: 2_800_000_000, actual: 2_640_000_000, outlets: 1980, reps: 14, color: "indigo" },
  { id: "jtb", name: "Jatim-Bali",        manager: "Agus Pratama",    target: 3_100_000_000, actual: 3_240_000_000, outlets: 2410, reps: 15, color: "violet" },
  { id: "sum", name: "Sumatra",           manager: "Dewi Kartika",    target: 2_400_000_000, actual: 2_160_000_000, outlets: 1820, reps: 11, color: "orange" },
  { id: "tim", name: "Indonesia Timur",   manager: "Yusuf Rahmadi",   target: 1_500_000_000, actual: 1_320_000_000, outlets: 910,  reps: 6,  color: "warning" },
];

// ====================== Sales Reps ======================
window.SALES_REPS = [
  { id: "r01", name: "Andika Pratama",   region: "Jabodetabek", role: "Senior Sales", target: 280_000_000, actual: 312_000_000, deals: 24, calls: 142, visits: 88, tone: "primary",  badges: ["Top Closer", "Streak 5x"], trend: [40, 55, 62, 70, 78, 82, 90] },
  { id: "r02", name: "Mawar Indriani",   region: "Jawa Barat",  role: "Sales Lead",   target: 240_000_000, actual: 298_000_000, deals: 21, calls: 138, visits: 92, tone: "emerald",  badges: ["Most Active"],         trend: [35, 48, 55, 65, 72, 80, 85] },
  { id: "r03", name: "Budi Hartono",     region: "Jatim-Bali",  role: "Senior Sales", target: 260_000_000, actual: 286_000_000, deals: 19, calls: 121, visits: 76, tone: "violet",   badges: ["Best Region"],         trend: [30, 42, 51, 58, 66, 72, 78] },
  { id: "r04", name: "Kartika Sari",     region: "Jabodetabek", role: "Sales",        target: 200_000_000, actual: 224_000_000, deals: 18, calls: 115, visits: 71, tone: "pink",     badges: ["Rookie of Month"],     trend: [22, 30, 40, 48, 55, 62, 70] },
  { id: "r05", name: "Reza Maulana",     region: "Jawa Barat",  role: "Sales",        target: 200_000_000, actual: 218_000_000, deals: 17, calls: 108, visits: 68, tone: "indigo",   badges: [],                      trend: [25, 33, 42, 50, 57, 64, 70] },
  { id: "r06", name: "Lisa Hartati",     region: "Sumatra",     role: "Senior Sales", target: 220_000_000, actual: 198_000_000, deals: 15, calls: 102, visits: 64, tone: "orange",   badges: [],                      trend: [28, 35, 41, 47, 53, 58, 62] },
  { id: "r07", name: "Fadli Ramadhan",   region: "Jateng-DIY",  role: "Sales",        target: 180_000_000, actual: 192_000_000, deals: 14, calls: 95,  visits: 60, tone: "warning",  badges: [],                      trend: [20, 28, 35, 42, 48, 54, 60] },
  { id: "r08", name: "Putri Maharani",   region: "Jabodetabek", role: "Sales",        target: 180_000_000, actual: 184_000_000, deals: 14, calls: 92,  visits: 58, tone: "info",     badges: [],                      trend: [18, 26, 33, 40, 46, 52, 58] },
  { id: "r09", name: "Tomi Surya",       region: "Jatim-Bali",  role: "Sales",        target: 200_000_000, actual: 178_000_000, deals: 13, calls: 88,  visits: 55, tone: "primary",  badges: [],                      trend: [22, 28, 34, 40, 45, 50, 55] },
  { id: "r10", name: "Nadia Putri",      region: "Indonesia Timur", role: "Sales",    target: 160_000_000, actual: 142_000_000, deals: 11, calls: 76,  visits: 48, tone: "violet",   badges: [],                      trend: [15, 22, 28, 33, 38, 42, 46] },
  { id: "r11", name: "Galih Permana",    region: "Sumatra",     role: "Sales",        target: 180_000_000, actual: 138_000_000, deals: 10, calls: 72,  visits: 44, tone: "pink",     badges: [],                      trend: [14, 20, 26, 30, 34, 38, 42] },
  { id: "r12", name: "Indah Lestari",    region: "Jateng-DIY",  role: "Sales",        target: 160_000_000, actual: 124_000_000, deals: 9,  calls: 68,  visits: 41, tone: "emerald",  badges: [],                      trend: [12, 18, 24, 28, 32, 36, 40] },
];

// ====================== Outlets (sample) ======================
window.OUTLETS = [
  { id: "o01", name: "Indomaret Jakarta Pusat",  channel: "MT",   region: "Jabodetabek", revenue: 480_000_000, growth: 12.4 },
  { id: "o02", name: "Alfamart Cilandak",        channel: "MT",   region: "Jabodetabek", revenue: 412_000_000, growth: 8.6 },
  { id: "o03", name: "Hypermart Kelapa Gading",  channel: "MT",   region: "Jabodetabek", revenue: 388_000_000, growth: 5.2 },
  { id: "o04", name: "Lotte Mart Bandung",       channel: "MT",   region: "Jawa Barat",  revenue: 326_000_000, growth: 14.1 },
  { id: "o05", name: "Hotel Aruna Bali",         channel: "Horeca", region: "Jatim-Bali", revenue: 284_000_000, growth: 22.6 },
  { id: "o06", name: "Warung Sembako Pak Madi",  channel: "GT",   region: "Jateng-DIY",  revenue: 162_000_000, growth: -3.2 },
  { id: "o07", name: "Distributor Medan Jaya",   channel: "GT",   region: "Sumatra",     revenue: 248_000_000, growth: 9.4 },
  { id: "o08", name: "Tokopedia Official Store", channel: "Online", region: "Jabodetabek", revenue: 196_000_000, growth: 38.5 },
];

// ====================== KPI Overview ======================
window.KPI_OVERVIEW = [
  { label: "Omzet MTD",          value: "Rp 18,4M",  raw: 18_400_000_000, target: 21_000_000_000, delta: "+8,2%",  tone: "primary",  trend: "up",   sub: "vs bulan lalu", icon: "Trending" },
  { label: "Target Achievement", value: "87,6%",     pct: 87.6,           delta: "+2,4 pt",        tone: "emerald",  trend: "up",   sub: "MTD progress",  icon: "Target" },
  { label: "Forecast Q2",        value: "Rp 64,2M",  raw: 64_200_000_000, delta: "+12,5%",         tone: "indigo",   trend: "up",   sub: "vs Q1",         icon: "Forecast" },
  { label: "Outlet Aktif",       value: "12.480",    delta: "+186",       tone: "violet",          trend: "up",     sub: "minggu ini",     icon: "Building" },
  { label: "Approval Pending",   value: "14",        delta: "3 urgent",   tone: "warning",         trend: "flat",   sub: "menunggu Anda",  icon: "Approval" },
];

// ====================== Revenue Trend (12 months) ======================
window.REVENUE_MONTHLY = [
  { m: "Jun '25", actual: 14_200_000_000, target: 15_000_000_000 },
  { m: "Jul",     actual: 15_800_000_000, target: 16_000_000_000 },
  { m: "Aug",     actual: 16_400_000_000, target: 16_500_000_000 },
  { m: "Sep",     actual: 17_100_000_000, target: 17_000_000_000 },
  { m: "Oct",     actual: 17_900_000_000, target: 17_800_000_000 },
  { m: "Nov",     actual: 18_800_000_000, target: 18_500_000_000 },
  { m: "Des",     actual: 22_400_000_000, target: 20_000_000_000 },
  { m: "Jan '26", actual: 17_200_000_000, target: 18_000_000_000 },
  { m: "Feb",     actual: 18_600_000_000, target: 19_000_000_000 },
  { m: "Mar",     actual: 19_400_000_000, target: 19_500_000_000 },
  { m: "Apr",     actual: 20_200_000_000, target: 20_000_000_000 },
  { m: "May",     actual: 18_400_000_000, target: 21_000_000_000 },
];

// 30 daily
window.REVENUE_DAILY = Array.from({ length: 30 }, (_, i) => {
  const base = 580_000_000;
  const wave = Math.sin(i / 4) * 120_000_000;
  const trend = i * 6_000_000;
  return { d: i + 1, v: Math.round(base + wave + trend + (i % 7 === 0 ? -180_000_000 : 0)) };
});

// ====================== Revenue Splits ======================
window.REVENUE_BY_CHANNEL = [
  { name: "Modern Trade",  value: 8_400_000_000, color: "#0d9488", pct: 45.6 },
  { name: "General Trade", value: 6_100_000_000, color: "#059669", pct: 33.1 },
  { name: "Horeca",        value: 2_400_000_000, color: "#6366f1", pct: 13.0 },
  { name: "Online",        value: 1_500_000_000, color: "#f97316", pct: 8.3 },
];

window.REVENUE_BY_PRODUCT = [
  { sku: "Snack Krispy Original 80g",   category: "Snack",        revenue: 2_840_000_000, growth: 14.2, margin: 28 },
  { sku: "Kopi Susu Nusantara 200ml",   category: "Beverage",     revenue: 2_410_000_000, growth: 22.6, margin: 32 },
  { sku: "Sabun Lembut Family 80g",     category: "Personal Care", revenue: 1_920_000_000, growth: 8.4,  margin: 24 },
  { sku: "Mie Kuah Pedas Mantap",       category: "Instant Food", revenue: 1_680_000_000, growth: 11.3, margin: 22 },
  { sku: "Detergen Cuci Bersih 1kg",    category: "Household",    revenue: 1_540_000_000, growth: 6.8,  margin: 26 },
  { sku: "Teh Kotak Premium 250ml",     category: "Beverage",     revenue: 1_380_000_000, growth: -2.4, margin: 30 },
  { sku: "Pasta Gigi Mint Fresh 75g",   category: "Personal Care", revenue: 1_240_000_000, growth: 9.1,  margin: 35 },
  { sku: "Minyak Goreng Sawit 2L",      category: "Cooking",      revenue: 1_180_000_000, growth: 4.2,  margin: 18 },
];

// ====================== Forecast ======================
window.FORECAST = [
  { m: "Jun",  base: 19_800_000_000, optimistic: 22_400_000_000, pessimistic: 17_200_000_000 },
  { m: "Jul",  base: 20_400_000_000, optimistic: 23_600_000_000, pessimistic: 17_400_000_000 },
  { m: "Aug",  base: 21_200_000_000, optimistic: 24_800_000_000, pessimistic: 18_000_000_000 },
  { m: "Sep",  base: 22_000_000_000, optimistic: 26_000_000_000, pessimistic: 18_600_000_000 },
  { m: "Oct",  base: 22_800_000_000, optimistic: 27_400_000_000, pessimistic: 19_000_000_000 },
  { m: "Nov",  base: 24_200_000_000, optimistic: 29_200_000_000, pessimistic: 19_800_000_000 },
];

window.FORECAST_SCENARIOS = [
  { id: "opt", name: "Optimistic", value: 152_400_000_000, assumption: "Pertumbuhan MT 18%, channel online double", confidence: 72 },
  { id: "base", name: "Base Case", value: 130_400_000_000, assumption: "Trend bulan berjalan, no major disruption", confidence: 92 },
  { id: "pess", name: "Pessimistic", value: 110_000_000_000, assumption: "Daya beli turun, kompetitor agresif", confidence: 68 },
];

window.FORECAST_ACCURACY = [
  { m: "Nov '25", forecast: 18_500_000_000, actual: 18_800_000_000, variance: 1.6 },
  { m: "Des",     forecast: 20_000_000_000, actual: 22_400_000_000, variance: 12.0 },
  { m: "Jan '26", forecast: 18_000_000_000, actual: 17_200_000_000, variance: -4.4 },
  { m: "Feb",     forecast: 19_000_000_000, actual: 18_600_000_000, variance: -2.1 },
  { m: "Mar",     forecast: 19_500_000_000, actual: 19_400_000_000, variance: -0.5 },
  { m: "Apr",     forecast: 20_000_000_000, actual: 20_200_000_000, variance: 1.0 },
];

window.FORECAST_INSIGHTS = [
  { tone: "primary", title: "Peluang ekspansi MT Sumatra", text: "Akuisisi 12 outlet MT baru di Medan dan Palembang berpotensi tambah Rp 2,4M/bulan." },
  { tone: "warn",    title: "Risiko penurunan GT Jateng",  text: "Kunjungan turun 18% bulan ini, run-rate Q3 berisiko -8% vs target." },
  { tone: "primary", title: "Channel Online growth kuat", text: "Tokopedia & Shopee tumbuh 38%, alokasikan budget marketing 15% lebih besar." },
];

// ====================== Activities ======================
window.ACTIVITY_KPI = [
  { label: "Kunjungan Hari Ini",  value: 248, target: 320, tone: "primary", icon: "MapPin" },
  { label: "Order Taken",         value: 142, delta: "+18", tone: "emerald", icon: "FileText" },
  { label: "Call Dilakukan",      value: 386, delta: "+24", tone: "indigo", icon: "Phone" },
  { label: "Visit Compliance",    value: "77,5%", delta: "-3pt", tone: "warning", icon: "Check" },
];

window.ACTIVITIES = [
  { id: "a1", rep: "Andika Pratama",  tone: "primary",  type: "visit", text: "Kunjungan ke Indomaret Jakarta Pusat, order Rp 12,4jt confirmed", time: "10:32" },
  { id: "a2", rep: "Mawar Indriani",  tone: "emerald",  type: "deal",  text: "Closing kontrak distribusi Hotel Aruna Bali — 6 bulan, Rp 184jt", time: "10:18" },
  { id: "a3", rep: "Kartika Sari",    tone: "violet",   type: "call",  text: "Follow-up call ke 8 outlet Cilandak, 5 konfirmasi reorder", time: "09:54" },
  { id: "a4", rep: "Budi Hartono",    tone: "primary",  type: "visit", text: "Survey outlet baru di Surabaya — 4 toko qualified", time: "09:42" },
  { id: "a5", rep: "Reza Maulana",    tone: "warning",  type: "issue", text: "Outlet Toko Subur menolak reorder — analisis kompetitor needed", time: "09:21" },
  { id: "a6", rep: "Fadli Ramadhan",  tone: "emerald",  type: "deal",  text: "Order taking GT Yogyakarta — total Rp 28,6jt dari 6 outlet", time: "08:58" },
  { id: "a7", rep: "Putri Maharani",  tone: "orange",   type: "demo",  text: "Product demo SKU baru di Hypermart Kelapa Gading", time: "08:42" },
];

window.ACTIVITY_BY_REP = window.SALES_REPS.slice(0, 8).map(r => ({
  name: r.name.split(" ")[0],
  visits: r.visits,
  calls: r.calls,
}));

// ====================== Pipeline ======================
window.PIPELINE_STAGES = [
  { id: "lead",       name: "New Lead",     color: "#94a3b8" },
  { id: "survey",     name: "Survey",       color: "#6366f1" },
  { id: "nego",       name: "Negotiation",  color: "#f59e0b" },
  { id: "contract",   name: "Contract",     color: "#0d9488" },
  { id: "won",        name: "Won",          color: "#10b981" },
];

window.DEALS = [
  { id: "d1", name: "Distribusi Indomaret Reg Jateng",  customer: "Indomaret Pusat",   value: 1_280_000_000, stage: "contract",  rep: "Andika Pratama",  age: 12, prob: 80 },
  { id: "d2", name: "Kontrak Horeca Hotel Group",       customer: "Aruna Group",       value: 920_000_000,  stage: "nego",      rep: "Mawar Indriani",  age: 18, prob: 60 },
  { id: "d3", name: "Listing SKU Baru Hypermart",       customer: "Hypermart Pusat",   value: 680_000_000,  stage: "survey",    rep: "Budi Hartono",    age: 8,  prob: 40 },
  { id: "d4", name: "Reseller Network Sumatra Barat",   customer: "Padang Distribusi", value: 580_000_000,  stage: "contract",  rep: "Lisa Hartati",    age: 22, prob: 85 },
  { id: "d5", name: "Online Store Shopee Premium",      customer: "Shopee Mall",       value: 480_000_000,  stage: "won",       rep: "Kartika Sari",    age: 5,  prob: 100 },
  { id: "d6", name: "MT Lotte Reg Jawa Timur",          customer: "Lotte Indonesia",   value: 1_120_000_000, stage: "nego",     rep: "Agus Pratama",    age: 15, prob: 55 },
  { id: "d7", name: "GT Modern Cluster Bandung",        customer: "Cluster JBR-04",    value: 320_000_000,  stage: "lead",      rep: "Reza Maulana",    age: 3,  prob: 20 },
  { id: "d8", name: "Horeca Resort Bali Selatan",       customer: "Bali Resort Co",    value: 540_000_000,  stage: "survey",    rep: "Tomi Surya",      age: 6,  prob: 35 },
  { id: "d9", name: "Akuisisi Jaringan Mart NTB",       customer: "Lombok Mart",       value: 380_000_000,  stage: "lead",      rep: "Nadia Putri",     age: 2,  prob: 15 },
  { id: "d10", name: "Reorder Annual Alfamart",         customer: "Alfamart HQ",       value: 2_100_000_000, stage: "contract", rep: "Andika Pratama",  age: 28, prob: 90 },
];

// ====================== Approvals ======================
window.APPROVAL_THRESHOLDS = [
  { level: "Auto Approval",  rule: "Discount ≤ 5%, qty < 1000 ctn",  tone: "success" },
  { level: "Sales Supervisor", rule: "Discount 5–10%, qty 1000–5000", tone: "info" },
  { level: "Regional Manager", rule: "Discount 10–15%, qty 5000–10K", tone: "primary" },
  { level: "Sales Director",   rule: "Discount 15–20% atau kontrak tahunan", tone: "warning" },
  { level: "Board of Directors", rule: "Discount > 20% atau deal > Rp 1M", tone: "danger" },
];

window.APPROVALS = [
  {
    id: "Q-2026-0184",
    customer: "Indomaret Pusat Tbk",
    rep: "Andika Pratama",
    requestedAt: "26 Mei, 09:18",
    items: 24,
    total: 1_280_000_000,
    discount: 12.5,
    margin: 18.4,
    sla: "4 jam tersisa",
    urgent: true,
    chain: [
      { name: "Andika P.",   role: "Sales Rep",          status: "done" },
      { name: "Hendra S.",   role: "Sales Supervisor",   status: "done" },
      { name: "Rina A.",     role: "Regional Manager",   status: "done" },
      { name: "Bayu W.",     role: "Sales Director",     status: "current" },
      { name: "Dewa R.",     role: "Board of Directors", status: "pending" },
    ],
  },
  {
    id: "Q-2026-0183",
    customer: "Aruna Hotel Group",
    rep: "Mawar Indriani",
    requestedAt: "26 Mei, 08:42",
    items: 18,
    total: 920_000_000,
    discount: 8.0,
    margin: 24.2,
    sla: "12 jam tersisa",
    urgent: false,
    chain: [
      { name: "Mawar I.",    role: "Sales Rep",          status: "done" },
      { name: "Hendra S.",   role: "Sales Supervisor",   status: "done" },
      { name: "Rina A.",     role: "Regional Manager",   status: "current" },
      { name: "Bayu W.",     role: "Sales Director",     status: "pending" },
    ],
  },
  {
    id: "Q-2026-0182",
    customer: "Lotte Mart Indonesia",
    rep: "Agus Pratama",
    requestedAt: "25 Mei, 16:30",
    items: 32,
    total: 1_120_000_000,
    discount: 14.2,
    margin: 19.8,
    sla: "Overdue 2 jam",
    urgent: true,
    chain: [
      { name: "Agus P.",     role: "Sales Rep",          status: "done" },
      { name: "Hendra S.",   role: "Sales Supervisor",   status: "done" },
      { name: "Rina A.",     role: "Regional Manager",   status: "done" },
      { name: "Bayu W.",     role: "Sales Director",     status: "current" },
    ],
  },
  {
    id: "Q-2026-0181",
    customer: "Hypermart Pusat",
    rep: "Budi Hartono",
    requestedAt: "25 Mei, 14:12",
    items: 14,
    total: 680_000_000,
    discount: 9.5,
    margin: 22.6,
    sla: "1 hari tersisa",
    urgent: false,
    chain: [
      { name: "Budi H.",     role: "Sales Rep",          status: "done" },
      { name: "Hendra S.",   role: "Sales Supervisor",   status: "current" },
      { name: "Rina A.",     role: "Regional Manager",   status: "pending" },
    ],
  },
];

// ====================== Org Hierarchy ======================
window.ORG_CHART = {
  director: { name: "Bayu Wirasena", role: "Sales Director", initials: "BW", tone: "primary" },
  managers: [
    { name: "Rina Anggraini",  role: "RM Jabodetabek",      initials: "RA", tone: "emerald", reports: 22 },
    { name: "Hendra Saputra",  role: "RM Jawa Barat",       initials: "HS", tone: "indigo",  reports: 16 },
    { name: "Sri Wahyuni",     role: "RM Jateng-DIY",       initials: "SW", tone: "violet",  reports: 14 },
    { name: "Agus Pratama",    role: "RM Jatim-Bali",       initials: "AP", tone: "orange",  reports: 15 },
    { name: "Dewi Kartika",    role: "RM Sumatra",          initials: "DK", tone: "pink",    reports: 11 },
    { name: "Yusuf Rahmadi",   role: "RM Indonesia Timur",  initials: "YR", tone: "warning", reports: 6  },
  ],
};

// ====================== Reports ======================
window.REPORTS_LIST = [
  { id: "rp1", title: "Daily Sales Report",      desc: "Omzet harian, target progress, top performer hari ini",     icon: "Calendar", schedule: "Setiap hari · 18:00", recipients: 12 },
  { id: "rp2", title: "Weekly Team Report",      desc: "Performa per rep, kunjungan, conversion rate mingguan",     icon: "Team",     schedule: "Senin · 08:00",       recipients: 8 },
  { id: "rp3", title: "Monthly Director Report", desc: "Eksekutif summary: omzet, achievement, forecast, top deals", icon: "Report",  schedule: "Tanggal 1 · 09:00",   recipients: 5 },
  { id: "rp4", title: "Quarterly Board Report",  desc: "Komprehensif BoD: P&L sales, forecast, strategic insights", icon: "FileText", schedule: "Quarterly",          recipients: 3 },
  { id: "rp5", title: "Region Performance",      desc: "Detail per region: target, gap, top outlets, action items", icon: "MapPin",   schedule: "On demand",          recipients: 16 },
  { id: "rp6", title: "Product Mix Analysis",    desc: "SKU performance, margin, channel mix, cross-sell",          icon: "Package",  schedule: "Bi-weekly",          recipients: 6 },
];

window.RECENT_REPORTS = [
  { name: "Daily Sales Report · 25 Mei 2026", size: "2,4 MB", format: "PDF", generatedAt: "25 Mei, 18:01" },
  { name: "Weekly Team Report · W21 2026",    size: "1,8 MB", format: "XLSX", generatedAt: "20 Mei, 08:00" },
  { name: "Region Jabodetabek · Mei 2026",    size: "4,2 MB", format: "PDF", generatedAt: "24 Mei, 14:32" },
  { name: "Forecast Q3 Snapshot",             size: "3,1 MB", format: "PDF", generatedAt: "22 Mei, 16:18" },
  { name: "Top 100 Outlets · Mei",            size: "892 KB", format: "CSV", generatedAt: "23 Mei, 10:04" },
];

// ====================== Alerts ======================
window.ALERTS = [
  { tone: "danger",  icon: "Approval",  title: "3 approval overdue",        text: "Quote Q-2026-0182 lewat SLA 2 jam — risiko cancel order" },
  { tone: "warning", icon: "Target",    title: "Region Sumatra under target", text: "Achievement 82%, gap Rp 240jt, 4 hari tersisa bulan ini" },
  { tone: "warning", icon: "Activity",  title: "Visit compliance Jatim turun", text: "77,5% vs target 85% — 3 rep di bawah threshold" },
  { tone: "primary", icon: "Star",      title: "Andika Pratama hit 111% target", text: "Streak ke-5 bulan berturut-turut" },
];
