/* ══ RESET & ROOT ══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #fc0c50;
  --bg: #000000;
  --card: #000000;
  --card2: #000000;
  --border: rgba(255,255,255,0.09);
  --fg: #f5f5f8;
  --fg60: rgba(245,245,248,0.6);
  --fg40: rgba(245,245,248,0.4);
}

/* background: var(--bg) здесь, не только на body — без него при
   cross-document view transition (переход между страницами) браузер между
   старым и новым снимком страницы на миг показывает свой дефолтный тёмно-
   серый фон для color-scheme:dark, а не чёрный фон сайта. */
html { scroll-behavior: smooth; font-size: 25.6px; color-scheme: dark; background: var(--bg); }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Карточки/сетки не должны раздувать колонку своим содержимым (число без
   пробелов, длинная тема тикета и т.п.) — классический grid/flex-blowout. */
.balance-card, .tk-card, .tariff-card, .act-card, .inv-card,
.tk-meta-card, .tk-thread, .integration-details, .name-block,
.card-top, .server-title, .tariff-title {
  min-width: 0;
}

.content-wrapper { width: 100%; }

::selection { background: var(--primary); color: var(--bg); }
a { text-decoration: none; color: inherit; }

/* Кастомный скроллбар — на чёрном фоне браузерный дефолт выглядит так,
   будто дизайн на этом месте внезапно кончился. */
