/* ============================================================
   FC UI 重建样式表 (fc-ui-rebuild.css)
   ------------------------------------------------------------
   用途: 为 index-zenKR-7B.js（新 UI bundle）提供缺失的 CSS。
   该 bundle 只导出 JS，未随附 CSS；本文件依据 bundle 内的
   类名使用、--fc-* 变量引用与硬编码设计信号重建：
     - 33 个设计令牌（暗色默认 + 亮色变体，经 [data-theme] 切换）
     - 117 个 fc-* 类（工具类 + 组件类 + 修饰符）
   设计语言（从 bundle 提取）: 深色玻璃拟态、海军蓝底、
   石板灰文字、紫罗兰强调、蓝/绿/黄/红语义色。
   注意: 组件内部细节（间距/圆角取值）为按设计信号推断，
   与供应商原始构建可能略有差异；拿到官方 CSS 后应替换。
   ============================================================ */

/* ========== 0. 全局盒模型 ==========
   bundle 内联样式普遍采用 width:100% + padding 的写法，
   原构建必然带全局 border-box；缺失会导致横向溢出（如
   ctrl-screen-area 内 width:100%;padding:0 4px 的 div 溢出 8px）。 */
*, *::before, *::after { box-sizing: border-box; }

/* ========== 1. 设计令牌 ========== */
:root,
[data-theme="dark"] {
  /* 色彩 */
  --fc-bg: #12121f;
  --fc-surface: rgba(255, 255, 255, 0.04);
  --fc-surface-hi: rgba(255, 255, 255, 0.07);
  --fc-elevated: rgba(26, 26, 46, 0.92);
  --fc-border: rgba(255, 255, 255, 0.09);
  --fc-border-soft: rgba(255, 255, 255, 0.05);
  --fc-border-hi: rgba(255, 255, 255, 0.14);
  --fc-text: #e2e8f0;
  --fc-text-hi: #ffffff;
  --fc-text-lo: #94a3b8;
  --fc-text-mute: #64748b;
  --fc-primary: #8b5cf6;
  --fc-primary-hi: #a78bfa;
  --fc-accent: #8870a0;
  --fc-success: #34d399;
  --fc-warn: #fbbf24;
  --fc-danger: #f87171;
  --fc-grad-primary: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --fc-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);

  /* 间距（4px 基数） */
  --fc-space-2: 8px;
  --fc-space-3: 12px;
  --fc-space-4: 16px;
  --fc-space-5: 20px;
  --fc-space-6: 24px;
  --fc-space-7: 28px;
  --fc-space-9: 36px;

  /* 圆角 */
  --fc-radius-md: 8px;
  --fc-radius-lg: 14px;

  /* 字号 */
  --fc-text-xs: 12px;
  --fc-text-sm: 13px;
  --fc-text-lg: 16px;
  --fc-text-3xl: 30px;

  /* 层级 / 其他 */
  --fc-z-sticky: 100;
  --fc-adb-view-scale: 1;
}

[data-theme="light"] {
  --fc-bg: #f1f5f9;
  --fc-surface: rgba(15, 23, 42, 0.03);
  --fc-surface-hi: rgba(15, 23, 42, 0.06);
  --fc-elevated: rgba(255, 255, 255, 0.95);
  --fc-border: rgba(15, 23, 42, 0.10);
  --fc-border-soft: rgba(15, 23, 42, 0.06);
  --fc-border-hi: rgba(15, 23, 42, 0.18);
  --fc-text: #334155;
  --fc-text-hi: #0f172a;
  --fc-text-lo: #64748b;
  --fc-text-mute: #94a3b8;
  --fc-primary: #7c3aed;
  --fc-primary-hi: #6d28d9;
  --fc-accent: #8870a0;
  --fc-success: #059669;
  --fc-warn: #d97706;
  --fc-danger: #dc2626;
  --fc-grad-primary: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --fc-shadow: 0 8px 32px rgba(15, 23, 42, 0.10);
}

/* ========== 2. 基础 ========== */
[data-theme] body, body {
  margin: 0;
  background: var(--fc-bg);
  color: var(--fc-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
#root { min-height: 100vh; }

/* ========== 3. 布局工具类 ========== */
.fc-flex { display: flex; }
.fc-items-center { align-items: center; }
.fc-justify-between { justify-content: space-between; }
.fc-justify-center { justify-content: center; }
.fc-gap-2 { gap: var(--fc-space-2); }
.fc-gap-3 { gap: var(--fc-space-3); }
.fc-gap-4 { gap: var(--fc-space-4); }

/* ========== 4. 文字工具类 ========== */
.fc-text-xs { font-size: var(--fc-text-xs); }
.fc-text-sm { font-size: var(--fc-text-sm); }
.fc-text-lg { font-size: var(--fc-text-lg); }
.fc-text-3xl { font-size: var(--fc-text-3xl); }
.fc-text-hi { color: var(--fc-text-hi); }
.fc-text-lo { color: var(--fc-text-lo); }
.fc-text-mute { color: var(--fc-text-mute); }
.fc-font-mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }

/* ========== 5. 色彩/表面工具类 ========== */
.fc-primary { color: var(--fc-primary); }
.fc-accent { color: var(--fc-accent); }
.fc-success { color: var(--fc-success); }
.fc-warn { color: var(--fc-warn); }
.fc-danger { color: var(--fc-danger); }
.fc-bg { background: var(--fc-bg); }
.fc-surface { background: var(--fc-surface); }
.fc-border { border: 1px solid var(--fc-border); }
.fc-border-soft { border: 1px solid var(--fc-border-soft); }
.fc-border-hi { border: 1px solid var(--fc-border-hi); }
.fc-radius-md { border-radius: var(--fc-radius-md); }
.fc-radius-lg { border-radius: var(--fc-radius-lg); }
.fc-shadow { box-shadow: var(--fc-shadow); }
.fc-elevated { background: var(--fc-elevated); box-shadow: var(--fc-shadow); }
.fc-z-sticky { z-index: var(--fc-z-sticky); }
.fc-adb-view-scale { transform: scale(var(--fc-adb-view-scale)); transform-origin: top center; }
.fc-grad-primary { background: var(--fc-grad-primary); }

/* ========== 6. 按钮 ========== */
.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--fc-space-4);
  border: 1px solid transparent;
  border-radius: var(--fc-radius-md);
  background: var(--fc-surface);
  color: var(--fc-text);
  font-size: var(--fc-text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  user-select: none;
  white-space: nowrap;
}
.fc-btn:hover { filter: brightness(1.15); }
.fc-btn:active { filter: brightness(0.95); transform: translateY(1px); }
.fc-btn:focus-visible { outline: 2px solid var(--fc-primary); outline-offset: 2px; }
.fc-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }

.fc-btn--primary { background: var(--fc-grad-primary); color: #fff; border-color: transparent; }
.fc-btn--secondary { background: var(--fc-surface-hi); border-color: var(--fc-border); color: var(--fc-text); }
.fc-btn--ghost { background: transparent; border-color: var(--fc-border); color: var(--fc-text-lo); }
.fc-btn--ghost:hover { color: var(--fc-text-hi); border-color: var(--fc-border-hi); background: var(--fc-surface); }
.fc-btn--accent { background: var(--fc-accent); color: #fff; }
.fc-btn--danger { background: var(--fc-danger); color: #fff; }
.fc-btn--link { background: transparent; color: var(--fc-primary); padding: 0 4px; height: auto; }
.fc-btn--link:hover { text-decoration: underline; filter: none; }
.fc-btn--icon { width: 36px; padding: 0; }
.fc-btn--sm { height: 28px; padding: 0 var(--fc-space-3); font-size: var(--fc-text-xs); }
.fc-btn--sm.fc-btn--icon { width: 28px; }
.fc-btn--lg { height: 44px; padding: 0 var(--fc-space-6); font-size: var(--fc-text-lg); }

/* ========== 7. 卡片 ========== */
.fc-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}
.fc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fc-space-4) var(--fc-space-5);
  border-bottom: 1px solid var(--fc-border-soft);
}
.fc-card-body { padding: var(--fc-space-5); }
.fc-card-footer {
  padding: var(--fc-space-3) var(--fc-space-5);
  border-top: 1px solid var(--fc-border-soft);
  color: var(--fc-text-mute);
  font-size: var(--fc-text-xs);
}
.fc-card-title { margin: 0; font-size: var(--fc-text-lg); font-weight: 600; color: var(--fc-text-hi); }
.fc-card-subtitle { margin: 2px 0 0; font-size: var(--fc-text-xs); color: var(--fc-text-mute); }

