:root {
  /* === Хантли — Brand tokens ===
     См. docs/BRAND.md и docs/REDESIGN_PLAN.md
     Светлая тема, тёплая палитра, оранжевый акцент. */

  /* Фоны и поверхности */
  --bg: #FFFFFF;
  --bg-soft: #FFF4E8;          /* кремовый — мягкие зоны, hero, секции */
  --bg-card: #FFFFFF;          /* карточки */
  --bg-elevated: #FAFAF7;      /* hover / приподнятые блоки */

  /* Акцент — оранжевый */
  --accent: #FF7A00;
  --accent-hover: #E66D00;
  --accent-active: #CC6100;
  --accent-dim: rgba(255, 122, 0, 0.12);
  --accent-soft: #FFE8D1;

  /* Текст */
  --text: #1F2430;             /* основной */
  --text-muted: #5A6072;       /* вторичный */
  --text-subtle: #8B92A3;      /* подписи, плейсхолдеры */
  --text-on-accent: #FFFFFF;

  /* Границы */
  --border: #ECECE4;
  --border-strong: #D9D9D0;

  /* Тарифные акценты */
  --pro: #8B5CF6;              /* фиолетовый — Pro */
  --pro-dim: rgba(139, 92, 246, 0.12);
  --max: #D97706;              /* янтарный — Max */
  --max-dim: rgba(217, 119, 6, 0.12);

  /* Семантика */
  --success: #22C55E;
  --success-dim: rgba(34, 197, 94, 0.12);
  --warning: #F59E0B;
  --warning-dim: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-dim: rgba(239, 68, 68, 0.12);

  /* Радиусы */
  --radius: 12px;              /* базовый — карточки */
  --radius-sm: 8px;            /* кнопки, поля */
  --radius-md: 12px;
  --radius-lg: 20px;           /* модалки, hero-блоки */
  --radius-xl: 32px;           /* hero-карточка, крупные блоки */
  --radius-pill: 999px;

  /* Тени — мягкие, тёплые */
  --shadow-sm: 0 1px 2px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 2px 12px rgba(31, 36, 48, 0.08);
  --shadow-lg: 0 12px 40px rgba(31, 36, 48, 0.12);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;

  /* Motion */
  --motion-fast: 150ms ease;
  --motion-base: 200ms ease;
  --motion-slow: 300ms ease;

  /* Типографика */
  --font-sans: 'Golos Text', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(255, 122, 0, 0.3);
}

.nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); }

.header-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background var(--motion-fast),
              color var(--motion-fast),
              border-color var(--motion-fast),
              box-shadow var(--motion-fast),
              transform var(--motion-fast);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.32);
}
.btn-primary:active { background: var(--accent-active); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); }

.btn-destructive {
  background: var(--danger);
  color: var(--text-on-accent);
}
.btn-destructive:hover { filter: brightness(0.88); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ── SECTIONS ── */
section { padding: 80px 24px; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 100px 24px 60px;
  text-align: center;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-soft);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 900px 560px at 50% -10%, rgba(255, 122, 0, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 122, 0, 0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  max-width: 680px;
  margin: 0 auto 20px;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, #FF9F45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 251, 247, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  padding: 48px 56px 44px;
  max-width: 720px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  margin-top: 16px;
}

.hero-mascot-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ── DASHBOARD PREVIEW SECTION ── */
.dashboard-preview-section {
  background: var(--bg-soft);
  padding: 72px 24px 80px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.dashboard-preview-section .hero-dashboard {
  max-width: min(540px, 100%);
  margin: 0 auto;
}

.hero-stats {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--motion-base), transform var(--motion-base);
}
.stat-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-number { font-size: 36px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ── HOW IT WORKS ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--motion-base), transform var(--motion-base);
}
.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 122, 0, 0.3);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.step-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* ── COMPARISON ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.compare-card.good { border-color: rgba(34, 197, 94, 0.35); }
.compare-card.bad { border-color: rgba(239, 68, 68, 0.25); }

.compare-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.compare-list li .ico { flex-shrink: 0; margin-top: 1px; }

/* ── PRICING ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--motion-base), transform var(--motion-base);
}
.plan-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.plan-card.popular {
  border-color: var(--pro);
  box-shadow: 0 0 0 1px var(--pro), var(--shadow-md);
}
.plan-card.popular:hover {
  box-shadow: 0 0 0 1px var(--pro), var(--shadow-lg);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pro);
  color: var(--text-on-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-name { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; }

.plan-price {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}
.plan-price sup { font-size: 20px; vertical-align: super; }
.plan-price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.plan-price.free { color: var(--success); }
.plan-price.pro { color: var(--pro); }
.plan-price.max { color: var(--max); }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.plan-features li .check { color: var(--success); flex-shrink: 0; }
.plan-features li .dash { color: var(--border); flex-shrink: 0; }

/* ── FAQ ── */
.faq { display: flex; flex-direction: column; gap: 12px; margin-top: 48px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question:hover { background: var(--bg-soft); }

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 14px 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
}

.faq-item.open .faq-answer { display: block; }

/* ── CTA SECTION ── */
.cta-section {
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── FOOTER ── */
footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-soft);
}

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

