/* Senflare UI - 统一样式 */

/* Inter 可变字体（拉丁子集）本地自托管：全站拉丁文字与开场遮罩不再依赖 CDN，杜绝中途换装 */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../assets/fonts/inter.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ========== CSS 变量（浅色/深色主题，合并自前台/后台两套定义） ========== */
:root {
  /* 基础色彩 */
  --color-primary: #1677ff;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
  --success-gradient: linear-gradient(90deg, var(--color-success), #4ade80);
  --info-gradient: linear-gradient(90deg, var(--color-info), #60a5fa);

  /* 主色别名层：跟随动态主题色（--color-primary / --color-primary-rgb 由各页首帧脚本或 admin 调色盘写入） */
  --primary-color: var(--color-primary);
  /* 默认蓝色（#1677ff）的 RGB 分量；theme.js applyVars() 未运行时保证 rgba(var(--color-primary-rgb),…)
     派生色不塌陷——否则首帧/localStorage 空时整批按钮与背景色失效并回落默认蓝 */
  --color-primary-rgb: 22, 119, 255;
  --custom-primary-background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);

  /* 灰色系统 */
  --gray-50: #f7fafc;
  --gray-100: #f0f2f5;
  --gray-200: #e2e6ec;
  --gray-300: #c1c8d3;
  --gray-400: #99a3b2;
  --gray-500: #666;
  --gray-600: #595959;
  --gray-700: #333;
  --gray-800: #1a1a1a;
  --gray-900: #050505;

  /* 扩展色彩 */
  --color-orange: #ff9800;
  --color-yellow: #eab308;
  --color-indigo: #6366f1;
  --color-lime: #84cc16;
  --color-amber: #f59e0b;
  --color-rose: #dc2626;

  /* 主色 alpha 变体 */
  --primary-05: rgba(var(--color-primary-rgb), 0.05);
  --primary-06: rgba(var(--color-primary-rgb), 0.06);
  --primary-08: rgba(var(--color-primary-rgb), 0.08);
  --primary-10: rgba(var(--color-primary-rgb), 0.1);
  --primary-12: rgba(var(--color-primary-rgb), 0.12);
  --primary-25: rgba(var(--color-primary-rgb), 0.25);
  --primary-30: rgba(var(--color-primary-rgb), 0.3);
  --primary-40: rgba(var(--color-primary-rgb), 0.4);
  --primary-45: rgba(var(--color-primary-rgb), 0.45);
  --primary-55: rgba(var(--color-primary-rgb), 0.55);
  --primary-70: rgba(var(--color-primary-rgb), 0.7);
  --color-primary-bg-2: rgba(var(--color-primary-rgb), 0.02);
  --color-primary-bg-5: rgba(var(--color-primary-rgb), 0.05);
  --color-primary-bg-10: rgba(var(--color-primary-rgb), 0.1);
  --color-primary-bg-15: rgba(var(--color-primary-rgb), 0.15);
  --color-primary-bg-20: rgba(var(--color-primary-rgb), 0.2);
  --color-primary-border: rgba(var(--color-primary-rgb), 0.3);
  --color-primary-shadow: rgba(var(--color-primary-rgb), 0.25);

  /* 状态色 */
  --ok: #16a34a;
  --ok-bg: rgba(22, 163, 74, 0.08);
  --ok-b2: rgba(22, 163, 74, 0.55);
  --ok-border: rgba(22, 163, 74, 0.5);
  --mid: #d97706;
  --mid-bg: rgba(217, 119, 6, 0.08);
  --mid-border: rgba(217, 119, 6, 0.55);
  --warn: #e53e3e;
  --warn-bg: rgba(229, 62, 62, 0.08);
  --warn-border: rgba(229, 62, 62, 0.55);
  --err: #dc2626;
  --err-bg: rgba(220, 38, 38, 0.06);
  --err-border: rgba(220, 38, 38, 0.5);
  --blue: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.08);
  --blue-border: rgba(37, 99, 235, 0.5);
  --purple: #9333ea;
  --purple-b2: rgba(147, 51, 234, 0.08);
  --purple-border: rgba(147, 51, 234, 0.5);
  --indigo: #7c3aed;
  --indigo-bg: rgba(124, 58, 237, 0.06);
  --indigo-border: rgba(124, 58, 237, 0.5);
  --sky: #0284c7;
  --sky-bg: rgba(2, 132, 199, 0.06);
  --sky-border: rgba(2, 132, 199, 0.5);

  /* 语义色 alpha 变体 */
  --color-success-bg-15: rgba(34, 197, 94, 0.15);
  --color-success-shadow: rgba(34, 197, 94, 0.5);
  --color-danger-bg-10: rgba(239, 68, 68, 0.1);
  --color-danger-bg-15: rgba(239, 68, 68, 0.15);
  --color-danger-bg-20: rgba(220, 38, 38, 0.2);
  --color-warning-bg-15: rgba(245, 158, 11, 0.15);
  --color-warning-bg-40: rgba(250, 171, 65, 0.4);
  --color-info-bg-10: rgba(59, 130, 246, 0.1);
  --color-info-bg-15: rgba(59, 130, 246, 0.15);
  --color-lime-bg-15: rgba(132, 204, 22, 0.15);
  --color-amber-bg-15: rgba(234, 179, 8, 0.15);
  --color-gray-bg-15: rgba(156, 163, 175, 0.15);

  /* Black/White */
  --color-black-30: rgba(0, 0, 0, 0.3);
  --color-white: #fff;

  /* 渐变 */
  --color-primary-light: #4da3ff;   /* 静态兜底按默认主题蓝派生（light = l+15%）；运行时由 theme.js applyVars() 按实际主题色覆盖 */
  --color-primary-dark: #006ce0;    /* 静态兜底按默认主题蓝派生（dark = l-6%）；运行时由 theme.js applyVars() 按实际主题色覆盖 */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  --gradient-primary-horizontal: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));

  /* 文本颜色 */
  --text-1: #333;
  --text-2: #444;
  --text-3: #666;
  --text-4: #999;

  /* 背景颜色 */
  --bg-1: #fafbfd;
  --bg-2: rgba(0, 0, 0, 0.03);
  --bg-3: rgba(0, 0, 0, 0.05);

  /* 边框颜色 */
  --border-1: rgba(0, 0, 0, 0.05);
  --border-2: rgba(0, 0, 0, 0.1);

  /* 前台基础色（落地页 body 用；后台走 --bg-1/--text-1） */
  --bg-color: #ffffff;
  --text-color: #333;
  --text-muted: #666;
  --border-color: rgba(0, 0, 0, 0.05);
  --bg-secondary: rgba(0, 0, 0, 0.03);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  --modal-bg: rgba(255, 255, 255, 0.95);

  /* 组件颜色 */
  --card-bg: rgba(255, 255, 255, 0.6);
  --sidebar-bg: rgba(255, 255, 255, 0.8);
  --sidebar-text: #555;

  /* 其他颜色 */

  /* 尺寸变量 */
  --sidebar-width: 64px;
  --sidebar-expanded-width: 200px;
  --header-height: 64px;

  /* 动态背景（亮色）：默认给主题色倾向的粉白；theme.js 运行时按主题色重算 */
  --orb-1: color-mix(in srgb, var(--color-primary) 20%, white);
  --orb-2: color-mix(in srgb, var(--color-primary) 14%, white);
  --orb-3: color-mix(in srgb, var(--color-primary) 17%, white);
}

