/*
 * Пробное оформление кабинета в языке новой главной Android 2.3
 * (VeliusClient/android/prototypes/home-split.html, settings-split.html).
 *
 * Подключается только при `ui: "next"` в config.js (app.js, NEXT_UI) — то есть
 * на отдельной выкладке для владельца. Все правила под :root[data-ui="next"]:
 * без флага этот файл не меняет ничего.
 *
 * Отличия от прежнего вида — те же, что у клиента: шрифт Onest, ни одной
 * контурной обводки (карточку отличает тон поверхности и мягкая длинная тень),
 * статус экрана крупным текстом без карточки, главные действия большими
 * карточками, суммы пополнения лентой.
 */

@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../assets/fonts/onest-regular.ttf") format("truetype"); }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url("../assets/fonts/onest-medium.ttf") format("truetype"); }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("../assets/fonts/onest-semibold.ttf") format("truetype"); }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url("../assets/fonts/onest-bold.ttf") format("truetype"); }
@font-face { font-family: "Onest"; font-weight: 800; font-display: swap; src: url("../assets/fonts/onest-extrabold.ttf") format("truetype"); }

/* ─────────────────────────────────────────── Токены (values/colors.xml, home_*) */

:root[data-ui="next"] {
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg-base: #0d0e12;
  --bg-veil: #15161b;
  --glass-1-fill: #15161b;
  --glass-1-edge: transparent;
  --glass-2-fill: #1b1d23;
  --glass-2-edge: transparent;
  --glass-3-fill: #23252c;
  --glass-3-edge: rgba(237, 238, 242, 0.07);
  --sheet-fill: #15161b;
  --ink: #edeef2;
  --ink-soft: rgba(237, 238, 242, 0.58);
  --ink-dim: rgba(237, 238, 242, 0.40);
  --accent: #818cf8;
  --accent-strong: #4f46e5;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --nx-surface-3: #22242b;
  --nx-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.18);
  --nx-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
  --nx-glow: 0 10px 30px rgba(79, 70, 229, 0.5);
  --shadow-sm: var(--nx-shadow);
  --r-md: 20px;
  --r-chip: 12px;
  --tile: 38px;
  --r-tile-sm: 12px;
  --nav-h: 64px;
  --nav-pad: 6px;
  --nav-r: 22px;
  --nav-tab-r: 16px;
}

:root[data-ui="next"][data-theme="light"] {
  --bg-base: #f6f7f9;
  --bg-veil: #ffffff;
  --glass-1-fill: #ffffff;
  --glass-2-fill: #f4f5f8;
  --glass-3-fill: #ffffff;
  --glass-3-edge: rgba(11, 12, 16, 0.06);
  --sheet-fill: #ffffff;
  --ink: #0b0c10;
  --ink-soft: rgba(11, 12, 16, 0.56);
  --ink-dim: rgba(11, 12, 16, 0.40);
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: rgba(99, 102, 241, 0.09);
  --nx-surface-3: #eef0f4;
  --nx-shadow: 0 12px 30px rgba(11, 12, 20, 0.05), 0 2px 6px rgba(11, 12, 20, 0.03);
  --nx-shadow-soft: 0 10px 26px rgba(11, 12, 20, 0.045);
  --nx-glow: 0 12px 30px rgba(67, 56, 202, 0.32);
}

/* ─────────────────────────────────────────── Общие части */

:root[data-ui="next"] .screen-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

:root[data-ui="next"] .card {
  border: 0;
  border-radius: 22px;
  box-shadow: var(--nx-shadow);
}

:root[data-ui="next"] .card.is-flush {
  padding: 6px;
}

/* Строки внутри карточки — без линий между ними: каждая своя «таблетка». */
:root[data-ui="next"] .card.is-flush > .row {
  padding: 12px 10px 12px 12px;
  border-radius: 16px;
}

:root[data-ui="next"] .row + .row {
  border-top: 0;
  margin-top: 2px;
}

:root[data-ui="next"] .row-title {
  font-weight: 650;
}

:root[data-ui="next"] .row-hint {
  font-size: 12px;
  color: var(--ink-soft);
}

:root[data-ui="next"] .tile {
  border-radius: 12px;
}