html { scrollbar-color: rgba(252,12,80,.45) rgba(255,255,255,.04); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11.2px; height: 11.2px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
::-webkit-scrollbar-thumb {
  background-color: rgba(252,12,80,.45);
  border-radius: 10px; border: 2.4px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(252,12,80,.65); }
::-webkit-scrollbar-corner { background: transparent; }

/* ══ COOKIE ══ */
.cookie {
  position: fixed; bottom: 25.6px; left: 50%;
  transform: translateX(-50%); z-index: 999;
  background: var(--card2);
  border: 1.6px solid var(--border);
  border-radius: 22.4px; padding: 38.4px 51.2px;
  display: flex; align-items: center; gap: 28.8px;
  max-width: 960px; width: calc(100% - 51.2px);
  box-shadow: 0 19.2px 76.8px rgba(0,0,0,.55), 0 0 56px rgba(252,12,80,.07);
}
.cookie p { font-size: 1.05rem; font-weight: 500; color: var(--fg) !important; flex: 1; min-width: 0; }
.cookie .btn-pri {
  background: var(--primary) !important;
  color: #1b1a21 !important;
  padding: 19.2px 41.6px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  flex-shrink: 0;
}
.cookie .btn-pri:hover { background: var(--primary) !important; color: #1b1a21 !important; }
.cookie.hidden { display: none; }
@media(max-width: 640px) {
  .cookie {
    flex-direction: column; align-items: stretch; text-align: center;
    padding: 25.6px; gap: 16px; bottom: 12.8px; width: calc(100% - 25.6px);
  }
  .cookie .btn-pri { padding: 14.4px 28.8px !important; width: 100%; }
}
html.has-cookie-bar footer { padding-bottom: 208px; }
@media(max-width: 1024px) { html.has-cookie-bar footer { padding-bottom: 272px; } }

/* ══ HEADER ══ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(28.8px);
  -webkit-backdrop-filter: blur(28.8px);
  border-bottom: 1.6px solid var(--border);
}
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 19.2px;
  max-width: 100%;
  margin: 0 auto;
  padding: 25.6px 48px;
  position: relative;
}
@media(max-width: 1229px) { .hdr { padding: 19.2px 25.6px; } }

.logo {
  display: flex; align-items: center; gap: 14.4px;
  font-size: 1.4rem; font-weight: 700;
  transition: opacity .15s; flex-shrink: 0;
}
.logo:hover { opacity: .85; }
.logo img {
  width: 76.8px; height: 76.8px;
  object-fit: contain; display: block; border-radius: 16px;
}

/* Desktop nav */
.dnav { display: none; align-items: center; gap: 3.2px; }
@media(min-width:1100px){ .dnav { display: flex; } }

.ddrop { position: relative; }
.dtrig {
  display: flex; align-items: center; gap: 8px;
  padding: 11.2px 17.6px;
  background: none; border: none;
  color: var(--fg); font-family: inherit;
  font-size: .88rem; font-weight: 500;
  cursor: pointer; border-radius: 12.8px;
  transition: background .15s;
}
.dtrig:hover { background: rgba(255,255,255,.07); }
.dtrig svg { width: 20.8px; height: 20.8px; opacity: .55; transition: transform .2s; }
.ddrop.open .dtrig svg { transform: rotate(180deg); }

.dpanel {
  display: none;
  position: absolute; top: calc(100% + 16px);
  left: 50%; transform: translateX(-50%);
  background: var(--card2);
  border: 1.6px solid var(--border);
  border-radius: 22.4px; padding: 12.8px;
  z-index: 200;
  box-shadow: 0 32px 96px rgba(0,0,0,.6);
  min-width: 736px;
  grid-template-columns: 1fr 1fr; gap: 6.4px;
}
.ddrop.open .dpanel { display: grid; }
.dpanel.wide { min-width: 832px; }

.ditem-big {
  grid-column: 1; grid-row: 1 / 3;
  background: linear-gradient(135deg,rgba(240,177,0,.14),rgba(240,177,0,.04));
  border: 1.6px solid rgba(240,177,0,.22);
  border-radius: 16px; padding: 28.8px;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 176px; transition: background .15s;
}
.ditem-big:hover { background: linear-gradient(135deg,rgba(240,177,0,.22),rgba(240,177,0,.08)); }
.ditem-big .dt { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.ditem-big .dd { font-size: .78rem; color: var(--fg60); line-height: 1.4; }

.ditem {
  padding: 16px 19.2px; border-radius: 12.8px;
  transition: background .15s;
  display: flex; flex-direction: column; gap: 3.2px;
}
.ditem:hover { background: rgba(255,255,255,.06); }
.ditem .dt { font-size: .85rem; font-weight: 600; }
.ditem .dd { font-size: .76rem; color: var(--fg60); line-height: 1.3; }

.nsep { width: 1.6px; height: 32px; background: var(--border); margin: 0 9.6px; }

/* Header actions */
.hactions { display: none; align-items: center; gap: 12.8px; }
@media(min-width:1100px){ .hactions { display: flex; } }

.hdr-user-chip {
  display: flex; align-items: center; gap: 9.6px;
  padding: 6.4px 16px 6.4px 6.4px;
  border-radius: 100px;
  background: rgba(255,255,255,.05); border: 1.6px solid var(--border);
  color: var(--fg); text-decoration: none;
  transition: background .15s;
}
.hdr-user-chip:hover { background: rgba(255,255,255,.09); }
.hdr-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #ff5a91);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: #1b1a21;
}
/* Узкие телефоны: логотип у нас фиксированной ширины и не сжимается —
   если ещё есть кнопка «Панель» (staff) и юзер-чип, всё в строку не влезает
   и «Панель» просто уезжает за экран (overflow-x:hidden на body её прячет).
   Даём лого ужаться и прячем текст рядом с именем, оставляя аватар. */
@media(max-width: 460px) {
  .hdr { gap: 8px; padding: 16px 12.8px; flex-wrap: wrap; }
  .logo img { width: 44.8px; height: 44.8px; }
  .logo span { display: none; }
  .hdr-user-name { display: none; }
  .hdr-user-chip { padding: 6.4px; }
  .btn.mbtn { padding: 8px 12.8px; font-size: .82rem; }
}

.hdr-user-name {
  font-size: .88rem; font-weight: 600;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.hdr-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 1rem; font-weight: 500; color: var(--fg40);
  text-decoration: none; transition: color .15s;
}
.hdr-center:hover { color: var(--fg); }
@media(max-width:1100px){ .hdr-center { display: none; } }

/* ══ BUTTONS ══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11.2px;
  padding: 12.8px 28.8px; border-radius: 16px;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; border: none; transition: all .15s;
  white-space: nowrap; text-decoration: none;
}
.btn-out {
  background: transparent;
  border: 1.6px solid var(--border);
  color: var(--fg);
}
.btn-out:hover { background: rgba(255,255,255,.07); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-pri {
  background: var(--primary) !important;
  color: #1b1a21 !important;
  text-shadow: none !important;
  box-shadow: 0 0 0 rgba(252,12,80,0);
}
.btn-pri:hover {
  background: var(--primary) !important; color: #1b1a21 !important;
  box-shadow: 0 0 36px rgba(252,12,80,.4), 0 0 6.4px rgba(252,12,80,.55);
}
.btn-pri, .btn-pri *, .btn-pri *::before, .btn-pri *::after {
  color: #1b1a21 !important; fill: #1b1a21 !important;
}
.btn-pri svg, .btn-pri svg * {
  stroke: #1b1a21 !important; fill: #1b1a21 !important; color: #1b1a21 !important;
}
.btn-pri--dark,
.btn-pri--dark *, .btn-pri--dark *::before, .btn-pri--dark *::after,
.btn-pri--dark span, .btn-pri--dark svg, .btn-pri--dark svg * {
  color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important;
  -webkit-text-fill-color: #1b1a21 !important; text-shadow: none !important;
  background-clip: border-box !important; -webkit-background-clip: border-box !important;
}
#hero-cta,
#hero-cta *, #hero-cta *::before, #hero-cta *::after,
#hero-cta svg, #hero-cta svg * {
  color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important;
  -webkit-text-fill-color: #1b1a21 !important; -moz-text-fill-color: #1b1a21 !important;
  text-shadow: 0 0 0 #1b1a21 !important; -webkit-font-smoothing: antialiased;
  background-clip: border-box !important; -webkit-background-clip: border-box !important;
}
#hero-cta { position: relative !important; z-index: 20 !important; isolation: isolate; }
@supports (-moz-appearance: none) {
  #hero-cta, #hero-cta *, #hero-cta svg, #hero-cta svg *,
  .btn-pri, .btn-pri *, .cookie .btn-pri, .cookie .btn-pri * {
    color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important;
    -webkit-text-fill-color: #1b1a21 !important; -moz-text-fill-color: #1b1a21 !important;
    text-shadow: none !important;
    background-clip: border-box !important; -webkit-background-clip: border-box !important;
  }
}
.btn-pri, .btn-pri * { color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important; }
.cookie .btn-pri { color: #1b1a21 !important; }
@media(min-width:2560px){
  .btn-pri, .btn-pri * { color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important; }
}
@media(min-width:3072px){
  .btn-pri, .btn-pri * { color: #1b1a21 !important; fill: #1b1a21 !important; stroke: #1b1a21 !important; }
}
.btn-lg { padding: 20.8px 44.8px; font-size: 1.15rem; border-radius: 19.2px; }
.btn-ico { padding: 12.8px; width: 60.8px; height: 60.8px; }
.btn-danger { background: rgba(239,68,68,.12); color: #ef4444; border: 1.6px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.2); box-shadow: 0 0 28.8px rgba(239,68,68,.22); }

.mbtn { display: flex; }
@media(min-width:1100px){ .mbtn { display: none; } }

.mobile-menu-fab {
  display: none;
  position: fixed;
  bottom: 38.4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  align-items: center;
  gap: 12.8px;
  padding: 19.2px 38.4px;
  border-radius: 160px;
  background: rgba(18,16,20,.92);
  border: 1.6px solid rgba(255,255,255,.12);
  backdrop-filter: blur(19.2px);
  -webkit-backdrop-filter: blur(19.2px);
  color: var(--fg);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12.8px 38.4px rgba(0,0,0,.45);
  transition: background .15s;
}
.mobile-menu-fab:hover { background: rgba(28,26,30,.95); }
.mobile-menu-fab svg { width: 22.4px; height: 22.4px; }
/* Пока баннер cookie не закрыт, он занимает то же самое место снизу —
   без сдвига кнопка «Меню» оказывается прямо под текстом баннера. */
html.has-cookie-bar .mobile-menu-fab { bottom: 172.8px; }
@media(max-width: 640px) { html.has-cookie-bar .mobile-menu-fab { bottom: 182.4px; } }
@media(max-width:1100px){ body:has(.sidebar) .mobile-menu-fab { display: flex; } }

/* Mobile nav */
.mnav {
  display: none; flex-direction: column; gap: 4.8px;
  padding: 16px 25.6px 25.6px;
  border-top: 1.6px solid var(--border);
}
.mnav.open { display: flex; }
.mnav a, .mnav button {
  padding: 14.4px 19.2px; border-radius: 12.8px;
  font-size: .9rem; font-weight: 500;
  color: var(--fg); background: none; border: none;
  font-family: inherit; cursor: pointer;
  text-align: left; transition: background .15s;
  text-decoration: none; display: block;
}
.mnav a:hover, .mnav button:hover { background: rgba(255,255,255,.07); }
.msect { font-size: .72rem; font-weight: 700; color: var(--fg40); text-transform: uppercase; letter-spacing: .07em; padding: 12.8px 19.2px 4.8px; }
.mdiv { height: 1.6px; background: var(--border); margin: 9.6px 0; }
.macts { display: flex; gap: 12.8px; padding: 6.4px 0; }
.macts .btn { flex: 1; font-size: .88rem; }

/* Menu toggle for app sidebar */
.menu-toggle {
  display: none; background: none; border: none;
  color: rgba(255,255,255,.7); cursor: pointer;
  padding: .4rem; border-radius: 8px;
  width: 60.8px; height: 60.8px;
  align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.menu-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media(max-width:1100px){ .menu-toggle { display: flex; } }

/* ══ HERO ══ */
#hero {
  margin-top: 102.4px;
  padding: 128px 64px 192px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28.8px;
  position: relative; overflow: hidden;
  text-align: center;
}
@media(max-width: 1229px) { #hero { padding: 96px 25.6px 128px; } }

/* Mesh-фон hero: несколько радиальных слоёв в розово-бордовой гамме,
   лёгкий transform-дрифт на 36s — читается как "дыхание", не мельтешение.
   z-index:0 без явного указания у #hero-canvas-wrap даёт порядок прорисовки
   по DOM: ::before (mesh) → canvas (flicker grid) → ::after (grain) → контент (z-index:1). */
#hero::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px circle at 16% 20%, rgba(252,12,80,.24), transparent 62%),
    radial-gradient(720px circle at 86% 12%, rgba(120,20,58,.22), transparent 64%),
    radial-gradient(900px circle at 50% 97%, rgba(252,12,80,.14), transparent 66%);
  animation: heroMeshDrift 36s ease-in-out infinite alternate;
  will-change: transform;
  /* Без этой маски #hero своим overflow:hidden обрезает mesh ровной линией
     по нижнему краю — на фоне плоского чёрного следующей секции это читалось
     как грубый прямоугольный "вырез", а не плавный переход. Гасим и mesh, и
     зерно (ниже) заранее, до физической границы блока. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
}
@keyframes heroMeshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2.4%, 2%, 0) scale(1.07); }
  100% { transform: translate3d(2%, -1.6%, 0) scale(1.03); }
}

/* Кинематографичная зернистость поверх hero — почти неразличимый шум
   (feTurbulence), приём из премиальных тёмных интерфейсов: убирает
   ощущение "плоского" фона без заметного визуального шума. */
#hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@media(max-width: 640px) {
  /* На телефонах — без анимации дрифта, фон остаётся статичным градиентом.
     will-change:transform тоже снимаем: раз transform больше не меняется,
     этот хинт только держит слой на отдельном GPU-композитном слое без
     всякой пользы — лишняя нагрузка на слабых мобильных GPU. */
  #hero::before { animation: none; will-change: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #hero::before, .h1 { animation: none !important; }
  #hero::before { will-change: auto; }
}

#hero-canvas-wrap {
  position: absolute; inset: 0;
  overflow: hidden; z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(800px circle at center, white, transparent);
  mask-image: radial-gradient(800px circle at center, white, transparent);
}
#hero-canvas { display: block; margin: 0 auto; }
#hero > *:not(#hero-canvas-wrap) { position: relative; z-index: 1; }

.h1 {
  font-size: clamp(1.7rem, 8vw, 4.2rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  /* Градиентный заголовок: белый → светло-розовый → primary → белый,
     медленный сдвиг background-position — живой, но читаемый, без "дискотеки". */
  background: linear-gradient(100deg, #fff 0%, #ffd6e2 20%, var(--primary) 45%, #ff6f9c 65%, #fff 92%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: heroTitleShine 9s linear infinite;
}
@keyframes heroTitleShine {
  to { background-position: 220% center; }
}

/* Flip words */
.flip-row {
  display: block; height: 1.25em; min-width: 320px;
  overflow: hidden; margin-top: 28.8px; position: relative;
  /* Меньше, чем у h1 (там clamp доходит до 4.2rem ~107px при корневых 25.6px) —
     иначе любое слово длиннее "ХЗ" не влезает по ширине и обрезается. */
  font-size: clamp(1.1rem, 5vw, 2.4rem);
}
@media(max-width: 480px) {
  .flip-row { min-width: 0; width: 100%; }
}
.fw {
  display: block; color: var(--primary);
  /* h1 родителя красит текст градиентом через background-clip:text +
     -webkit-text-fill-color:transparent — это свойство инерируется, так что
     без явного сброса здесь слово становится невидимым (прозрачный fill
     поверх color). */
  -webkit-text-fill-color: var(--primary);
  font-size: inherit; font-weight: inherit;
  position: absolute; width: 100%; text-align: center;
  opacity: 0; transform: translateY(100%);
  transition: opacity .35s ease, transform .35s ease;
  white-space: nowrap;
}
.fw.on  { opacity: 1; transform: translateY(0); }
.fw.off { opacity: 0; transform: translateY(-100%); }

.hero-desc {
  font-size: 1.05rem; font-weight: 500;
  max-width: 832px; color: var(--fg60); margin-bottom: 1.5rem;
}

/* Полоска доверия под CTA — три цифры с count-up из vanilla JS (см. скрипт
   на странице), оформлены тем же градиентом primary → белый, что и h1. */
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 48px; margin-top: 12.8px;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4.8px; min-width: 128px; }
.hero-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero-stat-label {
  font-size: .78rem; font-weight: 600; color: var(--fg40);
  letter-spacing: .02em; text-align: center; max-width: 180px;
}
@media(max-width: 640px) {
  .hero-stats { gap: 28px; }
  .hero-stat { min-width: 96px; }
}

.hero-img-wrap {
  margin-top: 25.6px; max-width: 1376px; width: 100%;
  border-radius: 22.4px; border: 1.6px solid var(--border);
  overflow: hidden; box-shadow: 0 51.2px 128px rgba(0,0,0,.5);
}
.hero-img-wrap img { width: 100%; display: block; object-fit: cover; }

/* ══ SECTION ══ */
.sec {
  max-width: 2240px; width: 100%;
  margin: 0 auto; padding: 128px 48px; display: block;
}
@media(max-width: 1229px) { .sec { padding: 112px 25.6px; } }
.sec-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800; text-align: center; line-height: 1.15;
  letter-spacing: -.03em; margin-bottom: 1rem;
}
.sec-desc {
  font-size: 1rem; font-weight: 500;
  max-width: 832px; text-align: center;
  color: var(--fg60); margin: 0 auto 2rem;
}

/* ══ BENTO GRID ══ */
.bento {
  display: grid; width: 100%; margin-top: 57.6px;
  gap: 22.4px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 512px);
}
.bc-center { grid-column: 2; grid-row: 1 / 4; }
.bc-lt     { grid-column: 1; grid-row: 1 / 3; }
.bc-lb     { grid-column: 1; grid-row: 3; }
.bc-rt     { grid-column: 3; grid-row: 1; }
.bc-rb     { grid-column: 3; grid-row: 2 / 4; }

