/* 访问日志面板（log.11223344.uk）。2026-11-01 第五版：扁平、细边框、小圆角（6～10px）、无阴影；
   配色取第三版（太艳）和第四版（太老气）之间的中等饱和蓝；顶栏与页面同底色、导航居中，滚动后才出现分隔线 */
:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --fill: #eef1f6;
  --fill-hover: #e4e9f1;
  --text: #1a2233;
  --text-secondary: #3b4659;
  --muted: #687387;
  --text-disabled: #b3bccb;
  --line: #e3e8ef;
  --line-strong: #d2d9e3;
  --accent: #3a6fd8;
  --accent-hover: #2f5fc2;
  --accent-text: #2f63c8;
  --accent-soft: #eaf1fd;
  --accent-soft-2: #dbe7fb;
  --accent-bar: #6b95e3;
  --green: #2e8350;
  --green-soft: #e8f5ed;
  --orange: #b0650e;
  --orange-bar: #eba042;
  --orange-soft: #fdf3e4;
  --red: #c23d38;
  --red-bar: #e8706a;
  --red-soft: #fcedec;
  --green-tint: #f2f9f4;
  --green-tint-line: #dcefe2;
  --orange-tint: #fdf8ee;
  --orange-tint-line: #f3e6cc;
  --red-tint: #fdf3f2;
  --red-tint-line: #f4dad8;
  --on-tint: rgba(255, 255, 255, 0.75);
  --bar-track: #e9edf3;
  --radius: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --focus: 0 0 0 3px rgba(58, 111, 216, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Inter", "Segoe UI",
    "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1218;
  --surface: #171b23;
  --surface-2: #1b2029;
  --fill: #222833;
  --fill-hover: #2a313e;
  --text: #e6e9ef;
  --text-secondary: #c0c7d3;
  --muted: #8b94a5;
  --text-disabled: #535c6b;
  --line: #262c37;
  --line-strong: #323947;
  --accent: #6e9cf0;
  --accent-hover: #86adf3;
  --accent-text: #8ab0f5;
  --accent-soft: #1c2840;
  --accent-soft-2: #24345a;
  --accent-bar: #5a86d6;
  --green: #5fc58a;
  --green-soft: #16291f;
  --orange: #f0ab55;
  --orange-bar: #d08a34;
  --orange-soft: #2c2214;
  --red: #f0827b;
  --red-bar: #d45c55;
  --red-soft: #321b1b;
  --green-tint: #141f19;
  --green-tint-line: #1f3328;
  --orange-tint: #221c12;
  --orange-tint-line: #3a2e19;
  --red-tint: #251818;
  --red-tint-line: #3f2422;
  --on-tint: rgba(255, 255, 255, 0.07);
  --bar-track: #232a35;
  --focus: 0 0 0 3px rgba(110, 156, 240, 0.3);
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
a { color: var(--accent-text); }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }

.logo { display: inline-block; width: 24px; height: 24px; border-radius: 5px; background: var(--accent); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 7px 6px; border-top: 2px solid #fff; border-bottom: 2px solid #fff; }
:root[data-theme="dark"] .logo::after { border-color: var(--bg); }

/* ---------- 顶栏：与页面同底色、无分隔线，导航居中；滚动后才出现细线（app.js 加 .scrolled） ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { width: min(1240px, calc(100vw - 32px)); margin: 0 auto; min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; justify-self: start; }
.brand strong { font-size: 1rem; font-weight: 650; }
.page-nav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.page-nav::-webkit-scrollbar { display: none; }
.page-nav a {
  flex: none;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.12s, background 0.12s;
}
.page-nav a:hover { color: var(--text); background: var(--fill); }
.page-nav a.active { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.page-nav a:focus-visible { outline: none; box-shadow: var(--focus); }

.global-search {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  width: 240px;
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.global-search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.global-search svg { width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.global-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 0.8125rem; }
.global-search input::placeholder { color: var(--muted); }
.global-search kbd { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }

.app { width: min(1240px, calc(100vw - 32px)); margin: 0 auto; padding: 8px 0 48px; }

/* ---------- 卡片与标题 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-title .sub { color: var(--muted); font-size: 0.8125rem; margin-top: 3px; }
.section-title.compact { margin-bottom: 12px; align-items: center; }
.section-title a.tz { text-decoration: none; color: var(--accent-text); }
.section-title a.tz:hover { text-decoration: underline; }
.title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn, .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { background: var(--fill); color: var(--text); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.primary-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
:root[data-theme="dark"] .primary-btn { color: var(--bg); }
.btn:focus-visible, .primary-btn:focus-visible, .seg button:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { background: var(--surface); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
table.data .btn { height: 26px; padding: 0 10px; font-size: 0.75rem; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 0.8125rem; }
.link-btn:hover { color: var(--text); }

/* ---------- 分段选择 ---------- */
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); flex-wrap: wrap; }
.seg button {
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.seg button:hover:not(.active) { color: var(--text); }
.seg button.active { background: var(--fill); color: var(--text); font-weight: 600; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tz { color: var(--muted); font-size: 0.75rem; }
.time-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.custom-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- 输入 ---------- */
input.text, select.text {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8125rem;
}
input.text::placeholder { color: var(--muted); }
input.text:focus, select.text:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input.text { width: 240px; }

.filter-grid, .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 14px; align-items: end; margin-bottom: 20px; }
.form-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 0; }
.filter-grid label, .form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.filter-grid .text, .form-grid .text { width: 100%; }
.form-grid label.check { display: flex; align-items: center; gap: 8px; height: 32px; color: var(--text-secondary); font-size: 0.8125rem; }
.form-grid label.check input { accent-color: var(--accent); }
.filter-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- 标签 ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--fill); color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.orange { background: var(--orange-soft); color: var(--orange); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* 域名类型（AI 判断） */
.tag { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--fill); color: var(--text-secondary); font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag-note { margin-left: 8px; color: var(--text-secondary); }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.stat-card {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  min-width: 0;
  overflow: hidden;
}
.stat-card.hl { border-left: 3px solid var(--accent); }
.stat-label { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.stat-value { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-value small { font-size: 0.75rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-value.red { color: var(--red); }
.stat-value.orange { color: var(--orange); }
.stat-value.accent { color: var(--accent-text); }
.stat-note { color: var(--muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card:has(.stat-value.red) { border-left: 3px solid var(--red-bar); }
.stat-card:has(.stat-value.orange) { border-left: 3px solid var(--orange-bar); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
table.data th {
  text-align: left;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 10px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover, table.data th.sorted { color: var(--text); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data .r { text-align: right; }
table.data td.wrap { white-space: normal; word-break: break-all; }
table.data a:not(.btn):not(.uid-link) { color: var(--accent-text); text-decoration: none; }
table.data a:not(.btn):not(.uid-link):hover { text-decoration: underline; }
table.data td a.mono { color: var(--text-secondary); }

.uid-link {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.uid-link:hover { background: var(--accent-soft-2); }

.score { display: inline-grid; grid-template-columns: 30px 60px; align-items: center; gap: 8px; }
.score b { font-size: 0.875rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.score i { display: block; height: 4px; border-radius: 1px; background: var(--bar-track); overflow: hidden; }
.score i span { display: block; height: 100%; }
.lv-确定 b { color: var(--red); }
.lv-确定 i span { background: var(--red-bar); }
.lv-疑似 b { color: var(--orange); }
.lv-疑似 i span { background: var(--orange-bar); }
.lv-观察 b { color: var(--muted); }
.lv-观察 i span { background: var(--text-disabled); }

.nodes { display: flex; gap: 4px; flex-wrap: nowrap; }
.node-tag { padding: 1px 6px; border-radius: 4px; background: var(--fill); color: var(--text-secondary); font-size: 0.75rem; }
.warn-text { color: var(--orange); font-weight: 600; }
.sub-num { color: var(--muted); font-size: 0.75rem; }

/* ---------- 横条列表 ---------- */
.bar-list { display: grid; gap: 10px; }
.bar-list.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 260px) minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.bar-row .name { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; font-size: 0.8125rem; }
.bar-row .name a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.bar-row .name a:hover { color: var(--accent-text); text-decoration: underline; }
.bar-row .track, .track-inline { display: block; height: 6px; border-radius: 1px; background: var(--bar-track); overflow: hidden; }
.bar-row .track span, .track-inline span { display: block; height: 100%; background: var(--accent-bar); }
.bar-row .val { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; font-size: 0.8125rem; }
.bar-row .val small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.two-col > .panel { margin-bottom: 0; }

/* ---------- 趋势图 ---------- */
.trend { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; height: 200px; }
.trend-axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 0.6875rem; text-align: right; padding-bottom: 20px; font-variant-numeric: tabular-nums; }
.trend-plot { display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line-strong); }
.trend-plot .col { flex: 1; min-width: 2px; height: 100%; display: flex; align-items: flex-end; }
.trend-plot .col span { display: block; width: 100%; border-radius: 1px 1px 0 0; background: var(--accent-bar); opacity: 0.75; }
.trend-plot .col:hover span { opacity: 1; }
.trend-labels { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: 0.6875rem; margin-top: 6px; }
/* 总览的 BT 按小时图：红色柱，当前小时实色，还没到的小时留空 */
.trend.bt { height: 180px; }
.trend.bt .col span { background: var(--red-bar); opacity: 0.6; }
.trend.bt .col.now span, .trend.bt .col:hover span { opacity: 1; }
.trend.bt .col.future { border-bottom: 2px dotted var(--line-strong); height: 0; align-self: flex-end; }

/* ---------- 说明、空状态、分页 ---------- */
details.help { margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
details.help summary { cursor: pointer; color: var(--text-secondary); font-size: 0.8125rem; font-weight: 500; list-style: none; }
details.help summary::-webkit-details-marker { display: none; }
details.help summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); }
details.help[open] summary::before { content: "▾"; }
details.help .help-body { margin-top: 10px; color: var(--text-secondary); font-size: 0.8125rem; display: grid; gap: 8px; }
details.help table { border-collapse: collapse; }
details.help td { padding: 4px 14px 4px 0; vertical-align: top; }
details.help td:first-child { white-space: nowrap; font-weight: 600; color: var(--text); }

/* 「读取中」晚 0.3 秒才出现：数据很快回来时就不会闪一下 */
.empty, .loading { color: var(--muted); padding: 32px 0; text-align: center; font-size: 0.8125rem; }
.loading { opacity: 0; animation: appear 0.15s 0.3s forwards; }
.loading::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line-strong); border-top-color: var(--muted); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { to { opacity: 1; } }
/* 重画时保留的上一次内容，等新数据回来 */
.stale { opacity: 0.45; pointer-events: none; transition: opacity 0.15s; }
.more-row { display: flex; justify-content: center; margin-top: 14px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; font-size: 0.8125rem; }
.pager:empty { display: none; }

.notice { margin-bottom: 16px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--red-soft); color: var(--red); font-size: 0.8125rem; }
.notice.ok { background: var(--green-soft); color: var(--green); }

/* ---------- 页脚 ---------- */
.footer { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; color: var(--muted); font-size: 0.8125rem; }
.theme-switch select { height: 28px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.75rem; color: var(--text-secondary); }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(360px, 100%); display: grid; gap: 14px; padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.login-panel .logo { width: 36px; height: 36px; border-radius: 7px; }
.login-panel .logo::after { inset: 11px 9px; }
.login-panel h1 { font-size: 1.25rem; }
.login-panel > p { margin-top: -8px; font-size: 0.8125rem; }
.login-panel label { display: grid; gap: 5px; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.login-panel input { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.login-panel input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.login-panel .primary-btn { height: 38px; margin-top: 4px; }
.form-error { color: var(--red); font-size: 0.8125rem; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1100px) {
  .topbar-inner { grid-template-columns: auto 1fr; gap: 8px 16px; padding-top: 10px; }
  .page-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; padding-bottom: 8px; }
}
@media (max-width: 860px) {
  .app, .topbar-inner { width: calc(100vw - 24px); }
  .app { padding-top: 16px; }
  .panel { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .global-search { width: 100%; }
  .page-nav { justify-self: stretch; }
  .page-nav a { padding: 7px 12px; font-size: 0.875rem; }
  .global-search kbd { display: none; }
  .stat-grid, .stat-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .bar-list.cols2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(80px, 130px) minmax(0, 1fr) auto; gap: 8px; }
  .search-form, .search-form input.text { width: 100%; }
  .search-form input.text { flex: 1; }
  .custom-range input { flex: 1; min-width: 0; }
  .seg { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { flex: none; }
}
/* 手机上总览三张卡并排太挤，数字会被省略号截掉 */
@media (max-width: 560px) {
  .stat-grid.three { gap: 8px; }
  .stat-grid.three .stat-card { padding: 10px 10px 10px 12px; }
  .stat-grid.three .stat-value { font-size: 1.125rem; }
}
/* 域名页大类分布：竖柱从左到右按大小排，点柱子进分类详情；政治敏感 / BT / 成人红色，加密货币 / VPN 橙色，AI 主色 */
.bar-row.red .track span { background: var(--red-bar); }
.stat-link { display: block; color: inherit; text-decoration: none; }
.stat-link .stat-card { height: 100%; transition: border-color 0.12s; }
.stat-link:hover .stat-card { border-color: var(--accent); }
.cat-chart { overflow-x: auto; scrollbar-width: thin; }
.cat-cols { display: flex; align-items: stretch; gap: 2px; min-width: min-content; }
.cat-col { flex: 1 1 0; min-width: 38px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px 8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.cat-col:hover { background: var(--fill); }
.cat-col .v { font-size: 0.65rem; letter-spacing: -0.01em; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-col .bar { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 170px; border-bottom: 1px solid var(--line-strong); }
.cat-col .bar span { display: block; width: 62%; max-width: 30px; border-radius: 3px 3px 0 0; background: var(--accent-bar); opacity: 0.8; }
.cat-col:hover .bar span { opacity: 1; }
.cat-col.accent .bar span { background: var(--accent); }
.cat-col.red .bar span { background: var(--red-bar); }
.cat-col.orange .bar span { background: var(--orange-bar); }
.cat-col .name { font-size: 0.6875rem; line-height: 1.25; color: var(--text-secondary); text-align: center; word-break: keep-all; }
.cat-col.red .name { color: var(--red); }
.cat-col.orange .name { color: var(--orange); }
/* 前端翻页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pager .btn { min-width: 32px; padding: 0 10px; }
.pager .btn.active { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-text); font-weight: 600; }
.pager .tz { margin-left: 6px; }
.back-link { color: var(--accent-text); text-decoration: none; font-size: 0.875rem; }
.back-link:hover { text-decoration: underline; }
.title-line .sep { color: var(--muted); }
@media (max-width: 860px) {
  .cat-col .bar { height: 130px; }
}
/* BT 页：四张卡兼作档位切换按钮 */
.stat-btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-md); }
.stat-btn .stat-card { height: 100%; transition: border-color 0.12s, box-shadow 0.12s; }
.stat-btn:hover .stat-card { border-color: var(--line-strong); }
.stat-btn.active .stat-card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--surface); }
.stat-btn:focus-visible { outline: none; box-shadow: var(--focus); }
#btSearch { width: 190px; }
@media (max-width: 860px) { #btSearch { width: 100%; } }

/* BT 页「警告邮件」开关 */
.warn-switch .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-secondary); display: inline-block; }
.warn-switch.on { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.warn-switch.on .dot { background: var(--green); }
.warn-switch.off { color: var(--orange); border-color: var(--orange); background: var(--orange-soft); }
.warn-switch.off .dot { background: var(--orange); }

/* BT 页「警告邮件」视图（11-02 第二版）：一块浅底面板，左边总数，右边按封数的漏斗条，底部是现在的状态；
   刻意不用卡片格子，和上面一排统计卡片区分开 */
.mail-sum { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto auto; margin: 2px 0 16px;
  border-radius: 10px; background: var(--fill); overflow: hidden; }
.mail-total { grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 18px 22px;
  border-right: 1px solid var(--line); }
.mail-total .lb { color: var(--text-secondary); font-size: 0.8125rem; }
.mail-total .v { font-size: 2.75rem; font-weight: 650; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.mail-total .v small { font-size: 0.875rem; font-weight: 400; margin-left: 4px; color: var(--text-secondary); letter-spacing: 0; }
.mail-total .sb { color: var(--text-secondary); font-size: 0.8125rem; }
.mail-funnel { grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 16px; min-width: 0; }
.fn-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 64px 104px; align-items: center; gap: 12px; padding: 5px 8px;
  border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fn-row:hover { background: var(--surface); }
.fn-row.active { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.fn-lb { font-size: 0.8125rem; color: var(--text-secondary); white-space: nowrap; }
.fn-row.active .fn-lb { color: var(--accent); font-weight: 600; }
.fn-track { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--text-secondary) 12%, transparent); overflow: hidden; }
.fn-bar { display: block; height: 100%; border-radius: 5px; background: var(--orange-bar); transition: width 0.3s; }
.fn-row:nth-child(2) .fn-bar { background: color-mix(in srgb, var(--orange-bar) 75%, var(--red-bar)); }
.fn-row:nth-child(3) .fn-bar { background: color-mix(in srgb, var(--orange-bar) 45%, var(--red-bar)); }
.fn-row.esc .fn-bar { background: var(--red); }
.fn-n { font-size: 1.125rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.fn-n small { font-size: 0.75rem; font-weight: 400; margin-left: 2px; color: var(--text-secondary); }
.fn-row.esc .fn-n { color: var(--red); }
.fn-sub { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }
.mail-now { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 22px;
  border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-secondary); }
.mail-chip { display: inline-flex; align-items: center; gap: 6px; }
.mail-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-secondary); }
.mail-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.mail-chip.observe i { background: var(--orange-bar); }
.mail-chip.held i { background: var(--muted); opacity: 0.6; }
.mail-chip.ok i { background: var(--green); }
.mail-chip.ok b { color: var(--green); }
.mail-chip.bad i { background: var(--red); }
.mail-chip.bad b { color: var(--red); }
.mail-hint { margin-left: auto; }
@media (max-width: 900px) {
  .mail-sum { grid-template-columns: 1fr; }
  .mail-total { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 14px 16px; }
  .mail-total .v { font-size: 2rem; }
  .mail-funnel { grid-row: auto; padding: 8px; }
  .fn-row { grid-template-columns: 48px minmax(0, 1fr) 52px; gap: 8px; }
  .fn-sub { display: none; }
  .mail-now { padding: 10px 16px; }
  .mail-hint { margin-left: 0; }
}
.mail-pips { display: inline-flex; gap: 4px; vertical-align: middle; }
.mail-pips i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--orange-bar); }
.mail-pips i.on { background: var(--orange-bar); }
.mail-pips i.esc { border-color: var(--red); background: var(--red); border-radius: 2px; }
.mail-st { font-size: 0.8125rem; color: var(--text-secondary); white-space: nowrap; }
.mail-st.warn { color: var(--orange); }
.mail-st.ok { color: var(--green); }
.mail-st.bad { color: var(--red); }
.mail-evs { display: flex; flex-wrap: wrap; gap: 4px; }
.mail-ev { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--fill); color: var(--text-secondary); font-size: 0.75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-ev.bad { background: var(--orange-soft); color: var(--orange); }
.mail-ev.esc { background: var(--red-soft); color: var(--red); }

/* 用户页 BT 行为总结（11-02） */
.ubt { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.ubt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ubt-head .score b { font-size: 1.375rem; }
.ubt-level { font-weight: 600; color: var(--text-secondary); }
.ubt-head .tz { margin-left: auto; }
.ubt-none .ubt-head .tz { margin-left: 0; }
.ubt-facts { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px 14px; margin: 14px 0 0; }
.ubt-facts dt { color: var(--muted); font-size: 0.8125rem; padding-top: 2px; }
.ubt-facts dd { margin: 0; font-size: 0.875rem; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ubt-facts .small { font-size: 0.75rem; margin-top: 4px; }
.ubt-clues, .ubt-ips { display: flex; flex-wrap: wrap; gap: 6px; }
.ubt-clue { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--red-soft); font-size: 0.8125rem; }
.ubt-clue b { color: var(--red); font-weight: 600; }
.ubt-clue.nas { background: var(--orange-soft); }
.ubt-clue.nas b { color: var(--orange); }
.ubt-clue.app { background: var(--fill); }
.ubt-clue.app b { color: var(--text-secondary); }
.ubt-clue .muted { font-size: 0.75rem; }
.ubt-ip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--fill); font-size: 0.8125rem; }
.ubt-ip .muted { font-size: 0.75rem; }
.ubt-hours { display: flex; align-items: flex-end; gap: 2px; height: 44px; max-width: 560px; }
.ubt-col { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--bar-track); border-radius: 2px; }
.ubt-col > span { width: 100%; display: flex; align-items: flex-end; background: var(--accent-bar); border-radius: 2px; min-height: 0; }
.ubt-col i { display: block; width: 100%; background: var(--red-bar); border-radius: 2px; }
.ubt-copy { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.ubt-copy-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 0.875rem; }
.ubt-copy pre { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-family: var(--font); font-size: 0.8125rem; line-height: 1.6; white-space: pre-wrap; color: var(--text-secondary); }
details.fold > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h3::before { content: "▸"; display: inline-block; width: 16px; color: var(--muted); }
details.fold[open] > summary { margin-bottom: 12px; }
details.fold[open] > summary h3::before { content: "▾"; }
/* 用户页 BT 区块（11-03 重排）：评分依据一排小格；「谁在下」「什么时候、怎么连的」两栏；其他 P2P、警告邮件各占一行 */
.ubt-cap { margin-top: 14px; color: var(--muted); font-size: 0.75rem; }
.ubt-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.ubt-stat { display: grid; gap: 1px; align-content: start; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ubt-stat > span { color: var(--muted); font-size: 0.75rem; }
.ubt-stat b { font-size: 1.25rem; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--text); }
.ubt-stat b small { font-size: 0.75rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.ubt-stat em { font-style: normal; font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ubt-stat.hit { border-color: var(--red-bar); background: var(--red-soft); }
.ubt-stat.hit b { color: var(--red); }
.ubt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.ubt-sec { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ubt-sec h4 { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ubt-sec h4 .small { font-weight: 400; font-size: 0.75rem; }
.ubt-sec .ubt-facts { grid-template-columns: 64px minmax(0, 1fr); margin: 0; }
.ubt-sec .ubt-hours { max-width: none; height: 56px; }
.ubt-sec-other { margin-top: 12px; background: transparent; border-style: dashed; }
.ubt-sec-other .ubt-clue { background: var(--fill); }
.ubt-axis { display: flex; justify-content: space-between; margin-top: 3px; font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ubt-mails { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; }
.ubt-mails-label { color: var(--muted); font-size: 0.8125rem; }
.ubt-mails .mail-ev { font-size: 0.8125rem; padding: 2px 8px; }
@media (max-width: 1100px) {
  .ubt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ubt { padding: 12px; }
  .ubt-facts { grid-template-columns: 1fr; gap: 4px; }
  .ubt-sec .ubt-facts { grid-template-columns: 1fr; }
  .ubt-facts dd { margin-bottom: 8px; }
  .ubt-head .tz { margin-left: 0; width: 100%; }
  .ubt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ubt-stat em { white-space: normal; }
  .ubt-sec { padding: 10px 12px; }
}
.ubt-head .score { grid-template-columns: auto 80px; }
.ubt-clue.hint { background: var(--fill); } .ubt-clue.hint b { color: var(--text-secondary); }
.ubt-clue .same { font-size: 0.75rem; color: var(--orange); font-weight: 600; }
.ubt-copy-head .small { margin: 0 auto 0 8px; font-size: 0.75rem; }
.ubt-ai-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; font-size: 0.875rem; }
.ubt-ai-list { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.ubt-ai pre { margin-top: 0; }

/* 用户页：警告邮件存档与原文弹窗 */
.mail-ev.link { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.mail-ev.link:hover { color: var(--text); }
.umail .table-wrap { margin-top: 6px; }
.mail-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(0, 0, 0, 0.45); }
.mail-box { display: flex; flex-direction: column; width: min(760px, 100%); max-height: 100%; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.mail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mail-title { min-width: 0; }
.mail-title .small { margin-top: 2px; font-size: 0.75rem; }
.mail-to { margin-top: 4px; font-size: 0.8125rem; color: var(--text-secondary); word-break: break-all; }
.mail-to b { color: var(--text); font-weight: 600; }
.mail-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-frame { width: 100%; height: 70vh; border: 0; background: #eeeeee; }
.mail-text { margin: 0; padding: 16px; height: 70vh; overflow: auto; font-family: var(--font); font-size: 0.8125rem; line-height: 1.7; white-space: pre-wrap; color: var(--text); }
@media (max-width: 640px) { .mail-modal { padding: 0; } .mail-box { height: 100%; border-radius: 0; } .mail-frame, .mail-text { height: auto; flex: 1; } }

/* 11-04 用户页 UID 后面的 v2board 后台链接 */
.user-head { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; }
.user-head .info-ext + .info-ext { margin-left: -4px; }
.user-top .info-ext { font-size: 0.8rem; font-weight: 500; color: var(--accent-text); text-decoration: none; padding: 2px 8px; border: 1px solid var(--accent-soft-2); border-radius: 6px; white-space: nowrap; }
.user-top .info-ext:hover { background: var(--accent-soft); }
/* 两个链接：电脑上在标题里（display: contents，排版和直接放在标题里一样），手机上挪到第二行，见文件末尾的手机样式 */
.user-links { display: contents; }
.user-links-m { display: none; }

/* 11-04 用户页每小时柱状图：鼠标放上去立刻显示时间和数量 */
.ubt-col { position: relative; cursor: default; }
.ubt-col:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.ubt-col:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20;
  white-space: pre; padding: 6px 9px; border-radius: 6px; font-size: 0.75rem; line-height: 1.5; font-variant-numeric: tabular-nums;
  color: var(--surface); background: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); pointer-events: none;
}
.ubt-col.tip-l:hover::after { left: 0; transform: none; }
.ubt-col.tip-r:hover::after { left: auto; right: 0; transform: none; }

/* 11-04 用户页「AI 用户画像」第三版：总结卡 → 常用网站与工具 → 检测数据卡片 */
#uprofBody:empty { display: none; }
#userProfile .section-title.compact:has(+ #uprofBody:empty) { margin-bottom: 0; }
/* 11-05 用户选方案 A：整张卡的底色按风险变（低 淡绿、中 淡橙、高 淡红），不要左边色条；读不到日志、没有风险档的保持灰底。
   底色上的小标改成半透明白底，「风险 X」用白底彩字，免得和底色混在一起 */
.uprof-hero { position: relative; padding: 16px 18px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.uprof-hero.tone-red { background: var(--red-tint); border-color: var(--red-tint-line); }
.uprof-hero.tone-orange { background: var(--orange-tint); border-color: var(--orange-tint-line); }
.uprof-hero.tone-green { background: var(--green-tint); border-color: var(--green-tint-line); }
.uprof-badges { display: flex; gap: 6px; margin-bottom: 8px; }
.uprof-badge { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--text-secondary); }
.uprof-hero[class*="tone-"] .uprof-badge { background: var(--on-tint); }
.uprof-hero.tone-red .uprof-badge.risk { background: var(--surface); color: var(--red); }
.uprof-hero.tone-orange .uprof-badge.risk { background: var(--surface); color: var(--orange); }
.uprof-hero.tone-green .uprof-badge.risk { background: var(--surface); color: var(--green); }
/* 11-14 用户：同性恋 / 成人网站的行为标签（系统版 / AI 版） */
.uprof-hero .uprof-badge.gay {
  position: relative; display: inline-flex; align-items: center; gap: 3px;
  background: var(--surface); color: var(--text); padding: 2px 9px;
}
.uprof-hero .uprof-badge.gay::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(120deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.uprof-badge .gay-emoji { font-size: 0.95em; line-height: 1; }
.uprof-hero .uprof-badge.adult { background: var(--surface); color: var(--red); }
.uprof-hero .uprof-badge.adult.soft { color: var(--orange); }
.uprof-one { font-size: 1.125rem; font-weight: 650; line-height: 1.5; color: var(--text); letter-spacing: -0.005em; }
.uprof-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.uprof-cap { margin: 18px 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.uprof-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.uprof-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--fill); font-size: 0.8125rem; color: var(--text-secondary); min-width: 0; }
.uprof-tool em { flex: none; font-style: normal; font-weight: 600; color: var(--text); min-width: 3em; }
.uprof-tool span { overflow-wrap: anywhere; }
/* 11-05 用户：去掉「常用网站与工具」「检测数据」两个小标题，靠间距分开 */
.uprof-list { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 9px 14px; margin: 20px 0 0; }
.uprof-locs { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.uprof-locs b { font-weight: 600; color: var(--text); }
.uprof-list dt { font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }
.uprof-list dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; line-height: 1.6; min-width: 0; }
.uprof-list dd b { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.uprof-list dd b.tone-red { color: var(--red); }
.uprof-list dd b.tone-orange { color: var(--orange); }
.uprof-list dd b.tone-green { color: var(--green); }
.uprof-list dd .why { font-size: 0.75rem; color: var(--muted); overflow-wrap: anywhere; }
/* 11-14 用户：系统画像的「社交媒体」一行，公开账号 / 手动搜索链接 */
.uprof-social-a { font-size: 0.8125rem; color: var(--accent-text); text-decoration: none; }  /* 间距由 flex gap 管，链接自己不要再加 margin，否则 / 前后会空 */
/* .uprof-list dd 是 flex：一整行的多个链接 / 文本要包在一个 span 里，否则 gap 会在“/”两边撑出空隙 */
.uprof-social-search { display: inline; }
.uprof-social-a:hover { text-decoration: underline; }
.uprof-foot { margin-top: 12px; font-size: 0.75rem; }
.uprof-ask { margin-top: 18px; }
.uprof-ask-bar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 10px 8px 14px; border: 1px solid var(--accent); border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-text); font: inherit; text-align: left; cursor: pointer; transition: background 0.12s; }
.uprof-ask-bar:hover { filter: brightness(0.97); }
.uprof-ask-bar:focus-visible { outline: none; box-shadow: var(--focus); }
.uprof-ask-bar svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.uask-title { font-size: 0.9375rem; font-weight: 600; white-space: nowrap; }
.uask-note { flex: 1; min-width: 0; font-size: 0.8125rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uask-stat { font-size: 0.8125rem; white-space: nowrap; }
.uask-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
:root[data-theme="dark"] .uask-toggle { color: var(--bg); }
.uask-toggle::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.uprof-ask:not(.collapsed) .uask-toggle::after { transform: translateY(2px) rotate(-135deg); }
.uprof-ask.collapsed .uprof-ask-body { display: none; }
.uprof-ask-body { padding: 14px 2px 0; }
.uask-foot { margin-top: 8px; font-size: 0.75rem; }
@media (max-width: 560px) { .uask-note { display: none; } .uask-stat { flex: 1; text-align: right; } }
.uprof-ask-list { display: flex; flex-direction: column; gap: 12px; }
.uprof-ask-list:empty { display: none; }
.qa { display: flex; flex-direction: column; gap: 6px; }
.qa-q, .qa-a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.qa-a { grid-template-columns: 22px minmax(0, 1fr); }
.qa-k { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: var(--fill); color: var(--text-secondary); }
.qa-a .qa-k { background: var(--accent-soft); color: var(--accent-text); }
.qa p { margin: 0; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.qa-q p { font-weight: 600; color: var(--text); font-size: 0.875rem; }
.qa-a p { font-size: 0.875rem; color: var(--text-secondary); }
.qa-q time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.qa-foot { margin-top: 2px; font-size: 0.6875rem; color: var(--muted); }
.qa-err { color: var(--red) !important; }
.qa-more { align-self: flex-start; padding: 0; font-size: 0.75rem; }
.uprof-ask-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uprof-ask-chips:empty { display: none; }
.uask-chip { height: 26px; padding: 0 10px; border: 0; cursor: pointer; font: inherit; font-size: 0.75rem; }
.uask-chip:hover { background: var(--accent-soft); color: var(--accent-text); }
.uprof-ask-form { display: flex; gap: 8px; margin-top: 12px; }
.uprof-ask-form input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 0.8125rem; outline: none; }
.uprof-ask-form input:focus { border-color: var(--accent); box-shadow: var(--focus); }
.uprof-ask-form .btn { height: 34px; }
@media (max-width: 560px) { .uprof-list { grid-template-columns: 64px minmax(0, 1fr); } .uprof-one { font-size: 1rem; } }

/* 11-04 用户页统一布局：顶部 UID + 邮箱 + 概况，下面 AI 画像、BT 行为、两个折叠 */
.user-top .stat-grid { margin: 16px 0 0; }
.user-head .user-email { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.user-head .user-email.copyable { cursor: copy; }
.user-head .user-uid.copyable { cursor: copy; }
.user-head .user-uid.copyable:hover { color: var(--accent-text); }
.user-head .user-email.copyable:hover { color: var(--accent-text); }
.user-bt #userBt > .ubt:first-child { margin-top: 0; }

/* 11-04 「下载时在线的设备」：普通设备灰底，和下载时段重合 ≥ 80% 的橙色 */
.ubt-dev + .ubt-dev { margin-top: 8px; }
.ubt-dev > .mono { margin-right: 8px; font-size: 0.8125rem; }
.ubt-dev > .muted { font-size: 0.75rem; }
.ubt-dev .ubt-clues { margin-top: 4px; }
.ubt-clue.dev { background: var(--fill); }
.ubt-clue.dev b { color: var(--text-secondary); }
.ubt-clue.dev.strong { background: var(--orange-soft); }
.ubt-clue.dev.strong b { color: var(--orange); }
.ubt-dev-other { margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.ubt-dev-other span { margin-right: 6px; color: var(--text-secondary); }
.uprof-time { font-size: 0.75rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* 11-04 工单回复（系统生成 + AI 生成）默认收起；概况缩成一行 */
.ubt-reply { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.ubt-reply > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; font-size: 0.875rem; }
.ubt-reply > summary::-webkit-details-marker { display: none; }
.ubt-reply > summary::before { content: "▸"; color: var(--muted); width: 12px; }
.ubt-reply[open] > summary::before { content: "▾"; }
.ubt-reply > summary .small { font-size: 0.75rem; }
.ubt-reply .ubt-copy:first-of-type { border-top: 0; padding-top: 4px; margin-top: 8px; }
.user-meta { margin-top: 12px; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.user-meta b { color: var(--text-secondary); font-weight: 600; }
.user-meta i { font-style: normal; margin: 0 8px; color: var(--line-strong); }

/* 11-04 用户页顶部：第一行 UID + 邮箱 + 链接，右边时间选择；第二行概况 + 主要设备，右边筛选 */
.user-top .user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.user-top .user-row + .user-row { margin-top: 12px; }
.user-top .user-row .user-meta { margin-top: 0; flex: 1 1 auto; min-width: 0; }
.uprof-devs { flex-basis: 100%; font-size: 0.75rem; color: var(--muted); }
.uprof-devs b { font-weight: 600; color: var(--text-secondary); }
.uprof-devs:empty { display: none; }

/* 11-04 用户：用户详细页的小字大一号（只在用户页 .upage 里生效）：11px → 12px、12px → 13px、13px → 14px */
.upage :is(.ubt-axis) { font-size: 0.75rem; }
.upage :is(.tz, .chip, .mail-ev, .ubt-facts .small, .ubt-clue .muted, .ubt-clue .same, .ubt-ip .muted, .ubt-cap, .ubt-stat > span, .ubt-stat b small,
  .ubt-stat em, .ubt-sec h4 .small, .ubt-copy-head .small, .ubt-reply > summary .small, .ubt-dev > .muted, .ubt-dev-other,
  .uprof-badge, .uprof-cap, .uprof-list dd .why, .uprof-foot, .uprof-time, .uprof-devs, .muted.small) { font-size: 0.8125rem; }
.upage :is(.ubt-facts dt, .ubt-clue, .ubt-ip, .ubt-sec h4, .ubt-mails-label, .ubt-mails .mail-ev, .ubt-dev > .mono, .uprof-list dt,
  .uprof-tool, .user-meta, .ubt-copy pre) { font-size: 0.875rem; }
.upage .chip { height: 24px; }
/* 11-04 常用网站与工具两行 × 6 格（类别在上、产品在下）；系统统计 / AI 生成切换 */
@media (max-width: 1100px) { .uprof-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .uprof-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.uprof-seg { display: inline-flex; gap: 4px; margin-left: 6px; padding: 3px; border-radius: 10px; background: var(--fill); }
.uprof-seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--text-secondary); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.uprof-seg svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.uprof-seg .seg-ai:not(.active) svg { stroke: #7c5cf0; }
.uprof-seg button:hover:not(.active) { color: var(--text); background: var(--surface); }
.uprof-seg button:focus-visible { outline: none; box-shadow: var(--focus); }
.uprof-seg .seg-basic.active { background: var(--text); color: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25); }
.uprof-seg .seg-ai.active { background: linear-gradient(135deg, #7c5cf0, #3a6fd8); color: #fff; box-shadow: 0 2px 8px rgba(98, 92, 230, 0.35); }
.uprof-seg .seg-ai.active svg { fill: rgba(255, 255, 255, 0.35); }
.uprof-tool.alert { background: var(--red-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent); }
.uprof-tool.alert em { color: var(--red); display: flex; align-items: center; gap: 6px; }
.uprof-tool.alert em i { font-style: normal; font-size: 0.6875rem; font-weight: 600; padding: 0 5px; border-radius: 3px; color: #fff; background: var(--red); }
.uprof-tool.alert span { color: var(--red); }
.uprof-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.uprof-top-k { font-size: 0.8125rem; font-weight: 600; color: var(--muted); margin-right: 2px; }
.uprof-top-i { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 0.9375rem; font-weight: 600; }
.uprof-top-i i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 0.75rem; color: #fff; background: var(--accent); }

/* 11-04 BT 复核结果按钮 */
.ubt-review { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 0.8125rem; }
.ubt-review .btn { padding: 2px 12px; }
.ubt-review .btn.active[data-rv="real"] { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.ubt-review .btn.active[data-rv="false"] { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }

/* 11-04 最常访问前五名带网站图标（11-05 用户：去掉数字序号） */
.uprof-logo { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--surface); color: var(--text-secondary); font-size: 0.6875rem; font-weight: 700; overflow: hidden; flex: none; }
.uprof-logo.has-img { background: #fff; }
.uprof-logo img { width: 18px; height: 18px; object-fit: contain; display: block; }
/* 11-04 日志明细「按网站 / 应用找用户」 */
.kw-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kw-form .text { flex: 1 1 240px; max-width: 360px; }
.kw-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.875rem; margin-bottom: 6px; }
.kw-head .tz { margin-left: auto; }
.kw-sum { font-size: 0.875rem; margin: 6px 0 10px; color: var(--text-secondary); }
.kw-sum b { font-size: 1.125rem; color: var(--text); }
.ubt-clue.dev, .ubt-dev-other .dev-o { cursor: help; }
.ubt-dev-other .dev-o { color: var(--text-secondary); }
.ubt-dev-other > span:first-child { color: var(--muted); }

/* 11-05 用户：手机上用户页顶部和「用户画像」标题无故换行、把页面拉高，改紧凑（电脑不变）：
   顶部第一行只放 UID + 邮箱，两个链接挪到第二行（在线 IP 后面，筛选靠右）；画像标题一行放下标题、切换和按钮，生成时间单独一行放在标题下面 */
@media (max-width: 560px) {
  .user-top .user-row + .user-row { margin-top: 10px; }
  .user-top .user-row.one { flex-wrap: nowrap; align-items: flex-start; }
  .user-top .user-row.one .user-head { gap: 4px 8px; }
  .user-top .user-row.one .btn { flex: none; height: 28px; padding: 0 9px; }
  .user-top .user-row:last-child { justify-content: flex-start; gap: 6px 5px; }
  .user-top .user-row:last-child .user-meta { flex: 0 1 auto; }
  .user-links-m { display: inline-flex; gap: 5px; flex: none; }
  .user-top .info-ext { font-size: 0.75rem; padding: 1px 6px; }
  .user-top .user-row:last-child .btn { margin-left: auto; height: 28px; padding: 0 9px; }
  /* 画像标题：第一行标题 + 切换 + 按钮（不许挤压换行），生成时间 / 生成进度单独一行放在下面（11-05 用户：生成中会错位、生成后看不到时间） */
  #userProfile > .section-title { gap: 4px 8px; flex-wrap: wrap; }
  #userProfile .title-line { gap: 8px; flex-wrap: nowrap; flex: none; }
  #userProfile .title-line h3 { white-space: nowrap; }
  /* 11-06 用户：一排放得下就别把生成时间挤到第二行——时间和按钮放在标题同一行右边，放不下时整组换行，时间太长省略 */
  #userProfile .panel-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; flex-wrap: nowrap; }
  #uprofBtn { flex: none; padding: 0 10px; }
  #uprofTime { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #uprofTime:empty { display: none; }
  /* BT 嫌疑页：刷新只留图标，三个按钮放一行 */
  #btRefresh .btn-label { display: none; }
  #btWarn, #btCopy { padding-left: 8px; padding-right: 8px; }
  #btRefresh { padding-left: 9px; padding-right: 9px; }
  .uprof-seg { margin-left: 0; }
  .uprof-seg button { height: 30px; padding: 0 10px; font-size: 0.8125rem; gap: 4px; }
}
@media (max-width: 370px) {
  .upage .user-top .user-meta { font-size: 0.8125rem; }  /* 要压过上面 .upage :is(…) 的「小字大一号」 */
}

/* 11-06 用户：复制后的小提示浮在点的东西上方（position: fixed，不占位置、不推动页面） */
.copy-flash { position: fixed; z-index: 1000; transform: translateX(-50%); padding: 3px 10px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; pointer-events: none; animation: copy-flash 1.5s ease forwards; }
.copy-flash.bad { background: var(--red); color: #fff; }
@keyframes copy-flash { 0% { opacity: 0; transform: translate(-50%, 4px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
/* 警告邮件存档：手机上表格改成每封两行（11-06 用户：主题被挤成一字一行、「查看」被截掉）
   第一行主题 + 右侧「查看」，第二行时间、第几封、状态 */
@media (max-width: 640px) {
  .umail .table-wrap { margin: 0; padding: 0; overflow: visible; }
  .umail .ubt-copy-head { flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 2px 10px; }
  .umail .ubt-copy-head b { flex: none; }
  .umail .ubt-copy-head .small { margin-left: 0; }
  table.data.mail-table, table.data.mail-table tbody { display: block; }
  table.data.mail-table thead { display: none; }
  table.data.mail-table tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "subj subj subj act" "ts n st act";
    align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.data.mail-table tr:last-child { border-bottom: 0; }
  table.data.mail-table td { padding: 0; border: 0; }
  table.data.mail-table tbody tr:hover td { background: none; }
  table.data.mail-table td.mt-subj { grid-area: subj; white-space: normal; word-break: normal; overflow-wrap: anywhere; font-size: 0.875rem; font-weight: 500; color: var(--text); }
  table.data.mail-table td.mt-ts { grid-area: ts; color: var(--text-secondary); }
  table.data.mail-table td.mt-n { grid-area: n; color: var(--text-secondary); }
  table.data.mail-table td.mt-st { grid-area: st; min-width: 0; }
  table.data.mail-table td.mt-act { grid-area: act; }
  table.data.mail-table .btn { height: 32px; padding: 0 14px; font-size: 0.8125rem; }
}
/* 用户页顶部套餐标签（11-07）：和 UID、邮箱同一行，颜色同「IP 占用」里的套餐徽章 */
.user-head .user-plan { display: inline-flex; align-self: center; }
.user-head .user-plan:empty { display: none; }
.user-head .user-plan .ipl-plan-badge { font-size: 0.8125rem; padding: 3px 10px; font-family: var(--font); }

/* 11-13 用户页 BT：连接实例 */
.ubt-samples { display: flex; flex-direction: column; gap: 4px; }
.ubt-sample { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--fill); font-size: 0.8125rem; }
.ubt-sample.bt { box-shadow: inset 3px 0 0 var(--red, #d64545); }

/* 11-13 BT 页「审判记录」时间轴 */
.review-log { margin: 4px 0 16px; padding: 14px 16px; border: 1px solid var(--line, #e3e6ea); border-radius: var(--radius, 10px); background: var(--fill); }
.rv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.rv-day { position: relative; padding-left: 18px; border-left: 2px solid var(--line, #e3e6ea); margin-left: 4px; padding-bottom: 10px; }
.rv-day::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #4a5a8c); }
.rv-date { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rv-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.8125rem; }
.rv-time { min-width: 3em; color: var(--muted, #777); }
.rv-note { padding: 1px 6px; border-radius: var(--radius-sm); background: var(--bg, #fff); }

/* 11-13 用户：用户页下面分三个标签页（用户画像 / IP 占用 / BT 下载情况），点着切换；标签条放在顶部 UID 卡片底边 */
.user-top .utabs { display: flex; gap: 4px; margin: 16px -20px -20px; padding: 0 16px; border-top: 1px solid var(--line); }
.utabs button {
  position: relative; border: 0; background: none; padding: 12px 14px 13px; font: inherit; font-size: 0.9375rem; font-weight: 500;
  color: var(--muted); cursor: pointer; white-space: nowrap;
}
.utabs button:hover:not(.active) { color: var(--text); }
.utabs button.active { color: var(--text); font-weight: 600; }
.utabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.utabs button:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.utab-pane[hidden] { display: none; }
@media (max-width: 860px) {
  .user-top .utabs { margin: 14px -16px -16px; padding: 0 8px; }
}
@media (max-width: 640px) {
  .utabs button { flex: 1 1 0; padding: 11px 4px 12px; font-size: 0.875rem; }
  .utabs button.active::after { left: 18%; right: 18%; }
}

/* 11-13 用户页「处理记录」按钮靠右，展开后复用审判记录的样式 */
.ubt-review .ubt-log-btn { margin-left: auto; }
.ubt-log { margin: 8px 0 12px; }

/* 11-13 审判记录每条后面的「处理记录」跳转 */
.rv-item .rv-jump { padding: 2px 8px; font-size: 0.75rem; margin-left: auto; }

/* ---------- 11-13 BT 嫌疑页改版：标题行（时间下拉 + 刷新）→ 分类标签 + 筛选 → 操作条 ---------- */
.bt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.bt-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bt-title h3 { margin: 0; }
.bt-head-right { display: flex; align-items: center; gap: 8px; }
.bt-sub { margin: 4px 0 14px; font-size: 0.8125rem; }
.bt-sub a { color: var(--accent-text); text-decoration: none; }
.bt-sub a:hover { text-decoration: underline; }
.icon-btn { width: 32px; padding: 0; }

/* 时间下拉 */
.tdrop { position: relative; }
.tdrop-btn { min-width: 108px; justify-content: space-between; color: var(--text); }
.tdrop-btn svg:last-child { width: 12px; height: 12px; opacity: 0.6; }
.tdrop-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: var(--focus); }
.tdrop-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; padding: 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(16, 24, 40, 0.14); display: flex; flex-direction: column; gap: 10px; }
.tdrop-group { display: flex; flex-direction: column; gap: 6px; }
.tdrop-group + .tdrop-group { padding-top: 10px; border-top: 1px solid var(--line); }
.tdrop-lb { font-size: 0.75rem; color: var(--muted); }
.tdrop-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tdrop-opts button { height: 30px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-secondary);
  font-size: 0.8125rem; cursor: pointer; white-space: nowrap; }
.tdrop-opts button:hover { background: var(--fill); color: var(--text); }
.tdrop-opts button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.tdrop-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.tdrop-range .text { width: 100%; min-width: 0; font-size: 0.75rem; padding: 0 6px; }
.tdrop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* 分类标签 + 筛选 */
.bt-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.bt-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.bt-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.bt-tab:hover:not(.active) { color: var(--text); }
.bt-tab.active { color: var(--text); font-weight: 600; }
.bt-tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.bt-tab:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.bt-cnt { min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--fill); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.bt-cnt.red { background: var(--red-soft); color: var(--red); }
.bt-cnt.orange { background: var(--orange-soft); color: var(--orange); }
.bt-tab-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--line-strong); }
.bt-search { width: 220px; margin-bottom: 6px; }

/* 操作条 */
.bt-ops { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 12px 0; }
.bt-ops-left, .bt-ops-right { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.bt-page .review-log { margin-top: 0; }

@media (max-width: 860px) {
  .bt-search { width: 100%; margin-bottom: 8px; }
  .bt-tabs { overflow-x: auto; flex-wrap: nowrap; width: 100%; }
  .tdrop-menu { width: min(300px, calc(100vw - 48px)); }
}

/* 11-13 全站时间选择改下拉：按钮在工具栏左边时菜单向右展开（bindTimeDrop 按位置加 .align-left） */
.tdrop-menu.align-left { right: auto; left: 0; }

/* 11-14 用户页精简（用户：标签下面又重复一个标题、文字太多、方框太多，平板和手机上全是框）：
   三个标签下面都不再有标题行；画像、BT 里的小方框改成无底色的行，用细线分隔 */
.has-tip { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }
/* 画像：最上面一行小字（风险、来源、生成时间、AI 按钮），下面一句话画像不再套框 */
.uprof-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.uprof-bar #uprofSeg:empty { display: none; }
.uprof-bar .uprof-seg { margin-left: 0; }
.uprof-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
/* 访问最多的域名、最近访问记录：并进画像这块的底部 */
/* 11-14 晚 用户：两个折叠区错位 → 每条上下留同样的空、分隔线在两条正中间，箭头和文字竖直居中、和上面的内容左边对齐 */
.ufold { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.uprof-panel > .ufold:first-of-type { margin-top: 18px; }
.uprof-panel > .ufold:last-child { padding-bottom: 0; }
.ufold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; line-height: 1.4; }
.ufold > summary b { font-weight: 600; }
.ufold > summary::-webkit-details-marker { display: none; }
.ufold > summary::before { content: ""; flex: none; width: 6px; height: 6px; margin: 0 3px 0 1px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; }
.ufold[open] > summary::before { transform: rotate(45deg); }
.ufold > summary:hover::before { border-color: var(--text); }
.ufold[open] > summary { margin-bottom: 12px; }
@media (max-width: 640px) {
}
/* BT：时间下拉在第一行右边；外层不再套框，评分五格、两栏去掉边框 */
.user-bt .ubt-time { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.user-bt .ubt-time:empty { display: none; }
.ubt-time-slot { margin-left: auto; }
.user-bt .ubt { margin-top: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.user-bt .ubt-stats { gap: 0; margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.user-bt .ubt-stat { padding: 10px 14px; border: 0; border-radius: 0; background: none; }
.user-bt .ubt-stat:first-child { padding-left: 0; }
.user-bt .ubt-stat + .ubt-stat { border-left: 1px solid var(--line); }
.user-bt .ubt-stat.hit { background: none; }
.user-bt .ubt-grid { gap: 0 32px; margin-top: 0; }
.user-bt .ubt-sec { padding: 16px 0 0; border: 0; border-radius: 0; background: none; }
.user-bt .ubt-sec h4 { color: var(--text); }
.user-bt .ubt-sec-other { margin-top: 16px; border-top: 1px solid var(--line); }
.user-bt .ubt-sec-other .ubt-clue { background: var(--fill); }
.user-bt .ubt-ips { gap: 4px 16px; }
.user-bt .ubt-ip { padding: 0; background: none; }
.user-bt .ubt-sample { padding: 2px 0 2px 10px; background: none; }
.user-bt .ubt-sample:not(.bt) { box-shadow: inset 3px 0 0 var(--line-strong); }
.user-bt .umail { margin-top: 16px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.user-bt .ubt-reply { border-top-style: solid; border-top-color: var(--line); }
@media (max-width: 640px) {
  .user-bt .ubt-stat { padding: 8px 10px; }
  .user-bt .ubt-stat:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .user-bt .ubt-stat:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
.user-bt .ubt-sec .ubt-facts { grid-template-columns: 76px minmax(0, 1fr); }
.user-bt .ubt-ip { display: block; }
.user-bt .ubt-ip > * + * { margin-left: 6px; }
.user-bt .ubt-ip > .muted { margin-left: 4px; }

/* 11-14 顶部菜单精简：「日志」下分「访问明细 / 节点」，「设置」下分「账号与数据库 / 审计日志」，页面最上面一条小标签 */
.ptabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs a { position: relative; padding: 8px 12px 10px; color: var(--muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ptabs a:hover:not(.active) { color: var(--text); }
.ptabs a.active { color: var(--text); font-weight: 600; }
.ptabs a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.ptabs a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* 11-14 晚 用户：Pad 竖屏（约 768～834 宽）搜索框占满第一行、把菜单挤到第二行 → 700～1100 宽时标志、菜单、搜索框排一行（顶部菜单已减到 5 项，放得下）；
   更窄的手机仍是两行 */
@media (min-width: 700px) and (max-width: 1100px) {
  .topbar-inner { grid-template-columns: auto auto minmax(140px, 1fr); gap: 12px; padding-top: 0; }
  .page-nav { grid-column: auto; grid-row: auto; justify-self: start; padding-bottom: 0; }
  .page-nav a { padding: 7px 12px; }
  .global-search { width: 100%; }
}
@media (min-width: 700px) and (max-width: 800px) {
  .page-nav a { padding: 7px 10px; }
  .brand strong { font-size: 0.9375rem; }
}

/* 11-14 总览：右上角一个统一的时间选择，下面所有板块都跟着它 */
.ov-head { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 12px; }
.ov-head .tz { color: var(--muted); }
@media (max-width: 640px) { .ov-head .tz { display: none; } }
/* 7 天（168 根）柱子：去掉间隔和最小宽度，免得手机上撑出横向滚动 */
.trend.dense .trend-plot { gap: 0; min-width: 0; }
.trend.dense .trend-plot .col { min-width: 0; }

/* ===== 11-14 晚 格式梳理（用户：内容太靠边、错位，没做格式设计） ===== */
/* 顶栏：搜索框和总览的时间选择排在右边同一组 */
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-right .global-search { justify-self: auto; }
.top-time:empty { display: none; }
.top-time .tdrop-btn { height: 36px; }
@media (max-width: 1100px) {
  .topbar-right { justify-self: stretch; }
  .topbar-right .global-search { flex: 1; width: auto; min-width: 0; }
}
@media (max-width: 480px) {
  .top-time .tdrop-btn { min-width: 0; padding: 0 8px; gap: 4px; }
  .top-time .tdrop-btn svg:first-child { display: none; }
}
/* 用户页三个标签里的大块：左右多留白，内容不贴边 */
@media (min-width: 861px) {
  .upage .utab-pane > .panel, .upage .utab-pane .ipl-user-panel { padding: 24px 32px; }
}
/* BT 下载情况：评分五格文字居中；「谁在下 / 什么时候」两栏之间一条竖线，各自离竖线 28px，外侧和上面对齐 */
.user-bt .ubt-stat { justify-items: center; text-align: center; padding: 14px 12px; }
.user-bt .ubt-stat:first-child { padding-left: 12px; }
.user-bt .ubt-stat em { max-width: 100%; }
.user-bt .ubt-grid { gap: 0; }
.user-bt .ubt-sec { padding: 20px 0 4px; }
@media (min-width: 1101px) {
  .user-bt .ubt-sec:first-child { padding-right: 28px; }
  .user-bt .ubt-sec + .ubt-sec { padding-left: 28px; border-left: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .user-bt .ubt-sec + .ubt-sec { margin-top: 16px; border-top: 1px solid var(--line); }
}
.user-bt .ubt-sec h4 { margin-bottom: 14px; font-size: 0.9375rem; }
.user-bt .ubt-sec .ubt-facts { gap: 12px 16px; }
.user-bt .ubt-sec-other { padding: 16px 0 0; }
.user-bt .ubt-reply { margin-top: 18px; padding-top: 14px; }
@media (max-width: 640px) {
  .user-bt .ubt-stat { padding: 10px 6px; }
  .user-bt .ubt-stat:first-child, .user-bt .ubt-stat:nth-child(3n + 1) { padding-left: 6px; }
}
/* 手机上评分五格排成上 3 下 2（各自平分整行），横竖分隔线都完整，不留半截线 */
@media (max-width: 640px) {
  .user-bt .ubt-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .user-bt .ubt-stat { grid-column: span 2; }
  .user-bt .ubt-stat:nth-child(n + 4) { grid-column: span 3; border-top: 1px solid var(--line); }
  .user-bt .ubt-stat:nth-child(4) { border-left: 0; }
}

/* ===== 11-14 全站整理（用户：找出溢出和排版错误，整体更简洁、现代） ===== */
/* 表格里会换行的一列（域名、详情）：原来 break-all + 表格自动列宽，窄屏上被挤成一字一行、整行几百像素高 → 给最小宽度，窄屏时表格自己横向滚动 */
table.data td.wrap { min-width: 240px; max-width: 460px; word-break: normal; overflow-wrap: anywhere; }
/* 每块的标题统一一个字号（原来有的 20px、有的 15px）；具体对象的名字（IP、节点名、域名）仍用大标题 */
.panel .section-title h3, .panel .section-title > div > h2 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.005em; }
.panel .section-title .title-line h2 { font-size: 1.25rem; }
/* 工具栏右边一组（选节点 + 筛选按钮）不换成两行 */
.toolbar-right .search-form { flex-wrap: nowrap; }
.toolbar-right select.text { min-width: 160px; }
@media (max-width: 640px) {
  .toolbar-right { width: 100%; }
  .toolbar-right .search-form { flex: 1; }
  .toolbar-right select.text { width: 100%; min-width: 0; }
}
@media (max-width: 640px) {
  .toolbar-right .search-form input.text { flex: 1; width: auto; min-width: 0; }
}
/* 审计详情（查询参数）很长时只显示两行，鼠标看全文，免得一行撑得很高 */
.clamp2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* 11-15 用户（B 款样稿）：用户页「AI 分析」标签 —— 标签字紫蓝渐变；没分析过时整块磨砂的画像预览，中间一张半透明白卡 + 「AI 生成」按钮 */
.utabs button.tab-ai { background: linear-gradient(135deg, #7c5cf0, #3a6fd8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; font-weight: 600; }
.utabs button.tab-ai.active::after { background: linear-gradient(90deg, #7c5cf0, #3a6fd8); }
:root[data-theme="dark"] .utabs button.tab-ai { background-image: linear-gradient(135deg, #a58cff, #6e9cf0); }
.uai-empty { position: relative; min-height: 320px; overflow: hidden; border-radius: var(--radius-md); }
.uai-ghost { filter: blur(7px); opacity: 0.5; pointer-events: none; user-select: none; }
.uai-lines i { display: block; height: 14px; margin: 14px 0; border-radius: 7px; background: var(--fill-hover); }
.uai-lines i:nth-child(1) { width: 70%; height: 22px; } .uai-lines i:nth-child(2) { width: 92%; } .uai-lines i:nth-child(3) { width: 85%; } .uai-lines i:nth-child(4) { width: 58%; }
.uai-cta { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.uai-card { display: grid; justify-items: center; gap: 10px; max-width: 420px; padding: 22px 28px; text-align: center; border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
.uai-card h3 { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 1.0625rem; }
.uai-card h3 svg { width: 17px; height: 17px; fill: #7c5cf0; }
.uai-card p { margin: 0; color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }
.uai-card.busy h3 svg { animation: uai-spin 1.6s linear infinite; }
@keyframes uai-spin { to { transform: rotate(360deg); } }
.ai-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 22px; border: 0; border-radius: 10px; font: inherit; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #7c5cf0, #3a6fd8); box-shadow: 0 4px 14px rgba(98, 92, 230, 0.35); transition: filter 0.12s, transform 0.12s; }
.ai-btn:hover { filter: brightness(1.06); }
.ai-btn:active { transform: translateY(1px); }
.ai-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.ai-btn svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, 0.4); stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
/* 已生成：顶部一行小字（生成时间、第几版）和「重新生成」 */
.uai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 0.8125rem; color: var(--muted); }
.uai-head .link-btn { font-size: 0.8125rem; font-weight: 500; }
@media (max-width: 640px) {
  .uai-empty { min-height: 300px; }
  .uai-card { padding: 18px 18px; }
}
.uai-head .link-btn { color: var(--accent-text); padding: 0; }
/* 磨砂预览只露出上面一截（手机上整份画像很长，白卡会被推到屏幕外），底部渐隐 */
.uai-ghost { max-height: 420px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
@media (max-width: 640px) { .uai-ghost { max-height: 360px; } }

/* ===== 11-16 同 IP 关联用户（C 款）：日志 → 共享 IP、用户页「关联用户」 ===== */
.utabs .count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 5px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; line-height: 1.5; background: var(--fill); color: var(--text-secondary); }
.utabs .count.hidden { display: none; }
.uid-chip { display: inline-block; padding: 1px 7px; margin: 2px 4px 2px 0; border-radius: 6px; font-family: var(--mono); font-size: 0.75rem; background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.uid-chip:hover { background: var(--accent-soft-2); }
.lv { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.lv.s { background: var(--red-soft); color: var(--red); }
.lv.m { background: var(--orange-soft); color: var(--orange); }
.lv.w { background: var(--fill); color: var(--muted); }
.kind { font-size: 0.6875rem; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--fill); color: var(--muted); }
/* 共享 IP 排行 */
.sip-sum { display: flex; align-items: baseline; gap: 8px 22px; flex-wrap: wrap; margin: 0 0 12px; font-size: 0.875rem; color: var(--text-secondary); }
.sip-sum b { font-size: 1.25rem; color: var(--text); margin-right: 3px; }
.sip-bar { display: inline-block; height: 6px; margin-left: 8px; border-radius: 3px; background: var(--accent-bar); vertical-align: middle; }
.sip-spark { display: block; width: 100%; height: 24px; fill: var(--accent-bar); }
/* 11-16 修溢出：自动列宽时 5 位数 UID 把用户列撑出框，改固定列宽，用户列在格内换行；窄屏整表在框内横向滑动 */
.sip-table { table-layout: fixed; min-width: 900px; }
.sip-table col.c-ip { width: 140px; } .sip-table col.c-rg { width: 120px; } .sip-table col.c-u { width: 96px; }
.sip-table col.c-pk { width: 72px; } .sip-table col.c-jd { width: 150px; } .sip-table col.c-ids { width: 190px; }
.sip-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
.sip-table td { overflow: hidden; text-overflow: ellipsis; }
.sip-spark.hot { fill: var(--red-bar); }
.sip-judge { white-space: normal !important; color: var(--text-secondary); }
.sip-uids { white-space: normal !important; line-height: 1.9; }
.sip-uids .uid-chip { margin: 1px 4px 1px 0; }
.sip-note { margin-top: 12px; }
/* 用户页关联用户 */
.ulk-sum { display: flex; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.875rem; color: var(--text-secondary); }
.ulk-sum b { font-size: 1.25rem; color: var(--text); margin-right: 3px; }
.ulk-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ulk-graph { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ulk-graph .e { stroke-linecap: round; }
.ulk-graph .e.s { stroke: var(--red-bar); }
.ulk-graph .e.m { stroke: var(--orange-bar); }
.ulk-graph .e.w { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 4; }
.ulk-graph .n { cursor: pointer; }
.ulk-graph .n circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.ulk-graph .n.s circle { fill: var(--red-soft); stroke: var(--red); stroke-width: 2; }
.ulk-graph .n.m circle { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 2; }
.ulk-graph .n.me circle { fill: var(--accent); stroke: none; }
.ulk-graph .n.me text { fill: #fff; font-weight: 700; }
.ulk-graph .n.sel circle { stroke: var(--accent); stroke-width: 3; }
.ulk-graph text { font-family: var(--mono); font-size: 12px; fill: var(--text); }
.ulk-graph text.lbl { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.ulk-list table.data td { vertical-align: top; }
.ulk-list tr[data-lk] { cursor: pointer; }
.ulk-list tr.sel td { background: var(--accent-soft) !important; }
.ulk-why { white-space: normal !important; min-width: 180px; color: var(--text-secondary); }
.ulk-mail { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ulk-pair:empty { display: none; }
.ulk-pair { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.ulk-pair-head { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.ulk-days { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.ulk-days button { height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; }
.ulk-days button.hit { color: var(--text); }
.ulk-days button.active { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.ulk-heat { display: grid; grid-template-columns: 64px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; font-size: 11px; }
.ulk-heat .hh { color: var(--muted); text-align: center; font-size: 10px; }
.ulk-heat .who { color: var(--text-secondary); font-size: 0.75rem; }
.ulk-heat i, .ulk-legend i { display: block; height: 16px; border-radius: 2px; background: var(--fill); }
.ulk-heat i.on, .ulk-legend i.on { background: var(--accent-bar); }
.ulk-heat i.both, .ulk-legend i.both { background: var(--red-bar); }
.ulk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 0.75rem; color: var(--text-secondary); }
.ulk-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.ulk-note { margin-top: 14px; line-height: 1.6; }
@media (max-width: 900px) { .ulk-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ulk-heat { grid-template-columns: 48px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .ulk-days { margin-left: 0; }
  .utabs { overflow-x: auto; scrollbar-width: none; }
  .utabs button { flex: 0 0 auto; padding: 11px 10px 12px; }
}
.ulk-graph text.lbl, .ulk-graph .n text { paint-order: stroke; stroke: var(--surface-2); stroke-width: 3px; stroke-linejoin: round; }
.ulk-graph .n.me text, .ulk-graph .n.s text, .ulk-graph .n.m text { stroke: none; }
.ulk-grid > * { min-width: 0; }
.ulk-list { overflow-x: auto; }
@media (max-width: 640px) {
  .ulk-why { min-width: 0; }
  .ulk-mail { max-width: 120px; }
  .ulk-list table.data td { padding-left: 6px; padding-right: 6px; }
}

/* 11-16 IP 查询页：标题 IP 后面直接跟归属地 */
.ip-region { font-size: 0.9375rem; color: var(--text-secondary); white-space: nowrap; }
.ip-region .kind { margin-left: 4px; vertical-align: 2px; }

/* 11-16 passkey：登录页主按钮、设置页 Passkey 区块与弹框（方案 soga/access-log/gate/PASSKEY_PLAN.md） */
.pk-login, .pw-fields { display: grid; gap: 14px; }
.pk-login[hidden], .pw-fields[hidden], .pw-off[hidden] { display: none; }
.pk-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; border-radius: var(--radius-sm); background: var(--text); color: var(--surface); font: inherit; font-weight: 600; font-size: 0.9375rem; cursor: pointer; }
.pk-btn:hover { opacity: 0.9; }
.pk-btn:disabled { opacity: 0.6; cursor: default; }
.pk-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.pk-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-hint { margin-top: -6px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.75rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login-or[hidden], .pw-toggle[hidden] { display: none; }
.pw-toggle { border: 0; background: none; padding: 0; font: inherit; font-size: 0.8125rem; color: var(--accent-text); cursor: pointer; }
.pw-off { text-align: center; font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.pk-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pk-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.pk-item:first-child { border-top: 0; }
.pk-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; }
.pk-ico svg { width: 18px; height: 18px; stroke: var(--accent-text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-main { min-width: 0; }
.pk-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.875rem; overflow-wrap: anywhere; }
.pk-meta { margin-top: 2px; color: var(--muted); font-size: 0.75rem; }
.pk-ops { display: flex; gap: 6px; }
.pk-ops .btn { height: 28px; padding: 0 10px; font-size: 0.75rem; }
.pwl { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.pwl b { font-size: 0.875rem; }
.pwl p { margin: 3px 0 0; font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.sw { position: relative; flex: none; width: 40px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background 0.15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 20px; }
.sw:disabled { opacity: 0.45; cursor: default; }
.sw:focus-visible { outline: none; box-shadow: var(--focus); }
.pk-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(15, 23, 42, 0.45); }
.pk-box, .pk-box form { display: grid; gap: 14px; }
.pk-box { width: min(400px, 100%); padding: 22px; border-radius: 12px; background: var(--surface); box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); }
.pk-box h3 { margin: 0; font-size: 1.0625rem; }
.pk-box p { margin: 0; font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }
.pk-box label { display: grid; gap: 5px; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.pk-box .form-error[hidden] { display: none; }
.pk-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.pk-warn { padding: 10px 12px; border-radius: 8px; background: var(--orange-soft); color: var(--orange); font-size: 0.8125rem; line-height: 1.6; }
@media (max-width: 640px) {
  .pk-item { grid-template-columns: 34px minmax(0, 1fr); }
  .pk-ops { grid-column: 2; }
  .pwl { align-items: flex-start; }
}

/* ===== 11-16 明细页：共享 IP 每页个数选择 ===== */
.pager .sip-ps { height: 30px; width: auto; min-width: 0; padding: 0 26px 0 8px; font-size: 0.8125rem; }
.pager select.text.sip-ps { flex: none; width: 72px; }

/* ===== 11-16 用户：去掉左上角标志和「访问日志」文字 → 菜单靠左，搜索框和时间靠右 ===== */
.topbar-inner { grid-template-columns: auto 1fr; }
.page-nav { justify-self: start; }
@media (min-width: 700px) and (max-width: 1100px) {
  .topbar-inner { grid-template-columns: auto minmax(140px, 1fr); }
}
@media (max-width: 699px) {
  .topbar-inner { grid-template-columns: 1fr; }
}

/* ===== 11-16 关联用户：关系图下面的「共用的 IP」 ===== */
.ulk-left { display: grid; gap: 16px; min-width: 0; }
.ulk-ips { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 6px; background: var(--surface); }
.ulk-ips-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ulk-ips-head h4 { margin: 0; font-size: 0.9375rem; font-weight: 650; }
.ulk-ips .table-wrap { margin: 0; padding: 0; }
.ulk-ip-table td { white-space: nowrap; }
.ulk-ip-table td.ulk-ip-rg { white-space: normal; min-width: 6em; color: var(--text-secondary); }
.ulk-ip-table a.ulk-ip { font-weight: 600; }
.ulk-ip-table tr.pair td { background: var(--accent-soft); }
.ulk-ip-table .sip-bar { margin-left: 6px; }
@media (max-width: 560px) { .ulk-ips { padding: 12px 12px 4px; } .ulk-ip-table .sip-bar { display: none; } }

/* ===== 11-16 访问明细顶部：用户访问大类环形饼图（A 款） ===== */
.lc-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: center; }
.lc-donut { width: 100%; max-width: 280px; }
.lc-donut circle { transition: opacity .15s; }
.lc-donut .lc-big { font-family: var(--font); font-size: 26px; font-weight: 700; fill: var(--text); }
.lc-donut .lc-sub { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.lc-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
.lc-legend a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 4.2em; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.875rem; }
.lc-legend a:hover { background: var(--fill); }
.lc-legend i { width: 12px; height: 12px; border-radius: 3px; }
.lc-legend span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-legend .n { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.lc-legend .p { color: var(--muted); font-size: 0.8125rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-note { margin: 10px 8px 0; font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 900px) {
  .lc-grid { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .lc-donut { max-width: 240px; }
  .lc-grid > div { width: 100%; }
}
@media (max-width: 560px) { .lc-legend { grid-template-columns: 1fr; } }
/* 11-16 用户：图例按数量从大到小，先左列从上到下、再右列 */
.lc-legend { grid-auto-flow: column; grid-template-rows: repeat(var(--lc-rows, 7), auto); }
@media (max-width: 560px) { .lc-legend { grid-auto-flow: row; grid-template-rows: none; } }

/* ===== 11-16 分类详情按产品归类（A 款）：一行统计 + 堆叠条 + 产品排行表，点一行展开域名 ===== */
.pc-stats { display: flex; gap: 8px 28px; flex-wrap: wrap; font-size: 0.875rem; color: var(--text-secondary); }
.pc-stats b { font-size: 1.25rem; color: var(--text); margin-right: 4px; font-variant-numeric: tabular-nums; }
.pc-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--bar-track); margin: 16px 0 8px; }
.pc-stack span { display: block; height: 100%; }
.pc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8125rem; color: var(--text-secondary); }
.pc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.pc-table tr.pc-row { cursor: pointer; }
.pc-table tr.pc-row:hover td { background: var(--fill); }
.pc-name { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.pc-chev { width: 10px; color: var(--muted); font-size: 0.6875rem; transition: transform .15s; flex: none; }
.pc-row.open .pc-chev { transform: rotate(90deg); }
.pc-logo { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 700; flex: none; overflow: hidden; }
.pc-logo.has-img { background: #fff !important; border: 1px solid var(--line); }
.pc-logo img { width: 20px; height: 20px; object-fit: contain; display: block; }
.pc-share { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.pc-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bar-track); overflow: hidden; min-width: 70px; }
.pc-bar span { display: block; height: 100%; border-radius: 4px; }
.pc-share b { min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.pc-table tr.pc-sub td { background: var(--surface-2); font-size: 0.8125rem; padding-top: 8px; padding-bottom: 8px; }
.pc-table tr.pc-sub td:first-child { padding-left: 56px; }
@media (max-width: 760px) {
  .pc-table .hide-m { display: none; }
  .pc-share { min-width: 110px; }
  .pc-table tr.pc-sub td:first-child { padding-left: 24px; }
}