:root[data-ui="next"] .card.has-head > .card-head h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Главная кнопка — как кнопка включения в клиенте: градиент акцента и свечение. */
:root[data-ui="next"] .btn {
  min-height: 54px;
  border-radius: 18px;
  background: linear-gradient(160deg, #818cf8, #4f46e5 70%);
  box-shadow: var(--nx-glow);
}

:root[data-ui="next"][data-theme="light"] .btn {
  background: linear-gradient(160deg, #6366f1, #4338ca 70%);
}

:root[data-ui="next"] .btn.is-ghost,
:root[data-ui="next"] .btn.is-danger,
:root[data-ui="next"] .btn.is-done {
  border: 0;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow-soft);
}

:root[data-ui="next"] .btn.is-danger { color: var(--danger); }
:root[data-ui="next"] .btn.is-done { color: var(--ok); }

:root[data-ui="next"] .btn.is-small {
  min-height: 40px;
  border-radius: 12px;
  box-shadow: none;
}

:root[data-ui="next"] .field input,
:root[data-ui="next"] .field select,
:root[data-ui="next"] .field textarea {
  border: 0;
  border-radius: 14px;
  background: var(--glass-2-fill);
}

:root[data-ui="next"] .chip,
:root[data-ui="next"] .pay-method {
  border: 0;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow-soft);
}

:root[data-ui="next"] .chip.is-active,
:root[data-ui="next"] .pay-method.is-active {
  background: var(--accent-soft);
  box-shadow: none;
}

:root[data-ui="next"] .stat {
  border: 0;
  box-shadow: var(--nx-shadow);
}

/* Статус раздела без карточки, крупным текстом — как «Подключено» на главной клиента. */
:root[data-ui="next"] .card.hero {
  padding: 4px 4px 2px;
  background: none;
  box-shadow: none;
}

:root[data-ui="next"] .hero-state {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

:root[data-ui="next"] .hero-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

:root[data-ui="next"] .hero-note {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────── Нижняя панель */

:root[data-ui="next"] .tabbar {
  border: 0;
  background: var(--glass-3-fill);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--nx-shadow), inset 0 0 0 1px var(--glass-3-edge);
}

:root[data-ui="next"] .tab {
  gap: 3px;
  font-size: 11px;
}

:root[data-ui="next"] .tab.is-active {
  color: var(--accent);
}

/* ─────────────────────────────────────────── Главная */

:root[data-ui="next"] [data-page="home"] .screen-head {
  display: none;
}

.nx-hero {
  padding: 14px 4px 4px;
}

.nx-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nx-title {
  margin: 8px 0 0;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nx-title-soft {
  color: var(--ink-dim);
}

.nx-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
}

.nx-stat b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.nx-stat small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nx-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.nx-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nx-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 108px;
  padding: 12px;
  border: 0;
  border-radius: 20px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

.nx-card:active {
  transform: scale(0.97);
}

.nx-card-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--nx-surface-3);
  color: var(--ink-soft);
}

.nx-card-text b {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nx-card-text small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-soft);
}

.nx-card.is-accent {
  background: var(--accent-soft);
  box-shadow: none;
}

.nx-card.is-accent .nx-card-tile {
  background: var(--accent-strong);
  color: #fff;
}

.nx-card.is-accent b {
  color: var(--accent);
}

/* Широкая строка-карточка: приглашение, следующий тариф. */
.row.nx-wide {
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
}

.row.nx-wide + .row.nx-wide {
  margin-top: 0;
}

/* ─────────────────────────────────────────── Пополнение: лента сумм */

/* Лента выходит за поля карточки к её краям, а последняя видимая сумма
   срезана: так видно, что ряд продолжается. Справа — затухание, внизу —
   подпись «листайте» и точки. */
.nx-rail {
  position: relative;
  margin: 12px -16px 0;
}

.nx-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 12px;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--bg-base));
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

.nx-rail.is-end::after {
  opacity: 0;
}

.nx-amounts {
  display: flex;
  gap: 10px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.nx-amounts::-webkit-scrollbar {
  display: none;
}

.nx-amounts .chip {
  flex: none;
  scroll-snap-align: start;
  box-shadow: var(--nx-shadow) !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 112px;
  min-height: 86px;
  padding: 12px;
  border-radius: 18px;
  background: var(--glass-1-fill);
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: left;
  white-space: nowrap;
}

.nx-amounts .chip .chip-note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.nx-amounts .chip .chip-note.is-bonus {
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--ok);
  background: var(--ok-soft);
}

.nx-amounts .chip.is-active {
  background: var(--accent-soft);
  box-shadow: none !important;
  color: var(--accent);
}

.nx-amounts .chip.is-own {
  font-size: 15px;
  font-weight: 700;
}

.chip-own-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--nx-surface-3);
  color: var(--accent);
}

.nx-swipe {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 2px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-dim);
}

