/* ========== 项目工作区 ========== */
/* 栏宽 340px，与 workspace.js WF_COLUMN_WIDTH 保持一致 */

#page-workspace.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

#page-workspace .page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
  max-width: none;
}

.wf-rail {
  flex-shrink: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px 12px;
}

.wf-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.wf-rail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wf-rail-brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.wf-rail-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wf-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-white);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  color: var(--text-light);
}

.wf-step:hover {
  border-color: var(--accent-light);
  background: var(--accent-soft);
  color: var(--accent);
}

.wf-step.is-open {
  border-color: #c7d2fe;
  background: var(--accent-soft);
  color: var(--accent);
}

.wf-step.is-focused {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.wf-step-arrow {
  display: none;
}

.wf-step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wf-dot-empty { background: #cbd5e1; }
.wf-dot-running { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3); animation: wf-pulse 1s infinite; }
.wf-dot-result { background: #6366f1; }
.wf-dot-saved { background: #10b981; }

@keyframes wf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.wf-columns-header {
  flex-shrink: 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.wf-columns-header .wf-scroll-hint {
  border-bottom: none;
}

.wf-panels-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  padding: 0 0 16px;
}

.wf-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-bottom: 1px solid #e0e7ff;
  white-space: nowrap;
}

.wf-scroll-hint-sub {
  color: var(--text-lighter);
  font-size: 11px;
}

.wf-columns-track {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 12px 16px 0;
}

.wf-columns-steps {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  padding: 8px 16px 10px;
}

.wf-column-step {
  flex: 0 0 340px;
  width: 340px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-white);
  border: 1px dashed #c7d2fe;
  border-radius: var(--radius);
}

.wf-column-step.is-focused {
  border-style: solid;
  background: var(--accent-soft);
}

.wf-panels-host {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.wf-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 340px;
  width: 340px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-height) - 160px);
  min-height: 320px;
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: default;
}

.wf-panel:not(.is-focused) {
  cursor: pointer;
}

.wf-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: #fafbff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  cursor: pointer;
  user-select: none;
}

.wf-panel.is-focused .wf-panel-header {
  background: #eef2ff;
}

.wf-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  position: relative;
  min-height: 0;
  cursor: text;
}

.wf-panel.is-focused {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25), var(--shadow);
}

.wf-column-step-status {
  margin-left: auto;
  font-size: 10px;
  font-weight: normal;
  color: var(--text-lighter);
}

.wf-stage-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-light);
}

.stage-save-after-result {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
}

.standalone-project-bar {
  padding: 12px 16px !important;
  margin-bottom: 0 !important;
  background: #f0f9ff;
  border-bottom: 1px solid #bae6fd;
}

.standalone-project-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.standalone-project-bar .form-select {
  max-width: 280px;
}

.standalone-project-hint {
  font-size: 12px;
  color: var(--text-lighter);
}

.wf-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}

.wf-panel-status {
  font-size: 10px;
  color: var(--text-lighter);
  font-weight: normal;
}

.wf-panel-actions {
  display: flex;
  gap: 4px;
}

.wf-panel-body .page-content {
  padding: 10px 12px;
  max-width: none;
}

.wf-panel-body .page-section {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  box-shadow: none;
  border: 1px solid var(--border-light);
}

.wf-panel-body .page-section-title {
  font-size: 13px;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.wf-panel-body .form-group {
  margin-bottom: 12px;
}

.wf-panel-body .form-label {
  font-size: 12px;
}

.wf-panel-body .form-input,
.wf-panel-body .form-textarea,
.wf-panel-body .form-select {
  padding: 7px 10px;
  font-size: 12px;
}

.wf-panel-body .form-textarea {
  min-height: 64px;
}

.wf-panel-body .btn-group {
  margin-top: 12px;
  flex-wrap: wrap;
}

.wf-panel-body .btn {
  padding: 6px 12px;
  font-size: 12px;
}

.wf-content-stash {
  display: none;
}

.wf-summary {
  padding: 14px;
  font-size: 12px;
  line-height: 1.65;
}

.wf-muted {
  color: var(--text-lighter);
}

.client-enter-workspace {
  margin-left: 8px;
}