/* ========== 8. 标签 ========== */
.fc-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--fc-space-2);
  border-radius: 999px;
  font-size: var(--fc-text-xs);
  background: var(--fc-surface-hi);
  border: 1px solid var(--fc-border);
  color: var(--fc-text-lo);
  white-space: nowrap;
}
.fc-tag--primary { color: var(--fc-primary-hi); border-color: color-mix(in srgb, var(--fc-primary) 45%, transparent); background: color-mix(in srgb, var(--fc-primary) 12%, transparent); }
.fc-tag--success { color: var(--fc-success); border-color: color-mix(in srgb, var(--fc-success) 45%, transparent); background: color-mix(in srgb, var(--fc-success) 12%, transparent); }
.fc-tag--warn { color: var(--fc-warn); border-color: color-mix(in srgb, var(--fc-warn) 45%, transparent); background: color-mix(in srgb, var(--fc-warn) 12%, transparent); }
.fc-tag--danger { color: var(--fc-danger); border-color: color-mix(in srgb, var(--fc-danger) 45%, transparent); background: color-mix(in srgb, var(--fc-danger) 12%, transparent); }
.fc-tag--neutral { color: var(--fc-text-mute); }

/* ========== 9. 表单控件 ========== */
.fc-input,
.fc-select,
.fc-textarea {
  width: 100%;
  height: 36px;
  padding: 0 var(--fc-space-3);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  color: var(--fc-text);
  font-size: var(--fc-text-sm);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fc-textarea { height: auto; min-height: 80px; padding: var(--fc-space-2) var(--fc-space-3); resize: vertical; line-height: 1.6; }
.fc-input:focus,
.fc-select:focus,
.fc-textarea:focus { border-color: var(--fc-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-primary) 18%, transparent); }
.fc-input::placeholder,
.fc-textarea::placeholder { color: var(--fc-text-mute); }
.fc-input:disabled { opacity: 0.5; cursor: not-allowed; }
.fc-select { appearance: none; cursor: pointer; }

.fc-field { display: flex; flex-direction: column; gap: 6px; }
.fc-field-label { font-size: var(--fc-text-sm); color: var(--fc-text-lo); }
.fc-field-hint { font-size: var(--fc-text-xs); color: var(--fc-text-mute); }
.fc-field-error { font-size: var(--fc-text-xs); color: var(--fc-danger); }

/* ========== 10. 复选框 / 开关 ========== */
.fc-check { display: inline-flex; align-items: center; gap: var(--fc-space-2); cursor: pointer; user-select: none; }
.fc-check-box {
  width: 16px; height: 16px;
  border: 1px solid var(--fc-border-hi);
  border-radius: 4px;
  background: var(--fc-surface);
  display: inline-block;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fc-check input:checked + .fc-check-box,
.fc-check-box:has(input:checked) { background: var(--fc-primary); border-color: var(--fc-primary); }
.fc-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.fc-switch { display: inline-flex; align-items: center; cursor: pointer; }
.fc-switch-track {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--fc-surface-hi);
  border: 1px solid var(--fc-border);
  position: relative;
  transition: background 0.2s ease;
}
.fc-switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--fc-text-lo);
  transition: transform 0.2s ease, background 0.2s ease;
}
.fc-switch--on .fc-switch-track,
.fc-switch-track:has(input:checked) { background: var(--fc-primary); border-color: var(--fc-primary); }
.fc-switch--on .fc-switch-track::after,
.fc-switch-track:has(input:checked)::after { transform: translateX(18px); background: #fff; }

/* ========== 11. 选项卡 ========== */
.fc-tabs { display: flex; flex-direction: column; gap: var(--fc-space-4); }
.fc-tabs-list { display: flex; gap: var(--fc-space-2); border-bottom: 1px solid var(--fc-border-soft); }
.fc-tab {
  padding: var(--fc-space-2) var(--fc-space-4);
  border: none;
  background: transparent;
  color: var(--fc-text-lo);
  font-size: var(--fc-text-sm);
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.fc-tab:hover { color: var(--fc-text-hi); }
.fc-tab--active,
.fc-tab.fc-tab--active { color: var(--fc-primary-hi); border-bottom-color: var(--fc-primary); }

/* ========== 12. 统计块 ========== */
.fc-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--fc-space-4);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
}
.fc-stat-label { font-size: var(--fc-text-xs); color: var(--fc-text-mute); }
.fc-stat-value { font-size: var(--fc-text-3xl); font-weight: 700; color: var(--fc-text-hi); line-height: 1.2; }
.fc-stat-delta { font-size: var(--fc-text-xs); }
.fc-stat-delta--up { color: var(--fc-success); }
.fc-stat-delta--down { color: var(--fc-danger); }
.fc-stat-delta--flat { color: var(--fc-text-mute); }

/* ========== 13. 警告框 ========== */
.fc-alert {
  display: flex;
  gap: var(--fc-space-3);
  padding: var(--fc-space-3) var(--fc-space-4);
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
}
.fc-alert-icon { flex-shrink: 0; font-size: var(--fc-text-lg); line-height: 1.4; }
.fc-alert-title { font-weight: 600; color: var(--fc-text-hi); font-size: var(--fc-text-sm); }
.fc-alert--info { border-color: color-mix(in srgb, var(--fc-primary) 40%, transparent); background: color-mix(in srgb, var(--fc-primary) 8%, transparent); }
.fc-alert--success { border-color: color-mix(in srgb, var(--fc-success) 40%, transparent); background: color-mix(in srgb, var(--fc-success) 8%, transparent); }
.fc-alert--warn { border-color: color-mix(in srgb, var(--fc-warn) 40%, transparent); background: color-mix(in srgb, var(--fc-warn) 8%, transparent); }
.fc-alert--danger { border-color: color-mix(in srgb, var(--fc-danger) 40%, transparent); background: color-mix(in srgb, var(--fc-danger) 8%, transparent); }

/* ========== 14. 进度条 / 骨架屏 / 旋转器 ========== */
.fc-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--fc-surface-hi);
  overflow: hidden;
}
.fc-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--fc-grad-primary);
  transition: width 0.3s ease;
}
.fc-progress--success .fc-progress-bar { background: linear-gradient(135deg, var(--fc-success), color-mix(in srgb, var(--fc-success) 70%, #000)); }
.fc-progress--warn .fc-progress-bar { background: linear-gradient(135deg, var(--fc-warn), color-mix(in srgb, var(--fc-warn) 70%, #000)); }

.fc-skeleton {
  border-radius: var(--fc-radius-md);
  background: linear-gradient(90deg, var(--fc-surface) 25%, var(--fc-surface-hi) 50%, var(--fc-surface) 75%);
  background-size: 200% 100%;
  animation: fc-skeleton-loading 1.4s ease infinite;
}
@keyframes fc-skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.fc-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--fc-border-hi);
  border-top-color: var(--fc-primary);
  border-radius: 50%;
  animation: fc-spin 0.8s linear infinite;
  display: inline-block;
}
.fc-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* ========== 15. 徽章/圆点/KBD/分隔线/头像 ========== */
.fc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--fc-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.fc-badge--primary { background: var(--fc-primary); }
.fc-badge--success { background: var(--fc-success); }
.fc-badge--danger { background: var(--fc-danger); }

.fc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fc-text-mute); display: inline-block; flex-shrink: 0; }
.fc-dot.fc-success { background: var(--fc-success); }
.fc-dot.fc-danger { background: var(--fc-danger); }
.fc-dot.fc-warn { background: var(--fc-warn); }
.fc-dot.fc-primary { background: var(--fc-primary); }

.fc-kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--fc-border-hi);
  border-bottom-width: 2px;
  background: var(--fc-surface-hi);
  color: var(--fc-text-lo);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
}

.fc-divider { border: none; border-top: 1px solid var(--fc-border-soft); margin: var(--fc-space-4) 0; }

.fc-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--fc-grad-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fc-text-xs);
  font-weight: 600;
  flex-shrink: 0;
}
.fc-avatar--sm { width: 24px; height: 24px; font-size: 11px; }
.fc-avatar--lg { width: 44px; height: 44px; font-size: var(--fc-text-lg); }
.fc-avatar-group { display: inline-flex; }
.fc-avatar-group .fc-avatar { border: 2px solid var(--fc-bg); margin-left: -8px; }
.fc-avatar-group .fc-avatar:first-child { margin-left: 0; }

/* ========== 16. 空状态 / 表格 ========== */
.fc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fc-space-2);
  padding: var(--fc-space-9) var(--fc-space-4);
  color: var(--fc-text-mute);
  text-align: center;
}
.fc-empty-icon { font-size: 40px; opacity: 0.6; }
.fc-empty-title { font-size: var(--fc-text-sm); color: var(--fc-text-lo); }
.fc-empty-desc { font-size: var(--fc-text-xs); }

