/* mock-data.jsx — all mock data for the dashboard.
   Currency: BRL for PT clients, USD for EN clients.
   Numbers are realistic for a ~R$ 1M/quarter DTC brand on Brazilian market. */

/* Helper formatters that respect locale + currency. */
const NF = {
  brl: (v, opts = {}) => {
    if (opts.compact) {
      if (Math.abs(v) >= 1_000_000) return "R$ " + (v/1_000_000).toFixed(2).replace(".", ",") + "M";
      if (Math.abs(v) >= 1000) return "R$ " + Math.round(v/1000) + "k";
      return "R$ " + v.toFixed(0);
    }
    return "R$ " + v.toLocaleString("pt-BR", { minimumFractionDigits: opts.dec || 0, maximumFractionDigits: opts.dec || 0 });
  },
  usd: (v, opts = {}) => {
    if (opts.compact) {
      if (Math.abs(v) >= 1_000_000) return "$" + (v/1_000_000).toFixed(2) + "M";
      if (Math.abs(v) >= 1000) return "$" + Math.round(v/1000) + "k";
      return "$" + v.toFixed(0);
    }
    return "$" + v.toLocaleString("en-US", { minimumFractionDigits: opts.dec || 0, maximumFractionDigits: opts.dec || 0 });
  },
  num: (v, opts = {}) => {
    const lang = (window.__mkLang || "pt") === "pt" ? "pt-BR" : "en-US";
    if (opts.compact) {
      if (Math.abs(v) >= 1_000_000) return (v/1_000_000).toFixed(2).replace(".", lang === "pt-BR" ? "," : ".") + "M";
      if (Math.abs(v) >= 1000) return Math.round(v/1000) + "k";
    }
    return v.toLocaleString(lang, { minimumFractionDigits: opts.dec || 0, maximumFractionDigits: opts.dec || 0 });
  },
  pct: (v, opts = {}) => {
    const lang = (window.__mkLang || "pt") === "pt" ? "pt-BR" : "en-US";
    const s = v.toLocaleString(lang, { minimumFractionDigits: opts.dec ?? 1, maximumFractionDigits: opts.dec ?? 1 });
    return s + "%";
  }
};
function money(v, opts = {}) {
  const lang = (window.__mkLang || "pt");
  return lang === "pt" ? NF.brl(v, opts) : NF.usd(v, opts);
}

/* ===== Client profile =====
   `market_code` drives the dashboard language:
     - "br"   → Portuguese (pt-BR)
     - "intl" → English (en)
   Clients cannot change the language; only an admin editing the Configurações
   page can flip the market.

   `platforms` controls which sidebar tabs are visible. Each entry is
   { enabled: boolean, account_id: string }. A platform must be both enabled
   AND have an account_id to appear in the client's sidebar.

   `users` holds the credentials checked at login. Admin login unlocks the
   Configurações tab; client login does not. */
const CLIENT_PROFILE = {
  ecom: {
    name: "Nuvem & Co.",
    slug: "nuvem-co",
    handle: "nuvem.eco",
    logo_url: null,
    category: "DTC · Casa & Decoração · BRL",
    market_code: "br",
    market: { pt: "Brasil", en: "Brazil" },
    currency: "BRL",
    type: "ecom",
    accents: ["#7600FF", "#00E7FF"],
    platforms: {
      meta:      { enabled: true,  account_id: "act_8842901173" },
      google:    { enabled: true,  account_id: "GADS-481-739-2210" },
      analytics: { enabled: true,  account_id: "GA4-339102841" },
      shopify:   { enabled: true,  account_id: "nuvemco.myshopify.com" },
      tiktok:    { enabled: true,  account_id: "TT-7148290113" }
    },
    users: {
      client: { username: "renata@nuvemco.com.br", password: "makali2026" },
      admin:  { username: "admin@makali.media",    password: "makali-admin" }
    }
  },
  lead: {
    name: "Atlas Capital",
    slug: "atlas-capital",
    handle: "atlascap",
    logo_url: null,
    category: "B2B · Gestão Patrimonial · BRL",
    market_code: "br",
    market: { pt: "São Paulo", en: "São Paulo" },
    currency: "BRL",
    type: "lead",
    accents: ["#2E79FF", "#7600FF"],
    platforms: {
      meta:      { enabled: true,  account_id: "act_5510338042" },
      google:    { enabled: true,  account_id: "GADS-998-217-3645" },
      analytics: { enabled: true,  account_id: "GA4-771209884" },
      shopify:   { enabled: false, account_id: "" },
      tiktok:    { enabled: false, account_id: "" }
    },
    users: {
      client: { username: "joao@atlascap.com.br",  password: "atlas2026" },
      admin:  { username: "admin@makali.media",    password: "makali-admin" }
    }
  }
};

/* ===== Series data for daily charts (30 days) ===== */
const DAYS_30 = [
  "01/Mai","02","03","04","05","06","07","08","09","10",
  "11","12","13","14","15","16","17","18","19","20",
  "21","22","23","24","25","26","27","28","29","30/Mai"
];
const DAYS_30_EN = [
  "May 1","2","3","4","5","6","7","8","9","10",
  "11","12","13","14","15","16","17","18","19","20",
  "21","22","23","24","25","26","27","28","29","May 30"
];

const SERIES = {
  revenue: [33,28,41,49,46,52,61,58,64,71,68,76,82,79,88,94,101,108,104,116,122,118,131,138,134,142,151,148,159,168].map(v => v*1000),
  prev:    [28,26,31,34,32,39,43,44,50,52,54,58,60,61,65,68,72,73,74,78,82,85,88,90,92,95,98,100,103,106].map(v => v*1000),
  spend_meta:  [4.2,3.9,4.6,5.1,4.8,5.3,5.8,5.6,5.9,6.2,6.0,6.4,6.7,6.5,6.9,7.2,7.4,7.6,7.5,7.9,8.1,7.9,8.3,8.5,8.4,8.7,9.0,8.8,9.2,9.5].map(v => v*1000),
  spend_google:[1.9,1.8,2.1,2.3,2.2,2.5,2.7,2.6,2.8,3.0,2.9,3.1,3.3,3.2,3.4,3.6,3.7,3.8,3.7,4.0,4.1,4.0,4.3,4.4,4.3,4.6,4.7,4.6,4.8,5.0].map(v => v*1000),
  sessions:    [1820,1690,2010,2150,2080,2310,2480,2390,2510,2680,2620,2740,2870,2810,2980,3110,3210,3290,3240,3380,3450,3420,3540,3620,3580,3690,3770,3720,3850,3920],
  conversions: [42,38,45,49,47,53,58,55,59,63,61,65,70,68,73,77,82,84,82,87,89,87,92,94,93,98,101,99,104,108],
};