[data-theme="dark"] {
  /* 前台基础色 */
  --bg-color: #050505;
  --text-color: #f7fafc;
  --text-muted: rgba(255, 255, 255, 0.6);
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.05);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --modal-bg: rgba(30, 30, 30, 0.6);

  /* 文本颜色 */
  --text-1: #f7fafc;
  --text-2: rgba(255, 255, 255, 0.7);
  --text-3: rgba(255, 255, 255, 0.6);
  --text-4: rgba(255, 255, 255, 0.4);

  /* 背景颜色 */
  --bg-1: #050505;
  --bg-2: rgba(255, 255, 255, 0.05);
  --bg-3: rgba(255, 255, 255, 0.08);

  /* 边框颜色 */
  --border-1: rgba(255, 255, 255, 0.05);
  --border-2: rgba(255, 255, 255, 0.1);

  /* 组件颜色 */
  --card-bg: rgba(30, 30, 30, 0.3);
  --sidebar-bg: rgba(20, 20, 20, 0.6);
  --sidebar-text: rgba(255, 255, 255, 0.8);

  /* 其他颜色 */

  /* 动态背景 */
  --orb-1: color-mix(in srgb, var(--color-primary) 20%, black);
  --orb-2: color-mix(in srgb, var(--color-primary) 16%, black);
  --orb-3: color-mix(in srgb, var(--color-primary) 24%, black);
}

/* ========== 基础重置 ========== */

/* ========== 字体 ========== */
/* 全局字体栈（项目自维护）：Inter（拉丁）+ 思源黑体 Noto Sans SC（中文），经 jsDelivr 异步加载、浏览器长缓存 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter Variable', 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-optical-sizing: auto;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: color 0.3s, background-color 0.3s;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 0; height: 0; }

input, textarea, select, button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
}

input::placeholder { color: var(--text-muted); opacity: 0.6; }

/* ========== 动态背景 ========== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-color);
}
.brand-senflare, .brand-proxy {
  background: var(--custom-primary-background);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--primary-color); }

/* ========== 搜索弹窗 ========== */

.theme-toggle, .github-link {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}

.theme-toggle:hover, .github-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff !important;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-shadow);
}

.btn-outline {
  background: var(--color-primary-bg-10);
  border: 1px solid var(--color-primary-border);
  color: var(--color-primary);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 10px var(--color-primary-bg-10), inset 0 0 5px var(--color-primary-bg-10);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-shadow);
}

.btn-outline.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  border-color: var(--color-primary);
}

.btn-outline.active:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-shadow);
}

/* ========== 页面切换 ========== */
#app { flex: 1; }
.page, #page-home { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease-in-out; }
#page-home.active { display: flex; flex-direction: column; min-height: calc(100vh - 64px - 85px); }

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

.hero-content { max-width: 900px; width: 100%; }

/* ========== 分页控件（反代节点页） ========== */

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .pagination-row { flex-wrap: nowrap; gap: 6px; }
}

