/* ==========================================================================
   VPNLinks 节点控制台样式
   主题：蓝紫渐变 + 白色卡片
   说明：纯原生 CSS，无外部字体与图标依赖，保证国内加载稳定。
   ========================================================================== */

:root {
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --purple: #8b5cf6;
  --ink: #0b1220;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-light: #8b99ad;
  --line: #e7ebf5;
  --line-soft: #eef2fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --page: #f6f8fe;
  --green: #22c55e;
  --red: #ef4444;
  --gradient: linear-gradient(120deg, #2563eb 0%, #4f46e5 48%, #8b5cf6 100%);
  --gradient-deep: linear-gradient(120deg, #1d4ed8 0%, #4338ca 46%, #7c3aed 100%);
  --shadow-card: 0 18px 50px rgba(30, 64, 175, 0.06);
  --shadow-hero: 0 32px 80px rgba(37, 60, 160, 0.24);
  --radius-lg: 28px;
  --radius-md: 20px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

::selection {
  color: #fff;
  background: rgba(79, 70, 229, 0.82);
}

:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 2px;
}

/* ==========================================================================
   通用品牌标识与按钮
   ========================================================================== */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  filter: drop-shadow(0 6px 12px rgba(79, 70, 229, 0.2));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 19px;
}

.brand-slash {
  width: 1px;
  height: 15px;
  margin: 0 1px;
  background: #d8deea;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-soft {
  color: #4338ca;
  background: #fff;
  border: 1px solid #e4e8f8;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.03);
}

.btn-soft:hover {
  background: #f7f8ff;
  border-color: #cfd6f7;
}

.btn-quiet {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}

.btn-quiet:hover {
  color: #4338ca;
  background: #f1f3fe;
}

/* ==========================================================================
   登录页背景
   ========================================================================== */

.auth-page {
  background: #f7f9ff;
}

.auth-bg {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(78px);
  opacity: 0.55;
}

.orb-one {
  top: -210px;
  right: -100px;
  width: 560px;
  height: 560px;
  background: rgba(99, 102, 241, 0.28);
}

.orb-two {
  bottom: -260px;
  left: -180px;
  width: 600px;
  height: 600px;
  background: rgba(59, 130, 246, 0.2);
}

.orb-three {
  top: 32%;
  left: 40%;
  width: 340px;
  height: 340px;
  background: rgba(168, 85, 247, 0.13);
}

.noise-layer {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image: linear-gradient(rgba(79, 70, 229, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 68%);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 24px;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 6px 24px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.04);
  backdrop-filter: blur(10px);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.status-dot::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: inherit;
  animation: softPing 2.4s ease-out infinite;
}

@keyframes softPing {
  0% {
    opacity: 0.7;
    transform: scale(0.7);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* ==========================================================================
   登录卡片
   ========================================================================== */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  width: 100%;
  max-width: 1080px;
  min-height: 604px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  box-shadow: 0 36px 100px rgba(47, 64, 150, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.03);
  animation: shellEnter 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes shellEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 50px 50px 34px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 80% 6%, rgba(255, 255, 255, 0.2), transparent 34%),
    radial-gradient(circle at 6% 100%, rgba(56, 189, 248, 0.22), transparent 42%),
    linear-gradient(145deg, #1d4ed8 0%, #4338ca 45%, #7c3aed 100%);
  isolation: isolate;
}

.auth-visual::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.58;
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
}

.auth-visual::after {
  position: absolute;
  z-index: -1;
  top: -140px;
  right: -150px;
  width: 390px;
  height: 390px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.035),
    0 0 0 108px rgba(255, 255, 255, 0.025);
}

.visual-glow {
  position: absolute;
  right: -30px;
  bottom: -90px;
  width: 330px;
  height: 330px;
  background: rgba(96, 165, 250, 0.24);
  border-radius: 50%;
  filter: blur(70px);
}

.visual-content {
  position: relative;
  z-index: 2;
  max-width: 410px;
}

.visual-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.visual-eyebrow svg {
  width: 14px;
  height: 14px;
}

