root = Card([header, online, actives, revenueSection, sessionTrend, bestSellers, serverHealth, crashes, events, reviews, bans, inflation, experiments, patchDraft, regionFocus, hotfix], "card", "column", "l")
header = CardHeader("Live Ops Command Center", "Aurora Studios — Real-time game operations")
online = Card([onlineHeading, onlineValue, onlineDelta], "sunk", "column", "s")
onlineHeading = Heading("Players Online Right Now", "h3")
onlineValue = TextContent("84,312", "large-heavy")
onlineDelta = Badge("+12% vs 1h ago", "secondary")
actives = Card([activeHeading, activeKpis], "sunk", "column", "s")
activeHeading = Heading("Active Players", "h3")
activeKpis = Table([dauCol, mauCol])
dauCol = Col("Daily Active", ["312,480"])
mauCol = Col("Monthly Active", ["2,184,093"])
revenueSection = Card([revHeading, revKpis, revChart], "sunk", "column", "s")
revHeading = Heading("Revenue Today", "h3")
revKpis = Table([revTodayCol, revPerUserCol])
revTodayCol = Col("Revenue Today", ["$148,920"])
revPerUserCol = Col("Revenue per User", ["$0.48"])
revChart = AreaChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [revSeries], "natural", "Day", "Revenue (USD)")
revSeries = Series("Revenue", [92000, 101500, 98000, 112300, 121000, 138400, 148920])
sessionTrend = Card([sessionHeading, sessionChart], "sunk", "column", "s")
sessionHeading = Heading("Average Session Length — Last 2 Weeks", "h3")
sessionChart = LineChart(["D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14"], [sessionSeries], "natural", "Day", "Minutes")
sessionSeries = Series("Session Length", [18, 19, 17, 21, 22, 20, 24, 23, 25, 24, 26, 27, 25, 28])
bestSellers = Card([bestHeading, bestTable], "sunk", "column", "s")
bestHeading = Heading("Best-Selling Items", "h3")
bestTable = Table([itemCol, unitsCol, revenueCol])
itemCol = Col("Item", ["Shadow Blade", "Dragon Armor", "Mystic Orb", "Phoenix Mount", "Elixir Pack"])
unitsCol = Col("Units", [12400, 9800, 7650, 5200, 4300])
revenueCol = Col("Revenue", ["$49,600", "$39,200", "$30,600", "$20,800", "$17,200"])
serverHealth = Card([serverHeading, serverTable], "sunk", "column", "s")
serverHeading = Heading("Server Regions & Health", "h3")
serverTable = Table([regionCol, statusCol, latencyCol, loadCol])
regionCol = Col("Region", ["US East", "US West", "Europe", "Asia Pacific", "South America"])
statusCol = Col("Health", ["Healthy", "Healthy", "Degraded", "Healthy", "Warning"])
latencyCol = Col("Latency (ms)", [42, 55, 68, 87, 110])
loadCol = Col("Load %", [62, 58, 74, 81, 45])
crashes = Card([crashHeading, crashChart], "sunk", "column", "s")
crashHeading = Heading("Crash Rate by App Version", "h3")
crashChart = BarChart(["v2.4.1", "v2.4.2", "v2.5.0", "v2.5.1"], [crashSeries], "grouped", "Version", "Crash %")
crashSeries = Series("Crash Rate", [0.8, 0.6, 2.1, 0.9])
events = Card([eventHeading, eventList], "sunk", "column", "s")
eventHeading = Heading("Live Events", "h3")
eventList = ListBlock([eventLive, eventUpcoming1, eventUpcoming2], "image")
eventLive = ListItem("Summer Solstice Festival", "Running now — ends in 2d 4h", ["https://picsum.photos/seed/solstice/80/80"], "View")
eventUpcoming1 = ListItem("Double XP Weekend", "Starts Friday 00:00 UTC", ["https://picsum.photos/seed/xpweekend/80/80"], "View")
eventUpcoming2 = ListItem("Boss Rush: The Void Tyrant", "Starts Monday — 7 days", ["https://picsum.photos/seed/bossrush/80/80"], "View")
reviews = Card([reviewHeading, reviewTable, reviewAction], "sunk", "column", "s")
reviewHeading = Heading("Player Reports Awaiting Review", "h3")
reviewTable = Table([reportIdCol, playerCol, reasonCol, ageCol])
reportIdCol = Col("Report ID", ["#88231", "#88232", "#88233", "#88234"])
playerCol = Col("Player", ["xXShadowXx", "LunaMage", "RageQuit99", "PixieDust"])
reasonCol = Col("Reason", ["Cheating", "Harassment", "Exploit", "Spam"])
ageCol = Col("Age", ["12m", "45m", "2h", "3h"])
reviewAction = Buttons([reviewBtn])
reviewBtn = Button("Open Review Queue", null, "secondary")
bans = Card([banHeading, banTable, banAction], "sunk", "column", "s")
banHeading = Heading("Ban Appeals Awaiting Review", "h3")
banTable = Table([appealIdCol, playerCol, reasonCol, ageCol])
appealIdCol = Col("Appeal ID", ["#A551", "#A552", "#A553"])
playerCol = Col("Player", ["GhostRider", "FrostByte", "NovaStrike"])
reasonCol = Col("Original Ban", ["Account sharing", "Toxicity", "RMT"])
ageCol = Col("Age", ["1h", "4h", "9h"])
banAction = Buttons([banBtn])
banBtn = Button("Open Appeals Queue", null, "secondary")
inflation = Card([inflationHeading, inflationValue, inflationChart], "sunk", "column", "s")
inflationHeading = Heading("In-Game Currency Inflation", "h3")
inflationValue = TextContent("Index: 142 (target ≤ 120)", "small-heavy")
inflationChart = LineChart(["W1", "W2", "W3", "W4", "W5", "W6"], [inflationSeries], "linear", "Week", "Index")
inflationSeries = Series("Currency Index", [105, 110, 118, 125, 133, 142])
experiments = Card([expHeading, expTable, expStatus], "sunk", "column", "s")
expHeading = Heading("Running Experiments", "h3")
expTable = Table([expNameCol, expVariantCol, expMetricCol, expResultCol])
expNameCol = Col("Experiment", ["Daily Login Reward", "Matchmaking ELO"])
expVariantCol = Col("Variant", ["A: Control / B: Boosted", "A: Control / B: Tightened"])
expMetricCol = Col("Metric", ["D1 Retention", "Match Quality Score"])
expResultCol = Col("Result", ["B +6.4% (significant)", "B +2.1% (not significant)"])
expStatus = Callout("info", "Decision due in 2 days", "Review the significant retention lift before the next patch window.")
patchDraft = Card([patchHeading, patchForm], "sunk", "column", "s")
patchHeading = Heading("Draft Patch Notes", "h3")
patchForm = Form("patch-notes", patchButtons, [patchTitleField, patchBodyField])
patchTitleField = FormControl("Patch title", patchTitleInput)
patchTitleInput = Input("patch_title", "v2.5.2 — Balance & Bugfixes")
patchBodyField = FormControl("Notes", patchBodyArea, "Markdown supported")
patchBodyArea = TextArea("patch_body", "- Nerf Shadow Blade damage 12%.\n- Fix crash on Phoenix Mount.\n- Reduce currency inflation from event rewards.", 6)
patchButtons = Buttons([saveDraftBtn, publishBtn])
saveDraftBtn = Button("Save Draft", null, "secondary")
publishBtn = Button("Publish Notes", null, "primary")
regionFocus = Card([focusHeading, focusForm], "sunk", "column", "s")
focusHeading = Heading("Focus on One Region", "h3")
focusForm = Form("region-focus", focusButtons, [regionField])
regionField = FormControl("Region", regionSelect)
regionSelect = Select("region", [regionUS, regionEU, regionAP, regionSA], "Choose a region")
regionUS = SelectItem("us-east", "US East")
regionEU = SelectItem("eu", "Europe")
regionAP = SelectItem("apac", "Asia Pacific")
regionSA = SelectItem("sa", "South America")
focusButtons = Buttons([applyFocusBtn])
applyFocusBtn = Button("Apply Focus", null, "primary")
hotfix = Card([hotfixHeading, hotfixDesc, hotfixForm], "sunk", "column", "s")
hotfixHeading = Heading("Ship a Hotfix", "h3")
hotfixDesc = TextContent("Deploys immediately to all regions with a 5-minute rolling restart. Use for critical issues only.", "small")
hotfixForm = Form("hotfix", hotfixButtons, [hotfixField])
hotfixField = FormControl("Hotfix notes", hotfixInput)
hotfixInput = Input("hotfix_notes", "Describe the fix", "text")
hotfixButtons = Buttons([hotfixBtn])
hotfixBtn = Button("Ship Hotfix", null, "primary")