.fc-table-wrap { overflow-x: auto; border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); }
.fc-table { width: 100%; border-collapse: collapse; font-size: var(--fc-text-sm); }
.fc-table th {
  text-align: left;
  padding: var(--fc-space-3) var(--fc-space-4);
  color: var(--fc-text-mute);
  font-weight: 500;
  border-bottom: 1px solid var(--fc-border-soft);
  white-space: nowrap;
}
.fc-table td { padding: var(--fc-space-3) var(--fc-space-4); border-bottom: 1px solid var(--fc-border-soft); color: var(--fc-text); }
.fc-table tbody tr:last-child td { border-bottom: none; }
.fc-table tbody tr:hover { background: var(--fc-surface); }

/* ========== 17. Toast（含 cssText 兜底，双保险） ========== */
.fc-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 12px 28px;
  border-radius: var(--fc-radius-md);
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border-hi);
  box-shadow: var(--fc-shadow);
  color: var(--fc-text-hi);
  font-size: var(--fc-text-sm);
  backdrop-filter: blur(12px);
}
.fc-center-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
}

/* ========== 18. 滚动条（深色玻璃风） ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }
::-webkit-scrollbar-track { background: transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.18); }

/* ========== 19. 登录页（login-page / orb / grid-overlay / login-card） ========== */
.login-page {
  position: relative;
  min-height: 100vh;
  background: var(--fc-bg);
  overflow: hidden;
}
/* 背景光球：紫/蓝/金三色，缓慢漂浮 */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 480px; height: 480px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, #9333ea 0%, transparent 70%);
  animation: fc-orb-float-1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 560px; height: 560px;
  bottom: -180px; right: -140px;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
  animation: fc-orb-float-2 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 380px; height: 380px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, #fbbf24 0%, transparent 70%);
  opacity: 0.28;
  animation: fc-orb-float-3 26s ease-in-out infinite alternate;
}
@keyframes fc-orb-float-1 { to { transform: translate(90px, 70px) scale(1.12); } }
@keyframes fc-orb-float-2 { to { transform: translate(-80px, -60px) scale(0.92); } }
@keyframes fc-orb-float-3 { to { transform: translate(-110px, 50px) scale(1.08); } }

/* 网格叠加层 */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* 登录容器 */
.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--fc-space-6);
  gap: var(--fc-space-5);
}
.login-header { text-align: center; }
.login-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--fc-grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--fc-primary-hi);
}
.login-header p {
  margin: 6px 0 0;
  font-size: var(--fc-text-xs);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--fc-text-mute);
}

/* 登录卡片（玻璃拟态 + 四角装饰） */
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: var(--fc-space-7) var(--fc-space-6) var(--fc-space-5);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  box-shadow: var(--fc-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-4);
}
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--fc-primary);
  opacity: 0.85;
}
.corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }

.welcome {
  text-align: center;
  font-size: var(--fc-text-lg);
  font-weight: 600;
  color: var(--fc-text-hi);
  letter-spacing: 0.5px;
}
.welcome b { color: var(--fc-primary-hi); margin: 0 4px; }

.login-error {
  padding: var(--fc-space-2) var(--fc-space-3);
  border-radius: var(--fc-radius-md);
  border: 1px solid color-mix(in srgb, var(--fc-danger) 45%, transparent);
  background: color-mix(in srgb, var(--fc-danger) 10%, transparent);
  color: var(--fc-danger);
  font-size: var(--fc-text-sm);
  text-align: center;
}

/* 登录表单 */
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fc-text-sm);
  color: var(--fc-text-lo);
}
.login-card input {
  width: 100%;
  height: 42px;
  padding: 0 var(--fc-space-3);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  color: var(--fc-text-hi);
  font-size: var(--fc-text-sm);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-card input:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-primary) 18%, transparent);
}
.login-card input::placeholder { color: var(--fc-text-mute); }
.login-card button {
  width: 100%;
  height: 44px;
  margin-top: var(--fc-space-2);
  border: none;
  border-radius: var(--fc-radius-md);
  background: var(--fc-grad-primary);
  color: #fff;
  font-size: var(--fc-text-lg);
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 2px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.login-card button:hover { filter: brightness(1.12); }
.login-card button:active { transform: translateY(1px); }
.login-card button:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.login-card footer {
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--fc-text-mute);
}

/* Telegram 二步验证 */
.telegram-verify { display: flex; flex-direction: column; align-items: center; gap: var(--fc-space-3); text-align: center; }
.telegram-verify-icon { font-size: 34px; color: var(--fc-primary-hi); }
.telegram-verify h2 { margin: 0; font-size: var(--fc-text-lg); color: var(--fc-text-hi); }
.telegram-verify-tip { margin: 0; font-size: var(--fc-text-sm); color: var(--fc-text-lo); }
.telegram-code-inputs { display: flex; gap: var(--fc-space-2); justify-content: center; }
.telegram-code-inputs input {
  width: 44px; height: 52px;
  text-align: center;
  font-size: 22px;
  font-family: ui-monospace, Consolas, monospace;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  color: var(--fc-text-hi);
  outline: none;
}
.telegram-code-inputs input:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-primary) 18%, transparent);
}
.telegram-countdown { font-size: var(--fc-text-sm); color: var(--fc-text-mute); font-family: ui-monospace, Consolas, monospace; }
.telegram-countdown.warning { color: var(--fc-warn); }
.telegram-back-btn {
  background: transparent !important;
  border: 1px solid var(--fc-border) !important;
  color: var(--fc-text-lo) !important;
  letter-spacing: 0 !important;
  font-size: var(--fc-text-sm) !important;
}

/* ========== 20. 顶栏主题开关（theme-toggle / theme-track） ========== */
.theme-toggle { position: relative; display: inline-flex; cursor: pointer; }
.theme-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-track {
  display: inline-flex;
  align-items: center;
  width: 64px; height: 28px;
  border-radius: 999px;
  background: var(--fc-surface-hi);
  border: 1px solid var(--fc-border);
  position: relative;
  transition: background 0.2s ease;
}
.theme-track > span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--fc-text-mute);
  z-index: 1;
  transition: color 0.2s ease;
  user-select: none;
}
.theme-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 28px; height: 22px;
  border-radius: 999px;
  background: var(--fc-grad-primary);
  transition: transform 0.2s ease;
}
.theme-toggle input:checked + .theme-track::after { transform: translateX(32px); }
.theme-toggle input:not(:checked) + .theme-track > span:first-child { color: #fff; }
.theme-toggle input:checked + .theme-track > span:last-child { color: #fff; }

/* ============================================================
   21. 登录后主界面（dashboard-root / rc-shell / ud 组件）
   ------------------------------------------------------------
   布局: 顶栏(48px) + [侧栏(208px) | 主区(滚动)]
   依据 bundle 内 ud 组件的类名使用逐类重建。
   ============================================================ */

/* ---- 21.1 外壳框架 ---- */
.dashboard-root {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--fc-bg);
  color: var(--fc-text);
  font-family: inherit;
}
.dashboard-topbar {
  flex-shrink: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fc-space-4);
  padding: 0 var(--fc-space-4);
  background: rgba(18, 18, 31, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--fc-border);
  position: relative;
  z-index: 20;
}
[data-theme="light"] .dashboard-topbar { background: rgba(255, 255, 255, 0.9); }

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--fc-space-2);
  min-width: 0;
}
.topbar-brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--fc-primary);
  box-shadow: 0 0 8px var(--fc-primary);
  flex-shrink: 0;
}
.topbar-flag { font-size: 14px; flex-shrink: 0; }
.topbar-muted { font-size: var(--fc-text-xs); color: var(--fc-text-mute); white-space: nowrap; }
.topbar-clock {
  font-size: var(--fc-text-xs);
  color: var(--fc-text-lo);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Consolas, monospace;
  white-space: nowrap;
}
.topbar-user { font-size: var(--fc-text-sm); color: var(--fc-text-hi); font-weight: 600; white-space: nowrap; }
.topbar-sep { color: var(--fc-border-hi); }
.topbar-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fc-text-xs);
  color: var(--fc-text-lo);
  white-space: nowrap;
}
.topbar-online b { color: var(--fc-success); font-variant-numeric: tabular-nums; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.status-dot.online { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.7); }
.status-dot.sleeping { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.7); }
.status-dot.offline { background: #64748b; }

.topbar-tz {
  height: 26px;
  max-width: 150px;
  padding: 0 6px;
  font-size: 11px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 6px;
  color: var(--fc-text-lo);
  outline: none;
  cursor: pointer;
}

/* ---- 21.2 侧栏 + 主区 ---- */
.rc-shell {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.rc-sidebar {
  width: 208px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-4);
  padding: var(--fc-space-4) 10px;
  background: rgba(255, 255, 255, 0.015);
  border-right: 1px solid var(--fc-border);
}
[data-theme="light"] .rc-sidebar { background: rgba(15, 23, 42, 0.02); }
.rc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 10px;
  border-bottom: 1px solid var(--fc-border-soft);
}
.rc-brand img { flex-shrink: 0; }
.rc-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--fc-text-hi);
  line-height: 1.1;
}
.rc-sub {
  font-size: 11px;
  color: var(--fc-text-mute);
  letter-spacing: 0.5px;
  margin-top: 1px;
}
.rc-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rc-sidebar nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: var(--fc-radius-md);
  background: transparent;
  color: var(--fc-text-lo);
  font-size: var(--fc-text-sm);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rc-sidebar nav button:hover { background: var(--fc-surface-hi); color: var(--fc-text); }
