/* ═══════════════════════════════════════════════════════════
   黑云加速 — HeiYun Theme
   Design system shared between landing page and user panel
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Orbitron:wght@400;700;900&display=swap');

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

:root {
  --void: #050510;
  --deep: #0a0a1a;
  --surface: #0d0d24;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-hi: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.06);
  --line-hi: rgba(255, 255, 255, 0.1);

  --blue: #0066ff;
  --blue-light: #3388ff;
  --blue-soft: #7ab0ff;
  --cyan: #00d4ff;
  --glow: rgba(0, 102, 255, 0.3);

  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;

  --text: #e8eaed;
  --text-dim: #8b8fa3;
  --text-mute: #5a5e72;
  --text-faint: #3a3e52;

  --grad-blue: linear-gradient(135deg, #0044cc, #0088ff);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;

  --sidebar-w: 236px;
  --header-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Ambient background orbs (gives the glass something to blur) ─── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle 500px at 15% 10%, rgba(0, 80, 255, 0.10) 0%, transparent 65%),
    radial-gradient(circle 420px at 85% 20%, rgba(0, 60, 200, 0.08) 0%, transparent 65%),
    radial-gradient(circle 380px at 70% 75%, rgba(0, 110, 255, 0.06) 0%, transparent 65%),
    radial-gradient(circle 300px at 8% 85%, rgba(0, 70, 220, 0.05) 0%, transparent 65%);
  animation: orb-drift 24s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  0%   { opacity: 0.75; transform: scale(1) translateY(0); }
  100% { opacity: 1;    transform: scale(1.08) translateY(-20px); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 102, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 0%, transparent 75%);
}

#app { position: relative; z-index: 1; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,102,255,.3); }

/* ═══ GLASS SURFACE ═══ */
.glass {
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(0,0,0,.05);
}

.card {
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.06);
  padding: 24px;
  transition: all .4s var(--ease);
}
.card:hover {
  background: var(--glass-hi);
  border-color: var(--line-hi);
  box-shadow:
    0 16px 48px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 40px rgba(0,102,255,.05);
}
.card--flat:hover { transform: none; }
.card-title {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .3s var(--ease);
  white-space: nowrap;
  line-height: 1.2;
}
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--grad-blue);
  color: #fff;
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 4px 18px rgba(0,102,255,.22), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0,102,255,.38), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--text-dim);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: rgba(0,102,255,.08);
  border-color: rgba(0,102,255,.25);
  color: var(--blue-soft);
}

.btn-danger {
  background: rgba(255,60,60,.08);
  border-color: rgba(255,60,60,.2);
  color: var(--err);
}
.btn-danger:hover { background: rgba(255,60,60,.14); border-color: rgba(255,60,60,.35); }

.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: 9px; }
.btn-lg { padding: 14px 32px; font-size: .95rem; border-radius: 14px; }
.btn-block { width: 100%; }

/* ═══ FORM ═══ */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 500;
}
.input, input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  transition: all .3s var(--ease);
  outline: none;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: rgba(0,102,255,.45);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 4px rgba(0,102,255,.07), 0 0 28px rgba(0,102,255,.06);
}
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8fa3' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select option { background: var(--surface); color: var(--text); }
.field-err { color: var(--err); font-size: .78rem; margin-top: 6px; }
.field-hint { color: var(--text-mute); font-size: .78rem; margin-top: 6px; line-height: 1.5; }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* ═══ TAGS / BADGES ═══ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: .74rem;
  font-weight: 500;
  background: rgba(0,102,255,.08);
  border: 1px solid rgba(0,102,255,.15);
  color: var(--blue-soft);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.tag-ok   { background: rgba(74,222,128,.08);  border-color: rgba(74,222,128,.18);  color: var(--ok); }
