/* ============================================================
   Nebula Theme — 现代极简星空 · 玻璃拟态 + 极光渐变
   ============================================================ */

:root {
  --bg: #070a14;
  --bg-2: #0b0f1f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1fb;
  --text-2: #a3adc9;
  --text-3: #66708f;
  --primary: #7c6cff;
  --primary-2: #22d3ee;
  --primary-3: #a855f7;
  --accent: linear-gradient(135deg, #7c6cff 0%, #a855f7 50%, #22d3ee 100%);
  --accent-soft: linear-gradient(135deg, rgba(124,108,255,0.22), rgba(168,85,247,0.16) 55%, rgba(34,211,238,0.18));
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.14);
  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 40px -8px var(--glow-color, rgba(124,108,255,0.35));
  --sidebar-w: 264px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

/* theme color variants */
[data-color="blue"]   { --primary: #3b82f6; --primary-2: #38bdf8; --primary-3: #6366f1; --accent: linear-gradient(135deg,#2563eb,#3b82f6,#38bdf8); --glow-color: rgba(59,130,246,.4); }
[data-color="purple"] { --primary: #8b5cf6; --primary-2: #a855f7; --primary-3: #6366f1; --accent: linear-gradient(135deg,#7c3aed,#a855f7,#ec4899); --glow-color: rgba(139,92,246,.4); }
[data-color="green"]  { --primary: #10b981; --primary-2: #34d399; --primary-3: #14b8a6; --accent: linear-gradient(135deg,#059669,#10b981,#2dd4bf); --glow-color: rgba(16,185,129,.4); }
[data-color="orange"] { --primary: #f59e0b; --primary-2: #fb923c; --primary-3: #f97316; --accent: linear-gradient(135deg,#ea580c,#f59e0b,#fbbf24); --glow-color: rgba(245,158,11,.4); }
[data-color="pink"]   { --primary: #ec4899; --primary-2: #f472b6; --primary-3: #d946ef; --accent: linear-gradient(135deg,#db2777,#ec4899,#f472b6); --glow-color: rgba(236,72,153,.4); }

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- aurora background ---------- */
#aurora-bg {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(1200px 800px at 15% -10%, rgba(124,108,255,0.16), transparent 60%),
              radial-gradient(1000px 700px at 90% 0%, rgba(34,211,238,0.10), transparent 55%),
              radial-gradient(900px 900px at 50% 120%, rgba(168,85,247,0.12), transparent 60%),
              var(--bg);
}
#aurora-bg .blob {
  position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
  will-change: transform;
  animation: float 26s ease-in-out infinite;
}
#aurora-bg .blob.b1 { width: 520px; height: 520px; top: -140px; left: -100px; background: rgba(124,108,255,0.35); }
#aurora-bg .blob.b2 { width: 460px; height: 460px; top: 18%; right: -140px; background: rgba(34,211,238,0.24); animation-delay: -9s; }
#aurora-bg .blob.b3 { width: 540px; height: 540px; bottom: -180px; left: 28%; background: rgba(168,85,247,0.26); animation-delay: -17s; }
#aurora-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}
#aurora-bg .stars {
  position: absolute; inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.8), transparent),
                    radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.6), transparent),
                    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,0.5), transparent),
                    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.7), transparent),
                    radial-gradient(1.5px 1.5px at 10% 85%, rgba(255,255,255,0.5), transparent),
                    radial-gradient(1px 1px at 55% 10%, rgba(255,255,255,0.6), transparent);
}

/* ---------- bing wallpaper ---------- */
.bing-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(4, 6, 18, 0.72);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 40%, rgba(0,0,0,0.65) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 40%, rgba(0,0,0,0.65) 100%);
}
body.has-bing #aurora-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.has-bing #aurora-bg .blob,
body.has-bing #aurora-bg .stars,
body.has-bing #aurora-bg .grid { display: none; }

