#!/usr/bin/env python3
"""Generate Joe's Daily Morning Package — April 2, 2026"""

from docx import Document
from docx.shared import Inches, Pt, Cm, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT
import datetime

doc = Document()

# --- Styles ---
style = doc.styles['Normal']
font = style.font
font.name = 'Calibri'
font.size = Pt(11)

# --- HEADER ---
h = doc.add_heading('🦞 Rob Lobster — Daily Morning Package', level=0)
h.alignment = WD_ALIGN_PARAGRAPH.CENTER
for run in h.runs:
    run.font.color.rgb = RGBColor(0xC0, 0x39, 0x2B)

sub = doc.add_paragraph()
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = sub.add_run('Thursday, April 2, 2026 — 6:12 AM ET')
run.font.size = Pt(13)
run.font.color.rgb = RGBColor(0x55, 0x55, 0x55)

doc.add_paragraph()  # spacer

# ============================================================
# SECTION 1: WEATHER
# ============================================================
doc.add_heading('☁️ Weather — LBI / Tuckerton, NJ', level=1)
weather_data = [
    ('Current', 'Overcast, 48°F (feels 42°F)'),
    ('Humidity', '89%'),
    ('Wind', 'SW 15 mph'),
    ('Precipitation', 'None'),
    ('Sunrise / Sunset', '6:39 AM / 7:21 PM'),
    ('Outlook', 'Cool and overcast — jacket weather. No rain expected.'),
]
for label, val in weather_data:
    p = doc.add_paragraph()
    run = p.add_run(f'{label}: ')
    run.bold = True
    p.add_run(val)

# ============================================================
# SECTION 2: MARKET SNAPSHOT
# ============================================================
doc.add_heading('📈 Market Snapshot (April 1 Close)', level=1)

p = doc.add_paragraph()
p.add_run('Your exit was March 25, 2026 — 100% into treasuries. Here\'s where things stand:\n').italic = True

market_data = [
    ('S&P 500', '6,575', '6,591.90', '-16.90', '-0.26%'),
    ('Dow Jones', '46,575', '46,429.49', '+145.51', '+0.31%'),
]

table = doc.add_table(rows=1, cols=5)
table.style = 'Light Shading Accent 1'
table.alignment = WD_TABLE_ALIGNMENT.CENTER
hdr_cells = table.rows[0].cells
for i, txt in enumerate(['Index', 'Current', 'Exit Baseline', 'Change', '% Move']):
    hdr_cells[i].text = txt
    for paragraph in hdr_cells[i].paragraphs:
        for run in paragraph.runs:
            run.bold = True

for name, current, baseline, change, pct in market_data:
    row = table.add_row().cells
    row[0].text = name
    row[1].text = current
    row[2].text = baseline
    row[3].text = change
    row[4].text = pct

doc.add_paragraph()
p = doc.add_paragraph()
run = p.add_run('Bottom line: ')
run.bold = True
p.add_run('Markets essentially flat since your exit. S&P down a fraction, Dow up a hair. Your dry powder is intact. April 30 restructuring is 28 days away — patience is paying off.')

# ============================================================
# SECTION 3: TODAY'S SCHEDULE & KEY ITEMS
# ============================================================
doc.add_heading('📅 Today\'s Schedule & Urgent Items', level=1)

p = doc.add_paragraph()
run = p.add_run('🚨 CHARLESTON TRIP — TODAY')
run.bold = True
run.font.color.rgb = RGBColor(0xC0, 0x39, 0x2B)

items = [
    ('🏨 Harbourview Inn Check-In', '3:00 PM — 2 Vendue Range, Charleston SC\n   Confirmation #9086758916053 — Historic Wing, Two Queen Room\n   Complimentary continental breakfast included (but you may want better)'),
    ('💒 TOMORROW IS YOUR ANNIVERSARY', 'April 3 — Non-negotiable, most important day.\n   Make it special. You\'re in Charleston with Keli. This is the moment.'),
    ('🐣 Easter Weekend', 'Family gathering in Charleston — beach house rented, one block from beach.\n   All three girls + you & Keli. Ray O\'Connor meetup too.'),
    ('💰 PMK Contractors Invoice', '$13,750 — Old School Firehouse (INV-000143)\n   Judy cutting check from JL&KL TD Bank account today.\n   Judy to call you after 11 AM to discuss.'),
    ('📞 Judy Call', 'After 11 AM — re: PMK check + firehouse financials'),
]

for title, detail in items:
    p = doc.add_paragraph()
    run = p.add_run(title + '\n')
    run.bold = True
    p.add_run(detail)

# Breakfast recommendation
doc.add_heading('🍳 Charleston Breakfast Spots Near Harbourview Inn', level=2)
bfast = [
    ('Poogan\'s Porch', '72 Queen St (3 min walk) — Southern brunch institution, shrimp & grits'),
    ('Callie\'s Hot Little Biscuit', '476 King St (10 min) — Famous handmade biscuits, casual & fast'),
    ('Hominy Grill', 'If still open — classic Charleston breakfast, no frills, amazing food'),
    ('The Harbourview itself', 'Complimentary continental — decent if you want quick & easy before heading out'),
]
for name, desc in bfast:
    p = doc.add_paragraph(style='List Bullet')
    run = p.add_run(name + ' — ')
    run.bold = True
    p.add_run(desc)

# ============================================================
# SECTION 4: ACTION CARD
# ============================================================
doc.add_page_break()
h = doc.add_heading('✅ Action Card — April 2, 2026', level=0)
h.alignment = WD_ALIGN_PARAGRAPH.CENTER
for run in h.runs:
    run.font.color.rgb = RGBColor(0x1A, 0x5B, 0x2A)

