/* Стрелка — единый вход (сцена + форма), модалка политики, подписка, настройки и команда.
   Подключается после style.css пульта. */

/* ---------- вход: сцена со следами трафика + форма ---------- */
.login {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto; overflow-x: hidden;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 600px at 70% -10%, rgba(198, 244, 50, .07), transparent 60%),
    radial-gradient(rgba(255, 240, 220, .04) .6px, transparent .9px) 0 0 / 5px 5px, #0E0D0C;
  color: #E8ECEE; color-scheme: dark;
  --l-ink: #E8ECEE; --l-ink-2: #A0A8AE; --l-ink-3: #697278;
  --l-line: rgba(232, 236, 238, .1); --l-field: #0F1112; --lime: #C6F432;
}
.auth-shell {
  width: 100%; max-width: 1120px; min-height: min(720px, calc(100dvh - 40px));
  display: grid; grid-template-columns: 1.08fr 1fr; gap: 12px;
  background: #0B0C0D; border: 1px solid var(--l-line); border-radius: var(--r-xl); padding: 12px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: shellIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes shellIn { from { opacity: 0; transform: translateY(12px) scale(.99); } }

.scene {
  position: relative; overflow: hidden; border-radius: var(--r-xl); min-height: 260px;
  background: #07090A; isolation: isolate;
}
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 7, .35) 0%, transparent 28%, transparent 45%, rgba(5, 6, 7, .88) 100%);
}
.scene-top { position: absolute; top: 26px; left: 28px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-4); }
.scene-top svg { width: 28px; height: 20px; fill: none; stroke: var(--l-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scene-top svg circle { fill: var(--lime); stroke: none; }
.scene-bottom { position: absolute; left: 28px; right: 28px; bottom: 28px; display: grid; gap: 14px; }
.pill {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-2); color: var(--l-ink);
  background: rgba(232, 236, 238, .08); border: 1px solid rgba(232, 236, 238, .12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.scene-title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; color: var(--l-ink); text-transform: none; }
.scene-sub { color: var(--l-ink-2); font-size: var(--fs-4); }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li {
  display: grid; gap: 22px; padding: 14px; border-radius: var(--r-md); min-height: 104px; align-content: space-between;
  background: rgba(232, 236, 238, .05); border: 1px solid rgba(232, 236, 238, .08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--l-ink-2); font-size: var(--fs-3); line-height: 1.3;
}
.steps b { font: 500 var(--fs-2) var(--mono); color: var(--l-ink-3); }
.steps li.on { background: var(--lime); border-color: var(--lime); color: #0B0C0D; }
.steps li.on b { color: rgba(11, 12, 13, .55); }

.auth-pane { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.auth-head { display: grid; gap: 8px; margin-bottom: 10px; }
.auth-head h1 { font-size: var(--fs-8); letter-spacing: -.03em; color: var(--l-ink); }
.auth-head p { color: var(--l-ink-2); font-size: var(--fs-4); }

.field { display: grid; gap: 7px; }
/* второй шаг входа */
.code-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 4px; background: color-mix(in srgb, var(--lime) 14%, transparent); }
.code-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login .code-in { font-variant-numeric: tabular-nums; letter-spacing: .18em; font-size: var(--fs-6); text-align: center; }
.field > span:first-child { font-size: var(--fs-3); color: var(--l-ink-2); }
.field-hint { color: var(--l-ink-3); font-size: var(--fs-2); }
#login input {
  min-height: 50px; padding: 12px 15px; border-radius: var(--r-md); font-size: var(--fs-4);
  background: var(--l-field); border: 1px solid var(--l-line); color: var(--l-ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#login input::placeholder { color: #4A5257; }
#login input:hover { border-color: rgba(232, 236, 238, .18); }
#login input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198, 244, 50, .12); background: #111314; }
#login input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--l-field) inset; -webkit-text-fill-color: var(--l-ink); caret-color: var(--l-ink); }
.pass { position: relative; display: block; }
.pass input { padding-right: 52px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--l-ink-3); cursor: pointer; transition: color .15s, background .15s;
}
.eye:hover { color: var(--l-ink); background: rgba(232, 236, 238, .06); }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.eye[aria-pressed="true"] .slash { display: none; }

.btn-go {
  margin-top: 4px; min-height: 52px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--lime); color: #0B0C0D; font-weight: 600; font-size: var(--fs-4);
  box-shadow: 0 10px 34px rgba(198, 244, 50, .22);
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, filter .15s;
}
.btn-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn-go:hover { filter: brightness(1.04); box-shadow: 0 14px 40px rgba(198, 244, 50, .3); }
.btn-go:hover svg { transform: translateX(3px); }
.btn-go:active { transform: scale(.98); }
.btn-go[disabled] { opacity: .6; cursor: progress; }
/* Место под ошибку и подсказку занято всегда — форма не прыгает. */
.login .err { color: #F25F4C; margin-top: -6px; min-height: 20px; font-size: var(--fs-3); line-height: 20px; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--l-ink-3); font-size: var(--fs-2); }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--l-line); }
/* color-scheme: light — иначе iframe кнопки Google на тёмной странице получает белую подложку */
.google-btn { display: flex; justify-content: center; height: 44px; color-scheme: light; }
.auth-switch { text-align: center; color: var(--l-ink-2); font-size: var(--fs-3); margin-top: 4px; }
.link-go, .link-legal { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.link-go { color: var(--lime); font-weight: 500; }
.link-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-legal { text-align: center; font-size: var(--fs-2); color: var(--l-ink-3); }
.link-legal { color: var(--l-ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 236, 238, .25); }
.link-legal:hover { color: var(--l-ink); }

@media (max-width: 900px) {
  .login { padding: 0; place-items: stretch; }
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; border-radius: 0; border: 0; min-height: 100dvh; padding: 10px; }
  .scene { min-height: 220px; }
  .scene-sub, .steps { display: none; }
  .scene-top { top: 18px; left: 20px; }
  .scene-bottom { left: 20px; right: 20px; bottom: 20px; gap: 10px; }
  .scene-title { font-size: var(--fs-7); }
  .auth-pane { place-items: start center; padding: 28px 20px 32px; } /* по одной линии со сценой */
  .auth-head h1 { font-size: var(--fs-7); }
}

/* ---------- окна (политика, оплата, чек, подтверждения) ----------
   Цвета — из общей темы: тёплый уголь в тёмной, светлые — в светлой. */
.sheet {
  width: min(640px, calc(100vw - 32px)); max-height: min(80dvh, 760px); padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); border-radius: var(--r-xl);
  background: var(--s1); color: var(--ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .45);
  display: none; flex-direction: column; overflow: hidden;
}
.sheet[open] { display: flex; animation: sheetIn .28s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(3, 4, 5, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 24px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.sheet-head h2 { flex: 1; font-size: var(--fs-5); color: var(--ink); text-transform: none; letter-spacing: -.01em; font-weight: 600; }
.lang { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--s2); }
.lang button { border: 0; background: none; color: var(--ink-3); font: 500 var(--fs-2) var(--mono); padding: 5px 10px; border-radius: var(--r-pill); cursor: pointer; }
.lang button.on { background: var(--s3); color: var(--ink); }
.sheet-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--s2); color: var(--ink-2); cursor: pointer; }
.sheet-x:hover { color: var(--ink); background: var(--s3); }
.sheet-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sheet-body { overflow-y: auto; padding: 8px 24px 26px; display: grid; gap: 10px; }
.sheet-body h3 { margin: 16px 0 0; font-size: var(--fs-4); font-weight: 600; }
.sheet-body p { color: var(--ink-2); line-height: 1.65; font-size: var(--fs-3); }
.sheet-body .hint { color: var(--ink-3); font-size: var(--fs-2); }
.sheet-body a { color: var(--go-ink); }
@media (max-width: 640px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 88dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell, .sheet[open], .sheet::backdrop { animation: none; }
}


/* ---------- подписка: сводка тарифа, история, оформление ---------- */
.cab-label { font-size: var(--fs-2); color: var(--ink-3); }
.meter { height: 6px; border-radius: var(--r-pill); background: var(--s3); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--go); transition: width .5s var(--ease); }
.link-lime { color: var(--go-ink); justify-self: start; margin-top: auto; }
/* главная кнопка: та же форма, что у обычной .btn, только салатовая */
.btn.go { background: var(--go); border-color: var(--go); color: #0B0C0D; font-weight: 600; }
.btn.go:hover { filter: brightness(1.05); border-color: var(--go); }
.st-paid { color: var(--go-ink); }
.st-pending { color: var(--warn); }
.pos { color: var(--go-ink); }
.neg { color: var(--stop); }

/* ---------- вкладка «Подписка» ---------- */
.plans-view { display: grid; gap: 28px; padding: 28px 0 12px; }
.plans-hero { display: grid; justify-items: center; gap: 14px; text-align: center; max-width: 640px; margin: 0 auto; }
.plans-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; line-height: 1.05; }
.plans-hero p { color: var(--ink-2); font-size: var(--fs-4); line-height: 1.55; text-wrap: balance; }
.pill-dark { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-2); color: var(--ink-2); background: var(--s2); border: 1px solid var(--line); }
.pill-dark i { width: 6px; height: 6px; border-radius: 50%; background: var(--go); box-shadow: 0 0 10px var(--go); }
/* Карточки — общая сетка: у всех шесть строк (название, цена, описание, кнопка,
   черта, список) на одной высоте, даже если текст в одной из них длиннее. */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); justify-content: center; gap: 16px; }
