/* ============================================================
   AmneziaBox — design system
   Светлая / тёмная тема, адаптив, мобильное нижнее меню
   ============================================================ */

:root {
  --brand-1: #0fa697;
  --brand-2: #2f6bf6;
  --brand-grad: linear-gradient(135deg, #0fa697 0%, #2f6bf6 100%);
  --brand-soft: rgba(15, 166, 151, 0.1);
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #2f6bf6;

  --bg: #f4f6f9;
  --bg-glow-1: rgba(15, 166, 151, 0.16);
  --bg-glow-2: rgba(47, 107, 246, 0.14);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0c1420;
  --text-soft: #3d4a5c;
  --muted: #67748a;
  --shadow-sm: 0 1px 2px rgba(13, 23, 38, 0.06);
  --shadow: 0 18px 40px -24px rgba(13, 23, 38, 0.35);
  --shadow-lg: 0 32px 70px -32px rgba(13, 23, 38, 0.45);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme='dark'] {
  --bg: #070a0f;
  --bg-glow-1: rgba(15, 166, 151, 0.2);
  --bg-glow-2: rgba(47, 107, 246, 0.18);
  --surface: #0e141c;
  --surface-2: #121a24;
  --surface-3: #18212c;
  --border: #1d2836;
  --border-strong: #2c3a4b;
  --text: #eaf1f8;
  --text-soft: #c3cfdd;
  --muted: #8b9aae;
  --brand-soft: rgba(15, 166, 151, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.85);
  --shadow-lg: 0 40px 80px -36px rgba(0, 0, 0, 0.9);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01' on, 'cv05' on;
  min-height: 100vh;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, var(--bg-glow-1), transparent 70%),
    radial-gradient(680px 400px at 92% 4%, var(--bg-glow-2), transparent 72%);
  opacity: 0.85;
}

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

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

button {
  font-family: inherit;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 650;
}

p {
  margin: 0;
}

::selection {
  background: rgba(47, 107, 246, 0.22);
}

/* ---------- layout ---------- */

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.section {
  padding: 76px 0;
}

.section--tight {
  padding: 48px 0;
}

.section__head {
  max-width: 620px;
  margin-bottom: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-1);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1.5px;
  background: var(--brand-grad);
  border-radius: 2px;
}

h1.display {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.035em;
  font-weight: 680;
}

h2.display {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.03em;
}

.lead {
  font-size: 17.5px;
  color: var(--muted);
  line-height: 1.62;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13.5px;
}

.tiny {
  font-size: 12.5px;
}

.mono {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

.row--wrap { flex-wrap: wrap; }

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack--lg { gap: 20px; }

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

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  --btn-fg: #fff;
  border: 0;
  background: var(--brand-grad);
  box-shadow: 0 14px 30px -16px rgba(15, 166, 151, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  box-shadow: 0 20px 38px -18px rgba(47, 107, 246, 0.85);
}

.btn--soft {
  --btn-bg: var(--surface-3);
  border-color: transparent;
  color: var(--text-soft);
}

.btn--ghost {
  --btn-bg: transparent;
  border-color: transparent;
  color: var(--text-soft);
}

.btn--ghost:hover { background: var(--surface-3); }

.btn--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  background: transparent;
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.btn--sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: 10px;
}

.btn--lg {
  height: 54px;
  padding: 0 26px;
  font-size: 16px;
  border-radius: 14px;
}

.btn--block { width: 100%; }

.btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
}

.btn svg { flex: none; }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card--pad { padding: 24px; }

.card--lg { border-radius: var(--radius-lg); }

.card--soft {
  background: var(--surface-2);
  box-shadow: none;
}

.card--glass {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
}

.card--hover {
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}

.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--border));
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-3);
  color: var(--text-soft);
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.badge--plain::before { display: none; }
.badge--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.badge--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge--danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.badge--info { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }
.badge--brand { background: var(--brand-soft); color: var(--brand-1); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 520;
  color: var(--text-soft);
}