/* text readability on background images */
body.has-bing .content .page-head h1 { text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 1px 4px rgba(0,0,0,0.5); }
body.has-bing .auth-card .auth-logo h1 { text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
body.has-bing .hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,0.6); }
body.has-bing .sidebar .brand .brand-name { text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
body.has-bing .topbar .page-title { text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
body.has-bing .stat-val { text-shadow: 0 1px 6px rgba(0,0,0,0.4); }

/* stronger glass for background images */
body.has-bing .sidebar { background: rgba(6, 8, 20, 0.82); backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%); }
body.has-bing .topbar { background: rgba(6, 8, 20, 0.82); backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%); }
body.has-bing .pub-nav { background: rgba(6, 8, 20, 0.82); backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%); }
body.has-bing .auth-card { background: rgba(8, 12, 26, 0.82); backdrop-filter: blur(32px) saturate(160%); -webkit-backdrop-filter: blur(32px) saturate(160%); }
body.has-bing .card { background: rgba(10, 14, 30, 0.65); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-color: rgba(255,255,255,0.12); }
body.has-bing .card.popular { background: rgba(12, 16, 34, 0.7); }
body.has-bing .input, body.has-bing .select, body.has-bing .textarea { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
body.has-bing .modal { background: rgba(10, 14, 30, 0.88); }
body.has-bing .toast { background: rgba(8, 12, 26, 0.92); }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, 40px) scale(1.08); }
  66% { transform: translate(-40px, 30px) scale(0.95); }
}

/* ---------- layout ---------- */
#app { min-height: 100vh; }
.layout { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 50;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  background: rgba(9, 12, 24, 0.7);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: transform .3s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 6px 20px -6px var(--glow-color, rgba(124,108,255,.5));
  color: #fff;
}
.brand .logo svg { width: 22px; height: 22px; }
.brand .brand-name { font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand .brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .4px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.nav .nav-label { font-size: 10.5px; letter-spacing: 1.2px; color: var(--text-3); padding: 14px 12px 6px; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--text-2);
  font-weight: 500; font-size: 14.5px;
  transition: all .18s ease; position: relative;
}
.nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active {
  color: #fff; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}
.nav a.active svg { opacity: 1; }
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 4px; background: var(--accent);
}
.nav .badge {
  margin-left: auto; font-size: 10.5px; padding: 1px 8px; border-radius: 20px;
  background: var(--danger-bg); color: var(--danger); font-weight: 600;
}

