/* 达人数据工作台 — 首页样式
   浅色主题，贴合飞书网页应用观感；无外部依赖（字体走系统栈） */

:root {
  --accent: #3370ff;
  --accent-soft: #e8f3ff;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e5e6eb;
  --line-soft: #f0f1f4;
  --text: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --ok: #00b42a;
  --ok-soft: #e8ffea;
  --warn: #ff7d00;
  --warn-soft: #fff7e8;
  --err: #f53f3f;
  --err-soft: #ffece8;
  --yt: #f53f3f;
  --ig: #7b61ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 33, 41, .04), 0 4px 16px rgba(29, 33, 41, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3370ff 0%, #2b5fd9 55%, #1f47a8 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(51, 112, 255, .28);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text p {
  margin: 1px 0 0; font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.chip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-2); background: #fff;
}
.chip-env { color: var(--warn); background: var(--warn-soft); border-color: #ffe4c0; }
.chip-env.prod { color: var(--ok); background: var(--ok-soft); border-color: #c7f2cd; }
.user {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px; border-radius: 20px; background: #f2f3f5;
}
.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 12.5px; color: var(--text-2); max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 模块导航 ---------- */
.modnav {
  border-top: 1px solid var(--line-soft);
  background: #fff;
}
.modnav-inner { display: flex; align-items: flex-end; gap: 4px; height: 52px; }
.modtab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: .2px;
  color: var(--text-3); text-align: left;
  padding: 0 16px 0 14px; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  position: relative;
}
.modtab:hover { color: var(--text-2); }
.modtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.modtab:first-child { padding-left: 0; }
.modtab.active .modtab-sub { color: rgba(51, 112, 255, .75); }
.modtab-sub { font-size: 11px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }

/* ---------- 主区 ---------- */
.main { padding-bottom: 40px; }

.view { padding-top: 22px; }
.view[hidden] { display: none; }

.view-head { margin-bottom: 18px; }
.view-head h2 {
  margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .2px;
}
.view-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--text-3); }

