root = Card([header, ordersToday, kpisCard, chartVolume, table, filterForm, markFulfilledBtn])
header = CardHeader("E‑commerce Operations Dashboard", null)
ordersToday = TextContent("Orders placed today: 45", "large")
kpisCard = Card([revenueToday, avgOrderToday, refundRate])
revenueToday = TextContent("Revenue: $125,400", "large")
avgOrderToday = TextContent("Avg Order Value: $62.70", "large")
refundRate = TextCallout("info", "Refund Rate", "12% this month")
chartVolume = BarChart(orderVolumeLabels, orderVolumeSeries, "grouped", "Week", "Orders")
orderVolumeLabels = ["W1","W2","W3","W4"]
orderVolumeSeries = Series("Orders", [150,200,180,210])
table = Table([colId, colCustomer, colTotal, colStatus])
colId = Col("Order ID", [1001,1002,1003,1004,1005], "string")
colCustomer = Col("Customer", ["Alice","Bob","Charlie","Diana","Eve"], "string")
colTotal = Col("Total", [250,75,120,300,180], "number")
colStatus = Col("Status", ["Pending","Delivered","Delivered","Pending","Shipped"], "string")
filterForm = Form("order_filter", formButtons, [statusCtrl, searchCtrl])
statusSelect = Select("order_status", [statusPending, statusDelivered, statusCancelled], "Choose status", "medium")
customerInput = Input("customer_name", "Search customer...", "text")
searchCtrl = FormControl("Search customer", customerInput, "Search by name")
statusCtrl = FormControl("Filter by status", statusSelect, "Select status")
formButtons = Buttons([applyBtn])
applyBtn = Button("Apply", null, "primary")
markFulfilledBtn = Button("Mark fulfilled", null, "secondary", "normal", "medium")