/* ============================================================
   tokens.css - Design Tokens
   Liquid Glass + Emerald/Amber Palette
   حالت روشن و تاریک - RTL - وزیرمتن + JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* ----- LIGHT THEME (default) ----- */
:root,
[data-theme="light"] {
  /* پس‌زمینه */
  --bg-base: #F3F5F2;                     /* سفید مه‌آلود مایل به سبز-خاکستری */
  --bg-elevated: rgba(255, 255, 255, 0.6);

  /* سطوح شیشه‌ای */
  --surface-glass: rgba(255, 255, 255, 0.55);
  --surface-glass-border: rgba(255, 255, 255, 0.35);
  --surface-glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-blur: 20px;
  --glass-saturate: 160%;

  /* پالت اصلی */
  --accent-primary: #0F6B5C;              /* زمردی عمیق - اعتماد/داده */
  --accent-primary-hover: #0A5A4D;
  --accent-primary-soft: rgba(15, 107, 92, 0.08);

  --accent-warm: #D98E2C;                /* کهربایی گرم - اعداد/هشدار/اعتبار */
  --accent-warm-hover: #C47D1E;
  --accent-warm-soft: rgba(217, 142, 44, 0.08);

  --danger: #C73E3A;
  --success: #2B7A4B;

  /* متن */
  --text-primary: #16231F;
  --text-secondary: #3D4A45;
  --text-muted: #5C6B66;
  --text-on-accent: #FFFFFF;

  /* سایه */
  --shadow-sm: 0 2px 8px rgba(22, 35, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 35, 31, 0.08);
  --shadow-lg: 0 16px 48px rgba(22, 35, 31, 0.12);

  /* فواصل */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* شعاع */
  --radius-card: 18px;                 /* یک مقدار واحد برای تمام کارت‌ها */
  --radius-button: 14px;
  --radius-input: 12px;
  --radius-modal: 24px;
  --radius-pill: 999px;

  /* تایپوگرافی */
  --font-sans: 'Vazirmatn', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-weight-heading: 800;
  --font-weight-body: 500;
  --font-weight-helper: 400;

  /* سایز متن */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* انیمیشن */
  --transition-fast: 180ms ease;
  --transition-base: 280ms ease;
  --transition-slow: 400ms ease;

  /* Sidebar & Nav */
  --sidebar-width: 250px;
  --bottom-nav-height: 64px;
}

/* ----- DARK THEME ----- */
[data-theme="dark"] {
  --bg-base: #0E1614;                    /* سبز-زغالی عمیق */
  --bg-elevated: rgba(20, 32, 29, 0.6);

  --surface-glass: rgba(20, 32, 29, 0.55);
  --surface-glass-border: rgba(255, 255, 255, 0.10);
  --surface-glass-highlight: rgba(255, 255, 255, 0.12);
  --glass-blur: 20px;
  --glass-saturate: 160%;

  --accent-primary: #3DD9B8;
  --accent-primary-hover: #5CE0C7;
  --accent-primary-soft: rgba(61, 217, 184, 0.08);

  --accent-warm: #F2B25C;
  --accent-warm-hover: #F5C280;
  --accent-warm-soft: rgba(242, 178, 92, 0.08);

  --danger: #EF6B66;
  --success: #4ADE80;

  --text-primary: #EAF2EE;
  --text-secondary: #9CB3AC;
  --text-muted: #6B8078;
  --text-on-accent: #0E1614;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* ----- PREFERS-REDUCED-MOTION ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}