.plan-card {
  position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; gap: 16px; align-content: start;
  padding: 28px; border-radius: var(--r-xl); background: var(--s1); border: 1px solid var(--line-2);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.plan-card:hover { transform: translateY(-3px); border-color: var(--ink-3); }
.plan-card.featured {
  border-color: color-mix(in srgb, var(--go) 55%, transparent);
  background:
    radial-gradient(420px 260px at 50% -10%, color-mix(in srgb, var(--go) 22%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--go) 7%, var(--s1)), var(--s1));
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--go) 35%, transparent);
}
.plan-card.featured:hover { border-color: var(--go); }
.plan-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-card h3 { font-size: var(--fs-5); font-weight: 600; }
.plan-badge { font-size: var(--fs-1); padding: 4px 10px; border-radius: var(--r-pill); background: var(--s3); color: var(--ink-2); }
.plan-badge.lime { background: var(--go); color: #0B0C0D; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-price b { font: 500 48px/1 var(--mono); letter-spacing: -.04em; color: var(--ink); }
.plan-price span { color: var(--ink-3); font-size: var(--fs-3); }
.plan-note { color: var(--ink-2); font-size: var(--fs-3); line-height: 1.5; min-height: 3em; }
.plan-btn {
  height: 48px; border-radius: var(--r-pill); border: 0; cursor: pointer; font-weight: 600; font-size: var(--fs-4);
  background: var(--ink); color: var(--bg); transition: transform .15s var(--ease), filter .15s var(--ease);
}
.plan-btn:hover { filter: brightness(1.08); }
.plan-btn:active { transform: scale(.98); }
.featured .plan-btn { background: var(--go); color: #0B0C0D; box-shadow: 0 10px 34px color-mix(in srgb, var(--go) 25%, transparent); }
.plan-btn.is-current { background: var(--s3); color: var(--ink-2); cursor: default; filter: none; }
.plan-act { display: grid; gap: 10px; align-content: start; }
.plan-until { color: var(--ink-3); font-size: var(--fs-2); text-align: center; }
.plan-card hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; width: 100%; }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plan-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: var(--fs-3); line-height: 1.4; }
.plan-card li svg { width: 18px; height: 18px; flex: none; }
.plan-card li svg circle { fill: color-mix(in srgb, var(--go) 18%, transparent); }
.plan-card li svg path { fill: none; stroke: var(--go-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plans-err { text-align: center; margin-top: -12px; }
.plans-faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1000px; margin: 0 auto; width: 100%; }
.plans-faq div { padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.plans-faq h3 { font-size: var(--fs-3); font-weight: 600; margin-bottom: 6px; }
.plans-faq p { color: var(--ink-3); font-size: var(--fs-3); line-height: 1.5; }

.sheet-sm { width: min(440px, calc(100vw - 32px)); }
.sheet-tfa { width: min(520px, calc(100vw - 32px)); }
.sheet-sm .sheet-body { padding: 16px 24px 22px; gap: 18px; }
.sheet-sm .sheet-body p { color: var(--ink-2); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; }
.sheet-actions .btn { background: var(--s2); border-color: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); }
.sheet-actions .btn.go { background: var(--go); border-color: var(--go); color: #0B0C0D; }

@media (max-width: 760px) {
  .plans-faq { grid-template-columns: 1fr; }
  .plan-card { padding: 22px; }
}

.who { color: var(--ink-3); font-size: var(--fs-3); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* почта и «Выйти» всегда справа, даже когда строки состояния сервера нет (у клиента) */
.health[hidden] ~ .bar-tools { margin-left: auto; }
.sheet-body:focus { outline: none; }

.field-hint.off { visibility: hidden; }
/* Сохранённый вход: пока он проверяется, экран входа не показываем. */
html.resume #login { display: none; }


/* ---------- мягкие края сцены и плавные переходы ---------- */
/* Дорожки приходят из темноты слева и уходят в неё справа — без обрезанных краёв. */
.scene canvas {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 80%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 80%, transparent 100%);
}
@media (max-width: 900px) {
  .scene canvas {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 84%, transparent 100%);
  }
}
.scene canvas { animation: sceneIn 1.1s ease both; }
@keyframes sceneIn { from { opacity: 0; } }
.swap { animation: swapIn .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes swapIn { from { opacity: 0; transform: translateY(3px); } }
.login { transition: opacity .45s ease, filter .45s ease; }
.login.leaving { opacity: 0; filter: blur(6px); pointer-events: none; }
.view:not([hidden]), .pane:not([hidden]) { animation: viewIn .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }

/* ---------- «Настройки» ---------- */
.settings:not([hidden]) { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-nav { position: sticky; top: 0; display: grid; gap: 2px; padding-top: 4px; }
.set-group { font-size: var(--fs-1); color: var(--ink-3); padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: .06em; }
.set-group:first-child { padding-top: 0; }
.set-nav button {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-2); font-weight: 500; text-align: left; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.set-nav button:hover { background: var(--s2); color: var(--ink); }
.set-nav button[aria-current] { background: var(--s2); color: var(--ink); box-shadow: inset 2px 0 0 var(--go); }
.set-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.set-nav svg .fill { fill: currentColor; stroke: none; }
.set-body { min-width: 0; }
.pane { display: grid; gap: 16px; align-content: start; }
.pane[hidden] { display: none; }
.pane-head { display: grid; gap: 4px; margin-bottom: 4px; }
.pane-head h2 { font-size: var(--fs-6); letter-spacing: -.02em; }
.set-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 22px; display: grid; }
.set-card h3 { font-size: var(--fs-4); font-weight: 600; }
.set-row, .set-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.set-row:first-child, .set-line:first-child { border-top: 0; }
.set-row span { color: var(--ink-2); }
.set-row b { font-weight: 500; text-align: right; display: inline-flex; align-items: center; gap: 12px; }
.set-line > div:first-child { display: grid; gap: 4px; max-width: 520px; }
.set-form { padding: 20px 22px; gap: 14px; max-width: 640px; }
.set-form input:not([type="checkbox"]) { height: 40px; border-radius: var(--r-sm); }
.set-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.set-msg { font-size: var(--fs-3); color: var(--ink-3); min-height: 1.3em; }
.set-msg.ok { color: var(--go-ink); }
.set-msg.bad { color: var(--stop); }
.set-card > .set-msg { padding: 0 0 14px; }
.set-facts { padding: 18px 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.set-facts div { display: grid; gap: 6px; }
.set-facts b { font-size: var(--fs-3); font-weight: 600; }
.set-facts span { color: var(--ink-3); font-size: var(--fs-3); line-height: 1.5; }
.settings .pane[data-pane="rules"], .settings .pane[data-pane="block"] { display: block; }
.settings .pane[data-pane="rules"][hidden], .settings .pane[data-pane="block"][hidden] { display: none; }
@media (max-width: 900px) {
  .settings:not([hidden]) { grid-template-columns: 1fr; gap: 16px; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .set-group { display: none; }
  .set-nav button { flex: none; background: var(--s1); border: 1px solid var(--line); }
  .set-line { flex-direction: column; align-items: flex-start; }
  .set-2, .set-facts { grid-template-columns: 1fr; }
}

/* ---------- загрузка: полоса под шапкой и «скелеты» ---------- */
.loadbar { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.loadbar::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 38%; left: -38%;
  background: linear-gradient(90deg, transparent, var(--go), transparent);
}
body.busy-run .loadbar::before { animation: loadbar 1.1s cubic-bezier(.45, .05, .35, 1) infinite; }
body.busy .loadbar { opacity: 1; }
@keyframes loadbar { to { left: 100%; } }

[data-loading] .panel, [data-loading] .kpis, [data-loading] .set-card, [data-loading] .plan-card { position: relative; overflow: hidden; }
/* прячем мгновенно, а проявляем плавно — переход только в одну сторону */
[data-loading] .panel > *, [data-loading] .kpis > *, [data-loading] .set-card > *, [data-loading] .plan-card > * { opacity: 0; transition: none; }
[data-loading] .kpis { min-height: 150px; }
[data-loading] .panel::after, [data-loading] .kpis::after, [data-loading] .set-card::after, [data-loading] .plan-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink) 7%, transparent) 50%, transparent 70%) 0 0 / 220% 100%,
    linear-gradient(var(--s2), var(--s2)) 24px 26px / 32% 12px no-repeat,
    linear-gradient(var(--s2), var(--s2)) 24px 54px / 56% 26px no-repeat,
    linear-gradient(var(--s2), var(--s2)) 24px 96px / 44% 10px no-repeat;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0, 24px 26px, 24px 54px, 24px 96px; } to { background-position: -120% 0, 24px 26px, 24px 54px, 24px 96px; } }
.panel > *, .kpis > *, .set-card > *, .plan-card > * { transition: opacity .35s ease; }
.plan-card.skel { min-height: 460px; }

/* кнопка входа: пока ждём сервер — бегущие точки вместо стрелки */
.btn-go[disabled] svg { animation: nudge .7s ease-in-out infinite alternate; }
@keyframes nudge { from { transform: translateX(-2px); opacity: .5; } to { transform: translateX(4px); opacity: 1; } }

