/* ============================================================
   REC ADM — 全新设计系统 v2
   深色玻璃拟态 · 响应式 · 高端质感
   ============================================================ */

:root {
  /* 层次背景 */
  --bg-0: #070b14;
  --bg-1: #0b111e;
  --bg-2: #111a2c;
  --bg-3: #172236;
  --bg-elev: #1c2942;

  /* 边框 */
  --line: rgba(255, 255, 255, 0.055);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.16);

  /* 文字 */
  --text: #eaf0fa;
  --text-2: #a8b6cd;
  --text-3: #6b7c96;

  /* 主题色 */
  --accent: #5b8cff;
  --accent-2: #8b5cff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --accent-line: rgba(91, 140, 255, 0.35);

  /* 语义色 */
  --ok: #2dd4a0;
  --ok-soft: rgba(45, 212, 160, 0.13);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, 0.13);
  --danger: #f2564f;
  --danger-soft: rgba(242, 86, 79, 0.13);
  --coruna: #8aa4ff;
  --ds: #2dd4a0;

  /* 尺寸 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --side-w: 244px;
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px var(--accent-line), 0 8px 32px -8px rgba(91, 140, 255, 0.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(91, 140, 255, 0.10), transparent 60%),
    radial-gradient(760px 520px at 96% 4%, rgba(139, 92, 255, 0.09), transparent 62%),
    radial-gradient(700px 700px at 50% 110%, rgba(45, 212, 160, 0.05), transparent 60%),
    var(--bg-0);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: color .16s ease; }
a:hover { color: #8fb2ff; text-decoration: none; }

::selection { background: rgba(91, 140, 255, 0.32); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); background-clip: padding-box; }

/* ============================================================
   布局
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- 侧边栏 ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, rgba(17, 26, 44, 0.92), rgba(11, 17, 30, 0.92));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 40;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px -2px rgba(91, 140, 255, 0.55);
}
.brand span {
  background: linear-gradient(135deg, #8fb2ff, #b18bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: transform .18s cubic-bezier(.4, 0, .2, 1);
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}
.nav a.on {
  background: linear-gradient(90deg, rgba(91, 140, 255, 0.16), rgba(139, 92, 255, 0.06));
  color: #fff;
  font-weight: 600;
}
.nav a.on::before { transform: translateY(-50%) scaleY(1); }

/* ---------- 主区 ---------- */
.main {
  min-width: 0;
  padding: 26px clamp(16px, 3vw, 34px) 64px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.top h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #fff;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.user a { margin-left: 6px; color: var(--text-3); }
.user a:hover { color: var(--danger); }

/* 移动端汉堡 */
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.07); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 35;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;      /* ★ 未打开时不拦截点击 */
  transition: opacity .2s ease, visibility .2s ease;
}
.nav-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;      /* ★ 打开后才可点关闭 */
}

/* ============================================================
   卡片
   ============================================================ */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(23, 34, 54, 0.72), rgba(17, 26, 44, 0.72));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card > h2, .card > h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.005em;
  color: #fff;
}
.card.flush { padding: 0; overflow: hidden; }

/* ============================================================
   表单控件
   ============================================================ */
input, select, textarea, button { font: inherit; }

input[type=text], input[type=password], input[type=number], input[type=search],
select, textarea {
  width: 100%;
  max-width: 100%;
  background: rgba(7, 11, 20, 0.72);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-line);
  background: rgba(7, 11, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.13);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b6cd' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 34px;
}
input[type=file] { color: var(--text-2); font-size: 13px; }

/* ---------- 按钮 ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--accent), #4a76e8);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s ease, box-shadow .16s ease, filter .16s ease;
  box-shadow: 0 6px 18px -8px rgba(91, 140, 255, 0.7);
}
button:hover, .btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 26px -10px rgba(91, 140, 255, 0.85);
  transform: translateY(-1px);
}
button:active, .btn:active { transform: translateY(0) scale(.99); }

button.ghost, .btn.ghost {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
button.ghost:hover, .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: var(--line-3);
  transform: translateY(-1px);
}

button.danger, .btn.danger {
  background: linear-gradient(135deg, #f2564f, #d93b34);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(242, 86, 79, 0.7);
}
button.ok, .btn.ok {
  background: linear-gradient(135deg, #2dd4a0, #16b383);
  color: #052018;
  box-shadow: 0 6px 18px -8px rgba(45, 212, 160, 0.6);
}
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.table .btn, .table button { padding: 5px 11px; font-size: 12px; border-radius: 8px; }

/* ============================================================
   表格
   ============================================================ */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(11, 17, 30, 0.94);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: middle;
}
.table tbody tr { transition: background .14s ease; }
.table tbody tr:hover { background: rgba(91, 140, 255, 0.055); }
.table tbody tr:hover td { color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 20px; }
.table td:last-child, .table th:last-child { padding-right: 20px; }

/* 表格外层横向滚动 */
.card > .table-wrap,
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================
   徽章 / 标签
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.on {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(45, 212, 160, 0.28);
}
.badge.off {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-3);
  border-color: var(--line);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(245, 165, 36, 0.28);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(242, 86, 79, 0.28);
}
.badge.coruna {
  background: rgba(138, 164, 255, 0.12);
  color: var(--coruna);
  border-color: rgba(138, 164, 255, 0.28);
}
.badge.darksword {
  background: rgba(45, 212, 160, 0.12);
  color: var(--ds);
  border-color: rgba(45, 212, 160, 0.28);
}

/* ============================================================
   工具类
   ============================================================ */
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.01em; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.err { color: var(--danger); font-size: 13px; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.pre {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  max-height: 340px;
  overflow: auto;
  color: var(--text-2);
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 密钥/敏感值 */
.secret {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--warn);
  background: rgba(245, 165, 36, 0.09);
  border: 1px solid rgba(245, 165, 36, 0.22);
  border-radius: 7px;
  padding: 2px 7px;
  word-break: break-all;
}

/* 链接式 URL */
.promo-url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}

/* ============================================================
   相册
   ============================================================ */
.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.photo-item {
  position: relative;
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.photo-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: 0 16px 36px -16px rgba(91, 140, 255, 0.45);
}
.photo-thumb { display: block; line-height: 0; }
.photo-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.photo-item:hover .photo-thumb img { transform: scale(1.04); }
.photo-meta {
  padding: 9px 11px;
  font-size: 11.5px;
  color: var(--text-3);
  border-top: 1px solid var(--line);
}

/* ============================================================
   分页
   ============================================================ */
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 13px;
  transition: all .15s ease;
}
.pager a:hover {
  background: rgba(91, 140, 255, 0.14);
  border-color: var(--accent-line);
  color: #fff;
}
.pager .on, .pager span.on {
  background: linear-gradient(135deg, var(--accent), #4a76e8);
  border-color: transparent;
  color: #fff;
  font-weight: 650;
}

/* ============================================================
   折叠块
   ============================================================ */
.wallet-fold { margin-bottom: 14px; }
.wallet-fold > summary {
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  transition: background .15s ease;
}
.wallet-fold > summary::-webkit-details-marker { display: none; }
.wallet-fold > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--text-3);
  transition: transform .18s ease;
}
.wallet-fold[open] > summary::before { transform: rotate(90deg); }
.wallet-fold > summary:hover { background: rgba(91, 140, 255, 0.08); }

