/* ═══════════════════════════════════════════════════════
   FROGGY — style.css  FINAL
═══════════════════════════════════════════════════════ */

:root {
  --bg:      #060608;
  --bg2:     #0d0d12;
  --bg3:     #141420;
  --border:  #1c1c2e;
  --green:   #7FFF00;
  --green2:  #6adb00;
  --yellow:  #ffd60a;
  --red:     #ff3a5c;
  --blue:    #64b4ff;
  --text:    #e8f0e8;
  --muted:   #55665a;
  --radius:  14px;
  --nav-h:   58px;
  --sidebar-w: 180px;
  --topbar-h:  52px;
  --banner-h:  36px;
}

/* ── RESET ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: none; }
/* Подчёркивание только у текстовых ссылок внутри контента */
.step-note a:hover, .nv-hint a:hover, .nv-help-row a:hover,
.legal a:hover, .sidebar-legal a:hover, .mobile-legal a:hover,
.ticket-modal-body a:hover { text-decoration: underline; }
button { font-family: inherit; }
h2 { font-size: 22px; font-weight: 800; }

/* ── UTILITY ─────────────────────────────────────── */
.hidden  { display: none !important; }
.muted   { color: var(--muted); }
.accent  { color: var(--green); }
.empty   { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13px; }
.loading { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13px; }

/* ── SKELETON ────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: skel 1.5s infinite;
  border-radius: var(--radius);
}
.skel-text { border-radius: 4px; }
.skel-card { display: block; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.profile-skel { padding: 4px 0; }

/* ── LOADER ──────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .5s; gap: 20px;
}
.loader img {
  height: 72px; width: auto;
  filter: drop-shadow(0 0 18px var(--green));
  animation: pulse-glow 1.6s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 10px var(--green)); transform: scale(1); }
  50%       { filter: drop-shadow(0 0 28px var(--green)); transform: scale(1.06); }
}
.loader-bar  { width: 100px; height: 2px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.loader-fill { height: 100%; background: var(--green); border-radius: 99px; animation: load-bar 1.6s ease-in-out infinite; }
@keyframes load-bar {
  0%   { width: 0;    margin-left: 0; }
  50%  { width: 100%; margin-left: 0; }
  100% { width: 0;    margin-left: 100%; }
}

/* ── INPUTS ──────────────────────────────────────── */
.inp {
  display: block; width: 100%;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: 15px; font-family: inherit;
  padding: 11px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 10px; -webkit-appearance: none;
}
/* Убираем белый фон автозаполнения браузера */
.inp:-webkit-autofill,
.inp:-webkit-autofill:hover,
.inp:-webkit-autofill:focus,
.inp:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px var(--bg3) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  border-color: var(--green) !important;
}
.inp:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(127,255,0,.07); }
.inp::placeholder { color: var(--muted); }
.inp.textarea { resize: none; font-size: 13px; line-height: 1.5; }
.inp-row { display: flex; gap: 8px; }
.inp-row .inp { flex: 1; margin-bottom: 0; }
select.inp { cursor: pointer; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; background: var(--green); color: #000;
  font-weight: 800; font-size: 14px; font-family: inherit;
  padding: 13px; border: none; border-radius: 10px;
  cursor: pointer; transition: all .15s; margin-bottom: 10px;
  box-shadow: 0 3px 14px rgba(127,255,0,.2);
}
.btn-primary:hover   { background: var(--green2); }
.btn-primary:active  { transform: scale(.97); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  display: block; width: 100%;
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 13px; font-family: inherit;
  padding: 11px; border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .2s; margin-bottom: 10px;
}
.btn-outline:hover  { border-color: var(--green); color: var(--green); }
.btn-outline:active { transform: scale(.97); }

.btn-outline-full {
  display: block; width: 100%; text-align: center;
  background: transparent; color: var(--green);
  font-weight: 700; font-size: 13px; font-family: inherit;
  padding: 12px; border: 1.5px solid rgba(127,255,0,.3);
  border-radius: 10px; cursor: pointer; transition: all .2s; margin-bottom: 10px;
}
.btn-outline-full:hover { background: rgba(127,255,0,.05); }

.btn-ghost {
  display: block; width: 100%; background: none; border: none;
  color: var(--muted); font-size: 12px; font-family: inherit;
  padding: 10px; cursor: pointer; text-align: center;
}
.btn-ghost:hover { color: var(--text); }

.btn-ghost-sm {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: all .2s;
}
.btn-ghost-sm:hover { color: var(--text); border-color: var(--muted); }

.btn-danger {
  display: block; width: 100%;
  background: rgba(255,58,92,.1); color: var(--red);
  font-weight: 700; font-size: 13px; font-family: inherit;
  padding: 12px; border: 1.5px solid rgba(255,58,92,.25);
  border-radius: 10px; cursor: pointer; transition: all .2s; margin-bottom: 10px;
}
.btn-danger:hover { background: rgba(255,58,92,.18); }

