:root {
  --bg: #070b14;
  --bg2: #0b1120;
  --card: #0e1524;
  --line: #1c2840;
  --text: #dbe4f3;
  --muted: #7d8aa3;
  --white: #fff;
  --blue: #2f6bff;
  --blue2: #5b9bff;
  --ok: #2fbf71;
  --warn: #f0a429;
  --err: #ff5d6c;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(47,107,255,.16), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(47,107,255,.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--white); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -.02em; }
.accent { color: var(--blue2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------- щит ---------- */
.shield { display: block; transform-origin: 50% 90%; animation: sway 4.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(47,107,255,.45)); }
.shield.sm { width: 26px; height: 29px; animation-duration: 5.5s; }
.shield.md { width: 56px; height: 63px; }
.shield.xl { width: 190px; height: 214px; filter: drop-shadow(0 18px 50px rgba(47,107,255,.55)); }
.shield.off { filter: grayscale(1) brightness(.7); }
@keyframes sway {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg) translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) { .shield { animation: none; } }

/* ---------- каркас ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line);
  background: rgba(7,11,20,.7); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--text); }
form.inline { display: inline; margin: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 16px 56px; flex: 1; }
.wrap.wide { max-width: 1320px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 22px 16px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- кнопки и формы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  background: linear-gradient(180deg, #3a77ff, #2559e6); color: #fff; font: inherit; font-weight: 600;
  padding: 12px 20px; border-radius: 11px; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .12s;
  box-shadow: 0 6px 22px rgba(47,107,255,.32); }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(47,107,255,.42); }
.btn.ghost { background: transparent; border-color: #2a3a5c; box-shadow: none; color: var(--text); }
.btn.ghost:hover { border-color: var(--blue2); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
button.link:hover { color: var(--white); }
.card { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent), var(--card);
  border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.form input[type=email], .form input[type=password], .sub input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px; font: inherit;
  background: var(--bg2); color: var(--white); border: 1px solid #22304d; outline: none; }
.form input:focus, .sub input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.22); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.form label.check input { margin-top: 4px; accent-color: var(--blue); }
.flash { padding: 12px 16px; border-radius: 11px; margin-bottom: 18px; border: 1px solid #2a3a5c; background: #0f1a30; }
.flash.ok { border-color: rgba(47,191,113,.45); background: rgba(47,191,113,.08); }
.flash.error { border-color: rgba(255,93,108,.45); background: rgba(255,93,108,.08); }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: center; padding: 26px 0 40px; }
.hero-shield { position: relative; display: grid; place-items: center; height: 260px; }
.hero-shield .glow { position: absolute; inset: 30px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(47,107,255,.35), transparent 65%); animation: pulse 4.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.92); } }
.lead { font-size: 18px; color: #b8c4d9; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.section-title { margin-top: 48px; font-size: 24px; }

/* ---------- тарифы ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  display: flex; flex-direction: column; }
.plan.featured { border-color: rgba(47,107,255,.65);
  background: linear-gradient(180deg, rgba(47,107,255,.14), rgba(47,107,255,.02) 55%), var(--card);
  box-shadow: 0 18px 50px rgba(47,107,255,.16); }
.ribbon { position: absolute; top: 16px; right: 16px; background: var(--blue); color: #fff; font-size: 12px;
  font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan-name { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.price { color: var(--white); font-size: 36px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; }
.price span { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.per-month { color: var(--blue2); font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; border-top: 1px solid rgba(255,255,255,.04); font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--blue2); border-bottom: 2px solid var(--blue2); transform: rotate(-45deg); }
.plan li b { color: var(--white); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.steps > div { padding: 18px; border-left: 2px solid var(--line); }
.steps span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(47,107,255,.18); color: var(--blue2); font-weight: 700; margin-bottom: 8px; }
.steps b { display: block; color: var(--white); }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- вход / регистрация ---------- */
.auth { max-width: 420px; margin: 12px auto 0; }
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
.auth-head h1 { font-size: 28px; margin: 14px 0 4px; }
.auth-head p { margin: 0; color: var(--muted); }

/* ---------- кабинет ---------- */
.notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--r); margin-bottom: 20px;
  border: 1px solid rgba(240,164,41,.45); background: rgba(240,164,41,.07); }
.notice form { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.status-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: #18233a; color: var(--text); }
.badge.ok { background: rgba(47,191,113,.16); color: #5fe09b; }
.badge.warn { background: rgba(240,164,41,.15); color: #ffc265; }
.status-head .badge { font-size: 15px; margin-top: 2px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.facts div { background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; color: var(--white); font-weight: 600; }
.traffic-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.traffic-row b { color: var(--white); }
.bar { height: 10px; border-radius: 99px; background: #18233a; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f6bff, #5b9bff); }
.bar i.hot { background: linear-gradient(90deg, #f0a429, #ff5d6c); }
.howto { padding-left: 20px; margin: 0 0 16px; color: #b8c4d9; font-size: 15px; }
.howto li { margin-bottom: 4px; }
.sub { display: flex; gap: 8px; align-items: center; }
.sub input { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.connect-actions { margin-top: 12px; }
.qr { display: block; margin: 16px auto 0; background: #fff; border-radius: 12px; padding: 8px; }
.table-wrap { overflow-x: auto; padding: 6px 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpis span { display: block; color: var(--muted); font-size: 13px; }
.kpis b { color: var(--white); font-size: 26px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .hero-shield { height: 220px; }
  .lead { margin: 0 auto; }
  .cta { justify-content: center; }
  .plans, .steps, .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  nav { gap: 12px; }
}