.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-sub { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.form-group label { font-size: 13px; font-weight: 500; color: var(--text); }

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  width: 100%;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover { border-color: var(--border-strong); }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-subtle); }

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-elevated);
}

.form-error {
  background: var(--danger-dim);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.form-error.show { display: block; }

.form-success {
  background: var(--success-dim);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.form-success.show { display: block; }

.btn-full { width: 100%; margin-top: 4px; padding: 12px; }

.auth-switch { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 20px; }
.auth-switch a { color: var(--accent); }
.auth-switch a:hover { text-decoration: underline; }

.forgot-link {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 16px;
}
.forgot-link:hover { color: var(--accent); }

/* ── AUTH SPLIT LAYOUT ── */
.auth-split-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-soft);
}

.auth-split {
  display: flex;
  width: 100%;
  max-width: 860px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-split-left {
  width: 380px;
  flex-shrink: 0;
  position: relative;
  background: #1A1F2E;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 560px;
}

.auth-split-left-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 90%, rgba(255, 122, 0, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.auth-split-mascot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.auth-split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 40px;
  background: var(--bg);
}

.auth-split-form { width: 100%; }
.auth-split-form h1 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-split-form .auth-sub { text-align: left; }

.social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
  text-decoration: none;
}
.btn-social:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.auth-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-divider-line { flex: 1; height: 1px; background: var(--border); }
.auth-divider-text { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.auth-split-mobile-logo { display: none; }

@media (max-width: 700px) {
  .auth-split { flex-direction: column; border-radius: var(--radius-lg); }
  .auth-split-left { display: none; }
  .auth-split-right { padding: 32px 24px; }
  .auth-split-form h1 { text-align: center; }
  .auth-split-form .auth-sub { text-align: center; }
  .auth-split-mobile-logo { display: flex; justify-content: center; margin-bottom: 24px; }
}

/* ── DASHBOARD ── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 10px 10px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #FF9F45);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--motion-fast);
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); }

/* Индикатор активной сессии (рядом с пунктом «Обзор») */
.sidebar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-left: 8px;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: sidebarPulse 1.8s ease-in-out infinite;
}
@keyframes sidebarPulse {
  0%   { box-shadow: 0 0 0 0   rgba(34,197,94,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0   rgba(34,197,94,0); }
}

/* Тогл для источников */
input[data-source-toggle] { position: relative; }
input[data-source-toggle]::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 150ms ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
input[data-source-toggle]:checked::after { left: 18px; }

.main-content {
  flex: 1;
  padding: 36px 40px;
  overflow-y: auto;
  background: var(--bg-soft);
  min-height: 100vh;
}

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* Приветствие на обзоре */
.welcome-card {
  background: linear-gradient(135deg, var(--accent) 0%, #FF9F45 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 24px rgba(255, 122, 0, 0.25);
}

.welcome-card-text {}
.welcome-greeting { font-size: 13px; font-weight: 500; opacity: .8; margin-bottom: 4px; }
.welcome-name { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.welcome-sub { font-size: 13px; opacity: .8; margin-top: 6px; }

.welcome-card-actions { flex-shrink: 0; }

/* Content cards inside dashboard */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dashboard-empty {
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
}

.dashboard-empty h3 { font-size: 17px; color: var(--text); margin: 12px 0 8px; }
.dashboard-empty p { font-size: 14px; max-width: 380px; margin: 0 auto 20px; }

.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-chip.free { background: var(--success-dim); color: var(--success); }
.plan-chip.pro { background: var(--pro-dim); color: var(--pro); }
.plan-chip.max { background: var(--max-dim); color: var(--max); }

/* ── TRUST BAR ── */
.trust-bar {
  padding: 28px 24px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.trust-bar-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.trust-companies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.trust-company {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--motion-fast), border-color var(--motion-fast);
}

.trust-company:hover { color: var(--text); border-color: var(--border-strong); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── TESTIMONIALS ── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--motion-fast), box-shadow var(--motion-base), transform var(--motion-base);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.testimonial-header { display: flex; align-items: center; gap: 12px; }

.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--text-on-accent);
  flex-shrink: 0;
}

.testimonial-name { font-size: 14px; font-weight: 600; }
.testimonial-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.testimonial-quote {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.testimonial-quote::before { content: '"'; color: var(--accent); font-size: 18px; line-height: 0; vertical-align: -4px; margin-right: 2px; }
.testimonial-quote::after  { content: '"'; color: var(--accent); font-size: 18px; line-height: 0; vertical-align: -4px; margin-left: 2px; }

.testimonial-result {
  display: flex; gap: 16px; flex-wrap: wrap;
}

.testimonial-stat {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
}

.testimonial-stat-num { font-size: 20px; font-weight: 800; }
.testimonial-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.company-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

/* ── COUNTER ANIMATION ── */
.count-up { display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════
   Хантли — Универсальные компоненты (Phase 2.5)
   Используются и на лендинге, и в дашборде, и в auth.
   ═══════════════════════════════════════════════════════════════════ */

/* ── BADGE / CHIP ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-neutral { background: var(--bg-elevated); color: var(--text-muted); }
.badge-accent  { background: var(--accent-dim); color: var(--accent); }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-danger  { background: var(--danger-dim); color: var(--danger); }
.badge-pro     { background: var(--pro-dim); color: var(--pro); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.chip:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.chip-close {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-subtle);
}
.chip-close:hover { background: var(--border); color: var(--text); }

/* ── CARD (универсальный контейнер) ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card-elevated { box-shadow: var(--shadow-md); }
.card-soft { background: var(--bg-soft); border-color: transparent; box-shadow: none; }

/* ── PROGRESS ── */
.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width var(--motion-slow);
}
.progress-fill--success { background: var(--success); }

/* ── SKELETON ── */
.skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-soft) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-text { height: 14px; margin: 4px 0; }
.skeleton-title { height: 22px; margin: 8px 0; }
.skeleton-card { height: 80px; border-radius: var(--radius-md); }

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

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  pointer-events: auto;
  animation: toast-slide-in var(--motion-base) ease-out;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--accent); }

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 48, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9000;
  animation: modal-overlay-in var(--motion-base) ease-out;
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in var(--motion-base) ease-out;
}
.modal-md { max-width: 640px; }
.modal-lg { max-width: 800px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-title { font-size: 18px; font-weight: 600; color: var(--text); }
.modal-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.modal-close:hover { background: var(--bg-elevated); color: var(--text); }
.modal-body { padding: 20px 24px; color: var(--text); }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color var(--motion-fast), border-color var(--motion-fast);
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── SWITCH / TOGGLE ── */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--motion-fast);
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--motion-fast);
  box-shadow: var(--shadow-sm);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── AVATAR ── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-md { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
  border: none;
}
.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* ── A11Y UTILITIES ── */
.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;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── HERO DASHBOARD PREVIEW ── */
.hero-dashboard {
  width: 460px;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 56px auto 0;
  text-align: left;
  position: relative;
  z-index: 1;
}

