/* ============================================================
   انِکاس v4 — استایل اصلی صفحات عمومی
   تم: روشن، آرام، حرفه‌ای — سازنده پلتفرم: امیررضا یانی نیا
   ============================================================ */

/* ---------- فونت وزیرمتن (لوکال، بدون CDN) ---------- */
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-Medium.woff2') format('woff2');  font-weight:500; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-Bold.woff2') format('woff2');    font-weight:700; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-Black.woff2') format('woff2');    font-weight:900; font-display:swap; }

/* ---------- متغیرها ---------- */
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1a2433;
  --muted:#5b6b82;
  --line:#e5eaf2;
  --primary:#2563eb;
  --primary-2:#3b82f6;
  --primary-dark:#1e40af;
  --primary-soft:#eaf1fe;
  --ok:#059669;      --ok-soft:#e6f7f0;
  --warn:#b45309;    --warn-soft:#fdf3e2;
  --bad:#dc2626;     --bad-soft:#fdecec;
  --gold:#d9950b;
  --radius:20px;     --radius-sm:12px;
  --shadow:0 1px 2px rgba(23,43,99,.05), 0 12px 32px -14px rgba(23,43,99,.14);
  --shadow-lg:0 2px 4px rgba(23,43,99,.06), 0 24px 48px -16px rgba(23,43,99,.18);
}

