/* ============================================================
   极速拓客工作台（view-workbench）· 三栏 WorkBuddy 风格
   左：任务列表 / 中：执行步骤流 / 右：线索产物
   ============================================================ */

.wb-root {
  display: grid;
  grid-template-columns: 240px 1fr 360px;
  gap: 12px;
  height: calc(100vh - 108px);
  min-height: 480px;
  padding: 12px;
}

/* ---------- 左栏：任务列表 ---------- */
.wb-side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wb-side-head {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wb-task-list { flex: 1; overflow-y: auto; padding: 8px; }
.wb-task {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.wb-task:hover { background: var(--panel-2); }
.wb-task.on { background: var(--panel-2); border-color: var(--accent); }
.wb-task .t {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-task .meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.wb-task .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 5px; background: var(--muted); vertical-align: 1px;
}
.wb-task .dot.run { background: var(--accent); animation: wb-pulse 1.2s infinite; }
.wb-task .dot.ok  { background: #22c55e; }
.wb-task .dot.err { background: #ef4444; }
@keyframes wb-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.wb-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 24px 10px; }

/* ---------- 中栏：执行流 ---------- */
.wb-main {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wb-steps { flex: 1; overflow-y: auto; padding: 14px; }
.wb-step {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--panel-2);
  font-size: 13px;
}
.wb-step .hd {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px;
}
.wb-step .st-icon { font-size: 15px; }
.wb-step .st-pct { margin-left: auto; color: var(--muted); font-size: 12px; }
.wb-step .bar {
  height: 4px; border-radius: 3px; background: var(--border);
  margin-top: 8px; overflow: hidden;
}
.wb-step .bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}
.wb-step .msg { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.wb-step.done .bar i { background: #22c55e; }
.wb-step.err { border-color: #ef4444; }

.wb-intent {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.wb-comp {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.wb-inrow { display: flex; gap: 8px; }
.wb-inrow input {
  flex: 1; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text); font-size: 13.5px; outline: none;
}
.wb-inrow input:focus { border-color: var(--accent); }
.wb-send {
  padding: 0 18px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--accent); color: #06231a; font-weight: 700; font-size: 13.5px;
  white-space: nowrap;
}
.wb-send:disabled { opacity: .5; cursor: not-allowed; }
.wb-foot { color: var(--muted); font-size: 11.5px; margin-top: 6px; text-align: right; }

/* ---------- 右栏：线索产物 ---------- */
.wb-out {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wb-out-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; justify-content: space-between;
}
.wb-out-head .n { color: var(--accent); }
.wb-out-list { flex: 1; overflow-y: auto; padding: 8px; }
.wb-lead {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; background: var(--panel-2);
  font-size: 12.5px;
}
.wb-lead .row1 { display: flex; align-items: center; gap: 8px; }
.wb-lead .score {
  min-width: 34px; text-align: center; font-weight: 700; font-size: 13px;
  border-radius: 7px; padding: 2px 5px;
  background: rgba(34,197,94,.15); color: #22c55e;
}
.wb-lead .score.mid { background: rgba(234,179,8,.15); color: #eab308; }
.wb-lead .score.low { background: rgba(107,114,128,.18); color: var(--muted); }
.wb-lead .name {
  font-weight: 700; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wb-lead .ln {
  color: var(--muted); margin-top: 5px; word-break: break-all;
}
.wb-lead .ln a { color: var(--accent); text-decoration: none; }
.wb-lead .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.wb-tag {
  font-size: 11px; padding: 2px 7px; border-radius: 20px;
  background: var(--border); color: var(--muted);
}
.wb-tag.mail { background: rgba(34,197,94,.15); color: #22c55e; cursor: pointer; }
.wb-lead .snip {
  color: var(--muted); font-size: 11.5px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 响应式：窄屏折叠右栏 ---------- */
@media (max-width: 1100px) {
  .wb-root { grid-template-columns: 200px 1fr; }
  .wb-out { display: none; }
}