.rc-sidebar nav button.on {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(109, 40, 217, 0.10));
  color: var(--fc-text-hi);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}
.nav-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  flex-shrink: 0;
  opacity: 0.95;
}
.nav-svg svg { display: block; }
.nav-svg-blue { color: #3b82f6; }
.nav-svg-violet { color: #8b5cf6; }
.nav-svg-slate { color: #94a3b8; }
.nav-svg-rose { color: #f43f5e; }
.nav-svg-cyan { color: #06b6d4; }
.nav-svg-amber { color: #f59e0b; }
.nav-svg-green { color: #22c55e; }
.nav-svg-indigo { color: #6366f1; }
.nav-svg-red { color: #ef4444; }

.rc-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--fc-space-5) var(--fc-space-6);
}

/* ---- 21.3 统计卡片 ---- */
.rc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--fc-space-3);
}
.s-card {
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-2);
  padding: 14px 16px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  position: relative;
  overflow: hidden;
}
.s-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--s-color, var(--fc-primary));
  opacity: 0.85;
}
.s-card-top { display: flex; align-items: center; gap: var(--fc-space-2); }
.s-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--s-color, var(--fc-primary)) 14%, transparent);
  color: var(--s-color, var(--fc-primary));
}
.s-title { font-size: var(--fc-text-xs); color: var(--fc-text-lo); white-space: nowrap; }
.s-val {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fc-text-hi);
  font-variant-numeric: tabular-nums;
}
.s-card.red { --s-color: #ef4444; }
.s-card.green { --s-color: #22c55e; }
.s-card.gray { --s-color: #94a3b8; }
.s-card.indigo { --s-color: #6366f1; }
.s-card.orange { --s-color: #f59e0b; }
.s-card.violet { --s-color: #a855f7; }
.status-mark.red { --s-color: #ef4444; }
.status-mark.green { --s-color: #22c55e; }
.status-mark.gray { --s-color: #94a3b8; }
.status-mark.indigo { --s-color: #6366f1; }
.status-mark.orange { --s-color: #f59e0b; }
.status-mark.violet { --s-color: #a855f7; }

/* ---- 21.4 设备工具条 ---- */
.rc-device-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--fc-space-3);
  margin: var(--fc-space-5) 0 var(--fc-space-4);
}
.rc-top-left {
  display: flex;
  align-items: center;
  gap: var(--fc-space-3);
  flex-wrap: wrap;
  font-size: var(--fc-text-sm);
  color: var(--fc-text-lo);
}
.rc-top-left b { color: var(--fc-text-hi); }
.rc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 250px;
  padding: 0 10px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  transition: border-color 0.15s ease;
}
.rc-search:focus-within { border-color: var(--fc-primary); }
.rc-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fc-text-hi);
  font-size: var(--fc-text-sm);
  font-family: inherit;
}
.rc-search input::placeholder { color: var(--fc-text-mute); }
.rc-search > span { display: inline-flex; color: var(--fc-text-mute); flex-shrink: 0; }
.sel-badge {
  font-size: 11px;
  color: var(--fc-primary-hi);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.32);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.rc-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-top-right select {
  height: 30px;
  padding: 0 8px;
  font-size: var(--fc-text-xs);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 6px;
  color: var(--fc-text-lo);
  outline: none;
  cursor: pointer;
}
.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
}
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--fc-text-mute);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.v-btn:hover { color: var(--fc-text); }
.v-btn.on { background: var(--fc-surface-hi); color: var(--fc-text-hi); }
.rc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-size: var(--fc-text-xs);
  font-family: inherit;
  background: var(--fc-surface-hi);
  border: 1px solid var(--fc-border-hi);
  border-radius: var(--fc-radius-md);
  color: var(--fc-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.rc-btn:hover { border-color: var(--fc-primary); color: var(--fc-text-hi); }
.rc-btn.danger { color: var(--fc-danger); border-color: rgba(248, 113, 113, 0.32); }
.rc-btn.danger:hover { border-color: var(--fc-danger); background: rgba(248, 113, 113, 0.1); }

/* 批量操作条 */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--fc-space-4);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--fc-radius-lg);
  margin-bottom: var(--fc-space-4);
  font-size: var(--fc-text-sm);
  color: var(--fc-text-hi);
}

/* ---- 21.5 分页 ---- */
.data-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--fc-space-3);
  margin-top: var(--fc-space-5);
  padding-top: var(--fc-space-4);
  border-top: 1px solid var(--fc-border-soft);
  font-size: var(--fc-text-xs);
  color: var(--fc-text-lo);
}
.data-pagination-controls { display: flex; align-items: center; gap: 8px; }
.data-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.data-page-size select {
  height: 28px;
  padding: 0 6px;
  font-size: 11px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 6px;
  color: var(--fc-text-lo);
  outline: none;
  cursor: pointer;
}
.data-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  font-size: 11px;
  font-family: inherit;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 7px;
  color: var(--fc-text);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.data-page-btn:hover:not(:disabled) { border-color: var(--fc-primary); }
.data-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.data-page-btn.primary { background: var(--fc-grad-primary); border-color: transparent; color: #fff; }
.data-page-current { font-size: 13px; color: var(--fc-text-hi); padding: 0 4px; font-variant-numeric: tabular-nums; }
.data-page-current small { color: var(--fc-text-mute); }

/* ---- 21.6 设备卡片视图 ---- */
.device-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: var(--fc-space-4);
}
.device-card {
  display: flex;
  flex-direction: column;
  gap: var(--fc-space-3);
  padding: 14px 16px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.device-card:hover { border-color: var(--fc-border-hi); }
.device-card.online { border-color: rgba(34, 197, 94, 0.22); }
.device-card.sleeping { border-color: rgba(245, 158, 11, 0.22); }
.device-card.offline { border-color: rgba(100, 116, 139, 0.2); }
.device-card.sel {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 1px var(--fc-primary), 0 0 24px rgba(139, 92, 246, 0.18);
}
.dc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dc-header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dc-actions-wrap { flex-shrink: 0; }
.dc-id {
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--fc-text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pill.online { color: #4ade80; background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
.pill.sleeping { color: #fbbf24; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.pill.offline { color: #94a3b8; background: rgba(100, 116, 139, 0.14); border-color: rgba(100, 116, 139, 0.3); }
.pill.connecting { color: #fbbf24; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }

.dc-body-with-phone { display: flex; gap: var(--fc-space-4); align-items: stretch; }
.dc-phone-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 92px;
}
.dc-phone-icon { line-height: 0; }
.dc-phone-icon.connecting { animation: fc-pulse 1.6s ease-in-out infinite; }
@keyframes fc-pulse { 50% { opacity: 0.55; } }
.dc-status-pills { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.dc-spill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
}
[data-theme="light"] .dc-spill { background: rgba(15, 23, 42, 0.04); }
.dc-spill em { font-style: normal; font-weight: 700; color: var(--fc-text-mute); letter-spacing: 0.3px; }
.dc-spill b { font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-spill.on { color: var(--fc-success); }
.dc-spill.on em { color: color-mix(in srgb, var(--fc-success) 75%, var(--fc-text-mute)); }
.dc-spill.off { color: var(--fc-text-mute); opacity: 0.6; }

.dc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fc-text-xs);
  color: var(--fc-text);
}
.dc-row > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
  text-align: right;
}
.dc-label { color: var(--fc-text-mute); flex-shrink: 0; }
.owner-text { font-weight: 600; }

/* 备注单元格（ll 组件） */
.remark-cell { cursor: pointer; font-size: var(--fc-text-xs); }
.remark-cell:hover { text-decoration: underline; }
.remark-empty { opacity: 0.7; }

/* 卡片操作按钮（sl 组件） */
.act-btns { display: inline-flex; gap: 6px; }
.act-btns-mini { display: inline-flex; gap: 4px; }
.act-btn {
  font-size: 11px;
  font-family: inherit;
  padding: 3px 11px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
  transition: filter 0.15s ease;
}
.act-btn:hover { filter: brightness(1.2); }
.act-btn.blue { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.4); color: #60a5fa; }
.act-btn.purple { background: rgba(139, 92, 246, 0.16); border-color: rgba(139, 92, 246, 0.4); color: #a78bfa; }
.act-btn.red { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.38); color: #f87171; }
.act-btn-mini {
  font-size: 10px;
  font-family: inherit;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.act-btn-mini.blue { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.4); color: #60a5fa; }
.act-btn-mini.purple { background: rgba(139, 92, 246, 0.16); border-color: rgba(139, 92, 246, 0.4); color: #a78bfa; }
.act-btn-mini.red { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.38); color: #f87171; }

/* 电池（il 组件） */
.battery-high, .battery-mid, .battery-low {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.battery-high { color: #22c55e; }
.battery-mid { color: #f59e0b; }
.battery-low { color: #ef4444; }
.battery-indicator { display: inline-flex; align-items: center; gap: 5px; }
.battery-icon {
  position: relative;
  width: 26px; height: 12px;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1.5px;
  flex-shrink: 0;
}
.battery-icon::after {
  content: "";
  position: absolute;
  right: -4px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 5px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}
.battery-fill { display: block; height: 100%; border-radius: 1px; background: currentColor; }
.battery-text { font-size: 10px; }

/* ---- 21.7 设备列表视图 ---- */
.device-list-rows { display: flex; flex-direction: column; gap: 8px; }
.dlr-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px var(--fc-space-3);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
}
.dlr-check-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fc-text-xs);
  color: var(--fc-text-lo);
  cursor: pointer;
}
.dlr-item {
  display: flex;
  align-items: center;
  gap: var(--fc-space-3);
  padding: 10px var(--fc-space-4);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-lg);
  transition: border-color 0.15s ease;
}
.dlr-item:hover { border-color: var(--fc-border-hi); }
.dlr-item.sel { border-color: var(--fc-primary); background: rgba(139, 92, 246, 0.06); }
.dlr-check { display: inline-flex; flex-shrink: 0; }
.dlr-status-pill { flex-shrink: 0; }
.dlr-screen { flex-shrink: 0; display: inline-flex; }
.screen-state-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.screen-state-dot.online { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
.screen-state-dot.sleeping { background: #f59e0b; }
.screen-state-dot.offline { background: #64748b; }
.dlr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dlr-primary { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dlr-name {
  font-size: var(--fc-text-sm);
  font-weight: 600;
  color: var(--fc-text-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlr-id {
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--fc-text-mute);
  flex-shrink: 0;
}
.dlr-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--fc-text-mute);
}
.dlr-meta-model { color: var(--fc-text-lo); }
.dlr-owner { font-weight: 600; }
.dlr-battery { flex-shrink: 0; }
.dlr-wifi { flex-shrink: 0; font-size: 11px; color: var(--fc-text-mute); white-space: nowrap; }
.dlr-wifi.on { color: var(--fc-success); }
.dlr-conn { display: flex; gap: 4px; flex-shrink: 0; }

/* ---- 21.8 错误提示（dd 组件） ---- */
.toast.err {
  padding: 10px var(--fc-space-4);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: var(--fc-radius-md);
  color: var(--fc-danger);
  font-size: var(--fc-text-sm);
}

/* ---- 21.9 登录后全局表单元素 ---- */
.rc-main input[type="checkbox"],
.dlr-select-bar input[type="checkbox"] { accent-color: var(--fc-primary); cursor: pointer; }
.rc-main select option { background: #1a1a2e; color: var(--fc-text); }

/* ============================================================
   22. 设备控制页（control-page / ctrl-* / home-tab-* / trojan-*）
   ------------------------------------------------------------
   结构（从 bundle 控制页主组件提取）:
     .control-page                    100vh flex column
       .ctrl-header                   顶部: 品牌+状态灯+WS状态 / 时间行 / tabs
         .ctrl-header-left
           .ctrl-header-brand         “设备控制中心” + .dot
           .ctrl-ws-status            服务端连接状态
         .ctrl-time-row               中国时间 / 全球时间
         .ctrl-tabs > button.ctrl-tab(.active)
       (首页 tab)
         .home-tab-topbar             设备信息横条: 字段 + 锁屏密码
           .ctrl-device-row.topbar-item
             .topbar-label / .topbar-val(+heartbeat-value/device-name/
             ip-value/battery-high|mid|low/green) / .topbar-pwd-*
         .home-tab-split             flex row: 左投屏(1fr) + 右控制面板(固定宽)
           .home-tab-left > .ctrl-body > .ctrl-screen-area
             .ctrl-phone-frame > .ctrl-phone-screen + .ctrl-phone-nav
             .ctrl-loading / .ctrl-spinner / .reader-style-bar
             .a11y-screen-header / .a11y-text-input
           .home-tab-right > .trojan-main-area > .trojan-control-panel
   控制面板内部几乎全内联样式，仅需 --trojan-* 变量。
   ============================================================ */

/* ---- 22.1 trojan 面板设计令牌（$d 组件内联样式引用） ---- */
:root,
[data-theme="dark"] {
  --trojan-panel-bg: rgba(255, 255, 255, 0.035);
  --trojan-panel-border: rgba(255, 255, 255, 0.1);
  --trojan-panel-text: #e2e8f0;
  --trojan-blue: #1890ff;
  --trojan-green: #52c41a;
  --trojan-red: #ff4d4f;
  --trojan-purple: #722ed1;
  --trojan-neutral: #64748b;
}
[data-theme="light"] {
  --trojan-panel-bg: rgba(15, 23, 42, 0.03);
  --trojan-panel-border: rgba(15, 23, 42, 0.12);
  --trojan-panel-text: #334155;
  --trojan-blue: #1677ff;
  --trojan-green: #389e0d;
  --trojan-red: #cf1322;
  --trojan-purple: #531dab;
  --trojan-neutral: #64748b;
}

/* ---- 22.2 控制页外壳 ---- */
.control-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--fc-bg);
  color: var(--fc-text);
  /* 阴影/弹层定位基准 */
  position: relative;
}

/* ---- 22.3 头部 ---- */
.ctrl-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px 0;
  background: var(--fc-elevated);
  border-bottom: 1px solid var(--fc-border);
}
.ctrl-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.ctrl-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--fc-text-hi);
  white-space: nowrap;
}
.ctrl-ws-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-mute);
  white-space: nowrap;
}
.ctrl-ws-status.connected { color: var(--fc-success); }
.ctrl-ws-status.disconnected { color: var(--fc-danger); }
.ctrl-time-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--fc-text-mute);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.ctrl-time-row::-webkit-scrollbar { display: none; }

/* 头部 tabs */
.ctrl-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-top: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ctrl-tabs::-webkit-scrollbar { display: none; }
.ctrl-tab {
  position: relative;
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-text-lo);
  background: transparent;
  border: none;
  border-radius: var(--fc-radius-md) var(--fc-radius-md) 0 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.ctrl-tab:hover { color: var(--fc-text-hi); background: var(--fc-surface); }
.ctrl-tab.active {
  color: #fff;
  background: var(--fc-grad-primary);
}
.ctrl-tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--fc-primary-hi);
  border-radius: 2px;
}

