<?php
session_start();
require_once __DIR__ . '/../includes/auth_paths.php';

$error = $_SESSION['login_error'] ?? '';
unset($_SESSION['login_error']);
?>
<?php include('../header.php'); ?>
<?php include('../menu.php'); ?>
<link rel="stylesheet" href="/css/style.css?v=2">

<main class="main-container login-shell">
  <section class="login-hero-card">
    <div class="login-hero-copy">
      <span class="section-kicker">Almost Heaven Admin</span>
      <h2 class="text-warning">Station control, page builder, and live tools</h2>
      <p>Sign in to manage pages, events, requests, team content, and the station admin tools now running inside Almost Heaven.</p>

      <div class="login-feature-grid">
        <div class="login-feature-pill">✨ Visual page builder</div>
        <div class="login-feature-pill">🎙 DJ and schedule tools</div>
        <div class="login-feature-pill">💬 Contact, chat and fan tools</div>
        <div class="login-feature-pill">🛡 External auth ready</div>
      </div>
    </div>

    <div class="login-panel-card">
      <h3>🔐 Admin Login</h3>
      <?php if ($error): ?>
        <div class="login-error-box"><?= htmlspecialchars($error) ?></div>
      <?php endif; ?>
      <form method="post" action="authenticate.php" class="admin-form login-form-v2">
        <label>Username</label>
        <input type="text" name="username" class="admin-input mb-2" placeholder="Enter username" required />
        <label>Password</label>
        <input type="password" name="password" class="admin-input mb-2" placeholder="Enter password" required />
        <button type="submit" class="btn btn-warning btn-login-wow">Enter Dashboard</button>
      </form>
    </div>
  </section>
</main>

<?php include('../footer.php'); ?>