.auth-visual h1 {
  margin: 30px 0 16px;
  font-size: clamp(38px, 4.2vw, 51px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.045em;
}

.auth-visual h1 span {
  color: #dbeafe;
}

.visual-lead {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.75;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #e0e7ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}

.feature-icon svg {
  width: 19px;
  height: 19px;
}

.feature-list strong,
.feature-list small {
  display: block;
}

.feature-list strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 13.5px;
  font-weight: 700;
}

.feature-list small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}

.visual-route {
  position: absolute;
  right: -20px;
  bottom: 36px;
  left: -20px;
  z-index: 1;
  opacity: 0.95;
}

.visual-route svg {
  width: 100%;
  height: 220px;
}

.visual-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11.5px;
  font-weight: 650;
}

.location-badge span {
  font-size: 14px;
}

.visual-tech {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.visual-tech i {
  display: inline-block;
  width: 2px;
  height: 2px;
  margin: 0 5px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 50%;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 52px 50px;
  background: #fff;
}

.eyebrow,
.section-kicker {
  color: #6366f1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-card-head h2 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.notice,
.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  border-radius: 12px;
}

.notice {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
}

.alert {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fee2e2;
}

.notice svg,
.alert svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.login-form {
  margin-top: 24px;
}

.field {
  display: block;
  margin-top: 18px;
}

.field:first-of-type {
  margin-top: 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  height: 52px;
  align-items: center;
  overflow: hidden;
  background: #f8faff;
  border: 1.5px solid #e6ecf8;
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
  background: #fff;
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-left: 16px;
  color: #97a3b8;
}

.input-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 14px;
  color: var(--ink);
  font-size: 14.5px;
  background: transparent;
  border: 0;
  outline: 0;
}

.input-wrap input::placeholder {
  color: #a7b1c2;
}

.password-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  margin-right: 5px;
  padding: 0;
  color: #97a3b8;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.password-toggle:hover {
  color: #4f46e5;
  background: #eef2ff;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.btn-login {
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
  font-size: 14.5px;
}

.btn-login svg {
  width: 19px;
  height: 19px;
  transition: transform 0.2s ease;
}

.btn-login:hover svg {
  transform: translateX(3px);
}

.auth-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  color: #94a3b8;
  font-size: 10.5px;
}

.auth-security svg {
  width: 14px;
  height: 14px;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 1080px;
  margin: 22px auto 0;
  color: #94a3b8;
  font-size: 11px;
}

.footer-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: #cbd5e1;
  border-radius: 50%;
}

/* ==========================================================================
   控制台骨架
   ========================================================================== */

.dashboard-page {
  min-height: 100vh;
  background: #f6f8fe;
  padding-bottom: 34px;
}

.dash-bg {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.dash-orb-one {
  top: -160px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: rgba(99, 102, 241, 0.13);
}

.dash-orb-two {
  bottom: -240px;
  left: -160px;
  width: 560px;
  height: 560px;
  background: rgba(56, 189, 248, 0.09);
}

.topbar-shell {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(247, 249, 255, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
}

.topbar {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  height: 76px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #e7ecf6;
  border-radius: 999px;
}

.secure-pill svg {
  width: 13px;
  height: 13px;
  color: #22c55e;
}

.logout-form {
  display: flex;
  margin: 0;
}

.btn-logout {
  gap: 6px;
}

.btn-logout svg {
  width: 16px;
  height: 16px;
}

.dash-main {
  position: relative;
  z-index: 1;
}

.dash-container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* ==========================================================================
   渐变 Hero
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 46px;
  align-items: center;
  margin-top: 30px;
  padding: 48px 50px;
  overflow: hidden;
  color: #fff;
  background: var(--gradient-deep);
  border-radius: 32px;
  box-shadow: var(--shadow-hero);
  isolation: isolate;
  animation: heroEnter 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 74% 100%, rgba(196, 181, 253, 0.22), transparent 42%);
  pointer-events: none;
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: -220px;
  right: -120px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 66px rgba(255, 255, 255, 0.035),
    0 0 0 132px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(circle at 32% 46%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 32% 46%, #000 0%, transparent 72%);
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-one {
  top: 32%;
  left: 47%;
  width: 110px;
  height: 110px;
}

.hero-orbit-two {
  bottom: -90px;
  left: 30%;
  width: 210px;
  height: 210px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.status-ping {
  position: relative;
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12);
}

.is-online .status-ping::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(74, 222, 128, 0.45);
  border-radius: inherit;
  animation: softPing 2.4s ease-out infinite;
}

.status-chip.is-offline {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.22);
}