/* ---------- уведомление о пробном периоде ---------- */
.notice {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 10px max(16px, calc((100vw - 1360px) / 2)); font-size: var(--fs-3); color: var(--ink);
  border-bottom: 1px solid var(--line); animation: viewIn .3s cubic-bezier(.2, .8, .2, 1);
}
.notice[hidden] { display: none; }
.notice span { flex: 1; color: var(--ink-2); }
.notice.warn { background: color-mix(in srgb, var(--warn) 9%, var(--bg)); }
.notice.warn .lamp { background: var(--warn); }
.notice.stop { background: color-mix(in srgb, var(--stop) 11%, var(--bg)); }
.notice.stop .lamp { background: var(--stop); }
.notice.stop span { color: var(--ink); }
.notice-btn { flex: none; height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 0; cursor: pointer; font-weight: 600; background: var(--go); color: #0B0C0D; }
@media (max-width: 640px) { .notice { flex-wrap: wrap; } .notice span { flex-basis: calc(100% - 30px); } }

/* ---------- «Пользователи» ---------- */
.users-view:not([hidden]) { display: grid; gap: 16px; }
.users-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ukpi { padding: 18px 22px; display: grid; gap: 8px; }
.ukpi span { font-size: var(--fs-2); color: var(--ink-3); }
.ukpi b { font: 500 var(--fs-8)/1 var(--mono); letter-spacing: -.03em; }
.users-view .table-panel { padding: 0; overflow: hidden; }
.users-head { padding: 18px 20px 14px; align-items: center; }
.users-view .users-head input { width: 260px; height: 36px; border-radius: var(--r-sm); }
.users-view td.num, .users-view th.num { text-align: right; }
.users-view td.empty { font-family: var(--sans); color: var(--ink-3); height: 64px; text-align: center; }
.users-view td { font-family: var(--sans); }
.users-view td:first-child { color: var(--ink); }
.role { display: inline-flex; height: 22px; align-items: center; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--fs-2); background: var(--s2); color: var(--ink-2); }
.role-owner { background: var(--go); color: #0B0C0D; font-weight: 600; }
.role-staff { background: color-mix(in srgb, var(--go) 16%, transparent); color: var(--go-ink); }
@media (max-width: 900px) { .users-kpis { grid-template-columns: 1fr 1fr; } .users-view .users-head input { width: 100%; } }

/* ---------- «Команда» ---------- */
.team-row { align-items: end; grid-template-columns: minmax(0, 1fr) auto; }
.team-form { max-width: none; }
@media (max-width: 900px) { .team-row { grid-template-columns: 1fr; } }
.team-switch { align-self: center; padding-top: 18px; }
.team-list { padding: 4px 22px; }
.team-empty { padding: 16px 0; }

/* ---------- «Подписка»: сводка, оформление картой, история ---------- */
.plan-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1180px; width: 100%; margin: 0 auto; }
.ps { padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.ps b { font-size: var(--fs-6); font-weight: 600; letter-spacing: -.02em; }
.ps .meter { margin-top: 4px; }
.plans-pick[hidden] { display: none; }
.plans-pick { animation: viewIn .3s cubic-bezier(.2, .8, .2, 1); }
#ccNumber, #ccExp, #ccCvc { font-family: var(--mono); letter-spacing: .04em; }

.card-preview {
  position: relative; aspect-ratio: 1.62; max-width: 360px; border-radius: var(--r-lg); padding: 20px 22px;
  display: grid; grid-template-rows: auto 1fr auto; color: #E8ECEE; overflow: hidden;
  background:
    radial-gradient(260px 180px at 85% 0%, rgba(198, 244, 50, .35), transparent 70%),
    radial-gradient(220px 160px at 0% 100%, rgba(198, 244, 50, .12), transparent 70%),
    linear-gradient(135deg, #151A0C, #0A0C0D);
  border: 1px solid rgba(198, 244, 50, .25); box-shadow: 0 24px 60px -24px rgba(198, 244, 50, .3);
}
.cp-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-3); color: #A0A8AE; }
.cp-top > svg { width: 30px; height: 21px; fill: none; stroke: #E8ECEE; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cp-top > svg circle { fill: #C6F432; stroke: none; }
.cp-num { align-self: center; font: 500 clamp(var(--fs-5), 2.2vw, 21px) var(--mono); letter-spacing: .08em; }
.cp-bottom { display: flex; justify-content: space-between; font: var(--fs-2) var(--mono); color: #A0A8AE; letter-spacing: .06em; }
.secure { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: var(--fs-2); }
.secure svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.co-feats { list-style: none; margin: 0; padding: 0 0 6px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.co-feats li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: var(--fs-3); }
.co-feats svg { width: 18px; height: 18px; flex: none; }
.co-feats svg circle { fill: color-mix(in srgb, var(--go) 18%, transparent); }
.co-feats svg path { fill: none; stroke: var(--go-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.co-row { display: flex; justify-content: space-between; color: var(--ink-2); font-size: var(--fs-3); }
.co-row b { color: var(--ink); font-weight: 500; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); }
.co-total b { font: 500 var(--fs-7) var(--mono); letter-spacing: -.03em; }
.plans-history { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0; overflow: hidden; }
.plans-history .panel-head { padding: 18px 20px 12px; }
.plans-history td { font-family: var(--sans); }
.plans-history td.num, .plans-history th.num { text-align: right; font-family: var(--mono); }
.plans-history td.empty { color: var(--ink-3); height: 64px; text-align: center; }
@media (max-width: 900px) {
  .plan-summary { grid-template-columns: 1fr; }
}

/* лайм для кнопок по всей странице (раньше был задан только на экране входа) */
:root { --lime: #C6F432; }

/* ---------- окно оформления подписки ---------- */
.sheet-pay { width: min(880px, calc(100vw - 32px)); max-height: min(92dvh, 694px); }
.pay-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow-y: auto; }
.pay-left { padding: 22px 24px 24px; display: grid; gap: 14px; align-content: start; border-right: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.pay-right { padding: 22px 24px 24px; display: grid; gap: 12px; align-content: start; background: color-mix(in srgb, var(--ink) 2%, transparent); }
.sheet-pay label { display: grid; gap: 6px; font-size: var(--fs-2); color: var(--ink-2); }
.sheet-pay input { height: 44px; border-radius: var(--r-md); font-size: var(--fs-4); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); padding: 0 14px; width: 100%; }
.sheet-pay input:focus { border-color: var(--go); box-shadow: 0 0 0 4px color-mix(in srgb, var(--go) 12%, transparent); outline: none; }
.sheet-pay .card-preview { max-width: none; width: 100%; aspect-ratio: 1.75; padding: 18px 20px; }
.sheet-pay h3 { font-size: var(--fs-6); font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.sheet-pay .cab-label { color: var(--ink-3); }
.sheet-pay .co-feats { border-color: color-mix(in srgb, var(--ink) 8%, transparent); }
.sheet-pay .co-feats li, .sheet-pay .co-row { color: var(--ink-2); }
.sheet-pay .co-row b, .sheet-pay .co-total b { color: var(--ink); }
.sheet-pay .co-total { border-color: color-mix(in srgb, var(--ink) 8%, transparent); padding-top: 12px; }
.sheet-pay .co-total b { font-size: var(--fs-7); }
.sheet-pay .btn-go { width: 100%; margin-top: 6px; }
.sheet-pay .secure { color: var(--ink-3); }
.sheet-pay .set-msg { min-height: 0; }
.sheet-pay .set-msg:empty { display: none; }
@media (max-width: 760px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-left { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
  .sheet-pay { max-height: 92dvh; }
}
.pane[data-pane="billing"] .plan-summary { max-width: none; }
.pane[data-pane="billing"] .plans-history { max-width: none; }
.pane[data-pane="billing"] .set-actions { margin-top: -2px; }
.sheet-pay .pay-grid { flex: 1; min-height: 0; }

/* ---------- шаги на экране входа: с пояснением ---------- */
.steps li > span { display: grid; gap: 4px; }
.steps strong { font-weight: 600; font-size: var(--fs-3); color: var(--l-ink); }
.steps em { font-style: normal; font-size: var(--fs-2); line-height: 1.35; color: var(--l-ink-3); }
.steps li.on strong { color: #0B0C0D; }
.steps li.on em { color: rgba(11, 12, 13, .62); }
.steps li { gap: 14px; }

/* ---------- «Тарифы» (владелец) ---------- */
.tariff-list { display: grid; gap: 14px; }
.tariff { padding: 18px 22px; display: grid; gap: 14px; }
.tariff-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tariff-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.tariff-grid input { height: 40px; border-radius: var(--r-sm); }
.tariff-grid input[type="number"] { font-family: var(--mono); }
.tariff .set-actions .grow { flex: 1; }
@media (max-width: 900px) { .tariff-grid { grid-template-columns: 1fr 1fr; } .tariff-head { flex-direction: column; } }

/* ---------- схема потока: бегущие штрихи и дыхание выходов ---------- */
.yard .amb { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .6 7.4; opacity: .55;
  animation: ambRun 3.6s linear infinite; animation-delay: var(--phase, 0s); }
.yard .amb.g { stroke: var(--go); } .yard .amb.y { stroke: var(--warn); } .yard .amb.r { stroke: var(--stop); }
@keyframes ambRun { from { stroke-dashoffset: 8; } to { stroke-dashoffset: 0; } }
.yard .term .ring { transform-box: fill-box; transform-origin: center; animation: breath 2.8s ease-out infinite; animation-delay: var(--breath, 0s); }
@keyframes breath { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.yard .node { animation: nodeGlow 2.8s ease-in-out infinite; animation-delay: var(--breath, 0s); }
@keyframes nodeGlow { 50% { stroke: var(--ink-2); } }
.yard .term.flash .ring { animation: ring 1s var(--ease); } /* вспышка нового клика важнее дыхания */

/* значок платёжной системы на превью карты */
#cpBrand { display: inline-flex; align-items: center; height: 26px; }
#cpBrand svg { height: 26px; width: auto; animation: brandIn .3s cubic-bezier(.2, .8, .2, 1); }
.brand-mc { height: 28px !important; }
.brand-visa text { font: italic 800 var(--fs-6) var(--sans); fill: #fff; letter-spacing: .02em; }
.brand-mir text { font: 800 var(--fs-6) var(--sans); fill: #fff; letter-spacing: .04em; }
.brand-mir text { fill: #4DB45E; }
@keyframes brandIn { from { opacity: 0; transform: translateY(-3px); } }

/* ---------- удалить строку: появляется при наведении, второе нажатие удаляет ---------- */
.row-del {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; min-width: 28px; padding: 0 7px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer;
  font: 500 var(--fs-2) var(--sans); opacity: 0; pointer-events: none;
  transition: opacity .15s, background .15s, color .15s;
}
.row-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.row-del span { display: none; }
:is(li, .team-member, .dom-row):hover .row-del, .row-del:focus-visible, .row-del.armed { opacity: 1; pointer-events: auto; }
.row-del:hover { color: var(--stop); background: color-mix(in srgb, var(--stop) 12%, transparent); }
.row-del.armed { color: var(--stop); background: color-mix(in srgb, var(--stop) 14%, transparent); }
.row-del.armed span { display: inline; }
@media (hover: none) { .row-del { opacity: 1; pointer-events: auto; } }
.team-ctl { display: flex; align-items: center; gap: 14px; flex: none; }
.team-member.off h3 { color: var(--ink-2); }
.team-member .sub.bad { color: var(--stop); }

/* ---------- оплата: выбор «Карта / USDT» ---------- */
.sheet-pay [hidden], .btn-go[hidden] { display: none !important; }
.pay-method { display: flex; gap: 6px; margin: 14px 24px 0; padding: 4px; border-radius: var(--r-md); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); width: fit-content; }
.pay-method button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font: 500 var(--fs-3) var(--sans); cursor: pointer; transition: background .2s, color .2s; }
.pay-method button:hover { color: var(--ink); }
.pay-method button[aria-selected="true"] { background: var(--s3); color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 2px 8px rgba(0, 0, 0, .18); }
.pay-method svg { width: 18px; height: 18px; flex: none; }
.pay-method svg:not(.usdt-logo) { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.usdt-logo { width: 18px; height: 18px; flex: none; }

/* шаг 1: сеть и условия */
.usdt-step { display: grid; gap: 14px; align-content: start; animation: viewIn .28s cubic-bezier(.2, .8, .2, 1); }
.usdt-head { display: flex; align-items: center; gap: 12px; }
.usdt-head .usdt-logo { width: 40px; height: 40px; }
.usdt-head b { display: block; color: var(--ink); font-size: var(--fs-4); font-weight: 600; }
.usdt-head span { color: var(--ink-3); font-size: var(--fs-2); }
.net-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.net { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); background: var(--bg); color: var(--ink); font: 500 var(--fs-3) var(--sans); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.net:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.net[aria-checked="true"] { border-color: var(--go); background: color-mix(in srgb, var(--go) 6%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 10%, transparent); }
.net svg { width: 24px; height: 24px; flex: none; }
.net span { flex: 1; line-height: 1.25; }
.net em { font-style: normal; font-size: var(--fs-1); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--r-xs); padding: 1px 5px; }
.net.skel { height: 48px; animation: netSkel 1.4s ease-in-out infinite; background: var(--s2); }
@keyframes netSkel { 50% { opacity: .5; } }
.usdt-warn { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--stop) 7%, transparent); border: 1px solid color-mix(in srgb, var(--stop) 20%, transparent); }
.usdt-warn > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--stop); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.usdt-warn b { color: color-mix(in srgb, var(--stop) 65%, var(--ink)); font-size: var(--fs-3); font-weight: 600; }
.usdt-warn p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-2); line-height: 1.55; }
.usdt-warn details { margin-top: 8px; font-size: var(--fs-2); color: var(--ink-2); }
.usdt-warn summary { cursor: pointer; color: var(--ink); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.usdt-warn summary::-webkit-details-marker { display: none; }
.usdt-warn summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.usdt-warn details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.usdt-warn ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; line-height: 1.5; }
/* «Понимаю» — тумблер под блоком условий, всегда на виду */
.sheet-pay .usdt-agree { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); font-size: var(--fs-3); line-height: 1.4; flex: none; transition: border-color .2s; }
.sheet-pay .usdt-agree:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.sheet-pay .usdt-agree:has(input:checked) { border-color: color-mix(in srgb, var(--go) 40%, transparent); }
.sheet-pay .usdt-agree input { width: 36px; height: 20px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--s3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent); }
.sheet-pay .usdt-agree input::after { background: var(--ink-2); }
.sheet-pay .usdt-agree input:checked { background: var(--go); box-shadow: none; }
.sheet-pay .usdt-agree input:checked::after { background: #0B0C0D; }
.sheet-pay .usdt-agree input:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; }
/* серая неактивная кнопка, пока тумблер выключен */
.btn-go.off, .btn-go.off:hover { background: var(--s3); color: var(--ink-3); box-shadow: none; filter: none; cursor: not-allowed; opacity: 1; }
.btn-go.off svg, .btn-go.off:hover svg { animation: none; transform: none; }

/* шаг 2: сумма, адрес, Memo, ожидание */
.inv-amount { display: grid; gap: 6px; padding: 16px; border-radius: var(--r-md); background: var(--bg); border: 1px solid color-mix(in srgb, var(--go) 22%, transparent); }
.inv-amount > span { color: var(--ink-3); font-size: var(--fs-2); }
.inv-amount > div { display: flex; align-items: baseline; gap: 8px; }
.inv-amount b { font: 500 var(--fs-7) var(--mono); letter-spacing: -.03em; color: var(--ink); }
.inv-amount em { font-style: normal; color: var(--ink-2); font-size: var(--fs-3); flex: 1; }
.inv-amount p { margin: 0; color: var(--ink-3); font-size: var(--fs-2); line-height: 1.5; }
.copy { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: var(--s3); color: var(--ink-2); cursor: pointer; align-self: center; }
.copy:hover { color: var(--ink); }
.copy svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.copy.done { color: #0B0C0D; background: var(--go); }
.inv-addr { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; }
.inv-qr { width: 132px; height: 132px; border-radius: var(--r-md); overflow: hidden; background: #fff; }
.inv-qr svg { width: 100%; height: 100%; display: block; }
.inv-addr-text { display: grid; gap: 8px; min-width: 0; }
.inv-addr-text code, .memo-row code { font: 500 var(--fs-3)/1.45 var(--mono); color: var(--ink); word-break: break-all; }
.btn-copy { justify-self: start; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: var(--go); color: #0B0C0D; font: 600 var(--fs-3) var(--sans); cursor: pointer; transition: filter .2s; }
.btn-copy:hover { filter: brightness(1.05); }
.btn-copy.done { background: var(--ink); }
.inv-memo { display: grid; gap: 8px; }
.memo-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--stop) 10%, transparent); border: 1px solid color-mix(in srgb, var(--stop) 28%, transparent); color: color-mix(in srgb, var(--stop) 65%, var(--ink)); font-size: var(--fs-2); line-height: 1.5; }
.memo-alert svg { width: 18px; height: 18px; flex: none; fill: var(--stop); stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; }
.memo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.memo-row code { flex: 1; font-size: var(--fs-5); }
.inv-note { margin: 0; color: var(--ink-3); font-size: var(--fs-2); line-height: 1.5; }
.inv-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--go) 6%, transparent); color: var(--ink); font-size: var(--fs-3); }
.inv-status > span:nth-child(2) { flex: 1; line-height: 1.45; }
.inv-status b { font: 500 var(--fs-3) var(--mono); color: var(--ink-2); }
.inv-status.late { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.inv-status.late .pulse { background: var(--warn); }
.inv-status.late .pulse::after { border-color: var(--warn); }
.inv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-actions .btn { background: var(--s2); border-color: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); }
.inv-actions .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.inv-actions .btn.ghost:hover { color: var(--ink); }
.inv-actions .btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 760px) {
  .pay-method { margin: 12px 16px 0; }
  .inv-addr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .inv-addr-text { justify-items: center; }
  .btn-copy { justify-self: center; }
}

