/* ============================================================
   core.css – ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ, СБРОСЫ, ШРИФТЫ, СКРОЛЛБАР
   ============================================================ */

/* ---- 1. ПОДКЛЮЧЕНИЕ ШРИФТОВ (Geist) ---- */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Thin Regular.woff2') format('woff2'),
       url('/fonts/Geist Thin Regular.woff') format('woff');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist ExtraLight Regular.woff2') format('woff2'),
       url('/fonts/Geist ExtraLight Regular.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Light Regular.woff2') format('woff2'),
       url('/fonts/Geist Light Regular.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Regular.woff2') format('woff2'),
       url('/fonts/Geist Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Medium Regular.woff2') format('woff2'),
       url('/fonts/Geist Medium Regular.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist SemiBold Regular.woff2') format('woff2'),
       url('/fonts/Geist SemiBold Regular.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Bold.woff2') format('woff2'),
       url('/fonts/Geist Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist ExtraBold Regular.woff2') format('woff2'),
       url('/fonts/Geist ExtraBold Regular.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist Black Regular.woff2') format('woff2'),
       url('/fonts/Geist Black Regular.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---- 2. CSS-ПЕРЕМЕННЫЕ (светлая тема) ---- */
:root {
  /* Размеры */
  --sidebar-width-expanded: 280px;
  --sidebar-width-collapsed: 40px;
  --header-height: 50px;
  --border-radius-card: 16px;
  --spacing-card: 20px;
  --font-family: 'Geist', sans-serif;

  /* Цвета */
  --main-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --accent: #310a6b;
  --accent-hover: #4a1d8c;
  --sidebar-bg: linear-gradient(165deg, #2d0a5e 0%, #3b0764 100%);

  /* Тени */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);

  /* Z-индексы */
  --z-index-modal: 2000;
  --z-index-sidebar: 1500;
  --z-index-notification: 10000;
  --z-index-dropdown: 1000;
  --z-index-tooltip: 900;
}

/* ---- 3. ТЁМНАЯ ТЕМА (переопределяем переменные) ---- */
body.dark-theme {
  --main-bg: #0f172a;
  --card-bg: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.5);
}

/* ---- 4. СБРОС И БАЗОВЫЕ СТИЛИ ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin; /* Firefox */
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-family);
  background: var(--main-bg);
  color: var(--text-primary);
}

/* ---- 5. СКРОЛЛБАР (кастомизация для WebKit) ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  transition: background 0.2s;
  background: #94a3b8;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
body.dark-theme ::-webkit-scrollbar-thumb {
  background: #475569;
}
body.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
/* Firefox */
:root {
  scrollbar-color: #94a3b8 transparent;
}
body.dark-theme {
  scrollbar-color: #475569 transparent;
}