/* ===== Sparklines (10-pt mini lines) ===== */
const SPARKS = {
  up:   [1.8, 2.1, 2.4, 2.9, 3.1, 3.4, 3.6, 4.0, 4.2, 4.7],
  upRevenue:  [800, 850, 870, 920, 960, 1010, 1080, 1140, 1210, 1280],
  upOrders:   [580, 610, 640, 670, 700, 740, 760, 790, 810, 841],
  upMix:      [580, 660, 620, 700, 760, 740, 820, 880, 920, 1010],
  downCac:    [58, 56, 53, 51, 49, 47, 44, 42, 40, 38],
  upRoas:     [3.2, 3.4, 3.7, 4.1, 4.4, 4.6, 5.2, 5.8, 6.4, 9.2],
  flat:       [4.1, 4.3, 4.2, 4.4, 4.3, 4.5, 4.4, 4.6, 4.5, 4.7],
  decline:    [4.4, 4.3, 4.0, 3.8, 3.4, 3.1, 2.8, 2.5, 2.3, 2.1],
  noisyUp:    [3.1, 3.4, 3.2, 3.6, 3.5, 3.9, 4.2, 4.0, 4.5, 4.7],
  rate:       [10.8, 11.2, 11.0, 11.4, 11.1, 11.5, 11.3, 11.4, 11.6, 11.4],
};

/* ===== Overview narrative ===== */
const NARRATIVES = {
  ecom_pt: {
    headline_parts: [
      { t: "Semana sólida. ", style: "white" },
      { t: "Retargeting ", style: "accent" },
      { t: "carregou o time.", style: "white" }
    ],
    body: [
      { t: "Nuvem & Co. investiu " }, { t: "R$ 168k", b: true }, { t: " em mídia paga e devolveu " },
      { t: "R$ 528k", b: true }, { t: " em receita Shopify — " }, { t: "MER 3,14×", b: true },
      { t: ", " }, { t: "+0,23×", pos: true }, { t: " contra o mês anterior. O set de carrinho-abandonado bateu " },
      { t: "9,2×", pos: true }, { t: " e é o que mais pede mais verba. " },
      { t: "Lançamento Linho Pluma", b: true }, { t: " está fadigando — criativos novos até sexta ou pausa." }
    ],
    mer: "3,14",
    mer_delta: "+6,6%",
    aov_value: "R$ 1.840",
    aov_sku: "Linho Pluma · 3-Peças",
    aov_subtext: "47 unidades vendidas esta semana"
  },
  ecom_en: {
    headline_parts: [
      { t: "Solid week. ", style: "white" },
      { t: "Retargeting ", style: "accent" },
      { t: "carried the team.", style: "white" }
    ],
    body: [
      { t: "Nuvem & Co. spent " }, { t: "$32k", b: true }, { t: " on paid media and pulled " },
      { t: "$101k", b: true }, { t: " on Shopify — a clean " }, { t: "3.14× MER", b: true },
      { t: ", up " }, { t: "0.23×", pos: true }, { t: " from last month. The cart-abandon set hit " },
      { t: "9.2×", pos: true }, { t: " and is the only thing that needs more budget. " },
      { t: "Linho Pluma launch", b: true }, { t: " is fatiguing — fresh creative wanted by Friday or it gets paused." }
    ],
    mer: "3.14",
    mer_delta: "+6.6%",
    aov_value: "$352",
    aov_sku: "Linho Pluma · 3-Piece",
    aov_subtext: "47 units sold this week"
  },
  lead_pt: {
    headline_parts: [
      { t: "Funil saudável. ", style: "white" },
      { t: "CPL caiu 31% ", style: "accent" },
      { t: "esta semana.", style: "white" }
    ],
    body: [
      { t: "Atlas Capital investiu " }, { t: "R$ 84k", b: true }, { t: " entre Meta e Google e captou " },
      { t: "612 leads", b: true }, { t: ", " }, { t: "+18%", pos: true }, { t: " contra o mês anterior. " },
      { t: "CPL caiu de R$ 198 para R$ 137", b: true }, { t: " — o vídeo \"3 erros de planejamento\" está fazendo o trabalho. " },
      { t: "Apenas 38% qualificam", neg: true }, { t: "; vale revisar o roteiro do SDR antes de escalar." }
    ],
    mer: "612",
    mer_delta: "+18%",
    aov_value: "R$ 137",
    aov_sku: "CPL · médio",
    aov_subtext: "612 leads · 38% qualificação"
  },
  lead_en: {
    headline_parts: [
      { t: "Healthy funnel. ", style: "white" },
      { t: "CPL down 31% ", style: "accent" },
      { t: "this week.", style: "white" }
    ],
    body: [
      { t: "Atlas Capital spent " }, { t: "$16k", b: true }, { t: " across Meta and Google and captured " },
      { t: "612 leads", b: true }, { t: ", " }, { t: "+18%", pos: true }, { t: " vs prior month. " },
      { t: "CPL dropped from $38 to $26", b: true }, { t: " — the \"3 planning mistakes\" video is doing the work. " },
      { t: "Only 38% qualify", neg: true }, { t: "; worth a script review with the SDR team before we scale spend." }
    ],
    mer: "612",
    mer_delta: "+18%",
    aov_value: "$26",
    aov_sku: "CPL · blended",
    aov_subtext: "612 leads · 38% qualified"
  }
};

