/* ============================================================
   XVPN · 天蓝色设计系统（网站 / 会员中心 / 管理后台 共用）
   ============================================================ */
:root {
  color-scheme: light;
  --sky-50:#f0f9ff; --sky-100:#e0f2fe; --sky-200:#bae6fd; --sky-300:#7dd3fc;
  --sky-400:#38bdf8; --sky-500:#0ea5e9; --sky-600:#0284c7; --sky-700:#0369a1;
  --cyan-400:#22d3ee; --cyan-500:#06b6d4;
  --ink:#0f172a; --ink-2:#1e293b; --body:#334155; --muted:#64748b; --faint:#94a3b8;
  --line:#e2eaf2; --line-2:#dbe6f1;
  --bg:#eef6fd; --surface:#ffffff; --surface-2:#f7fbff;
  --ok:#10b981; --ok-bg:#dcfce7; --warn:#f59e0b; --warn-bg:#fef3c7;
  --bad:#ef4444; --bad-bg:#fee2e2; --slate-bg:#eef2f7;
  --grad: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  --grad-soft: linear-gradient(135deg, #e7f5ff, #d7ecff);
  --shadow-sm:0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow:0 8px 24px -10px rgba(2,132,199,.28), 0 4px 10px -6px rgba(15,23,42,.10);
  --shadow-lg:0 24px 60px -24px rgba(2,132,199,.45);
  --ring:0 0 0 4px rgba(56,189,248,.28);
  --r-sm:10px; --r:14px; --r-lg:20px; --r-xl:28px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:76px; }
body {
  margin:0; font-family:var(--font); color:var(--body); line-height:1.6;
  background:
    radial-gradient(1100px 600px at 88% -8%, #e3f3ff 0%, rgba(227,243,255,0) 60%),
    radial-gradient(900px 520px at -6% 0%, #e9f6ff 0%, rgba(233,246,255,0) 55%),
    var(--bg);
  min-height:100vh; -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4 { color:var(--ink); line-height:1.25; margin:0 0 .4em; font-weight:700; letter-spacing:-.01em; }
h1 { font-size:clamp(1.7rem, 1.1rem + 2.6vw, 2.85rem); }
h2 { font-size:clamp(1.3rem, 1rem + 1.4vw, 1.9rem); }
p { margin:0 0 1rem; }
a { color:var(--sky-600); text-decoration:none; }
a:hover { color:var(--sky-700); }
img { max-width:100%; display:block; }
small { font-size:.82rem; }
.mono { font-family:var(--mono); }
.muted { color:var(--muted); }
.faint { color:var(--faint); }
.center { text-align:center; }
.hidden { display:none !important; }
.nowrap { white-space:nowrap; }
.container { width:min(1180px, 92vw); margin-inline:auto; }
.row { display:flex; align-items:center; gap:.6rem; }
.row.wrap { flex-wrap:wrap; }
.between { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.spacer { flex:1; }
.stack { display:flex; flex-direction:column; gap:1rem; }

/* ---------- 顶栏 ---------- */
.site-header {
  position:sticky; top:0; z-index:30;
  backdrop-filter:saturate(180%) blur(14px);
  background:rgba(255,255,255,.78);
  border-bottom:1px solid var(--line);
}
.site-header .container { display:flex; align-items:center; justify-content:space-between; height:66px; gap:1rem; }
.brand { display:flex; align-items:center; gap:.6rem; font-weight:800; color:var(--ink); letter-spacing:-.02em; }
.brand .logo {
  width:38px; height:38px; border-radius:11px; background:var(--grad); color:#fff;
  display:grid; place-items:center; font-weight:800; font-size:1.15rem;
  box-shadow:0 6px 16px -6px rgba(14,165,233,.7);
}
.brand b { font-size:1.15rem; }
.brand small { display:block; font-size:.66rem; color:var(--muted); font-weight:600; letter-spacing:.14em; text-transform:uppercase; }
.nav { display:flex; align-items:center; gap:.25rem; }
.nav a { padding:.5rem .68rem; border-radius:var(--r-sm); color:var(--body); font-weight:600; font-size:.9rem; }
.nav a:hover { background:var(--sky-50); color:var(--sky-700); }
.nav a.active { background:var(--sky-100); color:var(--sky-700); }
.nav-toggle { display:none; }

/* ---------- 按钮 ---------- */
.btn {
  --b:var(--sky-600);
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.66rem 1.15rem; border-radius:999px; border:1px solid transparent;
  font:inherit; font-weight:700; font-size:.94rem; cursor:pointer; white-space:nowrap;
  transition:transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s; user-select:none;
}
.btn:active { transform:translateY(1px); }
.btn-primary { background:var(--grad); color:#fff; box-shadow:0 10px 22px -12px rgba(2,132,199,.85); }
.btn-primary:hover { color:#fff; box-shadow:0 14px 26px -12px rgba(2,132,199,.95); transform:translateY(-1px); }
.btn-outline { background:#fff; border-color:var(--line-2); color:var(--ink-2); }
.btn-outline:hover { border-color:var(--sky-300); background:var(--sky-50); color:var(--sky-700); }
.btn-ghost { background:transparent; color:var(--body); }
.btn-ghost:hover { background:var(--sky-50); color:var(--sky-700); }
.btn-danger { background:#fff; border-color:#fbcfd2; color:var(--bad); }
.btn-danger:hover { background:var(--bad-bg); }
.btn-sm { padding:.4rem .7rem; font-size:.82rem; border-radius:999px; }
.btn-block { width:100%; }
.btn[disabled] { opacity:.55; cursor:not-allowed; transform:none; }
.btn-icon { padding:.45rem; width:34px; height:34px; border-radius:10px; }

/* ---------- 卡片 / 面板 ---------- */
.card, .panel {
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); box-shadow:var(--shadow-sm);
}
.panel { padding:clamp(1.1rem, .8rem + 1vw, 1.7rem); }
.panel + .panel { margin-top:1.1rem; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.1rem; flex-wrap:wrap; }
.panel-head h2, .panel-head h3 { margin:0; }
.eyebrow { font-size:.74rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--sky-600); margin:0 0 .35rem; }
.hover-lift { transition:transform .15s ease, box-shadow .2s ease, border-color .2s; }
.hover-lift:hover { transform:translateY(-3px); box-shadow:var(--shadow); border-color:var(--sky-200); }

/* ---------- 网格 ---------- */
.grid { display:grid; gap:1.1rem; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(4,1fr); }
.grid-auto { grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); }

/* ---------- 徽章 / 状态 ---------- */
.badge { display:inline-flex; align-items:center; gap:.35rem; padding:.2rem .6rem; border-radius:999px; font-size:.76rem; font-weight:700; background:var(--slate-bg); color:var(--body); }
.badge .dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.badge-online { background:var(--ok-bg); color:#047857; }
.badge-offline { background:var(--bad-bg); color:#b91c1c; }
.badge-disabled { background:var(--slate-bg); color:var(--muted); }
.badge-warn { background:var(--warn-bg); color:#b45309; }
.badge-sky { background:var(--sky-100); color:var(--sky-700); }
.pill { display:inline-flex; align-items:center; gap:.4rem; padding:.32rem .7rem; border-radius:999px; background:var(--sky-50); border:1px solid var(--sky-100); color:var(--sky-700); font-size:.8rem; font-weight:700; }

/* ---------- 表单 ---------- */
.field { display:flex; flex-direction:column; gap:.38rem; margin-bottom:.95rem; }
.field > span, .field > label { font-size:.85rem; font-weight:700; color:var(--ink-2); }
.field .hint { font-size:.76rem; color:var(--muted); font-weight:500; }
input, select, textarea {
  width:100%; font:inherit; font-size:.95rem; color:var(--ink);
  padding:.62rem .8rem; border:1px solid var(--line-2); border-radius:var(--r-sm);
  background:#fff; transition:border-color .15s, box-shadow .15s;
}
textarea { resize:vertical; min-height:84px; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--sky-400); box-shadow:var(--ring); }
input::placeholder, textarea::placeholder { color:var(--faint); }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:0 1rem; }
.form-grid .full { grid-column:1 / -1; }
label.check { flex-direction:row; align-items:center; gap:.55rem; cursor:pointer; }
label.check input { width:auto; }

/* ---------- 提示条 ---------- */
.note { padding:.7rem .9rem; border-radius:var(--r-sm); font-size:.88rem; font-weight:600; }
.note-info { background:var(--sky-50); border:1px solid var(--sky-100); color:var(--sky-700); }
.note-ok { background:var(--ok-bg); color:#047857; }
.note-bad { background:var(--bad-bg); color:#b91c1c; }
.form-msg { min-height:1.2em; font-size:.86rem; font-weight:600; margin:.2rem 0 0; }
.form-msg.ok { color:#047857; } .form-msg.bad { color:var(--bad); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x:auto; border-radius:var(--r); border:1px solid var(--line); }
table.table { width:100%; border-collapse:collapse; font-size:.9rem; background:#fff; }
.table th, .table td { padding:.7rem .85rem; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; }
.table th { background:var(--surface-2); color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.05em; font-weight:800; position:sticky; top:0; }
.table tbody tr:hover { background:var(--sky-50); }
.table tbody tr:last-child td { border-bottom:none; }
.table .actions { display:flex; gap:.35rem; justify-content:flex-end; }

/* ---------- 进度条 ---------- */
.meter { height:9px; border-radius:999px; background:var(--sky-100); overflow:hidden; }
.meter > i { display:block; height:100%; border-radius:999px; background:var(--grad); transition:width .4s ease; }
.meter.warn > i { background:linear-gradient(135deg,#fbbf24,#f59e0b); }
.meter.bad > i { background:linear-gradient(135deg,#fb7185,#ef4444); }

/* ---------- 代码框 ---------- */
.codebox {
  font-family:var(--mono); font-size:.82rem; line-height:1.55; color:#0b3a55;
  background:var(--sky-50); border:1px solid var(--sky-100); border-radius:var(--r);
  padding:1rem; max-height:380px; overflow:auto; white-space:pre; tab-size:2;
}

/* ============================================================
   首页 / 营销站
   ============================================================ */
.hero { position:relative; padding:clamp(2.5rem, 2rem + 4vw, 5rem) 0 clamp(2rem, 1.5rem + 3vw, 3.5rem); overflow:hidden; }
.hero-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:2.5rem; align-items:center; }
.hero-glow { position:absolute; inset:auto; width:520px; height:520px; right:-120px; top:-120px;
  background:radial-gradient(closest-side, rgba(56,189,248,.34), rgba(56,189,248,0)); filter:blur(8px); z-index:0; }
.hero > .container { position:relative; z-index:1; }
.hero h1 span { background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero .lead { font-size:1.1rem; color:var(--body); max-width:38ch; }
.hero-actions { display:flex; gap:.7rem; flex-wrap:wrap; margin:1.4rem 0 1.1rem; }
.trust { display:flex; gap:1.4rem; flex-wrap:wrap; color:var(--muted); font-size:.86rem; font-weight:600; }
.trust b { color:var(--ink); }

.hero-card {
  background:linear-gradient(160deg,#ffffff, #f3fbff); border:1px solid var(--sky-100);
  border-radius:var(--r-xl); padding:1.4rem; box-shadow:var(--shadow-lg); position:relative;
}
.hero-card .glass-row { display:flex; align-items:center; justify-content:space-between; padding:.85rem 1rem; border-radius:var(--r); background:#fff; border:1px solid var(--line); box-shadow:var(--shadow-sm); margin-bottom:.7rem; }
.hero-card .glass-row:last-child { margin-bottom:0; }
.node-dot { width:10px; height:10px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 4px rgba(16,185,129,.18); }

.section { padding:clamp(2.2rem, 1.6rem + 3vw, 4rem) 0; }
.section-head { text-align:center; max-width:640px; margin:0 auto 2rem; }
.section-head.compact { margin-bottom:1.4rem; }
.section-head h2 { margin-bottom:.4rem; }
.section-soft { background:rgba(255,255,255,.42); border-block:1px solid rgba(226,234,242,.65); }

.help-layout { display:grid; grid-template-columns:1.25fr .75fr; gap:1.1rem; align-items:stretch; }
.help-panel { display:flex; flex-direction:column; gap:1.2rem; }
.step-list, .mini-steps { list-style:none; margin:0; padding:0; display:grid; gap:.8rem; counter-reset:steps; }
.step-list li, .mini-steps li { position:relative; padding:.2rem 0 .2rem 3rem; counter-increment:steps; min-height:42px; }
.step-list li::before, .mini-steps li::before {
  content:counter(steps);
  position:absolute; left:0; top:0; width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center; background:var(--sky-100); color:var(--sky-700);
  font-weight:800; border:1px solid var(--sky-200);
}
.step-list b, .mini-steps b { display:block; color:var(--ink); margin-bottom:.12rem; }
.step-list span, .mini-steps span { display:block; color:var(--muted); font-size:.9rem; line-height:1.5; }
.help-actions { display:flex; gap:.7rem; flex-wrap:wrap; margin-top:auto; }
.guide-stack { display:grid; gap:1.1rem; }
.guide-card { padding:1.25rem; display:flex; flex-direction:column; gap:.45rem; }
.guide-card h3 { margin:.1rem 0 0; font-size:1.05rem; }
.guide-card p { margin:0; color:var(--muted); font-size:.9rem; }

.download-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1.1rem; }
.download-card { padding:1.25rem; display:flex; flex-direction:column; justify-content:space-between; gap:1.1rem; min-height:220px; }
.download-card h3 { margin:.55rem 0 .3rem; font-size:1.08rem; }
.download-card p { margin:0; color:var(--muted); font-size:.9rem; }
.download-card .btn { align-self:flex-start; }

.renew-band {
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem; flex-wrap:wrap;
  padding:1.5rem; border:1px solid var(--sky-100); border-radius:var(--r-lg);
  background:linear-gradient(135deg,#fff,#eef8ff); box-shadow:var(--shadow-sm);
}
.renew-band h2 { margin-bottom:.35rem; }
.renew-band p:not(.eyebrow) { margin:0; color:var(--muted); max-width:62ch; }
.renew-actions { display:flex; gap:.7rem; flex-wrap:wrap; }

.feature { padding:1.4rem; }
.feature .ic { width:46px; height:46px; border-radius:13px; background:var(--grad-soft); color:var(--sky-600); display:grid; place-items:center; margin-bottom:.9rem; }
.feature .ic svg { width:24px; height:24px; }
.feature h3 { font-size:1.08rem; margin-bottom:.3rem; }
.feature p { margin:0; font-size:.92rem; color:var(--muted); }

/* 套餐卡 */
.plan { padding:1.5rem; display:flex; flex-direction:column; position:relative; }
.plan.popular { border-color:var(--sky-300); box-shadow:var(--shadow); }
.plan .tag-pop { position:absolute; top:-12px; right:18px; background:var(--grad); color:#fff; padding:.25rem .7rem; border-radius:999px; font-size:.72rem; font-weight:800; box-shadow:var(--shadow-sm); }
.plan h3 { font-size:1.15rem; margin-bottom:.2rem; }
.plan .price { font-size:2.1rem; font-weight:800; color:var(--ink); letter-spacing:-.02em; }
.plan .price small { font-size:.85rem; color:var(--muted); font-weight:600; }
.plan ul { list-style:none; padding:0; margin:1rem 0 1.3rem; display:flex; flex-direction:column; gap:.55rem; }
.plan li { display:flex; gap:.5rem; align-items:flex-start; font-size:.9rem; color:var(--body); }
.plan li::before { content:""; flex:none; width:18px; height:18px; margin-top:1px; border-radius:50%; background:var(--sky-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan .btn { margin-top:auto; }

/* 节点卡 */
.node-card { padding:1.1rem 1.2rem; display:flex; flex-direction:column; gap:.7rem; }
.node-card .top { display:flex; align-items:center; justify-content:space-between; gap:.6rem; }
.node-card .name { font-weight:700; color:var(--ink); }
.node-card .geo { font-size:.82rem; color:var(--muted); }
.node-card .stats { display:flex; gap:1.1rem; font-size:.82rem; color:var(--muted); }
.node-card .stats b { color:var(--ink-2); font-weight:700; }
.node-card .protos { display:flex; gap:.35rem; flex-wrap:wrap; }

.site-footer { border-top:1px solid var(--line); padding:2rem 0; color:var(--muted); font-size:.88rem; margin-top:2rem; }
.site-footer .container { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }

/* ============================================================
   认证卡（会员/后台登录注册）
   ============================================================ */
.auth-wrap { min-height:calc(100vh - 66px); display:grid; place-items:center; padding:2rem 1rem; }
.auth-card { width:min(412px,100%); padding:1.9rem 1.7rem 1.5rem; }
.auth-card .brand { justify-content:center; gap:.55rem; margin-bottom:.1rem; }
.auth-card .brand .logo { width:44px; height:44px; border-radius:13px; font-size:1.3rem; }
.auth-card .brand b { font-size:1.25rem; }
.auth-sub { text-align:center; color:var(--muted); font-size:.86rem; margin:.55rem 0 0; }
.auth-tabs { display:flex; gap:.25rem; background:var(--sky-50); border:1px solid var(--sky-100); padding:.28rem; border-radius:999px; margin:1.15rem 0 1.25rem; }
.auth-tabs button { flex:1; padding:.55rem; border:none; background:transparent; border-radius:999px; font:inherit; font-weight:700; font-size:.95rem; color:var(--muted); cursor:pointer; transition:.15s; }
.auth-tabs button.active { background:#fff; color:var(--sky-700); box-shadow:var(--shadow-sm); }
.auth-card form { display:flex; flex-direction:column; }
.auth-card .field { margin-bottom:.78rem; gap:.32rem; }
.auth-card .field > label, .auth-card .field > span { font-size:.82rem; }
.auth-card input { padding:.64rem .85rem; }
.auth-card .btn-block { margin-top:.55rem; padding:.72rem; font-size:1rem; }
.auth-foot { text-align:center; font-size:.8rem; color:var(--muted); margin:1rem 0 0; line-height:1.5; }

/* ============================================================
   会员中心
   ============================================================ */
.portal { padding:1.6rem 0 3rem; }
.portal-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.2rem; }
.portal-head .who h1 { font-size:1.5rem; margin:0; }
.portal-shortcuts { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin:0 0 1.1rem; }
.portal-shortcut { padding:1rem 1.1rem; display:flex; flex-direction:column; gap:.1rem; color:var(--body); transition:.15s; }
.portal-shortcut:hover { transform:translateY(-2px); border-color:var(--sky-200); box-shadow:var(--shadow); color:var(--body); }
.portal-shortcut span { font-size:.78rem; color:var(--sky-700); font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.portal-shortcut b { color:var(--ink); font-size:.98rem; }
.stat-card { padding:1.1rem 1.25rem; }
.stat-card .label { font-size:.78rem; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.stat-card .value { font-size:1.7rem; font-weight:800; color:var(--ink); letter-spacing:-.02em; margin-top:.15rem; }
.stat-card .value small { font-size:.8rem; color:var(--muted); font-weight:600; }
.sub-box { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.sub-box input { flex:1; min-width:200px; font-family:var(--mono); font-size:.84rem; background:var(--sky-50); }
.sub-import-panel { display:flex; gap:.9rem; align-items:center; margin:.8rem 0 .2rem; padding:.8rem; border:1px solid var(--line); border-radius:var(--r); background:var(--surface-2); }
.sub-qr { width:132px; height:132px; flex:none; display:grid; place-items:center; padding:7px; background:#fff; border:1px solid var(--line); border-radius:var(--r-sm); }
.sub-qr svg { width:100%; height:100%; display:block; }
.sub-import-copy { display:flex; flex-direction:column; gap:.25rem; font-size:.88rem; color:var(--muted); }
.sub-import-copy b { color:var(--ink); font-size:.96rem; }
.import-row { display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.9rem; }
.mini-steps { gap:.65rem; }
.mini-steps li { padding-left:2.65rem; }
.mini-steps li::before { width:30px; height:30px; font-size:.88rem; }
.download-list { display:flex; flex-direction:column; gap:.55rem; }
.download-list a { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.7rem .8rem; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface-2); color:var(--body); }
.download-list a:hover { border-color:var(--sky-300); background:var(--sky-50); color:var(--body); }
.download-list b { color:var(--ink); }
.download-list span { color:var(--muted); font-size:.82rem; text-align:right; }
.download-list.compact a { align-items:flex-start; }
#qr { width:172px; height:172px; background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:8px; }
#qr svg, #qr canvas { width:100%; height:100%; }

/* ============================================================
   管理后台
   ============================================================ */
.admin-shell { display:grid; grid-template-columns:248px 1fr; min-height:100vh; }
.sidebar { background:linear-gradient(180deg,#0b4a73,#0a3a5c); color:#cfe8f8; padding:1.2rem 1rem; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; gap:.3rem; }
.sidebar .brand { color:#fff; margin-bottom:1.3rem; padding:0 .4rem; }
.sidebar .brand small { color:#9fd3ef; }
.sidebar .brand .logo { background:rgba(255,255,255,.16); box-shadow:none; }
.side-link { display:flex; align-items:center; gap:.7rem; padding:.62rem .8rem; border-radius:var(--r-sm); color:#bfe2f6; font-weight:600; font-size:.94rem; cursor:pointer; border:none; background:transparent; width:100%; text-align:left; transition:.15s; }
.side-link svg { width:19px; height:19px; opacity:.9; }
.side-link:hover { background:rgba(255,255,255,.09); color:#fff; }
.side-link.active { background:var(--grad); color:#fff; box-shadow:0 8px 18px -10px rgba(0,0,0,.6); }
.side-foot { margin-top:auto; font-size:.78rem; color:#8fc4e3; padding:.5rem .4rem 0; border-top:1px solid rgba(255,255,255,.12); }
.admin-main { padding:1.6rem clamp(1rem, .5rem + 1.5vw, 2.2rem); overflow:auto; }
.admin-topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.4rem; flex-wrap:wrap; }
.admin-topbar h1 { font-size:1.5rem; margin:0; }
.view { display:none; }
.view.active { display:block; animation:fade .25s ease; }
@keyframes fade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.kpi { padding:1.2rem 1.3rem; display:flex; flex-direction:column; gap:.2rem; position:relative; overflow:hidden; }
.kpi .label { font-size:.8rem; color:var(--muted); font-weight:700; }
.kpi .num { font-size:2rem; font-weight:800; color:var(--ink); letter-spacing:-.02em; }
.kpi .ic { position:absolute; right:14px; top:14px; width:40px; height:40px; border-radius:12px; background:var(--grad-soft); color:var(--sky-600); display:grid; place-items:center; }
.kpi .ic svg { width:22px; height:22px; }
/* 节点监控 · 单节点整框（左身份 + CPU/内存图 + 带宽K线图 + 连接） */
#view-pulse .panel { padding:clamp(.7rem, .55rem + .7vw, 1rem); }
#view-pulse .panel-head { gap:.5rem; margin-bottom:.55rem; }
#pulseSummary { gap:.55rem; }
.pulse-nodes { display:grid; gap:.5rem; margin-top:.5rem; }
.pulse-node {
  display:grid; grid-template-columns:minmax(204px,228px) minmax(0,1fr) minmax(0,1fr) auto;
  gap:.5rem; align-items:stretch;
  padding:.55rem .65rem; border:1px solid var(--line);
  border-radius:var(--r); background:var(--surface); box-shadow:var(--shadow-sm);
  transition:border-color .15s ease, box-shadow .2s ease;
}
.pulse-node:hover { border-color:var(--sky-200); box-shadow:var(--shadow); }
.pulse-node.load-70 { background:#fffbeb; border-color:#fde68a; }
.pulse-node.load-80 { background:#fff7ed; border-color:#fed7aa; }
.pulse-node.load-90 { background:#fef2f2; border-color:#fecaca; }
.pulse-node.load-70:hover { border-color:#facc15; }
.pulse-node.load-80:hover { border-color:#fb923c; }
.pulse-node.load-90:hover { border-color:#f87171; }
.pn-id { display:flex; flex-direction:column; gap:.3rem; min-width:0; }
.pn-name { font-weight:800; color:var(--ink); font-size:1.02rem; line-height:1.25; }
.pn-host { font-size:.8rem; color:var(--muted); word-break:break-all; margin-top:.1rem; }
.pn-tags { display:flex; flex-wrap:wrap; gap:.18rem; align-items:center; }
.pn-protos { display:flex; flex-direction:column; gap:.08rem; }
/* 图表面板：单层框，canvas 直接贴在框内（去掉内层边框） */
.pn-panel { display:flex; flex-direction:column; min-width:0; padding:.45rem .55rem .38rem; border:1px solid var(--line); border-radius:var(--r-sm); background:#fff; }
.pn-panel-head { display:flex; align-items:center; justify-content:space-between; gap:.25rem; flex-wrap:wrap; margin-bottom:.25rem; }
.pn-panel-title { font-size:.82rem; font-weight:800; color:var(--ink-2); }
.pn-metrics { display:flex; flex-wrap:wrap; gap:.25rem; justify-content:flex-end; }
.pn-panel canvas { width:100%; height:112px; display:block; background:transparent; border:none; }
.pn-legend { color:var(--faint); font-size:.72rem; text-align:right; margin-top:.18rem; }
.pn-action { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:.3rem; min-width:82px; }
.pn-connection-btn { min-width:72px; padding-inline:.72rem; }
.pn-connection-btn.has-connections { border-color:var(--sky-200); background:var(--sky-50); color:var(--sky-700); }
.pn-action-status { display:flex; flex-direction:column; align-items:center; gap:.15rem; }
.pn-action-meta { width:100%; padding:.35rem .4rem; border:1px dashed var(--line); border-radius:var(--r-sm); color:var(--muted); font-size:.76rem; line-height:1.3; text-align:center; background:var(--surface-2); }
.pn-action-meta b { color:var(--ink-2); font-weight:800; }
.pn-node-users { width:100%; padding:.34rem .4rem; border:1px solid var(--sky-100); border-radius:var(--r-sm); background:var(--sky-50); color:var(--sky-700); font-size:.74rem; line-height:1.2; text-align:center; }
.pn-node-users span { display:block; color:var(--muted); font-weight:700; }
.pn-node-users b { display:block; color:var(--sky-700); font-size:1rem; line-height:1.1; }
@media (max-width:1080px) {
  .pulse-node { grid-template-columns:1fr 1fr; }
  .pn-id, .pn-action { grid-column:1 / -1; }
  .pn-action { flex-direction:row; justify-content:flex-start; align-items:center; }
  .pn-action-status { flex-direction:row; }
  .pn-action-meta { width:auto; min-width:180px; text-align:left; }
  .pn-node-users { width:auto; min-width:86px; }
}
@media (max-width:680px) { .pulse-node { grid-template-columns:1fr; } }

/* ---------- 模态框 ---------- */
.modal-backdrop { position:fixed; inset:0; background:rgba(8,30,52,.5); backdrop-filter:blur(3px); display:grid; place-items:center; z-index:60; padding:1rem; animation:fade .2s ease; }
.modal { width:min(640px,100%); max-height:90vh; overflow:auto; background:#fff; border-radius:var(--r-lg); box-shadow:var(--shadow-lg); }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:1.1rem 1.4rem; border-bottom:1px solid var(--line); position:sticky; top:0; background:#fff; z-index:1; }
.modal-head h3 { margin:0; }
.modal-body { padding:1.3rem 1.4rem; }
.modal-foot { display:flex; justify-content:flex-end; gap:.6rem; padding:1rem 1.4rem; border-top:1px solid var(--line); position:sticky; bottom:0; background:#fff; }
.modal .close { border:none; background:var(--slate-bg); width:34px; height:34px; border-radius:10px; cursor:pointer; color:var(--muted); font-size:1.1rem; }
.modal .close:hover { background:var(--bad-bg); color:var(--bad); }
.modal fieldset { border:1px solid var(--line); border-radius:var(--r); padding:1rem; margin:0 0 1rem; }
.modal legend { font-weight:800; font-size:.85rem; color:var(--sky-700); padding:0 .4rem; }

/* ---------- Toast ---------- */
.toast-wrap { position:fixed; right:18px; bottom:18px; z-index:80; display:flex; flex-direction:column; gap:.5rem; }
.toast { padding:.75rem 1rem; border-radius:var(--r); background:#fff; box-shadow:var(--shadow-lg); border-left:4px solid var(--sky-500); font-weight:600; font-size:.9rem; min-width:220px; animation:slidein .25s ease; }
.toast.ok { border-color:var(--ok); } .toast.bad { border-color:var(--bad); } .toast.warn { border-color:var(--warn); }
@keyframes slidein { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

.empty { text-align:center; padding:2.5rem 1rem; color:var(--muted); }
.empty .ic { font-size:2rem; margin-bottom:.4rem; }

/* ---------- 支付 / 结算 ---------- */
.pay-methods { display:flex; flex-direction:column; gap:.6rem; }
.pay-method { display:flex; align-items:center; gap:.8rem; padding:.85rem 1rem; border:1px solid var(--line-2); border-radius:var(--r); cursor:pointer; transition:.15s; background:#fff; text-align:left; font:inherit; width:100%; }
.pay-method:hover { border-color:var(--sky-300); background:var(--sky-50); }
.pay-method .pm-ic { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; font-weight:800; color:#fff; flex:none; font-size:.8rem; }
.pay-method .pm-ic.alipay { background:#1677ff; }
.pay-method .pm-ic.usdt { background:#26a17b; }
.pay-method .pm-main { flex:1; }
.pay-method .pm-main b { display:block; }
.pay-qr { display:grid; place-items:center; padding:.8rem; background:#fff; border:1px solid var(--line); border-radius:var(--r); margin:0 auto .9rem; width:max-content; }
.pay-qr svg { width:210px; height:210px; display:block; }
.pay-amount { font-size:1.7rem; font-weight:800; color:var(--sky-700); letter-spacing:-.01em; }
.pay-amount .cur { font-size:.9rem; color:var(--muted); font-weight:700; }
.pay-row { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.6rem .8rem; background:var(--sky-50); border:1px solid var(--sky-100); border-radius:var(--r-sm); margin-bottom:.55rem; }
.pay-row .k { color:var(--muted); font-size:.82rem; flex:none; }
.pay-row .v { font-family:var(--mono); font-weight:700; word-break:break-all; text-align:right; }
.countdown { font-variant-numeric:tabular-nums; font-weight:800; color:var(--warn); }
.pay-tip { font-size:.82rem; color:var(--muted); margin:.4rem 0 0; }

/* ---------- 响应式 ---------- */
@media (max-width:980px) {
  .hero-grid { grid-template-columns:1fr; }
  .hero-card { order:-1; }
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .grid-3 { grid-template-columns:repeat(2,1fr); }
  .help-layout { grid-template-columns:1fr; }
  .download-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:900px) {
  .nav { position:fixed; inset:66px 0 auto 0; flex-direction:column; align-items:stretch; gap:0; background:#fff; border-bottom:1px solid var(--line); padding:.5rem; box-shadow:var(--shadow); transform:translateY(-130%); transition:transform .25s ease; }
  .nav.open { transform:none; }
  .nav a { padding:.8rem 1rem; }
  .nav-toggle { display:inline-grid; place-items:center; width:40px; height:40px; border-radius:10px; border:1px solid var(--line-2); background:#fff; cursor:pointer; }
}
@media (max-width:720px) {
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns:1fr; }
  .download-grid, .portal-shortcuts { grid-template-columns:1fr; }
  .renew-band { align-items:flex-start; }
  .download-card { min-height:0; }
  .sub-import-panel { align-items:flex-start; flex-direction:column; }
  .admin-shell { grid-template-columns:1fr; }
  .sidebar { position:fixed; z-index:50; width:260px; left:0; top:0; transform:translateX(-105%); transition:transform .25s ease; }
  .sidebar.open { transform:none; }
  .admin-main { padding-top:1rem; }
  .mobile-only { display:inline-flex !important; }
}
.mobile-only { display:none; }
@media (min-width:721px) { .desktop-hide { display:none; } }
