/* baser design system — из макета Moda «baser — UI».
   Токены палитры, типографика, компоненты, микро-анимации. */

:root {
  --teal: #00BFC8;
  --ink: #1E2530;
  --pink: #FF2D6B;
  --bg: #EDEEF0;
  --surface: #FFFFFF;
  --mint: #2FD9A8;
  --amber: #FFB020;

  --dark: #101017;
  --dark-card: #1C1C26;
  --dark-line: rgba(255, 255, 255, 0.08);

  --text: #1E2530;
  --text-dim: #5A6372;
  --line: rgba(30, 37, 48, 0.08);

  --r-card: 16px;
  --r-btn: 12px;

  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-body: 'Inter', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
}

[data-theme="dark"] {
  --bg: #101017;
  --surface: #1C1C26;
  --text: #F2F4F7;
  --text-dim: #9AA3AF;
  --line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 { font-size: clamp(38px, 5.4vw, 72px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.tnum { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.teal { color: var(--teal); }
.pink { color: var(--pink); }
.mint { color: var(--mint); }
.amber { color: var(--amber); }
.dim { color: var(--text-dim); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--dark);
  border-bottom: 1px solid var(--dark-line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: #fff; display: inline-flex; align-items: baseline; gap: 6px;
}
.logo:hover { text-decoration: none; }
.logo .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal); display: inline-block;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 191, 200, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(0, 191, 200, 0); }
}
.nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav a { color: #C7CDD6; font-size: 15px; }
.nav a:hover { color: #fff; text-decoration: none; }
.burger { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  border: 0; border-radius: var(--r-btn); cursor: pointer;
  padding: 14px 28px;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: #E62560; transform: scale(1.02); box-shadow: 0 8px 24px rgba(255, 45, 107, 0.35); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-teal { background: var(--teal); color: var(--ink); }
.btn-teal:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0, 191, 200, 0.35); }
.btn-ghost { background: var(--bg); color: var(--text); }
.btn-ghost:hover { background: #E2E4E8; }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- hero ---------- */

.hero {
  background: var(--dark); color: #fff;
  padding: 72px 0 88px; position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-line);
  border-radius: 999px; padding: 8px 16px;
  font-size: 13.5px; color: #C7CDD6; margin-bottom: 28px;
}
.status-pill .led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); animation: pulse-dot 2s infinite;
}
.status-pill.incident .led { background: var(--pink); }
.hero h1 .accent { color: var(--teal); }
.hero .sub { color: #9AA3AF; max-width: 520px; font-size: 18px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 44px; }
.stat .num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 34px; color: #fff;
}
.stat .lbl { font-size: 13px; color: #7C8494; margin-top: 2px; }

/* радар */
.radar { position: relative; display: grid; place-items: center; min-height: 420px; }
.radar-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.radar-rings::before,
.radar-rings::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(0, 191, 200, 0.25);
}
.radar-rings::before { width: 300px; height: 300px; }
.radar-rings::after { width: 430px; height: 430px; border-color: rgba(0, 191, 200, 0.12); }
.radar-sweep {
  position: absolute; width: 430px; height: 430px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0,191,200,0.28), transparent 70deg, transparent 360deg);
  animation: sweep 4s linear infinite;
  mask-image: radial-gradient(circle, #000 0 215px, transparent 216px);
  -webkit-mask-image: radial-gradient(circle, #000 0 215px, transparent 216px);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar .mascot { position: relative; z-index: 2; width: 330px; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.radar-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.dns-card {
  position: static; z-index: 3;
  background: var(--surface); color: var(--text);
  border-radius: var(--r-card); padding: 16px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  width: 270px; font-size: 13.5px;
}
.dns-card .ttl { font-size: 11px; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 8px; }
.dns-card .row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.dns-card .bar { height: 5px; border-radius: 3px; background: var(--bg); margin-top: 10px; overflow: hidden; }
.dns-card .bar i { display: block; height: 100%; width: 65%; background: linear-gradient(90deg, var(--teal), var(--mint)); border-radius: 3px; animation: fillbar 3s var(--ease-out) infinite alternate; }
@keyframes fillbar { from { width: 35%; } to { width: 85%; } }
.led-pink, .led-teal { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.led-pink { background: var(--pink); box-shadow: 0 0 10px rgba(255,45,107,0.8); animation: pulse-dot 2s infinite; }
.led-teal { background: var(--teal); }

/* ---------- marquee ---------- */

.marquee { background: var(--teal); overflow: hidden; padding: 14px 0; }
.marquee-track {
  display: flex; gap: 48px; white-space: nowrap; width: max-content;
  animation: marquee 22s linear infinite;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; }
.marquee-track .mdot { width: 7px; height: 7px; background: var(--ink); border-radius: 50%; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-note { color: var(--text-dim); max-width: 380px; font-size: 15px; }

/* шаги */
.steps { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.step-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 32px; overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
@media (hover: hover) {
  .step-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(30, 37, 48, 0.12); }
}
.step-card .ghost {
  position: absolute; right: 12px; top: -18px; z-index: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: 150px; color: var(--text); opacity: 0.05; pointer-events: none;
}
.step-card .tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  color: var(--teal); margin-bottom: 10px;
}
.step-card.dark { background: var(--dark-card); color: #fff; border-color: var(--dark-line); }
.step-card.dark .tag { color: var(--pink); }
.step-card.dark .ghost { color: #fff; }
.step-card h3 { position: relative; z-index: 1; margin-bottom: 10px; }
.step-card p { position: relative; z-index: 1; color: var(--text-dim); margin: 0; font-size: 15px; }
.step-card.dark p { color: #9AA3AF; }
.step-wide { grid-row: span 2; }

.latency-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; position: relative; z-index: 1; }
.chip { background: var(--bg); border-radius: 12px; padding: 14px 16px; }
[data-theme="dark"] .chip { background: rgba(255,255,255,0.05); }
.chip .name { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-dim); }
.chip .ms { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 2px 0 8px; }
.chip .bar { height: 6px; border-radius: 3px; background: rgba(30,37,48,0.08); overflow: hidden; }
.chip .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--mint)); }
.chip .bar i.warn { background: linear-gradient(90deg, var(--amber), var(--mint)); }

