<div style="max-width:400px">
  <h2>Cambia password</h2>
  <% if flash[:alert] %>
    <p style="color:#ff6b6b"><%= flash[:alert] %></p>
  <% end %>
  <%= form_with url: admin_password_path, method: :patch, local: true do %>
    <p>
      <label for="current_password">Password attuale</label><br>
      <input type="password" name="current_password" id="current_password" required autocomplete="current-password"
             style="width:100%;padding:0.5rem;margin-top:0.25rem;background:#1E1E1E;border:1px solid #333;color:#fff;border-radius:6px">
    </p>
    <p>
      <label for="password">Nuova password (min. 8 caratteri)</label><br>
      <input type="password" name="password" id="password" required autocomplete="new-password"
             style="width:100%;padding:0.5rem;margin-top:0.25rem;background:#1E1E1E;border:1px solid #333;color:#fff;border-radius:6px">
    </p>
    <p>
      <label for="password_confirmation">Conferma nuova password</label><br>
      <input type="password" name="password_confirmation" id="password_confirmation" required autocomplete="new-password"
             style="width:100%;padding:0.5rem;margin-top:0.25rem;background:#1E1E1E;border:1px solid #333;color:#fff;border-radius:6px">
    </p>
    <p>
      <button type="submit" style="background:#FF2D2D;color:#fff;border:0;padding:0.6rem 1.2rem;border-radius:6px;cursor:pointer;font-weight:700">
        Salva password
      </button>
      <%= link_to "Annulla", admin_root_path %>
    </p>
  <% end %>
</div>
