/* ==========================================================================
   VPN-кабинет — тёмная тема, mobile-first
   ========================================================================== */

:root {
  --bg: #06080f;
  --bg-2: #0a0e1a;
  --panel: #0c111f;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.025);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.15);
  --text: #eef1fa;
  --muted: #98a0b8;
  --dim: #6b7490;
  --brand: #8b5cf6;
  --brand-2: #22d3ee;
  --brand-soft: rgba(139, 92, 246, 0.14);
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.12);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.12);
  --err: #ff6b81;
  --err-soft: rgba(255, 107, 129, 0.12);
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1000px 700px at 12% -12%, rgba(124, 92, 255, 0.26), transparent 62%),
    radial-gradient(820px 560px at 102% 2%, rgba(34, 211, 238, 0.12), transparent 58%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 320px at 78% 18%, rgba(139, 92, 246, 0.14), transparent 70%),
    radial-gradient(420px 300px at 12% 62%, rgba(34, 211, 238, 0.07), transparent 70%);
}

img, svg { display: block; max-width: 100%; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: #c9b8ff; text-decoration: none; }
a:hover { color: #e2d9ff; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 760;
}

h1 { font-size: clamp(2.5rem, 6.4vw, 4.1rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.55rem); }
h3 { font-size: 1.18rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.hint { font-size: 0.78rem; color: var(--dim); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.gradient-text {
  background: linear-gradient(100deg, #d6c9ff 0%, #9b7bff 38%, #4dd9f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shell { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }

:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(6, 8, 15, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, #7c5cff, #4f46e5 60%, #22d3ee 130%);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark svg { width: 18px; height: 18px; fill: #fff; stroke: none; }

.topnav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: var(--muted);
  font-size: 0.94rem;
  padding: 8px 12px;
  border-radius: 9px;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-form { display: inline; }
.nav-button { line-height: inherit; }
.topnav .btn { margin-left: 6px; }

/* ----------------------------------------------------------------- кнопки */

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
  text-align: center;
}
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d5cff 48%, #4f7dfb 100%);
  box-shadow: 0 14px 34px rgba(109, 92, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-primary:hover { color: #fff; box-shadow: 0 18px 42px rgba(109, 92, 255, 0.5); }

.btn-ghost {
  border-color: var(--stroke-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.25); }

.btn-soft { background: var(--brand-soft); color: #cbbdff; border-color: rgba(139, 92, 246, 0.25); }
.btn-soft:hover { background: rgba(139, 92, 246, 0.22); color: #e3dbff; }

.btn-danger { background: var(--err-soft); color: #ff9aa7; border-color: rgba(255, 107, 129, 0.28); }
.btn-danger:hover { background: rgba(255, 107, 129, 0.2); color: #ffc0c8; }

.btn-sm { min-height: 40px; padding: 0 15px; font-size: 0.9rem; border-radius: 11px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------- flash */

.flash-wrap { margin-top: 18px; }
.flash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.94rem;
  animation: slide-down 0.3s ease;
}
.flash-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flash span { flex: 1; }
.flash-ok { border-color: rgba(61, 220, 151, 0.3); background: var(--ok-soft); color: #a7f3d0; }
.flash-err { border-color: rgba(255, 107, 129, 0.3); background: var(--err-soft); color: #ffc2ca; }
.flash-close {
  border: 0; background: none; color: inherit; font-size: 1.4rem; line-height: 1;
  cursor: pointer; opacity: 0.6; padding: 0 2px;
}
.flash-close:hover { opacity: 1; }

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------- hero */

.hero { padding: clamp(46px, 7vw, 86px) 0 clamp(50px, 7vw, 90px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
  color: #cbbcff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.15);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0.04); }
}

.hero h1 { margin-bottom: 20px; }
.hero .lead {
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 30px;
}
.hero .btn-row { margin-bottom: 26px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 0.86rem;
  color: var(--dim);
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* макет «телефона» */
.hero-visual { position: relative; min-height: 480px; display: grid; place-items: center; }
.orb {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.28), transparent 65%);
  filter: blur(20px);
}
.phone {
  position: relative;
  width: min(320px, 82%);
  padding: 20px 20px 22px;
  border-radius: 32px;
  background: linear-gradient(165deg, rgba(28, 34, 60, 0.96), rgba(11, 15, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: rotate(-1.6deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: rotate(-1.6deg) translateY(0); }
  50% { transform: rotate(-1.6deg) translateY(-9px); }
}
.phone-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 650; color: #cfd6ea;
}
.phone-top .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.phone-badge {
  margin-left: auto; font-size: 0.66rem; letter-spacing: 0.12em;
  padding: 3px 8px; border-radius: 6px; color: #06281b;
  background: var(--ok); font-weight: 800;
}
.phone-ring {
  position: relative;
  width: 138px; height: 138px; margin: 26px auto 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 200deg, #22d3ee, #8b5cf6, #22d3ee);
  box-shadow: 0 0 46px rgba(124, 92, 255, 0.45);
}
.phone-ring::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 118px; height: 118px;
  border-radius: 50%; background: #0a0f1e;
}
.ring-core {
  position: relative; width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #242c4d, #0b1020);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ring-core svg { width: 38px; height: 38px; fill: #c4b5fd; stroke: none; }
.phone-status { text-align: center; font-weight: 650; margin: 0 0 2px; }
.phone-sub { text-align: center; font-size: 0.78rem; color: var(--muted); margin-bottom: 20px; }
.phone-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.phone-stats b { display: block; font-size: 0.98rem; }
.phone-stats span { font-size: 0.66rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }

.qr-float {
  position: absolute; right: -6px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 12px 12px; border-radius: 16px;
  background: #fff; color: #0b1020;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  transform: rotate(4deg);
  font-size: 0.7rem; font-weight: 700; line-height: 1.25; max-width: 150px;
}
.qr-float svg { width: 54px; height: 54px; flex: 0 0 54px; }

/* ----------------------------------------------------------------- секции */

.section { padding: clamp(48px, 6.5vw, 78px) 0; }
.section-head { max-width: 700px; margin: 0 auto clamp(32px, 4vw, 50px); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow {
  display: block; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #8fd8e8; margin-bottom: 14px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018));
  padding: clamp(22px, 2.4vw, 30px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.feature { transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.feature:hover { transform: translateY(-3px); border-color: var(--stroke-2); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.28);
}
.feature-icon svg { width: 23px; height: 23px; fill: none; stroke: #c9b8ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-bottom: 8px; font-size: 1.06rem; }
.feature p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 26px 24px; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--card-2); }
.step-num {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: #a78bfa;
  letter-spacing: 0.1em; margin-bottom: 14px; display: block;
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.step::after {
  content: ""; position: absolute; top: 50%; right: -18px; width: 18px; height: 1px;
  background: linear-gradient(90deg, var(--stroke-2), transparent);
}
.step:last-child::after { display: none; }

/* цена */
.price-wrap { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(26px, 4vw, 56px); align-items: center; }
.price-card {
  position: relative;
  border-radius: 24px;
  padding: 34px 30px 30px;
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(139, 92, 246, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(22, 27, 48, 0.95), rgba(9, 12, 23, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  max-width: 430px;
}
.price-tag {
  position: absolute; top: -13px; left: 28px;
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee); color: #08101f;
}
.price-value { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.price-value b { font-size: clamp(2.8rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; }
.price-value span { color: var(--muted); font-size: 0.95rem; }
.price-list { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 11px; }
.price-list li { display: flex; gap: 10px; font-size: 0.94rem; color: #d5dbec; }
.price-list svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* платформы */
.platform { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--card-2); }
.platform-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke); }
.platform-icon svg { width: 22px; height: 22px; fill: #d9dff0; stroke: none; }
.platform h3 { font-size: 0.98rem; margin-bottom: 4px; }
.platform p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--stroke); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; font-weight: 620; font-size: 1.02rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--muted);
  transition: transform 0.2s; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); color: #c4b5fd; }
.faq .faq-body { padding: 0 4px 22px; color: var(--muted); font-size: 0.95rem; max-width: 70ch; }

/* CTA */
.cta {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: clamp(34px, 5vw, 58px);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(120% 160% at 0% 100%, rgba(139, 92, 246, 0.28), transparent 55%),
    linear-gradient(180deg, #121731, #0a0e1c);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ футер */

.footer { margin-top: 40px; border-top: 1px solid var(--stroke); padding: 44px 0 22px; background: rgba(4, 6, 12, 0.45); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 14px; max-width: 36ch; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); margin-bottom: 12px; }
.footer-cols a { display: block; color: var(--muted); font-size: 0.9rem; padding: 4px 0; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--stroke);
  font-size: 0.82rem; color: var(--dim);
}

/* --------------------------------------------------------------- auth pages */

.auth { padding: clamp(34px, 6vw, 70px) 0 60px; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.auth-card { padding: clamp(24px, 3vw, 34px); }
.auth-card h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.auth-aside { padding-top: 10px; }
.auth-aside ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
.auth-aside li { display: flex; gap: 12px; font-size: 0.93rem; color: var(--muted); }
.auth-aside li b { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 2px; }
.auth-aside .num {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-family: var(--mono); font-size: 0.74rem;
  color: #c4b5fd; background: var(--brand-soft); border: 1px solid rgba(139, 92, 246, 0.25);
}

.form { display: grid; gap: 16px; }
.field label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; font-weight: 550; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(5, 8, 16, 0.72);
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 92px; resize: vertical; font-family: var(--mono); font-size: 0.86rem; }
.field input::placeholder, .field textarea::placeholder { color: #5b647e; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: rgba(139, 92, 246, 0.75);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}
.field .hint { font-size: 0.78rem; color: var(--dim); margin-top: 6px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--dim); cursor: pointer;
  padding: 8px; border-radius: 8px; line-height: 1;
}
.pw-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #8b5cf6; flex: 0 0 18px; }
.check a { text-decoration: underline; text-underline-offset: 2px; }

.form-error {
  padding: 12px 14px; border-radius: 11px; font-size: 0.9rem;
  background: var(--err-soft); border: 1px solid rgba(255, 107, 129, 0.3); color: #ffc2ca;
}
.form-note { font-size: 0.8rem; color: var(--dim); text-align: center; }
.form-note + .form-note { margin-top: 8px; }

/* ---------------------------------------------------------------- кабинет */

.dash { padding: clamp(28px, 4vw, 48px) 0 60px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: 4px; }
.dash-head p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid > * { min-width: 0; }

.status-card {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  position: relative; overflow: hidden;
}
.status-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--dim);
}
.status-card[data-state="active"]::before { background: linear-gradient(180deg, #3ddc97, #22d3ee); }
.status-card[data-state="expired"]::before { background: linear-gradient(180deg, #ff6b81, #f5b544); }
.status-card[data-state="none"]::before { background: linear-gradient(180deg, #8b5cf6, #22d3ee); }
.status-card[data-state="active"] { background: linear-gradient(120deg, rgba(61, 220, 151, 0.08), rgba(255,255,255,0.02) 60%); }
.status-card[data-state="expired"] { background: linear-gradient(120deg, rgba(255, 107, 129, 0.07), rgba(255,255,255,0.02) 60%); }

.status-icon {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 15px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--stroke);
}
.status-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-state="active"] .status-icon { color: var(--ok); background: var(--ok-soft); border-color: rgba(61,220,151,0.25); }
[data-state="expired"] .status-icon { color: var(--err); background: var(--err-soft); border-color: rgba(255,107,129,0.25); }
[data-state="none"] .status-icon { color: #c4b5fd; background: var(--brand-soft); border-color: rgba(139,92,246,0.25); }

.status-main { flex: 1 1 220px; min-width: 200px; }
.status-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.status-title { font-size: 1.35rem; font-weight: 720; letter-spacing: -0.02em; margin-bottom: 4px; }
.status-meta { color: var(--muted); font-size: 0.9rem; }
.status-side { display: flex; gap: 10px; flex-wrap: wrap; }

.meter { margin-top: 14px; max-width: 460px; }
.meter-top { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--dim); margin-bottom: 6px; }
.bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #22d3ee); }
[data-state="active"] .bar > i { background: linear-gradient(90deg, #3ddc97, #22d3ee); }
[data-state="expired"] .bar > i { background: linear-gradient(90deg, #ff6b81, #f5b544); }

.key-card { padding: clamp(20px, 2.6vw, 28px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h2 { font-size: 1.12rem; margin: 0; letter-spacing: -0.01em; }
.card-head .badge { margin: 0; }

.key-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.key-grid > * { min-width: 0; }
.qr-box {
  background: #fff; border-radius: 14px; padding: 10px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.35);
}
.qr-box img { width: 100%; height: auto; border-radius: 6px; }
.qr-caption { text-align: center; font-size: 0.74rem; color: var(--muted); margin-top: 8px; }

.key-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.key-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.code-box {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
  background: rgba(3, 5, 12, 0.75);
  border: 1px solid var(--stroke);
  border-radius: 11px; padding: 10px 10px 10px 13px;
}
.code-box code {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.8rem;
  color: #cfd7ef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--stroke); background: rgba(255,255,255,0.05);
  color: var(--muted); cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.icon-btn.is-copied { color: var(--ok); border-color: rgba(61,220,151,0.4); background: var(--ok-soft); }

.side-stack { display: grid; gap: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  padding: 13px 12px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,0.035); border: 1px solid var(--stroke);
}
.stat b { display: block; font-size: 1.05rem; letter-spacing: -0.01em; }
.stat span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }

.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mini-list li { display: flex; gap: 11px; font-size: 0.88rem; color: var(--muted); }
.mini-list li > span { flex: 1; min-width: 0; }
.mini-list svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.notice {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: 12px;
  font-size: 0.88rem; border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.035); color: var(--muted);
}
.notice svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice-warn { background: var(--warn-soft); border-color: rgba(245,181,68,0.3); color: #f8d38b; }
.notice-err { background: var(--err-soft); border-color: rgba(255,107,129,0.3); color: #ffc2ca; }

.empty-key { text-align: center; padding: 22px 10px; }
.empty-key .empty-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  display: grid; place-items: center; background: var(--brand-soft);
  border: 1px solid rgba(139,92,246,0.28); color: #c4b5fd;
}
.empty-key .empty-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-key h3 { margin-bottom: 6px; }
.empty-key p { color: var(--muted); font-size: 0.92rem; max-width: 42ch; margin: 0 auto 20px; }

details.attach { margin-top: 6px; border-top: 1px solid var(--stroke); padding-top: 14px; }
details.attach summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; list-style: none; display: flex; align-items: center; gap: 8px; }
details.attach summary::-webkit-details-marker { display: none; }
details.attach summary::before { content: "+"; font-size: 1.1rem; color: #a78bfa; }
details.attach[open] summary::before { content: "−"; }
details.attach .form { margin-top: 14px; }

/* ------------------------------------------------------------------ заявка */

.order-wrap { max-width: 860px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) 0 60px; }
.steps-bar { display: flex; align-items: center; gap: 8px; margin: 24px 0 28px; }
.steps-bar .s {
  flex: 1; display: flex; align-items: center; gap: 9px;
  font-size: 0.8rem; color: var(--dim);
}
.steps-bar .s i {
  width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 0.72rem;
  border: 1px solid var(--stroke-2); background: rgba(255,255,255,0.03);
}
.steps-bar .s.is-done { color: #a7f3d0; }
.steps-bar .s.is-done i { background: var(--ok-soft); border-color: rgba(61,220,151,0.4); color: var(--ok); }
.steps-bar .s.is-current { color: var(--text); }
.steps-bar .s.is-current i { background: var(--brand-soft); border-color: rgba(139,92,246,0.5); color: #c4b5fd; }
.steps-bar .line { flex: 1; height: 1px; background: var(--stroke); min-width: 10px; }

.order-card { padding: clamp(22px, 3vw, 32px); }
.order-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 22px; }
.order-id { font-size: 0.78rem; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.order-amount { font-size: 2rem; font-weight: 780; letter-spacing: -0.03em; }
.order-amount small { font-size: 0.9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }

.pay-amount {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 18px 20px; border-radius: 14px; margin-bottom: 18px;
  background: linear-gradient(120deg, rgba(139,92,246,0.14), rgba(34,211,238,0.07));
  border: 1px solid rgba(139,92,246,0.28);
}
.pay-amount b { font-size: 1.9rem; letter-spacing: -0.03em; }

.req-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--stroke);
}
.req-row:last-child { border-bottom: 0; }
.req-row .k { font-size: 0.82rem; color: var(--muted); }
.req-row .v { font-weight: 650; text-align: right; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.req-row .v code { font-family: var(--mono); font-size: 0.86rem; }

.order-status {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 17px; border-radius: 13px; margin-bottom: 20px;
  border: 1px solid var(--stroke); background: rgba(255,255,255,0.035);
  font-size: 0.92rem;
}
.order-status svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.order-status b { display: block; margin-bottom: 2px; }
.order-status.is-warn { background: var(--warn-soft); border-color: rgba(245,181,68,0.32); color: #f8d38b; }
.order-status.is-ok { background: var(--ok-soft); border-color: rgba(61,220,151,0.3); color: #a7f3d0; }
.order-status.is-err { background: var(--err-soft); border-color: rgba(255,107,129,0.3); color: #ffc2ca; }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: currentColor;
  animation: spin 0.9s linear infinite; display: inline-block; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ админка */

.admin-shell { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 30px 0 22px; }
.admin-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.kpi b { display: block; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.1; }
.kpi span { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--dim); }
.kpi.is-warn b { color: var(--warn); }
.kpi.is-ok b { color: var(--ok); }

.panel-status { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(61,220,151,0.12); }
.dot.err { background: var(--err); box-shadow: 0 0 0 4px rgba(255,107,129,0.12); }

.table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: 14px; background: var(--card-2); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.data th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--dim); font-weight: 650; padding: 12px 14px;
  border-bottom: 1px solid var(--stroke); white-space: nowrap;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255,255,255,0.02); }
table.data .who b { display: block; font-weight: 600; }
table.data .who span { color: var(--dim); font-size: 0.78rem; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.row-actions form { display: inline; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 650;
  border: 1px solid var(--stroke); background: rgba(255,255,255,0.04); color: var(--muted);
}
.chip-paid { background: var(--ok-soft); border-color: rgba(61,220,151,0.3); color: #a7f3d0; }
.chip-awaiting { background: var(--warn-soft); border-color: rgba(245,181,68,0.3); color: #f8d38b; }
.chip-rejected { background: var(--err-soft); border-color: rgba(255,107,129,0.3); color: #ffc2ca; }
.chip-pending { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); color: #cbbdff; }

.section-card { border: 1px solid var(--stroke); border-radius: 16px; background: var(--card-2); padding: 20px; margin-bottom: 18px; }
.section-card > h2 { font-size: 1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.section-card > h2 .count {
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: #cbbdff; border: 1px solid rgba(139,92,246,0.3);
}
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.82rem; }
.events li { display: flex; gap: 10px; color: var(--muted); }
.events .t { color: var(--dim); font-family: var(--mono); font-size: 0.72rem; flex: 0 0 auto; }
.events b { color: #cdd4e6; font-weight: 600; }

.link-box {
  display: flex; gap: 8px; align-items: center;
  padding: 12px; border-radius: 11px; background: rgba(3,5,12,0.7);
  border: 1px solid var(--stroke); word-break: break-all;
}
.link-box code { flex: 1; font-family: var(--mono); font-size: 0.82rem; }

/* -------------------------------------------------------------- инструкция */

.help-wrap { padding: clamp(34px, 5vw, 60px) 0 60px; }
.help-head { max-width: 720px; margin-bottom: 30px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,0.045); border: 1px solid var(--stroke); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.88rem;
  padding: 8px 16px; border-radius: 9px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center;
}
.tab svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.tab:hover { color: var(--text); }
.tab.is-active { background: rgba(255,255,255,0.1); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.guide { display: grid; gap: 18px; }
.guide-app { padding: 22px; border: 1px solid var(--stroke); border-radius: 16px; background: var(--card-2); }
.guide-app h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.guide-app h3 .tag { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--brand-soft); color: #cbbdff; }
.guide-app ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.93rem; }
.guide-app ol li { margin-bottom: 7px; }
.guide-app ol li:last-child { margin-bottom: 0; }
.guide-app .note { margin-top: 12px; font-size: 0.84rem; color: var(--dim); }
.trouble { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.trouble th, .trouble td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.trouble th { color: var(--dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.trouble td:first-child { color: #dbe1f0; width: 38%; }
.trouble td:last-child { color: var(--muted); }

/* ---------------------------------------------------------------- служебное */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 11px 18px;
  border-radius: 999px;
  background: #eef1fa;
  color: #0b1020;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.error-page { min-height: 58vh; display: grid; place-items: center; padding: 60px 20px; text-align: center; }
.error-code { font-size: clamp(3.4rem, 10vw, 6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: 10px; }
.error-page p { color: var(--muted); max-width: 46ch; margin: 0 auto 24px; }

.legal { max-width: 760px; margin: 0 auto; padding: clamp(34px, 5vw, 60px) 0 60px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.legal h2 { font-size: 1.2rem; margin-top: 32px; }
.legal p, .legal li { color: var(--muted); font-size: 0.95rem; }
.legal ul { padding-left: 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- адаптив */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; min-height: 390px; margin-top: 6px; }
  .hero-visual .phone { width: min(290px, 72%); }
  .qr-float { right: max(4%, calc(50% - 210px)); }
  .price-wrap { grid-template-columns: minmax(0, 1fr); }
  .price-card { margin-inline: auto; }
  .grid-3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .shell { width: calc(100% - 32px); }
  .topbar-inner { height: 62px; }
  .brand-text { font-size: 0.96rem; }
  .topnav .nav-link { padding: 8px 9px; font-size: 0.88rem; }
  .topnav .nav-link:not(.nav-button):not(.nav-login) { display: none; }
  .topnav .btn { margin-left: 2px; }
  .hero { padding-top: 28px; }
  .hero-visual { min-height: 340px; }
  .phone { width: min(265px, 78%); padding: 16px 16px 18px; border-radius: 28px; }
  .phone-ring { width: 112px; height: 112px; margin: 20px auto 14px; }
  .phone-ring::before { width: 94px; height: 94px; }
  .ring-core { width: 76px; height: 76px; }
  .ring-core svg { width: 30px; height: 30px; }
  .qr-float { display: none; }
  .grid-3, .grid-2, .steps { grid-template-columns: minmax(0, 1fr); }
  .key-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-box { width: 180px; margin-inline: auto; }
  .status-side { width: 100%; }
  .status-side .btn { flex: 1; }
  .cta { flex-direction: column; align-items: flex-start; }
  .steps-bar .s span { display: none; }
  .steps-bar .s { flex: 0 0 auto; }
  .steps-bar .line { flex: 1; }
  .req-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .req-row .v { justify-content: flex-start; text-align: left; }
  .tab-panel .guide { gap: 14px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .kpi b { font-size: 1.45rem; }
  .admin-head { margin-top: 20px; }
}

@media (max-width: 460px) {
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .topnav .btn { width: auto; }
  .status-card { align-items: flex-start; }
  .status-icon { width: 46px; height: 46px; flex-basis: 46px; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pay-amount { flex-direction: column; gap: 4px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
