root = Card([overviewHeader, enrollmentCard, appAcceptRow, financeCard, courseCard, teachingCard, housingCard, riskCard, eventsCard, alumniCard, focusCard, compareCard, waitlistCard, approveCard, messageCard], "clear", "column", "2xl")
overviewHeader = CardHeader("University Overview", "Spring 2025 · Strategic Dashboard")
enrollmentCard = Card([enrollHeader, enrollValue, enrollCaption, enrollChart], "sunk", "column", "m")
enrollHeader = CardHeader("Total Enrollment", "Five-year trend")
enrollValue = TextContent("38,420", "large-heavy")
enrollCaption = TextContent("students enrolled this semester", "small")
enrollChart = LineChart(["2021", "2022", "2023", "2024", "2025"], [enrollSeries], "natural", null, "Students")
enrollSeries = Series("Enrollment", [34210, 35180, 36440, 37290, 38420])
appAcceptRow = Card([appsCard, acceptCard], "clear", "row", "xl")
appsCard = Card([appsHeader, appsChart], "sunk", "column", "m")
appsHeader = CardHeader("Applications by Program", "Fall 2025 cycle")
appsChart = HorizontalBarChart(["Computer Science", "Business Administration", "Nursing", "Psychology", "Engineering"], [appsSeries])
appsSeries = Series("Applications", [3200, 2450, 1820, 1410, 980])
acceptCard = Card([acceptHeader, acceptProgress, acceptText], "sunk", "column", "m")
acceptHeader = CardHeader("Acceptance Rate", "Admitted / Applied")
acceptProgress = Progress(32, "32% acceptance rate")
acceptText = TextContent("3,120 offers extended to date", "small")
financeCard = Card([financeHeader, financeStats, scholarshipProgress], "sunk", "column", "m")
financeHeader = CardHeader("Finance", "FY2025")
financeStats = Card([tuitionText, tuitionCaption], "clear", "column", "xs")
tuitionText = TextContent("$212.4M", "large-heavy")
tuitionCaption = TextContent("Tuition revenue this year", "small")
scholarshipProgress = Progress(68, "$6.8M of $10M scholarship budget used")
courseCard = Card([courseHeader, courseChart], "sunk", "column", "m")
courseHeader = CardHeader("Course Fill Rates", "Seats occupied vs open")
courseChart = BarChart(["CS 101", "MATH 210", "BIO 150", "ENG 220", "PSY 101"], [courseFilled, courseOpen], "grouped", null, "Seats")
courseFilled = Series("Filled", [78, 92, 51, 85, 64])
courseOpen = Series("Open", [22, 8, 49, 15, 36])
teachingCard = Card([teachingHeader, teachingChart], "sunk", "column", "m")
teachingHeader = CardHeader("Teaching Load", "Courses per faculty member")
teachingChart = HorizontalBarChart(["Dr. Alvarez", "Prof. Chen", "Dr. Okafor", "Prof. Rossi", "Dr. Patel"], [teachingSeries])
teachingSeries = Series("Courses", [4, 3, 5, 2, 4])
housingCard = Card([housingHeader, housingProgress, housingText], "sunk", "column", "m")
housingHeader = CardHeader("Housing Occupancy", "Residence halls")
housingProgress = Progress(94, "4,512 of 4,800 beds occupied")
housingText = TextContent("94% occupancy · waitlist open for North Hall", "small")
riskCard = Card([riskHeader, riskAlert, riskTable], "sunk", "column", "m")
riskHeader = CardHeader("Students at Academic Risk", "Early alert list")
riskAlert = Alert("214 students flagged", "Below 2.0 GPA or excessive absences", "warning")
riskTable = Table([riskProgram, riskCount])
riskProgram = Col("Program", ["Computer Science", "Business", "Nursing", "Liberal Arts"])
riskCount = Col("Students", [58, 47, 36, 73])
eventsCard = Card([eventsHeader, eventsList], "sunk", "column", "m")
eventsHeader = CardHeader("Campus Events This Month", "Highlights")
eventsList = ListBlock([event1, event2, event3], "number")
event1 = ListItem("Spring Career Fair", "March 12 · Student Union", [], "Add to calendar")
event2 = ListItem("Guest Lecture: AI Ethics", "March 18 · Keller Auditorium", [], "RSVP")
event3 = ListItem("Intramural Finals", "March 27 · East Gym", [], "View schedule")
alumniCard = Card([alumniHeader, alumniChart], "sunk", "column", "m")
alumniHeader = CardHeader("Alumni Giving", "Past four fiscal years")
alumniChart = LineChart(["2022", "2023", "2024", "2025"], [alumniSeries], "linear", null, "$M")
alumniSeries = Series("Giving", [14.2, 16.8, 18.1, 21.5])
focusCard = Card([focusHeader, focusForm], "sunk", "column", "m")
focusHeader = CardHeader("Focus on a Department", "Filter the overview")
focusForm = Form("department-focus", focusButtons, [deptField])
deptField = FormControl("Department", deptSelect)
deptSelect = Select("department", [deptCS, deptBus, deptNur, deptEng], "Choose department")
deptCS = SelectItem("cs", "Computer Science")
deptBus = SelectItem("bus", "Business")
deptNur = SelectItem("nur", "Nursing")
deptEng = SelectItem("eng", "Engineering")
focusButtons = Buttons([focusApply])
focusApply = Button("Apply focus", null, "primary")
compareCard = Card([compareHeader, compareTable], "sunk", "column", "m")
compareHeader = CardHeader("This Semester vs Last", "Spring 2025 compared with Fall 2024")
compareTable = Table([metricCol, currentCol, previousCol, changeCol])
metricCol = Col("Metric", ["Enrollment", "Credit load", "Retention", "Withdrawals"])
currentCol = Col("Spring 2025", [38420, 512000, "94%", 1205])
previousCol = Col("Fall 2024", [37650, 498400, "91%", 1490])
changeCol = Col("Change", ["+2.0%", "+2.7%", "+3 pts", "-19%"])
waitlistCard = Card([waitlistHeader, waitlistChart], "sunk", "column", "m")
waitlistHeader = CardHeader("Waitlisted Students", "Per program")
waitlistChart = HorizontalBarChart(["Computer Science", "Business", "Nursing", "Law", "Psychology"], [waitlistSeries])
waitlistSeries = Series("Waitlisted", [145, 92, 38, 76, 51])
approveCard = Card([approveHeader, approveDialog], "sunk", "column", "m")
approveHeader = CardHeader("Course Approval", "Pending request")
approveDialog = AlertDialogBlock("Approve New Course", "Approve CS-310: Advanced Databases?", "Meets enrollment demand and faculty are available.", "Approve", "Not yet")
messageCard = Card([messageHeader, messageForm], "sunk", "column", "m")
messageHeader = CardHeader("Message a Student Group", "Official notice")
messageForm = Form("group-message", messageButtons, [groupField, messageField])
groupField = FormControl("Group", groupSelect, "Recipients will receive an email")
groupSelect = Select("group", [grpAll, grpFresh, grpAth, grpIntl], "Choose group")
grpAll = SelectItem("all", "All undergraduate students")
grpFresh = SelectItem("fresh", "First-year students")
grpAth = SelectItem("ath", "Student athletes")
grpIntl = SelectItem("intl", "International students")
messageField = FormControl("Message", messageArea)
messageArea = TextArea("message", "Write your message...", 4)
messageButtons = Buttons([messageSend, messageCancel])
messageSend = Button("Send message", null, "primary")
messageCancel = Button("Cancel", null, "tertiary")