root = Card([header, topStats, enrollmentSection, applicationsSection, semesterSection, alumniSection, courseSection, teachingSection, riskSection, waitlistSection, eventsSection, deptSection, approveSection, messageSection], "card", "column", "xl")
header = CardHeader("University Overview", "Fall 2025 - Oakridge University")
topStats = Card([enrollStat, acceptanceStat, tuitionStat, scholarshipStat, housingStat], "card", "row", "m")
enrollStat = Card([enrollValue, enrollLabel], "sunk", "column", "none")
enrollValue = TextContent("41,230", "large-heavy")
enrollLabel = TextContent("Total Enrollment", "small")
acceptanceStat = Card([acceptanceValue, acceptanceLabel, acceptanceBar], "sunk", "column", "none")
acceptanceValue = TextContent("44.6%", "large-heavy")
acceptanceLabel = TextContent("Acceptance Rate", "small")
acceptanceBar = Progress(44.6, "Accepted")
tuitionStat = Card([tuitionValue, tuitionLabel], "sunk", "column", "none")
tuitionValue = TextContent("$582.4M", "large-heavy")
tuitionLabel = TextContent("Tuition Revenue FY25", "small")
scholarshipStat = Card([scholarshipValue, scholarshipLabel, scholarshipBar], "sunk", "column", "none")
scholarshipValue = TextContent("69%", "large-heavy")
scholarshipLabel = TextContent("Scholarship Budget Used", "small")
scholarshipBar = Progress(69, "$12.4M of $18M")
housingStat = Card([housingValue, housingLabel, housingBar], "sunk", "column", "none")
housingValue = TextContent("94%", "large-heavy")
housingLabel = TextContent("Housing Occupancy", "small")
housingBar = Progress(94, "8,640 of 9,200 beds")
enrollmentSection = Card([enrollmentHeading, enrollmentChart], "sunk", "column", "m")
enrollmentHeading = Heading("Enrollment Trend", "h3")
enrollmentChart = LineChart(["2021", "2022", "2023", "2024", "2025"], [enrollSeries], "natural", "Year", "Students")
enrollSeries = Series("Total Enrollment", [37210, 38540, 39780, 40610, 41230])
applicationsSection = Card([applicationsHeading, applicationsChart], "sunk", "column", "m")
applicationsHeading = Heading("Applications by Program", "h3")
applicationsChart = BarChart(["Business", "Computer Science", "Engineering", "Psychology", "Biology"], [appsSeries], "grouped", "Program", "Applications")
appsSeries = Series("Applications", [8420, 6110, 5730, 4390, 3820])
semesterSection = Card([semesterHeading, semesterChart], "sunk", "column", "m")
semesterHeading = Heading("This Semester vs Last", "h3")
semesterChart = BarChart(["Enrollment", "Applications", "Courses", "Waitlisted"], [thisSemesterSeries, lastSemesterSeries], "grouped", "Metric", "Count")
thisSemesterSeries = Series("Fall 2025", [41230, 28470, 9320, 2145])
lastSemesterSeries = Series("Fall 2024", [40610, 27910, 9180, 1890])
alumniSection = Card([alumniHeading, alumniChart], "sunk", "column", "m")
alumniHeading = Heading("Alumni Giving", "h3")
alumniChart = BarChart(["FY22", "FY23", "FY24", "FY25"], [alumniSeries], "grouped", "Fiscal Year", "Donors")
alumniSeries = Series("Donors", [48200, 49100, 50300, 52100])
courseSection = Card([courseHeading, courseTable], "sunk", "column", "m")
courseHeading = Heading("Course Offering Capacity", "h3")
courseTable = Table([courseName, courseEnrolled, courseCapacity, courseFill])
courseName = Col("Course", ["FIN 320", "CS 201", "PSY 110", "ENG 101", "BIO 210"])
courseEnrolled = Col("Enrolled", [128, 145, 210, 180, 96])
courseCapacity = Col("Capacity", [140, 150, 220, 190, 110])
courseFill = Col("Fill %", [91, 97, 95, 95, 87])
teachingSection = Card([teachingHeading, teachingChart], "sunk", "column", "m")
teachingHeading = Heading("Teaching Load by Faculty", "h3")
teachingChart = HorizontalBarChart(["Dr. Adams", "Dr. Chen", "Dr. Patel", "Dr. Okafor", "Dr. Rivera"], [teachingSeries], "grouped", "Courses", "Faculty")
teachingSeries = Series("Courses", [4, 5, 3, 4, 4])
riskSection = Card([riskHeading, riskTable], "sunk", "column", "m")
riskHeading = Heading("Students at Academic Risk", "h3")
riskTable = Table([riskName, riskProgram, riskGpa, riskStatus])
riskName = Col("Student", ["Mia Johnson", "Liam Smith", "Ava Garcia", "Noah Kim", "Emma Brown"])
riskProgram = Col("Program", ["Engineering", "Biology", "Business", "CS", "Psychology"])
riskGpa = Col("GPA", [1.8, 2.0, 1.7, 1.9, 2.0])
riskStatus = Col("Status", ["Probation", "Probation", "At risk", "At risk", "Probation"])
waitlistSection = Card([waitlistHeading, waitlistTable], "sunk", "column", "m")
waitlistHeading = Heading("Waitlisted Students per Program", "h3")
waitlistTable = Table([waitProgram, waitCount])
waitProgram = Col("Program", ["Computer Science", "Engineering", "Business", "Psychology", "Nursing"])
waitCount = Col("Waitlist", [340, 275, 210, 120, 85])
eventsSection = Card([eventsHeading, eventsList], "sunk", "column", "m")
eventsHeading = Heading("Campus Events This Month", "h3")
eventsList = ListBlock([event1, event2, event3, event4])
event1 = ListItem("Career Fair", "Oct 14, 10am - 3pm - Main Quad", null, "Calendar")
event2 = ListItem("Guest Lecture: AI Ethics", "Oct 16, 4pm - Morrison Hall", null, "RSVP")
event3 = ListItem("Homecoming Weekend", "Oct 24-26 - Stadium & campus", null, "Details")
event4 = ListItem("Study Abroad Info Session", "Oct 30, 6pm - Global Center", null, "Register")
deptSection = Card([deptHeading, deptFocusForm], "sunk", "column", "m")
deptHeading = Heading("Focus on a Department", "h3")
deptFocusForm = Form("department-focus", deptButtons, [deptSelectField])
deptSelectField = FormControl("Department", deptSelect)
deptSelect = Select("department", [deptBusiness, deptCS, deptEngineering, deptPsych, deptBio], "Select a department...")
deptBusiness = SelectItem("business", "College of Business")
deptCS = SelectItem("cs", "Computer Science")
deptEngineering = SelectItem("engineering", "Engineering")
deptPsych = SelectItem("psychology", "Psychology")
deptBio = SelectItem("biology", "Biology")
deptButtons = Buttons([deptApply])
deptApply = Button("Apply Focus")
approveSection = Card([approveHeading, approveForm], "sunk", "column", "m")
approveHeading = Heading("Approve a New Course", "h3")
approveForm = Form("course-approval", approveButtons, [courseNameField, courseCodeField, instructorField, creditsField])
courseNameField = FormControl("Course Title", courseNameInput)
courseNameInput = Input("course_title", "e.g. Introduction to Data Science")
courseCodeField = FormControl("Course Code", courseCodeInput)
courseCodeInput = Input("course_code", "e.g. CS 250")
instructorField = FormControl("Instructor", instructorInput)
instructorInput = Input("instructor", "Full name")
creditsField = FormControl("Credits", creditsInput)
creditsInput = Input("credits", "3", "number")
approveButtons = Buttons([approveSubmit])
approveSubmit = Button("Approve Course", null, "primary")
messageSection = Card([messageHeading, messageForm], "sunk", "column", "m")
messageHeading = Heading("Send Message to Student Group", "h3")
messageForm = Form("student-message", messageButtons, [groupField, subjectField, messageField])
groupField = FormControl("Student Group", groupSelect)
groupSelect = Select("group", [groupAll, groupFreshman, groupSeniors, groupGrad], "Choose a group")
groupAll = SelectItem("all", "All Students")
groupFreshman = SelectItem("freshman", "Freshman Class")
groupSeniors = SelectItem("seniors", "Senior Class")
groupGrad = SelectItem("grad", "Graduate Students")
subjectField = FormControl("Subject", subjectInput)
subjectInput = Input("subject", "Subject line")
messageField = FormControl("Message", messageArea)
messageArea = TextArea("message", "Write your message...", 4)
messageButtons = Buttons([sendBtn])
sendBtn = Button("Send Message", null, "primary")