/* ===== Overview highlight cards ===== */
const HIGHLIGHTS_ECOM = [
  {
    kind: "win", num: "01",
    title_pt: "Carrinho-abandonado bateu 9,2×. Aumente +30% na verba.",
    title_en: "Cart-abandon retargeting hit 9.2×. Bump budget another 30%.",
    body_pt: "O criativo hero \"Linho-Pluma\" sozinho devolveu R$ 24.210 com R$ 2.420 de spend. É a linha mais limpa da conta inteira.",
    body_en: "The \"Linho-Pluma\" hero ad alone returned R$ 24,210 off R$ 2,420 spend. That's the cleanest line in the whole account.",
    stat1_l_pt: "ROAS do set", stat1_l_en: "Set ROAS",
    stat1_v: "9,19×", stat1_v_en: "9.19×",
    stat2_l_pt: "Δ vs. 30d ant.", stat2_l_en: "Δ on prior 30d",
    stat2_v: "+14,2%", stat2_v_en: "+14.2%",
    spark: [3.2, 4.0, 4.4, 5.1, 5.8, 6.4, 7.1, 8.0, 8.6, 9.2],
    source_pt: "Meta · Conjunto IGA-ATC · set 11",
    source_en: "Meta · IGA-ATC ad set · set 11",
    when_pt: "há 2h", when_en: "2h ago"
  },
  {
    kind: "alert", num: "02",
    title_pt: "Linho Pluma fatigando. Frequência subiu pra 4,1.",
    title_en: "Linho Pluma launch fatigued. Frequency up to 4.1 on the top set.",
    body_pt: "ROAS caiu de 4,4× → 3,6× → 2,1× em três semanas. iROAS está em 1,74× — margem fina. Renovar os 3 anúncios ou pausar até sexta.",
    body_en: "ROAS slid from 4.4× → 3.6× → 2.1× across three weeks. iROAS now 1.74× — thin margins. Refresh the 3-ad rotation or pause by Friday.",
    stat1_l_pt: "ROAS atual", stat1_l_en: "Current ROAS",
    stat1_v: "2,10×", stat1_v_en: "2.10×",
    stat2_l_pt: "Frequência", stat2_l_en: "Frequency",
    stat2_v: "4,1", stat2_v_en: "4.1",
    spark: [4.4, 4.1, 3.8, 3.4, 3.6, 3.1, 2.8, 2.4, 2.2, 2.1],
    source_pt: "Meta · Reach campaign 03",
    source_en: "Meta · Reach campaign 03",
    when_pt: "ontem", when_en: "yesterday"
  },
  {
    kind: "watch", num: "03",
    title_pt: "Teste São Paulo Capital — promissor a 3,89×.",
    title_en: "São Paulo prospecting test — promising at 3.89×.",
    body_pt: "R$ 3.210 investidos até aqui, 6 vendas. Esperar mais uma semana antes de escalar. Tx. recompra geral caiu 0,6pt — anotado.",
    body_en: "R$ 3,210 spent so far, 6 purchases. Hold another week before deciding to scale. Repeat rate slipped 0.6pt across the account — noted.",
    stat1_l_pt: "ROAS de teste", stat1_l_en: "Test ROAS",
    stat1_v: "3,89×", stat1_v_en: "3.89×",
    stat2_l_pt: "Investido", stat2_l_en: "Spend so far",
    stat2_v: "R$ 3,2k", stat2_v_en: "$640",
    spark: [2.4, 2.8, 3.1, 2.9, 3.4, 3.2, 3.6, 3.8, 3.7, 3.89],
    source_pt: "Meta · Test campaign 06",
    source_en: "Meta · Test campaign 06",
    when_pt: "hoje", when_en: "today"
  }
];
const HIGHLIGHTS_LEAD = [
  {
    kind: "win", num: "01",
    title_pt: "Vídeo \"3 erros\" puxando o CPL pra baixo.",
    title_en: "\"3 mistakes\" video pulling CPL down hard.",
    body_pt: "612 leads na semana, CPL médio R$ 137 — antes era R$ 198. Esse criativo sozinho responde por 41% dos leads.",
    body_en: "612 leads this week, blended CPL $26 — was $38. This single creative drives 41% of leads.",
    stat1_l_pt: "CPL semana", stat1_l_en: "Weekly CPL",
    stat1_v: "R$ 137", stat1_v_en: "$26",
    stat2_l_pt: "Δ vs ant.", stat2_l_en: "Δ vs prior",
    stat2_v: "−31%", stat2_v_en: "−31%",
    spark: [198, 188, 172, 165, 159, 152, 148, 142, 140, 137],
    source_pt: "Meta · Lead Gen 01",
    source_en: "Meta · Lead Gen 01",
    when_pt: "há 6h", when_en: "6h ago"
  },
  {
    kind: "alert", num: "02",
    title_pt: "Qualificação despencou — só 38% dos leads são SQL.",
    title_en: "Qualification rate dropped — only 38% of leads are SQL.",
    body_pt: "Volume bom, mas o SDR está rejeitando 6 em 10. Provavelmente o roteiro do vídeo está atraindo público fora do ICP.",
    body_en: "Volume looks great but the SDR team is rejecting 6 in 10. Likely the video script is pulling outside the ICP.",
    stat1_l_pt: "Tx. qualif.", stat1_l_en: "Qual. rate",
    stat1_v: "38%", stat1_v_en: "38%",
    stat2_l_pt: "Δ 30d", stat2_l_en: "Δ 30d",
    stat2_v: "−9pt", stat2_v_en: "−9pt",
    spark: [49, 48, 46, 44, 43, 41, 40, 39, 38, 38],
    source_pt: "Pipeline · LM-Funnel-Q2",
    source_en: "Pipeline · LM-Funnel-Q2",
    when_pt: "ontem", when_en: "yesterday"
  },
  {
    kind: "watch", num: "03",
    title_pt: "Google Search ressuscitou — keywords de marca subiram 22%.",
    title_en: "Google Search came back to life — branded queries up 22%.",
    body_pt: "Após o lançamento da campanha de awareness, marca está sendo buscada mais. CPL Search caiu para R$ 64 — testar +50% de orçamento.",
    body_en: "After the awareness push, brand is being searched more. Search CPL fell to $12 — worth a +50% budget test next week.",
    stat1_l_pt: "CPL Search", stat1_l_en: "Search CPL",
    stat1_v: "R$ 64", stat1_v_en: "$12",
    stat2_l_pt: "Volume", stat2_l_en: "Volume",
    stat2_v: "+22%", stat2_v_en: "+22%",
    spark: [78, 76, 74, 70, 68, 66, 65, 64, 63, 64],
    source_pt: "Google · Search · Branded",
    source_en: "Google · Search · Branded",
    when_pt: "hoje", when_en: "today"
  }
];

/* ===== Meta campaigns ===== */
/* Campaigns start with their human display names. Tags are MANAGED IN-DASHBOARD,
   not parsed from the name. New campaigns arrive with `tags: []` so the agency
   marks them up by hand. The defaults below represent ones the agency already
   tagged. `untagged: true` flags campaigns the agency hasn't classified yet. */
