/* Proximizer — dark tech theme */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #1f2a40;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --accent-secondary: #06b6d4;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.12);
  --success: #22c55e;
  --radius: 12px;
  --radius-lg: 20px;
  --header-height: 72px;
  --test-banner-height: 0px;
  --top-offset: calc(var(--header-height) + var(--test-banner-height));
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--top-offset);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

/* ── Test mode banner ── */
body.test-mode {
  --test-banner-height: 40px;
}

/* --top-offset дублирован на body: переопределение --test-banner-height
   на body.test-mode не видно там, где он определён на :root */
body {
  --top-offset: calc(var(--header-height) + var(--test-banner-height));
}

.test-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  height: var(--test-banner-height);
  display: flex;
  align-items: center;
  background: #92400e;
  color: #fef3c7;
  font-size: 0.8125rem;
  line-height: 1.35;
  border-bottom: 1px solid rgba(254, 243, 199, 0.25);
}

.test-mode-banner__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.test-mode-banner strong {
  font-weight: 700;
  white-space: nowrap;
}

.test-mode-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  body.test-mode {
    --test-banner-height: 56px;
  }

  .test-mode-banner__text {
    flex-basis: 100%;
  }
}

/* ── Header ── */
.header {
  position: fixed;
  top: var(--test-banner-height);
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header.scrolled {
  background: rgba(10, 14, 23, 0.95);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo__icon {
  width: 36px;
  height: 36px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

@media (max-width: 1100px) {
  .nav {
    gap: 18px;
  }
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link--current {
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

/* Кнопки пейджера чаѝто в disabled — не дают им реагировать на курѝор */
.dns-pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ghost {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn--ghost:hover {
  background: rgba(59, 130, 246, 0.2);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--top-offset);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.08), transparent);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__wordplay {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.hero__wordplay-prefix {
  color: var(--text-primary);
}

.hero__wordplay-rotator {
  display: inline-block;
  vertical-align: bottom;
  height: 1.15em;
  overflow: hidden;
}

.hero__title-static {
  display: none;
}

.hero__wordplay-inner {
  display: block;
  animation: hero-wordplay 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hero__wordplay-line {
  display: block;
  height: 1.15em;
  white-space: nowrap;
}

.hero__accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes hero-wordplay {
  0%, 44% { transform: translateY(0); }
  50%, 94% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__wordplay {
    display: none;
  }

  .hero__title-static {
    display: block;
    background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero__guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hero__guarantee svg {
  color: var(--success);
  flex-shrink: 0;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__globe {
  width: 100%;
  max-width: 480px;
  animation: float 6s ease-in-out infinite;
}

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

/* ── Sections ── */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Smart routing (split access) ── */
.section--split-routing {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(34, 197, 94, 0.06), transparent),
    var(--bg-primary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.split-routing__header {
  text-align: center;
  margin-bottom: 56px;
}

.split-routing__badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 999px;
}

.split-routing__flow {
  max-width: 920px;
  margin: 0 auto 48px;
}

.split-routing__hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.split-routing__hub-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 20px;
  color: var(--accent);
  box-shadow: 0 0 32px rgba(59, 130, 246, 0.15);
}

.split-routing__hub-label {
  font-weight: 600;
  font-size: 1rem;
}

.split-routing__hub-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--success);
}

.split-routing__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.split-routing__fork {
  position: relative;
  height: 48px;
  margin-bottom: 8px;
}

.split-routing__fork-node {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.split-routing__fork-line {
  position: absolute;
  bottom: 5px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.split-routing__fork-line--left {
  left: 25%;
  right: 50%;
  transform-origin: right center;
  transform: rotate(-18deg);
  border-radius: 2px 0 0 2px;
}

.split-routing__fork-line--right {
  left: 50%;
  right: 25%;
  transform-origin: left center;
  transform: rotate(18deg);
  border-radius: 0 2px 2px 0;
}

.split-routing__fork::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 5px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.4;
}

.split-routing__routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.split-route {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition);
}

.split-route:hover {
  transform: translateY(-3px);
}

.split-route--direct {
  border-color: rgba(34, 197, 94, 0.25);
  background: linear-gradient(165deg, rgba(34, 197, 94, 0.08) 0%, var(--bg-card) 55%);
}

.split-route--direct:hover {
  border-color: rgba(34, 197, 94, 0.45);
}

.split-route--secure {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(165deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-card) 55%);
}

.split-route--secure:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.split-route__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.split-route__type {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.split-route--direct .split-route__type {
  color: var(--success);
}

.split-route--secure .split-route__type {
  color: var(--accent);
}

.split-route__emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.split-route__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.split-route__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

.split-route__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.split-route__list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.split-route__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.split-route--direct .split-route__list li::before {
  background: var(--success);
}

.split-route--secure .split-route__list li::before {
  background: var(--accent);
}

.split-routing__benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
  max-width: 820px;
  margin: 0 auto 32px;
}

.split-routing__benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.split-routing__benefit svg {
  flex-shrink: 0;
  color: var(--success);
}

.split-routing__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ── USP ── */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.usp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.usp-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.usp-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 14px;
  color: var(--accent);
}

.usp-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.usp-card__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Servers ── */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.server-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: all var(--transition);
  min-width: 0;
}

.server-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--bg-card-hover);
}

.server-item__flag {
  font-size: 1.5rem;
  line-height: 1;
}

.server-item__name {
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-item__status {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* ── Steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  opacity: 0.3;
}

.step {
  text-align: center;
  position: relative;
}

.step__number {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.step__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.steps--5 {
  grid-template-columns: repeat(5, 1fr);
}

.steps--5::before {
  left: 10%;
  right: 10%;
}

.steps-cta {
  text-align: center;
  margin-top: 40px;
}

/* ── Onboarding (account) ── */
.onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.onboarding-step__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
}

.onboarding-step p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.onboarding-step__body {
  flex: 1;
  min-width: 0;
}

.onboarding-step__body > p {
  margin-bottom: 12px;
}

.account-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.account-sub-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.account-sub-item--on {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}

.account-sub-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.account-sub-item__kind {
  font-size: 1.05rem;
  font-weight: 700;
}

.account-sub-item__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.account-sub-item__badge--on {
  color: var(--accent);
}

.account-sub-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.account-sub-item p + p {
  margin-top: 4px;
}

/* Шапка карточки кабинета: заголовок + тихое дейѝтвие ѝправа */
.admin-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* ???????????? ???????? (DNS / TG / VPN): ????? � ????????????, ????
   ????????, ???? ???????? ????????. */
.admin-card--collapsible .admin-card__head {
  cursor: pointer;
  user-select: none;
}

.admin-card--collapsible .admin-card__head::after {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-left: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.admin-card--collapsible:not(.admin-card--collapsed) .admin-card__head::after {
  transform: rotate(-135deg);
}

.admin-card--collapsed > *:not(.admin-card__head) {
  display: none !important;
}

.admin-card__head h2 {
  margin-bottom: 0;
}

.admin-card__head-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-card__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .admin-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-card__head-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Период подпиѝки в шапке: кратко, по клику — полнаѝ дата ѝо временем */
.account-sub-period {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.account-sub-period:hover {
  color: var(--text-secondary);
}

/* Оффер внутри карточки, когда продукт не подключён */
.account-offer__benefit {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.account-offer__price {
  margin: 8px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.account-offer__price:empty {
  display: none;
}

.account-offer__actions {
  margin-top: 14px;
}

.account-offer__note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Telegram-прокѝи: планы покупки и креды (MTProto + SOCKS5/HTTP) */
.tg-proxy-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.tg-proxy-plan {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

@media (max-width: 640px) {
  .tg-proxy-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tg-proxy-plan:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.tg-proxy-plan__period {
  font-size: 0.8125rem;
  font-weight: 600;
}

.tg-proxy-plan__price {
  font-size: 1.125rem;
  font-weight: 700;
}

.tg-proxy-plan__price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tg-proxy-socks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tg-proxy-socks .form-group {
  margin: 0;
}

/* Карточка ѝервера: название, кнопки открытиѝ, чип ѝѝылки и QR */
.tg-proxy-server {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.tg-proxy-server__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tg-proxy-server__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tg-proxy-server__title b {
  font-size: 0.9375rem;
}

.tg-proxy-server__title span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tg-proxy-server__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Селектор ѝервера и протокола в кабинете */
.tg-proxy-selection {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.tg-proxy-selection__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tg-proxy-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tg-proxy-choice__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.tg-proxy-choice__btn b {
  font-size: 0.8125rem;
}

.tg-proxy-choice__btn span {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.tg-proxy-choice__btn--active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
}

.tg-proxy-cred {
  margin-bottom: 10px;
}

.tg-proxy-cred > span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* TG web proxy (?????? ??? WEB): ????? �???? � ??????????� ? ?????? ????????? */
.tg-proxy-plan {
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.tg-proxy-plan--active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
}

.tg-proxy-devices-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.tg-proxy-devices-picker__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tg-proxy-picker__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tg-proxy-picker__select {
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-primary);
  font: inherit;
}

.tg-proxy-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-proxy-stepper__value {
  min-width: 34px;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 700;
}

.tg-proxy-stepper__max {
  font-size: 0.75rem;
  color: var(--text-muted);
}

#checkout-durations {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tg-proxy-total {
  font-size: 0.9375rem;
  font-weight: 700;
}

.tg-proxy-buy-btn {
  min-width: 220px;
  justify-content: center;
  padding: 12px 20px;
}

.tg-proxy-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tg-proxy-slots {
  margin: 0;
  font-weight: 600;
}

.tg-proxy-devices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}


.setup-code {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

/* Сѝылка-подпиѝка: некликабельный чип, копирование по нажатию */
.subscription-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Метка протокола (DoH/DoT), флажок ѝтраны и кнопка «?» рѝдом ѝ ѝѝылкой */
.url-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.info-tip {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.info-tip:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.9);
}

.url-flag {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1;
}

.flag-img {
  width: 1.2em;
  height: 0.9em;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: -0.15em;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.subscription-url-row .setup-url-chip {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  font-size: 0.8125rem;
}

.subscription-url-row .setup-url-chip__url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Трек-бар иѝпользованиѝ (запроѝы DNS, трафик VPN) */
.usage-block {
  margin-bottom: 16px;
}

/* Сообщениѝ от админа в личном кабинете: warning — краѝный, announcement —
   жёлтый (как прежний хинт про Gemini), info — ѝиний. Иѝчезаемые ѝкрывает
   юзер креѝтиком, неиѝчезаемые оѝтаютѝѝ до отключениѝ админом. */
#admin-messages {
  margin-bottom: 20px;
}

.admin-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.admin-msg--warning {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.admin-msg--announcement {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.admin-msg--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
}

.admin-msg__icon {
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 0;
}

.admin-msg__text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* Сѝылка в цвете ѝообщениѝ, чтобы читалаѝь на тонированном фоне */
.admin-msg__text a {
  color: inherit;
  text-decoration: underline;
}

.admin-msg__dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0 2px;
  font-size: 1.25rem;
  line-height: 1;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
}

.admin-msg__dismiss:hover {
  opacity: 1;
}

.admin-msg--read {
  opacity: 0.55;
}

.usage-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.usage-bar__track {
  flex: 1;
  height: 8px;
  min-width: 120px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.usage-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #2563eb);
  transition: width var(--transition);
}

.usage-bar__fill--vpn {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.usage-bar__fill--muted {
  background: rgba(148, 163, 184, 0.45);
}

.usage-bar__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.usage-bar:hover .usage-bar__label {
  color: var(--text-secondary);
}

.usage-panel {
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.usage-panel strong {
  color: var(--text-primary);
}

/* Панель апгрейда тарифа */
.account-upgrade {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: var(--radius);
}

.account-upgrade__title {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.account-upgrade__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.account-upgrade__option:first-of-type {
  border-top: none;
}

.account-upgrade__name {
  font-weight: 600;
  color: var(--text-primary);
}

.account-upgrade__meta {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.account-upgrade__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Панель ѝмены тарифа: вводка, предупреждение об иѝчезнувшем тарифе, примечание */
.account-upgrade__intro,
.account-upgrade__note {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.account-upgrade__note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.account-upgrade__warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.account-upgrade__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

/* Редкие дейѝтвиѝ карточки — внизу, за разделителем */
.account-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.account-card-footer__quiet {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-sub-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Оффернаѝ плитка: продукт ещё не подключён */
.account-sub-item--offer {
  background: transparent;
  border-style: dashed;
}

.account-sub-item p.account-sub-item__price {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.account-sub-item p.account-sub-item__note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Спойлеры внутри карточек DNS/VPN */
.account-details {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
}

.account-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

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

.account-details summary::after {
  content: '▾';
  color: var(--text-muted);
  transition: transform var(--transition);
}

.account-details[open] summary::after {
  transform: rotate(180deg);
}

.account-details__body {
  padding: 0 16px 16px;
}

/* Редкие дейѝтвиѝ карточки — внизу, за разделителем */
.account-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Тихаѝ ѝтрока кроѝѝ-оффера (например, VPN внутри DNS-блока) */
.account-upsell {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.account-upsell a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Свёрнутый блок «Продлить или ѝменить тариф» */
.account-renew-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.account-renew-toggle__icon {
  color: var(--text-muted);
  transition: transform var(--transition);
}

.account-renew-toggle--open .account-renew-toggle__icon {
  transform: rotate(180deg);
}

#renew-card .account-picker {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.account-ai-delivery {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-secondary, rgba(255,255,255,0.04));
  white-space: pre-wrap;
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .account-sub-grid {
    grid-template-columns: 1fr;
  }
}

.vpn-adblock {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpn-adblock__label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.vpn-adblock__select {
  max-width: 320px;
}

.vpn-adblock__select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.account-picker {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.account-picker #picker-pay {
  margin-top: 4px;
}

.account-picker #picker-pay.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.account-picker__lead,
.account-picker__note {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.45;
  margin: 10px 0 0;
}

.account-picker__group {
  margin-bottom: 14px;
}

.account-picker__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.account-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.account-chip:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.account-chip--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
}

.account-chip:disabled,
.account-chip--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.account-chip:disabled:hover {
  border-color: var(--border);
}

.account-chip__old {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

.btn--qr {
  width: 44px;
  min-width: 44px;
  height: auto;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  aspect-ratio: 1;
}

.subscription-url-box .btn--qr {
  margin: 0;
}

body.account-modal-open {
  overflow: hidden;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.account-modal.hidden {
  display: none;
}

.account-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.account-modal__box {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.account-modal__box--wide {
  width: min(640px, 100%);
}

.account-modal__box h3 {
  margin: 0 36px 16px 0;
}

.account-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.account-modal__qr {
  display: block;
  width: min(360px, 100%);
  height: auto;
}

.account-modal__text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.account-modal__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
  margin: 0 auto;
  border-radius: 12px;
  background: #fff;
}

.account-download-recommended {
  margin: 12px 0 16px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.account-download-hint {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.account-download-recommended .btn {
  margin-bottom: 4px;
}

#setup-guide-card .platform-grid {
  margin: 16px 0 12px;
}

#setup-guide-card .setup-os-guide {
  margin: 12px 0 0;
}

/* ── App download tabs ── */
.app-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.app-tabs__btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.app-tabs__btn--active {
  border-color: var(--accent);
  color: var(--accent);
}

.platform-tile-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.platform-tile__mirror {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.75rem;
}

.platform-tile__mirror a {
  color: var(--accent);
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  padding-top: 16px;
}

.pricing-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ── Сравнительнаѝ таблица тарифов ── */
.pricing-table-wrap {
  padding-top: 16px;
  overflow-x: clip;
}

/* Подѝказки таблицы: компактный балун — только имена, две колонки, влезает вѝегда. */
.pricing-table .pricing-hint__popup {
  width: min(320px, calc(100vw - 48px));
  max-height: min(460px, calc(100vh - 140px));
  overflow-y: auto;
  white-space: normal;
  /* наведённый балун не ловит курѝор: не «залипает» при движении мыши
     и не перекрывает ѝоѝедние «?» и кнопки */
  pointer-events: none;
}

/* закреплённый кликом балун — интерактивный (можно ѝкроллить ѝпиѝок) */
.pricing-table .pricing-feature-with-hint.is-open .pricing-hint__popup {
  pointer-events: auto;
}

.pricing-table .pricing-hint__popup ul {
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

/* нейроѝети, добавлѝемые ѝтим тарифом */
.pricing-hint__item-new span {
  color: #c084fc;
  font-weight: 600;
}

/* балун значениѝ («4»/«13») центрируетѝѝ на ѝвоей ѝчейке */
.pricing-table td .pricing-hint__popup {
  left: 50%;
  transform: translate(-50%, 8px);
}

.pricing-table td .pricing-feature-with-hint.is-open .pricing-hint__popup,
.pricing-table td .pricing-feature-with-hint:hover .pricing-hint__popup {
  transform: translate(-50%, 0);
}

/* крайнѝѝ праваѝ колонка: балун ѝкоритѝѝ вправо и раѝтёт влево */
.pricing-table .pricing-value-hint--edge .pricing-hint__popup,
.pricing-table .pricing-value-hint--edge.is-open .pricing-hint__popup,
.pricing-table .pricing-value-hint--edge:hover .pricing-hint__popup {
  left: auto;
  right: 0;
  transform: none;
}

/* балун метки ѝтроки прижат к левому краю — без ѝдвига по центру */
.pricing-table tbody th .pricing-hint__popup {
  left: 0;
  transform: translateY(8px);
}

.pricing-table tbody th .pricing-feature-with-hint.is-open .pricing-hint__popup,
.pricing-table tbody th .pricing-feature-with-hint:hover .pricing-hint__popup {
  transform: translateY(0);
}

.pricing-table .pricing-hint__popup li {
  gap: 10px;
}

.pricing-table__value-hint {
  justify-content: center;
  font-size: 0.95rem;
}

/* ── Мобильнаѝ витрина: тарифы ѝтопкой ── */
.pricing-mc-list {
  display: none;
}

.pricing-mc {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-mc--popular {
  border-color: rgba(168, 85, 247, 0.55);
}

.pricing-mc__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-mc__head .pricing-table__tier-icon {
  margin-bottom: 0;
}

.pricing-mc__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-mc__badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  font-size: 0.7rem;
  font-weight: 600;
}

.pricing-mc__price {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pricing-mc__price small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-mc__permonth {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-mc__rows {
  margin: 0;
  display: grid;
  gap: 8px;
}

.pricing-mc__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}

.pricing-mc__rows dt {
  color: var(--text-muted);
}

.pricing-mc__rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.pricing-mc__extra {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.pricing-mc__cta {
  margin-top: auto;
}

/* На мобильных балун подѝказки — фикѝированнаѝ нижнѝѝ панель:
   вѝегда целиком на ѝкране, ничего не обрезаетѝѝ краѝми карточки. */
@media (max-width: 1023px) {
  .pricing-mc .pricing-hint__popup {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: auto;
    width: auto;
    max-height: 70vh;
    transform: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }

  .pricing-mc .pricing-feature-with-hint.is-open .pricing-hint__popup,
  .pricing-mc .pricing-feature-with-hint:hover .pricing-hint__popup {
    transform: none;
  }
}

@media (max-width: 1023px) {
  /* витрина-таблица заменѝетѝѝ карточками ѝтопкой */
  .pricing-table-wrap {
    display: none;
  }

  .pricing-mc-list {
    display: grid;
    gap: 14px;
    padding-top: 16px;
  }
}

@media (max-width: 1180px) {
  .pricing-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pricing-table {
    min-width: 860px;
  }
}

.pricing-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto 20px;
}

.pricing-switch__group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
}

.pricing-switch__option {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.pricing-switch__option--active {
  background: var(--accent);
  color: #fff;
}

.pricing-switch__note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pricing-table {
  width: 100%;
  min-width: 860px;
  max-width: 1080px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
}

.pricing-table th,
.pricing-table td {
  padding: 13px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.pricing-table thead th {
  vertical-align: bottom;
  padding-top: 20px;
  padding-bottom: 18px;
}

.pricing-table__corner {
  width: 150px;
}

.pricing-table tbody th[scope='row'] {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.pricing-table tbody th .pricing-feature-with-hint {
  flex-wrap: nowrap;
}

.pricing-table td {
  font-size: 0.95rem;
}

.pricing-table .is-popular {
  background: rgba(168, 85, 247, 0.07);
}

.pricing-table thead th.is-popular {
  border-top: 2px solid rgba(168, 85, 247, 0.55);
  border-radius: 12px 12px 0 0;
}

.pricing-table__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pricing-table__tier-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.pricing-table__tier-icon svg {
  width: 26px;
  height: 26px;
}

.pricing-table__tier-icon--basic {
  color: #34d399;
}

.pricing-table__tier-icon--pro {
  color: #60a5fa;
}

.pricing-table__tier-icon--premium {
  color: #c084fc;
}

.pricing-table__tier-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-table__tier-price {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.pricing-table__tier-price small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-table__muted {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.pricing-table__cta-row th,
.pricing-table__cta-row td {
  border-bottom: none;
  padding-top: 18px;
  padding-bottom: 6px;
}

.pricing-table__cta {
  max-width: 160px;
  margin: 0 auto;
  font-size: 0.875rem;
  padding-left: 12px;
  padding-right: 12px;
  white-space: nowrap;
}

/* Подѝказки меток таблицы: открытие по ховеру (клик уже еѝть).
   pointer-events намеренно НЕ включаем — наведённый балун не должен
   ловить курѝор и «залипать», перекрываѝ ѝоѝедние подѝказки. */
@media (hover: hover) {
  .pricing-feature-with-hint:hover .pricing-hint__popup {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

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

.pricing-tier__choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-tier__options-label {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pricing-tier__choices .pricing-tier__options-label:first-child {
  margin-top: 0;
}

.pricing-grid--single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
}

.pricing-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.pricing-card--popular {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: scale(1.04);
  z-index: 1;
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-card__duration {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-card__price-wrap {
  margin-bottom: 4px;
}

.pricing-card__price-old {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 4px;
}

.price-old {
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 8px;
}

.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.pricing-card__price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-card__from {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted) !important;
  vertical-align: 0.3em;
  margin-right: 4px;
}

.pricing-tier__price .pricing-card__from {
  font-size: 0.8rem !important;
}

.pricing-card__features {
  list-style: none;
  margin: 32px 0;
  flex: 1;
}

.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 8px 0;
}

.pricing-card__features li svg {
  color: var(--success);
  flex-shrink: 0;
}

/* ── Pricing tiers (Basic / Pro / Premium) ── */
.pricing-tier {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  height: 100%;
  min-width: 0;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pricing-tier:hover {
  transform: translateY(-3px);
}

.pricing-tier--basic { border-color: rgba(16, 185, 129, 0.28); }
.pricing-tier--basic:hover { border-color: rgba(16, 185, 129, 0.5); box-shadow: 0 16px 40px rgba(16, 185, 129, 0.1); }
.pricing-tier--pro { border-color: rgba(59, 130, 246, 0.35); }
.pricing-tier--pro:hover { border-color: rgba(59, 130, 246, 0.55); box-shadow: 0 16px 40px rgba(59, 130, 246, 0.14); }
.pricing-tier--premium { border-color: rgba(168, 85, 247, 0.35); }
.pricing-tier--premium:hover { border-color: rgba(168, 85, 247, 0.55); box-shadow: 0 16px 40px rgba(168, 85, 247, 0.14); }

.pricing-tier:has(.pricing-feature-with-hint.is-open),
.pricing-tier:has(.pricing-feature-with-hint:hover) {
  z-index: 4;
}

.pricing-tier__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 2;
}

.pricing-tier__head {
  text-align: center;
  min-height: 148px;
}

.pricing-tier__icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.pricing-tier__name {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.pricing-tier__desc {
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 26ch;
}

.pricing-tier__price {
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pricing-tier__price .pricing-card__price-wrap {
  margin-bottom: 0;
}

.pricing-tier__price .pricing-card__price {
  font-size: 2.125rem;
  margin-bottom: 0;
}

.pricing-tier__price .pricing-card__price-old {
  font-size: 1rem;
}

.pricing-tier__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pricing-tier__options--count-1 {
  grid-template-columns: 1fr;
}

.pricing-tier__options--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-tier__option {
  appearance: none;
  position: relative;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  border-radius: 12px;
  padding: 11px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  transition: all var(--transition);
  font: inherit;
  text-align: center;
}

.pricing-tier__option-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.pricing-tier__option:hover { border-color: rgba(59, 130, 246, 0.35); }

.pricing-tier__option--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.pricing-tier--basic .pricing-tier__option--active {
  border-color: rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.pricing-tier--premium .pricing-tier__option--active {
  border-color: rgba(168, 85, 247, 0.85);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.pricing-tier__option-duration {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.pricing-tier__option-traffic {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.pricing-tier__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pricing-tier__features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.pricing-tier__features li svg {
  flex-shrink: 0;
  color: var(--success);
  margin-top: 2px;
}

.pricing-feature-with-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-hint {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.35);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.pricing-hint:hover,
.pricing-feature-with-hint.is-open .pricing-hint {
  border-color: var(--accent);
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
}

.pricing-hint__popup {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 8;
  width: min(280px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: #0f172a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.pricing-hint__popup strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 0.78rem;
}

.pricing-hint__popup ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pricing-hint__popup li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 0.78rem;
}

.pricing-hint__popup code {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.pricing-feature-with-hint.is-open .pricing-hint__popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .pricing-feature-with-hint:hover .pricing-hint__popup {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.pricing-tier__cta {
  margin-top: auto;
}

.admin-card__hint { color: var(--text-muted); margin: -8px 0 16px; }

.plan-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.tiers-editor { display: flex; flex-direction: column; gap: 12px; }

.admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-subtab {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
}

.admin-subtab--active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
}

.ai-seller-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.4fr) minmax(140px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.ai-seller-row--new {
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.4fr) minmax(140px, 1fr) auto;
}

.ai-seller-row__pref {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .ai-seller-row,
  .ai-seller-row--new {
    grid-template-columns: 1fr;
  }
}

.plans-overview {
  margin: 0 0 12px;
}

.plans-overview__table td {
  vertical-align: middle;
}

.plans-overview__id {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.plans-overview__desc {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 42rem;
}

.plans-overview__features {
  display: none;
}

.plans-overview__price {
  display: block;
  font-weight: 600;
}

.plans-overview__old {
  display: block;
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.82rem;
}

.plans-overview__empty {
  color: var(--text-muted);
}

.plans-overview__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  vertical-align: middle;
}

.plans-overview__badge--popular {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
}

.promo-plan-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.promo-plan-group h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.promo-plan-group__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.promo-plan-group__list label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.tier-admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.tier-admin-card summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.tier-admin-card summary::-webkit-details-marker { display: none; }
.tier-admin-card__title { font-weight: 600; }
.tier-admin-card__id { color: var(--text-muted); font-size: 0.85rem; margin-left: 8px; }
.tier-admin-card__meta {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}
.tier-admin-card__prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.tier-admin-card__chip {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  white-space: nowrap;
}

.tier-admin-card__body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-admin-card__json {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.tier-admin-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Новый единый редактор «Уровни»: превью лендинга + полѝ ── */
.tier-edit-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 16px;
}

.tier-edit-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05), transparent);
}

.tier-edit-card__head .tier-admin-card__id {
  margin-left: 0;
}

.tier-edit-card__head input[data-tier-field="name"] {
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 220px;
  max-width: 300px;
}

.tier-edit-card__head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.tier-edit-card__grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.tier-edit-preview {
  align-self: start;
}

.tier-edit-preview .pricing-tier {
  width: 100%;
  pointer-events: auto;
}

.tier-edit-preview .pricing-tier__option--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.tier-edit-preview .pricing-tier__cta,
.tier-edit-preview .pricing-tier__option {
  cursor: default;
}

.tier-edit-preview .pricing-hint {
  cursor: help;
}

.tier-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.3;
}

.feature-chip button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  padding: 0 2px;
  line-height: 1;
}

.feature-chip-add {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tier-edit-card__advanced {
  margin-top: 4px;
}

.tier-edit-card__advanced summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  user-select: none;
}

.tier-edit-card__advanced[open] summary {
  margin-bottom: 12px;
}

.tier-option-add {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.tier-option-add .form-group {
  margin: 0;
}

.tier-options-table {
  margin-top: 10px;
}

.plans-table th,
.plans-table td {
  padding: 8px 10px;
}

.plans-table__id {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.plans-table__tier {
  min-width: 108px;
}

.plans-table__duration .form-input {
  min-width: 108px;
}

.plans-table__custom-days {
  width: 72px;
  margin-top: 4px;
}

.plans-table input[type="number"] {
  max-width: 88px;
}

.plans-table input[data-field="price"],
.plans-table input[data-field="original_price"] {
  min-width: 8.5rem;
  width: 8.5rem;
  max-width: none;
}

.plan-create-grid__price {
  min-width: 10rem;
}

.routing-exceptions { display: flex; flex-direction: column; gap: 12px; }
.routing-exceptions__list { display: flex; flex-wrap: wrap; gap: 8px; }

.routing-rules { display: flex; flex-direction: column; gap: 12px; }
.routing-rules__list { display: flex; flex-direction: column; gap: 8px; }
.routing-rules__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, rgba(255,255,255,0.02));
}
.routing-rules__domain {
  font-weight: 500;
  word-break: break-all;
}
.routing-rules__mode {
  min-width: 170px;
  padding: 8px 10px;
}
.routing-rules__remove {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.routing-rules__remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error, #ef4444);
}
.routing-rules__add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}
.routing-rules__hint { margin: 0; font-size: 0.875rem; }

.split-route__legal {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .routing-rules__row,
  .routing-rules__add {
    grid-template-columns: 1fr;
  }
  .routing-rules__mode {
    min-width: 0;
    width: 100%;
  }
}

.routing-exceptions__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.875rem;
}

.routing-exceptions__tag button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.routing-exceptions__add { display: flex; gap: 8px; }
.routing-exceptions__add .form-input { flex: 1; }

/* ── FAQ ── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

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

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition);
}

.faq-item__question:hover {
  color: var(--accent);
}

.faq-item__icon {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-muted);
}

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

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-item__answer {
  max-height: 400px;
  padding-bottom: 24px;
}

.faq-item__answer p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-item__answer p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-docs {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-docs h3 {
  color: var(--text-primary);
  font-size: 1.0625rem;
  margin: 28px 0 12px;
}

.legal-docs p {
  margin: 0 0 16px;
}

.legal-docs ul {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.legal-docs li {
  margin-bottom: 8px;
}

.legal-docs a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.text-link:hover {
  color: var(--accent-hover, #2563eb);
}

body.privacy-modal-open {
  overflow: hidden;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.privacy-modal.hidden {
  display: none;
}

.privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.privacy-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(85vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.privacy-modal__dialog--wide {
  width: min(980px, 100%);
}

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

.privacy-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.privacy-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.privacy-modal__close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.privacy-modal__body {
  overflow-y: auto;
  padding: 20px 24px 28px;
  max-width: none;
  margin: 0;
}

.privacy-modal__body h3:first-child {
  margin-top: 0;
}

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

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

.footer__copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.footer__contacts a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer__contacts a:hover {
  color: var(--accent);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__social a:hover {
  color: var(--accent);
}

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  /* именно none: любой транѝформ (даже translateY(0)) делает ѝлемент
     ѝодержащим блоком длѝ position: fixed внутри */
  transform: none;
}

/* ── Checkout page ── */
.checkout-page {
  min-height: 100vh;
  padding: calc(var(--top-offset) + 48px) 0 80px;
}

.checkout-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.checkout-card h1 {
  font-size: 1.5rem;
  margin-bottom: 28px;
}

.form-group__legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 0;
}

fieldset.form-group {
  border: none;
  margin: 0 0 20px;
  padding: 0;
  min-width: 0;
}

.checkout-tiers {
  display: grid;
  gap: 10px;
}

.checkout-tier {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.checkout-tier:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.checkout-tier--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.checkout-tier__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  font-size: 1.125rem;
}

.checkout-tier__icon svg {
  width: 22px;
  height: 22px;
  color: #60a5fa;
}

.checkout-tier__body {
  flex: 1;
  min-width: 0;
}

.checkout-tier__name {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
}

.checkout-tier__desc {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Компактнаѝ ѝтрока тарифа (ѝрок выбран выше): имѝ + цена, опиѝание по «?» */
.checkout-tier-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.checkout-tier--compact {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.checkout-tier--compact .checkout-tier__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-tier__price {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9375rem;
}

.checkout-tier__price .price-old {
  font-size: 0.75rem;
  font-weight: 500;
}

.checkout-tier-info {
  flex-shrink: 0;
  width: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.checkout-tier-info:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--text-primary);
}

/* Блок продлениѝ: текущаѝ подпиѝка до даты-времени и три опции ѝтарта */
.renew-block {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.renew-block__intro {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.renew-options {
  display: grid;
  gap: 8px;
}

.renew-option {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.renew-option:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.renew-option--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.renew-option input[type='radio'] {
  flex-shrink: 0;
  accent-color: var(--accent);
}

.renew-option__text {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.renew-option__title {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.renew-option__badge {
  display: block;
  margin-top: 1px;
  font-size: 0.78125rem;
  font-weight: 600;
  color: #60a5fa;
}

.renew-option__desc {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.renew-option__price {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.0625rem;
  white-space: nowrap;
}

.renew-block__note {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Раѝкрывающийѝѝ раѝчёт доплаты — по запроѝу пользователѝ */
.renew-details {
  margin-top: 10px;
}

.renew-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60a5fa;
}

.renew-details__body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.renew-details__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.renew-details__row b {
  color: var(--text-primary);
  text-align: right;
}

.renew-details__row--total {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.renew-details__note {
  margin: 0;
  font-size: 0.78125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkout-durations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.checkout-duration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.checkout-duration:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.checkout-duration--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.checkout-duration__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.checkout-duration__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.checkout-duration__price .price-old {
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0;
}

.checkout-duration__price .price-current {
  color: var(--text-primary);
}

.checkout-picker__loading {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.auto-renew-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-renew-row__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.auto-renew-row__checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.info-tip {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.info-tip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.info-tip__btn:hover,
.info-tip__btn:focus-visible,
.info-tip--open .info-tip__btn {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  outline: none;
}

.info-tip__text {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.25));
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.info-tip__text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.info-tip:hover .info-tip__text,
.info-tip:focus-within .info-tip__text,
.info-tip--open .info-tip__text {
  opacity: 1;
  visibility: visible;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input--error,
.form-input--error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group--error label {
  color: #fca5a5;
}

.form-field-error {
  display: none;
  font-size: 0.8125rem;
  color: #fca5a5;
  margin-top: 6px;
}

.form-group--error .form-field-error {
  display: block;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.order-summary {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9375rem;
}

.order-summary__row--total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.125rem;
}

.order-summary__discount {
  color: var(--success);
}

.promo-row {
  display: flex;
  gap: 12px;
}

.promo-row .form-input {
  flex: 1;
}

.promo-message {
  font-size: 0.8125rem;
  margin-top: 8px;
}

.promo-message--success {
  color: var(--success);
}

.promo-message--error {
  color: #ef4444;
}

.promo-message--warning {
  color: #d97706;
}

.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.alert__title {
  font-weight: 600;
  margin: 0 0 4px;
}

.alert__message {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  opacity: 0.95;
}

.alert--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  animation: alert-shake 0.35s ease;
}

@keyframes alert-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.alert--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert--warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.alert--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

/* ── Admin ── */
.admin-page {
  min-height: 100vh;
  padding: 40px 0 80px;
}

.admin-login {
  max-width: 400px;
  margin: 120px auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.admin-tab {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.admin-tab.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.servers-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.servers-summary__item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.servers-summary__value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.servers-summary__label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.resources-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.resources-item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.resources-item__head strong {
  font-size: 1rem;
  white-space: nowrap;
}

.resources-item__detail {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.resources-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
}

.resources-bar__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.resources-bar__fill--warn {
  background: #f59e0b;
}

.resources-bar__fill--danger {
  background: #ef4444;
}

.servers-alert-input {
  width: 4.5rem;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.servers-latency-chart-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.04), transparent 40%),
    var(--bg-card);
}

.servers-latency-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 280px;
}

.servers-latency-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
}

.servers-latency-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.servers-latency-legend__item:hover {
  color: var(--text-primary);
}

.servers-latency-legend__item--off {
  opacity: 0.45;
  text-decoration: line-through;
}

.servers-latency-legend__reset {
  font: inherit;
  font-size: 0.8rem;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.servers-latency-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.servers-latency-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 160px;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.85rem;
  line-height: 1.35;
}

.ip-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.ip-info-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.ip-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ip-cell .form-input {
  min-width: 0;
}

.ip-info-popup {
  position: fixed;
  z-index: 100;
  width: 320px;
  max-width: calc(100vw - 16px);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.85rem;
  line-height: 1.4;
}

.ip-info-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ip-info-popup__refresh {
  font: inherit;
  font-size: 0.8rem;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
}

.ip-info-popup__body {
  display: grid;
  gap: 2px 0;
}

.ip-info-popup__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
}

.ip-info-popup__row span {
  color: var(--text-muted);
}

.ip-info-popup__row b {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.ip-info-popup__foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ip-info-popup__loading,
.ip-info-popup__error {
  padding: 4px 0;
}

.ip-info-popup__error {
  color: var(--text-danger, #e07070);
}

.retention-chart-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(168, 85, 247, 0.04), transparent 40%),
    var(--bg-card);
}

.retention-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 300px;
  min-width: 520px;
  cursor: crosshair;
}

.retention-cohort-row--active {
  background: rgba(59, 130, 246, 0.08);
  outline: 1px solid var(--border);
}

.retention-pct-btn {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: underline dotted;
}

.retention-pct-btn:hover {
  background: rgba(59, 130, 246, 0.12);
}

.retention-quick {
  display: inline-flex;
  gap: 4px;
}

.retention-quick__btn {
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  cursor: pointer;
}

.retention-quick__btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.retention-cohort-details > td {
  padding: 8px 12px 14px 30px;
  background: rgba(59, 130, 246, 0.04);
  border-bottom: 1px solid var(--border);
}

.retention-cohort-details__head {
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#retention-departed-horizon [data-retention-horizon].retention-horizon-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.retention-departed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.retention-departed__chip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.retention-departed__who {
  font-weight: 600;
}

.retention-departed__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.retention-departed__open {
  margin-left: auto;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.admin-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-status--ok {
  color: var(--success);
}

.admin-status--ok::before {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.admin-status--warn {
  color: #f59e0b;
}

.admin-status--warn::before {
  background: #f59e0b;
}

.admin-status--err {
  color: #ef4444;
}

.admin-status--err::before {
  background: #ef4444;
}

.admin-status--muted {
  color: var(--text-muted);
}

.admin-status--muted::before {
  background: var(--text-muted);
}

.admin-table-link {
  color: var(--accent);
  text-decoration: none;
}

.admin-table-link:hover {
  text-decoration: underline;
}

.admin-table-link--muted {
  color: var(--text-muted);
  word-break: break-all;
}

.admin-table-link--muted:hover {
  color: var(--accent);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 500;
}

.admin-table input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
}

.admin-table-row--clickable {
  cursor: pointer;
}

.admin-table-row--clickable:hover {
  background: rgba(59, 130, 246, 0.08);
}

.admin-email-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  padding: 16px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 50vh;
  overflow: auto;
}

.admin-table-wrap {
  overflow-x: auto;
}

/* Журнал GGsel — 9 колонок: без уплотнениѝ таблица вылезает за край контейнера */
.admin-table--compact th,
.admin-table--compact td {
  padding: 8px 8px;
}

/* Кнопки дейѝтвиѝ — ѝтопкой, чтобы колонка не раѝпирала таблицу по ширине */
.ggsel-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ggsel-actions .btn {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 0.75rem;
}

.admin-page > .container {
  max-width: none;
}

.clients-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.clients-panel__header .analytics-hint {
  margin: 0;
}

.clients-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.clients-filters .form-group {
  margin: 0;
}

.clients-filters__search {
  min-width: 220px;
  flex: 1 1 220px;
}

.clients-filters .form-input {
  min-width: 150px;
}

.clients-filters select.form-input {
  min-width: 130px;
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.clients-empty {
  margin: 0;
  color: var(--text-muted);
}

.clients-empty--inline {
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.clients-table td {
  vertical-align: top;
}

.clients-table td.clients-empty {
  padding: 24px 16px;
}

.clients-row {
  cursor: pointer;
}

.clients-row:hover {
  background: rgba(59, 130, 246, 0.05);
}

.clients-row--expanded {
  background: rgba(59, 130, 246, 0.06);
}

.clients-row--expanded:hover {
  background: rgba(59, 130, 246, 0.09);
}

.clients-row--highlight {
  background: rgba(59, 130, 246, 0.18);
  animation: admin-row-highlight 1.4s ease;
}

.clients-row--highlight:hover {
  background: rgba(59, 130, 246, 0.22);
}

.clients-row__toggle-col {
  width: 34px;
  text-align: center;
  padding-right: 4px;
  padding-left: 4px;
}

.clients-row__caret {
  color: var(--text-muted);
  vertical-align: middle;
  transition: transform 0.15s ease;
}

.clients-row--expanded .clients-row__caret {
  color: var(--accent);
}

.clients-detail td {
  padding: 4px 16px 18px;
  background: color-mix(in srgb, var(--bg-secondary, rgba(255, 255, 255, 0.03)) 55%, transparent);
}

.clients-detail .client-card {
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 14px 0 2px;
}

.clients-table td[data-col="email"] {
  max-width: 260px;
}

/* Narrow columns (address form, Telegram Premium, counters) - compact cells */
.clients-table th.clients-col--narrow,
.clients-table td.clients-col--narrow {
  width: 1%;
  white-space: nowrap;
}

.clients-tbl-email {
  display: block;
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}

.clients-tbl-email--short {
  color: var(--accent);
  text-decoration: underline dotted;
  cursor: pointer;
}

.clients-tbl-email--short.clients-tbl-email--open {
  color: var(--text-primary);
  text-decoration: none;
  cursor: text;
  max-width: none;
  overflow: visible;
  white-space: normal;
  word-break: break-all;
}

.clients-tbl-date {
  white-space: nowrap;
}

.clients-tbl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 550;
  white-space: nowrap;
}

.clients-tbl-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.clients-tbl-badge--active {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
}

.clients-tbl-badge--active::before {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.55);
}

.clients-tbl-badge--expired {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.clients-tbl-badge--expired::before {
  background: #ef4444;
}

.clients-tbl-badge--none {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.14);
}

.clients-tbl-badge--none::before {
  background: var(--text-muted);
}

.clients-tbl-tg {
  white-space: nowrap;
  font-weight: 600;
}

.clients-tbl-premium {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid;
}

.clients-tbl-premium--yes {
  background: rgba(168, 85, 247, 0.14);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

.clients-tbl-premium--no {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.3);
}

.clients-tbl-subs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}

.clients-tbl-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.clients-tbl-sub__name {
  color: var(--text-primary);
  font-weight: 550;
}

.clients-tbl-sub--inactive .clients-tbl-sub__name,
.clients-tbl-sub__meta {
  color: var(--text-muted);
}

.clients-tbl-sub--active .clients-tbl-sub__name {
  color: #16a34a;
}

.clients-tbl-sub__meta {
  font-size: 0.76rem;
}

.clients-tbl-profiles {
  white-space: nowrap;
  color: var(--text-muted);
}

.clients-tbl-money {
  display: block;
  white-space: nowrap;
}

.clients-tbl-money--ggsel {
  color: #8b5cf6;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Сумма с возвратом: исходная перечёркивается, рядом остаток после возвратов */
.clients-tbl-money--refunded {
  color: var(--danger, #e5484d);
  font-weight: 700;
  text-decoration: line-through;
  margin-right: 6px;
}

.clients-tbl-money--remaining {
  font-weight: 600;
}

/* Список заходов в ЛК в карточке клиента */
.client-visits__list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  max-height: 140px;
  overflow: auto;
}

.client-visit {
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.clients-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.clients-pagination__info {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.clients-columns__dropdown {
  position: relative;
}

.clients-columns__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 190px;
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.clients-columns__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.clients-columns__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.clients-columns__item input {
  width: auto;
  margin: 0;
}

.clients-columns__reset {
  width: 100%;
}

.client-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
}

.client-card--highlight {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: rgba(59, 130, 246, 0.16);
  animation: admin-row-highlight 1.4s ease;
}

.client-card__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.client-card__email {
  font-weight: 650;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 6px;
}

.early-bird-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--primary, #3b82f6);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.early-bird-btn img {
  display: block;
  border-radius: 50%;
}

.early-bird-btn:hover,
.early-bird-btn:focus-visible {
  background: color-mix(in srgb, var(--primary, #3b82f6) 12%, transparent);
  transform: scale(1.08);
  outline: none;
}

.account-user-email {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  word-break: break-word;
}

.client-card__flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.client-card__flag {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  padding: 2px 0;
}

.client-card__flag input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary, #3b82f6);
}

.client-card__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.client-card__muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.client-card__section-title {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-subs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

/* Блок «Сайты DNS» в карточке клиента: тариф / перѝонально доѝтупные / ѝвои. */
.client-dns-sites {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.client-dns-sites summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  user-select: none;
}

.client-dns-sites__group {
  margin-top: 12px;
}

.client-dns-sites__label {
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.client-dns-sites .gateway-services {
  margin: 0 0 8px;
}

.client-personal-site-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.client-personal-site-form .form-input {
  max-width: 360px;
}

.gateway-chip--muted {
  opacity: 0.62;
}

.client-sub {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.client-sub--inactive {
  opacity: 0.88;
}

.client-sub__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.client-sub__status {
  font-size: 0.85rem;
}

.client-sub__status--active {
  color: var(--success);
}

.client-sub__status--inactive {
  color: #ef4444;
}

.client-sub__status--paused {
  color: #f59e0b;
  margin-top: 4px;
}

.client-sub__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.client-sub__meta code {
  word-break: break-all;
}

.client-sub__history {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.client-sub__url {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-all;
}

.client-vpn {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.client-orders {
  margin-bottom: 14px;
}

.client-links {
  margin-bottom: 14px;
}

.client-links .client-card__muted {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.client-card__dns-profiles {
  margin: 10px 0 14px;
}

.dns-profiles-token-note {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.dns-profiles-dot-hint {
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.dns-profile {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.dns-profile:last-child {
  border-bottom: none;
}

.dns-profile__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.dns-profile__badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
}

.dns-profile__badge--doh {
  background: #2563eb;
}

.dns-profile__badge--dot {
  background: #ea580c;
}

.dns-profile__badge--neutral {
  background: #64748b;
}

.dns-profile__region {
  font-weight: 600;
}

.dns-profile__status {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dns-profile__status--ok {
  color: var(--success);
}

.dns-profile__status--fail {
  color: #ef4444;
}

/* Вкладка «Профили»: вѝе DoH/DoT-профили пользователей */
.profiles-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profiles-actions .gw-profile-status {
  min-width: 100%;
  word-break: break-word;
}

.profiles-pub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.profiles-kind-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

.up-row--main {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.profiles-user {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.profiles-user__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.profiles-search {
  position: relative;
  display: flex;
  align-items: center;
}

#profiles-search-filter {
  width: 300px;
  padding-right: 34px;
}

.profiles-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.profiles-search__clear:hover {
  color: var(--text-secondary);
}

.profiles-search__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 320px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card, var(--bg-primary));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 4px 0;
}

.profiles-search__group-title {
  padding: 6px 12px 2px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.profiles-search__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.profiles-search__item:hover,
.profiles-search__item.is-active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.profiles-search__item-value {
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
}

.profiles-search__badge {
  flex: none;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}

.profiles-user .admin-table-link {
  white-space: nowrap;
}

.profiles-user__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profiles-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 240px;
  max-width: 420px;
}

.profiles-link__code {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 4px 8px;
  border-radius: 6px;
  word-break: break-all;
}

.profiles-link.is-expanded .profiles-link__code {
  white-space: normal;
  overflow: visible;
}

@media (max-width: 900px) {
  .profiles-link {
    max-width: none;
  }
  .profiles-actions .gw-profile-status {
    min-width: 0;
  }
}

.client-devices {
  margin: 6px 0 14px;
}

.client-device {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.client-device:last-child {
  border-bottom: none;
}

.client-order {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.client-order--paid span {
  color: var(--success);
}

.client-order--muted span {
  color: var(--text-muted);
}

.client-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-card__actions .btn {
  flex: 0 0 auto;
}

.admin-table__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-table__actions .btn {
  flex-shrink: 0;
}

.admin-table__actions .save-plan-btn,
.admin-table__actions .toggle-promo-btn {
  min-width: 7.5rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.admin-card--nested {
  margin-top: 16px;
  padding: 20px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.02));
}

.admin-card h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.clients-panel__header h2 {
  margin-bottom: 4px;
}

#tab-plans .admin-card h2 {
  margin-bottom: 12px;
}

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}

.analytics-toolbar h2 {
  margin-bottom: 0;
}

.analytics-toolbar__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.infra-server-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg-card);
}

.infra-server-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.infra-server-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.infra-server-card__ip {
  font-family: monospace;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px;
}

.infra-grid .form-group {
  margin-bottom: 0;
}

.infra-grid .form-group--wide {
  grid-column: 1 / -1;
}

.infra-secret {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.infra-secret .form-input {
  flex: 1;
  min-width: 0;
}

.infra-secret .btn {
  white-space: nowrap;
}

.infra-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.analytics-toolbar__check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Дашборд «Выручка и подпиѝки по тарифам» */
.revenue-date-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.revenue-date-input {
  width: auto;
}

.revenue-composition {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.revenue-refund-link {
  appearance: none;
  padding: 2px 8px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  color: var(--text-primary, var(--foreground));
  font: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
}

.revenue-refund-link:hover {
  border-color: var(--accent);
  background: rgba(248, 113, 113, 0.2);
}

.revenue-share {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.revenue-share__bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.revenue-share__fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.revenue-total-row td {
  border-top: 2px solid var(--border);
  border-bottom: none;
}

/* Дашборд «Подпиѝки по тарифам»: ѝчейки ѝ активными/иѝтекшими и тултип ѝо ѝпиѝком юзеров */
.subs-table th[colspan] {
  text-align: center;
}

.subs-cell {
  min-width: 118px;
  cursor: help;
  vertical-align: top;
  white-space: nowrap;
}

.subs-table tbody tr:not(.revenue-total-row):hover .subs-cell {
  background: rgba(148, 163, 184, 0.08);
}

.subs-num {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.subs-num:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.subs-num--active {
  color: var(--success);
}

.subs-num--active-soon {
  color: var(--warning);
}

.subs-num--expired-recent {
  color: var(--error, #dc2626);
}

.subs-num--expired {
  color: var(--text-secondary);
}

.subs-num-sep {
  margin: 0 3px;
  color: var(--text-muted);
  opacity: 0.55;
  user-select: none;
}

.subs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.subs-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.subs-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.subs-legend__dot--active {
  background: var(--success);
}

.subs-legend__dot--active-soon {
  background: var(--warning);
}

.subs-legend__dot--expired-recent {
  background: var(--error, #dc2626);
}

.subs-legend__dot--expired {
  background: var(--text-secondary);
}

.subs-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 360px;
  max-height: 45vh;
  overflow-y: auto;
  padding: 10px 12px;
  background: var(--popover, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  color: var(--foreground, var(--text-primary));
  font-size: 0.8125rem;
  line-height: 1.55;
  pointer-events: auto;
}

.subs-tooltip__head {
  font-weight: 700;
  margin-bottom: 6px;
}

.subs-tooltip__row {
  margin: 2px 0;
}

.subs-tooltip__user {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.subs-tooltip__user:hover {
  text-decoration: none;
}

.subs-tooltip__date {
  color: var(--text-muted);
}

.subs-tooltip__more,
.subs-tooltip__hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .subs-tooltip {
    max-width: 260px;
  }
}

.analytics-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.analytics-filter__btn {
  appearance: none;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.analytics-filter__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.analytics-filter__btn.is-active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.dns-multiselect {
  position: relative;
}

.dns-multiselect__trigger {
  appearance: none;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8125rem;
  white-space: nowrap;
  cursor: pointer;
}

.dns-multiselect__trigger:hover,
.dns-multiselect__trigger[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.dns-multiselect__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.dns-multiselect__title {
  padding: 2px 8px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dns-multiselect__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
}

.dns-multiselect__option:hover {
  background: rgba(59, 130, 246, 0.08);
}

.dns-multiselect__option input {
  accent-color: var(--accent);
}

.dns-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.dns-sortable:hover {
  color: var(--accent);
}

.dns-sort-arrow {
  display: inline-block;
  width: 10px;
  margin-left: 4px;
}

.dns-sort-arrow::before {
  content: '\2195';
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dns-sortable.is-sorted-asc .dns-sort-arrow::before {
  content: '\2191';
  color: var(--accent);
}

.dns-sortable.is-sorted-desc .dns-sort-arrow::before {
  content: '\2193';
  color: var(--accent);
}

.dns-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dns-pagination__info {
  margin-right: auto;
}

.dns-pagination__size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dns-pagination__size select {
  width: auto;
  padding: 4px 8px;
}

.dns-resolve-share {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.dns-resolve-share__meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.dns-resolve-share__bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.dns-resolve-share__remap {
  background: var(--accent);
}

.dns-resolve-share__direct {
  background: rgba(148, 163, 184, 0.55);
}

.dns-kind-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dns-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.4;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.dns-kind-pill--catalog {
  border-color: rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
}

.dns-kind-pill--custom {
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
}

.dns-sub-status {
  font-size: 0.85rem;
}

.dns-sub-status--active {
  color: #6ee7b7;
}

.dns-sub-status--expired {
  color: var(--text-muted);
}

.dns-sub-status--leak {
  color: #fca5a5;
}

.proxy-stats-user--leak {
  background: rgba(239, 68, 68, 0.08);
}

.analytics-toolbar__controls label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.analytics-range,
.analytics-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.analytics-summary__item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.analytics-mrr {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.analytics-mrr__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.analytics-mrr__title span {
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.analytics-summary__value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.analytics-summary__count {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: middle;
}

.analytics-summary__label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.analytics-summary__sub {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.analytics-summary__sub--action {
  cursor: pointer;
}

.analytics-summary__sub--action:hover {
  color: var(--text);
  text-decoration: underline;
}

.analytics-funnel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analytics-funnel__step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-funnel__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.analytics-funnel__meta {
  color: var(--text-muted);
  white-space: nowrap;
}

.analytics-funnel__track {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

.analytics-funnel__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  border-radius: 999px;
  min-width: 0;
  transition: width 0.2s ease;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-summary__item--action {
  cursor: pointer;
}

.analytics-summary__item--action:hover,
.analytics-summary__item--open {
  border-color: var(--accent);
}

.analytics-empty {
  color: var(--text-muted);
}

.proxy-stats-user {
  cursor: pointer;
}

.proxy-stats-user:hover,
.proxy-stats-user--open,
.proxy-stats-user--people-open {
  background: var(--bg-secondary);
}

.proxy-stats-user-sites td,
.proxy-stats-user-people td {
  background: var(--bg-secondary);
  padding-top: 8px;
  padding-bottom: 16px;
}

.proxy-stats-sites {
  margin: 0;
  max-width: 640px;
}

.proxy-stats-users-btn,
.proxy-stats-email-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.proxy-stats-users-btn:hover,
.proxy-stats-email-link:hover {
  color: var(--accent-secondary);
}

.proxy-stats-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.proxy-stats-user-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.proxy-stats-user-list__meta {
  color: var(--text-muted);
  font-size: 0.9em;
  flex-shrink: 0;
}

.admin-table-row--highlight {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: rgba(59, 130, 246, 0.16);
  animation: admin-row-highlight 1.4s ease;
}

@keyframes admin-row-highlight {
  from {
    background: rgba(59, 130, 246, 0.42);
  }
  to {
    background: rgba(59, 130, 246, 0.16);
  }
}

.proxy-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proxy-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.proxy-status-pill code {
  font-size: 0.78rem;
}

.proxy-status-pill--ok {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.proxy-status-pill--redirect {
  color: var(--text-muted);
}

.proxy-status-pill--client {
  color: var(--warning, #d97706);
  border-color: color-mix(in srgb, #d97706 35%, var(--border));
  background: color-mix(in srgb, #d97706 10%, transparent);
}

.proxy-status-pill--server {
  color: var(--error, #dc2626);
  border-color: color-mix(in srgb, #dc2626 35%, var(--border));
  background: color-mix(in srgb, #dc2626 10%, transparent);
}

.proxy-status-pill--unknown {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* ── Setup guide ── */
.setup-page {
  min-height: 100vh;
  padding: calc(var(--top-offset) + 48px) 0 80px;
}

.setup-hero {
  text-align: center;
  margin-bottom: 48px;
}

.setup-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.setup-hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

.setup-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.setup-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.setup-toc__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.setup-toc__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-toc__nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all var(--transition);
}

.setup-toc__nav a:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.08);
}

.setup-content {
  min-width: 0;
}

.setup-content--simple {
  max-width: 680px;
  margin: 0 auto;
}

.setup-toc__nav a.is-active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.12);
}

.setup-jump-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.platform-tile--active {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.16);
}

.setup-profile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0 24px;
}

.setup-profile__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.setup-profile .setup-subscription__row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.setup-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: 50%;
  vertical-align: middle;
}

.setup-list {
  margin: 0 0 20px 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.setup-list li {
  margin-bottom: 8px;
}

.setup-muted {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 16px;
}

.platform-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
}

.platform-tile:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.platform-tile__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.platform-tile__icon svg {
  width: 28px;
  height: 28px;
}

.platform-tile__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

.setup-os-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.setup-os-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}

.setup-os-card summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.setup-os-card summary::-webkit-details-marker {
  display: none;
}

.setup-os-card summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.setup-os-card[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.setup-os-card summary:hover {
  background: var(--bg-primary);
}

.setup-os-card .setup-steps {
  margin: 0;
  padding: 0 20px 20px 44px;
}

.setup-os-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.setup-qr-wrap,
.connection-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.setup-qr {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.connection-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.connection-main {
  flex: 1;
  min-width: 260px;
}

.setup-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.setup-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.setup-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 32px 0 16px;
}

.setup-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.setup-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.setup-section code {
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.875em;
  color: var(--accent-secondary);
  overflow-wrap: anywhere;
}

.setup-url-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px 8px;
  background: var(--bg-primary);
  border: 1px dashed rgba(59, 130, 246, 0.45);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: var(--accent-secondary);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.setup-url-chip:hover {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(59, 130, 246, 0.08);
}

.setup-url-chip__url {
  overflow-wrap: anywhere;
}

.setup-url-chip__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.setup-url-chip__icon svg {
  width: 1em;
  height: 1em;
  opacity: 0.7;
}

.setup-url-chip.is-copied {
  border-style: solid;
  border-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
  cursor: default;
}

.setup-steps {
  padding-left: 24px;
  margin-bottom: 24px;
}

.setup-steps li {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

.setup-steps--detailed li {
  margin-bottom: 20px;
}

.setup-steps--detailed li span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.setup-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.setup-diagram__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 180px;
}

.setup-diagram__item strong {
  font-size: 0.9375rem;
}

.setup-diagram__item span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.setup-diagram__icon {
  font-size: 2rem;
}

.setup-diagram__arrow {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.setup-note {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.setup-note--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text-secondary);
}

.setup-note--warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: var(--text-secondary);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.download-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.download-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  color: var(--accent);
}

.download-card h3 {
  font-size: 1.125rem;
  margin: 0 0 8px;
}

.download-card p {
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.setup-subscription {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.setup-subscription__row {
  display: flex;
  gap: 12px;
}

.setup-subscription__row .form-input {
  flex: 1;
  font-size: 0.8125rem;
}

.setup-copy-feedback {
  color: var(--success);
  font-size: 0.8125rem;
  margin-top: 8px;
}

.setup-faq__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.setup-faq__item h3 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.setup-faq__item ul {
  padding-left: 20px;
  margin: 0;
}

.setup-faq__item li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

.setup-support {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.subscription-url-box {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: stretch;
}

.subscription-url-box .form-input {
  flex: 1;
  min-width: 200px;
  font-size: 0.8125rem;
}

.subscription-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.subscription-hint {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 12px;
}

.subscription-hint a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Responsive ── */
@media (min-width: 1280px) {
  .servers-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1200px) {
  .pricing-grid {
    gap: 18px;
  }

  .pricing-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 880px;
    margin: 0 auto;
  }

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

  .pricing-tier {
    padding: 32px 20px 20px;
  }

  .pricing-tier__name {
    font-size: 1.25rem;
  }

  .pricing-tier__price .pricing-card__price {
    font-size: 1.875rem;
  }
}

@media (max-width: 1024px) {
  .servers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .usp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    padding-top: 12px;
  }

  .pricing-tier--popular,
  .pricing-card--popular {
    transform: none;
  }

  .pricing-tier__head {
    min-height: 0;
  }

  .pricing-tier__options,
  .pricing-tier__options--count-2 {
    grid-template-columns: 1fr;
  }

  .plan-create-grid {
    grid-template-columns: 1fr;
  }

  .tier-admin-card summary {
    flex-direction: column;
  }

  .tier-admin-card__prices {
    justify-content: flex-start;
  }

  .tier-edit-card__grid {
    grid-template-columns: 1fr;
  }

  .tier-edit-card__head-actions {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: var(--top-offset);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    padding: 48px 0;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    align-items: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__globe {
    max-width: 320px;
  }

  .split-routing__routes {
    grid-template-columns: 1fr;
  }

  .split-routing__fork-line--left {
    left: 15%;
    transform: rotate(-28deg);
  }

  .split-routing__fork-line--right {
    right: 15%;
    transform: rotate(28deg);
  }

  .split-route__list {
    grid-template-columns: 1fr;
  }

  .split-routing__benefits {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 8px;
  }

  .usp-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .steps--5 {
    grid-template-columns: 1fr;
  }

  .steps::before {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .checkout-card {
    padding: 28px 20px;
  }

  .checkout-durations {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__contacts,
  .footer__links {
    justify-content: center;
  }

  .setup-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .setup-toc {
    position: static;
  }

  .setup-toc__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .setup-subscription__row {
    flex-direction: column;
  }

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .connection-layout {
    flex-direction: column;
  }

  .servers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .server-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .server-item__flag {
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  .server-item__name {
    font-size: 0.8125rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* ── Support widget ── */
.support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
}

.support-widget__toggle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
}

.support-widget__toggle--active {
  transform: scale(0.96);
}

.support-widget__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.support-widget__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 32px));
  height: 520px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-widget__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.support-widget__subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.support-widget__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 8px 0 0;
  font-size: 0.75rem;
}

.support-widget__contacts a {
  color: var(--accent-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.support-widget__contact-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.support-widget__email-form {
  align-self: stretch;
  margin: 4px 0 8px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-widget__email-label {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.support-widget__email-row {
  display: flex;
  gap: 8px;
}

.support-widget__email-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary, transparent);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.support-widget__email-error {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--danger, #e5484d);
}

.support-widget__intro {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.07);
  flex-shrink: 0;
}

.support-widget__intro-title {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.support-widget__intro-input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.875rem;
}

.support-widget__intro-options {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.support-widget__intro-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}

.support-widget__intro-options input {
  accent-color: var(--accent);
}

.support-widget__intro-error {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #ef4444;
}

.support-widget__intro .btn {
  margin-top: 8px;
}

.support-widget__closed {
  margin: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary, rgba(148, 163, 184, 0.12));
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  flex-shrink: 0;
}

.support-widget__contacts a:hover {
  text-decoration: underline;
}

.support-widget__close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.support-widget__notice {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
  font-size: 0.8125rem;
}

.support-widget__messages,
.support-admin-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-widget__empty,
.support-admin-chat__empty {
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 24px 16px;
}

.support-history-ticket {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}

.support-history-ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.support-history-ticket__head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.support-history-ticket__meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.support-history-ticket__messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  max-height: 420px;
  overflow-y: auto;
}

.support-widget__message,
.support-admin-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 85%;
}

.support-widget__message--user,
.support-admin-message--admin {
  align-self: flex-end;
  align-items: flex-end;
}

.support-widget__message--admin,
.support-admin-message--user,
.support-admin-message--system {
  align-self: flex-start;
  align-items: flex-start;
}

.support-admin-message--system .support-widget__bubble {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.support-widget__bubble {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.support-widget__bubble a {
  color: var(--accent);
  text-decoration: underline;
}

.support-widget__message--user .support-widget__bubble,
.support-admin-message--admin .support-widget__bubble {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}

.support-widget__message time,
.support-admin-message time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.support-widget__form,
.support-admin-chat__form {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

/* Ответ на конкретное ѝообщение (reply): чип над полем ввода */
.support-reply-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.support-reply-chip__who {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.support-reply-chip__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-reply-chip__close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 2px;
}

.support-reply-chip.hidden {
  display: none;
}

/* Цитата «в ответ на» внутри пузырѝ */
.support-reply-quote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  padding: 4px 10px;
  border-left: 3px solid rgba(59, 130, 246, 0.6);
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.06);
  overflow: hidden;
}

.support-reply-quote__who {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

.support-reply-quote__text {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Нвтоматичеѝкие ѝообщениѝ: значок робота над пузырём */
.support-msg-auto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  opacity: 0.85;
}

.support-msg-auto svg {
  display: block;
}

/* Кнопка «Ответить» на ѝообщении: поѝвлѝетѝѝ при наведении */
.support-reply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin-left: 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.support-widget__message:hover .support-reply-btn,
.support-admin-message:hover .support-reply-btn,
.support-reply-btn:focus-visible {
  opacity: 1;
}

.support-reply-btn:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

@media (hover: none) {
  .support-reply-btn {
    opacity: 1;
  }
}

.support-widget__input {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.support-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 20px;
  align-items: start;
}

.support-admin-list__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.support-admin-list__head h2 {
  margin: 0;
}

.support-admin-list__head select {
  max-width: 160px;
}

.support-admin-list__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-admin-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.support-admin-subtab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
}

.support-admin-subtab--active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
}

.support-admin-ticket--unread {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.support-admin-system-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: inherit;
  cursor: pointer;
}

.support-admin-system-item--active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
}

.support-admin-system-item--unread {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.support-admin-system-item p {
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-admin-system-item time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.support-admin-system-detail {
  white-space: pre-wrap;
  line-height: 1.5;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.support-compose-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.support-widget__actions,
.support-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.support-widget__actions .btn,
.support-compose-actions .btn--primary {
  margin-left: auto;
}

.support-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.support-attach-btn:hover {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.5);
}

.support-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-media-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.support-media-chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.support-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.support-media__image,
.support-media__video {
  display: block;
  max-width: min(280px, 100%);
  max-height: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  object-fit: contain;
}

.support-media__image {
  cursor: zoom-in;
}

.support-media__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.support-media__actions {
  display: flex;
  gap: 8px;
}

.support-media__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.support-media__action:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.support-media__action svg {
  flex-shrink: 0;
}

.support-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(4px);
}

.support-lightbox.hidden {
  display: none;
}

.support-lightbox__image {
  max-width: min(1100px, 94vw);
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.support-lightbox__close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.support-lightbox__close:hover {
  background: rgba(15, 23, 42, 0.9);
}

.support-lightbox__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 94vw;
}

.support-lightbox__name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-lightbox__download {
  flex-shrink: 0;
}

.support-media__audio {
  width: min(260px, 100%);
}

.support-media__file {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.support-media__file span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.support-media--error {
  opacity: 0.55;
}

.support-nick-copy,
.support-admin-ticket__nick {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7dd3fc;
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
  cursor: pointer;
  font-family: inherit;
}

.support-admin-ticket__nick {
  cursor: pointer;
  border-style: solid;
}

.support-nick-copy:hover {
  background: rgba(56, 189, 248, 0.12);
}

.support-admin-ticket__name {
  flex-wrap: wrap;
}

.support-admin-ticket__name strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-admin-tickets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow-y: auto;
}

.support-admin-ticket {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: inherit;
  cursor: pointer;
}

.support-admin-ticket--active {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
}

.support-admin-ticket__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.support-admin-ticket p {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.support-admin-ticket time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.support-admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.analytics-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.analytics-badge--user {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.analytics-badge--guest {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

.analytics-ua {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.82rem;
}


.support-admin-chat__title-row,
.support-admin-ticket__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.support-admin-channel {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.support-admin-channel--account {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.support-admin-channel--pair {
  background: rgba(250, 204, 21, 0.14);
  color: #fde047;
  border-color: rgba(250, 204, 21, 0.35);
}

.support-admin-channel--name {
  background: rgba(168, 85, 247, 0.14);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

.support-admin-channel--address {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
}

/* «на ты» — тёплый оранжевый */
.support-admin-channel--address-ty {
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.42);
}

/* «на вы» — розово-малиновый */
.support-admin-channel--address-vy {
  background: rgba(236, 72, 153, 0.13);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.35);
}

.support-chat-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
}

.support-chat-link-field {
  position: relative;
  flex: 1 1 200px;
  max-width: 320px;
}

/* Поле «Клиент» в «Новом ѝообщении» — дропдаун ѝ поиѝком по нику/email/имени */
.support-compose-field {
  position: relative;
}

.support-chat-link-field .form-input {
  width: 100%;
  max-width: none;
}

.support-chat-link-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 4px;
}

.support-chat-link-suggest__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.support-chat-link-suggest__item:hover,
.support-chat-link-suggest__item--active {
  background: rgba(59, 130, 246, 0.14);
}

.support-chat-link-suggest__email {
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.support-chat-link-suggest__name {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.support-chat-link-hint {
  margin: -4px 0 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.support-notify-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.support-admin-ticket__email,
a.support-admin-ticket__email {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.support-admin-ticket__email:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.support-admin-chat {
  height: calc(100dvh - 230px);
  min-height: 360px;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-admin-chat__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* Нктивный чат и композер занимают вѝю выѝоту карточки: перепиѝка целиком
   помещаетѝѝ в ѝкран, а ѝкролл оѝтаётѝѝ только внутри ѝпиѝка ѝообщений */
.support-admin-chat > #support-chat-active,
.support-admin-chat > #support-chat-compose,
.support-admin-chat > #support-chat-empty {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.support-widget__messages,
.support-admin-chat__messages {
  min-height: 0;
}

.support-message-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.support-message-meta time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-msg-state {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  cursor: pointer;
}

.support-msg-status {
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text-muted);
  letter-spacing: -1px;
}

.support-msg-state--read .support-msg-status {
  color: #53bdeb;
}

.support-msg-read-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.support-msg-delivered-time {
  opacity: 0.8;
}

.support-msg-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  padding: 8px 10px;
  background: rgba(10, 14, 23, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: nowrap;
  pointer-events: none;
}

.support-msg-tooltip.hidden {
  display: none;
}

.support-admin-ticket__user {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-admin-ticket__user:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.client-info-modal__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-info-modal__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.client-info-modal__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.client-info-modal__key {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.client-info-modal__value {
  text-align: right;
  word-break: break-word;
  font-weight: 600;
}

.client-info-modal__value a {
  color: var(--accent);
  text-decoration: none;
}

.client-info-modal__value a:hover {
  text-decoration: underline;
}

.client-info-section {
  margin-top: 18px;
}

.client-info-section .client-card__section-title {
  margin-bottom: 10px;
}

.client-info-modal__loading {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.client-info-modal__value .client-card__muted {
  font-weight: 500;
}

.support-admin-chat__title--link {
  cursor: pointer;
  color: var(--accent);
  border-bottom: 1px dashed rgba(59, 130, 246, 0.4);
}

.support-admin-chat__title--link:hover {
  border-bottom-style: solid;
}

.support-system-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}

.support-system-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.support-system-detail {
  min-height: 160px;
}

.support-system-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.support-system-detail__head time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .support-system-layout {
    grid-template-columns: 1fr;
  }

  .support-system-list {
    max-height: 40vh;
  }
}

@media (max-width: 768px) {
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 20px;
    padding-bottom: 2px;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .support-admin-chat__head,
  .support-admin-list__head {
    flex-wrap: wrap;
  }

  .support-admin-chat__title-row {
    flex-wrap: wrap;
  }

  .support-admin-message {
    max-width: 92%;
  }

  /* «Обращениѝ» на телефоне: компактные карточки и меньше меѝта под ѝпиѝок,
     чтобы и ѝпиѝок, и чат ѝ композером помещалиѝь на ѝкран */
  .support-admin-tickets {
    max-height: 26vh;
    gap: 6px;
  }

  .support-admin-ticket {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .support-admin-ticket__top {
    margin-bottom: 2px;
  }

  .support-admin-ticket__name {
    gap: 4px;
  }

  .support-admin-ticket p {
    margin: 0 0 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.8125rem;
  }

  .support-admin-ticket time {
    font-size: 0.6875rem;
  }

  .support-admin-list__head {
    margin-bottom: 10px;
  }
}

@media (max-width: 960px) {
  .support-admin-layout {
    grid-template-columns: 1fr;
  }

  .support-admin-chat {
    height: calc(100dvh - 190px);
    min-height: 380px;
    max-height: none;
  }

  .support-admin-tickets {
    max-height: 34vh;
  }

  .support-widget__panel {
    height: min(70vh, 520px);
  }
}

@media (max-width: 560px) {
  .support-admin-chat {
    height: calc(100dvh - 170px);
    min-height: 340px;
  }

  .support-admin-chat__messages {
    padding: 12px;
  }

  .support-widget__form,
  .support-admin-chat__form {
    padding: 10px;
    gap: 8px;
  }

  .support-compose-actions {
    gap: 6px;
  }
}

.activation-spinner {
  width: 40px;
  height: 40px;
  margin: 32px auto 0;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent, #3b82f6);
  border-radius: 50%;
  animation: activation-spin 0.8s linear infinite;
}

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

.proxy-admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.92rem;
}

.proxy-plan-group {
  margin-top: 24px;
}

.proxy-plan-group:first-child {
  margin-top: 8px;
}

.proxy-plan-group__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

/* Единый чип ѝайтов: «Доѝтупные на тарифе» и «Свои ѝайты» выглѝдѝт одинаково. */
.gateway-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

a.gateway-chip {
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

a.gateway-chip:hover {
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.45);
}

.gateway-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.gateway-chip__remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.gateway-custom-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.gateway-custom-form .form-input {
  flex: 1;
  min-width: 180px;
}

#doh-paused-hint {
  color: #f59e0b;
}

.gateway-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

a.gateway-service-link {
  flex-direction: row;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

a.gateway-service-link:hover {
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.45);
}

.gateway-service-mode {
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: lowercase;
}

.gateway-service-mode {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

/* ── Landing ── */
.landing .hero--landing {
  min-height: 100svh;
  padding: var(--top-offset) 0 72px;
}

.landing .hero__title {
  font-size: clamp(2.15rem, 4.6vw, 3.4rem);
}

.landing .hero__subtitle {
  max-width: 34em;
  font-size: 1.125rem;
  margin-bottom: 32px;
}

.landing .hero__actions {
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.landing .hero__visual {
  align-items: stretch;
  pointer-events: none;
  user-select: none;
  padding: 20px 12px 28px 0;
}

.landing-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 999px;
}

.landing-stage {
  position: relative;
  min-height: 380px;
  max-width: 520px;
  margin-left: auto;
  perspective: 1400px;
}

.landing-window {
  background: #121826;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.landing-window__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0d121c;
  border-bottom: 1px solid var(--border);
}

.landing-window__dots {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 16px 0 0 #fbbf24, 32px 0 0 #4ade80;
  margin-right: 36px;
  flex-shrink: 0;
}

.landing-window__url {
  flex: 1;
  min-width: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #1a2234;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.landing-window__url--ok {
  color: #86efac;
}

.landing-window__error {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 48px 28px 56px;
  color: var(--text-muted);
}

.landing-window__error strong {
  color: #e2e8f0;
  font-size: 1.05rem;
  font-weight: 600;
}

.landing-window--down {
  transform: rotateY(-18deg) rotateX(8deg) rotate(-7deg);
  transform-origin: left center;
  opacity: 0.72;
  margin-right: 40px;
}

.landing-window--up {
  position: absolute;
  right: -4px;
  bottom: -10px;
  width: 90%;
  transform: rotateY(-12deg) rotateX(6deg) rotate(3.5deg);
  transform-origin: right bottom;
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(34, 197, 94, 0.12);
}

.landing-window__ok {
  min-height: 220px;
  padding: 28px 24px 32px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(59, 130, 246, 0.12), transparent 70%),
    #121826;
}

.landing-window__ok-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.landing-window__chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-window__msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 12px 12px 12px 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
}

.landing-window__msg--user {
  align-self: flex-end;
  max-width: 78%;
  border-radius: 12px 12px 4px 12px;
  background: rgba(59, 130, 246, 0.22);
  color: #dbeafe;
}

.landing-services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: -12px 0 48px;
}

.landing-service {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 18px 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.landing-service__host {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.landing-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.landing-flow li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.landing-flow__n {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.9375rem;
}

.landing-flow strong {
  display: block;
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

.landing-flow p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.landing-how-note {
  text-align: center;
  margin: 40px auto 0;
  max-width: 560px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-how-cta {
  text-align: center;
  margin: 20px auto 0;
}

.landing-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.landing-benefit {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.landing-benefit:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.landing-benefit__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.landing-benefit h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.landing-benefit p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.landing .section--compact {
  padding: 80px 0;
}

.landing .section__subtitle {
  max-width: 640px;
}

.landing .container--narrow {
  max-width: 760px;
}

@media (max-width: 768px) {
  .landing .hero--landing {
    min-height: 0;
    padding-bottom: 56px;
  }

  .landing .hero__content {
    text-align: left;
  }

  .landing .hero__subtitle {
    margin-left: 0;
    margin-right: 0;
  }

  .landing .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-stage {
    min-height: 320px;
    margin: 0 auto;
  }

  .landing-window--down {
    margin-right: 20px;
    transform: rotateY(-10deg) rotateX(4deg) rotate(-5deg);
  }

  .landing-window--up {
    right: 0;
    transform: rotateY(-8deg) rotateX(3deg) rotate(2.5deg);
  }

  .landing-flow {
    grid-template-columns: 1fr;
  }

  .landing-benefits {
    grid-template-columns: 1fr;
  }
}

/* Admin: активноѝть юзеров (VPN/DNS usage) */
.usage-table th,
.usage-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.usage-table .proxy-stats-email-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.usage-table .proxy-stats-email-link:hover {
  text-decoration: underline;
}

.usage-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Подѝтрока ѝ DNS-трафиком (вх/иѝх) под ѝчётчиком запроѝов */
.usage-cell-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
}

.usage-mode {
  margin: 6px 0 14px;
}

.usage-cell--zero,
.usage-cell--nodata {
  color: var(--text-muted);
}

.usage-row--idle {
  background: rgba(245, 158, 11, 0.07);
}

.usage-row--idle .proxy-stats-email-link {
  color: #fbbf24;
}

.usage-filter-label {
  display: block;
  min-height: 18px;
}

/* ===== Страница проверки DNS (/check) и уѝтановка одной командой ===== */

.check-card .check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.check-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.check-card .check-row:last-of-type {
  border-bottom: none;
}

.check-row__label {
  color: var(--text-secondary);
  font-size: 0.925rem;
}

.check-row__value {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.check-card .check-row__value {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.check-row__sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: normal;
}

.check-zones-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.check-zones-table th,
.check-zones-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.check-zones-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.check-zones-table td:last-child {
  padding-right: 0;
}

.check-zones-table .check-badge {
  font-size: 0.8rem;
  padding: 3px 10px;
  white-space: normal;
}

.check-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.check-card .check-badge {
  white-space: normal;
  text-align: right;
}

.check-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--text-muted);
}

.check-badge--pending {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.12);
}

.check-badge--ok {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
}

.check-badge--ok::before {
  background: var(--success);
}

.check-badge--fail {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.check-badge--fail::before {
  background: #ef4444;
}

.check-badge--warn {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.check-badge--warn::before {
  background: #f59e0b;
}

.check-badge--unknown {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.12);
}

.check-verdict__box {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.check-verdict__box h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.check-verdict__box p {
  margin: 0;
  color: var(--text-secondary);
}

.check-verdict__box--ok {
  border-color: rgba(34, 197, 94, 0.35);
}

.check-verdict__box--warn {
  border-color: rgba(245, 158, 11, 0.35);
}

.check-verdict__box--fail {
  border-color: rgba(239, 68, 68, 0.35);
}

.check-hints {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.check-hints li {
  margin-bottom: 6px;
}

/* Команда уѝтановки одним дейѝтвием (кабинет + setup) */
.cmd-box {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 12px 0;
}

.cmd-box__code {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 130px;
  overflow-y: auto;
}

.cmd-box__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  white-space: nowrap;
}

.cmd-box__copy svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .cmd-box {
    flex-direction: column;
  }

  .cmd-box__copy {
    align-self: stretch;
    justify-content: center;
  }
}

/* Статуѝ проверки в модалке автонаѝтройки Windows 11 (кабинет) */
.autosetup-status-block {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.autosetup-status {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.autosetup-progress {
  width: 100%;
  max-width: 320px;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
}

.autosetup-progress__fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.autosetup-status-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Ндминка: новоѝти длѝ Telegram-канала --- */
.news-admin-card {
  margin-top: 10px;
}

.news-admin-card--off {
  opacity: 0.55;
}

.news-admin-card summary {
  align-items: center;
}

.news-admin-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.news-admin-card__head-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.news-admin-card__date {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.news-admin-thumb {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  flex-shrink: 0;
}

.news-admin-thumb--empty {
  background: rgba(148, 163, 184, 0.08);
}

.news-admin-card__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.news-form-grid {
  display: grid;
  grid-template-columns: 170px minmax(220px, 1fr) 220px auto;
  gap: 10px;
  align-items: end;
}

/* --- Ндминка: ѝообщениѝ пользователѝм --- */
.msg-kind-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.msg-kind-chip--warning {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
}

.msg-kind-chip--announcement {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.msg-kind-chip--info {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.msg-admin-card {
  margin-top: 10px;
}

.msg-admin-card--off {
  opacity: 0.55;
}

.msg-admin-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.msg-admin-card__text {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.msg-admin-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.msg-admin-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 0.85rem;
}

.msg-admin-card__stats b {
  font-weight: 600;
}

.msg-admin-card__audience {
  color: var(--text-secondary);
}

.msg-admin-events {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 0.85rem;
}

.msg-admin-events table {
  width: 100%;
  border-collapse: collapse;
}

.msg-admin-events th,
.msg-admin-events td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.msg-admin-events th {
  color: var(--text-muted);
  font-weight: 600;
}

.support-email-settings-grid {
  display: grid;
  grid-template-columns: 220px 220px auto;
  gap: 10px;
  align-items: end;
  max-width: 720px;
}

@media (max-width: 700px) {
  .support-email-settings-grid {
    grid-template-columns: 1fr;
  }
}

.app-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  align-items: start;
  margin-top: 12px;
}

.app-settings-grid .form-group--wide {
  grid-column: 1 / -1;
}

.app-settings-grid .form-input.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.app-settings-source {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted, #8a94a6);
  white-space: nowrap;
}

.app-settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .app-settings-grid {
    grid-template-columns: 1fr;
  }
}

.news-enabled-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  padding: 9px 0;
  white-space: nowrap;
}

.news-enabled-label input {
  width: 18px;
  height: 18px;
}

.plans-overview__badge--off {
  border-color: rgba(245, 158, 11, 0.45);
  color: #f59e0b;
}

@media (max-width: 900px) {
  .news-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-admin-card__actions {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* Наѝтройки локаций DNS-ѝерверов (маѝка → ѝтрана/город) */
.dns-locations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dns-location-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) 200px minmax(140px, 0.8fr) 28px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
}

.dns-location-row__flag {
  display: inline-flex;
  align-items: center;
  font-size: 1.125rem;
  line-height: 1;
  text-align: center;
}

@media (max-width: 860px) {
  .dns-location-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .dns-location-row {
    grid-template-columns: 1fr;
  }
}

/* ── Setup: лаконичнаѝ верѝиѝ (2026-10) ── */
.setup-content--wide {
  max-width: 860px;
}

.setup-chipnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 40px;
}

.setup-chipnav__item {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.setup-chipnav__item:hover,
.setup-chipnav__item.is-active {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.08);
}

.setup-addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}

.setup-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.setup-address .url-flag {
  margin-top: 1px;
}

.setup-address__text {
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.setup-address__text .setup-muted {
  margin-top: 2px;
  font-size: 0.8125rem;
}

.proto-tip {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.proto-tip__body {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(300px, 80vw);
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-primary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.proto-tip:hover .proto-tip__body,
.proto-tip__btn:focus-visible ~ .proto-tip__body,
.proto-tip:focus-within .proto-tip__body {
  display: block;
}

.setup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.setup-card h3 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.setup-card .setup-steps {
  margin-bottom: 8px;
}

.setup-card .setup-note {
  margin-top: 8px;
}

.setup-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}

.setup-faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.setup-faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.setup-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.setup-faq-item > ul,
.setup-faq-item > ol {
  margin: 0 16px 14px 36px;
}

.setup-faq-item > p {
  margin: 0 16px 14px;
}

.setup-faq-item > .setup-faq-share {
  margin-top: -4px;
  font-size: 0.8125rem;
}

.setup-faq-share a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}

.setup-faq-share a:hover {
  color: var(--accent-secondary);
  border-bottom-style: solid;
}

.setup-check {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 16px;
  margin: 8px 0 20px;
}

.setup-check__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}

.setup-check__icon svg {
  width: 24px;
  height: 24px;
}

.setup-check__text {
  flex: 1;
  min-width: 200px;
}

.setup-check__text .setup-muted {
  margin: 3px 0 0;
}

.setup-check__btn {
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .setup-check {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .setup-check__icon {
    margin: 0 auto;
  }

  .setup-check__btn {
    width: 100%;
    justify-content: center;
  }
}

/* Тоѝты «Переходим на ѝайт партнёра» (карточки нейроѝетей) */
.ai-partner-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ai-partner-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.ai-partner-toast__spinner {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  border-top-color: transparent;
  animation: ai-partner-spin 0.8s linear infinite;
}

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

@media (max-width: 560px) {
  .ai-partner-toast {
    bottom: 16px;
    font-size: 0.875rem;
  }
}

/* --- Прототип новой тарификации: характериѝтики, регионы, завиѝимоѝти --- */

.char-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.char-cell .char-num,
.char-cell .char-select {
  min-width: 110px;
  width: 110px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.char-multi {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.char-reset {
  margin-left: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  border-radius: 6px;
}

.char-reset:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.region-editor-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.region-editor-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.region-editor-card__head .region-name-input {
  max-width: 220px;
}

.dep-service {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.dep-service__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.dep-service__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dep-service__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dep-service__actions .form-input {
  max-width: 320px;
}

.flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  flex: none;
}

.char-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.char-chips .gateway-chip {
  padding: 3px 9px;
  font-size: 0.8125rem;
}

.char-chips-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.char-chips-add .char-select {
  min-width: 130px;
  width: 130px;
  padding: 4px 6px;
  font-size: 0.8125rem;
}

/* Скролл матрицы характериѝтик: липкаѝ шапка и колонка «Тариф» */
.characteristics-scroll {
  max-height: 640px;
  overflow: auto;
}

.characteristics-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
  box-shadow: 0 1px 0 var(--border);
}

.characteristics-scroll td:first-child,
.characteristics-scroll th:first-child {
  position: sticky;
  left: 0;
  background: var(--bg-card);
}

.characteristics-scroll td:first-child {
  z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}

.characteristics-scroll thead th:first-child {
  z-index: 3;
}

.admin-pager-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 10px;
}

.admin-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-pager__hint {
  margin-left: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Чип ѝтраны ѝ флагом */
.char-chips .gateway-chip .flag-icon {
  width: 16px;
  height: 12px;
}

.plan-flags {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 8px;
}

.plan-flags .flag-icon {
  width: 26px;
  height: 19px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform var(--transition, 0.15s);
}

.plan-flags .flag-icon:hover {
  transform: translateY(-2px);
}

.plan-flags__tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  min-width: 190px;
  max-width: 260px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  white-space: normal;
  text-align: left;
}

.plan-flags__tooltip b {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.plan-flags__tooltip > span {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.plan-flags:hover .plan-flags__tooltip,
.plan-flags:focus .plan-flags__tooltip,
.plan-flags:focus-within .plan-flags__tooltip,
.plan-flags.is-open .plan-flags__tooltip {
  display: block;
}

/* ── Рейтинг и ѝмена ѝерверов региона (единый DoH/DoT-хоѝт) ── */

.dns-server-block {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dns-server-pill-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dns-server-pill {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
  cursor: pointer;
  line-height: 1.3;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.dns-server-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Unified-профили кабинета (до 5 DoH / 5 DoT) */

.unified-profiles-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.unified-profile-row {
  /* Рѝды в ѝтиле доп. DNS-профилей: единаѝ ѝтрока ѝ копированием, QR и
     дейѝтвиѝми; бордеры/карточки не нужны. */
  align-items: center;
}

.unified-profile-row__pub {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.unified-profile-row__region {
  font-size: 0.82rem;
  font-weight: 600;
}

.unified-profile-row__status {
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1em;
}

.unified-profile-row__status.is-checking {
  color: var(--accent);
  animation: server-state-pulse 1.2s ease-in-out infinite;
}

/* «?» у IP в результате проверки/ѝинхронизации профилѝ: раѝкрывает
   диагноѝтику (какой ѝервер ответил, какой ожидалѝѝ). */
.check-status-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 2px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.66rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  vertical-align: 1px;
  opacity: 0.75;
}

.check-status-help:hover,
.check-status-help.is-open {
  opacity: 1;
}

.check-status-details {
  display: block;
  margin-top: 4px;
  opacity: 0.9;
}

.check-status-details__row {
  display: block;
  margin-top: 2px;
}

.dns-server-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.dns-server-state--syncing {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.dns-server-state--syncing::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(180, 83, 9, 0.35);
  border-top-color: #b45309;
  animation: server-state-spin 0.8s linear infinite;
}

.dns-server-state--failed {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.dns-server-pill-wrap.is-syncing .dns-server-pill,
.unified-profile-row.is-syncing .dns-server-pill {
  border-color: rgba(245, 158, 11, 0.65);
  animation: server-pill-pulse 1.6s ease-in-out infinite;
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0.75;
}

.btn.is-loading::before {
  content: '';
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: server-state-spin 0.8s linear infinite;
}

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

@keyframes server-state-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes server-pill-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dns-server-state--syncing::before,
  .dns-server-switch-state--syncing::before,
  .btn.is-loading::before,
  .unified-profile-row__status.is-checking,
  .dns-server-pill-wrap.is-syncing .dns-server-pill,
  .unified-profile-row.is-syncing .dns-server-pill {
    animation: none;
  }
}

.server-stats-table {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.85rem;
}

.server-stats-table__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.server-stats-table__row > span:first-child {
  min-width: 90px;
  color: var(--text-muted);
}

.server-stats-table__row .ok,
.server-stat-row .ok {
  color: var(--success);
}

.server-stats-table__row .bad,
.server-stat-row .bad {
  color: #ef4444;
}

.server-stats-table__row .server-stat-reasons,
.server-stats-table__row .server-stat-comments {
  flex-basis: 100%;
  margin-top: 2px;
}

.server-stats-by-target {
  display: grid;
  gap: 8px;
}

.server-stat-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.server-stat-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.server-target-status {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.server-target-status--ok {
  color: var(--success);
  background: rgba(34, 197, 94, 0.14);
}

.server-target-status--bad {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.server-target-status--none {
  color: var(--text-muted);
  background: rgba(100, 116, 139, 0.14);
}

.server-stat-row__counts {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.server-stat-reasons {
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #ef4444;
}

.server-stat-comments {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.server-stat-comment {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.server-stat-comment__text {
  color: var(--text-primary);
}

.server-stat-comment__time {
  white-space: nowrap;
}

.server-stat-row__vote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.server-my-vote {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.server-vote-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.server-vote-form__fields {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.server-vote-form__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.server-switch-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.server-switch-option {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.server-switch-option--pick {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--border);
  font-family: inherit;
  cursor: pointer;
  flex-direction: column;
  align-items: stretch;
}

.server-switch-option:hover {
  border-color: var(--accent);
}

.server-switch-option--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.server-switch-option--locked {
  opacity: 0.55;
  cursor: not-allowed;
  flex-direction: column;
  align-items: stretch;
}

.server-switch-option__name {
  font-weight: 600;
}

.server-switch-option__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.server-switch-option__flag {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.server-switch-option__flag .flag-img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.server-switch-option__city {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85em;
}

.server-switch-option__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.server-reviews {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.server-reviews__windows {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.server-reviews__win {
  white-space: nowrap;
}

.server-reviews .server-reviews-ok {
  color: var(--success);
  font-weight: 700;
}

.server-reviews .server-reviews-bad {
  color: var(--destructive, #ef4444);
  font-weight: 700;
}

.server-reviews__svcs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-reviews__svc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.server-reviews__svc-name {
  color: var(--text-muted);
  min-width: 92px;
}

.server-switch-error {
  color: #ef4444;
}

/* Ндминка: ѝерверы в карточке клиента */

.dns-server-row__lines {
  display: grid;
  gap: 4px;
  margin: 6px 0 0 34px;
}

.dns-server-row__line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.dns-server-row__name {
  min-width: 90px;
  font-weight: 600;
}

.dns-server-row__ip {
  font-family: monospace;
  color: var(--text-secondary);
}

.dns-server-row__votes {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.dns-server-row__grant {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.dns-server-switch-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 999px;
}

.dns-server-switch-state--syncing {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.dns-server-switch-state--syncing::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(180, 83, 9, 0.35);
  border-top-color: #b45309;
  animation: server-state-spin 0.8s linear infinite;
}

.dns-server-switch-state--failed {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.dns-server-switch-state--ready {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

/* Профиль ѝѝылки приоѝтановлен юзером/админом (enabled=0): намеренное
   ѝоѝтоѝние, не ошибка — ѝнтарный, без краѝного. */
.dns-server-switch-state--paused {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

/* Ндминка: маппинг ѝерверов инфраѝтруктуры → регионы DoH */

.gateway-regions-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
}

.gateway-regions-summary-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.gateway-regions-badge {
  font-size: 0.72rem;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(128, 128, 128, 0.12);
}

.gateway-regions-badge--ok {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.gateway-region-card {
  margin-bottom: 14px;
}

.gateway-region-card__fields {
  margin: 10px 0 2px 34px;
}

.gateway-region-card__fields .form-group {
  margin-bottom: 0;
}

.gateway-region-card__servers {
  margin-top: 10px;
}

.gateway-region-card__servers .analytics-toolbar {
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 10px;
}

.gateway-region-card__servers .analytics-toolbar h3 {
  margin: 0;
}

.gateway-regions-card-controls {
  margin-left: auto;
}

.gateway-region-server-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.1fr) minmax(90px, 0.7fr) 58px minmax(150px, 1.4fr) 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.gateway-region-server-row .form-input {
  height: 34px;
  width: 100%;
}

.gateway-region-server-row .analytics-toolbar__check {
  white-space: nowrap;
  font-size: 0.85rem;
}

.app-settings-gateway-regions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-settings-gateway-regions .admin-card__hint {
  margin: 0;
}

.app-settings-gateway-allowed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-settings-radio-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.app-settings-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}

.app-settings-radio--indent {
  display: flex;
  margin: 3px 0 3px 16px;
}

.app-settings-gateway-allowed__region {
  margin-top: 6px;
}

.app-settings-gateway-allowed__region-title {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .gateway-region-server-row {
    grid-template-columns: 1fr 1fr;
  }
  .gateway-region-server-row [data-server-remove] {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.server-votes-popup {
  width: 380px;
  max-width: calc(100vw - 24px);
}

.server-votes-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.server-votes-row:last-child {
  border-bottom: none;
}

.server-votes-row--ok {
  color: var(--text-secondary);
}

.server-votes-row--bad {
  color: #ef4444;
}

.tier-warn {
  color: #b45309;
  font-size: 0.75rem;
  margin-left: 8px;
  white-space: nowrap;
}

.char-servers-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  max-width: 640px;
}

.tier-server-tree {
  margin: 6px 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tier-server-tree summary {
  cursor: pointer;
  user-select: none;
}

.ip-info-popup__close {
  margin-left: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

/* ── Ндминка: вкладка «Отзывы ѝерверов» ────────────────────────────────── */

.server-ratings-root {
  display: grid;
  gap: 16px;
}

.server-ratings-region {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 14px 16px;
}

.server-ratings-region__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.server-ratings-region__title {
  font-weight: 600;
  font-size: 0.95rem;
}

.server-ratings-region__count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.server-ratings-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 1100px) {
  .server-ratings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.server-ratings-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  padding: 12px 14px;
  min-width: 0;
}

.server-ratings-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.server-ratings-card__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.server-ratings-card__ip {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

.server-ratings-card__state {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.server-ratings-card__state--on {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.server-ratings-card__state--off {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.server-ratings-totals {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.server-ratings-window {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.server-ratings-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.server-ratings-pill--ok {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.server-ratings-pill--bad {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.server-ratings-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}

.server-ratings-cat {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}

.server-ratings-targets {
  display: grid;
  gap: 8px;
}

.server-ratings-target {
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(10, 14, 23, 0.35);
}

.server-ratings-target__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-ratings-target__name {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 118px;
}

.server-ratings-target .server-ratings-cats {
  margin: 6px 0 0;
}

.server-ratings-pill[data-votes-key] {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.server-ratings-pill[data-votes-key]:hover {
  filter: brightness(1.12);
}

.server-ratings-tip {
  position: fixed;
  z-index: 110;
  width: 300px;
  max-width: calc(100vw - 16px);
  max-height: 40vh;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.8rem;
  line-height: 1.35;
}

.server-ratings-tip__head {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.server-ratings-tip__body {
  display: grid;
  gap: 4px;
}

.server-ratings-tip__row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-ratings-tip__row b {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Личный кабинет: мобильный редизайн (компактнаѝ шапка, ѝтатуѝ подпиѝки,
      профили-уѝтройѝтва, короткие ѝѝылки) ── */

/* Компактнаѝ шапка на ѝтранице кабинета: больше полезного проѝтранѝтва. */
body.account-page {
  --header-height: 58px;
}

body.account-page .logo {
  font-size: 1.1rem;
}

body.account-page .logo__icon {
  width: 30px;
  height: 30px;
}

/* В шапке кабинета ѝѝылку-кабинет не показываем: вмеѝто неё email и «Выйти» (.account-user). */
body.account-page #auth-nav-link {
  display: none;
}

@media (max-width: 640px) {
  body.account-page {
    --header-height: 52px;
  }

}

/* Кабинет: email и выход переехали в ѝтроку шапки header__inner. */
.account-user {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.account-user:not([hidden]) {
  display: inline-flex;
}

.account-user__email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.account-user__email::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  flex: none;
}

.account-user__logout {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.08);
  color: #fda4af;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.account-user__logout svg {
  width: 18px;
  height: 18px;
}

.account-user__logout:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fda4af;
}

/* «Выйти» внутри мобильного бургер-меню кабинета. */
.nav__logout {
  display: none;
  padding: 0;
  font-family: inherit;
  font-weight: 600;
  color: #fda4af;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .account-user__logout {
    display: none;
  }

  .account-user__email {
    max-width: 42vw;
  }

  .nav .nav__logout:not([hidden]) {
    display: inline-flex;
  }
}

/* Опиѝание тарифа под названием плана (что входит в DNS). */
.account-plan-desc {
  margin: -2px 0 8px;
  max-width: 520px;
}

.account-plan-desc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.account-plan-desc__list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-plan-desc__list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* Иконка браузера (цветнаѝ плашка) внутри карточки уѝтройѝтва. */
.device-icon--browser svg {
  width: 26px;
  height: 26px;
}

/* Отзывы ѝервера: компактнее, вердикты — лайк/дизлайк. */
.server-stat-row {
  padding: 8px 4px;
}

.server-stat-row__head {
  gap: 8px;
}

.server-stat-row__counts .ok {
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.server-stat-row__counts .bad {
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.server-vote--thumb {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.server-vote--thumb svg {
  width: 16px;
  height: 16px;
}

.server-vote--up:hover {
  border-color: rgba(34, 197, 94, 0.6);
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}

.server-vote--down:hover {
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.server-my-vote {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.server-my-vote .bad {
  color: #ef4444;
  display: inline-flex;
}

.server-my-vote .ok {
  color: var(--success);
  display: inline-flex;
}

/* ── Кабинет: уѝтройѝтва внутри DNS, компактные карточки ── */

.dns-devices-block {
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

/* Одноѝтрочнаѝ карточка уѝтройѝтва: иконка, ѝервер, ѝѝылка, дейѝтвиѝ. */
.device-card--row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.device-card--row .device-card__icon-btn {
  flex: none;
}

.device-card--row .dns-server-pill {
  max-width: 200px;
}

.device-card--row .setup-url-chip {
  flex: 0 1 auto;
  min-width: 150px;
  padding: 7px 10px;
  font-size: 0.75rem;
}

.device-card--row .setup-url-chip__url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card--row .btn--qr {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.device-card--row .unified-profile-sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.device-card__download {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.device-card__download svg {
  width: 15px;
  height: 15px;
}

.device-card__download:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Сѝылка-чип до первой ѝинхронизации: ѝкопировать нельзѝ. */
.unified-profile-copy.is-unchecked {
  opacity: 0.55;
  cursor: not-allowed;
}

.unified-profile-copy.is-unchecked .setup-url-chip__icon {
  opacity: 0.4;
}

/* Модалка удалениѝ уѝтройѝтв (чекбокѝы). */
.device-remove-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.device-remove-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  cursor: pointer;
}

.device-remove-item input {
  accent-color: var(--accent);
  flex: none;
}

.device-remove-item code {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Модалка выбора ѝервера — компактнаѝ. */
#server-switch-modal .account-modal__box {
  max-width: 360px;
}

.server-region-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* Старые профили: только ѝѝылка и кнопка удалениѝ. */
.doh-extra-row .btn:not(.dns-entry-remove),
.doh-extra-row .url-label,
.doh-extra-row .url-flag,
.doh-extra-row .info-tip,
.doh-extra-row .dns-server-pill,
.doh-extra-row .doh-extra-check-status {
  display: none;
}

.doh-extra-row .dns-entry-remove {
  margin-left: auto;
}

@media (max-width: 640px) {
  .device-card--row {
    padding: 10px;
  }

  .device-card--row .setup-url-chip {
    min-width: 0;
    flex: 1 1 100%;
    order: 5;
  }
}

/* Статуѝ подпиѝки в шапке карточки: план кликабельный, ѝтатуѝ цветной. */
.account-sub-period {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-plan-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.account-status--ok {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.account-status--bad {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.account-status__icon {
  width: 15px;
  height: 15px;
  flex: none;
}

/* Детали подпиѝки: таблица дат в модалке. */
.sub-details {
  display: grid;
  gap: 10px;
}

.sub-details__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.875rem;
}

.sub-details__row span {
  color: var(--text-muted);
}

.sub-details__row strong {
  text-align: right;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Иконка уѝтройѝтва: ѝилуѝт типа + бейдж ОС в правом нижнем углу. */
.device-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--border);
  color: var(--accent-secondary);
  flex: none;
}

.device-icon > svg {
  width: 26px;
  height: 26px;
}

.device-icon__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.device-icon__badge svg {
  width: 13px;
  height: 13px;
}

.os-badge--windows {
  color: #00a4ef;
}

.os-badge--macos {
  color: #8e8e93;
}

.os-badge--linux {
  color: #f59e0b;
}

.os-badge--android {
  color: #3ddc84;
}

.os-badge--ios {
  color: #0a84ff;
}

.device-icon--generic {
  color: var(--text-muted);
}

/* Карточка профилѝ-уѝтройѝтва. */
.device-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
}

.device-card.is-paused {
  opacity: 0.82;
}

.device-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.device-card__icon-btn {
  flex: none;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  transition: transform var(--transition);
}

.device-card__icon-btn:hover {
  transform: scale(1.05);
}

.device-card__head-text {
  min-width: 0;
}

.device-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.device-card__sub {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.device-card__server {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.device-card__action svg {
  width: 16px;
  height: 16px;
}

.device-card__action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.device-card__action--rate:hover {
  border-color: rgba(245, 158, 11, 0.7);
  color: #f59e0b;
}

.device-card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-card__link .setup-url-chip {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  font-size: 0.8125rem;
}

.device-card__link .setup-url-chip__url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.device-card__state {
  margin-top: -2px;
}

.unified-profile-row .unified-profile-row__status {
  width: 100%;
  min-height: 1.1em;
}

.dns-ip-tip {
  flex: none;
}

#dns-sync-btn svg {
  flex: none;
}

@media (max-width: 640px) {
  .account-sub-period {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .device-card {
    padding: 12px;
  }

  .device-card__link .setup-url-chip {
    min-width: 0;
  }

  .device-card__actions .btn {
    flex: 1 1 auto;
  }
}

/* ── Отзывы о ѝервере: «работает» зелёным, «не работает» краѝным ── */
.server-vote--up {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
}

.server-vote--down {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

/* ── Модалка ѝмены ѝервера: компактный выбор ѝтраны и причина ── */
.server-country-select {
  margin-bottom: 10px;
}

.server-switch-reason {
  margin: 2px 0 4px;
}

.server-switch-reason select {
  margin-top: 6px;
}

.server-switch-option__meta {
  line-height: 1.45;
}

.server-switch-option__reviews {
  display: block;
  margin-top: 4px;
}

/* ── Удаление профилѝ-уѝтройѝтва (иконка корзины) ── */
.device-card__action--danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.device-card__action--danger:hover {
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.device-card--row .unified-profile-pause {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Недоѝтупные ѝерверы (не в тарифе / не выданы перѝонально) — бледнее. */
.account-page .server-switch-option--locked {
  opacity: 0.4;
}

/* Иконка «i» у недоѝтупного ѝервера: причина на наведении (title) и по клику. */
.account-page .server-switch-option__locked-icon {
  margin-left: auto;
  display: inline-flex;
  flex: none;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Плитка ѝервера в модалке: флаг рѝдом ѝ именем, одна ѝтрока. */
.account-page .server-switch-option--pick .server-switch-option__head,
.account-page .server-switch-option--locked .server-switch-option__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-page .server-switch-option__flag {
  display: inline-flex;
  flex: none;
  line-height: 0;
}

.account-page .server-switch-option__flag .flag-img {
  height: 18px;
  width: auto;
  max-width: 30px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(12, 17, 27, 0.65), 0 1px 2px rgba(0, 0, 0, 0.45);
}

.account-page .server-switch-option__flag .flag-emoji {
  font-size: 18px;
}

/* Инфо выбранного ѝервера под ѝпиѝком: ѝтрана и город по клику. */
.account-page .server-switch-info {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(77, 141, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.5;
}

.account-page .server-switch-info__geo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-page .server-switch-info__flag .flag-img {
  height: 20px;
  width: auto;
  max-width: 32px;
  border-radius: 2px;
}

.account-page .server-switch-info__reviews {
  margin-top: 6px;
}

/* Чипы выбора уѝтройѝтва/ОС/браузера ѝ иконками. */
.account-page .account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-page .account-chip svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.account-page .account-chip .browser-logo {
  width: 16px;
  height: 16px;
}

/* Инѝтрукциѝ наѝтройки под выбранным уѝтройѝтвом в модалке добавлениѝ. */
.device-add-instr {
  margin-top: 4px;
}

.device-add-instr .account-picker__label {
  margin-top: 14px;
}

.device-add-instr .onboarding-steps {
  gap: 10px;
  margin-top: 10px;
}

.device-add-instr .onboarding-step {
  gap: 10px;
}

.device-add-instr .onboarding-step__num {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.device-add-instr .subscription-hint {
  margin-top: 10px;
}

/* Иконки в модалке информации об уѝтройѝтве и в ѝпиѝке удалениѝ. */
.account-page .device-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.account-page .device-info-icon {
  display: inline-flex;
  align-items: center;
  color: #9cc3ff;
}

.account-page .device-info-icon > svg {
  width: 34px;
  height: 34px;
}

.account-page .device-info-icon .os svg {
  height: 15px;
  width: auto;
}

.account-page .device-remove-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
}

.account-page .device-remove-item__icon {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: #9cc3ff;
}

.account-page .device-remove-item__icon > svg {
  width: 24px;
  height: 24px;
}

/* Опиѝание тарифа в модалке деталей подпиѝки (по клику на план). */
.sub-details__features {
  margin: 0 0 14px;
  padding: 10px 12px 10px 30px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Кабинет по прототипу account-mock: план ѝтрокой, уѝтройѝтва, ѝтарые ── */
.account-page .plan {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 2px;
}

/* Контейнеp периода ѝтал ѝтрокой плана (имѝ + ѝтатуѝ), а не кнопкой. */
.account-page .account-sub-period {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-page .account-plan-name,
.account-page .account-status {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.account-page .account-plan-name {
  font-weight: 800;
  font-size: 0.9375rem;
  color: #cfe0ff;
  border-bottom: 1px dashed var(--accent);
  line-height: 1.3;
}

.account-page .account-status {
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.account-page .account-status--ok {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.account-page .account-status--bad {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* Опиѝание тарифа — по клику на имѝ плана. */
.account-page .plan-desc {
  display: none;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.account-page .plan-desc.open {
  display: block;
}

.account-page .plan-desc b {
  color: var(--text-primary);
}

.account-page .plan-desc .muted {
  margin-top: 2px;
}

/* Заголовок ѝекции «Уѝтройѝтва» ѝ кнопками ѝправа. */
.account-page .section-title {
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.account-page .section-title .btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* Кнопки прототипа в ѝтроках и шапке ѝекции: компактный базовый вид. */
.account-page .btn.primary,
.account-page .btn.ghost,
.account-page .btn.sync,
.account-page .btn.pause-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.account-page .btn.primary {
  background: linear-gradient(135deg, #2f6bff, #4d8dff);
  border-color: #4d8dff;
  color: #fff;
}

.account-page .btn.ghost,
.account-page .btn.pause-btn {
  background: transparent;
  color: var(--text-primary);
}

.account-page .btn.sync {
  background: var(--bg-card);
  color: var(--text-primary);
}

.account-page .dns-devices-block {
  border-top: none;
  padding-top: 0;
  margin-top: 2px;
}

.account-page .dns-devices-count {
  margin: -4px 0 10px;
  font-size: 0.75rem;
}

.account-page .unified-profiles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Строка уѝтройѝтва: две ѝтроки макѝимум — рѝд кнопок и рѝд «ѝѝылка + ѝтатуѝ».
   На узких ѝкранах кнопки переноѝѝтѝѝ, надпиѝи ѝкрываютѝѝ, но не обрезаютѝѝ. */
.account-page .row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.account-page .unified-profile-row__btns {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  flex: 1 1 100%;
  min-width: 0;
  padding-bottom: 2px;
}

.account-page .row.unified-profile-row {
  align-items: center;
  padding: 6px 10px;
}

.account-page .unified-profile-row__btns > * {
  flex: none;
  height: 32px;
}

.account-page .row .unified-profile-row__meta,
.account-page .row .unified-profile-row__status {
  height: auto;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

/* Пуѝтые ѝтатуѝ/мета не занимают меѝто (обычно их нет в разметке вовѝе:
   ѝоздаютѝѝ лениво при первой запиѝи ѝообщениѝ). */
.account-page .unified-profile-row__status:empty,
.account-page .unified-profile-row__meta:empty {
  display: none;
}

/* Чип ѝѝылки: занимает ѝвободное меѝто на ѝвоей ѝтроке, ѝправа прижимаетѝѝ
   ѝтатуѝ проверки. Не даём чипу беѝконечно раѝти. */
.account-page .row .unified-profile-copy {
  flex: 1 1 auto;
  min-width: 150px;
  max-width: 320px;
}

.account-page .row.is-paused {
  opacity: 0.82;
}

/* Кнопка уѝтройѝтва: значок типа/браузера и бейдж ОС рѝдом. */
.account-page .devicon {
  height: 32px;
  padding: 0 8px;
  gap: 5px;
  flex: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(77, 141, 255, 0.12);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9cc3ff;
}

.account-page .devicon > svg {
  width: 18px;
  height: 18px;
}

.account-page .devicon .os {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-page .devicon .os svg {
  width: 18px;
  height: 18px;
}

/* Фирменнаѝ иконка Яндекѝ.Браузера (PNG-логотип), тот же размер, что и SVG. */
.account-page .browser-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 20%;
  flex: none;
}

/* Пилюлѝ ѝервера: флаг ѝлева, имѝ ѝервера. Радиуѝ 8px — как у вѝех кнопок
   кабинета: ѝлегка закруглённые краѝ, без пилюль. */
.account-page .serverpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  height: 32px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b9c8e2;
  background: rgba(77, 141, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 8px;
  cursor: pointer;
}

.account-page .serverpill .flag {
  display: inline-flex;
  flex: none;
  line-height: 0;
}

.account-page .serverpill .flag .flag-img {
  height: 12px;
  width: auto;
  max-width: 22px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(12, 17, 27, 0.65), 0 1px 2px rgba(0, 0, 0, 0.45);
}

.account-page .serverpill .flag .flag-emoji {
  font-size: 12px;
}

/* Иконочные кнопки ѝтроки: звезда, ѝмена, QR, корзина. */
.account-page .iconbtn {
  width: 30px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: #c7d6ee;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.account-page .iconbtn svg {
  width: 16px;
  height: 16px;
}

.account-page .iconbtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.account-page .iconbtn.star {
  color: var(--amber);
}

.account-page .iconbtn.unified-profile-delete:hover {
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

/* Чип ѝѝылки профилѝ ѝ маѝкой. */
.account-page .chip {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  max-width: 210px;
  color: #9cc3ff;
  background: rgba(13, 22, 38, 0.7);
  border: 1px dashed rgba(77, 141, 255, 0.5);
  border-radius: 8px;
  padding: 0 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.account-page .chip .mask {
  color: #55617a;
}

.account-page .chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-page .chip.is-unchecked {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-page .chip.is-copied {
  border-color: var(--success);
  color: var(--success);
}

/* Кнопка ѝинхронизации ѝо ѝтрелками. */
.account-page .sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  padding: 0 10px;
  font-weight: 400;
}

/* Пауза/возобновление: менѝет название и иконку. */
.account-page .pause-btn {
  color: #c6d4ea;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
  padding: 0 10px;
}

.account-page .pause-btn svg {
  height: 13px;
  width: auto;
}

/* Единый ѝтиль кнопок кабинета: ѝлегка закруглённые краѝ (8px), включаѝ
   обычные .btn--* карточек — без пилюль и оѝтрых углов. */
.account-page .btn {
  border-radius: 8px;
}

/* Группа «адреѝ профилѝ»: вопроѝик ѝ подѝказкой, адреѝ, QR. Подѝказка —
   тот же механизм, что у флагов ѝтран на лендинге: наведение/фокуѝ через
   CSS, клик — клаѝѝ is-open длѝ тач-ѝкранов. */
.account-page .profile-link-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
}

/* Чип адреѝа теперь внутри группы-обёртки: выѝоту ѝтроки (32px) задаём ѝвно,
   как у оѝтальных кнопок. */
.account-page .profile-link-wrap .unified-profile-copy {
  height: 32px;
}

.account-page .unified-profile-help {
  color: #8fa3c4;
}

.account-page .unified-profile-help:hover,
.account-page .unified-profile-help:focus-visible {
  color: var(--accent);
}

.account-page .profile-link-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  white-space: normal;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-primary);
  cursor: default;
}

.account-page .profile-link-tooltip b {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.account-page .unified-profile-help:hover ~ .profile-link-tooltip,
.account-page .unified-profile-help:focus-visible ~ .profile-link-tooltip,
.account-page .profile-link-wrap.is-open .profile-link-tooltip {
  display: block;
}

/* Платформенные кнопки: Windows (автонаѝтройка) и Apple (конфиг). */
.account-page .platform {
  width: 30px;
  height: 32px;
  flex: none;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: #c7d6ee;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.account-page .platform svg {
  width: 16px;
  height: 16px;
}

.account-page .platform:hover {
  border-color: var(--accent);
}

.account-page .platform.win {
  color: #00a4ef;
}

.account-page .platform.apple {
  color: #dcdcdc;
}

/* Старые профили: пунктирный блок ѝо ѝпиѝком ѝѝылок и «✕». */
.account-page .legacy {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #4a3a52;
  border-radius: 12px;
  background: rgba(90, 60, 110, 0.08);
}

.account-page .legacy h3 {
  margin: 0 0 2px;
  font-size: 0.8125rem;
}

.account-page .legacy .warn {
  font-size: 0.72rem;
  color: #fda4af;
  margin: 0 0 8px;
}

.account-page .lrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(34, 48, 74, 0.6);
}

.account-page .lrow:last-child {
  border-bottom: none;
}

.account-page .lrow .chip {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 9px;
  height: 30px;
}

.account-page .x {
  color: #f87171;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1rem;
  width: 28px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-page .x:hover {
  color: #fff;
}

/* Строки-ѝводки «Доѝтупные на тарифе» и т.п. — компактные, как в прототипе. */
.account-page .account-details {
  margin: 2px 0 0;
}

.account-page .account-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}

.account-page .account-details > summary::-webkit-details-marker {
  display: none;
}

.account-page .account-details[open] > summary {
  border-bottom-color: transparent;
}

/* Email в шапке кабинета — ѝ зелёной точкой; кнопка «Выйти» краѝнаѝ (ѝм. .account-user). */
@media (max-width: 640px) {
  .account-page .row {
    padding: 8px;
    gap: 7px;
  }

  /* На узких ѝкранах у «Синхронизировать» и «Приоѝтановить» оѝтаютѝѝ
     только иконки — кнопки не переноѝѝтѝѝ на новую ѝтроку. */
  .account-page .btn-label {
    display: none;
  }

  .account-page .btn.sync,
  .account-page .btn.pause-btn {
    width: 32px;
    padding: 0;
  }

  .account-page .section-title {
    flex-wrap: wrap;
  }

  .account-page .section-title .btns {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- Ндминка: маѝѝоваѝ раѝѝылка --- */
.mass-mail-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
}

.mass-mail-expired-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mass-mail-expired-row .form-input {
  width: 96px;
}

.mass-mail-presets {
  display: flex;
  gap: 6px;
}

.mass-mail-compose__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mass-mail-code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 0.8125rem;
  line-height: 1.45;
  min-height: 220px;
  resize: vertical;
}

.mass-mail-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mass-mail-preview-frame {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border, rgba(128, 128, 128, 0.35));
  border-radius: 8px;
  background: #fff;
}

.mass-mail-recipients-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.mass-mail-recipients-more {
  margin-top: 10px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mass-mail-template {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--border, rgba(128, 128, 128, 0.3));
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--card, transparent);
}

.mass-mail-template__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  flex: 1;
}

.mass-mail-template__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table--mass-mail th,
.admin-table--mass-mail td {
  padding: 8px 10px;
}

.btn--link {
  background: none;
  border: none;
  color: var(--accent, #3b82f6);
  padding: 2px 0;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.35);
  text-underline-offset: 2px;
}

.btn--link:hover {
  text-decoration-color: currentColor;
}

.mass-mail-job {
  border: 1px solid var(--border, rgba(128, 128, 128, 0.3));
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--card, transparent);
}

.mass-mail-job__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.mass-mail-job__subject {
  font-weight: 600;
}

.mass-mail-job__meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.mass-mail-job__progress {
  flex: 1;
  min-width: 160px;
  height: 6px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
  overflow: hidden;
}

.mass-mail-job__bar {
  height: 100%;
  background: var(--accent, #3b82f6);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.mass-mail-job__details {
  margin-top: 8px;
  border-top: 1px dashed var(--border, rgba(128, 128, 128, 0.3));
  padding-top: 8px;
  display: grid;
  gap: 4px;
}

.mass-mail-job__details > div:last-of-type {
  margin-top: 6px;
}

.mass-mail-job__recipient {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) 1fr 0.6fr 1fr auto;
  gap: 8px 14px;
  align-items: baseline;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .mass-mail-job__recipient {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .mass-mail-compose__grid {
    grid-template-columns: 1fr;
  }
}

/* Сервиѝы (админка): бейджи динамики, точки ѝерверов, приглушённые ѝтроки */
.su-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.su-badge--up {
  color: #1d9e62;
  background: rgba(29, 158, 98, 0.14);
}
.su-badge--down {
  color: #d64545;
  background: rgba(214, 69, 69, 0.14);
}
.su-badge--flat,
.su-badge--new {
  color: var(--text-muted, #888);
  background: rgba(128, 128, 128, 0.14);
}
.su-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: baseline;
  margin-right: 6px;
}
tr.su-dim,
.su-dim {
  opacity: 0.45;
}
.analytics-summary__label .su-badge {
  margin-left: 8px;
}

/* -- �������� ������� �������� (/status.html) -- */
.status-page {
  min-height: 60vh;
  padding: calc(var(--top-offset) + 48px) 0 80px;
}

.status-hero {
  margin-bottom: 32px;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
}

.status-note {
  color: var(--text-secondary);
  padding: 24px 8px;
  text-align: center;
  font-size: 0.95rem;
}

.status-note--error {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-hint {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.status-hint code {
  background: rgba(128, 128, 128, 0.12);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: var(--font-mono, monospace);
}

.status-word--warn {
  color: #f59e0b;
  font-weight: 600;
}

/* ?????? ????????: ???????? ?? ??????/??????, ?????? � ?????? ???????? ?
   ???????? �??/???� ? ????????? ?? 1?/24?. */
.status-list {
  display: flex;
  flex-direction: column;
}

.status-server-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.status-server-row:last-child {
  border-bottom: none;
}

.status-server-row__head {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status-server-row__flag {
  font-size: 1.1rem;
  line-height: 1;
}

.status-server-row__title {
  font-size: 0.98rem;
  font-weight: 700;
}

.status-server-row__meta {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  margin-left: auto;
  white-space: nowrap;
}

.status-server-row__extras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 12px;
}

.status-extra-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.1);
  color: var(--text-secondary);
}

.status-extra-chip--ok {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
}

.status-extra-chip--fail {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.status-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.status-service {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'head votes'
    'reviews votes';
  column-gap: 12px;
  row-gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.04);
}

.status-service__head {
  grid-area: head;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-self: start;
}

.status-service__name {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

/* Отзывы посетителей за 1ч/24ч — слева внизу ячейки сервиса. */
.status-reviews {
  grid-area: reviews;
  justify-self: start;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.status-reviews__line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.status-reviews__win {
  min-width: 2.5em;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.status-rev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  line-height: 1;
}

.status-rev svg {
  flex: none;
}

.status-rev b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ??? ??????? � ????? ?????? ? ?????, ? ???????? � ??????? ? ??????. */
.status-rev--muted {
  color: var(--text-muted);
  opacity: 0.8;
}

.status-rev--up {
  color: #4ade80;
}

.status-rev--up b {
  font-weight: 800;
}

.status-rev--down {
  color: #f87171;
}

.status-rev--down b {
  font-weight: 800;
}

.status-rev[data-reviews-key] {
  cursor: pointer;
  border-bottom: 1px dotted currentColor;
}

.status-reviews-tip {
  position: fixed;
  z-index: 110;
  width: 300px;
  max-width: calc(100vw - 16px);
  max-height: 40vh;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.8rem;
  line-height: 1.35;
}

.status-reviews-tip__head {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.status-reviews-tip__body {
  display: grid;
  gap: 4px;
}

.status-reviews-tip__row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-reviews-tip__row b {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Кнопки «Да/Нет» — вертикально справа в ячейке сервиса. */
.status-votes {
  grid-area: votes;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 64px;
}

.status-votes:empty {
  display: none;
}

.status-votes--done {
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.status-vote-btn {
  appearance: none;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  width: 100%;
  text-align: center;
}

.status-vote-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
}

.status-vote-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.status-my-vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.status-my-vote__cd {
  color: var(--text-muted);
  font-weight: 500;
}

.status-vote-error {
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--text-muted);
}

.status-badge--ok {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
}

.status-badge--ok::before {
  background: var(--success);
}

.status-badge--fail {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.status-badge--fail::before {
  background: #ef4444;
}

.status-badge--warn {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.status-badge--warn::before {
  background: #f59e0b;
}

.status-badge--unknown {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
}

.status-service__lat {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.status-service__lat--slow {
  color: #fbbf24;
  font-weight: 700;
}

/* Метрики сервера: пинг до сервера и индекс доверия IP (в строке заголовка). */
.status-server-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.status-metric {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.status-metric > svg {
  flex: none;
  color: var(--text-muted);
}

.status-metric b {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.status-metric__name {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-metric__missing {
  color: var(--text-muted);
  font-weight: 600;
}

/* Индекс доверия: чипы отдельных источников, цвет по уровню оценки. */
.status-trust {
  gap: 6px;
}

.status-trust__scores {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* Кружки оценок источников доверия: иконка + цифра, цвет по уровню. */
.status-score {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.status-score b {
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  color: inherit;
}

.status-score.status-score--high {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.14);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.35);
}

.status-score.status-score--mid {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.status-score.status-score--low {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.14);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.35);
}

.status-score.status-score--bad {
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.status-score.status-score--none {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

/* «?» и панель-пояснение метрик. */
.status-help-wrap {
  position: relative;
  display: inline-flex;
}

.status-help {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.status-help:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
}

.status-help-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  width: min(310px, calc(100vw - 48px));
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: normal;
}

.status-help-pop--right {
  left: auto;
  right: 0;
}

@media (hover: hover) {
  .status-help:hover + .status-help-pop,
  .status-help-pop:hover {
    display: block;
  }
}

.status-help-pop.open {
  display: block;
}

/* Время загрузки страницы сервиса с сервера. */
.status-latency {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.status-latency b {
  font-weight: 600;
}

.status-latency--slow b {
  color: #fbbf24;
  font-weight: 700;
}

.status-latency .status-help {
  width: 16px;
  height: 16px;
  font-size: 0.65rem;
}

/* Блок «Что значат метрики» под карточкой статуса. */
.status-legend {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: rgba(148, 163, 184, 0.04);
}

.status-legend h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-legend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 16px;
}

.status-legend__item {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.status-legend__item strong {
  color: var(--text-primary);
}

.site-probe-history-load {
  color: var(--text-muted);
  font-size: 0.9em;
}

.js-site-probe-history td svg {
  display: block;
  max-width: 100%;
}

.status-refresh {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: right;
}

/* -- �������: ���� ������ �������� Gemini� -- */
.site-status-block {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(6, 182, 212, 0.04));
}

.site-status-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.site-status-block__head strong {
  font-size: 0.95rem;
}

.site-status-block__head .site-status-updated {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.site-status-block__link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.1);
  color: var(--text-secondary);
}

.site-status-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.site-status-chip--ok {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.site-status-chip--ok::before {
  background: var(--success);
}

.site-status-chip--ns {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.site-status-chip--ns::before {
  background: #f59e0b;
}

.site-status-chip--fail {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.site-status-chip--fail::before {
  background: #ef4444;
}

@media (max-width: 720px) {
  .status-server-row__head {
    align-items: flex-start;
  }

  .status-services {
    grid-template-columns: 1fr;
  }

  .status-service__head {
    row-gap: 6px;
  }

  .status-reviews {
    align-self: start;
  }

  .site-status-block__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .status-server-metrics {
    flex-basis: 100%;
  }

  .status-legend__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Самодиагностика по DoH/DoT-ссылке (/check) ===== */

.check-diag__form {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}

.check-diag__form .btn {
  justify-self: start;
}

.check-diag__field {
  display: grid;
  gap: 4px;
}

.check-diag__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.check-diag__combo {
  position: relative;
}

.check-diag__combo-input {
  padding-right: 38px;
}

.check-diag__combo-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.check-diag__combo-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.check-diag__combo-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.check-diag__combo-menu[hidden] {
  display: none;
}

.check-diag__combo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.check-diag__combo-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.check-diag__combo-item input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
}

.check-diag__status {
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 0.85rem;
}

.check-diag__status--pending {
  color: var(--text-muted);
}

.check-diag__status--fail {
  color: var(--text-danger, #e07070);
}

.check-diag__summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 2px;
}

.check-diag__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.check-diag__row:last-child {
  border-bottom: none;
}

.check-diag__name {
  font-weight: 600;
  word-break: break-all;
}

.check-diag__rcode {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-danger, #e07070);
}

.check-diag__ips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.check-diag__ip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  white-space: nowrap;
}

.check-diag__ip--ours {
  color: var(--accent);
}

@media (max-width: 720px) {
  .check-diag__row {
    flex-direction: column;
    gap: 6px;
  }

  .check-diag__ips {
    justify-content: flex-start;
  }
}

/* Реакции на сообщения чата поддержки */
.support-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  position: relative;
  max-width: 100%;
}

.support-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.support-reaction-chip:hover {
  border-color: var(--accent);
}

.support-reaction-chip--mine {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.5);
}

.support-reaction-chip__emoji {
  font-size: 13px;
}

.support-reaction-add {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-primary);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.support-reaction-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.support-widget__message--user .support-reaction-picker,
.support-admin-message--admin .support-reaction-picker {
  left: auto;
  right: 0;
}

.support-reaction-picker__item {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1.2;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
}

.support-reaction-picker__item:hover {
  background: rgba(127, 127, 127, 0.12);
}
