<?php /** /app/views/admin/login.php */ ?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= e($pageTitle ?? 'Login - OFFICE Admin') ?></title>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="<?= url('assets/css/admin.css') ?>">
</head>
<body class="admin-body login-page">
  <div class="login-box">
    <h1>OFFICE</h1>
    <p class="subtitle">Painel Administrativo</p>

    <?php if (has_flash('error')): ?>
      <div class="flash error"><?= e(flash('error')) ?></div>
    <?php endif; ?>

    <form action="<?= admin_url('login') ?>" method="post">
      <?= csrf_field() ?>
      <div class="form-group">
        <label>E-mail</label>
        <input type="email" name="email" class="form-control" required autofocus>
      </div>
      <div class="form-group">
        <label>Senha</label>
        <input type="password" name="senha" class="form-control" required>
      </div>
      <button type="submit" class="btn btn-gold" style="width:100%;padding:14px;margin-top:8px">Entrar</button>
    </form>

    <div style="text-align:center;margin-top:24px;font-size:.82rem">
      <a href="<?= url() ?>" style="color:var(--admin-muted)">← Voltar ao site</a>
    </div>
  </div>
</body>
</html>
