/* ════════════════════════════════════════════════════════════════
   Школа 21 · Конкурс «Назови робособаку!»
   Фиксированный вьюпорт — без скролла страницы.
   ════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'SB Sans Display';
  src: url('/static/fonts/SBSansDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SB Sans Display';
  src: url('/static/fonts/SBSansDisplay-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SB Sans Display';
  src: url('/static/fonts/SBSansDisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0f1a;
  --bg2: #111827;
  --bg3: #1a2235;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --green: #00e676;
  --green-soft: #69f0ae;
  --green-dark: rgba(0, 230, 118, 0.12);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.15);
  --teal: #2dd4bf;
  --text: #eaf2ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 230, 118, 0.08);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'SB Sans Display', 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 58px;
  --footer-h: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--green); color: var(--bg); }

/* ── Фон ── */
.page-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.12), transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 230, 118, 0.06), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(45, 212, 191, 0.05), transparent 50%),
    var(--bg);
}
.page-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.page-glow {
  position: fixed;
  top: -40vh;
  right: -20vw;
  width: 60vw;
  height: 80vh;
  z-index: -1;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.06), transparent 70%);
  pointer-events: none;
}

/* ── App layout: 100vh, no scroll ── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Навигация ── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  min-height: var(--nav-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition);
}
.brand-link:hover { opacity: 0.85; }
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ── Main: fills remaining space, no scroll ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── Футер ── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--footer-h);
  min-height: var(--footer-h);
  padding: 0 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(10, 15, 26, 0.6);
}
.footer-tag { color: var(--teal); }

/* ── Кнопки ── */
.btn-primary, .btn-secondary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.btn-primary {
  color: var(--bg);
  background: var(--green);
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}
.btn-primary:hover {
  background: var(--green-soft);
  box-shadow: 0 8px 32px rgba(0, 230, 118, 0.45);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-secondary {
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 230, 118, 0.06);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }
.btn-submit {
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 4px 24px rgba(0, 230, 118, 0.35);
}
.btn-hero {
  padding: 20px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--green-soft));
  box-shadow: 0 8px 40px rgba(0, 230, 118, 0.35);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.btn-hero::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--purple), var(--teal));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 50px rgba(0, 230, 118, 0.5);
}
.btn-hero:hover::after { opacity: 0.5; }
.btn-epic {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 4px 30px rgba(0, 230, 118, 0.4);
}

/* ════════════════════════════════════════════════════════════════
   PAGE: INDEX (ландинг, 1 экран, эпичный)
   ════════════════════════════════════════════════════════════════ */
.page-home {
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
  justify-content: center;
}

/* ── Hero ── */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 24px;
}
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  max-width: 14ch;
  background: linear-gradient(135deg, #f0f9ff 0%, var(--green-soft) 40%, var(--green) 70%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 30px rgba(0, 230, 118, 0.15));
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 28ch;
  font-weight: 400;
}
.hero-actions {
  margin-top: 12px;
}

/* ── Стилизация скролла (для form, admin) ── */
.scroll-y {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}
.scroll-y::-webkit-scrollbar { width: 4px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }



/* ════════════════════════════════════════════════════════════════
   PAGE: FORM (шаги 1-3 в карточке)
   ════════════════════════════════════════════════════════════════ */
.form-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

/* ── ЭПИЧНЫЙ ШАГ 4: всегда display:flex, скрыт через visibility+opacity ── */
#step-4,
.epic-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: -12px;
  z-index: 50;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,230,118,0.05), transparent 70%),
              var(--bg);
  visibility: hidden;
  opacity: 0;
  transform: scale(0.97);
  transition: visibility 0s 0.4s, opacity 0.4s ease, transform 0.4s ease;
}
#step-4.show,
.epic-screen.show {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transition: visibility 0s 0s, opacity 0.4s ease, transform 0.4s ease;
}

/* Гарантия: содержимое epic-step видимо при открытии */
#step-4.show .epic-step,
.epic-screen.show .epic-step {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.epic-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 780px;
  padding: 32px 24px;
  gap: 20px;
  position: relative;
}

.epic-label {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 2.8vw, 1.6rem);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}
.epic-label::before {
  content: "//";
  color: var(--green);
  margin-right: 8px;
  font-family: var(--mono);
}

.epic-input-wrap {
  position: relative;
  width: 100%;
  max-width: 700px;
}
.epic-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3rem, 14vw, 8rem);
  text-align: center;
  line-height: 1.15;
  letter-spacing: 0.06em;
  padding: 4px 12px 16px;
  caret-color: var(--green);
}
.epic-input::placeholder {
  color: rgba(234, 242, 255, 0.14);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.epic-underline {
  height: 3px;
  width: 55%;
  margin: 0 auto;
  background: linear-gradient(90deg, var(--purple), var(--green), var(--teal));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.epic-input-wrap:focus-within ~ .epic-underline,
#step-4 .epic-input-wrap:focus-within,
.epic-screen .epic-input-wrap:focus-within + .epic-underline {
  width: 100%;
}
.epic-hint {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  animation: epic-pulse 2.4s ease-in-out infinite;
}
@keyframes epic-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#step-4 .field-error,
.epic-screen .field-error {
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#step-4 .field-error.visible,
.epic-screen .field-error.visible {
  opacity: 1;
}

.epic-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.epic-actions .btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  font-size: 0.95rem;
  padding: 12px 28px;
}
.epic-actions .btn-epic {
  padding: 12px 40px;
  font-size: 1.05rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--green-soft));
  box-shadow: 0 6px 30px rgba(0, 230, 118, 0.35);
  font-weight: 700;
}