/* ---------- чек ---------- */
.receipt { display: grid; gap: 16px; }
.rc-ok { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--go) 8%, transparent); border: 1px solid color-mix(in srgb, var(--go) 25%, transparent); }
.rc-ok svg { width: 28px; height: 28px; flex: none; }
.rc-ok svg circle { fill: var(--go); }
.rc-ok svg path { fill: none; stroke: #0B0C0D; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rc-ok b { display: block; color: var(--ink); font-size: var(--fs-4); }
.rc-ok span { color: var(--ink-2); font-size: var(--fs-2); }
.rc-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.rc-actions .btn { background: var(--s2); border-color: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); }
.rc-actions .btn.go { background: var(--go); border-color: var(--go); color: #0B0C0D; }
.sheet-receipt { width: min(460px, calc(100vw - 32px)); max-height: min(92dvh, 820px); }
.sheet-receipt .sheet-body { gap: 14px; }

/* Белый талон чека — одинаковый в светлой и тёмной теме, как в PDF. */
.ticket {
  --t-ink: #111416; --t-ink2: #4D555B; --t-ink3: #868D92; --t-line: #E8E8E4; --t-page: #F4F4F1;
  --t-go: #8DB816; --t-go-ink: #4C6505; --t-go-soft: #B9D27A; --t-rail: #D9DBD6;
  position: relative; background: #fff; color: var(--t-ink); border-radius: var(--r-lg);
  border: 1px solid #DEDFDA; padding: 20px 22px 18px; font-size: var(--fs-3);
  box-shadow: 0 1px 0 rgba(14, 16, 17, .03), 0 12px 32px -18px rgba(14, 16, 17, .25);
}
.ticket .mono { font-family: var(--mono); }
.tk-head { display: flex; align-items: center; gap: 9px; }
.tk-head b { font-size: var(--fs-5); font-weight: 650; letter-spacing: -.01em; }
.tk-head span { margin-left: auto; color: var(--t-ink3); font-size: var(--fs-2); }
.tk-logo { width: 26px; height: 19px; fill: none; stroke: var(--t-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tk-logo circle { fill: var(--t-go); stroke: none; }
.tk-method { display: flex; align-items: center; gap: 7px; margin: 18px 0 4px; color: var(--t-ink3); font-size: var(--fs-2); }
.tk-usdt { width: 15px; height: 15px; flex: none; }
.tk-sum { margin: 0; font-size: var(--fs-4); color: var(--t-ink2); display: flex; align-items: baseline; gap: 8px; }
.tk-sum .mono { font-size: 34px; letter-spacing: -.03em; color: var(--t-ink); font-weight: 500; line-height: 1.1; }
.tk-route { position: relative; margin: 12px 0 0; height: 44px; }
.tk-route svg { position: absolute; inset: 0 0 auto; width: 100%; height: 30px; overflow: visible; }
.tk-route path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tk-route .rail { stroke: var(--t-rail); stroke-width: 2; stroke-dasharray: 1 8; }
.tk-route .go { stroke: var(--t-go); stroke-width: 2.2; }
.tk-route .a { fill: #26A17B; }
.tk-route .b { fill: var(--t-go); }
.tk-route span { position: absolute; color: var(--t-ink3); font-size: 11px; }
.tk-route .from { left: 0; top: 32px; }
.tk-route .to { right: 16px; top: 11px; }
.tk-cut { position: relative; height: 0; margin: 10px -22px 4px; border-top: 1.5px dashed #CDCEC8; }
.tk-cut::before, .tk-cut::after {
  content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--s1); border: 1px solid #DEDFDA;
}
.tk-cut::before { left: -12px; clip-path: inset(0 0 0 50%); }
.tk-cut::after { right: -12px; clip-path: inset(0 50% 0 0); }
.tk-rows { margin: 0; display: grid; }
.tk-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--t-line); }
.tk-rows dt { color: var(--t-ink3); flex: none; }
.tk-rows dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.tk-rows .mono { font-size: var(--fs-2); }
.tk-rows a { color: var(--t-go-ink); text-decoration: none; }
.tk-rows a:hover { text-decoration: underline; }
.tk-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; color: var(--t-ink3); font-size: var(--fs-2); }
.tk-foot span { white-space: nowrap; }
.tk-foot .site { color: var(--t-go-ink); }
.tk-seal { display: flex; justify-content: center; margin: 14px 0 0; }
.tk-seal span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border: 1px solid var(--t-go-soft); border-radius: var(--r-pill); color: var(--t-go-ink); font-size: var(--fs-2); }
.tk-seal svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) { .tk-foot { font-size: 11px; } .ticket { padding: 18px 16px 16px; } .tk-cut { margin-inline: -16px; } .tk-sum .mono { font-size: 28px; } }

