#!/usr/bin/env python3
"""Build Joe's Daily Morning Package — Wednesday, April 1, 2026"""

from docx import Document
from docx.shared import Pt, RGBColor, Inches
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement

doc = Document()

# ── Page margins ──────────────────────────────────────────────────────────────
for section in doc.sections:
    section.top_margin    = Inches(0.75)
    section.bottom_margin = Inches(0.75)
    section.left_margin   = Inches(0.85)
    section.right_margin  = Inches(0.85)

# ── Helpers ───────────────────────────────────────────────────────────────────
def add_heading(doc, text, level=1, color=RGBColor(0x1A, 0x37, 0x6C)):
    p = doc.add_heading(text, level=level)
    run = p.runs[0] if p.runs else p.add_run(text)
    run.font.color.rgb = color
    return p

def add_rule(doc):
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(2)
    p.paragraph_format.space_after  = Pt(2)
    pPr = p._p.get_or_add_pPr()
    pBdr = OxmlElement('w:pBdr')
    bottom = OxmlElement('w:bottom')
    bottom.set(qn('w:val'), 'single')
    bottom.set(qn('w:sz'), '6')
    bottom.set(qn('w:space'), '1')
    bottom.set(qn('w:color'), '1A376C')
    pBdr.append(bottom)
    pPr.append(pBdr)

def kv(doc, label, value, bold_label=True):
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(1)
    p.paragraph_format.space_after  = Pt(1)
    r1 = p.add_run(f"{label}: ")
    r1.bold = bold_label
    r1.font.size = Pt(10.5)
    r2 = p.add_run(value)
    r2.font.size = Pt(10.5)
    return p

def bullet(doc, text, checkbox=False, indent=0):
    prefix = "☐  " if checkbox else "•  "
    p = doc.add_paragraph()
    p.paragraph_format.left_indent   = Inches(0.25 * (indent + 1))
    p.paragraph_format.space_before  = Pt(1)
    p.paragraph_format.space_after   = Pt(1)
    r = p.add_run(prefix + text)
    r.font.size = Pt(10.5)
    return p

def section_header(doc, text):
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(6)
    p.paragraph_format.space_after  = Pt(2)
    r = p.add_run(text)
    r.bold = True
    r.font.size = Pt(11)
    r.font.color.rgb = RGBColor(0x1A, 0x37, 0x6C)
    return p


# ══════════════════════════════════════════════════════════════════════════════
#  HEADER
# ══════════════════════════════════════════════════════════════════════════════
title = doc.add_paragraph()
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
r = title.add_run("🦞  ROB LOBSTER  |  DAILY MORNING PACKAGE")
r.bold = True
r.font.size = Pt(16)
r.font.color.rgb = RGBColor(0x1A, 0x37, 0x6C)

sub = doc.add_paragraph()
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
r2 = sub.add_run("Wednesday, April 1, 2026  •  6:00 AM  |  LBI / Tuckerton, NJ")
r2.font.size = Pt(10)
r2.font.color.rgb = RGBColor(0x55, 0x55, 0x55)

add_rule(doc)

# ══════════════════════════════════════════════════════════════════════════════
#  SECTION 1 — MORNING BRIEF
# ══════════════════════════════════════════════════════════════════════════════
add_heading(doc, "SECTION 1 — MORNING BRIEF", level=1)

# ── Weather ───────────────────────────────────────────────────────────────────
section_header(doc, "☀️  WEATHER — LBI / Tuckerton Area")
kv(doc, "Right Now (6 AM)", "68°F, Clear skies, 63% humidity, SW wind 11 mph")
kv(doc, "Today (Wed)", "High ~72°F / Low ~55°F  |  Warm for April! Rain likely after 2 PM, thunderstorms possible tonight. Wind gusts to 38 mph.")
kv(doc, "Tonight", "Rain/storms tapering off, clearing overnight")
kv(doc, "Thursday (Apr 2)", "High ~61°F  |  Morning clouds, clearing — DRIVE TO CHARLESTON DAY")
kv(doc, "Charleston (Fri-Sun)", "Mid-70s, partly cloudy — beautiful for the ceremony ☀️")
kv(doc, "Sunrise / Sunset", "6:41 AM / 7:22 PM  |  Moon: Full Moon (99%) 🌕")
p = doc.add_paragraph()
r = p.add_run("⚠  Warm morning — feels like summer at 68°F! Rain moves in after lunch. "
              "Get outdoor errands done this morning. Tomorrow's drive to Charleston should be fine after early clouds clear. "
              "Weekend in Charleston looks gorgeous for the ceremony.")