.hero-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.hero-dash-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
}

.hero-dash-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

.hero-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.hero-dash-stat {
  text-align: center;
  padding: 14px 8px;
  border-right: 1px solid var(--border);
}
.hero-dash-stat:last-child { border-right: none; }

.hero-dash-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-dash-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.hero-dash-progress { padding: 14px 18px; border-bottom: 1px solid var(--border); }

.hero-dash-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.hero-dash-jobs { padding: 4px 0; }

.hero-dash-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  gap: 12px;
  transition: background var(--motion-fast);
}
.hero-dash-job:hover { background: var(--bg-soft); }

.hero-dash-job-info { flex: 1; min-width: 0; }
.hero-dash-job-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-dash-job-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.hero-dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--text-muted);
}

@keyframes dash-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-dash-jobs .hero-dash-job { opacity: 0; }

.hero-dashboard.anim-started .hero-dash-job {
  animation: dash-fade-in 0.4s ease both;
}
.hero-dashboard.anim-started .hero-dash-job:nth-child(1) { animation-delay: 0.6s; }
.hero-dashboard.anim-started .hero-dash-job:nth-child(2) { animation-delay: 1.0s; }
.hero-dashboard.anim-started .hero-dash-job:nth-child(3) { animation-delay: 1.4s; }

/* ── MOBILE MENU BUTTON (hamburger) ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--motion-fast);
}
.mobile-menu-btn:hover { background: var(--bg-elevated); }

/* ── MOBILE NAV DRAWER (лендинг) ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 98;
  padding: 8px 12px 12px;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text-muted);
  font-size: 15px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.mobile-nav a:hover { background: var(--bg-soft); color: var(--text); }
.mobile-nav .btn { margin-top: 6px; width: 100%; justify-content: center; }

/* ── DASHBOARD MOBILE TOP BAR ── */
.mobile-top-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.mobile-top-bar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 48, 0.48);
  z-index: 99;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  /* Лендинг — хедер */
  .mobile-menu-btn { display: flex; }
  .nav { display: none; }
  .header-actions .btn-ghost { display: none; }

  /* Лендинг — hero */
  .hero { padding: 80px 16px 48px; min-height: auto; }
  .hero-content { padding: 28px 20px 24px; }
  .hero-mascot-wrap { display: none; }
  .dashboard-preview-section { padding: 48px 16px 56px; }

  /* Лендинг — секции */
  .compare-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .popup-mockup { width: 300px; }

  /* Welcome card */
  .welcome-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .welcome-card-actions { width: 100%; }
  .welcome-card-actions .btn { width: 100%; justify-content: center; }

  /* Dashboard layout */
  .dashboard-layout { flex-direction: column; }

  .sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: -260px;
    bottom: 0;
    z-index: 100;
    transition: left 0.25s ease;
    width: 248px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; }

  .mobile-top-bar { display: flex; }
  .main-content { padding: 20px 16px; min-height: calc(100vh - 52px); }
}

@media (max-width: 480px) {
  section { padding: 56px 16px; }
  .hero { padding: 72px 16px 40px; }
  .hero-content { padding: 24px 16px 20px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 15px; }
  .auth-card { padding: 24px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-dash-stat-num { font-size: 20px; }
}
