:root {
  --bg: #0f1420;
  --bg-soft: #161c2c;
  --panel: #1b2233;
  --panel-2: #222b40;
  --border: #2c3650;
  --text: #e6ebf5;
  --muted: #93a0bb;
  --accent: #2bd9a0;
  --accent-2: #4f8cff;
  --warn: #ffb020;
  --danger: #ff5c7c;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2332 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--accent-2); text-decoration: none; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #131a29, #0e131f);
  border-right: 1px solid var(--border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; flex: none;
  box-shadow: 0 3px 10px rgba(79,70,229,.32); }
.brand .logo { width: 32px; height: 32px; border-radius: 8px;
  display: block; box-shadow: 0 3px 10px rgba(79,70,229,.32); }
.brand .name { font-weight: 700; font-size: 15px; line-height: 1.15; }
.brand .sub { font-size: 11px; color: var(--muted); }

/* ---------- 启动画面 ---------- */
#splash {
  position: fixed; inset: 0; z-index: 999; display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(6,182,212,.18), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #111a2e 55%, #0b1220 100%);
  transition: opacity .6s ease, visibility .6s ease;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 22px;
  animation: splashIn .7s cubic-bezier(.2,.8,.2,1) both; }
.splash-logo { width: 240px; height: auto; filter: drop-shadow(0 12px 40px rgba(34,211,238,.35)); }
.splash-bar { width: 220px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #4F46E5, #7C3AED, #06B6D4);
  border-radius: 99px; animation: splashLoad 1.8s ease forwards; }
.splash-tag { color: #cbd5e1; font-size: 14px; letter-spacing: .5px; }
.splash-foot { color: #64748b; font-size: 12px; letter-spacing: 2px; }
@keyframes splashIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes splashLoad { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .splash-inner, .splash-bar span { animation: none; }
  .splash-bar span { width: 100%; }
}
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--muted); cursor: pointer; font-weight: 500; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(43,217,160,.16), transparent);
  color: var(--text); border-left: 3px solid var(--accent); }
.nav-item .ic { width: 18px; text-align: center; }
.nav-sep { padding: 14px 12px 4px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid var(--border); margin-top: 6px; }

/* 导航分组（对齐思维导图 8 大分支） */
.nav-group { margin-bottom: 2px; }
.nav-item.nav-top { font-weight: 700; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.nav-ghead { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 700;
  color: var(--text); letter-spacing: .01em; }
.nav-ghead:hover { background: var(--panel); }
.nav-ghead i { margin-left: auto; font-style: normal; font-size: 10px; color: var(--muted); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; padding-left: 10px;
  border-left: 1px solid var(--border); margin: 2px 0 4px 18px; }
.nav-sub .nav-item { padding: 7px 12px; font-size: 12.5px; font-weight: 500; }
.nav-group.collapsed .nav-sub { display: none; }
/* 分组标题（不可折叠版：子项直接平铺在一级，无下拉） */
.nav-ghead.static { cursor: default; margin-top: 6px; opacity: .8; }
.nav-ghead.static:hover { background: none; }

/* 商机看板 */
.board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.board-col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 12px; box-shadow: var(--shadow); min-height: 120px; }
.bc-head { display: flex; align-items: center; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.board-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 11px;
  background: var(--bg-soft); margin-bottom: 8px; cursor: pointer; }