/* ---------- forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 13.5px;
  font-weight: 560;
  color: var(--text-soft);
}

.input,
.textarea,
.select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
  outline: none;
}

.textarea {
  height: auto;
  min-height: 104px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: color-mix(in srgb, var(--brand-1) 60%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 16%, transparent);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
}

.form-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent);
}

.form-error.is-visible { display: flex; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 660;
  letter-spacing: -0.02em;
  font-size: 17.5px;
}

.logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-grad);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(15, 166, 151, 0.9);
}

.logo__mark svg { width: 21px; height: 21px; }

.logo__sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: -2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 520;
  color: var(--muted);
  transition: color 0.18s, background-color 0.18s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-3);
}

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

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, transform 0.18s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-toggle svg { width: 18px; height: 18px; }

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

.hero {
  padding: 64px 0 40px;
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 60px;
  align-items: center;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero__text {
  font-size: 18px;
  color: var(--muted);
  max-width: 490px;
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.hero__meta div strong {
  display: block;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.hero__meta div span {
  font-size: 12.5px;
  color: var(--muted);
}

.hero__visual {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 30px;
  background:
    radial-gradient(120% 110% at 80% 0%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 60%),
    radial-gradient(100% 100% at 10% 100%, color-mix(in srgb, var(--brand-1) 18%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero__visual::after {
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 70%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-1) 22%, transparent), transparent);
  filter: blur(20px);
}

.hero__device {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0f14;
  aspect-ratio: 4 / 3;
}

.hero__device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 2;
}

.price-tag strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.price-tag span {
  font-size: 11.5px;
  color: var(--muted);
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  z-index: 2;
}

.float-chip b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.float-chip span {
  color: var(--muted);
  font-size: 11.5px;
}

.float-chip--a { left: -14px; bottom: 76px; animation: floaty 7s ease-in-out infinite; }
.float-chip--b { right: -8px; bottom: 20px; animation: floaty 8.5s ease-in-out infinite reverse; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-1);
  flex: none;
}

.icon-badge svg { width: 17px; height: 17px; }

.icon-badge--blue { background: color-mix(in srgb, var(--brand-2) 12%, transparent); color: var(--brand-2); }
.icon-badge--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.icon-badge--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.icon-badge--danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* ---------- features ---------- */

.feature {
  padding: 26px;
}

.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-1);
  margin-bottom: 16px;
}

.feature__icon svg { width: 21px; height: 21px; }

.feature h3 {
  font-size: 17px;
  margin-bottom: 7px;
}

.feature p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.step__num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  font-weight: 650;
  background: var(--brand-grad);
  color: #fff;
  margin-bottom: 15px;
}

.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { font-size: 13.8px; color: var(--muted); }

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.plan--featured {
  border-color: color-mix(in srgb, var(--brand-1) 55%, var(--border));
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--brand-1) 12%, transparent), transparent 60%),
    var(--surface);
  box-shadow: 0 24px 60px -32px color-mix(in srgb, var(--brand-1) 70%, transparent);
}

