:root {
  --bg: #0e0e11;
  --card: #17171b;
  --card-2: #1f1f26;
  --stroke: #2a2a33;
  --text: #f3f3f6;
  --muted: #8b8b96;
  --accent: #b9a3ff;
  --accent-ink: #1b1030;
  --green: #34c759;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* атрибут hidden должен побеждать любые display из классов ниже */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

/* ── Загрузка ── */
.loader { display: flex; justify-content: center; padding: 64px 0; }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--stroke);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Шапка ── */
.brand { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 17px; font-weight: 600; }

/* ── Карточки ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }

.view-title { font-size: 28px; line-height: 1.15; font-weight: 700; margin: 8px 0 16px; }

.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-head h1 { margin: 0; font-size: 22px; font-weight: 700; }

.badge {
  flex: none;
  background: rgba(52, 199, 89, .16);
  color: var(--green);
  font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}

.status-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 18px 0 4px;
}
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.muted { color: var(--muted); margin: 8px 0 0; font-size: 14px; }

/* ── Кнопки ── */
.btn {
  display: block; width: 100%;
  border: 0; border-radius: 14px;
  padding: 15px 18px;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 14px;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--card-2); color: var(--text); }

/* ── Список преимуществ ── */
.features { list-style: none; padding: 0; margin: 0 0 22px; }
.features li {
  position: relative; padding-left: 30px; margin-bottom: 12px;
  font-size: 16px;
}
.features li::before {
  content: ""; position: absolute; left: 6px; top: 7px;
  width: 6px; height: 11px;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Тарифы ── */
.plan {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
}
.plan.is-selected { border-color: var(--accent); background: #1c1727; }
.plan-main { flex: 1; min-width: 0; }
.plan-name { font-size: 17px; font-weight: 700; }
.plan-tag {
  display: inline-block; margin-top: 6px;
  background: rgba(185, 163, 255, .16); color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.plan-price { text-align: right; }
.plan-price .main { font-size: 17px; font-weight: 700; white-space: nowrap; }
.plan-price .note { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; }
.radio {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--stroke);
}
.plan.is-selected .radio {
  border-color: var(--accent); background: var(--accent);
  position: relative;
}
.plan.is-selected .radio::after {
  content: ""; position: absolute; left: 6px; top: 3px;
  width: 5px; height: 10px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sticky-cta { margin-top: 20px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 10px 0 0; }

/* ── Установка ── */
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 0; border-radius: 999px;
  background: var(--card); color: var(--muted);
  padding: 10px 18px; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.tab.is-active { background: var(--card-2); color: var(--text); }

.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 12px; }
.steps li:last-child { margin-bottom: 0; }
.steps a { color: var(--accent); }

/* ── Уведомление ── */
.toast {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: 528px; margin: 0 auto;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  animation: rise .2s ease-out;
}
.toast.is-error { border-color: #5c2b2b; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
