from docx import Document
from docx.shared import Pt, RGBColor, Inches, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.style import WD_STYLE_TYPE
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy, json, shutil

PINK   = RGBColor(0xE8, 0x19, 0x5A)
VIOLET = RGBColor(0x7C, 0x3A, 0xED)
TEAL   = RGBColor(0x08, 0x91, 0xB2)
AMBER  = RGBColor(0xD9, 0x77, 0x06)
GREEN  = RGBColor(0x05, 0x96, 0x69)
BLUE   = RGBColor(0x25, 0x63, 0xEB)
DARK   = RGBColor(0x11, 0x18, 0x27)
BODY   = RGBColor(0x37, 0x41, 0x51)
GRAY   = RGBColor(0x6B, 0x72, 0x80)
WHITE  = RGBColor(0xFF, 0xFF, 0xFF)
SOFT   = RGBColor(0xF9, 0xFA, 0xFB)
BORDER = RGBColor(0xE5, 0xE7, 0xEB)
PINK_BG = RGBColor(0xFF, 0xF0, 0xF5)

doc = Document()

for section in doc.sections:
    section.top_margin    = Cm(2.0)
    section.bottom_margin = Cm(2.0)
    section.left_margin   = Cm(2.5)
    section.right_margin  = Cm(2.5)

def set_cell_bg(cell, hex_color):
    tc = cell._tc
    tcPr = tc.get_or_add_tcPr()
    shd = OxmlElement('w:shd')
    shd.set(qn('w:val'), 'clear')
    shd.set(qn('w:color'), 'auto')
    shd.set(qn('w:fill'), hex_color)
    tcPr.append(shd)

def set_cell_borders(cell, top=None, bottom=None, left=None, right=None):
    tc = cell._tc
    tcPr = tc.get_or_add_tcPr()
    tcBorders = OxmlElement('w:tcBorders')
    for side, val in [('top', top), ('bottom', bottom), ('left', left), ('right', right)]:
        if val:
            el = OxmlElement(f'w:{side}')
            el.set(qn('w:val'), val.get('val', 'single'))
            el.set(qn('w:sz'), str(val.get('sz', 6)))
            el.set(qn('w:color'), val.get('color', 'E5E7EB'))
            tcBorders.append(el)
    tcPr.append(tcBorders)

def add_paragraph(text='', bold=False, italic=False, size=11, color=None, align=WD_ALIGN_PARAGRAPH.LEFT, space_before=0, space_after=6):
    p = doc.add_paragraph()
    p.alignment = align
    p.paragraph_format.space_before = Pt(space_before)
    p.paragraph_format.space_after  = Pt(space_after)
    if text:
        run = p.add_run(text)
        run.bold   = bold
        run.italic = italic
        run.font.size = Pt(size)
        run.font.color.rgb = color or DARK
    return p

def add_mixed(parts, align=WD_ALIGN_PARAGRAPH.LEFT, space_before=0, space_after=6):
    p = doc.add_paragraph()
    p.alignment = align
    p.paragraph_format.space_before = Pt(space_before)
    p.paragraph_format.space_after  = Pt(space_after)
    for text, bold, color, size in parts:
        run = p.add_run(text)
        run.bold = bold
        run.font.size = Pt(size)
        run.font.color.rgb = color
    return p

def add_cover_title():
    p = doc.add_paragraph()
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    p.paragraph_format.space_before = Pt(60)
    p.paragraph_format.space_after  = Pt(4)
    r1 = p.add_run('GHL Agency\n')
    r1.bold = True
    r1.font.size = Pt(36)
    r1.font.color.rgb = DARK
    r2 = p.add_run('Starter Prompt Pack')
    r2.bold = True
    r2.font.size = Pt(36)
    r2.font.color.rgb = PINK

def add_stats_row():
    table = doc.add_table(rows=1, cols=3)
    table.style = 'Table Grid'
    table.alignment = WD_ALIGN_PARAGRAPH.CENTER
    for i, (num, label) in enumerate([('100', 'PROMPTS'), ('8', 'CATEGORIES'), ('\u221e', 'USES')]):
        cell = table.cell(0, i)
        set_cell_bg(cell, 'FFFFFF')
        p = cell.paragraphs[0]
        p.alignment = WD_ALIGN_PARAGRAPH.CENTER
        p.paragraph_format.space_before = Pt(8)
        p.paragraph_format.space_after  = Pt(2)
        r = p.add_run(num + '\n')
        r.bold = True
        r.font.size = Pt(28)
        r.font.color.rgb = PINK
        r2 = p.add_run(label)
        r2.bold = True
        r2.font.size = Pt(9)
        r2.font.color.rgb = GRAY
    return table

def add_cat_banner(emoji, eyebrow, title, desc, bg_hex='FFF0F6'):
    table = doc.add_table(rows=1, cols=1)
    table.style = 'Table Grid'
    cell = table.cell(0, 0)
    set_cell_bg(cell, bg_hex)
    p = cell.paragraphs[0]
    p.paragraph_format.space_before = Pt(4)
    p.paragraph_format.space_after  = Pt(4)
    p.alignment = WD_ALIGN_PARAGRAPH.LEFT
    r_ey = p.add_run(eyebrow.upper() + '\n')
    r_ey.bold = True
    r_ey.font.size = Pt(8)
    r_ey.font.color.rgb = GRAY
    r_t = p.add_run(emoji + '  ' + title + '\n')
    r_t.bold = True
    r_t.font.size = Pt(16)
    r_t.font.color.rgb = DARK
    r_d = p.add_run(desc)
    r_d.font.size = Pt(10)
    r_d.font.color.rgb = BODY
    doc.add_paragraph().paragraph_format.space_after = Pt(4)
    return table

def add_prompt_card(num, title, tags, prompt_text):
    table = doc.add_table(rows=1, cols=1)
    table.style = 'Table Grid'
    outer = table.cell(0, 0)
    set_cell_bg(outer, 'FFFFFF')
    p = outer.paragraphs[0]
    p.paragraph_format.space_before = Pt(2)
    p.paragraph_format.space_after  = Pt(2)
    r_num = p.add_run(f'{num}  ')
    r_num.bold = True
    r_num.font.size = Pt(10)
    r_num.font.color.rgb = PINK
    r_t = p.add_run(title + '\n')
    r_t.bold = True
    r_t.font.size = Pt(11)
    r_t.font.color.rgb = DARK
    r_tags = p.add_run('  '.join([f'[{t}]' for t in tags]) + '\n')
    r_tags.font.size = Pt(8)
    r_tags.font.color.rgb = VIOLET
    r_lbl = p.add_run('\U0001f4cb Copy & Paste \u2192\n')
    r_lbl.bold = True
    r_lbl.font.size = Pt(8)
    r_lbl.font.color.rgb = GRAY
    r_pt = p.add_run(prompt_text)
    r_pt.font.size = Pt(10)
    r_pt.font.color.rgb = BODY
    sp = doc.add_paragraph()
    sp.paragraph_format.space_after = Pt(6)

def add_section_break():
    p = doc.add_paragraph('\u2500' * 80)
    p.paragraph_format.space_before = Pt(8)
    p.paragraph_format.space_after  = Pt(8)
    run = p.runs[0]
    run.font.size = Pt(6)
    run.font.color.rgb = BORDER

def add_page_break():
    doc.add_page_break()

def add_h1(text):
    p = add_paragraph(text, bold=True, size=20, color=DARK, space_before=12, space_after=4)
    p.alignment = WD_ALIGN_PARAGRAPH.LEFT
    return p

def add_h2(text, color=PINK):
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(8)
    p.paragraph_format.space_after  = Pt(4)
    r = p.add_run(text)
    r.bold = True
    r.font.size = Pt(14)
    r.font.color.rgb = color
    return p

def add_tip_box(label, text):
    table = doc.add_table(rows=1, cols=1)
    table.style = 'Table Grid'
    cell = table.cell(0, 0)
    set_cell_bg(cell, 'FFF5F8')
    p = cell.paragraphs[0]
    p.paragraph_format.space_before = Pt(4)
    p.paragraph_format.space_after  = Pt(4)
    r_l = p.add_run(label + '\n')
    r_l.bold = True
    r_l.font.size = Pt(9)
    r_l.font.color.rgb = PINK
    r_t = p.add_run(text)
    r_t.font.size = Pt(10)
    r_t.font.color.rgb = BODY
    doc.add_paragraph().paragraph_format.space_after = Pt(6)
