* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fa; color: #22313f; font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: #1a6fd4; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.topbar { background: #fff; border-bottom: 1px solid #e4e9f0; }
.topbar-inner { display: flex; align-items: center; height: 60px; gap: 28px; }
.brand { font-size: 17px; font-weight: 700; color: #1b2d3e; }
.brand span { font-size: 12px; color: #fff; background: #d9534f; border-radius: 10px; padding: 2px 8px; vertical-align: 2px; }
.topbar nav { display: flex; gap: 20px; flex: 1; }
.topbar nav a { color: #5b6b7a; padding: 18px 0; border-bottom: 2px solid transparent; }
.topbar nav a.active { color: #1a6fd4; border-bottom-color: #1a6fd4; font-weight: 600; }
.top-note { color: #98a5b2; font-size: 12px; }
.alert { margin: 16px 0 0; padding: 10px 14px; background: #fff7e6; border: 1px solid #ffd591; border-radius: 6px; color: #8a5a00; font-size: 13px; }
.alert span { margin-right: 4px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 20px 0; }
.card { background: #fff; border: 1px solid #e4e9f0; border-radius: 8px; padding: 14px 16px; }
.card span { display: block; color: #7b8a99; font-size: 12px; }
.card strong { display: block; font-size: 26px; margin-top: 2px; }
.card.accent { background: #1a6fd4; border-color: #1a6fd4; color: #fff; }
.card.accent span { color: #d9e9ff; }
.panel { background: #fff; border: 1px solid #e4e9f0; border-radius: 8px; margin-bottom: 18px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #edf1f5; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head h2 small { font-size: 12px; color: #98a5b2; font-weight: 400; }
.panel-head > span { color: #98a5b2; font-size: 12px; }
.panel-body { padding: 14px 16px; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid #d8e0e8; border-radius: 6px; font: 13px/1.6 Consolas, "Microsoft YaHei", monospace; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid #cfe0f8; border-color: #1a6fd4; }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
button, .filters button { border: 0; border-radius: 6px; padding: 8px 16px; cursor: pointer; font-size: 13px; }
button.primary { background: #1a6fd4; color: #fff; }
button.primary:hover { background: #135bb2; }
button.ghost { background: #f0f4f8; color: #34495e; border: 1px solid #d8e0e8; }
button.ghost:hover { background: #e4ebf3; }
button.danger { color: #c0392b; }
button:disabled { opacity: .55; cursor: wait; }
.muted { color: #98a5b2; font-size: 12px; }
.filters { display: flex; gap: 8px; align-items: center; }
.filters input, .filters select { padding: 7px 10px; border: 1px solid #d8e0e8; border-radius: 6px; }
.filters button { background: #1a6fd4; color: #fff; }
.btn-link { color: #7b8a99; font-size: 13px; }
.progress { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #5b6b7a; }
.progress-bar { width: 240px; height: 8px; background: #e9eef4; border-radius: 4px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: #1a6fd4; transition: width .3s; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; border-bottom: 1px solid #edf1f5; text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: #6b7b8b; font-weight: 600; }
tbody tr:hover { background: #fafcff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.time { color: #8b98a5; font-size: 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.ok { background: #e8f6ee; color: #1e8449; }
.tag.danger { background: #fdecea; color: #c0392b; }
.tag.neutral { background: #eef2f6; color: #6b7b8b; }
.link-btn { background: none; color: #1a6fd4; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }
.empty { text-align: center; color: #98a5b2; padding: 30px 10px; white-space: normal; }
.reason-cell { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #edf1f5; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 12px; color: #7b8a99; }
.modal { position: fixed; inset: 0; background: rgba(20,30,40,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #fff; width: min(680px, 92vw); border-radius: 10px; overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid #edf1f5; }
.modal-head h3 { margin: 0; font-size: 16px; word-break: break-all; }
.modal-head button { background: none; font-size: 22px; color: #98a5b2; }
.modal-body { padding: 16px 18px; max-height: 65vh; overflow: auto; }
.hist-list { padding-left: 18px; color: #5b6b7a; }
/* 可视化图表 */
.chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px 16px 18px; }
.chart-card { border: 1px solid #edf1f5; border-radius: 8px; padding: 12px 14px; min-height: 188px; }
.chart-card h3 { margin: 0 0 12px; font-size: 13px; color: #5b6b7a; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 108px; }
.bar-group { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bars-pair { display: flex; align-items: flex-end; gap: 3px; height: 86px; width: 100%; justify-content: center; }
.bar { display: block; width: 9px; min-height: 2px; border-radius: 2px 2px 0 0; }
.bar-new { background: #1a6fd4; }
.bar-ok { background: #27a36b; }
.bar-group span { font-size: 11px; color: #98a5b2; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: #7b8a99; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot-new { background: #1a6fd4; }
.dot-ok { background: #27a36b; }
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef2f6; }
.seg { display: block; height: 100%; }
.seg-1 { background: #1a6fd4; }
.seg-2 { background: #f2994a; }
.seg-3 { background: #8e6bd6; }
.chart-list { list-style: none; margin: 16px 0 0; padding: 0; font-size: 12px; color: #5b6b7a; }
.chart-list li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #edf1f5; }
.chart-list b { color: #22313f; }
.hbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; font-size: 12px; }
.hbar-name { width: 74px; color: #7b8a99; flex: none; }
.hbar-track { flex: 1; height: 10px; background: #eef2f6; border-radius: 5px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 5px; }
.fill-1 { background: #27a36b; }
.fill-2 { background: #1a6fd4; }
.fill-3 { background: #98a5b2; }
.fill-4 { background: #d9534f; }
.fill-age { background: #1a6fd4; }
/* 两段式老备案增量监控状态卡片 */
.ts-panel .panel-head h2 small { margin-left: 8px; }
.ts-grid { padding: 16px; }
.ts-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.ts-metric { background: #f7f9fc; border: 1px solid #e4e9f0; border-radius: 8px; padding: 12px 16px; min-width: 0; }
.ts-metric span { display: block; color: #7b8a99; font-size: 12px; }
.ts-metric strong { display: block; font-size: 26px; line-height: 1.35; }
.ts-metric small { display: block; color: #98a5b2; font-size: 11px; }
.ts-metric.accent { background: #eaf5ef; border-color: #bfe3ce; }
.ts-metric.accent strong { color: #1e8a55; }
.ts-hits h4 { margin: 0 0 6px; font-size: 12px; color: #7b8a99; font-weight: 600; }
.ts-hits h4:not(:first-child) { margin-top: 12px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff5e6; border: 1px solid #ffd8a8; color: #a35b00; border-radius: 14px; padding: 2px 10px; font-size: 12px; }
.ts-log { margin: 0; padding-left: 16px; font-size: 11px; color: #7b8a99; line-height: 1.7; }
.ts-actions { border-top: 1px solid #edf1f5; padding: 12px 16px; }
.ts-actions code { background: #f0f4f8; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.ts-runbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ts-run-btn { white-space: nowrap; }
.copy-btn { white-space: nowrap; cursor: pointer; padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.copy-btn:hover:not([disabled]) { border-color: #9fb3c8; }
.ts-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid #edf1f5; background: #f7f9fc; }
.ts-toolbar > b { font-size: 13px; color: #34495e; }
.ts-toolbar .muted { font-size: 12px; }
.ts-copybar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ts-copybar .copy-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ts-run-btn.primary { font-weight: 600; padding: 8px 20px; }
.ts-run-hint { flex: 1 1 320px; line-height: 1.5; }
.ts-run-hint b { color: #c0392b; }
.ts-cmdline { margin-top: 10px; color: #8b98a5; font-size: 12px; line-height: 1.8; }
.ts-cmdline .muted { margin-left: 6px; }
.ts-progress { margin-top: 12px; padding: 10px 12px; background: #f7f9fc; border: 1px solid #e4e9f0; border-radius: 6px; }
.ts-progress-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.ts-progress .progress-bar { width: 100%; margin-top: 8px; }
.ts-progress-msg { margin-top: 8px; font-size: 12px; color: #5b6b7a; word-break: break-all; line-height: 1.5; }
@media (max-width: 900px) {
  .ts-metrics { gap: 10px; }
  .ts-metric strong { font-size: 22px; }
}
.card small { display: block; color: #98a5b2; font-size: 11px; margin-top: 2px; }
.ts-note { color: #5b6b7a; font-size: 12px; line-height: 1.75; background: #f7f9fc; border-bottom: 1px solid #edf1f5; }
.ts-note code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.ts-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #edf1f5; font-size: 13px; }
.hidden { display: none !important; }
.footer { color: #a6b1bd; font-size: 12px; padding: 10px 20px 30px; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .chart-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 面板折叠 ---------- */
.panel.collapsible > .panel-head { cursor: pointer; user-select: none; }
.panel.collapsible > .panel-head:hover h2 { color: #2c74d6; }
.fold-caret { color: #98a5b2; font-size: 12px; margin-right: 8px; flex: none; }
.panel.collapsed > :not(.panel-head) { display: none !important; }

/* ---------- 面板内子折叠（新增域名明细等） ---------- */
.sub-fold-head { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 10px 16px; background: #f7f9fc; border: 0; border-bottom: 1px solid #edf1f5;
  font-size: 13px; font-weight: 600; color: #34495e; cursor: pointer; }
.sub-fold-head:hover { background: #eef3f9; }
.sub-fold-head small { font-weight: 400; }
.sub-fold.collapsed > .sub-fold-body { display: none; }

/* ---------- 结果搜索框 ---------- */
.ts-search { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ts-search input[type="search"] { padding: 7px 12px; font-size: 13px; border: 1px solid #d8e0e8;
  border-radius: 6px; width: 260px; background: #fff; color: #2c3e50; }
.ts-search input[type="search"]:focus { outline: none; border-color: #6da3e8; box-shadow: 0 0 0 2px rgba(109,163,232,.15); }
.ts-total-hint { margin-left: 10px; }

/* ---------- 售出监测 ---------- */
.chip-sold { border-color: #e2b4b4; background: #fdf3f3; text-decoration: line-through; }
.sold-tag { color: #c0392b; font-size: 10px; padding: 0 4px; text-decoration: none; display: inline-block; }
.sold-alert { margin: 10px 16px; padding: 10px 14px; background: #fdf3f3; border: 1px solid #e2b4b4;
  border-radius: 6px; color: #a93226; font-size: 13px; }
.ts-metric.alert strong { color: #c0392b; }

/* ---------- 命中域名管理表格 ---------- */
.hits-mgmt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 10px; font-size: 13px; }
.hits-mgmt-bar label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.hits-note-input { padding: 6px 10px; font-size: 13px; border: 1px solid #d8e0e8; border-radius: 6px;
  width: 220px; background: #fff; color: #2c3e50; }
.hits-note-input:focus { outline: none; border-color: #6da3e8; box-shadow: 0 0 0 2px rgba(109,163,232,.15); }
.hits-mgmt-btn { padding: 6px 12px; font-size: 13px; border: 1px solid #d8e0e8; border-radius: 6px;
  background: #fff; color: #34495e; cursor: pointer; }
.hits-mgmt-btn:hover { background: #eef3f9; border-color: #6da3e8; }
.hits-mgmt-wrap { overflow-x: auto; }
.hits-mgmt-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; min-width: 820px; }
.hits-mgmt-table th, .hits-mgmt-table td { padding: 7px 10px; border-bottom: 1px solid #edf1f5; text-align: left; }
.hits-mgmt-table th { background: #f7f9fc; color: #5b6b7a; font-weight: 600; font-size: 12px; }
.hits-mgmt-table tr:hover td { background: #fafcfe; }
.hits-mgmt-table .hit-note-input { width: 100%; padding: 4px 8px; font-size: 12px;
  border: 1px solid #e3e9ef; border-radius: 5px; background: #fff; color: #2c3e50; }
.hits-mgmt-table .hit-note-input:focus { outline: none; border-color: #6da3e8; }
.hit-onsale { color: #1e8e5a; font-weight: 600; }
.hit-sold-auto, .hit-sold-manual { color: #c0392b; }
.hit-sold-manual::after { content: '（手动）'; font-weight: 400; font-size: 11px; }
.hit-offlist { color: #98a5b2; }
.hit-deleted-row { opacity: .55; }
.hit-deleted-row td { background: #f6f6f6; text-decoration: line-through; }
.hit-deleted-row td input, .hit-deleted-row td a { text-decoration: none; }
.hit-deleted-tag { color: #c0392b; font-size: 10px; border: 1px solid #e2b4b4; border-radius: 4px;
  padding: 1px 5px; background: #fdf3f3; }
.hit-ops { display: flex; gap: 6px; }
.hit-ops .hits-mgmt-btn { padding: 3px 9px; font-size: 12px; }

/* ---------- 命中域名新旧批次标记 ---------- */
.hit-fresh { color: #1a6ecc; background: #eaf3ff; border: 1px solid #b9d6f8; border-radius: 4px;
  padding: 1px 6px; font-size: 11px; white-space: nowrap; }
.hit-prev { color: #7d8b99; font-size: 12px; }
.hit-discover-time { display: block; color: #a6b1bd; font-size: 10px; margin-top: 2px; }

/* ---------- 命中表格表头排序 ---------- */
.hits-mgmt-table th.sortable { cursor: pointer; user-select: none; }
.hits-mgmt-table th.sortable:hover { color: #2c74d6; background: #eef3f9; }
.hits-mgmt-table th.sorted { color: #2c74d6; }
.sort-arrow { font-style: normal; font-size: 10px; color: #2c74d6; }
.hit-beian-no { color: #34495e; font-size: 12px; }
.hit-beian-time { display: block; color: #a6b1bd; font-size: 10px; margin-top: 2px; }
.hits-search-input { padding: 6px 10px; font-size: 13px; border: 1px solid #d8e0e8; border-radius: 6px;
  width: 300px; background: #fff; color: #2c3e50; }
.hits-search-input:focus { outline: none; border-color: #6da3e8; box-shadow: 0 0 0 2px rgba(109,163,232,.15); }
.hits-search-count { font-size: 12px; color: #2c74d6; }

/* ---------- 本轮采集与核验概览框 ---------- */
.ts-round-box { margin: 14px 16px 0; padding: 12px 16px; background: linear-gradient(135deg,#f4f9ff,#eef6ff);
  border: 1px solid #cfe0f5; border-radius: 8px; }
.ts-round-title { font-size: 13px; font-weight: 600; color: #2c74d6; margin-bottom: 10px; }
.ts-round-title small { font-weight: 400; color: #7b8a99; margin-left: 8px; font-size: 11px; }
.ts-round-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.ts-round-stat { flex: 1 1 130px; min-width: 120px; background: #fff; border: 1px solid #e4e9f0;
  border-radius: 6px; padding: 8px 12px; }
.ts-round-stat span { display: block; color: #7b8a99; font-size: 12px; }
.ts-round-stat strong { display: inline-block; font-size: 24px; line-height: 1.3; color: #2c3e50; }
.ts-round-stat small { display: block; color: #a6b1bd; font-size: 11px; }
.ts-round-stat.accent { background: #eaf5ef; border-color: #bfe3ce; }
.ts-round-stat.accent strong { color: #1e8a55; }
.ts-round-stat.hit strong { color: #c0392b; }

/* ---------- 查询中/未查到域名 ---------- */
.ts-round-stat.warn { background: #fff7e8; border-color: #f0dcb0; }
.ts-round-stat.warn strong { color: #b9770e; }
.ts-pending-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding: 8px 12px; background: #fff7e8; border: 1px solid #f0dcb0; border-radius: 6px; }
.ts-pending-label { font-size: 12px; color: #8a6117; }
.ts-pending-chips { margin: 8px 0 2px; max-height: 160px; overflow-y: auto; }
.chip-pending { color: #b9770e; background: #fff7e8; border: 1px solid #f0dcb0; cursor: default; }
