root = Card([header, currentStatus, deliveryDate, reportProblem])
header = CardHeader("Track Your Package", "Order #ORD-847291")
currentStatus = Callout("info", "Current Location", "Out for delivery — Driver: James M. • Last scan: 14:32 at Springfield Distribution Center • 3 stops away")
deliveryDate = Card([dateLabel, dateValue], "sunk", "row", "m", "center", "between")
dateLabel = TextContent("Estimated Delivery", "small-heavy")
dateValue = TextContent("Today by 8:00 PM", "large-heavy")
reportProblem = Buttons([problemBtn])
problemBtn = Button("Report a Problem", null, "secondary")
problemDialog = DialogBlock("Report a Problem", "Tell us what went wrong", "We'll investigate and get back to you within 24 hours", [problemForm], "default")
problemForm = Form("delivery-issue", problemButtons, [issueTypeField, descriptionField, photoField])
issueTypeField = FormControl("Issue Type", issueTypeSelect, "Select the type of problem")
issueTypeSelect = Select("issue_type", [optLate, optDamaged, optMissing, optWrongAddress, optOther], "Choose an issue")
optLate = SelectItem("late", "Package is late")
optDamaged = SelectItem("damaged", "Package arrived damaged")
optMissing = SelectItem("missing", "Package not delivered / missing")
optWrongAddress = SelectItem("wrong_address", "Delivered to wrong address")
optOther = SelectItem("other", "Other issue")
descriptionField = FormControl("Description", descriptionInput, "Please provide details about the issue")
descriptionInput = TextArea("description", "Describe what happened...", 4)
photoField = FormControl("Photos (optional)", photoInput, "Attach photos of damage or incorrect delivery")
photoInput = Input("photos", "Add photo URLs or upload", "text")
problemButtons = Buttons([submitBtn, cancelBtn])
submitBtn = Button("Submit Report", null, "primary")
cancelBtn = Button("Cancel", null, "tertiary")