/* ---------- тарифы ---------- */

.tariffs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.tariffs.three { grid-template-columns: repeat(3, 1fr); }
.tcard {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 30px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
@media (hover: hover) {
  .tcard:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(30, 37, 48, 0.12); }
}
.tcard .ticon { width: 44px; height: 44px; color: var(--teal); }
.tcard .tname { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.tcard .tlim { color: var(--text-dim); font-size: 14.5px; min-height: 44px; }
.tcard .price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; row-gap: 2px; }
.tcard .price .val { font-family: var(--font-display); font-weight: 800; font-size: 44px; white-space: nowrap; }
.tcard .price .per { color: var(--text-dim); font-size: 14px; white-space: nowrap; }
.tcard .price .old { color: var(--text-dim); text-decoration: line-through; font-size: 15px; white-space: nowrap; }
/* между 1081 и 1320 карточки узкие — цифры и паддинги уменьшаем, чтобы цена не ломалась */
@media (max-width: 1320px) and (min-width: 1081px) {
  .tcard { padding: 24px 20px; }
  .tcard .price .val { font-size: 36px; }
  .tcard .tname { font-size: 19px; }
}
.tcard ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; flex: 1; }
.tcard ul li { margin: 6px 0; }
.tcard.featured {
  background: var(--dark-card); color: #fff; border-color: rgba(0, 191, 200, 0.4);
  box-shadow: 0 24px 60px rgba(16, 16, 23, 0.35);
  transform: translateY(-10px);
}
.tcard.featured:hover { transform: translateY(-14px); }
.tcard.featured ul { color: #9AA3AF; }
.tcard.featured .tlim { color: #9AA3AF; }
.badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--pink); color: #fff; font-weight: 700; font-size: 13px;
  border-radius: 8px; padding: 5px 12px;
  white-space: nowrap; line-height: 1;
}

