/**
 * TMIboard design tokens.
 *
 * Единственный источник цветов/радиусов/теней для публичной части и кабинета.
 * Тема управляется атрибутом html[data-tmiboard-theme="light|dark"], который
 * проставляет js/theme-init.js до первой отрисовки (режим auto следует
 * prefers-color-scheme и обновляется вживую).
 */
:root {
  color-scheme: light;

  /* Поверхности */
  --tmiboard-bg: #f4f6fb;
  --tmiboard-surface: #ffffff;
  --tmiboard-surface-glass: rgba(255, 255, 255, 0.92);
  --tmiboard-surface-2: #eef1f8;
  --tmiboard-backdrop: rgba(15, 23, 42, 0.44);

  /* Текст. faint — вторичный, но всё ещё ЧИТАЕМЫЙ текст (даты, счётчики,
     подписи): держим контраст ≥4.5:1 на поверхности, а не декоративные 2.5. */
  --tmiboard-text: #101828;
  --tmiboard-text-strong: #0b1120;
  --tmiboard-muted: #4d5768;
  --tmiboard-faint: #64748b;

  /* Акценты и статусы */
  --tmiboard-accent: #3b5bdb;
  --tmiboard-accent-strong: #3450c4;
  --tmiboard-accent-2: #0891b2;
  --tmiboard-on-accent: #ffffff;
  --tmiboard-danger: #dc2626;
  --tmiboard-success: #15803d;
  --tmiboard-warning: #b45309;

  /* Линии и тени */
  --tmiboard-border: rgba(15, 23, 42, 0.11);
  --tmiboard-border-strong: rgba(15, 23, 42, 0.2);
  --tmiboard-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --tmiboard-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --tmiboard-shadow-lift: 0 24px 60px rgba(15, 23, 42, 0.13);

  /* Геометрия */
  --tmiboard-radius-lg: 22px;
  --tmiboard-radius: 16px;
  --tmiboard-radius-sm: 12px;
  --tmiboard-radius-pill: 999px;

  /* Типографика */
  --tmiboard-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Движение */
  --tmiboard-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --tmiboard-speed: 0.18s;
}

html[data-tmiboard-theme="dark"] {
  color-scheme: dark;

  --tmiboard-bg: #0b1120;
  --tmiboard-surface: #111a2e;
  --tmiboard-surface-glass: rgba(15, 23, 42, 0.9);
  --tmiboard-surface-2: #1a2439;
  --tmiboard-backdrop: rgba(2, 6, 17, 0.62);

  --tmiboard-text: #eef2f9;
  --tmiboard-text-strong: #ffffff;
  --tmiboard-muted: #b6c0d4;
  --tmiboard-faint: #94a1b8;

  --tmiboard-accent: #8b9cff;
  --tmiboard-accent-strong: #a5b3ff;
  --tmiboard-accent-2: #22d3ee;
  --tmiboard-on-accent: #0b1120;

  --tmiboard-danger: #f87171;
  --tmiboard-success: #4ade80;
  --tmiboard-warning: #fbbf24;

  --tmiboard-border: rgba(226, 232, 240, 0.14);
  --tmiboard-border-strong: rgba(226, 232, 240, 0.26);
  --tmiboard-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --tmiboard-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --tmiboard-shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.42);
}

/* Пользователь просил меньше анимаций — уважаем на уровне токенов. */
html[data-reduce-motion="true"] {
  --tmiboard-speed: 0s;
}

html[data-reduce-motion="true"] * {
  transition-duration: 0s !important;
  animation-duration: 0.01s !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}
