/* 热门探针分发平台 —— 全站零 emoji，图标一律走本地 SVG sprite。
   状态用文字徽章 + 色块表达，不用符号。 */

:root {
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --surface-2: #fbfbfc;
  --border:    #e3e6ea;
  --border-2:  #d3d8de;
  --text:      #1c2024;
  --text-dim:  #62696f;
  --text-mute: #8b9298;
  --accent:    #2f6fed;
  --accent-bg: #eaf1fe;
  --ok:        #1a7f52;
  --ok-bg:     #e6f4ec;
  --warn:      #9a6300;
  --warn-bg:   #fdf2dc;
  --err:       #c0322b;
  --err-bg:    #fdeceb;
  --radius:    6px;
  --mono:      ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #16181b;
    --surface:   #1e2125;
    --surface-2: #24282d;
    --border:    #2e3339;
    --border-2:  #3b4148;
    --text:      #e4e7ea;
    --text-dim:  #a2a9b0;
    --text-mute: #767d85;
    --accent:    #5a8dff;
    --accent-bg: #1c2a45;
    --ok:        #4fbf88;
    --ok-bg:     #17301f;
    --warn:      #d3a029;
    --warn-bg:   #33290f;
    --err:       #ef6b62;
    --err-bg:    #35191a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.icon { vertical-align: -0.15em; flex: none; }

/* ---------- 骨架 ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 190px; flex: none; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 18px 16px 14px; border-bottom: 1px solid var(--border); }
.brand-name { display: block; font-size: 15px; font-weight: 650; letter-spacing: .02em; }
.brand-sub  { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.nav { padding: 8px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: var(--radius); color: var(--text-dim); font-size: 13.5px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 550; }
.side-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-mute); }

.main { flex: 1; min-width: 0; padding: 22px 26px 60px; max-width: 1240px; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-title { font-size: 19px; font-weight: 650; margin: 0; }
.page-desc  { color: var(--text-dim); font-size: 13px; margin: 4px 0 0; max-width: 62ch; }
.page-actions { display: flex; gap: 8px; flex: none; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 16px; }
.card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 14px; font-weight: 600; margin: 0; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ---------- 统计块 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 13px 15px; }
.stat-label { font-size: 12px; color: var(--text-mute); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 25px; font-weight: 600; margin-top: 5px; font-variant-numeric: tabular-nums; line-height: 1.15; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--text-mute); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-variant-numeric: tabular-nums; color: var(--text-dim); }
td.shrink, th.shrink { width: 1%; white-space: nowrap; }

/* ---------- 徽章：文字 + 色块，不用符号 ---------- */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; line-height: 1.7; font-weight: 550; white-space: nowrap;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}
.badge.ok   { background: var(--ok-bg);     color: var(--ok);     border-color: transparent; }
.badge.warn { background: var(--warn-bg);   color: var(--warn);   border-color: transparent; }
.badge.err  { background: var(--err-bg);    color: var(--err);    border-color: transparent; }
.badge.info { background: var(--accent-bg); color: var(--accent); border-color: transparent; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 13px; font-family: inherit;
  cursor: pointer; white-space: nowrap; line-height: 1.5;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); border-color: var(--border-2); }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 550; color: var(--text-dim); margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
input[type=text], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; padding: 7px 10px; font: inherit; font-size: 13.5px;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-2); border-radius: var(--radius);
}
textarea { min-height: 84px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; min-height: 340px; white-space: pre; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.check {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
  font-size: 13px; cursor: pointer;
}
.check input { margin: 0; flex: none; }
.check:hover { border-color: var(--accent); }

/* ---------- 杂项 ---------- */
.mono { font-family: var(--mono); font-size: 12.5px; }
.dim  { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.empty { padding: 42px 20px; text-align: center; color: var(--text-mute); font-size: 13.5px; }
.empty .icon { display: block; margin: 0 auto 10px; opacity: .45; }
.tabs-bar { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs-bar a { padding: 5px 12px; border-radius: 20px; font-size: 13px; color: var(--text-dim); border: 1px solid transparent; }
.tabs-bar a:hover { background: var(--surface); text-decoration: none; }
.tabs-bar a.on { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 550; }

pre.block {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.55; margin: 0; max-height: 520px; overflow-y: auto;
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 13.5px; }
.kv dt { color: var(--text-mute); font-size: 12.5px; }
.kv dd { margin: 0; word-break: break-all; }

.log { font-family: var(--mono); font-size: 12.5px; }
.log-row { display: flex; gap: 10px; padding: 5px 14px; border-bottom: 1px solid var(--border); }
.log-row:last-child { border-bottom: none; }
.log-row.error { background: var(--err-bg); }
.log-row.warn  { background: var(--warn-bg); }
.log-time { color: var(--text-mute); flex: none; }
.log-step { color: var(--accent); flex: none; min-width: 74px; }

.inline-form { display: inline; }
.gap { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; }

.notice {
  padding: 11px 14px; border-radius: var(--radius); font-size: 13px;
  background: var(--accent-bg); color: var(--accent); border: 1px solid transparent; margin-bottom: 14px;
}
.notice.warn { background: var(--warn-bg); color: var(--warn); }

@media (max-width: 760px) {
  .side { width: 56px; }
  .brand-name, .brand-sub, .nav-item span, .side-foot { display: none; }
  .nav-item { justify-content: center; }
  .main { padding: 16px 14px 50px; }
}
