root = Card([header, kpis, trendsSection, programsSection, riskSection, financesSection, housingSection, eventsSection, alumniSection, deptSection, semesterSection, waitlistSection, actionsSection])
header = CardHeader("University Administrator Overview", "Fall 2025 · State University")
kpis = Card([kpiTitle, kpiTable], "sunk", "column", "m")
kpiTitle = Heading("Key Metrics", "h3")
kpiTable = Table([kpiMetric, kpiValue])
kpiMetric = Col("Metric", ["Total Enrollment", "Applications", "Acceptance Rate", "Tuition Revenue", "Scholarship Budget Used", "Housing Occupancy"])
kpiValue = Col("Value", ["24,812", "18,430", "62%", "$412M", "$58M / $80M", "94%"])

trendsSection = Card([enrollHeader, enrollChart], "sunk", "column", "m")
enrollHeader = Heading("Enrollment Over Five Years", "h3")
enrollChart = LineChart(["2021", "2022", "2023", "2024", "2025"], [enrollSeries], "natural", "Year", "Students")
enrollSeries = Series("Enrollment", [22100, 23150, 23800, 24400, 24812])

programsSection = Card([progHeader, progChart], "sunk", "column", "m")
progHeader = Heading("Applications by Program", "h3")
progChart = BarChart(["Engineering", "Business", "Computer Science", "Biology", "Psychology", "Economics"], [appSeries], "grouped", "Program", "Applications")
appSeries = Series("Applications", [4200, 3800, 5100, 2900, 2600, 1830])

riskSection = Card([riskHeader, riskList], "sunk", "column", "m")
riskHeader = Heading("Students at Academic Risk", "h3")
riskList = ListBlock([riskItem1, riskItem2, riskItem3, riskItem4], "number")
riskItem1 = ListItem("1,204 students", "GPA below 2.0 threshold — 4.9% of enrolled")
riskItem2 = ListItem("312 on probation", "Require academic support plan")
riskItem3 = ListItem("48 in danger of dismissal", "Final review this month")
riskItem4 = ListItem("High-risk departments", "Engineering, Computer Science, Biology")

financesSection = Card([finHeader, finChart, finProgress], "sunk", "column", "m")
finHeader = Heading("Tuition Revenue This Year", "h3")
finChart = AreaChart(["Aug", "Sep", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May"], [revSeries], "natural", "Month", "Revenue ($M)")
revSeries = Series("Tuition Revenue", [38, 42, 45, 47, 49, 50, 52, 54, 56, 58])
scholarshipNote = TextContent("**Scholarship budget:** $58M used of $80M total (72.5%)")
finProgress = Progress(72.5, "Scholarship budget used")

housingSection = Card([housingHeader, housingChart], "sunk", "column", "m")
housingHeader = Heading("Housing Occupancy", "h3")
housingChart = HorizontalBarChart(["North Hall", "South Hall", "West Hall", "East Hall", "Graduate Village"], [housingSeries], "grouped", "Occupancy (%)", "Residence")
housingSeries = Series("Occupancy", [96, 92, 98, 89, 91])

eventsSection = Card([eventsHeader, eventsList], "sunk", "column", "m")
eventsHeader = Heading("Campus Events This Month", "h3")
eventsList = ListBlock([event1, event2, event3, event4], "number")
event1 = ListItem("Career Fair", "October 12 · Main Quad · 1,200 expected")
event2 = ListItem("Research Symposium", "October 18 · Science Center · 450 expected")
event3 = ListItem("Homecoming Weekend", "October 24–26 · Stadium & Alumni Center")
event4 = ListItem("Guest Lecture: AI Ethics", "October 30 · Auditorium · 300 expected")

alumniSection = Card([alumniHeader, alumniChart], "sunk", "column", "m")
alumniHeader = Heading("Alumni Giving Over Four Years", "h3")
alumniChart = BarChart(["2022", "2023", "2024", "2025"], [alumniSeries], "grouped", "Year", "Donations ($M)")
alumniSeries = Series("Alumni Giving", [28, 32, 35, 41])

deptSection = Card([deptHeader, deptSelect, deptInfo], "sunk", "column", "m")
deptHeader = Heading("Focus on a Department", "h3")
deptSelect = Select("department", [deptEng, deptBiz, deptCS, deptBio], "Choose a department")
deptEng = SelectItem("engineering", "Engineering")
deptBiz = SelectItem("business", "Business")
deptCS = SelectItem("cs", "Computer Science")
deptBio = SelectItem("biology", "Biology")
deptInfo = TextContent("**Engineering:** 4,200 applications · 1,850 enrolled · 62% acceptance · 24 faculty · 92% course fill")

semesterSection = Card([semHeader, semChart], "sunk", "column", "m")
semHeader = Heading("This Semester vs. Last", "h3")
semChart = BarChart(["Enrollment", "Applications", "Tuition Revenue ($M)", "Housing Occupancy (%)"], [lastSem, thisSem], "grouped", "Metric", "Value")
lastSem = Series("Last Semester", [24100, 17100, 395, 91])
thisSem = Series("This Semester", [24812, 18430, 412, 94])

waitlistSection = Card([waitHeader, waitTable], "sunk", "column", "m")
waitHeader = Heading("Waitlisted Students per Program", "h3")
waitTable = Table([waitProgram, waitCount])
waitProgram = Col("Program", ["Engineering", "Computer Science", "Business", "Psychology", "Biology"])
waitCount = Col("Waitlisted", [210, 340, 95, 60, 45])

actionsSection = Card([actionHeader, courseDialog, messageDrawer], "sunk", "column", "m")
actionHeader = Heading("Administrative Actions", "h3")
courseDialog = DialogBlock("Approve New Course", "Approve New Course", "Review and approve the proposed course", [courseContent], "default")
courseContent = MarkDownRenderer("**Course:** CS 498 — Advanced Machine Learning\n**Instructor:** Dr. Elena Vasquez\n**Credits:** 3\n**Capacity:** 60\n**Prerequisites:** CS 320, CS 350\n\nApproving will add this course to the Spring 2026 catalog.")
messageDrawer = DrawerBlock("Message Student Group", "Send Message to Student Group", "Compose a message to a registered student organization", [msgForm])
msgForm = Form("group-message", msgButtons, [groupField, subjectField, bodyField])
groupField = FormControl("Student group", groupSelect)
groupSelect = Select("group", [groupEng, groupBiz, groupCS], "Select a group")
groupEng = SelectItem("engineering-society", "Engineering Society")
groupBiz = SelectItem("business-club", "Business Club")
groupCS = SelectItem("cs-association", "Computer Science Association")
subjectField = FormControl("Subject", subjectInput)
subjectInput = Input("subject", "Event announcement")
bodyField = FormControl("Message", bodyArea)
bodyArea = TextArea("body", "Write your message here...", 5)
msgButtons = Buttons([sendBtn, cancelMsgBtn])
sendBtn = Button("Send Message", null, "primary")
cancelMsgBtn = Button("Cancel", null, "tertiary")