.pagination button {
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: var(--primary-05);
  color: var(--primary-color);
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination button.active {
  background: var(--custom-primary-background);
  color: #fff;
  border-color: var(--primary-color);
  height: 34px;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 反代节点分页：自定义跳转页 */
.jump-box {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Inter Variable', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jump-box:focus-within { border-color: var(--primary-color); }
.jump-label { font-weight: 400; }
.jump-box input {
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-color);
  text-align: center;
  font-size: 0.85rem;
  -moz-appearance: textfield;
}

/* 统一输入/下拉/地址框基础样式（各控件复用，仅覆盖差异） */
.ui-field {
  height: 36px;
  display: flex; align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.82rem; font-weight: 500;
  box-sizing: border-box;
}
.ui-field:focus-within { border-color: var(--primary-color); }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  #page-home.active { min-height: calc(100vh - 64px - 85px); }

  /* 移动端卡片样式 */
}

/* ========== 移动端抽屉菜单 ========== */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.menu-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.drawer.show {
  max-height: calc(100vh - 64px);
}

    /* 多选下拉（带勾选）——触发器复用 ui-field 基础样式 */
    .ms { position: relative; }
    .ms-trigger {
      width: 100%;
      display: flex; align-items: center; gap: 6px;
      color: var(--text-muted);
      font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Inter Variable', sans-serif;
      font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: border-color 0.2s;
    }
    .ms-trigger:hover, .ms.open .ms-trigger { border-color: var(--primary-color); }
    .ms-label, .ms-value { font-weight: 500; white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; font-family: inherit; }
    .ms-value { flex: 1; overflow: hidden; text-overflow: ellipsis; text-align: left; }
    .ms-caret { color: var(--text-muted); }
    .ms-panel {
      position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
      background: var(--modal-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow);
      padding: 8px; display: none;
      width: max-content;   /* 面板随选项内容展宽，窄触发器里长文案不被截断 */
      min-width: 100%;      /* 但不窄于触发器整格 */
      max-width: 300px;     /* 上限防长选项撑出视口 */
    }
    .ms.open .ms-panel { display: block; }
    .ms.dropup .ms-panel { top: auto; bottom: calc(100% + 6px); }   /* 下方空间不足时向上展开 */
    .ms-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
    .ms-opt {
      display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
      cursor: pointer; font-size: 0.82rem; color: var(--text-color); transition: background 0.15s;
    }
    .ms-opt:hover { background: var(--primary-06); }
    .ms-opt input {
      appearance: none; -webkit-appearance: none;
      width: 15px; height: 15px; margin: 0;
      border: 1.5px solid var(--primary-55); border-radius: 4px;
      background: transparent; cursor: pointer; position: relative; flex-shrink: 0;
      vertical-align: middle; box-sizing: border-box;
    }
    .ms-opt input:hover { border-color: var(--primary-color); }
    .ms-opt input:checked { background: var(--primary-color); border-color: var(--primary-color); }
    .ms-opt input:checked::after {
      content: ''; position: absolute; left: 4px; top: 1px;
      width: 4px; height: 8px;
      border: solid #fff; border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .ms-opt .ms-flag { width: 20px; height: 13px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
    .ms-opt.ms-empty {
      justify-content: center; text-align: center;
      color: var(--text-muted); cursor: default; padding: 14px 8px;
    }

    /* 单选下拉（与多选同款样式）：点击选中、无复选框 */
    .ms-opt.single { justify-content: space-between; }
    .ms-opt.single:hover { background: var(--primary-08); }
    .ms-opt.single.active { background: var(--primary-12); color: var(--primary-color); font-weight: 600; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
}

/* ========== 版权信息 ========== */
.copyright {
  text-align: center;
  height: 64px;
  line-height: 64px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
    .nav-link.active { color: var(--primary-color); }
    .drawer-link.active { color: var(--primary-color); background: var(--primary-06); }
    #toast, #toast.toast {
      position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
      z-index: 10300;   /* 高于 .st-check-modal(10200) / .modal(10000)：任何弹窗打开时提示都可见 */
      opacity: 0; visibility: hidden;
      transition: opacity 0.3s ease, transform 0.3s ease;
      pointer-events: auto;
      background: var(--card-bg); backdrop-filter: blur(20px);
      border: 1.5px solid var(--primary-color); color: var(--primary-color);
      padding: 10px 20px; border-radius: 12px; font-size: 0.88rem; font-weight: 500;
      box-shadow: var(--shadow); white-space: pre-line;
      max-width: 90vw;
    }
    #toast.show, #toast.toast.show {
      opacity: 1; visibility: visible;
      transform: translateX(-50%) translateY(0);
    }
    #toast.toast.error, #toast.error { border-color: var(--warn); background: rgba(239, 68, 68, 0.95); color: #fff; }  /* 宽度对齐 */
    :root {}
    [data-theme="dark"] {}

    /* 多选下拉（带勾选）——触发器复用 ui-field 基础样式 */
    .ms { position: relative; }
    .ms-trigger {
      width: 100%;
      display: flex; align-items: center; gap: 6px;
      color: var(--text-muted);
      font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Inter Variable', sans-serif;
      font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: border-color 0.2s;
    }
    .ms-trigger:hover, .ms.open .ms-trigger { border-color: var(--primary-color); }
    .ms-label, .ms-value { font-weight: 500; white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; font-family: inherit; }
    .ms-value { flex: 1; overflow: hidden; text-overflow: ellipsis; text-align: left; }
    .ms-caret { color: var(--text-muted); }
    .ms-panel {
      position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
      background: var(--modal-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow);
      padding: 8px; display: none;
      width: max-content;   /* 面板随选项内容展宽，窄触发器里长文案不被截断 */
      min-width: 100%;      /* 但不窄于触发器整格 */
      max-width: 300px;     /* 上限防长选项撑出视口 */
    }
    .ms.open .ms-panel { display: block; }
    .ms.dropup .ms-panel { top: auto; bottom: calc(100% + 6px); }   /* 下方空间不足时向上展开 */
    .ms-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
    .ms-opt {
      display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
      cursor: pointer; font-size: 0.82rem; color: var(--text-color); transition: background 0.15s;
    }
    .ms-opt:hover { background: var(--primary-06); }
    .ms-opt input {
      appearance: none; -webkit-appearance: none;
      width: 15px; height: 15px; margin: 0;
      border: 1.5px solid var(--primary-55); border-radius: 4px;
      background: transparent; cursor: pointer; position: relative; flex-shrink: 0;
      vertical-align: middle; box-sizing: border-box;
    }
    .ms-opt input:hover { border-color: var(--primary-color); }
    .ms-opt input:checked { background: var(--primary-color); border-color: var(--primary-color); }
    .ms-opt input:checked::after {
      content: ''; position: absolute; left: 4px; top: 1px;
      width: 4px; height: 8px;
      border: solid #fff; border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .ms-opt .ms-flag { width: 20px; height: 13px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
    .ms-opt.ms-empty {
      justify-content: center; text-align: center;
      color: var(--text-muted); cursor: default; padding: 14px 8px;
    }

    /* 单选下拉（与多选同款样式）：点击选中、无复选框 */
    .ms-opt.single { justify-content: space-between; }
    .ms-opt.single:hover { background: var(--primary-08); }
    .ms-opt.single.active { background: var(--primary-12); color: var(--primary-color); font-weight: 600; }

    /* ========== 反代域名列表 ========== */
    #page-domains .docs-content { max-width: 1200px; }
    /* 去掉「检测」链接 hover 下划线（.docs-content a:hover 优先级更高会带出下划线） */
    #page-domains .dom-actions a:hover,
    #page-domains .dom-actions a:focus { text-decoration: none; }
    .dock-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .dock-stat {
      display: inline-flex; align-items: center; gap: 3px;
      font-size: 0.85rem; background: transparent;
      border: 1px solid var(--primary-55); border-radius: 999px;
      padding: 4px 12px; white-space: nowrap;
    }
    .dock-stat b, .dock-stat i {
      color: var(--primary-color); font-size: inherit; font-weight: 500;
      white-space: nowrap;
      font-variant-numeric: tabular-nums; line-height: inherit;
    }
    .dock-stat i { font-style: normal; }
    .src-toggle {
      display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px;
      background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px;
    }
    .src-btn {
      border: none; background: transparent; cursor: pointer;
      height: 30px; padding: 0 12px; border-radius: 8px;
      font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
      transition: all 0.2s; white-space: nowrap;
    }
    .src-btn:hover { color: var(--primary-color); background: var(--primary-06); }
    .src-btn.active { background: var(--custom-primary-background); color: #fff; box-shadow: 0 2px 8px var(--primary-25); }

    /* 反代节点 / 反代 API tab 切换（沿用 src-toggle 分段样式，独立卡片） */
    .node-tabs { display: flex; padding: 14px 18px; }
    .node-panel.active { display: block; animation: fadeIn 0.3s ease-in-out; }
    .dock-speed {
      width: 34px; height: 34px; padding: 0; border-radius: 10px;
      border: 1px solid var(--border-color); background: var(--card-bg);
      color: var(--primary-color); cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
    }
    .dock-speed:hover { background: var(--primary-08); border-color: var(--primary-45); }
    .dock-speed:active { transform: scale(0.94); }

    /* 节点卡片：左国旗 / IP 上 / 端口·国家 下 / 右测试 */
    .node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 18px; }
    .node-grid .grid-tip { grid-column: 1 / -1; align-self: center; } /* 加载/空提示跨整行居中 */
    .node-grid.empty { grid-template-columns: 1fr; min-height: 240px; place-content: center; }
    .node-grid.empty .grid-tip { grid-column: 1 / -1; } /* 折叠：隐藏节点列表与分页 */
    .node-card {
      display: flex; align-items: center; gap: 12px;
      background: var(--card-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 14px;
      padding: 14px 16px; transition: all 0.2s;
      cursor: pointer; user-select: none;
    }
    .node-card:hover { border-color: var(--primary-40); box-shadow: var(--shadow); transform: translateY(-1px); }
    .node-card:active { transform: scale(0.98); border-color: var(--primary-70); box-shadow: 0 0 14px var(--primary-25); }
    .node-flag-img { width: 44px; height: 32px; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
    .node-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
    .node-ip {
      font-size: 0.82rem; font-weight: 700; color: var(--text-color);
      letter-spacing: 0.3px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .node-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
    .meta-chip {
      display: inline-flex; align-items: center; gap: 3px;
      background: var(--ok-bg); border: 1px solid var(--ok-border);
      border-radius: 999px; padding: 1px 6px;
      font-size: 0.66rem; font-weight: 600; color: var(--ok);
      flex-shrink: 0; max-width: 100%;        /* 不被 flex 压扁：空间不够时父级 wrap 折行，超单行再这里兜底截断 */
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .meta-chip svg { width: 11px; height: 11px; color: var(--ok); flex-shrink: 0; }
    /* 检测结果里不同信息 chip 的不同主题色（复用节点 meta-chip 语义） */
    .meta-chip.sc-asn { border-color: var(--sky-border); color: var(--sky); background: var(--sky-bg); }
    .meta-chip.sc-asn svg { color: var(--sky); }
    .meta-chip.sc-org { border-color: var(--indigo-border); color: var(--indigo); background: var(--indigo-bg); }
    .meta-chip.sc-org svg { color: var(--indigo); }
    .meta-chip.sc-exit { border-color: var(--err-border); color: var(--err); background: var(--err-bg); }
    .meta-chip.sc-exit svg { color: var(--err); }
    .node-test {
      flex-shrink: 0; width: 28px; height: 28px; padding: 0;
      border: none; background: transparent;
      color: var(--primary-color); border-radius: 999px; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
    }
    .node-test svg { width: 14px; height: 14px; }
    .node-test:hover { background: var(--primary-08); }
    .node-test:disabled { opacity: 0.45; cursor: default; }
    .node-test .ms-text { font-size: 0.7rem; font-weight: 600; }
    .node-test.testing { color: var(--text-muted); }
    .node-test.ok, .node-test.mid, .node-test.warn, .node-test.fail {
      width: auto; min-width: 46px; height: 20px; padding: 0 6px;
      border: 1px solid; border-radius: 999px; font-size: 0.7rem; font-weight: 500;
    }
    .node-test.ok, .detect-latency.ok { color: var(--ok); border-color: var(--ok-b2); background: var(--ok-bg); }
    .node-test.mid, .detect-latency.mid { color: var(--mid); border-color: var(--mid-border); background: var(--mid-bg); }
    .node-test.warn, .node-test.fail, .detect-latency.warn { color: var(--warn); border-color: var(--warn-border); background: var(--warn-bg); }
    .meta-stack { font-size: 0.66rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
    .meta-stack.ipv4 { color: var(--blue); border: 1px solid var(--blue-border); background: var(--blue-bg); }
    .meta-stack.ipv6 { color: var(--purple); border: 1px solid var(--purple-border); background: var(--purple-b2); }

    /* 节点详情弹窗：保留磨砂玻璃质感（backdrop-filter 由 GPU 合成，正常硬件无感）；动画 0.2s 微调到 0.15s 更跟手 */
    .check-modal {
      position: fixed; inset: 0; z-index: 2000;
      display: flex; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none; transition: opacity 0.15s;
    }
    .check-modal.show { opacity: 1; pointer-events: auto; }
    .check-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px) saturate(1.3); }
    .check-box {
      position: relative; width: min(640px, 92vw); max-height: 80vh;
      display: flex; flex-direction: column; overflow: hidden;
      background: var(--modal-bg); backdrop-filter: blur(24px) saturate(1.3);
      border: 1px solid var(--border-color); border-radius: 16px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      transform: translateY(-10px); transition: transform 0.15s;
    }
    .check-modal.show .check-box { transform: translateY(0); }
    .check-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-color); font-weight: 700; color: var(--text-color); }
    .check-body {
      flex: 1; overflow: auto; padding: 10px 20px 16px;
      background: #ffffff; color: #222;
    }
    .check-row {
      display: flex; justify-content: space-between; gap: 16px;
      padding: 8px 0; border-bottom: 1px dashed #e5e7eb;
      font-size: 0.85rem;
    }
    .check-row:last-child { border-bottom: none; }
    .check-k { color: #64748b; flex-shrink: 0; }
    .check-v { color: #1f2937; text-align: right; word-break: break-all; }
    .check-actions button { height: 34px; }
    .check-actions .btn-cancel {
      padding: 0 18px;
      border: 1.5px solid var(--primary-color); background: transparent; color: var(--primary-color);
      border-radius: 10px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
    }
    .check-actions .btn-cancel:hover { background: var(--primary-06); }
    .check-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-color); }

    /* 翻页 dock（复用 .pagination 样式）：上侧贴内容不占间距，呼吸空间留给下侧 */
    .node-page-foot { padding: 0 18px 20px; }
    .node-page-foot .pagination { margin-top: 0; }
    .node-page-foot .pagination-row { gap: 6px; flex-wrap: wrap; justify-content: center; }

    @media (max-width: 640px) {
      .node-grid { grid-template-columns: 1fr; padding: 14px; }
      .src-btn { padding: 0 10px; font-size: 0.76rem; }
    }
.repo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.repo-item {
  background: var(--card-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.repo-item:hover { border-color: var(--primary-40); box-shadow: var(--shadow); }
.repo-ico {
  width: 46px; height: 46px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; line-height: 1;
  background: var(--primary-08); border-radius: 10px;
}
.repo-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.repo-item b { color: var(--text-color); font-size: 0.9rem; }
.repo-item i { font-style: normal; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.repo-url-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 4px; }
.repo-url-row .code-block {
  flex: 1; padding: 0 14px;
  color: var(--text-muted); font-size: 0.85rem; cursor: pointer;
}
/* repo 行内输入框与 GitHub 按钮对齐：都统一 36px（对齐全局 form-control 基线高度） */
.repo-url-row .form-control.repo-url {
  height: 36px;
  padding: 0 14px;
  flex: 1; margin: 0;
}
.repo-url-row .btn.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 安全设置「UUID」行：输入框与按钮同高 36px */
#secUuid {
  height: 36px;
  padding: 0 14px;
}

/* 测速教程步骤 */
.tut-step { display: flex; gap: 14px; margin: 0 0 20px; }
.tut-step:last-child { margin-bottom: 0; }
.tut-no {
  flex-shrink: 0; width: 26px; height: 26px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; color: #fff;
  background: var(--custom-primary-background); border-radius: 999px;
  box-shadow: 0 2px 8px var(--primary-25);
}
.tut-body { flex: 1; min-width: 0; }
.tut-title { font-size: 0.9rem; font-weight: 700; color: var(--text-color); margin: 2px 0 6px; }
.tut-body p { line-height: 1.8; color: var(--text-color); font-size: 0.9rem; margin-bottom: 8px; }
.tut-body .code-block { margin: 0 0 10px; }
.tut-body code {
  background: var(--primary-10); color: var(--primary-color);
  padding: 1px 6px; border-radius: 4px;
  font-size: 0.8rem;
}
.tut-body a { color: var(--primary-color); text-decoration: none; }
.tut-body a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .repo-grid { grid-template-columns: 1fr; }
}
.det-editor.batch textarea { min-height: 120px; resize: vertical; }
.det-icon-btn.active { color: #fff; background: var(--custom-primary-background); border-color: transparent; }
.det-bar.paused {
  background: var(--bg-secondary); box-shadow: none;
  background-image: repeating-linear-gradient(45deg, var(--primary-30) 0 6px, transparent 6px 12px);
}
@media (max-width: 700px) { }

/* ========== 全局基础样式（字体 Inter Variable + Noto Sans SC Variable 由页面 <link> 从 CDN 加载） ========== */

html {
    font-size: 14px;
}

body {
    background-color: var(--bg-1);
    color: var(--text-1);
    transition: color 0.3s, background-color 0.3s;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* 通用工具类 */
.hidden {
    display: none !important;
}

.text-sm {
    font-size: 0.85rem !important;
}

.desc {
    font-size: 0.9rem;
    color: var(--text-3);
}

.hint {
    display: block;
    margin-top: 6px;
    align-items: center;
    font-size: 0.9rem;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    top: 50%;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--orb-3);
    bottom: -50px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* 卡片组件 */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    margin: 8px 8px 16px 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.04);
}

.card-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    stroke: var(--color-primary);
    flex-shrink: 0;
}

.card-body {
    padding: 1.5rem;
    overflow-x: auto;
    transition: all 0.3s ease;
}

/* 卡片折叠按钮 */
.card-toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-3);
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.card-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
}

