/* =========================================================================
 * Экскурсии — Новые люди / Иваново
 * Дизайн-система v2.0
 * ========================================================================= */

/* ===== Токены дизайн-системы ===== */
:root {
  /* Палитра — глубокий бирюзовый */
  --brand-50:  #ECFEFF;
  --brand-100: #CFFAFE;
  --brand-200: #A5F3FC;
  --brand-300: #67E8F9;
  --brand-400: #22D3EE;
  --brand-500: #06B6D4;
  --brand-600: #0891B2;
  --brand-700: #0E7490;
  --brand-800: #155E75;
  --brand-900: #164E63;

  /* Нейтральные — на основе zinc */
  --neutral-0:   #FFFFFF;
  --neutral-25:  #FAFBFC;
  --neutral-50:  #F4F6F8;
  --neutral-100: #ECEFF3;
  --neutral-200: #D9DDE3;
  --neutral-300: #B9BFC7;
  --neutral-400: #8A919B;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #111827;

  /* Семантические */
  --ink:        var(--neutral-900);
  --ink-soft:   var(--neutral-700);
  --ink-mute:   var(--neutral-500);
  --surface:    var(--neutral-0);
  --surface-2:  var(--neutral-25);
  --surface-3:  var(--neutral-50);
  --border:     var(--neutral-200);
  --border-strong: var(--neutral-300);
  --success:    #10B981;
  --success-50: #ECFDF5;
  --warn:       #F59E0B;
  --warn-50:    #FFFBEB;
  --err:        #EF4444;
  --err-50:     #FEF2F2;

  /* Типографика */
  --font-sans: 'Onest', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Шкала размеров (1.250 — major third) */
  --fs-xs: 0.75rem;     /* 12 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-base: 0.9375rem; /* 15 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.125rem;    /* 18 */
  --fs-xl: 1.25rem;     /* 20 */
  --fs-2xl: 1.5rem;     /* 24 */
  --fs-3xl: 1.875rem;   /* 30 */
  --fs-4xl: 2.25rem;    /* 36 */
  --fs-5xl: 3rem;       /* 48 */
  --fs-6xl: 3.75rem;    /* 60 */
  --fs-7xl: 4.5rem;     /* 72 */

  /* Отступы (4px grid) */
  --sp-1: 0.25rem;  /* 4 */
  --sp-2: 0.5rem;   /* 8 */
  --sp-3: 0.75rem;  /* 12 */
  --sp-4: 1rem;     /* 16 */
  --sp-5: 1.25rem;  /* 20 */
  --sp-6: 1.5rem;   /* 24 */
  --sp-8: 2rem;     /* 32 */
  --sp-10: 2.5rem;  /* 40 */
  --sp-12: 3rem;    /* 48 */
  --sp-16: 4rem;    /* 64 */
  --sp-20: 5rem;    /* 80 */
  --sp-24: 6rem;    /* 96 */

  /* Радиусы */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* Тени (мягкие, как в Stripe/Linear) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.10), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 1px rgba(6, 182, 212, 0.12), 0 8px 24px rgba(6, 182, 212, 0.10);
  --shadow-focus: 0 0 0 3px rgba(6, 182, 212, 0.20);

  /* Анимации */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;
  --sidebar-w: 240px;
  --header-h: 64px;
}

/* ===== Базовый сброс ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
html, body { min-height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
img, svg, video, canvas, picture { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; }
a { color: var(--brand-700); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--brand-600); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 6px; border-radius: 4px; }
pre.code {
  background: var(--neutral-900); color: #d1d5db;
  padding: var(--sp-4); border-radius: var(--r-md);
  overflow: auto; max-height: 360px;
  font-family: var(--font-mono); font-size: var(--fs-sm);
}

/* ===== Утилиты ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.container--narrow { max-width: var(--container-narrow); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--ink-mute); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

/* ===== Кнопки ===== */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-border: var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-4);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--r-md);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  user-select: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  --btn-bg: var(--neutral-900);
  --btn-fg: var(--neutral-0);
  --btn-border: var(--neutral-900);
}
.btn--primary:hover { --btn-bg: var(--neutral-800); --btn-border: var(--neutral-800); box-shadow: var(--shadow-md); }

.btn--brand {
  --btn-bg: var(--brand-600);
  --btn-fg: #fff;
  --btn-border: var(--brand-600);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 1px 2px rgba(0,0,0,0.08);
}
.btn--brand:hover { --btn-bg: var(--brand-700); --btn-border: var(--brand-700); box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, var(--shadow-md), var(--shadow-glow); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: var(--border);
}
.btn--ghost:hover { --btn-bg: var(--surface-3); --btn-border: var(--border-strong); }

