#!/usr/bin/env python3
"""
Ghost Agency - Revenue Streams v3 (Extended)
Even more automated revenue streams - targeting €200k+ MRR potential
"""

import os
import json
import sqlite3
from pathlib import Path
from datetime import datetime, timedelta
from typing import Dict, List, Any

LEADS_DIR = Path("/home/ubuntu/GhostAgency")
DB_FILE = LEADS_DIR / "revenue_bots.db"
BROKER_DB = LEADS_DIR / "lead_broker.db"

# ============================================================
# EXTENDED REVENUE STREAMS v3
# ============================================================

EXTENDED_STREAMS = {
    # === AI MARKETING AUTOMATION ===
    "ai_social_content_calendar": {
        "name": "Calendario Contenuti Social AI",
        "price_range": "50-150€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Calendario editoriale AI + generazione post + scheduling automatico (Buffer/Hootsuite/Later)",
        "tools": ["OpenRouter", "Buffer/Hootsuite/Later API", "Canva API", "Unsplash/Pexels API"],
        "target": "Ristoranti, bar, gelaterie, pizzerie, hotel, palestre"
    },
    "ai_review_generation": {
        "name": "Generazione Recensioni Automatica",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Campagne automatiche richiesta recensioni via SMS/Email/WhatsApp post-visita",
        "tools": ["Twilio/Meta/Email API", "Google Places API", "Trigger: POS payment / WiFi disconnect"],
        "target": "Tutti i locali che vogliono più recensioni Google/TripAdvisor"
    },
    "ai_local_seo_citations": {
        "name": "Costruzione Citazioni Locali AI",
        "price_range": "200-500€ setup + 100€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Costruzione + monitoraggio citazioni NAP (Name, Address, Phone) su 50+ directory",
        "tools": ["Whitespark/BrightLocal API", "Data aggregators API", "Manual submission queue"],
        "target": "Nuovi locali, locali che vogliono dominare 'near me'"
    },
    "ai_gmb_optimizer": {
        "name": "Ottimizzazione Google My Business AI",
        "price_range": "150-300€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 4000,
        "description": "Ottimizzazione continua GMB: post, foto, Q&A, attributi, orari, servizi, prodotti",
        "tools": ["Google My Business API", "OpenRouter per copy", "Photo optimization", "Review monitoring"],
        "target": "Tutti i locali fisici"
    },

    # === REVENUE OPTIMIZATION ===
    "menu_engineering_ai": {
        "name": "Menu Engineering & Pricing AI",
        "price_range": "300-500€ setup + 100€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Analisi redditività piatti, psychology pricing, menu design, food cost, waste tracking",
        "tools": ["POS API (Toast/Square/Lightspeed/Clover)", "Recipe costing", "Sales mix analysis", "A/B testing"],
        "target": "Ristoranti, pizzerie, bar, gelaterie, catering"
    },
    "ai_upsell_engine": {
        "name": "Motore Upsell/Cross-sell AI",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Raccomandazioni 'chi ha preso X ha preso anche Y' su POS, kiosk, online ordering",
        "tools": ["POS API", "Collaborative filtering", "Real-time recommendations", "A/B testing"],
        "target": "Ristoranti, gelaterie, caffetterie, bakery"
    },
    "dynamic_pricing_ai": {
        "name": "Dynamic Pricing / Revenue Management",
        "price_range": "200-400€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Pricing dinamico per delivery/prenotazioni: ora, giorno, domanda, meteo, eventi",
        "tools": ["Historical sales", "Weather API", "Events API", "Competitor monitoring", "ML pricing model"],
        "target": "Ristoranti, hotel, ghost kitchen, delivery-only"
    },
    "waste_reduction_ai": {
        "name": "Riduzione Sprechi Alimentari AI",
        "price_range": "200-400€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Previsione domanda, ottimizzazione ordini, tracking sprechi, food cost optimization",
        "tools": ["POS + Inventory API", "Demand forecasting ML", "Supplier API", "Waste tracking"],
        "target": "Ristoranti, hotel, catering, mense, bakery"
    },

    # === CUSTOMER LIFECYCLE ===
    "clv_calculator": {
        "name": "Customer Lifetime Value Calculator",
        "price_range": "50-100€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 1500,
        "description": "Calcolo CLV automatico, segmentazione RFM, identificazione VIP, rischio churn",
        "tools": ["POS/CRM data", "RFM analysis", "Predictive ML", "Segmentation engine"],
        "target": "Tutti i locali con dati clienti"
    },
    "churn_prediction": {
        "name": "Predizione Churn Clienti",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Predice clienti a rischio abbandono, trigger automatici riattivazione",
        "tools": ["Visit frequency analysis", "ML churn model", "Automated winback campaigns"],
        "target": "Ristoranti, palestre, abbonamenti, loyalty programs"
    },
    "birthday_anniversary_marketing": {
        "name": "Marketing Compleanni/Anniversari Automatico",
        "price_range": "50-100€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 1500,
        "description": "Campagne automatiche compleanno/anniversario via Email/WhatsApp/SMS con offerta personalizzata",
        "tools": ["CRM data", "WhatsApp/Email/SMS API", "Coupon generator", "Redemption tracking"],
        "target": "Ristoranti, bar, gelaterie, palestre, centri estetici"
    },
    "referral_program_automation": {
        "name": "Programma Referral Automatico",
        "price_range": "50-100€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 1500,
        "description": "Referral tracking automatico, reward distribution, viral loop optimization",
        "tools": ["Unique referral links", "QR codes", "Reward automation", "Viral coefficient tracking"],
        "target": "Tutti i locali con clienti ricorrenti"
    },
    "gift_card_platform": {
        "name": "Piattaforma Gift Card Digitali",
        "price_range": "50-150€/mese + 2-5% transazione",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Gift card digitali brandizzate, vendita online, wallet Apple/Google, redemption POS",
        "tools": ["Stripe/PayPal", "Apple/Google Wallet API", "QR codes", "POS integration", "Balance checking"],
        "target": "Ristoranti, spa, parrucchieri, palestre, hotel"
    },

    # === OPERATIONS AUTOMATION ===
    "staff_scheduling_ai": {
        "name": "Pianificazione Turni AI",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Ottimizzazione turni basata su domanda prevista, costi lavoro, preferenze staff, compliance",
        "tools": ["Demand forecasting", "Labor law engine", "Employee preferences", "Shift swap marketplace"],
        "target": "Ristoranti, hotel, catering, palestre, mense"
    },
    "inventory_management_ai": {
        "name": "Gestione Inventario & Ordini AI",
        "price_range": "150-300€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Previsione consumi, riordino automatico, vendor price comparison, waste alerts",
        "tools": ["POS + Inventory API", "Demand forecasting", "Vendor API", "Par levels optimization"],
        "target": "Ristoranti, hotel, catering, bakery, gelaterie"
    },
    "vendor_price_comparison": {
        "name": "Confronto Prezzi Fornitori Automatico",
        "price_range": "50-150€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 1500,
        "description": "Monitoraggio prezzi fornitori, alert ribassi, confronto alternative, negoziazione assistita",
        "tools": ["Vendor portals/API", "Price scraping", "Alert engine", "Negotiation templates"],
        "target": "Ristoranti, hotel, catering, bakery"
    },
    "compliance_automation": {
        "name": "Compliance Automatica (HACCP/GDPR/Lavoro)",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Checklist HACCP digitali, scadenze GDPR, contratti lavoro, formazione obbligatoria, audit trail",
        "tools": ["Document automation", "Deadline tracking", "E-signature", "Audit templates", "Alert engine"],
        "target": "Tutti i locali (obbligatorio per legge)"
    },
    "energy_optimization": {
        "name": "Ottimizzazione Energetica Smart Meter",
        "price_range": "100-200€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Monitoraggio consumi real-time, anomaly detection, load shifting, carbon footprint",
        "tools": ["Smart meter API (Enel/Edison/etc.)", "IoT sensors", "ML anomaly detection", "Load shifting"],
        "target": "Ristoranti, hotel, palestre, centri commerciali, mense"
    },

    # === NICCHIA HIGH-VALUE ===
    "catering_lead_gen": {
        "name": "Lead Generation Catering Aziendale",
        "price_range": "50-150€/lead qualificato",
        "frequency": "per_lead",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Lead corporate catering: eventi aziendali, lunch meeting, conference, holiday parties",
        "tools": ["LinkedIn Sales Navigator API", "Crunchbase/Apollo API", "Corporate event calendars", "CRM"],
        "target": "Ristoranti con catering, catering companies, banqueting"
    },
    "private_dining_booking": {
        "name": "Prenotazione Private Dining Automatica",
        "price_range": "10-15% per prenotazione",
        "frequency": "per_booking",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Gestione automatica richieste private dining: disponibilità, menu, depositi, contratti, pagamenti",
        "tools": ["Calendar API", "Stripe deposits", "DocuSign/PDF contracts", "WhatsApp/Email confirmations"],
        "target": "Ristoranti con sale private, hotel, venue eventi"
    },
    "cooking_class_platform": {
        "name": "Piattaforma Corsi Cucina/Degustazione",
        "price_range": "15-20% per prenotazione",
        "frequency": "per_booking",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Prenotazione corsi cucina, wine tasting, masterclass: calendario, pagamenti, materiali, reminder",
        "tools": ["Calendar + Stripe", "Zoom/Meet integration", "Material kits shipping", "Certificates"],
        "target": "Ristoranti, chef, enoteche, pastifici, caseifici"
    },
    "franchise_compliance": {
        "name": "Monitoraggio Conformità Franchising",
        "price_range": "200-500€/location/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 5000,
        "description": "Monitoraggio standard brand: menu, prezzi, arredi, uniformi, processi, mystery shopping",
        "tools": ["Checklist digitali", "Photo audit", "Mystery shopper API", "Brand guidelines", "Alert engine"],
        "target": "Franchisor food, fitness, beauty, retail, services"
    },
    "ghost_kitchen_optimizer": {
        "name": "Ottimizzazione Ghost Kitchen / Delivery",
        "price_range": "300-500€ setup + 150€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "Ottimizzazione menu delivery, packaging, prezzi, commissioni JustEat/Glovo/UberEats/DoorDash",
        "tools": ["API JustEat/Glovo/UberEats/DoorDash", "Menu analytics", "Packaging optimizer", "Commission tracker"],
        "target": "Ghost kitchen, dark kitchen, ristoranti con delivery pesante"
    },
    "virtual_brand_launcher": {
        "name": "Lancio Virtual Brand (Delivery-Only)",
        "price_range": "1000-3000€ setup + 20% revenue",
        "frequency": "per_brand",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 5000,
        "description": "Lancio brand delivery-only: concept, menu, branding, foto, listing su piattaforme, marketing",
        "tools": ["AI concept generation", "Menu engineering", "Food photography AI", "Platform onboarding", "Ads automation"],
        "target": "Ristoranti con cucina sottoutilizzata, ghost kitchen, imprenditori food"
    },

    # === B2B / WHITE LABEL ===
    "white_label_saas_platform": {
        "name": "Piattaforma SaaS Whitelabel Completa",
        "price_range": "299-999€/mese per agenzia",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 15000,
        "description": "Piattaforma completa whitelabel: radar, mailer, CRM, booking, loyalty, reports - tutto brandizzabile",
        "tools": ["Multi-tenant architecture", "Stripe Connect", "Custom domains", "White-label dashboard", "API"],
        "target": "Agenzie web, freelancer, consulenti marketing, software house"
    },
    "agency_partner_program": {
        "name": "Programma Partner Agenzie (Revenue Share)",
        "price_range": "20-30% revenue share",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 5000,
        "description": "Agenzie rivendono i tuoi servizi (siti, SEO, ads, content) - tu fai delivery, loro sales",
        "tools": ["Partner portal", "Deal registration", "Commission tracking", "Co-branded materials", "Training"],
        "target": "Agenzie web, freelancer, consulenti, system integrator"
    },
    "developer_api_marketplace": {
        "name": "API Marketplace per Sviluppatori",
        "price_range": "Freemium + usage-based",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "API per: lead gen, email validation, business data, SEO audit, review monitoring, GMB data",
        "tools": ["API Gateway", "Rate limiting", "Billing/Stripe", "Documentation", "SDKs"],
        "target": "Sviluppatori, SaaS, agenzie tech, no-code builders"
    },

    # === FINANZIARIO / ASSICURATIVO ===
    "pos_financing_marketplace": {
        "name": "Marketplace Finanziamento POS/Attrezzature",
        "price_range": "2-5% per finanziamento",
        "frequency": "per_deal",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Finanziamento POS, registratori cassa, forni, frigoriferi, arredi per nuovi locali/ristrutturazioni",
        "tools": ["API istituti finanziari (Younited, Soisy, Scalapay)", "Credit scoring", "Document automation", "E-signature"],
        "target": "Nuovi ristoranti, ristrutturazioni, upgrade attrezzature"
    },
    "insurance_marketplace": {
        "name": "Marketplace Assicurativo Locale",
        "price_range": "10-20% commissione premio",
        "frequency": "per_policy",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 3000,
        "description": "RC professionale, cyber, infortuni, proprietà, HACCP, veicoli, business interruption",
        "tools": ["API broker (Yolo, Coverflex, etc.)", "Quote comparison", "PDF generation", "E-signature"],
        "target": "Tutti i locali (RC obbligatoria, HACCP, cyber, infortuni)"
    },
    "tax_compliance_automation": {
        "name": "Compliance Fiscale Automatica",
        "price_range": "100-300€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Fatturazione elettronica, corrispettivi, IVA, dichiarazioni, scadenze, F24, LIPE, spesometro",
        "tools": ["SDI/AdE API", "POS integration", "Bank API", "Deadline engine", "F24 generator"],
        "target": "Tutte le PMI, ristoranti, retail, professionisti"
    },

    # === EDUCAZIONE / FORMAZIONE ===
    "staff_training_lms": {
        "name": "LMS Formazione Staff Whitelabel",
        "price_range": "20-50€/dipendente/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 4000,
        "description": "HACCP, sicurezza, servizio, vendita, inglese, soft skills, GDPR - certificati automatici",
        "tools": ["LMS whitelabel", "Video AI generation", "Quiz/certificati auto", "Tracking completamento", "Report manager"],
        "target": "Ristoranti, hotel, catene, franchising, mense, catering"
    },
    "digital_transformation_consulting": {
        "name": "Consulenza Trasformazione Digitale",
        "price_range": "1000-5000€ progetto",
        "frequency": "per_project",
        "automation_level": "low",
        "current_mrr": 0,
        "potential_mrr": 5000,
        "description": "Audit digitale, roadmap 12 mesi, vendor selection, implementation, training, change management",
        "tools": ["Audit framework", "ROI calculator", "Vendor matrix", "Project templates", "Change mgmt framework"],
        "target": "PMI locali, ristoranti, retail, servizi professionali, catene"
    },

    # === SOSTENIBILITÀ / ESG ===
    "carbon_footprint_tracking": {
        "name": "Carbon Footprint & Sustainability Reporting",
        "price_range": "100-300€/mese",
        "frequency": "monthly",
        "automation_level": "high",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Calcolo CO2 (scope 1,2,3), report ESG, certificazioni, carbon offset, communication kit",
        "tools": ["Energy API", "Supplier data", "GHG Protocol calculator", "Offset marketplace API", "Report generator"],
        "target": "Ristoranti, hotel, catene, aziende con obblighi ESG"
    },
    "sustainable_sourcing_tracker": {
        "name": "Tracciabilità Filiera Sostenibile",
        "price_range": "200-500€/mese",
        "frequency": "monthly",
        "automation_level": "medium",
        "current_mrr": 0,
        "potential_mrr": 2000,
        "description": "Blockchain/DLT per tracciabilità ingredienti: origine, certificazioni, carbon footprint, fair trade",
        "tools": ["Blockchain/DLT (Polygon/Hedera)", "Supplier portals", "QR codes", "Consumer app", "Certification APIs"],
        "target": "Ristoranti farm-to-table, hotel, catene premium, catering"
    }
}