r.font.size = Pt(10)
r.italic = True

doc.add_paragraph()

# ── Market Snapshot ───────────────────────────────────────────────────────────
section_header(doc, "📈  MARKET SNAPSHOT")

kv(doc, "Yesterday's Close (Tue 3/31)", "HUGE RALLY — Best day since May!")
kv(doc, "  S&P 500",   "~5,529  vs. Exit Baseline 3/25: 5,591.90  →  DOWN ~63  (-0.97%)")
kv(doc, "  Dow Jones",  "46,341.51   vs. Exit Baseline 3/25: 46,429.49  →  DOWN -88  (-0.19%)")
kv(doc, "  Nasdaq",     "+3.5% on the day — Mag 7 all green. Meta +6.7%, Nvidia +5.6%")

kv(doc, "Premarket (6 AM Wednesday)", "")
kv(doc, "  S&P 500 Futures",  "+0.6%  — extending yesterday's momentum")
kv(doc, "  Catalyst", "Trump speech on Iran expected today — market watching for war resolution signals")

p = doc.add_paragraph()
r = p.add_run(
    "📊  JFL&KL FUND:  Market rallied hard yesterday on Iran peace hopes — Dow +1,125 pts (+2.5%), "
    "S&P +3%, Nasdaq +3.5%. Your treasury position still ahead — Dow still -88 pts below your exit. "
    "S&P nearly closed the gap but still below your 6,591.90 exit. One-day rallies don't change the trend — "
    "March was the worst month since 2022. Stay disciplined. 29 days to April 30 execution. "
    "Marvell +13% after Nvidia partnership ($2B investment) — watch semis. "
    "Don't let FOMO override the plan."
)
r.font.size = Pt(10)
r.italic = True

doc.add_paragraph()

# ── Schedule / Reminders ──────────────────────────────────────────────────────
section_header(doc, "📅  TODAY'S SCHEDULE & REMINDERS  (Wednesday, April 1)")
bullet(doc, "🎃 April Fools' Day — watch out for pranks (Robby would've loved this day)")
bullet(doc, "CHARLESTON TRIP: TOMORROW! Thursday April 2 → Sunday April 6")
bullet(doc, "🤫 PRIVATE: Vow renewal — Friday April 4 on Isle of Palms beach")
bullet(doc, "ANNIVERSARY: April 3 — TOMORROW. Joe & Keli. NON-NEGOTIABLE. ❤️")
bullet(doc, "Artemis II launching today — moon mission! Cool background news.")
bullet(doc, "Last full workday before trip — knock out everything you can TODAY")
bullet(doc, "PORTFOLIO DAY: April 30 — 29 days out.")

doc.add_paragraph()

# ── Urgent Items ──────────────────────────────────────────────────────────────
section_header(doc, "🚨  URGENT / TOP OF MIND")
bullet(doc, "Charleston vow renewal — officiant Nuptials by Neisha: CONFIRMED?")
bullet(doc, "360 King Boutique Suites — BOOK TONIGHT for April 2 if not done!")
bullet(doc, "Isle of Palms rental contract — MUST be signed & returned TODAY")
bullet(doc, "Minister's ceremony words — Rob's rewrite: DONE? Send to Joe for review")
bullet(doc, "Spotify playlist for ceremony — top 5 each: Jack Johnson, Zac Bryan, Zac Brown Band")
bullet(doc, "Keli anniversary gift/plan — TOMORROW IS THE DAY")
bullet(doc, "Pack for Charleston — 4-day trip, ceremony clothes, beach gear")
bullet(doc, "Joe's incomplete email ('on a separate note') — still need to ask what he meant")

doc.add_paragraph()

