/* ═══════════════════════════════════════════
   KyneticVPN — Dark Design System
   ═══════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg:           #0d1117;
  --panel:        #161d2b;
  --panel-2:      #1c2438;
  --text:         #e6edf3;
  --muted:        #8b949e;
  --line:         rgba(255, 255, 255, 0.08);
  --accent:       #3fb950;
  --accent-light: #56d364;
  --accent-dark:  #238636;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.5);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { color: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, input, a { font: inherit; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }

/* ── Buttons ────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  background: var(--accent);
  color: #0a0e16;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  transition: filter 150ms ease, transform 150ms ease;
  white-space: nowrap;
}
.btn-primary:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.97); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
  white-space: nowrap;
}
.btn-outline:hover  { background: rgba(63, 185, 80, 0.1); transform: translateY(-1px); }
.btn-outline:active { transform: translateY(0); }

.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--panel-2);
  color: #4fc3f7;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);        /* rounded rect as in design */
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}
.btn-telegram:hover { background: rgba(79, 195, 247, 0.08); border-color: rgba(79,195,247,0.25); }
.btn-telegram svg { flex-shrink: 0; }
.btn-telegram.is-disabled,
.btn-telegram[aria-disabled="true"] {
  color: rgba(255,255,255,0.72);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.full { width: 100%; }

/* ── Form inputs ────────────────────────────── */

.form-group { display: grid; gap: 8px; }

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 150ms ease;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus { border-color: rgba(63, 185, 80, 0.5); }

.form-error {
  font-size: 12px;
  font-weight: 600;
  color: #f85149;
  margin-top: 0;
}

.payment-section {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(28, 36, 56, 0.95), rgba(22, 29, 43, 0.92));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.payment-section-top,
.payment-meta,
.payment-result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.payment-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.purchase-plans {
  display: grid;
  gap: 12px;
}
.purchase-plans-dropdown {
  display: grid;
  gap: 12px;
}
.payment-plan-picker {
  position: relative;
}

.payment-plan-picker.is-disabled {
  opacity: 0.72;
}

.payment-plan-trigger {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(28, 36, 56, 0.98), rgba(22, 29, 43, 0.98));
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.payment-plan-trigger:hover:not(:disabled) {
  border-color: rgba(63, 185, 80, 0.25);
  background: linear-gradient(180deg, rgba(32, 42, 64, 0.98), rgba(24, 32, 48, 0.98));
  transform: translateY(-1px);
}

.payment-plan-trigger:disabled {
  cursor: default;
}

.payment-plan-trigger-text {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.payment-plan-trigger-icon {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 150ms ease, color 150ms ease;
}

.payment-plan-picker.is-open .payment-plan-trigger {
  border-color: rgba(63, 185, 80, 0.45);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.08);
}

.payment-plan-picker.is-open .payment-plan-trigger-icon {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.payment-plan-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 12;
  display: none;
  padding: 8px;
  background: rgba(18, 24, 36, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.payment-plan-picker.is-open .payment-plan-menu {
  display: grid;
  gap: 6px;
}

.payment-plan-option {
  width: 100%;
  padding: 14px 14px 13px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  display: grid;
  gap: 6px;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.payment-plan-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.payment-plan-option.is-active {
  background: rgba(63, 185, 80, 0.1);
  border-color: rgba(63, 185, 80, 0.26);
}

.payment-plan-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.payment-plan-option-price {
  flex-shrink: 0;
  color: var(--accent-light);
}

.payment-plan-option-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.purchase-plan-summary {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.purchase-plan-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.purchase-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-plan-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.purchase-plan-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.purchase-plan-head strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.purchase-plan-actions {
  display: flex;
  gap: 10px;
}

.purchase-plan-actions .btn-primary,
.purchase-plan-actions .btn-outline {
  min-height: 42px;
  flex: 1 1 0;
}

.payment-method-btn {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.payment-method-btn.is-active {
  background: var(--accent);
  color: #0a0e16;
  border-color: transparent;
}

.payment-method-btn.is-active:hover {
  background: var(--accent);
}

.purchase-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.payment-result {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.18);
}

.payment-result a {
  text-decoration: none;
}

.payment-result-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ── Toast ──────────────────────────────────── */

.toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: min(300px, calc(100vw - 32px));
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════
   SITE HEADER
   ════════════════════════════════════════════ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 64px;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

/* ── Logo in header ── */
.logo-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-shield { flex-shrink: 0; }
.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
  min-width: 0;
}
.site-nav a {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  color: #0a0e16;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(63, 185, 80, 0.22);
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  height: 38px;
  padding: 0 20px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 140ms ease;
}
.header-btn:hover { background: rgba(63, 185, 80, 0.1); }

@media (max-width: 980px) {
  .header-inner {
    padding: 0 20px;
    gap: 10px;
  }

  .logo-text {
    font-size: 18px;
    white-space: nowrap;
  }

  .site-nav {
    justify-self: stretch;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }

  .site-nav a {
    padding: 7px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .header-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-nav {
    justify-self: stretch;
    margin: 0 auto;
  }
}

/* ════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════ */

.landing-main {
  padding-top: 64px;
  background:
    radial-gradient(circle at 50% 78%, rgba(63, 185, 80, 0.06) 0%, transparent 24%),
    radial-gradient(circle at 50% 108%, rgba(63, 185, 80, 0.04) 0%, transparent 34%),
    var(--bg);
}

/* ── Hero ── */
.hero-section {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(63, 185, 80, 0.07) 0%, transparent 58%),
    var(--bg);
}
.hero-content { max-width: 740px; text-align: center; }
.hero-title {
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 900;
  line-height: 1.07;
  color: var(--text);
}
.hero-title span { color: var(--accent-light); }
.hero-sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 500;
  max-width: 540px;
  margin-inline: auto;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Features ── */
.features-section { padding: 90px 24px; }
.features-inner { max-width: 1100px; margin: 0 auto; }
.features-heading { text-align: center; margin-bottom: 56px; }
.features-heading h2 { font-size: clamp(26px, 3.5vw, 40px); font-weight: 900; color: var(--text); }
.features-heading p {
  margin-top: 12px;
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.55;
}
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-card {
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 150ms ease, transform 150ms ease;
}
.feature-card:hover { border-color: rgba(63, 185, 80, 0.25); transform: translateY(-2px); }
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(63, 185, 80, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 15px; font-weight: 900; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.feature-card p  { font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* ── CTA ── */
.cta-section {
  padding: 100px 24px;
  text-align: center;
  background: transparent;
}
.cta-inner { max-width: 680px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(24px, 3.5vw, 42px); font-weight: 900; color: var(--text); }
.cta-inner p { margin: 18px 0 38px; font-size: 16px; color: var(--muted); line-height: 1.65; font-weight: 500; }

/* ── Footer ── */
.site-footer { padding: 28px 24px; }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  flex-shrink: 0;
}
.footer-logo-text {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 140ms ease; }
.footer-links a:hover { color: var(--text); }

/* ── Inline text-link button (modal "Создать" / "Войти") ── */
.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.inline-link-btn:hover { text-decoration: underline; }

/* ════════════════════════════════════════════
   AUTH MODAL (popup on index.html)
   ════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }

.auth-modal-card {
  position: relative;
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px 34px 30px;
  animation: modalIn 160ms ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}
.modal-close-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }

.auth-tabs-wrap {
  display: flex;
  gap: 4px;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 4px;
  margin: 18px 0 20px;
}
.auth-tab {
  flex: 1;
  height: 36px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.auth-tab.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.auth-tabs-wrap[hidden] { display: none !important; }

.auth-panel[hidden] { display: none; }
.auth-panel .auth-form { margin-top: 0; }
.auth-form[hidden] { display: none !important; }

/* ════════════════════════════════════════════
   AUTH PAGES (login.html, register.html)
   ════════════════════════════════════════════ */

body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px 34px 32px;
  display: flex;
  flex-direction: column;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
}
.auth-logo span { font-size: 17px; font-weight: 900; color: var(--text); }

.auth-title { font-size: 26px; font-weight: 900; text-align: center; color: var(--text); }
.auth-sub   { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.55; }

.auth-form { margin-top: 24px; display: grid; gap: 16px; }
.password-field {
  position: relative;
}
.password-field .form-input {
  padding-right: 52px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  transition: background 140ms ease, color 140ms ease;
}
.password-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.password-toggle:focus-visible {
  outline: 2px solid rgba(63, 185, 80, 0.5);
  outline-offset: 1px;
}
.password-toggle-icon-hide {
  display: none;
}
.password-toggle.is-visible .password-toggle-icon-show {
  display: none;
}
.password-toggle.is-visible .password-toggle-icon-hide {
  display: block;
}
.auth-inline-error {
  min-height: 18px;
  margin: 0;
}
.auth-inline-feedback {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}
.auth-inline-feedback.is-error {
  color: #f85149;
}
.auth-inline-feedback.is-success {
  color: #7ee787;
}
.auth-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: var(--accent-light);
  margin-top: 0;
}
.auth-verify-box {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.auth-verify-box[hidden] {
  display: none;
}
.auth-reset-step {
  display: grid;
  gap: 16px;
}
.auth-reset-step[hidden] {
  display: none;
}
.auth-reset-step .form-group {
  margin-top: 4px;
}
.auth-modal-card .auth-verify-box {
  position: static;
  inset: auto;
  margin-top: 24px;
  box-shadow: var(--shadow);
  align-content: normal;
}
.auth-verify-title {
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  color: var(--text);
}
.auth-verify-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}
.auth-verify-sub span {
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
}
.auth-verify-actions {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }

.auth-switch { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--accent-light); text-decoration: none; font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

.back-link {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  transition: color 140ms ease;
}
.back-link:hover { color: var(--text); }

/* ════════════════════════════════════════════
   CABINET PAGE
   ════════════════════════════════════════════ */

.cabinet-main { padding-top: 64px; min-height: 100vh; }
.cabinet-wrap { max-width: 900px; margin: 0 auto; padding: 48px 24px 80px; }
.section-title { font-size: 26px; font-weight: 900; color: var(--text); margin-bottom: 18px; }

/* ── Account info cards ── */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-user     { background: rgba(63, 185, 80, 0.12); color: var(--accent); }
.icon-status   { background: rgba(63, 185, 80, 0.12); color: var(--accent); }
.icon-calendar { background: rgba(255, 159, 67, 0.12); color: #ff9f43; }
.icon-account-id { background: rgba(88, 166, 255, 0.14); color: #58a6ff; }

.card-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-value { display: block; font-size: 19px; font-weight: 900; color: var(--text); margin-top: 5px; }
.status-active  { color: var(--accent-light) !important; }
.status-expired { color: #f85149 !important; }

/* ── Email section ── */
.email-section {
  margin-top: 8px;
  padding: 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.email-section-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.email-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(63, 185, 80, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.email-title { font-size: 16px; font-weight: 800; color: var(--text); }
.email-form { display: flex; gap: 10px; }
.email-form .form-input { flex: 1; height: 44px; }
.email-form .btn-primary {
  height: 44px;
  min-height: auto;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 8px;
  flex-shrink: 0;
}
.email-verify-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.email-verify-box[hidden] { display: none; }
.email-verify-box .form-input { flex: 1; height: 44px; }
.email-verify-box .btn-outline {
  height: 44px;
  min-height: auto;
  padding: 0 18px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ── Subscription section ── */
.subscription-section { margin-top: 28px; }
.subscription-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}
.subscription-header h2 { font-size: 20px; font-weight: 900; color: var(--text); }
.active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(63, 185, 80, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Timeline steps ── */
.steps { display: flex; flex-direction: column; }
.step  { display: flex; gap: 20px; align-items: flex-start; }
.step-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 36px;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.step-line {
  width: 1px;
  flex: 1;
  min-height: 20px;
  background: rgba(63, 185, 80, 0.2);
  margin: 5px 0;
}
.step:last-child .step-line { display: none; }
.step-content { flex: 1; padding-bottom: 32px; padding-top: 4px; }
.step:last-child .step-content { padding-bottom: 0; }
.step-content h3 { font-size: 16px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.step-content > p { font-size: 14px; color: var(--muted); line-height: 1.65; font-weight: 500; }

.device-catalog {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.device-catalog[hidden] { display: none; }
.device-catalog-summary {
  padding: 14px 16px;
  border: 1px solid rgba(63, 185, 80, 0.16);
  border-radius: 12px;
  background: rgba(63, 185, 80, 0.06);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.device-catalog-actions {
  margin-top: 0;
}

/* ── Platform download buttons ── */
/* ── Subscription card wrapper ── */
.sub-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 28px;
}
.sub-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0 24px;
}

/* ── Add subscription button ── */
.btn-add-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: transparent;
  border: 1.5px solid rgba(63, 185, 80, 0.45);
  border-radius: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}
.btn-add-sub:hover { background: rgba(63, 185, 80, 0.08); border-color: var(--accent); }
.btn-add-sub.is-disabled,
.btn-add-sub[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Floating Telegram button (all pages) ── */
.tg-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--panel-2);
  color: #4fc3f7;
  font-size: 14px;
  font-weight: 700;
  border-radius: 16px;
  border: 1.5px solid rgba(79, 195, 247, 0.32);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}
.tg-float-btn:hover {
  background: rgba(79, 195, 247, 0.09);
  border-color: rgba(79, 195, 247, 0.6);
  transform: translateY(-2px);
}
.tg-float-btn svg { width: 20px; height: 20px; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

@media (max-width: 860px) {
  .form-label {
    font-size: 14px;
  }

  .form-input {
    font-size: 16px;
  }

  .payment-help {
    font-size: 15px;
    line-height: 1.6;
  }

  .header-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .logo-text {
    font-size: 18px;
  }

  .site-nav {
    justify-self: stretch;
    margin: 0 auto;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }

  .site-nav a {
    padding: 7px 9px;
    font-size: 13px;
    white-space: nowrap;
  }

  .header-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero-section { padding: 60px 18px; min-height: calc(100svh - 64px); }
  .hero-title { font-size: clamp(32px, 9vw, 52px); }
  .hero-sub { font-size: 18px; line-height: 1.55; }
  .hero-actions { gap: 10px; }
  .features-section { padding: 60px 18px; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .features-heading { margin-bottom: 36px; }
  .features-heading p {
    font-size: 17px;
    line-height: 1.55;
  }
  .cta-section { padding: 68px 18px; }
  .cta-inner p {
    font-size: 17px;
    line-height: 1.6;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 14px; }

  .auth-card { padding: 28px 22px 24px; }
  .auth-modal-card { padding: 28px 22px 24px; }
  .auth-verify-title { font-size: 34px; }
  .auth-verify-sub { font-size: 16px; line-height: 1.6; }

  .cabinet-wrap { padding: 32px 18px 60px; }
  .account-grid { grid-template-columns: 1fr; }
  .email-form { flex-direction: column; }
  .email-form .btn-primary { width: 100%; border-radius: 999px; }
  .email-verify-box { flex-direction: column; }
  .email-verify-box .btn-outline { width: 100%; border-radius: 999px; }
  .platform-grid { grid-template-columns: 1fr; }
  .payment-plan-trigger {
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 14px;
  }
  .payment-plan-menu {
    padding: 7px;
    border-radius: 16px;
  }
  .payment-plan-option {
    padding: 12px;
    border-radius: 12px;
  }
  .payment-plan-option-title { font-size: 15px; }
  .payment-plan-option-meta { font-size: 13px; }
  .purchase-plan-actions { flex-direction: column; }
  .feature-card {
    padding: 16px 14px;
  }
  .feature-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
  }
  .feature-card h3 { font-size: 16px; margin-bottom: 8px; }
  .feature-card p { font-size: 14px; line-height: 1.55; }

  .cabinet-wrap { padding: 28px 16px 56px; }
  .section-title { font-size: 25px; }
  .account-card {
    padding: 16px;
    gap: 12px;
  }
  .card-label { font-size: 14px; }
  .card-value { font-size: 19px; }
  .email-section,
  .sub-card {
    padding: 18px 16px;
  }
  .subscription-header {
    margin-bottom: 20px;
  }
  .subscription-header h2 { font-size: 20px; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions > * { width: 100%; }
  .auth-card, .auth-modal-card { padding: 24px 18px 20px; border-radius: 14px; }
  .btn-primary, .btn-outline { font-size: 15px; min-height: 48px; }
  .btn-telegram { font-size: 15px; min-height: 50px; }
  .logo-text {
    display: inline;
    font-size: 16px;
  }
  .site-nav {
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .site-nav a {
    padding: 6px 8px;
    font-size: 12px;
  }
  .header-btn {
    padding: 0 12px;
    font-size: 14px;
  }
  .hero-section { padding: 48px 16px; }
  .hero-title { font-size: clamp(36px, 10vw, 46px); }
  .hero-sub { font-size: 17px; }
  .features-section { padding: 48px 16px; }
  .cta-section { padding: 56px 16px; }
  .cabinet-main { padding-top: 56px; }
  .features-grid { gap: 8px; }
  .feature-card {
    padding: 14px 12px;
  }
  .feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .feature-card h3 { font-size: 15px; }
  .feature-card p { font-size: 13px; }
  .payment-help,
  .purchase-plan-summary,
  .auth-verify-sub {
    font-size: 15px;
  }
  .payment-plan-trigger-text,
  .form-input,
  .card-value {
    font-size: 16px;
  }
  .section-title {
    font-size: 24px;
  }
}