.alerts { margin-top: 4px; margin-bottom: 16px; display: grid; gap: 8px; }
.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 14px; border-radius: 10px; font-size: 13px;
  background: var(--warn-soft); border: 1px solid #ffe4c0; color: #a35b00;
}
.alert.error { background: var(--err-soft); border-color: #ffd6cf; color: #b32b2b; }
.alert svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* KPI */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 20px;
}
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow);
}
.kpi .label { font-size: 12px; color: var(--text-3); }
.kpi .value {
  margin-top: 5px; font-size: 26px; font-weight: 650; letter-spacing: -.4px;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.kpi .value .unit { font-size: 12px; font-weight: 500; color: var(--text-3);
  margin-left: 4px; letter-spacing: 0; }
.kpi .sub {
  margin-top: 5px; font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 区块 */
.section { margin-top: 30px; }
.section-head { margin-bottom: 12px; }
.section-head h2 {
  margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .2px;
  display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px;
  background: var(--accent); display: inline-block;
}
.section-head p { margin: 5px 0 0 11px; font-size: 12px; color: var(--text-3); }

/* ---------- 平台更新卡 ---------- */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.pcard-head { display: flex; align-items: center; gap: 9px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pdot.yt { background: var(--yt); box-shadow: 0 0 0 3px rgba(245, 63, 63, .12); }
.pdot.ig { background: var(--ig); box-shadow: 0 0 0 3px rgba(123, 97, 255, .14); }
.pcard-title { font-size: 14px; font-weight: 600; }
.pcard-chan { margin-left: auto; font-size: 11px; color: var(--text-3); }

.pill {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px; flex: none;
}
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.run { color: var(--accent); background: var(--accent-soft); }
.pill.fail { color: var(--err); background: var(--err-soft); }
.pill.idle { color: var(--text-3); background: #f2f3f5; }
.pill .blink {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.meta-grid {
  margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.meta-k { font-size: 11.5px; color: var(--text-3); }
.meta-v {
  font-size: 13.5px; font-weight: 550; font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.meta-v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; font-weight: 500; }

.progress-box { margin-top: 14px; }
.progress-top {
  display: flex; justify-content: space-between; font-size: 11.5px;
  color: var(--text-2); margin-bottom: 6px;
}
.progress-track {
  height: 5px; border-radius: 4px; background: #eef0f3; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #3370ff, #5b8dff);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
.progress-stages {
  margin-top: 7px; font-size: 11px; color: var(--text-3);
  display: flex; flex-wrap: wrap; gap: 3px 10px;
}
.progress-stages span { opacity: .45; }
.progress-stages span.done { opacity: .8; color: var(--ok); }
.progress-stages span.now { opacity: 1; color: var(--accent); font-weight: 600; }

.pcard-foot {
  margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
.pcard-note { font-size: 11.5px; color: var(--text-3); margin-right: auto; }

/* 按钮 */
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 13px; font-family: inherit; font-weight: 500;
  padding: 7px 15px; border-radius: 8px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: #f7f8fa; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 3px rgba(51, 112, 255, .3);
}
.btn-primary:hover { background: #2b62e0; border-color: #2b62e0; }
.btn-primary:disabled { background: var(--accent); border-color: var(--accent); }
.btn-lg { padding: 10px 26px; font-size: 14px; border-radius: 9px; }

/* ---------- 链接卡 ---------- */
.link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.link-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s, border-color .16s;
  min-height: 132px;
}
.link-card:hover {
  transform: translateY(-2px); border-color: #c9d5f5;
  box-shadow: 0 6px 22px rgba(29, 33, 41, .09);
}
.link-card.disabled { opacity: .62; cursor: not-allowed; }
.link-card.disabled:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
.link-icon {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: -.4px;
}
.link-icon.yt { background: linear-gradient(135deg, #ff5f5f, #e02b2b); }
.link-icon.ig { background: linear-gradient(135deg, #a06bff, #6b46e5); }
.link-icon.tb { background: linear-gradient(135deg, #4a8cff, #2b5fd9); }
.link-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.link-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.45; margin-top: -4px; }
.link-go {
  margin-top: auto; font-size: 11.5px; color: var(--accent);
  display: flex; align-items: center; gap: 3px;
}
.link-card.disabled .link-go { color: var(--text-3); }
.link-go svg { width: 11px; height: 11px; }

/* ---------- 达人查询 ---------- */
.query-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 16px; box-shadow: var(--shadow);
}
.segmented {
  display: inline-flex; background: #f2f3f5; border-radius: 8px; padding: 3px; gap: 2px;
}
.seg {
  appearance: none; border: 0; background: transparent; font-family: inherit;
  font-size: 12.5px; color: var(--text-2); padding: 5px 13px; border-radius: 6px;
  cursor: pointer; transition: background .15s, color .15s;
}
.seg.active { background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(29, 33, 41, .09); }

.query-form { display: flex; gap: 10px; margin-top: 14px; }
.query-form input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 14.5px; color: var(--text);
  padding: 10px 15px; height: 44px; border: 1px solid var(--line); border-radius: 9px;
  background: #fafbfc; transition: border-color .15s, background .15s, box-shadow .15s;
}
.query-form input::placeholder { color: #a9b0bb; }
.query-form input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, .1);
}
.query-status { margin-top: 11px; font-size: 12.5px; color: var(--text-3); min-height: 19px; }
.query-status.warn { color: var(--warn); }

.expect { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.expect-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px;
}
.expect-k {
  font-size: 12px; font-weight: 600; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.expect-k::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}
.expect-v { font-size: 11.5px; color: var(--text-2); margin-top: 6px; line-height: 1.55; }

.pending-note {
  margin-top: 16px; display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-radius: 10px; background: #f7f8fa;
  border: 1px dashed #dfe2e8; color: var(--text-2); font-size: 12.5px; line-height: 1.6;
}
.pending-note svg { width: 16px; height: 16px; color: var(--text-3); flex: none; margin-top: 1px; }

/* ---------- 判定卡 ---------- */
.rcard {
  margin-top: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.rhead {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
}
.ravatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.rname { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rplat {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px;
  background: #f2f3f5; color: var(--text-2); letter-spacing: .3px;
}
.rplat.ig { background: #f0ecff; color: #5b46c9; }
.rplat.yt { background: #ffeceb; color: #c92b2b; }
.rmeta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.rbadges { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.rbadge {
  font-size: 11px; padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.rbadge.ok { background: var(--ok-soft); color: var(--ok); }
.rbadge.warn { background: var(--warn-soft); color: var(--warn); }
.rbadge.fail { background: var(--err-soft); color: var(--err); }
.rbadge.info { background: var(--accent-soft); color: var(--accent); }

.verdict {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
  background: #fafbfc;
}
.verdict.v-pass { background: #f4fbf5; }
.verdict.v-watch { background: #fffbf2; }
.verdict.v-fail { background: #fff6f4; }
.verdict-main { font-size: 14px; font-weight: 600; }
.verdict.v-pass .verdict-main { color: #0f7a24; }
.verdict.v-watch .verdict-main { color: #a35b00; }
.verdict.v-fail .verdict-main { color: #b32b2b; }
.verdict-sub { font-size: 12px; color: var(--text-2); }
.verdict-score {
  margin-left: auto; display: flex; align-items: baseline; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.verdict-score b { font-size: 24px; font-weight: 650; letter-spacing: -.5px; }
.verdict-score span { font-size: 11.5px; color: var(--text-3); }

.verdict-chips { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 2px; }
.chip-mini {
  font-size: 11px; padding: 2px 8px; border-radius: 5px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2);
}

.rgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; padding: 15px 18px 18px; }

.gcard {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
  background: #fff;
}
.gcard + .gcard { margin-top: 10px; }
.gcard-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 13px; font-weight: 600;
}
.gcard-tag { font-size: 10.5px; font-weight: 400; color: var(--text-3); margin-left: auto; }

.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gtile { padding: 8px 10px; border-radius: 8px; background: #f7f8fa; }
.gtile.watch { background: var(--warn-soft); }
.gtile.fail { background: var(--err-soft); }
.gtile.pass { background: #f4faf5; }
.gtile-k { font-size: 10.5px; color: var(--text-3); display: flex; gap: 5px; align-items: center; }
.gtile.watch .gtile-k { color: #a35b00; }
.gtile.fail .gtile-k { color: #b32b2b; }
.gtile-v { font-size: 12.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.gtile-n { font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }

.grow { display: flex; align-items: center; gap: 9px; font-size: 11.5px; }
.grow + .grow { margin-top: 7px; }
.grow-name { width: 66px; flex: none; color: var(--text-2); }
.grow-bar { flex: 1; height: 5px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.grow-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.grow-fill.low { background: var(--warn); }
.grow-score { width: 42px; text-align: right; flex: none; color: var(--text-3);
  font-variant-numeric: tabular-nums; }
.grow-detail { font-size: 10.5px; color: var(--text-3); margin-left: 75px; margin-top: -2px; }
.sub-tag {
  font-size: 9.5px; padding: 0 4px; border-radius: 3px; margin-left: 4px;
  background: #fff3e0; color: #a35b00; border: 1px solid #ffe4c0;
}

.rside { display: flex; flex-direction: column; gap: 10px; }
.rsection-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.evitem {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text-2); text-decoration: none;
}
a.evitem:hover { border-color: #c9d5f5; background: #fafbff; }
.evitem b { font-weight: 500; color: var(--text); }
.evitem .ev-go { margin-left: auto; color: var(--accent); font-size: 11px; }
.ractions { display: grid; gap: 6px; margin-top: 4px; }
.ractions .btn { width: 100%; font-size: 12px; padding: 8px; }
.rwarn {
  font-size: 11px; color: var(--text-3); line-height: 1.55;
  border-left: 2px solid #e5e6eb; padding-left: 9px;
}
.rwarn + .rwarn { margin-top: 6px; }

.sim-banner {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 9px 13px; font-size: 12px; color: #a35b00;
  background: #fff7e8; border-bottom: 1px solid #ffe4c0;
}

.skel { margin-top: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; }
.skel-line { height: 11px; border-radius: 5px; background: #eef0f3; margin-bottom: 10px;
  animation: pulse 1.3s ease-in-out infinite; }
.skel-line:nth-child(1) { width: 40%; }
.skel-line:nth-child(2) { width: 72%; }
.skel-line:nth-child(3) { width: 55%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* 姓名搜索等待提示 */
.search-wait {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  font-size: 13px; color: var(--text-3);
}
.search-wait .spin {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid #dbe2f0; border-top-color: var(--accent);
  animation: wb-spin .8s linear infinite;
}
@keyframes wb-spin { to { transform: rotate(360deg); } }

.cand-list { margin-top: 14px; display: grid; gap: 7px; }.cand {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer; font-size: 12.5px; text-align: left;
  font-family: inherit; color: var(--text); width: 100%;
}
.cand:hover { border-color: #c9d5f5; background: #fafbff; }
.cand .cand-fans { margin-left: auto; color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.cand .cand-flag {
  margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10.5px;
  background: #f2f3f5; color: var(--text-3); vertical-align: 1px;
}
.cand .cand-flag.ok { background: #e8f3ff; color: #1668dc; }
.cand-warn {
  margin-bottom: 10px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  line-height: 1.55; background: var(--warn-soft); border: 1px solid #ffe4c0; color: #a35b00;
}
.cand-warn b { display: block; font-weight: 500; margin-bottom: 1px; }
.cand .cand-desc {
  display: block; margin-top: 2px; color: var(--text-3); font-size: 11.5px; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 640px;
}
.cand-force {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 11px 14px;
  width: 100%; text-align: left; font-family: inherit; font-size: 13.5px; cursor: pointer;
  color: var(--accent); background: var(--accent-soft); border: 1px dashed #b9caf7;
  border-radius: 9px;
}
.cand-force:hover { background: #e8efff; border-color: var(--accent); }

/* ---------- 状态栏 ---------- */
.statusbar {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.status-items { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.status-item { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.status-item b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.status-dot.warn { background: var(--warn); }
.status-time { font-size: 11px; color: #a9b0bb; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  z-index: 100; pointer-events: none;
}
.toast {
  background: rgba(29, 33, 41, .92); color: #fff; font-size: 12.5px;
  padding: 9px 16px; border-radius: 8px; max-width: 440px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  animation: toastIn .22s ease-out;
}
.toast.err { background: rgba(180, 40, 40, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .expect { grid-template-columns: repeat(2, 1fr); }
  .rgrid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  .topbar-inner { height: 56px; }
  .brand-text p { display: none; }
  .modnav-inner { height: 46px; gap: 0; }
  .modtab { font-size: 13.5px; padding: 0 14px 0 0; }
  .modtab-sub { display: none; }
  .cards-2 { grid-template-columns: 1fr; }
  .kpi-row { gap: 9px; }
  .kpi { padding: 12px 13px; }
  .kpi .value { font-size: 22px; }
  .link-grid { gap: 9px; }
  .link-card { min-height: 120px; padding: 13px; }
  .view { padding-top: 16px; }
  .view-head h2 { font-size: 17px; }
  .query-card { padding: 14px 15px; }
  .query-form { flex-wrap: wrap; }
  .query-form input { flex: 1 1 100%; }
  .query-form .btn-lg { width: 100%; }
  .expect { grid-template-columns: 1fr; gap: 8px; }
  .gtiles { grid-template-columns: 1fr; }
  .rhead { flex-wrap: wrap; }
  .rbadges { margin-left: 0; width: 100%; justify-content: flex-start; }
  .verdict { gap: 8px; }
  .verdict-score { margin-left: 0; }
  .rgrid { padding: 13px 14px 15px; }
  .section { margin-top: 24px; }
  .user-name { display: none; }
  .user { padding: 4px; }
  .statusbar { gap: 10px; }
}

/* ================= 达人档案窗口（大字号 · 高可读性） ================= */
.player { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow-y: auto;
  -webkit-overflow-scrolling: touch; }
.player-bar { position: sticky; top: 0; z-index: 6; background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.player-bar-inner { max-width: 1320px; margin: 0 auto; padding: 0 30px; height: 64px;
  display: flex; align-items: center; gap: 18px; }
.player-back { appearance: none; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text-2);
  padding: 8px 15px 8px 11px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, color .15s, background .15s; }
.player-back:hover { color: var(--accent); border-color: #c9d8ff; background: #fafbff; }
.player-back svg { width: 18px; height: 18px; }
.player-title { font-size: 16.5px; font-weight: 600; color: var(--text); }
.player-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.player-body { max-width: 1320px; margin: 0 auto; padding: 26px 30px 72px; }

/* 头部档案 */
.pf-head { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 28px; box-shadow: var(--shadow); }
.pf-head-top { display: flex; gap: 22px; align-items: flex-start; }
.pf-avatar { position: relative; width: 100px; height: 100px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #4c7dff, #7b61ff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 600;
  overflow: hidden; box-shadow: 0 4px 14px rgba(51,112,255,.22); }
.pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-id { min-width: 0; flex: 1; }
.pf-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-name { font-size: 30px; font-weight: 700; letter-spacing: -.3px; line-height: 1.25; }
.pf-handle { font-size: 16.5px; color: var(--text-3); margin-top: 5px; }
.pf-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-badge { font-size: 13.5px; padding: 4px 11px; border-radius: 7px; font-weight: 500;
  background: #f2f3f5; color: var(--text-2); }
.pf-badge.ok { background: var(--ok-soft); color: #00801f; }
.pf-badge.info { background: var(--accent-soft); color: #1f4fd8; }
.pf-badge.warn { background: var(--warn-soft); color: #b35c00; }
.pf-bio { margin-top: 16px; font-size: 16px; line-height: 1.72; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word; max-height: 5.2em; overflow: hidden; }
.pf-bio.open { max-height: none; }
.pf-bio-toggle { margin-top: 6px; font-size: 14px; color: var(--accent); cursor: pointer;
  background: none; border: 0; padding: 0; font-family: inherit; }

.pf-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 24px;
  border-top: 1px solid var(--line-soft); padding-top: 20px; }
.pf-kpi { min-width: 0; }
.pf-kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.pf-kpi-k { font-size: 13.5px; color: var(--text-3); margin-top: 5px; }

/* 两栏 */
.pf-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.pf-side { display: grid; gap: 18px; position: sticky; top: 84px; }
.pf-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; box-shadow: var(--shadow); }
.pf-card-h { font-size: 17px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.pf-card-h .hint { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: auto; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 9px 12px; font-size: 15.5px; }
.kv dt { color: var(--text-3); font-size: 14.5px; }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.kv dd a { color: var(--accent); text-decoration: none; }
.kv dd a:hover { text-decoration: underline; }
.pf-note { margin-top: 14px; padding: 11px 13px; border-radius: 10px;
  background: var(--warn-soft); border: 1px solid rgba(255, 145, 0, .18);
  font-size: 13.5px; line-height: 1.65; color: #8a5200; }
.pf-note b { color: #6b3f00; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 14px; padding: 5px 12px; border-radius: 8px; background: #f2f3f5;
  color: var(--text-2); font-weight: 500; }
.tag.brand { background: var(--accent-soft); color: #1f4fd8; }
.tag.info { background: #eef7ee; color: #1d7a33; }
.tag.warn { background: var(--warn-soft); color: #b35c00; }
.tag-legend { font-size: 13px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }

.brand-row { display: flex; align-items: center; gap: 10px; font-size: 15.5px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft); }
.brand-row:last-child { border-bottom: 0; }
.brand-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); flex: none; }
.brand-n { margin-left: auto; font-weight: 600; font-size: 15.5px; }
.brand-n span { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 3px; }

/* 内容区 */
.plan-banner { background: #fff; border: 1px solid #d8e3ff; border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; }
.plan-t { font-size: 15.5px; font-weight: 600; color: #1f4fd8; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-d { font-size: 14.5px; color: var(--text-2); margin-top: 7px; line-height: 1.65; }
.plan-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.plan-step { font-size: 13.5px; padding: 4px 10px; border-radius: 7px; background: #f2f5ff; color: #40598f; }
.plan-step.on { background: var(--accent); color: #fff; }

.cstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.cstat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; }
.cstat-v { font-size: 22px; font-weight: 700; line-height: 1.2; }
.cstat-k { font-size: 13px; color: var(--text-3); margin-top: 4px; }

.cfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cfilter-l { font-size: 14px; color: var(--text-3); }
.fchip { appearance: none; font-family: inherit; cursor: pointer; font-size: 14px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--text-2); transition: all .15s; }
.fchip:hover { border-color: #c9d5f5; }
.fchip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.cfilter .spacer { flex: 1; }
select.csort { font-family: inherit; font-size: 14px; padding: 7px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); }

.ci-list { display: grid; gap: 12px; }
.ci { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; transition: border-color .15s, box-shadow .15s; }
.ci:hover { border-color: #cdd9f8; box-shadow: 0 3px 14px rgba(29,33,41,.06); }
.ci-top { display: flex; gap: 14px; align-items: flex-start; }
.ci-badge { font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; flex: none;
  background: #f2f3f5; color: var(--text-2); margin-top: 2px; }
.ci-badge.video { background: #ffece8; color: #c4371f; }
.ci-badge.image { background: #eaf4ff; color: #1a63c4; }
.ci-badge.carousel { background: #f3edff; color: #6a3ed1; }
.ci-main { min-width: 0; flex: 1; }
.ci-title { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-cap { font-size: 14.5px; line-height: 1.62; color: var(--text-2); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-sub { font-size: 14.5px; color: var(--text-3); margin-top: 7px; display: flex; flex-wrap: wrap; gap: 12px; }
.ci-open { flex: none; font-size: 14.5px; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 4px 2px; }
.ci-open:hover { text-decoration: underline; }
.ci-metrics { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 15px;
  border-top: 1px dashed var(--line-soft); padding-top: 13px; }
.ci-metric-v { font-size: 19px; font-weight: 700; line-height: 1.2; }
.ci-metric-k { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.ci-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.ci-tag { font-size: 13px; padding: 3px 9px; border-radius: 6px; background: #f7f8fa; color: var(--text-2); }
.ci-tag.brand { background: #eef3ff; color: #2f5bd0; }
.ci-empty { background: #fff; border: 1px dashed var(--line); border-radius: 14px;
  padding: 34px 20px; text-align: center; color: var(--text-3); font-size: 15px; }

/* 加载骨架 */
.pf-skel { display: grid; gap: 14px; }.pf-skel .bar { height: 18px; border-radius: 8px;
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (max-width: 1180px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cstats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .player-bar-inner { padding: 0 16px; height: 58px; }
  .player-body { padding: 18px 16px 60px; }
  .pf-head { padding: 20px; }
  .pf-head-top { gap: 15px; }
  .pf-avatar { width: 76px; height: 76px; font-size: 30px; }
  .pf-name { font-size: 23px; }
  .pf-kpis { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .pf-kpi-v { font-size: 21px; }
  .pf-side { grid-template-columns: 1fr; }
  .cstats { grid-template-columns: repeat(2, 1fr); }
  .player-title { display: none; }
  .ci-metrics { gap: 18px; }
  .ci-metric-v { font-size: 17px; }
}

/* ================= 抓取进度页（loading · 真实步骤） ================= */
.ld { max-width: 1000px; margin: 6px auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); padding: 28px 34px 24px;
  animation: ldIn .3s ease both; }
@keyframes ldIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ld-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft); }
.ld-head .rplat { font-size: 13px; padding: 5px 10px; border-radius: 7px; margin-top: 3px; }
.ld-head-main { min-width: 0; }
.ld-title { font-size: 21px; font-weight: 500; letter-spacing: -.2px; line-height: 1.4; }
.ld-title b { font-weight: 700; }
.ld-sub { font-size: 14.5px; color: var(--text-3); margin-top: 6px; }
.ld-sub.hit { color: #0e8f2c; }

.ld-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px;
  align-items: center; padding: 26px 4px 24px; }

.ld-ring-wrap { position: relative; width: 200px; height: 200px; }
.ld-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ld-ring-bg { fill: none; stroke: #eef0f3; stroke-width: 12; }
.ld-ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .5s cubic-bezier(.4, 0, .2, 1); }
.ld-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 26px; }
.ld-ring-num .num { display: inline-flex; align-items: baseline; gap: 1px; }
.ld-ring-num b { font-size: 46px; font-weight: 700; letter-spacing: -1.5px; line-height: 1;
  font-variant-numeric: tabular-nums; }
.ld-ring-num i { font-style: normal; font-size: 17px; color: var(--text-3); font-weight: 600; }
.ld-ring-num .cap { font-size: 13.5px; color: var(--text-3); line-height: 1.45; max-width: 150px; }

.ld-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ld-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px;
  border-radius: 12px; transition: background .2s; }
.ld-step[data-status="run"] { background: #f6f9ff; }
.ld-ico { width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 1px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1;
  border: 1.5px solid var(--line); background: #fff; color: var(--text-3); }
.ld-step[data-status="run"] .ld-ico { border-color: #d5e2ff; border-top-color: var(--accent);
  animation: ldSpin .75s linear infinite; }
.ld-step[data-status="done"] .ld-ico { background: var(--ok); border-color: var(--ok); color: #fff; }
.ld-step[data-status="done"] .ld-ico::after { content: "✓"; }
.ld-step[data-status="skip"] .ld-ico { background: #f2f3f5; border-color: #f2f3f5; color: #a9aeb8; }
.ld-step[data-status="skip"] .ld-ico::after { content: "–"; }
@keyframes ldSpin { to { transform: rotate(360deg); } }

.ld-step-main { min-width: 0; }
.ld-step-main b { display: block; font-size: 16px; font-weight: 500; color: var(--text-3); }
.ld-step[data-status="run"] .ld-step-main b { color: var(--text); font-weight: 600; }
.ld-step[data-status="done"] .ld-step-main b,
.ld-step[data-status="skip"] .ld-step-main b { color: var(--text-2); }
.ld-detail { display: block; font-size: 14px; color: var(--text-3); margin-top: 3px;
  font-style: normal; word-break: break-word; }
.ld-ms { margin-left: auto; font-size: 13px; color: var(--text-3); flex: none;
  font-variant-numeric: tabular-nums; }

.ld-foot { display: flex; align-items: center; gap: 14px; padding-top: 18px;
  border-top: 1px solid var(--line-soft); }
.ld-time { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ld-time i { font-style: normal; color: #c9cdd4; margin: 0 9px; }
.ld-cancel { margin-left: auto; font-size: 14.5px; padding: 8px 18px; }
.ld-hint { font-size: 13.5px; color: var(--text-3); margin-top: 14px; line-height: 1.65; }

/* 失败 / 取消 */
.ld-fail { max-width: 640px; margin: 34px auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 34px 36px 30px; text-align: center; }
.ld-fail-ico { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--err-soft); color: var(--err); font-size: 27px; font-weight: 700;
  display: grid; place-items: center; }
.ld-fail-t { font-size: 21px; font-weight: 700; }
.ld-fail-d { font-size: 16px; color: var(--text-2); margin-top: 12px; line-height: 1.7; }
.ld-fail-hint { font-size: 14px; color: var(--text-3); margin-top: 14px; line-height: 1.75; }
.ld-fail-act { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* 档案内容淡入 */
.pf-fade { animation: pfIn .28s ease both; }
@keyframes pfIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .ld { padding: 20px 18px 18px; border-radius: 16px; }
  .ld-main { grid-template-columns: 1fr; gap: 18px; padding: 18px 0; }
  .ld-ring-wrap { width: 160px; height: 160px; margin: 0 auto; }
  .ld-ring-num b { font-size: 38px; }
  .ld-title { font-size: 18px; }
  .ld-step { padding: 10px 10px; }
}