.board-card:hover { border-color: rgba(43,217,160,.5); transform: translateY(-1px); }
.board-card .bc-t { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.board-card .bc-m { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* 商机管道看板（拖拽式） */
.opp-board { grid-template-columns: repeat(7, minmax(190px, 1fr)); overflow-x: auto; }
.opp-col { transition: border-color .15s, background .15s; }
.opp-col.drag-over { border-color: var(--accent); background: rgba(43,217,160,.06); }
.opp-col-body { min-height: 60px; }
.opp-card { cursor: grab; }
.opp-card:active { cursor: grabbing; }
.opp-card .bc-t { font-size: 12px; }
.opp-card-amt { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.opp-card-next { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.opp-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.opp-sum-card { background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.opp-sum-label { font-size: 11.5px; color: var(--muted); }
.opp-sum-val { font-size: 19px; font-weight: 700; margin-top: 4px; color: var(--text); }
.opp-sum-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.opp-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 10px 0; }
.opp-detail-grid label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }
.opp-detail-grid > div > div { font-size: 13px; }
.opp-ai-box { background: rgba(43,217,160,.08); border: 1px solid rgba(43,217,160,.25);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; margin: 8px 0; }
.opp-followups { margin-bottom: 14px; }
.opp-fu-head { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.opp-fu-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.opp-fu-item { min-width: 200px; max-width: 200px; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; background: var(--panel); cursor: pointer; }
.opp-fu-item:hover { border-color: rgba(43,217,160,.5); }
.opp-fu-item.overdue { border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.05); }
.opp-fu-t { font-size: 12px; font-weight: 600; }
.opp-fu-m { font-size: 11px; color: var(--muted); margin-top: 3px; }
.opp-fu-a { font-size: 11px; color: var(--accent); margin-top: 4px; }
.opp-reply-box { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.opp-reply-title { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.opp-reply-res { margin: 8px 0; font-size: 12.5px; line-height: 1.6; }
.opp-pay-bar { height: 6px; border-radius: 4px; background: var(--bg-soft);
  border: 1px solid var(--border); overflow: hidden; width: 100%; max-width: 120px; }
.opp-pay-bar > div { height: 100%; background: linear-gradient(90deg, #2bd9a0, #35c3a1); border-radius: 4px; }
@media (max-width: 1100px) {
  .opp-summary { grid-template-columns: repeat(2, 1fr); }
  .opp-board { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}

/* 成员管理：行内编辑与危险操作 */
input.mini { padding: 4px 7px; font-size: 12px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); width: 100%; }
input.mini:disabled { opacity: .55; }
.btn.danger { border-color: rgba(248,113,113,.45); color: #f87171; }
.btn.danger:hover { background: rgba(248,113,113,.14); border-color: #f87171; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(255,255,255,.04); }
.tbl .actions { gap: 5px; }
.tbl td .btn.sm { padding: 3px 8px; font-size: 11.5px; }

/* 能力路线图卡片 */
.road-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.road-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--bg-soft); }
.road-card b { font-size: 12.5px; }

/* 登录/注册 Tab */
.tabs { display: flex; gap: 6px; }
.tab { padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.tab.active { background: var(--panel); color: var(--text); }
.side-foot { margin-top: auto; font-size: 11px; color: var(--muted); padding: 8px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 60px; border-bottom: 1px solid var(--border); display: flex;
  align-items: center; justify-content: space-between; padding: 0 22px; background: rgba(20,26,40,.6); }
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.topbar .right { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.content { padding: 22px; overflow: auto; }
.view { display: none; }
.view:not(.hidden) { display: block; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--text); }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 28px; font-weight: 800; margin-top: 4px; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 500; }
.accent { color: var(--accent); }

/* ---------- 企业知识库：RAG 闭环状态 / 拖拽上传 ---------- */
.brain-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bs-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: center; gap: 12px; min-height: 76px; }
.bs-item .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid;
  place-items: center; font-size: 18px; line-height: 1;
  background: linear-gradient(145deg, rgba(79,140,255,.18), rgba(43,217,160,.14)); }
.bs-item .body { min-width: 0; flex: 1; }
.bs-item .k { color: var(--muted); font-size: 11px; line-height: 1.3; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.bs-item .v { font-size: 16px; font-weight: 700; margin-top: 3px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-item .v small { font-size: 12px; color: var(--muted); font-weight: 500; }
.bs-item .sub { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.bs-item .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.bs-item .tag.ok { color: var(--accent); border-color: rgba(43,217,160,.4);
  background: rgba(43,217,160,.08); }
.bs-item .tag.bad { color: var(--danger); border-color: rgba(255,92,124,.4);
  background: rgba(255,92,124,.08); }
/* 进度条独立整行，避免挤在卡片里 */
.brain-stats .bars { grid-column: 1 / -1; display: block; padding: 12px 16px; }
.brain-stats .bars .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.brain-stats .bars .pct { font-weight: 700; font-size: 14px; }
.rag-bar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.rag-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
@media (max-width: 1100px) { .brain-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .brain-stats { grid-template-columns: 1fr; } }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 30px 20px; text-align: center;
  color: var(--muted); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: rgba(43, 217, 160, .06); color: var(--text); }
.dropzone .dz-icon { font-size: 30px; line-height: 1; margin-bottom: 10px; color: var(--accent); }
.dropzone .dz-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.dropzone .dz-sub { font-size: 12px; margin-top: 3px; }
.up-file { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; background: var(--bg-soft); }
.up-file .ok { color: var(--accent); }
.up-file .bad { color: var(--danger); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: rgba(255,255,255,.02); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.b-A { background: rgba(43,217,160,.16); color: var(--accent); }
.b-B { background: rgba(79,140,255,.16); color: var(--accent-2); }
.b-C { background: rgba(255,176,32,.16); color: var(--warn); }
.b-muted { background: rgba(147,160,187,.16); color: var(--muted); }

/* ---------- Forms ---------- */
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }
input, textarea, select { width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 9px 11px; font-size: 13px; font-family: inherit; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 16px; cursor: pointer; font-size: 13px; font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #1fb98a); color: #06231a; border: none; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.ghost { background: transparent; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }

/* ---------- Chat / AI ---------- */
.chat { display: flex; flex-direction: column; height: 62vh; }
.chat .stream { flex: 1; overflow: auto; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; line-height: 1.6; white-space: pre-wrap; }
.chat .composer { display: flex; gap: 10px; margin-top: 10px; }
.chat .composer textarea { flex: 1; min-height: 46px; }
.kpi-bar { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.kpi-bar .card.stat { padding: 14px 18px; flex: 1; min-width: 150px; }
.kpi-bar .card.stat .label { color: var(--muted); font-size: 12px; }
.kpi-bar .card.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.ab-warn { color: var(--danger); font-weight: 700; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 7, 14, .66); backdrop-filter: blur(7px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.open { display: flex; }
.modal {
  width: 560px; max-width: 100%; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #222c48 0%, #171f33 100%);
  border: 1px solid #38466a; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  padding: 22px 24px 20px;
  animation: modalIn .16s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal-card { min-width: 0; }
.modal h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; padding-bottom: 11px;
  border-bottom: 1px solid var(--border); }
.modal .hint { margin-top: 12px; }
.modal .f-label { margin-top: 14px; font-weight: 600; letter-spacing: .02em; }
.modal input, .modal textarea, .modal select { border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.modal input:focus, .modal textarea:focus, .modal select:focus { box-shadow: 0 0 0 3px rgba(43, 217, 160, .14); }
.modal .row.mt { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal .row.mt .btn { min-width: 104px; }
.qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 380px; }
.hint { font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: 9px; padding: 10px 12px; margin-top: 12px; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--panel-2); border: 1px solid var(--accent);
  color: var(--text); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); display: none; z-index: 80; }
.toast.show { display: block; }
.funnel { display: flex; gap: 8px; align-items: stretch; }
.funnel .step { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; text-align: center; }
.funnel .step .n { font-size: 22px; font-weight: 800; color: var(--accent); }
.funnel .step .l { font-size: 11px; color: var(--muted); }
.muted { color: var(--muted); }
.tag { display: inline-block; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 7px; font-size: 11px; margin: 2px 3px 2px 0; }

/* ---------- 通用 ---------- */
.hidden { display: none !important; }
.full { width: 100%; }
.mb { margin-bottom: 14px; }
.card-h { font-weight: 700; font-size: 14px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-h > .spacer { flex: 1; }
.pa-head .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pa-head .row .badge { padding: 6px 14px; }
.f-label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }
.tbl td, .tbl th { vertical-align: middle; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.kpi-bar .card { padding: 14px 18px; flex: 1; min-width: 150px; }

/* ---------- 数字员工：AI 外贸工作台（三栏） ---------- */
.wt { display: grid; grid-template-columns: 232px minmax(0, 1fr) 250px; gap: 14px; height: 74vh; }
@media (max-width: 1280px) { .wt { grid-template-columns: 200px minmax(0, 1fr) 220px; } }
@media (max-width: 1024px) { .wt { grid-template-columns: 1fr; height: auto; }
  .wt-side, .wt-main, .wt-hist { height: auto !important; } .wt-hist { max-height: 300px; } }

/* 左：员工办公群 */
.wt-side, .wt-hist { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.wt-side-h { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex;
  flex-direction: column; gap: 8px; }
.wt-side-h .t { font-weight: 700; font-size: 13px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; }
.wt-search { width: 100%; font-size: 12px; padding: 6px 9px; }
.wt-groups { flex: 1; overflow: auto; padding: 8px 8px 14px; }
.wt-group { margin-bottom: 4px; }
.wt-ghead { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px;
  cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); user-select: none; }
.wt-ghead:hover { background: var(--panel-2); }
.wt-ghead i { font-style: normal; font-size: 10px; width: 10px; }
.wt-ghead .ge { font-size: 13px; }
.wt-ghead .gn { flex: 1; }
.wt-ghead .gc { font-size: 10px; padding: 0 6px; border-radius: 20px; background: var(--panel-2);
  border: 1px solid var(--border); font-weight: 500; }
.wt-gbody { padding: 2px 0 4px 6px; }
.wt-group.collapsed .wt-gbody { display: none; }
.wt-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px;
  cursor: pointer; border: 1px solid transparent; }
.wt-item:hover { background: var(--panel-2); }
.wt-item.active { background: linear-gradient(90deg, rgba(43,217,160,.15), transparent);
  border-color: rgba(43,217,160,.4); }
.wt-item .we { font-size: 17px; }
.wt-item .wi-main { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.wt-item .wn { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.wt-item .wd { font-size: 10.5px; color: var(--muted); }
.wt-own { font-size: 9px; padding: 0 5px; border-radius: 20px; background: rgba(96,165,250,.14);
  border: 1px solid rgba(96,165,250,.36); color: #60a5fa; }

/* 中：对话区 */
.wt-main { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-head { padding: 11px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.ch-l { display: flex; align-items: center; gap: 10px; }
.ch-emoji { font-size: 22px; }
.ch-l .ch-sub { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ch-r { margin-left: auto; }
.chat-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* 欢迎态（GeekFlow 风格） */
.wt-welcome { margin: auto; text-align: center; padding: 22px 10px; max-width: 520px; }
.wc-emoji { font-size: 46px; line-height: 1; }
.wc-name { font-size: 19px; font-weight: 800; margin-top: 10px; }
.wc-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.wc-tip { font-size: 12.5px; color: var(--muted); line-height: 1.85; margin-top: 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.wc-tip b { color: var(--accent); }
.wc-tasks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.wt-task { font-size: 12px; padding: 7px 13px; border-radius: 20px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.wt-task:hover { border-color: rgba(43,217,160,.55); color: var(--accent); background: rgba(43,217,160,.08); }

.msg { max-width: 82%; padding: 10px 14px; border-radius: 12px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.msg-agent { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: linear-gradient(135deg, rgba(43,217,160,.25), rgba(43,217,160,.12));
  border: 1px solid rgba(43,217,160,.4); border-bottom-right-radius: 4px; }
.msg .cita { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.msg .cita .c-item { font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg .cita .c-item b { color: var(--accent); }

/* 输入区：模型 / 知识库 / 技能 三选项 */
.wt-composer { border-top: 1px solid var(--border); }
.wt-opts { display: flex; align-items: center; gap: 8px; padding: 9px 14px 0; flex-wrap: wrap; }
.opt-lb { font-size: 11px; color: var(--muted); }
.opt-sel { font-size: 11.5px; padding: 4px 7px; max-width: 190px; }
.opt-btn { font-size: 11.5px; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.opt-btn:hover { border-color: rgba(43,217,160,.5); }
.opt-btn.on { background: rgba(43,217,160,.14); border-color: rgba(43,217,160,.45); color: var(--accent); }
.opt-sum { font-size: 11px; margin-left: auto; }
.chat-input-row { display: flex; gap: 10px; padding: 10px 14px 12px; align-items: flex-end; }
.chat-input-row textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; }
.typing { color: var(--muted); font-size: 12px; }
.typing::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* 右：历史会话 */
.conv-list { flex: 1; overflow: auto; padding: 8px; }
.conv-item { position: relative; padding: 8px 26px 8px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; }
.conv-item:hover { background: var(--panel-2); }
.conv-item.active { background: linear-gradient(90deg, rgba(43,217,160,.14), transparent);
  border-color: rgba(43,217,160,.4); }
.conv-item .ci-t { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.conv-item .ci-m { font-size: 10.5px; color: var(--muted); margin-top: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.conv-item .ci-ops { position: absolute; right: 6px; top: 7px; display: none; gap: 2px; }
.conv-item:hover .ci-ops { display: flex; }
.ci-op { font-size: 11px; cursor: pointer; padding: 1px 3px; border-radius: 4px; opacity: .7; }
.ci-op:hover { opacity: 1; background: var(--panel); }

/* ---------- 技能中心（Agent × Skill × Tool 三层） ---------- */
.skill-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.skill-chip { font-size: 10px; padding: 1px 6px; border-radius: 20px; background: rgba(43,217,160,.14);
  border: 1px solid rgba(43,217,160,.32); color: var(--accent); white-space: nowrap; }
.head-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tool-trace { align-self: flex-start; max-width: 88%; background: rgba(96,165,250,.07);
  border: 1px solid rgba(96,165,250,.28); border-radius: 10px; padding: 8px 12px;
  font-size: 11px; color: var(--muted); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.tool-trace .tt-head { color: #60a5fa; font-weight: 700; font-size: 11px; }
.tool-trace.err { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); }
.tool-trace.err .tt-head { color: #f87171; }

/* ---------- 平台超管后台 · 技能中心 ---------- */
.nav-ghead-a { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  padding: 12px 12px 4px; text-transform: uppercase; }
.sk-tabs { display: flex; gap: 6px; }
.sk-tab { font-size: 12px; padding: 7px 16px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.sk-tab.on { background: rgba(43,217,160,.15); border-color: rgba(43,217,160,.5); color: var(--accent); font-weight: 700; }
.sk-row { display: flex; gap: 14px; padding: 14px 12px; border-bottom: 1px solid var(--border);
  align-items: flex-start; }
.sk-row:last-child { border-bottom: none; }
.sk-row:hover { background: var(--panel-2); }
.sk-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; }
.sk-main { flex: 1; min-width: 0; }
.sk-t { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sk-t b { font-size: 14px; }
.sk-slug { font-size: 11px; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; }
.sk-desc { font-size: 12.5px; color: var(--text); opacity: .85; margin-top: 4px; line-height: 1.6; }
.sk-meta { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex;
  align-items: center; flex-wrap: wrap; gap: 5px; }
.sk-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { background: none; border: 1px solid transparent; cursor: pointer; font-size: 15px;
  padding: 5px; border-radius: 8px; }
.icon-btn:hover { background: var(--panel-2); border-color: var(--border); }
.icon-btn.danger:hover { background: rgba(248,113,113,.1); }

/* 拨动开关（对齐 GeekFlow toggle） */
.sw { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; cursor: pointer; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw .sl { position: absolute; inset: 0; border-radius: 21px; background: var(--panel-2);
  border: 1px solid var(--border); transition: .18s; }
.sw .sl::before { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px;
  border-radius: 50%; background: var(--muted); transition: .18s; }
.sw input:checked + .sl { background: rgba(43,217,160,.55); border-color: var(--accent); }
.sw input:checked + .sl::before { transform: translateX(17px); background: #fff; }
.tool-card.off { opacity: .55; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.skill-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 7px; }
.skill-card:hover { border-color: rgba(43,217,160,.45); }
.skill-card .sk-top { display: flex; align-items: center; gap: 9px; }
.skill-card .sk-emoji { font-size: 20px; }
.skill-card .sk-name { font-weight: 700; font-size: 14px; }
.skill-card .sk-cat { font-size: 10px; padding: 1px 7px; border-radius: 20px; background: var(--panel-2);
  border: 1px solid var(--border); color: var(--muted); }
.skill-card .sk-desc { font-size: 12px; color: var(--muted); line-height: 1.6; flex: 1; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--bg-soft); }
.tool-card .tc-name { font-weight: 600; font-size: 12.5px; }
.tool-card .tc-desc { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.skill-pick { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--border); margin-bottom: 7px; cursor: pointer; }
.skill-pick:hover { background: var(--panel-2); }
.skill-pick.on { border-color: var(--accent); background: rgba(43,217,160,.09); }
.skill-pick input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------- 数据源管理（参考 GeekFlow outbound_data_sources） ---------- */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.ds-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.ds-card.off { opacity: .6; background: var(--bg-soft); }
.ds-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ds-title b { font-size: 14px; }
.ds-slug { font-size: 10.5px; color: var(--muted); background: var(--panel-2); padding: 2px 7px;
  border-radius: 5px; font-family: ui-monospace, Menlo, monospace; }
.ds-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-fields { display: flex; flex-direction: column; gap: 4px; }
.ds-fields .row { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 8px; }
.ds-fields .f-label { font-size: 11px; color: var(--muted); margin-top: 6px; margin-bottom: 1px; }
.ds-fields input, .ds-fields select, .ds-fields textarea {
  font-size: 12px; padding: 6px 9px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.ds-fields textarea { font-family: ui-monospace, Menlo, monospace; resize: vertical; }
.ds-ops { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px;
  border-top: 1px dashed var(--border); }
.ds-tab { padding: 6px 14px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer; font-size: 12px; color: var(--text); }
.ds-tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ds-tab:hover:not(.on) { background: var(--panel-2); }

/* ---------- 多 tab 表单 ---------- */
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -2px 0 14px; }
.tab-btn { padding: 7px 14px; background: transparent; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-pane.hidden { display: none; }

/* ---------- 组织架构（部门树） ---------- */
.org-tree-ul { list-style: none; padding-left: 0; margin: 0; }
.org-tree-ul ul { list-style: none; padding-left: 22px; margin: 0; }
.org-node { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px;
  cursor: pointer; font-size: 13px; margin: 2px 0; }
.org-node:hover { background: var(--panel-2); }
.org-node.on { background: rgba(43,217,160,.12); color: var(--accent); }
.org-node .org-arrow { width: 14px; color: var(--muted); text-align: center; }

/* ---------- 权限矩阵 ---------- */
#perm-tbl th, #perm-tbl td { padding: 8px 12px; font-size: 12.5px; }
#perm-tbl select { width: 110px; font-size: 12px; padding: 4px 6px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 5px; }

/* ---------- 付费徽标 ---------- */
.badge.b-pro { background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  color: #fff; border: 0; font-weight: 700; padding: 2px 9px;
  letter-spacing: .5px; box-shadow: 0 1px 4px rgba(255,77,79,.25); }

/* ---------- 外联草稿 ---------- */
.ob-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ob-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); }
.ob-card .body { white-space: pre-wrap; line-height: 1.6; font-size: 13px; max-height: 200px;
  overflow: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 12px; }
.ob-card .cita { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* ---------- 流水线 ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.stage { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.stage.running { border-color: var(--accent-2); }
.stage.done { border-color: rgba(43,217,160,.5); }
.stage.failed { border-color: var(--danger); }
.stage .st-h { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; }
.stage .st-body { margin-top: 8px; font-size: 12px; white-space: pre-wrap; max-height: 240px; overflow: auto; }
.stage .st-cite { margin-top: 8px; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 6px; }
.badge.st-pending { background: rgba(147,160,187,.16); color: var(--muted); }
.badge.st-running { background: rgba(79,140,255,.16); color: var(--accent-2); }
.badge.st-done { background: rgba(43,217,160,.16); color: var(--accent); }
.badge.st-failed { background: rgba(255,92,124,.16); color: var(--danger); }

/* ==================== 外贸获客 Agent ==================== */
.pa-head { margin-bottom: 14px; }
.pa-title { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pa-badge { font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 1px 8px; }
.pa-sub { font-size: 12.5px; margin-top: 4px; }
.pa-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 12px; }
.pa-tab { padding: 8px 14px; font-size: 13.5px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none; }
.pa-tab:hover { color: var(--text); }
.pa-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.pa-pane { animation: fade .18s ease; }

/* 国家分组 */
.pa-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-region { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg-soft); }
.pa-region-h { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.pa-cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; max-height: 150px; overflow: auto; }
.pa-cc { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 2px; cursor: pointer; border-radius: 6px; }
.pa-cc:hover { background: rgba(43, 217, 160, .08); }
.pa-select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); font-size: 13px; }

/* 已存画像 */
.pa-profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-profile { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; align-items: center; }
.pp-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.pp-ops { display: flex; gap: 6px; flex-shrink: 0; }

/* 数据源渠道 */
.pa-sources { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pa-source { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; }
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9ced6; flex-shrink: 0; }
.ps-dot.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(43, 217, 160, .18); }
.ps-main { flex: 1; }

/* 市场方案 markdown */
.pa-plan { max-height: 460px; overflow: auto; font-size: 13px; line-height: 1.75;
  border: 1px dashed var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-soft); }
.pa-md-h3 { font-size: 14.5px; margin: 10px 0 4px; color: var(--accent); }
.pa-md-h4 { font-size: 13.5px; margin: 8px 0 4px; }
.pa-md-ul { padding-left: 18px; margin: 4px 0; }
.pa-md-p { margin: 4px 0; }

/* 市场方案：结构化 chips + 执行进度勾选 */
.pa-plan-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-plan-chips .badge { font-size: 11.5px; }
.pa-prog-item { display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 13px; border-bottom: 1px dashed var(--border); }
.pa-prog-item:last-child { border-bottom: none; }
.pa-prog-item input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* 线索库 */
.pa-email { font-size: 12.5px; }
.pa-score { width: 64px; height: 6px; background: #edf0f4; border-radius: 4px; display: inline-block;
  vertical-align: middle; margin-right: 6px; overflow: hidden; }
.pa-score i { display: block; height: 100%; background: linear-gradient(90deg, #2bd9a0, #19b98a); border-radius: 4px; }

/* 商机搜索结果 */
.pa-cc-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.pa-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer; user-select: none; }
.pa-chip:hover { border-color: var(--accent); }
.pa-res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-res { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pa-score-big { font-size: 16px; font-weight: 800; color: var(--muted); }
.pa-score-big.hot { color: var(--accent); }
.pa-reason { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

@media (max-width: 1024px) {
  .pa-regions, .pa-profiles, .pa-res-grid { grid-template-columns: 1fr; }
}

/* badge 变体补充（获客线索标签） */
.badge.accent { background: rgba(43, 217, 160, .14); color: var(--accent); }

/* checkbox 不受全局 width:100% 影响 */
.pa-cc input, .pa-region-h input, .pa-chip input { width: auto; flex: none; accent-color: var(--accent); }
.pa-cc-grid { max-height: 170px; }

/* ===================== AI WhatsApp 工作台 ===================== */
.badge.ok { background: rgba(43,217,160,.16); color: var(--accent); }
.badge.err { background: rgba(255,92,124,.16); color: var(--danger); }

.wa-notice { background: rgba(79,140,255,.10); border: 1px solid rgba(79,140,255,.35);
  color: #cfe0ff; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; margin-bottom: 12px; }
.wa-notice.ok { background: rgba(43,217,160,.10); border-color: rgba(43,217,160,.35); color: #bff5e2; }
.wa-notice.err { background: rgba(255,92,124,.10); border-color: rgba(255,92,124,.35); color: #ffd0db; }

.wa-pane { padding: 4px 2px 10px; }
.wa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap; }
.wa-head h4 { margin: 0; font-size: 15px; }
.wa-head .row { gap: 8px; }

.wa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.wa-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; }
.wa-form .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.wa-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.wa-form input, .wa-form select, .wa-form textarea {
  padding: 8px 10px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-family: inherit; }
.wa-form .col { flex: 1; min-width: 180px; }
.wa-form textarea { width: 100%; min-height: 96px; resize: vertical; }
.wa-form .hint { margin: 8px 0 0; }

.wa-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }
.wa-tip, .wa-quick { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-top: 10px; }
.wa-quick { border-style: solid; border-color: rgba(43,217,160,.3); color: #bfe9d8; }
.wa-tip b, .wa-quick b { color: var(--text); }

.wa-code { background: #0b0f1a; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px;
  color: #9fe9cf; word-break: break-all; white-space: pre-wrap; line-height: 1.6; }
.wa-qrwrap { display: flex; justify-content: center; padding: 14px 0 6px; }
.wa-qr { width: 216px; height: 216px; border-radius: 10px; background: #fff;
  padding: 10px; box-shadow: 0 4px 24px rgba(0,0,0,.35); }
.wa-res-ok { background: rgba(43,217,160,.10); border: 1px solid rgba(43,217,160,.35);
  color: #bff5e2; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; margin-top: 10px; line-height: 1.6; }
.wa-preview { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin-top: 10px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }

/* 账号卡片 */
.wa-acc { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.wa-acc:hover { border-color: var(--accent); transform: translateY(-1px); }
.wa-acc .pr-head b { font-size: 14.5px; }
.wa-health { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.wa-hbar { flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.wa-hbar > i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.wa-r-h, .wa-r-m, .wa-r-l { font-weight: 700; }
.wa-r-h { color: var(--danger); }
.wa-r-m { color: var(--warn); }
.wa-r-l { color: var(--accent); }

/* 聊天同步 —— 独立滚动：会话列表与消息区各自滚动，输入栏固定在底部 */
.wa-chat-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 14px;
  height: calc(100vh - 205px); min-height: 480px; }
.wa-chat-list { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.wa-chat-list .card-h { flex-shrink: 0; }
.wa-chat-list .wa-chat-body { flex: 1; overflow-y: auto; padding: 8px 4px 8px 8px; }
.wa-chat-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  margin-bottom: 6px; background: var(--bg-soft); }
.wa-chat-item:hover { border-color: var(--border); }
.wa-chat-item.active { border-color: var(--accent); background: rgba(43,217,160,.08); }
.wa-chat-item b { font-size: 13.5px; }
.wa-chat-item .muted { font-size: 11.5px; display: block; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 会话搜索框 */
.wa-chat-search { margin: 8px 8px 4px; padding: 7px 10px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 12.5px; }
.wa-chat-search:focus { outline: none; border-color: var(--accent); }
/* 账号分组折叠 */
.wa-acc-group { margin-bottom: 6px; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; }
.wa-acc-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--bg-soft); cursor: pointer; user-select: none; }
.wa-acc-h:hover { background: var(--panel-2); }
.wa-acc-h b { font-size: 13px; }
.wa-acc-h .muted { font-size: 11.5px; }
.wa-acc-arrow { font-size: 10px; width: 14px; color: var(--muted); flex-shrink: 0; }
.wa-acc-ico { font-size: 14px; }
.wa-acc-body { padding: 6px; }
.wa-acc-group.collapsed .wa-acc-body { display: none; }
.wa-acc-group.collapsed { border-style: dashed; }
.wa-chat-main { min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.wa-chat-main > .hint { margin: auto; text-align: center; }
.wa-chh-wrap { padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.wa-chh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wa-chh b { font-size: 15px; margin-right: 8px; }
.wa-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; }
.wa-msg { max-width: 74%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; position: relative; }
.wa-msg.in { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); }
.wa-msg.out { align-self: flex-end; background: linear-gradient(135deg, var(--accent), #1fb98a);
  color: #06231a; border: none; }
.wa-msg-text { white-space: pre-wrap; }
/* 译文：原文下方独立浅色卡片，标签 + 正文 + 右上取消 */
.wa-msg-trans { margin-top: 8px; padding: 7px 10px; border-radius: 8px;
  background: rgba(128,128,128,.10); border: 1px solid rgba(128,128,128,.18);
  position: relative; white-space: pre-wrap; }
.wa-msg-trans-lb { font-size: 11px; color: var(--muted); display: block; margin-bottom: 3px; }
.wa-msg-trans-txt { font-size: 12.5px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.wa-trans-del { position: absolute; top: 4px; right: 6px; opacity: .75; font-size: 11px; }
.wa-msg-meta { font-size: 11px; opacity: .8; margin-top: 4px; }
.wa-msg-actions { position: absolute; top: 4px; right: 6px; display: flex; gap: 4px; opacity: 0;
  transition: opacity .15s; }
.wa-msg:hover .wa-msg-actions { opacity: 1; }
.wa-mini { background: rgba(128,128,128,.18); border: none; border-radius: 6px; padding: 2px 6px;
  cursor: pointer; font-size: 12px; color: var(--text); }
.wa-mini:hover { background: rgba(128,128,128,.32); }
.wa-media-img { display: block; max-width: 240px; border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.wa-media-img img { width: 100%; display: block; border-radius: 10px; }
.wa-media-file { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: rgba(128,128,128,.12); border-radius: 8px; color: var(--text);
  text-decoration: none; margin-bottom: 4px; font-size: 13px; }
.wa-media-file:hover { background: rgba(128,128,128,.2); }

/* 输入栏（WhatsApp 风格，固定在消息区下方，消息滚动时不动） */
.wa-chat-inputbar { flex-shrink: 0; border-top: 1px solid var(--border); padding: 10px 12px;
  background: var(--panel); }
.wa-pend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wa-pend:empty { display: none; }
.wa-pend-media { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.wa-pend-media img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.wa-pend-media span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-inbar { display: flex; align-items: flex-end; gap: 8px; }
.wa-icbtn { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  width: 38px; height: 38px; cursor: pointer; font-size: 16px; flex-shrink: 0; }
.wa-icbtn:hover { border-color: var(--accent); }
.wa-in-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wa-inbar textarea { flex: 1; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; font: inherit; color: var(--text); resize: none;
  max-height: 120px; min-height: 38px; }
.wa-inbar textarea:focus { outline: none; border-color: var(--accent); }
/* 输入栏实时翻译预览（边输边译） */
.wa-live-trans { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; color: var(--muted); }
.wa-live-trans #wa-live-trans-txt { flex: 1; white-space: pre-wrap; word-break: break-word;
  color: var(--text); min-height: 18px; line-height: 1.55; }
textarea.wa-live-trans-txt { background: transparent; border: 0; outline: none; resize: none;
  width: 100%; font: inherit; color: var(--text); padding: 0; margin: 0;
  white-space: pre-wrap; word-break: break-word; min-height: 18px; max-height: 120px; }
textarea.wa-live-trans-txt:focus { color: var(--accent); }
.wa-live-trans-txt.wa-trans-loading { color: var(--muted); font-style: italic; }
.wa-trans-retry { flex-shrink: 0; align-self: flex-start; }
.wa-trans-box { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wa-trans-lb { cursor: pointer; font-size: 12px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--border); white-space: nowrap; }
.wa-trans-lb:hover { border-color: var(--accent); }
.wa-trans-box select { background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; color: var(--text); max-width: 110px; }

/* 表情面板 */
.wa-emoji { position: fixed; z-index: 999; width: 264px; max-height: 220px; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.wa-emoji span { text-align: center; font-size: 20px; padding: 4px 0; cursor: pointer; border-radius: 6px; }
.wa-emoji span:hover { background: var(--bg-soft); }

/* 群发坐席卡片 */
.wa-camp-next { display: grid; gap: 12px; }
.wa-camp-next .wa-acc { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }

/* 话术库 */
.wa-tpl { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; }
.wa-tpl-body { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-family: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap;
  margin: 8px 0 0; color: var(--text); }

/* 触达编排步骤 */
.wa-reach-steps table.tbl { width: 100%; }

/* 数据看板 */
.wa-kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.wa-kpi { flex: 1; min-width: 130px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; }
.wa-kpi b { display: block; font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.wa-kpi span { font-size: 12px; color: var(--muted); }
.wa-trend { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 10px 4px 0;
  border-bottom: 1px solid var(--border); }
.wa-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  height: 100%; gap: 4px; min-width: 0; }
.wa-bar > i { width: 70%; max-width: 34px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.wa-bar > span { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* 养号状态 */
.wa-warm-stat { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 6px 0 14px; }
.wa-warm-stat b { color: var(--text); }
.wa-done { color: var(--accent); font-weight: 700; }

/* ---------- 深链模式教程 ---------- */
.wa-tut .hint code, .wa-tut .wa-tut-steps code { background: rgba(79, 140, 255, .14); color: var(--accent-2);
  padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.wa-tut-steps { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.wa-tut-steps > div { background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; }
.wa-tut-steps b { font-size: 13.5px; display: block; margin-bottom: 5px; color: var(--text); }
.wa-tut-steps ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.wa-tut-steps li + li { margin-top: 4px; }
.wa-tut-tip { margin-top: 14px; background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .3);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #e8d9b0; }
.wa-tut-tip ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }

/* WhatsApp 视图在窄屏下的适配 */
@media (max-width: 1024px) {
  .wa-chat-wrap { grid-template-columns: 1fr; height: auto; }
  .wa-chat-list { max-height: 260px; height: auto; }
  .wa-chat-main { height: 60vh; min-height: 420px; }
  .wa-grid { grid-template-columns: 1fr; }
}

/* ---------- AI 邮件管家（GeekFlow 风格大 tab + 子 tab）---------- */
.mail-bigtabs { display: flex; gap: 4px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.mail-bigtab { padding: 9px 22px; background: transparent; border: 0; border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; transition: all .15s; }
.mail-bigtab:hover { color: var(--text); background: var(--panel-2); }
.mail-bigtab.on { background: var(--accent); color: #0b0f17; }
.mail-subtabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.mail-subtab { padding: 6px 14px; background: transparent; border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.mail-subtab:hover { background: var(--panel-2); }
.mail-subtab.on { background: var(--accent); color: #0b0f17; border-color: var(--accent); }
.mail-pane { padding: 16px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-chip { padding: 9px 12px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer; font-size: 13px; text-align: left; transition: all .15s;
  color: var(--text); font-family: inherit; }
.lang-chip.add { border-style: dashed; color: var(--muted); text-align: center; }
.lang-chip.add:hover { color: var(--accent); }
.lang-chip:hover { border-color: var(--accent); }
.lang-chip.on { background: var(--accent); color: #0b0f17; border-color: var(--accent); font-weight: 600; }
.mail-tpl { padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; margin-bottom: 8px; background: var(--bg-soft); }
.mail-tpl.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mail-tpl:hover { border-color: var(--accent); }
.mail-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--bg-soft); }


/* ---------- AI CRM（对齐 GeekFlow AI CRM 设计） ---------- */
.crm-head { padding: 4px 2px 14px; }
.crm-title { font-size: 20px; font-weight: 700; }
.crm-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.crm-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.crm-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; position: relative; overflow: hidden; }
.crm-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-2); opacity: .8; }
.crm-stat.c-green::before { background: #2bd9a0; }
.crm-stat.c-accent::before { background: #ffb020; }
.crm-stat.c-warn::before { background: #4f8cff; }
.crm-stat.c-purple::before { background: #a78bfa; }
.crm-stat.c-red::before { background: #ff5c7c; }
.crm-stat-v { font-size: 22px; font-weight: 700; line-height: 1.2; }
.crm-stat-l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.crm-bigtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.crm-bigtab { padding: 10px 18px; font-size: 13.5px; color: var(--muted); cursor: pointer;
  border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; user-select: none; }
.crm-bigtab:hover { color: var(--text); background: var(--panel-2); }
.crm-bigtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.crm-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.crm-toolbar input, .crm-toolbar select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; flex: none; }
.crm-toolbar input { width: 280px; }
.crm-toolbar select { width: 150px; }
.cust-company b { font-size: 13.5px; color: var(--text); }
.cust-company b:hover { color: var(--accent-2); }
.ct-line { font-size: 12.5px; line-height: 1.7; white-space: nowrap; }
.v-chip { display: inline-block; font-size: 10.5px; padding: 0 6px; border-radius: 6px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); margin-left: 4px; }
.v-chip.ok { color: #2bd9a0; border-color: rgba(43, 217, 160, .4); background: rgba(43, 217, 160, .08); }
.badge.b-type { background: rgba(79, 140, 255, .12); color: #7da9ff; border: 1px solid rgba(79, 140, 255, .3); }
.badge.b-type.dim { background: var(--panel-2); color: var(--muted); border: 1px dashed var(--border); }
.st-sel { background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 8px; font-size: 12.5px; cursor: pointer; }
.st-sel.st-pending { color: #ffb020; border-color: rgba(255, 176, 32, .45); }
.st-sel.st-following { color: #4f8cff; border-color: rgba(79, 140, 255, .45); }
.st-sel.st-quoted { color: #a78bfa; border-color: rgba(167, 139, 250, .45); }
.st-sel.st-won { color: #2bd9a0; border-color: rgba(43, 217, 160, .45); }
.st-sel.st-lost { color: var(--muted); }
.st-sel.st-invalid { color: #ff5c7c; border-color: rgba(255, 92, 124, .45); }
.btn.sm.link-g { color: #7da9ff; }
.btn.sm.link-b { color: var(--accent-2); }
.btn.sm.link-m { color: var(--muted); }
.btn.sm.link-o { color: #ffb020; font-weight: 600; }
.btn.sm.link-wa { color: #2bd9a0; }
.btn.sm.link-d { color: #ff5c7c; }
.btn.sm.link-p { color: #a78bfa; font-weight: 600; }
.btn.sm.link-g, .btn.sm.link-b, .btn.sm.link-m, .btn.sm.link-o, .btn.sm.link-wa, .btn.sm.link-d, .btn.sm.link-p {
  background: transparent; border: 0; padding: 3px 6px; font-size: 12.5px; }
.btn.sm.link-g:hover, .btn.sm.link-b:hover, .btn.sm.link-m:hover, .btn.sm.link-o:hover,
.btn.sm.link-wa:hover, .btn.sm.link-d:hover, .btn.sm.link-p:hover { background: var(--panel-2); }
.crm-cfg-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; }
.crm-cfg-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; font-size: 13px; }
.crm-cfg-chip i { font-style: normal; cursor: pointer; color: var(--muted); font-size: 11px; }
.crm-cfg-chip i:hover { color: var(--danger); }

/* ---------- 邮箱设置（GeekFlow 式单面板） ---------- */
.mail-cfg-head { display: flex; gap: 10px; align-items: center; }
.cfg-badge { display: inline-block; padding: 5px 14px; border-radius: 16px; font-size: 12.5px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.cfg-badge.ok { color: #2bd9a0; border-color: rgba(43, 217, 160, .45); background: rgba(43, 217, 160, .08); }
.mail-cfg-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px; }
.mail-cfg-h { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.cfg-grid input, .cfg-grid select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.cfg-grid input::placeholder { color: #5a6478; }
.mail-cfg-actions { display: flex; gap: 10px; padding: 4px 2px 10px; }
.cfg-extra-row { display: flex; gap: 10px; align-items: center; padding: 9px 0;
  border-bottom: 1px solid var(--border); }
.cfg-extra-row:last-child { border-bottom: 0; }

/* ============ 五模块联动看板（AI CRM 顶部） ============ */
.crm-links {
  margin: 0 0 14px; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(43, 217, 160, .07), rgba(79, 140, 255, .05));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-title { font-size: 14.5px; font-weight: 800; color: var(--text); }
.cl-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.cl-funnel { display: flex; align-items: flex-end; gap: 6px; margin: 14px 0 12px; flex-wrap: wrap; }
.cl-f { flex: 1 1 90px; min-width: 84px; text-align: center; cursor: pointer; padding: 6px 4px; border-radius: 10px; transition: background .15s; }
.cl-f:hover { background: rgba(255, 255, 255, .04); }
.cl-f-v { font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.cl-f-bar { height: 5px; background: rgba(255, 255, 255, .08); border-radius: 3px; margin: 6px 0 5px; overflow: hidden; }
.cl-f-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; }
.cl-f-l { font-size: 12px; color: var(--muted); }
.cl-arrow { color: var(--muted); font-size: 13px; padding-bottom: 22px; opacity: .6; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 8px; }
.cl-cell { background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.cl-cell b { font-size: 17px; color: var(--text); }
.cl-cell span { font-size: 12px; color: var(--muted); }
.cl-cell em { font-size: 11px; color: var(--muted); font-style: normal; opacity: .8; }

/* ============ 客户 360 抽屉 ============ */
.c360-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel-2); border-radius: 10px; }
.c360-head b { color: var(--text); }
.c360-kv { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.c360-kv span { font-size: 11px; color: var(--muted); }
.c360-kv b { font-size: 13px; color: var(--text); }
.c360-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.c360-lk { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 6px; text-align: center; cursor: pointer; transition: all .15s; }
.c360-lk:hover { border-color: var(--accent); transform: translateY(-1px); }
.c360-lk b { display: block; font-size: 15px; color: var(--text); }
.c360-lk span { font-size: 11.5px; color: var(--muted); }

/* 时间线 */
.tl { max-height: 380px; overflow-y: auto; padding-right: 4px; }
.tl-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.tl-item:last-child { border-bottom: none; }
.tl-ic { width: 26px; height: 26px; flex: 0 0 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--panel-2); font-size: 13px; }
.tl-item.ch-email .tl-ic { box-shadow: inset 0 0 0 1px #4f8cff55; }
.tl-item.ch-whatsapp .tl-ic { box-shadow: inset 0 0 0 1px #2bd9a055; }
.tl-item.ch-inquiry .tl-ic { box-shadow: inset 0 0 0 1px #ffb02055; }
.tl-body { flex: 1; min-width: 0; }
.tl-t { font-size: 13px; color: var(--text); font-weight: 600; }
.tl-d { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.tl-m { font-size: 11px; color: var(--muted); opacity: .75; margin-top: 3px; }

/* ============ 发送任务策略编辑（节奏/分批/退信） ============ */
.cpg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.cpg-cell { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.cpg-cell b { font-size: 17px; color: var(--text); }
.cpg-cell span { font-size: 11.5px; color: var(--muted); }
.txt-err { color: #ff5c7c; }
.txt-warn { color: #ffb020; }
.cpg-alert { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: rgba(255, 176, 32, .10); border: 1px solid rgba(255, 176, 32, .35); color: #ffcf6b; }
.cpg-sec { margin: 18px 0 10px; padding-bottom: 6px; font-size: 13.5px; font-weight: 800; color: var(--text);
  border-bottom: 1px solid var(--border); }
.cpg-week { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.cpg-day { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--muted); font-size: 12.5px; cursor: pointer; transition: all .15s; font-family: inherit; }
.cpg-day:hover { border-color: var(--accent); }
.cpg-day.on { background: rgba(43, 217, 160, .14); border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* ============ 跟进序列（多触点编排） ============ */
.seq-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: rgba(255,255,255,.02); }
.seq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seq-head b { font-size: 14px; color: var(--text); margin-right: 8px; }
.seq-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.seq-bar { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; margin: 2px 0 8px; }
.seq-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.seq-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.badge.b-green { background: rgba(43,217,160,.14); color: var(--accent); }
.badge.b-amber { background: rgba(255,176,32,.14); color: #ffb020; }
.badge.b-red { background: rgba(255,92,124,.14); color: #ff5c7c; }

/* ============ AI 外贸专家团队（卡片墙） ============ */
.team-hero { padding: 6px 4px 14px; }
.team-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.team-head h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.team-head p { color: var(--muted); font-size: 13px; margin: 0; }
.team-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: rgba(43,217,160,.12); color: var(--accent); }
.team-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-search { width: 280px; max-width: 100%; padding: 9px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--panel); color: var(--text); font-size: 13.5px; outline: none; }
.team-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,217,160,.12); }
.team-chips { display: flex; gap: 6px; background: var(--panel-2); padding: 4px; border-radius: 10px; }
.team-chip { border: 0; background: transparent; padding: 7px 16px; border-radius: 7px;
  font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.team-chip.active { background: var(--panel); color: var(--accent); font-weight: 700;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.05); }
.team-create { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border: 0;
  padding: 9px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 18px 16px; display: grid; grid-template-columns: 64px 1fr auto;
  gap: 14px; align-items: flex-start; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.team-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.06); border-color: var(--accent); }
.team-card:not(.locked) { cursor: pointer; }
.team-card.locked { background: var(--panel-2); }
.team-avatar { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 30px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #6c8cff, #5b6df5); user-select: none; flex-shrink: 0; }
.team-avatar.tone-1 { background: linear-gradient(135deg, #6c8cff, #5b6df5); }
.team-avatar.tone-2 { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.team-avatar.tone-3 { background: linear-gradient(135deg, #2bd9a0, #16a34a); }
.team-avatar.tone-4 { background: linear-gradient(135deg, #f59e0b, #ef8d18); }
.team-avatar.tone-5 { background: linear-gradient(135deg, #ec4899, #db2777); }
.team-avatar.tone-6 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.team-body { min-width: 0; }
.team-name { font-size: 15px; font-weight: 700; margin: 0 0 4px; display: inline-flex; align-items: center; gap: 8px; }
.team-premium { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  font-weight: 700; color: #b45309; background: linear-gradient(90deg, #fef3c7, #fde68a);
  padding: 2px 8px; border-radius: 999px; }
.team-desc { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.55; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.team-skill { font-size: 11.5px; color: var(--text); padding: 3px 10px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border); }
.team-arrow { color: var(--muted); font-size: 18px; line-height: 1; padding-top: 4px; }
.team-locked-cta { position: absolute; inset: auto 18px 18px 92px; display: flex; gap: 10px; align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--panel-2) 55%);
  padding-top: 22px; }
.team-locked-text { color: var(--muted); font-size: 12.5px; }
.team-locked-text b { color: var(--text); }
.team-btn { border: 0; padding: 7px 14px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.team-btn.primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-weight: 600; }
.team-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.team-btn:hover { opacity: .92; }
.team-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.team-foot { margin-top: 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.team-foot a { color: var(--accent); text-decoration: none; margin-left: 4px; }

/* ===== 专家选择页：人像 / 多选 / 操作条 / 工作台切换 ===== */
.team-photo-wrap { width: 64px; height: 64px; flex-shrink: 0; }
.team-photo { width: 64px; height: 64px; display: block; border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.team-card { padding-bottom: 18px; }
.team-card.locked { padding-bottom: 62px; }
.team-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,217,160,.16); }
.team-check { position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--panel); color: transparent; font-size: 12px;
  display: flex; align-items: center; justify-content: center; z-index: 3; transition: all .15s ease; }
.team-card:hover .team-check { border-color: var(--accent); }
.team-card.selected .team-check { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.team-locked-cta { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--panel-2) 55%); }
.team-selectbar { position: fixed; top: 76px; left: 254px; right: 22px; z-index: 40;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 14px;
  padding: 12px 16px; box-shadow: 0 12px 32px rgba(15,23,42,.18);
  animation: tsb-in .22s ease; }
@keyframes tsb-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
/* 悬浮条出现时，专家墙顶部预留等高空间：不遮挡标题区，且留出呼吸间隙 */
#team-hero.has-bar { padding-top: 72px; }
.tsb-count { font-weight: 700; font-size: 13.5px; color: var(--accent); white-space: nowrap; }
.tsb-chosen { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tsb-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2);
  border: 1px solid var(--border); white-space: nowrap; }
.tsb-ops { display: flex; gap: 8px; margin-left: auto; }
.wt-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.team-role { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; }
.team-link { color: var(--accent); }
.wt-add { margin: 8px 6px 4px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 9px;
  font-size: 12.5px; color: var(--accent); text-align: center; cursor: pointer; }
.wt-add:hover { border-color: var(--accent); background: var(--panel-2); }
/* ===== 真人头像卡片样式 ===== */
.team-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 2px 6px rgba(15,23,42,.14); border: 2px solid rgba(255,255,255,.7);
  background: var(--panel-2); display: block; }
.team-photo-wrap { width: 64px; height: 64px; flex-shrink: 0; position: relative; }
.team-photo-fallback { border-radius: 50% !important; }

/* ===== AI 邮件管家：多语种开发信撰写（对齐 GeekFlow） ===== */
.ml-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.ml-tab { padding: 8px 16px; font-size: 13px; color: var(--muted); border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent; }
.ml-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ml-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
@media (max-width: 980px) { .ml-grid { grid-template-columns: 1fr; } }
.ml-left { border-right: 1px solid var(--border); padding-right: 18px; }
.ml-label { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px; }
.ml-lang-list { display: flex; flex-direction: column; gap: 6px; }
.ml-lang { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); cursor: pointer; font-size: 13px; transition: all .15s; }
.ml-lang:hover { border-color: var(--accent); }
.ml-lang.on { background: var(--accent); color: #04241a; border-color: var(--accent); font-weight: 600; }
.ml-lang-tag { font-size: 11px; opacity: .75; width: 20px; text-transform: uppercase; }
.ml-gen { width: 100%; margin-top: 16px; }
.ml-feats { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px;
  font-size: 12px; color: var(--muted); line-height: 1.9; }
.ml-feats-h { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ml-right { min-height: 420px; display: flex; flex-direction: column; }
.ml-editor-h { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.ml-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); font-size: 13px; border: 1px dashed var(--border); border-radius: 12px; }
.ml-empty-lang { font-size: 40px; font-weight: 800; color: var(--text); opacity: .25; }
.ml-editor textarea { width: 100%; line-height: 1.7; }
.ml-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ml-tpl-card { padding: 14px; }
.ml-tpl-name { font-weight: 700; font-size: 13.5px; }
.ml-tpl-body { font-size: 12px; color: var(--muted); line-height: 1.6; min-height: 56px; }
/* ===== 数据分析 ===== */
.mla-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mla-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.mla-v { font-size: 26px; font-weight: 800; }
.mla-t { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mla-funnel-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12.5px; }
.mla-funnel-label { width: 90px; color: var(--muted); text-align: right; flex-shrink: 0; }
.mla-funnel-bar { flex: 1; height: 14px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.mla-funnel-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), #36e0b0); border-radius: 999px; }
.mla-funnel-n { width: 46px; font-weight: 700; }
/* 数据分析：14 天趋势柱状图 */
.mla-trend { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 6px 2px 0; }
.mla-tr-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; cursor: default; }
.mla-tr-bars { display: flex; align-items: flex-end; gap: 2px; height: 104px; width: 100%; justify-content: center; }
.mla-tr-bars i { display: block; width: 38%; max-width: 16px; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s ease; }
.mla-tr-bars i.b-sent { background: linear-gradient(180deg, var(--accent), #36e0b0); }
.mla-tr-bars i.b-open { background: rgba(255, 176, 32, .85); }
.mla-tr-col span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.mla-tr-col:hover .mla-tr-bars i { filter: brightness(1.25); }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg-dot.b-sent { background: linear-gradient(180deg, var(--accent), #36e0b0); }
.lg-dot.b-open { background: rgba(255, 176, 32, .85); }
/* ===== AI CRM：GeekFlow 式状态 chips ===== */
.crm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-chip-stat { display: flex; align-items: center; gap: 6px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.crm-chip-stat b { font-size: 15px; color: var(--text); }
.cust-site { font-size: 11.5px; color: var(--accent); text-decoration: none; display: inline-block; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.cust-site:hover { text-decoration: underline; }

/* ============================================================
   专家选择页 · 浅色版（照抄参考图：白底卡片墙 / 蓝色主按钮 /
   金色高级专家徽标 / 锁定遮罩「未雇佣」/ 立即升级）
   ============================================================ */
#team-hero { background: #fff; color: #1d2129; border-radius: 16px;
  padding: 24px 28px 20px; min-height: calc(100vh - 130px); box-shadow: 0 1px 3px rgba(30,40,50,.06); }
#team-hero .team-head > div > h2 { color: #1d2129; font-size: 24px; letter-spacing: .5px; }
#team-hero .team-tag { background: #f2f3f5; color: #4e5969; border: none; border-radius: 6px;
  font-size: 12px; padding: 2px 8px; vertical-align: 4px; margin-left: 6px; }
#team-hero .team-head p { color: #86909c; font-size: 13px; margin-top: 6px; }
#team-hero .team-search { background: #fff; border: 1px solid #dfe1e6; border-radius: 8px;
  color: #1d2129; height: 38px; width: 300px; }
#team-hero .team-search::placeholder { color: #a9aeb8; }
#team-hero .team-chips { background: #fff; border: 1px solid #dfe1e6; border-radius: 8px;
  padding: 3px; gap: 2px; }
#team-hero .team-chip { background: transparent; color: #4e5969; border: none;
  border-radius: 6px; padding: 6px 14px; font-size: 13px; }
#team-hero .team-chip.active { background: #e8f3ff; color: #1677ff; font-weight: 600; }
#team-hero .team-create { background: #1677ff; color: #fff; border: none; border-radius: 8px;
  height: 38px; padding: 0 16px; font-weight: 600; font-size: 13.5px; }
#team-hero .team-create:hover { background: #4096ff; }
#team-hero .team-grid { gap: 16px; }
#team-hero .team-card { background: #fff; border: 1px solid #e5e6eb; border-radius: 14px;
  padding: 20px 20px 18px; box-shadow: none; transition: all .18s ease; overflow: hidden; }
#team-hero .team-card:hover { transform: translateY(-2px); border-color: #91caff;
  box-shadow: 0 8px 20px rgba(22,119,255,.10); }
#team-hero .team-photo, #team-hero .team-photo-fallback { width: 72px; height: 72px;
  border-radius: 50%; border: none; box-shadow: none; object-fit: cover; }
#team-hero .team-photo-wrap { width: 72px; height: 72px; flex-shrink: 0; }
#team-hero .team-body { flex: 1; min-width: 0; }
#team-hero .team-name { color: #1d2129; font-size: 15.5px; font-weight: 700; margin: 0 0 7px; }
#team-hero .team-desc { color: #86909c; font-size: 13px; line-height: 1.7; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#team-hero .team-skillrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#team-hero .team-skill { background: #f2f3f5; color: #4e5969; border: none; border-radius: 6px;
  font-size: 12px; padding: 3px 10px; }
#team-hero .team-premium { position: absolute; top: 14px; right: 16px; z-index: 4;
  background: #fff7e8; color: #d48806; border: 1px solid #ffe1a6; border-radius: 4px;
  font-size: 11.5px; padding: 2px 8px; font-weight: 600; }
#team-hero .team-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: #c9cdd4; font-size: 22px; line-height: 1; }
#team-hero .team-btn { border-radius: 6px; font-size: 13px; padding: 6px 14px; cursor: pointer; border: none; }
#team-hero .team-btn.primary { background: #1677ff; color: #fff; font-weight: 600; }
#team-hero .team-btn.primary:hover { background: #4096ff; }
#team-hero .team-btn.ghost { background: #fff; color: #4e5969; border: 1px solid #dfe1e6; }
#team-hero .team-btn.ghost:hover { color: #1677ff; border-color: #91caff; }
#team-hero .team-empty { background: #fff; border: 1px dashed #dfe1e6; border-radius: 14px;
  color: #86909c; padding: 40px; grid-column: 1/-1; text-align: center; }
#team-hero .team-foot { color: #86909c; font-size: 13px; text-align: center; padding-top: 18px; }
#team-hero .team-foot a { color: #1677ff; }
#team-hero .team-selectbar { background: #fff; border-color: #1677ff; color: #1d2129; }
#team-hero .tsb-chip { background: #f2f3f5; color: #4e5969; border-color: #e5e6eb; }

/* ===== 专家墙补充：地球图标占位 / 技能行分隔线 ===== */
#team-hero .team-photo-globe { background: #e8f1fd; display: flex; align-items: center;
  justify-content: center; font-size: 30px; }
#team-hero .team-skills { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#team-hero .team-sep { display: inline-block; width: 1px; height: 14px; background: #e5e6eb; }

/* ---------- 外贸表格（订单管理 · 表格页） ---------- */
.tc-wrap { overflow: auto; max-height: 52vh; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.tc-tbl { min-width: 100%; border-collapse: collapse; }
.tc-tbl th, .tc-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tc-tbl thead th { position: sticky; top: 0; background: var(--panel-2); z-index: 2; font-size: 12px; }
.tc-head { display: flex; align-items: center; gap: 4px; justify-content: space-between; }
.tc-label { cursor: pointer; font-weight: 600; white-space: nowrap; }
.tc-label:hover { color: var(--accent); }
.tc-fx { color: var(--accent-2); font-size: 11px; }
.tc-del { cursor: pointer; color: var(--muted); font-weight: 700; padding: 0 4px; border-radius: 5px; }
.tc-del:hover { color: var(--danger); background: rgba(255, 92, 124, .12); }
.tc-inp { width: 100%; min-width: 80px; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text); border-radius: 7px; padding: 5px 7px; font-size: 12.5px; }
.tc-inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(43, 217, 160, .14); }
.tc-calc { background: rgba(79, 140, 255, .07); color: var(--accent-2); font-weight: 600; text-align: right; white-space: nowrap; }
.tc-rowop { width: 40px; text-align: center; }
.tbl td.muted, .tbl td .muted { color: var(--muted); }

/* 模板选择卡片 */
.tpl-pick-cat { margin: 14px 0 8px; font-weight: 700; font-size: 13px; color: var(--muted);
  letter-spacing: .04em; }
.tpl-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tpl-pick-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: .15s; }
.tpl-pick-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-pick-name { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.tpl-pick-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; min-height: 32px; }
.tpl-pick-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ---------- 超管：外贸表格模板列编辑器 ---------- */
.tt-col-row { display: grid; grid-template-columns: 1.4fr 1fr 90px 1.3fr 1fr 40px;
  gap: 6px; margin-bottom: 6px; align-items: center; }
.tt-col-row input, .tt-col-row select { font-size: 12.5px; padding: 6px 8px; }
.tt-c-name { font-weight: 600; }
.tt-c-key, .tt-c-fx { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.tt-c-fx { color: var(--accent-2); }
@media (max-width: 900px) { .tt-col-row { grid-template-columns: 1fr 1fr; } }
.te-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tc-tbl thead th:last-child, .tc-tbl tbody tr td.tc-rowop { background: var(--panel-2); }

/* ---------- 客户标签自动化（Tag Automation） ---------- */
.tag-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 10px; font-size: 11.5px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted);
}
.tag-chip.auto {
  background: rgba(88, 166, 255, .12); border-color: rgba(88, 166, 255, .35);
  color: #6cb6ff;
}
.tag-chip i {
  font-style: normal; cursor: pointer; opacity: .55; font-size: 10px; margin-left: 1px;
}
.tag-chip i:hover { opacity: 1; color: var(--danger); }
.c360-tags { margin-top: 10px; padding: 8px 12px; background: var(--panel-2); border-radius: 10px; }

.at-cond {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
  padding: 8px 10px; background: var(--panel-2); border-radius: 9px;
}
.at-cond select, .at-cond input { flex: 1; min-width: 0; }
.at-cond .at-op { flex: 0 0 96px; }
.at-cond .btn { flex: 0 0 auto; }
.at-preview {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 13px;
  background: rgba(63, 185, 80, .10); border: 1px solid rgba(63, 185, 80, .3);
  color: #7ee787; display: none;
}
.at-preview:not(:empty) { display: block; }
.badge.b-warn { background: rgba(210, 153, 34, .16); color: #e3b341; border-color: rgba(210, 153, 34, .35); }