.nx-dots {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nx-dots i {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink-dim);
  opacity: 0.5;
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nx-dots i.is-on {
  width: 14px;
  background: var(--accent);
  opacity: 1;
}

/* Поле своей суммы выезжает под лентой, когда нажали «Своя сумма». */
:root[data-ui="next"] .field.is-opening {
  animation: nx-open var(--dur) var(--ease) both;
}

:root[data-ui="next"] .field.is-opening input {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@keyframes nx-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

:root[data-ui="next"] .topup-ladder {
  margin-top: 4px;
}

/* Лесенка бонуса: подпись строкой, ступени под ней в один ряд. */
:root[data-ui="next"] .topup-ladder {
  gap: 6px;
}

:root[data-ui="next"] .topup-ladder-lead {
  flex-basis: 100%;
}

:root[data-ui="next"] .topup-step {
  border: 0;
  background: var(--glass-2-fill);
}

/* ─────────────────────────────────────────── Разделы целиком (макет) */

/* Шапку раздела из разметки заменяет крупный заголовок (nextHero). */
:root[data-ui="next"] .page .screen-head {
  display: none;
}

/* Знак Velius 2 — как в приложениях с 3.6.7: без белой плитки, цвет от
   темы (в светлой тёмный круг, в тёмной светлый, волна прорезает его до
   фона). Знак рисует маска, картинка старого знака в разметке скрыта. */
:root[data-ui="next"] .brand-mark {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--ink);
  -webkit-mask: url("../assets/v2/velius-mark.svg") center / contain no-repeat;
  mask: url("../assets/v2/velius-mark.svg") center / contain no-repeat;
}

:root[data-ui="next"] .brand-mark img {
  visibility: hidden;
}

/* Шапка кабинета — как у главной клиента: знак, слово, кнопки-плитки. */
:root[data-ui="next"] .topbar .brand-mark {
  width: 30px;
  height: 30px;
}

:root[data-ui="next"] .topbar .brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

:root[data-ui="next"] .topbar .id-chip,
:root[data-ui="next"] .topbar .icon-button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow-soft);
}

:root[data-ui="next"] .topbar .icon-button {
  width: 40px;
}

.nx-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: -6px 0 6px -4px;
  padding: 0 6px 0 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.nx-back svg {
  transform: rotate(180deg);
}

/* Чипы: фильтр устройств, система в «Подключении». Лентой, без переноса. */
.nx-chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 4px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nx-chips::-webkit-scrollbar {
  display: none;
}

.nx-chip {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow-soft);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.nx-chip.is-active {
  background: var(--accent-soft);
  box-shadow: none;
  color: var(--accent);
  font-weight: 600;
}