# ══════════════════════════════
# COVER PAGE
# ══════════════════════════════
add_paragraph('\u26a1  VOL. 1 \u2014 GHL ESSENTIALS', bold=True, size=9, color=PINK,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=8)
add_paragraph('THE AGENCY OWNER\'S SHORTCUT', bold=False, size=9, color=GRAY,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=8)
add_cover_title()
add_paragraph(
    '100 ready-to-use ChatGPT prompts for GHL agencies \u2014 covering lead gen, follow-up, '
    'onboarding, ad copy, client retention, social media, sales scripts, and email marketing.',
    size=12, color=BODY, align=WD_ALIGN_PARAGRAPH.CENTER, space_before=10, space_after=20
)
add_stats_row()
add_paragraph('', space_before=14, space_after=4)
cats_list = ['\U0001f3af Lead Generation', '\U0001f504 Follow-Up Sequences', '\U0001f91d Client Onboarding',
        '\U0001f4e2 Ad Copy & Funnels', '\U0001f4ca Client Retention', '\U0001f4f1 Social Media',
        '\U0001f4b0 Sales & Closing', '\u2709\ufe0f Email Marketing']
add_paragraph('  \u00b7  '.join(cats_list), size=10, color=GRAY,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=8, space_after=20)
add_paragraph('MelAI \u2726 HireAI  |  2026 Edition', bold=True, size=10, color=GRAY,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=40, space_after=0)

add_page_break()

# ══════════════════════════════
# HOW TO USE
# ══════════════════════════════
add_paragraph('GETTING STARTED', bold=True, size=9, color=PINK, space_before=0, space_after=4)
add_h1('How to Use This Prompt Pack')

steps = [
    ('01  Fill In the Brackets',
     'Every prompt has [placeholders]. Replace them with your niche, client name, offer, or specific details before running the prompt.'),
    ('02  Pick Your AI Tool',
     'Works with ChatGPT GPT-4o, Claude, or Gemini. ChatGPT GPT-4o gives the best copywriting output for marketing content.'),
    ('03  Iterate & Refine',
     'After the first output follow up: "Make it shorter", "More casual", "Add urgency", or "Write 3 variations."'),
    ('04  Build Your Swipe File',
     'Save every output that works into a Google Doc. After 90 days you\'ll have a library of proven copy to reuse forever.'),
]

for title, desc in steps:
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(4)
    p.paragraph_format.space_after  = Pt(2)
    r1 = p.add_run(title + '\n')
    r1.bold = True
    r1.font.size = Pt(11)
    r1.font.color.rgb = DARK
    r2 = p.add_run(desc)
    r2.font.size = Pt(10)
    r2.font.color.rgb = BODY

add_paragraph('', space_after=6)
add_tip_box(
    '\u26a1 POWER MOVE \u2014 Add This Before Any Prompt',
    '"You are an expert GHL marketing strategist for [niche] businesses. Write in a conversational, direct '
    'tone \u2014 no corporate language, no filler, no AI-sounding phrases."'
)
add_paragraph('Paste outputs directly into GHL:', bold=True, size=10, color=DARK, space_before=4, space_after=4)
add_paragraph('\u2709\ufe0f Email Templates  \u00b7  \U0001f4ac SMS Workflows  \u00b7  \U0001f517 Funnel Pages  \u00b7  \U0001f916 Chatbot Flows  \u00b7  \U0001f4f1 Social Planner  \u00b7  \U0001f4cb SOPs',
              size=10, color=BODY, space_before=0, space_after=8)

add_page_break()

# ══════════════════════════════
# TABLE OF CONTENTS
# ══════════════════════════════
add_paragraph('NAVIGATION', bold=True, size=9, color=PINK, space_before=0, space_after=4)
add_h1('Table of Contents')

toc = [
    ('01', '\U0001f3af Lead Generation',              '#1\u2013#15',  'Cold DMs, email hooks, Facebook ad hooks, database reactivation, VSL scripts, webinar funnels'),
    ('02', '\U0001f504 Follow-Up & Nurture Sequences','#16\u2013#30', 'Speed-to-lead SMS, 5-day nurture, no-show recovery, objection handling, voicemail drops'),
    ('03', '\U0001f91d Client Onboarding',            '#31\u2013#42', 'Welcome emails, kickoff agendas, GHL sub-account SOPs, expectation-setting, milestone tracking'),
    ('04', '\U0001f4e2 Ad Copy & Sales Funnels',      '#43\u2013#54', 'Facebook ads, landing pages, retargeting scripts, 5-email sequences, Google Ads, video ads'),
    ('05', '\U0001f4ca Client Reporting & Retention', '#55\u2013#66', 'Monthly reports, check-ins, upsells, handling complaints, renewals, QBRs, churn prevention'),
    ('06', '\U0001f4f1 Social Media Content',         '#67\u2013#78', 'LinkedIn posts, Instagram captions, TikTok scripts, 30-day calendar, YouTube, podcast'),
    ('07', '\U0001f4b0 Sales & Closing Scripts',      '#79\u2013#90', 'Discovery call scripts, proposal emails, pricing objections, urgency closes, follow-up cadences'),
    ('08', '\u2709\ufe0f Email Marketing',            '#91\u2013#100','Welcome sequences, promotional campaigns, re-engagement, segmentation, A/B testing frameworks'),
]

for num, title, prompts, desc in toc:
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(3)
    p.paragraph_format.space_after  = Pt(3)
    r_n = p.add_run(f'{num}  ')
    r_n.bold = True
    r_n.font.size = Pt(13)
    r_n.font.color.rgb = PINK
    r_t = p.add_run(title)
    r_t.bold = True
    r_t.font.size = Pt(12)
    r_t.font.color.rgb = DARK
    r_p = p.add_run(f'  ({prompts})\n')
    r_p.font.size = Pt(9)
    r_p.font.color.rgb = GRAY
    r_d = p.add_run(f'     {desc}')
    r_d.font.size = Pt(10)
    r_d.font.color.rgb = BODY

add_paragraph('', space_after=8)
add_tip_box(
    '\U0001f680 Quick Start \u2014 First 15 Minutes',
    'Run Prompt #1 (Cold DM), Prompt #16 (Speed-to-Lead SMS), and Prompt #31 (Welcome Email). '
    'Three working GHL assets \u2014 done.'
)

