/* 进化工作台 · 样式
 * 风格：商务深蓝管理后台（与 AI 评估工作台一致的观感，便于并排使用不突兀） */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e2e8f2;
  --ink: #1a2233;
  --ink2: #5a6b85;
  --brand: #1d4e89;
  --brand2: #2f6fb5;
  --ok: #1a7f52;
  --warn: #b26a00;
  --bad: #c0392b;
  --shadow: 0 1px 3px rgba(26,34,51,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.7 "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
}

/* 顶栏 */
.top {
  display: flex; align-items: center; gap: 24px;
  background: var(--brand); color: #fff; padding: 0 24px; height: 56px;
  position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 6px rgba(0,0,0,.15);
}
.brand b { font-size: 16px; display: block; line-height: 1.2; }
.brand small { font-size: 11px; opacity: .75; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab {
  background: transparent; color: rgba(255,255,255,.75); border: 0;
  padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 14px;
  font-family: inherit;
}
.tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.tab.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }
/* ★ 2026-10-19：知识库板块切换按钮（卡片是白底，不能复用顶栏那套深底白字 .tab，
   否则按钮文字白底白字完全看不见 —— 用户反馈「哪里有卡片」就是它） */
#kbTabs { display: flex; gap: 8px; margin: 10px 0 14px; }
#kbTabs .tab {
  background: #eef3fa; color: #1f3a5f; border: 1px solid #cfdcee;
  padding: 6px 20px; border-radius: 16px; cursor: pointer; font-size: 14px;
  font-family: inherit; opacity: 1;
}
#kbTabs .tab:hover { background: #dfe9f7; color: #1f3a5f; }
#kbTabs .tab.on { background: #2b5f9e; color: #fff; border-color: #2b5f9e; font-weight: 700; }
/* ★ 2026-10-19：候选规则网页勾选（点一下勾选 → 选类型 → 确认入库） */
.pend { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.pend-item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.pend-item.picked { border-color: var(--brand2); background: #f4f8ff; }
.pend-pick { padding-top: 4px; }
.pend-pick input { width: 18px; height: 18px; cursor: pointer; }
.pend-main { flex: 1 1 auto; min-width: 0; }
.pend-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pend-tag { font-size: 12px; color: var(--brand); background: #e8f0fb; border-radius: 10px; padding: 1px 8px; }
.pend-src { font-size: 12px; color: var(--ink2); }
.pend-kinds { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.pk { background: #fff; border: 1px solid #cfdcee; color: var(--brand); border-radius: 12px; padding: 3px 14px; font-size: 13px; cursor: pointer; font-family: inherit; }
.pk:hover { background: #eff4fb; }
.pk.on { background: var(--brand2); color: #fff; border-color: var(--brand2); font-weight: 700; }
.pk-tip { font-size: 12px; color: var(--ink2); margin-left: 8px; }
.pend-act { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; flex-wrap: wrap; }
.hint.bad { color: var(--bad); }

.status { font-size: 12px; opacity: .85; min-width: 200px; text-align: right; }
.status.ok { color: #b6f0d2; }
.status.bad { color: #ffc9c2; }

/* 主体 */
main { max-width: 1180px; margin: 20px auto; padding: 0 20px 60px; }
.pane { display: none; }
.pane.on { display: block; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 15px; color: var(--brand); }
.hint { margin: 0 0 14px; color: var(--ink2); font-size: 13px; }
.hint.warn { color: var(--warn); }
.hint strong { color: var(--ink); }
.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 3px;
  background: #eaf1f9; color: var(--brand2); font-weight: 400; vertical-align: 2px;
}

/* 表单 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.f { display: flex; flex-direction: column; }
.f label { font-size: 12px; color: var(--ink2); margin-bottom: 3px; }
.f label .star { color: var(--bad); }
.f input, .f select, .f textarea {
  font: 13px inherit; padding: 6px 8px; border: 1px solid #cbd5e6;
  border-radius: 4px; background: #fff; color: var(--ink); width: 100%;
}
.f input:focus, .f select:focus { outline: 0; border-color: var(--brand2); box-shadow: 0 0 0 2px rgba(47,111,181,.12); }
.f.wide { grid-column: 1 / -1; }
.f .unit { position: absolute; }
.fw { position: relative; }
.fw em { position: absolute; right: 8px; top: 7px; font-size: 12px; color: #9aa8bd; font-style: normal; }

/* 按钮 */
.btn {
  font: 14px inherit; padding: 8px 20px; border: 0; border-radius: 4px;
  background: var(--brand2); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--brand); }
.btn:active { transform: translateY(1px); }

/* 分段选择 */
.seg { display: inline-flex; margin-bottom: 12px; border: 1px solid #cbd5e6; border-radius: 4px; overflow: hidden; }
.segbtn {
  font: 13px inherit; padding: 6px 14px; border: 0; background: #fff;
  color: var(--ink2); cursor: pointer; border-right: 1px solid #cbd5e6;
}
.segbtn:last-child { border-right: 0; }
.segbtn.on { background: var(--brand2); color: #fff; font-weight: 700; }

/* 输出 */
.out { margin-top: 12px; font-size: 13px; }
.out:empty { display: none; }
.kv { background: #f7f9fc; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-bottom: 10px; }
.kv .row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed #e6ecf5; }
.kv .row:last-child { border-bottom: 0; }
.kv .k { color: var(--ink2); }
.kv .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.big { font-size: 20px; color: var(--brand); font-weight: 700; }

.reasons { background: #fbfcfe; border-left: 3px solid var(--brand2); padding: 8px 12px; margin-top: 8px; }
.reasons li { margin: 2px 0; color: var(--ink2); }
.reasons li.warn::before { content: "⚠ "; color: var(--warn); }
.reasons li.bad::before { content: "✘ "; color: var(--bad); }
.reasons-title { font-size: 12px; color: var(--ink2); margin: 0 0 4px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; }
table.tbl th { background: #f2f6fb; color: var(--brand); font-weight: 600; }
table.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; }
/* ★ 2026-10-26：台账表格 —— 项目名称/委托方地址动辄上百字，不夹住会把整张表挤成竖条。
   夹两行 + 悬停看全（title），比一刀切截断更不容易丢信息。 */
table.tbl td.lg-cell { max-width: 380px; }
table.tbl td.lg-cell .lg-t {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
table.tbl td.lg-cell .lg-s {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
  overflow: hidden; margin: 2px 0 0; font-size: 11.5px;
}
table.tbl td .btn-mini-x {
  padding: 0 5px; font-size: 11px; background: #8a94a6; border: 0; border-right: 0;
  color: #fff; border-radius: 3px; cursor: pointer;
}
table.tbl td .btn-mini-x:hover { background: var(--bad); }

.tplitem { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.tplitem:hover { border-color: var(--brand2); background: #f7fafe; }
/* ★ 2026-10-19：加「点击查看」视觉提示（用户反馈看不到模板内容） */
.tplitem::after { content: '查看 →'; font-size: 11px; color: var(--brand2); opacity: 0; transition: opacity .15s; margin-left: 8px; white-space: nowrap; }
.tplitem:hover::after { opacity: 1; }
.mt { font-size: 11px; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.mt.已验证 { background: #e3f5ec; color: var(--ok); }
.mt.待验证 { background: #fdf1de; color: var(--warn); }
.mt.骨架 { background: #eef1f5; color: var(--ink2); }
.cand { padding: 8px 12px; border-left: 3px solid var(--brand2); background: #f7fafe; margin-bottom: 6px; border-radius: 0 4px 4px 0; }
.cand.dim { border-left-color: #cbd5e6; opacity: .75; }
.cand .score { float: right; font-weight: 700; color: var(--brand); }
.err { background: #fdecea; border: 1px solid #f5c6c2; color: var(--bad);
  padding: 10px 12px; border-radius: 4px; margin-top: 8px; }
.ok { color: var(--ok); }
h4 { margin: 14px 0 6px; font-size: 13px; color: var(--brand); }
h4:first-child { margin-top: 0; }
ol.steps { margin: 0; padding-left: 20px; }
ol.steps li { margin: 4px 0; }
ul.plain { margin: 0; padding-left: 18px; }

@media (max-width: 700px) {
  .top { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .tabs { margin-left: 0; }
  .status { min-width: 0; text-align: left; width: 100%; }
}


/* 闭环提示条 */
.loop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: 1180px; margin: 14px auto 0; padding: 10px 20px;
  background: #eaf1f9; border: 1px solid #d3e2f2; border-radius: 6px; font-size: 12px; color: var(--ink2); }
.loop span { font-weight: 700; color: var(--brand); }
.loop b { color: var(--ink); font-weight: 600; }
.loop i { color: #9aa8bd; font-style: normal; }
.loop em { margin-left: auto; color: var(--warn); font-style: normal; }

/* ==================================================================
 * ★ 2026-10-27 规则库「板块」控件
 *   用户原话：「把规则库搞的人性化一点，不好区分填写」。
 *   以前一条规则属于哪个板块只能写在「适用」那段自由文字里，人和机器都得猜；
 *   现在三个板块各一个可点的标签，选了就是实心。
 *   配色沿用商务深蓝：土地=深蓝、房产=青、资产=金，跟既有色板同一族。
 * ================================================================== */
.bdc-土地 { --bdc: #1d4e89; }
.bdc-房产 { --bdc: #17786b; }
.bdc-资产 { --bdc: #a9761b; }

.bd-sum { display: flex; gap: 10px; margin: 12px 0 6px; flex-wrap: wrap; }
.bd-sum-item {
  display: flex; align-items: baseline; gap: 8px; min-width: 118px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--bdc, var(--line));
  border-radius: 6px; padding: 8px 14px; cursor: pointer; font-family: inherit;
  color: var(--ink); text-align: left;
}
.bd-sum-item b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--bdc, var(--ink)); }
.bd-sum-item span { font-size: 13px; color: var(--ink2); }
.bd-sum-item:hover { background: #f7f9fc; }
.bd-sum-item.on { background: #eef4fc; border-color: var(--bdc); box-shadow: inset 0 0 0 1px var(--bdc); }
.bd-clear { min-width: auto; border-left-color: var(--line); color: var(--ink2); }
.bd-clear b { font-size: 14px; color: var(--ink2); }

.bd-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; flex-wrap: wrap; }
.bd-lbl { font-size: 12px; color: var(--ink2); min-width: 30px; }
.bd-picks { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.bd-pick {
  white-space: nowrap;
  background: #fff; border: 1px dashed var(--bdc, #cfdcee); color: var(--bdc, var(--brand));
  border-radius: 12px; padding: 2px 12px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; opacity: .55;
}
.bd-pick:hover { opacity: 1; background: #f7f9fc; }
.bd-pick.on { background: var(--bdc, var(--brand2)); border-style: solid; border-color: var(--bdc, var(--brand2)); color: #fff; font-weight: 700; opacity: 1; }
.bd-src { font-size: 12px; color: var(--ink2); }
.bd-src.auto { color: var(--warn); font-weight: 700; }

/* 现行通则一览 */
.rlist { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.rl-head, .rl-row {
  display: grid; grid-template-columns: 58px 38px 1fr 218px;
  gap: 10px; align-items: center; padding: 7px 12px;
}
.rl-head { background: #f0f4fa; font-size: 12px; color: var(--ink2); font-weight: 700; }
.rl-row { border-top: 1px solid #eef2f8; }
.rl-row:hover { background: #fbfcfe; }
.rl-id { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.rl-lv { text-align: center; font-size: 12px; border-radius: 3px; padding: 1px 0; background: #eef2f8; color: var(--ink2); }
.rl-lv.lv-A { background: #fdecea; color: var(--bad); font-weight: 700; }
.rl-lv.lv-B { background: #fff4e5; color: var(--warn); font-weight: 700; }
.rl-nm b { font-size: 13px; }
.rl-nm i { display: block; font-style: normal; font-size: 12px; color: var(--ink2); }