const META_CAMPAIGNS_ECOM = [
  { name_pt: "BR-SE · Linho — campanha 481", name_en: "BR-SE · Linho — campaign 481", status: "active",   spend: 28400, revenue: 102100, roas: 3.59, cpa: 64.20, ctr: 1.84, delta: "+18%", dDir: "up", sub: "Advantage+ Shopping",  tags: ["prospecting"] },
  { name_pt: "Cart abandono · 7 dias",        name_en: "Cart abandon · 7 days",         status: "active",   spend: 7400,  revenue: 68110, roas: 9.20, cpa: 28.10, ctr: 3.61, delta: "+24%", dDir: "up", sub: "ABO · 3 anúncios",   tags: ["retargeting"] },
  { name_pt: "Linho Pluma · Lançamento",      name_en: "Linho Pluma · Launch",          status: "learning", spend: 14200, revenue: 29850, roas: 2.10, cpa: 88.40, ctr: 1.42, delta: "−18%", dDir: "down", sub: "Frequência 4,1 — fatigada", tags: ["reach"] },
  { name_pt: "BR-CO · LAL 2% · campanha 224", name_en: "BR-CO · LAL 2% · campaign 224", status: "active",   spend: 9100,  revenue: 31800, roas: 3.49, cpa: 71.60, ctr: 1.66, delta: "+6%",  dDir: "up", sub: "Adv. detail-targeting", tags: ["prospecting"] },
  { name_pt: "Geo-test · SP capital",         name_en: "Geo-test · São Paulo metro",    status: "learning", spend: 3210,  revenue: 12490, roas: 3.89, cpa: 82.30, ctr: 1.88, delta: "—",     dDir: "neutral", sub: "Em curva", tags: [] },
  { name_pt: "Catálogo automático",           name_en: "Auto catalog feed",             status: "active",   spend: 6800,  revenue: 26420, roas: 3.88, cpa: 41.20, ctr: 2.21, delta: "+3%",   dDir: "up", sub: "Carrossel automático",  tags: ["dpa"] },
  { name_pt: "Clientes 60d",                  name_en: "Customers 60d",                 status: "paused",   spend: 0,     revenue: 0,     roas: 0,    cpa: 0,     ctr: 0,    delta: "—",     dDir: "neutral", sub: "Pausada · 12 mai", tags: ["remarketing"] },
];
const META_CAMPAIGNS_LEAD = [
  { name_pt: "3 erros · vídeo · campanha 71", name_en: "3 mistakes · video · 71",    status: "active",  spend: 19800, revenue: 0, roas: 0, cpa: 137.40, leads: 144, ctr: 2.31, delta: "−31%", dDir: "up", sub: "CPL caindo", tags: ["lead-gen"] },
  { name_pt: "Calculadora de aposentadoria",  name_en: "Retirement calculator",      status: "active",  spend: 14200, revenue: 0, roas: 0, cpa: 168.20, leads: 84, ctr: 1.92, delta: "−12%", dDir: "up", sub: "Form com 5 campos", tags: ["lead-gen"] },
  { name_pt: "Awareness · Reels top-funnel",  name_en: "Awareness · Reels top-funnel", status: "active",spend: 8400,  revenue: 0, roas: 0, cpa: 0,      leads: 0,  ctr: 0.82, delta: "—",    dDir: "neutral", sub: "View-through ramping", tags: ["reach"] },
  { name_pt: "Engajou 30d · form curto",      name_en: "Engaged 30d · short form",   status: "active",  spend: 6100,  revenue: 0, roas: 0, cpa: 96.20,  leads: 63, ctr: 4.10, delta: "+8%",  dDir: "up", sub: "Form-fill · 2 campos", tags: ["retargeting"] },
  { name_pt: "Founders 30M+ · teste",         name_en: "Founders 30M+ · test",       status: "learning",spend: 3700,  revenue: 0, roas: 0, cpa: 214.30, leads: 17, ctr: 1.34, delta: "—",    dDir: "neutral", sub: "Janela de aprendizado", tags: [] },
];

/* Recommended Meta campaign tags — what the user can quick-add */
const META_CAMPAIGN_TAG_OPTIONS = [
  { id: "prospecting", key: "tag.t.prospecting", color: "#7600FF" },
  { id: "retargeting", key: "tag.t.retargeting", color: "#00E7FF" },
  { id: "reach",       key: "tag.t.reach",       color: "#FF7F00" },
  { id: "remarketing", key: "tag.t.remarketing", color: "#CE3EBA" },
  { id: "brand",       key: "tag.t.brand",       color: "#2E79FF" },
  { id: "dpa",         key: "tag.t.dpa",         color: "#EF1166" },
  { id: "lead-gen",    key: "tag.t.lead-gen",    color: "#4E34FE" }
];

/* ===== Meta creatives — used in creative gallery =====
   Each creative has a `tags` array. New creatives arrive untagged (tags: [])
   and the agency assigns concept tags inside the dashboard. */
