<?php
session_start();

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // demo login – no DB
    $_SESSION['institution_logged_in'] = true;
    $_SESSION['institution_name'] = "Demo Institution";
    header("Location: ../dashboard.php");
    exit;
}
include __DIR__ . '/../includes/header.php';
?>

<section class="section">
  <div class="container">
    <div class="grid" style="grid-template-columns: 1fr; max-width:420px; margin:0 auto;">

      <div class="card">
        <h2 style="text-align:center; margin-bottom:6px;">Institution Admin Login</h2>
        <p style="text-align:center; color:var(--muted); margin-bottom:22px;">
          Secure access for registered schools and colleges
        </p>

        <form method="post" action="">
          <div class="form-group">
            <label>Official Email ID</label>
            <input type="email" name="email" placeholder="admin@institution.edu" required>
          </div>

          <div class="form-group">
            <label>Password</label>
            <input type="password" name="password" placeholder="Enter your password" required>
          </div>

          <div style="margin-top:18px;">
            <button class="btn btn-primary" style="width:100%;">
              Login to Dashboard
            </button>
          </div>
        </form>

        <p style="text-align:center; margin-top:18px; font-size:13px; color:var(--muted);">
          Only registered institutions can access the dashboard.
        </p>
      </div>

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

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