/* ============================================================
   EventDesign — Основные стили
   Цветовая схема: фиолетовый, розовый, бирюзовый
   ============================================================ */

/* CSS-переменные (дизайн-токены) */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --primary-light: #8B85FF;
  --secondary: #FF6584;
  --secondary-dark: #E54D6A;
  --accent: #43D8C9;
  --accent-dark: #2FC0B1;

  --bg: #F8F7FF;
  --bg-card: #FFFFFF;
  --bg-dark: #1A1A2E;
  --bg-section: #F0EFFE;

  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --text-white: #FFFFFF;

  --border: #E5E7EB;
  --border-focus: #6C63FF;
  --shadow-sm: 0 1px 3px rgba(108, 99, 255, 0.12);
  --shadow-md: 0 4px 16px rgba(108, 99, 255, 0.15);
  --shadow-lg: 0 8px 32px rgba(108, 99, 255, 0.2);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition: 0.25s ease;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --header-height: 70px;
}

/* ============================================================
   Сброс стилей и базовые настройки
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  outline: none;
}

input, textarea, select {
  font-family: var(--font);
  font-size: 1rem;
}

/* ============================================================
   Типографика
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   Контейнер
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   Шапка сайта / Навигация
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Навигация */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--bg-section);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
  font-weight: 600;
}

/* Кнопки в шапке */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Мобильное меню */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border-radius: var(--radius-sm);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
  color: var(--text-white);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(255, 101, 132, 0.35);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 101, 132, 0.45);
  color: var(--text-white);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(67, 216, 201, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: var(--text-white);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  background: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-outline-secondary:hover:not(:disabled) {
  background: var(--secondary);
  color: var(--text-white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-section);
  color: var(--text-primary);
  border-color: var(--primary);
}

.btn-danger {
  background: #EF4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ============================================================
   Формы
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--secondary);
  margin-left: 3px;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-error {
  font-size: 0.8rem;
  color: #EF4444;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Поиск */
.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 1rem;
}

.search-wrap .form-control {
  padding-left: 42px;
}

/* Переключатель (toggle) */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   Карточки мероприятий
   ============================================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.event-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 99, 255, 0.3);
}

.event-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover .event-card-image img {
  transform: scale(1.05);
}

.event-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 3rem;
  opacity: 0.7;
}

.event-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.badge-category {
  background: rgba(108, 99, 255, 0.85);
  color: white;
}

.badge-online {
  background: rgba(67, 216, 201, 0.9);
  color: white;
  top: 12px;
  right: 12px;
  left: auto;
}