.tag-warn { background: rgba(251,191,36,.08);  border-color: rgba(251,191,36,.18);  color: var(--warn); }
.tag-err  { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.18); color: var(--err); }
.tag-mute { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--text-mute); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-ok  { background: var(--ok);  box-shadow: 0 0 8px rgba(74,222,128,.6); animation: pulse-dot 2.4s infinite; }
.dot-err { background: var(--err); box-shadow: 0 0 8px rgba(248,113,113,.5); }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ═══ PROGRESS ═══ */
.progress {
  height: 8px;
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0044cc, #0088ff, #00ccff);
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(0,102,255,.4);
  transition: width .8s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.progress-fill.is-warn { background: linear-gradient(90deg,#d97706,#fbbf24); box-shadow:0 0 16px rgba(251,191,36,.35); }
.progress-fill.is-err  { background: linear-gradient(90deg,#dc2626,#f87171); box-shadow:0 0 16px rgba(248,113,113,.35); }

/* ═══ TABLE ═══ */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(0,40,110,.22);
  color: var(--text-mute);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
thead th:first-child { border-radius: 10px 0 0 10px; }
thead th:last-child  { border-radius: 0 10px 10px 0; }
tbody td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.035);
  color: var(--text-dim);
  vertical-align: middle;
}
tbody tr { transition: background .25s; }
tbody tr:hover { background: rgba(0,102,255,.035); }
tbody tr:last-child td { border-bottom: none; }

/* ═══ EMPTY / LOADING ═══ */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-faint);
}
.empty svg { width: 44px; height: 44px; margin-bottom: 14px; opacity: .3; }
.empty p { font-size: .88rem; }
.empty .btn { margin-top: 18px; }

.spinner {
  width: 22px; height: 22px;
  border: 2px solid rgba(0,102,255,.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 56px; color: var(--text-mute); font-size: .88rem; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.03) 75%);
  background-size: 200% 100%;
  animation: sk 1.4s infinite;
  border-radius: 8px;
}
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ═══ TOAST ═══ */
#toasts {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: rgba(12,12,35,.9);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  font-size: .87rem;
  color: var(--text);
  min-width: 240px;
  max-width: 380px;
  pointer-events: auto;
  animation: toast-in .35s var(--ease);
}
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast-ok  { border-color: rgba(74,222,128,.25);  } .toast-ok svg  { color: var(--ok); }
.toast-err { border-color: rgba(248,113,113,.25); } .toast-err svg { color: var(--err); }
.toast-info svg { color: var(--blue-light); }
@keyframes toast-in  { from{opacity:0;transform:translateX(40px)} to{opacity:1;transform:none} }
@keyframes toast-out { to{opacity:0;transform:translateX(40px)} }

/* ═══ MODAL ═══ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(3,3,10,.75);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in .25s;
}
@keyframes fade-in { from{opacity:0} to{opacity:1} }
.modal {
  background: rgba(12,12,35,.85);
  backdrop-filter: blur(48px) saturate(1.6);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  width: 100%; max-width: 440px;
  max-height: 88vh; overflow-y: auto;
  animation: modal-in .35s var(--ease);
}
.modal.modal-lg { max-width: 620px; }
@keyframes modal-in { from{opacity:0;transform:translateY(24px) scale(.97)} to{opacity:1;transform:none} }
.modal-head {
  padding: 22px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 1.05rem; font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-mute); padding: 4px; line-height: 0;
  border-radius: 6px; transition: all .2s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.06); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 0 24px 22px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }

/* ═══════════════════════════════════════════════════════════
   APP SHELL (sidebar + header + content)
   ═══════════════════════════════════════════════════════════ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(9,9,26,.55);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .35s var(--ease);
}
.sidebar-brand {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  flex-shrink: 0;
}
.sidebar-brand svg { width: 28px; height: 28px; filter: drop-shadow(0 0 8px var(--glow)); }
.sidebar-brand span { font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  font-size: .68rem;
  color: var(--text-faint);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 14px 12px 7px;
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: .875rem;
  transition: all .25s var(--ease);
  position: relative;
  margin-bottom: 2px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { color: var(--text-dim); background: rgba(255,255,255,.04); }
.nav-item.active {
  color: var(--blue-light);
  background: rgba(0,102,255,.1);
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-item.active svg { color: var(--blue-light); }
.nav-badge {
  margin-left: auto;
  background: var(--blue);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.header {
  height: var(--header-h);
  background: rgba(9,9,26,.5);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 90;
}
.header-title { font-size: 1rem; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 14px; }
.header-user {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px;
  border-radius: 100px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .25s;
  font-size: .84rem;
  color: var(--text-dim);
}
.header-user:hover { border-color: rgba(0,102,255,.25); color: var(--text); }
.avatar {
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--grad-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content { padding: 26px; flex: 1; max-width: 1240px; width: 100%; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-dim); }
.nav-toggle svg { width: 20px; height: 20px; }
.sidebar-mask { display: none; }

/* ═══ PAGE HEADER ═══ */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 1.35rem; font-weight: 700; }
.page-head p { color: var(--text-mute); font-size: .85rem; margin-top: 5px; }

