root = Card([header, statusRow, performanceSection, flightsSection, delayAlert, gateChanges, crewSection, weatherSection, loadSection, riskSection, rebookSection, hubSection, cancelSection, turnaroundSection])
header = CardHeader("Hub Operations Desk", "Atlanta Hub — Live Overview")
statusRow = Card([statusBadge, dateText], "sunk", "row", "m")
statusBadge = Badge("Operational", "success")
dateText = TextContent("**Today** · Updated 14:32 ET", "small")
performanceSection = Card([perfHeading, perfChart], "sunk")
perfHeading = Heading("On-Time Performance Today", "h3")
perfChart = LineChart(["00:00", "04:00", "08:00", "12:00", "16:00", "20:00", "23:59"], [perfSeries], "linear", "Time (ET)", "% On-Time")
perfSeries = Series("On-Time %", [88, 91, 87, 92, 90, 93, 91])
flightsSection = Card([flightsHeading, flightsTable])
flightsHeading = Heading("Flight Board", "h3")
flightsTable = Table([flightCol, routeCol, gateCol, statusCol])
flightCol = Col("Flight", ["DL 101", "DL 202", "DL 303", "DL 404", "DL 505", "DL 606"])
routeCol = Col("Route", ["ATL–JFK", "ATL–LAX", "ATL–ORD", "ATL–MIA", "ATL–SEA", "ATL–DFW"])
gateCol = Col("Gate", ["B12", "C4", "A7", "D9", "B22", "C15"])
statusCol = Col("Status", ["On Time", "Boarding", "Delayed", "On Time", "Delayed", "On Time"])
delayAlert = Callout("warning", "Delayed Flights", "DL 303 (ATL–ORD) and DL 505 (ATL–SEA) are delayed 45–60 min due to inbound crew availability.")
gateChanges = Card([gateHeading, gateList], "sunk")
gateHeading = Heading("Recent Gate Changes", "h3")
gateList = ListBlock([gateItem1, gateItem2, gateItem3], "number")
gateItem1 = ListItem("DL 202 moved", "Gate C4 → C6 at 14:10 ET")
gateItem2 = ListItem("DL 606 moved", "Gate C15 → C18 at 13:55 ET")
gateItem3 = ListItem("DL 101 moved", "Gate B12 → B14 at 13:40 ET")
crewSection = Card([crewHeading, crewTable])
crewHeading = Heading("Crews Available for Reassignment", "h3")
crewTable = Table([crewRole, crewCount])
crewRole = Col("Role", ["Pilots", "Flight Attendants", "Ground Staff"])
crewCount = Col("Available", [14, 32, 19])
weatherSection = Card([weatherHeading, weatherCallout], "sunk")
weatherHeading = Heading("Weather Advisories at Hub", "h3")
weatherCallout = TextCallout("warning", "Thunderstorm Watch", "Isolated storms near ATL 15:00–18:00 ET. Expect possible holds for arrivals.")
loadSection = Card([loadHeading, loadChart])
loadHeading = Heading("Average Passenger Load Today", "h3")
loadChart = SingleStackedBarChart(["Average Load"], [78])
riskSection = Card([riskHeading, riskTable], "sunk")
riskHeading = Heading("Connections at Risk of Being Missed", "h3")
riskTable = Table([connFlight, connRoute, connRisk])
connFlight = Col("Connecting Flight", ["DL 303", "DL 505"])
connRoute = Col("Route", ["ATL–ORD", "ATL–SEA"])
connRisk = Col("Risk", ["High", "Medium"])
rebookSection = Card([rebookHeading, rebookButtons])
rebookHeading = Heading("Rebook Affected Passengers", "h3")
rebookButtons = Buttons([rebookBtn, rebookAltBtn])
rebookBtn = Button("Rebook DL 303 passengers")
rebookAltBtn = Button("Rebook DL 505 passengers", null, "secondary")
hubSection = Card([hubHeading, hubSelect], "sunk")
hubHeading = Heading("Select Another Hub", "h3")
hubSelect = Select("hub", [hubAtl, hubJfk, hubLax, hubOrd], "Choose a hub")
hubAtl = SelectItem("ATL", "Atlanta (ATL)")
hubJfk = SelectItem("JFK", "New York (JFK)")
hubLax = SelectItem("LAX", "Los Angeles (LAX)")
hubOrd = SelectItem("ORD", "Chicago (ORD)")
cancelSection = Card([cancelHeading, cancelBadge], "sunk")
cancelHeading = Heading("Cancellations Today", "h3")
cancelBadge = Badge("2 flights canceled", "destructive")
turnaroundSection = Card([turnHeading, turnChart])
turnHeading = Heading("Average Turnaround Time", "h3")
turnChart = HorizontalBarChart(["ATL"], [turnSeries], "grouped", "Minutes", "Hub")
turnSeries = Series("Avg Turnaround", [52])