add_page_break()
# ══════════════════════════════
# CATEGORY 1: Lead Generation (15 prompts, #1-#15)
# ══════════════════════════════
categories = []
categories.append({
    'emoji': '\U0001f3af', 'eyebrow': 'Prompts #1\u2013#15',
    'title': 'Lead Generation',
    'desc': 'Fill your pipeline. Cold outreach, hooks, ad copy, database reactivation, and market research.',
    'bg': 'FFF0F6',
    'prompts': [
        ('#01', 'Cold Outreach DM \u2014 Instagram / Facebook',
         ['DM', '60 words max', 'Soft CTA'],
         'Write a 3-sentence cold DM for a [niche] business owner introducing my GHL-powered marketing agency. Feel human, not salesy, mention ONE pain point (slow lead response), end with a soft CTA asking if they\'re open to a quick chat. Under 60 words.'),
        ('#02', 'Cold Email Subject Lines \u2014 A/B Test Pack',
         ['Email', '10 subject lines', '3 angles'],
         'Write 10 cold email subject lines for a marketing agency targeting [niche] business owners. Make 5 curiosity-based, 3 pain-point-based, and 2 results-based. Avoid spam words like "free" or "guaranteed". Goal: high open rates.'),
        ('#03', 'Lead Magnet Title Generator',
         ['Lead Magnets', '10 ideas', 'Fast results'],
         'Generate 10 irresistible lead magnet titles for [niche] business owners. Each should promise a specific, fast result. Format: [Number] + [Outcome] + [Timeframe]. Example: "5 Texts That Book Appointments in 24 Hours".'),
        ('#04', 'Facebook Ad Hook Pack',
         ['Facebook Ads', '7 hooks', '3 hook types'],
         'Write 7 scroll-stopping hooks for Facebook/Instagram ads targeting [niche] owners struggling to get leads. Mix question hooks, bold statement hooks, and story hooks. Each hook should grab attention in the first line.'),
        ('#05', 'LinkedIn Prospecting Message Sequence',
         ['LinkedIn', '3 messages', '3 days apart'],
         'Write a LinkedIn connection request + 2 follow-up messages (3 days apart each) targeting [niche] business owners. Goal: book a discovery call. Professional but conversational. No pitching in message 1.'),
        ('#06', 'VSL (Video Sales Letter) Script Outline',
         ['Video', '5 minutes', '6 sections'],
         'Create a 5-minute VSL script outline for a GHL agency targeting [niche] businesses. Include: Hook (30s), Pain Agitation (60s), Solution (60s), Social Proof (60s), Offer Breakdown (60s), CTA (30s).'),
        ('#07', 'Database Reactivation SMS Sequence',
         ['SMS', '3 messages', '160 chars each'],
         'Write a 3-message SMS sequence to reactivate cold leads in a [niche] business\'s old database. Message 1: Re-engage with curiosity. Message 2 (24hrs later): Soft offer. Message 3 (48hrs later): Final nudge with urgency. Each under 160 characters.'),
        ('#08', 'Google Business Profile Post',
         ['Google', 'Local SEO', 'Under 1500 chars'],
         'Write a Google Business Profile post for a [niche] business to attract local leads. Include a pain point, brief solution, social proof placeholder, and a CTA with a GHL booking link. Under 1500 characters. Conversational tone.'),
        ('#09', 'Referral Request Script (SMS)',
         ['SMS', 'Casual tone', 'Incentive included'],
         'Write a text message script for a [niche] business owner to send to satisfied clients asking for referrals. Casual, not pushy. Include a simple incentive mention. Should feel like a friend texting, not a corporation.'),
        ('#10', 'Niche Market Research Prompt',
         ['Research', 'Pain points', 'Messaging clarity'],
         'Act as a market researcher. For [niche] businesses in [location], identify: 1) Top 3 pain points getting clients, 2) Objections to marketing services, 3) Their dream outcome, 4) The exact words they use to describe their problems.'),
        ('#11', 'Webinar Registration Page Copy',
         ['Funnel', 'Webinar', 'Registration CTA'],
         'Write registration page copy for a free webinar targeting [niche] business owners. Title: "[Webinar Title]". Include: compelling headline, 3 bullet points of what they\'ll learn, speaker bio placeholder, date/time placeholder, urgency element (limited spots), and a registration CTA button. Under 300 words.'),
        ('#12', 'Local SEO Content Brief',
         ['SEO', 'Local search', 'Blog outline'],
         'Create a blog post outline optimized for local SEO for a [niche] business in [city]. Target keyword: "[keyword]". Include: title tag (under 60 chars), meta description (under 155 chars), H1, 5 H2 subheadings, 3 internal link suggestions, and a local CTA. Goal: rank for "[niche] + [city]" searches.'),
        ('#13', 'Partnership Outreach Email',
         ['Email', 'B2B partnership', 'Mutual benefit'],
         'Write a partnership outreach email from a GHL agency to a complementary business (e.g., web designer, bookkeeper, or coach) serving [niche] clients. Propose a referral exchange or joint offer. Emphasize mutual benefit, keep it brief, include a specific collaboration idea. Under 200 words.'),
        ('#14', 'Competitive Differentiation One-Pager',
         ['Strategy', 'Positioning', '5 differentiators'],
         'Act as a positioning strategist. Write a one-page competitive differentiation document for a GHL agency targeting [niche] businesses. Include: 5 key differentiators vs. generic marketing agencies, a unique value proposition statement, 3 proof points (placeholders), and a positioning tagline. Format for easy sharing with prospects.'),
        ('#15', 'Voicemail Drop Script \u2014 Cold Prospect',
         ['Phone', 'Under 30 seconds', 'Callback CTA'],
         'Write a voicemail drop script for cold outreach to [niche] business owners. Under 30 seconds when read aloud. Include: your name, one specific result you\'ve delivered, a curiosity hook, and a simple callback CTA. No hard selling. Sound like a real person, not a recording.'),
    ]
})
# ══════════════════════════════
# CATEGORY 2: Follow-Up & Nurture (15 prompts, #16-#30)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f504', 'eyebrow': 'Prompts #16\u2013#30',
    'title': 'Follow-Up & Nurture Sequences',
    'desc': 'Turn cold leads into booked calls. Speed-to-lead SMS, nurture emails, no-show recovery, and objection handlers.',
    'bg': 'F5F0FF',
    'prompts': [
        ('#16', 'Speed-to-Lead SMS (Fires Within 60 Seconds)',
         ['SMS', '160 chars', 'GHL auto-response'],
         'Write a GHL SMS auto-response that fires within 60 seconds of a new Facebook ad lead. Greet by first name, reference the opt-in, ask one qualifying question, hint someone will follow up. Under 160 characters.'),
        ('#17', '5-Day Email Nurture Sequence',
         ['Email', '5 emails', 'Post lead magnet'],
         'Write a 5-day email nurture for leads who opted into my free lead magnet for [niche] businesses. Day 1: Deliver + warm welcome. Day 2: Pain story. Day 3: Educational value. Day 4: Social proof. Day 5: Soft discovery call pitch. Conversational, short paragraphs.'),
        ('#18', 'No-Show Follow-Up Sequence',
         ['SMS + Email', '3 steps', 'Same day \u2192 Day 3'],
         'Write a 3-step follow-up for leads who booked but didn\'t show. Step 1 (same day): Empathetic reschedule text. Step 2 (next day): Email with value + reschedule link. Step 3 (Day 3): Final "breaking up" text with urgency. Match [niche] context.'),
        ('#19', 'Post-Discovery Call \u2014 "I Need to Think About It"',
         ['Email', 'Under 300 words', 'Objection handler'],
         'Write a follow-up email within 1 hour after a discovery call where the prospect said "I need to think about it." Recap their pain points (placeholders), reinforce ROI, address objection [objection], include soft next step. Under 300 words.'),
        ('#20', 'Appointment Reminder Sequence',
         ['SMS + Email', '3-part', '24h / 2h / 30min'],
         'Write a 3-part appointment reminder for a [niche] business: 1) 24 hours before (email + SMS), 2) 2 hours before (SMS only), 3) 30 minutes before (SMS only). Keep SMS under 160 characters. Friendly, not robotic.'),
        ('#21', 'Lead Qualification Chatbot Script',
         ['GHL Chatbot', '5 questions', 'Button options'],
         'Create a 5-question chatbot flow to qualify leads for a [niche] business. Filter for: budget, timeline, problem severity, decision-maker status, location. Write 2\u20133 button answer options per question. Booking CTA for qualified leads; soft redirect for others.'),
        ('#22', 'Win-Back Email \u2014 Cold Leads (90+ Days)',
         ['Email', 'Re-engagement', 'Zero pressure'],
         'Write a re-engagement email for leads who went cold 90+ days ago in a [niche] GHL CRM. Include 3 subject line options. Body: brief, curious, zero pressure, one CTA. Should feel like a human checking in, not a system email.'),
        ('#23', 'Objection Handler \u2014 "Too Expensive"',
         ['Email + SMS', 'ROI reframe', 'Entry point offer'],
         'Write a follow-up (email + SMS version) for a prospect who said your services are too expensive. Reframe cost as investment with ROI placeholder, offer an alternative entry point (smaller package or payment plan). Do not be defensive.'),
        ('#24', 'Social Proof Email \u2014 Case Study Format',
         ['Email', 'Storytelling', 'Under 250 words'],
         'Write a short case study email for [niche] clients. Format: Client description \u2192 Problem \u2192 GHL solution \u2192 Results (placeholder numbers) \u2192 CTA. Under 250 words. Storytelling style, not corporate.'),
        ('#25', 'Referral Thank You + Subtle Upsell SMS',
         ['SMS', 'Under 160 chars', 'Warm + personal'],
         'Write an SMS after receiving a referral from an existing client. Thank them, mention a small reward placeholder, and subtly introduce one additional service. Warm and personal. Under 160 characters.'),
        ('#26', 'Voicemail Follow-Up SMS',
         ['SMS', 'Under 160 chars', 'Post-voicemail'],
         'Write an SMS to send immediately after leaving a voicemail for a [niche] prospect. Reference the voicemail, restate the value prop in one sentence, and include a GHL booking link. Under 160 characters. Casual and direct.'),
        ('#27', 'Multi-Channel Drip \u2014 7-Day New Lead',
         ['SMS + Email + Voicemail', '7 days', 'GHL workflow'],
         'Design a 7-day multi-channel follow-up sequence for new [niche] leads in GHL. Map out: Day 1 (SMS + email), Day 2 (SMS), Day 3 (email), Day 4 (voicemail drop), Day 5 (SMS), Day 6 (email with case study), Day 7 (final "breaking up" SMS). Write the copy for each touchpoint.'),
        ('#28', 'Post-Quote Follow-Up Sequence',
         ['Email + SMS', '3 messages', '1h / 24h / 72h'],
         'Write a 3-message follow-up sequence after sending a quote to a [niche] prospect. Message 1 (1hr, email): Confirm receipt + offer to answer questions. Message 2 (24hrs, SMS): Quick check-in. Message 3 (72hrs, email): Add urgency with limited availability or price lock. Each concise and non-pushy.'),
        ('#29', 'Objection Handler \u2014 "I Need to Talk to My Partner"',
         ['Email', 'Under 200 words', 'Decision support'],
         'Write a follow-up email for a prospect who said "I need to talk to my partner/business partner." Provide a one-page summary they can share (key benefits, ROI, timeline, investment). Make it easy for them to sell it internally. Under 200 words for the email; include the shareable summary as a separate section.'),
        ('#30', 'Event/Conference Lead Follow-Up',
         ['Email', 'Post-event', 'Personal touch'],
         'Write a follow-up email to send within 24 hours of meeting a [niche] business owner at [event name]. Reference the conversation topic, share one relevant resource, and suggest a follow-up call. Personal and specific \u2014 not a mass email. Under 200 words.'),
    ]
})
# ══════════════════════════════
# CATEGORY 3: Client Onboarding (12 prompts, #31-#42)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f91d', 'eyebrow': 'Prompts #31\u2013#42',
    'title': 'Client Onboarding',
    'desc': 'Impress from day one. Welcome emails, kickoff agendas, SOPs, questionnaires, and expectation-setting.',
    'bg': 'F0FCFF',
    'prompts': [
        ('#31', 'Welcome Email \u2014 New Client',
         ['Email', 'Under 300 words', '7-day preview'],
         'Write a warm, professional welcome email for a new client joining my GHL agency. Include: what they can expect in the first 7 days, dedicated point of contact, how to reach us, and a link to their onboarding form. Excited but confident tone. Under 300 words.'),
        ('#32', 'Client Onboarding Questionnaire',
         ['Form', 'Brand + Goals', 'Tech access'],
         'Create a comprehensive onboarding questionnaire for a new [niche] client at my GHL agency. Cover: business background, target customer, current marketing, brand voice, competitors, 30/60/90-day goals, login credentials needed, and communication preferences.'),
        ('#33', 'Kickoff Call Agenda \u2014 60 Minutes',
         ['Agenda', '6 sections', 'Time-blocked'],
         'Write a 60-minute kickoff call agenda for a new [niche] client. Sections: intro/rapport (5 min), questionnaire review (15 min), goal alignment (10 min), tech setup walkthrough (15 min), workflow review (10 min), Q&A (5 min). Add talking points for each section.'),
        ('#34', 'SOP: GHL Sub-Account Setup',
         ['SOP', 'Team-ready', 'Step-by-step'],
         'Write a step-by-step SOP for setting up a new GHL sub-account for a [niche] client. Include: account creation, branding setup, pipeline creation, calendar/booking setup, automation triggers, and integration checklist. Written for a team member to follow without supervision.'),
        ('#35', 'Client Communication Policy Document',
         ['Document', 'Under 400 words', 'Policy'],
         'Write a "Client Communication Policy" document for new agency clients. Cover: response times, communication channels, revision policy, monthly reporting schedule, escalation process, and office hours. Firm but friendly tone. Under 400 words.'),
        ('#36', '30-Day Onboarding Checklist (Client-Facing)',
         ['Checklist', 'Week-by-week', 'Client vs Agency'],
         'Create a client-facing 30-day onboarding checklist for a GHL agency. Week 1: Setup & Access. Week 2: Campaign Launch. Week 3: First Optimization. Week 4: First Report + Review. Separate what the CLIENT does vs. what the AGENCY handles.'),
        ('#37', 'Tech Stack Access Request Email',
         ['Email', 'Access request', 'Security reassurance'],
         'Write an email requesting all tech access needed to set up a new client\'s GHL account. List what\'s needed (Facebook Ads Manager, Google Business, website access, etc.) with clear instructions for each. Reassure them about security. Friendly, confident tone.'),
        ('#38', 'Expectation-Setting Email \u2014 Week 1',
         ['Email', 'Timelines', 'Transparent'],
         'Write a "Setting Expectations" email to send after the kickoff call. Cover: realistic timelines for results, what success looks like in month 1 vs. month 3, what we need from the client to succeed, and how to avoid common pitfalls. Confident and transparent.'),
        ('#39', 'Client Portal Welcome Video Script',
         ['Video Script', '2 minutes', 'Screen walkthrough'],
         'Write a 2-minute script for a welcome video walking a new [niche] client through their GHL client portal. Cover: how to check their dashboard, view leads, see upcoming appointments, and contact their account manager. Friendly, clear, jargon-free. Include visual cues for screen recording.'),
        ('#40', '90-Day Milestone Email Sequence',
         ['Email', '3 emails', 'Day 30/60/90'],
         'Write 3 milestone check-in emails for a [niche] client: Day 30 (celebrate early wins + share metrics), Day 60 (optimization update + next phase preview), Day 90 (full results recap + renewal conversation opener). Each under 250 words. Confident, data-driven tone.'),
        ('#41', 'Internal Team Handoff Document',
         ['SOP', 'Internal use', 'Team brief'],
         'Create an internal team handoff document template for when a new [niche] client is onboarded. Include: client overview, goals, key contacts, brand voice notes, login credentials location, assigned team members, deadlines, and red flags to watch for. Written for internal team use only.'),
        ('#42', 'Client Feedback Survey \u2014 30-Day Check-In',
         ['Survey', '8 questions', 'NPS included'],
         'Create a 30-day client satisfaction survey for a GHL agency. Include 8 questions covering: overall satisfaction, communication quality, results vs. expectations, team responsiveness, NPS score (0\u201310), and one open-ended improvement question. Keep it under 3 minutes to complete.'),
    ]
})
# ══════════════════════════════
# CATEGORY 4: Ad Copy & Sales Funnels (12 prompts, #43-#54)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f4e2', 'eyebrow': 'Prompts #43\u2013#54',
    'title': 'Ad Copy & Sales Funnels',
    'desc': 'Turn clicks into paying clients. Facebook ads, landing pages, retargeting, email funnels, and full sales pages.',
    'bg': 'FFFBF0',
    'prompts': [
        ('#43', 'Facebook Ad Copy \u2014 3 Angle Variations',
         ['Facebook Ads', 'PAS \u00b7 Proof \u00b7 Curiosity', 'Mobile-optimized'],
         'Write 3 Facebook ad variations for a [niche] business targeting [audience]. Variation A: Problem-agitation-solution. Variation B: Social proof/results. Variation C: Curiosity/question. Include headline (40 chars max), primary text (125 chars for mobile), and CTA button suggestion.'),
        ('#44', 'Landing Page Copy \u2014 Lead Gen Funnel',
         ['Funnel', 'Under 400 words', 'Conversion-focused'],
         'Write full landing page copy for a [niche] lead generation funnel. Include: hero headline + subheadline, 3 benefit bullets, social proof section (placeholder), short form intro, trust signals, and footer disclaimer. Conversion-optimized. Under 400 words total.'),
        ('#45', 'Thank You Page + Low-Ticket Upsell',
         ['Funnel', '$27\u2013$47 upsell', 'Confirm \u2192 Curiosity'],
         'Write copy for a thank-you page after a [niche] lead opts into a free offer. Confirm signup, set expectations for next steps, and introduce a low-ticket upsell at $27\u2013$47. Create curiosity without being pushy.'),
        ('#46', 'Paid Ad Email Funnel \u2014 5-Email Sequence',
         ['Email', '5 emails', 'Under 200 words each'],
         'Write a 5-email sequence for leads from a paid Facebook ad for a [niche] business. Email 1: Deliver lead magnet. Email 2 (Day 2): Value + story. Email 3 (Day 3): Testimonial. Email 4 (Day 4): Offer intro. Email 5 (Day 5): Urgency close. Each under 200 words.'),
        ('#47', 'Retargeting Ad Copy \u2014 3 Objections Handled',
         ['Retargeting', '3 angles', '2\u20133 sentences each'],
         'Write 3 retargeting ad scripts for people who visited a [niche] landing page but didn\'t opt in. Objection 1: "I\'m not sure it works." Objection 2: "I don\'t have time." Objection 3: "I\'ve tried this before." 2\u20133 sentences each.'),
        ('#48', 'Full Sales Page \u2014 Agency Service',
         ['Sales Page', '6 sections', '5 FAQs included'],
         'Write a full sales page for a GHL agency offering "Done-For-You Lead Generation" to [niche] businesses at $[price]/month. Sections: Hero, Problem, Why us, What\'s included, Results/proof, FAQ (5 questions), and final CTA. Confident, direct, no fluff.'),
        ('#49', 'Abandoned Form Follow-Up Sequence',
         ['Email + SMS', 'Low-pressure', '1hr + next day'],
         'Write a 2-message sequence for leads who started a [niche] inquiry form but didn\'t finish. Message 1 (email, 1 hour later): Curious, helpful. Message 2 (SMS, next day): Short, direct. Both should make completing the form feel easy and low-pressure.'),
        ('#50', 'Webinar / Workshop Invitation Email',
         ['Email', 'Under 250 words', 'RSVP CTA'],
         'Write a free online workshop invitation email for a [niche] marketing agency. Topic: [workshop title]. Include: 3 learning bullet points, who it\'s for, date/time placeholder, and a clear RSVP CTA. Build excitement without overpromising. Under 250 words.'),
        ('#51', 'Google Ads Copy \u2014 Search Campaign',
         ['Google Ads', '3 ad groups', 'Headlines + descriptions'],
         'Write Google Search ad copy for a [niche] lead generation service. Create 3 ad groups targeting different intent levels: 1) Problem-aware ("[niche] struggling with [problem]"), 2) Solution-aware ("[niche] marketing agency"), 3) Brand/competitor. For each: 5 headlines (30 chars max) and 2 descriptions (90 chars max). Include sitelink suggestions.'),
        ('#52', 'Video Ad Script \u2014 Facebook/Instagram (30 Seconds)',
         ['Video Ad', '30 seconds', 'Hook + CTA'],
         'Write a 30-second video ad script for a [niche] lead gen offer on Facebook/Instagram. Structure: Hook (3 seconds \u2014 pattern interrupt), Problem (7 seconds), Solution (10 seconds), Proof (5 seconds), CTA (5 seconds). Include visual direction notes for each section. Written for a talking-head format.'),
        ('#53', 'Tripwire Offer Sales Page',
         ['Sales Page', '$7\u2013$27 offer', 'Low-ticket conversion'],
         'Write a sales page for a $[price] tripwire offer: "[Tripwire Product Name]" for [niche] business owners. Include: urgency headline, 5 bullet points of what\'s inside, "what it\'s worth vs. what you pay" comparison, 3 bonuses, guarantee, and buy button CTA. Short, punchy, designed for impulse buyers.'),
        ('#54', 'Funnel Audit Checklist \u2014 Client Deliverable',
         ['Checklist', '20 points', 'Client-facing'],
         'Create a 20-point funnel audit checklist for a [niche] client\'s existing marketing funnel. Cover: ad copy, targeting, landing page speed, headline clarity, form friction, thank-you page, email deliverability, SMS opt-in compliance, follow-up timing, and conversion tracking. Format as a professional client-facing deliverable with pass/fail/optimize ratings.'),
    ]
})
# ══════════════════════════════
# CATEGORY 5: Client Reporting & Retention (12 prompts, #55-#66)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f4ca', 'eyebrow': 'Prompts #55\u2013#66',
    'title': 'Client Reporting & Retention',
    'desc': 'Keep clients happy and paying month after month. Reports, check-ins, upsells, damage control, and renewals.',
    'bg': 'F0FDF8',
    'prompts': [
        ('#55', 'Monthly Report Summary Email',
         ['Email', 'Metrics placeholders', 'Under 400 words'],
         'Write a monthly performance report email for a GHL agency. Include: month overview, key metrics (leads, calls booked, revenue \u2014 placeholders), what worked, what we\'re optimizing, and next month\'s focus. Professional but readable. Under 400 words.'),
        ('#56', 'Monthly Client Check-In SMS',
         ['SMS', 'Under 160 chars', 'Personal feel'],
         'Write a casual monthly check-in SMS from an agency to a client. Feel personal, briefly reference results, ask how they feel about progress, invite a quick call if they want to chat. Under 160 characters.'),
        ('#57', 'Handling an Unhappy Client \u2014 Email Response',
         ['Email', 'Solution-focused', 'Goodwill gesture'],
         'Write a response email to a client unhappy with their 30-day results. Acknowledge frustration, take responsibility where appropriate, explain adjustments being made, give a realistic revised timeline, and offer a goodwill gesture. Calm, confident, solution-focused.'),
        ('#58', 'Upsell Email \u2014 Introduce a New Add-On Service',
         ['Email', 'Exclusive framing', 'Under 250 words'],
         'Write an email to an existing client introducing add-on service [service name]. Frame as exclusive to current clients. Explain the benefit in terms of THEIR results, not your features. Include social proof placeholder and soft CTA. Under 250 words.'),
        ('#59', 'Contract Renewal Email \u2014 60 Days Out',
         ['Email', 'Recap wins', 'Renewal incentive'],
         'Write a proactive retention email sent 60 days before a client\'s contract ends. Recap their wins, preview what\'s coming next quarter, and make staying feel like the obvious choice. Include a limited-time renewal incentive placeholder. Warm, confident tone.'),
        ('#60', 'Case Study / Testimonial Request Email',
         ['Email', 'Easy ask', 'Under 200 words'],
         'Write an email asking a happy client for a testimonial or case study. Make it easy \u2014 offer to write it for them based on a short call or 3 quick questions. Explain how it benefits them too (free PR, exposure). Under 200 words.'),
        ('#61', 'Graceful Offboarding Email',
         ['Email', 'Leave door open', 'No guilt-tripping'],
         'Write a graceful offboarding email for a client who\'s canceling. Thank them, offer a clean handoff, ask for honest feedback (link to a short form), leave the door open for future work, and wish them well. No guilt-tripping. Professional and warm.'),
        ('#62', 'Quarterly Business Review (QBR) Agenda',
         ['Agenda', '45 minutes', 'Data-driven'],
         'Write a 45-minute Quarterly Business Review agenda for a [niche] client. Sections: Results recap with metrics (10 min), ROI analysis (5 min), wins and learnings (10 min), next quarter strategy (10 min), growth opportunities / upsell discussion (5 min), Q&A (5 min). Include talking points and placeholder metrics for each section.'),
        ('#63', 'Churn Prevention \u2014 Early Warning Email',
         ['Email', 'Proactive', 'Re-engagement'],
         'Write an email to send when GHL engagement data shows a client is disengaging (not logging in, not responding to reports, fewer leads being worked). Acknowledge their busy schedule, highlight recent wins they may have missed, offer a 15-minute "realignment call," and reinforce the value they\'re getting. Non-confrontational and helpful.'),
        ('#64', 'Client Anniversary / Milestone Celebration',
         ['Email + SMS', 'Relationship building', 'Personalized'],
         'Write a client anniversary email (1 year working together) and accompanying SMS. Email: Celebrate the milestone, recap key achievements (placeholder metrics), share what\'s ahead, include a small gift or bonus offer. SMS: Short, warm congratulations with a link to a personalized thank-you video (placeholder). Make it feel genuinely personal.'),
        ('#65', 'Service Upgrade Proposal Email',
         ['Email', 'Under 350 words', 'ROI-focused'],
         'Write a service upgrade proposal email for a [niche] client currently on your basic package. Present the upgrade as a natural next step based on their results. Include: current results summary, what the upgrade adds, projected ROI improvement, investment comparison, and a "let\'s discuss" CTA. Under 350 words. No pressure, just logic.'),
        ('#66', 'Client Referral Program Launch Email',
         ['Email', 'Program details', 'Easy to share'],
         'Write an email launching a client referral program for your GHL agency. Include: program details (reward for referrer and referee), how it works in 3 simple steps, who makes a good referral, a pre-written message they can forward, and a tracking link placeholder. Exciting but professional. Under 300 words.'),
    ]
})
# ══════════════════════════════
# CATEGORY 6: Social Media Content (12 prompts, #67-#78)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f4f1', 'eyebrow': 'Prompts #67\u2013#78',
    'title': 'Social Media Content',
    'desc': 'Build authority and attract inbound leads. LinkedIn, Instagram, TikTok, 30-day calendar, newsletter, and podcast.',
    'bg': 'EFF6FF',
    'prompts': [
        ('#67', 'LinkedIn Thought Leadership Post',
         ['LinkedIn', '150\u2013250 words', 'Engagement question'],
         'Write a LinkedIn post from a GHL agency owner sharing a lesson from working with [niche] businesses. Format: hook line + 3\u20135 short insight paragraphs + engagement question at the end. Conversational, no corporate speak. 150\u2013250 words.'),
        ('#68', 'Instagram Caption Pack \u2014 5 Captions',
         ['Instagram', '5 content types', 'With hashtags'],
         'Write 5 Instagram captions for a GHL marketing agency. Mix: 1) Behind-the-scenes, 2) Client result (placeholder numbers), 3) Educational tip, 4) Motivational/mindset, 5) Offer/CTA post. Each with 3\u20135 relevant hashtag suggestions.'),
        ('#69', 'TikTok / Reels Script \u2014 60 Seconds',
         ['TikTok', '3-sec hook', 'Comment CTA'],
         'Write a 60-second TikTok/Reels script: "3 things [niche] businesses do that kill their leads." Hook in first 3 seconds. Fast-paced, punchy sentences. End with a CTA to follow or comment a word.'),
        ('#70', '30-Day Social Media Content Calendar',
         ['Calendar', '4 posts/week', 'Table format'],
         'Create a 30-day social media calendar for a GHL agency targeting [niche] businesses. 4 posts/week (Mon, Tue, Thu, Fri). Mix: 40% educational, 20% social proof, 20% personal/brand, 20% promotional. Table: Day, Content Type, Topic, Platform.'),
        ('#71', 'Instagram Story Poll / Quiz Sequence',
         ['Stories', '5 slides', 'Lead qualifying'],
         'Create a 5-slide Instagram Story sequence for a GHL agency using polls to engage followers and qualify leads. Each slide should move toward identifying a pain point and pointing to a solution. Include slide text and suggested poll options.'),
        ('#72', 'Weekly Email Newsletter Template',
         ['Email', 'Under 400 words', 'Value-first'],
         'Write a weekly email newsletter for a GHL agency subscriber list. Sections: 1 quick insight/tip (150 words), 1 tool recommendation, 1 success story snippet (placeholder), and a PS with a soft CTA. Conversational, value-first. Under 400 words total.'),
        ('#73', 'Personal Brand Bio \u2014 3 Platforms',
         ['Twitter/X', 'Instagram', 'LinkedIn'],
         'Write 3 personal brand bio versions for a GHL agency owner: 1) Twitter/X (160 chars), 2) Instagram (150 words max), 3) LinkedIn headline + about section (300 words). Hook: [your name] helps [niche] businesses stop losing leads and start booking clients on autopilot.'),
        ('#74', 'YouTube Video Script \u2014 Educational (5 Minutes)',
         ['YouTube', '5 minutes', 'Tutorial format'],
         'Write a 5-minute YouTube script: "How to Set Up Automated Follow-Up in GHL for [Niche] Businesses." Structure: Hook (15s), intro + credibility (30s), step-by-step walkthrough (3 min), common mistakes (45s), CTA to subscribe + free resource (30s). Written for screen recording with talking head. Include B-roll suggestions.'),
        ('#75', 'Twitter/X Thread \u2014 10 Tweets',
         ['Twitter/X', '10 tweets', 'Thread format'],
         'Write a 10-tweet Twitter/X thread: "I built a $[X]k/month GHL agency in [timeframe]. Here\'s the exact playbook:" Tweet 1: Hook with results. Tweets 2\u20139: One lesson per tweet (niche selection, pricing, automation, hiring, retention, sales, systems, mindset). Tweet 10: CTA + resource link. Each tweet under 280 characters.'),
        ('#76', 'Podcast Episode Outline \u2014 Solo Episode',
         ['Podcast', '20 minutes', '5 segments'],
         'Create a 20-minute solo podcast episode outline: "The 5 GHL Automations Every [Niche] Business Needs." Include: intro hook (2 min), 5 automation breakdowns with real examples (3 min each), and a CTA to book a demo (2 min). Write detailed talking points for each segment. Conversational, not scripted word-for-word.'),
        ('#77', 'LinkedIn Carousel Script \u2014 10 Slides',
         ['LinkedIn', '10 slides', 'Swipeable content'],
         'Write copy for a 10-slide LinkedIn carousel: "10 Signs Your [Niche] Business Is Leaving Money on the Table." Slide 1: Hook/title. Slides 2\u20139: One sign per slide with a 1\u20132 sentence explanation. Slide 10: CTA to DM or book a call. Each slide under 50 words. Designed for visual formatting.'),
        ('#78', 'Community Post \u2014 Facebook Group Value Drop',
         ['Facebook Group', 'Value-first', 'Engagement bait'],
         'Write a Facebook group post for a [niche] business community. Share a specific, actionable tip about lead follow-up that positions you as an expert. Format: bold opening statement, 3\u20135 bullet point tips, personal experience line, engagement question at the end. No direct selling. Pure value with subtle authority building.'),
    ]
})
# ══════════════════════════════
# CATEGORY 7: Sales & Closing Scripts (12 prompts, #79-#90)
# ══════════════════════════════
categories.append({
    'emoji': '\U0001f4b0', 'eyebrow': 'Prompts #79\u2013#90',
    'title': 'Sales & Closing Scripts',
    'desc': 'Close more deals with confidence. Discovery call frameworks, proposal templates, objection handling, and urgency tactics.',
    'bg': 'FFF8F0',
    'prompts': [
        ('#79', 'Discovery Call Script \u2014 Full Framework',
         ['Sales Call', '30 minutes', '6 phases'],
         'Write a complete 30-minute discovery call script for selling GHL agency services to [niche] business owners. Phases: 1) Rapport & agenda (3 min), 2) Situation questions (5 min), 3) Pain discovery (7 min), 4) Impact/cost of inaction (5 min), 5) Solution presentation (7 min), 6) Close/next steps (3 min). Include exact questions to ask and transition phrases.'),
        ('#80', 'Proposal Email \u2014 Post-Discovery Call',
         ['Email', 'Under 400 words', 'Recap + offer'],
         'Write a proposal email to send within 2 hours after a successful discovery call with a [niche] prospect. Include: personal recap of their situation, 3 key problems you\'ll solve, your recommended package with deliverables, investment amount, timeline to first results, and a clear next step CTA. Professional but warm. Under 400 words.'),
        ('#81', 'Pricing Objection Handler \u2014 "What\'s Your Best Price?"',
         ['Sales Script', 'Value anchor', 'No discounting'],
         'Write a response script (verbal + email follow-up version) for when a [niche] prospect asks "What\'s your best price?" or tries to negotiate. Anchor to value and ROI, not cost. Include a cost-of-inaction calculation, comparison to hiring in-house, and a firm but friendly way to hold your price. Never discount \u2014 add value instead.'),
        ('#82', 'Urgency Close \u2014 Limited Availability',
         ['Email + SMS', 'Scarcity', 'Authentic urgency'],
         'Write an email + SMS pair to create authentic urgency for a [niche] prospect who\'s interested but hasn\'t committed. Use real scarcity (limited client slots, onboarding capacity, or promotional pricing deadline). Not fake countdown timers. Email: explain the constraint. SMS: short reminder with deadline. Both should feel genuine, not manipulative.'),
        ('#83', 'Sales Deck \u2014 Slide-by-Slide Script',
         ['Presentation', '12 slides', 'Talk track'],
         'Write the talk track for a 12-slide sales presentation for a GHL agency pitching to [niche] businesses. Slides: 1) Title, 2) Their world today, 3) The problem, 4) Cost of the problem, 5) The solution, 6) How it works, 7) What\'s included, 8) Case study, 9) Timeline, 10) Investment, 11) FAQ, 12) Next steps. Write what to SAY on each slide (not just bullet points).'),
        ('#84', 'Follow-Up After No Response \u2014 5-Touch Sequence',
         ['Email + SMS', '5 touches', '14 days'],
         'Write a 5-touch follow-up sequence for a [niche] prospect who went silent after receiving a proposal. Day 1 (email): Gentle check-in. Day 3 (SMS): Quick bump. Day 7 (email): New value add or case study. Day 10 (SMS): Direct question. Day 14 (email): Professional "closing the file" breakup. Each escalates appropriately without being annoying.'),
        ('#85', 'Competitor Comparison Framework',
         ['Sales Tool', 'Positioning', 'Diplomatic'],
         'Create a competitor comparison framework for when a [niche] prospect says "I\'m also talking to [competitor]." Write: 3 questions to ask that highlight your strengths, a diplomatic comparison talking points script (never bash competitors), and a follow-up email that positions your unique advantages. Focus on GHL\'s automation and all-in-one benefits vs. fragmented solutions.'),
        ('#86', 'Referral-Based Warm Intro Script',
         ['Phone + Email', 'Warm lead', 'Referral leverage'],
         'Write a phone script and follow-up email for reaching out to a warm referral in the [niche] space. The referrer is [referrer name]. Phone: open with the connection, ask about their current situation, offer value before pitching. Email: reinforce the call, include one resource, suggest next steps. Leverage the relationship without exploiting it.'),
        ('#87', 'Payment Plan Offer Email',
         ['Email', 'Flexible payment', 'Under 250 words'],
         'Write an email offering a payment plan option to a [niche] prospect who wants to start but is cash-flow constrained. Present 2\u20133 payment options (monthly, quarterly, annual). Frame it as flexibility, not a discount. Include what\'s included at each tier and a deadline to decide. Under 250 words. Helpful, not desperate.'),
        ('#88', 'Contract / Agreement Cover Email',
         ['Email', 'Next steps clarity', 'Under 200 words'],
         'Write the email that accompanies sending a contract/service agreement to a new [niche] client. Summarize what they\'re signing up for, highlight key terms (duration, deliverables, start date), explain the signing process (e-sign link), and set expectations for what happens after they sign. Under 200 words. Excited but professional.'),
        ('#89', 'Trial / Pilot Program Pitch',
         ['Email', '30-day trial', 'Risk reversal'],
         'Write a pitch email for a 30-day pilot program for hesitant [niche] prospects. Include: what the pilot includes, success metrics you\'ll track, what happens at the end (continue or walk away), pricing for the pilot, and a strong risk-reversal guarantee. Frame it as "a test drive, not a marriage." Under 300 words.'),
        ('#90', 'End-of-Month Closing Push \u2014 Internal Sales Script',
         ['Internal', 'Sales team', 'Talking points'],
         'Write an internal sales script for your team to use in the last 5 days of the month to close pending [niche] deals. Include: 3 opening approaches based on prospect status (warm, lukewarm, cold), rebuttals for the top 3 stalling objections, a legitimate bonus or incentive they can offer, and a "last call" email/SMS template. Written for internal team use with coaching notes.'),
    ]
})
# ══════════════════════════════
# CATEGORY 8: Email Marketing (10 prompts, #91-#100)
# ══════════════════════════════
categories.append({
    'emoji': '\u2709\ufe0f', 'eyebrow': 'Prompts #91\u2013#100',
    'title': 'Email Marketing',
    'desc': 'Master the inbox. Welcome sequences, campaigns, segmentation, deliverability, and A/B testing frameworks.',
    'bg': 'FFF0F0',
    'prompts': [
        ('#91', 'Welcome Email Sequence \u2014 New Subscriber (3 Emails)',
         ['Email', '3 emails', 'Brand introduction'],
         'Write a 3-email welcome sequence for new subscribers to a GHL agency\'s email list. Email 1 (immediate): Warm welcome + deliver promised resource + set expectations for email frequency. Email 2 (Day 2): Your story / why you started the agency + one quick win tip. Email 3 (Day 4): Best content roundup + soft CTA to book a call. Each under 200 words. Personality-driven.'),
        ('#92', 'Promotional Campaign \u2014 Limited-Time Offer',
         ['Email', '3-email campaign', 'Open \u2192 Click \u2192 Close'],
         'Write a 3-email promotional campaign for a limited-time offer from a GHL agency targeting [niche] businesses. Email 1 (launch): Announce the offer with excitement + value stack. Email 2 (Day 2): Social proof + FAQ handling. Email 3 (final day): Last chance urgency + bonuses expiring. Include subject lines for each. Each under 250 words.'),
        ('#93', 'Re-Engagement Campaign \u2014 Inactive Subscribers',
         ['Email', '3 emails', 'Win-back or clean'],
         'Write a 3-email re-engagement campaign for GHL agency subscribers who haven\'t opened emails in 60+ days. Email 1: "We miss you" + one compelling reason to come back. Email 2 (Day 3): Exclusive offer only for returning subscribers. Email 3 (Day 7): "Last email unless you want to stay" with one-click re-subscribe. Include subject lines optimized for cold opens.'),
        ('#94', 'Segmentation Strategy \u2014 Email List Cleanup',
         ['Strategy', 'Segments', 'Tagging logic'],
         'Act as an email marketing strategist. Design a segmentation strategy for a GHL agency\'s email list of [niche] business owners. Define 5 key segments based on behavior and interest (e.g., new subscribers, engaged but not clients, past clients, webinar attendees, cold leads). For each segment: describe the audience, recommended email frequency, content type, and GHL tags to use.'),
        ('#95', 'Educational Email Series \u2014 5 "Value Bomb" Emails',
         ['Email', '5 emails', 'Authority building'],
         'Write a 5-email educational series for [niche] business owners that positions a GHL agency as the go-to expert. Email 1: "The #1 mistake [niche] businesses make with lead follow-up." Email 2: "How to automate your booking process in 15 minutes." Email 3: "The 3 metrics that predict if your marketing is working." Email 4: "Why most [niche] businesses waste 40% of their ad spend." Email 5: "The automation stack I\'d build if I started a [niche] business today." Each under 250 words. Pure value, no selling until a PS line.'),
        ('#96', 'Cart Abandonment / Application Incomplete Sequence',
         ['Email + SMS', '3 messages', 'Conversion recovery'],
         'Write a 3-message sequence for [niche] prospects who started an application/intake form but didn\'t complete it. Message 1 (email, 1hr): Helpful reminder + address potential friction. Message 2 (SMS, 24hrs): Quick nudge with a direct link. Message 3 (email, 48hrs): Add social proof + offer assistance. Goal: recover 20\u201330% of abandoned applications.'),
        ('#97', 'Event Recap / Post-Webinar Email',
         ['Email', 'Under 300 words', 'Replay + next steps'],
         'Write a post-webinar email for attendees of a [niche] marketing webinar. Include: thank you for attending, top 3 takeaways from the session, replay link (placeholder), exclusive post-webinar offer with deadline, and a CTA to book a strategy call. Under 300 words. Make non-attendees regret missing it.'),
        ('#98', 'A/B Testing Framework \u2014 Email Optimization Plan',
         ['Strategy', '8 test ideas', 'Hypothesis format'],
         'Create an A/B testing plan for a GHL agency\'s email campaigns to [niche] businesses. Define 8 tests to run over 8 weeks. For each test: what to test (subject line, send time, CTA placement, etc.), hypothesis, success metric, minimum sample size, and how to implement in GHL. Include a tracking template format. Written for a team member to execute independently.'),
        ('#99', 'Holiday / Seasonal Campaign Email',
         ['Email', 'Seasonal', 'Under 250 words'],
         'Write a seasonal/holiday email campaign for a GHL agency to send to [niche] business owners around [holiday/season]. Include: timely hook tied to the season, a relevant offer or resource, urgency tied to the calendar (New Year planning, Q4 push, summer slowdown prep, etc.), and a CTA. Under 250 words. Festive but professional \u2014 not cheesy.'),
        ('#100', 'Email Deliverability Checklist \u2014 GHL Setup Guide',
         ['SOP', '15 points', 'Technical + content'],
         'Create a 15-point email deliverability checklist for GHL agency owners. Cover: domain authentication (SPF, DKIM, DMARC), dedicated sending domain setup, warm-up schedule for new domains, list hygiene practices, content best practices (avoid spam triggers), optimal sending frequency, GHL-specific settings, monitoring tools, and what to do when emails hit spam. Written as a step-by-step guide a non-technical agency owner can follow.'),
    ]
})
# ══════════════════════════════
# BUILD CATEGORIES
# ══════════════════════════════
for cat in categories:
    add_cat_banner(cat['emoji'], cat['eyebrow'], cat['title'], cat['desc'], cat['bg'])
    for prompt in cat['prompts']:
        add_prompt_card(*prompt)
    add_page_break()

