/* Dark dashboard section - Resend-inspired (original layout) */ const { useEffect: useEffectD, useState: useStateD } = React; function DarkDashboard() { const [num, setNum] = useStateD({ conv: 1284, leads: 312, ped: 87, fup: 154 }); useEffectD(() => { const id = setInterval(() => { setNum(n => ({ conv: n.conv + Math.floor(Math.random() * 3), leads: n.leads + (Math.random() > 0.6 ? 1 : 0), ped: n.ped + (Math.random() > 0.75 ? 1 : 0), fup: n.fup + (Math.random() > 0.7 ? 1 : 0) })); }, 2200); return () => clearInterval(id); }, []); const cardStyle = { background: 'linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015))', border: '1px solid var(--dark-line-2)', borderRadius: 14, padding: 18, position: 'relative', overflow: 'hidden' }; return (
{/* Left: dashboard */}
{/* dashboard header */}
Central de Operação live · loja-centro
{['1h', '24h', '7d'].map((t, i) => ( {t} ))}
{/* metric tiles */}
{/* chart */} {/* event log */}
Eventos · ao vivo ● streaming
{/* Right: code + alerts + status */}
POST /v1/agent/reply 200 OK · 412ms
{`{
  `}"channel"{`: `}"whatsapp"{`,
  `}"intent"{`: `}"pedido"{`,
  `}"confidence"{`: `}0.96{`,
  `}"actions"{`: [`}"crm.create_lead"{`,
              `}"followup.schedule_24h"{`],
  `}"reply"{`: `}"Sim, entregamos! Posso..."{`
}`}
          
Alertas para equipe 2 abertos
Status da automação ● healthy
); } function MetricTile({ label, value, delta, color }) { return (
{label}
{value.toLocaleString('pt-BR')}
{delta}
); } function DashChart() { // Mock sparkline / area chart with gradient const points = [12, 18, 14, 22, 28, 24, 32, 30, 38, 35, 44, 48, 42, 52, 58, 55, 64, 70, 68, 76, 82, 78, 88, 95]; const max = 100; const w = 100, h = 100; const step = w / (points.length - 1); const path = points.map((p, i) => `${i === 0 ? 'M' : 'L'} ${(i * step).toFixed(2)} ${(h - (p / max) * h).toFixed(2)}`).join(' '); const area = path + ` L ${w} ${h} L 0 ${h} Z`; return (
Conversões · últimas 24h R$ 14.328
{/* live dot */}
); } function LogRow({ time, tag, tagColor, msg }) { return (
{time} {tag} {msg}
); } function Alert({ color, title, sub, last }) { return (
{title}
{sub}
); } function StatusRow({ name, pct, warn, last }) { return (
{name} {pct.toFixed(1)}%
); } window.DarkDashboard = DarkDashboard;