/* ============================================================
   BASE — reset, global element defaults
   ============================================================ */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 700; margin: 0; color: var(--color-ink); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
a { color: var(--color-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-pill); }

:focus-visible { outline: 2px solid var(--color-primary-dark); outline-offset: 2px; border-radius: var(--radius-xs); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1em; height: 1em; display: inline-block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fade-up .4s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  * , *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* حیاتی: هر جزئی که کلاسش خودش display:flex/grid/... تعیین کرده باشد، آن
   قانون روی رفتار پیش‌فرض [hidden] برنده می‌شود مگر این‌که این قانون
   عمومی و قطعی، صریحاً override کند — این دقیقاً همان باگی بود که دوبار
   (admin-screen، nav-tab) پیدا شد؛ این یک‌بار برای همیشه جلوی تکرارش
   در هر جای دیگری از برنامه را می‌گیرد. */
[hidden] { display: none !important; }
