/* 四维创界 - 组件库
 * Button / Input / Card / Panel / Table / Modal / Nav / Drawer / Avatar / Badge 等
 * 所有组件遵循统一 token,禁止使用 !important 覆盖
 */

/* ========== Button ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-5);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

/* 提升 .hidden 优先级以覆盖 .btn 的 display:inline-flex(同 .dialog-backdrop.hidden 约定) */
.btn.hidden,
.hidden.btn {
  display: none;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* 按钮变体 */
.btn-primary {
  background: var(--primary-500);
  color: var(--text-on-primary);
  border-color: var(--primary-500);
}
.btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--text-on-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--primary-600);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
}

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

.btn-danger {
  background: var(--danger);
  color: var(--text-on-primary);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: var(--text-on-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent-500);
  color: #041113;
  border-color: var(--accent-500);
}
.btn-accent:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 按钮尺寸 */
.btn-sm {
  min-height: 36px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}
.btn-lg {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}
.btn-icon {
  width: 40px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 32px;
}

/* 按钮块级 */
.btn-block {
  display: flex;
  width: 100%;
}

/* 加载状态 */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  color: var(--text-on-primary);
}

/* ========== Input / Textarea / Select ========== */
.input,
.textarea,
.select {
  width: 100%;
  min-height: 42px;
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.textarea {
  height: auto;
  min-height: 96px;
  padding: var(--space-3);
  line-height: var(--leading-normal);
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-tertiary);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  background: var(--bg-subtle);
  color: var(--text-disabled);
  cursor: not-allowed;
}

.input.is-error,
.textarea.is-error {
  border-color: var(--danger);
}
.input.is-error:focus,
.textarea.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* 表单组 */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-2);
}

/* 输入框前缀/后缀 */
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .input {
  border-radius: 0;
}
.input-group .input:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.input-group .input:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.input-prefix,
.input-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}
.input-prefix {
  border-right: none;
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.input-suffix {
  border-left: none;
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* ========== Card / Panel ========== */
.card {
  background: rgba(18, 34, 31, 0.92);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: var(--space-6);
}

.card-hover {
  transition: all var(--transition-fast);
}
.card-hover:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
}
.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.card-body {
  padding: var(--space-6);
}
.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ========== Badge / Tag / Chip ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.badge-primary {
  background: var(--primary-50);
  color: var(--primary-700);
}
.badge-success {
  background: var(--success-bg);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-accent {
  background: var(--accent-50);
  color: var(--accent-700);
}

/* 带状态点的徽章(配合 base.css .status-pulse 实现呼吸动效) */
.badge-dot {
  padding-left: var(--space-3);
}
.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}
.badge-dot.is-live::before {
  position: relative;
  color: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: status-pulse 2s var(--ease-in-out) infinite;
}
.badge-dot.is-busy::before {
  color: var(--warning);
}
.badge-dot.is-offline::before {
  color: var(--text-tertiary);
}

/* Pill(胶囊标签,可选中) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.pill:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
}
.pill.is-active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--text-on-primary);
}

/* ========== Avatar ========== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}
.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Table ========== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table thead th {
  text-align: left;
  padding: 14px var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.table tbody td {
  padding: 14px var(--space-4);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr {
  transition: background var(--transition-fast);
}
.table tbody tr:hover {
  background: var(--bg-subtle);
}

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-6);
}
.pager-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--primary-300);
  color: var(--primary-600);
}
.pager-btn.is-active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--text-on-primary);
}
.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: var(--z-modal-overlay);
  animation: fadeIn var(--transition-base) var(--ease-out);
}
.modal-panel {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: fadeInUp var(--transition-slow) var(--ease-out);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.modal-panel.modal-lg { max-width: 640px; }
.modal-panel.modal-xl { max-width: 800px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}
.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.modal-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
}

/* ========== Empty State ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: var(--text-tertiary);
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
}
.empty-state-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 320px;
}

/* ========== Spinner ========== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-default);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* ========== Divider ========== */
.divider {
  height: 1px;
  background: var(--border-default);
  border: none;
  margin: var(--space-6) 0;
}
.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--border-default);
  margin: 0 var(--space-4);
}

/* ========== Tooltip(简易) ========== */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: var(--space-1) var(--space-2);
  background: var(--text-primary);
  color: var(--bg-elevated);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: var(--z-dropdown);
}
.tooltip:hover::after {
  opacity: 1;
}

/* ========== Alert / Notice ========== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border-default);
}
.tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
}
.tab:hover {
  color: var(--text-secondary);
}
.tab.is-active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-500);
}

/* ========== 生成页共享组件(simple_generate + video_generate 共用) ========== */

/* 抽屉滚动锁定 */
body.drawer-open {
  overflow: hidden;
}

/* 历史记录操作行 */
.drawer-history-actions {
  display: flex;
  gap: var(--space-2);
}