.btn-sq {
  background: var(--green); color: #000;
  font-size: 13px; font-weight: 800; font-family: inherit;
  border: none; border-radius: 10px;
  padding: 11px 18px; cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.btn-sq:active { transform: scale(.95); }

.btn-sm {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.btn-sm:hover { color: var(--text); }

.btn-back {
  background: none; border: none; color: var(--muted);
  font-size: 13px; font-family: inherit; cursor: pointer; padding: 4px 0;
}
.btn-back:hover { color: var(--text); }

.btn-sub-link {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--green);
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 8px 0; cursor: pointer; text-decoration: underline;
}
.btn-sub-link:hover { opacity: .8; }

/* ── TAGS / PILLS ────────────────────────────────── */
.tag {
  display: inline-block; flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px;
  background: rgba(255,214,10,.12); color: var(--yellow);
}
.tag-green  { background: rgba(127,255,0,.12);  color: var(--green); }
.tag-blue   { background: rgba(100,180,255,.12); color: var(--blue);  }
.tag-red    { background: rgba(255,58,92,.12);   color: var(--red);   }
.tag-yellow { background: rgba(255,214,10,.12);  color: var(--yellow);}

/* ── ERRORS / RESULTS ───────────────────────────── */
.err  {
  color: var(--red); font-size: 12px;
  padding: 8px 12px; margin-top: 4px; margin-bottom: 6px;
  background: rgba(255,58,92,.07);
  border: 1px solid rgba(255,58,92,.18); border-radius: 8px;
}
.res { font-size: 12px; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.res.ok   { background: rgba(127,255,0,.07);  color: var(--green); border: 1px solid rgba(127,255,0,.18); }
.res.fail { background: rgba(255,58,92,.07);  color: var(--red);   border: 1px solid rgba(255,58,92,.18); }

/* ── AUTH ────────────────────────────────────────── */
.auth {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 100; overflow-y: auto;
}
.auth-wrap {
  width: 100%; max-width: 900px;
  display: flex; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; min-height: 520px;
}
.auth-brand {
  flex: 1.1; padding: 40px 36px;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 20px;
  justify-content: center; align-items: flex-start;
}
.auth-brand-logo   { height: 80px; width: auto; display: block; object-fit: contain; filter: drop-shadow(0 0 20px rgba(127,255,0,.45)); margin-left: -4px; }
.auth-logo-wrap    { display: flex; align-items: center; justify-content: flex-start; }
.auth-brand-name   { font-size: 32px; font-weight: 900; color: var(--green); letter-spacing: 5px; margin-top: -4px; }
.auth-brand-desc   { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: -8px; }
.auth-brand-features { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.auth-feat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.auth-feat svg { color: var(--green); flex-shrink: 0; }
.auth-form-wrap {
  flex: 1; padding: 40px 36px;
  display: flex; align-items: center; justify-content: center;
}
.auth-form { width: 100%; max-width: 320px; }
.auth-form-head { margin-bottom: 24px; }
.auth-form-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-form-sub   { font-size: 13px; color: var(--muted); }
.auth-label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.auth-field { margin-bottom: 14px; }
.auth-inp   { margin-bottom: 0 !important; }
.auth-agree-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; margin-bottom: 14px; user-select: none;
}
.auth-agree-toggle {
  width: 36px; height: 20px; flex-shrink: 0;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 99px; position: relative; transition: all .2s; margin-top: 2px;
}
.auth-agree-toggle.on, .auth-agree-toggle.auth-toggle-on { background: var(--green); border-color: var(--green); }
.auth-agree-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--muted); transition: all .2s;
}
.auth-agree-toggle.on .auth-agree-thumb,
.auth-agree-toggle.auth-toggle-on .auth-agree-thumb { left: 18px; background: #000; }
.auth-agree-text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.auth-agree-text a { color: var(--green); }
.auth-back {
  background: none; border: none; color: var(--muted);
  font-size: 12px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 12px; padding: 0;
}
.auth-back:hover { color: var(--text); }
.auth-agree-shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
.auth-code-boxes { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.auth-code-box {
  width: 56px; height: 64px; text-align: center;
  font-size: 24px; font-weight: 800; font-family: inherit;
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: 14px; color: var(--text); outline: none;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  caret-color: var(--green);
}
.auth-code-box:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(127,255,0,.12);
  transform: scale(1.04);
}
.auth-code-box.filled {
  border-color: rgba(127,255,0,.5);
  background: rgba(127,255,0,.05);
}
.auth-code-sep { color: var(--border); font-size: 20px; margin: 0 2px; }
.auth-email-notice {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(127,255,0,.05); border: 1px solid rgba(127,255,0,.15);
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 14px;
}
.auth-email-notice svg { flex-shrink: 0; color: var(--green); margin-top: 1px; }
@media (max-width: 640px) {
  .auth-wrap { flex-direction: column; min-height: auto; }
  .auth-brand { padding: 24px 20px; border-right: none; border-bottom: 1px solid var(--border); }
  .auth-brand-features { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .auth-form-wrap { padding: 24px 20px; }
  .auth-code-box { width: 44px; height: 52px; font-size: 20px; border-radius: 10px; }
}

/* ── APP SHELL ───────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px;
  background: rgba(6,6,8,.97); border-bottom: 1px solid var(--border);
  flex-shrink: 0; z-index: 10;
}
.topbar-left   { font-size: 14px; font-weight: 900; color: var(--green); letter-spacing: 3px; }
.topbar-center { display: flex; align-items: center; }
.topbar-right  { font-size: 11px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout { flex: 1; display: flex; overflow: hidden; }
.sidebar { display: none; }
@media (min-width: 768px) {
  .sidebar {
    display: flex; flex-direction: column;
    width: var(--sidebar-w); flex-shrink: 0;
    padding: 16px 10px; border-right: 1px solid var(--border);
    background: var(--bg2); overflow-y: auto;
  }
  .nav-item {
    display: block; background: none; border: none;
    color: var(--muted); font-size: 13px; font-weight: 600; font-family: inherit;
    padding: 9px 12px; border-radius: 8px; cursor: pointer; text-align: left;
    transition: all .2s; margin-bottom: 2px;
    border-left: 2px solid transparent; text-decoration: none;
  }
  .nav-item:hover  { background: var(--bg3); color: var(--text); text-decoration: none; }
  .nav-item.active { background: rgba(127,255,0,.09); color: var(--green); border-left-color: var(--green); }
  .sidebar-bottom  { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
  .sidebar-legal   { font-size: 10px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
  .sidebar-legal a { color: var(--muted); }
  .sidebar-legal a:hover { color: var(--text); }
}
.main {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: calc(var(--nav-h) + 16px);
}
@media (min-width: 768px) { .main { padding-bottom: 24px; } }
.page { display: none; padding: 16px; animation: fadeUp .22s ease; }
.page.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) { .page { max-width: 640px; margin: 0 auto; padding: 24px; } }

/* ── BOTTOM NAV ──────────────────────────────────── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(6,6,8,.98); border-top: 1px solid var(--border);
  display: flex; z-index: 50;
}
@media (min-width: 768px) { .bottomnav { display: none !important; } }
.bnav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; color: var(--muted);
  font-size: 9px; font-weight: 700; font-family: inherit;
  letter-spacing: .4px; text-transform: uppercase;
  cursor: pointer; transition: color .2s; position: relative;
}
.bnav-btn.active { color: var(--green); }
.bnav-ico { width: 20px; height: 20px; }
.mobile-legal {
  text-align: center;
  padding: 6px 16px calc(var(--nav-h) + 6px);
  font-size: 10px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mobile-legal a { color: var(--muted); }
@media (min-width: 768px) { .mobile-legal { display: none; } }
@supports (padding: env(safe-area-inset-bottom)) {
  .bottomnav { height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
  .mobile-legal { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px); }
}

/* ── BADGES (unread) ─────────────────────────────── */
.tab-badge, .bnav-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 800; min-width: 16px; height: 16px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; pointer-events: none;
}
.unread-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%; margin-right: 5px; flex-shrink: 0;
  box-shadow: 0 0 5px var(--green);
}
.unread { border-color: rgba(127,255,0,.25) !important; }

