<?php
session_start();
require_once __DIR__ . '/../includes/auth_paths.php';
$pageTitle = 'Admin Login — Almost Heaven Radio';
$metaDescription = 'Sign in to the Almost Heaven Radio admin dashboard.';
$error = $_SESSION['login_error'] ?? '';
unset($_SESSION['login_error']);
include('../header.php');
?>
<main class="main-container login-shell-pro admin-main">
  <section class="login-shell-wrap content-card admin-card-panel">
    <div class="login-shell-grid">
      <div class="login-brand-pane">
        <span class="section-kicker">Almost Heaven Admin</span>
        <h2>Professional station control built around Heaven branding</h2>
        <p>Use the admin dashboard to manage requests, comments, pages, DJs, events, contact messages, chat, polls, and the rest of the station tools.</p>
        <div class="login-feature-grid">
          <div class="login-feature-pill">🎙 Requests, comments, contact, chat</div>
          <div class="login-feature-pill">📰 News, featured events, page builder</div>
          <div class="login-feature-pill">📻 Schedules, DJs, Top 50, media</div>
          <div class="login-feature-pill">🔐 External auth + admin roles</div>
        </div>
        <div class="button-row">
          <a href="/index.php" class="button button-secondary">← Return to Main Site</a>
        </div>
      </div>
      <div class="login-panel-card pro-login-card">
        <h3>🔐 Admin Login</h3>
        <p class="text-muted">Sign in with your station admin credentials.</p>
        <?php if ($error): ?>
          <div class="login-error-box"><?= htmlspecialchars($error) ?></div>
        <?php endif; ?>
        <form method="post" action="authenticate.php" class="login-form-pro">
          <label for="login-username">Username</label>
          <input id="login-username" type="text" name="username" class="admin-input mb-2" placeholder="Enter username" required />
          <label for="login-password">Password</label>
          <input id="login-password" type="password" name="password" class="admin-input mb-2" placeholder="Enter password" required />
          <button type="submit" class="button btn-login-wow">Enter Dashboard</button>
        </form>
      </div>
    </div>
  </section>
</main>
<?php include('../footer.php'); ?>