/* ── КАРТОЧКА ФОРМЫ (шаги 1-3) ── */
.form-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.card-enter {
  animation: cardEnter 0.3s ease both;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}
.form-header { margin-bottom: 16px; }
.form-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* Step indicator */
.step-indicator {
  display: flex;
  gap: 0;
  background: var(--bg2);
  border-radius: 40px;
  padding: 3px;
}
.step-dot {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 40px;
  transition: all var(--transition);
  cursor: default;
}
.step-dot.active { background: var(--green-dark); }
.step-dot-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg3);
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.step-dot.active .step-dot-num {
  background: var(--green);
  color: var(--bg);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}
.step-dot-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  white-space: nowrap;
}
.step-dot.active .step-dot-label { color: var(--text); }

.form-step { margin-bottom: 4px; }
.hidden { display: none !important; }

.agree-box {
  background: var(--purple-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.agree-text { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 8px; line-height: 1.5; }
.agree-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--purple);
  text-decoration: none;
  transition: color var(--transition);
}
.agree-link:hover { color: var(--green); text-decoration: underline; }
.agree-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field-error {
  font-size: 0.74rem;
  color: #fb7185;
  margin-top: 4px;
  min-height: 1.1em;
  opacity: 0;
  transition: opacity var(--transition);
}
.field-error.visible { opacity: 1; }

.form-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 10px 14px;
  outline: none;
  transition: all var(--transition);
}
.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1), 0 0 16px rgba(0, 230, 118, 0.04);
}
.form-input::placeholder { color: var(--text-muted); opacity: 0.5; }
.form-input.input-error { border-color: #fb7185; box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.1); }

.form-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
}

.flash-summary {
  margin-bottom: 12px;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.flash {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #fb7185;
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════
   PAGE: DONE
   ════════════════════════════════════════════════════════════════ */
.done-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px;
}
.done-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.done-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-dark);
  display: grid;
  place-items: center;
  color: var(--green);
  box-shadow: 0 0 24px rgba(0, 230, 118, 0.12);
}
.done-icon svg { width: 28px; height: 28px; }
.done-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.done-text { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 20px; line-height: 1.5; }
.done-actions { display: flex; flex-direction: column; gap: 10px; }
.done-actions .btn-primary svg { flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   PAGE: FZ-152 (accordion, 1 экран)
   ════════════════════════════════════════════════════════════════ */
.legal-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  flex-shrink: 0;
  transition: color var(--transition);
}
.legal-back:hover { color: var(--green); }
.legal-hero { margin-bottom: 10px; flex-shrink: 0; }
.legal-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 6px;
}
.legal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}
.legal-lead { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.4; }

/* accordion: scrollable */
.legal-accordion {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
  padding-bottom: 4px;
}
.legal-accordion::-webkit-scrollbar { width: 3px; }
.legal-accordion::-webkit-scrollbar-track { background: transparent; }
.legal-accordion::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

.legal-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.legal-section-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.legal-section-trigger:hover { background: var(--surface-hover); }
.legal-section-trigger .arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.legal-section-trigger.open .arrow { transform: rotate(180deg); }
.legal-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(255, 255, 255, 0.02);
}
.legal-section-body.open { max-height: 400px; }
.legal-section-inner { padding: 8px 14px 12px; }

.legal-section-inner p { color: var(--text-secondary); font-size: 0.78rem; margin-bottom: 8px; line-height: 1.4; }
.legal-list { list-style: none; }
.legal-list li {
  padding: 5px 0 5px 16px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
}
.legal-list li:last-child { border-bottom: none; }
.legal-list li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--green);
  font-weight: 700;
}
.legal-list li b { color: var(--text); }

.consent-box {
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--green-dark);
  padding: 10px 14px;
  margin-top: 8px;
}
.consent-text { color: var(--text) !important; font-weight: 500; margin-bottom: 2px !important; }
.consent-note { font-size: 0.72rem !important; color: var(--text-muted) !important; }
.legal-source { font-size: 0.72rem !important; color: var(--text-muted) !important; margin-top: 8px !important; }
.legal-source a { color: var(--purple); }