/* 账户菜单 */
.account-menu-row:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.account-menu-divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-1) 0;
}

/* 缩略图 */
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb button:hover {
  background: var(--danger);
}

/* 历史控制栏 */
.history-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* 状态行变体 */
.status-line.ok {
  color: var(--success);
}
.status-line.bad {
  color: var(--danger);
}

/* 生成栏响应式 */
@media (max-width: 768px) {
  .generate-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* 仪表盘/管理后台共享组件 */
.dash-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.side-panel h2 {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-default);
}

.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  word-break: break-word;
}

.notice.ok {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.2);
}

.notice.bad {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.2);
}

/* 高特异度覆盖:确保 .hidden 可隐藏 flex/inline-flex 组件 */
.account-popover.hidden {
  display: none;
}

/* ========== 数据展示与密度(Product register: 克制的信息密度工具) ==========
 * 暗青色主题:用 teal/cyan 强化数据焦点
 * - stat-mini: 卡片角标迷你统计(数字 + 标签)
 * - progress-bar: 线性进度条(青色填充,传达完成度)
 * - metric-row: 水平指标行(标签 + 数值 + 趋势)
 * - density-compact: 紧凑密度修饰类(用于表格/列表)
 */

/* 迷你统计角标(用于卡片右上角的小型指标) */
.stat-mini {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.1;
}
.stat-mini__value {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-mini__label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}
.stat-mini__delta {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
}
.stat-mini__delta--up   { color: var(--success); }
.stat-mini__delta--down { color: var(--danger); }

/* 线性进度条(青色填充,传达任务完成度) */
.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress, 0%);
  background: linear-gradient(
    90deg,
    var(--primary-600),
    var(--primary-400)
  );
  border-radius: inherit;
  transition: width var(--transition-slow) var(--ease-out);
}
.progress-bar__fill--accent {
  background: linear-gradient(
    90deg,
    var(--accent-600),
    var(--accent-400)
  );
}
.progress-bar__fill--indeterminate {
  width: 40%;
  animation: progress-indeterminate 1.4s var(--ease-in-out) infinite;
}
@keyframes progress-indeterminate {
  0%   { left: -40%; }
  100% { left: 100%; }
}

/* 水平指标行(标签 + 数值 + 可选趋势) */
.metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.metric-row:last-child {
  border-bottom: none;
}
.metric-row__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.metric-row__value {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* 紧凑密度修饰类(应用于 .table 或列表,减小行高与 padding) */
.density-compact .table tbody td,
.density-compact .table thead th {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.density-compact .table thead th {
  font-size: var(--text-xs);
}
.density-compact .badge {
  height: 18px;
  font-size: 0.6875rem;
}

/* 密度切换器(标签式,用于表格/列表上方) */
.density-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.density-toggle__option {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.density-toggle__option:hover {
  color: var(--text-secondary);
}
.density-toggle__option.is-active {
  background: var(--bg-elevated);
  color: var(--primary-300);
  box-shadow: var(--shadow-xs);
}

/* ========== 结果区视觉重心(PRODUCT.md 强制: 右侧结果区必须是页面视觉重心)
 * 借鉴 musegate: 比其他面板更深一层 + 更强边框,形成视觉凹陷感
 * 应用为修饰类: .studio-section.studio-result 或 .panel.studio-result */
.studio-result {
  background: var(--bg-base);
  border-color: var(--border-strong);
}
.studio-result .studio-section-header,
.studio-result .panel-head {
  border-bottom-color: var(--border-strong);
}
/* 结果计数强化:用主色强调当前生成数量 */
.studio-result .history-controls #resultCount {
  color: var(--primary-300);
  font-weight: var(--font-weight-medium);
}
.studio-result .history-controls #resultElapsed {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ========== 任务链路步骤指示器(借鉴 musegate 产品功能模块分区)
 * 合规性: taste-skill §9 允许 "section IS a sequence" 时使用编号,
 * 任务链路是真实序列(上传→简报→生成),非装饰性编号 eyebrow */
.task-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin: 0 auto var(--space-4);
  max-width: var(--content-max-width);
}
.task-stepper__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.task-stepper__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.task-stepper__item.is-active {
  color: var(--text-primary);
}
.task-stepper__item.is-active .task-stepper__num {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--text-on-primary);
}
.task-stepper__item.is-done .task-stepper__num {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}
.task-stepper__connector {
  flex: 1;
  height: 1px;
  background: var(--border-default);
  min-width: var(--space-4);
}

/* ========== 参数面板分组(借鉴 musegate 产品功能卡分区)
 * 每组独立视觉单元,顶部细分隔线(非 side-stripe,是结构分隔) */
.param-group {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-subtle);
}
.param-group:first-child {
  border-top: none;
  padding-top: 0;
}
.param-group:last-child {
  padding-bottom: 0;
}
.param-group .mini-heading {
  margin-bottom: var(--space-3);
}