/* ── PAGE ELEMENTS ───────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: 1.5px; text-transform: uppercase; margin: 20px 0 10px;
}

/* ── HERO ────────────────────────────────────────── */
.hero { padding: 8px 0 20px; }
.badge {
  display: inline-block;
  background: rgba(127,255,0,.07); color: var(--green);
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  padding: 5px 12px; border-radius: 99px; border: 1px solid rgba(127,255,0,.18); margin-bottom: 16px;
}
.hero-title { font-size: 34px; font-weight: 900; line-height: 1.1; margin-bottom: 10px; letter-spacing: -.5px; }
.hero-desc  { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
@media (max-width: 480px) { .features { grid-template-columns: 1fr; } }
.feature-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 12px; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(127,255,0,.1); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.feature-card:nth-child(2) .feature-icon { background: rgba(127,255,0,.1); color: var(--green); }
.feature-card:nth-child(3) .feature-icon { background: rgba(127,255,0,.1); color: var(--green); }
.feature-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.feature-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ── CARDS ───────────────────────────────────────── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.card-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.card-row:last-of-type { border-bottom: none; }
.card-row span:first-child { color: var(--text); font-weight: 600; }
.card-row span:last-child { color: var(--muted); font-size: 12px; }
.card-action { }
.card-main { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--bg3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted); }
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.card-desc  { font-size: 11px; color: var(--muted); }