const META_CREATIVES = [
  {
    id: "AD-481-LP-9x16-v3",
    type: "video", duration: "0:18",
    headline_pt: "Sofá-cama Linho Pluma — caixa entrega.",
    headline_en: "Linho Pluma sofa-bed — box delivery.",
    tags: ["product-demo"],
    platform: "Meta · Reels",
    bg: "linear-gradient(140deg, #1d0044 0%, #4E34FE 45%, #7600FF 100%)",
    visual: "linen-sofa",
    rank: 1,
    roas: { pt: "9,2×", en: "9.2×" }, roas_dir: "up",
    spend: { pt: "R$ 12,4k", en: "$2.4k" },
    delta: "+42%", delta_dir: "up",
    ctr: "3,8%", ctr_en: "3.8%",
    purchases: 134
  },
  {
    id: "AD-481-LP-1x1-v7",
    type: "image",
    headline_pt: "Promo — 25% off Linho Pluma.",
    headline_en: "25% off Linho Pluma sale.",
    tags: ["promo"],
    platform: "Meta · Feed",
    bg: "linear-gradient(135deg, #EF1166 0%, #CE3EBA 60%, #7600FF 100%)",
    visual: "promo-sale",
    rank: 2,
    roas: { pt: "6,1×", en: "6.1×" }, roas_dir: "up",
    spend: { pt: "R$ 8,9k", en: "$1.7k" },
    delta: "+28%", delta_dir: "up",
    ctr: "2,9%", ctr_en: "2.9%",
    purchases: 81
  },
  {
    id: "AD-481-LP-9x16-v1",
    type: "video", duration: "0:24",
    headline_pt: "Antes e depois — quarto da Maria.",
    headline_en: "Before & after — Maria's living room.",
    tags: ["before-after", "ugc"],
    platform: "Meta · Stories",
    bg: "linear-gradient(135deg, #FF7F00 0%, #EF1166 100%)",
    visual: "before-after",
    rank: 3,
    roas: { pt: "5,7×", en: "5.7×" }, roas_dir: "up",
    spend: { pt: "R$ 6,1k", en: "$1.2k" },
    delta: "+15%", delta_dir: "up",
    ctr: "3,1%", ctr_en: "3.1%",
    purchases: 58
  },
  {
    id: "AD-481-CAR-1x1-v2",
    type: "image",
    headline_pt: "Carrossel — 6 tons que combinam.",
    headline_en: "Carousel — 6 colors that match.",
    tags: ["carousel-dpa"],
    platform: "Meta · Feed",
    bg: "linear-gradient(135deg, #00E7FF 0%, #2E79FF 60%, #4E34FE 100%)",
    visual: "carousel",
    rank: 4,
    roas: { pt: "4,2×", en: "4.2×" }, roas_dir: "down",
    spend: { pt: "R$ 4,8k", en: "$960" },
    delta: "−8%", delta_dir: "down",
    ctr: "2,4%", ctr_en: "2.4%",
    purchases: 42
  },
  {
    id: "AD-481-TS-9x16-v2",
    type: "video", duration: "0:14",
    headline_pt: "Depoimento — Camila, decoradora.",
    headline_en: "Testimonial — Camila, interior designer.",
    tags: [],
    platform: "Meta · Reels",
    bg: "linear-gradient(160deg, #220033 0%, #7600FF 50%, #CE3EBA 100%)",
    visual: "testimonial",
    rank: 5,
    roas: { pt: "3,9×", en: "3.9×" }, roas_dir: "up",
    spend: { pt: "R$ 3,2k", en: "$640" },
    delta: "+9%", delta_dir: "up",
    ctr: "2,1%", ctr_en: "2.1%",
    purchases: 28
  },
  {
    id: "AD-481-DM-1x1-v4",
    type: "image",
    headline_pt: "Estampa nova — colab Manga Branca.",
    headline_en: "New pattern drop — Manga Branca collab.",
    tags: ["launch"],
    platform: "Meta · Feed",
    bg: "linear-gradient(135deg, #FF7F00 0%, #FFA64D 70%, #FF7F00 100%)",
    visual: "pattern-drop",
    rank: 6,
    roas: { pt: "3,4×", en: "3.4×" }, roas_dir: "up",
    spend: { pt: "R$ 2,6k", en: "$520" },
    delta: "+4%", delta_dir: "up",
    ctr: "1,9%", ctr_en: "1.9%",
    purchases: 19
  },
  {
    id: "AD-481-VG-9x16-v1",
    type: "video", duration: "0:30",
    headline_pt: "Tour — 12 ambientes diferentes.",
    headline_en: "Tour — 12 different room setups.",
    tags: [],
    platform: "Meta · Reels",
    bg: "linear-gradient(135deg, #2E79FF 0%, #4E34FE 60%, #220033 100%)",
    visual: "room-tour",
    rank: 7,
    roas: { pt: "2,9×", en: "2.9×" }, roas_dir: "down",
    spend: { pt: "R$ 2,1k", en: "$420" },
    delta: "−12%", delta_dir: "down",
    ctr: "1,4%", ctr_en: "1.4%",
    purchases: 14
  },
  {
    id: "AD-481-ST-1x1-v9",
    type: "image",
    headline_pt: "Frete grátis acima de R$ 999.",
    headline_en: "Free shipping over R$ 999.",
    tags: ["promo"],
    platform: "Meta · Feed",
    bg: "linear-gradient(135deg, #00E7FF 0%, #7DD4F0 70%, #fff 100%)",
    visual: "free-ship",
    rank: 8,
    roas: { pt: "2,4×", en: "2.4×" }, roas_dir: "down",
    spend: { pt: "R$ 1,8k", en: "$360" },
    delta: "−5%", delta_dir: "down",
    ctr: "2,0%", ctr_en: "2.0%",
    purchases: 11
  }
];

/* Recommended creative concept tags. The agency starts with these as quick-add
   suggestions and can also enter custom strings. */
const META_CONCEPT_TAG_OPTIONS = [
  { id: "product-demo", key: "tag.c.product-demo" },
  { id: "before-after", key: "tag.c.before-after" },
  { id: "testimonial",  key: "tag.c.testimonial"  },
  { id: "promo",        key: "tag.c.promo"        },
  { id: "carousel-dpa", key: "tag.c.carousel-dpa" },
  { id: "inspiration",  key: "tag.c.inspiration"  },
  { id: "launch",       key: "tag.c.launch"       },
  { id: "ugc",          key: "tag.c.ugc"          }
];

/* ===== Google Ads =====
   The `tags` field is the manual classification (Search/Shopping/PMax/...).
   New campaigns arrive untagged. `name_*` keeps the raw display name from
   Google — we no longer parse it for type. */
const GOOGLE_CAMPAIGNS_ECOM = [
  { name_pt: "Brand defense · Maio",          name_en: "Brand defense · May",         status: "active",   spend: 4200,  revenue: 39800, roas: 9.48, cpc: 0.84, ctr: 8.41, conv: 198, delta: "+12%", dDir: "up",      sub: "94 keywords · IS 92%",      tags: ["search", "brand"] },
  { name_pt: "Catálogo automático · Q2",      name_en: "Auto catalog · Q2",           status: "active",   spend: 12800, revenue: 41600, roas: 3.25, cpc: 0.92, ctr: 1.18, conv: 240, delta: "+4%",  dDir: "up",      sub: "412 produtos",              tags: ["pmax"] },
  { name_pt: "Non-brand · Maio",              name_en: "Non-brand · May",             status: "active",   spend: 7100,  revenue: 18400, roas: 2.59, cpc: 2.31, ctr: 3.84, conv: 88,  delta: "−6%",  dDir: "down",    sub: "61 keywords · IS 48%",      tags: ["search"] },
  { name_pt: "Remarketing · 30d",             name_en: "Remarketing · 30d",           status: "active",   spend: 1900,  revenue: 9620,  roas: 5.06, cpc: 0.21, ctr: 0.42, conv: 41,  delta: "+18%", dDir: "up",      sub: "Audiência 30d",             tags: ["display", "remarketing"] },
  { name_pt: "Vídeo · Awareness BR",          name_en: "Video · Awareness BR",        status: "active",   spend: 3800,  revenue: 3200,  roas: 0.84, cpc: 0.04, ctr: 0.62, conv: 16,  delta: "—",    dDir: "neutral", sub: "View-through ramping",      tags: ["youtube"] },
  { name_pt: "Discovery · DG",                name_en: "Discovery · DG",              status: "learning", spend: 1200,  revenue: 2840,  roas: 2.37, cpc: 0.38, ctr: 0.94, conv: 24,  delta: "—",    dDir: "neutral", sub: "Janela de aprendizado",     tags: [] }
];

