/* ── 空状态增强 ── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ── 空状态增强 ── */

.sl-empty-state {
  text-align: center;
  padding: 40px 24px;
}

.sl-empty-state .sl-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.sl-empty-state .sl-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.sl-empty-state .sl-empty-hint {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── 按钮微交互增强 ── */

#page-distill .btn:active:not(:disabled) {
  transform: scale(0.96);
}

#page-distill .btn-primary:hover:not(:disabled) {
  box-shadow: 0 2px 12px rgba(7, 193, 96, 0.2);
  transform: translateY(-1px);
}

/* ── Select bar 增强 ── */

.sl-evolve-select-bar {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.sl-evolve-select-bar label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

.sl-evolve-select-bar select {
  flex: 1;
  max-width: 320px;
}

/* ── 操作栏增强 ── */

.sl-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg-gray);
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ── Stats bar 间距修复 ── */

.sl-stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-gray);
  border-radius: 8px;
  font-size: 12px;
}

/* ── 模板内容区 ── */

.sl-template-content {
  font-size: 13px;
  line-height: 1.8;
}

.sl-template-content > div {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sl-template-content > div:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ── 竖排布局 ── */

.wf-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  min-height: 520px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── 左侧竖排时间线导航 ── */

.wf-sidenav {
  background: linear-gradient(180deg, #f8fffe 0%, #f0faf5 100%);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.wf-sidenav-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}
.wf-sidenav-step:hover {
  background: rgba(7, 193, 96, 0.04);
}
.wf-sidenav-step.active {
  background: rgba(7, 193, 96, 0.06);
}

.wf-sn-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--bg);
  border: 2.5px solid var(--border);
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  z-index: 2;
}

.wf-sidenav-step.active .wf-sn-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.35);
  transform: scale(1.08);
}

.wf-sidenav-step.completed .wf-sn-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: transparent;
  font-size: 0;
  box-shadow: 0 2px 10px rgba(7, 193, 96, 0.2);
}
.wf-sidenav-step.completed .wf-sn-circle::before {
  content: '✓';
  font-size: 16px;
  color: white;
}

/* ── 竖排连接线 ── */

.wf-sn-line {
  position: absolute;
  left: 38px;
  top: 48px;
  bottom: 0;
  width: 2.5px;
  background: var(--border);
  z-index: 1;
  transition: background 0.5s;
}
.wf-sidenav-step:last-child .wf-sn-line { display: none; }
.wf-sn-line.completed { background: var(--primary); }

/* ── 步骤文本 ── */

.wf-sn-content {
  flex: 1;
  min-width: 0;
  padding-top: 6px;
}

.wf-sn-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: color 0.3s;
}
.wf-sidenav-step.active .wf-sn-label { color: var(--primary); }
.wf-sidenav-step.completed .wf-sn-label { color: var(--text); }

.wf-sn-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}
.wf-sidenav-step.active .wf-sn-desc { color: var(--text-secondary); }

/* ── 工作流面板容器 ── */

/* ── 工作流面板容器 ── */

.wf-stage-container {
  padding: 20px 24px;
  position: relative;
  min-height: 400px;
}

.wf-stage {
  display: none;
  animation: wfStageIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.wf-stage.active { display: block; }

@keyframes wfStageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.wf-stage-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0faf5 0%, #e8f8ee 100%);
  border-radius: 12px;
  border: 1px solid rgba(7, 193, 96, 0.12);
}

.wf-stage-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.4;
  line-height: 1;
  min-width: 48px;
}

.wf-stage-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.wf-stage-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.wf-stage-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.wf-stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── 卡片系统 ── */

.wf-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.wf-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.wf-card-accent {
  border-left: 3px solid var(--primary);
}

.wf-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.wf-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.wf-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.wf-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-row {
  display: flex;
  gap: 12px;
}
.wf-row > * { flex: 1; }

/* ── 按钮系统 ── */

.wf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}
.wf-btn:hover { border-color: var(--primary); color: var(--primary); }
.wf-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.wf-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
}
.wf-btn-primary:hover { background: var(--primary-hover); color: white; box-shadow: 0 4px 14px rgba(7, 193, 96, 0.3); }

.wf-btn-secondary {
  background: var(--bg-gray);
  border-color: var(--border);
}
.wf-btn-secondary:hover { background: var(--border); }

.wf-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.wf-btn-ghost:hover { background: var(--bg-gray); color: var(--text); }

.wf-btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.wf-btn-next {
  min-width: 180px;
  justify-content: center;
}