/* 表单组件 */
.form-group {
    margin-bottom: 1.2rem;
}
.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-3);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-1);
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-1);
    border-radius: 8px;
    transition: all 0.3s;
    height: 36px;
}
/* 订阅格式按钮组 */
.sub-format-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

/* 订阅结果容器 */
.sub-result-container {
    display: flex;
    gap: 10px;
}

.sub-result-container button {
    white-space: nowrap;
    flex-shrink: 0;
}

.sub-result-container input {
    flex: 1;
    min-width: 0;
}

/* 二维码容器 */
.qrcode-container {
    display: none;
    justify-content: center;
    margin-top: 16px;
}

/* 提示框通用样式 */
.hint-box {
    padding: 12px 16px;
    background: var(--color-primary-bg-5);
    border-radius: 8px;
    margin-top: 16px;
}

.hint-box p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 按钮组件 */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(220, 53, 69, .2);
}

.modal-overlay.show {
    display: flex !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
}

.modal-content > .modal-body {
    overflow-y: auto;
    flex: 1;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.modal-header h3 svg {
    color: var(--color-primary);
}

.modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 1.4rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--primary-10);
    color: var(--color-primary);
}

/* 弹窗深色模式 */
[data-theme="dark"] .modal-content {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1rem;
    border-top: 1px solid var(--border-1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.auth-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* 确保弹窗中的取消按钮有 hover 效果 */
.modal .btn-outline:hover,
.modal-content .btn-outline:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)) !important;
    color: white !important;
    border-color: var(--color-primary) !important;
}

/* 公告类型按钮 - 统一样式 */
.announcement-type-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-color: var(--color-primary);
    color: white;
}

/* 弹窗移动端适配 */
@media (max-width: 600px) {
    .modal-content {
        width: 100%;
        max-width: calc(100vw - 32px);
        border-radius: 12px;
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }

    .auth-tab.active:hover {
        color: var(--color-primary);
    }
}

/* 表单组件 */

select.form-control {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea.form-control {
    height: auto;
    min-height: 80px;
    line-height: 1.55;   /* 多行编辑可读性；否则继承 normal 过紧，rows 行数失真 */
    resize: vertical;
}

.form-control:focus {
    outline: 0;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg-10);
    background-color: white;
}

/* 表单 - 深色模式 */
[data-theme="dark"] .form-control {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

[data-theme="dark"] .form-control:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-shadow);
}

/* 下拉菜单 - 深色模式 */
[data-theme="dark"] select.form-control,
[data-theme="dark"] select.filter-select {
    color-scheme: dark;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] select.form-control option,
[data-theme="dark"] select.filter-select option {
    background: var(--gray-800) !important;
    color: var(--color-white) !important;
}

[data-theme="dark"] select.form-control option:checked,
[data-theme="dark"] select.filter-select option:checked {
    background: #2d2d2d !important;
    color: var(--color-white) !important;
}
/* 复选框组件 */
.checkmark {
    width: 18px;
    height: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid var(--border-1);
    border-radius: 4px;
    background: var(--bg-2);
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label:hover .checkmark {
    border-color: var(--color-primary);
}

.checkbox-label input:checked~.checkmark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* 对勾：双边框旋转 45° 几何绘制，inset+margin 自动居中（不依赖字体基线）；
   伪元素不吃 * 的 box-sizing 重置，实际盒 6.5x11（content-box），旋转后
   视觉包围盒中心比盒中心低约 1.6px，translateY(-1.6px) 补偿 */
.checkbox-label input:checked~.checkmark::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 4.5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translateY(-1.6px) rotate(45deg);
}