# ══════════════════════════════
# BONUS PAGE
# ══════════════════════════════
add_paragraph('EXCLUSIVE EXTRAS', bold=True, size=9, color=PINK, space_before=0, space_after=4)
add_h1('Bonus: Make Every Prompt Work Harder')

bonuses = [
    ('\U0001f3af  Universal Persona Primer',
     'Add this before ANY prompt:\n'
     '"You are an expert GHL marketing strategist for [niche] businesses. '
     'Write in a conversational, direct tone \u2014 no corporate language, no filler, '
     'no AI-sounding phrases. Every sentence earns its place."'),
    ('\U0001f504  Iteration Commands',
     'After any output, follow up with:\n'
     '\u2192 "Make it 30% shorter"\n'
     '\u2192 "Add more urgency"\n'
     '\u2192 "Write 3 A/B variations"\n'
     '\u2192 "Sound more casual"\n'
     '\u2192 "Rewrite the subject line 5 ways"\n'
     '\u2192 "Add a P.S. line"'),
    ('\U0001f916  Best AI Tools',
     'ChatGPT GPT-4o \u2014 Best for all-around copywriting\n'
     'Claude Sonnet \u2014 Best for SOPs & structured documents\n'
     'Gemini 1.5 Pro \u2014 Best for research-heavy prompts'),
    ('\u26a1  Quick Start (15 Minutes)',
     'Step 1 \u2192 Run Prompt #1 (Cold DM for your niche)\n'
     'Step 2 \u2192 Run Prompt #16 (Speed-to-Lead SMS)\n'
     'Step 3 \u2192 Run Prompt #31 (Welcome Email)\n'
     'Three working GHL assets \u2014 done.'),
]

