<?php $__env->startSection('guest'); ?>
<?php
    $isPersonal = filled($agent);
    $agentName = $agent?->displayName() ?? 'NewKipp Microfinance Solution Merchants';
    $registerUrl = $agent?->defaultSignupUrl() ?? route('tenant.register');
    $whatsappText = urlencode('Hello, I want to join the NewKipp Microfinance Solution merchant program.');
    $commissionMax = \App\Models\Agent::MAX_COMMISSION_RATE;
    $platformProducts = $platformProducts ?? collect();
?>

<div class="agent-site">
    <nav class="agent-nav">
        <div class="container d-flex align-items-center justify-content-between py-3">
            <a href="<?php echo e(route('landing')); ?>" class="site-brand">
                <span>NK</span>
                <strong>NewKipp Microfinance Solution</strong>
            </a>
            <div class="d-none d-lg-flex align-items-center gap-4 small fw-semibold">
                <a href="#how">How it works</a>
                <a href="#software">Software</a>
                <a href="#earnings">Earnings</a>
                <a href="#incentives">Incentives</a>
                <a href="#tools">Tools</a>
                <a href="#faq">FAQ</a>
            </div>
            <div class="d-flex gap-2">
                <a href="<?php echo e(route('login')); ?>" class="btn btn-outline-dark btn-sm">Sign in</a>
                <a href="<?php echo e(route('merchants.register')); ?>" class="btn btn-primary btn-sm">Become a merchant</a>
            </div>
        </div>
    </nav>

    <header class="agent-hero">
        <div class="agent-hero-image"></div>
        <div class="agent-hero-overlay"></div>
        <div class="container agent-hero-content">
            <div class="row g-5 align-items-center">
                <div class="col-lg-7">
                    <span class="agent-eyebrow"><?php echo e($isPersonal ? 'Verified merchant partner' : 'Merchant partner program'); ?></span>
                    <h1><?php echo e($isPersonal ? 'Start your software journey through '.$agentName.'.' : 'Earn up to '.$commissionMax.'% commission by onboarding companies across our software brands.'); ?></h1>
                    <p><?php echo e($isPersonal ? $agentName.' will guide you from registration to the right product, whether you need microfinance, POS, hotel, HR, hospital, or other business software.' : 'Join the merchant network, onboard companies into microfinance, POS, hotel, HR, hospital and more, hit targets, unlock levels, win bonuses, collect awards, and earn recurring commission when companies renew.'); ?></p>
                    <div class="d-flex flex-wrap gap-2">
                        <a href="<?php echo e($registerUrl); ?>" class="btn btn-primary btn-lg"><i class="bi bi-building-add me-2"></i><?php echo e($isPersonal ? 'Register company' : 'Register a tenant'); ?></a>
                        <a href="<?php echo e(route('merchants.register')); ?>" class="btn btn-outline-light btn-lg"><i class="bi bi-person-plus me-2"></i>Join as merchant</a>
                    </div>
                    <div class="agent-hero-points">
                        <span><i class="bi bi-check-circle"></i> Up to <?php echo e($commissionMax); ?>% commission</span>
                        <span><i class="bi bi-check-circle"></i> Multiple software products</span>
                        <span><i class="bi bi-check-circle"></i> Levels and target bonuses</span>
                        <span><i class="bi bi-check-circle"></i> Awards, wins and gifts</span>
                    </div>
                </div>
                <div class="col-lg-5">
                    <div class="agent-panel">
                        <div class="d-flex justify-content-between align-items-center mb-3">
                            <div>
                                <strong><?php echo e($isPersonal ? $agentName : 'Merchant income tracker'); ?></strong>
                                <div class="text-muted small"><?php echo e($isPersonal ? 'Personal onboarding link' : 'Commission dashboard preview'); ?></div>
                            </div>
                            <span class="badge text-bg-success">Live</span>
                        </div>
                        <div class="agent-commission-badge">
                            <span>Maximum merchant commission</span>
                            <strong><?php echo e($commissionMax); ?>%</strong>
                            <em>on onboarded companies</em>
                        </div>
                        <div class="agent-panel-grid">
                            <div><span>Assigned companies</span><strong>32</strong></div>
                            <div><span>Active plans</span><strong>24</strong></div>
                            <div><span>Target level</span><strong>Elite</strong></div>
                            <div><span>Potential wins</span><strong>Bonuses</strong></div>
                        </div>
                        <div class="agent-ref-card">
                            <span>Referral link</span>
                            <strong><?php echo e($isPersonal ? $agent->tenantSignupUrl() : url('/register-company?merchant=your-code')); ?></strong>
                        </div>
                        <div class="agent-step-mini"><i class="bi bi-1-circle"></i><span>Share your link with prospects.</span></div>
                        <div class="agent-step-mini"><i class="bi bi-2-circle"></i><span>Tenant registers and starts free trial.</span></div>
                        <div class="agent-step-mini"><i class="bi bi-3-circle"></i><span>Commission is recorded after subscription payment.</span></div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <section class="agent-proof">
        <div class="container">
            <div class="row g-3">
                <div class="col-6 col-lg-3"><div><span>Free trial</span><strong>14 days</strong></div></div>
                <div class="col-6 col-lg-3"><div><span>Commission</span><strong>Up to <?php echo e($commissionMax); ?>%</strong></div></div>
                <div class="col-6 col-lg-3"><div><span>Products</span><strong>Multi-software</strong></div></div>
                <div class="col-6 col-lg-3"><div><span>Rewards</span><strong>Awards + gifts</strong></div></div>
            </div>
        </div>
    </section>

    <section id="how" class="agent-section">
        <div class="container">
            <div class="agent-section-head">
                <span class="agent-eyebrow dark">How it works</span>
                <h2>Simple enough to sell, structured enough to scale.</h2>
                <p>Merchants focus on onboarding, referral, and relationship building while the platform handles tenant billing, subscription activation, and commission records.</p>
            </div>
            <div class="row g-3">
                <?php $__currentLoopData = [
                    ['bi-person-plus', 'Create or sign up', 'Merchants can register themselves and complete verification before commission earning starts.'],
                    ['bi-link-45deg', 'Share your links', 'Every active merchant gets a beautiful landing page, onboarding link, and referral-only link.'],
                    ['bi-building-check', 'Onboard tenants', 'Microfinance companies register, start trial, and operate from their own tenant portal.'],
                    ['bi-cash-coin', 'Earn commission', 'When assigned tenants pay subscriptions, commission is calculated and tracked automatically, with rates up to '.$commissionMax.'%.'],
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$icon, $title, $body]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-md-6 col-xl-3">
                        <div class="agent-feature">
                            <i class="bi <?php echo e($icon); ?>"></i>
                            <h3><?php echo e($title); ?></h3>
                            <p><?php echo e($body); ?></p>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </section>

    <?php if($platformProducts->isNotEmpty()): ?>
        <section id="software" class="agent-section agent-soft">
            <div class="container">
                <div class="agent-section-head">
                    <span class="agent-eyebrow dark">Software marketplace</span>
                    <h2>One merchant program for all your business software.</h2>
                    <p>Merchants can promote and onboard companies into each software brand from one portal, while every link carries the merchant code for tracking.</p>
                </div>
                <div class="row g-3">
                    <?php $__currentLoopData = $platformProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php ($productUrl = $agent ? $product->trackingUrlFor($agent, \App\Models\Agent::MERCHANT_ONBOARDING) : route('merchants.register')); ?>
                        <div class="col-md-6 col-xl-3">
                            <div class="agent-feature h-100">
                                <i class="bi <?php echo e($product->displayIcon()); ?>" style="color: <?php echo e($product->color); ?>"></i>
                                <span class="badge text-bg-light mb-2"><?php echo e($product->categoryLabel()); ?></span>
                                <h3><?php echo e($product->name); ?></h3>
                                <p><?php echo e($product->short_description); ?></p>
                                <a href="<?php echo e($productUrl); ?>" class="btn btn-sm btn-outline-primary"><?php echo e($isPersonal ? 'Open link' : 'Sell this product'); ?></a>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </section>
    <?php endif; ?>

    <section id="earnings" class="agent-section agent-soft">
        <div class="container">
            <div class="row g-4 align-items-center">
                <div class="col-lg-5">
                    <span class="agent-eyebrow dark">Earnings</span>
                    <h2>Commission keeps coming as companies renew.</h2>
                    <p class="agent-lead">Merchants can earn up to <?php echo e($commissionMax); ?>% on onboarded companies. The system records commission from approved subscription payments, then payouts are reviewed and settled after approval.</p>
                    <a href="<?php echo e(route('merchants.register')); ?>" class="btn btn-primary btn-lg">Apply as merchant</a>
                </div>
                <div class="col-lg-7">
                    <div class="agent-earnings">
                        <div><span>Tenant monthly plan</span><strong>NGN 60,000</strong><small>Example Growth plan</small></div>
                        <div><span>Top merchant rate</span><strong><?php echo e($commissionMax); ?>%</strong><small>For qualified onboarded companies</small></div>
                        <div><span>Monthly commission</span><strong>NGN 21,000</strong><small>Example per paid company</small></div>
                        <div><span>Merchant portfolio</span><strong>Recurring</strong><small>Commission grows as companies renew</small></div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section id="incentives" class="agent-section">
        <div class="container">
            <div class="agent-section-head">
                <span class="agent-eyebrow dark">Levels and incentives</span>
                <h2>Give merchants a reason to keep winning.</h2>
                <p>Merchants can grow through levels, chase monthly targets, unlock bonuses, earn recognition, and qualify for gifts as they onboard paying companies.</p>
            </div>
            <div class="agent-level-track">
                <?php $__currentLoopData = [
                    ['Starter', 'Get your links, sales materials, and dashboard access.', 'starter'],
                    ['Builder', 'Build steady tenant conversations and follow-up routines.', 'builder'],
                    ['Growth', 'Unlock priority support, campaign pushes, and recognition.', 'growth'],
                    ['Leader', 'Compete for awards, bonuses, and higher-value opportunities.', 'leader'],
                    ['Elite', 'Stand out as a top merchant with premium rewards and gifts.', 'elite'],
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$name, $body, $class]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="agent-level-card <?php echo e($class); ?>">
                        <span><?php echo e($name); ?></span>
                        <strong>Level path</strong>
                        <small>Targets shown inside merchant portal</small>
                        <p><?php echo e($body); ?></p>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <div class="row g-3 mt-2">
                <?php $__currentLoopData = [
                    ['bi-bullseye', 'Monthly targets', 'Set company onboarding targets and track progress toward bonus eligibility.'],
                    ['bi-stars', 'Performance bonuses', 'Reward merchants who hit monthly, quarterly, or campaign-specific growth goals.'],
                    ['bi-trophy', 'Awards and wins', 'Recognize top merchants with badges such as Merchant of the Month and Top Closer.'],
                    ['bi-gift', 'Gifts and rewards', 'Offer airtime, data, branded items, event tickets, cash gifts, or special bonuses.'],
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$icon, $title, $body]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-md-6 col-xl-3">
                        <div class="agent-feature agent-reward-feature">
                            <i class="bi <?php echo e($icon); ?>"></i>
                            <h3><?php echo e($title); ?></h3>
                            <p><?php echo e($body); ?></p>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </section>

    <section id="tools" class="agent-section">
        <div class="container">
            <div class="agent-section-head">
                <span class="agent-eyebrow dark">Merchant tools</span>
                <h2>Everything merchants need to onboard and refer confidently.</h2>
            </div>
            <div class="row g-3">
                <?php $__currentLoopData = [
                    ['bi-globe2', 'Personal landing page', 'A shareable page for each active merchant with strong sales copy and registration CTA.'],
                    ['bi-speedometer2', 'Merchant dashboard', 'Track assigned tenants, active subscriptions, levels, targets, pending commission, and paid commission.'],
                    ['bi-person-badge', 'Merchant verification', 'Complete KYC, receive approval, get tenant assignments, and track payout status.'],
                    ['bi-grid-1x2', 'Multi-software catalog', 'Sell microfinance, POS, hotel, HR, hospital, school, and other software brands from one portal.'],
                    ['bi-receipt', 'Subscription commission', 'Commission is generated from approved subscription payments and renewals.'],
                    ['bi-award', 'Growth incentives', 'Levels, target bonuses, awards, wins, gifts, and special recognition keep merchants motivated.'],
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$icon, $title, $body]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-md-6 col-xl-4">
                        <div class="agent-feature">
                            <i class="bi <?php echo e($icon); ?>"></i>
                            <h3><?php echo e($title); ?></h3>
                            <p><?php echo e($body); ?></p>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </section>

    <?php if($featuredAgents->isNotEmpty()): ?>
        <section class="agent-section agent-soft">
            <div class="container">
                <div class="agent-section-head">
                    <span class="agent-eyebrow dark">Active partners</span>
                    <h2>Meet merchants already onboarding companies.</h2>
                </div>
                <div class="row g-3">
                    <?php $__currentLoopData = $featuredAgents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $featured): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-md-6 col-lg-4">
                            <a href="<?php echo e($featured->referralUrl()); ?>" class="agent-card-link">
                                <div class="agent-feature h-100">
                                    <i class="bi bi-person-badge"></i>
                                    <h3><?php echo e($featured->displayName()); ?></h3>
                                    <p><?php echo e($featured->user?->phone ?: $featured->user?->email); ?></p>
                                    <span class="badge text-bg-success">Verified merchant</span>
                                </div>
                            </a>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </section>
    <?php endif; ?>

    <section id="faq" class="agent-section agent-contact">
        <div class="container">
            <div class="row g-4 align-items-start">
                <div class="col-lg-5">
                    <span class="agent-eyebrow">FAQ</span>
                    <h2>Built for serious onboarding partners.</h2>
                    <p>Merchants can work with schools, cooperatives, community lenders, churches, market associations, and finance operators across Nigeria.</p>
                    <div class="d-flex flex-wrap gap-2">
                        <a href="<?php echo e(route('merchants.register')); ?>" class="btn btn-light btn-lg">Become a merchant</a>
                        <a href="https://wa.me/2348000000000?text=<?php echo e($whatsappText); ?>" target="_blank" rel="noopener" class="btn btn-outline-light btn-lg"><i class="bi bi-whatsapp me-1"></i> WhatsApp</a>
                    </div>
                </div>
                <div class="col-lg-7">
                    <div class="accordion agent-faq" id="agentFaq">
                        <?php $__currentLoopData = [
                            ['Can merchants sign up themselves?', 'Yes. They can register, log in, complete KYC, and see their merchant dashboard. Commission earning starts after profile approval.'],
                            ['Can tenants be assigned manually?', 'Yes. A tenant can be assigned or moved to a merchant when there is assigned onboarding or referral work.'],
                            ['How much commission can a merchant earn?', 'Qualified merchants can earn up to '.$commissionMax.'% commission on onboarded companies, depending on the approved merchant type and level.'],
                            ['When is commission created?', 'Commission is generated when a tenant subscription payment is approved, including monthly and yearly payments.'],
                            ['What incentives are available?', 'The program can include levels, monthly targets, bonuses, awards, wins, gifts, priority lead assignment, and recognition for top performers.'],
                            ['Can each merchant have a personalized link?', 'Yes. Every active merchant gets a personalized public landing page, an onboarding link, and a referral link.'],
                        ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$question, $answer]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="accordion-item">
                                <h3 class="accordion-header">
                                    <button class="accordion-button <?php echo e($loop->first ? '' : 'collapsed'); ?>" type="button" data-bs-toggle="collapse" data-bs-target="#faq<?php echo e($loop->iteration); ?>">
                                        <?php echo e($question); ?>

                                    </button>
                                </h3>
                                <div id="faq<?php echo e($loop->iteration); ?>" class="accordion-collapse collapse <?php echo e($loop->first ? 'show' : ''); ?>" data-bs-parent="#agentFaq">
                                    <div class="accordion-body"><?php echo e($answer); ?></div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <footer class="site-footer">
        <div class="container d-flex flex-column flex-md-row justify-content-between gap-3 py-4">
            <div class="site-brand"><span>NK</span><strong>NewKipp Microfinance Solution Merchants</strong></div>
            <div class="d-flex flex-wrap gap-3 small">
                <a href="<?php echo e(route('landing')); ?>">Main website</a>
                <a href="<?php echo e(route('merchants.register')); ?>">Become a merchant</a>
                <a href="<?php echo e(route('tenant.register')); ?>">Register company</a>
                <a href="<?php echo e(route('login')); ?>">Sign in</a>
            </div>
        </div>
    </footer>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Polite hp\Documents\Codex\2026-05-08\build-a-complete-production-ready-saas\microfinance-saas\resources\views\public\agents-landing.blade.php ENDPATH**/ ?>