.badge-free {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.event-card-body {
  padding: 18px;
}

.event-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.event-meta-item svg, .event-meta-item .icon {
  color: var(--primary);
  flex-shrink: 0;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.event-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.event-price.free {
  color: #22C55E;
}

.event-spots {
  font-size: 0.78rem;
  color: var(--text-light);
}

.event-spots.low {
  color: var(--secondary);
  font-weight: 600;
}

/* Рейтинг звёздами */
.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #FCD34D;
  font-size: 0.9rem;
}

.star.empty {
  color: var(--border);
}

/* ============================================================
   Секция Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #16213E 50%, #0F3460 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 101, 132, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 20px;
}

.hero h1 {
  color: white;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

/* Строка поиска Hero */
.hero-search {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 8px;
  backdrop-filter: blur(10px);
  max-width: 600px;
  margin: 0 auto;
}

.hero-search input {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  color: white;
  font-size: 1rem;
  outline: none;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Секции
   ============================================================ */
.section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
}

/* Категории (теги-пиллы) */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pill {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.pill:hover, .pill.active {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.08);
  color: var(--primary);
}

/* ============================================================
   Боковая панель с фильтрами
   ============================================================ */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-section {
  margin-bottom: 22px;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-range .form-control {
  padding: 8px 12px;
}

.price-range span {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(108, 99, 255, 0.06);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 3px 10px rgba(108, 99, 255, 0.4);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Модальные окна
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: scale(0.94) translateY(20px);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-section);
  color: var(--text-secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.modal-close:hover {
  background: #FEE2E2;
  color: #EF4444;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Toast-уведомления
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  min-width: 280px;
  max-width: 380px;
  animation: slideInRight 0.3s ease forwards;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.toast.success { border-color: #22C55E; }
.toast.error { border-color: #EF4444; }
.toast.warning { border-color: #F59E0B; }
.toast.info { border-color: var(--primary); }

.toast-icon { font-size: 1.1rem; }
.toast.success .toast-icon { color: #22C55E; }
.toast.error .toast-icon { color: #EF4444; }
.toast.warning .toast-icon { color: #F59E0B; }
.toast.info .toast-icon { color: var(--primary); }

.toast-close {
  margin-left: auto;
  background: none;
  color: var(--text-light);
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.toast-close:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ============================================================
   Спиннер загрузки
   ============================================================ */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Скелетон-загрузка */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   Карточки статистики (дашборд)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.stat-icon.purple { background: rgba(108, 99, 255, 0.12); color: var(--primary); }
.stat-icon.pink { background: rgba(255, 101, 132, 0.12); color: var(--secondary); }
.stat-icon.teal { background: rgba(67, 216, 201, 0.12); color: var(--accent); }
.stat-icon.green { background: rgba(34, 197, 94, 0.12); color: #22C55E; }

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================================
   Таблицы
   ============================================================ */
.table-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-section);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(108, 99, 255, 0.03);
}

/* ============================================================
   Вкладки (Tabs)
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--bg-section);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ============================================================
   Профиль / Аватар
   ============================================================ */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.avatar-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-md);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Детальная страница мероприятия
   ============================================================ */
.event-hero {
  position: relative;
  height: 380px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.event-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.event-hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  color: white;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.event-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.event-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.event-info-row:last-child {
  border-bottom: none;
}

.event-info-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--bg-section);
  color: var(--primary);
}

.event-info-label {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.event-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   Форма добавления отзыва / Звёзды
   ============================================================ */
.star-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.star-btn {
  font-size: 1.8rem;
  color: var(--border);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.star-btn:hover, .star-btn.active {
  color: #FCD34D;
  transform: scale(1.15);
}

/* ============================================================
   Планировщик задач
   ============================================================ */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.task-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.task-item.done {
  opacity: 0.6;
}

.task-item.done .task-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.7rem;
}

.task-item.done .task-check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.task-text {
  flex: 1;
  font-size: 0.9rem;
}

/* ============================================================
   Бейджи и метки
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-primary { background: rgba(108, 99, 255, 0.12); color: var(--primary); }
.badge-success { background: rgba(34, 197, 94, 0.12); color: #16A34A; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: #DC2626; }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.badge-secondary { background: rgba(255, 101, 132, 0.12); color: var(--secondary); }

/* ============================================================
   Пустое состояние
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 16px;
}

.empty-state-icon {
  font-size: 3.5rem;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 300px;
}

/* ============================================================
   Страницы авторизации
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F8F7FF, #EDE9FE);
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo .logo-icon {
  width: 56px;
  height: 56px;
  font-size: 1.8rem;
}

.auth-logo h1 {
  font-size: 1.6rem;
}

.auth-logo p {
  font-size: 0.9rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider span {
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text-light);
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Кнопка показа пароля */
.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--text-primary);
}

/* ============================================================
   Футер
   ============================================================ */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Утилиты
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary); }
.text-secondary-color { color: var(--secondary); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.font-bold { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.gap-2 { gap: 12px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .event-detail-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .nav {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    z-index: 999;
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-md);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 50px 0 70px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal {
    padding: 24px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .header-actions .btn-outline {
    display: none;
  }

  .event-hero {
    height: 240px;
  }
}