/* ════════════════════════════════════════════════════════════════
   PAGE: ADMIN LOGIN
   ════════════════════════════════════════════════════════════════ */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px;
}
.admin-login-card {
  max-width: 360px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.login-code {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.admin-login-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.admin-login-form .form-input { margin-bottom: 10px; }
.flash-messages { margin-top: 10px; }

/* ════════════════════════════════════════════════════════════════
   PAGE: ADMIN DASHBOARD (карточки + фильтры)
   ════════════════════════════════════════════════════════════════ */
.admin-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 8px;
  overflow: hidden;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.admin-title {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.3px;
  color: var(--green);
}
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-count { font-family: var(--mono); font-size: 0.74rem; color: var(--text-muted); }
.admin-count strong { color: var(--teal); }

/* Фильтры */
.admin-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.admin-search {
  flex: 1;
  font-size: 0.82rem;
  padding: 9px 14px;
  margin-bottom: 0 !important;
}
.admin-select {
  width: auto;
  min-width: 160px;
  font-size: 0.82rem;
  padding: 9px 14px;
  margin-bottom: 0 !important;
  cursor: pointer;
  appearance: auto;
}

/* Карточки */
.admin-cards {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.admin-cards::-webkit-scrollbar { width: 4px; }
.admin-cards::-webkit-scrollbar-track { background: transparent; }
.admin-cards::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all var(--transition);
}
.admin-card:hover {
  border-color: rgba(0, 230, 118, 0.2);
  background: var(--surface-hover);
}
.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.admin-card-id {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.admin-card-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.admin-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.admin-card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-card-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-card-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}
.admin-card-phone {
  color: var(--teal) !important;
  text-decoration: none;
}
.admin-card-phone:hover { text-decoration: underline; }
.admin-card-nick {
  color: var(--green);
  font-weight: 700;
  font-size: 1.05rem;
}
.admin-empty { color: var(--text-muted); font-family: var(--mono); font-size: 0.82rem; padding: 20px; text-align: center; }

/* ════════════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ════════════════════════════════════════════════════════════════ */

/* ── Планшет и ниже ── */
@media (max-width: 768px) {
  :root {
    --nav-h: 50px;
    --footer-h: 40px;
  }
  .topnav { padding: 0 14px; }
  .brand-logo { height: 28px; }
  .footer { padding: 0 14px; font-size: 0.62rem; }

  .hero { padding: 18px 12px 10px; }
  .hero-title { font-size: clamp(1.3rem, 4vw, 1.8rem); }
  .hero-sub { font-size: 0.8rem; margin-bottom: 14px; }

  .form-card { padding: 18px 16px 16px; }
  .form-title { font-size: 1rem; }
  .step-dot { padding: 4px 8px; }
  .step-dot-label { display: none; }
  .agree-text { font-size: 0.8rem; }
  .agree-actions { flex-direction: column; }
  .agree-actions .btn-primary,
  .agree-actions .btn-secondary { width: 100%; justify-content: center; }
  .form-nav { flex-direction: column; gap: 8px; }
  .form-nav .btn-primary,
  .form-nav .btn-secondary { width: 100%; justify-content: center; }

  .legal-page { padding: 8px 12px 0; }
  .legal-title { font-size: 0.95rem; }
  .legal-section-trigger { font-size: 0.78rem; padding: 8px 12px; }

  .admin-page { padding: 8px 12px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .admin-title { font-size: 0.85rem; }
  .admin-actions { width: 100%; }
  .admin-actions .btn-primary,
  .admin-actions .btn-secondary { flex: 1; justify-content: center; }
  .admin-filters { flex-direction: column; gap: 6px; }
  .admin-select { width: 100%; min-width: 0; }
  .admin-card-body { grid-template-columns: 1fr; gap: 8px; }
}

/* ── Телефон ── */
@media (max-width: 480px) {
  .form-card { border-radius: var(--radius); padding: 14px 12px; }
  .form-title { font-size: 0.92rem; }
  .form-input { font-size: 0.82rem; padding: 9px 12px; }
  .btn-primary, .btn-secondary { font-size: 0.82rem; padding: 9px 16px; }

  .done-card { padding: 24px 18px 22px; }
  .done-icon { width: 48px; height: 48px; }
  .done-icon svg { width: 22px; height: 22px; }
  .done-title { font-size: 1rem; }
  .done-text { font-size: 0.8rem; }

  .admin-login-card { padding: 22px 18px; }

  .legal-page { padding: 4px 8px 0; }
  .legal-hero { margin-bottom: 6px; }
  .legal-title { font-size: 0.88rem; }
  .legal-lead { font-size: 0.72rem; }
  .legal-section { margin-bottom: 6px; }
  .legal-section-trigger { font-size: 0.74rem; padding: 7px 10px; }
  .legal-section-inner { padding: 6px 10px 10px; }
  .legal-list li { font-size: 0.72rem; padding: 4px 0 4px 14px; }
  .consent-box { padding: 8px 10px; }
  .consent-text { font-size: 0.74rem !important; }

  /* эпичный шаг 4 на мобильных */
  .epic-input { font-size: clamp(2rem, 14vw, 3.4rem); }
  .epic-actions { flex-direction: column; width: 100%; }
  .epic-actions .btn-primary, .epic-actions .btn-secondary { width: 100%; }
  .epic-label { font-size: 1rem; }
}

/* ── Очень маленькие экраны ── */
@media (max-width: 360px) {
}