.plan__badge {
  position: absolute;
  top: -11px;
  left: 22px;
  height: 23px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

.plan__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.plan__price strong {
  font-size: 33px;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.plan__price span {
  font-size: 14px;
  color: var(--muted);
}

.plan__meta {
  font-size: 12.8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.plan__save {
  color: var(--ok);
  font-weight: 600;
}

.plan ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.8px;
  color: var(--text-soft);
  flex: 1;
}

.plan li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.plan li svg {
  flex: none;
  margin-top: 3px;
  color: var(--brand-1);
  width: 15px;
  height: 15px;
}

/* ---------- support preview ---------- */

.support-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.chat-mock {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-mock__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.bubble {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.6px;
  line-height: 1.5;
  margin-bottom: 10px;
  position: relative;
}

.bubble--in {
  background: var(--surface-3);
  border-bottom-left-radius: 5px;
}

.bubble--out {
  background: var(--brand-grad);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.bubble__meta {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- faq ---------- */

.faq {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:last-child { border-bottom: 0; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 550;
  list-style: none;
  transition: background-color 0.16s;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:hover { background: var(--surface-2); }

.faq summary svg {
  flex: none;
  transition: transform 0.25s var(--ease);
  color: var(--muted);
}

.faq details[open] summary svg { transform: rotate(45deg); }

.faq__body {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 780px;
}

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

.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 52px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 40px 80px -50px rgba(47, 107, 246, 0.9);
}

.cta h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 12px;
  max-width: 560px;
}

.cta p {
  opacity: 0.9;
  max-width: 520px;
  margin-bottom: 26px;
}

.cta .btn {
  --btn-bg: #fff;
  --btn-fg: #0b1220;
  border: 0;
}

.cta::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -100px;
  top: -140px;
  background: rgba(255, 255, 255, 0.14);
}

.cta > * { position: relative; z-index: 1; }

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 34px;
}

.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-grid a,
.footer-grid p {
  display: block;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 9px;
  transition: color 0.16s;
}

.footer-grid a:hover { color: var(--brand-1); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ---------- auth ---------- */

.auth-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 44px 24px 90px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--brand-2);
  font-weight: 560;
}

.demo-note {
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

.demo-note b { color: var(--text-soft); font-weight: 600; }

/* ---------- app shell (кабинет / админка) ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 28px;
  padding: 30px 0 104px; /* запас под плавающую кнопку поддержки */
  align-items: start;
}

.side-nav {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-nav__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 12px 6px;
  font-weight: 600;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.2px;
  font-weight: 520;
  color: var(--text-soft);
  transition: background-color 0.16s, color 0.16s;
}

.side-nav a svg { width: 17px; height: 17px; color: var(--muted); transition: color 0.16s; }

.side-nav a:hover { background: var(--surface-2); color: var(--text); }

.side-nav a.is-active {
  background: var(--brand-soft);
  color: var(--brand-1);
  font-weight: 600;
}

.side-nav a.is-active svg { color: var(--brand-1); }

.side-nav__count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  display: grid;
  place-items: center;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: clamp(23px, 2.6vw, 30px);
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.page-head p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 6px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi {
  padding: 20px;
}

.kpi__label {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.kpi__value {
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi__note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 55%),
    radial-gradient(100% 120% at 0% 100%, color-mix(in srgb, var(--brand-1) 16%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-grad);
  transition: width 0.5s var(--ease);
}

.traffic-row {
  display: grid;
  grid-template-columns: 70px 1fr 74px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.traffic-row b { color: var(--text); font-weight: 600; text-align: right; font-size: 13px; }

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-3);
  margin-bottom: 20px;
  overflow-x: auto;
  max-width: 100%;
}

.tabs button {
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s, color 0.16s;
}

.tabs button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.table thead th {
  text-align: left;
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr:hover td { background: var(--surface-2); }

.table .strong { color: var(--text); font-weight: 560; }

/* ---------- support center ---------- */

.support-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow-y: auto;
}

.ticket-item {
  text-align: left;
  width: 100%;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s, transform 0.16s;
}

.ticket-item:hover { border-color: var(--border-strong); transform: translateX(2px); }

.ticket-item.is-active {
  border-color: color-mix(in srgb, var(--brand-1) 60%, var(--border));
  background: var(--brand-soft);
}

.ticket-item__subject {
  font-size: 14px;
  font-weight: 560;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.ticket-item__preview {
  font-size: 12.8px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chat {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: 620px;
}

.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
}

.msg {
  max-width: 76%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg--client {
  align-self: flex-end;
  background: var(--brand-grad);
  color: #fff;
  border: 0;
  border-bottom-right-radius: 5px;
}

.msg--support {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.msg--system {
  align-self: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 2px 8px;
}

.msg__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  margin-top: 6px;
  opacity: 0.8;
}

.chat__form {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  align-items: flex-end;
}

.chat__form .textarea {
  min-height: 48px;
  max-height: 140px;
  height: 48px;
  border-radius: 12px;
}

.tg-sync-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-2) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2) 20%, transparent);
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
}