/* Lead-gen Google campaigns — same shape but with leads/CPL instead of revenue/ROAS */
const GOOGLE_CAMPAIGNS_LEAD = [
  { name_pt: "Brand · Atlas",                 name_en: "Brand · Atlas",               status: "active",   spend: 2800, leads: 84, cpl: 33.30, convRate: 14.2, cpc: 1.84, ctr: 7.21, delta: "+8%",  dDir: "up",      sub: "Branded keywords",          tags: ["search", "brand"] },
  { name_pt: "Calculadora · Não-marca",       name_en: "Calculator · Non-brand",      status: "active",   spend: 9200, leads: 142, cpl: 64.80, convRate: 6.4,  cpc: 4.10, ctr: 4.92, delta: "−18%", dDir: "up",      sub: "12 keywords · IS 38%",      tags: ["search", "lead-gen"] },
  { name_pt: "YouTube · Awareness BR",        name_en: "YouTube · Awareness BR",      status: "active",   spend: 4200, leads: 28,  cpl: 150.00,convRate: 1.2,  cpc: 0.18, ctr: 0.84, delta: "—",    dDir: "neutral", sub: "View-through em curva",     tags: ["youtube"] },
  { name_pt: "Discovery · Top of funnel",     name_en: "Discovery · Top of funnel",   status: "learning", spend: 1900, leads: 22,  cpl: 86.40, convRate: 2.1,  cpc: 0.42, ctr: 1.08, delta: "—",    dDir: "neutral", sub: "Janela de aprendizado",     tags: ["demand-gen"] },
  { name_pt: "Remarketing · 30d engajado",    name_en: "Remarketing · 30d engaged",   status: "active",   spend: 1400, leads: 19,  cpl: 73.70, convRate: 8.4,  cpc: 0.31, ctr: 1.24, delta: "+10%", dDir: "up",      sub: "Audiência form-abandono",   tags: ["display", "remarketing"] }
];

/* Recommended Google campaign-type tags */
const GOOGLE_CAMPAIGN_TAG_OPTIONS = [
  { id: "search",     key: "tag.g.search",     color: "#00E7FF" },
  { id: "shopping",   key: "tag.g.shopping",   color: "#2E79FF" },
  { id: "pmax",       key: "tag.g.pmax",       color: "#7600FF" },
  { id: "display",    key: "tag.g.display",    color: "#CE3EBA" },
  { id: "youtube",    key: "tag.g.youtube",    color: "#EF1166" },
  { id: "demand-gen", key: "tag.g.demand-gen", color: "#FF7F00" },
  { id: "brand",      key: "tag.t.brand",      color: "#4E34FE" },
  { id: "remarketing",key: "tag.t.remarketing",color: "#CE3EBA" },
  { id: "lead-gen",   key: "tag.t.lead-gen",   color: "#4E34FE" }
];

const GOOGLE_SEARCH_TERMS = [
  { term: "nuvem co sofa cama",     impr: 8400, clicks: 410, ctr: 4.88, cpc: 0.62, conv: 38, roas: 14.2, status: "Marca" },
  { term: "sofa cama linho",        impr: 14200, clicks: 280, ctr: 1.97, cpc: 2.41, conv: 18, roas: 4.1,  status: "Não-marca" },
  { term: "sofa decoracao moderno", impr: 22800, clicks: 198, ctr: 0.87, cpc: 1.84, conv: 8,  roas: 2.2,  status: "Não-marca" },
  { term: "sofa retratil 3 lugares", impr: 9200, clicks: 142, ctr: 1.54, cpc: 2.12, conv: 11, roas: 3.4,  status: "Não-marca" },
  { term: "nuvemco frete gratis",   impr: 3100, clicks: 124, ctr: 4.00, cpc: 0.51, conv: 14, roas: 12.8, status: "Marca" },
  { term: "decoracao quarto cinza", impr: 18400, clicks: 91, ctr: 0.49,  cpc: 1.92, conv: 3,  roas: 0.9,  status: "Negativo?" },
  { term: "tapete sala redondo",    impr: 11200, clicks: 84, ctr: 0.75,  cpc: 2.18, conv: 4,  roas: 1.4,  status: "Não-marca" },
  { term: "manta linho promocao",   impr: 4800, clicks: 71, ctr: 1.48,   cpc: 1.62, conv: 9,  roas: 4.8,  status: "Não-marca" }
];

/* ===== GA traffic sources, geo, devices, pages ===== */
const GA_SOURCES = [
  { name: "Direct",            value: 41200, color: "#00E7FF", channel_pt: "Direto",     channel_en: "Direct" },
  { name: "Google / organic",  value: 38400, color: "#2E79FF", channel_pt: "Orgânico",   channel_en: "Organic" },
  { name: "Meta / paid",       value: 28800, color: "#7600FF", channel_pt: "Meta paga",  channel_en: "Meta paid" },
  { name: "Google / paid",     value: 18200, color: "#CE3EBA", channel_pt: "Google paga",channel_en: "Google paid" },
  { name: "Email",             value: 9400,  color: "#EF1166", channel_pt: "E-mail",     channel_en: "Email" },
  { name: "Referral",          value: 4200,  color: "#FF7F00", channel_pt: "Referência", channel_en: "Referral" }
];
const GA_GEO = [
  { flag: "🇧🇷", region_pt: "São Paulo · BR",     region_en: "São Paulo · BR",    sessions: 38400, share: 38.2, revenue: 198200 },
  { flag: "🇧🇷", region_pt: "Rio de Janeiro · BR", region_en: "Rio de Janeiro · BR", sessions: 18200, share: 18.1, revenue: 91400 },
  { flag: "🇧🇷", region_pt: "Belo Horizonte · BR", region_en: "Belo Horizonte · BR", sessions: 9800,  share: 9.7,  revenue: 47200 },
  { flag: "🇧🇷", region_pt: "Curitiba · BR",       region_en: "Curitiba · BR",      sessions: 7100,  share: 7.1,  revenue: 34800 },
  { flag: "🇧🇷", region_pt: "Brasília · DF",       region_en: "Brasília · DF",      sessions: 5800,  share: 5.8,  revenue: 28100 },
  { flag: "🇧🇷", region_pt: "Porto Alegre · BR",   region_en: "Porto Alegre · BR",  sessions: 4200,  share: 4.2,  revenue: 19400 },
  { flag: "🇧🇷", region_pt: "Florianópolis · BR",  region_en: "Florianópolis · BR", sessions: 2900,  share: 2.9,  revenue: 14800 },
  { flag: "🌎",  region_pt: "Outros",              region_en: "Other",              sessions: 13800, share: 13.7, revenue: 65000 }
];
const GA_DEVICES = [
  { name_pt: "Mobile",  name_en: "Mobile",  value: 71.4, color: "#7600FF", icon: "device" },
  { name_pt: "Desktop", name_en: "Desktop", value: 23.1, color: "#00E7FF", icon: "monitor" },
  { name_pt: "Tablet",  name_en: "Tablet",  value: 5.5,  color: "#FF7F00", icon: "device" }
];
const GA_PAGES = [
  { path: "/",                     name_pt: "Home",                     name_en: "Home",            views: 42100, engaged: 78.4, bounce: 21.6, conv: 4.2 },
  { path: "/c/sofas",              name_pt: "Coleção Sofás",            name_en: "Sofas collection",views: 28400, engaged: 84.2, bounce: 15.8, conv: 7.1 },
  { path: "/p/linho-pluma-3p",     name_pt: "Linho Pluma · 3-Peças",    name_en: "Linho Pluma · 3pc", views: 18900, engaged: 88.1, bounce: 11.9, conv: 11.8 },
  { path: "/p/tapete-essencial",   name_pt: "Tapete Essencial",         name_en: "Essential rug",   views: 12400, engaged: 81.4, bounce: 18.6, conv: 6.4 },
  { path: "/c/decoracao",          name_pt: "Coleção Decoração",        name_en: "Decor collection",views: 9800,  engaged: 76.2, bounce: 23.8, conv: 3.1 },
  { path: "/sobre",                name_pt: "Sobre",                    name_en: "About",           views: 4200,  engaged: 68.4, bounce: 31.6, conv: 0.4 },
  { path: "/checkout",             name_pt: "Checkout",                 name_en: "Checkout",        views: 3100,  engaged: 91.2, bounce: 8.8,  conv: 67.4 }
];

