root = Card([header, overview, activity, contacts, followups, noteSection, renewalWarning, callLogSection])
header = CardHeader("Acme Corporation", "Owned by Sarah Mitchell")
overview = Card([dealValue, dealStage, renewalInfo], "sunk", "row", "l", "center", "between")
dealValue = Card([valueLabel, valueAmount], "clear", "column", "xs", "center")
valueLabel = TextContent("Total Deal Value", "small")
valueAmount = TextContent("$247,500", "large-heavy")
dealStage = Card([stageLabel, stageTag], "clear", "column", "xs", "center")
stageLabel = TextContent("Current Stage", "small")
stageTag = Tag("Negotiation", null, "lg", "warning")
renewalInfo = Card([renewalLabel, renewalDate], "clear", "column", "xs", "center")
renewalLabel = TextContent("Renewal Date", "small")
renewalDate = TextContent("March 15, 2025", "large-heavy")
activity = Card([activityHeader, activityList], "card")
activityHeader = Heading("Recent Activity", "h3")
activityList = ListBlock([activity1, activity2, activity3, activity4], "number")
activity1 = ListItem("Demo completed", "Product demo with CTO and VP Engineering", null, null)
activity2 = ListItem("Proposal sent", "Enterprise tier proposal v2.1 delivered", null, null)
activity3 = ListItem("Legal review started", "Contract sent to legal for redlining", null, null)
activity4 = ListItem("Stakeholder meeting", "Quarterly business review scheduled", null, null)
contacts = Card([contactsHeader, contactsTable], "card")
contactsHeader = Heading("Contacts", "h3")
contactsTable = Table([contactName, contactRole, contactEmail, contactPhone])
contactName = Col("Name", ["James Chen", "Maria Rodriguez", "David Park", "Lisa Thompson"])
contactRole = Col("Role", ["CTO", "VP Engineering", "Procurement Lead", "Legal Counsel"])
contactEmail = Col("Email", ["j.chen@acme.com", "m.rodriguez@acme.com", "d.park@acme.com", "l.thompson@acme.com"])
contactPhone = Col("Phone", ["+1-555-0142", "+1-555-0187", "+1-555-0203", "+1-555-0291"])
followups = Card([followupsHeader, followupsList], "card")
followupsHeader = Heading("Open Follow-ups", "h3")
followupsList = ListBlock([followup1, followup2, followup3], "number")
followup1 = ListItem("Send revised pricing", "Due: January 20, 2025", null, null)
followup2 = ListItem("Schedule legal call", "Due: January 22, 2025", null, null)
followup3 = ListItem("Share security whitepaper", "Due: January 25, 2025", null, null)
noteSection = Card([noteHeader, noteForm], "card")
noteHeader = Heading("Add a Note", "h3")
noteForm = Form("add-note", noteButtons, [noteField])
noteField = FormControl("Note", noteInput, "Internal note for the account team")
noteInput = TextArea("note", "Write your note here...", 4, null, null)
noteButtons = Buttons([saveNoteBtn])
saveNoteBtn = Button("Save Note", null, "primary")
renewalWarning = Callout("warning", "Renewal Approaching", "Renewal is in 52 days. Start renewal conversations now to avoid service interruption.")
callLogSection = Card([callLogHeader, callLogTrigger], "card")
callLogHeader = Heading("Log a Call", "h3")
callLogTrigger = DialogBlock("Log Call", "Log a Call", "Record details from your recent call with this account", [callLogForm], "default")
callLogForm = Form("log-call", callLogButtons, [callDateField, callDurationField, callTypeField, callNotesField])
callDateField = FormControl("Call Date", callDateInput)
callDateInput = DatePicker("call_date", "single", null, null)
callDurationField = FormControl("Duration (minutes)", callDurationInput)
callDurationInput = Input("duration", "30", "number", null, null)
callTypeField = FormControl("Call Type", callTypeSelect)
callTypeSelect = Select("call_type", [callType1, callType2, callType3, callType4], "Select call type")
callType1 = SelectItem("discovery", "Discovery")
callType2 = SelectItem("demo", "Demo")
callType3 = SelectItem("negotiation", "Negotiation")
callType4 = SelectItem("check-in", "Check-in")
callNotesField = FormControl("Call Notes", callNotesInput, "Key discussion points, action items, next steps")
callNotesInput = TextArea("call_notes", "Summarize the call...", 5, null, null)
callLogButtons = Buttons([saveCallBtn, cancelCallBtn])
saveCallBtn = Button("Save Call Log", null, "primary")
cancelCallBtn = Button("Cancel", null, "tertiary")