.tg-sync-note svg { color: var(--brand-2); flex: none; margin-top: 1px; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 10, 16, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.18s var(--ease);
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  animation: pop 0.22s var(--ease);
}

.modal h3 {
  font-size: 20px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.modal__actions .btn { flex: 1; }

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- toast ---------- */

.toast-root {
  position: fixed;
  z-index: 120;
  top: calc(var(--header-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toastIn 0.24s var(--ease);
  pointer-events: auto;
}

.toast svg { flex: none; margin-top: 1px; }
.toast--ok svg { color: var(--ok); }
.toast--err svg { color: var(--danger); }
.toast--info svg { color: var(--brand-2); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

[data-responsive-grid] { align-items: start; }

.chat__body > *:first-child { margin-top: auto; }

/* ---------- misc ---------- */

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  font-size: 13px;
}

.copy-field code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--text-soft);
}

.code-block {
  padding: 16px;
  border-radius: 12px;
  background: #0a1017;
  color: #cfe3e0;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid #16212c;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.spinner--dark {
  border-color: color-mix(in srgb, var(--muted) 40%, transparent);
  border-top-color: var(--text);
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
}

.empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--muted);
}

.empty h3 { color: var(--text); font-size: 16px; }

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  height: 16px;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.hide-desktop { display: none; }

/* ---------- mobile bottom nav ---------- */

.bottom-nav {
  display: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 42px; }
  .hero__visual { max-width: 560px; }
  .float-chip--a { left: 8px; }
  .float-chip--b { right: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-split { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .side-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  .side-nav__label { display: none; }
  .side-nav a { white-space: nowrap; }
  .side-nav a svg { width: 16px; height: 16px; }
  .support-layout { grid-template-columns: 1fr; }
  .ticket-list { max-height: none; flex-direction: column; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .side-nav { display: none; }
  .hide-desktop { display: inline-flex; }
  .hide-mobile { display: none !important; }
  .app-shell { padding: 16px 0 24px; }
  h1.display { font-size: 31px; letter-spacing: -0.03em; }
  .container { padding: 0 16px; }
  .site-header__inner { padding: 0 16px; }
  .section { padding: 52px 0; }
  .hero { padding: 32px 0 12px; }
  .hero__text { font-size: 16px; }
  .hero__actions .btn { flex: 1; }
  .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-actions .btn span.label-text { display: none; }
  .logo__sub { display: none; }
  .auth-card { padding: 24px; }
  .chat { max-height: none; min-height: 440px; }
  .msg { max-width: 88%; }
  .modal { padding: 22px; }

  /* нижнее горизонтальное меню */
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--border);
  }

  .bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 7px 4px;
    border-radius: 11px;
    font-size: 10.5px;
    font-weight: 560;
    color: var(--muted);
    position: relative;
    transition: color 0.16s, background-color 0.16s;
  }

  .bottom-nav a svg { width: 21px; height: 21px; }

  .bottom-nav a.is-active {
    color: var(--brand-1);
    background: var(--brand-soft);
  }

  .bottom-nav__dot {
    position: absolute;
    top: 5px;
    right: calc(50% - 16px);
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    display: grid;
    place-items: center;
    padding: 0 4px;
  }

  #app { padding-bottom: 70px; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    animation: sheetUp 0.26s var(--ease);
  }

  @keyframes sheetUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