/* ===== Shopify ===== */
const SHOPIFY_FUNNEL = [
  { stage_pt: "Sessões",            stage_en: "Sessions",         value: 100400, rate: "100%" },
  { stage_pt: "Visualizou produto", stage_en: "Viewed product",   value: 48200,  rate: "48,0%", rate_en: "48.0%" },
  { stage_pt: "Adicionou ao carrinho", stage_en: "Added to cart", value: 9840,   rate: "20,4%", rate_en: "20.4%" },
  { stage_pt: "Iniciou checkout",   stage_en: "Began checkout",   value: 4920,   rate: "50,0%", rate_en: "50.0%" },
  { stage_pt: "Iniciou pagamento",  stage_en: "Payment initiated",value: 2890,   rate: "58,7%", rate_en: "58.7%" },
  { stage_pt: "Comprou",            stage_en: "Purchased",        value: 1842,   rate: "63,7%", rate_en: "63.7%" }
];
const SHOPIFY_PRODUCTS = [
  { name: "Linho Pluma · 3-Peças",    sku: "SOFA-LP-3P-BG",  bg: "linear-gradient(135deg, #d9c8a0 0%, #a8895a 100%)", letter: "LP", orders: 312, units: 312, aov: 2680, revenue: 836160, delta: "+24%", dDir: "up" },
  { name: "Tapete Essencial · 200",   sku: "TPT-ESS-200-CN", bg: "linear-gradient(135deg, #b8a684 0%, #6c5a3a 100%)", letter: "TE", orders: 218, units: 218, aov: 890,  revenue: 194020, delta: "+18%", dDir: "up" },
  { name: "Manta Linho Cru",          sku: "MAN-LC-180-CR",  bg: "linear-gradient(135deg, #e8dec4 0%, #b0a484 100%)", letter: "MC", orders: 184, units: 215, aov: 420,  revenue: 90300,  delta: "+8%",  dDir: "up" },
  { name: "Almofada Sequoia · Par",   sku: "ALM-SQ-50-PR",   bg: "linear-gradient(135deg, #a44e3e 0%, #5e2a20 100%)", letter: "AS", orders: 162, units: 324, aov: 280,  revenue: 90720,  delta: "+4%",  dDir: "up" },
  { name: "Vaso Cerâmica · Médio",    sku: "VAS-CR-M-BG",    bg: "linear-gradient(135deg, #c8b89a 0%, #7a6840 100%)", letter: "VC", orders: 118, units: 132, aov: 240,  revenue: 31680,  delta: "−2%",  dDir: "down" },
  { name: "Quadro Linha · Grande",    sku: "QDR-LN-G-PR",    bg: "linear-gradient(135deg, #4a3a30 0%, #1a1410 100%)", letter: "QL", orders: 88,  units: 88,  aov: 680,  revenue: 59840,  delta: "+12%", dDir: "up" },
  { name: "Luminária Sol · Mesa",     sku: "LUM-SL-M-BR",    bg: "linear-gradient(135deg, #f4d49a 0%, #c8842a 100%)", letter: "LS", orders: 64,  units: 64,  aov: 480,  revenue: 30720,  delta: "+6%",  dDir: "up" }
];

/* ===== TikTok Ads =====
   Same shape as Meta — manual tagging on campaigns + creatives. Spend series
   is scaled smaller (TikTok typically gets a lower share of paid budget). */
const TIKTOK_SERIES_SPEND = [2.1,1.9,2.3,2.6,2.4,2.8,3.1,2.9,3.2,3.5,3.3,3.6,3.9,3.7,4.1,4.4,4.6,4.8,4.7,5.0,5.2,5.0,5.4,5.6,5.5,5.8,6.0,5.9,6.2,6.5].map(v => v*1000);

const TIKTOK_CAMPAIGNS_ECOM = [
  { name_pt: "Spark Ads · Linho Pluma",        name_en: "Spark Ads · Linho Pluma",        status: "active",   spend: 18200, revenue: 64800, roas: 3.56, cpa: 58.40, ctr: 2.41, delta: "+22%", dDir: "up",      sub: "Spark · creators 4 boost",  tags: ["prospecting"] },
  { name_pt: "Retargeting · Add-to-cart 14d",  name_en: "Retargeting · Add-to-cart 14d",  status: "active",   spend: 4800,  revenue: 38400, roas: 8.00, cpa: 24.60, ctr: 3.92, delta: "+31%", dDir: "up",      sub: "ABO · 4 anúncios",          tags: ["retargeting"] },
  { name_pt: "Reach · Awareness BR",           name_en: "Reach · Awareness BR",           status: "active",   spend: 6400,  revenue: 9200,  roas: 1.44, cpa: 92.10, ctr: 1.18, delta: "−6%",  dDir: "down",    sub: "Reach 1.4M",                tags: ["reach"] },
  { name_pt: "Catálogo · Auto · Q2",           name_en: "Catalog · Auto · Q2",            status: "active",   spend: 5800,  revenue: 21400, roas: 3.69, cpa: 42.10, ctr: 2.08, delta: "+9%",  dDir: "up",      sub: "412 produtos · auto-gen",   tags: ["dpa"] },
  { name_pt: "Teste · Creators Manga Branca",  name_en: "Test · Manga Branca creators",   status: "learning", spend: 2200,  revenue: 6800,  roas: 3.09, cpa: 78.20, ctr: 1.84, delta: "—",    dDir: "neutral", sub: "Janela de aprendizado",     tags: [] },
  { name_pt: "Brand · TopView lançamento",     name_en: "Brand · TopView launch",         status: "paused",   spend: 0,     revenue: 0,     roas: 0,    cpa: 0,     ctr: 0,    delta: "—",    dDir: "neutral", sub: "Pausada · 18 mai",          tags: ["brand"] }
];
const TIKTOK_CAMPAIGNS_LEAD = [
  { name_pt: "Lead Form · 3 erros",            name_en: "Lead Form · 3 mistakes",         status: "active",   spend: 9400, leads: 78, cpl: 120.50, convRate: 4.8, ctr: 2.18, delta: "−18%", dDir: "up",      sub: "Instant Form TikTok",       tags: ["lead-gen"] },
  { name_pt: "Spark · Creator depoimento",     name_en: "Spark · Creator testimonial",    status: "active",   spend: 6200, leads: 41, cpl: 151.20, convRate: 3.1, ctr: 1.92, delta: "+8%",  dDir: "up",      sub: "Spark · 3 creators",        tags: ["lead-gen"] },
  { name_pt: "Reach · Top-of-funnel",          name_en: "Reach · Top-of-funnel",          status: "active",   spend: 3800, leads: 0,  cpl: 0,      convRate: 0,   ctr: 0.84, delta: "—",    dDir: "neutral", sub: "Awareness 980k",            tags: ["reach"] },
  { name_pt: "Retargeting · Engajou 30d",      name_en: "Retargeting · Engaged 30d",      status: "active",   spend: 2100, leads: 28, cpl: 75.00,  convRate: 7.2, ctr: 3.41, delta: "+12%", dDir: "up",      sub: "Form curto · 2 campos",     tags: ["retargeting"] },
  { name_pt: "Brand · TopView",                name_en: "Brand · TopView",                status: "learning", spend: 1400, leads: 6,  cpl: 233.30, convRate: 1.1, ctr: 1.28, delta: "—",    dDir: "neutral", sub: "Em curva",                  tags: [] }
];