.btn--danger {
  --btn-bg: var(--err);
  --btn-fg: #fff;
  --btn-border: var(--err);
}
.btn--danger:hover { --btn-bg: #DC2626; --btn-border: #DC2626; }

.btn--lg { padding: 14px 22px; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn--sm { padding: 6px 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn--block { width: 100%; }
.btn--icon { padding: 8px; }

.btn .icon { width: 16px; height: 16px; flex: none; }

/* ===== Формы ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .field__label,
.field > label > span { font-size: var(--fs-sm); color: var(--ink-soft); font-weight: 500; }
.field__hint { font-size: var(--fs-xs); color: var(--ink-mute); }
.field__error { font-size: var(--fs-xs); color: var(--err); }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  font-size: var(--fs-md);
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; 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 8.5L1.5 4h9z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand-600); cursor: pointer; }
.checkbox span { font-size: var(--fs-sm); color: var(--ink-soft); }

/* ===== Алерты / бейджи ===== */
.alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-sm); border: 1px solid transparent; display: flex; align-items: flex-start; gap: 8px; }
.alert--err { background: var(--err-50); color: #991B1B; border-color: #FECACA; }
.alert--ok { background: var(--success-50); color: #065F46; border-color: #A7F3D0; }
.alert--warn { background: var(--warn-50); color: #92400E; border-color: #FDE68A; }
.alert--info { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-200); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: var(--fs-xs); font-weight: 600;
  border-radius: var(--r-pill); white-space: nowrap;
}
.badge--ok { background: var(--success-50); color: #065F46; }
.badge--pending { background: var(--warn-50); color: #92400E; }
.badge--rejected { background: var(--err-50); color: #991B1B; }
.badge--info { background: var(--brand-50); color: var(--brand-800); }
.badge--neutral { background: var(--surface-3); color: var(--ink-soft); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--success); }
.dot--pending { background: var(--warn); }
.dot--err { background: var(--err); }

/* ===== Header (публичный) ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-base) var(--ease-out);
}
.header--scrolled { background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow-sm); }
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-6);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}
.brand__name { font-size: var(--fs-md); font-weight: 700; }
.brand__name small { color: var(--ink-mute); font-weight: 500; font-size: var(--fs-xs); display: block; margin-top: -2px; }

.header__nav { display: flex; align-items: center; gap: var(--sp-2); }
.header__link {
  padding: 8px 12px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-soft); text-decoration: none; border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.header__link:hover { color: var(--ink); background: var(--surface-3); }

.userchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); background: var(--surface-3); font-size: var(--fs-sm); font-weight: 500; }
.userchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ===== Публичный layout ===== */
.public { display: flex; flex-direction: column; min-height: 100vh; }
.public main { flex: 1; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: var(--sp-24) 0 var(--sp-20);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(6, 182, 212, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(20, 184, 166, 0.08), transparent 60%);
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-16);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--brand-700); text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-6);
}
.hero__eyebrow .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.20); }

.hero__title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5vw, var(--fs-7xl));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--sp-6);
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.hero__lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: var(--sp-8);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-10); }
.hero__meta { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-item strong { font-size: var(--fs-2xl); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.hero__meta-item span { font-size: var(--fs-sm); color: var(--ink-mute); }

.hero__visual {
  position: relative; aspect-ratio: 1/1;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--brand-50), #F0FDFF);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.hero__visual::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.6), transparent 50%);
}
.hero__visual svg { width: 100%; height: 100%; display: block; }

/* ===== Секции ===== */
.section { padding: var(--sp-20) 0; }
.section--tight { padding: var(--sp-12) 0; }
.section--alt { background: var(--surface-2); }
.section--alt-2 { background: var(--surface-3); }

.section__head { max-width: 720px; margin: 0 auto var(--sp-12); text-align: center; }
.section__head--left { text-align: left; margin-left: 0; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 700;
  color: var(--brand-700); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}
.section__eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--brand-500); }
.section__title {
  font-size: clamp(1.875rem, 3.5vw, var(--fs-5xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}
.section__title em { font-style: normal; color: var(--brand-600); }
.section__lead { font-size: var(--fs-lg); color: var(--ink-soft); max-width: 600px; margin: 0 auto; }
.section__head--left .section__lead { margin-left: 0; }

/* ===== Сетка карточек ===== */
.grid { display: grid; gap: var(--sp-6); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ===== Карточки экскурсий ===== */
.tour-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}
.tour-card__media {
  position: relative; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-200));
  overflow: hidden;
}
.tour-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.tour-card:hover .tour-card__media img { transform: scale(1.05); }
.tour-card__media-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-600); opacity: 0.5;
}
.tour-card__badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tour-card__badge--brand { background: var(--brand-600); color: #fff; }
.tour-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.tour-card__date {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--brand-700); text-transform: uppercase; letter-spacing: 0.06em;
}
.tour-card__title {
  font-size: var(--fs-xl); font-weight: 700;
  line-height: 1.25; letter-spacing: -0.02em;
  color: var(--ink);
}
.tour-card__loc { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-soft); }
.tour-card__foot { margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tour-card__seats { font-size: var(--fs-sm); color: var(--ink-soft); }
.tour-card__seats strong { color: var(--ink); font-weight: 700; }
.tour-card__cta { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-700); display: inline-flex; align-items: center; gap: 4px; }
.tour-card:hover .tour-card__cta { color: var(--brand-600); gap: 6px; }
.tour-card__cta svg { transition: transform var(--dur-fast) var(--ease-out); }
.tour-card:hover .tour-card__cta svg { transform: translateX(2px); }

