<?php
// views/pages/upgrade.php
$from = $_GET['from'] ?? '';
$upgradeUrl = ''; // 🔗 troque aqui pro seu checkout

?>
<div class="rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 p-8 max-w-3xl mx-auto mt-8">
  <h1 class="text-2xl font-extrabold mb-2">Recurso disponível no plano Pró</h1>
  <?php if ($from): ?>
    <p class="text-slate-600 dark:text-slate-300 mb-4">
      Para acessar <strong><?= htmlspecialchars($from) ?></strong>, você precisa fazer upgrade do seu plano.
    </p>
  <?php else: ?>
    <p class="text-slate-600 dark:text-slate-300 mb-4">
      Algumas funcionalidades avançadas exigem o plano Pró.
    </p>
  <?php endif; ?>

  <div class="flex items-center gap-3 mt-2">
    <a href="<?= htmlspecialchars($upgradeUrl) ?>" target="_blank" rel="noopener noreferrer"
       class="inline-flex items-center font-bold rounded-xl px-4 py-2"
       style="background:linear-gradient(90deg,#6ee7ff,#7c3aed);color:#0b1020">
      Fazer upgrade agora
    </a>
    <a href="<?= BASE_URL ?>index.php?page=painel"
       class="inline-flex items-center rounded-xl px-4 py-2 border border-gray-300 dark:border-gray-700 text-sm">
      Voltar ao painel
    </a>
  </div>
</div>
