:root {
  --bg: #0a0a0a;
  --bg-2: #111;
  --bg-3: #161616;
  --bg-4: #1c1c1c;
  --line: #1f1f1f;
  --line-2: #2e2e2e;
  --line-3: #444;
  --text: #f0f0f0;
  --text-2: #a3a3a3;
  --text-3: #6a6a6a;
  --text-4: #4a4a4a;
  --accent: #ffffff;
  --accent-text: #000;
  --danger: #ff5252;
  --warn: #f0b429;
  --ok: #5ac88a;
  --info: #6aa3ff;
  --mono: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", Consolas, monospace;
  --hero-bg-1: rgba(255,255,255,0.06);
  --hero-bg-2: rgba(255,255,255,0.04);
  --grid-line: rgba(255,255,255,0.03);
  --modal-bg: rgba(0,0,0,0.8);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-2: #ffffff;
  --bg-3: #f3f3f3;
  --bg-4: #eaeaea;
  --line: #e6e6e6;
  --line-2: #d4d4d4;
  --line-3: #b5b5b5;
  --text: #0e0e0e;
  --text-2: #545454;
  --text-3: #888;
  --text-4: #b5b5b5;
  --accent: #0e0e0e;
  --accent-text: #fff;
  --hero-bg-1: rgba(0,0,0,0.04);
  --hero-bg-2: rgba(0,0,0,0.03);
  --grid-line: rgba(0,0,0,0.04);
  --modal-bg: rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
}

body {
  display: flex; flex-direction: column; min-height: 100vh;
}

main { flex: 1; }

a { color: var(--text); text-decoration: none; transition: color 0.15s; }
a:hover { color: #fff; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 24px; }

::selection { background: var(--text); color: var(--bg); }

/* ---------- Анимации ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up:nth-child(2) { animation-delay: 0.05s; }
.fade-up:nth-child(3) { animation-delay: 0.1s; }
.fade-up:nth-child(4) { animation-delay: 0.15s; }
.fade-up:nth-child(5) { animation-delay: 0.2s; }
.fade-up:nth-child(6) { animation-delay: 0.25s; }

[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Topbar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.brand {
  font-family: var(--mono);
  font-size: 16px; letter-spacing: 0.22em; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.brand-dot {
  width: 8px; height: 8px; background: var(--text);
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}
.brand span { color: var(--text-3); margin: 0 2px; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: 13px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.06em;
  position: relative;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--text);
}
.nav-user {
  font-family: var(--mono);
  font-size: 11px; color: var(--text-2);
  padding: 5px 10px; border: 1px solid var(--line-2);
  letter-spacing: 0.04em;
}
.nav-bell {
  position: relative; color: var(--text-2);
  font-size: 16px; padding: 6px;
  border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  transition: border-color 0.15s, color 0.15s;
}
.nav-bell:hover { color: var(--text); border-color: var(--text-3); }
.bell-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #000;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
  animation: fadeIn 0.3s ease;
}

/* ---------- Layout ---------- */
.main { padding: 56px 0 96px; }
.page { animation: fadeUp 0.4s ease both; }
.page-title {
  font-size: 32px; font-weight: 700; margin: 0 0 8px;
  letter-spacing: -0.02em; line-height: 1.1;
}
.page-sub { color: var(--text-2); margin: 0 0 36px; font-size: 15px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px; gap: 16px; flex-wrap: wrap;
}

/* ---------- Auth ---------- */
.auth {
  max-width: 440px; margin: 32px auto 0;
  padding: 40px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  animation: fadeUp 0.5s ease both;
}
.auth .page-title { font-size: 24px; }
.auth .page-sub { margin-bottom: 28px; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}
.field input,
.field select,
.field textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--text); background: var(--bg-3); }
.field input:hover:not(:focus),
.field select:hover:not(:focus),
.field textarea:hover:not(:focus) { border-color: var(--line-3); }
.field textarea { resize: vertical; min-height: 80px; }
.hint { color: var(--text-3); font-size: 12px; }
.error {
  color: var(--danger); font-size: 12px; min-height: 16px;
}
.form-error { margin-top: 8px; }