for title, text in bonuses:
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(6)
    p.paragraph_format.space_after  = Pt(2)
    r1 = p.add_run(title + '\n')
    r1.bold = True
    r1.font.size = Pt(12)
    r1.font.color.rgb = DARK
    r2 = p.add_run(text)
    r2.font.size = Pt(10)
    r2.font.color.rgb = BODY

add_paragraph('', space_after=8)
add_tip_box(
    '\U0001f4a1 The Swipe File Strategy \u2014 Your Unfair Advantage',
    'Every time a prompt output performs \u2014 a DM gets a reply, an email gets opened, a hook stops the scroll \u2014 save it. '
    'Create a Google Doc called "Agency Swipe File." After 90 days you\'ll have a battle-tested library of proven copy '
    'you can remix and reuse forever.'
)

# ══════════════════════════════
# BACK PAGE
# ══════════════════════════════
add_page_break()
add_paragraph('', space_before=60, space_after=0)
add_paragraph('\U0001f389  You\'re All Set', bold=True, size=10, color=PINK,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=16)
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.paragraph_format.space_before = Pt(0)
p.paragraph_format.space_after  = Pt(12)
r1 = p.add_run('100 Prompts Away From a\n')
r1.bold = True
r1.font.size = Pt(30)
r1.font.color.rgb = DARK
r2 = p.add_run('Fully Automated Agency')
r2.bold = True
r2.font.size = Pt(30)
r2.font.color.rgb = PINK