/* ============================================================
   推广 / iframe
   ============================================================ */
.promo-iframe-wrap {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.promo-iframe-wrap iframe { display: block; width: 100%; border: 0; }
.promo-iframe-snippet {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  word-break: break-all;
}

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, rgba(23, 34, 54, 0.9), rgba(13, 20, 34, 0.94));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow), 0 0 60px -20px rgba(91, 140, 255, 0.35);
  backdrop-filter: blur(20px);
}
.login-box h1, .login-box h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 680;
  color: #fff;
}
.login-box .sub { color: var(--text-3); font-size: 13px; margin-bottom: 22px; }
.login-box label { display: block; font-size: 12.5px; color: var(--text-2); margin: 14px 0 6px; }
.login-box button { width: 100%; margin-top: 22px; padding: 11px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }

  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 84vw);
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 24px 0 60px -30px rgba(0, 0, 0, 0.9);
  }
  .side.open { transform: translateX(0); }

  .nav-toggle { display: inline-flex; }

  .main { padding: 18px 16px 56px; }

  .top {
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }
  .top h1 { font-size: 18px; }

  .user { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 640px) {
  .card { padding: 15px 14px; border-radius: 14px; }
  .top { flex-wrap: nowrap; align-items: center; }
  .top h1 { flex: 1; min-width: 0; }
  .top-right { flex: 0 0 auto; }
  .user .uname { display: none; }

  .table { font-size: 12.5px; }
  .table thead th { padding: 9px 10px; font-size: 10.5px; }
  .table tbody td { padding: 10px; }
  .table td:first-child, .table th:first-child { padding-left: 14px; }
  .table td:last-child, .table th:last-child { padding-right: 14px; }

  .photo-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }

  .pager a, .pager span { min-width: 30px; height: 30px; padding: 0 8px; font-size: 12px; }

  .btn, button { padding: 8px 13px; font-size: 12.5px; }
}

/* 触屏优化 */
@media (hover: none) {
  .photo-item:hover { transform: none; }
  .photo-item:hover .photo-thumb img { transform: none; }
  button:hover, .btn:hover { transform: none; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* 打印 */
@media print {
  .side, .nav-toggle, .top-right { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ddd; box-shadow: none; }
}

/* ============================================================
   功能按钮（保留原有 class，统一样式）
   ============================================================ */
.btn-social-json { font-size: 12.5px; }
.btn-mnemonic-reveal { font-size: 13px; padding: 7px 13px; }
.btn-mnemonic-reveal .badge { margin-left: 2px; }
.btn-copy-link {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 8px;
}

/* 登录页补充 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { margin: 0 0 4px; font-size: 21px; font-weight: 680; color: #fff; }
.login-box p { margin: 0 0 4px; color: var(--text-3); font-size: 13px; }
.login-box .err { margin-top: 10px; }
.login-box label { display: block; font-size: 12.5px; color: var(--text-2); margin: 16px 0 6px; }
.login-box input { width: 100%; }
.login-box button { width: 100%; margin-top: 24px; padding: 12px; font-size: 14px; }

/* ============================================================
   移动端顶栏微调（汉堡与标题同行）
   ============================================================ */
@media (max-width: 1024px) {
  .top { align-items: center; }
  .top .nav-toggle { margin-right: 2px; }
  .top h1 { flex: 1 1 auto; min-width: 0; }
}

@media (max-width: 640px) {
  /* 助记词按钮简化 */
  .btn-mnemonic-reveal {
    font-size: 0;              /* 隐藏原文字 */
    padding: 7px 10px;
    gap: 4px;
  }
  .btn-mnemonic-reveal::before {
    content: "助记词";
    font-size: 12px;
  }
  .btn-mnemonic-reveal .badge { font-size: 10.5px; padding: 2px 7px; }

  .top-right { gap: 7px; }
  .user { font-size: 11.5px; padding: 5px 9px; }
}


/* ============================================================
   ★ v2.1 组件补全与移动端修复
   修复：设备详情排版 / 密钥竖排 / 钱包 / 备忘录 / 分页器
   ============================================================ */

/* ---------- 设备详情：Tab 导航 ---------- */
.tabs {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  padding: 4px;
  background: rgba(11, 17, 30, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 7px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.tabs a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text-2); }
.tabs a.on {
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.22), rgba(139, 92, 255, 0.12));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent-line) inset;
}

/* ---------- 设备详情：键值对网格 ---------- */
.kv {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.kv b, .kv span {
  padding: 10px 14px;
  min-width: 0;
  font-size: 12.5px;
}
.kv b {
  color: var(--text-3);
  font-weight: 500;
  background: rgba(11, 17, 30, 0.72);
}
.kv span {
  color: var(--text-2);
  background: rgba(23, 34, 54, 0.5);
  font-family: var(--mono);
  font-size: 11.5px;
  word-break: break-all;
}

/* ---------- ★ 密钥：修复竖排超长（关键） ---------- */
.secret {
  background: rgba(245, 165, 36, 0.07);
  border: 1px solid rgba(245, 165, 36, 0.24);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 9px;
}
.secret code {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: #f0c885;
  /* ★ 核心修复：原来是 break-all 导致每字符换行 → 竖排超长 */
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0.012em;
}
.secret > div + div {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(245, 165, 36, 0.18);
}
.secret-cell { min-width: 280px; max-width: 640px; }

/* ---------- 钱包分组 ---------- */
.wallet-group { margin-bottom: 22px; }
.wallet-group h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 11px;
  font-size: 14px;
  font-weight: 620;
  color: #fff;
}
.wallet-pair {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 13px 14px 7px;
  margin-bottom: 13px;
  background: rgba(255, 255, 255, 0.015);
}
.wallet-pair .secret { margin-bottom: 9px; }
.wallet-pair .wallet-fold { margin-top: 0; }

.wallet-fold {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 11px 0;
  background: rgba(11, 17, 30, 0.45);
  overflow: hidden;
}
.wallet-fold > summary {
  cursor: pointer;
  padding: 10px 13px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 550;
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: background .15s ease;
}
.wallet-fold > summary::-webkit-details-marker { display: none; }
.wallet-fold > summary::before {
  content: "▸";
  color: var(--text-3);
  font-size: 11px;
  transition: transform .16s ease;
}
.wallet-fold[open] > summary::before { transform: rotate(90deg); }
.wallet-fold > summary:hover { background: rgba(91, 140, 255, 0.07); }
.wallet-fold .table { margin: 0 12px 12px; width: calc(100% - 24px); }

/* ---------- ★ 备忘录：序号 + 卡片框 ---------- */
.note-list-tg { display: flex; flex-direction: column; gap: 9px; }

.note-row-tg {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(11, 17, 30, 0.55);
  color: inherit;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.note-row-tg:hover {
  border-color: var(--accent-line);
  background: rgba(91, 140, 255, 0.05);
  transform: translateY(-1px);
}

/* 序号 */
.note-row-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  flex: 0 0 auto;
}
.note-row-tg:hover .note-row-idx {
  border-color: var(--accent-line);
  color: var(--accent);
  background: rgba(91, 140, 255, 0.12);
}

.note-row-device { flex: 0 0 auto; }
.note-row-device code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  word-break: break-all;
}
.note-row-device a:hover code { color: var(--accent); }

