<!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,.06); }
    .topbar-inner, .container { width:1200px; max-width:calc(100vw - 48px); margin:0 auto; }
    .topbar-inner { display:flex; justify-content:space-between; align-items:center; gap:24px; }
    .topbar-brand a { color:#fff; font-size:20px; font-weight:800; }
    .top-links { display:flex; gap:18px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
    .top-links a, .top-links span { color:#f3f3f3; font-size:14px; white-space:nowrap; }

    .container { margin:24px auto 40px; }
    .panel, .card { background:#fff; border-radius:18px; box-shadow:0 2px 10px rgba(0,0,0,.05); padding:24px; margin-bottom:18px; }
    .hero h1 { margin:0 0 10px; font-size:30px; font-weight:800; }
    .muted { color:#666; font-size:14px; line-height:1.8; }

    .grid {
      display:grid;
      grid-template-columns:repeat(3, 1fr);
      gap:18px;
      margin-top:18px;
    }

    .card-title {
      font-size:22px;
      font-weight:800;
      margin-bottom:10px;
    }

    .count {
      font-size:34px;
      font-weight:800;
      margin:16px 0 10px;
    }

    .btn-row {
      display:flex;
      gap:10px;
      flex-wrap:wrap;
      margin-top:16px;
    }

    .btn {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding:10px 16px;
      border-radius:10px;
      background:#111;
      color:#fff;
      font-size:14px;
    }

    .btn-light {
      background:#efefef;
      color:#222;
    }
  </style>
</head>
<body>
  <div class="topbar">
    <div class="topbar-inner">
      <div class="topbar-brand"><a href="/">{{ site_branding.site_name }}</a></div>
      <div class="top-links">
        <a href="/admin/">管理员主页</a>
        <a href="/admin/merchant-applications">商家审核</a>
        <a href="/admin/wallet-adjustments">钱包调账</a>
        <a href="/admin/site-branding">站点设置</a>
        <a href="/account">用户主页</a>
        <a href="/logout">退出</a>
      </div>
    </div>
  </div>

  <div class="container">
    <div class="panel hero">
      <h1>管理员主页</h1>
      <div class="muted">这里集中放管理员最常用的功能入口，包括商家审核、钱包调账和网站设置。</div>
    </div>

    <div class="grid">
      <div class="card">
        <div class="card-title">商家审核</div>
        <div class="muted">查看并处理商家入驻申请。</div>
        <div class="count">{{ merchant_application_count }}</div>
        <div class="muted">当前申请记录数</div>
        <div class="btn-row">
          <a class="btn" href="/admin/merchant-applications">进入页面</a>
        </div>
      </div>

      <div class="card">
        <div class="card-title">钱包调账</div>
        <div class="muted">给用户发放余额、扣款，并写入自定义说明。</div>
        <div class="count">{{ user_count }}</div>
        <div class="muted">当前用户数</div>
        <div class="btn-row">
          <a class="btn" href="/admin/wallet-adjustments">进入页面</a>
        </div>
      </div>

      <div class="card">
        <div class="card-title">站点设置</div>
        <div class="muted">修改网站名称、头顶名称和网站图标。</div>
        <div class="count">{{ order_count }}</div>
        <div class="muted">当前订单数</div>
        <div class="btn-row">
          <a class="btn" href="/admin/site-branding">进入页面</a>
        </div>
      </div>
    </div>
  </div>
</body>
</html>
