/* tokens.json dan avtomatik yasalgan — qo'lda tahrirlamang.
   Qayta yasash: python tools/build_tokens.py */

:root {
  /* Rang — yorug' tema (standart) */
  --bg: #e8eaf0;
  --surface: #f8f9fb;
  --surface-2: rgba(23, 31, 48, 0.04);
  --surface-3: rgba(23, 31, 48, 0.075);
  --line: rgba(23, 31, 48, 0.11);
  --line-soft: rgba(23, 31, 48, 0.06);
  --text: #2b3446;
  --muted: #5b6478;
  --faint: #939cad;
  --ok: #2a7d46;
  --late: #a05f0d;
  --absent: #c93b52;
  --accent: #2166a8;
  --accent-soft: #175081;
  --info: #12806c;
  --on-fill: #ffffff;
  --ok-tint: rgba(42, 125, 70, 0.10);
  --late-tint: rgba(160, 95, 13, 0.10);
  --absent-tint: rgba(201, 59, 82, 0.09);
  --accent-tint: rgba(33, 102, 168, 0.10);
  --info-tint: rgba(18, 128, 108, 0.10);
  --scrim: rgba(11, 22, 34, 0.72);
  --cat-1: #6355c4;
  --cat-2: #b3527e;
  --cat-3: #8f6c16;
  --cat-4: #556b80;
  --shadow: rgba(29, 37, 54, 0.055);
  --shadow-strong: rgba(29, 37, 54, 0.10);
  color-scheme: light;

  /* Shrift oilalari */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  /* Oraliq */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;

  /* Radius */
  --r: 1.15rem;
  --r-sm: 0.7rem;
  --r-xs: 0.45rem;
  --r-squircle: 0.85rem;
  --r-full: 999px;

  /* Davomiylik */
  --dur-hover: 150ms;
  --dur-tile: 300ms;
  --dur-count: 650ms;
  --dur-chart: 800ms;

  /* Easing */
  --ease-hover: ease;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-count: ease-out;
}

/* Qorong'i tema — faqat `data-theme="dark"` bo'lganda */
:root[data-theme="dark"] {
  --bg: #0b1622;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #eef1f8;
  --muted: #8b93ad;
  --faint: #5d6580;
  --ok: #a3f52a;
  --late: #ff7a1f;
  --absent: #ff3b5c;
  --accent: #2a82cc;
  --accent-soft: #5fb0f0;
  --info: #19d4a0;
  --on-fill: #0b1622;
  --ok-tint: rgba(163, 245, 42, 0.14);
  --late-tint: rgba(255, 122, 31, 0.14);
  --absent-tint: rgba(255, 59, 92, 0.14);
  --accent-tint: rgba(42, 130, 204, 0.18);
  --info-tint: rgba(25, 212, 160, 0.14);
  --scrim: rgba(11, 22, 34, 0.72);
  --cat-1: #8b7cf0;
  --cat-2: #e26a9c;
  --cat-3: #f2c14e;
  --cat-4: #6e8ba3;
  --shadow: rgba(0, 0, 0, 0.30);
  --shadow-strong: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Tipografika — tokens.json type.groups dan */

/* Raqam va sarlavha */
.kpi-xl { font-family: var(--font-display); font-size: 4.1rem; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.kpi-l { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.kpi-m { font-family: var(--font-display); font-size: 2.6rem; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.kpi-s { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; font-weight: 600; }
.h1 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.h2 { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; font-weight: 700; }
.h3 { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; font-weight: 600; }

/* Matn */
.body-lg { font-family: var(--font-sans); font-size: 16px; line-height: 24px; font-weight: 400; }
.body { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 400; }
.body-strong { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 600; }
.body-sm { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.caption { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 400; }
.label { font-family: var(--font-sans); font-size: 0.8rem; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; }

/* Raqamli sinflarda ustun tebranmasin */
.kpi-xl, .kpi-l, .kpi-m, .kpi-s, .h1, .h2, .h3 { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-hover: 0ms;
    --dur-tile: 0ms;
    --dur-count: 0ms;
    --dur-chart: 0ms;
  }
}