.form-actions {
  display: flex; gap: 12px; align-items: center;
  margin-top: 8px; flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  padding: 11px 22px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn.primary {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
}
.btn.primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.btn.ghost { background: transparent; }
.btn.tiny {
  padding: 6px 12px; font-size: 11px;
  letter-spacing: 0.06em;
}
.btn.lg {
  padding: 16px 32px; font-size: 14px;
}
.btn.danger { color: var(--danger); border-color: var(--line-2); }
.btn.danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  animation: fadeUp 0.5s ease both;
}
.card:hover {
  border-color: var(--line-3);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}
.card-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 18px; margin: 0;
}
.card-body div { display: flex; flex-direction: column; gap: 3px; }
.card-body .full { grid-column: 1 / -1; }
.card-body dt {
  font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-family: var(--mono);
}
.card-body dd { margin: 0; font-size: 14px; }
.card-body dd.reject { color: var(--danger); }
.card-foot {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.muted { color: var(--text-3); }

.review-block {
  margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px;
}
.review-block summary {
  cursor: pointer; font-size: 13px; color: var(--text-2);
  user-select: none;
  list-style: none;
}
.review-block summary::-webkit-details-marker { display: none; }
.review-block summary::before {
  content: "+ "; font-family: var(--mono); color: var(--text-3);
}
.review-block[open] summary::before { content: "− "; }
.review-block summary:hover { color: var(--text); }
.review-form { margin-top: 14px; }

/* ---------- Status ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--mono);
  font-weight: 500;
}
.status::before {
  content: ""; width: 5px; height: 5px;
  background: currentColor; display: inline-block;
  border-radius: 50%;
}
.status-Новая { color: var(--info); border-color: rgba(106,163,255,0.4); }
.status-В_работе { color: var(--warn); border-color: rgba(240,180,41,0.4); }
.status-Подтверждено { color: var(--ok); border-color: rgba(90,200,138,0.4); }
.status-Завершено { color: var(--text-2); border-color: var(--line-2); }
.status-Отклонено { color: var(--danger); border-color: rgba(255,82,82,0.4); }

/* ---------- Empty ---------- */
.empty {
  border: 1px dashed var(--line-2);
  padding: 60px 24px;
  text-align: center;
  color: var(--text-2);
}
.empty-lg { padding: 100px 24px; }
.empty-icon {
  font-size: 56px;
  color: var(--text-4);
  margin-bottom: 20px;
  font-family: var(--mono);
  line-height: 1;
}
.empty-title {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-sub {
  color: var(--text-3);
  font-size: 14px;
}

.t-description {
  color: var(--text-2);
  font-size: 14px;
  margin: -16px 0 32px;
  padding: 16px 20px;
  border-left: 2px solid var(--line-3);
  background: var(--bg-2);
}
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 20px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.back-link:hover { color: var(--text); }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------- Filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.filters input,
.filters select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  min-width: 140px;
  transition: border-color 0.15s;
}
.filters input:focus, .filters select:focus { border-color: var(--text); outline: none; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--bg-2);
}
.table th, .table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  background: var(--bg-3);
  font-weight: 500;
  font-family: var(--mono);
}
.table tbody tr { transition: background 0.15s; }
.table tr:hover td { background: var(--bg-3); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.reject { color: var(--danger); }

.t-status-sel {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; margin-top: 24px; flex-wrap: wrap; }
.page-link {
  border: 1px solid var(--line-2);
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-2);
  transition: all 0.15s;
}
.page-link.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.page-link:hover { color: var(--text); border-color: var(--text-3); }
.page-link.active:hover { color: var(--accent-text); border-color: var(--accent); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 28px;
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 16px;
  animation: fadeUp 0.3s ease;
}
.modal-card h3 { margin: 0 0 4px; font-size: 18px; }
.modal-actions { display: flex; gap: 10px; }

