<?php declare(strict_types=1); ?>
<div class="grid">
  <div class="card">
    <h2>Perfil</h2>
    <form method="post" action="index.php?route=profile_update">
      <input type="hidden" name="csrf" value="<?= e(csrf_token()) ?>">
      <label>Usuario</label>
      <input name="username" value="<?= e($user['username']) ?>" required>
      <label>Email</label>
      <input name="email" type="email" value="<?= e($user['email']) ?>" required>
      <div class="row" style="margin-top:12px;">
        <button class="btn primary" type="submit">Guardar</button>
      </div>
    </form>
  </div>

  <div class="card">
    <h2>Cambiar contraseña</h2>
    <form method="post" action="index.php?route=profile_password">
      <input type="hidden" name="csrf" value="<?= e(csrf_token()) ?>">
      <label>Contraseña actual</label>
      <input type="password" name="current" required>
      <label>Nueva contraseña</label>
      <input type="password" name="new" required>
      <div class="row" style="margin-top:12px;">
        <button class="btn primary" type="submit">Cambiar</button>
      </div>
    </form>
  </div>
</div>