# ============================================================
# PRIORITY MATRIX v3
# ============================================================

PRIORITY_V3 = {
    "immediate_quick_wins": [  # Can launch THIS WEEK with existing infra
        "ai_social_content_calendar",
        "ai_review_generation",
        "ai_local_seo_citations",
        "ai_gmb_optimizer",
        "ai_review_generation",
        "birthday_anniversary_marketing",
        "referral_program_automation",
        "gift_card_platform",
    ],
    "week_2_4": {
        "focus": "Revenue Optimization + WhatsApp CRM",
        "streams": [
            "menu_engineering_ai",
            "ai_upsell_engine",
            "dynamic_pricing_ai",
            "waste_reduction_ai",
            "whatsapp_crm",
            "appointment_booking_saas",
            "loyalty_program_saas",
            "gift_card_platform",
        ]
    },
    "month_2": {
        "focus": "Operations + Customer Lifecycle + Marketplace",
        "streams": [
            "clv_calculator",
            "churn_prediction",
            "birthday_anniversary_marketing",
            "referral_program_automation",
            "staff_scheduling_ai",
            "inventory_management_ai",
            "vendor_price_comparison",
            "compliance_automation",
            "catering_lead_gen",
            "private_dining_booking",
            "b2b_lead_marketplace",
        ]
    },
    "month_3": {
        "focus": "High-Value Niche + Whitelabel SaaS",
        "streams": [
            "ghost_kitchen_optimizer",
            "virtual_brand_launcher",
            "franchise_compliance",
            "white_label_saas_platform",
            "agency_partner_program",
            "developer_api_marketplace",
        ]
    },
    "month_4_6": {
        "focus": "Scale + Financial + Education + ESG",
        "streams": [
            "pos_financing_marketplace",
            "insurance_marketplace",
            "tax_compliance_automation",
            "staff_training_lms",
            "digital_transformation_consulting",
            "carbon_footprint_tracking",
            "sustainable_sourcing_tracker",
            "staff_training_lms",
        ]
    }
}