/* Кнопка-значок в строке таблицы (скачать PDF). */
td.act { display: table-cell; width: 1%; text-align: right; padding-block: 6px; vertical-align: middle; }
.rc-acts { display: inline-flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.rc-act { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-size: var(--fs-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.rc-act svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rc-act:hover { background: var(--s2); color: var(--ink); border-color: var(--line-2); }
@media (max-width: 760px) { .rc-act span { display: none; } .rc-act { padding: 0 7px; } }
td.nowrap { white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--ink); background: var(--s2); }
.link.mono { font-family: var(--mono); font-size: var(--fs-2); }

/* ---------- «Чеки» (владелец) ---------- */
.rc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.rc-dates { display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
.rc-dates .dp { width: 148px; }
#rcSearch { height: 36px; width: 220px; border-radius: var(--r-sm); margin-left: auto; }
.rc-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rc-totals b { font-family: var(--mono); font-weight: 500; letter-spacing: -.02em; }
.rc-table { margin-top: 16px; }
.rc-table .panel-head { align-items: center; }
.rc-export { display: flex; gap: 8px; margin-left: auto; }
.rc-export .btn[disabled] { opacity: .5; cursor: default; }
.rc-table a { color: inherit; text-decoration: none; }
.rc-table a:hover { color: var(--go-ink); text-decoration: underline; }
@media (max-width: 1100px) { .rc-totals { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .rc-filters { flex-direction: column; align-items: stretch; }
  .rc-filters .seg { width: 100%; } .rc-filters .seg label { flex: 1; } .rc-filters .seg span { justify-content: center; }
  .rc-dates .dp { flex: 1; width: auto; }
  #rcSearch { width: 100%; margin: 0; }
  .rc-filters .seg span { white-space: nowrap; padding-inline: 6px; }
  .rc-totals { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rc-totals .ps { padding: 14px 16px; gap: 4px; }
  .rc-totals b { font-size: var(--fs-5); }
  .rc-table .panel-head { flex-wrap: wrap; gap: 12px; }
  .rc-export { width: 100%; margin: 0; } .rc-export .btn { flex: 1; }
}
button.link { border: 0; background: none; padding: 0; color: var(--go-ink); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* ---------- «Тарифы» → приём USDT ---------- */
.usdt-admin-head { margin-top: 28px; }
.wallet-name { display: flex; align-items: center; gap: 12px; }
.wallet-name svg { width: 30px; height: 30px; flex: none; }
.wallet-grid { grid-template-columns: 1fr 200px; }
.wallet-grid .wide:only-child { grid-column: 1 / -1; }
.wallet-grid input[name="address"] { font-family: var(--mono); font-size: var(--fs-3); }
.usdt-admin-log { margin-top: 14px; }
.usdt-admin-log a { text-decoration: none; }
.usdt-admin-log a:hover { text-decoration: underline; }
@media (max-width: 760px) { .wallet-grid { grid-template-columns: 1fr; } }

/* Пока сервер не ответил, кто вошёл, — показываем только то, что положено
   запомненной роли (иначе при обновлении мелькали «Подписка» и чужие разделы). */
html.resume:not([data-role="client"]) [data-billing],
html.resume:not([data-role="owner"]) [data-admin],
html.resume:not([data-role="owner"]) [data-owner] { display: none !important; }

/* Тумблер в «Команде» стоит на месте: подпись «Включён / Выключен» одной ширины. */
.team-ctl .switch span { min-width: 5.6em; }

/* Условия перевода USDT: блок тянется до низа окна, длинный список листается
   внутри него, а окно не растёт. */
@media (min-width: 761px) {
  .usdt-pane.picking { height: 0; min-height: 100%; display: flex; flex-direction: column; }
  .usdt-pane.picking #usdtPick { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .usdt-pane.picking .usdt-warn { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--stop) 35%, transparent) transparent; }
}

/* Окно оплаты одной высоты для карты и USDT — при переключении ничего не прыгает.
   Панель заказа — скруглённая карточка, без острых углов; красный блок условий
   опускается до её нижнего края. */
@media (min-width: 761px) {
  .sheet-pay { height: min(92dvh, 682px); }
  .pay-right { margin: 0 16px 16px 0; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
  .pay-left { border-right: 0; } /* панель заказа — отдельная карточка, разделитель не нужен */
  .usdt-pane.picking { padding-bottom: 16px; }
}

/* Адрес — скруглённое поле, как остальные; Memo уже лежит в своей рамке. */
.inv-addr-text code { display: block; padding: 9px 11px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); font-size: var(--fs-2); }
.memo-row code { background: none; border: 0; padding: 0; }
/* Шаги счёта и чека: если не влезают (TON с Memo), листается только левая часть,
   панель заказа стоит на месте. */
@media (min-width: 761px) {
  .usdt-pane:not(.picking) { height: 0; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 18%, transparent) transparent; padding-bottom: 16px; }
  #usdtInv { gap: 12px; }
}

/* Шаг счёта плотнее, чтобы и TON с Memo помещался без прокрутки. */
@media (min-width: 761px) {
  #usdtInv { gap: 10px; }
  .inv-amount { padding: 13px 16px; gap: 4px; }
  .inv-amount b { font-size: var(--fs-7); }
  .inv-addr { grid-template-columns: 116px 1fr; }
  .inv-qr { width: 116px; height: 116px; }
  .memo-alert { padding: 10px 12px; }
  .memo-row { padding: 7px 8px 7px 14px; }
}
/* Галочка «Понимаю» — у нижнего края блока условий. */

/* Кнопки счёта — справа под «Итого», на месте «Получить адрес». */
.pay-right .inv-actions { display: grid; gap: 8px; margin-top: 6px; }
.pay-right .inv-actions .btn { width: 100%; height: 44px; justify-content: center; }
/* Телефон: панель заказа — такая же скруглённая карточка, без полосы над ней;
   под переключателем способа оплаты — отступ, список не липнет к нему. */
@media (max-width: 760px) {
  .pay-left { border-bottom: 0; }
  .pay-right { margin: 0 16px 16px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); padding: 18px; }
  .pay-method { margin-bottom: 8px; }
  .pay-left { padding: 16px; }
}

/* ---------- подсветка при наведении: у каждой кнопки заметная ----------
   Раньше у обычных кнопок менялась только обводка (почти не видно), а в тёмных
   окнах их фон был задан жёстко и наведение не показывалось вовсе. */
.btn, .btn-go, .btn-copy, .copy, .net, .notice-btn, .dd-btn, .pay-method button, .plan-btn { transition: background .15s, border-color .15s, color .15s, box-shadow .15s, filter .15s, transform .15s; }
.btn:not(.go):not(.primary):not(.danger):not(:disabled):hover { background: var(--s2); border-color: var(--ink-3); color: var(--ink); }
.btn.danger:not(:disabled):hover { background: color-mix(in srgb, var(--stop) 10%, transparent); }
.btn.go:not(:disabled):hover, .notice-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 22px rgba(198, 244, 50, .28); }
.btn:not(:disabled):active, .notice-btn:active, .btn-copy:active, .copy:active { transform: scale(.98); }
.dd-btn:hover { border-color: var(--ink-3); }

/* тёмные окна (оплата, чек, подтверждения) — своя палитра */
.sheet :is(.sheet-actions, .inv-actions, .rc-actions) .btn:not(.go):not(.primary):not(.danger):not(:disabled):hover { background: var(--s3); border-color: color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink); }
:is(.sheet-actions, .inv-actions, .rc-actions) .btn.go:not(:disabled):hover { background: var(--go); filter: brightness(1.08); box-shadow: 0 6px 22px color-mix(in srgb, var(--go) 28%, transparent); }
.sheet .inv-actions .btn.ghost:not(.go):not(.primary):not(.danger):not(:disabled):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; }
.copy:hover { background: var(--s3); color: var(--ink); }
.btn-copy:hover { filter: brightness(1.08); box-shadow: 0 6px 18px color-mix(in srgb, var(--go) 25%, transparent); }
.net:hover { background: var(--s3); border-color: color-mix(in srgb, var(--ink) 26%, transparent); }
.net[aria-checked="true"]:hover { background: color-mix(in srgb, var(--go) 9%, transparent); border-color: var(--go); }
.pay-method button:not([aria-selected="true"]):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* клавиатура: видно, где фокус */
:is(.btn, .btn-go, .btn-copy, .copy, .net, .pay-method button, .sheet-x, .notice-btn):focus-visible { outline: 2px solid #C6F432; outline-offset: 2px; }

/* В прокручиваемом блоке условий отступ снизу держит внутренний блок — иначе
   при раскрытом списке текст прилипает к нижней рамке. */
@media (min-width: 761px) {
  .usdt-pane.picking .usdt-warn { padding-bottom: 0; }
  .usdt-pane.picking .usdt-warn > div { padding-bottom: 14px; }
  .usdt-pane.picking #usdtPick { gap: 12px; }
}

/* ---------- «Потоки»: своя вкладка в шапке ----------
   Две карточки одной высоты верха: слева список потоков, справа выбранный поток. */
.flows-view:not([hidden]) { display: grid; gap: 20px; align-content: start; }
.flows-view .pane-head .sub { max-width: 720px; line-height: 1.5; }
.flows-view .pane[data-pane="rules"] { display: block; }
.flows-view .pane[data-pane="rules"][hidden] { display: none; }
.flows-view .rules-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.flows-view .flow-list, .flows-view .flow-edit { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.flows-view .flow-list { padding: 10px; position: sticky; top: 0; }
.flows-view .flow-list ul { margin: 0 0 10px; gap: 2px; }
.flows-view .flow-list li button[data-alias] { padding: 11px 12px; border-radius: var(--r-sm); align-items: center; }
.flows-view .flow-list li button[data-alias][aria-current="true"] { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2); }
.flows-view .flow-list #newFlow { width: 100%; }
.flows-view .flow-edit { padding: 20px 22px 18px; min-width: 0; }
.flows-view .flow-edit .sec-head { margin-bottom: 16px; align-items: flex-start; }
.flows-view .flow-edit .sec-head h2 { line-height: 1.2; }
.flows-view .flow-edit .sec-head .hint { margin-top: 4px; }
.flows-view .rule-list { background: var(--bg); }
.flows-view .rule-list li.default { background: var(--s2); }
.flows-view .list-actions { margin-bottom: 14px; }
.flows-view .raw { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 760px) {
  .flows-view .rules-layout { grid-template-columns: 1fr; }
  .flows-view .flow-list { position: static; }
  .flows-view .flow-edit { padding: 16px 14px; }
}
/* вкладки шапки: аккуратная рамка фокуса — только при переходе с клавиатуры */
.tabs button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); border-radius: var(--r-sm); }

