{{define "head"}}
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>حکم‌شو — پنل ادمین</title>
  <style>
    :root { --bg:#240108; --panel:#3a0a12; --gold:#e9b949; --text:#f5e9d0; --accent:#b81d2a; }
    * { box-sizing: border-box; }
    body { margin:0; background:var(--bg); color:var(--text); font-family: Tahoma, sans-serif; }
    nav { background:#1a0106; padding:12px 18px; display:flex; gap:16px; border-bottom:2px solid var(--gold); }
    nav a { color:#caa; text-decoration:none; font-weight:bold; padding:6px 10px; border-radius:8px; }
    nav a.active, nav a:hover { color:var(--gold); background:rgba(233,185,73,.12); }
    .wrap { padding:20px; max-width:1100px; margin:0 auto; }
    h1 { color:var(--gold); }
    h2 { color:var(--gold); border-bottom:1px solid #5a0e1a; padding-bottom:6px; margin-top:28px; }
    .stats { display:flex; gap:16px; flex-wrap:wrap; }
    .stat { background:var(--panel); border:1px solid #5a0e1a; border-radius:14px; padding:18px 26px; text-align:center; }
    .stat b { color:var(--gold); font-size:26px; display:block; margin-top:6px; }
    table { width:100%; border-collapse:collapse; background:var(--panel); border-radius:12px; overflow:hidden; }
    th, td { padding:8px 10px; text-align:right; border-bottom:1px solid #5a0e1a; font-size:13px; }
    th { color:var(--gold); }
    input { background:#1a0106; color:var(--text); border:1px solid #6b4; border-radius:6px; padding:5px 7px; width:90px; }
    input[type=text] { width:130px; }
    button { background:var(--accent); color:var(--text); border:1px solid var(--gold); border-radius:8px; padding:6px 14px; font-weight:bold; cursor:pointer; }
    button:hover { filter:brightness(1.15); }
    .saved { background:#2e7d32; color:#fff; padding:8px 14px; border-radius:8px; display:inline-block; margin:10px 0; }
    .search { margin:12px 0; }
  </style>
</head>
{{end}}

{{define "nav"}}
<nav>
  <a href="/admin" class="{{if eq .Nav "dashboard"}}active{{end}}">داشبورد</a>
  <a href="/admin/shop" class="{{if eq .Nav "shop"}}active{{end}}">فروشگاه</a>
  <a href="/admin/carpets" class="{{if eq .Nav "carpets"}}active{{end}}">فرش‌ها</a>
  <a href="/admin/chat" class="{{if eq .Nav "chat"}}active{{end}}">چت</a>
  <a href="/admin/tournaments" class="{{if eq .Nav "tournaments"}}active{{end}}">تورنومنت</a>
  <a href="/admin/users" class="{{if eq .Nav "users"}}active{{end}}">کاربران</a>
  <a href="/admin/telescope">تلسکوپ</a>
</nav>
{{end}}