/* 带 label 的复选框容器 */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-1);
    margin-right: 20px;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label .checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* 无文字变体（如卡片勾选列）：收窄预留位 */
.checkbox-label.no-text {
    padding-left: 22px;
}

/* 通用标签样式 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 0.5px solid;
}

/* 文本颜色辅助类 */

.text-danger {
    color: var(--color-danger);
}

.text-primary {
    color: var(--color-primary) !important;
}

/* 下拉菜单组件 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    min-width: 80px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-1);
    border-radius: 8px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu.dropdown-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    color: var(--text-1);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--bg-2);
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

/* 单元格 */
.table th,
.table td {
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-1);
    vertical-align: middle;
    line-height: 1.5;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.table td {
    padding: 4px 16px;
}

.table th:first-child,
.table td:first-child {
    padding-left: 20px;
}

.table th:last-child,
.table td:last-child {
    padding-right: 20px;
}

/* 表格组件（系统日志等）：完整表格样式 */
.node-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.node-table th,
.node-table td {
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-1);
    vertical-align: middle;
    line-height: 1.5;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.node-table th:first-child,
.node-table td:first-child {
    padding-left: 20px;
}

.node-table th:last-child,
.node-table td:last-child {
    padding-right: 20px;
}

.node-table th {
    background: white;
    font-weight: 400;
    color: var(--gray-700);
    font-size: 0.8rem;
    white-space: nowrap;
    border-top: 1px solid var(--border-1);
    padding: 12px 16px;
}

/* 禁用表格顶部边框（用于与卡片头部重叠的场景） */
.table-no-top-border .node-table th {
    border-top: none;
}

[data-theme="dark"] .node-table th {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
}

.node-table tbody tr {
    transition: background 0.15s;
    color: var(--text-3);
}

.node-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .node-table tbody tr {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .node-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.node-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.node-table th.sortable:hover {
    background: var(--bg-2);
}

.node-table th .sort-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.3;
    transition: all 0.2s;
}

.node-table th.sortable:hover .sort-icon {
    opacity: 0.6;
}

.node-table th.sort-asc .sort-icon {
    opacity: 1;
    transform: rotate(180deg);
}

.node-table th.sort-desc .sort-icon {
    opacity: 1;
}

.node-table .node-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.node-table .node-type.node {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.node-table .node-type.proxy {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.node-table .ping-good {
    color: var(--color-success);
    font-weight: 400;
}

.node-table .ping-medium {
    color: var(--color-warning);
    font-weight: 400;
}

.node-table .ping-bad {
    color: var(--color-danger);
    font-weight: 400;
}

.node-table .ping-fail {
    color: var(--text-3);
}

[data-theme="dark"] .node-table .ping-fail {
    color: rgba(255, 255, 255, 0.6);
}

.node-table .ping-testing {
    color: var(--color-info);
}

/* ==================== 表格组件系统结束 ==================== */

/* 原子工具类 */
/* Flex */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Display */
.block {
    display: block;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* 警告提示框 */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 0 8px 15px 8px;
    border-radius: 8px;
}

.alert svg {
    flex-shrink: 0;
}

.alert-warning {
    background: var(--color-primary-bg-5);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-border-20);
}

.alert-warning svg {
    color: var(--color-primary);
}

/* 危险卡片 */
.card-danger .card-header {
    background: rgba(220, 53, 69, .1);
    border-radius: 16px 16px 0 0;
}

/* 网络检测卡片 */
.latency-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.latency-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-1);
    transition: all 0.3s;
}

.latency-card:hover {
    box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.1);
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.latency-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.latency-card-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.latency-card-icon svg {
    width: 100%;
    height: 100%;
}

.latency-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
}

.latency-value {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
}