/* ---------- پایه ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:'Vazirmatn', Tahoma, Arial, sans-serif;
  background:var(--bg); color:var(--text); line-height:1.9; font-size:15px;
}
img{ max-width:100%; display:block; }
a{ color:var(--primary); text-decoration:none; }
a:hover{ color:var(--primary-dark); }
h1,h2,h3,h4{ line-height:1.6; margin:0 0 12px; font-weight:700; }
p{ margin:0 0 10px; }
::selection{ background:var(--primary-soft); }
.container{ max-width:1020px; margin-inline:auto; padding-inline:20px; }
.main-area{ padding-block:28px 56px; min-height:60vh; }
.ic{ width:1.15em; height:1.15em; vertical-align:-.22em; flex:none; }

/* ---------- نوار بالا ---------- */
.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.92); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-in{ display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:66px; }
.brand{ display:flex; align-items:center; gap:10px; color:var(--text); }
.brand-logo{ width:42px; height:42px; border-radius:12px; object-fit:cover; box-shadow:var(--shadow); }
.brand-txt{ display:flex; flex-direction:column; line-height:1.5; }
.brand-txt b{ font-size:16px; font-weight:900; }
.brand-txt small{ color:var(--muted); font-size:11px; }
.nav-links{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.nav-link{
  display:inline-flex; align-items:center; gap:6px;
  color:var(--muted); font-weight:500; font-size:14px;
  padding:8px 14px; border-radius:12px; transition:all .15s;
}
.nav-link:hover{ color:var(--primary); background:var(--primary-soft); }
.nav-link-admin{ color:var(--primary); font-weight:700; }

/* ---------- دکمه‌ها ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid transparent; cursor:pointer; user-select:none;
  font-family:inherit; font-size:15px; font-weight:700;
  border-radius:14px; padding:12px 26px; line-height:1.7;
  transition:all .18s; text-decoration:none;
}
.btn:focus-visible{ outline:3px solid var(--primary-soft); outline-offset:1px; }
.btn-primary{ background:linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color:#fff; box-shadow:0 10px 22px -8px rgba(37,99,235,.55); }
.btn-primary:hover{ filter:brightness(1.06); transform:translateY(-1px); color:#fff; }
.btn-outline{ background:#fff; color:var(--primary); border-color:var(--primary-soft); }
.btn-outline:hover{ background:var(--primary-soft); }
.btn-ghost{ background:transparent; color:var(--muted); }
.btn-ghost:hover{ background:var(--line); color:var(--text); }
.btn-danger{ background:var(--bad); color:#fff; }
.btn-danger:hover{ filter:brightness(1.08); color:#fff; }
.btn-success{ background:var(--ok); color:#fff; }
.btn-success:hover{ filter:brightness(1.08); color:#fff; }
.btn-sm{ font-size:13px; padding:7px 16px; border-radius:11px; }
.btn-lg{ font-size:16px; padding:14px 34px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.55; cursor:not-allowed; transform:none !important; }

/* ---------- کارت ---------- */
.card{
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow);
  padding:26px 28px; margin-bottom:22px;
}
.card-head{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.card-head h2{ font-size:17px; margin:0; display:flex; align-items:center; gap:8px; }
.card-head .ic{ color:var(--primary); }

/* ---------- فرم‌ها ---------- */
.field{ margin-bottom:16px; }
.label{ display:block; font-size:13.5px; font-weight:700; margin-bottom:7px; color:var(--text); }
.label .hint{ font-weight:400; color:var(--muted); font-size:12px; }
.input, textarea.input, select.input{
  width:100%; font-family:inherit; font-size:15px; color:var(--text);
  background:#fff; border:1.5px solid var(--line); border-radius:14px;
  padding:11px 15px; transition:border .15s, box-shadow .15s;
}
.input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.input-lg{ font-size:18px; padding:14px 16px; text-align:center; letter-spacing:2px; }
textarea.input{ min-height:110px; resize:vertical; line-height:1.9; }
.input-note{ font-size:12px; color:var(--muted); margin-top:6px; }
.ltr{ direction:ltr; text-align:left; }
.honeypot{ position:absolute; right:-9999px; opacity:0; height:0; overflow:hidden; }

/* ---------- هشدارها ---------- */
.alert{
  display:flex; align-items:flex-start; gap:10px;
  border-radius:14px; padding:13px 18px; margin-bottom:16px; font-size:14px;
  border:1px solid transparent;
}
.alert .ic{ margin-top:5px; }
.a-ok{   background:var(--ok-soft);   color:#065f46; border-color:#b9e7d6; } .a-ok .ic{ color:var(--ok); }
.a-bad{  background:var(--bad-soft);  color:#7f1d1d; border-color:#f5c6c6; } .a-bad .ic{ color:var(--bad); }
.a-info{ background:var(--primary-soft); color:#1e3a8a; border-color:#c8dbfc; } .a-info .ic{ color:var(--primary); }

/* ---------- نشان‌ها ---------- */
.badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size:11.5px; font-weight:700; border-radius:999px; padding:3px 11px;
  border:1px solid transparent; white-space:nowrap;
}
.b-ok{   background:var(--ok-soft);   color:#065f46; border-color:#b9e7d6; }
.b-bad{  background:var(--bad-soft);  color:#7f1d1d; border-color:#f5c6c6; }
.b-warn{ background:var(--warn-soft);  color:#7c3a06; border-color:#f3ddb5; }
.b-info{ background:var(--primary-soft); color:#1e3a8a; border-color:#c8dbfc; }
.b-gray{ background:#eef2f7; color:#47566d; border-color:#dde4ee; }

/* ---------- هیرو (صفحه اصلی) ---------- */
.hero{
  position:relative; overflow:hidden;
  background:linear-gradient(160deg, #eef4ff 0%, #f8fbff 55%, #ffffff 100%);
  border:1px solid var(--line); border-radius:26px;
  padding:52px 34px 48px; margin:14px 0 30px; text-align:center;
  box-shadow:var(--shadow);
}
.hero::before{
  content:''; position:absolute; inset:auto -80px -140px auto; width:340px; height:340px;
  background:radial-gradient(closest-side, rgba(59,130,246,.12), transparent);
  border-radius:50%; pointer-events:none;
}
.hero::after{
  content:''; position:absolute; inset:-120px auto auto -90px; width:300px; height:300px;
  background:radial-gradient(closest-side, rgba(37,99,235,.09), transparent);
  border-radius:50%; pointer-events:none;
}
.hero-logo{
  width:104px; height:104px; border-radius:28px; object-fit:cover;
  margin:0 auto 20px; border:4px solid #fff;
  box-shadow:0 14px 34px -10px rgba(37,99,235,.35);
}
.hero h1{ font-size:clamp(22px, 4vw, 32px); font-weight:900; }
.hero p{ color:var(--muted); font-size:16px; max-width:560px; margin:0 auto 26px; }
.hero-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; position:relative; }

/* ---------- مراحل ---------- */
.steps{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-bottom:26px; }
.step{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:22px 20px; box-shadow:var(--shadow); text-align:center;
}
.step-ic{
  width:52px; height:52px; border-radius:16px; margin:0 auto 12px;
  display:flex; align-items:center; justify-content:center;
  background:var(--primary-soft); color:var(--primary); font-size:24px;
}
.step-ic .ic{ width:24px; height:24px; }
.step h3{ font-size:15px; margin-bottom:4px; }
.step p{ font-size:13px; color:var(--muted); margin:0; }
.step-num{
  display:inline-flex; width:26px; height:26px; border-radius:50%;
  background:var(--primary); color:#fff; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; margin-bottom:10px;
}

/* ---------- سکوی برترین‌ها ---------- */
.tophead{ text-align:center; margin:34px 0 20px; }
.tophead h2{ font-size:22px; font-weight:900; display:flex; align-items:center; justify-content:center; gap:9px; }
.tophead h2 .ic{ color:var(--gold); }
.tophead p{ color:var(--muted); font-size:14px; }
.podium{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; align-items:end; margin-bottom:22px; }
.top-card{
  position:relative; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow);
  padding:26px 16px 20px; text-align:center; transition:transform .18s;
}
.top-card:hover{ transform:translateY(-3px); }
.top-card .medal{
  position:absolute; top:14px; inset-inline-start:14px; width:34px; height:34px;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:900; color:#fff;
}
.top-1 .medal{ background:linear-gradient(135deg,#f5b914,#d97706); box-shadow:0 6px 16px -4px rgba(217,119,6,.5); }
.top-2 .medal{ background:linear-gradient(135deg,#9aa7bd,#64748b); }
.top-3 .medal{ background:linear-gradient(135deg,#d2946a,#a8622f); }
.top-1{ border-top:4px solid #f5b914; order:2; padding-top:34px; }
.top-2{ border-top:4px solid #9aa7bd; order:1; }
.top-3{ border-top:4px solid #d2946a; order:3; }
.top-avatar{
  width:64px; height:64px; border-radius:50%; margin:0 auto 10px;
  background:var(--primary-soft); color:var(--primary);
  display:flex; align-items:center; justify-content:center;
  font-size:24px; font-weight:900; border:3px solid #fff; box-shadow:var(--shadow);
}
.top-1 .top-avatar{ width:76px; height:76px; font-size:28px; }
.top-name{ font-weight:700; font-size:15px; margin-bottom:2px; }
.top-count{ color:var(--muted); font-size:12.5px; }
.top-count b{ color:var(--primary); font-size:17px; }
.top-empty{
  grid-column:1 / -1; background:var(--card); border:1px dashed var(--line);
  border-radius:var(--radius); padding:26px; text-align:center; color:var(--muted); font-size:14px;
}

/* ---------- قوانین ---------- */
.rules-list{ list-style:none; margin:0; padding:0; counter-reset:rule; }
.rules-list li{
  counter-increment:rule; display:flex; gap:12px; align-items:flex-start;
  padding:11px 2px; border-bottom:1px dashed var(--line); font-size:14px;
}
.rules-list li:last-child{ border-bottom:0; }
.rules-list li::before{
  content:counter(rule);
  flex:none; width:26px; height:26px; margin-top:5px; border-radius:9px;
  background:var(--primary-soft); color:var(--primary);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12.5px; font-weight:700;
}

/* ---------- صفحات ورود/ثبت‌نام ---------- */
.auth-wrap{ max-width:440px; margin:26px auto 0; }
.auth-card{ position:relative; }
.auth-logo{ width:76px; height:76px; border-radius:22px; object-fit:cover; margin:0 auto 14px; border:3px solid #fff; box-shadow:var(--shadow); }
.auth-title{ text-align:center; font-size:19px; font-weight:900; margin-bottom:4px; }
.auth-sub{ text-align:center; color:var(--muted); font-size:13.5px; margin-bottom:20px; }
.auth-alt{ text-align:center; font-size:13.5px; color:var(--muted); margin-top:18px; }
.otp-note{
  background:var(--primary-soft); border:1px solid #c8dbfc; color:#1e3a8a;
  border-radius:14px; padding:10px 16px; font-size:13px; margin-bottom:16px;
  display:flex; align-items:center; gap:8px; justify-content:center;
}
.resend-line{ text-align:center; font-size:13px; color:var(--muted); margin-top:14px; }
.resend-line button{ background:none; border:0; color:var(--primary); font:inherit; cursor:pointer; font-weight:700; padding:0; }
.resend-line button:disabled{ color:var(--muted); cursor:not-allowed; font-weight:400; }

/* ---------- پنل کاربر ---------- */
.panel-grid{ display:grid; grid-template-columns:1.5fr 1fr; gap:18px; align-items:start; }
.stat-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.stat{
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:16px 14px; text-align:center; box-shadow:var(--shadow);
}
.stat b{ display:block; font-size:22px; font-weight:900; color:var(--primary); line-height:1.5; }
.stat span{ font-size:12px; color:var(--muted); }
.stat.s-ok b{ color:var(--ok); }
.stat.s-warn b{ color:var(--warn); }
.ref-box{
  background:linear-gradient(135deg, #eef4ff, #f8fbff);
  border:1px solid #c8dbfc; border-radius:16px; padding:14px;
}
.ref-row{ display:flex; gap:8px; }
.ref-row .input{ direction:ltr; text-align:left; font-size:13.5px; background:#fff; }
.ref-label{ font-size:12.5px; color:var(--muted); margin-bottom:8px; }
.eitaa-box{ text-align:center; padding:26px 20px; }
.eitaa-box .big-ic{
  width:56px; height:56px; border-radius:16px; margin:0 auto 12px;
  background:var(--warn-soft); color:var(--warn);
  display:flex; align-items:center; justify-content:center;
}
.eitaa-box .big-ic .ic{ width:26px; height:26px; }
.eitaa-box.done .big-ic{ background:var(--ok-soft); color:var(--ok); }

/* ---------- جدول‌ها ---------- */
.table-wrap{ overflow-x:auto; border-radius:14px; border:1px solid var(--line); }
.table{ width:100%; border-collapse:collapse; font-size:13.5px; background:#fff; min-width:520px; }
.table th{
  background:#f4f7fb; color:#47566d; font-weight:700; font-size:12px;
  padding:10px 14px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap;
}
.table td{ padding:11px 14px; border-bottom:1px solid #eef2f7; vertical-align:middle; }
.table tbody tr:last-child td{ border-bottom:0; }
.table tbody tr:hover{ background:#f8faff; }
.td-actions{ white-space:nowrap; display:flex; gap:6px; }

/* ---------- صفحه‌بندی ---------- */
.pager{ display:flex; gap:6px; flex-wrap:wrap; justify-content:center; margin-top:18px; }
.pg{
  min-width:38px; height:38px; padding-inline:12px; border-radius:11px;
  background:#fff; border:1px solid var(--line); color:var(--muted);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:500; transition:all .15s;
}
.pg:hover{ border-color:var(--primary); color:var(--primary); }
.pg.on{ background:var(--primary); border-color:var(--primary); color:#fff; font-weight:700; }
.pg-d{ color:var(--muted); align-self:center; }

/* ---------- نوار ابزار فیلتر (استفاده عمومی) ---------- */
.toolbar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.toolbar .input{ max-width:230px; }
.toolbar .input-s{ max-width:150px; }

/* ---------- فوتر ---------- */
.site-footer{
  background:#fff; border-top:1px solid var(--line);
  padding:20px 0; margin-top:auto;
}
.footer-in{ display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
.footer-in strong{ color:var(--text); }
.footer-sep{ width:5px; height:5px; border-radius:50%; background:var(--line); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width:860px){
  .panel-grid{ grid-template-columns:1fr; }
}
@media (max-width:720px){
  .steps{ grid-template-columns:1fr; }
  .podium{ grid-template-columns:1fr; align-items:stretch; }
  .top-1{ order:1; } .top-2{ order:2; } .top-3{ order:3; }
  .top-1 .medal, .top-2 .medal, .top-3 .medal{ position:static; margin-bottom:8px; }
  .top-1 .top-avatar{ width:64px; height:64px; font-size:24px; }
}
@media (max-width:560px){
  .container{ padding-inline:14px; }
  .hero{ padding:38px 20px; }
  .card{ padding:20px 18px; }
  .topbar-in{ flex-wrap:wrap; padding-block:10px; }
  .nav-link{ padding:7px 10px; font-size:13px; }
  .brand-txt small{ display:none; }
  .stat-grid{ grid-template-columns:repeat(3, 1fr); gap:8px; }
  .stat b{ font-size:18px; }
  .btn{ padding:11px 20px; }
}
