// ============================================================ // page-dashboard.jsx — KPI strip + time-series chart + // pipeline funnel + recent activity + team leaderboard. // Theme-aware so it adapts to dark rail chrome. // ============================================================ const DashboardBody = ({ theme = "light" }) => { const dark = theme === "dark"; const c = dark ? { bg: "#0f0f14", panel: "#13131a", border: "#ffffff10", text: "#e8e8ee", subtext: "#9a9aa6", muted: "#6a6a78", grid: "#ffffff08", accent: "#7a78ff", up: "#22c55e", down: "#ff4d5e", } : { bg: "#fafaf9", panel: "#ffffff", border: "#ebebe6", text: "#111", subtext: "#5a5a5e", muted: "#8a8a90", grid: "#eeeee9", accent: "#5e5cff", up: "#22c55e", down: "#ff4d5e", }; // Synthetic but consistent daily series, weekday-shaped const days = ["M","T","W","T","F","S","S","M","T","W","T","F","S","S"]; const series = [42,58,71,64,79,32,28, 51,68,82,75,90,38,33]; const max = Math.max(...series); // Funnel data const funnel = [ { stage: "New", n: 184, v: "€2.1m" }, { stage: "Qualified", n: 96, v: "€1.4m" }, { stage: "Proposal", n: 42, v: "€780k" }, { stage: "Negotiation", n: 19, v: "€420k" }, { stage: "Closed-won", n: 11, v: "€286k" }, ]; const fmax = funnel[0].n; const Avatar = ({ name, color = "#d4b8a8", size = 22 }) => (