/**
 * Tahliliy design tokens
 * Active palette: A (Navy+Blue) — dark theme default
 * Switch brand: edit --primary / --bg / --surface / --text / --muted / --border only.
 * Semantic colors must stay unchanged.
 */

:root {
  /* === Brand (Palette A — dark default) === */
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(37, 99, 235, 0.22);
  --violet: #8B5CF6;
  --violet-soft: rgba(139, 92, 246, 0.18);
  --bg: #0B1220;
  --surface: #111827;
  --surface-elevated: #161F2E;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --border: #1E293B;
  --border-glow: rgba(255, 255, 255, 0.08);

  /* === Semantic (do not replace with brand) === */
  --positive: #16A34A;
  --positive-soft: rgba(22, 163, 74, 0.18);
  --neutral: #64748B;
  --neutral-soft: rgba(100, 116, 139, 0.22);
  --negative: #DC2626;
  --negative-soft: rgba(220, 38, 38, 0.18);
  --risk-high: #DC2626;
  --risk-high-soft: rgba(220, 38, 38, 0.18);
  --risk-medium: #F59E0B;
  --risk-medium-soft: rgba(245, 158, 11, 0.18);
  --risk-low: #16A34A;
  --risk-low-soft: rgba(22, 163, 74, 0.18);

  /* === UI chrome === */
  --focus: #3B82F6;
  --danger: #DC2626;
  --warning: #F59E0B;
  --success: #16A34A;
  --overlay: rgba(0, 0, 0, 0.55);
  --skeleton: #1E293B;
  --skeleton-shine: #273449;
  --glow-blue: rgba(59, 130, 246, 0.14);
  --glow-violet: rgba(139, 92, 246, 0.12);
  --card-highlight: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(148, 163, 184, 0.045);

  /* Yakuniy qaror tiers */
  --tier-urgent: #DC2626;
  --tier-urgent-soft: rgba(220, 38, 38, 0.18);
  --tier-priority: #F59E0B;
  --tier-priority-soft: rgba(245, 158, 11, 0.18);
  --tier-review: #64748B;
  --tier-review-soft: rgba(100, 116, 139, 0.22);
  --tier-watch: #16A34A;
  --tier-watch-soft: rgba(22, 163, 74, 0.18);
  --tier-none: #94A3B8;
  --tier-none-soft: rgba(148, 163, 184, 0.18);

  /* === Radius / shadow / space === */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* === Typography === */
  --font-heading: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Uzbek", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Uzbek", "Noto Sans Cyrillic", sans-serif;
  --font: var(--font-body);

  --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --fs-sm: clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem);
  --fs-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --fs-md: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  --fs-xl: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --fs-display: clamp(2.75rem, 2rem + 3.5vw, 4.5rem);
  --fs-stat: clamp(2.25rem, 1.9rem + 1.2vw, 3rem);
  --lh: 1.5;
  --lh-tight: 1.2;
  --tracking-tight: -0.02em;
  --tracking-label: 0.04em;

  --container: min(1280px, 100%);
  --container-wide: min(1440px, 100%);
  --tap: 44px;
  --header-h: 3.5rem;
  --transition: 200ms ease-out;
  --transition-fast: 150ms ease-out;
  --transition-slow: 250ms ease-out;
}

@media (prefers-color-scheme: light) {
  :root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-soft: #DBEAFE;
    --violet: #7C3AED;
    --violet-soft: rgba(124, 58, 237, 0.12);
    --bg: #F4F7FB;
    --surface: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --text: #0F172A;
    --muted: #64748B;
    --border: #E2E8F0;
    --border-glow: rgba(15, 23, 42, 0.06);
    --positive-soft: #DCFCE7;
    --neutral-soft: #F1F5F9;
    --negative-soft: #FEE2E2;
    --risk-high-soft: #FEE2E2;
    --risk-medium-soft: #FEF3C7;
    --risk-low-soft: #DCFCE7;
    --overlay: rgba(15, 23, 42, 0.45);
    --skeleton: #E2E8F0;
    --skeleton-shine: #F8FAFC;
    --glow-blue: rgba(37, 99, 235, 0.12);
    --glow-violet: rgba(124, 58, 237, 0.1);
    --card-highlight: rgba(255, 255, 255, 0.7);
    --grid-line: rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.12);
  }
}