/* ===== Step / Feature карточки ===== */
.step {
  position: relative;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.step:hover { border-color: var(--brand-200); transform: translateY(-2px); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 700;
  margin-bottom: var(--sp-4);
}
.step__icon { display: inline-flex; }
.step__title { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); margin-bottom: var(--sp-2); letter-spacing: -0.01em; }
.step__text { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; }

/* ===== Страница экскурсии ===== */
.event-page { padding: var(--sp-8) 0 var(--sp-20); }
.event-page__back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft); font-size: var(--fs-sm);
  text-decoration: none; margin-bottom: var(--sp-6);
  padding: 6px 12px; border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.event-page__back:hover { color: var(--ink); background: var(--surface-3); }

.event-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
}
.event-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; background: var(--brand-50); color: var(--brand-700); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-4); }
.event-hero__title { font-size: clamp(2rem, 4vw, var(--fs-5xl)); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: var(--sp-4); }
.event-hero__meta { display: flex; flex-wrap: wrap; gap: var(--sp-6); color: var(--ink-soft); margin-bottom: var(--sp-4); }
.event-hero__meta-item { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.event-hero__meta-item strong { color: var(--ink); font-weight: 600; }
.event-hero__body { font-size: var(--fs-md); line-height: 1.7; color: var(--ink-soft); }
.event-hero__body p { margin-bottom: var(--sp-3); }
.event-hero__cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-xl); margin: var(--sp-6) 0; }
.event-hero__seats { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--brand-50); color: var(--brand-800); font-size: var(--fs-sm); font-weight: 600; border: 1px solid var(--brand-100); }
.event-hero__seats--full { background: var(--err-50); color: var(--err); border-color: #FECACA; }
.event-hero__seats--low { background: var(--warn-50); color: #92400E; border-color: #FDE68A; }

.event-page__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-8); align-items: start; }
.event-page__aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }

/* ===== Form card ===== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
}
.form-card__title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
.form-card__hint { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--sp-6); }
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }

.callout { background: var(--brand-50); border: 1px solid var(--brand-100); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); color: var(--ink-soft); font-size: var(--fs-sm); }
.callout p { margin: 0; }
.callout p + p { margin-top: var(--sp-2); }
.callout strong { color: var(--ink); }
.callout--solid { background: var(--surface-2); border-color: var(--border); }
.callout details summary { cursor: pointer; font-weight: 600; color: var(--brand-700); user-select: none; list-style: none; }
.callout details summary::-webkit-details-marker { display: none; }
.callout details summary::before { content: '+'; display: inline-block; margin-right: 6px; font-weight: 700; }
.callout details[open] summary::before { content: '−'; }

/* ===== Success / Error ===== */
.result-page { padding: var(--sp-20) 0; text-align: center; }
.result-page__icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--success-50); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.08);
  animation: scaleIn 0.5s var(--ease-out) both;
}
.result-page__icon--pending { background: var(--warn-50); color: var(--warn); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.08); }
@keyframes scaleIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-page__title { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--sp-3); }
.result-page__lead { font-size: var(--fs-lg); color: var(--ink-soft); max-width: 540px; margin: 0 auto var(--sp-8); }

.summary-card {
  max-width: 480px; margin: 0 auto var(--sp-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  text-align: left;
}
.summary-card dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); margin: 0; }
.summary-card dt { color: var(--ink-mute); font-size: var(--fs-sm); }
.summary-card dd { color: var(--ink); font-weight: 600; font-size: var(--fs-sm); margin: 0; }

