/* ============================================
   Единая система тем для всех страниц MapSup
   ============================================ */

/* Темная тема (по умолчанию) */
:root,
[data-theme="dark"] {
  --theme-bg-primary: #0b0b0c;
  --theme-bg-secondary: #111216;
  --theme-bg-tertiary: #1a1a1a;
  --theme-bg-hover: #1b1d23;
  
  --theme-border-color: #24252b;
  --theme-border-hover: #2a2c33;
  
  --theme-text-primary: #e7e7ea;
  --theme-text-secondary: #a0a0a5;
  --theme-text-muted: #6b7280;
  
  --theme-accent-primary: #2563eb;
  --theme-accent-hover: #1d4ed8;
  --theme-accent-success: #22c55e;
  --theme-accent-danger: #ef4444;
  --theme-accent-warning: #f59e0b;
  
  --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --theme-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --theme-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Светлая тема */
[data-theme="light"] {
  --theme-bg-primary: #ffffff;
  --theme-bg-secondary: #f8f9fa;
  --theme-bg-tertiary: #f1f3f5;
  --theme-bg-hover: #e9ecef;
  
  --theme-border-color: #dee2e6;
  --theme-border-hover: #ced4da;
  
  /* Улучшенные цвета текста для лучшей контрастности */
  --theme-text-primary: #000000;        /* Черный для основного текста */
  --theme-text-secondary: #212529;     /* Темно-серый для вторичного текста */
  --theme-text-muted: #495057;         /* Серый для приглушенного текста, но достаточно темный */
  
  --theme-accent-primary: #0d6efd;
  --theme-accent-hover: #0b5ed7;
  --theme-accent-success: #198754;
  --theme-accent-danger: #dc3545;
  --theme-accent-warning: #ffc107;
  
  --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --theme-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --theme-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Применение темы к body для страниц, которые используют эти переменные */
[data-theme="light"] body {
  background-color: var(--theme-bg-primary) !important;
  color: var(--theme-text-primary) !important;
}

[data-theme="dark"] body {
  background-color: var(--theme-bg-primary) !important;
  color: var(--theme-text-primary) !important;
}

/* Принудительное применение темы к основным элементам */
[data-theme="light"] .topbar,
[data-theme="light"] #sidebar,
[data-theme="light"] .ticket {
  background-color: var(--theme-bg-secondary) !important;
  color: var(--theme-text-primary) !important;
  border-color: var(--theme-border-color) !important;
}

[data-theme="dark"] .topbar,
[data-theme="dark"] #sidebar,
[data-theme="dark"] .ticket {
  background-color: var(--theme-bg-secondary) !important;
  color: var(--theme-text-primary) !important;
  border-color: var(--theme-border-color) !important;
}