/* Лента карточек (приложения, тарифы, «Быстро»). */
.nx-track {
  display: flex;
  gap: 10px;
  padding: 4px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.nx-track::-webkit-scrollbar {
  display: none;
}

.nx-track > * {
  flex: none;
  scroll-snap-align: start;
}

.nx-track .nx-card {
  width: 140px;
  min-height: 104px;
}

.nx-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.nx-card .nx-card-tile {
  font-size: 18px;
}

.nx-pill {
  padding: 4px 8px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nx-pill.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.nx-card.is-accent .nx-pill {
  background: var(--accent-strong);
  color: #fff;
}

.nx-toggle .switch {
  flex: none;
}

/* Тарифы лентой. */
.nx-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 212px;
  min-height: 160px;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.nx-plan.is-current {
  background: var(--accent-soft);
  box-shadow: none;
}

.nx-plan-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.nx-plan.is-current .nx-plan-name {
  color: var(--accent);
}

.nx-plan-price {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.nx-plan-price small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.nx-plan-lines {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Аккаунт сверху «Настроек» — как «Это устройство» в клиенте. */
.nx-account {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px;
  border: 0;
  border-radius: 22px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.nx-account .tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.nx-account-text {
  flex: 1;
  min-width: 0;
}

.nx-account-text b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.nx-account-text small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nx-hint {
  margin: -4px 4px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.nx-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
}

/* Пополнение без рамки карточки — разделы лежат на фоне, как в макете. */
:root[data-ui="next"] .card.nx-plain {
  padding: 0;
  background: none;
  box-shadow: none;
}

/* ─────────────────────────────────────────── Нижняя панель действия
   Как выбор сервера и кнопка включения в клиенте: слева — что сделаем,
   справа — квадратная кнопка с градиентом. Стоит над вкладками. */
.nx-dock {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 12px + var(--nav-h) + 10px);
  transform: translateX(-50%);
  z-index: 39;
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: min(calc(var(--content-max) - 8px), calc(100% - 24px));
}

.nx-dock::before {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -34px;
  bottom: calc(-1 * (var(--nav-h) + 22px + var(--safe-bottom)));
  z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg-base) 34px);
  pointer-events: none;
}

.nx-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 12px 12px 14px;
  border: 0;
  border-radius: 24px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

.nx-pick .tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.nx-pick-text {
  flex: 1;
  min-width: 0;
}

.nx-pick-text b {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nx-pick-text small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nx-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 76px;
  min-height: 76px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(160deg, #818cf8, #4f46e5 70%);
  box-shadow: var(--nx-glow);
  color: #fff;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

:root[data-ui="next"][data-theme="light"] .nx-go {
  background: linear-gradient(160deg, #6366f1, #4338ca 70%);
}

.nx-pick:active,
.nx-go:active {
  transform: scale(0.97);
}

.nx-go svg {
  width: 28px;
  height: 28px;
}

/* Занята, пока выписывается заказ: второе нажатие не должно ничего делать. */
.nx-go:disabled {
  cursor: progress;
  opacity: 0.55;
}

/* Под панелью действия список должен прокручиваться до конца. */
:root[data-ui="next"] .app.has-dock > main {
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 34px + 92px);
}

/* ─────────────────────────────────────────── Блок подписки («Устройства») */
.nx-sub {
  padding: 14px;
  border-radius: 22px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow);
}

.nx-sub-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nx-sub-head .tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.nx-sub-text {
  flex: 1;
  min-width: 0;
}

.nx-sub-text b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.nx-sub-text small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-soft);
}

.nx-sub-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.nx-sub-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 60px;
  padding: 8px 4px;
  border: 0;
  border-radius: 16px;
  background: var(--glass-2-fill);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

.nx-sub-action:active {
  transform: scale(0.96);
}

.nx-sub-action.is-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ─────────────────────────────────────────── Подписи и значения */
.nx-sect {
  margin: 4px 4px -6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nx-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 46%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.nx-value i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.nx-value i.is-off {
  background: var(--warn);
}

.nx-pill.is-soft {
  background: var(--glass-2-fill);
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────── Выбор тарифа: кнопка «Выбрать» */
.nx-pick-btn {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

.nx-pick-btn:active {
  transform: scale(0.95);
}

/* Недоступно сейчас — приглушено, но нажимается: объясняет почему. */
.nx-pick-btn.is-off {
  background: var(--glass-2-fill);
  color: var(--ink-dim);
}

/* ─────────────────────────────────────────── Нижнее меню (макет) */
:root[data-ui="next"] {
  --nx-bar: #23252c;
}

:root[data-ui="next"][data-theme="light"] {
  --nx-bar: #ffffff;
}

:root[data-ui="next"] .tabbar {
  height: 64px;
  padding: 6px;
  gap: 2px;
  border-radius: 22px;
  background: var(--nx-bar);
}

:root[data-ui="next"] .tab-indicator {
  border-radius: 16px;
  background: var(--accent-soft);
}

:root[data-ui="next"] .tab {
  gap: 3px;
  border-radius: 16px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

:root[data-ui="next"] .tab .icon {
  width: 21px;
  height: 21px;
}

:root[data-ui="next"] .tab.is-active {
  color: var(--accent);
  font-weight: 600;
}

:root[data-ui="next"] .tab.is-active .icon {
  transform: none;
}

/* ─────────────────────────────────────────── Поддержка: шапка со стрелкой «Назад» */
:root[data-ui="next"] .page[data-page="support"] .screen-head {
  display: block;
}

:root[data-ui="next"] .page[data-page="support"] .screen-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

:root[data-ui="next"] .back-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: var(--glass-1-fill);
  box-shadow: var(--nx-shadow-soft);
}

/* ─────────────────────────────────────────── Нижний лист — сплошной, как в клиенте */
:root[data-ui="next"] .sheet {
  border-top: 0;
  border-radius: 30px 30px 0 0;
  background: var(--bg-base);
}

:root[data-ui="next"] .sheet h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

:root[data-ui="next"] .sheet .card {
  box-shadow: var(--nx-shadow-soft);
}

/* Ключ для приложения — рядом со ссылкой подписки, две кнопки вместо трёх. */
:root[data-ui="next"] .nx-sub-actions.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

:root[data-ui="next"] .nx-key-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

/* Подпись в карточке приложения — не длиннее двух строк: лента карточек
   выравнивается по самой высокой, и одна длинная растягивала все. */
.nx-app .nx-card-text small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Кабинет Velius Enterprise. */
:root[data-ui="next"] .ent-group { padding: 12px 14px 2px; }
.ent-mark { position: relative; display: inline-flex; flex: none; }
.ent-badge {
  position: absolute; right: -6px; bottom: -5px; width: 15px; height: 15px;
  display: grid; place-items: center; border-radius: 5px;
  background: #16a34a; color: #fff; font-size: 10px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 1.5px var(--bg, #0d0e12);
}
:root[data-theme="light"] .ent-badge { box-shadow: 0 0 0 1.5px #f6f7f9; }
:root[data-theme="light"] .ent-switch:not(.is-on) { background: rgba(15, 23, 42, 0.12); }
:root[data-ui="next"] .ent-action { display: grid; gap: 10px; padding: 12px 16px 16px; }
:root[data-ui="next"] .ent-action .note { margin: 0; }
:root[data-ui="next"] .ent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Строки карточек кабинета — отдельные «таблетки» с заметным краем: без фона
   границ между строками не видно вовсе, и список читается одной простынёй. */
:root[data-ui="next"].is-enterprise .card.is-flush > .row {
  background: var(--glass-2-fill);
  box-shadow: inset 0 0 0 1px var(--ent-row-edge, var(--glass-3-edge));
}
:root[data-ui="next"].is-enterprise .card.is-flush > .row + .row { margin-top: 6px; }
:root[data-ui="next"].is-enterprise .card.is-flush > .ent-group { padding: 14px 12px 6px; }
:root[data-ui="next"].is-enterprise .card.is-flush > .ent-group:first-child { padding-top: 8px; }
:root[data-ui="next"].is-enterprise .card.is-flush > .note { margin: 6px; }
:root[data-ui="next"].is-enterprise .card.is-flush > .ent-action { padding: 12px 6px 6px; }
/* В шторках кнопка под карточкой не прилипает к ней. */
:root[data-ui="next"].is-enterprise .sheet > .card + .btn,
:root[data-ui="next"].is-enterprise .sheet > .card + .field { margin-top: 14px; }
:root[data-ui="next"].is-enterprise .sheet > .btn + .btn { margin-top: 10px; }
/* Переписка с поддержкой: свои сообщения справа акцентом, ответы Velius слева. */
.ent-chat {
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(52vh, 460px); overflow-y: auto; padding: 4px 2px 10px;
  overscroll-behavior: contain;
}
.ent-chat > .note { margin: 0; }
.ent-msg { max-width: 86%; padding: 10px 12px; border-radius: 16px; line-height: 1.45; }
.ent-msg.is-mine { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 6px; }
.ent-msg.is-velius { align-self: flex-start; background: var(--glass-2-fill); box-shadow: inset 0 0 0 1px var(--glass-3-edge); border-bottom-left-radius: 6px; }
.ent-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--ink); }
.ent-msg-meta { margin-top: 4px; font-size: 11.5px; color: var(--ink-soft); }
.is-enterprise .sheet > .ent-chat + .field { margin-top: 10px; }
.is-enterprise .sheet > .field + .btn { margin-top: 12px; }
.is-enterprise .pay-method.is-off { opacity: 0.5; }
/* Поля ввода кабинета компании — с видимым краем: в светлой теме заливка поля
   почти совпадает с фоном страницы и карточки, и границ не видно. */
:root[data-ui="next"].is-enterprise { --ent-field-edge: rgba(11, 12, 16, 0.16); --ent-row-edge: rgba(11, 12, 16, 0.09); }
@media (prefers-color-scheme: dark) { :root[data-ui="next"].is-enterprise:not([data-theme="light"]) { --ent-field-edge: rgba(237, 238, 242, 0.14); --ent-row-edge: rgba(237, 238, 242, 0.07); } }
:root[data-ui="next"][data-theme="dark"].is-enterprise { --ent-field-edge: rgba(237, 238, 242, 0.14); --ent-row-edge: rgba(237, 238, 242, 0.07); }
:root[data-ui="next"].is-enterprise .field input,
:root[data-ui="next"].is-enterprise .field select,
:root[data-ui="next"].is-enterprise .field textarea,
:root[data-ui="next"].is-enterprise .chat-compose textarea {
  box-shadow: inset 0 0 0 1px var(--ent-field-edge);
}
:root[data-ui="next"].is-enterprise .field input:focus,
:root[data-ui="next"].is-enterprise .field textarea:focus,
:root[data-ui="next"].is-enterprise .chat-compose textarea:focus {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
:root[data-ui="next"].is-enterprise .ent-hint { margin: 2px 2px 4px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