# ============================================================
# COMBINED TAM CALCULATION
# ============================================================

def calculate_total_tam():
    """Calcola TAM totale combinando tutti gli stream."""
    all_streams = {}
    
    # Import existing
    try:
        import new_revenue_streams as nrs
        import additional_revenue_streams_v2 as ars2
        all_streams.update(nrs.REVENUE_STREAMS)
        all_streams.update(ars2.ADDITIONAL_STREAMS)
    except:
        pass
    all_streams.update(EXTENDED_STREAMS)
    
    total_potential = sum(s.get("potential_mrr", 0) for s in all_streams.values())
    total_current = sum(s.get("current_mrr", 0) for s in all_streams.values())
    high_auto = sum(s.get("potential_mrr", 0) for s in all_streams.values() if s.get("automation_level") == "high")
    med_auto = sum(s.get("potential_mrr", 0) for s in all_streams.values() if s.get("automation_level") == "medium")
    low_auto = sum(s.get("potential_mrr", 0) for s in all_streams.values() if s.get("automation_level") == "low")
    
    return {
        "total_streams": len(all_streams),
        "total_potential_mrr": total_potential,
        "current_mrr": total_current,
        "gap": total_potential - total_current,
        "high_automation_mrr": high_auto,
        "medium_automation_mrr": med_auto,
        "low_automation_mrr": low_auto,
        "high_automation_pct": round(high_auto / total_potential * 100, 1)
    }