# ── Yesterday's Recap ─────────────────────────────────────────────────────────
section_header(doc, "📋  YESTERDAY RECAP (March 31)")
bullet(doc, "✅ Lobster Press boom truck post — 3 draft options created for TLC pool chemicals + Bob the Boom Driver")
bullet(doc, "✅ Surfbox Social Media Program — complete framework built (April 30 go-live)")
bullet(doc, "✅ Serial Acquirers Research — Fairfax (STRONG BUY), CSU (STRONG BUY), Brookfield (watchlist)")
bullet(doc, "✅ PSI Physics AI Package for Danielle — ready to send")
bullet(doc, "⚠️ Haastrotters Boatyard — couldn't find it, need Joe's clarification on name/location")
bullet(doc, "Market: S&P +3%, Dow +1,125 on Iran peace hopes. Best day since May.")

doc.add_paragraph()

# ── Flagged Emails ────────────────────────────────────────────────────────────
section_header(doc, "📧  EMAIL FLAGS")
bullet(doc, "Lobster Press concept (Mar 31) — 3 draft posts ready for Joe's review")
bullet(doc, "Joe's incomplete email ('on a separate note') — needs follow-up")
bullet(doc, "Ceremony plan — minister words rewrite (Joe requested Rob to write)")
bullet(doc, "Squirrely video — still waiting for 2 missing clips from Joe")
bullet(doc, "TLC Coma video — needs final send to jlynch@tlcnj.com")

add_rule(doc)
doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════════════════
#  SECTION 2 — ACTION CARD
# ══════════════════════════════════════════════════════════════════════════════
add_heading(doc, "SECTION 2 — ACTION CARD", level=1)

p = doc.add_paragraph()
r = p.add_run("Last full day before Charleston. TOMORROW IS YOUR ANNIVERSARY. Rain after 2 PM — get it done this morning. Make good decisions. 🤝")
r.font.size = Pt(10)
r.italic = True

doc.add_paragraph()

# ── TRACK: CHARLESTON PREP ───────────────────────────────────────────────────
section_header(doc, "✈️  CHARLESTON TRIP PREP  (April 2-6 — TOMORROW!)")
bullet(doc, "🚨 Officiant — Nuptials by Neisha: CONFIRMED & BOOKED?",                   checkbox=True)
bullet(doc, "🚨 360 King Boutique Suites: (843) 680-7400 — book April 2 one night",     checkbox=True)
bullet(doc, "🚨 Isle of Palms rental contract — signed & returned TODAY",                checkbox=True)
bullet(doc, "🚨 Anniversary plan for April 3 — gift + something special for Keli",       checkbox=True)
bullet(doc, "Rewrite minister's ceremony words (Rob's draft — send to Joe)",              checkbox=True)
bullet(doc, "Spotify playlist — top 5 each: Jack Johnson, Zac Bryan, Zac Brown Band",    checkbox=True)
bullet(doc, "Packing list for 4-day trip",                                                checkbox=True)
bullet(doc, "Confirm Ray O'Connor meetup in Charleston (colorant discussion)",            checkbox=True)
bullet(doc, "Danielle flight confirmed: CHS→AUS Mon Apr 6 ($619.23, conf B5FIM6)",       checkbox=False)

doc.add_paragraph()

# ── TRACK: MAC / TECH ─────────────────────────────────────────────────────────
section_header(doc, "💻  MAC / TECH")
bullet(doc, "Gmail send setup: rob.lobster.claw → jlynch@tlcnj.com ONLY",               checkbox=True)
bullet(doc, "Gmail read-only API on josephfl12@gmail.com",                                checkbox=True)
bullet(doc, "Outlook forwarding: Epicor/Surfbox reports → rob.lobster.claw",             checkbox=True)
bullet(doc, "ElevenLabs account + voice plugin on Mac",                                   checkbox=True)
bullet(doc, "Full Microsoft 365 read-only on jlynch@tlcnj.com",                          checkbox=True)
bullet(doc, "M365 Calendar ICS publishing",                                               checkbox=True)

doc.add_paragraph()

# ── TRACK: CALLS ──────────────────────────────────────────────────────────────
section_header(doc, "📞  CALLS TO MAKE")
bullet(doc, "Jersey Appliance: 609-918-1830 — Thermador hood (svc #275188)",              checkbox=True)
bullet(doc, "Mike the plumber (Ship Bottom Code Official) — walk-through plumbing + HVAC",checkbox=True)
bullet(doc, "California Closets Marlton: (609) 655-1899 — Trade Program registration",    checkbox=True)