/* ---------- Toast ---------- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200;
  max-width: 360px;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--text);
  color: var(--text);
  padding: 14px 18px;
  font-size: 13px;
  min-width: 240px;
  animation: slideInRight 0.25s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--ok); }
.toast.info { border-left-color: var(--info); }

/* ---------- HOME / HERO ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, var(--hero-bg-1), transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--hero-bg-2), transparent 50%);
  z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.hero-noise {
  position: absolute; inset: 0;
  opacity: 0.04;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="light"] .hero-noise { opacity: 0.06; mix-blend-mode: multiply; }
.hero-inner {
  position: relative; z-index: 2;
  padding: 80px 0;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 28px;
  animation: fadeUp 0.5s ease both;
}
.hero-tag-dot {
  width: 6px; height: 6px; background: var(--ok); border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}
.hero-title {
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  max-width: 900px;
  animation: fadeUp 0.6s ease 0.05s both;
}
.hero-title .accent {
  font-style: italic;
  font-weight: 400;
  color: var(--text-2);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 0 40px;
  animation: fadeUp 0.6s ease 0.1s both;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.15s both;
}
.hero-meta {
  display: flex; gap: 40px; margin-top: 64px; flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.2s both;
}
.hero-meta-item {
  display: flex; flex-direction: column; gap: 4px;
}
.hero-meta-num {
  font-family: var(--mono);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-meta-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3);
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 56px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex; align-items: center; gap: 56px;
}
.marquee-item::after {
  content: "✕"; color: var(--text-4); font-size: 10px;
}

/* ---------- Section ---------- */
.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 56px; gap: 24px; flex-wrap: wrap;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  max-width: 720px;
}
.section-desc {
  color: var(--text-2);
  max-width: 460px;
  font-size: 15px;
}

