<?php
require_once __DIR__ . '/auth.php';
require_admin();

$pageTitle = app_setting($pdo, 'admin_heading', 'Admin Area');
require_once __DIR__ . '/includes/header.php';
?>

<main>
<section class="section">
<div class="container">
<div class="panel">

<h1><?php echo h(app_setting($pdo, 'admin_heading', 'Admin Area')); ?></h1>
<p class="muted"><?php echo h(app_setting($pdo, 'admin_intro', 'Manage content without editing code.')); ?></p>

<div class="admin-grid">

  <a class="card" href="admin_settings.php">
    <h2>Platform Settings Center</h2>
    <p class="muted">Setup wizard, branding, colors, menu labels, admin labels, domain, and footer text.</p>
  </a>



  <a class="card" href="admin_brothers.php">
    <h2><?php echo h(app_setting($pdo, 'admin_card_brothers_title', 'Manage Brothers')); ?></h2>
    <p class="muted"><?php echo h(app_setting($pdo, 'admin_card_brothers_text', 'Add, edit, delete names and phones.')); ?></p>
  </a>

  <a class="card" href="admin_rotation.php">
    <h2><?php echo h(app_setting($pdo, 'admin_card_rotation_title', 'Manage Prayer Rotation')); ?></h2>
    <p class="muted"><?php echo h(app_setting($pdo, 'admin_card_rotation_text', 'Edit monthly prayer assignments.')); ?></p>
  </a>

  <a class="card" href="admin_assignments.php">
    <h2><?php echo h(app_setting($pdo, 'admin_card_assignments_title', 'Manage Assignments')); ?></h2>
    <p class="muted"><?php echo h(app_setting($pdo, 'admin_card_assignments_text', 'Add and edit all assignment content.')); ?></p>
  </a>

  <a class="card" href="admin_prayer.php">
    <h2><?php echo h(app_setting($pdo, 'admin_card_prayer_title', 'Manage Prayer Guide')); ?></h2>
    <p class="muted"><?php echo h(app_setting($pdo, 'admin_card_prayer_text', 'Add prayer images and notes.')); ?></p>
  </a>

  <a class="card" href="admin_users.php">
    <h2><?php echo h(app_setting($pdo, 'admin_card_users_title', 'Registered Members')); ?></h2>
    <p class="muted"><?php echo h(app_setting($pdo, 'admin_card_users_text', 'See who has signed up.')); ?></p>
  </a>
</div>

</div>
</div>
</section>
</main>

<?php require_once __DIR__ . '/includes/footer.php'; ?>