.latency-card-region {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.latency-card-region-domestic {
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
}

.latency-card-region-international {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.latency-card-content {
    margin-top: 1rem;
}

.latency-bars {
    display: flex;
    gap: 3px;
    height: 6px;
    align-items: flex-end;
}

.latency-bar {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: var(--border-1);
    transition: background-color 0.3s;
}

.latency-bar.loading {
    animation: latencyPulse 1s ease-in-out infinite;
    background: rgba(250, 171, 65, 0.4);
}

@keyframes latencyPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* 响应式适配 - 网络检测卡片 */
@media (max-width: 900px) {
    .latency-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .latency-card {
        padding: 0.85rem;
    }

    .latency-card-title {
        gap: 0.4rem;
        margin-bottom: 0.5rem;
    }

    .latency-card-icon {
        width: 18px;
        height: 18px;
    }

    .latency-card-name {
        font-size: 0.8rem;
    }

    .latency-value {
        font-size: 0.7rem;
    }

    .latency-card-region {
        font-size: 0.6rem;
        padding: 1px 5px;
    }
}

@media (max-width: 600px) {
    .latency-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .latency-card {
        padding: 0.65rem;
        border-radius: 8px;
    }

    .latency-card-title {
        gap: 0.35rem;
        margin-bottom: 0.4rem;
    }

    .latency-card-icon {
        width: 16px;
        height: 16px;
    }

    .latency-card-name {
        font-size: 0.72rem;
    }

    .latency-value {
        font-size: 0.65rem;
    }

    .latency-card-region {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .latency-card-content {
        margin-top: 0.35rem;
    }

    .latency-bars {
        height: 4px;
        gap: 2px;
    }
}

@media (max-width: 400px) {
    .latency-cards {
        gap: 0.5rem;
    }

    .latency-card {
        padding: 0.5rem;
    }

    .latency-card-icon {
        width: 14px;
        height: 14px;
    }

    .latency-card-name {
        font-size: 0.65rem;
    }

    .latency-value {
        font-size: 0.6rem;
    }

    .latency-card-region {
        font-size: 0.5rem;
    }
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 操作反馈动画 */

/* 二维码容器 */
#qrcode-container,
#guest-qrcode-container,
#user-qrcode-container {
    background: var(--color-white);
    padding: 12px;
    border-radius: 12px;
    width: fit-content;
    margin: 0 auto;
}

#qrcode-container canvas,
#guest-qrcode-container canvas,
#user-qrcode-container canvas,
#qrcode-container img {
    display: block;
}

/* ==================== 登录页面组件 ==================== */
/* 布局/品牌/输入框/按钮基础样式由 css/login.css 权威定义（此处原大段定义已被其全量覆盖，已清理）；
   仅保留 login.css 未覆盖的按压/禁用反馈与响应式规则 */

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

.login-box .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 登录页响应式适配 */
@media (max-width: 968px) {
    .login-container {
        justify-content: center;
    }

    .brand-header {
        display: none;
    }

    .login-section {
        max-width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 420px) {
    .login-section {
        padding: 1.5rem;
    }

    .login-box {
        padding: 2rem 1.5rem;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }
}

/* ==================== 侧边栏组件 (Sidebar) ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-1);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    white-space: nowrap;
    height: 100%;
}

.sidebar.expanded {
    width: var(--sidebar-expanded-width);
}

[data-theme="dark"] .sidebar {
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
}

/* 侧边栏头部 Logo */
.sidebar-header {
    padding: 0 16px;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    display: none;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.sidebar.expanded .logo-text {
    display: block;
}

.logo-senflare {
    color: var(--text-1);
}

.logo-link {
    color: var(--color-primary);
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar:not(.expanded) .nav-menu {
    padding: 12px 0;
}

.sidebar:not(.expanded) .nav-item {
    margin: 2px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
    margin: 2px 0;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-3);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sidebar.expanded .nav-item {
    justify-content: flex-start;
}

.nav-item i,
.nav-item svg {
    width: 20px;
    height: 20px;
    font-style: normal;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.nav-item svg {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-text {
    display: none;
    margin-left: 12px;
    white-space: nowrap;
}

.sidebar.expanded .nav-text {
    display: inline;
}

.nav-item:hover {
    background: var(--color-primary-bg-10);
    color: var(--color-primary);
}

.nav-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar:not(.expanded) .nav-item:hover::before {
    display: none;
}

.nav-item.active {
    background: var(--color-primary-bg-10);
    color: var(--color-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--color-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar:not(.expanded) .nav-item.active::before {
    display: none;
}

.sidebar:not(.expanded) .nav-group-title .nav-arrow {
    display: none;
}

.nav-group.expanded .nav-group-title .nav-arrow {
    transform: rotate(180deg);
}

.sidebar.expanded .nav-group.expanded .nav-submenu {
    max-height: 500px;
}

/* 收起状态下的二级菜单 - 悬浮弹出 */
.sidebar:not(.expanded) .nav-group {
    position: relative;
}

.sidebar:not(.expanded) .nav-group-title {
    justify-content: center;
}

.sidebar:not(.expanded) .nav-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 180px;
    max-height: none;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-left: 8px;
    z-index: 1000;
}

/* 悬浮菜单的小三角 */
.sidebar:not(.expanded) .nav-submenu::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--border-1) transparent transparent;
}

.sidebar:not(.expanded) .nav-submenu::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 12px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--bg-1) transparent transparent;
}

.sidebar:not(.expanded) .nav-group:hover .nav-submenu {
    display: block;
}

.sidebar:not(.expanded) .nav-submenu .nav-subitem {
    padding: 0 16px !important;
    height: 44px;
    border-radius: 0;
}

.sidebar:not(.expanded) .nav-submenu .nav-subitem:hover {
    background: var(--color-primary-bg-10);
}

/* 深色模式下的悬浮菜单 */
[data-theme="dark"] .sidebar:not(.expanded) .nav-submenu {
    background: var(--bg-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .sidebar:not(.expanded) .nav-submenu::after {
    border-color: transparent var(--bg-2) transparent transparent;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 12px;
    min-height: var(--header-height);
    border-top: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.sidebar.expanded .sidebar-footer {
    align-items: stretch;
    min-height: var(--header-height);
}

.sidebar:not(.expanded) .sidebar-footer {
    min-height: auto;
    padding: 8px 0 0 0;
    gap: 0;
}

/* 底部操作栏 */
.footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.sidebar:not(.expanded) .footer-actions {
    flex-direction: column;
}

/* 用户信息区域 */
.user-info {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 8px;
    color: var(--text-3);
    border-radius: 10px;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.user-info:hover {
    background: var(--bg-2);
    color: var(--color-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

.user-details {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

.sidebar.expanded .user-details {
    display: block;
}

.sidebar.expanded .user-avatar {
    display: none;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-1);
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

[data-theme="dark"] .user-name {
    color: rgba(255, 255, 255, 0.85);
}

.sidebar:not(.expanded) .user-info {
    padding: 2px 0;
    justify-content: center;
    height: 36px;
    border-radius: 0;
    margin-bottom: 8px;
}

/* 底部右侧按钮组 */
.footer-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sidebar:not(.expanded) .footer-right {
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* 侧边栏底部按钮（主题切换、折叠按钮） */
.sidebar .theme-toggle,
.sidebar .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-3);
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.sidebar .theme-toggle:hover,
.sidebar .menu-toggle:hover {
    background: var(--bg-2);
    color: var(--color-primary);
}

.sidebar .theme-toggle #theme-icon,
.sidebar .theme-toggle svg,
.sidebar .menu-toggle svg {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-overlay {
    display: none;
}

/* ==================== 顶部导航栏 (Header) ==================== */
.header {
    height: var(--header-height);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 18px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 200;
    flex-shrink: 0;
    position: relative;
    gap: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-3);
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    color: var(--color-primary);
    background: var(--bg-2);
}

/* 移动端品牌 */
.mobile-brand {
    display: none;
}

.breadcrumb-item.active {
    color: var(--text-3);
}

/* 通知下拉菜单 */

.alert-dropdown.show {
    display: block;
}

/* ==================== 主体布局 (App Body) ==================== */
.app-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* 主内容包装器 */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ==================== 主内容区域 (Main Content) ==================== */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    position: relative;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
}

#view-dashboard,
#view-config,
#view-speedtest,
#view-backendconfig,
#view-subscription,
#view-cdkmgmt,
#view-packages,
#view-orders,
#view-coupons,
#view-payment,
#view-announcementmgmt,
#view-usermgmt,
#view-tickets,
#view-logs,
#view-advanced {
    overflow-x: hidden;
}

.stat-card {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-white);
    border-radius: 10px;
    border: 1px solid var(--border-1);
    transition: all 0.2s ease;
}

[data-theme="dark"] .stat-card {
    background: var(--card-bg);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card.total .stat-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
}

.stat-card.total .stat-icon svg {
    stroke: var(--color-indigo);
}

.stat-card.total .stat-value {
    color: var(--color-indigo);
}

.stat-card.unused .stat-icon,
.stat-card.active .stat-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
}

.stat-card.unused .stat-icon svg,
.stat-card.active .stat-icon svg {
    stroke: var(--color-success);
}

.stat-card.unused .stat-value,
.stat-card.active .stat-value {
    color: var(--color-success);
}

.stat-card.inactive .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
}

.stat-card.inactive .stat-icon svg {
    stroke: var(--color-danger);
}

.stat-card.inactive .stat-value {
    color: var(--color-danger);
}

.stat-card.expired .stat-icon {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.05));
}

.stat-card.expired .stat-icon svg {
    stroke: var(--color-orange);
}

.stat-card.expired .stat-value {
    color: var(--color-orange);
}

.stat-card.used .stat-icon {
    background: linear-gradient(135deg, var(--color-gray-bg-15), rgba(156, 163, 175, 0.05));
}

.stat-card.used .stat-icon svg {
    stroke: var(--gray-300);
}

.stat-card.used .stat-value {
    color: var(--text-3);
}

/* 响应式 */
@media (max-width: 768px) {
}

/* ==================== Toast 提示框 ==================== */
.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.node-status.active {
    background: var(--color-success);
}

.node-info {
    flex: 1;
    min-width: 0;
}

/* 节点列表移动端适配 */
@media (max-width: 480px) {

    .node-info {
        flex: 1 1 calc(100% - 30px);
    }
}

/* ==================== 移动端响应式 - 侧边栏和导航栏 ==================== */
@media (max-width: 768px) {
    /* 移动端 Header 布局 */
    .header {
        justify-content: flex-start;
        padding: 0 12px;
        z-index: 1000;
        gap: 8px;
    }

    .header-left {
        gap: 8px;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 移动端品牌文字显示在导航栏 */
    .mobile-brand {
        display: flex;
        align-items: baseline;
        gap: 2px;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .mobile-brand .logo-senflare {
        color: var(--text-1);
    }

    .mobile-brand .logo-link {
        color: var(--color-primary);
    }

    .header-right {
        margin-left: auto;
    }

    /* 移动端侧边栏 */
    .sidebar {
        position: fixed;
        top: var(--header-height);
        bottom: 0;
        left: 0;
        height: calc(100vh - var(--header-height));
        width: 250px;
        z-index: 999;
        background: var(--sidebar-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-right: none;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* 移动端隐藏侧边栏 logo */
    .sidebar .sidebar-header {
        display: none;
    }

    /* 移动端侧边栏始终显示文字 */
    .sidebar .nav-text,
    .sidebar .logo-text {
        display: block;
    }

    .sidebar .nav-item {
        justify-content: flex-start;
    }

    .sidebar .footer-actions {
        flex-direction: row;
    }

    .sidebar .footer-right {
        flex-direction: row;
    }

    .sidebar-footer {
        align-items: stretch;
    }

    .sidebar .user-details {
        display: block;
    }

    .sidebar .user-avatar {
        display: none;
    }

    /* 遮罩层 */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* 主内容区域移动端适配 */
    .content {
        padding: 15px;
    }

    .node-table {
        min-width: 600px;
    }
}

/* 弹窗内的卡片样式 */
.modal .card,
.modal-content .card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .modal .card,
[data-theme="dark"] .modal-content .card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.period-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* 响应式适配 */
@media (max-width: 1024px) {
}

@media (max-width: 600px) {
}

/* 响应式 */
@media (max-width: 768px) {
}

/* ==================== 管理后台样式（自原版 sf-admin.css 并入） ==================== */

/* ==================== 小尺寸表单控件 ==================== */
.form-control-sm,
input.form-control-sm,
select.form-control-sm {
    height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-1);
    border-radius: 8px;
    background: white;
    color: var(--text-1);
    transition: all 0.2s;
}

.form-control-sm:focus {
    outline: 0;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg-10);
}

select.form-control-sm {
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    appearance: none;
}

[data-theme="dark"] .form-control-sm,
[data-theme="dark"] input.form-control-sm,
[data-theme="dark"] select.form-control-sm {
    background: var(--bg-3);
    border-color: var(--border-2);
}

[data-theme="dark"] select.form-control-sm option {
    background: var(--gray-800);
    color: var(--color-white);
}

.status-value.success {
    color: var(--color-success);
}

.status-value.warning {
    color: var(--color-warning);
}

.status-value.error {
    color: var(--color-danger);
}

.status-value.danger {
    color: var(--color-danger);
}

.status-value.info {
    color: var(--color-info);
}

/* 环形图容器 */
.usage-rings {
    display: flex;
    justify-content: flex-start;
    gap: 200px;
    width: 100%;
    flex-wrap: wrap;
}

.usage-ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.usage-ring-label {
    font-size: 0.85rem;
    /* font-weight: 600; */
    color: var(--text-3);
}

/* SVG 环形图样式 */
.quota-ring {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.quota-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.quota-ring .ring-bg {
    fill: none;
    stroke: var(--bg-3);
    stroke-width: 8;
}

.quota-ring .ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.quota-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quota-percent {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-1);
}

.quota-label {
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    margin-top: 2px;
}

/* 请求使用进度卡片 */
.usage-progress-card {
    flex: 1 1 400px;
    min-width: 0;
    background: transparent;
    border: 1px solid var(--border-1);
    border-radius: 12px;
    padding: 16px 16px;
}

.usage-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.usage-progress-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-3);
}

.usage-progress-ratio {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-3);
}

.usage-progress-divider {
    margin: 0 6px;
    color: var(--text-3);
    font-weight: 400;
}

.usage-progress-bar {
    position: relative;
    height: 10px;
    background: var(--bg-3);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.usage-progress-segment.workers {
    background: var(--success-gradient);
}

.usage-progress-segment.pages {
    background: var(--info-gradient);
    margin-left: -1px;
}

.usage-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.usage-progress-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.legend-tag {
    font-size: 0.85rem;
    font-weight: 500;
}

.legend-tag.workers {
    color: var(--text-3);
    font-weight: 500;
}

.legend-tag.pages {
    color: var(--text-3);
    font-weight: 500;
}

.legend-sep {
    margin: 0 4px;
    color: var(--text-3);
    font-weight: 400;
    font-size: 0.85rem;
}

.legend-tag.progress {
    color: var(--text-3);
}

/* 使用情况面板 - 深色模式适配 */
[data-theme="dark"] .quota-ring .ring-bg {
    stroke: var(--border-2);
}

/* 新版使用情况面板 - 环形图顶部布局 */
.usage-rings-top {
    display: flex;
    justify-content: flex-start;
    gap: 200px;
    padding: 20px 0 0;
    margin-bottom: 1.5rem;
}

.usage-stat-icon.red {
    background: var(--color-danger-bg-15);
    color: var(--color-danger);
}

.usage-stat-value.red {
    color: var(--color-danger);
}

[data-theme="dark"] .usage-progress-card {
    background: transparent;
    border-color: var(--border-1);
}

[data-theme="dark"] .usage-progress-bar {
    background: var(--border-2);
}

/* ==================== 二维码容器 ==================== */
#qrcode-container,
#guest-qrcode-container {
    background: var(--color-white);
    padding: 12px;
    border-radius: 12px;
    width: fit-content;
    margin: 1.5rem auto 0px auto;
}

#qrcode-container canvas,
#guest-qrcode-container canvas {
    display: block;
}

/* ==================== 配置导入导出按钮组 ==================== */
.config-actions {
    display: flex;
    gap: 10px;
}

.guest-bar-icon.total svg {
    stroke: var(--color-indigo);
}

.guest-bar-icon.active svg {
    stroke: var(--color-success);
}

.guest-bar-fill.total {
    background: linear-gradient(90deg, var(--color-orange), var(--color-orange));
}

.guest-bar-fill.active {
    background: linear-gradient(90deg, var(--color-success), var(--color-success));
}

/* 图例圆点 */
.legend-dot.active {
    background: var(--color-success);
}

/* ==================== 系统状态栏 ==================== */
.system-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    margin: 8px 8px 16px 8px;
    box-shadow:
        0 1px 2px var(--bg-2),
        0 2px 4px var(--bg-2),
        0 4px 8px var(--bg-2),
        0 8px 16px var(--bg-2);
}

.status-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-bar-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-dot 2s infinite;
}