/* ---------- Slider ---------- */
.slider {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.slider-slide {
  flex: 0 0 100%;
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 360px;
  background-size: cover;
  background-position: center;
  display: flex; align-items: flex-end;
}
.slider-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.slider-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 640px;
}
.slider-eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}
.slider-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.1;
}
.slider-desc {
  color: rgba(255,255,255,0.8); font-size: 15px;
  margin: 0;
}
.slider-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: var(--mono);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background 0.15s, border-color 0.15s;
}
.slider-nav:hover { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.5); }
/* Слайдер всегда тёмный — там фотографии с градиентом снизу */
.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }
.slider-dots {
  position: absolute;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 5;
  display: flex; gap: 8px;
}
.slider-dot {
  width: 24px; height: 3px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.slider-dot.active { background: #fff; }

/* ---------- Disciplines grid ---------- */
.disciplines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.disc-tile {
  padding: 32px 24px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 8px;
  transition: background 0.2s, transform 0.2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.disc-tile::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 0; height: 1px; background: var(--text);
  transition: width 0.3s ease;
}
.disc-tile:hover { background: var(--bg-3); }
.disc-tile:hover::before { width: 100%; }
.disc-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.disc-name {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature {
  padding: 36px 28px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 12px;
  transition: background 0.2s;
}
.feature:hover { background: var(--bg-3); }
.feature-icon {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 300;
}
.feature-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.feature-desc { color: var(--text-2); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  max-width: 880px;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  list-style: none;
  transition: color 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 22px;
  color: var(--text-3);
  font-weight: 300;
  transition: transform 0.2s, color 0.2s;
}
.faq-item[open] summary::after { content: "−"; color: var(--text); }
.faq-item summary:hover { color: var(--text); }
.faq-item summary:hover::after { color: var(--text); }
.faq-body {
  padding: 0 0 24px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 720px;
  animation: fadeUp 0.3s ease;
}

/* ---------- CTA ---------- */
.cta {
  padding: 120px 24px;
  text-align: center;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.cta-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 24px;
  max-width: 900px;
  margin-left: auto; margin-right: auto;
}
.cta-sub {
  color: var(--text-2);
  font-size: 17px;
  margin: 0 0 40px;
  max-width: 520px;
  margin-left: auto; margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 64px 0 28px;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand {
  display: flex; flex-direction: column; gap: 16px;
}
.footer-brand-title {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.22em;
  font-weight: 600;
}
.footer-brand-desc {
  color: var(--text-2);
  font-size: 14px;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-family: var(--mono);
  font-weight: 500;
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: var(--text-2); font-size: 14px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.footer-bottom-disclaimer {
  max-width: 540px;
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  transition: all 0.15s;
}
.footer-socials a:hover {
  color: var(--text); border-color: var(--text);
  transform: translateY(-2px);
}

/* ---------- Profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}
.profile-side {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 28px;
}
.profile-avatar {
  width: 80px; height: 80px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 28px; font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.profile-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.profile-login {
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  letter-spacing: 0.06em;
}
.profile-stats {
  margin-top: 24px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.profile-stat {
  padding: 14px;
  background: var(--bg-2);
}
.profile-stat-num {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
}
.profile-stat-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); margin-top: 4px;
}
.profile-main {
  display: flex; flex-direction: column; gap: 24px;
}
.profile-block {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 28px;
}
.profile-block h3 {
  margin: 0 0 20px; font-size: 18px; letter-spacing: -0.01em;
}

/* ---------- Notifications ---------- */
.notif-list { display: flex; flex-direction: column; gap: 12px; }
.notif-item {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 18px 22px;
  display: flex; gap: 18px; align-items: flex-start;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--bg-3); }
.notif-item.unread { border-left: 3px solid var(--text); }
.notif-dot {
  width: 8px; height: 8px; background: var(--text);
  border-radius: 50%; margin-top: 8px;
}
.notif-item:not(.unread) .notif-dot { background: var(--text-4); }
.notif-body { flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.notif-text { color: var(--text-2); font-size: 13px; }
.notif-time {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  margin-top: 6px; letter-spacing: 0.04em;
}

/* ---------- Stats banner (admin) ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.stat-box {
  padding: 20px;
  background: var(--bg-2);
}
.stat-num {
  font-family: var(--mono); font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-top: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .profile-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .card-body { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a { font-size: 12px; }
  .topbar-inner { height: 60px; }
  .main { padding: 32px 0 64px; }
  .container, .container-wide { padding: 0 18px; }
  .auth { padding: 28px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 64px 0; }
  .hero-inner { padding: 60px 0; }
  .hero-meta { gap: 24px; }
  .slider-content { padding: 24px; }
  .slider-nav { width: 36px; height: 36px; font-size: 14px; }
  .slider-nav.prev { left: 12px; }
  .slider-nav.next { right: 12px; }
  .slider-slide { min-height: 280px; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 32px; height: 32px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
  font-family: var(--mono);
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-3); }

/* ---------- Countdown ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 560px;
}
.countdown-unit {
  background: var(--bg-2);
  padding: 18px 14px;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.countdown-num {
  font-family: var(--mono);
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); font-family: var(--mono);
}
.countdown.live .countdown-num { color: var(--ok); }
.countdown-live-msg {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ok);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px;
}
.countdown-live-msg::before {
  content: ""; width: 8px; height: 8px;
  background: var(--ok); border-radius: 50%;
  animation: pulseDot 1.2s infinite;
}

/* ---------- Achievements ---------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.ach-tile {
  background: var(--bg-2);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  opacity: 0.45;
  filter: grayscale(0.5);
  transition: all 0.2s;
}
.ach-tile.earned {
  opacity: 1;
  filter: none;
  background: var(--bg-3);
}
.ach-tile.earned::after {
  content: "✓";
  position: absolute; top: 14px; right: 16px;
  font-family: var(--mono);
  color: var(--ok); font-size: 14px;
  font-weight: 700;
}
.ach-icon {
  font-size: 28px;
  font-family: var(--mono);
  line-height: 1;
  color: var(--text);
  margin-bottom: 4px;
}
.ach-title {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
}
.ach-desc {
  font-size: 12px; color: var(--text-3);
  line-height: 1.4;
}
.ach-progress {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.ach-progress-bar {
  flex: 1; height: 4px;
  background: var(--line-2);
  position: relative; overflow: hidden;
}
.ach-progress-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--text);
  transition: width 0.5s ease;
}
.ach-progress-text {
  font-family: var(--mono); font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

/* ---------- Reviews ---------- */
.reviews-list {
  display: flex; flex-direction: column; gap: 14px;
}
.review-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px 22px;
}
.review-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px; flex-wrap: wrap;
}
.review-user {
  display: flex; align-items: center; gap: 10px;
}
.review-avatar {
  width: 36px; height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 600;
  font-size: 14px;
}
.review-name { font-weight: 600; font-size: 14px; }
.review-time {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-3); letter-spacing: 0.04em;
}
.review-rating {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--warn);
  font-size: 14px;
}
.review-rating .dim { color: var(--text-4); }
.review-text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Tournament detail header ---------- */
.t-hero {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 36px;
  margin-bottom: 36px;
}
.t-hero-meta {
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  margin-bottom: 24px;
  font-size: 13px;
}
.t-hero-meta span {
  font-family: var(--mono);
  color: var(--text-2);
  letter-spacing: 0.06em;
}
.t-hero-meta b { color: var(--text); font-weight: 500; }
.t-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
}
.t-hero-disc {
  color: var(--text-3); font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rating-summary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 13px;
}
.rating-summary b { color: var(--warn); }