/* ---------- пустой пульт: потоков ещё нет ---------- */
.view[data-view="desk"].no-flows > :is(.kpis, .board, .split, .log) { display: none; }
.view[data-view="desk"].no-flows .flows { display: none; }
.desk-empty:not([hidden]) {
  display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 56px 24px 48px; border-radius: var(--r-lg);
  background:
    radial-gradient(420px 220px at 50% 0%, color-mix(in srgb, var(--go) 10%, transparent), transparent 70%),
    var(--s1);
}
.de-mark { width: 56px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.de-mark circle { fill: var(--go); stroke: none; }
.desk-empty h2 { font-size: var(--fs-7); letter-spacing: -.02em; line-height: 1.2; }
.desk-empty > p { max-width: 540px; color: var(--ink-2); font-size: var(--fs-4); line-height: 1.55; }
.de-steps { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 12px; counter-reset: de; text-align: left; }
.de-steps li { counter-increment: de; display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.de-steps li::before { content: '0' counter(de); font: var(--fs-2) var(--mono); color: var(--ink-3); }
.de-steps b { font-size: var(--fs-3); font-weight: 600; }
.de-steps span { font-size: var(--fs-2); color: var(--ink-3); line-height: 1.45; }
.desk-empty .btn.go { margin-top: 6px; padding: 0 24px; height: 44px; font-size: var(--fs-4); }
@media (max-width: 760px) {
  .desk-empty:not([hidden]) { padding: 40px 18px 32px; }
  .de-steps { grid-template-columns: 1fr; width: 100%; }
}

/* ---------- поток есть, кликов ещё не было ---------- */
.first-click:not([hidden]) {
  display: flex; align-items: center; gap: 14px; margin: 0 20px 4px; padding: 14px 16px;
  border-radius: var(--r-md); border: 1px dashed color-mix(in srgb, var(--go) 40%, transparent);
  background: color-mix(in srgb, var(--go) 6%, transparent);
}
.first-click > div { flex: 1; display: grid; gap: 3px; min-width: 0; }
.first-click b { font-size: var(--fs-3); font-weight: 600; }
.first-click span { font-size: var(--fs-2); color: var(--ink-3); line-height: 1.45; }
.first-click .btn { flex: none; text-decoration: none; color: var(--ink); }
@media (max-width: 760px) { .first-click:not([hidden]) { flex-wrap: wrap; margin: 0 14px 4px; } .first-click .btn { width: 100%; } }
.flow-list .flow-none { padding: 6px 8px 2px; color: var(--ink-3); font-size: var(--fs-2); }
/* на телефоне корзина видна всегда — оставляем ей место справа, чтобы не наезжала на «N правил» */
@media (hover: none) { .flows-view .flow-list li button[data-alias] { padding-right: 44px; } }

/* ---------- «Пользователи»: аватар-инициал и подписка одним бейджем ---------- */
.who-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ava { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--s3); color: var(--ink-2); font: 600 var(--fs-2) var(--sans); }
.ava-owner { background: var(--go); color: #0B0C0D; }
.ava-staff { background: color-mix(in srgb, var(--go) 18%, transparent); color: var(--go-ink); }
.sub-badge { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-2); background: var(--s2); color: var(--ink-2); white-space: nowrap; }
.sub-badge i { width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; }
.sub-badge em { font-style: normal; color: var(--ink-3); }
.sub-badge.paid { color: var(--go-ink); background: color-mix(in srgb, var(--go) 12%, transparent); }
.sub-badge.trial { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.sub-badge.ended { color: var(--stop); background: color-mix(in srgb, var(--stop) 10%, transparent); }
.sub-badge.team { color: var(--ink-3); }
.users-view tbody tr { transition: background .15s; }
.users-view tbody tr:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }

/* ---------- «Проверить посетителя»: готовые посетители ---------- */
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.presets button { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.presets button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.presets b { font-size: var(--fs-3); font-weight: 600; }
.presets span { font-size: var(--fs-2); color: var(--ink-3); }
.presets button:hover { background: var(--s2); border-color: var(--ink-3); }
.presets button[aria-pressed="true"] { border-color: var(--go); background: color-mix(in srgb, var(--go) 8%, transparent); box-shadow: 0 0 0 3px var(--sel); }
.presets button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.probe-own summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-3); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.probe-own summary::-webkit-details-marker { display: none; }
.probe-own summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.probe-own[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.probe-own summary:hover { color: var(--ink); }
.probe-fields { display: grid; gap: 11px; margin-top: 11px; }

/* ---------- телефон: шапка в одну строку, вкладки внизу ---------- */
.tab-ic { display: none; }
@media (max-width: 760px) {
  .bar { flex-wrap: nowrap; height: 52px; padding: 0 16px; padding-top: 0; gap: 12px; }
  .bar .health, .bar .who { display: none; }
  .bar-tools { margin-left: auto; }
  /* вкладки — нижняя панель, как в приложениях: иконка и подпись */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; order: 0; width: auto;
    height: calc(60px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
    gap: 0; justify-content: space-around;
    background: color-mix(in srgb, var(--s1) 88%, transparent);
    backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .tabs button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 2px; font-size: var(--fs-1); }
  .tabs button[hidden] { display: none; }
  .tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-ic { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .tabs button[aria-selected="true"] { color: var(--go-ink); }
  .tabs button[aria-selected="true"]::after { display: none; }
  .tabs button:active .tab-ic { transform: scale(.92); }
  main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- схема потока лентой (телефон) ---------- */
.vyard { list-style: none; margin: 0; padding: 6px 4px 10px; display: grid; gap: 10px; position: relative; }
.vyard::before { content: ''; position: absolute; left: 13px; top: 18px; bottom: 34px; width: 1.5px; background: var(--rail); border-radius: var(--r-pill); }
.vyard li { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; transition: opacity .3s var(--ease); }
.v-in { grid-template-columns: 20px minmax(0, 1fr); }
.v-in::before { content: ''; width: 9px; height: 9px; margin-left: 4px; border-radius: var(--r-pill); background: var(--ink); }
.v-in b { font-size: var(--fs-3); font-weight: 600; }
.v-in span { font: var(--fs-1) var(--mono); color: var(--ink-3); margin-left: 8px; }
.v-node { width: 11px; height: 11px; margin-left: 3px; border-radius: var(--r-pill); background: var(--s1); border: 1.5px solid var(--rail); z-index: 1; }
.v-node.g { border-color: var(--go); } .v-node.y { border-color: var(--warn); } .v-node.r { border-color: var(--stop); }
.v-card { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.v-card b { font-size: var(--fs-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-card span { display: flex; align-items: center; gap: 6px; font: var(--fs-1) var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-hits { display: grid; justify-items: end; font: 500 var(--fs-4) var(--mono); }
.v-hits small { font-size: var(--fs-1); color: var(--ink-3); font-weight: 400; }
.v-step.off { opacity: .5; }
.v-default .v-card { border-style: dashed; }
.vyard .term.flash .v-card { animation: vFlash 1s var(--ease); }
@keyframes vFlash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--go) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
/* маршрут посетителя: путь ярко, остальное приглушено, выход — в рамке */
.yard.routed .vyard li { opacity: .3; }
.yard.routed .vyard li.v-in, .yard.routed .vyard li.lit { opacity: 1; }
.yard.routed .vyard li.hit .v-card { border-color: var(--go); box-shadow: 0 0 0 3px var(--sel); }
.vyard li.v-in { display: flex; align-items: center; gap: 0; }
.v-in::before { margin-right: 15px; }
/* плитки показателей на телефоне — сетка 2×2, а не столбик на весь экран */
@media (max-width: 420px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px; }
  .kpi .k-label { font-size: var(--fs-1); }
  .kpi .k-foot { font-size: var(--fs-1); }
  .kpi .k-val { font-size: var(--fs-6); }
}
@media (max-width: 760px) {
  .ukpi { padding: 14px 16px; gap: 6px; }
  .ukpi b { font-size: var(--fs-7); }
  .users-kpis { gap: 10px; }
}

/* ---------- уведомления внизу экрана ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 1000; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-size: var(--fs-3); font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); animation: toastIn .24s var(--ease); max-width: min(420px, calc(100vw - 32px)); }
.toast svg { width: 18px; height: 18px; flex: none; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast.ok svg circle { fill: var(--go); stroke: none; } .toast.ok svg path { stroke: #0B0C0D; }
.toast.bad svg circle { fill: var(--stop); stroke: none; } .toast.bad svg path { stroke: #fff; }
.toast.out { opacity: 0; translate: 0 6px; transition: opacity .25s, translate .25s; }
@keyframes toastIn { from { opacity: 0; translate: 0 8px; } }
@media (max-width: 760px) { body > .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); } }
dialog > .toasts { position: absolute; bottom: 18px; }

/* ---------- пересчёт чисел в плитках ---------- */
.kpi .k-val.bump { animation: kpiBump .9s var(--ease); }
@keyframes kpiBump { 0% { color: var(--go-ink); } 100% { color: var(--ink); } }

/* экран входа: место под подсказку пароля только при регистрации */
.field-hint.off { display: none; }

/* ---------- «Подписка» плотнее: тарифы и ответы помещаются на экран без прокрутки ---------- */
.plans-view { gap: 20px; padding: 8px 0 8px; }
.plans-hero { gap: 10px; }
.plans-hero h1 { font-size: clamp(26px, 3vw, 36px); }
.plans-hero p { font-size: var(--fs-3); }
.plan-card { padding: 22px 22px 20px; gap: 12px; }
.plan-price b { font-size: 40px; }
.plan-note { min-height: 3em; } /* ровно две строки: кнопки и списки карточек стоят на одной высоте */
.plan-btn { height: 44px; }
/* одна главная кнопка — у рекомендуемого тарифа; у остальных второстепенная */
.plan-card:not(.featured) .plan-btn:not(.is-current) { background: var(--s2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.plan-card:not(.featured) .plan-btn:not(.is-current):hover { background: var(--s3); filter: none; }
.plan-card hr { margin: 2px 0; }
.plan-card ul { gap: 9px; }
.plans-faq { gap: 12px; }
.plans-faq div { padding: 14px 18px; }
.plans-faq p { font-size: var(--fs-2); }

/* ---------- кнопка Google: место занято сразу, кнопка выезжает справа ---------- */
.google-slot { display: grid; gap: 16px; }
.google-slot[hidden] { display: none; }
/* Кнопка Google: круг на месте сразу, имя и почта выезжают из него влево.
   Рамка #googleBtn сдвинута вправо так, что видны только последние 40 px
   (круг), а её содержимое — на столько же влево, поэтому кнопка Google стоит
   на месте. При .ready оба сдвига уходят в ноль одновременно: рамка
   раскрывается влево, кнопка не двигается. Размеры кнопки Google замерены
   по пикселям — подробности в renderGoogle(). */
.google-slot .g-wrap { position: relative; max-width: 100%; height: 40px; margin: 2px auto; overflow: hidden; border-radius: 20px; }
.google-slot .google-btn { display: block; height: 40px; border-radius: 20px; overflow: hidden; transform: translateX(calc(100% - 40px)); }
.google-slot .google-btn > div:first-child { transform: translateX(calc(-100% + 40px)); }
.google-slot .google-btn, .google-slot .google-btn > div:first-child { transition: transform .62s cubic-bezier(.22, .9, .25, 1); will-change: transform; }
.google-slot .google-btn.ready, .google-slot .google-btn.ready > div:first-child,
.google-slot .google-btn.plain, .google-slot .google-btn.plain > div:first-child { transform: none; }
.google-slot .google-btn.plain, .google-slot .google-btn.plain > div:first-child,
.google-slot .google-btn.instant, .google-slot .google-btn.instant > div:first-child { transition: none; }
/* наш круг — копия гугловского: белый 36 px с ободком 2 px цвета кнопки */
.g-badge { position: absolute; right: 2px; top: 2px; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #202124; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.g-badge svg { width: 18px; height: 18px; display: block; }
.google-btn.ready + .g-badge, .google-btn.plain + .g-badge { display: none; }
/* простая кнопка Google, что стоит под окошком с почтой, — не мелькает */
.google-slot .google-btn:not(.plain):not(.ready) div[role="button"] { visibility: hidden; }

/* ---------- заставка ---------- */
#splash {
  position: fixed; inset: 0; z-index: 3000; display: none; place-content: center; justify-items: center; gap: 14px;
  background: var(--tex, none), var(--bg); color: var(--ink);
  transition: opacity .45s var(--ease);
}
html.resume #splash, #splash.on { display: grid; }
#splash.fade-in { animation: splashIn .32s var(--ease); }
#splash.out { opacity: 0; pointer-events: none; }
@keyframes splashIn { from { opacity: 0; } }
.splash-mark { width: 64px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.splash-mark circle { fill: var(--go); stroke: none; animation: splashDot 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes splashDot { 50% { transform: scale(1.35); filter: drop-shadow(0 0 6px var(--go)); } }
.splash-name { font-size: var(--fs-5); font-weight: 600; letter-spacing: -.02em; }
.splash-line { width: 140px; height: 2px; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; margin-top: 6px; }
.splash-line i { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--go); animation: splashRun 1.1s cubic-bezier(.45, .05, .35, 1) infinite; }
@keyframes splashRun { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ---------- «Проверить посетителя»: без пустот, кнопка всегда внизу ---------- */
.probe { display: flex; flex-direction: column; gap: 12px; }
.probe .verdict { order: 5; }
.probe > button[type="submit"] { order: 10; margin-top: auto; }

/* ---------- маршрут посетителя: линия плавно прорисовывается от входа к выходу ---------- */
/* рельсы пути больше не вспыхивают белым — просто не приглушаются */
.yard.routed .rail.lit { opacity: 1; stroke: var(--rail); stroke-width: 1.5; }
.yard.routed .ambient { opacity: 0; }
.yard .ambient, .yard .term, .yard .rail, .yard .flowline { transition: opacity .35s var(--ease); }
.yard .route-draw { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: routeDraw .75s cubic-bezier(.4, 0, .2, 1) forwards; }
.yard .route-draw.drawn { animation: none; stroke-dashoffset: 0; }
@keyframes routeDraw { to { stroke-dashoffset: 0; } }
/* без анимаций (системная настройка или «Интерфейс») — линия сразу целиком */
html.calm .yard .route-draw { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .yard .route-draw { stroke-dashoffset: 0; } }

/* ---------- ссылки на документы внутри пульта ---------- */
:is(.legal-links, .pay-legal, .set-legal) .link-legal { color: var(--ink-2); text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); }
:is(.legal-links, .pay-legal, .set-legal) .link-legal:hover { color: var(--ink); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin: 8px 0 0; font-size: var(--fs-2); color: var(--ink-3); }
.legal-links a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.legal-links a:hover { color: var(--ink); }
.pay-legal { margin: 0; padding-left: 24px; font-size: var(--fs-1); color: var(--ink-3); line-height: 1.5; }
.set-legal { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 0; padding: 0 12px; font-size: var(--fs-1); color: var(--ink-3); }
.sheet-body ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); line-height: 1.6; font-size: var(--fs-3); }
.sheet-body li b, .sheet-body p b { color: var(--ink); font-weight: 500; }
#privacyBody a { color: var(--go-ink); }
@media (max-width: 760px) { .set-legal { display: none; } }
@media (max-width: 760px) { .legal-links span { display: none; } .legal-links { gap: 8px 18px; } }
.legal-links .mail-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.legal-links .mail-link:hover { text-decoration: underline; }
.mail-link svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* Тарифы на компьютере помещаются в экран целиком — без лишнего нижнего отступа и прокрутки. */
@media (min-width: 761px) { main:has(> .plans-view:not([hidden])) { padding-bottom: 16px; } }
/* Невысокий экран ноутбука: тарифы чуть плотнее, чтобы всё влезло без прокрутки. */
@media (min-width: 761px) and (max-height: 860px) {
  main:has(> .plans-view:not([hidden])) { padding-top: 10px; padding-bottom: 6px; }
  .plans-view { gap: 14px; padding: 0; }
  .plans-hero { gap: 8px; }
  .plan-card { padding: 18px 20px 16px; gap: 10px; }
  .plan-price b { font-size: 34px; }
  .plan-btn { height: 40px; }
  .plan-card ul { gap: 7px; }
  .plans-faq div { padding: 12px 16px; }
  .legal-links { margin: 0; }
}

/* ---------- оплата картой через lava.top ---------- */
.lava-card { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); }
.lava-card b { font-size: var(--fs-4); color: var(--ink); }
.lava-card p { margin: 0; color: var(--ink-2); font-size: var(--fs-3); line-height: 1.55; }
.lava-brands { display: flex; align-items: center; gap: 10px; height: 22px; margin-bottom: 4px; }
.lava-brands svg { height: 18px; width: auto; }
.lava-brands .brand-visa text { font: italic 800 19px var(--sans); fill: var(--ink); letter-spacing: -.02em; }
.lava-brands .brand-mc { height: 20px !important; }
.lava-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lava-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.lava-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--s2); border: 1px solid var(--line-2); font: 500 var(--fs-2) var(--mono); color: var(--ink-2); }
.lava-steps b { display: block; font-size: var(--fs-3); color: var(--ink); font-weight: 500; }
.lava-steps p { margin: 2px 0 0; font-size: var(--fs-2); color: var(--ink-3); line-height: 1.5; }
.tk-card { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--t-ink2); stroke-width: 1.5; stroke-linecap: round; }
.tk-bar { display: flex; justify-content: center; align-items: flex-end; gap: 1.6px; height: 26px; margin: 16px 0 0; }
.tk-bar i { display: block; height: 26px; background: var(--t-ink); }
.tk-bar i.s { height: 23px; }
/* Ожидание оплаты в окне lava.top. */
.lava-wait { display: grid; justify-items: start; gap: 10px; padding: 22px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); }
.lava-wait b { font-size: var(--fs-4); color: var(--ink); }
.lava-wait p { margin: 0; color: var(--ink-2); font-size: var(--fs-3); line-height: 1.55; }
.lava-spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--go) 25%, transparent); border-top-color: var(--go); animation: lavaSpin .9s linear infinite; }
@keyframes lavaSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lava-spin { animation-duration: 2.4s; } }
.lava-wait-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lava-wait-actions .btn { text-decoration: none; color: var(--ink); }
.lava-wait-actions .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.lava-wait-actions .btn.ghost:hover { color: var(--ink); }

