:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --line: #e3e5df;
  --text: #1c211d;
  --muted: #6a716b;
  --primary: #0f6b5c;
  --primary-ink: #ffffff;
  --primary-soft: #e3f1ed;
  --ok: #1d8a4e;
  --ok-soft: #e4f4ea;
  --warn: #b26a00;
  --warn-soft: #fbf0dc;
  --bad: #c2362b;
  --bad-soft: #fbe6e3;
  --info: #2f5fb3;
  --info-soft: #e5edf9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 20, .06), 0 2px 8px rgba(20, 30, 20, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: #16241f; color: #d8e2dd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: #2a9d84; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.brand-name { font-weight: 700; color: #fff; font-size: 15px; }
.brand-sub { font-size: 11px; color: #8fa49b; }
nav { display: flex; flex-direction: column; padding: 6px 8px; gap: 2px; }
nav a { color: #c4d2cb; padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
nav a.active { background: #2a9d84; color: #fff; }
.ico { width: 18px; text-align: center; opacity: .9; }
.badge { margin-left: auto; background: #e8553f; color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; font-weight: 600; }
.side-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #fff; }
.run-status { color: #9fb3aa; }

.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #56655e; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch i::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: #2a9d84; }
.switch input:checked + i::before { transform: translateX(18px); }

main { padding: 22px 28px 60px; max-width: 1280px; width: 100%; }
h1 { font-size: 20px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 18px; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 14px 0 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 1000px) { .grid2, .grid3 { grid-template-columns: 1fr; } .app { grid-template-columns: 1fr; } .side { position: static; height: auto; } }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .k { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .s { color: var(--muted); font-size: 12px; }

label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], select, textarea {
  width: 100%; border: 1px solid #cfd4cc; border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9fd3c6; border-color: var(--primary); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 14px; }
.hint { color: var(--muted); font-size: 12px; }
.hint b { color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.btn { border: 1px solid #cfd4cc; background: #fff; color: var(--text); padding: 7px 14px; border-radius: 8px; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: #e9c3be; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
tr:hover td { background: #fbfcfa; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; max-height: 64vh; border: 1px solid var(--line); border-radius: 8px; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #eef0ec; color: #4b544d; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.pri { background: var(--primary-soft); color: var(--primary); }
.email-chip { display: inline-flex; gap: 4px; align-items: center; margin: 0 4px 3px 0; font-size: 12px; }

.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.alert.warn { background: var(--warn-soft); color: #7a4a00; }
.alert.bad { background: var(--bad-soft); color: #8a241c; }
.alert.ok { background: var(--ok-soft); color: #145c34; }
.alert.info { background: var(--info-soft); color: #23467f; }

.setup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 1000px) { .setup { grid-template-columns: 1fr 1fr; } }
.setup-item { border: 1px dashed #c9cfc6; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.setup-item.done { border-style: solid; border-color: #bfe0cc; background: var(--ok-soft); cursor: default; }
.setup-item .n { font-weight: 700; color: var(--primary); }
.setup-item.done .n { color: var(--ok); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar select, .toolbar input[type=text] { width: auto; min-width: 140px; }
.bulk select { width: auto; min-width: 160px; }
.bulk { background: var(--primary-soft); border: 1px solid #bcdcd3; border-radius: 8px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; color: var(--muted); }

.tpl-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
@media (max-width: 1000px) { .tpl-layout { grid-template-columns: 1fr; } }
.tpl-list .item { padding: 9px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.tpl-list .item:hover { background: var(--surface-2); }
.tpl-list .item.active { background: var(--primary-soft); border-color: #bcdcd3; }
.tpl-list .item .t { font-weight: 600; }
.tpl-list .item .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { border: 1px solid #bcdcd3; background: var(--primary-soft); color: var(--primary); border-radius: 14px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }
.preview .subj { font-family: inherit; font-weight: 700; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.steps .step span.row { flex-wrap: nowrap; white-space: nowrap; }
.steps .step { display: grid; grid-template-columns: 90px 1fr 240px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.camp { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.camp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.camp-head .name { font-weight: 700; font-size: 15px; }
.camp-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 6px; }
.camp-stats div { font-size: 12px; color: var(--muted); }
.camp-stats b { display: block; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: #eceee9; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--primary); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }

.msg { border-bottom: 1px solid var(--line); padding: 10px 2px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.msg .meta { color: var(--muted); font-size: 12px; }
.msg .snip { margin-top: 4px; }

#toast { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
#toast .t { background: #1c2b25; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); max-width: 420px; }
#toast .t.err { background: #9a2a21; }
.modal { position: fixed; inset: 0; background: rgba(15, 25, 20, .45); display: grid; place-items: center; z-index: 40; }
.modal-box { background: #fff; border-radius: 12px; padding: 20px 22px; width: min(640px, 92vw); max-height: 88vh; overflow: auto; }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }

/* v3 */
.kwbar { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { user-select: none; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.on .hint { color: #d6eee8; }
.chip i.hint { font-style: normal; font-size: 11px; }
.city-list { max-height: 168px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.map-wrap { max-height: 420px; }
table.map th { vertical-align: bottom; min-width: 120px; background: var(--surface-2); }
table.map th select { width: 100%; margin-bottom: 4px; font-weight: 400; }
table.map th select.set { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
table.map td { max-width: 220px; }
.email-chip .person { cursor: pointer; margin: 0 0 4px; }
.email-chip .person:hover { color: var(--primary); }
.muted { color: #9aa29b; }
.sig-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.sig-ed { min-height: 90px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  background: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; outline: none; }
.sig-ed:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.sig-ed img { max-width: 100%; }
.mail-frame { width: 100%; border: 0; min-height: 260px; background: #fff; display: block; white-space: normal; }
.camp-next { margin-top: 8px; font-size: 13px; display: grid; gap: 3px; }
.camp-detail { margin-top: 8px; }
.camp-detail summary { cursor: pointer; }
.camp-detail .cd-body { margin-top: 8px; }
#main { min-width: 0; }
td .email-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 6px; }
td .email-chip .person { margin: 0; flex-basis: 100%; }
td .email-chip + .btn-link { display: block; }
.steps .step { grid-template-columns: 90px minmax(0, 1fr) minmax(0, 330px); }
.steps .step span.row { white-space: normal; flex-wrap: nowrap; }

/* v4 谷歌搜索方法 */
.method { background: var(--primary-soft); border: 1px solid #c7e3db; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.formula { font-size: 15px; }
.formula b { background: #fff; border: 1px solid #bcdcd3; border-radius: 6px; padding: 1px 8px; color: var(--primary); }
.formula .hint { display: block; margin-top: 4px; }
.sop { margin-top: 8px; }
.sop summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.sop ol { margin: 8px 0; padding-left: 20px; }
.sop li { margin: 3px 0; }
.gstep { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px dashed var(--line); }
.gstep h3 { margin: 2px 0 8px; font-size: 14px; }
.gstep h3 .hint { font-weight: 400; }
.gnum { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.mx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 14px; }
.mx span { font-weight: 600; }
.mx i.hint { font-style: normal; font-weight: 400; display: block; font-size: 11px; }
.mx textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.chip.ghost { background: #fff; border-style: dashed; }
.warnline { color: var(--warn); margin: -2px 0 4px; }
.qcard { padding: 8px 14px; }
.qgroup { border-bottom: 1px solid var(--line); padding: 8px 0; }
.qgroup:last-child { border-bottom: 0; }
.qgroup summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qtable { width: 100%; margin-top: 6px; }
.qtable td { padding: 4px 6px; border-bottom: 1px dashed var(--line); font-size: 12.5px; vertical-align: middle; }
.qtext { word-break: break-word; }
.gbody .chip:not(.on), #g-cinfo + .f .chip:not(.on) { background: #fff; color: var(--text); border-color: var(--line); }
.gbody .chip:not(.on) i.hint { color: var(--muted); }
.evals { display: flex; flex-wrap: wrap; gap: 3px; max-width: 220px; }
.ev { font-size: 11px; border-radius: 10px; padding: 0 7px; border: 1px dashed #c9cfc9; color: #8a918b; cursor: pointer; user-select: none; background: #fff; }
.ev.y { color: var(--ok); border-color: #9fd3b4; background: var(--ok-soft); }
.ev.n { color: var(--bad); border-color: #efb3ad; background: var(--bad-soft); }
.ev.man { border-style: solid; font-weight: 600; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.mx i.hint { min-height: 32px; }

/* v5：AI 回复助手 */
.msg-main { min-width: 0; }
.msg-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ai-bar { background: var(--info-soft); color: #23467f; border-radius: 8px; padding: 8px 12px; margin: 8px 0 4px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-sum { margin-top: 6px; padding: 7px 10px; background: var(--info-soft); border-radius: 6px; color: #23467f; font-size: 13px; }
.ai-asks { margin: 4px 0 0 18px; padding: 0; }
.ai-box { margin-top: 6px; }
.ai-box > summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 600; }
.pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; max-height: 260px; overflow: auto; }
.ai-draft { width: 100%; font-size: 14px; }
.ai-zh { margin-top: 4px; }
.ai-zh > summary { cursor: pointer; font-size: 12px; color: var(--muted); }

/* v6：联系方式、分类 */
.chan-cell { min-width: 230px; max-width: 360px; }
.sug { font-size: 12px; margin-bottom: 4px; }
.sug b { color: var(--primary); }
.chans { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chan { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 11.5px; color: var(--text); background: var(--surface-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.chan:hover { border-color: var(--primary); text-decoration: none; }
.chan i { font-style: normal; font-weight: 600; color: var(--muted); }
.chan.ch-whatsapp i { color: #1b874a; } .chan.ch-line i { color: #0b7f3e; } .chan.ch-facebook i { color: #2e5fc2; }
.chan.ch-instagram i { color: #ad2c69; } .chan.ch-wechat i { color: #1aad19; } .chan.ch-zalo i { color: #1559c9; }
.chan.ch-telegram i { color: #1a7aa9; } .chan.ch-viber i { color: #6f4ac2; } .chan.ch-kakao i { color: #8a6d00; }
.seg-sel { min-width: 108px; font-size: 12px; padding: 2px 4px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.seg-sel.pri { background: var(--primary-soft); color: var(--primary); }
.seg-sel.ok { background: var(--ok-soft); color: var(--ok); }
details.seg-rules { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
details.seg-rules summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.alert.warn { background: var(--warn-soft); color: var(--text); }

/* ---------- v6.1 社媒打招呼 ---------- */
:root { --c-whatsapp: #1b874a; --c-line: #0b7f3e; --c-zalo: #1559c9; --c-kakao: #8a6d00; --c-wechat: #1f9c41; --c-viber: #6f4bb8;
  --c-telegram: #1a7aa9; --c-facebook: #2e5fc2; --c-instagram: #ad2c69; --c-other: #6a716b; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chat-head .sub { max-width: 70ch; }
.caps { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 2px 0 12px; }
.cap b { color: var(--text); font-variant-numeric: tabular-nums; }
.cap.full b { color: var(--bad); }
.sec { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
.sec b { color: var(--text); font-size: 15px; }
.chat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .chat-cards { grid-template-columns: 1fr; } }
.ccard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.ccard header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ccard header > div { min-width: 0; }
.ccard h4 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ccard footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); padding-top: 8px; }
.ccard footer select { width: auto; font-size: 12.5px; padding: 4px 8px; }
.ccard.done { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; background: #f3f5f1; }
.ctpl { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.ctpl select { width: auto; padding: 2px 6px; font-size: 12px; }
.warnt { color: var(--warn); }
.csend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chbtn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cfd4cc; background: #fff; color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none !important; }
.chbtn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--chc, var(--c-other)); flex: none; }
.chbtn.primary { background: var(--chc); border-color: var(--chc); color: #fff; font-weight: 600; }
.chbtn.primary::before { background: #fff; }
.chbtn.weak { border-style: dashed; }
.chbtn.capped { opacity: .5; cursor: not-allowed; border-style: dashed; }
.chbtn.sel { outline: 3px solid var(--chc); outline-offset: 2px; }
.ch-whatsapp { --chc: var(--c-whatsapp); } .ch-line { --chc: var(--c-line); } .ch-zalo { --chc: var(--c-zalo); } .ch-kakao { --chc: var(--c-kakao); }
.ch-wechat { --chc: var(--c-wechat); } .ch-viber { --chc: var(--c-viber); } .ch-telegram { --chc: var(--c-telegram); }
.ch-facebook { --chc: var(--c-facebook); } .ch-instagram { --chc: var(--c-instagram); } .ch-other { --chc: var(--c-other); }
.chip.warn { background: #fff; color: var(--warn); border: 1px dashed var(--warn); }
.tpl2 { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
@media (max-width: 800px) { .tpl2 { grid-template-columns: 1fr; } }
.tpl2 aside { display: flex; flex-direction: column; gap: 2px; }
.tpl2 aside button { text-align: left; border: 1px solid transparent; background: none; border-radius: 8px; padding: 7px 10px; cursor: pointer; font: inherit; }
.tpl2 aside button.on { background: var(--primary-soft); border-color: var(--primary); font-weight: 600; }
.ai-tools { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ai-tools .row select { width: auto; }
.card.soft { background: #f8faf7; box-shadow: none; }
.seg { display: inline-flex; border: 1px solid #cfd4cc; border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid #cfd4cc; }
.seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid #cfd4cc; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 11.5px/1.6 ui-monospace, Consolas, monospace; text-align: center; color: var(--text); }
kbd.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn kbd { margin-left: 6px; }
.btn.primary kbd { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.5); }
.btn.big { padding: 10px 20px; font-size: 15px; }
.rapid { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.rapid-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; }
.rapid-top > b { font-size: 15px; }
.rapid-last { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #f3f5f1; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.rapid-card .ccard { box-shadow: var(--shadow); border-color: #bcdcd3; }
.rapid-card textarea { min-height: 120px; }
.rapid-keys { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#who a { color: #cfe3dc; text-decoration: underline; }

/* ---------- v6.2 找客户四大板块 / 社媒核查 / 自有客户表 ---------- */
details.rules-box { border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 8px; padding: 8px 12px; margin: 4px 0 14px; background: var(--surface-2); }
details.rules-box summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--primary); }
details.rules-box .hint { font-size: 12.5px; line-height: 1.65; color: var(--text); margin-top: 6px; }
details.rules-box ol { margin: 6px 0 2px 18px; padding: 0; }
details.rules-box li { margin: 2px 0; }
.soc-path { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.soc-path h4 { margin: 0 0 2px; font-size: 13px; }
.soc-path > .hint { margin: 0 0 6px; }
.soc-term { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.soc-term b { min-width: 160px; }
.soc-term a, .soc-term .btn-link { font-size: 12px; }
.rs-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-bottom: 8px; }
.rs-check { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.rs-check .hint { font-size: 11.5px; }
.rs-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; }
.rs-scores label.f > span { font-weight: 600; }
@media (max-width: 760px) { .rs-checks, .rs-scores { grid-template-columns: 1fr; } .soc-term b { min-width: 0; } }
.modal-box.wide { width: min(940px, 95vw); }
.rs-check .seg { flex-shrink: 0; } .rs-check .seg button { white-space: nowrap; }

/* ---------- v6.3 员工动态 ---------- */
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 5px; box-shadow: 0 0 0 3px var(--ok-soft); }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--surface-2); }
tr.lv-warn td { background: var(--warn-soft); } tr.lv-bad td { background: var(--bad-soft); }
.st-filter select, .st-filter input[type=text] { width: auto; min-width: 140px; }
.rm-steps { margin: 4px 0 10px; padding-left: 20px; line-height: 1.8; } .rm-steps li { margin: 2px 0; }

/* v6.6：网页自己的确认框 / 输入框（替代被浏览器屏蔽的系统弹窗） */
.ask-mask { position: fixed; inset: 0; background: rgba(15, 25, 20, .45); display: grid; place-items: center; z-index: 60; }
.ask-box { background: var(--surface); border-radius: 12px; padding: 20px 22px 16px; width: min(460px, 92vw); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.ask-msg { white-space: pre-line; line-height: 1.65; margin-bottom: 14px; }
.ask-in { width: 100%; box-sizing: border-box; margin-bottom: 14px; }
.ask-btns { justify-content: flex-end; gap: 8px; }
/* v6.6：业务线 */
.line-box { margin: 4px 14px 10px; }
.line-box select { width: 100%; }
.line-box .line-name { font-size: 13px; color: var(--muted, #6b7a72); padding: 4px 2px; }
.line-tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.radio-list label { display: block; margin: 6px 0; }
.radio-list .hint { margin: 0 0 4px 24px; }

.chain-tag{display:inline-block;margin-top:3px;padding:1px 6px;border-radius:10px;background:#fff3cd;color:#7a5200;font-size:11px;font-weight:600}