.sidebar-footer { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sidebar-footer .sf-user { display: flex; align-items: center; gap: 10px; }
.sidebar-footer .avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sidebar-footer .sf-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .sf-email { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main {
  flex: 1; margin-left: var(--sidebar-w); min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 32px;
  background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-size: 17px; font-weight: 700; }
.topbar .page-sub { font-size: 12.5px; color: var(--text-3); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer;
  transition: all .18s ease; flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.menu-btn { display: none; }

.content { padding: 28px 32px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }
.content .page-head { margin-bottom: 24px; }
.content .page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.content .page-head p { color: var(--text-2); margin-top: 4px; font-size: 14px; }

/* ---------- components ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.card.hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card .card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.card .card-title svg { width: 17px; height: 17px; color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 14.5px; font-weight: 600; letter-spacing: .2px;
  transition: all .18s ease; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  color: #fff; background: var(--accent); background-size: 160% 160%;
  box-shadow: 0 8px 24px -8px var(--glow-color, rgba(124,108,255,.55));
}
.btn-primary:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 12px 30px -8px var(--glow-color, rgba(124,108,255,.6)); }
.btn-ghost { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #ef4444, #f87171); box-shadow: 0 8px 24px -8px rgba(239,68,68,.45); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-glow { position: relative; overflow: hidden; }
.btn-glow::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg); animation: shimmer 3.2s infinite;
}
@keyframes shimmer { 0% { left: -80%; } 55% { left: 130%; } 100% { left: 130%; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font); font-size: 14.5px;
  outline: none; transition: all .18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,108,255,0.16);
  background: var(--surface-3);
}
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a3adc9' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: var(--warning-bg); color: var(--warning); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-neutral { background: var(--surface-3); color: var(--text-2); }

.tag {
  display: inline-flex; padding: 2px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--accent-soft); color: var(--primary-2); border: 1px solid rgba(255,255,255,0.08);
}

/* progress ring */
.ring-wrap { position: relative; width: 132px; height: 132px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-track { stroke: var(--surface-3); }
.ring-wrap .ring-bar {
  stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.4,0,.2,1);
}
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center .pct { font-size: 22px; font-weight: 800; }
.ring-center .lbl { font-size: 11px; color: var(--text-3); }

.progress { height: 8px; background: var(--surface-3); border-radius: 20px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 20px; background: var(--accent); transition: width .6s ease; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card .stat-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--primary-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}
.stat-card .stat-ico svg { width: 22px; height: 22px; }
.stat-card .stat-val { font-size: 20px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; }
.stat-card .stat-lbl { font-size: 12.5px; color: var(--text-3); }

/* table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th {
  text-align: left; font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.table td { padding: 13px 14px; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table td .strong { color: var(--text); font-weight: 600; }

/* lists */
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item .li-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); color: var(--primary-2);
}
.list-item .li-ico svg { width: 20px; height: 20px; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14.5px; }
.list-item .li-sub { font-size: 12.5px; color: var(--text-3); }
.list-item .li-right { text-align: right; flex-shrink: 0; }

.empty {
  text-align: center; padding: 56px 20px; color: var(--text-3);
}
.empty .empty-ico { font-size: 44px; margin-bottom: 12px; opacity: .8; }
.empty p { font-size: 14px; }

/* grid */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

/* plan cards */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.plan-card { display: flex; flex-direction: column; padding: 26px; }
.plan-card .plan-name { font-size: 17px; font-weight: 800; }
.plan-card .plan-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.plan-card .plan-price-row { margin: 18px 0 4px; }
.plan-card .plan-price { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.plan-card .plan-price .cur { font-size: 17px; font-weight: 700; color: var(--primary-2); margin-right: 3px; }
.plan-card .plan-price .per { font-size: 13px; color: var(--text-3); font-weight: 500; }
.plan-card .plan-periods { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.period-btn {
  padding: 7px 13px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600;
  transition: all .16s ease; font-family: var(--font);
}
.period-btn:hover { border-color: var(--border-strong); color: var(--text); }
.period-btn.active {
  background: var(--accent-soft); color: #fff; border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 4px 14px -4px var(--glow-color);
}
.plan-card .plan-content { flex: 1; color: var(--text-2); font-size: 13.5px; }
.plan-card .plan-content p { margin: 6px 0; }
.plan-card .plan-content ul { list-style: none; margin: 6px 0; }
.plan-card .plan-content li { position: relative; padding-left: 22px; margin: 7px 0; }
.plan-card .plan-content li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--success); font-weight: 800; font-size: 13px;
}
.plan-card .plan-cta { margin-top: 18px; }
.plan-card.popular {
  border-color: var(--border-strong);
  background: linear-gradient(160deg, rgba(124,108,255,0.13), rgba(34,211,238,0.07) 60%, var(--surface));
}
.plan-card.popular::before {
  content: "推荐"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 2px 14px; border-radius: 20px; background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 6px 16px -4px var(--glow-color, rgba(124,108,255,.5));
}

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 430px; padding: 38px 34px; border-radius: 22px;
  background: rgba(11, 15, 30, 0.75);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow);
}
.auth-card .auth-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-card .auth-logo .logo {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 10px 30px -8px var(--glow-color, rgba(124,108,255,.5));
}
.auth-card .auth-logo .logo svg { width: 30px; height: 30px; }
.auth-card .auth-logo h1 { font-size: 20px; font-weight: 800; }
.auth-card .auth-logo p { font-size: 13px; color: var(--text-3); }
.auth-tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; padding: 9px; border: none; background: transparent; color: var(--text-2);
  font-family: var(--font); font-size: 14px; font-weight: 600; border-radius: 9px; cursor: pointer; transition: all .18s ease;
}
.auth-tabs button.active { background: var(--surface-3); color: #fff; box-shadow: inset 0 0 0 1px var(--border-strong); }
.auth-link { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 16px; }
.auth-link a { color: var(--primary-2); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }
.auth-foot { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 18px; }

/* notice / message feed */
.feed-item { padding: 16px 4px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: none; }
.feed-item .fi-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.feed-item .fi-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.feed-item .fi-body { color: var(--text-2); font-size: 13.5px; }
.feed-item .fi-body img { max-width: 100%; border-radius: 10px; }
.feed-item .fi-body a { color: var(--primary-2); }

/* chat (tickets) */
.chat-bubble { display: flex; gap: 10px; margin: 14px 0; }
.chat-bubble .cb-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.chat-bubble .cb-content { max-width: 78%; }
.chat-bubble .cb-msg { padding: 11px 15px; border-radius: 14px; font-size: 14px; }
.chat-bubble .cb-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.chat-bubble.me { flex-direction: row-reverse; }
.chat-bubble.me .cb-content { display: flex; flex-direction: column; align-items: flex-end; }
.chat-bubble.me .cb-msg { background: var(--accent-soft); border: 1px solid rgba(255,255,255,0.08); color: var(--text); }
.chat-bubble.other .cb-msg { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

/* modal */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 6, 12, 0.7); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: all .22s ease;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 500px; max-height: 86vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 26px; box-shadow: var(--shadow);
  transform: translateY(16px) scale(.97); transition: transform .22s ease;
}
.modal-mask.open .modal { transform: translateY(0) scale(1); }
.modal .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal .modal-title { font-size: 17px; font-weight: 700; }

