<!doctype html>
<html>
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Login - Apartment Manager</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"></head>
<link rel="stylesheet" href="css/style.css"></head>
<body>
<main class="container">
  <div class="card" style="max-width:420px;margin:40px auto">
    <h2>Sign in</h2>
    <?php if(!empty($error)) echo '<p class="error">'.htmlspecialchars($error).'</p>'; ?>
    <form method="post">
    <input type="hidden" name="csrf" value="<?php echo htmlspecialchars(csrf_token()); ?>">
      <div class="form-row">
        <div class="field"><label>Username</label>
        <input name="username" required class="form-control"></div>
      </div>
      <div class="form-row">
        <div class="field">
          <label>Password</label>
          <input type="password" name="password" required class="form-control">
        </div>
      </div>
      <div style="margin-top:12px"><button type="submit">Login</button></div>
    </form>
  </div>
</main>
</body>
</html>
