:root {
  --bg: #0b0b12;
  --bg-2: #12121c;
  --card: #161624;
  --line: #26263a;
  --text: #ececf4;
  --muted: #9a9ab3;
  --accent: #7c5cff;
  --accent-2: #2fd3ff;
  --ok: #3ddc97;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* nav */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 18, .75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: .2px; }
.logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px;
  font-weight: 600; text-decoration: none; font-size: 16px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(124, 92, 255, .6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -8px rgba(124, 92, 255, .8); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--bg-2); }
.btn-ghost:hover { border-color: #3a3a56; }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }

/* hero */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 700px;
  background:
    radial-gradient(closest-side at 30% 50%, rgba(124, 92, 255, .28), transparent),
    radial-gradient(closest-side at 75% 40%, rgba(47, 211, 255, .16), transparent);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--bg-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 20px 0 18px; letter-spacing: -1.2px; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* chat mock */
.chat {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.avatar svg { width: 22px; height: 22px; }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { color: var(--muted); font-size: 13px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14px; margin: 8px 0; line-height: 1.45; }
.msg.me { margin-left: auto; width: fit-content; background: #3b2f86; border-bottom-right-radius: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.msg.bot { background: #1f1f31; border-bottom-left-radius: 4px; }
.file { display: flex; align-items: center; gap: 10px; }
.file i { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }

/* sections */
section { padding: 80px 0; }
.eyebrow { color: var(--accent-2); font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 14px; letter-spacing: -.6px; line-height: 1.15; }
.sub { color: var(--muted); max-width: 620px; margin: 0 0 44px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin: 16px 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(124, 92, 255, .14); color: var(--accent); }
.ico svg { width: 22px; height: 22px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700;
}
.step code { background: #232338; padding: 1px 7px; border-radius: 6px; font-size: 14px; color: var(--text); }

/* platforms */
.platforms { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.pill { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font-size: 15px; }

/* commands */
.cmds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cmd { display: flex; gap: 14px; align-items: baseline; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.cmd code { color: var(--accent-2); font-weight: 600; font-size: 15px; min-width: 96px; }
.cmd span { color: var(--muted); font-size: 15px; }

/* faq */
.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 24px; color: var(--muted); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 18px; color: var(--muted); }
details code { background: #232338; padding: 1px 7px; border-radius: 6px; color: var(--text); }

/* final cta */
.final {
  text-align: center; padding: 56px 24px; border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(closest-side at 50% 0%, rgba(124, 92, 255, .25), transparent),
    var(--card);
}
.final .sub { margin: 0 auto 28px; }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero { padding: 64px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .grid-3, .steps, .cmds { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .cta .btn, .final .btn { width: 100%; justify-content: center; }
}

/* forms */
.auth { min-height: calc(100vh - 64px - 90px); display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px; }
.auth-card h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.4px; }
.auth-card .hint { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 13px 14px; margin: 0 0 16px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; font: inherit;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
input.code { font-size: 26px; letter-spacing: 10px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.auth-card .btn { width: 100%; justify-content: center; }
.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.links a, .linkbtn { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.alert { padding: 12px 14px; border-radius: 12px; margin: 0 0 18px; font-size: 14px; }
.alert.err { background: rgba(255, 92, 122, .12); border: 1px solid rgba(255, 92, 122, .35); color: #ffb3c1; }
.alert.ok { background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .35); color: #a8f0cf; }
.inline { display: inline; margin: 0; }

/* cabinet */
.cab { padding: 48px 0 80px; }
.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cab-head h1 { font-size: 34px; margin: 0; letter-spacing: -.6px; }
.cab-head p { margin: 4px 0 0; color: var(--muted); }
.cab-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: 0; }
.panel p { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.row:last-of-type { border-bottom: 0; }
.row span:first-child { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tag.ok { background: rgba(61, 220, 151, .14); color: var(--ok); }
.tag.wait { background: rgba(255, 196, 61, .14); color: #ffc43d; }
.tag.off { background: rgba(255, 92, 122, .14); color: #ff7c95; }
.profile { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.profile + .profile { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile h3 { margin: 0 0 6px; font-size: 18px; }
.profile .meta { color: var(--muted); font-size: 14px; margin-bottom: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.qr { width: 180px; height: 180px; border-radius: 14px; background: #fff; padding: 8px; display: block; }
.empty { text-align: center; padding: 28px 8px; }
.empty .ico { margin: 0 auto 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .btn { justify-content: center; }
.small { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .cab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .auth-card { padding: 24px 20px; }
  .profile { grid-template-columns: 1fr; }
  .qr { margin: 0 auto; }
  .profile .btn { width: 100%; justify-content: center; }
}

/* vless */
.vless { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
input.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); }

/* telegram login */
.btn-tg { background: #229ed9; color: #fff; }
.btn-tg:hover { background: #1c8cc2; transform: translateY(-1px); }
.auth-card .btn-tg { width: 100%; justify-content: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* QR lightbox */
.qr-zoom { cursor: zoom-in; transition: transform .15s; }
.qr-zoom:hover { transform: scale(1.03); }
.lightbox {
  position: fixed; inset: 0; z-index: 100; cursor: zoom-out;
  background: rgba(5, 5, 10, .88); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  width: min(88vw, 78vh, 640px); height: auto; aspect-ratio: 1;
  background: #fff; padding: 16px; border-radius: 18px; image-rendering: pixelated;
}
.lightbox-hint { color: var(--muted); font-size: 14px; text-align: center; }

/* admin panel */
.adm { padding: 40px 0 80px; }
.adm-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-head h1 { font-size: 32px; margin: 0; letter-spacing: -.5px; }
.adm-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.adm-nav a { padding: 10px 14px; border-radius: 10px 10px 0 0; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 15px; border-bottom: 2px solid transparent; }
.adm-nav a:hover { color: var(--text); }
.adm-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.adm-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.stat-title { color: var(--muted); font-size: 14px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin: 4px 0 2px; }
.stat-sub { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; margin: 0 -8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td code, .small code, p code { background: #232338; padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-xs { padding: 6px 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-danger { background: rgba(255, 92, 122, .12); border: 1px solid rgba(255, 92, 122, .35); color: #ff9db0; }
.btn-danger:hover { background: rgba(255, 92, 122, .2); }
.tag { background: #232338; color: var(--muted); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.inline-form input[type=text] { width: auto; flex: 1 1 200px; margin: 0; padding: 9px 12px; }
select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 14px;
}
.role-form { display: inline-flex; gap: 6px; align-items: center; }
details.mini { display: inline-block; margin-left: 6px; }
details.mini summary { display: inline; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 400; padding: 0; }
details.mini summary::after { content: none; }
details.mini[open] { display: block; margin: 8px 0 0; }
details.mini .inline-form input[type=text] { flex-basis: 140px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; background: var(--bg-2); }
.chip span { color: var(--text); margin-left: 4px; }
.chip.active { border-color: var(--accent); color: var(--text); }
.issue { margin-bottom: 14px; }
.issue-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.issue-status { margin-left: auto; }
.issue-text { color: var(--text) !important; white-space: pre-wrap; margin: 12px 0 !important; }
.issue-form { display: flex; gap: 8px; flex-wrap: wrap; }
.issue-form input[type=text] { flex: 1 1 260px; margin: 0; padding: 9px 12px; }

@media (max-width: 900px) {
  .adm-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .nav .btn-sm { padding: 7px 10px; font-size: 13px; }
  .logo { font-size: 0; gap: 0; }
  .logo svg { width: 30px; height: 30px; }
  .actions { justify-content: flex-start; }
}