/* toast */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 340px;
  padding: 12px 16px; border-radius: 13px; font-size: 13.5px; font-weight: 500;
  background: rgba(15, 19, 36, 0.95); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(12px);
  animation: toastIn .25s ease; 
}
.toast.out { animation: toastOut .25s ease forwards; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 45%, var(--surface-2) 65%); background-size: 400% 100%; animation: sk 1.4s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* code / copy */
.copy-box { display: flex; align-items: center; gap: 10px; }
.copy-box .input { font-family: var(--mono); font-size: 13px; }
.copy-btn { flex-shrink: 0; }

/* loading screen */
.loading-screen { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--bg); transition: opacity .35s ease, visibility .35s ease; }
.loading-screen.hide { opacity: 0; visibility: hidden; }
.loader { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 10%, var(--primary-2) 60%, var(--primary-3)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* section titles in dashboard */
.section-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; margin: 26px 0 14px; }
.section-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--glow-color, rgba(124,108,255,.6)); }

/* qr */
.qr-img { border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 8px; }
.qr-img img { display: block; width: 160px; height: 160px; }

/* node chips */
.node-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); margin: 3px; }
.node-chip .dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.node-chip .dot-offline { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

/* misc */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.flex-1 { flex: 1; min-width: 0; } .text-right { text-align: right; }
.muted-link { color: var(--primary-2); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.muted-link:hover { text-decoration: underline; }
kbd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-family: var(--mono); color: var(--text-2); }

/* public nav */
.pub-nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(7,10,20,0.72); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.pub-nav .brand { padding: 0; }
.pub-nav .nav-links { display: flex; gap: 6px; margin-left: 18px; }
.pub-nav .nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: all .16s ease; }
.pub-nav .nav-links a:hover, .pub-nav .nav-links a.active { color: var(--text); background: var(--surface-2); }
.pub-nav .spacer { flex: 1; }

.hero { padding: 46px 0 30px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.hero h1 .grad { background: var(--accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-2); margin: 14px auto 0; max-width: 560px; font-size: 15.5px; }

/* responsive */
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .content { padding: 20px 18px 60px; }
  .topbar { padding: 12px 18px; }
  .pub-nav { padding: 12px 16px; }
  .pub-nav .nav-links { margin-left: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(4,6,12,0.6); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: all .25s ease; }
.scrim.open { opacity: 1; visibility: visible; }

::selection { background: rgba(124,108,255,0.4); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--primary-2)); border-radius: 9px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--primary-2), var(--primary-3)); }