def print_full_summary():
    tam = calculate_total_tam()
    all_streams = EXTENDED_STREAMS.copy()
    try:
        import new_revenue_streams as nrs
        import additional_revenue_streams_v2 as ars2
        all_streams.update(nrs.REVENUE_STREAMS)
        all_streams.update(ars2.ADDITIONAL_STREAMS)
    except:
        pass
    
    print(f"\n{'='*80}")
    print(f" GHOST AGENCY - REVENUE STREAMS MASTER SUMMARY (v3)")
    print(f"{'='*80}")
    print(f"Total Streams: {tam['total_streams']}")
    print(f"Potential MRR: €{tam['total_potential_mrr']:,.0f}/mese")
    print(f"Current MRR: €{tam['current_mrr']:,.0f}/mese")
    print(f"Gap: €{tam['gap']:,.0f}/mese")
    print(f"High Automation: €{tam['high_automation_mrr']:,.0f} ({tam['high_automation_pct']}%)")
    print(f"Medium Automation: €{tam['medium_automation_mrr']:,.0f}")
    print(f"Low Automation: €{tam['low_automation_mrr']:,.0f}")
    
    # Top 20
    all_streams = EXTENDED_STREAMS.copy()
    try:
        import new_revenue_streams as nrs
        import additional_revenue_streams_v2 as ars2
        all_streams.update(nrs.REVENUE_STREAMS)
        all_streams.update(ars2.ADDITIONAL_STREAMS)
    except:
        pass
    
    print(f"\n{'#':<3} {'Stream':<50} {'Potential MRR':>12} {'Auto':>6} {'Status'}")
    print("-"*80)
    for i, (key, stream) in enumerate(sorted(all_streams.items(), key=lambda x: x[1].get("potential_mrr", 0), reverse=True)[:20], 1):
        auto = stream.get("automation_level", "N/A")[:6]
        status = "���� Live" if stream.get("current_mrr", 0) > 0 else "���� Planned"
        print(f"{i:<3} {stream.get('name', key)[:48]:<50} €{stream.get('potential_mrr', 0):>10,} {auto:>6} {status}")

    print(f"\n\nQUICK WINS (This Week - High Auto + High Value):")
    for stream in PRIORITY_V3["immediate_quick_wins"]:
        s = EXTENDED_STREAMS.get(stream, {})
        print(f"  • {s.get('name', stream)} - €{s.get('potential_mrr', 0):,}/mese ({s.get('automation_level', 'N/A')})")

if __name__ == "__main__":
    print_full_summary()