/* Полоса загрузки в шапке окна (как под шапкой страницы). */
dialog.sheet > .sheet-head { position: relative; }
/* Пояснения к оплате картой: карточка и шаги с тем же шагом, что у колонки. */
#cardIntro { display: grid; gap: 18px; align-content: start; }
#cardPaid:not([hidden]) { display: grid; gap: 14px; }
.lava-steps { padding: 0 4px; }
.lava-steps li > span { margin-top: 1px; }
/* Карточка «Оплата картой» начинается на одной высоте с карточкой «Ваш заказ». */
@media (min-width: 761px) { #cardPane { padding-top: 0; } }
/* Вкладки «Карта / USDT» отделены от карточек тем же отступом, что и от шапки. */
.sheet-pay .pay-method { margin-bottom: 14px; }
@media (max-width: 760px) { .sheet-pay .pay-method { margin-bottom: 12px; } }
/* На телефоне окно оплаты — такая же выезжающая снизу панель во всю ширину, как остальные окна. */
@media (max-width: 760px) { .sheet-pay, .sheet-receipt, .sheet-sm, .sheet-tfa { width: 100vw; max-width: 100vw; } }
/* Какой картой платят: иностранной (доллары) или российской (рубли). */
.card-cur { display: flex; width: 100%; }
.card-cur label { flex: 1; }
.card-cur span { justify-content: center; text-align: center; white-space: nowrap; }
@media (max-width: 420px) { .card-cur span { font-size: var(--fs-2); padding-inline: 6px; } }
.lava-brands .brand-mir text { font: 800 18px var(--sans); fill: #0F754C; letter-spacing: .02em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lava-brands .brand-mir text { fill: #3FBF7F; } } :root[data-theme="dark"] .lava-brands .brand-mir text { fill: #3FBF7F; }

/* ---------- аудит внешнего вида ---------- */
/* Редактор правила не шире карточки: колонка сжимается, сегменты переносятся. */
.ed { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .ed .act { grid-template-columns: minmax(0, 1fr); }
  /* три режима — столбиком во всю ширину: длинные подписи не обрезаются */
  .seg.act-mode { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
  .seg.act-mode span { padding: 9px 12px; }
  .sheet-pay .sheet-head { padding-left: 16px; }
}
/* Шапка на планшете и маленьком ноутбуке: почта прячется, у состояния — только точки. */
@media (min-width: 761px) and (max-width: 1100px) {
  .bar .who { display: none; }
  .health { gap: 10px; }
  .health span { font-size: 0; gap: 0; } /* подписи прячутся, точки остаются (подсказка — при наведении) */
  .health b { display: none; }
}
/* Окно оплаты на шаге «Ждём перевод»: выше, чтобы карточка заказа не обрезалась. */
@media (min-width: 761px) { .sheet-pay:has(#usdtInv:not([hidden])) { height: min(92dvh, 760px); max-height: min(92dvh, 760px); } }
/* Ссылки на документы в меню настроек — обычные ссылки, а не пункты меню. */
.set-nav .set-legal button { height: auto; padding: 0; display: inline; width: auto; background: none; }
/* «Проверить посетителя» не тянется на всю высоту схемы — без пустоты перед кнопкой. */
.board > .probe, .board > .panel.probe { align-self: start; }

.co-note { margin: -4px 0 0; font-size: var(--fs-2); color: var(--ink-3); line-height: 1.45; text-align: right; }
/* плитки сетей USDT — одной высоты, даже если название в две строки */
.net-list { grid-auto-rows: 1fr; }

/* Ответы на «Подписке» — той же ширины, что три карточки тарифов. */
.plans-faq { max-width: 1172px; }
.desk-empty p, .plans-hero p, .pane-head .sub { text-wrap: pretty; }
.rc-dates input { border-radius: var(--r-sm); }
#authErr:empty { display: none; } /* пустая строка ошибки не раздвигает форму */

/* ---------- вход по коду (2FA) и журнал входов ---------- */
.tfa-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md); background: color-mix(in srgb, var(--warn) 10%, var(--s1)); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent); }
.tfa-alert svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--warn); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tfa-alert div { display: grid; gap: 3px; }
.tfa-alert b { font-size: var(--fs-3); font-weight: 600; }
.tfa-alert span { color: var(--ink-2); font-size: var(--fs-3); line-height: 1.5; }
.tfa-badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-1); font-weight: 500; vertical-align: 2px; background: var(--s2); color: var(--ink-3); }
.tfa-badge.on { background: color-mix(in srgb, var(--go) 16%, transparent); color: var(--go-ink); }
.tfa-ctl { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }
.tfa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tfa-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; }
.tfa-step > b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-2); font-weight: 600; background: var(--s2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tfa-step.on > b { background: var(--go); color: #0B0C0D; }
.tfa-step > div { display: grid; gap: 6px; min-width: 0; padding-top: 3px; }
.tfa-step h3 { font-size: var(--fs-4); font-weight: 600; }
.tfa-qr { display: flex; gap: 18px; align-items: center; margin-top: 6px; }
.tfa-qr-img { flex: none; width: 148px; height: 148px; padding: 10px; border-radius: 14px; background: #fff; display: block; }
.tfa-qr-img svg { width: 100%; height: 100%; display: block; }
.tfa-key { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.tfa-key code { font: 500 var(--fs-3)/1.6 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .06em; word-break: normal; overflow-wrap: normal; white-space: normal; color: var(--ink); background: none; padding: 0; }
.tfa-confirm { display: flex; gap: 10px; margin-top: 4px; }
.tfa-confirm input { width: 150px; }
.code-in { font-variant-numeric: tabular-nums; letter-spacing: .16em; text-align: center; font-size: var(--fs-5); }
#codeDlgIn { width: 100%; }
.tfa-codes { display: grid; gap: 16px; }
.tfa-done { display: flex; gap: 14px; align-items: flex-start; }
.tfa-done > svg { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: color-mix(in srgb, var(--go) 16%, transparent); fill: none; stroke: var(--go-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tfa-done > div { display: grid; gap: 4px; }
.tfa-done h3 { font-size: var(--fs-4); font-weight: 600; }
.sheet-body .tfa-list { list-style: none; margin: 0; padding: 16px 18px; display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 10px clamp(28px, 10vw, 64px); border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); }
.tfa-list li { font: 500 var(--fs-3)/1.5 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .04em; color: var(--ink); }
.tfa-codes-act { justify-content: flex-start; flex-wrap: wrap; }
.tfa-codes-act .grow { flex: 1; }
.tfa-ack { display: flex; gap: 10px; align-items: center; font-size: var(--fs-3); color: var(--ink-2); cursor: pointer; }
.sec-log .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-log td { white-space: nowrap; }
.sec-log td.sec-ev { white-space: normal; min-width: 180px; }
.sec-log .sec-who { display: none; }
.sec-log.all .sec-who { display: table-cell; }
.sec-log .ev-bad { color: var(--stop); }
@media (max-width: 560px) {
  .tfa-qr { flex-direction: column; align-items: flex-start; }
  .tfa-codes-act .grow { display: none; }
  .tfa-codes-act .btn.go { width: 100%; }
  .tfa-ctl { width: 100%; }
}
#codeDlgErr:empty, #tfaMsg:empty { display: none; }

/* ---------- постбэки ---------- */
.pb-steps { padding: 6px 22px; }
.pb-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.pb-step:first-child { border-top: 0; }
.pb-step > b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-2); font-weight: 600; background: var(--s2); color: var(--ink-2); }
.pb-step > div { display: grid; gap: 8px; min-width: 0; padding-top: 3px; }
.pb-step h3 { font-size: var(--fs-4); font-weight: 600; }
.pb-code, .pb-url code { display: block; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); font: var(--fs-3)/1.5 var(--mono, ui-monospace, monospace); color: var(--ink); overflow-wrap: anywhere; }
.pb-url { display: flex; gap: 10px; align-items: stretch; }
.pb-url code { flex: 1; min-width: 0; }
.pb-note { font-size: var(--fs-2) !important; }
.pb-step .set-actions { justify-content: flex-start; }
@media (max-width: 560px) { .pb-url { flex-direction: column; } }

/* ---------- свои домены ---------- */
.dom-add { display: flex; gap: 10px; }
.dom-add input { flex: 1; min-width: 0; }
.dom-how { padding: 18px 22px; gap: 10px; }
.dom-how h3 { font-size: var(--fs-4); font-weight: 600; }
.dom-how ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: var(--fs-3); line-height: 1.55; }
.dom-how code, .pane[data-pane="domains"] .pane-head code { font: var(--fs-3) var(--mono, ui-monospace, monospace); color: var(--ink); }
.dom-empty { padding: 16px 0; }
.dom-row .sub.bad { color: var(--stop); }
#domMsg:empty { display: none; }
.pane[data-pane="domains"] .set-form { max-width: none; }

/* документы — внизу экрана настроек, по центру */
.set-foot { grid-column: 1 / -1; align-self: end; margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
/* документы — всегда у нижнего края экрана, даже если раздел короткий */
.settings:not([hidden]) { min-height: 100%; grid-template-rows: 1fr auto; }
@media (min-width: 761px) { main:has(> .settings:not([hidden])) { padding-bottom: 18px; } }
/* кнопка «Удалить» у домена — проявляется при наведении на строку */
.dom-del { opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.dom-row:hover .dom-del, .dom-del:focus-visible, .dom-del.armed { opacity: 1; pointer-events: auto; }
.dom-del .d2, .dom-del.armed .d1 { display: none; }
.dom-del.armed .d2 { display: inline; }
.dom-del.armed { background: color-mix(in srgb, var(--stop) 14%, transparent); }
@media (hover: none) { .dom-del { opacity: 1; pointer-events: auto; } }
.dom-share { margin-right: 6px; }

/* ---------- забыли пароль, удаление аккаунта ---------- */
.forgot-link { justify-self: end; font-size: var(--fs-2); margin-top: -2px; }
.forgot-link[hidden] { display: none; }
.auth-note { color: var(--l-ink-2); font-size: var(--fs-3); line-height: 1.55; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--lime) 8%, transparent); border: 1px solid color-mix(in srgb, var(--lime) 22%, transparent); }
.del-field { display: grid; gap: 6px; font-size: var(--fs-3); color: var(--ink-2); }
.del-field[hidden] { display: none; }
#delErr:empty { display: none; }

/* блокировка */
.blocked-ico { background: color-mix(in srgb, #F25F4C 14%, transparent) !important; }
.blocked-ico svg { stroke: #F25F4C !important; }
a.btn-go { text-decoration: none; }
.rc-act.danger { color: var(--stop); }
.rc-act.danger:hover { background: color-mix(in srgb, var(--stop) 12%, transparent); border-color: color-mix(in srgb, var(--stop) 35%, transparent); color: var(--stop); }
.u-blocked { display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-1); color: var(--stop); background: color-mix(in srgb, var(--stop) 12%, transparent); vertical-align: middle; }

/* предложения и замечания */
.fb-card { padding: 22px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 18px; }
.fb-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--go) 12%, transparent); }
.fb-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--go-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fb-text { display: grid; gap: 4px; }
.fb-text h3 { font: 600 var(--fs-5) var(--mono); }
.fb-acts a.btn { text-decoration: none; color: var(--ink); }
.fb-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 560px) { .fb-acts .btn { flex: 1 1 100%; justify-content: center; } }