/* ---------- Copy fill ---------- */
.copy-fill {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border: 1px dashed var(--line-3);
  background: var(--bg-2);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.copy-fill button {
  background: transparent;
  border: 1px solid var(--line-3);
  color: var(--text);
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s;
}
.copy-fill button:hover {
  border-color: var(--text); background: var(--bg-3);
}

/* ---------- Email toggle row in profile ---------- */
.switch-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  gap: 16px;
}
.switch-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.switch-row-text { flex: 1; }
.switch-row-title { font-weight: 500; margin-bottom: 4px; }
.switch-row-desc { font-size: 13px; color: var(--text-3); }

.switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  transition: 0.25s;
}
.switch-slider::before {
  position: absolute; content: "";
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-2);
  transition: 0.25s;
}
.switch input:checked + .switch-slider { background: var(--text); border-color: var(--text); }
.switch input:checked + .switch-slider::before {
  transform: translateX(20px); background: var(--bg);
}

/* ---------- Sticky button in tournament card ---------- */
.t-actions { display: flex; gap: 10px; flex-wrap: wrap; }


::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* ---------- Password reset ---------- */
.forgot-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.forgot-link:hover { color: var(--text); }

.reset-done {
  text-align: center;
  padding: 8px 0 4px;
  animation: fadeUp 0.4s ease both;
}
.reset-done-icon {
  font-size: 44px;
  color: var(--ok);
  margin-bottom: 16px;
  line-height: 1;
}
.reset-done p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ===== фикс: поле «Время» вылезало за правый край модалки ===== */
.row-2 > * { min-width: 0; }
.field input,
.field select,
.field textarea { width: 100%; }

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */

/* бургер виден только на мобильных */
.nav-toggle-cb { display: none; }
.nav-burger { display: none; }

/* страховка от горизонтальной прокрутки */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; height: auto; }

@media (max-width: 720px) {
  /* ---------- Бургер-меню ---------- */
  .topbar-inner { height: 58px; gap: 12px; position: relative; }
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 10px; flex: none; cursor: pointer;
    border: 1px solid var(--line-2); background: var(--bg-2);
  }
  .nav-burger span {
    display: block; width: 100%; height: 2px; background: var(--text-2);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* nav превращается в выпадающую панель */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 6px 0; box-shadow: 0 24px 44px -18px rgba(0,0,0,.55);
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }
  .nav-toggle-cb:checked ~ .nav {
    max-height: 82vh; overflow-y: auto; opacity: 1; pointer-events: auto;
  }
  .nav a, .nav .nav-user, .nav .theme-toggle, .nav .nav-bell {
    width: 100%; box-sizing: border-box;
    padding: 14px 22px; font-size: 14px;
    border: none; border-bottom: 1px solid var(--line);
    justify-content: flex-start; height: auto; gap: 10px;
  }
  .nav a.active::after { display: none; }
  .nav a.active { color: var(--text); border-left: 2px solid var(--text); }
  .nav .nav-user { font-size: 13px; color: var(--text-3); letter-spacing: 0.04em; }
  .nav .nav-bell { font-size: 15px; }
  .nav .nav-bell::after { content: "Уведомления"; font-size: 14px; font-family: var(--mono); letter-spacing: 0.04em; }
  .nav .nav-bell .bell-badge { position: static; }
  .nav .theme-toggle::after { content: "Сменить тему"; font-size: 14px; font-family: var(--mono); letter-spacing: 0.04em; }
  .nav > *:last-child { border-bottom: none; }

  /* ---------- Сетки не вылезают на узких экранах ---------- */
  .cards, .features { grid-template-columns: 1fr; }

  /* ---------- Hero ---------- */
  .hero-sub { font-size: 16px; margin-bottom: 32px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-meta { gap: 22px 30px; margin-top: 40px; }

  /* ---------- Формы / фильтры ---------- */
  input, select, textarea { font-size: 16px; } /* не зумит экран на iOS */
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }

  /* ---------- Тап-таргеты ---------- */
  .btn { padding: 13px 18px; }
  .page-link { padding: 10px 15px; }
  .row-actions .btn, .t-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  .container, .container-wide { padding: 0 14px; }
  .brand { font-size: 15px; letter-spacing: 0.14em; }
  .main { padding: 24px 0 56px; }
  .section { padding: 48px 0; }
  .hero-meta { gap: 16px 24px; }
  .hero-meta-num { font-size: 22px; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .achievements-grid { grid-template-columns: 1fr 1fr; }
  .t-hero { padding: 24px 18px; }
  .auth { padding: 24px 18px; }
  .modal-card { padding: 22px 18px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
