#!/usr/bin/env python3
"""Build Joe's Daily Morning Package — Monday, March 30, 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("Monday, March 30, 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, "Today (Mon)", "High 62°F / Low 52°F  |  Partly sunny, isolated showers after 3 PM (20%)")
kv(doc, "Wind",        "SW @ 15 mph, gusts to 30 mph — breezy day")
kv(doc, "Tonight",     "Low 52°F  |  Scattered showers mainly after 2 AM (30%)")
kv(doc, "Tuesday",     "High 68°F  |  Scattered AM showers, then partly sunny. Warming up.")
kv(doc, "Wednesday",   "High 71°F  |  Rain likely after 2 PM (50%), T-storms possible Wed night (70%)")
kv(doc, "Thursday",    "High 61°F  |  Chance of AM rain, then clearing")
p = doc.add_paragraph()
r = p.add_run("⚠  Spring weather arriving — 60s today, pushing toward 70 by midweek. "
              "Keep an umbrella handy after 3 PM. Boat weather holds through Wednesday morning if you're thinking about it.")
r.font.size = Pt(10)
r.italic = True

doc.add_paragraph()

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

kv(doc, "Last Close (Fri 3/27)", "")
kv(doc, "  S&P 500",   "6,368.85    vs. Exit Baseline 3/25: 6,591.90  →  DOWN -223.05  (-3.38%)")
kv(doc, "  Dow Jones",  "45,167      vs. Exit Baseline 3/25: 46,429.49  →  DOWN -1,263  (-2.72%)")

kv(doc, "Premarket (6 AM Monday)", "")
kv(doc, "  S&P 500 Futures",  "6,435.75  (+23.50, +0.37%)  — modest green open expected")
kv(doc, "  Dow Futures",       "45,576    (+152, +0.33%)")
kv(doc, "  Nasdaq 100 Futures","23,398    (+70, +0.30%)")

kv(doc, "Commodities", "")
kv(doc, "  Oil (WTI)",   "$101.54  (+1.91%)  |  Brent: $114.94 (+0.32%)")
kv(doc, "  Gold",        "$4,531.86  (+0.86%)  — flight to safety continues")

p = doc.add_paragraph()
r = p.add_run(
    "📊  JFL&KL FUND:  Treasury position from March 25 continues to work. "
    "S&P down 3.38% since your exit. Dow in official correction territory (-10% from peak). "
    "Five straight losing weeks. Oil above $100 adding inflation pressure. Gold ripping past $4,500. "
    "Futures show a modest bounce this morning (+0.3-0.4%) but nothing to get excited about — "
    "could be a dead cat bounce. Middle East tensions still elevated. "
    "April 30 execution day is 31 days away. Stay patient. Watch for capitulation signals "
    "(VIX spike above 35, high-volume washout day) as potential early entry triggers."
)
r.font.size = Pt(10)
r.italic = True

doc.add_paragraph()

# ── Schedule / Reminders ──────────────────────────────────────────────────────
section_header(doc, "📅  TODAY'S SCHEDULE & REMINDERS  (Monday, March 30)")
bullet(doc, "Monday — start of week. Review action card, set priorities.")
bullet(doc, "Firehouse: Structural engineer follow-up on floor plans (V6 second floor finalized Sat)")
bullet(doc, "First floor plans V4 in progress — Joe marking up, iterate today")
bullet(doc, "CHARLESTON TRIP: Thursday April 2 → Sunday April 6  (3 DAYS AWAY!)")
bullet(doc, "🤫 PRIVATE: Vow renewal — Friday April 3 on Isle of Palms. Neisha confirmed April 3 availability. BOOK HER.")
bullet(doc, "ANNIVERSARY: April 3 — Joe & Keli. Non-negotiable.")
bullet(doc, "Isle of Palms rental contract reviewed — Joe to sign")
bullet(doc, "360 King Boutique Suites — book Thursday April 2 one night (call about early check-in)")
bullet(doc, "PORTFOLIO DAY: April 30 — 31 days out. Portfolio spreadsheet ready (29 stocks, 3 buckets).")
bullet(doc, "Surfbox Social Media: April 30 go-live target.")

doc.add_paragraph()

# ── Urgent Items ──────────────────────────────────────────────────────────────
section_header(doc, "🚨  URGENT / TOP OF MIND")
bullet(doc, "Charleston vow renewal — Neisha confirmed availability April 3. CALL/BOOK TODAY. 4 days out!")
bullet(doc, "360 King Boutique Suites — book Thursday April 2 one night near King St, Charleston")
bullet(doc, "Isle of Palms rental contract — review done, sign and return")
bullet(doc, "Squirrely video — Joe sent instructions. Need MOV 6136 and MOV 5153 clips to complete edit.")
bullet(doc, "TLC Coma video — final version done (tlc-coma-final.mp4). Send to Joe at jlynch@tlcnj.com.")
bullet(doc, "Firehouse existing plans PDF received — Studio 513 architect drawings (3 pages)")
bullet(doc, "Joey Young spreadsheet — commission/bonus calcs + inventory target still waiting")
bullet(doc, "Certificate of Compliance application + $150 fee for Phil Reed")

doc.add_paragraph()

# ── Weekend Recap ─────────────────────────────────────────────────────────────
section_header(doc, "📋  WEEKEND RECAP (What Rob Got Done)")
bullet(doc, "✅ Constellation Software deep-dive — Mark Leonard stepping down, stock -55%, recommended 1-2% allocation")
bullet(doc, "✅ T1D App competitor landscape — Dexcom invested $75M in Oura Ring, but NOBODY does prediction. Joe's thesis unique.")
bullet(doc, "✅ California Closets partnership analysis — Ocean County unserved, trade program is free to start")
bullet(doc, "✅ Keli's social media spring content pack — 2 weeks of posts ready")
bullet(doc, "✅ ReBolt competitive landscape — Permaplug did $665K, power tool niche is blue ocean")
bullet(doc, "✅ LBI spring real estate market brief — slowest Feb on record but prices holding at 97% of list")
bullet(doc, "✅ Colorant industry re-entry intel — ChromaScape under Capital Partners, 4 re-entry angles ranked")
bullet(doc, "✅ TLC Coma video edited — silent from 0:07, tagline added, full-screen portrait format")
bullet(doc, "✅ Firehouse floor plans — 2nd floor V6 final, 1st floor through V4")
bullet(doc, "✅ Lobster World Cup Pool — Survivor + Takeover pools designed, vision docs emailed")
bullet(doc, "✅ OpenClaw subscription migrated to Claude Max ($200/mo)")
bullet(doc, "✅ Cron jobs fixed (Telegram delivery)")
bullet(doc, "✅ Browser automation working")

doc.add_paragraph()

# ── Flagged Emails ────────────────────────────────────────────────────────────
section_header(doc, "📧  EMAIL FLAGS")
bullet(doc, "Nuptials by Neisha — officiant confirmed April 3 availability. Waiting on package pricing PDF.")
bullet(doc, "Danielle's flight — Southwest CHS→AUS, Mon Apr 6, confirmation B5FIM6, $619.23. FYI only.")
bullet(doc, "Squirrely video — Joe sent editing instructions + 1 clip. Needs 2 more clips (MOV 6136, MOV 5153).")
bullet(doc, "Firehouse architect plans — received, downloaded. Studio 513 set (3 pages).")

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("All active tasks organized by track. Check off as you go. Monday — set the week up right.")
r.font.size = Pt(10)
r.italic = True

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)
bullet(doc, "Morning package cron: output PDF instead of docx for reliable Brother printing", checkbox=True)

doc.add_paragraph()

# ── TRACK: CALLS ──────────────────────────────────────────────────────────────
section_header(doc, "📞  CALLS TO MAKE TODAY")
bullet(doc, "🚨 Nuptials by Neisha — BOOK vow renewal for April 3, Isle of Palms",      checkbox=True)
bullet(doc, "360 King Boutique Suites: (843) 680-7400 — book April 2 one night, request early check-in", checkbox=True)
bullet(doc, "Jersey Appliance: 609-918-1830 — Thermador hood (svc #275188)",             checkbox=True)
bullet(doc, "Mike the plumber (Ship Bottom Code Official) — walk-through for plumbing reno + HVAC", checkbox=True)
bullet(doc, "California Closets Marlton: (609) 655-1899 — Trade Program registration",   checkbox=True)
bullet(doc, "Ray O'Connor — confirm Charleston meetup April 3-6 (colorant discussion)",  checkbox=True)

doc.add_paragraph()

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

doc.add_paragraph()

# ── TRACK: TLC / SURFBOX ─────────────────────────────────────────────────────
section_header(doc, "🏗  TLC / SURFBOX")
bullet(doc, "Joey Young — chase spreadsheet: commission/bonus calcs + inventory target ($325K/$3,500)", 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 to complete",           checkbox=True)
bullet(doc, "Surfbox social media — April 30 go-live (one video per store per week)",     checkbox=True)
bullet(doc, "OBX Surfbox new rental pipeline investigation",                              checkbox=True)
bullet(doc, "Equipment: source used diesel dually forklift + low forklift (2026)",        checkbox=True)
bullet(doc, "Equipment disposals: Surfbox bus (NC), black box truck, one older forklift", checkbox=True)
bullet(doc, "Judy — staffing/overhead reduction",                                         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, Ship Bottom) — for sale or sold?",          checkbox=True)
bullet(doc, "539 paint store building — future uses research",                            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 at 6,369 (-3.4% since exit). Treasuries working. 31 days to April 30.")
bullet(doc, "Premarket: S&P futures +0.37%, Dow futures +0.33% — modest bounce")
bullet(doc, "Gold past $4,500, oil above $100 — inflation pressure building")
bullet(doc, "April 30 execution prep — portfolio spreadsheet ready (29 stocks, 3 buckets)", checkbox=True)
bullet(doc, "Constellation Software (CSU) — deep-dive complete. Recommend 1-2% allocation.", checkbox=False)
bullet(doc, "Watch for capitulation signals (VIX >35, high-volume washout)",               checkbox=False)
bullet(doc, "Roth conversion — coordinate with MacArthur: LLC distributions → W-2 restructure", checkbox=True)
bullet(doc, "Fidelity account setup — confirm transfer from Wells Fargo",                  checkbox=True)
bullet(doc, "Colorant re-entry — Ray O'Connor meeting in Charleston, come with strategic Qs", checkbox=False)

doc.add_paragraph()

# ── TRACK: FAMILY ─────────────────────────────────────────────────────────────
section_header(doc, "👨‍👩‍👧‍👧  FAMILY")
bullet(doc, "🤫 Charleston vow renewal — BOOK NEISHA TODAY (4 days!)",                    checkbox=True)
bullet(doc, "Anniversary April 3 — Keli gift / special plan finalized?",                  checkbox=True)
bullet(doc, "Charleston trip: April 2-6 — packing, travel logistics",                     checkbox=True)
bullet(doc, "360 King Boutique Suites — book April 2 one night",                          checkbox=True)
bullet(doc, "Isle of Palms rental contract — sign and return",                            checkbox=True)
bullet(doc, "Danielle — flight confirmed CHS→AUS Mon Apr 6 ($619.23, conf B5FIM6)",       checkbox=False)
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. Little things matter. ❤️",            checkbox=False)

doc.add_paragraph()

# ── TRACK: PROJECTS ──────────────────────────────────────────────────────────
section_header(doc, "🚀  PROJECTS")
bullet(doc, "Lobster World Cup Pool — Survivor + Takeover designed. Need: Venmo handle, PayPal.me, domain, player cap, invite code", checkbox=True)
bullet(doc, "ReBolt™ — competitive landscape done. Next: prototype refinement?",          checkbox=True)
bullet(doc, "T1D App — competitor landscape done. BIG IDEAs Lab dataset identified. Next step?", checkbox=True)
bullet(doc, "Keli social media — 2 weeks of 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, "Mar 31 (Tue) — 68°F, partly sunny. Last day of March.")
bullet(doc, "Apr 1 (Wed) — 71°F, rain after 2 PM. April Fools' Day.")
bullet(doc, "Apr 2 (Thu) — Drive to Charleston. 360 King check-in. Trip begins!")
bullet(doc, "Apr 3 (Fri) — ANNIVERSARY 🎉 + 🤫 Vow renewal ceremony, Isle of Palms")
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 media go-live")
bullet(doc, "Jun 11 — FIFA World Cup 2026 kicks off (Lobster Pool enrollment target: May)")
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 🦞 • Monday, March 30, 2026 • 6:00 AM ET\n"
    "Set the week up right, Joe. Charleston in 3 days. 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-03-30.docx"
doc.save(out)
print(f"Saved: {out}")