/* ── PROFILE ─────────────────────────────────────── */
.profile-info { }
.profile-field { padding: 10px 0; }
.profile-field-lbl { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.profile-field-val { font-size: 14px; font-weight: 600; }
.profile-email { word-break: break-all; }
.profile-id { font-family: 'Courier New', monospace; color: var(--green); font-size: 18px; font-weight: 900; }
.profile-field-row { display: flex; align-items: center; justify-content: space-between; }
.profile-divider { height: 1px; background: var(--border); margin: 2px 0; }
.profile-action-btn { background: none; border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.profile-action-btn:hover { color: var(--green); border-color: var(--green); }
.profile-role { font-size: 13px; font-weight: 700; }
.profile-role-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.role-user    { background: rgba(127,255,0,.08); color: var(--muted); }
.role-support { background: rgba(127,255,0,.12); color: var(--green); }
.role-admin   { background: rgba(255,214,10,.12); color: var(--yellow); }

/* ── INFO ROWS (modals) ─────────────────────────── */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row-total { font-weight: 700; font-size: 15px; color: var(--green); }
.info-url { font-family: 'Courier New', monospace; font-size: 11px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px; word-break: break-all; color: var(--green); line-height: 1.5; cursor: pointer; margin-top: 10px; }
.info-url:hover { border-color: var(--green); }

/* ── VPN PAGE (динамически рендерится в JS) ─────── */
.vpn-page { }
.vpn-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.vpn-title  { font-size: 22px; font-weight: 800; }
.vpn-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vpn-section-label { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin: 16px 0 10px; }

/* Список подписок */
.vpn-subs-list { display: flex; flex-direction: column; gap: 10px; }
.vpn-sub-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.vpn-sub-active  { border-color: rgba(127,255,0,.25); }
.vpn-sub-expired { opacity: .7; }
.vpn-sub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.vpn-sub-info { display: flex; align-items: center; gap: 8px; }
.vpn-sub-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vpn-dot-green { background: var(--green); box-shadow: 0 0 6px rgba(127,255,0,.5); }
.vpn-dot-red   { background: var(--red); }
.vpn-sub-name  { font-size: 14px; font-weight: 700; }
.vpn-sub-expire{ font-size: 11px; color: var(--muted); }
.vpn-traffic-bar  { height: 4px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.vpn-traffic-fill { height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.vpn-traffic-label{ font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.vpn-sub-actions  { display: flex; gap: 8px; flex-wrap: wrap; }
.vpn-sub-actions .btn-outline { width: auto; margin-bottom: 0; }

/* Покупка */
.vpn-buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .vpn-buy-grid { grid-template-columns: 1fr; } }
.vpn-plan-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.vpn-plan-card-promo { border-style: dashed; }
.vpn-plan-badge { font-size: 10px; font-weight: 700; color: var(--green); background: rgba(127,255,0,.1); border: 1px solid rgba(127,255,0,.2); padding: 3px 8px; border-radius: 99px; display: inline-block; margin-bottom: 10px; }
.vpn-plan-badge-outline { background: transparent; color: var(--muted); border-color: var(--border); }
.vpn-plan-price { font-size: 28px; font-weight: 900; color: var(--text); margin-bottom: 12px; }
.vpn-plan-period { font-size: 13px; font-weight: 400; color: var(--muted); }
.vpn-plan-features { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.vpn-plan-feat { font-size: 12px; color: var(--muted); }
.vpn-plan-feat::before { content: "✓ "; color: var(--green); }
.vpn-plan-promo-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.vpn-all-taken { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; margin-top: 10px; }

/* Специальные (триал/промо) */
.vpn-special-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; gap: 10px; }
.vpn-special-left { display: flex; align-items: center; gap: 10px; }
.vpn-sub-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.vpn-special-name { font-size: 14px; font-weight: 700; }
.vpn-special-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
@keyframes pulse { 0% { opacity: 1; } 100% { opacity: .5; } }

/* Личные промокоды */
.vpn-personal-card { display: flex; align-items: center; justify-content: space-between; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.vpn-personal-code { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 700; color: var(--green); }
.vpn-personal-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vpn-all-taken { font-size: 13px; color: var(--muted); }

/* Промокоды пользователя */
.promo-personal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.promo-personal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.promo-personal-code { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 700; color: var(--green); }
.promo-personal-info { font-size: 11px; color: var(--muted); margin-top: 2px; }
.promo-used, .promo-expired { opacity: .6; }

/* ── SUB CARD (profile старый) ───────────────────── */
.sub-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.sub-card-active { border-color: rgba(127,255,0,.25); }
.sub-card-expired { border-color: var(--border); opacity: .7; }
.sub-card-empty { border-style: dashed; }
.sub-card-empty-inner { display: flex; justify-content: space-between; align-items: center; }
.sub-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sub-none { font-size: 12px; color: var(--muted); }
.sub-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sub-card-left { display: flex; align-items: center; gap: 8px; }
.sub-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--green); box-shadow: 0 0 5px rgba(127,255,0,.5); }
.dot-red { background: var(--red); }
.sub-status-text { font-size: 13px; font-weight: 700; }
.sub-expired-text { color: var(--muted); }
.sub-active-badge { color: var(--green); font-size: 20px; line-height: 1; }
.sub-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sub-stat { }
.sub-stat-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 3px; }
.sub-stat-val { font-size: 15px; font-weight: 800; }
.sub-stat-dim { font-size: 12px; color: var(--muted); font-weight: 400; }
.sub-renew-wrap { margin-top: 8px; }
.sub-renew-hint { font-size: 12px; color: var(--red); margin-bottom: 6px; }

/* Froggy card states */
.froggy-card-dimmed { opacity: .5; pointer-events: none; }
.froggy-card-hidden { display: none !important; }


/* ── GUIDE (novavps style) ──────────────────────── */
.guide-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.guide-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.nv-step {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 12px;
}
.nv-step-last { margin-bottom: 0; }
.nv-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.nv-step-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--text); color: #0a0a0e;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
}
.nv-step-num-done { background: var(--green); }
.nv-step-title { font-size: 15px; font-weight: 700; color: var(--text); }
.nv-step-body { display: flex; flex-direction: column; gap: 10px; }

.nv-platform-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px;
}
.nv-platform-main { display: flex; flex-direction: column; }

/* Главная кнопка — зелёный акцент, тёмный фон */
.nv-dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px;
  background: rgba(127,255,0,.1); color: var(--green);
  border: 1.5px solid rgba(127,255,0,.25); border-radius: 12px;
  font-size: 14px; font-weight: 800; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: all .18s;
}
.nv-dl-btn:not(.nv-dl-platform):hover {
  background: rgba(127,255,0,.18); border-color: var(--green);
  text-decoration: none; opacity: 1;
}
.nv-dl-btn:active { transform: scale(.98); }
.nv-add-sub-btn { background: var(--green); color: #000; border-color: var(--green); }
.nv-add-sub-btn:hover { background: #a0ff20 !important; opacity: 1; }

/* Вторичные кнопки платформ */
.nv-dl-secondary {
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border); font-weight: 700;
}
.nv-dl-secondary:hover { border-color: var(--green); color: var(--green); background: rgba(127,255,0,.06); }

/* Toggle "другие платформы" */
.nv-platforms-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: none; border: none; color: var(--muted);
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; padding: 6px 0; transition: color .15s;
}
.nv-platforms-toggle:hover { color: var(--text); }
.nv-toggle-arrow { transition: transform .2s; }
.nv-platforms-toggle.open .nv-toggle-arrow { transform: rotate(180deg); }
.nv-other-platforms { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; animation: fadeUp .18s ease; }
.nv-alts { font-size: 11px; color: var(--muted); text-align: center; padding-top: 4px; }