doc.add_paragraph()

# ── TRACK: TLC / SURFBOX ─────────────────────────────────────────────────────
section_header(doc, "🏗  TLC / SURFBOX")
bullet(doc, "Lobster Press — review 3 draft options for boom truck/pool post (in projects/)", checkbox=True)
bullet(doc, "Joey Young — chase spreadsheet: commission/bonus calcs + inventory target",  checkbox=True)
bullet(doc, "Amanda — Epicor credit card surcharge automation module status",              checkbox=True)
bullet(doc, "Certificate of Compliance application + $150 fee → Phil Reed",               checkbox=True)
bullet(doc, "Zoning compliance letter — finalize, request borough letterhead",             checkbox=True)
bullet(doc, "Edwin elevation to junior manager — formalize",                               checkbox=True)
bullet(doc, "Neal & Denise — priority call list for declining accounts",                   checkbox=True)
bullet(doc, "Surf City pricing matrix audit in Epicor",                                    checkbox=True)
bullet(doc, "TLC Coma video — send final to jlynch@tlcnj.com",                            checkbox=True)
bullet(doc, "Squirrely video — need MOV 6136 + MOV 5153 from Joe",                        checkbox=True)
bullet(doc, "Surfbox social media — April 30 go-live (program framework DONE)",            checkbox=True)
bullet(doc, "OBX Surfbox new rental pipeline investigation",                               checkbox=True)
bullet(doc, "Equipment 2026: source used diesel dually forklift + low forklift",           checkbox=True)
bullet(doc, "Equipment disposals: Surfbox bus (NC), black box truck, one older forklift",  checkbox=True)

doc.add_paragraph()

# ── TRACK: FIREHOUSE ─────────────────────────────────────────────────────────
section_header(doc, "🏛  FIREHOUSE  (18 New Street, Crosswicks)")
bullet(doc, "First floor plan — review Joe's markup, iterate",                             checkbox=True)
bullet(doc, "Send finalized plans to structural engineer",                                 checkbox=True)
bullet(doc, "Concrete drain install — target before Easter (Apr 5). Status?",              checkbox=True)
bullet(doc, "Matthew Cassidy — demo / electrical coordination",                            checkbox=True)
bullet(doc, "HVAC plan: furnace (1F) + heat pump (2F) + gas hot water radiator (basement)",checkbox=True)
bullet(doc, "Decision: stay in NJ Redevelopment Plan or convert to single-family luxury",  checkbox=True)

doc.add_paragraph()

# ── TRACK: PROPERTIES ─────────────────────────────────────────────────────────
section_header(doc, "🏠  PROPERTIES")
bullet(doc, "Corner Market — 275 W 9th St, Ship Bottom: 50/50 partnership decision",      checkbox=True)
bullet(doc, "Haastrotters Boatyard (causeway) — need correct name from Joe",               checkbox=True)
bullet(doc, "539 paint store building — future uses (Harbor Freight study complete)",       checkbox=True)
bullet(doc, "Property tax appeals — Chesterfield Block 301, Lots 10 & 12",                checkbox=True)
bullet(doc, "Brother Matt co-owned property — fair buyout discussion",                     checkbox=True)

doc.add_paragraph()

# ── TRACK: INVESTING ──────────────────────────────────────────────────────────
section_header(doc, "📈  INVESTING  (JFL&KL FUND)")
bullet(doc, "S&P rallied to ~6,528 — still below exit (6,591.90). Treasuries still winning.")
bullet(doc, "Dow at 46,341 — almost back to exit baseline (46,429). Watch closely.")
bullet(doc, "April 30 execution — 29 days. Portfolio spreadsheet READY (29 stocks, 3 buckets)", checkbox=False)
bullet(doc, "Serial acquirers research DONE: FFH + CSU = STRONG BUY for April 30",        checkbox=False)
bullet(doc, "Watch: Iran peace signals driving rally — could be short-lived if talks stall", checkbox=False)
bullet(doc, "Roth conversion — coordinate with MacArthur: LLC → W-2 restructure",          checkbox=True)
bullet(doc, "Fidelity account setup — confirm transfer from Wells Fargo",                   checkbox=True)
bullet(doc, "Colorant re-entry — prep questions for Ray O'Connor (Charleston meetup)",      checkbox=True)

