:root {
  --bg: #07080f;
  --bg-2: #0d1020;
  --card: rgba(22, 26, 48, 0.62);
  --card-solid: #141831;
  --border: rgba(140, 150, 255, 0.14);
  --border-strong: rgba(140, 150, 255, 0.3);
  --text: #eef0ff;
  --muted: #9097bd;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124, 92, 255, 0.45); }

/* Фон-аврора */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.aurora::before, .aurora::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .55;
}
.aurora::before {
  width: 620px; height: 620px; left: -160px; top: -200px;
  background: radial-gradient(circle, #7c5cff 0%, transparent 70%);
  animation: float1 18s ease-in-out infinite alternate;
}
.aurora::after {
  width: 560px; height: 560px; right: -180px; top: 120px;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  opacity: .35;
  animation: float2 22s ease-in-out infinite alternate;
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
@keyframes float1 { to { transform: translate(120px, 80px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-100px, 140px) scale(.9); } }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 8, 15, 0.6);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(124, 92, 255, .45); flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a.link:hover { color: var(--text); }
@media (max-width: 720px) { .nav a.link { display: none; } }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 28px rgba(124, 92, 255, .4); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 36px rgba(124, 92, 255, .6); }
.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .09); border-color: var(--border-strong); }
.btn-danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* Карточки */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (max-width: 600px) { .card { padding: 20px; } }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .3); font-size: 13px; color: #c9bfff;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero h1 {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 6vw, 64px); line-height: 1.08;
  letter-spacing: -.03em; margin: 22px auto 18px; max-width: 900px;
}
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 600; }
.hero-stats div span { color: var(--muted); font-size: 14px; }

/* Секции */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-family: var(--font-head); font-weight: 600; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .3);
}
.feature .icon svg { width: 22px; height: 22px; stroke: #b3a3ff; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.plan:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.plan.hl { border-color: rgba(124, 92, 255, .6); background: linear-gradient(180deg, rgba(124, 92, 255, .16), var(--card) 60%); }
.plan .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.plan h3 { margin: 0; font-size: 20px; }
.plan .desc { color: var(--muted); font-size: 14px; margin: 4px 0 18px; min-height: 22px; }
.plan .price { font-family: var(--font-head); font-size: 38px; font-weight: 600; letter-spacing: -.02em; }
.plan .price small { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--ok); }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: step; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 14px;
  background: var(--accent-grad); font-weight: 700; font-family: var(--font-head);
}
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; color: var(--muted); font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* Формы */
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--border); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .18); }
.input.code { text-align: center; font-size: 28px; letter-spacing: 12px; font-weight: 700; font-family: var(--font-head); }
.hint { color: var(--muted); font-size: 13px; }
.error-text { color: var(--bad); font-size: 14px; min-height: 20px; }

/* Авторизация */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-family: var(--font-head); font-weight: 600; font-size: 26px; margin: 0 0 6px; }

/* Кабинет */
.page { padding: 36px 0 60px; }
.page-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(24px, 4vw, 32px); margin: 0 0 24px; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.sub-head h2 { margin: 0; font-size: 20px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); background: rgba(52, 211, 153, .12); }
.status.warn { color: var(--warn); background: rgba(251, 191, 36, .12); }
.status.bad { color: var(--bad); background: rgba(248, 113, 113, .12); }
.status.muted { color: var(--muted); background: rgba(255, 255, 255, .06); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kv > div { background: rgba(0, 0, 0, .22); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.kv span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kv b { font-size: 18px; }

.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: 8px 0 6px; }
.progress > i { display: block; height: 100%; background: var(--accent-grad); border-radius: inherit; transition: width .6s; }
.progress.warn > i { background: linear-gradient(90deg, #f59e0b, #f87171); }

.link-box { display: flex; gap: 8px; align-items: stretch; margin: 10px 0 16px; }
.link-box input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.qr { background: #fff; border-radius: 16px; padding: 12px; width: 196px; height: 196px; margin: 0 auto; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; }

.services { display: grid; gap: 12px; }
.service { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, .22); border: 1px solid var(--border); }
.service h4 { margin: 0 0 2px; font-size: 15px; }
.service p { margin: 0; color: var(--muted); font-size: 13px; }

.empty { text-align: center; padding: 30px 10px; }
.empty .big-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; display: grid; place-items: center; background: rgba(124, 92, 255, .14); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* Модалка */
.modal-bg { position: fixed; inset: 0; background: rgba(3, 4, 10, .7); backdrop-filter: blur(6px); z-index: 100; display: none; place-items: center; padding: 20px; }
.modal-bg.open { display: grid; animation: fade .2s; }
.modal { width: 100%; max-width: 440px; background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); animation: pop .25s; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 4px; font-size: 20px; }
.pay-options { display: grid; gap: 10px; margin: 20px 0; }
.pay-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(0, 0, 0, .25); cursor: pointer; transition: border-color .2s, background .2s; }
.pay-option:hover { border-color: var(--border-strong); }
.pay-option.active { border-color: var(--accent); background: rgba(124, 92, 255, .12); }
.pay-option input { accent-color: var(--accent); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }

/* Тосты */
.toasts { position: fixed; bottom: 20px; right: 20px; left: 20px; display: grid; gap: 10px; justify-items: end; z-index: 200; pointer-events: none; }
.toast { pointer-events: auto; background: var(--card-solid); border: 1px solid var(--border-strong); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .25s; max-width: 380px; font-size: 14px; }
.toast.err { border-color: rgba(248, 113, 113, .5); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }

.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sh 1.4s infinite; border-radius: 12px; }
@keyframes sh { to { background-position: -200% 0; } }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }

/* Админка */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.tab.active { background: rgba(124, 92, 255, .16); border-color: rgba(124, 92, 255, .5); color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 16px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
h3.group { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 14px; }
h3.group:first-child { margin-top: 0; }

/* Переключатель Вход / Регистрация */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--border); margin-bottom: 24px; }
.seg button { padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; transition: all .2s; }
.seg button.active { background: rgba(124, 92, 255, .22); color: var(--text); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5); }
.seg button.hidden + button, .seg:has(.hidden) { grid-template-columns: 1fr; }

/* Баланс */
.balance-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(124, 92, 255, .22), rgba(34, 211, 238, .12)); border: 1px solid rgba(124, 92, 255, .35); }
.balance-card .label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.balance-card .sum { font-family: var(--font-head); font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.amount-plus { color: var(--ok); font-weight: 700; }
.amount-minus { color: var(--bad); font-weight: 700; }
.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .user-grid { grid-template-columns: 1fr; } }
.box { background: rgba(0,0,0,.22); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.box h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.modal.wide { max-width: 760px; }

/* «Колесо» подписок */
.sub-wheel-wrap { display: flex; align-items: center; gap: 6px; margin: -6px -6px 20px; }
.sub-wheel { flex: 1; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px; mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.sub-wheel::-webkit-scrollbar { display: none; }
.wheel-item { scroll-snap-align: center; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: rgba(0,0,0,.25); color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.wheel-item:hover { color: var(--text); border-color: var(--border-strong); }
.wheel-item.active { color: #fff; background: var(--accent-grad); border-color: transparent; box-shadow: 0 6px 20px rgba(124, 92, 255, .4); transform: scale(1.04); }
.wheel-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.wheel-item .dot.ok { background: var(--ok); } .wheel-item .dot.warn { background: var(--warn); } .wheel-item .dot.bad { background: var(--bad); }
.wheel-item.active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.wheel-arrow { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border); background: rgba(0,0,0,.3); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.wheel-arrow:disabled { opacity: .3; cursor: default; }
#sub-card { animation: none; }

/* Чат поддержки */
.grid-support { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 900px) { .grid-support { grid-template-columns: 1fr; } }
.ticket-item { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(0,0,0,.22); margin-bottom: 8px; cursor: pointer; color: inherit; }
.ticket-item:hover, .ticket-item.active { border-color: var(--accent); }
.ticket-item b { display: block; font-size: 14px; margin-bottom: 4px; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px 2px 12px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: rgba(124, 92, 255, .22); border-bottom-right-radius: 4px; }
.msg.admin { align-self: flex-start; background: rgba(255,255,255,.07); border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.reply-box { display: flex; gap: 8px; margin-top: 12px; }
.reply-box textarea { flex: 1; resize: vertical; min-height: 44px; }

/* Новости и розыгрыши */
.news-item h3 { margin: 0 0 4px; font-size: 18px; }
.news-item .body { white-space: pre-wrap; color: #d4d7ee; margin-top: 10px; line-height: 1.6; }
.give-card .prize { font-family: var(--font-head); font-size: 22px; margin: 8px 0; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ref-link { display: flex; gap: 8px; margin: 14px 0; }
.ref-link .input { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.discount-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .35); color: #a7f3d0; margin-bottom: 20px; font-weight: 600; }
.price s { font-size: 18px; color: var(--muted); font-weight: 500; margin-right: 6px; }

/* Админка: подключения */
.tab { display: inline-flex; align-items: center; gap: 8px; }
.tab .dot-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.stack { display: grid; gap: 18px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 18px; align-items: start; }
.conn-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.conn-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-size: 20px; font-weight: 800; color: #fff; }
.conn-head h2 { margin: 0; font-size: 18px; }
.conn-head .status { margin-left: auto; }
.conn-desc { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.conn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--border); }
.test-result { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.test-result.ok { background: rgba(52, 211, 153, .1); color: #a7f3d0; border: 1px solid rgba(52, 211, 153, .3); }
.test-result.err { background: rgba(248, 113, 113, .1); color: #fecaca; border: 1px solid rgba(248, 113, 113, .3); word-break: break-word; }
.secret-wrap { position: relative; }
.secret-wrap .input { padding-right: 44px; }
.secret-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; }
.secret-eye:hover { color: var(--text); }
.saved-hint { font-size: 12px; color: var(--ok); font-weight: 600; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(0,0,0,.25); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: rgba(124, 92, 255, .2); border-color: var(--accent); color: var(--text); }
.chip.on::before { content: '✓ '; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.note { background: rgba(124, 92, 255, .08); border: 1px solid rgba(124, 92, 255, .25); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; color: #cfc6ff; margin-bottom: 18px; line-height: 1.6; }
.note.warn { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); color: #fde68a; }
.note ol { margin: 6px 0 0; padding-left: 20px; }
.note a { text-decoration: underline; }

/* Чек-лист настройки */
.checklist { display: grid; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(0,0,0,.22); border: 1px solid var(--border); }
.check-item .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: 14px; }
.check-item.done .mark { background: rgba(52, 211, 153, .15); color: var(--ok); }
.check-item.todo .mark { background: rgba(251, 191, 36, .15); color: var(--warn); }
.check-item.opt .mark { background: rgba(255,255,255,.06); color: var(--muted); }
.check-item b { display: block; font-size: 15px; }
.check-item span.hint { display: block; }
.check-item .btn { margin-left: auto; }