/* приглашения в команду */
.inv-card { padding: 20px 22px; gap: 14px; }
.inv-head h3 { font-size: var(--fs-4); font-weight: 600; margin-bottom: 4px; }
.inv-new { display: flex; gap: 10px; }
.inv-new input { flex: 1; min-width: 0; height: 40px; border-radius: var(--r-sm); }
.inv-made { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--go) 7%, transparent); border: 1px solid color-mix(in srgb, var(--go) 22%, transparent); }
.inv-cap { font-size: var(--fs-1); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.inv-list { display: grid; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.inv-row > div { display: grid; gap: 2px; min-width: 0; }
.inv-row b { font-weight: 500; font-size: var(--fs-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-st { font-size: var(--fs-2); color: var(--ink-3); }
.inv-st.on { color: var(--go-ink); }
.inv-note { margin-bottom: 4px; }
@media (max-width: 560px) { .inv-new { flex-direction: column; } }

/* ---------- открытая страница о Стрелке (для тех, кто не вошёл) ---------- */
.landing {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto; overflow-x: hidden;
  background: radial-gradient(1000px 640px at 78% -12%, rgba(198, 244, 50, .09), transparent 60%),
    radial-gradient(rgba(255, 240, 220, .04) .6px, transparent .9px) 0 0 / 5px 5px, #0E0D0C;
  color: #E8ECEE; color-scheme: dark;
  --l-ink: #E8ECEE; --l-ink-2: #A0A8AE; --l-ink-3: #697278; --l-line: rgba(232, 236, 238, .1); --lime: #C6F432;
}
.landing[hidden], html.resume .landing { display: none; }
.landing a { color: var(--lime); }
.ld-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 max(20px, calc((100vw - 1120px) / 2)); background: rgba(14, 13, 12, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--l-line); }
.ld-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-4); color: var(--l-ink) !important; text-decoration: none; }
.ld-logo svg { width: 28px; height: 20px; fill: none; stroke: var(--l-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ld-logo svg circle { fill: var(--lime); stroke: none; }
.ld-nav { display: flex; gap: 22px; margin-right: auto; }
.ld-nav a { color: var(--l-ink-2) !important; text-decoration: none; font-size: var(--fs-3); }
.ld-nav a:hover { color: var(--l-ink) !important; }
.ld-cta { display: flex; gap: 8px; margin-left: auto; }
.ld-btn { height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--lime); background: var(--lime); color: #0B0C0D; font: 600 var(--fs-3) inherit; cursor: pointer; transition: filter .15s, background .15s; }
.ld-btn:hover { filter: brightness(1.06); }
.ld-btn.ghost { background: transparent; border-color: var(--l-line); color: var(--l-ink); }
.ld-btn.ghost:hover { background: rgba(232, 236, 238, .06); filter: none; }
.ld-btn.big { height: 48px; padding: 0 26px; font-size: var(--fs-4); }
.ld-hero { max-width: 1120px; margin: 0 auto; padding: 96px 20px 72px; display: grid; justify-items: start; gap: 22px; }
.ld-hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1; letter-spacing: -.035em; font-weight: 600; }
.ld-hero > p { max-width: 640px; color: var(--l-ink-2); font-size: var(--fs-5); line-height: 1.55; }
.ld-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ld-note { color: var(--l-ink-3) !important; font-size: var(--fs-3) !important; }
.ld-sec { max-width: 1120px; margin: 0 auto; padding: 56px 20px; border-top: 1px solid var(--l-line); }
.ld-sec h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.025em; font-weight: 600; margin-bottom: 22px; }
.ld-sub { color: var(--l-ink-2); font-size: var(--fs-4); line-height: 1.6; max-width: 760px; margin: -8px 0 22px; }
.ld-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ld-grid article, .ld-two article { padding: 20px; border-radius: 16px; background: rgba(232, 236, 238, .04); border: 1px solid var(--l-line); display: grid; gap: 8px; align-content: start; }
.ld-grid b, .ld-two b { font-size: var(--fs-4); font-weight: 600; }
.ld-grid p, .ld-two p { color: var(--l-ink-2); font-size: var(--fs-3); line-height: 1.55; }
.ld-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ld-plan { padding: 24px; border-radius: 18px; background: rgba(232, 236, 238, .04); border: 1px solid var(--l-line); display: grid; gap: 12px; align-content: start; }
.ld-plan.hot { border-color: color-mix(in srgb, var(--lime) 55%, transparent); background: color-mix(in srgb, var(--lime) 6%, rgba(232, 236, 238, .03)); }
.ld-plan h3 { font-size: var(--fs-5); font-weight: 600; }
.ld-price { color: var(--l-ink-2); font-size: var(--fs-3); }
.ld-price b { font: 600 34px/1 var(--mono); color: var(--l-ink); letter-spacing: -.02em; margin-right: 4px; }
.ld-plan ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.ld-plan li { position: relative; padding-left: 20px; color: var(--l-ink-2); font-size: var(--fs-3); }
.ld-plan li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 8px; height: 5px; border: solid var(--lime); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.ld-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.ld-contacts p { color: var(--l-ink-2); font-size: var(--fs-4); line-height: 1.6; }
.ld-foot { max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; border-top: 1px solid var(--l-line); display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--l-ink-3); font-size: var(--fs-2); }
.ld-foot a { color: var(--l-ink-2) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 236, 238, .25); }
@media (max-width: 860px) {
  .ld-nav { display: none; }
  .ld-grid, .ld-plans, .ld-two { grid-template-columns: 1fr; }
  .ld-hero { padding: 56px 20px 48px; }
}
@media (max-width: 480px) {
  .ld-bar { gap: 12px; padding: 0 16px; }
  .ld-btn { padding: 0 14px; }
  .ld-hero-cta .ld-btn { flex: 1 1 100%; }
}

/* телефон: экран не сдвигается влево-вправо — всё широкое прокручивается внутри своих рамок */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 760px) {
  html, body { overscroll-behavior-x: none; }
  main { overflow-x: hidden; }
}

.ld-hero { position: relative; }
.ld-route { position: absolute; right: 20px; top: 92px; width: min(440px, 40vw); height: auto; pointer-events: none; }
.ld-route path { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.ld-route .r-rail { stroke: rgba(232, 236, 238, .35); stroke-dasharray: 2 7; }
.ld-route .r-go { stroke: var(--lime); stroke-dasharray: 6 9; animation: ldFlow 1.4s linear infinite; }
.ld-route .r-bot { stroke: #F25F4C; stroke-dasharray: 6 9; animation: ldFlow 1.8s linear infinite; opacity: .8; }
@keyframes ldFlow { to { stroke-dashoffset: -30; } }
.ld-route .r-in { fill: #E8ECEE; } .ld-route .r-hub { fill: #0E0D0C; stroke: var(--lime); stroke-width: 2.4; }
.ld-route .r-out { fill: var(--lime); } .ld-route .r-out.bot { fill: #F25F4C; }
.ld-route text { fill: #E8ECEE; font: 500 13px var(--mono, ui-monospace, monospace); }
.ld-route .r-sub { fill: #697278; font-size: 11.5px; }
html.calm .ld-route path { animation: none; }
@media (prefers-reduced-motion: reduce) { .ld-route path { animation: none; } }
@media (max-width: 980px) { .ld-route { display: none; } }
.ld-sec { scroll-margin-top: 72px; }
.inv-row > .inv-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }

/* «Скопировано» — кнопка зелёная с галочкой */
.btn.copied { background: var(--go) !important; border-color: var(--go) !important; color: #0B0C0D !important; display: inline-flex; align-items: center; gap: 6px; }
.btn.copied svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#invLeft { color: var(--go-ink); }
/* форма предложения */
.sheet-fb { width: min(520px, calc(100vw - 32px)); }
.fb-kind { margin-bottom: 2px; }
.fb-field { display: grid; gap: 6px; font-size: var(--fs-3); color: var(--ink-2); }
.fb-field textarea { min-height: 150px; resize: vertical; padding: 12px; border-radius: var(--r-sm); line-height: 1.5; }
.fb-count { justify-self: end; color: var(--ink-3); font-size: var(--fs-1); }
.fb-reply { color: var(--ink-3) !important; font-size: var(--fs-2); }
#fbErr:empty { display: none; }
.fb-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 24px 26px; }
.fb-done[hidden] { display: none; }
.fb-ok { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--go) 16%, transparent); }
.fb-ok svg { width: 26px; height: 26px; fill: none; stroke: var(--go-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fb-done h3 { font-size: var(--fs-5); font-weight: 600; }
.fb-done p { color: var(--ink-2); }
@media (max-width: 760px) { .sheet-fb { width: 100vw; max-width: 100vw; } }

/* Режим команды (trafficlight…/team): простой вход без сцены, анимации, названия и условий */
html.team #landing, html.team .scene, html.team .auth-legal,
html.team .splash-mark, html.team .splash-name, html.team .mark svg { display: none !important; }
html.team .auth-shell { grid-template-columns: 1fr; max-width: 440px; min-height: 0; background: none; border: 0; padding: 0; }
html.team .login, html.team .login *, html.team #splash { animation: none !important; transition: none !important; }

/* Общая ссылка команды и заявки */
.inv-url { display: flex; gap: 10px; align-items: center; }
.inv-url code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2, var(--bg)); border: 1px solid var(--line); font: 500 var(--fs-3) var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-empty { color: var(--ink-3); font-size: var(--fs-3); padding-top: 4px; }
@media (max-width: 560px) { .inv-url { flex-direction: column; align-items: stretch; } }

/* Промокоды */
.promo-note { border-color: color-mix(in srgb, var(--go) 40%, transparent); }
.field .opt { font-style: normal; color: var(--l-ink-3, var(--ink-3)); font-weight: 400; }
.promo-card { max-width: none; margin-top: 16px; }
.promo-card .inv-new { max-width: 460px; }
.promo-new { padding: 18px 22px; display: grid; grid-template-columns: 1.2fr .8fr .6fr 2fr auto; gap: 10px; align-items: end; }
.promo-new label { display: grid; gap: 6px; font-size: var(--fs-2); color: var(--ink-2); }
.promo-new input { height: 40px; border-radius: var(--r-sm); }
.promo-list { margin-top: 6px; }
.promo-row .promo-code { font: 600 var(--fs-4) var(--mono); }
.promo-row .promo-stat { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-2); color: var(--ink-3); }
.promo-row .promo-stat b { color: var(--ink); font: 500 var(--fs-3) var(--mono); }
.promo-row.off { opacity: .55; }
.promo-tag { margin-left: 8px; padding: 2px 8px; border-radius: var(--r-pill); font: 500 var(--fs-1) var(--mono); background: color-mix(in srgb, var(--go) 14%, transparent); color: var(--go-ink); white-space: nowrap; }
@media (max-width: 900px) { .promo-new { grid-template-columns: 1fr 1fr; } .promo-new .promo-note-in, .promo-new .btn { grid-column: 1 / -1; } }