.status-bar-indicator.error {
    background: var(--color-danger);
}

.status-bar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-1);
}

.status-bar-items {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-bar-icon {
    font-size: 0.9rem;
}

.status-bar-label {
    font-size: 0.8rem;
    color: var(--text-3);
}

.status-bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    background: var(--bg-2);
    padding: 4px 10px;
    border-radius: 6px;
}

.status-bar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-1);
}

/* 脉动动画 */
@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ==================== 开关组件 ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-1);
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px var(--color-black-30);
}

.switch input:checked+.slider {
    background: var(--color-primary);
}

.switch input:checked+.slider:before {
    transform: translateX(22px);
}

/* 设置项样式 */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-item:first-child {
    padding-top: 0;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-1);
}

.setting-desc {
    font-size: 0.9rem;
    color: var(--text-3);
}

.modal-lg {
    max-width: 600px;
}

/* ==================== 后端状态 ==================== */
.backend-groups {
    display: flex;
    gap: 12px;
}

.backend-group {
    flex: 1;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-1);
    overflow: hidden;
}

.backend-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    padding: 4px 4px 0;
    margin: 8px 10px 0;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    width: fit-content;
}

.backend-group-content {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    gap: 10px;
}

.backend-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.backend-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-3);
    white-space: nowrap;
}

.backend-field-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.backend-field-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
}

.backend-field-value.on {
    color: var(--color-primary);
}

.backend-field-value.off {
    color: var(--color-primary);
}

.backend-field-value.success {
    color: var(--color-success);
}

.backend-field-value.proxyip {
    color: var(--color-success);
}

[data-theme="dark"] #view-cdkmgmt > .card,
[data-theme="dark"] #view-announcement > .card {
    background: rgba(30, 30, 30, 0.8) !important;
}

/* ==================== Cloudflare 账号卡片 ==================== */
.cf-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin: 0;
}

.cf-account-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    border: 1px solid var(--border-1);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cf-account-card:hover {
    box-shadow: 0 8px 24px var(--color-primary-bg-10);
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

/* 卡片头部 */
.cf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px;
    border-bottom: 1px solid var(--border-1);
}

.cf-card-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 卡片状态标签 */
.cf-card-status.normal {
    background: var(--color-success-bg-15);
    color: var(--color-success);
}

.cf-card-status.error {
    background: var(--color-danger-bg-15);
    color: var(--color-danger);
}

/* 账号禁用态：仅状态点置灰标识，卡片本身不做置灰（#999 固定值：明暗主题下深浅一致，避免暗色过深） */
.cf-account-card.disabled .cf-status-dot {
    background: #999;
    box-shadow: none;
}

/* 卡片信息区 */
.cf-card-info {
    padding: 0;
    overflow: hidden;
}

/* 账号信息区 - 无背景 */
.cf-card-account {
    padding: 16px;
    border-radius: 12px;
}

.cf-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cf-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
}

.cf-card-avatar .cf-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-success);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 6px var(--color-success-shadow);
}

