root = Card([header, kpiRow, searchForm, delayedCallout, shipmentsTable, carrierSplitHeader, carrierChart, weeklyVolumeHeader, weeklyChart, followUps], [src1])
header = CardHeader("Logistics Coordinator Board", "Last refreshed: 2026-04-15 14:32 UTC")
kpiRow = SnippetCardBlock([kpiOntime, kpiAvgCost], "grid", true)
kpiOntime = SnippetCardItem("ontime-pct", kpiOntimeLhs, kpiOntimeRhs)
kpiOntimeLhs = IconText(kpiOntimeIcon, "success", "m", "On-Time Delivery", "This month", false, "horizontal")
kpiOntimeIcon = Icon("truck", "transportation")
kpiOntimeRhs = BoldText("number", "92.4%", "+1.2% vs last month", "metric")
kpiAvgCost = SnippetCardItem("avg-cost", kpiAvgCostLhs, kpiAvgCostRhs)
kpiAvgCostLhs = IconText(kpiAvgCostIcon, "neutral", "m", "Avg Cost / Shipment", "All carriers", false, "horizontal")
kpiAvgCostIcon = Icon("circle-dollar-sign", "finance")
kpiAvgCostRhs = BoldText("number", "$1,847", "-$42 vs last month", "metric")
searchForm = Form("route-search", searchButtons, [fcRoute])
searchButtons = Buttons([btnSearch, btnClear], "row")
btnSearch = Button("Search", { type: "continue_conversation", context: "Search shipments by route" }, "primary")
btnClear = Button("Clear", { type: "continue_conversation", context: "Clear route filter" }, "secondary")
fcRoute = FormControl("Search by Route", routeInput, "Enter origin–destination (e.g. LAX → JFK)")
routeInput = Input("route-query", "LAX → JFK", "text")
delayedCallout = Callout("warning", "3 Delayed Shipments", "Shipments SH-4421, SH-4487, and SH-4502 are past ETA. Click a row to flag for escalation.", true)
shipmentsTable = Table([colId, colOrigin, colDest, colEta, colStatus, colCarrier, colCost, colFlag])
colId = Col("Shipment ID", ["SH-4421", "SH-4487", "SH-4502", "SH-4510", "SH-4518", "SH-4525", "SH-4533", "SH-4541", "SH-4550", "SH-4558"], "string")
colOrigin = Col("Origin", ["Shanghai", "Los Angeles", "Hamburg", "Singapore", "Rotterdam", "Dubai", "Busan", "Long Beach", "Antwerp", "Tokyo"], "string")
colDest = Col("Destination", ["Los Angeles", "New York", "Newark", "Los Angeles", "Houston", "Savannah", "Seattle", "Oakland", "Norfolk", "Long Beach"], "string")
colEta = Col("ETA", ["2026-04-12", "2026-04-13", "2026-04-11", "2026-04-18", "2026-04-20", "2026-04-22", "2026-04-25", "2026-04-26", "2026-04-28", "2026-04-30"], "string")
colStatus = Col("Status", ["Delayed", "Delayed", "Delayed", "In Transit", "In Transit", "In Transit", "In Transit", "In Transit", "In Transit", "In Transit"], "string")
colCarrier = Col("Carrier", ["Maersk", "CMA CGM", "Hapag-Lloyd", "MSC", "Cosco", "ONE", "Yang Ming", "Evergreen", "HMM", "ZIM"], "string")
colCost = Col("Cost ($)", [2140, 1890, 2310, 1650, 1780, 1920, 1540, 1680, 1830, 1710], "number")
colFlag = Col("Flag", ["Flag", "Flag", "Flag", "Flag", "Flag", "Flag", "Flag", "Flag", "Flag", "Flag"], "action")
carrierSplitHeader = InlineHeader("Volume Split by Carrier", "Share of shipments this month")
carrierChart = HorizontalBarChart(carrierLabels, [carrierSeries], "grouped", "Shipments", "Carrier")
carrierLabels = ["Maersk", "MSC", "CMA CGM", "Cosco", "Hapag-Lloyd", "ONE", "Evergreen", "Yang Ming", "HMM", "ZIM"]
carrierSeries = Series("Shipments", [142, 128, 115, 98, 87, 76, 64, 58, 51, 43])
weeklyVolumeHeader = InlineHeader("Weekly Volume (Past 8 Weeks)", "Total shipments per week")
weeklyChart = BarChart(weekLabels, [weekSeries], "grouped", "Week", "Shipments")
weekLabels = ["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8"]
weekSeries = Series("Shipments", [84, 91, 78, 102, 89, 95, 87, 93])
followUps = FollowUpBlock([fu1, fu2, fu3])
fu1 = FollowUpItem("Flag shipment SH-4421 for escalation")
fu2 = FollowUpItem("Show me all delayed shipments with root cause")
fu3 = FollowUpItem("Export this week's shipment report")
src1 = { title: "Internal Logistics Dashboard", sourceName: "TMS Platform", url: "https://tms.example.com/dashboard" }