diff --git "a/frontend/src/components/MonetizationOverlay.tsx" "b/frontend/src/components/MonetizationOverlay.tsx" --- "a/frontend/src/components/MonetizationOverlay.tsx" +++ "b/frontend/src/components/MonetizationOverlay.tsx" @@ -2,11 +2,10 @@ import React, { useState, useEffect } from 'react'; import { apiFetch } from '@/lib/auth'; import { - Lock, Ticket, CreditCard, CheckCircle2, X, AlertCircle, + Lock, CreditCard, CheckCircle2, X, AlertCircle, Zap, Star, Crown, Copy, Check, ExternalLink, ShieldCheck, - Building2, Coins, ArrowRight, MessageCircle, Globe, ChevronRight, - Sparkles, ArrowLeft, RefreshCw, Mail, CheckCircle, Flame, - Shield, Wallet, BadgeCheck, HelpCircle + Building2, Coins, ArrowRight, MessageCircle, Globe, + ArrowLeft, Mail, Clock } from 'lucide-react'; interface MonetizationOverlayProps { @@ -21,39 +20,23 @@ const PLAN_METADATA: Record = { basic: { icon: Zap, - tag: 'STARTER FLEET', - headline: 'Ideal for Solo Operators & Starters', - badgeStyle: 'bg-emerald-500/15 text-emerald-400 border-emerald-500/30', - cardBorder: 'border-emerald-500/30 hover:border-emerald-500/60', - glowStyle: 'shadow-emerald-500/20', - bgGradient: 'from-emerald-500/10 via-teal-900/10 to-transparent' + tag: 'Starter', + headline: 'Ideal for solo operators & small tests' }, standard: { icon: Star, - tag: '🔥 MOST POPULAR', - headline: 'The Ultimate High-Volume Engine', - badgeStyle: 'bg-gradient-to-r from-amber-500/20 to-orange-500/20 text-amber-300 border-amber-500/40', - cardBorder: 'border-indigo-500/50 hover:border-indigo-400', - glowStyle: 'shadow-[0_0_50px_rgba(99,102,241,0.35)]', - bgGradient: 'from-indigo-600/20 via-purple-600/10 to-transparent', + tag: 'Most Popular', + headline: 'High-volume engine for serious campaigns', popular: true }, premium: { icon: Crown, - tag: '👑 ENTERPRISE ELITE', - headline: 'Unlimited Power & Maximum Scale', - badgeStyle: 'bg-purple-500/20 text-purple-300 border-purple-500/40', - cardBorder: 'border-purple-500/40 hover:border-purple-400', - glowStyle: 'shadow-purple-500/25', - bgGradient: 'from-purple-600/20 via-pink-600/10 to-transparent' + tag: 'Enterprise', + headline: 'Maximum scale with unrestricted power' }, }; @@ -144,7 +127,6 @@ const CRYPTO_WALLETS: Record = { USDT: { key: 'USDT', @@ -153,7 +135,6 @@ const CRYPTO_WALLETS: Record = ({ childr {children} {isLocked && ( <> - {/* Fixed Center Container for Unlock Modal - Perfectly Centered via my-auto + flex */} -
- {/* Deep frosted glass backdrop with subtle ambient light */} -
+ {/* Fixed Center Container for Upgrade Modal */} +
+ {/* Deep frosted neutral backdrop */} +
- {/* Centered Modern Upgrade Card (Extra wide: max-w-5xl, perfectly centered with my-auto) */} -
+ {/* Centered Modern Upgrade Card */} +
- {/* Radiant ambient glow rings */} -
-
-
- - {/* Top Header Badge & Headline */} -
-
- - - - - - Unlock Full Enterprise Automation Suite + {/* Header: Clean, Human & Uncluttered */} +
+
+ + Subscription Required
-

- Supercharge Your Automation Fleet +

+ Unlock {featureName}

-

- {featureName} is unlocked exclusively for active tier subscribers. Choose your tier below to remove all limits immediately. +

+ Select an active subscription tier below to run high-speed campaigns and remove fleet dispatch limits.

- {/* Scrollable Main Content if Screen is Short */} -
+ {/* Scrollable Main Content */} +
{status?.has_proof ? ( /* Verification Pending State */ -
-
- - +
+
+
-
+
Receipt Under Review
-

Verification Desk In Progress

-

- Your payment submission is registered with our administration desk. Once verified, your fleet limits will be upgraded instantly and a confirmation will be emailed to {status?.email || 'your account'}. +

Verification in Progress

+

+ Your payment is being verified by our desk. Your account will be upgraded within a few minutes.

-
+
- + Open Official WhatsApp Desk - + @@ -420,90 +389,97 @@ export const MonetizationOverlay: React.FC = ({ childr
) : ( <> - {/* 3-Tier Plan Grid - Expanded & Highly Engaging */} -
+ {/* 3-Tier Plan Grid - Non-overlapping, uniform heights */} +
{plans.map((plan) => { const meta = PLAN_METADATA[plan.key] || { icon: Star, - tag: 'PLAN TIER', + tag: 'Plan', headline: 'Standard Access Plan', - badgeStyle: 'bg-white/10 text-white border-white/20', - cardBorder: 'border-white/10', - glowStyle: 'shadow-none', - bgGradient: 'from-white/5 to-transparent' + popular: false }; const Icon = meta.icon; const isSelected = selectedPlan === plan.key; - const perks = typeof plan.perks === 'string' ? JSON.parse(plan.perks) : plan.perks; + const perks = typeof plan.perks === 'string' ? JSON.parse(plan.perks) : (plan.perks || []); return ( @@ -511,36 +487,36 @@ export const MonetizationOverlay: React.FC = ({ childr })}
- {/* Action Bar: Primary Payment CTA + Coupon Input */} + {/* Action Bar: Pay Button & Coupon */}
- {/* Big Glowing Pay & Upgrade Button */} + {/* Primary Pay & Upgrade CTA */} - {/* Coupon Capsule */} -
+ {/* Clean Coupon Input */} +
setCouponCode(e.target.value.toUpperCase())} - className="flex-1 bg-transparent px-3 py-2 text-xs font-black outline-none text-white placeholder:text-foreground/30 tracking-wider uppercase text-center" + className="flex-1 bg-transparent px-3 py-1.5 text-xs font-medium outline-none text-white placeholder:text-slate-500 tracking-wider uppercase text-center" /> @@ -548,26 +524,27 @@ export const MonetizationOverlay: React.FC = ({ childr
{msg.text && ( -
- +
+ {msg.text}
)} {/* Security & Guarantee Trust Bar */} -
+
- + 256-Bit Encrypted Transfer - - Instant 5-Min Desk Verification + + Fast Desk Verification - - Multi-Currency & Global Crypto Accepted + + Bank & Crypto Accepted
@@ -577,436 +554,389 @@ export const MonetizationOverlay: React.FC = ({ childr
- {/* MODAL: Payment Channels, Bank Accounts & Crypto (Expansive width: max-w-5xl, perfectly centered with my-auto) */} + {/* MODAL: Payment Channels, Bank Accounts & Crypto */} {showPaymentModal && ( -
+
{/* Frosted deep dark backdrop */}
setShowPaymentModal(false)} /> - {/* Centered Modal Container (Spacious max-w-5xl, no longer tiny!) */} -
+ {/* Centered Modal Container */} +
{/* Floating Copied Toast Alert */} {copiedNotification && ( -
- +
+ {copiedNotification}
)} {/* Modal Header */} -
-
-
- {paymentMethod === 'bank' ? : } +
+
+
+ {paymentMethod === 'bank' ? : }
-
-

- {modalStep === 'details' ? 'Manual Transfer & Crypto Checkout' : 'Receipt Verification Desk'} -

- - Fast Verification - -
-

- Upgrading Plan: {plans.find(p => p.key === selectedPlan)?.name} • Equivalent Payable: {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)} +

+ {modalStep === 'details' ? 'Payment Details' : 'Verify Transaction'} +

+

+ Plan: {plans.find(p => p.key === selectedPlan)?.name} • Total Due: {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)}

- {/* Modal Body - 2 Column Split Layout for Desktop */} -
+ {/* Modal Body */} +
{modalStep === 'details' ? ( -
+
- {/* Left Column (5 of 12): Method Switcher, Currency Selector & Plan Recap */} -
- - {/* 1. Payment Method Toggle */} + {/* Clean Segmented Tab Bar for Channel Selection */} +
+ + + +
+ + {/* Currency / Coin Selector Chips */} + {paymentMethod === 'bank' ? (
- -
- - - +
+ Select Account Currency: +
+
+ {Object.entries(BANK_ACCOUNTS).map(([currKey, acc]) => { + const isSel = selectedCurrency === currKey; + return ( + + ); + })}
- - {/* 2. Currency / Coin Selector Chips */} - {paymentMethod === 'bank' ? ( -
-
- - 2. Choose Bank Currency - - Equal FX Rates -
-
- {Object.entries(BANK_ACCOUNTS).map(([currKey, acc]) => { - const isSel = selectedCurrency === currKey; - return ( - - ); - })} -
+ ) : ( +
+
+ Select Cryptocurrency:
- ) : ( -
-
- - 2. Choose Cryptocurrency - - On-Chain -
-
- {Object.entries(CRYPTO_WALLETS).map(([cKey, cw]) => { - const isSel = selectedCrypto === cKey; - return ( - - ); - })} -
+
+ {Object.entries(CRYPTO_WALLETS).map(([cKey, cw]) => { + const isSel = selectedCrypto === cKey; + return ( + + ); + })}
- )} +
+ )} - {/* Summary Recap Card */} -
-
- Selected Tier - {plans.find(p => p.key === selectedPlan)?.name} + {/* Amount Due Card */} +
+
+
+ Total Payable Amount:
-
- Billing Term - Monthly Recurring Access +
+ {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)}
-
- Amount Due - - {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)} - +
+ {paymentMethod === 'bank' ? BANK_ACCOUNTS[selectedCurrency]?.sublabel : `Network: ${CRYPTO_WALLETS[selectedCrypto]?.network}`}
+ +
- {/* Right Column (7 of 12): Account Details & Copy Actions */} -
- - {/* Big Amount Card with 1-Click Copy */} -
-
-
- - Exact Amount To Send -
-
- {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)} -
-
- {paymentMethod === 'bank' ? BANK_ACCOUNTS[selectedCurrency]?.sublabel : `Please ensure exact amount over ${CRYPTO_WALLETS[selectedCrypto]?.network}`} -
+ {/* Bank Account Details */} + {paymentMethod === 'bank' && ( +
+
+ Destination Account ({BANK_ACCOUNTS[selectedCurrency]?.label})
- -
- - {/* Bank Accounts Grid with Individual Copy Buttons */} - {paymentMethod === 'bank' && ( -
-
- Destination Account Details ({BANK_ACCOUNTS[selectedCurrency]?.label}) -
+
+ {BANK_ACCOUNTS[selectedCurrency]?.details.map((field, idx) => ( +
+
+
+ {field.label} + {field.isPrimary && ( + + Primary + + )} +
+
+ {field.value} +
+
-
- {BANK_ACCOUNTS[selectedCurrency]?.details.map((field, idx) => ( -
copyToClipboard(field.value, `bank-field-${idx}`, `${field.label} copied`)} + className={`px-3 py-1.5 rounded-lg text-xs font-medium flex items-center gap-1.5 transition-colors shrink-0 cursor-pointer ${ + copiedKey === `bank-field-${idx}` + ? 'bg-emerald-500 text-black' + : 'bg-white/5 hover:bg-white/10 text-slate-300 border border-white/10' }`} > -
-
- {field.label} - {field.isPrimary && ( - - Primary - - )} -
-
- {field.value} -
-
- - -
- ))} -
+ {copiedKey === `bank-field-${idx}` ? ( + <> + + Copied + + ) : ( + <> + + Copy + + )} + +
+ ))}
- )} - - {/* Crypto Details Box with Individual Copy */} - {paymentMethod === 'crypto' && (() => { - const cw = CRYPTO_WALLETS[selectedCrypto]; - return ( -
- {/* Network Warning Banner */} -
- ⚠️ -
- Verify Blockchain Network: - Send only {cw.name} on the {cw.network} network. Sending on any other network will result in unrecoverable funds. -
+
+ )} + + {/* Crypto Wallet Details */} + {paymentMethod === 'crypto' && (() => { + const cw = CRYPTO_WALLETS[selectedCrypto]; + return ( +
+ {/* Warning Banner */} +
+ ⚠️ +
+ Network Verification: + Send only {cw.name} on the {cw.network} network. Other networks will result in lost funds.
+
- {/* Deposit Address Box */} -
-
- - Deposit Wallet Address ({cw.network}) - - - {cw.network} - -
+ {/* Wallet Address Box */} +
+
+ + Deposit Address ({cw.network}) + + + {cw.network} + +
-
-
- {cw.address} -
- +
+
+ {cw.address}
+
- ); - })()} +
+ ); + })()} - {/* Primary "I've Made Payment" CTA */} - -
+ {/* Continue to Verification Button */} +
) : ( /* Step 2: Verification Instructions & WhatsApp Dispatch */ -
+
-
-
- - Instant Verification Protocol +
+
+ + Verification Instructions
-
    -
  1. Take a screenshot or save the transaction receipt from your banking app or crypto wallet.
  2. -
  3. Click the glowing WhatsApp button below to open our official WhatsApp desk.
  4. -
  5. Your transaction summary will be auto-copied. Simply paste it and attach your receipt photo!
  6. -
  7. Our desk approves the transaction and unlocks your account within 5 minutes.
  8. +
      +
    1. Take a screenshot of your successful transaction receipt.
    2. +
    3. Click the WhatsApp button below to open our verification desk.
    4. +
    5. Your transaction details are copied automatically. Paste and send them with your receipt.
    6. +
    7. Our desk will confirm and activate your plan within 5 minutes.
{/* Transaction Summary Card */} -
-
- Transaction Overview +
+
+ Transaction Summary
-
-
- Plan - {plans.find(p => p.key === selectedPlan)?.name} +
+
+ Plan + {plans.find(p => p.key === selectedPlan)?.name}
-
- Channel - {paymentMethod === 'bank' ? `Bank (${selectedCurrency})` : `Crypto (${selectedCrypto})`} +
+ Channel + {paymentMethod === 'bank' ? `Bank (${selectedCurrency})` : `Crypto (${selectedCrypto})`}
-
- Amount - {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)} +
+ Amount + {getConvertedPrice(paymentMethod === 'bank' ? selectedCurrency : selectedCrypto)}
-
- Your Username - {status?.username || 'Current User'} +
+ Username + {status?.username || 'Current User'}
{/* Optional Sender Reference Input */} -
-