:root {
  --bg: #120f22;
  --bg-2: #1a1530;
  --card: #211b3b;
  --card-2: #2a2349;
  --line: #352c5c;
  --text: #f1eefc;
  --muted: #a49bc8;
  --accent: #7c5cff;
  --accent-2: #9b82ff;
  --ok: #3ccf91;
  --err: #ff6b81;
  --radius: 14px;
  font-family: "Onest", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 15% -10%, #2c2160 0%, transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  /* подвал прижат к низу даже на коротких страницах */
  display: flex;
  flex-direction: column;
}
.page { flex: 1 0 auto; width: 100%; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .75em 1.4em; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 1rem;
  cursor: pointer; text-decoration: none !important; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--card-2); }
.btn.block { width: 100%; }
.btn.sm { padding: .45em .9em; font-size: .875rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 0 0 .35em; }
input, select {
  width: 100%; padding: .75em .9em; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
/* свой выпадающий список: стрелка в стиле сайта с отступом от края */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.8em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239b82ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1em center;
}
select option { background: var(--bg-2); color: var(--text); }
/* числовое поле без стандартных стрелок браузера; свои кнопки −/+ */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; }
.stepper input { text-align: center; font-weight: 700; font-size: 1.1rem; }
.stepper .step { border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font-size: 1.3rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.stepper .step:hover { background: var(--accent); border-color: var(--accent); }
.field { margin-bottom: 1rem; }
.check { display: flex; gap: .6em; align-items: flex-start; color: var(--muted); font-size: .9rem; }
.check input { width: auto; margin-top: .3em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.flash { padding: .8em 1em; border-radius: 10px; margin-bottom: 1.2rem; border: 1px solid; }
.flash.ok { border-color: #2c7a5c; background: #12352a; color: #b9f3dc; }
.flash.error { border-color: #7a2c3d; background: #3a1620; color: #ffd0d8; }

/* шапка и подвал */
.header { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span b { color: var(--accent-2); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn { color: #fff; }
.footer { flex-shrink: 0; border-top: 1px solid var(--line); margin-top: 80px; padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.footer .row { display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: space-between; }
.footer a { color: var(--muted); }

/* лендинг */
.hero { padding: 70px 0 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
.hero h1 b { color: var(--accent-2); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { display: flex; justify-content: center; }
.hero-art .orb {
  width: min(360px, 80vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9b82ff 0%, #5b3fe0 45%, #241a52 75%);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 30px 120px rgba(124, 92, 255, .35);
}
.hero-art .orb img { width: 45%; filter: brightness(0) invert(1); }
.badge { display: inline-block; padding: .35em .9em; border-radius: 999px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--accent-2); font-size: .85rem; font-weight: 600; margin-bottom: 1.2rem; }
.section { padding: 56px 0 8px; }
.section h2 { font-size: 2rem; }
.grid { display: grid; gap: 18px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.feature .icon { font-size: 1.6rem; margin-bottom: .4rem; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 2rem; font-weight: 800; margin: .3rem 0 .8rem; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.4rem; color: var(--muted); }
.plan li::before { content: "•"; color: var(--accent); margin-right: .5em; }
.plan .btn { margin-top: auto; }
.plan.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
/* выбранный тариф и подсветка формы заказа после нажатия «Выбрать» */
.plan.selected { border-color: var(--accent-2); background: linear-gradient(180deg, #34297a 0%, var(--card) 70%);
  box-shadow: 0 0 0 2px var(--accent-2) inset, 0 10px 40px rgba(124, 92, 255, .35); }
.plan.selected h3::after { content: " ✓"; color: var(--accent-2); }
#order { transition: border-color .3s, box-shadow .3s; }
#order.highlight { border-color: var(--accent-2); animation: order-glow 1.6s ease-out; }
@keyframes order-glow {
  0% { box-shadow: 0 0 0 0 rgba(155, 130, 255, .9); }
  35% { box-shadow: 0 0 0 10px rgba(155, 130, 255, .25), 0 0 40px rgba(124, 92, 255, .55); }
  100% { box-shadow: 0 0 0 0 rgba(155, 130, 255, 0), 0 0 24px rgba(124, 92, 255, .25); }
}
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; left: 24px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 700; }
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .8em 0 0; color: var(--muted); }
.legal { max-width: 820px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal p, .legal li { color: #d6d0ee; }
.todo { background: #3a2f12; border: 1px dashed #c9a43b; color: #ffe39a; padding: 2px 6px; border-radius: 6px; }

/* авторизация */
.auth { max-width: 420px; margin: 40px auto; }
.auth h1 { font-size: 1.6rem; text-align: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 20px 0; font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tg-widget { display: flex; justify-content: center; min-height: 40px; }

/* кабинет */
.cab { width: 100%; display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 0 8px 18px; }
.side h6 { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; margin: 18px 10px 8px; }
.side a, .side button.link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.side a:hover, .side button.link:hover { background: var(--card); color: var(--text); text-decoration: none; }
.side a.active { background: var(--accent); color: #fff; }
.main { padding: 22px 28px 40px; min-width: 0; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-bottom: 26px; }
.pill { display: inline-flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.topbar .pill:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }
.burger { white-space: nowrap; }
.page-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
.sub-card { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 28px; align-items: center; }
details.rename { background: none; border: 0; padding: 0; margin: 0 0 6px; }
details.rename summary { font-weight: 500; font-size: .85rem; color: var(--accent-2); list-style: none; width: fit-content; }
details.rename summary::-webkit-details-marker { display: none; }
details.rename form { margin-top: 8px; }
details.rename p { margin: 6px 0 0; }
/* QR в рамке: акцентная обводка, мягкое свечение, подпись */
.qr-box { margin: 0; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 16px 14px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #3a2c86 0%, var(--card-2) 55%, var(--bg-2) 100%);
  box-shadow: 0 0 0 1px rgba(155, 130, 255, .25) inset, 0 12px 40px rgba(124, 92, 255, .25); }
.qr-box img { display: block; width: 180px; height: 180px; padding: 10px; border-radius: 12px; background: #fff; }
.qr-box figcaption { text-align: center; font-size: .85rem; font-weight: 600; line-height: 1.35; }
.qr-box figcaption span { color: var(--muted); font-weight: 400; font-size: .78rem; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.status { font-weight: 600; }
.status.on { color: var(--ok); }
.status.off { color: var(--err); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: .6rem 0 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: var(--muted); font-weight: 500; }
.total { font-size: 1.4rem; font-weight: 800; }
.burger { display: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-art { display: none; }
  .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
  .cab { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: none; }
  .side.open { display: block; }
  .burger { display: inline-flex; margin-right: auto; }
  .main { padding: 16px; }
  .sub-card { grid-template-columns: 1fr; }
}