# --- Track: Calls & People ---
doc.add_heading('📞 Calls & People', level=2)
calls = [
    '☐ Judy — after 11 AM (PMK check, firehouse account)',
    '☐ Frank Capecci — 973-229-9362 (reach out, wife passed Dec 2025)',
    '☐ Jersey Appliance — 609-918-1830 (Thermador hood, svc #275188)',
]
for item in calls:
    doc.add_paragraph(item)

# --- Track: Charleston / Family ---
doc.add_heading('❤️ Charleston Trip & Family', level=2)
charleston = [
    '☐ Check into Harbourview Inn — 3:00 PM',
    '☐ Scout anniversary dinner spot for tomorrow (Apr 3)',
    '☐ 🤫 Vow renewal logistics — Fri Apr 4 beach ceremony (officiant confirmed?)',
    '☐ Coordinate with Danielle, Juliana, Isabella on arrival times',
    '☐ Ray O\'Connor meetup — colorant industry catch-up',
]
for item in charleston:
    doc.add_paragraph(item)

# --- Track: Firehouse ---
doc.add_heading('🏚️ Old School Firehouse', level=2)
firehouse = [
    '☐ PMK invoice $13,750 — Judy cutting check today',
    '☐ Schedule Mike the plumber (Ship Bottom Code Official) — walk-through',
    '☐ Certificate of Compliance application + $150 fee for Phil Reed',
    '☐ Zoning compliance letter — tweak specifics, request borough letterhead',
]
for item in firehouse:
    doc.add_paragraph(item)

# --- Track: TLC / Surfbox ---
doc.add_heading('🪵 TLC & Surfbox', level=2)
tlc = [
    '☐ Joey Young — waiting on commission/bonus spreadsheet + interim inventory target',
    '☐ Epicor credit card surcharge module — check with Amanda',
    '☐ Surfbox social media — April 30 go-live (28 days)',
    '☐ Neal/Denise — outside sales priority call list for declining accounts',
    '☐ Surf City pricing matrix audit in Epicor',
    '☐ Concrete drain — target completion before Easter',
]
for item in tlc:
    doc.add_paragraph(item)

# --- Track: Properties & Real Estate ---
doc.add_heading('🏠 Properties & Real Estate', level=2)
props = [
    '☐ Corner Market / Causeway deal — 275 W 9th St (50/50 partnership evaluation)',
    '☐ Property tax appeal research — Chesterfield parcels (Block 301, Lots 10 & 12)',
    '☐ Keli social media — spring content pack ready, execution mode',
]
for item in props:
    doc.add_paragraph(item)

# --- Track: Investments ---
doc.add_heading('💰 Investments', level=2)
invest = [
    '☐ April 30 Portfolio Restructuring — 28 DAYS OUT',
    '☐ Track MELI, CSU, serial acquirers (Fairfax, Brookfield)',
    '☐ Roth IRA conversion — coordinate W-2 restructuring with Robert MacArthur',
    '☐ Monitor S&P vs 6,591.90 exit baseline daily',
]
for item in invest:
    doc.add_paragraph(item)

# --- Track: Tech / Mac ---
doc.add_heading('💻 Mac & Tech Setup', level=2)
tech = [
    '☐ Rob\'s Gmail send setup — rob.lobster.claw@gmail.com → jlynch@tlcnj.com',
    '☐ Gmail read-only API on josephfl12@gmail.com',
    '☐ Set up Outlook forwarding: Epicor/Surfbox reports → Rob\'s Gmail',
    '☐ ElevenLabs account + voice plugin setup',
    '☐ Switch back to Claude Max $200/mo plan',
    '☐ Set up Bella with her own OpenClaw',
]
for item in tech:
    doc.add_paragraph(item)

# --- Track: Errands ---
doc.add_heading('🔧 Errands & Personal', level=2)
errands = [
    '☐ Gio — $225 cash check for parents\' driveway work',
    '☐ 🔑 THE KEY PROJECT — organize 5 truck key rings',
    '☐ Rob Lobster voice clone — talk to Renee about audio/video clips',
    '☐ GLP-1 research — weight loss plan (target 185-195 lbs)',
]
for item in errands:
    doc.add_paragraph(item)

# --- Track: Coming Up ---
doc.add_heading('📆 Coming Up', level=2)
upcoming = [
    'Apr 2 — Charleston trip begins (TODAY)',
    'Apr 3 — 💒 ANNIVERSARY (non-negotiable)',
    'Apr 3-6 — Charleston Easter weekend, whole family',
    'Apr 4 — 🤫 Beach vow renewal ceremony',
    'Apr 30 — 💰 PORTFOLIO RESTRUCTURING DAY (28 days)',
    'Apr 30 — 🎂 Joe\'s birthday (turns 58)',
    'Apr 30 — Surfbox social media go-live',
    'May 19 — Keli\'s birthday',
]
for item in upcoming:
    doc.add_paragraph(item)

# --- Footer ---
doc.add_paragraph()
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = p.add_run('— 🦞 Rob Lobster | Chief of Staff | "Make good decisions" —')
run.italic = True
run.font.color.rgb = RGBColor(0x88, 0x88, 0x88)

# Save
outpath = '/Users/joemac/.openclaw/workspace/projects/daily/morning-package-2026-04-02.docx'
doc.save(outpath)
print(f'Saved: {outpath}')