.cf-card-avatar .cf-status-dot.error {
    background: var(--color-danger);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.cf-card-name {
    flex: 1;
}

.cf-card-name h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-1);
    display: flex;
    align-items: center;
}

.cf-card-name p {
    font-size: 0.85rem;
    color: var(--text-3);
    margin: 0;
}

/* 部署方式（Workers / Pages）徽标 */
.cf-deploy-badge {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--primary-12);
    color: var(--color-primary);
}

/* 标题行右侧的子后端版本号：与 Workers 徽标同线靠右，绿色区分 */
.cf-card-version {
    margin-left: auto;
    background: var(--color-success-bg-15);
    color: var(--color-success);
}

/* 卡片详情 */
.cf-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.cf-card-row .label {
    color: var(--text-3);
}

.cf-card-row .value {
    color: var(--text-1);
    font-weight: 500;
}

/* 使用量区域 - 两个独立卡片 */
.cf-card-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.cf-stat-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-1);
}

/* 使用量进度条 */
.cf-card-usage {
    margin-bottom: 0;
}

.cf-usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.cf-usage-header .label {
    color: var(--text-3);
    font-weight: 500;
}

.cf-usage-header .percent {
    font-weight: 500;
}

.cf-usage-header .percent.normal {
    color: var(--color-success);
}

.cf-usage-header .percent.warning {
    color: var(--color-warning);
}

.cf-usage-header .percent.danger {
    color: var(--color-danger);
}

.cf-usage-fill.normal {
    background: var(--success-gradient);
}

.cf-usage-bar {
    height: 8px;
    background: var(--bg-2);
    border-radius: 4px;
    overflow: hidden;
}

.cf-usage-fill {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 4px;
    transition: width 0.3s;
}

.cf-usage-fill.warning {
    background: linear-gradient(90deg, var(--color-warning), #f59e0b);
}

.cf-usage-fill.danger {
    background: linear-gradient(90deg, var(--color-danger), #c82333);
}

.cf-usage-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-3);
}

/* Workers/Pages 统计 */
.cf-card-wp {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cf-wp-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-wp-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.cf-wp-label {
    font-size: 0.8rem;
    color: var(--text-3);
    width: 55px;
    flex-shrink: 0;
}

.cf-wp-bar {
    flex: 1;
    height: 6px;
    background: var(--border-1);
    border-radius: 3px;
    overflow: hidden;
}

.cf-wp-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

.cf-wp-value {
    font-size: 0.8rem;
    color: var(--text-3);
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.cf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-1);
}

.cf-card-time {
    font-size: 0.75rem;
    color: var(--text-3);
}

.cf-card-actions {
    display: flex;
    gap: 8px;
}

.cf-card-actions button {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-primary-bg-10);
    color: var(--color-primary);
}

/* 账号禁用态：电源按钮红色，悬停红色加深（点击可重新启用） */
.cf-card-actions button.off {
    background: var(--color-danger-bg-10);
    color: var(--color-danger);
}

.cf-card-actions button.off:hover {
    background: var(--color-danger-bg-20);
    color: var(--color-danger);
}

.cf-card-actions button:hover {
    background: var(--color-primary-bg-10);
    color: var(--color-primary);
}

.cf-card-actions button.danger:hover {
    background: var(--color-danger-bg-10);
    color: var(--color-danger);
}

/* ==================== 头部图标按钮 ==================== */
.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-primary);
}

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

.header-icon-btn:hover {
    background: var(--color-primary-bg-10);
    transform: translateY(-1px);
}

/* 提醒项样式 */
.alert-item.warning {
    border-left-color: var(--color-warning);
}

.alert-item.danger {
    border-left-color: var(--color-danger);
}

.alert-item.success {
    border-left-color: var(--color-success);
}

/* 深色模式适配 */
[data-theme="dark"] #view-cdkmgmt > .card,
[data-theme="dark"] #view-announcement > .card {
    background: var(--bg-2) !important;
}

.rate-config.show {
    display: block;
}

/* 隐藏数字输入框的上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.stat-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.stat-tab-content.active {
    display: block;
}

/* ==================== 响应式适配 ==================== */
/* 所有响应式样式统一放在文件末尾，便于维护 */

@media (max-width: 1200px) {
    .usage-rings,
    .usage-rings-top {
        gap: 80px;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .usage-rings,
    .usage-rings-top {
        gap: 40px;
    }

    .quota-ring {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .usage-rings-top {
        gap: 30px;
        flex-wrap: wrap;
    }

    .sidebar .node-switch .node-name {
        display: block;
    }

    .card-body {
        padding: 1rem;
    }

    .system-status-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 14px 16px;
        gap: 10px;
    }

    .status-bar-divider {
        display: none;
    }
}

@media (max-width: 600px) {
    .usage-rings,
    .usage-rings-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        justify-items: center;
    }

    .usage-ring-item {
        justify-self: center;
    }

    .usage-ring-item:last-child,
    .usage-rings-top .usage-ring-item:nth-child(3) {
        justify-self: center;
        grid-column: 1;
    }

    .quota-ring {
        width: 100px;
        height: 100px;
    }

    .quota-percent {
        font-size: 1.1rem;
    }

}

@media (max-width: 480px) {
    .content {
        padding: 10px;
    }

    .card-body {
        padding: 0.8rem;
    }

    .card-header {
        padding: 0.6rem 1rem;
    }

    .usage-rings,
    .usage-rings-top {
        gap: 20px 0;
    }

    .quota-percent {
        font-size: 1.2rem;
    }

    .system-status-bar {
        padding: 12px 14px;
    }

    .status-bar-value {
        padding: 3px 8px;
        font-size: 0.8rem;
    }

}

@media (max-width: 600px) {
}

@media (max-width: 600px) {
}

@media (max-width: 768px) {
    .cf-accounts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .backend-groups {
        flex-direction: column;
    }
}

/* ==================== 使用说明步骤（自 user.css 并入，节点订阅页用） ==================== */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
}

.guide-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, var(--color-primary), var(--color-primary-light)));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--color-primary-shadow);
}

.guide-step-content {
    flex: 1;
    padding-top: 4px;
}

.guide-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
}

.guide-step-desc {
    font-size: 0.85rem;
    color: var(--text-3);
    line-height: 1.5;
}

.guide-step-line {
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-bg-20));
    margin-left: 15px;
    border-radius: 1px;
}

/* 推荐客户端 */
.guide-clients {
    background: var(--color-primary-bg-5);
    border-radius: 12px;
    padding: 16px;
}

.guide-clients-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 12px;
}

.guide-clients-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-client-tag {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--color-primary-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-primary);
    transition: all 0.2s;
}

.guide-client-tag:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-bg-5);
}

@media (max-width: 768px) {
    .guide-step { gap: 12px; padding: 12px 0; }
    .guide-client-tag { padding: 5px 10px; font-size: 0.75rem; }
}

/* 下拉面板选项：hover 高亮（链式代理 / 节点地区过滤共用） */
#chainRegionPop label:hover, #chainList label:hover, #subRegionPop label:hover { background: var(--color-primary-bg-10); }

/* 下拉面板滚动条：默认彻底隐藏（无占位，内容填充到最宽），hover 显示 */
.ms-panel, #chainRegionPop, #chainList, #subRegionPop { scrollbar-width: none; }
.ms-panel::-webkit-scrollbar, #chainRegionPop::-webkit-scrollbar, #chainList::-webkit-scrollbar, #subRegionPop::-webkit-scrollbar { display: none; }
.ms-panel:hover, #chainRegionPop:hover, #chainList:hover, #subRegionPop:hover { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
.ms-panel:hover::-webkit-scrollbar, #chainRegionPop:hover::-webkit-scrollbar, #chainList:hover::-webkit-scrollbar, #subRegionPop:hover::-webkit-scrollbar { display: block; width: 6px; height: 6px; }
.ms-panel:hover::-webkit-scrollbar-thumb, #chainRegionPop:hover::-webkit-scrollbar-thumb, #chainList:hover::-webkit-scrollbar-thumb, #subRegionPop:hover::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