add_paragraph(
    'Stop writing from scratch. Fill in the blanks, run the prompts,\nand watch your GHL workflows do the heavy lifting.',
    size=13, color=BODY, align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=24
)
add_paragraph('Start With Prompt #1 \u2192', bold=True, size=14, color=PINK,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=40)
add_paragraph('Built by MelAI \u2726 HireAI \u00b7 2026', bold=True, size=11, color=GRAY,
              align=WD_ALIGN_PARAGRAPH.CENTER, space_before=0, space_after=0)

# ══════════════════════════════
# SAVE DOCX
# ══════════════════════════════
out = '/home/melai/Documents/ghl-prompt-pack/GHL-Agency-100-Prompts.docx'
doc.save(out)
print(f'Saved DOCX: {out}')

# Copy to media
shutil.copy2(out, '/home/melai/.openclaw/media/GHL-Agency-100-Prompts.docx')
print('Copied to media directory')

# ══════════════════════════════
# GENERATE MARKDOWN
# ══════════════════════════════
md_lines = []
md_lines.append('# GHL Agency Starter Prompt Pack \u2014 100 Prompts')
md_lines.append('')
md_lines.append('> 100 ready-to-use ChatGPT prompts for GHL agencies \u2014 covering lead gen, follow-up, onboarding, ad copy, client retention, social media, sales scripts, and email marketing.')
md_lines.append('')
md_lines.append('**MelAI \u2726 HireAI | 2026 Edition**')
md_lines.append('')
md_lines.append('---')
md_lines.append('')
md_lines.append('## How to Use This Prompt Pack')
md_lines.append('')
md_lines.append('1. **Fill In the Brackets** \u2014 Every prompt has [placeholders]. Replace them with your niche, client name, offer, or specific details.')
md_lines.append('2. **Pick Your AI Tool** \u2014 Works with ChatGPT GPT-4o, Claude, or Gemini.')
md_lines.append('3. **Iterate & Refine** \u2014 After the first output follow up: "Make it shorter", "More casual", "Add urgency", or "Write 3 variations."')
md_lines.append('4. **Build Your Swipe File** \u2014 Save every output that works into a Google Doc.')
md_lines.append('')
md_lines.append('> \u26a1 **POWER MOVE** \u2014 Add this before any prompt: "You are an expert GHL marketing strategist for [niche] businesses. Write in a conversational, direct tone \u2014 no corporate language, no filler, no AI-sounding phrases."')
md_lines.append('')
md_lines.append('---')
md_lines.append('')