/* Сетка платформ — три кнопки сразу, тёмный стиль */
.nv-platforms-grid { display: flex; flex-direction: column; gap: 8px; }
.nv-dl-platform {
  display: flex; align-items: center; gap: 14px;
  text-align: left; justify-content: flex-start;
  padding: 14px 16px;
  background: var(--bg3);
  color: var(--text);
  border: 1.5px solid var(--border);
  text-decoration: none;
}
.nv-dl-platform:hover {
  opacity: 1;
  text-decoration: none;
  border-color: rgba(127,255,0,.5);
  background: rgba(127,255,0,.05);
  color: var(--text);
}
.nv-dl-platform:hover .nv-dl-os { color: var(--green); }
.nv-dl-platform:hover .nv-dl-arrow { opacity: 1; color: var(--green); }
.nv-dl-platform:hover .nv-dl-icon { color: var(--green); }
.nv-dl-platform .nv-dl-os { font-size: 14px; font-weight: 700; color: var(--text); transition: color .15s; }
.nv-dl-platform .nv-dl-hint { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.nv-dl-icon { flex-shrink: 0; color: var(--muted); transition: color .15s; }
.nv-dl-arrow { margin-left: auto; opacity: .4; flex-shrink: 0; transition: all .15s; color: var(--muted); }

/* Кнопка выбора подписки внутри поля URL */
.nv-url-pick-btn {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); padding: 4px 6px; cursor: pointer;
  transition: all .15s;
}
.nv-url-pick-btn:hover { color: var(--green); border-color: rgba(127,255,0,.4); }

/* Sub picker — красивый попап */
#guide-sub-picker {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}
.gsp-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 0; width: 340px; max-width: 92vw;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: fadeUp .2s ease;
}
.gsp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.gsp-title { font-size: 16px; font-weight: 800; color: var(--text); }
.gsp-close {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: none; color: var(--muted);
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.gsp-close:hover { background: rgba(127,255,0,.1); color: var(--green); }
.gsp-list { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.gsp-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 12px;
  background: var(--bg3); border: 1.5px solid var(--border);
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.gsp-item:hover { border-color: var(--green); background: rgba(127,255,0,.06); }
.gsp-item:hover .gsp-item-arrow { color: var(--green); transform: translateX(3px); }
.gsp-item-left { display: flex; align-items: center; gap: 10px; }
.gsp-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 6px rgba(127,255,0,.5);
}
.gsp-item-label { font-size: 14px; font-weight: 600; color: var(--text); }
.gsp-item-arrow { color: var(--muted); flex-shrink: 0; transition: all .15s; }

/* Разделитель */
.nv-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.nv-divider::before, .nv-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Блок копирования */
.nv-copy-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.nv-copy-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 4px 4px 12px;
}
.nv-copy-url {
  flex: 1; font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: monospace;
}
.nv-copy-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: var(--text); color: #0a0a0e;
  border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 12px; font-weight: 800;
  font-family: inherit; cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.nv-copy-btn:hover { opacity: .85; }
.nv-hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.nv-step-done-text { font-size: 13px; color: var(--muted); line-height: 1.6; }
.nv-help-row { font-size: 12px; color: var(--muted); }

/* Окно выбора подписки */
#guide-sub-picker .modal-body { display: flex; flex-direction: column; gap: 8px; }
#guide-sub-picker .modal-box { max-width: 360px; }
#guide-sub-picker .btn-sub-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 18px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .15s; text-align: left;
}
#guide-sub-picker .btn-sub-link::after {
  content: "→"; color: var(--green); font-size: 16px; flex-shrink: 0; margin-left: 10px;
}
#guide-sub-picker .btn-sub-link:hover {
  border-color: var(--green); background: rgba(127,255,0,.06); color: var(--green);
}