.status-chip.is-offline .status-ping {
  background: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.hero h1 {
  margin: 22px 0 14px;
  font-size: clamp(38px, 5vw, 55px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: #dbeafe;
}

.hero-lead {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.71);
  font-size: 14px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-stat {
  min-width: 124px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.hero-stat-label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hero-stat strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 12.5px;
  font-weight: 700;
}

/* Hero 二维码面板 */
.qr-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 300px;
  justify-self: end;
  padding: 19px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  box-shadow: 0 24px 60px rgba(21, 24, 84, 0.28);
  backdrop-filter: blur(12px);
}

.qr-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qr-brand {
  color: #6d28d9;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.qr-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
}

.qr-ready span {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.qr-frame {
  position: relative;
  display: grid;
  margin: 13px 0 15px;
  padding: 13px;
  place-items: center;
  background: #fff;
  border: 1px solid #edf0f8;
  border-radius: 17px;
}

.qr-frame img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.qr-corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border-color: #6366f1;
  border-style: solid;
  opacity: 0.7;
}

.qr-corner-tl {
  top: 7px;
  left: 7px;
  border-width: 1.5px 0 0 1.5px;
  border-radius: 4px 0 0;
}

.qr-corner-tr {
  top: 7px;
  right: 7px;
  border-width: 1.5px 1.5px 0 0;
  border-radius: 0 4px 0 0;
}

.qr-corner-bl {
  bottom: 7px;
  left: 7px;
  border-width: 0 0 1.5px 1.5px;
  border-radius: 0 0 0 4px;
}

.qr-corner-br {
  right: 7px;
  bottom: 7px;
  border-width: 0 1.5px 1.5px 0;
  border-radius: 0 0 4px;
}

.qr-panel h2 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.qr-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.qr-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: #4f46e5;
  font-size: 11.5px;
  font-weight: 750;
}

.qr-download svg {
  width: 15px;
  height: 15px;
}

.qr-download:hover {
  color: #6d28d9;
}

/* ==========================================================================
   详情与导入卡片
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(340px, 0.74fr);
  gap: 22px;
  margin-top: 22px;
}

.card {
  min-width: 0;
  padding: 29px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.icon-tile {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: #4f46e5;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #e6eaff;
  border-radius: 14px;
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

.icon-tile-purple {
  color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border-color: #ede9fe;
}

.card-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 6px 10px;
  color: #15803d;
  font-size: 10.5px;
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 999px;
}

.mini-status i,
.meta-status i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.mini-status.is-offline {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fee2e2;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 23px;
}

.detail-item {
  min-width: 0;
  padding: 13px 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 15px;
}

.detail-item.span-2 {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  color: #8b99ad;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-value {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 4px;
}

.detail-value code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1e293b;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.detail-value-long code {
  padding-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
}

.break-all {
  word-break: break-all;
}

.tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #4f46e5;
  font-size: 9px;
  font-weight: 750;
  background: #eef2ff;
  border-radius: 999px;
}

.copy-btn {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: #98a4b8;
  background: #fff;
  border: 1px solid #e9edf7;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.copy-btn svg {
  width: 15px;
  height: 15px;
}

.copy-btn:hover {
  color: #4f46e5;
  background: #f5f6ff;
  border-color: #d9def7;
}

.copy-btn-wide {
  display: inline-flex;
  width: auto;
  height: 29px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 700;
}

.copy-btn-wide svg {
  width: 14px;
  height: 14px;
}

.node-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 17px;
  padding: 11px 13px;
  color: #6b7280;
  font-size: 10.5px;
  line-height: 1.6;
  background: #fbfcff;
  border: 1px dashed #e4e9f5;
  border-radius: 12px;
}

.node-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #818cf8;
}

/* 导入客户端 */
.import-card {
  display: flex;
  flex-direction: column;
}

