:root {
  --bg-base: #030712;
  --bg-elevated: rgba(13, 19, 34, 0.72);
  --bg-card: rgba(15, 23, 42, 0.62);
  --bg-card-hover: rgba(20, 30, 54, 0.78);
  --bg-input: rgba(6, 10, 20, 0.75);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-glow: rgba(56, 189, 248, 0.42);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

/* AMBIENT CYBER MESH CANVAS */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 25%, #000 35%, transparent 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.42;
  animation: orbDrift 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 540px;
  height: 540px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45), rgba(99, 102, 241, 0.15));
}

.orb-2 {
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: -140px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.38), rgba(56, 189, 248, 0.12));
  animation-delay: -7s;
}

.orb-3 {
  width: 340px;
  height: 340px;
  top: 42%;
  left: 42%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 70%);
  animation-delay: -12s;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(28px, -22px) scale(1.08); }
}

.hidden { display: none !important; }
.small { font-size: 0.84rem; }
.muted { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* SURFACE & SPECULAR GLASS */
.surface {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 45px -16px rgba(0, 0, 0, 0.7);
}

.surface-hero {
  background: linear-gradient(155deg, rgba(17, 26, 48, 0.88), rgba(9, 14, 28, 0.85));
  border-color: rgba(56, 189, 248, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 60px -20px rgba(34, 211, 238, 0.25),
    0 24px 50px -15px rgba(0, 0, 0, 0.75);
}

/* BRAND MARK */
.brand-badge {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}
.brand-badge.sm { width: 36px; height: 36px; border-radius: 10px; }

/* AUTH SPLIT LANDING */
.auth-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-layout {
  width: 100%;
  max-width: 1060px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.auth-showcase {
  display: none;
  padding: 28px;
}

.showcase-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.showcase-title {
  margin: 0 0 14px;
  font-size: 2.35rem;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 24px;
  max-width: 460px;
}

/* LIVE TOPOLOGY SVG CARD */
.topology-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(6, 10, 22, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 18px;
}

.topology-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.topology-svg {
  width: 100%;
  height: 112px;
  display: block;
}

.tunnel-flow {
  stroke-dasharray: 6 6;
  animation: flowDash 1.4s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -24; }
}

.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-metric {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}
.mini-metric .mm-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.mini-metric .mm-lbl {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* AUTH VAULT CARD */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.45), rgba(99, 102, 241, 0.25), rgba(255, 255, 255, 0.06));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.brand-header h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-header p { margin: 2px 0 0; font-size: 0.85rem; color: var(--text-secondary); }

.tg-vault-box {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  overflow: hidden;
}
#telegram-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 28px;
}

.tg-fallback-hint {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}
.divider span { padding: 0 12px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  background: rgba(6, 10, 20, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 16px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.22));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* FORM CONTROLS */
.auth-form, .stack-form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }

input, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.94rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
input:focus, select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.row-input { display: flex; gap: 8px; align-items: stretch; }
.row-input > input, .row-input > select { flex: 1; min-width: 0; }