/* ── TICKETS ─────────────────────────────────────── */
.ticket-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .2s;
}
.ticket-item:hover { border-color: rgba(127,255,0,.3); }
.ticket-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.ticket-subject { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.ticket-meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.tab-pills { display: flex; gap: 6px; }
.tab-pill {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.tab-pill.active { background: rgba(127,255,0,.1); color: var(--green); border-color: rgba(127,255,0,.3); }

/* Ticket modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 190; }
.ticket-modal {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 200; display: flex; flex-direction: column;
  animation: fadeUp .22s ease;
}
.ticket-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
.ticket-modal-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-modal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-modal-meta { padding: 10px 16px; background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); flex-shrink: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.ticket-modal-body { flex: 1; overflow-y: auto; padding: 16px; }
.ticket-modal-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
@media (min-width: 768px) {
  .ticket-modal {
    inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; max-width: 95vw; height: 80vh; max-height: 700px;
    border-radius: var(--radius); border: 1px solid var(--border);
    animation: fadeIn .2s;
  }
}
.ticket-chat { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: 13px; line-height: 1.5; }
.msg-user    { background: rgba(127,255,0,.08); border: 1px solid rgba(127,255,0,.15); align-self: flex-end; }
.msg-support { background: var(--bg2); border: 1px solid var(--border); align-self: flex-start; }
.msg-time    { font-size: 10px; color: var(--muted); margin-top: 4px; }
.closed-notice { font-size: 12px; color: var(--muted); background: var(--bg3); border-radius: 8px; padding: 10px; text-align: center; margin-bottom: 8px; }

/* Reply banner */
.reply-banner {
  position: fixed; top: var(--topbar-h); left: 0; right: 0;
  background: rgba(10,10,14,.96); color: var(--green);
  font-size: 12px; font-weight: 600;
  padding: 9px 16px; z-index: 30;
  border-bottom: 1px solid rgba(127,255,0,.2);
  text-align: center; height: var(--banner-h);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  backdrop-filter: blur(8px);
}
/* Когда баннер виден — сдвигаем layout вниз */
.reply-banner:not(.hidden) ~ * .layout,
.app:has(.reply-banner:not(.hidden)) .layout {
  padding-top: var(--banner-h);
}
@media (min-width: 768px) {
  .reply-banner { left: var(--sidebar-w); }
}

/* ── MODALS ──────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  z-index: 200; display: flex; align-items: flex-end;
  animation: fadeIn .2s;
}
@media (min-width: 768px) { .modal { align-items: center; justify-content: center; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-height: 90vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: slideUp .28s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 768px) { .modal-box { border-radius: var(--radius); max-width: 460px; animation: fadeIn .2s; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 0 20px 24px; }
.modal-hint { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.legal { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.5; }
.legal a { color: var(--green); }
#qr-canvas { display: flex; justify-content: center; padding: 12px 0; }
#qr-canvas canvas, #qr-canvas img { border-radius: 10px; max-width: 220px; }

/* Sub picker modal (guide) */
#guide-sub-picker .modal-body { display: flex; flex-direction: column; gap: 8px; }
#guide-sub-picker .modal-box { max-width: 340px; }
#guide-sub-picker .btn-sub-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 16px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .15s; text-align: left;
}
#guide-sub-picker .btn-sub-link::after {
  content: "→"; color: var(--green); font-size: 16px; flex-shrink: 0;
}
#guide-sub-picker .btn-sub-link:hover {
  border-color: var(--green); background: rgba(127,255,0,.06); color: var(--green);
}