/* переключатель месяц/год */
.period-toggle {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px; gap: 4px; margin: 18px 0 40px;
}
.period-toggle button {
  border: 0; background: transparent; padding: 10px 22px; border-radius: 999px;
  font: 600 14px var(--font-body); color: var(--text-dim); cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.period-toggle button.active { background: var(--ink); color: #fff; }

/* ---------- CTA / footer ---------- */

.final-cta { background: var(--dark); color: #fff; padding: 80px 0; position: relative; overflow: hidden; }
.final-cta .mascot { position: absolute; right: 6%; bottom: -12px; width: 190px; animation: float 5s ease-in-out infinite; }
.site-footer { background: var(--dark); color: #7C8494; padding: 28px 0 40px; font-size: 14px; border-top: 1px solid var(--dark-line); }
.site-footer a { color: #9AA3AF; margin-right: 22px; }

/* ---------- формы / auth ---------- */

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 68px); }
.auth-left { display: flex; flex-direction: column; justify-content: center; padding: 48px 6vw; position: relative; }
.auth-right { display: grid; place-items: center; background: radial-gradient(circle at 60% 40%, rgba(0,191,200,0.14), transparent 60%); }
.auth-right img { width: min(420px, 70%); animation: float 5s ease-in-out infinite; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px; width: min(440px, 100%);
  box-shadow: 0 24px 64px rgba(30, 37, 48, 0.10);
}
.tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font: 600 14px var(--font-body); color: var(--text-dim); cursor: pointer; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(30,37,48,0.08); }
.btn-tg { background: #2AABEE; color: #fff; }
.btn-tg:hover { background: #249AD8; transform: scale(1.01); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--text-dim); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 7px; text-transform: uppercase; }
.field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font: 500 16px var(--font-body); background: var(--bg); color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 191, 200, 0.18); }
.code-inputs { display: flex; gap: 10px; justify-content: space-between; }
.code-inputs input {
  width: 52px; height: 60px; text-align: center; font-size: 26px; font-weight: 700;
  font-family: var(--font-mono); border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
}
.code-inputs input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,191,200,0.18); }
.legal-line { font-size: 12.5px; color: var(--text-dim); text-align: center; margin-top: 18px; }

/* ---------- дашборд ---------- */

.dash { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--bg); }
.sidebar { background: var(--dark); color: #C7CDD6; padding: 26px 18px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { margin: 0 8px 26px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: #C7CDD6; font-size: 15px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.side-link:hover { background: rgba(255,255,255,0.05); color: #fff; text-decoration: none; }
.side-link.active { background: rgba(255,255,255,0.08); color: #fff; }
.side-link svg { width: 19px; height: 19px; flex: none; }
.side-link .count { margin-left: auto; background: var(--pink); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 8px; padding: 1px 8px; }
.sidebar .mascot-card {
  margin-top: auto; background: rgba(255,255,255,0.05); border-radius: var(--r-card);
  padding: 18px; text-align: center; font-size: 13px; color: #9AA3AF;
}
.sidebar .mascot-card img { width: 88px; margin: 0 auto 10px; }

.dash-main { padding: 34px 38px; }
.dash-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.dash-head h1 { font-size: 30px; margin: 0; }
.dash-head .sub { color: var(--text-dim); font-size: 14px; }
.dash-head .spacer { flex: 1; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: var(--ink); display: grid; place-items: center; font-weight: 800; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.kpi.dark { background: var(--dark-card); color: #fff; border-color: var(--dark-line); }
.kpi .k-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; color: var(--text-dim); text-transform: uppercase; }
.kpi .k-val { font-family: var(--font-display); font-weight: 800; font-size: 36px; margin: 8px 0 4px; }
.kpi .k-sub { font-size: 13px; color: var(--text-dim); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px; margin-bottom: 20px; }
.panel.dark { background: var(--dark-card); color: #fff; border-color: var(--dark-line); }
.panel h3 { margin: 0 0 18px; font-size: 19px; }
.panel .updated { float: right; font-size: 12.5px; color: var(--text-dim); font-weight: 400; }

.zone-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 12px; margin-bottom: 8px; background: var(--bg); }
.zone-row.warn { background: rgba(255, 176, 32, 0.12); }
.zone-row .z-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.zone-row .z-name { font-weight: 600; width: 150px; }
.zone-row .z-zone { color: var(--text-dim); font-size: 13.5px; width: 170px; }
.zone-row .z-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(30,37,48,0.08); overflow: hidden; }
.zone-row .z-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--mint)); }
.zone-row.warn .z-bar i { background: linear-gradient(90deg, var(--mint), var(--amber)); }
.zone-row .z-ms { font-weight: 700; width: 70px; text-align: right; }