.wf-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  font-size: 10px;
  font-weight: 800;
}

.wf-btn-primary .wf-btn-icon { background: rgba(255,255,255,0.2); }

.wf-arrow {
  font-size: 16px;
  transition: transform 0.2s;
}
.wf-btn-next:hover .wf-arrow { transform: translateX(4px); }

.wf-btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── 输入框 ── */

.wf-input {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}
.wf-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}
.wf-input::placeholder { color: var(--text-light); }

.wf-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── QR 区域 ── */

.wf-qr-area {
  margin-top: 12px;
  display: none;
  text-align: center;
}
.wf-qr-area.show { display: block; }

.wf-qr-status {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── 凭证列表 ── */

.wf-cred-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wf-cred-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.wf-cred-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.08);
}
.wf-cred-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.wf-cred-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* ── 搜索结果 ── */

.wf-account-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.wf-account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: all 0.2s;
  position: relative;
}
.wf-account-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.wf-account-item.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  box-shadow: 0 0 0 1px var(--primary);
}
.wf-account-item.selected::after {
  content: '✓ 已锁定';
  position: absolute;
  right: 16px;
  top: 6px;
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
}

/* ── 采集控制 ── */

.wf-collection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.wf-progress-bar-wrap {
  margin-top: 12px;
}
.wf-progress-bar {
  height: 6px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
}
.wf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #07A354);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.wf-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
}

/* ── 文章表格 ── */

.wf-article-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.wf-article-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.wf-article-table th {
  padding: 10px 14px;
  text-align: left;
  background: var(--bg-gray);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.wf-article-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.wf-article-table tr:last-child td { border-bottom: none; }
.wf-article-table tr:hover td { background: #fafafa; }

/* ── Stage 3 目标账号卡片 ── */

.wf-target-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border: 1px solid var(--primary);
  border-radius: 12px;
  transition: all 0.3s ease;
}
.wf-target-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.wf-target-info { flex: 1; min-width: 0; }
.wf-target-name-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-target-id-label {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-light);
  margin-top: 2px;
}
.wf-target-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ── 采集方式 Tab 切换 ── */

.wf-collect-modes {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.wf-collect-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-gray);
}
.wf-collect-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
}
.wf-collect-tab:hover { color: var(--text); background: rgba(0,0,0,0.02); }
.wf-collect-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg);
}
.wf-tab-icon { font-size: 15px; }
.wf-collect-panel {
  display: none;
  padding: 14px 18px;
}
.wf-collect-panel.active { display: block; }
.wf-collect-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}
.wf-url-input-row {
  display: flex;
  gap: 8px;
}
.wf-url-input-row .wf-input { flex: 1; }

/* ── 进度条升级 ── */

.wf-progress-box {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: wfFadeIn 0.3s ease;
}
@keyframes wfFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wf-progress-bar {
  height: 6px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
}
.wf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #07A354);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.wf-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
}

/* ── 浮动下载栏 ── */

.wf-download-bar {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  animation: wfSlideUp 0.3s ease;
  z-index: 10;
}
@keyframes wfSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.wf-download-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  gap: 12px;
}
.wf-dl-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.wf-dl-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.wf-dl-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.wf-dl-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.wf-dl-progress {
  padding: 0 18px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── 按钮变体 ── */

.wf-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}
.wf-btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
}
.wf-btn-xs:hover { background: var(--bg-gray); }
.wf-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-gray);
}
.wf-radio-label input[type="radio"] { margin: 0; }
.wf-btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.wf-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.wf-btn-icon { margin-right: 2px; }

/* ── 合集列表 ── */

.wf-album-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg);
}
.wf-album-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.wf-album-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  position: relative;
}
.wf-album-item.selected .wf-album-item-check {
  display: flex;
}
.wf-album-item-info {
  flex: 1;
  min-width: 0;
}
.wf-album-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-album-item-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.wf-album-item-check {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ── 管线进度 ── */

.wf-pipe-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-pipe-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.3s;
  background: var(--bg);
}
.wf-pipe-step .wf-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-light);
  flex-shrink: 0;
}
.wf-pipe-step.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--text);
}
.wf-pipe-step.active .wf-step-icon {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.wf-pipe-step.done {
  border-color: var(--primary);
  background: #e8f5e9;
  color: #2e7d32;
}
.wf-pipe-step.done .wf-step-icon {
  border-color: #2e7d32;
  background: #2e7d32;
  color: white;
}

/* ── 管线配置 ── */

.wf-pipe-config {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.wf-config-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wf-config-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.wf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.wf-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}