/* ---- 22.4 设备信息顶条（home-tab-topbar） ---- */
.home-tab-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--fc-surface);
  border-bottom: 1px solid var(--fc-border-soft);
}
.ctrl-device-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
  font-size: 12px;
  white-space: nowrap;
}
.topbar-item { flex-shrink: 0; }
.topbar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-mute);
}
.topbar-val { font-weight: 600; color: var(--fc-text); }
.topbar-val.heartbeat-value { color: var(--fc-success); font-variant-numeric: tabular-nums; }
.topbar-val.device-name { color: var(--fc-text-hi); font-weight: 700; }
.topbar-val.ip-value { font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.topbar-val.battery-high { color: var(--fc-success); }
.topbar-val.battery-mid { color: var(--fc-warn); }
.topbar-val.battery-low { color: var(--fc-danger); }
.topbar-val.green { color: var(--fc-success); }
.heartbeat-label { display: inline-flex; align-items: center; }
.heartbeat-dot { color: var(--fc-success); }
.home-tab-topbar-divider { color: var(--fc-border-hi); flex-shrink: 0; }
.home-tab-topbar-pwd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(250, 173, 20, 0.1);
  border: 1px solid rgba(250, 173, 20, 0.28);
  border-radius: var(--fc-radius-md);
  font-size: 12px;
  white-space: nowrap;
}
.topbar-pwd-icon { display: inline-flex; color: var(--fc-warn); }
.topbar-pwd-val { font-weight: 700; color: var(--fc-text-hi); font-variant-numeric: tabular-nums; }
.topbar-pwd-type {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(250, 173, 20, 0.16);
  color: var(--fc-warn);
  font-weight: 600;
}
.topbar-pwd-status { font-size: 10px; font-weight: 700; }
.topbar-pwd-status.ok { color: var(--fc-success); }
.topbar-pwd-status.empty { color: var(--fc-text-mute); }
.topbar-pwd-refresh {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  color: var(--fc-text-mute);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.topbar-pwd-refresh:hover { color: var(--fc-text-hi); background: var(--fc-surface-hi); }

/* ---- 22.5 首页左右分栏 ---- */
.home-tab-split {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 10px;
  min-height: 0;
  padding: 10px 14px 14px;
}
.home-tab-left {
  /* 可伸展（grow 产生水平空白让中栏居中），但保底内容宽
     921px（屏幕区 640 + 中栏 273 + 间距）防止被压溢出；
     flex-basis 用 auto（按内容），不用 0%（会均分被压） */
  flex: 1 1 auto;
  min-width: 921px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.home-tab-left::-webkit-scrollbar { width: 8px; }
.home-tab-left::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }
.home-tab-left::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }
.home-tab-left::-webkit-scrollbar-track { background: transparent; }