.client-block {
  margin-top: 19px;
  padding: 17px;
  background: #f9faff;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
}

.client-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.client-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
}

.client-icon svg {
  width: 23px;
  height: 23px;
}

.client-icon-clash {
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.client-icon-sr {
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
}

.client-title {
  min-width: 0;
}

.client-title h3 {
  margin: 0;
  color: #1e293b;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.client-title p {
  margin: 2px 0 0;
  color: #8491a6;
  font-size: 10.5px;
  line-height: 1.55;
}

.btn-download {
  width: 100%;
  min-height: 46px;
  margin-top: 15px;
  font-size: 13px;
}

.client-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 11px 0 0;
  color: #94a3b8;
  font-size: 9.5px;
}

.client-hint span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #6366f1;
  font-size: 8.5px;
  font-weight: 800;
  background: #eef2ff;
  border-radius: 50%;
}

.client-hint i {
  width: 2px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 50%;
}

.client-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  color: #a5b0c1;
  font-size: 9.5px;
}

.client-divider::before,
.client-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: #eef1f8;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}

.client-actions .btn {
  min-height: 36px;
  padding: 0 11px;
  font-size: 10.5px;
  border-radius: 10px;
}

.client-actions .btn svg {
  width: 14px;
  height: 14px;
}

.link-quiet {
  margin-left: auto;
  color: #6366f1;
  font-size: 10px;
  font-weight: 700;
}

.link-quiet:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 12px 13px;
  background: linear-gradient(120deg, #f6f8ff, #fbf7ff);
  border: 1px solid #edf0fb;
  border-radius: 14px;
}

.support-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #6366f1;
  background: #fff;
  border: 1px solid #e7eaff;
  border-radius: 10px;
}

.support-icon svg {
  width: 19px;
  height: 19px;
}

.support-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.support-copy strong {
  color: #334155;
  font-size: 11px;
  font-weight: 750;
}

.support-copy span {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 9px;
}

.support-badge {
  margin-left: auto;
  padding: 3px 7px;
  color: #15803d;
  font-size: 8.5px;
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 999px;
}

.import-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  color: #94a3b8;
  font-size: 9.5px;
  line-height: 1.6;
}

.import-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #a5b4fc;
}

/* ==========================================================================
   使用步骤与收尾说明
   ========================================================================== */

.guide {
  margin-top: 22px;
  padding: 29px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 20px;
}

.guide-head h2 {
  width: 100%;
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.guide-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.guide-step {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  background: #f9faff;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
}

.step-number {
  position: absolute;
  top: 10px;
  right: 16px;
  color: rgba(79, 70, 229, 0.08);
  font-size: 43px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.step-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #e7eaff;
  border-radius: 13px;
}

.step-icon svg {
  width: 21px;
  height: 21px;
}

.guide-step h3 {
  position: relative;
  margin: 15px 0 5px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 750;
}

.guide-step p {
  position: relative;
  margin: 0;
  color: #7b889d;
  font-size: 11px;
  line-height: 1.7;
}

.closing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 22px;
  padding: 23px 27px;
  background: linear-gradient(120deg, #eef2ff 0%, #f5f3ff 58%, #faf5ff 100%);
  border: 1px solid #e5e9ff;
  border-radius: 24px;
}

.closing-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.closing-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.closing-icon svg {
  width: 23px;
  height: 23px;
}

.closing-copy h3 {
  margin: 0;
  color: #312e81;
  font-size: 14.5px;
  font-weight: 750;
}

.closing-copy p {
  margin: 3px 0 0;
  color: #6d75a3;
  font-size: 11px;
  line-height: 1.6;
}

.closing-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #7c86aa;
  font-size: 10px;
  font-weight: 650;
}

.meta-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-status.is-online {
  color: #15803d;
}

.meta-status.is-offline {
  color: #b91c1c;
}

.meta-dot {
  width: 2px;
  height: 2px;
  background: #b9c2dc;
  border-radius: 50%;
}