/* ============================================================
   Dynamic Enhancements — 动态效果增强
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.95) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gradShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 8px 24px -8px var(--glow-color, rgba(124,108,255,.45)); } 50% { box-shadow: 0 10px 48px -6px var(--glow-color, rgba(124,108,255,.85)); } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sweep { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(320%) skewX(-18deg); } }

/* content entrance — 内容入场 */
.content > * { animation: fadeUp .55s cubic-bezier(.22,1,.36,1) both; }
.content > *:nth-child(2) { animation-delay: .07s; }
.content > *:nth-child(3) { animation-delay: .14s; }
.content > *:nth-child(4) { animation-delay: .21s; }
.content > *:nth-child(5) { animation-delay: .28s; }
.content > *:nth-child(6) { animation-delay: .35s; }
.content > *:nth-child(n+7) { animation-delay: .42s; }
.a-in { animation: fadeUp .5s cubic-bezier(.22,1,.36,1) both; }

.auth-card { animation: zoomIn .55s cubic-bezier(.22,1,.36,1) both; }

/* gradient flowing text — 渐变流动文字 */
.grad-text {
  background: var(--accent);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 6s ease infinite;
}
.brand .brand-name {
  background: var(--accent);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 8s ease infinite;
}
.hero h1 .grad { background-size: 220% 220%; animation: gradShift 6s ease infinite; }

/* button pulse glow — 主按钮呼吸光晕 */
.btn-primary.pulse { animation: pulseGlow 2.6s ease-in-out infinite; }
.btn-primary.pulse:hover { animation-play-state: paused; }

/* brand logo float — Logo 悬浮 */
.brand .logo { animation: floatY 5s ease-in-out infinite; }
.auth-card .auth-logo .logo { animation: floatY 5s ease-in-out infinite; }

/* card hover — 卡片悬停增强 */
.card.hover:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.08), 0 16px 44px -12px var(--glow-color, rgba(124,108,255,.4)); }
.stat-card:hover .stat-ico { transform: scale(1.12) rotate(-5deg); }
.stat-card .stat-ico { transition: transform .25s cubic-bezier(.22,1,.36,1); }
.plan-card { transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease; will-change: transform; }
.plan-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.08), 0 20px 60px -14px var(--glow-color, rgba(124,108,255,.45)); }
.plan-card .period-btn { transition: transform .16s ease; }
.plan-card .period-btn:hover { transform: translateY(-2px); }

/* nav sweep shine — 导航悬停流光 */
.nav a { position: relative; overflow: hidden; }
.nav a::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-120%) skewX(-18deg);
  transition: transform .7s ease;
  pointer-events: none;
}
.nav a:hover::after { transform: translateX(320%) skewX(-18deg); }

/* section title glow dot — 标题光点呼吸 */
.section-title .dot { animation: pulseGlow 2.4s ease-in-out infinite; }

/* progress bar shimmer — 进度条流光 */
.progress { position: relative; overflow: hidden; }
.progress > div::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-120%) skewX(-18deg);
  animation: sweep 2.6s ease-in-out infinite;
}

/* back to top — 返回顶部 */
.back-top {
  position: fixed; right: 22px; bottom: 24px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border-strong); cursor: pointer;
  background: rgba(12, 16, 34, 0.82); backdrop-filter: blur(14px);
  color: var(--text-2); display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: all .35s cubic-bezier(.22,1,.36,1);
  box-shadow: var(--shadow-sm);
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: #fff; background: var(--accent); box-shadow: 0 10px 30px -8px var(--glow-color, rgba(124,108,255,.6)); }
.back-top svg { width: 20px; height: 20px; }

/* toast slide — Toast 滑入强化 */
.toast { animation: toastIn .3s cubic-bezier(.22,1,.36,1); }

/* modal — 弹窗缩放强化 */
.modal { transform: translateY(20px) scale(.94); }

/* responsive tweaks */
@media (prefers-reduced-motion: reduce) {
  .content > *, .auth-card, .card, .btn, .brand .logo, .nav a::after, .progress > div::after, .hero h1 .grad { animation: none !important; transition: none !important; }
}