/* BUTTONS */
.btn {
  position: relative;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn.full { width: 100%; }

.btn.primary {
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn.primary:hover {
  box-shadow: 0 12px 28px -6px rgba(56, 189, 248, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-primary);
}
.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(56, 189, 248, 0.35);
}

.btn.danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.btn.sm { padding: 7px 12px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* MAIN SHELL */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 14px 108px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 18px;
  gap: 12px;
  border-radius: 18px;
}

.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 6px; }
.net-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.user-badge {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-nav {
  display: none;
  gap: 4px;
  background: rgba(6, 10, 20, 0.55);
  padding: 4px;
  border-radius: 13px;
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
}
.nav-btn svg { width: 16px; height: 16px; }
.nav-btn:hover { color: var(--text-primary); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(99, 102, 241, 0.2));
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* PANELS & BENTO GRID */
.tab-panel { animation: panelIn 0.24s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card { padding: 20px; margin-bottom: 14px; }
.card h2, .card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 svg, .card h3 svg { width: 20px; height: 20px; color: var(--sky); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h2 { margin: 0; }

.bento-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* SUBSCRIPTION GAUGE & KEY VAULT */
.sub-hero-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sub-ring-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.ring-svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(148, 163, 184, 0.14); stroke-width: 7; }
.ring-fill { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.7s ease; }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-num { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 800; line-height: 1; }
.ring-unit { font-size: 0.68rem; color: var(--text-secondary); margin-top: 2px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-pill.ok { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.status-pill.warn { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.35); color: #fcd34d; }
.status-pill.bad { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.35); color: #fda4af; }

.key-vault {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(6, 10, 20, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.copy-box { display: flex; gap: 8px; margin-top: 6px; }
.copy-box input { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan); }

/* NODE TELEMETRY CARDS */
.node-list { display: flex; flex-direction: column; gap: 10px; }
.node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}
.node-left { display: flex; align-items: center; gap: 12px; }
.flag-chip {
  width: 34px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.flag-de span:nth-child(1) { flex: 1; background: #111827; }
.flag-de span:nth-child(2) { flex: 1; background: #dc2626; }
.flag-de span:nth-child(3) { flex: 1; background: #facc15; }
.flag-pl span:nth-child(1) { flex: 1; background: #f8fafc; }
.flag-pl span:nth-child(2) { flex: 1; background: #e11d48; }

.node-name { font-weight: 700; font-size: 0.92rem; }
.node-proto { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); }
.ping-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 8px;
  border-radius: 8px;
}

/* QUICK OS LAUNCHER */
.os-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.os-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.16s ease;
}
.os-chip:hover {
  border-color: var(--sky);
  background: rgba(56, 189, 248, 0.1);
}
.os-chip svg { width: 18px; height: 18px; color: var(--sky); }

/* PRICING MATRIX */
.banner {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.35);
  margin-bottom: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.plan-card {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.65);
}

.plan-card.featured {
  background: linear-gradient(160deg, rgba(22, 34, 64, 0.9), rgba(13, 19, 36, 0.85));
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 0 36px -14px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.plan-title { font-weight: 800; font-size: 1.08rem; }
.plan-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.plan-tag.vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 179, 8, 0.15));
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

.plan-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.plan-price { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 800; color: #fff; }
.plan-orig { font-family: var(--font-mono); text-decoration: line-through; color: var(--text-muted); font-size: 0.95rem; }
.plan-per-month { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.plan-disc { font-size: 0.8rem; color: #6ee7b7; font-weight: 600; margin-top: 4px; }

/* STATS & REFERRALS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.stat-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
}
.stat-tile .lbl { font-size: 0.76rem; color: var(--text-secondary); }
.stat-tile .val { font-family: var(--font-mono); font-size: 1.18rem; font-weight: 800; margin-top: 4px; }

.milestone-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.ms-step {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(6, 10, 20, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-step.done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.09);
}
.ms-step.next {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.09);
  box-shadow: 0 0 20px -8px rgba(56, 189, 248, 0.45);
}
.ref-progress-wrap {
  margin-top: 14px;
}
.ref-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.ref-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.ref-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--emerald));
  transition: width 0.5s ease;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.ms-count { font-family: var(--font-mono); font-size: 0.74rem; color: var(--cyan); font-weight: 700; }
.ms-reward { font-size: 0.84rem; font-weight: 700; }

/* HELP & CHAT */
.pill-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill-btn.active {
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  border-color: var(--sky);
}

.instruction-body, .acc-body {
  background: rgba(6, 10, 20, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 15px;
  font-size: 0.92rem;
}

.acc-item { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; }
.acc-head {
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-box {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(6, 10, 20, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.chat-msg { padding: 9px 13px; border-radius: 12px; max-width: 85%; font-size: 0.9rem; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.25)); border: 1px solid rgba(56, 189, 248, 0.3); }
.chat-msg.admin { align-self: flex-start; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border-subtle); }
.chat-ts { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; font-family: var(--font-mono); }

.list-box { display: flex; flex-direction: column; gap: 8px; max-height: 330px; overflow-y: auto; }
.list-item {
  padding: 10px 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
}

/* MOBILE FLOATING DOCK */
.mobile-nav {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-around;
  padding: 6px;
  z-index: 60;
  border-radius: 20px;
  background: rgba(9, 14, 28, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

.mnav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 13px;
  transition: all 0.16s ease;
}
.mnav-btn svg { width: 19px; height: 19px; }
.mnav-btn.active {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.14);
}

/* TOASTS */
#toast-container {
  position: fixed;
  bottom: 84px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  #toast-container { bottom: 24px; right: 24px; }
}
.toast {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--sky);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
.toast.err { border-color: var(--rose); }

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .mobile-nav { display: none; }
  .app-shell { padding: 20px 24px 36px; }
  .bento-hero { grid-template-columns: 1.45fr 1fr; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .milestone-track { grid-template-columns: repeat(3, 1fr); }
  .os-quick-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 960px) {
  .auth-layout { grid-template-columns: 1.15fr 0.85fr; gap: 36px; }
  .auth-showcase { display: block; }
}