.note-row-main {
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-row-tg:hover .note-row-main { color: var(--text); }

.note-row-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.note-row-meta .btn,
.note-row-meta button { padding: 5px 11px; font-size: 11.5px; border-radius: 7px; }
.note-row-meta .muted { font-size: 11px; white-space: nowrap; }

.note-detail-block p { margin: 0 0 10px; text-align: left; color: var(--text-2); font-size: 12.5px; }
.note-detail-body {
  max-height: 420px;
  text-align: left;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.75;
}

.note-item {
  background: rgba(11, 17, 30, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.note-item h3 { margin: 6px 0 8px; font-size: 14px; font-weight: 600; color: #fff; }

/* ---------- 相册 ---------- */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photos a {
  display: block;
  background: rgba(11, 17, 30, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.photos a:hover {
  border-color: var(--accent-line);
  box-shadow: 0 12px 28px -14px rgba(91, 140, 255, 0.45);
}
.photos .photo-thumb { position: relative; display: block; line-height: 0; }
.photos img { width: 100%; height: 140px; object-fit: cover; display: block; }

.photo-thumb { position: relative; display: block; }
.photo-scan-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(7, 11, 20, 0.86);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(6px);
  color: var(--text-2);
  pointer-events: none;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-scan-badge.likely { border-color: rgba(242, 86, 79, 0.4); color: #ff8a83; }
.photo-item img { width: 100%; height: 160px; object-fit: cover; display: block; }
.photo-meta code { font-size: 10.5px; word-break: break-all; color: var(--text-3); }

/* ---------- 应用列表折叠 ---------- */
.apps-all { display: none; margin-top: 14px; }
.apps-all.show { display: block; }

/* ---------- 命令区 ---------- */
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 分页器（ThinkPHP 原生 pagination） ---------- */
.pagination {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  flex-wrap: wrap;
}
.pagination li { display: inline-flex; }
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pagination li a:hover {
  background: rgba(91, 140, 255, 0.14);
  border-color: var(--accent-line);
  color: #fff;
}
.pagination li.active span {
  background: linear-gradient(135deg, var(--accent), #4a76e8);
  border-color: transparent;
  color: #fff;
  font-weight: 650;
}
.pagination li.disabled span { opacity: .35; }

/* ---------- 徽章语义补充 ---------- */
.badge.pending { color: var(--warn); border-color: rgba(245, 165, 36, 0.3); }
.badge.sent { color: var(--accent); border-color: var(--accent-line); }
.badge.done { color: var(--ok); border-color: rgba(45, 212, 160, 0.3); }
.badge.likely { color: var(--danger); border-color: rgba(242, 86, 79, 0.32); }

/* ---------- 推广页 ---------- */
.promo-link-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
button.btn-toggle-iframe.on {
  border-color: var(--accent-line);
  color: var(--accent);
  background: rgba(91, 140, 255, 0.1);
}

/* ---------- SweetAlert JSON ---------- */
.swal2-popup.adm-swal {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.swal2-popup.adm-swal .swal2-title { color: #fff; font-size: 16px; font-weight: 620; }
.swal2-popup.adm-swal .swal2-html-container { color: var(--text-2); }
.swal2-popup.adm-swal .swal2-actions { gap: 9px; }
.swal-json {
  max-height: 70vh;
  overflow: auto;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font: 11.5px/1.65 var(--mono);
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 0;
  color: var(--text-2);
}
.swal-json .jk { color: #8fb2ff; }
.swal-json .js { color: #7dd8a8; }
.swal-json .jn { color: #f0c885; }
.swal-json .jl { color: #e89ab8; }

/* ============================================================
   ★ 移动端专项适配
   ============================================================ */
@media (max-width: 1024px) {
  .cmd-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* 设备详情 kv → 上下两行式 */
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv b {
    padding: 9px 13px 1px;
    background: rgba(11, 17, 30, 0.72);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
  }
  .kv span {
    padding: 1px 13px 10px;
    background: rgba(23, 34, 54, 0.42);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
  }
  .kv > span:last-child { border-bottom: 0; }

  /* Tab 横向滚动更紧凑 */
  .tabs { padding: 3px; gap: 2px; margin-bottom: 14px; }
  .tabs a { padding: 6px 11px; font-size: 11.5px; border-radius: 6px; }

  /* 密钥：不溢出、字号收敛 */
  .secret-cell { min-width: 0; max-width: none; }
  .secret { padding: 10px 12px; }
  .secret code { font-size: 11.5px; line-height: 1.8; }

  /* 备忘录：两行布局（序号|内容 / 序号|元信息） */
  .note-row-tg {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas:
      "idx main"
      "idx meta";
    gap: 8px 11px;
    padding: 12px 13px;
  }
  .note-row-idx { grid-area: idx; align-self: start; margin-top: 1px; }
  .note-row-main { grid-area: main; }
  .note-row-meta { grid-area: meta; justify-content: flex-start; gap: 7px; }
  .note-row-meta .muted { font-size: 10.5px; }

  /* 钱包 */
  .wallet-pair { padding: 11px 12px 5px; }
  .wallet-fold > summary { padding: 9px 11px; font-size: 12px; }
  .wallet-fold .table { margin: 0 10px 10px; width: calc(100% - 20px); }

  /* 相册 */
  .photos { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 9px; }
  .photos img { height: 105px; }
  .photo-item img { height: 118px; }
}

@media (max-width: 480px) {
  .secret code { font-size: 11px; line-height: 1.72; }
  .note-row-main { -webkit-line-clamp: 3; font-size: 12.5px; }
  .note-row-meta { gap: 6px; }
  .note-row-meta .btn { padding: 4px 9px; font-size: 10.5px; }
  .pagination li a, .pagination li span { min-width: 28px; height: 28px; padding: 0 8px; font-size: 11.5px; }
}


/* ============================================================
   ★ v2.2 精确修复（按反馈逐项）
   1. 侧边栏「钱包/密钥」排版
   2. 备忘录设备ID错位（4元素 vs 3列）
   3. 设备信息手机不做两行（保持两列）
   4. 设备信息/应用的 Tab 手机换行不滑动
   5. 钱包密钥「推导地址」表格可左右滑动
   ============================================================ */

/* ---------- 1. 侧边栏导航项：不换行、图标对齐 ---------- */
.nav a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
}
.nav a svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.nav a > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 2. 备忘录：4 列（序号 | 设备 | 内容 | 状态） ---------- */
.note-row-tg {
  grid-template-columns: 32px 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}
.note-row-tg .note-row-device {
  max-width: 100%;
  min-width: 0;
}
.note-row-tg .note-row-device code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}

/* ---------- 3. 设备信息 kv：手机保持两列 ---------- */
@media (max-width: 768px) {
  .kv {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 1px;
  }
  .kv b {
    padding: 8px 10px;
    font-size: 10.5px;
    background: rgba(11, 17, 30, 0.72);
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-3);
    display: flex;
    align-items: center;
  }
  .kv span {
    padding: 8px 10px;
    background: rgba(23, 34, 54, 0.42);
    border-bottom: 0;
    font-size: 11px;
    line-height: 1.5;
    word-break: break-all;
  }
  .kv > span:last-child { border-bottom: 0; }
}

@media (max-width: 420px) {
  .kv { grid-template-columns: 78px minmax(0, 1fr); }
  .kv b { padding: 7px 8px; font-size: 10px; }
  .kv span { padding: 7px 8px; font-size: 10.5px; }
}

/* ---------- 4. Tab：手机换行，不横向滑动 ---------- */
.tabs {
  flex-wrap: wrap;
  overflow-x: visible;
  row-gap: 3px;
}
.tabs a { flex: 0 0 auto; }

@media (max-width: 768px) {
  .tabs {
    display: flex;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 4px;
    gap: 3px;
  }
  .tabs a {
    padding: 6px 10px;
    font-size: 11.5px;
    border-radius: 6px;
    flex: 0 0 auto;
  }
}

/* ---------- 5. 钱包「推导地址」表格：可左右滑动 ---------- */
.wallet-fold {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.wallet-fold > summary {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(11, 17, 30, 0.92);
  backdrop-filter: blur(4px);
}
.wallet-fold .table {
  min-width: 540px;
  margin: 0 12px 12px;
  width: calc(100% - 24px);
  border-collapse: separate;
  border-spacing: 0;
}
.wallet-fold .table th,
.wallet-fold .table td {
  white-space: nowrap;
}
.wallet-fold .table td:first-child code {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
/* 滚动条细一点 */
.wallet-fold::-webkit-scrollbar { height: 6px; }
.wallet-fold::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  border: 0;
}

/* 手机上表格更紧凑 */
@media (max-width: 768px) {
  .wallet-fold .table {
    min-width: 460px;
    font-size: 11.5px;
  }
  .wallet-fold .table th,
  .wallet-fold .table td { padding: 8px 9px; }
  .wallet-fold .table td:first-child code { max-width: 200px; font-size: 10.5px; }
}

/* ---------- 6. 备忘录手机：3 行栅格（不漏设备ID） ---------- */
@media (max-width: 768px) {
  .note-row-tg {
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas:
      "idx device"
      "idx main"
      "idx meta";
    gap: 6px 10px;
    padding: 11px 12px;
  }
  .note-row-tg .note-row-idx { grid-area: idx; align-self: start; margin-top: 0; }
  .note-row-tg .note-row-device { grid-area: device; }
  .note-row-tg .note-row-main { grid-area: main; }
  .note-row-tg .note-row-meta { grid-area: meta; justify-content: flex-start; gap: 6px; }

  .note-row-tg .note-row-device code {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 420px) {
  .note-row-tg { padding: 10px 11px; gap: 5px 9px; }
  .note-row-tg .note-row-main { font-size: 12px; }
}

/* ---------- 7. 密钥页：手机上表格转卡片（防溢出） ---------- */
@media (max-width: 768px) {
  .secret-cell { min-width: 0; }
  .secret { padding: 9px 11px; }
  .secret code { font-size: 11px; line-height: 1.75; }
}


/* ============================================================
   ★ v2.3 修复
   1. 助记词错位（overflow-wrap: anywhere → break-word）
   2. 推导地址完整显示（去掉 max-width + ellipsis）
   3. 手机表格不再挤压内容（卡片内横向滚动）
   ============================================================ */

/* ---------- 1. 助记词：正常按空格换行，不在单词内断 ---------- */
.secret {
  overflow: hidden;
}
.secret code {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: #f0c885;
  /* ★ 关键：anywhere 会在任意字符处断行 → 错位；改成 break-word */
  white-space: pre-wrap;          /* 保留空格，按词换行 */
  word-break: normal;             /* 不在单词内部断 */
  overflow-wrap: break-word;      /* 只有超长单词才强制断 */
  hyphens: none;
  letter-spacing: 0.008em;
  margin-top: 2px;
}
/* 「助记词：」标签与内容分行对齐 */
.secret > div {
  display: block;
  margin-bottom: 2px;
}
.secret > div:last-child { margin-bottom: 0; }

/* ---------- 2. 推导地址：完整显示，不省略 ---------- */
.wallet-fold .table td:first-child code {
  display: inline;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;            /* 不换行，靠外层横向滚动查看 */
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0;
}
/* 地址列不再限宽 */
.wallet-fold .table td:first-child,
.wallet-fold .table th:first-child {
  width: auto;
  max-width: none;
}

/* ---------- 3. 手机：表格保证最小宽度 + 卡片横滑 ---------- */
@media (max-width: 768px) {
  /* 所有含表格的卡片允许横向滚动 */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card > .table { min-width: 560px; }

  /* 密钥/钱包表格：密钥列给足空间 */
  .secret-cell { min-width: 260px; max-width: none; }
  .secret code { font-size: 11.5px; line-height: 1.85; }

  /* 推导地址表格更宽，地址完整显示 */
  .wallet-fold { overflow-x: auto; }
  .wallet-fold .table { min-width: 620px; }
  .wallet-fold .table td:first-child code { font-size: 10.5px; }

  /* 表格单元格不再被挤压 */
  .card > .table th,
  .card > .table td { white-space: nowrap; }
  .card > .table td .secret { white-space: normal; }

  /* 滚动条细 */
  .card::-webkit-scrollbar { height: 6px; }
  .card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.13);
    border-radius: 99px;
    border: 0;
  }
}

@media (max-width: 480px) {
  .secret code { font-size: 11px; line-height: 1.8; }
  .card > .table { min-width: 520px; }
  .wallet-fold .table { min-width: 580px; }
}


/* ============================================================
   ★ v2.4 手机表格卡片化（彻底解决助记词挤压）
   含密钥列的表格：每行变卡片，密钥列独占整行
   ============================================================ */

@media (max-width: 768px) {

  /* ---------- 所有列表表格 → 卡片流 ---------- */
  .card > .table,
  .card > .table > tbody {
    display: block;
    width: auto;
    min-width: 0 !important;
  }

  /* 隐藏表头（列名用内容本身辨识） */
  .card > .table > thead,
  .card > .table > tr:first-child:has(> th) {
    display: none;
  }

  /* 每行 = 一张卡片 */
  .card > .table > tr,
  .card > .table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 11px 13px;
    margin-bottom: 9px;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm);
    background: rgba(11, 17, 30, 0.5);
    transition: border-color .15s ease, background .15s ease;
  }
  .card > .table > tr:hover,
  .card > .table > tbody > tr:hover {
    border-color: var(--accent-line) !important;
    background: rgba(91, 140, 255, 0.045);
  }

  /* 单元格：去掉表格边框，自然排列 */
  .card > .table > tr > td,
  .card > .table > tbody > tr > td {
    display: block;
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    word-break: break-word;
    font-size: 12px;
    color: var(--text-2);
    min-width: 0;
  }
  .card > .table > tr > td:first-child,
  .card > .table > tbody > tr > td:first-child {
    padding-left: 0 !important;
    font-weight: 500;
  }
  .card > .table > tr > td:last-child,
  .card > .table > tbody > tr > td:last-child {
    padding-right: 0 !important;
  }

  /* ★ 密钥列：独占整行，宽度 = 屏幕 */
  .card > .table > tr > td.secret-cell,
  .card > .table > tbody > tr > td.secret-cell {
    flex: 1 0 100%;
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
    margin-top: 4px;
    padding-top: 9px !important;
    border-top: 1px solid var(--line) !important;
  }

  /* 密钥块内边距收敛，助记词宽度最大化 */
  .secret-cell .secret {
    padding: 10px 12px;
    margin-bottom: 0;
  }
  .secret-cell .secret code {
    font-size: 11.5px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
  }

  /* 地址类长文本：允许换行 */
  .card > .table > tr > td code {
    word-break: break-all;
    white-space: normal;
  }

  /* badge 不换行 */
  .card > .table > tr > td .badge { white-space: nowrap; }

  /* 时间列弱化 */
  .card > .table > tr > td:last-child.muted { font-size: 10.5px; }

  /* 卡片内不再需要横向滚动 */
  .card { overflow-x: visible; }
}

/* ---------- 设备详情里的钱包折叠块：保持横滑（地址完整） ---------- */
@media (max-width: 768px) {
  .wallet-fold {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .wallet-fold .table {
    display: table;          /* 折叠块内保持表格（地址对齐更好看） */
    min-width: 600px;
    width: 600px;
  }
  .wallet-fold .table > tbody,
  .wallet-fold .table > tr {
    display: table-row;
  }
  .wallet-fold .table > tr > td,
  .wallet-fold .table > tbody > tr > td {
    display: table-cell;
    padding: 8px 9px !important;
    white-space: nowrap !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .wallet-fold .table > tr:first-child:has(> th) { display: table-row; }
  .wallet-fold .table > tr > th {
    display: table-cell;
    white-space: nowrap;
  }
  .wallet-fold .table td.secret-cell {
    flex: none;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  .secret-cell .secret code { font-size: 11px; line-height: 1.85; }
  .card > .table > tr,
  .card > .table > tbody > tr { padding: 10px 11px; gap: 5px 10px; }
}

/* ★ v2.4 修正：彻底隐藏表头行 */
@media (max-width: 768px) {
  .card > .table > thead,
  .card > .table > tr:first-child:has(> th),
  .card > .table > tbody > tr:first-child:has(> th) {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }
  /* 折叠块内的表头要保留 */
  .wallet-fold .table > tr:first-child:has(> th) {
    display: table-row !important;
    height: auto !important;
  }
}



/* ============================================================
   v2.4.10 手机设备卡片：4 行布局 · 保持原字号（12px）
   行1：类型 渠道 状态 …… 设备(型号+版本)
   行2：UUID
   行3：在线时间 …… IP
   行4：应用 钱包 相册 来源 …… 删除
   ★ 全部字号 12px（标签 11px），不做任何缩小
   ============================================================ */

@media (max-width: 768px) {

  .card > .table.devices-table > tr,
  .card > .table.devices-table > tbody > tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 0.85fr) minmax(0, 2fr);
    grid-template-areas:
      "type    channel status   device"
      "uuid    uuid    uuid     uuid"
      "time    time    ip       ip"
      "app     wallet  album    src";
    gap: 6px 8px;
    align-items: center;
    position: relative;
    padding: 13px 13px 46px !important;
  }

  /* ---------- 所有单元格：保持 12px ---------- */
  .card > .table.devices-table > tr > td,
  .card > .table.devices-table > tbody > tr > td {
    display: block;
    border: 0 !important;
    padding: 0 !important;
    min-width: 0;
    white-space: normal;
    font-size: 12px;        /* ★ 和 v2.4 一致，不缩小 */
    line-height: 1.45;
    overflow: hidden;
  }

  /* ---------- 区域映射 ---------- */
  .card > .table.devices-table > tr > td:nth-child(1),
  .card > .table.devices-table > tbody > tr > td:nth-child(1) { grid-area: type; }
  .card > .table.devices-table > tr > td:nth-child(2),
  .card > .table.devices-table > tbody > tr > td:nth-child(2) { grid-area: channel; }
  .card > .table.devices-table > tr > td:nth-child(3),
  .card > .table.devices-table > tbody > tr > td:nth-child(3) { grid-area: status; }
  .card > .table.devices-table > tr > td:nth-child(4),
  .card > .table.devices-table > tbody > tr > td:nth-child(4) { grid-area: uuid; }
  .card > .table.devices-table > tr > td:nth-child(5),
  .card > .table.devices-table > tbody > tr > td:nth-child(5) { grid-area: device; }
  .card > .table.devices-table > tr > td:nth-child(6),
  .card > .table.devices-table > tbody > tr > td:nth-child(6) { grid-area: time; }
  .card > .table.devices-table > tr > td:nth-child(7),
  .card > .table.devices-table > tbody > tr > td:nth-child(7) { grid-area: src; }
  .card > .table.devices-table > tr > td:nth-child(8),
  .card > .table.devices-table > tbody > tr > td:nth-child(8) { grid-area: ip; }
  .card > .table.devices-table > tr > td:nth-child(9),
  .card > .table.devices-table > tbody > tr > td:nth-child(9) { grid-area: app; }
  .card > .table.devices-table > tr > td:nth-child(10),
  .card > .table.devices-table > tbody > tr > td:nth-child(10) { grid-area: wallet; }
  .card > .table.devices-table > tr > td:nth-child(11),
  .card > .table.devices-table > tbody > tr > td:nth-child(11) { grid-area: album; }

  /* 删除：右下角 */
  .card > .table.devices-table > tr > td:nth-child(12),
  .card > .table.devices-table > tbody > tr > td:nth-child(12) {
    position: absolute !important;
    right: 13px;
    bottom: 10px;
    width: auto !important;
    overflow: visible;
  }
  .card > .table.devices-table > tr > td:nth-child(12) .btn,
  .card > .table.devices-table > tbody > tr > td:nth-child(12) .btn {
    padding: 5px 13px;
    font-size: 12px;        /* 按钮也是 12px */
    border-radius: 6px;
  }

  /* 类型 / 状态 badge：12px */
  .card > .table.devices-table > tr > td:nth-child(1) .badge,
  .card > .table.devices-table > tbody > tr > td:nth-child(1) .badge,
  .card > .table.devices-table > tr > td:nth-child(3) .badge,
  .card > .table.devices-table > tbody > tr > td:nth-child(3) .badge {
    font-size: 12px;
    padding: 1px 4px;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }

  /* 渠道 */
  .card > .table.devices-table > tr > td:nth-child(2),
  .card > .table.devices-table > tbody > tr > td:nth-child(2) {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 设备：型号 + 版本 一行，右对齐 */
  .card > .table.devices-table > tr > td:nth-child(5),
  .card > .table.devices-table > tbody > tr > td:nth-child(5) {
    text-align: right;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card > .table.devices-table > tr > td:nth-child(5) br,
  .card > .table.devices-table > tbody > tr > td:nth-child(5) br { display: none; }
  .card > .table.devices-table > tr > td:nth-child(5) .muted,
  .card > .table.devices-table > tbody > tr > td:nth-child(5) .muted {
    margin-left: 4px;
    font-size: 12px;        /* 版本号也是 12px，只换颜色 */
    color: var(--text-3);
  }

  /* UUID：标签 + 值 */
  .card > .table.devices-table > tr > td:nth-child(4),
  .card > .table.devices-table > tbody > tr > td:nth-child(4) {
    display: flex !important;
    align-items: baseline;
    gap: 6px;
    overflow: visible;
  }
  .card > .table.devices-table > tr > td:nth-child(4)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(4)::before {
    content: "UUID";
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.02em;
  }
  .card > .table.devices-table > tr > td:nth-child(4) a,
  .card > .table.devices-table > tbody > tr > td:nth-child(4) a {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .card > .table.devices-table > tr > td:nth-child(4) code,
  .card > .table.devices-table > tbody > tr > td:nth-child(4) code {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--accent);
  }

  /* 在线时间 */
  .card > .table.devices-table > tr > td:nth-child(6),
  .card > .table.devices-table > tbody > tr > td:nth-child(6) {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
  }

  /* IP */
  .card > .table.devices-table > tr > td:nth-child(8),
  .card > .table.devices-table > tbody > tr > td:nth-child(8) {
    text-align: right;
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 应用 / 钱包 / 相册 */
  .card > .table.devices-table > tr > td:nth-child(9),
  .card > .table.devices-table > tbody > tr > td:nth-child(9),
  .card > .table.devices-table > tr > td:nth-child(10),
  .card > .table.devices-table > tbody > tr > td:nth-child(10),
  .card > .table.devices-table > tr > td:nth-child(11),
  .card > .table.devices-table > tbody > tr > td:nth-child(11) {
    display: flex !important;
    align-items: baseline;
    gap: 2px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: visible;
    flex-wrap: nowrap;
  }
  .card > .table.devices-table > tr > td:nth-child(9)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(9)::before { content: "应用"; }
  .card > .table.devices-table > tr > td:nth-child(10)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(10)::before { content: "钱包"; }
  .card > .table.devices-table > tr > td:nth-child(11)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(11)::before { content: "相册"; }
  .card > .table.devices-table > tr > td:nth-child(9)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(9)::before,
  .card > .table.devices-table > tr > td:nth-child(10)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(10)::before,
  .card > .table.devices-table > tr > td:nth-child(11)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(11)::before {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
    flex: 0 0 auto;
  }

  /* 有密钥徽章：11px（不用极小号） */
  .card > .table.devices-table > tr > td:nth-child(10) > div,
  .card > .table.devices-table > tbody > tr > td:nth-child(10) > div { display: inline-flex; }
  .card > .table.devices-table > tr > td:nth-child(10) .badge,
  .card > .table.devices-table > tbody > tr > td:nth-child(10) .badge {
    font-size: 11px;
    padding: 0 3px;
    border-radius: 4px;
    line-height: 1.45;
    white-space: nowrap;
  }

  /* 来源 */
  .card > .table.devices-table > tr > td:nth-child(7),
  .card > .table.devices-table > tbody > tr > td:nth-child(7) {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card > .table.devices-table > tr > td:nth-child(7)::before,
  .card > .table.devices-table > tbody > tr > td:nth-child(7)::before {
    content: "来源 ";
    font-size: 11px;
    opacity: .85;
  }
}

@media (max-width: 420px) {
  .card > .table.devices-table > tr,
  .card > .table.devices-table > tbody > tr {
    gap: 5px 6px;
    padding: 12px 11px 44px !important;
  }
}

/* 手机端隐藏 build 号（19H321），让设备型号+版本一行放得下 */
@media (max-width: 768px) {
  .card > .table.devices-table > tr > td:nth-child(5) .build-ver,
  .card > .table.devices-table > tbody > tr > td:nth-child(5) .build-ver {
    display: none !important;
  }
}

/* ============================================================
   v2.4.15 手机端：除设备列表外，所有表格恢复字段标签
   （v2.4 的通用卡片布局 + data-label 标签）
   ============================================================ */

@media (max-width: 768px) {

  /* ---------- 非设备表格：每个字段独占一行（标签 + 值） ---------- */
  .card > .table:not(.devices-table) > tr > td[data-label]:not([data-label=""]),
  .card > .table:not(.devices-table) > tbody > tr > td[data-label]:not([data-label=""]) {
    flex: 1 0 100%;
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0 !important;
    border: 0 !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.045) !important;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal !important;
    word-break: break-word;
    min-width: 0;
  }

  /* 标签 */
  .card > .table:not(.devices-table) > tr > td[data-label]:not([data-label=""])::before,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    flex: 0 0 68px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.55;
  }

  /* 值区 */
  .card > .table:not(.devices-table) > tr > td[data-label]:not([data-label=""]) > *,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label]:not([data-label=""]) > * {
    min-width: 0;
  }

  /* ---------- 密钥列（secret-cell）：标签在上，内容在下 ---------- */
  .card > .table:not(.devices-table) > tr > td.secret-cell[data-label],
  .card > .table:not(.devices-table) > tbody > tr > td.secret-cell[data-label] {
    display: block !important;
    padding-top: 6px !important;
    border-bottom: 0 !important;
  }
  .card > .table:not(.devices-table) > tr > td.secret-cell[data-label]::before,
  .card > .table:not(.devices-table) > tbody > tr > td.secret-cell[data-label]::before {
    display: block;
    flex: none;
    margin-bottom: 5px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  /* ---------- UUID 链接：单行省略 ---------- */
  .card > .table:not(.devices-table) > tr > td[data-label="设备 UUID"] a,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label="设备 UUID"] a {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .card > .table:not(.devices-table) > tr > td[data-label="设备 UUID"] code,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label="设备 UUID"] code {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ---------- 最后一个字段不留虚线 ---------- */
  .card > .table:not(.devices-table) > tr > td[data-label]:not([data-label=""]):last-child,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label]:not([data-label=""]):last-child {
    border-bottom: 0 !important;
  }

  /* ---------- 笔记页（非 table 结构）：保持原样 ---------- */
  .note-row-tg { /* 不动 */ }
}

@media (max-width: 420px) {
  .card > .table:not(.devices-table) > tr > td[data-label]:not([data-label=""])::before,
  .card > .table:not(.devices-table) > tbody > tr > td[data-label]:not([data-label=""])::before {
    flex: 0 0 60px;
    font-size: 10.5px;
  }
}


/* ============================================================
   v2.5.0 设备筛选栏 + 统计卡片（电脑 / 手机通用）
   ============================================================ */

/* ---------- 筛选栏：左表单 + 右统计 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-form {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.filter-form input,
.filter-form select { max-width: 220px; }

/* ---------- 统计卡片 ---------- */
.dev-stats {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.dev-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 74px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color .15s ease, background .15s ease;
}
.dev-stats .stat:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.04);
}
.dev-stats .stat b {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dev-stats .stat span {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* 在线设备：绿色高亮 */
.dev-stats .stat-online {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.07);
}
.dev-stats .stat-online b { color: var(--ok); }
.dev-stats .stat-online span { color: rgba(45, 212, 160, 0.75); }

/* ---------- 手机端：统计三列平分 ---------- */
@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-form {
    width: 100%;
  }
  .filter-form input,
  .filter-form select {
    max-width: none;
    flex: 1 1 auto;
  }

  .dev-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
  }
  .dev-stats .stat {
    min-width: 0;
    padding: 8px 4px;
    border-radius: 8px;
  }
  .dev-stats .stat b {
    font-size: 17px;
  }
  .dev-stats .stat span {
    font-size: 10.5px;
  }
}

@media (max-width: 380px) {
  .dev-stats .stat b { font-size: 15px; }
  .dev-stats .stat span { font-size: 10px; }
  .dev-stats .stat { padding: 7px 3px; }
}



/* ============================================================
   v2.6 修复：form.row 里的 input/select 不要撑满整行
   （adm.css 全局给 input 设了 width:100%，筛选栏会被拉满）
   ============================================================ */
form.row > input[type=text],
form.row > input[type=password],
form.row > input[type=number],
form.row > input[type=search],
form.row > select {
  width: auto;
  max-width: 240px;
  flex: 0 1 auto;
}
form.row > label { flex: 0 0 auto; white-space: nowrap; }
form.row > button,
form.row > .btn { flex: 0 0 auto; }
@media (max-width: 768px) {
  form.row > input[type=text],
  form.row > input[type=password],
  form.row > input[type=number],
  form.row > input[type=search],
  form.row > select {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100%;
  }
}

/* ============================================================
   BadApple 主题（视觉复刻）v1.0  2026-10-30
   追加到 adm.css 末尾即可生效，不修改任何原有规则
   只覆盖 :root 变量 + 关键组件外观，功能零改动
   ============================================================ */

:root {
  /* ── 层次背景 ── */
  --bg-0: #07101c;
  --bg-1: #091523;
  --bg-2: #0d1a2a;
  --bg-3: #102033;
  --bg-elev: #12253b;

  /* ── 边框 ── */
  --line: rgba(139, 178, 214, 0.13);
  --line-2: rgba(139, 178, 214, 0.13);
  --line-3: rgba(58, 208, 255, 0.25);

  /* ── 文字 ── */
  --text: #eef7ff;
  --text-2: #9db0c3;
  --text-3: #617b92;

  /* ── 主题色 ── */
  --accent: #37d6ff;
  --accent-2: #9b7cff;
  --accent-soft: rgba(55, 214, 255, 0.09);
  --accent-line: rgba(55, 214, 255, 0.52);

  /* ── 语义色 ── */
  --ok: #25d695;
  --ok-soft: rgba(37, 214, 149, 0.1);
  --warn: #f6c760;
  --warn-soft: rgba(246, 199, 96, 0.1);
  --danger: #ff5f72;
  --danger-soft: rgba(255, 95, 114, 0.1);
  --coruna: #9b7cff;
  --ds: #25d695;
  --wallet: #f6c760;
  --wallet-soft: rgba(246, 199, 96, 0.1);

  /* ── 尺寸 ── */
  --radius: 15px;
  --radius-sm: 9px;
  --radius-lg: 16px;
  --side-w: 232px;
  --shadow: 0 13px 40px rgba(0, 0, 0, 0.13);
  --shadow-sm: 0 9px 24px rgba(38, 137, 245, 0.18);
  --glow: 0 0 0 1px rgba(55, 214, 255, 0.52), 0 8px 32px -8px rgba(55, 214, 255, 0.3);

  /* ── 字体 ── */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* ── 全局背景：蓝黑渐变 + 微光斑 ── */
body {
  background:
    radial-gradient(circle at 18% 8%, rgba(55, 214, 255, 0.045), transparent 42%),
    radial-gradient(circle at 82% 92%, rgba(59, 124, 255, 0.035), transparent 46%),
    var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}

/* ── 侧边栏 ── */
.side {
  width: var(--side-w);
  background: rgba(7, 17, 30, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 18px 0 55px rgba(0, 0, 0, 0.12);
}

.brand {
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.brand .logo,
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(89, 223, 255, 0.3);
  box-shadow: 0 0 24px rgba(55, 214, 255, 0.12), inset 0 1px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.brand h1,
.brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand h1 span,
.brand .brand-name span {
  color: #3b7cff;
}

/* ── 导航项 ── */
.nav {
  padding: 8px 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: 0 10px 4px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background .16s, color .16s, border-color .16s;
}

.nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav a:hover {
  background: rgba(55, 214, 255, 0.05);
  color: #cbe7f4;
}

/* 选中态：渐变 + 左侧青色发光竖条 */
.nav a.on {
  color: #effbff;
  background: linear-gradient(90deg, rgba(42, 140, 255, 0.17), rgba(55, 214, 255, 0.05));
  box-shadow: inset 0 0 0 1px rgba(55, 214, 255, 0.035);
}

.nav a.on::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #37d6ff;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px #37d6ff;
}

/* 子菜单项（缩进 + 左侧细线） */
.nav a.nav-sub {
  padding-left: 36px;
  font-size: 12.5px;
  opacity: 0.82;
  min-height: 36px;
}

.nav a.nav-sub svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.nav a.nav-sub:hover,
.nav a.nav-sub.on {
  opacity: 1;
}

/* ── 顶栏 ── */
.top {
  height: 60px;
  padding: 0 22px;
  background: rgba(7, 16, 28, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.top h2,
.top .page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-shadow: 0 0 24px rgba(55, 214, 255, 0.08);
}

/* ── 卡片 ── */
.card {
  background: linear-gradient(155deg, rgba(15, 31, 49, 0.94), rgba(11, 24, 39, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 13px 40px rgba(0, 0, 0, 0.13), inset 0 1px rgba(255, 255, 255, 0.024);
}

.card h2,
.card .card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 卡片标题左侧彩色竖条 */
.card h2::before,
.card .card-title::before {
  content: "";
  width: 3px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: linear-gradient(#37d6ff, #9b7cff);
  box-shadow: 0 0 10px rgba(55, 214, 255, 0.28);
}

/* ── 按钮 ── */
.btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .16s, background .16s, border-color .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}

.btn svg {
  width: 14px;
  height: 14px;
}

/* 主按钮：青蓝渐变 */
.btn:not(.ghost):not(.danger):not(.btn-ghost):not(.btn-danger) {
  background: linear-gradient(90deg, #2675e7, #20b9dc);
  color: #fff;
  box-shadow: 0 9px 24px rgba(38, 137, 245, 0.18);
}

.btn:not(.ghost):not(.danger):not(.btn-ghost):not(.btn-danger):hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(38, 137, 245, 0.22);
}

/* 幽灵按钮 */
.btn.ghost,
.btn.btn-ghost {
  background: #0e1c2d;
  color: var(--text);
  border-color: var(--line-3);
}

.btn.ghost:hover,
.btn.btn-ghost:hover {
  background: rgba(55, 214, 255, 0.07);
  border-color: rgba(55, 214, 255, 0.35);
  transform: translateY(-1px);
}

/* 危险按钮 */
.btn.danger,
.btn.btn-danger {
  background: linear-gradient(90deg, #e74d65, #ff6a78);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 95, 114, 0.14);
}

.btn.danger:hover,
.btn.btn-danger:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

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

/* ── 输入框 ── */
input[type=text],
input[type=password],
input[type=number],
input[type=search],
select,
textarea {
  background: #091624;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(55, 214, 255, 0.52);
  background: #0b1a2b;
  box-shadow: 0 0 0 3px rgba(55, 214, 255, 0.08);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

/* ── 表格 ── */
.table {
  font-size: 12.5px;
}

.table th {
  color: var(--text-2);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(139, 178, 214, 0.07);
}

.table tr:hover td {
  background: rgba(55, 214, 255, 0.024);
}

/* ── 徽章 / 标签 ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid rgba(119, 144, 168, 0.14);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(119, 144, 168, 0.1);
  color: var(--text-2);
}

.badge.on,
.badge.success {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(37, 214, 149, 0.18);
}

.badge.off,
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 95, 114, 0.18);
}

.badge.warn,
.badge.warning {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(246, 199, 96, 0.18);
}

.badge.darksword,
.badge.brand {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(55, 214, 255, 0.18);
}

.badge.coruna {
  background: rgba(155, 124, 255, 0.1);
  color: #9b7cff;
  border-color: rgba(155, 124, 255, 0.18);
}

/* ── 统计卡片（dev-stats / KPI）── */
.dev-stats > div,
.kpi {
  --kpi-accent: var(--accent);
  background: linear-gradient(145deg, rgba(13, 32, 51, 0.92), rgba(8, 22, 37, 0.96));
  border: 1px solid rgba(93, 161, 205, 0.15);
  border-radius: 13px;
  padding: 17px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 13px 40px rgba(0, 0, 0, 0.13), inset 0 1px rgba(255, 255, 255, 0.024);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}

/* 左侧发光竖条 */
.dev-stats > div::before,
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(transparent, var(--kpi-accent), transparent);
  box-shadow: 0 0 12px var(--kpi-accent);
  opacity: 0.7;
}

/* 右上角光斑 */
.dev-stats > div::after,
.kpi::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -52px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 214, 255, 0.1), transparent 68%);
  pointer-events: none;
}

.dev-stats > div:hover,
.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 214, 255, 0.28);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22), 0 0 24px rgba(55, 214, 255, 0.045);
}

.dev-stats b,
.dev-stats strong,
.kpi-value {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 0 22px rgba(55, 214, 255, 0.1);
}

.dev-stats span,
.kpi-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 550;
}

/* 有余额那个绿色卡片 */
.dev-stats > div.ok,
.dev-stats > div.wa-stat-ok {
  border-color: rgba(37, 214, 149, 0.32);
  --kpi-accent: var(--ok);
}

.dev-stats > div.ok b,
.dev-stats > div.wa-stat-ok b {
  color: var(--ok);
}

/* ── 分页 ── */
.pager a,
.pager span {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0b1826;
  color: var(--text-2);
  font-size: 12px;
}

.pager a:hover {
  border-color: rgba(55, 214, 255, 0.35);
  color: var(--text);
}

.pager .on,
.pager .active,
.pager span.on {
  background: linear-gradient(90deg, #2675e7, #20b9dc);
  color: #fff;
  border-color: transparent;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(139, 178, 214, 0.18);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 214, 255, 0.32);
}

/* ── 移动端微调（保持原有断点）── */
@media (max-width: 768px) {
  .top {
    height: 56px;
    padding: 0 14px;
  }
  .nav a {
    min-height: 46px;
    font-size: 14px;
  }
  .dev-stats b,
  .kpi-value {
    font-size: 24px;
  }
}

/* ── 品牌区（logo 方块 + 彩色名字）── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(38,117,231,.9), rgba(32,185,220,.9));
  border: 1px solid rgba(89,223,255,.3);
  box-shadow: 0 0 24px rgba(55,214,255,.12), inset 0 1px rgba(255,255,255,.18);
  color: #fff;
}
.brand .logo svg { width: 18px; height: 18px; }
.brand .name { color: var(--text); }
.brand .name span { color: #3b7cff; }

/* ── 顶栏面包屑 ── */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  min-width: 0;
  flex: 1 1 auto;
}
.crumb .root { color: var(--text-2); white-space: nowrap; }
.crumb .sep { color: var(--text-3); opacity: .6; }
.crumb .current {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── LIVE 徽章 ── */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37,214,149,.1);
  border: 1px solid rgba(37,214,149,.24);
  color: #25d695;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  flex: 0 0 auto;
}
.live-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25d695;
  box-shadow: 0 0 8px #25d695;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ── 顶栏布局适配 ── */
.top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.top h1 { display: none; }  /* 用面包屑替代，保留结构 */
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* ── 移动端：面包屑简化 ── */
@media (max-width: 768px) {
  .crumb .root, .crumb .sep { display: none; }
  .crumb .current { font-size: 15px; }
  .live-pill { display: none; }
}

/* ── 修复：干掉原 .brand::before 的多余方块 ── */
.brand::before {
  display: none !important;
  content: none !important;
}

/* 修复：.name span 用纯色，不要渐变文字 */
.brand .name span {
  color: #3b7cff !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #3b7cff !important;
}

/* 品牌名白色 */
.brand .name {
  color: var(--text) !important;
}


/* ============================================================
   v2 修正：对齐 BadApple 的间距 + 手机端 PC 布局
   ============================================================ */

/* ① 侧边栏去掉外层 padding（BadApple 是 brand/nav 自己控制） */
.side {
  padding: 0 !important;
}
.side .brand {
  padding: 20px 18px 18px;
  margin: 0;
}
.side .side-user {
  margin: 0 18px 16px;
  padding: 8px 11px;
}
.side .nav {
  padding: 8px 0 14px;
  flex: 1 1 auto;
  overflow-y: auto;
}

/* ② 主内容区：对齐 BadApple 的 26px 34px */
.main {
  padding: 26px 34px 64px;
}
.main .content {
  padding: 22px;
}
.main .top {
  margin-bottom: 22px;
}

/* ③ 卡片：margin-bottom 统一 16px */
.card {
  margin-bottom: 16px;
}
.card:last-child {
  margin-bottom: 0;
}

/* ④ 卡片头部：对齐 BadApple 的 12px 16px / min-height 52px */
.card h2 {
  padding: 0 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(55, 214, 255, 0.024), transparent 55%);
}

/* ⑤ 卡片内边距 */
.card > p,
.card > form,
.card > .table,
.card > .row {
  padding-left: 16px;
  padding-right: 16px;
}
.card > .table {
  padding: 0;
}

/* ============================================================
   ⑥ 手机端：保持 PC 布局，不卡片化
   BadApple 的做法是内容自适应 + 侧边栏抽屉，
   表格本身横向滚动，不是每行变卡片
   ============================================================ */

/* 表格始终表格布局，横向滚动 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  min-width: 760px;
}

@media (max-width: 1200px) {
  /* 保证主内容有足够宽度，不被挤成竖排 */
  body {
    min-width: 1180px;
  }
  .main {
    min-width: 0;
    padding: 18px 20px 48px;
  }
  .main .content {
    padding: 16px;
  }
}

/* 关掉原来的卡片化（只保留侧边栏抽屉） */
@media (max-width: 768px) {
  .table,
  .table tbody,
  .table thead,
  .table tr,
  .table td,
  .table th {
    display: revert !important;
    width: auto !important;
  }
  .table {
    display: table !important;
    min-width: 760px;
  }
  .table thead {
    display: table-header-group !important;
  }
  .table tbody {
    display: table-row-group !important;
  }
  .table tr {
    display: table-row !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .table th,
  .table td {
    display: table-cell !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(139, 178, 214, 0.07) !important;
    font-size: 12px !important;
    white-space: nowrap;
  }
  .table th {
    display: table-cell !important;
  }
  /* 去掉 data-label 的伪元素 */
  .table td[data-label]::before {
    content: none !important;
    display: none !important;
  }
}
