<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <link rel="icon" href="{{ site_branding.favicon_url }}">
  <title>本地账号重置密码 - {{ site_branding.browser_title }}</title>
  <style>
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Arial, "Microsoft YaHei", sans-serif;
      background: #f5f5f7;
      color: #222;
    }
    a { text-decoration: none; color: inherit; }

    .topbar {
      background: #111;
      color: #fff;
      padding: 14px 24px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .topbar-inner {
      width: 1200px;
      max-width: calc(100vw - 48px);
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 24px;
    }
    .topbar-brand a {
      color: #fff;
      font-size: 20px;
      font-weight: 800;
    }
    .topbar-links a {
      color: #f3f3f3;
      font-size: 14px;
      margin-left: 16px;
    }

    .wrap {
      width: 460px;
      margin: 80px auto;
      background: #fff;
      padding: 32px;
      border-radius: 18px;
      box-shadow: 0 2px 12px rgba(0,0,0,.08);
    }
    h1 {
      margin-top: 0;
      margin-bottom: 8px;
      text-align: center;
      font-size: 30px;
      font-weight: 800;
    }
    .sub {
      text-align: center;
      color: #666;
      font-size: 14px;
      margin-bottom: 24px;
      line-height: 1.8;
    }
    input {
      width: 100%;
      height: 46px;
      margin-bottom: 14px;
      padding: 0 12px;
      border: 1px solid #ddd;
      border-radius: 10px;
      font-size: 15px;
      outline: none;
    }
    button {
      width: 100%;
      height: 46px;
      border: none;
      border-radius: 10px;
      background: #111;
      color: #fff;
      cursor: pointer;
      font-size: 15px;
      font-weight: 700;
    }
    .msg {
      margin: 12px 0;
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 14px;
      line-height: 1.7;
    }
    .ok { background: #f2fff4; color: #157a28; }
    .err { background: #fff3f3; color: #c40000; }
    .links {
      margin-top: 18px;
      text-align: center;
      font-size: 14px;
      color: #666;
    }
    .links a {
      color: #111;
      font-weight: 700;
    }
  </style>
</head>
<body>
  <div class="topbar">
    <div class="topbar-inner">
      <div class="topbar-brand"><a href="/">{{ site_branding.site_name }}</a></div>
      <div class="topbar-links">
        <a href="/">首页</a>
        <a href="/login">登录</a>
      </div>
    </div>
  </div>

  <div class="wrap">
    <h1>本地账号重置密码</h1>
    <div class="sub">适用于旧测试账号、本地账号。输入用户名或邮箱后直接重置。</div>

    {% if message %}
      <div class="msg ok">{{ message }}</div>
    {% endif %}
    {% if error %}
      <div class="msg err">{{ error }}</div>
    {% endif %}

    <form method="post">
      <input type="text" name="account" placeholder="用户名或邮箱" required>
      <input type="password" name="new_password" placeholder="新密码（至少 6 位）" required>
      <input type="password" name="confirm_password" placeholder="再次输入新密码" required>
      <button type="submit">重置本地密码</button>
    </form>

    <div class="links">
      <a href="/login">返回登录</a>
    </div>
  </div>
</body>
</html>
