Prompt
Build a self-contained admin dashboard for an ad network as a single file named `adnetwork-admin.html`. It must run by opening the file directly with no build step and no network requests (no CDNs, no external fonts, no fetch calls).
Embed a deterministic mock dataset in the file: 12 campaigns (fields: id, name, advertiser, status in {active, paused, ended}, daily budget, spend, impressions, clicks, conversions), 6 publishers (name, domain, fill rate, floor price), and 30 days of daily rows per campaign generated with a small seeded PRNG so the numbers are stable on every reload.
Required UI:
- Top KPI row: impressions, clicks, CTR, eCPM, spend, conversions — each with a delta vs the previous equal-length period, green/red.
- Date-range control (7 / 14 / 30 days plus custom start-end) that recomputes all KPIs, the chart, and the table from the embedded data.
- Revenue-over-time chart drawn with inline SVG or canvas in plain JS (line or bar), with axis labels and a hover tooltip. No chart library.
- Campaign table: sortable by every numeric column, text filter on name/advertiser, status filter, and a click-to-expand row showing that campaign's last 7 days. Include pause/activate toggle buttons that only mutate in-memory state and visually reflect status.
- Publisher breakdown panel: sortable list with fill rate and revenue share bars.
- Responsive down to 480px wide; light theme; readable typography with system fonts.
Deliverable: the single HTML file plus a 5-line comment block at the top of the file explaining the data model and how the range filter works. Done looks like: the file opens offline with zero console errors, every control changes the displayed numbers consistently, and totals in the KPI row equal the sum of the visible table rows for the selected range.