@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0D0D0D;
  --bg2:       #111111;
  --surface:   #161616;
  --surface2:  #1C1C1C;
  --surface3:  #222222;
  --blue:      #3B82F6;
  --text:      #EBEBEB;
  --text-muted:#8A8A8A;
  --text-dim:  #444444;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --r-sm:      8px;
  --r-md:      10px;
  --r-lg:      14px;
  --r-xl:      16px;
  --t:         0.15s ease;
}

/* ─── RESET ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; transition: opacity var(--t); }
a:hover { opacity: 0.8; }

/* ─── DEAD CLASSES (kept for HTML compat, render nothing) ──────────────────── */
.bg-grid, .bg-glow, .bg-glow-1, .bg-glow-2, .bg-glow-3 { display: none; }
.orb-wrap, .orb, .orb-ring, .orb-core { display: none !important; }
.gradient-text { color: var(--text); }

/* ─── AUTH LAYOUT ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind card */
.auth-page::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── CARD ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(59,130,246,0.22);
  border-radius: 18px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 24px 60px rgba(0,0,0,0.45),
    0 0 40px rgba(59,130,246,0.04);
}

/* Thin gradient line at top of card */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), transparent);
  border-radius: 50%;
}

/* ─── LOGO ───────────────────────────────────────────────────────────────────── */
.logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(79,70,229,0.08));
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-info { display: flex; flex-direction: column; }
.logo-name { font-size: 16px; font-weight: 700; letter-spacing: -0.4px; }
.logo-sub  { font-size: 10px; color: var(--text-dim); letter-spacing: 0.5px; margin-top: 1px; text-transform: uppercase; }

/* ─── HEADINGS ───────────────────────────────────────────────────────────────── */
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 5px; }
.page-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }

/* ─── FORM ───────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-muted); margin-bottom: 5px;
}
.input-wrap { position: relative; }
.input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--text-dim); }
.input:focus {
  border-color: rgba(59,130,246,0.45);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.07);
}
.input-suffix {
  position: absolute; right: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim); cursor: pointer;
  transition: color var(--t); line-height: 0;
}
.input-suffix:hover { color: var(--text-muted); }
.input-wrap .input { padding-right: 38px; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 18px;
  border-radius: var(--r-md); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer; border: none; outline: none;
  transition: opacity var(--t), background var(--t); position: relative;
  user-select: none;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #4338CA 100%);
  color: #fff;
  box-shadow: 0 2px 16px rgba(59,130,246,0.25);
  transition: opacity var(--t), box-shadow var(--t);
}
.btn-primary:not(:disabled):hover {
  opacity: 0.92;
  box-shadow: 0 4px 24px rgba(59,130,246,0.35);
}

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-secondary:not(:disabled):hover { border-color: var(--border2); color: var(--text); }

.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 18px;
  border-radius: var(--r-md); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer; text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  user-select: none;
}
.btn-oauth:active { opacity: 0.8; }

.btn-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:not(:disabled):hover { border-color: var(--border2); color: var(--text); }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  color: #F87171;
}
.btn-danger:not(:disabled):hover { background: rgba(239,68,68,0.06); }

.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: var(--r-sm); width: auto; }
.btn-xs { padding: 4px 9px;  font-size: 11px; border-radius: 6px;          width: auto; }

/* ─── CODE INPUT BOXES ───────────────────────────────────────────────────────── */
.code-row { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.code-cell {
  width: 50px; height: 62px;
  background: rgba(59,130,246,0.04);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  font-size: 24px; font-weight: 700;
  color: var(--text); text-align: center;
  outline: none; font-family: 'Inter', ui-monospace, monospace;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  caret-color: transparent;
}
.code-cell:focus  {
  border-color: rgba(59,130,246,0.55);
  background: rgba(59,130,246,0.07);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.code-cell.filled {
  border-color: rgba(59,130,246,0.5);
  color: #60A5FA;
  background: rgba(59,130,246,0.07);
}
.code-cell.err {
  border-color: rgba(239,68,68,0.5);
  color: #F87171;
  background: rgba(239,68,68,0.05);
  animation: shake .3s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%,75% { transform: translateX(-4px); }
  50%     { transform: translateX(4px); }
}

/* ─── ALERT ──────────────────────────────────────────────────────────────────── */
.alert {
  display: none; align-items: flex-start; gap: 8px;
  padding: 10px 13px; border-radius: var(--r-sm);
  font-size: 13px; line-height: 1.5; margin-bottom: 13px;
}
.alert.show { display: flex; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-error   { background: rgba(239,68,68,0.06);  border: 1px solid rgba(239,68,68,0.18);  color: #FCA5A5; }
.alert-success { background: rgba(34,197,94,0.06);  border: 1px solid rgba(34,197,94,0.18);  color: #86EFAC; }
.alert-info    { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.18); color: #93C5FD; }
.alert-warn    { background: rgba(234,179,8,0.06);  border: 1px solid rgba(234,179,8,0.18);  color: #FDE047; }

/* ─── SPINNER ────────────────────────────────────────────────────────────────── */
.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TOAST ──────────────────────────────────────────────────────────────────── */
.toasts {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: 290px;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: flex; align-items: center; gap: 9px;
  pointer-events: auto;
  animation: toastIn .2s ease, toastOut .2s ease 2.8s forwards;
}
.toast-ok   { border-color: rgba(34,197,94,0.2); }
.toast-err  { border-color: rgba(239,68,68,0.2); }
.toast-info { border-color: rgba(59,130,246,0.2); }
@keyframes toastIn  { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateX(10px); } }

/* ─── DIVIDER ────────────────────────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 11px; margin: 14px 0;
}
.divider::before,.divider::after { content:''; flex:1; height:1px; background:var(--border); }

/* ─── UTILS ──────────────────────────────────────────────────────────────────── */
.tc  { text-align: center; }
.mt2 { margin-top: 8px; }
.mt3 { margin-top: 12px; }
.mt4 { margin-top: 16px; }
.mt5 { margin-top: 20px; }
.sm  { font-size: 12px; }
.muted { color: var(--text-muted); }

/* ─── SCROLLBAR ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }


/* ════════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════════════════════ */

.dash { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: 60px; position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 18px;
}
.sidebar-logo {
  width: 34px; height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; flex-shrink: 0;
}
.sidebar-logo svg { width: 18px; height: 18px; }

.nav-items { display: flex; flex-direction: column; gap: 2px; flex: 1; width: 100%; padding: 0 8px; }
.nav-btn {
  width: 100%; height: 42px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); cursor: pointer;
  border: none; background: transparent;
  transition: color var(--t), background var(--t); position: relative;
}
.nav-btn:hover { color: var(--text-muted); background: rgba(255,255,255,0.04); }
.nav-btn.on    { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-btn.on::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 16px; background: var(--blue); border-radius: 2px;
}

.nav-tip {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: 5px 10px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  color: var(--text); pointer-events: none;
  opacity: 0; transform: translateY(-50%) translateX(-4px);
  transition: opacity .15s, transform .15s; z-index: 300;
}
.nav-btn:hover .nav-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

.sidebar-foot { margin-top: auto; padding: 0 8px; width: 100%; display: flex; flex-direction: column; gap: 2px; }

/* ─── MAIN ───────────────────────────────────────────────────────────────────── */
.main { flex: 1; margin-left: 60px; padding: 28px 32px; max-width: calc(100vw - 60px); }

/* ─── PANEL ──────────────────────────────────────────────────────────────────── */
.panel { display: none; }
.panel.on { display: block; animation: fadeUp .2s ease-out; }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ─── PAGE HEADER ────────────────────────────────────────────────────────────── */
.ph { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.ph-left h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.ph-left p  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.ph-right   { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── BLOCK ──────────────────────────────────────────────────────────────────── */
.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.block + .block, .block + .grid, .grid + .block { margin-top: 12px; }

/* ─── INFO GRID ──────────────────────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 10px; }

.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px;
}
.stat-label { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-bottom: 8px; }
.stat-val   { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.stat-sub   { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.blue   { color: var(--blue); }
.green  { color: #22C55E; }
.red    { color: #EF4444; }
.yellow { color: #EAB308; }
.white  { color: var(--text); }

/* ─── SUBSCRIPTION URL ───────────────────────────────────────────────────────── */
.url-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.url-text {
  flex: 1; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'SFMono-Regular','Consolas',monospace;
}
.copy-btn {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); transition: border-color var(--t), color var(--t);
}
.copy-btn:hover { border-color: var(--border2); color: var(--text); }
.copy-btn svg   { width: 12px; height: 12px; }

/* ─── PLAN CARDS (VPN dashboard buy panel) ──────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); gap: 10px; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px;
  cursor: pointer; transition: border-color var(--t);
  position: relative;
}
.plan-card:hover { border-color: var(--border2); }
.plan-card.hot   { border-color: rgba(59,130,246,0.35); }
.plan-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(59,130,246,0.12); color: var(--blue);
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}
.plan-name  { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text-muted); }
.plan-price { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.plan-price sup { font-size: 14px; font-weight: 600; vertical-align: top; margin-top: 5px; display: inline-block; }
.plan-old   { font-size: 12px; color: var(--text-dim); text-decoration: line-through; margin-left: 5px; }
.plan-perks { margin-top: 12px; }
.plan-perk  { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; line-height: 1.9; }
.plan-perk::before { content:''; width:3px; height:3px; border-radius:50%; background:var(--text-dim); flex-shrink:0; }

/* ─── SECTION HEADER ─────────────────────────────────────────────────────────── */
.sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sh-title { font-size: 13px; font-weight: 600; }

/* ─── LIST ITEMS ─────────────────────────────────────────────────────────────── */
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.list-row:last-child  { border-bottom: none; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-main  { font-size: 13px; font-weight: 500; }
.list-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.list-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── BADGES ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.badge-green  { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.18);  color: #22C55E; }
.badge-blue   { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.18); color: var(--blue); }
.badge-red    { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.18);  color: #EF4444; }
.badge-yellow { background: rgba(234,179,8,0.08);  border: 1px solid rgba(234,179,8,0.18);  color: #EAB308; }
.badge-dim    { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-muted); }

.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: #22C55E; }
.dot-red    { background: #EF4444; }
.dot-yellow { background: #EAB308; }
.dot-blue   { background: var(--blue); }

/* ─── MODAL ──────────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500; display: none;
  align-items: center; justify-content: center; padding: 16px;
}
.overlay.on { display: flex; animation: fadeIn .15s ease; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 24px; width: 100%; max-width: 460px;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  animation: scaleIn .18s ease;
}
@keyframes scaleIn { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }
.modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px;
  background: transparent; border: none;
  border-radius: var(--r-sm);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t);
}
.modal-x:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.modal-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* ─── TERMS ──────────────────────────────────────────────────────────────────── */
.terms-scroll {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
  max-height: 220px; overflow-y: auto;
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 12px;
}
.terms-scroll h5 { color: var(--text); font-size: 12px; margin: 10px 0 3px; font-weight: 600; }
.terms-scroll h5:first-child { margin-top: 0; }
.terms-check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12px; color: var(--text-muted); cursor: pointer;
  margin-bottom: 14px; user-select: none;
}
.terms-check input { accent-color: var(--blue); width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* ─── LOADER DOTS ────────────────────────────────────────────────────────────── */
.dots span {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin: 0 2px;
  animation: dotBounce 1.2s ease infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotBounce {
  0%,100% { opacity: .35; }
  50%     { opacity: 1; }
}

/* ─── DEVICE WARN ────────────────────────────────────────────────────────────── */
.device-warn {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--r-md); padding: 11px 13px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 14px;
}
.device-warn svg { color: #F87171; flex-shrink: 0; margin-top: 1px; }
.device-warn strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ─── QR WRAP ────────────────────────────────────────────────────────────────── */
.qr-box {
  background: #fff; border-radius: var(--r-md);
  padding: 14px; display: flex;
  align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ─── MONO CODE ──────────────────────────────────────────────────────────────── */
.mono-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 11px 13px;
  font-family: 'SFMono-Regular','Consolas','Fira Code',monospace;
  font-size: 11px; color: var(--text-muted);
  word-break: break-all; line-height: 1.6;
}

/* ─── PROGRESS ───────────────────────────────────────────────────────────────── */
.progress { height: 2px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width .4s ease; }

/* ─── SKELETON ───────────────────────────────────────────────────────────────── */
.skel {
  background: var(--surface2);
  border-radius: 6px;
  animation: skelPulse 1.5s ease infinite;
}
@keyframes skelPulse { 0%,100% { opacity:.5; } 50% { opacity:1; } }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .main { padding: 16px 14px; }
  .ph { flex-direction: column; gap: 10px; }
  .plans-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .main { padding: 12px; }
  .sidebar { width: 52px; }
  .main { margin-left: 52px; max-width: calc(100vw - 52px); }
  .plans-grid { grid-template-columns: 1fr; }
  .grid-4,.grid-3 { grid-template-columns: 1fr 1fr; }
  .block { padding: 16px; }
  .modal { padding: 20px; }
  .code-row { gap: 6px; }
  .code-cell { width: 42px; height: 52px; font-size: 20px; }
}
@media (max-width: 380px) {
  .card { padding: 22px 16px; }
  .code-cell { width: 38px; height: 48px; font-size: 18px; }
  .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; }
}

/* ─── WORLD MAP ──────────────────────────────────────────────────────────────── */
.server-map-block { border-radius: var(--r-lg); overflow: hidden; }

.sm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
}
.sm-header .sh-title { font-size: 14px; font-weight: 700; }
.sm-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.world-map-wrap {
  position: relative;
  background: radial-gradient(ellipse at 50% 40%, #0d1e3a 0%, #060c18 60%, #03080f 100%);
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.world-map-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 49px, rgba(59,130,246,0.025) 49px, rgba(59,130,246,0.025) 50px
  ), repeating-linear-gradient(
    90deg, transparent, transparent 49px, rgba(59,130,246,0.025) 49px, rgba(59,130,246,0.025) 50px
  );
  pointer-events: none;
}

.world-map-svg { width: 100%; height: auto; display: block; }

/* Land masses */
.wm-land path, .wm-land polygon {
  fill: rgba(79,134,245,0.09);
  stroke: rgba(79,134,245,0.22);
  stroke-width: 0.6;
  stroke-linejoin: round;
  transition: fill 0.3s;
}

/* Connection lines between nodes */
.wm-arc {
  fill: none;
  stroke: rgba(79,134,245,0.25);
  stroke-width: 0.8;
  stroke-dasharray: 4 3;
  animation: arc-dash 3s linear infinite;
}
.wm-arc-active {
  stroke: rgba(79,134,245,0.6);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 3px rgba(79,134,245,0.5));
}
@keyframes arc-dash { to { stroke-dashoffset: -70; } }

/* Server pin node */
.wm-pin {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
  transform-origin: center center;
}
.wm-pin:hover { transform: scale(1.55); }
.wm-pin:hover .wm-pin-outer { opacity: 0.9; }

.wm-pin-outer {
  opacity: 0;
  animation: pin-appear 0.5s ease forwards, ring-expand 2.5s ease-out 0.5s infinite;
}
@keyframes pin-appear  { to { opacity: 1; } }
@keyframes ring-expand {
  0%   { r: 7;  opacity: 0.55; }
  70%  { r: 18; opacity: 0; }
  100% { r: 18; opacity: 0; }
}

.wm-pin-mid {
  animation: ring-expand2 2.5s ease-out 0.9s infinite;
}
@keyframes ring-expand2 {
  0%   { r: 4;  opacity: 0.4; }
  70%  { r: 12; opacity: 0; }
  100% { r: 12; opacity: 0; }
}

/* Node label */
.wm-node-label {
  font-size: 7.5px;
  font-family: 'Inter', 'SF Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-anchor: middle;
  dominant-baseline: auto;
  pointer-events: none;
  fill: #e2e8f0;
}

/* Tooltip */
.wm-tooltip {
  pointer-events: none;
  transition: opacity 0.15s;
}
.wm-tt-bg {
  fill: rgba(8,14,26,0.96);
  stroke: rgba(79,134,245,0.45);
  stroke-width: 0.8;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.wm-tt-name  { font-size: 8px; font-weight: 700; fill: #e2e8f0; dominant-baseline: hanging; text-anchor: start; }
.wm-tt-ping  { font-size: 7.5px; fill: #22C55E; dominant-baseline: hanging; text-anchor: start; font-family: monospace; }
.wm-tt-up    { font-size: 7px; fill: #94a3b8; dominant-baseline: hanging; text-anchor: start; }

/* Server list rows */
.server-list-wrap {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.server-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s, transform 0.18s, box-shadow 0.2s;
  cursor: default;
}
.server-row:hover {
  border-color: rgba(79,134,245,0.4);
  background: rgba(79,134,245,0.06);
  transform: translateX(3px);
  box-shadow: -2px 0 0 rgba(79,134,245,0.5);
}
.server-row.active-row {
  border-color: rgba(79,134,245,0.55);
  background: rgba(79,134,245,0.1);
  box-shadow: -2px 0 0 #4F86F5;
}

.server-node-id {
  font-size: 11px;
  font-weight: 800;
  color: #4F86F5;
  font-family: 'SF Mono', 'Fira Code', monospace;
  min-width: 58px;
  letter-spacing: 0.3px;
}
.server-flag { font-size: 17px; line-height: 1; flex-shrink: 0; }
.server-info { flex: 1; min-width: 0; }
.server-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-top: 1px; }
.server-uptime { display: inline-flex; align-items: center; gap: 3px; }
.server-uptime-dot { width: 5px; height: 5px; border-radius: 50%; background: #22C55E; display: inline-block; }
.server-uptime-dot.warn { background: #EAB308; }
.server-uptime-dot.down { background: #EF4444; }

.ping-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  min-width: 56px;
  text-align: center;
  font-family: 'SF Mono', monospace;
  transition: all 0.3s;
}
.ping-good  { background: rgba(34,197,94,0.1);  color: #22C55E; border: 1px solid rgba(34,197,94,0.25);  }
.ping-ok    { background: rgba(234,179,8,0.1);   color: #EAB308; border: 1px solid rgba(234,179,8,0.25);   }
.ping-bad   { background: rgba(239,68,68,0.1);   color: #EF4444; border: 1px solid rgba(239,68,68,0.25);   }
.ping-none  { background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid var(--border); }
.ping-spinning { display: inline-block; width: 9px; height: 9px; border: 1.5px solid rgba(59,130,246,0.3); border-top-color: #3B82F6; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; }