.dash-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 25px 24px 0;
  color: #9aa6b8;
  font-size: 10.5px;
}

/* ==========================================================================
   Toast 提示
   ========================================================================== */

.toast {
  position: fixed;
  z-index: 100;
  bottom: 26px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 17px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

/* ==========================================================================
   错误页面
   ========================================================================== */

.error-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #f7f9ff;
}

.error-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(480px, calc(100% - 40px));
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}

.error-brand {
  margin-bottom: 20px;
}

.error-card {
  width: 100%;
  padding: 46px 34px 36px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 27px;
  box-shadow: 0 30px 80px rgba(47, 64, 150, 0.12);
}

.error-code {
  display: inline-block;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.error-card h1 {
  margin: 9px 0 8px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.error-card p {
  margin: 0 auto;
  max-width: 310px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.error-button {
  min-height: 44px;
  margin-top: 23px;
  font-size: 12.5px;
}

.error-footer {
  margin: 19px 0 0;
  color: #9aa6b8;
  font-size: 10.5px;
}

/* ==========================================================================
   响应式布局
   ========================================================================== */

@media (max-width: 1080px) {
  .hero {
    gap: 30px;
    padding: 42px 38px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-card {
    min-height: 0;
  }

  .import-note {
    margin-top: 16px;
  }

  .auth-visual {
    padding: 44px 38px 30px;
  }

  .auth-card {
    padding: 46px 38px;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 620px;
  }

  .auth-visual {
    min-height: 300px;
    padding: 38px 38px 28px;
  }

  .auth-visual::after {
    top: -190px;
    right: -170px;
  }

  .visual-content {
    max-width: 480px;
  }

  .auth-visual h1 {
    margin-top: 22px;
    font-size: 40px;
  }

  .visual-lead {
    max-width: 380px;
  }

  .feature-list {
    display: none;
  }

  .visual-route {
    display: none;
  }

  .visual-footer {
    margin-top: 28px;
    padding-top: 17px;
  }

  .auth-card {
    padding: 38px;
  }

  .auth-card-head h2 {
    font-size: 29px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .qr-panel {
    display: grid;
    grid-template-columns: 162px minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    padding: 16px;
  }

  .qr-panel-top {
    grid-column: 1 / -1;
    padding: 0 2px 2px;
  }

  .qr-frame {
    grid-row: 2 / span 3;
    margin: 11px 0 0;
    padding: 10px;
  }

  .qr-panel h2 {
    align-self: end;
    margin-top: 12px;
  }

  .qr-panel p {
    align-self: start;
  }

  .qr-download {
    align-self: start;
    margin-top: 8px;
  }
}

@media (max-width: 720px) {
  .auth-wrap {
    width: min(100% - 28px, 620px);
    padding-top: 18px;
  }

  .auth-header {
    padding: 0 2px 16px;
  }

  .header-status {
    padding: 6px 9px;
    font-size: 10.5px;
  }

  .auth-shell {
    border-radius: 25px;
  }

  .auth-visual {
    min-height: 262px;
    padding: 28px 26px 22px;
  }

  .auth-visual h1 {
    margin: 18px 0 10px;
    font-size: 35px;
  }

  .visual-lead {
    font-size: 12.5px;
  }

  .visual-eyebrow {
    font-size: 9px;
  }

  .auth-card {
    padding: 31px 25px 28px;
  }

  .auth-card-head h2 {
    font-size: 27px;
  }

  .auth-footer {
    margin-top: 17px;
  }

  .topbar {
    width: calc(100% - 30px);
    height: 66px;
  }

  .brand-name {
    font-size: 17.5px;
  }

  .brand-sub {
    display: none;
  }

  .brand-slash {
    display: none;
  }

  .dash-container {
    width: calc(100% - 28px);
  }

  .hero {
    margin-top: 18px;
    padding: 32px 24px 25px;
    border-radius: 25px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-lead {
    font-size: 12.5px;
  }

  .hero-stats {
    gap: 7px;
    margin-top: 22px;
  }

  .hero-stat {
    min-width: 0;
    flex: 1 1 100px;
    padding: 9px 11px;
  }

  .hero-stat strong {
    font-size: 11.5px;
  }

  .qr-panel {
    grid-template-columns: 132px minmax(0, 1fr);
    column-gap: 14px;
    padding: 14px;
    border-radius: 20px;
  }

  .qr-panel h2 {
    font-size: 15.5px;
  }

  .qr-panel p {
    font-size: 10.5px;
  }

  .qr-download {
    font-size: 10.5px;
  }

  .dashboard-grid {
    gap: 16px;
    margin-top: 16px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 23px;
  }

  .card-head h2 {
    font-size: 19px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-item.span-2 {
    grid-column: auto;
  }

  .detail-value code {
    font-size: 12.5px;
  }

  .client-actions .link-quiet {
    margin-left: 0;
  }

  .guide {
    margin-top: 16px;
    padding: 22px 18px;
    border-radius: 23px;
  }

  .guide-head h2 {
    font-size: 19px;
  }

  .guide-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 18px;
  }

  .guide-step {
    padding: 18px;
  }

  .closing-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 16px;
    padding: 20px;
  }

  .closing-meta {
    padding-left: 59px;
  }

  .dash-footer {
    flex-wrap: wrap;
    gap: 7px;
    font-size: 10px;
  }

  .toast {
    bottom: 18px;
    max-width: calc(100% - 32px);
    white-space: nowrap;
  }

  .auth-visual .visual-footer {
    margin-top: 20px;
  }
}

@media (max-width: 520px) {
  .auth-wrap {
    justify-content: flex-start;
  }

  .auth-header {
    padding-bottom: 14px;
  }

  .header-status {
    display: none;
  }

  .auth-visual {
    min-height: 236px;
    padding: 24px 22px 19px;
  }

  .auth-visual h1 {
    font-size: 32px;
  }

  .visual-lead {
    max-width: 290px;
    font-size: 12px;
    line-height: 1.65;
  }

  .visual-footer {
    gap: 8px;
  }

  .visual-tech {
    font-size: 8px;
  }

  .auth-card {
    padding: 27px 21px 25px;
  }

  .auth-card-head h2 {
    font-size: 25px;
  }

  .auth-card-head p {
    font-size: 12px;
  }

  .input-wrap {
    height: 50px;
  }

  .auth-security {
    font-size: 9.5px;
  }

  .secure-pill {
    display: none;
  }

  .btn-logout {
    gap: 5px;
    padding: 0 9px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .hero {
    padding: 28px 20px 21px;
  }

  .hero h1 {
    margin-top: 18px;
    font-size: 35px;
  }

  .hero-stat-label {
    font-size: 8.5px;
  }

  .hero-stat {
    padding: 8px 9px;
  }

  .hero-stat strong {
    font-size: 10.5px;
  }

  .qr-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .qr-panel-top {
    width: 100%;
  }

  .qr-frame {
    width: 196px;
    margin: 14px auto;
    padding: 10px;
  }

  .qr-panel h2 {
    align-self: flex-start;
    margin-top: 0;
  }

  .qr-panel p {
    align-self: flex-start;
    max-width: 280px;
  }

  .qr-download {
    align-self: flex-start;
  }

  .qr-brand {
    font-size: 8px;
  }

  .qr-ready {
    font-size: 9px;
  }

  .qr-panel h2 {
    font-size: 14.5px;
  }

  .qr-panel p {
    font-size: 10px;
  }

  .card-head {
    gap: 8px;
  }

  .icon-tile {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .icon-tile svg {
    width: 20px;
    height: 20px;
  }

  .section-kicker {
    font-size: 9px;
  }

  .mini-status {
    padding: 5px 8px;
  }

  .client-actions .btn {
    flex: 1 1 auto;
  }

  .client-actions .link-quiet {
    width: 100%;
    padding: 4px 0;
    text-align: center;
  }

  .closing-copy {
    align-items: flex-start;
  }

  .closing-meta {
    padding-left: 0;
  }

  .dash-footer {
    padding-top: 21px;
  }
}

/* 减少动画偏好：尊重用户的系统设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