/* ---- 22.6 左侧投屏 / 阅读器 ----
   布局（对照 bundle 结构 ctrl-body > [ctrl-screen-area, ctrl-sidebar-panel]）
   宽屏：行布局 —— 左屏幕区（两个 298px 手机框并排）+ 右 ctrl-sidebar-panel
         （屏幕控制/一键解锁/功能区/日志，两列网格，类名 "sidebar" 即侧栏之意）
   窄屏(<1200px)：列布局回退 —— 屏幕上、侧栏下，左栏整体滚动 */
.ctrl-body {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  /* 用户要求：中间栏放在中间位置（手机屏与右栏 ADB 之间居中，
     不贴手机也不贴右栏）。宽屏生效；<1600px 回退 flex-start
     避免手机右移后与左上角 absolute 标题重叠 */
  justify-content: center;
}
.ctrl-screen-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* 固定为手机行宽度（298×2+16 间距 = 612px + 包裹层 padding 0 4px×2
     + 余量 = 640px）。若用 flex:1 占满剩余宽度，屏幕区会被拉到
     1077px，中间栏被推到 x≈1099 紧贴右栏（用户反馈"中间太靠右、
     把右边框架挤小了"）。固定宽度后中间栏紧跟手机屏，右栏 ADB
     拿到全部剩余空间（约 930px），三列按钮不再挤成 146px。 */
  flex: 0 0 auto;
  width: 640px;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
}
/* 屏幕区内层包裹（无类名 div，内联仅 overflowY:auto）：
   画面缩放放大或窗口变窄导致 612px 手机行超出时，允许横向滚动 */
.ctrl-screen-area > div {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.ctrl-screen-area > div::-webkit-scrollbar { height: 8px; }
.ctrl-screen-area > div::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }
.ctrl-screen-area > div::-webkit-scrollbar-track { background: transparent; }
/* 手机屏占位框（无类名 div，内联 height:551px + border:2px solid #303030）：
   原始构建为 content-box —— 外框 302×555、屏幕区 298×551。
   全局 border-box 使其被压成 294×547（用户反馈"尺寸不是原始尺寸"），
   这里按内联尺寸还原 content-box。缩放变化后内联值随之改变，
   差 4px 不影响。 */
.ctrl-screen-area div[style*="551px"] {
  box-sizing: content-box !important;
}
/* 手机框：恢复 bundle 原始尺寸——外层容器内联 width:298*缩放%，
   原设计无 border/padding，屏幕区 298×551 全尺寸。
   之前版本加了 border:2px+padding:6px，在全局 border-box 下
   把屏幕吃成 282×529（用户发现"尺寸被改小了"）。
   现用 box-shadow 外阴影做手机边框感（不占布局空间），
   屏幕恢复 298×551 全宽。 */
.ctrl-phone-frame {
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
  background: #000;
  border: none;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #303030,
    0 0 0 3px rgba(255, 255, 255, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.5);
}
.ctrl-phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 298 / 551;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl-phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.ctrl-phone-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  padding-top: 6px;
}
.ctrl-phone-nav button {
  flex: 1;
  height: 26px;
  font-size: 14px;
  line-height: 1;
  color: #cfd6e0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.ctrl-phone-nav button:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ctrl-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  font-size: 12px;
  color: var(--fc-text-mute);
}
.ctrl-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--trojan-blue);
  border-radius: 50%;
  animation: fc-spin 0.8s linear infinite;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* 阅读器样式条（a11y / 线框阅读器） */
.reader-style-bar { flex-wrap: wrap; }
.reader-style-bar input[type="color"] { border: 1px solid #303030; }
.reader-style-bar input[type="range"] { accent-color: var(--trojan-blue); }
.a11y-screen-header,
.a11y-text-input { box-sizing: border-box; }
.a11y-text-input input {
  background: #141414;
  border: 1px solid #303030;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.85);
}
.a11y-text-input input:focus { border-color: #1677ff; outline: none; }

/* 屏幕操作徽标（投屏/录屏按钮） */
.scr-label-badge { display: inline-flex; align-items: center; gap: 4px; }
.scr-label-badge.screen-action { transition: opacity 0.15s; }
.scr-label-badge.screen-action:hover { filter: brightness(1.12); }

/* ---- 22.7 右侧控制面板 ---- */
.home-tab-right {
  /* flex-basis:auto（按 ADB 内容宽），与左列共同 grow 分配剩余空间；
     min-width:0 允许窗口变窄时收缩（ADB 三列同时收窄） */
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--fc-border);
  padding-left: 10px;
}
@media (max-width: 1180px) {
  .home-tab-split { flex-direction: column; overflow-y: auto; }
  .home-tab-right { width: 100%; border-left: none; padding-left: 0; }
}
/* 左列放不下「612px 手机行 + ≥300px 侧栏」时（视口约 <1470px），
   ctrl-body 回退为列布局：屏幕上、侧栏下，左栏整体滚动。
   注意不可对 .home-tab-left 用 container-type（layout 包含会使
   内部 position:fixed 弹窗/悬浮面板错位），故用视口断点近似。 */
@media (max-width: 1469px) {
  .ctrl-body { flex-direction: column; justify-content: flex-start; }
  .ctrl-screen-area { flex: 0 0 auto; width: 100%; }
  .ctrl-sidebar-panel { flex: 0 0 auto; width: 100%; min-width: 0; overflow-y: visible; }
}
/* 小于 1700px：ADB 标题条在所有断点下均为常规流（右栏第一个），
   此处仅需保持手机贴左 */
@media (max-width: 1699px) {
  .ctrl-body { justify-content: flex-start; }
}
/* 宽屏（≥1700px）：左列固定 1180px = 手机区 640 + 中栏 273 + 间距 8
   + 两侧留白 259px，配合 .ctrl-body justify-content:center 使中栏落在
   手机屏与右栏 ADB 之间居中（实测中栏中心偏差 ≤20px）。
   右栏拿到约 678px（ADB 三列约 216px，仍宽于 bundle 原 130px 按钮）。 */
@media (min-width: 1700px) {
  .home-tab-left { flex: 0 0 1180px; }
  /* 手机屏贴左（用户反馈 ctrl-body 居中会在手机屏左侧留 ~130px 空白）；
     中间栏 margin-left:auto 靠右（用户要求紧挨右栏 ADB 区，不居中） */
  .ctrl-body { justify-content: flex-start; }
  .ctrl-sidebar-panel { margin-left: auto; }
  /* 屏幕区弹性占满手机区与中间栏之间的空间（原固定 640px，
     中间栏靠右后留下 ~260px 空隙；用户要求拉宽两屏填满到中间栏） */
  .ctrl-screen-area { flex: 1 1 auto; width: auto; }
  /* 两个手机屏块（wrapper 第2子=屏行 的直接子元素）拉伸填满：
     bundle 内联 width:298*缩放 + flexShrink:0，须覆盖为可伸缩；
     不能用 .ctrl-screen-area>div>div>div（会误伤设置条内部控件） */
  .ctrl-screen-area > div > div:nth-child(2) > div {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
}
.trojan-main-area {
  display: flex;
  gap: 6px;
  padding: 6px 2px;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}
.trojan-control-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 100%;
  align-items: start;
  box-sizing: border-box;
  background: var(--trojan-panel-bg);  border: 1px solid var(--trojan-panel-border);
  border-radius: 6px;
  padding: 6px;
}
.trojan-control-panel button { font-family: inherit; }
.trojan-control-panel button:hover { filter: brightness(1.1); }
.trojan-control-panel button:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
/* 按钮全宽：bundle 内联 width:130 硬固定，列宽从 146px 扩到约 300px 后
   必须拉宽按钮（!important 覆盖内联），否则 130px 短按钮 + 右侧空白
   且长文字仍会换行。全宽横条与旧版 V5 按钮风格一致 */
.trojan-control-panel button {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
/* 配对行（手动输入配对码 + 配对按钮）：上面的全宽规则会把按钮内联
   width:44 放大成整行、输入框被挤成小窄条。输入框与按钮各占
   calc(50% - 2px)（扣除 4px 间距均分），等宽对称，行宽与上下按钮一致。
   注：flex:1 1 0 实测对 input 分配不均（94 vs 78），故用定宽方案 */
.trojan-control-panel input[placeholder="手动输入配对码"] {
  flex: 0 0 auto !important;
  width: calc(50% - 2px) !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
.trojan-control-panel input[placeholder="手动输入配对码"] + button {
  flex: 0 0 auto !important;
  width: calc(50% - 2px) !important;
  min-width: 0 !important;
  padding: 0 !important;
}
/* 列头（ea/$t：_a + padding:7 + gap:6）压扁：右栏标题条太高，
   用户要求压缩。列（ta）的第一个子元素即列头 */
.trojan-control-panel > div > div:first-child {
  padding: 4px 7px !important;
  gap: 4px !important;
}
/* ADB 控制标题条：按旧版 V5 桌面布局放在右栏第一个（常规文档流，
   不再 fixed 到左上角）。压扁高度（约 22px），避免把右栏 ADB 面板
   推低导致页面下拉。仅首页渲染（该条在 $d 组件内，非首页 tab 不渲染）。 */
.adb-toolbar {
  position: static;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-bottom: 4px;
  padding: 3px 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px;
}
/* 图标（蓝竖条）与文字同一行：bundle 里标题内图标是无类名 div（块级），
   默认会把文字挤到下一行，必须 flex 行排列 + 不换行 */
.adb-toolbar .adb-toolbar-settings { margin-left: 0; }
.adb-toolbar .adb-toolbar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
}
.adb-toolbar .adb-toolbar-title > div { width: 4px !important; height: 14px !important; }

/* 面板分区标题（sa 内联）与危险区 */
.trojan-control-panel .trojan-danger-zone {
  border: 1px dashed rgba(255, 77, 79, 0.4);
  border-radius: 6px;
  padding: 6px;
}

/* ---- 22.8 权限面板（permission-*） ---- */
.permission-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}
.permission-title { font-size: 14px; font-weight: 700; color: var(--fc-text-hi); margin: 0; }
.permission-subtitle { font-size: 11px; color: var(--fc-text-mute); margin: 0; }
.permission-table-head,
.permission-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
}
.permission-table-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fc-text-mute);
  background: var(--fc-surface);
  border-radius: var(--fc-radius-md);
}
.permission-row {
  border-bottom: 1px solid var(--fc-border-soft);
  color: var(--fc-text);
}
.permission-row:last-child { border-bottom: none; }
.permission-icon { display: inline-flex; align-items: center; }
.permission-label { font-weight: 600; color: var(--fc-text); }
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
  font-size: 12px;
  color: var(--fc-text);
}
.perm-quick-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--fc-primary);
  border: none;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
}
.perm-quick-btn:hover { filter: brightness(1.12); }