/* ===== Footer ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: auto;
}
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--sp-8); margin-bottom: var(--sp-8); }
.footer__col h4 { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); margin-bottom: var(--sp-3); }
.footer__col a { display: block; color: var(--ink-soft); font-size: var(--fs-sm); padding: 4px 0; text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
.footer__col a:hover { color: var(--ink); }
.footer__bottom { padding-top: var(--sp-6); border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-4); }
.footer__copy { font-size: var(--fs-sm); color: var(--ink-mute); }
.footer__legal { display: flex; gap: var(--sp-4); }
.footer__legal a { font-size: var(--fs-sm); color: var(--ink-mute); }

/* ===== Админка ===== */
.admin {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--surface-2);
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar__brand { padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.sidebar__nav { padding: var(--sp-4); flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar__group { margin-top: var(--sp-4); }
.sidebar__group-label { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-soft); text-decoration: none; border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sidebar__link:hover { background: var(--surface-3); color: var(--ink); }
.sidebar__link.is-active { background: var(--brand-50); color: var(--brand-800); font-weight: 600; }
.sidebar__link svg { width: 18px; height: 18px; flex: none; opacity: 0.7; }
.sidebar__link.is-active svg { opacity: 1; }
.sidebar__foot { padding: var(--sp-4); border-top: 1px solid var(--border); }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); }
.sidebar__user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-sm); }
.sidebar__user-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.sidebar__user-role { font-size: var(--fs-xs); color: var(--ink-mute); }
.sidebar__logout { display: block; padding: 8px 12px; margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-mute); text-decoration: none; border-radius: var(--r-md); }
.sidebar__logout:hover { background: var(--surface-3); color: var(--err); }

.main { padding: var(--sp-6) var(--sp-8); max-width: 1400px; }
.main__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.main__title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.02em; }
.main__sub { color: var(--ink-mute); font-size: var(--fs-sm); margin-top: 2px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); position: relative; overflow: hidden; transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.stat:hover { border-color: var(--brand-200); transform: translateY(-2px); }
.stat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.stat__label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.stat__icon { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; }
.stat__icon svg { width: 18px; height: 18px; }
.stat__value { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.stat__sub { font-size: var(--fs-xs); color: var(--ink-mute); margin-top: var(--sp-2); }

/* ===== Таблицы ===== */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table thead { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table th { padding: var(--sp-3) var(--sp-4); text-align: left; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); color: var(--ink); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-fast) var(--ease-out); }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ===== Карточки в админке ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); }
.card + .card { margin-top: var(--sp-4); }
.card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); }
.card__title { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
.card dl { display: grid; grid-template-columns: 140px 1fr; gap: var(--sp-2) var(--sp-4); }
.card dt { color: var(--ink-mute); font-size: var(--fs-sm); }
.card dd { color: var(--ink); font-weight: 500; font-size: var(--fs-sm); margin: 0; }

.empty {
  padding: var(--sp-16) var(--sp-6);
  text-align: center; color: var(--ink-mute);
}
.empty__icon { width: 56px; height: 56px; margin: 0 auto var(--sp-4); color: var(--ink-mute); opacity: 0.5; }
.empty__title { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); margin-bottom: var(--sp-2); }
.empty__text { font-size: var(--fs-sm); margin-bottom: var(--sp-4); }

.actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.actions form { margin: 0; }

/* ===== Аутентификация ===== */
.auth-page {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--surface-2) 100%);
  padding: var(--sp-6);
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(6, 182, 212, 0.10), transparent),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(20, 184, 166, 0.08), transparent);
}
.auth-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-xl);
}
.auth-card__brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-6); }
.auth-card__title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--sp-1); }
.auth-card__hint { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--sp-6); }

/* ===== Анимации ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s var(--ease-out) both; }
.fade-in-delay-1 { animation-delay: 0.08s; }
.fade-in-delay-2 { animation-delay: 0.16s; }
.fade-in-delay-3 { animation-delay: 0.24s; }

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
  .event-page__grid { grid-template-columns: 1fr; }
  .event-page__aside { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-10); }
  .hero__visual { max-width: 360px; margin: 0 auto; }
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar__nav { flex-direction: row; overflow-x: auto; padding: var(--sp-3); }
  .sidebar__group { margin-top: 0; margin-left: var(--sp-3); }
  .sidebar__link { white-space: nowrap; }
  .sidebar__foot { border-top: 0; }
  .sidebar__user { display: none; }
  .main { padding: var(--sp-4); }
}
@media (max-width: 600px) {
  .hero { padding: var(--sp-16) 0 var(--sp-12); }
  .section { padding: var(--sp-12) 0; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .form-card { padding: var(--sp-5); }
  .event-hero { padding: var(--sp-5); }
  .container { padding: 0 var(--sp-4); }
  .header__nav { gap: 4px; }
  .header__link { display: none; }
}

/* ===== Респект prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