doc.add_paragraph()

# ── TRACK: FAMILY ─────────────────────────────────────────────────────────────
section_header(doc, "👨‍👩‍👧‍👧  FAMILY")
bullet(doc, "🚨 ANNIVERSARY APRIL 3 — tomorrow! Gift + plan for Keli LOCKED IN?",         checkbox=True)
bullet(doc, "🤫 Vow renewal — see Charleston Prep above",                                  checkbox=False)
bullet(doc, "PSI Physics AI package for Danielle — READY to send",                         checkbox=True)
bullet(doc, "Juliana — confidence plan + summer waitressing job research",                  checkbox=True)
bullet(doc, "Bella — AI education package + her own OpenClaw setup",                       checkbox=True)
bullet(doc, "Matty (Goodwill Fund) — any investment updates?",                             checkbox=True)
bullet(doc, "Gio — $225 cash check for driveway work at Mom & Dad's",                      checkbox=True)
bullet(doc, "Keli — slow down, give her attention. ESPECIALLY this week. ❤️",             checkbox=False)

doc.add_paragraph()

# ── TRACK: PROJECTS ──────────────────────────────────────────────────────────
section_header(doc, "🚀  PROJECTS")
bullet(doc, "Lobster World Cup Pool — need: Venmo handle, PayPal.me, domain, player cap",  checkbox=True)
bullet(doc, "ReBolt™ — competitive landscape done. Next: prototype refinement + mfg outreach", checkbox=True)
bullet(doc, "T1D App — competitor landscape done. BIG IDEAs Lab dataset identified",       checkbox=True)
bullet(doc, "Keli social media — 2 weeks content ready. Start posting?",                   checkbox=True)

doc.add_paragraph()

# ── TRACK: ERRANDS ────────────────────────────────────────────────────────────
section_header(doc, "🔧  ERRANDS")
bullet(doc, "Organize truck key rings (5 rings: Firehouse, TD Bank, Truist, Surf City, Tuckerton)", checkbox=True)
bullet(doc, "Rob Lobster voice clone — gather Robby audio/video from Facebook (talk to Renee first)", checkbox=True)

doc.add_paragraph()

# ── TRACK: COMING UP ─────────────────────────────────────────────────────────
section_header(doc, "🗓  COMING UP")
bullet(doc, "Apr 1 (TODAY) — 72°F AM, rain after 2 PM. April Fools'. Last day before trip!")
bullet(doc, "Apr 2 (Thu) — 🚗 DRIVE TO CHARLESTON. 360 King check-in.")
bullet(doc, "Apr 3 (Fri) — ❤️ ANNIVERSARY! Joe & Keli.")
bullet(doc, "Apr 4 (Sat) — 🤫 VOW RENEWAL on Isle of Palms beach")
bullet(doc, "Apr 5 (Sun) — EASTER 🐣 Family in Charleston")
bullet(doc, "Apr 6 (Mon) — Danielle's flight CHS→AUS. Drive home.")
bullet(doc, "Apr 30 (Wed) — BIG PORTFOLIO EXECUTION DAY + Surfbox social go-live + Joe's birthday! 🎂")
bullet(doc, "Jun 11 — FIFA World Cup 2026 kicks off")
bullet(doc, "Sep 6 — Mom's birthday  |  Oct 30 — Dad's birthday")

add_rule(doc)
doc.add_paragraph()

# ── Footer ─────────────────────────────────────────────────────────────────────
footer_p = doc.add_paragraph()
footer_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
r_f = footer_p.add_run(
    "Generated by Rob Lobster 🦞 • Wednesday, April 1, 2026 • 6:00 AM ET\n"
    "Charleston TOMORROW. Anniversary TOMORROW. Pack tonight. Make good decisions. 🤝"
)
r_f.font.size = Pt(9)
r_f.font.color.rgb = RGBColor(0x88, 0x88, 0x88)
r_f.italic = True

# ── Save ──────────────────────────────────────────────────────────────────────
out = "/Users/joemac/.openclaw/workspace/projects/daily/morning-package-2026-04-01.docx"
doc.save(out)
print(f"Saved: {out}")