/* скелетоны */
.skeleton { position: relative; overflow: hidden; background: rgba(30,37,48,0.07); border-radius: 12px; min-height: 18px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shimmer 1.2s infinite;
}
[data-theme="dark"] .skeleton { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .skeleton::after { background: linear-gradient(120deg, transparent, rgba(255,255,255,0.10), transparent); }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* рубильник-карта */
.switch-card { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 18px;
}
.toggle { position: relative; width: 52px; height: 30px; border-radius: 999px; background: rgba(255,255,255,0.15); border: 0; cursor: pointer; transition: background var(--t-fast); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform var(--t-fast) var(--ease-out); }
.toggle.on { background: var(--teal); }
.toggle.on::after { transform: translateX(22px); }

/* события */
.event-row { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.event-row:last-child { border-bottom: 0; }
.event-row .t { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); width: 48px; flex: none; }
.tag-chip { font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 3px 10px; flex: none; }
.tag-warning { background: rgba(255,176,32,0.16); color: #B87A00; }
.tag-resolved { background: rgba(47,217,168,0.16); color: #1B9E77; }
.tag-incident { background: rgba(255,45,107,0.14); color: var(--pink); }

/* ---------- чат ---------- */

.chat-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(255,45,107,0.4);
  transition: transform var(--t-fast) var(--ease-out);
}
.chat-fab:hover { transform: scale(1.07); }
.chat-fab .unread {
  position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px;
  background: var(--teal); color: var(--ink); border-radius: 11px;
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}

.chat-panel {
  position: fixed; right: 26px; bottom: 98px; z-index: 90;
  width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100vh - 140px));
  background: var(--surface); border-radius: 20px; overflow: hidden;
  box-shadow: 0 28px 80px rgba(16,16,23,0.35); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.chat-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--dark); color: #fff; }
