/* ─────────────────────────── استادها — سیستم طراحی ───────────────────────────
   راست‌به‌چپ، فارسی، با فونت Vazirmatn (اگر نصب باشد) و fallbackهای سیستم.
   طراحی بر پایهٔ توکن است تا تم‌دهی و توسعهٔ آینده ساده باشد.
*/

/* ⚠ @import باید اولین دستور فایل باشد — وگرنه مرورگر آن را کامل نادیده می‌گیرد
   و کل استایل اجزا (کارت، سایدبار، دکمه…) از بین می‌رود. */
@import './components/primitives.css';
@import './components/promo.css';
@import './components/cloud.css';
@import './components/AppShell.css';
@import './components/charts.css';
@import './pages/pages.css';
@import './pages/schedule.css';
@import './pages/share-settings.css';
@import './pages/billing.css';

:root {
  /* رنگ‌ها — پالت آرام با کنتراست کافی */
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef0f6;
  --bg-hover: #e8ebf3;
  --border: #e2e5ee;
  --border-strong: #cfd4e2;

  --text: #1a1d29;
  --text-muted: #5b6172;
  --text-faint: #8b91a3;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --primary-text: #ffffff;

  --success: #0f9d58;
  --success-soft: #e6f5ec;
  --warning: #d97706;
  --warning-soft: #fef4e6;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --info: #0284c7;
  --info-soft: #e6f3fb;

  /* ابعاد */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.06);
  --shadow: 0 4px 16px rgba(20, 24, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 24, 40, 0.14);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --font: 'Vazirmatn', 'Segoe UI', 'Tahoma', system-ui, sans-serif;
  --font-num: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;

  --sidebar-width: 248px;
  --header-height: 64px;
}

[data-theme='dark'] {
  --bg: #0f1117;
  --bg-elevated: #181b24;
  --bg-subtle: #1f2330;
  --bg-hover: #262b3a;
  --border: #2a2f3e;
  --border-strong: #3a4154;

  --text: #eef0f6;
  --text-muted: #a3a9ba;
  --text-faint: #727a8f;

  --primary: #7c75f2;
  --primary-hover: #918bf5;
  --primary-soft: #23214a;

  --success: #34d399;
  --success-soft: #14312a;
  --warning: #fbbf24;
  --warning-soft: #342a12;
  --danger: #f87171;
  --danger-soft: #3a1d1d;
  --info: #38bdf8;
  --info-soft: #122c3a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[dir='rtl'] body {
  direction: rtl;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
}

h1 {
  font-size: 24px;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 15px;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* اعداد فارسی در جای‌هایی که لازم است */
.num {
  font-variant-numeric: tabular-nums;
}

/* اسکرول‌بار ظریف */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* دسترس‌پذیری */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ─── اجزای دیگر ─── */