for cat in categories:
    md_lines.append(f'## {cat["emoji"]} {cat["title"]}')
    md_lines.append('')
    md_lines.append(f'*{cat["desc"]}*')
    md_lines.append('')
    for num, title, tags, prompt_text in cat['prompts']:
        md_lines.append(f'### {num} \u2014 {title}')
        md_lines.append('')
        md_lines.append(f'**Tags:** {", ".join(tags)}')
        md_lines.append('')
        md_lines.append(f'> {prompt_text}')
        md_lines.append('')
    md_lines.append('---')
    md_lines.append('')

md_lines.append('## Bonus: Make Every Prompt Work Harder')
md_lines.append('')
md_lines.append('**\U0001f3af Universal Persona Primer** \u2014 Add before ANY prompt:')
md_lines.append('> "You are an expert GHL marketing strategist for [niche] businesses. Write in a conversational, direct tone \u2014 no corporate language, no filler, no AI-sounding phrases."')
md_lines.append('')
md_lines.append('**\U0001f504 Iteration Commands:**')
md_lines.append('- "Make it 30% shorter"')
md_lines.append('- "Add more urgency"')
md_lines.append('- "Write 3 A/B variations"')
md_lines.append('- "Sound more casual"')
md_lines.append('- "Rewrite the subject line 5 ways"')
md_lines.append('')
md_lines.append('---')
md_lines.append('')
md_lines.append('*Built by MelAI \u2726 HireAI \u00b7 2026*')

md_path = '/home/melai/Documents/ghl-prompt-pack/content-100.md'
with open(md_path, 'w') as f:
    f.write('\n'.join(md_lines))
print(f'Saved Markdown: {md_path}')

# Count prompts
total = sum(len(c['prompts']) for c in categories)
print(f'Total prompts: {total}')