/* ═══ GRID ═══ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ═══ STAT ═══ */
.stat-val {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700;
  color: var(--blue-light);
  text-shadow: 0 0 24px var(--glow);
  line-height: 1.1;
}
.stat-label { font-size: .8rem; color: var(--text-mute); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════
   SUBSCRIPTION CARD (dashboard hero)
   ═══════════════════════════════════════════════════════════ */
.sub-card { position: relative; overflow: hidden; }
.sub-card::before {
  content: '';
  position: absolute; top: -60%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(0,102,255,.14), transparent 65%);
  pointer-events: none;
}
.sub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; }
.sub-plan { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.sub-expire { font-size: .85rem; color: var(--text-mute); }
.sub-meter { margin-top: 22px; position: relative; }
.sub-meter-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; font-size: .84rem; }
.sub-used { color: var(--text-dim); }
.sub-used b { font-family: var(--font-display); color: var(--text); font-size: 1.05rem; font-weight: 700; }
.sub-pct { font-family: var(--font-display); font-weight: 700; color: var(--blue-light); }
.sub-facts { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.sub-fact-k { font-size: .74rem; color: var(--text-faint); margin-bottom: 3px; }
.sub-fact-v { font-size: .9rem; color: var(--text-dim); font-weight: 500; }

/* ═══ SUBSCRIBE LINK BOX ═══ */
.sub-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .8rem;
  color: var(--text-dim);
  overflow: hidden;
}
.sub-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; }
.client-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all .3s var(--ease);
  color: var(--text-dim);
  font-size: .78rem;
  text-decoration: none;
  text-align: center;
}
.client-btn:hover {
  background: rgba(0,102,255,.07);
  border-color: rgba(0,102,255,.28);
  color: var(--blue-soft);
  transform: translateY(-2px);
}
.client-btn svg { width: 22px; height: 22px; }

/* ═══════════════════════════════════════════════════════════
   PRICING
   ═══════════════════════════════════════════════════════════ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 18px; }
.plan-card {
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 22px;
  transition: all .4s var(--ease);
  position: relative;
  display: flex; flex-direction: column;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--line-hi); box-shadow: 0 20px 56px rgba(0,0,0,.3), 0 0 40px rgba(0,102,255,.05); }
.plan-card.hot { border-color: rgba(0,102,255,.35); box-shadow: 0 0 44px rgba(0,102,255,.09); }
.plan-card.hot::before {
  content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 2px;
  background: var(--grad-blue); border-radius: 0 0 3px 3px;
}
.plan-hot-tag {
  position: absolute; top: 16px; right: 16px;
  background: var(--grad-blue); color: #fff;
  font-size: .68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .04em;
}
.plan-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.plan-price { margin-bottom: 18px; display: flex; align-items: baseline; gap: 2px; }
.plan-price .cur { font-size: 1.05rem; color: var(--text-mute); }
.plan-price .amt { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; letter-spacing: -.02em; }
.plan-price .per { font-size: .82rem; color: var(--text-mute); margin-left: 3px; }
.plan-feats { list-style: none; margin-bottom: 22px; flex: 1; }
.plan-feats li { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: .85rem; color: var(--text-dim); }
.plan-feats svg { width: 15px; height: 15px; color: var(--blue); flex-shrink: 0; }
.plan-periods { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.period-chip {
  padding: 5px 11px; border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--text-mute);
  font-size: .76rem; cursor: pointer;
  transition: all .25s;
}
.period-chip:hover { border-color: rgba(0,102,255,.3); color: var(--blue-soft); }
.period-chip.on { background: rgba(0,102,255,.12); border-color: rgba(0,102,255,.4); color: var(--blue-light); font-weight: 500; }

/* ═══ NODE LIST ═══ */
.node-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  background: rgba(255,255,255,.022);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: all .3s var(--ease);
}
.node-row:hover { background: rgba(0,102,255,.045); border-color: rgba(0,102,255,.2); }
.node-name { font-weight: 500; font-size: .9rem; }
.node-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.node-rate { margin-left: auto; font-family: var(--font-display); font-size: .88rem; color: var(--text-dim); flex-shrink: 0; }

/* ═══ TRAFFIC CHART ═══ */
.chart { width: 100%; height: 220px; display: block; overflow: visible; }
.chart-bar { transition: opacity .2s; cursor: pointer; }
.chart-bar:hover { opacity: .75; }
.chart-axis { font-size: 10px; fill: var(--text-faint); font-family: var(--font-body); }
.chart-legend { display: flex; gap: 18px; margin-bottom: 18px; font-size: .8rem; color: var(--text-mute); }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

