/* ═══════════════════════════════════════════════════════════
   RREC ADM · 赛博朋克暗色霓虹主题 (cyberpunk neon dark)
   保留全部 class / 变量名,仅改视觉,子页面自动换肤
   ═══════════════════════════════════════════════════════════ */
:root {
  /* 主色:霓虹青 */
  --primary: #22d3ee;
  --primary-hover: #67e8f9;
  --primary-active: #06b6d4;
  --primary-bg: rgba(34, 211, 238, .08);
  --primary-border: rgba(34, 211, 238, .35);
  --primary-glow: rgba(34, 211, 238, .45);
  /* 副色:电光紫 */
  --violet: #a78bfa;
  --violet-glow: rgba(167, 139, 250, .4);

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, .1);
  --success-border: rgba(52, 211, 153, .4);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, .1);
  --warning-border: rgba(251, 191, 36, .4);
  --error: #fb7185;
  --error-bg: rgba(251, 113, 133, .1);
  --error-border: rgba(251, 113, 133, .4);

  --text: #e6edf3;
  --text-2: #aeb9c5;
  --muted: #7d8a99;
  --heading: #f0f6fc;

  --border: rgba(125, 138, 153, .25);
  --split: rgba(125, 138, 153, .14);
  --hairline: rgba(125, 138, 153, .12);
  --bg-layout: #05080f;
  --bg-container: rgba(15, 22, 35, .62);
  --bg-hover: rgba(34, 211, 238, .06);
  --bg-solid: #0d1420;
  --header-bg: #070b14;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.5), 0 0 24px var(--primary-glow);
  --shadow-pop: 0 12px 40px rgba(0,0,0,.6);
  --ring: 0 0 0 3px rgba(34,211,238,.18);
  --ease: cubic-bezier(.22,.9,.3,1);

  /* 旧变量名映射(子页面兼容) */
  --bg: var(--bg-layout);
  --bg2: var(--bg-container);
  --panel: var(--bg-container);
  --line: var(--split);
  --accent: var(--primary);
  --coruna: var(--primary);
  --ds: var(--success);
  --warn: var(--warning);
  --danger: var(--error);
  --ok: var(--success);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%; color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(167,139,250,.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(34,211,238,.09), transparent 50%),
    var(--bg-layout);
  background-attachment: fixed;
}
/* 赛博网格背景 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34,211,238,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 100%);
}
.layout { position: relative; z-index: 1; }
::selection { background: rgba(34,211,238,.3); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(34,211,238,.4), rgba(167,139,250,.4)); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(34,211,238,.7), rgba(167,139,250,.7)); }
::-webkit-scrollbar-track { background: rgba(255,255,255,.02); }
a { color: var(--primary); text-decoration: none; transition: color .18s, text-shadow .18s; }
a:hover { color: var(--primary-hover); text-shadow: 0 0 12px var(--primary-glow); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--primary-hover); }

/* ---------- 顶栏:霓虹渐变 + 底部辉光线 ---------- */
.layout { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 60px; color: rgba(230,237,243,.9);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 22px; position: sticky; top: 0; z-index: 20;
  background: linear-gradient(90deg, rgba(7,11,20,.92), rgba(11,18,32,.88));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--violet), transparent) 1;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 1.5px; white-space: nowrap; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; color: #05080f; display: inline-flex;
  align-items: center; justify-content: center; font-size: 15px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 0 18px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.4);
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 14px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.4); }
  50% { box-shadow: 0 0 26px var(--violet-glow), inset 0 1px 0 rgba(255,255,255,.4); }
}
.brand span { color: var(--primary); font-weight: 500; font-size: 13px; letter-spacing: 3px; text-shadow: 0 0 10px var(--primary-glow); }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar-right a { color: var(--text-2); }
.topbar-right a:hover { color: var(--primary-hover); }
.topbar-right > span { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.topbar-right > span::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 10px var(--success);
  animation: blinkDot 2s ease-in-out infinite;
}
@keyframes blinkDot { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ---------- 侧栏:暗色玻璃 + 霓虹激活态 ---------- */
.body-row { display: flex; flex: 1; min-height: 0; }
.side {
  width: 224px; padding: 12px 0 24px; position: sticky; top: 60px;
  height: calc(100vh - 60px); overflow-y: auto; flex: 0 0 224px;
  background: rgba(10, 15, 26, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid var(--hairline);
}
.nav a {
  display: flex; align-items: center; gap: 11px; color: var(--text-2);
  padding: 0 16px 0 20px; height: 40px; line-height: 40px; margin: 2px 10px;
  border-radius: var(--radius-sm); text-decoration: none; position: relative;
  font-size: 14px; border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.nav a:hover { color: var(--primary-hover); background: var(--bg-hover); box-shadow: inset 0 0 16px rgba(34,211,238,.05); }
.nav a.on {
  color: var(--primary); font-weight: 600;
  background: linear-gradient(90deg, rgba(34,211,238,.14), rgba(34,211,238,.03));
  border-color: var(--primary-border);
  box-shadow: 0 0 16px rgba(34,211,238,.12), inset 0 0 12px rgba(34,211,238,.05);
  text-shadow: 0 0 10px var(--primary-glow);
}
.nav a.on::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--violet));
  box-shadow: 0 0 10px var(--primary-glow);
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .75; transition: opacity .2s; }
.nav a:hover svg, .nav a.on svg { opacity: 1; filter: drop-shadow(0 0 4px var(--primary-glow)); }
.nav .nav-group {
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 2px;
  padding: 18px 22px 8px; text-transform: uppercase;
}
.nav .nav-group::after { content: ""; display: block; margin-top: 6px; height: 1px; background: linear-gradient(90deg, var(--primary-border), transparent); }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; gap: 16px; }
.top h1 {
  font-size: 24px; margin: 0; font-weight: 700; color: var(--heading); line-height: 1.3;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #fff, var(--primary-hover));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.btn-mnemonic-reveal { font-size: 13px; padding: 5px 14px; }
.muted { color: var(--muted); }
.user { color: var(--muted); font-size: 13px; }
.user a { margin-left: 12px; color: var(--text-2); }
.user a:hover { color: var(--primary-hover); }

/* ---------- 卡片:玻璃拟态 ---------- */
.card {
  background: var(--bg-container); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card > h3:first-child { font-size: 16px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.card-head h3 { font-size: 16px; font-weight: 600; color: var(--heading); }
.card-head-ico {
  width: 30px; height: 30px; border-radius: var(--radius-sm); display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 30px;
  background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border);
  box-shadow: 0 0 12px rgba(34,211,238,.12);
}
.card-head-ico svg { width: 16px; height: 16px; }
.card-head-more { margin-left: auto; font-size: 13px; color: var(--muted); }
.card-head-more:hover { color: var(--primary); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

/* ---------- 表单 ---------- */
input, select, textarea, button { font: inherit; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  background: rgba(5,8,15,.5); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px; min-height: 34px; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: auto; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: var(--primary-border); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); background: rgba(5,8,15,.7); }
select option { background: var(--bg-solid); color: var(--text); }
label { color: var(--text-2); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 100%; min-width: 0; }
.field > span { font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.callout { border: 1px solid var(--warning-border); background: var(--warning-bg); color: var(--text); border-radius: var(--radius); padding: 13px 17px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; }
.callout.info { border-color: var(--primary-border); background: var(--primary-bg); }

/* ---------- 按钮:霓虹渐变 ---------- */
button, .btn {
  background: rgba(34,211,238,.06); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 16px; height: 34px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .2s var(--ease); line-height: 1; white-space: nowrap;
}
button:hover, .btn:hover { color: var(--primary); border-color: var(--primary); box-shadow: 0 0 14px rgba(34,211,238,.18); }
button.primary, .btn.primary {
  background: linear-gradient(135deg, var(--primary-active), var(--primary)); color: #05080f;
  border-color: transparent; font-weight: 600;
  box-shadow: 0 2px 14px var(--primary-glow);
}
button.primary:hover, .btn.primary:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #05080f;
  box-shadow: 0 4px 22px var(--primary-glow); transform: translateY(-1px);
}
button.primary:active, .btn.primary:active { transform: translateY(0); }
button.ghost, .btn.ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
button.ghost:hover, .btn.ghost:hover { color: var(--primary); border-color: var(--primary-border); }
button.danger, .btn.danger { background: linear-gradient(135deg, #e11d48, var(--error)); color: #fff; border-color: transparent; }
button.danger:hover, .btn.danger:hover { box-shadow: 0 0 16px rgba(251,113,133,.4); color: #fff; }
.table .btn.danger { padding: 1px 8px; font-size: 12px; height: 24px; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; background: transparent; }
.table th, .table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table th {
  color: var(--primary); font-weight: 600; font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; background: rgba(34,211,238,.04); white-space: nowrap;
  text-shadow: 0 0 8px rgba(34,211,238,.2);
}
.table th:first-child, .table td:first-child { padding-left: 4px; }
.table th:last-child, .table td:last-child { padding-right: 4px; }
.table tbody tr { transition: background .16s var(--ease); }
.table tr:hover td { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table code { font-size: 12px; color: var(--primary-hover); }
.table td a { font-weight: 500; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 1px 9px; border-radius: 6px; font-size: 12px;
  font-weight: 600; line-height: 20px; border: 1px solid transparent; white-space: nowrap;
}
.badge.coruna { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); box-shadow: 0 0 8px rgba(34,211,238,.12); }
.badge.darksword { background: var(--success-bg); color: var(--success); border-color: var(--success-border); box-shadow: 0 0 8px rgba(52,211,153,.12); }
.badge.on { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.off { background: rgba(125,138,153,.1); color: var(--text-2); border-color: var(--border); }
.badge.pending, .badge.pl { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge.combo { background: rgba(167,139,250,.1); color: var(--violet); border-color: rgba(167,139,250,.4); }
.badge.sent { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }
.badge.done { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.likely { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--split); }
.tabs a { padding: 10px 2px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .18s; }
.tabs a:hover { color: var(--primary-hover); }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; text-shadow: 0 0 10px var(--primary-glow); }

/* ---------- 描述列表 / 分页 ---------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; }
.kv b { color: var(--muted); font-weight: 500; }
.pager { margin-top: 16px; color: var(--muted); }
.pager a { margin-right: 8px; }
.pagination { display: flex; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.pagination li a, .pagination li span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); background: rgba(5,8,15,.4); transition: all .18s;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 10px rgba(34,211,238,.15); }
.pagination li.active span { border-color: var(--primary); color: var(--primary); font-weight: 600; background: var(--primary-bg); box-shadow: 0 0 10px rgba(34,211,238,.15); }

/* ---------- 统计卡（仪表盘）:霓虹辉光 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stat-grid { grid-template-columns: minmax(0, 1fr); } }
.stat-card {
  position: relative; overflow: hidden; background: var(--bg-container);
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all .25s var(--ease);
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; box-shadow: none; transition: all .25s; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--primary-border); box-shadow: var(--shadow-hover); }
.stat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stat-ico {
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 34px;
  background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border);
}
.stat-ico svg { width: 17px; height: 17px; }
.stat-card .stat-title { color: var(--text-2); font-size: 13px; font-weight: 500; }
.stat-card .stat-value { font-size: 32px; line-height: 1.1; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.stat-card .stat-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--muted); }
.stat-card .stat-value small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.stat-card.accent .stat-value { color: var(--primary); text-shadow: 0 0 16px var(--primary-glow); }
.stat-card.accent::before { background: linear-gradient(180deg, var(--primary), var(--violet)); box-shadow: 0 0 12px var(--primary-glow); }
.stat-card.ok .stat-value { color: var(--success); text-shadow: 0 0 16px rgba(52,211,153,.4); }
.stat-card.ok::before { background: var(--success); box-shadow: 0 0 12px rgba(52,211,153,.5); }
.stat-card.ok .stat-ico { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.stat-card.warn .stat-value { color: var(--warning); text-shadow: 0 0 16px rgba(251,191,36,.4); }
.stat-card.warn::before { background: var(--warning); box-shadow: 0 0 12px rgba(251,191,36,.5); }
.stat-card.warn .stat-ico { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.stat-card.err .stat-value { color: var(--error); text-shadow: 0 0 16px rgba(251,113,133,.4); }
.stat-card.err::before { background: var(--error); box-shadow: 0 0 12px rgba(251,113,133,.5); }
.stat-card.err .stat-ico { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }

/* ---------- 相册 ---------- */
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.photo-item { background: var(--bg-container); border: 1px solid var(--split); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: all .22s var(--ease); }
.photo-item:hover { border-color: var(--primary-border); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.photo-thumb { position: relative; display: block; }
.photo-scan-badge { position: absolute; top: 8px; right: 8px; z-index: 2; font-size: 11px; padding: 1px 7px; box-shadow: 0 1px 6px rgba(0,0,0,.4); pointer-events: none; }
.photo-item img { width: 100%; height: 160px; object-fit: cover; display: block; }
.photo-meta { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; }
.photo-meta code { font-size: 11px; word-break: break-all; }
.photo-cell { display: flex; flex-direction: column; gap: 4px; }
.photo-cell .btn-del-photo, .photo-meta .btn-del-photo { padding: 1px 10px; font-size: 12px; height: 26px; align-self: stretch; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photos a { display: block; background: var(--bg-container); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--split); transition: all .2s var(--ease); }
.photos a:hover { border-color: var(--primary-border); box-shadow: 0 0 16px rgba(34,211,238,.15); }
.photos .photo-thumb { position: relative; }
.photos img { width: 100%; height: 140px; object-fit: cover; display: block; }

/* ---------- 备忘录 ---------- */
.note-list-tg { display: flex; flex-direction: column; gap: 2px; }
.note-row-tg { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); color: inherit; border: 1px solid var(--split); background: var(--bg-container); margin-bottom: 8px; transition: all .18s; }
.note-row-tg:hover { border-color: var(--primary-border); box-shadow: 0 0 12px rgba(34,211,238,.08); }
.note-row-device a { text-decoration: none; }
.note-row-device a:hover code { color: var(--primary); }
.note-row-meta .btn.ghost { padding: 1px 10px; font-size: 12px; white-space: nowrap; height: 26px; }
.note-detail-block p { margin: 0 0 10px; text-align: left; }
.note-detail-body { max-height: 420px; text-align: left; margin: 0; }
.note-row-device { flex: 0 0 auto; max-width: 28%; }
.note-row-device code { font-size: 11px; word-break: break-all; }
.note-row-main { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.note-row-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.note-item { background: var(--bg-container); border: 1px solid var(--split); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.note-item h3 { margin: 6px 0 10px; font-size: 15px; font-weight: 600; color: var(--heading); }

/* ---------- 代码块 / 密钥 ---------- */
.pre { white-space: pre-wrap; word-break: break-all; background: rgba(5,8,15,.6); border: 1px solid var(--split); border-radius: var(--radius-sm); padding: 13px; font-size: 12px; color: var(--text-2); max-height: 280px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.secret { background: rgba(251,113,133,.07); border: 1px solid var(--error-border); border-left: 3px solid var(--error); padding: 11px 13px; border-radius: var(--radius-sm); margin-bottom: 8px; box-shadow: 0 0 12px rgba(251,113,133,.06); }
.secret code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; color: var(--error); font-size: 12px; text-shadow: 0 0 8px rgba(251,113,133,.2); }
.secret-cell { min-width: 280px; max-width: 560px; }
.wallet-group h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wallet-pair { border: 1px solid var(--split); border-radius: var(--radius); padding: 13px 15px 6px; margin-bottom: 16px; background: rgba(5,8,15,.4); }
.wallet-pair .secret { margin-bottom: 10px; }
.wallet-pair .wallet-fold { margin-top: 0; }
.wallet-fold { border: 1px solid var(--split); border-radius: var(--radius-sm); margin: 10px 0; background: var(--bg-container); }
.wallet-fold summary { cursor: pointer; padding: 10px 12px; color: var(--text); list-style: none; display: flex; gap: 8px; align-items: center; }
.wallet-fold summary::-webkit-details-marker { display: none; }
.wallet-fold summary::before { content: "▸"; color: var(--primary); }
.wallet-fold[open] summary::before { content: "▾"; }
.wallet-fold .table { margin: 0 12px 12px; width: calc(100% - 24px); }

/* ---------- 推广链接 ---------- */
.promo-link-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-url { display: block; font-size: 12px; line-height: 1.6; word-break: break-all; color: var(--primary-hover); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.promo-link-actions .btn.ghost { padding: 1px 11px; font-size: 12px; height: 28px; }
.promo-iframe-wrap { margin-top: 10px; max-width: 560px; }
.promo-iframe-snippet { display: block; font-size: 11px; line-height: 1.5; word-break: break-all; white-space: pre-wrap; padding: 11px 13px; background: rgba(5,8,15,.5); border-radius: var(--radius-sm); border: 1px solid var(--split); color: var(--text-2); }
button.btn-toggle-iframe.on { border-color: var(--primary); color: var(--primary); }

/* ---------- 设备详情：命令 ---------- */
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apps-all { display: none; margin-top: 12px; }
.apps-all.show { display: block; }
.tg-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 登录页:赛博玻璃卡 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(167,139,250,.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 110%, rgba(34,211,238,.12), transparent 55%),
    var(--bg-layout);
}
.login-box {
  width: 380px; background: rgba(13, 20, 33, .7); border: 1px solid var(--primary-border);
  border-radius: 16px; padding: 40px 36px; box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 40px rgba(34,211,238,.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
}
.login-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--violet), transparent);
  box-shadow: 0 0 12px var(--primary-glow);
}
.login-box h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 12px; color: var(--heading); letter-spacing: 1px; }
.login-box h1 .logo {
  width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 19px; font-weight: 800; color: #05080f;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 0 20px var(--primary-glow);
  animation: logoPulse 3s ease-in-out infinite;
}
.login-box p { margin: 0 0 8px; color: var(--muted); }
.login-box label { display: block; margin: 18px 0 8px; color: var(--text-2); font-size: 13px; }
.login-box input { width: 100%; height: 46px; padding: 8px 13px; border-radius: var(--radius-sm); }
.login-box button {
  width: 100%; margin-top: 26px; height: 46px; font-size: 15px; font-weight: 600; color: #05080f;
  background: linear-gradient(135deg, var(--primary-active), var(--primary));
  border: none; border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px var(--primary-glow); letter-spacing: 2px;
}
.login-box button:hover { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #05080f; box-shadow: 0 6px 28px var(--primary-glow); transform: translateY(-1px); }
.login-foot { color: var(--muted); font-size: 12px; margin-top: 24px; }

.err { color: var(--error); margin: 0 0 12px; }
.ok { color: var(--success); }

/* ---------- SweetAlert2 暗色 ---------- */
.swal2-popup.adm-swal { background: var(--bg-solid) !important; color: var(--text); border: 1px solid var(--primary-border); border-radius: var(--radius); box-shadow: var(--shadow-pop), 0 0 30px rgba(34,211,238,.1); }
.swal2-popup.adm-swal .swal2-title { color: var(--heading); font-size: 17px; font-weight: 600; }
.swal2-popup.adm-swal .swal2-html-container { color: var(--text-2); }
.swal2-popup.adm-swal .swal2-actions { gap: 8px; }
.swal2-popup.adm-swal .swal2-confirm { background: linear-gradient(135deg, var(--primary-active), var(--primary)) !important; color: #05080f !important; box-shadow: 0 2px 14px var(--primary-glow) !important; }
.swal-json {
  max-height: 70vh; overflow: auto; text-align: left;
  white-space: pre-wrap; word-break: break-word;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(5,8,15,.6); border: 1px solid var(--split); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 0; color: var(--text);
}
.swal-json .jk { color: var(--primary); }
.swal-json .js { color: var(--success); }
.swal-json .jn { color: var(--warning); }
.swal-json .jl { color: var(--violet); }

@media (max-width: 900px) {
  .body-row { display: block; }
  .side { width: auto; height: auto; position: relative; top: 0; flex: none; border-right: 0; border-bottom: 1px solid var(--split); }
  .nav { display: flex; flex-wrap: wrap; }
  .nav a.on::after { display: none; }
  .cmd-grid { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}

/* ===== 余额页助记词高亮 ===== */
.mn-cell{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;line-height:1.55;color:#7dd3fc;background:rgba(34,211,238,.07);border:1px solid rgba(34,211,238,.28);border-radius:6px;padding:6px 8px;max-width:280px;word-break:break-word;cursor:pointer;user-select:all;}
.mn-cell:hover{background:rgba(34,211,238,.14);border-color:rgba(34,211,238,.5);}

/* ===== 余额页一键更新 ===== */
.btn-refresh{display:inline-flex;align-items:center;min-height:38px;padding:8px 16px;border-radius:8px;font-weight:800;font-size:14px;color:#0b1220;background:linear-gradient(135deg,#22d3ee,#34d399);cursor:pointer;white-space:nowrap;}
.btn-refresh:hover{filter:brightness(1.12);}
.refresh-msg{margin:10px 0 0;color:#34d399;font-size:13px;font-weight:700;}