@media(max-width:1440px){
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 416px; }
  .bc-center,.bc-lt,.bc-lb,.bc-rt,.bc-rb { grid-column: auto; grid-row: auto; }
}
@media(max-width:896px){ .bento { grid-template-columns: 1fr; grid-auto-rows: 352px; } }

.bc {
  position: relative; overflow: hidden;
  border-radius: 25.6px; border: 1.6px solid var(--border);
  background: var(--card); padding: 35.2px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: border-color .2s, box-shadow .2s;
}
.bc:hover { border-color: rgba(255,255,255,.18); box-shadow: 0 0 44.8px rgba(252,12,80,.08); }
.bc-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .38; transition: opacity .2s;
}
.bc:hover .bc-bg { opacity: .2; }
.bc-body { position: relative; z-index: 1; }
.bc-ico { margin-bottom: 12.8px; }
.bc-ico svg { width: 44.8px; height: 44.8px; color: var(--primary); }
.bc-name { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.bc-desc { font-size: .85rem; color: var(--fg60); margin-top: 9.6px; line-height: 1.5; overflow-wrap: anywhere; }
.bc-cta { display: inline-block; margin-top: 16px; font-size: .82rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.bc-cta:hover { text-decoration: underline; }

/* Каскадный reveal бенто-карточек: та же .rv/.in логика (IntersectionObserver
   на странице), но с нарастающей задержкой — появление "волной", не все сразу. */
.bento .bc:nth-child(1) { transition-delay: 0ms; }
.bento .bc:nth-child(2) { transition-delay: 70ms; }
.bento .bc:nth-child(3) { transition-delay: 140ms; }
.bento .bc:nth-child(4) { transition-delay: 210ms; }
.bento .bc:nth-child(5) { transition-delay: 280ms; }

/* ══ SERVICE CARDS ══ */
.sgrid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 22.4px; width: 100%; margin-top: 57.6px;
}
.sc {
  position: relative; overflow: hidden;
  border: 1.6px solid rgba(255,255,255,0.07);
  border-radius: 32px;
  background: linear-gradient(160deg, #141118 0%, #0c090f 60%, #100816 100%);
  padding: 1.4rem;
  display: flex; flex-direction: column;
  cursor: pointer; transition: transform .15s, border-color .15s;
  text-decoration: none; color: inherit; gap: 0.75rem;
}
.sc:hover:not(.sc-dis) { border-color: rgba(220,60,90,0.3); }
.sc-dis { cursor: not-allowed; }
.sc-bottom-line {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3.2px; background: linear-gradient(90deg, transparent, rgba(220,60,90,0.7), transparent);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.sc:hover .sc-bottom-line { opacity: 1; }
.sc-proxy { grid-column: span 12; }
.sc-vds   { grid-column: span 12; }
.sc-mc    { grid-column: span 12; }
.sc-dom   { grid-column: span 12; }
@media(min-width:1120px){
  .sc-proxy,.sc-vds,.sc-mc,.sc-dom { grid-column: span 6; }
}
.sc-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12.8px;
  padding: 17.6px 25.6px; border-radius: 19.2px;
  background: rgba(255,255,255,0.06); border: 1.6px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85); font-size: 20.8px; font-weight: 600;
  font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  margin-top: auto; width: 100%;
}
.sc:hover:not(.sc-dis) .sc-cta { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.sc-ico {
  width: 54.4px; height: 54.4px;
  background: rgba(255,255,255,0.06); border: 1.6px solid rgba(255,255,255,0.1);
  border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sc-ico svg { width: 20.8px; height: 20.8px; color: rgba(255,255,255,0.65); }
.sc-title { font-size: 1.2rem; font-weight: 700; margin-top: 0; line-height: 1.2; }
.sc-desc { font-size: .85rem; color: var(--fg60); margin-top: 9.6px; line-height: 1.5; }
.sc-bg-ico {
  position: absolute; bottom: -128px; right: -128px;
  width: 352px; height: 352px;
  opacity: .07; pointer-events: none; z-index: 0; color: var(--primary);
}
.sc-bg-ico svg { width: 100%; height: 100%; }
.sc > *:not(.sc-bg-ico) { position: relative; z-index: 1; }
.cs-overlay {
  position: absolute; inset: 0; z-index: 10;
  border-radius: 25.6px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s, backdrop-filter .25s;
}
.sc-dis:hover .cs-overlay {
  opacity: 1; background: rgba(0,0,0,.5); backdrop-filter: blur(6.4px);
}
.cs-overlay svg { width: 70.4px; height: 70.4px; }

/* ══ FOOTER BIG TEXT ══ */
.fbt-wrap {
  max-width: 1280px; width: 100%;
  margin: 76.8px auto 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.fbt {
  font-size: clamp(4rem,11vw,7.5rem);
  font-weight: 800; letter-spacing: -.05em;
  background: radial-gradient(circle, rgba(245,245,248,0.2) 0%, rgba(245,245,248,0.05) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none; cursor: pointer; transition: all .3s ease;
}
.fbt-wrap:hover .fbt {
  background: radial-gradient(circle, var(--primary) 0%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: var(--primary);
}

/* ══ FOOTER ══ */
footer {
  width: 100%; padding: 64px 48px;
  border-top: 1.6px solid var(--border);
}
@media(max-width: 1229px) { footer { padding: 57.6px 25.6px; } }

.finner {
  max-width: 2304px; margin: 0 auto;
  display: flex; gap: 51.2px;
  justify-content: space-between; flex-wrap: wrap;
}
@media(max-width:1024px){
  .finner { flex-direction: column-reverse; align-items: center; text-align: center; }
  .fright { align-items: center; }
}
.fleft { display: flex; flex-direction: column; }
.flogo { display: flex; align-items: center; gap: 12.8px; }
.flogo img {
  width: 76.8px; height: 76.8px;
  object-fit: contain; display: block; border-radius: 16px;
}
.flogo span { font-size: 1.4rem; font-weight: 700; }
.fcopy { color: var(--fg60); font-size: .82rem; font-weight: 500; margin-top: 22.4px; }
.flegal { margin-top: 28.8px; display: flex; flex-direction: column; gap: 3.2px; color: var(--fg40); font-size: .78rem; }
.fpay { margin-top: 28.8px; display: flex; align-items: center; gap: 22.4px; flex-wrap: wrap; }
.fpay img { max-height: 41.6px; object-fit: contain; opacity: .7; }
.fright { display: flex; flex-direction: column; align-items: flex-end; }
.fsect-title { font-size: 1rem; font-weight: 600; margin: 22.4px 0 9.6px; }
.fsect-title:first-child { margin-top: 0; }
.flink {
  position: relative; color: var(--fg60); font-size: .95rem; font-weight: 500;
  text-decoration: none; display: block; line-height: 1.95; transition: color .15s;
  width: fit-content;
}
.flink::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 3.2px; height: 1.6px;
  background: linear-gradient(90deg, var(--primary), #ff5a91);
  transition: right .25s ease;
}
.flink:hover { color: var(--fg); text-decoration: none; }
.flink:hover::after { right: 0; }

/* ══ MODALS ══ */
.ov {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(12.8px);
  align-items: center; justify-content: center; padding: 25.6px;
}
.ov.open { display: flex; animation: fadeIn .2s ease-out; }
.modal {
  background: var(--card2);
  border: 1.6px solid var(--border);
  border-radius: 32px; padding: 51.2px;
  max-width: 640px; width: 100%; position: relative;
}
.ov.open .modal { animation: modalIn .25s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14.4px) scale(.97); } to { opacity: 1; transform: none; } }
.mcls {
  position: absolute; top: 22.4px; right: 22.4px;
  background: none; border: none; color: var(--fg);
  cursor: pointer; font-size: 1.1rem; padding: 8px;
  border-radius: 9.6px; transition: background .15s; line-height: 1;
}
.mcls:hover { background: rgba(255,255,255,.08); }
.mcls:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.modal h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.modal p  { font-size: .85rem; color: var(--fg60); margin-top: 8px; }
.fg { margin-top: 22.4px; display: flex; flex-direction: column; gap: 8px; }
.fg label { font-size: .82rem; font-weight: 500; }
.fg input {
  background: rgba(255,255,255,.06);
  border: 1.6px solid var(--border);
  border-radius: 14.4px; padding: 16px 20.8px;
  color: var(--fg); font-family: inherit; font-size: .92rem;
  outline: none; transition: border-color .15s;
}
.fg input:focus { border-color: var(--primary); }
.fgtop { display: flex; justify-content: space-between; align-items: baseline; }
.forg {
  background: none; border: none; color: var(--fg40);
  font-family: inherit; font-size: .75rem; font-weight: 500;
  cursor: pointer; text-decoration: underline;
}
.forg:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.modal .btn { margin-top: 28.8px; width: 100%; justify-content: center; }
@media(max-width: 480px) {
  .ov { padding: 12.8px; }
  .modal { padding: 32px 22.4px; border-radius: 24px; }
  .mcls { top: 16px; right: 16px; }
}

/* ══ CONFIRM DIALOG (замена нативного confirm()/alert() — vxConfirm/vxToast, main/header.html) ══ */
.confirm-modal { max-width: 420px; padding: 32px; }
.confirm-actions { display: flex; gap: 12.8px; margin-top: 28.8px; }
.confirm-actions .btn { flex: 1; margin-top: 0; }
@media(max-width: 480px) {
  .confirm-modal { padding: 25.6px 22.4px; }
  .confirm-actions { flex-direction: column-reverse; }
}

/* ══ REVEAL ANIMATION ══ */
.rv { opacity: 0; transform: translateY(35.2px); transition: opacity .5s, transform .5s; }
.rv.in { opacity: 1; transform: none; }

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}
.bounce { animation: bounce 2s infinite; }

/* ══ ENTRANCE ANIMATIONS (dashboard / catalog) ══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Единый стиль появления для всех страниц личного кабинета — как на
   главной и на странице авторизации: сперва заголовок, затем контент. */
.main > * { animation: fadeUp .55s ease-out both; }
.main > *:nth-child(1) { animation-delay: 0s; }
.main > *:nth-child(2) { animation-delay: .1s; }
.main > *:nth-child(n+3) { animation-delay: .16s; }

.tk-grid > .tk-card,
.act-grid > .act-card,
.tariff-grid > .tariff-card,
.grid > .card,
.servers-grid > .server-card,
.inv-grid > .inv-card {
  animation: fadeUp .5s ease-out both;
}
.tk-grid > .tk-card:nth-child(1), .act-grid > .act-card:nth-child(1), .tariff-grid > .tariff-card:nth-child(1), .grid > .card:nth-child(1), .servers-grid > .server-card:nth-child(1), .inv-grid > .inv-card:nth-child(1) { animation-delay: .08s; }
.tk-grid > .tk-card:nth-child(2), .act-grid > .act-card:nth-child(2), .tariff-grid > .tariff-card:nth-child(2), .grid > .card:nth-child(2), .servers-grid > .server-card:nth-child(2), .inv-grid > .inv-card:nth-child(2) { animation-delay: .14s; }
.tk-grid > .tk-card:nth-child(3), .act-grid > .act-card:nth-child(3), .tariff-grid > .tariff-card:nth-child(3), .grid > .card:nth-child(3), .servers-grid > .server-card:nth-child(3), .inv-grid > .inv-card:nth-child(3) { animation-delay: .2s; }
.tk-grid > .tk-card:nth-child(4), .tariff-grid > .tariff-card:nth-child(4), .grid > .card:nth-child(4), .servers-grid > .server-card:nth-child(4), .inv-grid > .inv-card:nth-child(4) { animation-delay: .26s; }
.tk-grid > .tk-card:nth-child(n+5), .tariff-grid > .tariff-card:nth-child(n+5), .grid > .card:nth-child(n+5), .servers-grid > .server-card:nth-child(n+5), .inv-grid > .inv-card:nth-child(n+5) { animation-delay: .32s; }

.tk-card { transition: transform .25s, border-color .25s; }
.tk-card:hover { transform: translateY(-3px); border-color: rgba(220,60,90,.25); }
.tariff-card { transition: border-color .3s; }

.btn:active, .menu-item:active, .buy-btn:active, .sc-cta:active { transform: scale(.96); }
.menu-item:hover { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  .main > *,
  .tk-grid > .tk-card, .act-grid > .act-card, .tariff-grid > .tariff-card, .grid > .card,
  .servers-grid > .server-card, .tariff-card.is-featured::before, .tariff-card .card-spotlight,
  .rv, .sidebar.open, .sidebar-backdrop.open,
  .ov.open, .ov.open .modal { animation: none !important; transition: none !important; }
}

/* ══ PAGE TRANSITIONS (между полными переходами страниц) ══
   Нативный кроссфейд браузера между документами вместо ручного fade
   через JS/классы — тот подход давал двойное затемнение (уход + пустой
   экран + появление), что выглядело как моргание, а не переход. */
@view-transition {
  navigation: auto;
}
::view-transition-group(root) { background-color: var(--bg); }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .22s;
  animation-timing-function: ease-out;
  background-color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ══ FLASH MESSAGES (django messages, единая точка рендера — main/header.html) ══ */
.flash-messages {
  position: fixed; top: 148px; left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; flex-direction: column; gap: 10px;
  width: min(560px, calc(100% - 48px));
}
.flash-msg {
  padding: .95rem 1.3rem; border-radius: 14px; font-size: .9rem;
  text-align: center; backdrop-filter: blur(12.8px); -webkit-backdrop-filter: blur(12.8px);
  box-shadow: 0 12.8px 32px rgba(0,0,0,.35);
  animation: fadeUp .35s ease-out both;
}
.flash-msg.success { background: rgba(15,35,22,.9); color: #4ade80; border: 1.6px solid rgba(74,222,128,.3); }
.flash-msg.error   { background: rgba(40,14,14,.9); color: #f87171; border: 1.6px solid rgba(239,68,68,.3); }
.flash-msg.warning { background: rgba(45,32,10,.9); color: #fbbf24; border: 1.6px solid rgba(245,158,11,.3); }
.flash-msg.info, .flash-msg.debug { background: rgba(13,22,40,.9); color: #60a5fa; border: 1.6px solid rgba(59,130,246,.3); }

.btn-pri .bounce { stroke: #1b1a21 !important; }
.btn-pri .bounce, .btn-pri .bounce * { stroke: #1b1a21 !important; fill: #1b1a21 !important; color: #1b1a21 !important; }
svg.bounce line, svg.bounce path, svg.bounce polyline, svg.bounce circle, svg.bounce rect { stroke: #1b1a21 !important; }

/* ══ SERVICE TABS ══ */
.svc-tabs-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; max-width: 100%; }
.svc-tabs {
  background: rgba(255,255,255,0.03); border: 1.6px solid rgba(255,255,255,0.06);
  border-radius: 28.8px; padding: 9.6px;
  display: inline-flex; gap: 3.2px; flex-wrap: wrap; justify-content: center;
  max-width: 100%;
}
.svc-tab {
  display: inline-flex; align-items: center; gap: 12.8px;
  padding: 14.4px 35.2px; border-radius: 20.8px; border: none;
  background: none; color: rgba(255,255,255,0.45);
  font-family: 'JetBrains Mono', monospace; font-size: 19.2px; font-weight: 700;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.svc-tab.active { background: rgba(255,255,255,0.08); color: #fff; }
.svc-tab:disabled { opacity: 0.35; cursor: not-allowed; }
.svc-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.svc-tab svg { width: 24px; height: 24px; flex-shrink: 0; }
@media(max-width: 480px) {
  .svc-tab { padding: 12px 16px; font-size: 15.2px; gap: 8px; }
}
.soon-pill {
  font-size: 14.4px; font-weight: 700; color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06); border: 1.6px solid rgba(255,255,255,0.1);
  border-radius: 6.4px; padding: 3.2px 8px; letter-spacing: 0.05em;
}

/* ══ TARIFF FILTERS ══ */
.filters-wrap { width: 100%; margin-bottom: 2rem; }
.filters-meta { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 12.8px; }
.filter-label {
  font-size: 16px; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25); display: flex; align-items: center; gap: 8px;
}
.filter-label svg { width: 17.6px; height: 17.6px; opacity: 0.6; }
.flag-group {
  display: flex; gap: 9.6px;
  background: rgba(255,255,255,0.03); border: 1.6px solid rgba(255,255,255,0.06);
  border-radius: 22.4px; padding: 9.6px;
}
.flag-btn {
  width: 64px; height: 64px; border-radius: 16px; border: none;
  background: none; font-size: 32px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.flag-btn.active { background: rgba(255,255,255,0.1); }
.flag-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.flag-btn:focus-visible, .cat-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cat-group {
  display: flex; gap: 1.6px;
  background: rgba(255,255,255,0.03); border: 1.6px solid rgba(255,255,255,0.06);
  border-radius: 22.4px; padding: 9.6px;
}
.cat-btn {
  display: inline-flex; align-items: center; gap: 9.6px;
  padding: 14.4px 22.4px; border-radius: 14.4px; border: none;
  background: none; color: rgba(255,255,255,0.25);
  font-family: 'JetBrains Mono', monospace; font-size: 17.6px; font-weight: 700;
  letter-spacing: 0.07em; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.cat-btn.active { color: #fff; background: rgba(255,255,255,0.08); }
.cat-btn svg { width: 22.4px; height: 22.4px; opacity: 0.5; }
.cat-btn.active svg { opacity: 1; }
/* На узких телефонах flag-group/cat-group с их крупным паддингом не
   влезают в один ряд вместе — последняя кнопка (напр. "Coding") уезжала
   за экран без скролла и была недостижима тапом. */
@media(max-width: 480px) {
  .flag-btn { width: 48px; height: 48px; font-size: 24px; }
  .cat-btn { padding: 10px 14px; font-size: 14.4px; gap: 6px; }
  .cat-group { flex-wrap: wrap; }
  .filters-meta { gap: 1.5rem; }
}

/* ══ TARIFF CARDS ══ */
.tariff-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px; width: 100%; margin-top: 2rem;
}
@media(max-width: 1760px) { .tariff-grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 1280px)  { .tariff-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 896px)  { .tariff-grid { grid-template-columns: 1fr; gap: 22.4px; } }

.tariff-card {
  position: relative; display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.4rem; border-radius: 32px;
  background: linear-gradient(160deg, #141118 0%, #0c090f 60%, #100816 100%);
  border: 1.6px solid rgba(255,255,255,0.07);
  overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%; align-self: start;
}
.tariff-card:hover {
  border-color: rgba(220,60,90,0.3);
  box-shadow: 0 0 48px rgba(252,12,80,.1), 0 0 0 1px rgba(252,12,80,.04) inset;
}
.tariff-card:hover .card-bottom-line { opacity: 1; }

/* Премиальный 3D-наклон + свечение под курсором. --mx/--my задаются
   JS-ом из buy.html/order-checkout.html по позиции курсора. Строго
   только на точных указателях (мышь) — на тач-экранах mousemove не
   стреляет стабильно и это бы просто мусорило лишними слушателями. */
@media (hover: hover) and (pointer: fine) {
  .tariff-card {
    transition: transform .15s ease-out, border-color .3s, box-shadow .3s;
    will-change: transform;
  }
  .tariff-card .card-spotlight {
    position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 50%), rgba(252,12,80,.22), transparent 68%);
    opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 1;
  }
  .tariff-card:hover .card-spotlight { opacity: 1; }
  .icon-box { transition: transform .25s, box-shadow .25s; }
  .tariff-card:hover .icon-box { transform: scale(1.08); box-shadow: 0 0 22.4px rgba(252,12,80,.32); }
}

/* Выделенный тариф — медленно переливающаяся розовая рамка. Какой именно
   тариф выделен — решает Tariff.get_featured_id() (main/models.py): вручную
   через is_featured в панели, либо автоматически по числу купленных
   серверов, если вручную никто не выбран. Рамка — псевдоэлемент с padding +
   mask, border-image тут не подходит из-за border-radius карточки. */
.tariff-card.is-featured { border-color: rgba(252,12,80,.5); }
.tariff-card.is-featured::before {
  content: ''; position: absolute; inset: 0; padding: 1.6px;
  border-radius: inherit; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, #fc0c50, #ff65a6, #fc0c50 35%, #8a0030, #fc0c50 70%, #ff65a6, #fc0c50);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: featuredBorderFlow 7s linear infinite;
}
.tariff-card.is-featured:hover {
  box-shadow: 0 0 64px rgba(252,12,80,.22), 0 0 0 1px rgba(252,12,80,.08) inset;
}
@keyframes featuredBorderFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.featured-ribbon {
  position: absolute; top: 0; right: 0; z-index: 3;
  font-family: 'JetBrains Mono', monospace; font-size: 12.8px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #fc0c50, #ff65a6);
  padding: 8px 20px 8px 16px;
  border-radius: 0 28px 0 16px;
  box-shadow: 0 6.4px 20px rgba(252,12,80,.4);
  pointer-events: none;
}

.card-glow {
  position: absolute; top: -96px; right: -64px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(190,50,80,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.card-bottom-line {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3.2px;
  background: linear-gradient(90deg, transparent, rgba(220,60,90,0.7), transparent);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.card-top {
  position: relative; display: flex; align-items: center;
  justify-content: space-between; gap: 0.75rem;
}
.name-block { display: flex; align-items: center; gap: 16px; min-width: 0; }
.icon-box {
  flex-shrink: 0; width: 54.4px; height: 54.4px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(252,12,80,.16), rgba(252,12,80,.03));
  border: 1.6px solid rgba(252,12,80,.22);
  display: flex; align-items: center; justify-content: center;
}
.icon-box svg { width: 20.8px; height: 20.8px; color: var(--primary); }
.tariff-title, .server-title {
  font-family: 'JetBrains Mono', monospace; font-size: 20.8px; font-weight: 700;
  color: #fff; letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.country-flag { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }

.price-block {
  position: relative; display: flex; align-items: baseline; gap: 12.8px; flex-wrap: wrap;
}
.old-price {
  font-family: 'JetBrains Mono', monospace; font-size: 22.4px;
  color: rgba(255,255,255,0.3); text-decoration: line-through;
}
.current-price {
  font-family: 'JetBrains Mono', monospace; font-size: 32px;
  font-weight: 700; color: #fff; line-height: 1;
}
.price-period { font-size: 19.2px; font-weight: 400; color: rgba(255,255,255,0.4); }
.discount-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700;
  color: #4ade80; background: rgba(74,222,128,0.12);
  border: 1.6px solid rgba(74,222,128,0.25);
  border-radius: 9.6px; padding: 4.8px 12.8px;
}
.card-divider {
  height: 1.6px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.specs { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.spec-row { display: flex; align-items: center; gap: 16px; }
.spec-icon-wrap {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 12.8px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
}
.spec-icon-wrap svg { width: 17.6px; height: 17.6px; color: rgba(255,255,255,0.35); }
.spec-text { display: flex; flex-direction: column; gap: 1.6px; min-width: 0; }
.spec-label {
  font-size: 16px; color: rgba(255,255,255,0.35);
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.spec-value { font-size: 20px; color: rgba(255,255,255,0.82); font-weight: 500; }
.spec-network { color: #6ee7b7; }

.buy-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12.8px;
  padding: 17.6px 25.6px; border-radius: 19.2px;
  background: rgba(255,255,255,0.06); border: 1.6px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  font-size: 20.8px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer;
  transition: background 0.25s, border-color 0.25s; margin-top: auto;
}
.buy-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.buy-btn svg { width: 22.4px; height: 22.4px; opacity: 0.7; }

/* ══ APP SHELL (sidebar + main content, sits above the footer) ══ */
.app-shell {
  display: flex;
  margin-top: 128px;
  min-height: calc(100vh - 128px);
}
@media(max-width:1100px){ .app-shell { display: block; } }

/* ══ APP SIDEBAR ══ */
.sidebar {
  position: sticky; top: 128px; align-self: stretch; flex-shrink: 0;
  width: clamp(320px, 22vw, 420px);
  background: rgba(255,255,255,0.02); border-right: 1.6px solid var(--border);
  overflow-x: hidden; z-index: 40;
  padding: 1.25rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
@media(max-width:1100px){ .sidebar { display: none; } }
@media(max-width:1100px){
  /* Боковая шторка слева неудобна на телефоне (накрывает половину экрана,
     тянуться большим пальцем через весь экран) — меню выезжает снизу, как
     нижний лист (ср. .mobile-menu-modal в order-checkout.html). */
  .sidebar.open {
    display: flex !important; background: #0a0a0a; border-right: none;
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 60;
    width: 100%; max-height: min(82vh, calc(100% - 32px));
    border-radius: 28px 28px 0 0;
    border-top: 1.6px solid var(--border);
    box-shadow: 0 -16px 48px rgba(0,0,0,.5);
    padding-top: 1.75rem;
    /* Пункты меню + карточка юзера легко выше короткого вьюпорта телефона —
       без скролла низ списка (Транзакции и т.п.) было не достать. */
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: sheetUp .25s ease-out;
  }
  .sidebar.open::before {
    content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2);
  }
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 59;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6.4px); -webkit-backdrop-filter: blur(6.4px);
}
.sidebar-backdrop.open { display: block; animation: fadeIn .2s ease-out; }
body.sidebar-locked { overflow: hidden; }
body.sidebar-locked .mobile-menu-fab { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.user-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 0.75rem;
  background: rgba(255,255,255,0.04); border: 1.6px solid var(--border);
  border-radius: 19.2px; margin-bottom: 0.5rem;
}
.user-avatar {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, #fc0c50, #ff5a91);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; flex-shrink: 0;
}
.user-info h3 { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.user-info p  { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 3.2px; }

.sb-section-title {
  font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.28);
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.75rem 0.75rem 0.25rem;
}
.menu-item {
  position: relative;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.75rem; border-radius: 14.4px;
  color: rgba(255,255,255,0.55); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.menu-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.9); }
.menu-item.active {
  background: rgba(255,255,255,0.08); color: #fff;
  box-shadow: inset 0 0 0 1.6px rgba(252,12,80,.12), 0 0 22.4px rgba(252,12,80,.1);
}
.menu-item.active::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3.2px;
  border-radius: 4px; background: linear-gradient(180deg, var(--primary), #ff5a91);
}
.menu-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.menu-item svg { width: 25.6px; height: 25.6px; flex-shrink: 0; opacity: 0.65; }
.menu-item.active svg { opacity: 1; }
.menu-label { flex: 1; min-width: 0; }
.arrow { margin-left: auto; opacity: 0.25; flex-shrink: 0; }
.soon-badge-sb {
  margin-left: auto; flex-shrink: 0; font-size: 0.58rem; font-weight: 700;
  color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.05);
  border: 1.6px solid var(--border); border-radius: 6.4px; padding: 3.2px 8px;
}

/* ══ APP MAIN CONTENT AREA ══ */
.main {
  flex: 1; min-width: 0; padding: 2rem;
}
@media(max-width:1024px){ .main { padding: 1rem; } }

/* ══ INPUTS (global) ══ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  background: rgba(255,255,255,.06);
  border: 1.6px solid var(--border);
  border-radius: 14.4px; padding: 16px 20.8px;
  color: var(--fg); font-family: inherit; font-size: .92rem;
  outline: none; transition: border-color .15s;
  width: 100%;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.2px rgba(252,12,80,0.1);
}
input::placeholder { color: rgba(255,255,255,0.3); }
input[type="checkbox"],
input[type="radio"] { accent-color: var(--primary); cursor: pointer; }

/* ══ UTILITY ══ */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--fg60); }
.text-muted { color: var(--fg40); }
.bg-card { background: var(--card); }
.bg-dark { background: var(--bg); }