/* ---- 22.9 通用 tab 内容页（短信/联系人/应用/文件/日志等） ---- */
.ctrl-tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
}
.ctrl-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 860px;
}
.ctrl-tab-panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--fc-text-hi);
}
.ctrl-tab-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--fc-text-mute);
}
.ctrl-tab-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.ctrl-tab-action {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--trojan-blue);
  border: none;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
  transition: filter 0.15s;
}
.ctrl-tab-action:hover { filter: brightness(1.12); }
.ctrl-log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.ctrl-log-row {
  padding: 6px 10px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
  color: var(--fc-text-lo);
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-all;
}
.ctrl-empty-inline {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--fc-text-mute);
}
.ctrl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--fc-text-mute);
}
.ctrl-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* 右侧固定侧栏：基准 273px（410 减 1/3，用户要求），
     一列卡片全宽，卡内按钮一横一个纵排；
     左列变窄时允许收缩（保底 260px）为 612px 手机行让路；
     内容超出栏高时栏内滚动 */
  flex: 0 1 273px;
  width: 273px;
  min-width: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.ctrl-sidebar-panel::-webkit-scrollbar { width: 8px; }
.ctrl-sidebar-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 4px; }
.ctrl-sidebar-panel::-webkit-scrollbar-track { background: transparent; }
/* 用户要求：中间列一列单排（原 sidebar-two-col 两列并排太挤） */
.sidebar-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
}
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sidebar-card {
  display: flex;
  flex-direction: column;
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}
.sidebar-card-head {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fc-text-hi);
  background: var(--fc-surface);
  border-bottom: 1px solid var(--fc-border-soft);
}
.sidebar-card-body {
  /* 用户指定格式（对照旧版 V5）：一横一个纵排全宽；
     仅两处并排——音量-/+（.sidebar-vol-row）与
     一键解锁+误触滑动（无类名 flex 容器，bundle 内联 flex:1）。
     垂直压缩（用户要求"页面不用下拉"）：padding/gap 收紧 */
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 10px;
  align-items: stretch;
}
.sidebar-input {
  width: 100%;
  box-sizing: border-box;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  outline: none;
}
.sidebar-input:focus { border-color: var(--fc-primary); }
.sidebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s;
  position: relative;
}
.sidebar-btn:hover { filter: brightness(1.12); }
.sidebar-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.sidebar-btn.primary { background: linear-gradient(135deg, #1890ff, #096dd9); }
.sidebar-btn.green { background: linear-gradient(135deg, #52c41a, #389e0d); }
.sidebar-btn.purple { background: linear-gradient(135deg, #722ed1, #531dab); }
.sidebar-btn.danger { background: linear-gradient(135deg, #ff4d4f, #cf1322); }
.sidebar-btn.danger-dark { background: linear-gradient(135deg, #a8071a, #5c0011); }
.sidebar-btn.is-on { box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.45); }
.sidebar-btn.half { width: calc(50% - 3px); }
.sidebar-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
}
.sidebar-btn-sm:hover { filter: brightness(1.12); }
.sidebar-btn-sm.primary { background: linear-gradient(135deg, #1890ff, #096dd9); }
.sidebar-btn-sm.green { background: linear-gradient(135deg, #52c41a, #389e0d); }
.sidebar-btn-sm.purple { background: linear-gradient(135deg, #722ed1, #531dab); }
.sidebar-btn-sm.danger { background: linear-gradient(135deg, #ff4d4f, #cf1322); }
/* 用户要求：按钮文字居中。
   label 不再 flex:1 撑满（否则文字被 LED 挤偏左），
   LED 改为绝对定位钉在按钮右侧，不占布局空间 */
.sidebar-btn-label { flex: 0 1 auto; min-width: 0; text-align: center; }
.sidebar-vol-row { display: flex; align-items: center; gap: 6px; }
/* 音量-/+ 并排等宽：覆盖 .sidebar-btn 的 width:100% */
.sidebar-btn.half { flex: 1; width: auto; min-width: 0; }
.sidebar-divider { height: 1px; margin: 3px 0; background: var(--fc-border-soft); }
.sidebar-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--fc-text-mute);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar-led.on { background: var(--fc-success); box-shadow: 0 0 5px rgba(52, 211, 153, 0.6); }
.sidebar-led.off { background: rgba(248, 113, 113, 0.7); }
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-lg);
}

/* ---- 22.10 状态圆点（.dot） ---- */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.on { background: var(--fc-success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.6); }
.dot.off { background: var(--fc-text-mute); }
.dot.sleeping { background: var(--fc-warn); box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.ctrl-reader-text { font-size: 12px; color: var(--fc-text-lo); line-height: 1.6; }

/* ---- 22.11 弹窗（overlay-modal-*，控制页通用） ---- */
.overlay-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.overlay-modal {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border-hi);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.overlay-modal-sm { max-width: 400px; }
.overlay-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--fc-border);
}
.overlay-modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--fc-text-hi); }
.overlay-modal-icon { font-size: 18px; }
.overlay-modal-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  color: var(--fc-text-mute);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.overlay-modal-close:hover { color: var(--fc-text-hi); background: var(--fc-surface-hi); }
.overlay-modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--fc-text);
}
.overlay-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--fc-border);
}
.overlay-field { display: flex; flex-direction: column; gap: 6px; }
.overlay-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  outline: none;
}
.overlay-input:focus { border-color: var(--fc-primary); }
.overlay-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  resize: vertical;
  outline: none;
}
.overlay-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
  transition: filter 0.15s;
}
.overlay-btn:hover { filter: brightness(1.1); }
.overlay-btn.cancel {
  color: var(--fc-text-lo);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
}
.overlay-btn.confirm {
  color: #fff;
  background: var(--fc-grad-primary);
  border: none;
}
.overlay-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fc-text-lo);
  cursor: pointer;
}
.overlay-progress-row { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.overlay-range { width: 100%; accent-color: var(--fc-primary); }
.overlay-range-val { font-variant-numeric: tabular-nums; color: var(--fc-text-hi); font-weight: 600; }
.overlay-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
  font-size: 12px;
}
.overlay-preview-label { font-weight: 700; color: var(--fc-text-hi); }
.overlay-preview-msg { color: var(--fc-text-lo); }

/* ---- 22.12 模态框（modal-*，文件/短信等页内） ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.modal-box {
  display: flex;
  flex-direction: column;
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow: hidden;
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border-hi);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--fc-border);
}
.modal-head h3, .modal-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--fc-text-hi); }
.modal-close-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--fc-text-mute);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.modal-close-btn:hover { color: var(--fc-text-hi); background: var(--fc-surface-hi); }
.modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--fc-text);
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--fc-border);
}
.modal-section-title {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fc-text-mute);
}
.modal-section-title:first-child { margin-top: 0; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.modal-field { display: flex; flex-direction: column; gap: 5px; }
.modal-label { font-size: 12px; font-weight: 600; color: var(--fc-text-lo); }
.modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  outline: none;
}
.modal-input:focus { border-color: var(--fc-primary); }
.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: var(--fc-radius-md);
  font-size: 13px;
}
.modal-muted { font-size: 12px; color: var(--fc-text-mute); }
.modal-hint { font-size: 11px; color: var(--fc-text-mute); line-height: 1.6; }
.modal-error { font-size: 12px; color: var(--fc-danger); }
.modal-code {
  padding: 1px 6px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: rgba(139, 92, 246, 0.14);
  border-radius: 4px;
  color: var(--fc-primary-hi);
}
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.modal-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--fc-radius-md);
  cursor: pointer;
}
.modal-btn-primary {
  color: #fff;
  background: var(--fc-grad-primary);
  border: none;
}
.modal-btn-primary:hover { filter: brightness(1.1); }
.modal-btn-cancel {
  color: var(--fc-text-lo);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
}
.modal-btn-cancel:hover { filter: brightness(1.15); }
.modal-owner { font-weight: 600; color: var(--fc-text-hi); }

/* 模态开关（modal-switch-*） */
.modal-switch-track,
.switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  padding: 2px;
  background: rgba(100, 116, 139, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-slider,
.modal-switch-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.switch-on, .modal-switch-track.on {
  background: var(--fc-primary);
}
.switch-on .switch-slider,
.modal-switch-track.on .modal-switch-thumb {
  transform: translateX(18px);
}
.switch-off { background: rgba(100, 116, 139, 0.35); }
.modal-switch-text { font-size: 12px; color: var(--fc-text-lo); }

/* ---- 22.13 杂项（批量条/部署/unlock/pills） ---- */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 12px;
  color: var(--fc-text);
}
.pills { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.badge--primary, .badge--success, .badge--danger {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}
.badge--primary { color: var(--fc-primary-hi); background: rgba(139, 92, 246, 0.15); }
.badge--success { color: var(--fc-success); background: rgba(52, 211, 153, 0.14); }
.badge--danger { color: var(--fc-danger); background: rgba(248, 113, 113, 0.14); }


/* ========== 23. 侧栏各页面 + 共用组件（缺口第二批） ========== */

/* ---- 23.1 共用骨架 panel / panel-head ---- */
.panel {
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--fc-border-soft);
}
.panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fc-text-hi);
}