/* ── ADMIN ───────────────────────────────────────── */
.adm-wrap { padding: 16px; }
@media (min-width: 768px) { .adm-wrap { max-width: none; margin: 0; padding: 24px 32px; } }
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.adm-tab {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.adm-tab.adm-tab-active { background: rgba(127,255,0,.1); color: var(--green); border-color: rgba(127,255,0,.3); }
.adm-content { }
.adm-section { }
.adm-section-title { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin: 16px 0 10px; }
.adm-period { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.adm-period-lbl { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: 1px; }
.adm-period-btn {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all .2s;
}
.adm-period-btn.active { background: rgba(127,255,0,.1); color: var(--green); border-color: rgba(127,255,0,.3); }
.adm-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 6px; }
@media (min-width: 500px) { .adm-metrics { grid-template-columns: repeat(4, 1fr); } }
.adm-metric { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.adm-metric-n { display: block; font-size: 28px; font-weight: 900; color: var(--green); line-height: 1; }
.adm-metric-l { display: block; font-size: 11px; font-weight: 700; margin: 6px 0 2px; }
.adm-metric-s { display: block; font-size: 10px; color: var(--muted); }

/* Conversion */
.adm-conv-item { margin-bottom: 12px; }
.adm-conv-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; color: var(--muted); }
.adm-conv-track { height: 4px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.adm-conv-fill  { height: 100%; border-radius: 99px; transition: width .4s; }
.adm-conv-cnt   { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Users */
.adm-users-search { }
.adm-user-btn {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: all .2s;
}
.adm-user-btn:hover { color: var(--text); }

/* Promos admin */
.adm-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
@media (max-width: 480px) { .adm-form-grid { grid-template-columns: 1fr; } }
.adm-form-grid .inp { margin-bottom: 0; }
.adm-field { }
.adm-field label { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 5px; }
.promo-badge { font-size: 11px; padding: 6px 12px; border-radius: 8px; margin-bottom: 12px; display: inline-block; }
.promo-badge-discount { background: rgba(255,214,10,.08); color: var(--yellow); border: 1px solid rgba(255,214,10,.2); }
.promo-badge-sub      { background: rgba(127,255,0,.07); color: var(--green); border: 1px solid rgba(127,255,0,.18); }

/* Support stats */
.support-stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.support-stat-email { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.support-stat-role  { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.support-stat-nums  { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 10px; }
.support-stat-num   { text-align: center; }
.support-stat-val   { font-size: 24px; font-weight: 900; color: var(--green); display: block; }
.support-stat-lbl   { font-size: 10px; color: var(--muted); }

/* Archive */
.adm-archive-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-archive-bar .inp { flex: 1; min-width: 160px; }

/* Debug */
.dbg-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.dbg-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dbg-card-title { font-size: 14px; font-weight: 700; }
.dbg-info { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.dbg-error { font-size: 12px; color: var(--red); margin-bottom: 10px; padding: 8px; background: rgba(255,58,92,.08); border-radius: 6px; }
.dbg-slots { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 10px; }
@media (max-width: 600px) { .dbg-slots { grid-template-columns: repeat(3,1fr); } }
.dbg-slot { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.dbg-slot-active { border-color: rgba(127,255,0,.3); }
.dbg-slot-num    { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.dbg-slot-status { font-size: 10px; color: var(--muted); margin-bottom: 8px; min-height: 20px; }
.dbg-slot-btns   { display: flex; flex-direction: column; gap: 4px; }
.dbg-log { background: var(--bg3); border-radius: 8px; padding: 12px; font-family: 'Courier New', monospace; font-size: 11px; line-height: 1.7; max-height: 200px; overflow-y: auto; }

/* Admin create personal promo modal */
#adm-promo-modal .modal-body { display: flex; flex-direction: column; gap: 8px; }
#adm-promo-modal .adm-field { margin-bottom: 0; }

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--green);
  color: var(--text); padding: 9px 20px;
  border-radius: 99px; font-size: 12px; font-weight: 700;
  z-index: 999; white-space: nowrap; pointer-events: none;
  animation: fadeIn .2s;
}
@media (min-width: 768px) { .toast { bottom: 20px; } }
@supports (padding: env(safe-area-inset-bottom)) {
  .toast { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
}

/* ═══════════════════════════════════════════════════
   ПАТЧ — точечные правки
═══════════════════════════════════════════════════ */

/* 1. Убрать спиннеры у числовых полей */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 2. Метрики в 4 колонки на широком экране */
@media (min-width: 700px) {
  .adm-metrics { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 500px) and (max-width: 699px) {
  .adm-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Табы админа — на десктопе в одну строку, равномерно */
@media (min-width: 768px) {
  .adm-tabs { flex-wrap: nowrap; overflow-x: visible; }
  .adm-tab  { white-space: nowrap; flex: 1; text-align: center; }
}

/* guide-btns-row описан выше */

/* reply-banner описан выше */

/* 5. Профиль кнопки — чуть выразительнее */
.profile-action-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 700; font-family: inherit;
  padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.profile-action-btn:hover { color: var(--green); border-color: rgba(127,255,0,.4); background: rgba(127,255,0,.06); }

/* .btn-outline в карточке профиля — нейтральный стиль */
.card .btn-outline {
  color: var(--muted);
  border-color: var(--border);
  font-weight: 600;
}
.card .btn-outline:hover { color: var(--text); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }

/* 6. select без системных стрелок */
select.inp {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355665a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* 7. Метрика — убрать переполнение на длинных числах */
.adm-metric-n { font-size: 24px; word-break: break-all; }
@media (min-width: 500px) { .adm-metric-n { font-size: 28px; } }

/* 8. Карточки тестового и промо в vpn-special — кнопка не обрезается */
.vpn-special-row .btn-outline {
  width: auto; margin-bottom: 0; white-space: nowrap;
  padding: 6px 14px; font-size: 12px;
}

/* баннер на десктопе — в основном блоке выше */

/* ── LILY PADS (Кувшинки) ─────────────────────────── */
.lily-page { display: flex; flex-direction: column; gap: 0; }
.lily-header { margin-bottom: 20px; }
.lily-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.lily-subtitle { font-size: 13px; color: var(--muted); }
.lily-section-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin: 20px 0 8px;
}

/* Баланс */
.lily-balance-card {
  background: linear-gradient(135deg, rgba(127,255,0,.08), rgba(127,255,0,.03));
  border: 1.5px solid rgba(127,255,0,.2);
  border-radius: 20px; padding: 28px 20px;
  text-align: center;
}
.lily-balance-amount {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 6px;
}
.lily-balance-num { font-size: 52px; font-weight: 900; color: var(--green); line-height: 1; }
.lily-balance-icon { font-size: 36px; }
.lily-balance-rub  { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.lily-balance-hint { font-size: 12px; color: var(--muted); }
.lily-balance-loading { padding: 20px 0; }

/* Магазин */
.lily-shop { display: flex; flex-direction: column; gap: 8px; }
.lily-shop-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  transition: all .18s;
}
.lily-shop-item:hover { border-color: rgba(127,255,0,.4); background: rgba(127,255,0,.04); }
.lily-shop-featured  { border-color: rgba(127,255,0,.3); background: rgba(127,255,0,.06); }
.lily-shop-featured:hover { border-color: var(--green); }
.lily-shop-icon  { font-size: 24px; flex-shrink: 0; }
.lily-shop-info  { flex: 1; }
.lily-shop-name  { font-size: 14px; font-weight: 700; }
.lily-shop-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lily-shop-cost  { font-size: 13px; font-weight: 800; color: var(--green); white-space: nowrap; }

/* Реф карточка */
.lily-ref-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 16px;
}
.lily-ref-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }
.lily-ref-row  { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.lily-ref-url  {
  flex: 1; font-size: 11px; color: var(--muted); font-family: monospace;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lily-ref-copy {
  background: var(--green); color: #000; border: none;
  border-radius: 8px; padding: 8px 14px; font-size: 12px;
  font-weight: 800; font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: opacity .15s;
}
.lily-ref-copy:hover { opacity: .85; }
.lily-ref-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.lily-ref-stats b { color: var(--text); }

/* Таблица лидеров */
.lily-leaderboard { display: flex; flex-direction: column; gap: 6px; }
.lily-lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.lily-lb-me { border-color: rgba(127,255,0,.4); background: rgba(127,255,0,.05); }
.lily-lb-rank  { font-size: 16px; width: 28px; flex-shrink: 0; text-align: center; }
.lily-lb-name  { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.lily-lb-score { font-size: 13px; font-weight: 800; color: var(--green); white-space: nowrap; }

/* История */
.lily-history { display: flex; flex-direction: column; gap: 6px; }
.lily-hist-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.lily-hist-icon   { font-size: 20px; flex-shrink: 0; }
.lily-hist-info   { flex: 1; }
.lily-hist-label  { font-size: 13px; font-weight: 600; }
.lily-hist-at     { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lily-hist-amount { font-size: 13px; font-weight: 800; white-space: nowrap; }
.lily-plus  { color: var(--green); }
.lily-minus { color: var(--red); }

/* ── GUEST CHECKOUT (гостевая покупка) ──────────── */
.guest-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--bg);
}
.guest-wrap { width: 100%; max-width: 420px; }
.guest-brand {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 24px;
}
.guest-logo-wrap { filter: drop-shadow(0 0 14px rgba(127,255,0,.5)); }
.guest-brand-logo { height: 44px; width: auto; object-fit: contain; filter: drop-shadow(0 0 14px rgba(127,255,0,.5)); }
.guest-brand-name { font-size: 22px; font-weight: 900; color: var(--green); letter-spacing: 4px; }

.guest-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px; text-align: center;
}
.guest-badge {
  display: inline-block; background: rgba(127,255,0,.1);
  border: 1px solid rgba(127,255,0,.25); color: var(--green);
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 20px; margin-bottom: 16px;
}
.guest-title { font-size: 24px; font-weight: 900; line-height: 1.3; margin-bottom: 10px; }
.guest-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }

.guest-price-card {
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 20px;
}
.guest-price-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.guest-price-amount { font-size: 36px; font-weight: 900; color: var(--green); margin-bottom: 12px; }
.guest-price-features {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--muted); text-align: left;
  padding-left: 8px;
}

.guest-pay-btn {
  display: block; width: 100%;
  background: var(--green); color: #000; border: none;
  border-radius: 14px; padding: 16px; font-size: 15px; font-weight: 800;
  font-family: inherit; cursor: pointer; transition: opacity .15s;
  margin-bottom: 12px;
}
.guest-pay-btn:hover { opacity: .9; }
.guest-pay-btn:disabled { opacity: .5; cursor: default; }
.guest-legal { font-size: 11px; color: var(--muted); }
.guest-legal a { color: var(--green); }

.guest-spinner {
  width: 40px; height: 40px; margin: 0 auto 20px;
  border: 3px solid var(--border); border-top-color: var(--green);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.guest-success-icon, .guest-fail-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900;
}
.guest-success-icon { background: rgba(127,255,0,.15); color: var(--green); }
.guest-fail-icon { background: rgba(255,58,92,.15); color: var(--red); }

.guest-copy-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 4px 4px 12px; margin-bottom: 16px;
}
.guest-copy-url {
  flex: 1; font-size: 11px; color: var(--muted); font-family: monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.guest-copy-btn {
  background: var(--text); color: #0a0a0e; border: none;
  border-radius: 8px; padding: 8px 14px; font-size: 12px;
  font-weight: 800; font-family: inherit; cursor: pointer; white-space: nowrap;
}

.guest-happ-btn {
  display: block; width: 100%; text-align: center;
  background: rgba(127,255,0,.1); color: var(--green);
  border: 1.5px solid rgba(127,255,0,.3); border-radius: 12px;
  padding: 13px; font-size: 14px; font-weight: 700;
  text-decoration: none; margin-bottom: 20px; transition: all .15s;
}
.guest-happ-btn:hover { background: rgba(127,255,0,.18); text-decoration: none; }

.guest-warning {
  background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.25);
  border-radius: 12px; padding: 12px 14px; font-size: 12px;
  color: var(--muted); line-height: 1.6; text-align: left; margin-bottom: 20px;
}
.guest-warning b { color: var(--yellow); }

.guest-claim-form { text-align: left; }
.guest-claim-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text); }

.guest-footer {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 20px; font-size: 11px; color: var(--muted);
}
.guest-footer a { color: var(--muted); }
.guest-footer a:hover { color: var(--text); }

/* Кнопка назад в шаге кода */
.guest-back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--muted);
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; padding: 0; margin-bottom: 16px;
  transition: color .15s;
}
.guest-back-btn:hover { color: var(--text); }

/* Переключатель режимов гостевой покупки */
.guest-mode-tabs {
  display: flex; gap: 6px; margin-bottom: 10px;
  background: var(--bg3); border-radius: 12px; padding: 4px;
}
.guest-mode-tab {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 13px; font-weight: 700; font-family: inherit;
  padding: 9px; border-radius: 9px; cursor: pointer; transition: all .15s;
}
.guest-mode-tab.guest-mode-active { background: var(--bg2); color: var(--green); }
.guest-mode-hint { font-size: 11px; color: var(--muted); margin-bottom: 16px; }

.guest-email-block { margin-bottom: 4px; }
.guest-agree-row {
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; margin-bottom: 16px; text-align: left;
}
.guest-agree-toggle {
  width: 36px; height: 20px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg3); border: 1.5px solid var(--border);
  position: relative; transition: all .2s; margin-top: 1px;
}
.guest-agree-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--muted); transition: all .2s;
}
.guest-agree-toggle.guest-agree-on { background: rgba(127,255,0,.15); border-color: var(--green); }
.guest-agree-toggle.guest-agree-on::after { left: 18px; background: var(--green); }
.guest-agree-row span { font-size: 11px; color: var(--muted); line-height: 1.5; }
.guest-agree-row a { color: var(--green); }

/* Универсальный индикатор таймера повторной отправки кода */
.guest-resend-indicator, .auth-resend-indicator {
  font-size: 12px; color: var(--yellow); text-align: center;
  background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.2);
  border-radius: 8px; padding: 8px 12px; margin: 0 0 12px;
}

/* Анимация тряски при попытке продолжить без согласия */
.guest-agree-shake { animation: guest-shake .4s ease; }
@keyframes guest-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Сетка кнопок платформ на гостевой странице */
.guest-platforms-grid {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.guest-platforms-grid .guest-happ-btn {
  margin-bottom: 0;
}
