/* ===== 管理台 · 重构布局 ===== */
:root {
  --bg: #f4f5f8;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --line: #e6e8ef;
  --line-2: #eff1f6;
  --text: #181b23;
  --muted: #5f6572;
  --faint: #9aa0ae;
  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-soft: #eef0ff;
  --green: #0e9f6e;
  --green-soft: #e3f6ee;
  --red: #e02424;
  --red-soft: #fdecec;
  --amber: #c27803;
  --amber-soft: #fdf3e3;
  --blue: #1c64f2;
  --blue-soft: #e8f0fe;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px -6px rgba(16,24,40,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
code, .logline { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }

/* ===== 应用骨架 ===== */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex-shrink: 0;
  background: linear-gradient(180deg, #191c26 0%, #15171f 100%);
  color: #c6cad4;
  padding: 0 0 16px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(140deg, #6d64f7, #4338ca);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 4px 10px rgba(79,70,229,.4);
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 4px; background: rgba(255,255,255,.22); }
.brand-text { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .02em; }
.nav { flex: 1; padding: 6px 12px 0; overflow-y: auto; overscroll-behavior: contain; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 99px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav-label {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 4px 6px; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: #6d7488; font-weight: 600;
}
.nav-label::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.06); }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  color: #a2a8b7; padding: 8px 11px; border-radius: 9px;
  margin-bottom: 2px; text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background .14s, color .14s;
}
.nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; transition: color .14s, opacity .14s; }
.nav a:hover { background: rgba(255,255,255,.05); color: #e8eaf0; }
.nav a:hover svg { opacity: 1; }
.nav a.on { background: rgba(99,91,245,.16); color: #fff; font-weight: 600; }
.nav a.on svg { color: #a5a0ff; opacity: 1; }
.nav a.on::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 99px;
  background: #8b85f5; box-shadow: 0 0 10px rgba(139,133,245,.65);
}
.side-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 0; border-top: 1px solid rgba(255,255,255,.07); margin-top: 12px;
}
.side-avatar {
  width: 32px; height: 32px; border-radius: 99px; flex-shrink: 0;
  background: linear-gradient(140deg, #6d64f7, #4338ca);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; text-transform: uppercase;
}
.side-user { flex: 1; min-width: 0; }
.side-user b { display: block; color: #e8eaf0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-links { display: flex; gap: 6px; margin-top: 4px; }
.side-links a {
  padding: 2px 9px; border-radius: 7px; background: rgba(255,255,255,.06);
  color: #9ba0ad; font-size: 12px; text-decoration: none; transition: background .12s, color .12s;
}
.side-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.side-links a.out:hover { background: rgba(224,36,36,.18); color: #f87171; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex-shrink: 0;
  background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 650; }
.topbar .crumb { color: var(--faint); font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .user { color: var(--muted); font-size: 13px; }
.topbar .user a { color: var(--faint); margin-left: 8px; }
.topbar .user a:hover { color: var(--red); }
.content { padding: 20px 24px 48px; flex: 1; }

/* ===== 统计条 ===== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--faint); font-weight: 500; margin-bottom: 4px; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.stat .v em { font-style: normal; font-size: 13px; color: var(--faint); font-weight: 500; margin-left: 4px; }
.stat .s { margin-top: 4px; font-size: 12px; color: var(--muted); }
.stat.green .v { color: var(--green); }
.stat.red .v { color: var(--red); }

/* ===== 面板 ===== */
.card, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 16px 18px; margin-bottom: 16px; }
.panel { margin-bottom: 16px; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
}
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.panel-head .sp { flex: 1; }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.hint { font-size: 12.5px; color: var(--faint); }

/* ===== 表单 ===== */
input, select, textarea, button { font: inherit; }
input[type=text], input[type=password], select, textarea {
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 7px 11px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.13); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { padding: 7px 11px; }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius-sm);
  padding: 7px 15px; font-weight: 600; cursor: pointer; display: inline-block;
  transition: background .12s;
}
button:hover, .btn:hover { background: var(--accent-ink); color: #fff; }
button.ghost, .btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
button.ghost:hover, .btn.ghost:hover { background: var(--panel-2); color: var(--text); }
button.danger, .btn.danger { background: var(--red-soft); color: var(--red); border: 1px solid #f5c6c4; }
button.danger:hover, .btn.danger:hover { background: #fbdedd; color: var(--red); }
.btn-xs { padding: 3px 9px; font-size: 12px; font-weight: 500; }
.err { color: var(--red); background: var(--red-soft); border: 1px solid #f5c6c4; border-radius: var(--radius-sm); padding: 9px 12px; margin: 0 0 12px; }
.ok { color: var(--green); }

/* ===== 表格（紧凑 + 不横爆） ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { color: var(--faint); font-weight: 600; font-size: 12px; letter-spacing: .02em; white-space: nowrap; background: var(--panel-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .uuid { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.table .dev-main { font-weight: 600; }
.table .dev-sub { color: var(--faint); font-size: 12px; margin-top: 1px; }
.table .btn, .table button { padding: 3px 9px; font-size: 12px; }

/* ===== 徽章 / 圆点 ===== */
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; }
.badge.coruna { background: var(--blue-soft); color: var(--blue); }
.badge.darksword { background: var(--accent-soft); color: var(--accent-ink); }
.badge.on, .badge.ok, .badge.done { background: var(--green-soft); color: var(--green); }
.badge.off, .badge.info { background: #eef0f4; color: var(--muted); }
.badge.pending, .badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.sent { background: var(--blue-soft); color: var(--blue); }
.badge.likely, .badge.error { background: var(--red-soft); color: var(--red); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: #c3c8d2; }

/* ===== 链路日志 ===== */
.logline { font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
tr.log-error td { background: #fff8f7; }

/* ===== 标签页 ===== */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 9px 13px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 13.5px; font-weight: 500;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 650; }
.tab-body { padding-top: 16px; }

/* ===== 描述列表（替代 kv） ===== */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dl .it { padding: 11px 14px; border-bottom: 1px solid var(--line-2); background: var(--panel); }
.dl .it:nth-child(odd) { border-right: 1px solid var(--line-2); }
.dl .it .k { font-size: 12px; color: var(--faint); margin-bottom: 3px; }
.dl .it .v { font-size: 13.5px; word-break: break-all; }
.dl .it .v code { font-size: 12px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; }
.kv b { color: var(--faint); font-weight: 500; }

/* ===== 分页 ===== */
.pager { margin-top: 14px; color: var(--muted); }
.pager a { margin-right: 8px; }
.pagination { display: flex; gap: 5px; list-style: none; padding: 0; margin: 12px 0 0; flex-wrap: wrap; }
.pagination li a, .pagination li span { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 13px; }
.pagination li.active span { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== 照片 ===== */
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.photo-thumb { position: relative; display: block; }
.photo-scan-badge { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 11px; padding: 2px 7px; box-shadow: 0 1px 4px rgba(0,0,0,.14); pointer-events: none; }
.photo-item img, .photo-item video { width: 100%; height: 160px; object-fit: cover; display: block; background: #111; }
.photo-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.photo-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.photo-meta code { font-size: 11px; word-break: break-all; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photos a { display: block; background: #fff; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.photos .photo-thumb { position: relative; }
.photos img, .photos video { width: 100%; height: 140px; object-fit: cover; display: block; background: #111; }

/* ===== 笔记 / 密钥 / 钱包 ===== */
.note-list-tg { display: flex; flex-direction: column; gap: 2px; }
.note-row-tg { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: inherit; border: 1px solid var(--line); background: #fff; margin-bottom: 6px; }
.note-row-tg:hover { background: var(--panel-2); }
.note-row-device a { text-decoration: none; }
.note-row-device a:hover code { color: var(--accent); }
.note-row-meta .btn.ghost { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.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: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.note-item h3 { margin: 6px 0 8px; font-size: 15px; font-weight: 650; }
.pre { white-space: pre-wrap; word-break: break-all; background: var(--panel-2); padding: 10px; border-radius: 8px; font-size: 12px; color: var(--text); max-height: 280px; overflow: auto; border: 1px solid var(--line); }
.secret { background: #fff8f6; border: 1px solid #f5d5d1; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.secret code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; }
.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(--line); border-radius: var(--radius-sm); padding: 10px 12px 4px; margin-bottom: 14px; background: var(--panel-2); }
.wallet-pair .secret { margin-bottom: 8px; }
.wallet-pair .wallet-fold { margin-top: 0; }
.wallet-fold { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 10px 0; background: #fff; }
.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(--faint); }
.wallet-fold[open] summary::before { content: "▾"; }
.wallet-fold .table { margin: 0 10px 10px; width: calc(100% - 20px); }
.wallet-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.wallet-row:last-child { border-bottom: 0; }
.wallet-row span { color: var(--muted); font-size: 13px; text-align: right; }

/* ===== 命令 ===== */
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.cmd-item { padding: 10px 12px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); }
.cmd-item code { display: block; font-size: 12px; color: var(--accent); }
.cmd-item span { font-size: 13px; }
.apps-all { display: none; margin-top: 12px; }
.apps-all.show { display: block; }

/* ===== 设备工作台 ===== */
a.stat { text-decoration: none; color: inherit; display: block; transition: border-color .12s, box-shadow .12s; }
a.stat:hover { border-color: #c9ccf5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
a.stat.cur { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.dot.on.pulse { animation: dotPulse 2s ease-out infinite; }
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(14,159,110,.45); }
  70% { box-shadow: 0 0 0 6px rgba(14,159,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(14,159,110,0); }
}
.asset-line { font-size: 13px; white-space: nowrap; }
.qc-mini { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.qc-mini form { margin: 0; display: inline; }
.qc-mini .btn-xs { padding: 3px 9px; }
.qc-mini .badge.pending { text-decoration: none; }

/* ===== 设备卡片流 ===== */
.dev-list { display: flex; flex-direction: column; gap: 14px; }
.dev-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 22px 16px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.dev-card:hover { border-color: #d3d7e8; box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 10px 28px -10px rgba(16,24,40,.12); }
.dev-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dev-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dev-name { font-size: 17px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.dev-name:hover { color: var(--accent-ink); }
.dev-channel { font-size: 12px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.dev-seen { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.seen-online { color: var(--green); font-weight: 650; font-size: 13.5px; }
.seen-time { color: var(--faint); font-size: 12.5px; }
.dev-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 6px; color: var(--muted); font-size: 12.5px;
}
.dev-meta i { width: 3px; height: 3px; border-radius: 99px; background: #cfd4dd; }
.dev-meta .uuid { font-size: 11.5px; color: var(--faint); }
.dev-assets {
  display: flex; gap: 0; margin-top: 14px;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.dev-assets .as {
  flex: 1; display: flex; align-items: baseline; gap: 6px;
  padding: 10px 0;
}
.dev-assets .as + .as { border-left: 1px solid var(--line-2); padding-left: 18px; }
.dev-assets .as b { font-size: 19px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dev-assets .as span { font-size: 12px; color: var(--faint); }
.dev-assets .as em { font-style: normal; margin-left: 2px; }
.dev-assets .as .badge { margin-left: 6px; }
.dev-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.dev-actions .sp { flex: 1; }
.qc-btn {
  display: inline-block; padding: 5px 13px; font-size: 12.5px; font-weight: 500;
  color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  text-decoration: none; transition: background .12s, transform .12s;
}
.qc-btn:hover { background: #e1e5ff; transform: translateY(-1px); color: var(--accent-ink); }
.qc-btn.more { color: var(--muted); background: #f0f2f6; }
.qc-btn.more:hover { background: #e6e9f0; color: var(--text); }
.dev-queue {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px;
  background: var(--amber-soft); border: 1px solid #f2ddba; border-radius: 12px;
}
.q-label { font-size: 12px; font-weight: 650; color: var(--amber); }
.q-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: #fff; border: 1px solid #efd9b4; border-radius: 999px; padding: 3px 11px;
}
.q-chip code { font-size: 12px; color: var(--amber); }
.q-chip em { font-style: normal; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.q-hint { font-size: 11.5px; color: var(--faint); margin-left: auto; }

/* ===== 快捷指令条 ===== */
.quick-cmds {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
}
.quick-cmds form { margin: 0; display: inline; }
.qc-label { font-size: 12px; color: var(--faint); font-weight: 600; margin-right: 4px; }
.quick-cmds .btn-xs { border-radius: 999px; padding: 4px 12px; }

/* ===== 双栏 / 表单堆叠 ===== */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.form-stack label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; margin-top: 5px; }
.form-stack button { margin-top: 4px; }

/* ===== 推广 ===== */
.promo-link-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-url { font-size: 11.5px; word-break: break-all; }
.promo-iframe-wrap { margin-top: 10px; max-width: 520px; }
.promo-iframe-snippet { display: block; font-size: 11px; line-height: 1.45; word-break: break-all; white-space: pre-wrap; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--line); color: var(--text); }
button.btn-toggle-iframe.on { border-color: var(--accent); color: var(--accent); }

/* ===== 能力说明 ===== */
.panel.guide-lead { background: linear-gradient(135deg, rgba(79,70,229,.06), transparent 42%), var(--panel); }
.guide-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.guide-lead h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.guide-lead p { margin: 0; max-width: 640px; }
.guide-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); }
.pill b { color: var(--text); font-weight: 650; }
.pill.ok { background: var(--green-soft); border-color: #c0ead6; color: var(--green); }
.pill.warn { background: var(--amber-soft); border-color: #f2d9b4; color: var(--amber); }
.pill.off { background: var(--red-soft); border-color: #f5c6c4; color: var(--red); }
.ver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ver-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 14px 12px; background: #fff; }
.ver-card.on { border-color: #c9ccf5; background: linear-gradient(180deg, #f6f7ff, #fff); }
.ver-card h3 { margin: 8px 0 4px; font-size: 18px; }
.ver-card p { margin: 0; color: var(--muted); font-size: 13px; }
.ver-meta { margin-top: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--text); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.sec-title h2 { margin: 0; font-size: 18px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; min-width: 132px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.chip b { font-size: 13px; }
.chip span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== 弹窗 ===== */
.swal2-popup.adm-swal { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 16px; }
.swal2-popup.adm-swal .swal2-title { color: var(--text); font-size: 18px; }
.swal2-popup.adm-swal .swal2-html-container { color: var(--muted); }
.swal2-popup.adm-swal .swal2-actions { gap: 10px; }
.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: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0; color: var(--text); }
.swal-json .jk { color: var(--blue); }
.swal-json .js { color: var(--green); }
.swal-json .jn { color: var(--amber); }
.swal-json .jl { color: #c026d3; }

/* ===== 登录 ===== */
.login-body { background: #1b1e27; }
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background:
    radial-gradient(600px 300px at 20% 15%, rgba(99,91,255,.18) 0%, transparent 70%),
    radial-gradient(500px 340px at 85% 85%, rgba(14,159,110,.14) 0%, transparent 70%),
    #1b1e27;
}
.login-panel { width: min(380px, 100%); background: #fff; border-radius: 16px; padding: 32px 30px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-mark { display: flex; gap: 6px; margin-bottom: 20px; }
.login-mark span { width: 10px; height: 10px; border-radius: 99px; background: #c7cbf9; }
.login-mark span:nth-child(2) { background: #8b85f5; }
.login-mark span:nth-child(3) { background: #4f46e5; }
.login-kicker { margin: 0 0 6px; letter-spacing: .15em; text-transform: uppercase; font-size: 11px; color: var(--faint); font-weight: 600; }
.login-panel h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; }
.login-lead { margin: 0 0 20px; color: var(--muted); }
.login-box label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.login-box input { width: 100%; }
.login-box button { width: 100%; margin-top: 20px; padding: 10px 16px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .layout { display: block; }
  .side {
    width: auto; height: auto;
    position: sticky; top: 0; z-index: 30;
    background: #171a22;
    padding-bottom: 0;
  }
  .brand { padding: 12px 16px 10px; }
  .nav {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    gap: 4px; padding: 4px 12px 10px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-label { display: none; }
  .nav a { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.06); margin-bottom: 0; }
  .nav a.on { background: var(--accent); color: #fff; }
  .nav a.on svg { color: #fff; }
  .nav a.on::before { display: none; }
  .side-foot { display: none; }
  .cmd-grid, .two, .two-col { grid-template-columns: 1fr; }
  .content { padding: 14px 14px 40px; }
  .topbar { padding: 0 14px; }
  .dl .it:nth-child(odd) { border-right: 0; }
  .stat .v { font-size: 20px; }
}
