<?php
require_once dirname(__DIR__).'/config.php';
$u = current_user(); if(!$u){header('Location: ' . url('?login=1'));exit;}
$is_staff = !empty($u['user_type'])&&in_array($u['user_type'],['admin','staff']);
if(!$is_staff){http_response_code(403);die('<h2>403</h2>');}
?><!DOCTYPE html><html lang="ar" dir="rtl"><head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>مراجعة KYC — Admin</title>
<style>:root{--g:#00d97e;--dark:#073328;--bg:#0d1117;--card:#161b22;--text:#e6edf3;--muted:#8b949e;--border:#30363d;--red:#f87171;--sb:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;margin:0;padding:0}body{font-family:'Cairo',system-ui,sans-serif;background:var(--bg);color:var(--text);min-height:100vh}
.hdr{background:#161b22;border-bottom:1px solid var(--border);height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;position:sticky;top:0;z-index:100}
.hdr-t{color:var(--g);font-weight:900;font-size:.95rem}.back{color:var(--muted);font-size:.82rem;text-decoration:none}
.con{max-width:900px;margin:0 auto;padding:16px}
.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:14px}
.ct{font-size:.88rem;font-weight:800;color:var(--g);margin-bottom:12px}
.skel{background:#21262d;border-radius:8px;height:50px;margin-bottom:8px}
table{width:100%;border-collapse:collapse;font-size:.78rem}th{text-align:right;padding:8px;color:var(--muted);border-bottom:1px solid var(--border)}td{padding:8px;border-bottom:1px solid #21262d}
.badge{display:inline-block;padding:2px 8px;border-radius:20px;font-size:.65rem;font-weight:700}
.bg{background:#1a3050;color:#58a6ff}.br{background:#2d1a1a;color:var(--red)}.by{background:#2a2000;color:#fbbf24}</style></head><body>
<header class="hdr"><div class="hdr-t">⚙️ مراجعة KYC</div><a href="/admin.php" class="back">← الإدارة</a></header>
<div class="con">
<div class="card">
  <div class="ct">📋 طلبات KYC المعلقة</div>
  <div id="kyc-list"><div class="skel"></div><div class="skel"></div><div class="skel"></div></div>
</div>
</div>
<script>
document.getElementById('kyc-list').innerHTML=`
  <p style="color:var(--muted);text-align:center;padding:20px;font-size:.82rem">
    طلبات KYC تأتي من kyc.php → يُراجَع يدوياً أو عبر مزود KYC<br><br>
    <span style="color:#3fb950">0 طلبات معلقة حالياً</span>
  </p>`;
</script></body></html>