/* TikTok creatives — reuse the brand visuals from the creatives library.
   New ads arrive untagged so the agency can classify them. */
const TIKTOK_CREATIVES = [
  {
    id: "TT-481-LP-9x16-v2",
    type: "video", duration: "0:22",
    headline_pt: "Spark · creator Manga Branca",
    headline_en: "Spark · Manga Branca creator",
    tags: ["product-demo", "ugc"],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(140deg, #1d0044 0%, #4E34FE 45%, #7600FF 100%)",
    visual: "linen-sofa",
    rank: 1,
    roas: { pt: "8,0×", en: "8.0×" }, roas_dir: "up",
    spend: { pt: "R$ 6,4k", en: "$1.3k" },
    delta: "+38%", delta_dir: "up",
    ctr: "3,9%", ctr_en: "3.9%",
    purchases: 84
  },
  {
    id: "TT-481-PM-9x16-v4",
    type: "video", duration: "0:15",
    headline_pt: "Promo · 25% off + frete grátis",
    headline_en: "Sale · 25% off + free shipping",
    tags: ["promo"],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(135deg, #EF1166 0%, #CE3EBA 60%, #7600FF 100%)",
    visual: "promo-sale",
    rank: 2,
    roas: { pt: "5,2×", en: "5.2×" }, roas_dir: "up",
    spend: { pt: "R$ 4,1k", en: "$820" },
    delta: "+24%", delta_dir: "up",
    ctr: "3,1%", ctr_en: "3.1%",
    purchases: 52
  },
  {
    id: "TT-481-BA-9x16-v1",
    type: "video", duration: "0:28",
    headline_pt: "Antes/depois · sala da Carolina",
    headline_en: "Before/after · Carolina's living room",
    tags: ["before-after", "ugc"],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(135deg, #FF7F00 0%, #EF1166 100%)",
    visual: "before-after",
    rank: 3,
    roas: { pt: "4,4×", en: "4.4×" }, roas_dir: "up",
    spend: { pt: "R$ 3,2k", en: "$640" },
    delta: "+18%", delta_dir: "up",
    ctr: "2,8%", ctr_en: "2.8%",
    purchases: 38
  },
  {
    id: "TT-481-TS-9x16-v5",
    type: "video", duration: "0:18",
    headline_pt: "Depoimento · 6 meses depois",
    headline_en: "Testimonial · 6 months later",
    tags: [],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(160deg, #220033 0%, #7600FF 50%, #CE3EBA 100%)",
    visual: "testimonial",
    rank: 4,
    roas: { pt: "3,6×", en: "3.6×" }, roas_dir: "up",
    spend: { pt: "R$ 2,4k", en: "$480" },
    delta: "+11%", delta_dir: "up",
    ctr: "2,2%", ctr_en: "2.2%",
    purchases: 24
  },
  {
    id: "TT-481-DR-9x16-v3",
    type: "video", duration: "0:24",
    headline_pt: "Lançamento · estampa Manga Branca",
    headline_en: "Launch · Manga Branca pattern",
    tags: ["launch"],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(135deg, #FF7F00 0%, #FFA64D 70%, #FF7F00 100%)",
    visual: "pattern-drop",
    rank: 5,
    roas: { pt: "3,1×", en: "3.1×" }, roas_dir: "up",
    spend: { pt: "R$ 2,0k", en: "$400" },
    delta: "+6%", delta_dir: "up",
    ctr: "2,0%", ctr_en: "2.0%",
    purchases: 18
  },
  {
    id: "TT-481-TR-9x16-v2",
    type: "video", duration: "0:30",
    headline_pt: "Tour · 8 ambientes em 30s",
    headline_en: "Tour · 8 rooms in 30s",
    tags: [],
    platform: "TikTok · For You", icon: "tiktok",
    bg: "linear-gradient(135deg, #2E79FF 0%, #4E34FE 60%, #220033 100%)",
    visual: "room-tour",
    rank: 6,
    roas: { pt: "2,4×", en: "2.4×" }, roas_dir: "down",
    spend: { pt: "R$ 1,4k", en: "$280" },
    delta: "−9%", delta_dir: "down",
    ctr: "1,5%", ctr_en: "1.5%",
    purchases: 9
  }
];

window.MK_DATA = {
  CLIENT_PROFILE,
  DAYS_30, DAYS_30_EN,
  SERIES, SPARKS,
  NARRATIVES,
  HIGHLIGHTS_ECOM, HIGHLIGHTS_LEAD,
  META_CAMPAIGNS_ECOM, META_CAMPAIGNS_LEAD,
  META_CREATIVES,
  META_CAMPAIGN_TAG_OPTIONS, META_CONCEPT_TAG_OPTIONS,
  GOOGLE_CAMPAIGNS_ECOM, GOOGLE_CAMPAIGNS_LEAD, GOOGLE_SEARCH_TERMS,
  GOOGLE_CAMPAIGN_TAG_OPTIONS,
  GA_SOURCES, GA_GEO, GA_DEVICES, GA_PAGES,
  SHOPIFY_FUNNEL, SHOPIFY_PRODUCTS,
  TIKTOK_SERIES_SPEND, TIKTOK_CAMPAIGNS_ECOM, TIKTOK_CAMPAIGNS_LEAD, TIKTOK_CREATIVES
};
window.MK_FMT = { NF, money };
