/* ============================================================
   frontend/assets/css/design-tokens.css
   ShiftManager — Design Tokens (Single Source of Truth)
   ============================================================
   • Colors (Brand, Neutral, Semantic)
   • Spacing Scale (4px base)
   • Typography (Vazirmatn + clamp)
   • Shadows, Radius, Motion, Z-Index
   • Breakpoints documented: 360 / 640 / 768 / 1024 / 1280
   ============================================================ */

:root {
    /* ─── Brand Palette (Warm Orange) ─────────────────────── */
    --color-brand-50:  #fff7ed;
    --color-brand-100: #ffedd5;
    --color-brand-200: #fed7aa;
    --color-brand-300: #fdba74;
    --color-brand-400: #fb923c;
    --color-brand-500: #f97316;
    --color-brand-600: #ea580c;
    --color-brand-700: #c2410c;
    --color-brand-800: #9a3412;

    /* ─── Neutral Palette ─────────────────────────────────── */
    --color-neutral-0:   #ffffff;
    --color-neutral-50:  #fafaf9;
    --color-neutral-100: #f5f5f4;
    --color-neutral-200: #e7e5e4;
    --color-neutral-300: #d6d3d1;
    --color-neutral-400: #a8a29e;
    --color-neutral-500: #78716c;
    --color-neutral-600: #57534e;
    --color-neutral-700: #44403c;
    --color-neutral-800: #292524;
    --color-neutral-900: #1c1917;

    /* ─── Semantic Colors ─────────────────────────────────── */
    --color-success-50:  #ecfdf5;
    --color-success-500: #10b981;
    --color-success-600: #059669;
    --color-success-700: #047857;

    --color-danger-50:  #fef2f2;
    --color-danger-100: #fee2e2;
    --color-danger-500: #ef4444;
    --color-danger-600: #dc2626;
    --color-danger-700: #b91c1c;

    --color-warning-50:  #fffbeb;
    --color-warning-500: #f59e0b;
    --color-warning-700: #b45309;

    --color-info-50:  #f0f9ff;
    --color-info-500: #0ea5e9;
    --color-info-700: #0369a1;

    /* ─── Gradients ───────────────────────────────────────── */
    --gradient-brand:      linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fbbf24 100%);
    --gradient-brand-soft: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%);
    --gradient-success:    linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-brand-dark: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);

    /* ─── Semantic Aliases ────────────────────────────────── */
    --color-bg:           var(--color-brand-50);
    --color-surface:      var(--color-neutral-0);
    --color-surface-alt:  var(--color-neutral-50);
    --color-text:         var(--color-neutral-800);
    --color-text-muted:   var(--color-neutral-500);
    --color-border:       var(--color-neutral-200);
    --color-border-hover: var(--color-neutral-300);
    --color-border-focus: var(--color-brand-500);

    /* ─── Spacing Scale (4px base) ────────────────────────── */
    --space-0:  0;
    --space-1:  0.25rem;   /*  4px */
    --space-2:  0.5rem;    /*  8px */
    --space-3:  0.75rem;   /* 12px */
    --space-4:  1rem;      /* 16px */
    --space-5:  1.25rem;   /* 20px */
    --space-6:  1.5rem;    /* 24px */
    --space-8:  2rem;      /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */

    /* ─── Typography ──────────────────────────────────────── */
    --font-family-base: 'Vazirmatn', Tahoma, system-ui, -apple-system, sans-serif;
    --font-family-mono: 'Menlo', 'Consolas', monospace;

    --font-size-xs:   0.75rem;   /* 12px */
    --font-size-sm:   0.875rem;  /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg:   1.125rem;  /* 18px */
    --font-size-xl:   1.25rem;   /* 20px */
    --font-size-2xl:  1.5rem;    /* 24px */
    --font-size-3xl:  1.875rem;  /* 30px */

    --font-weight-regular:   400;
    --font-weight-medium:    500;
    --font-weight-semibold:  600;
    --font-weight-bold:      700;
    --font-weight-extrabold: 800;

    --line-height-tight:   1.25;
    --line-height-snug:    1.375;
    --line-height-normal:  1.5;
    --line-height-relaxed: 1.65;
    --line-height-loose:   1.75;

    /* Fluid typography (clamp for headings) */
    --font-size-display: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
    --font-size-heading: clamp(1.5rem, 1.2rem + 1vw, 2rem);

    /* ─── Radius ──────────────────────────────────────────── */
    --radius-xs:   4px;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* ─── Shadow ──────────────────────────────────────────── */
    --shadow-xs:  0 1px 2px rgba(28, 25, 23, 0.05);
    --shadow-sm:  0 2px 8px rgba(28, 25, 23, 0.06);
    --shadow-md:  0 10px 30px rgba(28, 25, 23, 0.08);
    --shadow-lg:  0 20px 50px rgba(234, 88, 12, 0.15);
    --shadow-xl:  0 25px 60px rgba(234, 88, 12, 0.20);
    --shadow-focus:        0 0 0 4px rgba(249, 115, 22, 0.15);
    --shadow-focus-danger: 0 0 0 4px rgba(239, 68, 68, 0.15);

    /* ─── Motion ──────────────────────────────────────────── */
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --easing-standard:   cubic-bezier(0.4, 0, 0.2, 1);
    --easing-decelerate: cubic-bezier(0.0, 0, 0.2, 1);
    --transition-base: var(--duration-base) var(--easing-standard);

    /* ─── Z-Index ─────────────────────────────────────────── */
    --z-base:     0;
    --z-dropdown: 1000;
    --z-sticky:   1020;
    --z-modal:    1050;
    --z-toast:    1080;

    /* ─── Layout / Container Max-Widths ───────────────────── */
    --container-sm:  640px;
    --container-md:  768px;
    --container-lg:  1024px;
    --container-xl:  1280px;
}

/* Reduced Motion: تمام توکن‌های حرکتی غیرفعال */
@media (prefers-reduced-motion: reduce) {
    :root {
        --duration-fast: 0.01ms;
        --duration-base: 0.01ms;
        --duration-slow: 0.01ms;
    }
}
