<?php
$pageTitle = 'Create Funnel';
$currentPage = 'funnels';
$breadcrumb = [['label'=>'Funnels','url'=>url('/funnels')],['label'=>'Create New']];
require_once APP_PATH . '/views/layouts/header.php';
?>
<div style="max-width:640px">
<div class="card" style="padding:2rem">
    <h2 style="font-weight:800;font-size:1.1rem;color:#111827;margin:0 0 1.5rem">Create New Funnel</h2>
    <form method="POST" action="<?= url('/funnels/store') ?>">
        <?= csrf_field() ?>
        <div style="display:flex;flex-direction:column;gap:1.25rem">
            <div>
                <label class="form-label">Funnel Name *</label>
                <input type="text" name="name" class="form-input" placeholder="e.g. Lead Generation Funnel" required autofocus>
            </div>
            <div>
                <label class="form-label">Description</label>
                <textarea name="description" class="form-input" rows="2" placeholder="Short description (optional)"></textarea>
            </div>
            <div style="background:#eff6ff;border:1px solid #bfdbfe;border-radius:.875rem;padding:1rem;font-size:.8rem;color:#1e40af">
                <i class="fas fa-info-circle" style="margin-right:.375rem"></i>
                After creating, you can add multiple pages, drag to reorder steps, embed forms, and design landing pages with the visual builder.
            </div>
            <div style="display:flex;gap:.75rem;padding-top:.5rem;border-top:1px solid #f3f4f6">
                <button type="submit" class="btn-primary"><i class="fas fa-save"></i> Create Funnel</button>
                <a href="<?= url('/funnels') ?>" class="btn-secondary">Cancel</a>
            </div>
        </div>
    </form>
</div>
</div>
<?php require_once APP_PATH . '/views/layouts/footer.php'; ?>
