<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>CANCOM Simple Signage – Passwort ändern</title>
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
<script>
(() => {
  const stored = window.localStorage.getItem("signage-theme");
  const theme = stored === "dark" || stored === "light" ? stored : "light";
  document.documentElement.setAttribute("data-bs-theme", theme);
})();
</script>
<link rel="stylesheet"
      href="https://unpkg.com/@tabler/core@1.0.0-beta20/dist/css/tabler.min.css">
<link rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
<script defer
        src="https://unpkg.com/@tabler/core@1.0.0-beta20/dist/js/tabler.min.js"></script>
{% include "_styles.html" %}
</head>
<body>
<div class="page">

{% set brand_subtitle = "Passwort ändern" %}
{% set site_dropdown_url_prefix = "/admin/" %}
{% include "_header.html" %}

<div class="navbar-expand-md">
  <div class="collapse navbar-collapse show">
    <div class="navbar navbar-dark nav-surface">
      <div class="container-xl">
        <div class="d-flex flex-wrap gap-2 py-2">
          <a class="btn btn-white" href="/admin"><i class="ti ti-arrow-left me-1"></i>Zurück</a>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="page-wrapper">
  <div class="container-xl mt-4" style="max-width:480px;">

    <div class="card">
      <div class="card-body">
        <h2 class="card-title mb-3">Passwort ändern</h2>

        {% if error %}
        <div class="alert alert-danger" role="alert">{{ error }}</div>
        {% endif %}
        {% if success %}
        <div class="alert alert-success" role="alert">{{ success }}</div>
        {% endif %}

        <form method="post">
          <div class="mb-3">
            <label class="form-label">Neues Passwort</label>
            <input type="password" class="form-control" name="new_password" minlength="6" required>
          </div>
          <div class="mb-3">
            <label class="form-label">Passwort wiederholen</label>
            <input type="password" class="form-control" name="confirm_password" minlength="6" required>
          </div>
          <button class="btn btn-primary w-100">Passwort speichern</button>
        </form>
      </div>
    </div>

  </div>
</div>

{% include "_footer.html" %}
</div>
</body>
</html>