/* ═══ TICKET ═══ */
.msg { display: flex; gap: 11px; margin-bottom: 16px; }
.msg.me { flex-direction: row-reverse; }
.msg-body {
  max-width: 74%;
  padding: 12px 15px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  font-size: .87rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.me .msg-body { background: rgba(0,102,255,.11); border-color: rgba(0,102,255,.2); }
.msg-time { font-size: .7rem; color: var(--text-faint); margin-top: 6px; }
.msg.me .msg-time { text-align: right; }

/* ═══ AUTH PAGES ═══ */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 400px; padding: 36px 32px; }
.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 8px; text-decoration: none; color: var(--text);
}
.auth-logo svg { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--glow)); }
.auth-logo span { font-size: 1.2rem; font-weight: 700; }
.auth-sub { text-align: center; color: var(--text-mute); font-size: .85rem; margin-bottom: 28px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: .84rem; color: var(--text-mute); }
.auth-foot a { color: var(--blue-light); text-decoration: none; }
.auth-foot a:hover { color: var(--cyan); }

/* ═══ MARKDOWN ═══ */
.md { line-height: 1.85; font-size: .9rem; color: var(--text-dim); }
.md h1, .md h2, .md h3 { color: var(--text); margin: 1.4em 0 .6em; font-weight: 600; }
.md h1 { font-size: 1.3rem; } .md h2 { font-size: 1.13rem; } .md h3 { font-size: 1rem; }
.md p { margin: .8em 0; }
.md a { color: var(--blue-light); text-decoration: none; }
.md a:hover { text-decoration: underline; }
.md ul, .md ol { margin: .8em 0 .8em 1.4em; }
.md li { margin: .35em 0; }
.md code {
  background: rgba(0,102,255,.1); padding: 2px 7px; border-radius: 5px;
  font-family: ui-monospace, Menlo, monospace; font-size: .85em; color: var(--blue-soft);
}
.md pre {
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
  padding: 14px 16px; border-radius: 12px; overflow-x: auto; margin: 1em 0;
}
.md pre code { background: none; padding: 0; color: var(--text-dim); }
.md blockquote { border-left: 3px solid var(--blue); padding-left: 14px; margin: 1em 0; color: var(--text-mute); }
.md img { max-width: 100%; border-radius: 10px; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 1.6em 0; }

/* ═══ UTIL ═══ */
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.dim { color: var(--text-mute); }
.faint { color: var(--text-faint); }
.small { font-size: .8rem; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.num { font-family: var(--font-display); font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.copy-ok { color: var(--ok) !important; }

/* ═══ QR ═══ */
.qr-box {
  background: #fff; padding: 14px; border-radius: 16px;
  display: inline-block; line-height: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.qr-box canvas, .qr-box svg { display: block; }

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════ */
.lp-nav { display: flex; gap: 26px; list-style: none; }
.lp-nav a {
  color: var(--text-dim); text-decoration: none; font-size: .88rem;
  position: relative; transition: color .25s;
}
.lp-nav a::after {
  content: ''; position: absolute; bottom: -5px; left: 0;
  width: 0; height: 2px; background: var(--blue); transition: width .3s ease;
}
.lp-nav a:hover { color: var(--text); }
.lp-nav a:hover::after { width: 100%; }

.lp-hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 110px clamp(16px, 6vw, 80px) 70px;
  position: relative; overflow: hidden;
}
.lp-hero-text { max-width: 600px; position: relative; z-index: 2; }
.lp-hero-art {
  position: absolute;
  right: clamp(-120px, 4vw, 60px);
  top: 50%; transform: translateY(-50%);
  width: clamp(300px, 44vw, 580px);
  height: clamp(300px, 44vw, 580px);
  z-index: 1; pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  /* art starts crowding the copy before the mobile breakpoint */
  .lp-hero-art { opacity: .32; right: -14vw; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 80px rgba(0,0,0,.6); }
  .sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 99; animation: fade-in .25s; }
  .main { margin-left: 0; }
  .nav-toggle { display: block; }
  .content { padding: 18px 16px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .header { padding: 0 16px; }
  .header-user span { display: none; }
  .sub-facts { gap: 18px; }
  .page-head h2 { font-size: 1.18rem; }
}

@media (max-width: 900px) {
  /* landing nav links can't fit next to the logo + CTA on a phone */
  .lp-nav { display: none; }
  .lp-hero {
    flex-direction: column; align-items: flex-start;
    min-height: auto; padding-top: 96px; padding-bottom: 40px;
  }
  .lp-hero-text { max-width: none; }
  .lp-hero-art {
    position: relative; right: auto; top: auto; transform: none;
    opacity: 1; width: 100%; height: 280px; margin-top: 24px;
  }
}

@media (max-width: 520px) {
  .card { padding: 18px; border-radius: 16px; }
  .plan-card { padding: 22px 18px; }
  .modal-foot { flex-direction: column; }
  .client-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  #toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; }
}