.chat-head img { width: 38px; height: 38px; border-radius: 50%; background: #fff; }
.chat-head .who { font-weight: 700; font-size: 15px; }
.chat-head .st { font-size: 12px; color: var(--mint); display: flex; align-items: center; gap: 6px; }
.chat-head .st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; position: relative; word-break: break-word; }
.msg.user {
  align-self: flex-end; background: var(--teal); color: var(--ink);
  border-bottom-right-radius: 6px;
}
.msg.admin {
  align-self: flex-start; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-bottom-left-radius: 6px;
}
.msg img { border-radius: 10px; margin-top: 6px; max-width: 240px; cursor: zoom-in; }
.msg .meta { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 10.5px; opacity: 0.7; margin-top: 4px; }
.msg .ticks { letter-spacing: -2px; font-weight: 700; }
.msg .ticks.read { color: var(--pink); }
.msg.user .ticks.read { color: var(--ink); }
.typing-ind { align-self: flex-start; display: none; gap: 5px; padding: 12px 16px; background: var(--surface); border-radius: 16px; border-bottom-left-radius: 6px; border: 1px solid var(--line); }
.typing-ind.show { display: flex; }
.typing-ind i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); animation: tbounce 1.2s infinite; }
.typing-ind i:nth-child(2) { animation-delay: 0.15s; }
.typing-ind i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tbounce { 0%,60%,100% { transform: none; } 30% { transform: translateY(-5px); } }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); align-items: center; }
.chat-input input[type="text"] { flex: 1; border: 0; background: var(--bg); border-radius: 12px; padding: 12px 14px; font: 500 14.5px var(--font-body); color: var(--text); }
.chat-input input:focus { outline: 2px solid var(--teal); }
.chat-input .icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--bg); color: var(--text-dim);
  transition: all var(--t-fast);
}
.chat-input .icon-btn:hover { color: var(--teal); }
.chat-input .icon-btn.send { background: var(--pink); color: #fff; }
.chat-input .icon-btn.send:hover { background: #E62560; }
.chat-input input[type="file"] { display: none; }

/* ---------- cookie alert ---------- */

.cookie-bar {
  position: fixed; left: 26px; bottom: 26px; z-index: 95;
  max-width: 380px; background: var(--dark-card); color: #E6E9EF;
  border: 1px solid var(--dark-line); border-radius: var(--r-card);
  padding: 18px 20px; box-shadow: 0 20px 60px rgba(16,16,23,0.4);
  font-size: 13.5px;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.cookie-bar.show { opacity: 1; transform: none; pointer-events: auto; }
.cookie-bar .btns { display: flex; gap: 10px; margin-top: 12px; }
.cookie-bar .btns .btn { padding: 9px 16px; font-size: 13.5px; }

/* ---------- таблицы (админка) ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .mono { font-size: 13px; }
.st-ok { color: var(--mint); font-weight: 600; }
.st-warn { color: var(--amber); font-weight: 600; }
.st-bad { color: var(--pink); font-weight: 600; }

/* ---------- блог ---------- */

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  background: var(--dark-card); border: 1px solid var(--dark-line);
  border-radius: var(--r-card); overflow: hidden; color: #fff;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
  display: flex; flex-direction: column;
}
@media (hover: hover) {
  .blog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(16,16,23,0.4); text-decoration: none; }
}
.blog-card img { width: 100%; aspect-ratio: 2.36; object-fit: cover; }
.blog-card .bc-body { padding: 20px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card .bc-meta { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--teal); }
.blog-card .bc-meta.pink { color: var(--pink); }
.blog-card .bc-meta.mint { color: var(--mint); }
.blog-card .bc-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.3; }
.blog-card .bc-sub { color: #9AA3AF; font-size: 14px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }

/* страница статьи */
.article { max-width: 760px; margin: 0 auto; padding: 60px 24px 90px; }
.article-meta { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; color: var(--teal); margin-bottom: 14px; }
.article h1 { font-size: clamp(28px, 3.6vw, 42px); }
.article-cover { border-radius: 16px; margin: 26px 0 34px; }
.article h2 { font-size: 24px; margin-top: 40px; }
.article p, .article li { color: var(--text-dim); font-size: 16.5px; line-height: 1.7; }
.article blockquote {
  margin: 28px 0; padding: 18px 24px; border-left: 3px solid var(--teal);
  background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text);
}
.article code { font-family: var(--font-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 14px; }
.article-cta {
  margin-top: 48px; padding: 28px; border-radius: var(--r-card);
  background: var(--dark-card); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}

/* ---------- появление маскота (медленное, заметное) ---------- */

.mascot-enter { opacity: 0; animation: mascot-in 900ms var(--ease-out) 250ms forwards; }
@keyframes mascot-in {
  from { opacity: 0; transform: translateY(36px) scale(0.94) rotate(-3deg); }
  60% { opacity: 1; transform: translateY(-8px) scale(1.02) rotate(1deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* ---------- тумблер темы ---------- */

.theme-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--dark-line);
  background: rgba(255,255,255,0.05); color: #C7CDD6; cursor: pointer;
  display: inline-grid; place-items: center;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.theme-btn:hover { color: var(--teal); border-color: var(--teal); }
.theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* тёмная тема: светлые секции лендинга переворачиваем */
[data-theme="dark"] .step-card:not(.dark) { background: var(--dark-card); color: #F2F4F7; border-color: var(--dark-line); }
[data-theme="dark"] .step-card:not(.dark) p { color: #9AA3AF; }
[data-theme="dark"] .tcard:not(.featured) { background: var(--dark-card); color: #F2F4F7; border-color: var(--dark-line); }
[data-theme="dark"] .tcard:not(.featured) ul { color: #9AA3AF; }
[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,0.08); color: #fff; }

/* ---------- FAQ-аккордеон ---------- */

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 20px 56px 20px 24px; list-style: none; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  color: var(--teal); font-size: 24px; font-weight: 700; transition: transform var(--t-fast) var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--text-dim); font-size: 15.5px; line-height: 1.7; }
[data-theme="dark"] .faq-item { background: var(--dark-card); border-color: var(--dark-line); }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .tariffs { grid-template-columns: repeat(2, 1fr); }
  .tcard.featured { transform: none; }
  .steps { grid-template-columns: 1fr; }
  .step-wide { grid-row: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .radar { min-height: 340px; order: -1; }
  .dns-card { width: 100%; max-width: 300px; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-right { display: none; }
  .dash { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--dark); flex-direction: column; padding: 18px 24px 26px; gap: 16px;
    border-bottom: 1px solid var(--dark-line);
  }
  .burger {
    display: grid; place-items: center; margin-left: auto;
    width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer; color: #fff;
  }
  .nav { margin-left: 0; }
  .hero { padding: 44px 0 64px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .tariffs, .tariffs.three { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 12px; }
  .tcard { min-width: 82%; scroll-snap-align: center; }
  .kpis { grid-template-columns: 1fr; }
  .dash-main { padding: 22px 16px; }
  .chat-panel { right: 12px; bottom: 86px; }
  .cookie-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