@media (max-width: 560px) {
  .hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .hero__meta div strong { font-size: 16px; }
  .hero__meta div span { font-size: 11.5px; }
  .section__head { margin-bottom: 26px; }
  .lead { font-size: 16px; }
  .kpi-grid { gap: 12px; }
  .kpi { padding: 16px; }
  .kpi__value { font-size: 22px; }
  .card--pad { padding: 18px; }
  .hero-card { padding: 20px; }
  .page-head { margin-bottom: 16px; }
  .chat__form { gap: 8px; }
  .chat__form .btn { padding: 0 14px; }
  .toast-root {
    top: auto;
    bottom: calc(142px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  h1.display { font-size: 29px; }
}

/* печать */
@media print {
  .site-header, .bottom-nav, .site-footer { display: none; }
}

/* ============================================================
   Виджет поддержки (плавающая кнопка справа снизу)
   ============================================================ */

.sw-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 18px;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 18px 34px -16px rgba(15, 166, 151, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}

.sw-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px -18px rgba(47, 107, 246, 0.9);
}

.sw-fab:active { transform: scale(0.97); }

.sw-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.sw-fab__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}

.sw-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 85;
  width: 384px;
  max-height: min(620px, calc(100vh - 140px));
  display: none;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: swIn 0.22s var(--ease);
}

.sw-panel.is-open { display: flex; }

@keyframes swIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.sw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: linear-gradient(135deg, rgba(15, 166, 151, 0.12), rgba(47, 107, 246, 0.1));
  border-bottom: 1px solid var(--border);
}

.sw-head__avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-grad);
  color: #fff;
  flex: none;
}

.sw-head__text {
  flex: 1;
  min-width: 0;
}

.sw-head__text b {
  display: block;
  font-size: 13.5px;
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-head__text span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.16s, color 0.16s;
}

.sw-icon-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.sw-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.sw-body--pad { padding: 16px; }

.sw-hero {
  text-align: center;
  padding: 6px 4px 18px;
}

.sw-hero__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-1);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.sw-hero b { display: block; font-size: 14.5px; margin-bottom: 6px; }
.sw-hero p { font-size: 12.8px; color: var(--muted); line-height: 1.5; }

.sw-list { display: flex; flex-direction: column; gap: 7px; }

.sw-item {
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s, transform 0.16s;
}

.sw-item:hover {
  border-color: color-mix(in srgb, var(--brand-1) 45%, var(--border));
  background: var(--surface-2);
  transform: translateY(-1px);
}

.sw-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.sw-item__subject {
  font-size: 13px;
  font-weight: 580;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-item__dot {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

.sw-item__preview {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.sw-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.sw-empty { text-align: center; padding: 26px 16px; }
.sw-empty b { display: block; font-size: 14px; margin-bottom: 6px; }
.sw-empty p { font-size: 12.5px; color: var(--muted); }

.sw-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  background: var(--surface-3);
  color: var(--text-soft);
}

.sw-status--new { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.sw-status--in_progress { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }
.sw-status--closed { background: var(--surface-3); color: var(--muted); }

.sw-foot {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.sw-ticket-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.sw-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--brand-2);
}

.sw-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.sw-chat > *:first-child { margin-top: auto; }

.sw-msg {
  max-width: 88%;
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 13px;
  border-bottom-left-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.8px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.sw-msg--mine {
  align-self: flex-end;
  background: var(--brand-grad);
  color: #fff;
  border: 0;
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 5px;
}

.sw-msg__meta {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  opacity: 0.72;
}

.sw-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  align-items: flex-end;
}

.sw-form textarea {
  flex: 1;
  min-height: 40px;
  max-height: 110px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  outline: none;
}

.sw-form textarea:focus {
  border-color: color-mix(in srgb, var(--brand-1) 60%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 15%, transparent);
}

.sw-send {
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 11px;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sw-send:disabled { opacity: 0.6; cursor: not-allowed; }

.sw-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 0;
}

.sw-error:empty { display: none; }

.sw-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .sw-fab {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .sw-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 86vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ============================================================
   Серверы: учёт узлов, оплата, загрузка слотов
   ============================================================ */

.slot-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.slot-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-grad);
  transition: width 0.3s var(--ease);
}

.server-risk,
.service-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
}

.server-risk b,
.service-banner b {
  font-size: 14.5px;
}

@media (max-width: 720px) {
  .server-risk,
  .service-banner {
    gap: 10px;
  }
}