/* ---- 23.2 数据表格（账号管理/设备日志等） ---- */
.rc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  background: var(--fc-elevated);
}
.rc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--fc-text);
}
.rc-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-text-lo);
  background: var(--fc-surface);
  border-bottom: 1px solid var(--fc-border-soft);
  white-space: nowrap;
}
.rc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fc-border-soft);
  vertical-align: middle;
}
.rc-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.rc-table tbody tr:last-child td { border-bottom: none; }

/* ---- 23.3 分页（rc-pagination / data-pagination 家族） ---- */
.rc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 2px 0;
  font-size: 12px;
  color: var(--fc-text-lo);
}
.data-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 2px 0;
  font-size: 12px;
  color: var(--fc-text-lo);
}
.data-pagination-summary { color: var(--fc-text-lo); }

/* ---- 23.4 徽章 ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge.online { color: #52c41a; background: rgba(82, 196, 26, 0.14); }
.status-badge.offline { color: #94a3b8; background: rgba(255, 255, 255, 0.07); }
.role-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}
.role-tag.super { color: #c084fc; background: rgba(168, 85, 247, 0.15); }
.role-tag.admin { color: #60a5fa; background: rgba(24, 144, 255, 0.14); }
.role-tag.user { color: #94a3b8; background: rgba(255, 255, 255, 0.07); }
.fc-dot.is-online { background: var(--fc-success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.6); }
.fc-dot.is-offline { background: var(--fc-text-mute); }
.fc-dot.is-warn { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }

/* ---- 23.5 账号管理页 ---- */
.admin-section { display: flex; flex-direction: column; gap: 14px; }
.admin-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fc-text-hi);
}
.admin-account-count { font-size: 13px; color: var(--fc-text-lo); }
.admin-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border-soft);
  border-radius: 8px;
}
.admin-tabs button {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--fc-text-lo);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.admin-tabs button:hover { color: var(--fc-text-hi); }
.admin-tabs button.on {
  color: #fff;
  background: rgba(139, 92, 246, 0.28);
}

/* ---- 23.6 密码记录页 ---- */
.password-count {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.password-action-btn.danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}

/* ---- 23.7 AI 分析页 ---- */
.ai-source-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--fc-text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fc-border-soft);
  border-radius: 8px;
  cursor: pointer;
}
.ai-source-card:hover { border-color: rgba(168, 85, 247, 0.4); }
.ai-source-title { font-weight: 600; color: var(--fc-text-hi); }
.ai-source-desc { font-size: 11px; color: var(--fc-text-lo); }
.ai-report-panel {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
}
.ai-report-content {
  font-size: 13px;
  line-height: 1.75;
  color: var(--fc-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-report-time { font-size: 11px; color: var(--fc-text-lo); }
.ai-last-fetch { font-size: 12px; color: var(--fc-text-lo); }
.ai-config-panel {
  padding: 18px;
  margin-bottom: 16px;
  background: var(--fc-elevated);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
}

/* ---- 23.8 注入中心页 ---- */
.injection-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #52c41a, #389e0d);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.injection-action:hover { filter: brightness(1.12); }
.injection-app-name { font-size: 13px; font-weight: 600; color: var(--fc-text-hi); }
.injection-empty-icon { font-size: 40px; text-align: center; opacity: 0.45; }

/* ---- 23.9 日志/节点/短信/设备行 ---- */
.logs-type-select {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  outline: none;
  cursor: pointer;
}
.rc-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dlr-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.aaf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.adb-toolbar-title { font-size: 12px; font-weight: 700; color: var(--fc-text-hi); white-space: nowrap; }
.adb-toolbar-settings { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---- 23.10 杂项 ---- */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--fc-bg);
}
.loader { display: flex; gap: 6px; }
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fc-primary);
  animation: fc-boot-bounce 1s infinite ease-in-out;
}
.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.3s; }
.boot-text { font-size: 13px; color: var(--fc-text-lo); letter-spacing: 0.08em; }
@keyframes fc-boot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-8px); opacity: 1; }
}
.modal-btn.ghost {
  background: transparent;
  border: 1px solid var(--fc-border);
  color: var(--fc-text-lo);
}
.page-inline-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #8870a0;
}
.page-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fc-text-hi);
}
.copy-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--fc-primary-hi);
  border-bottom: 1px dashed currentColor;
  cursor: pointer;
}
.copy-id:hover { color: #c084fc; }
.field-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-text-mute);
  pointer-events: none;
}
.record-meta { font-size: 11px; color: var(--fc-text-lo); }
.remark-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--fc-text);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-md);
  resize: vertical;
  outline: none;
}
.remark-textarea:focus { border-color: var(--fc-primary); }
.expire-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.expire-preset-btn {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--fc-text-lo);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 6px;
  cursor: pointer;
}
.expire-preset-btn:hover { color: var(--fc-text-hi); }
.expire-preset-btn.on,
.expire-preset-btn.active {
  color: var(--fc-primary-hi);
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--fc-primary);
}
.placeholder-icon { font-size: 40px; text-align: center; opacity: 0.45; }
