* { box-sizing: border-box; margin: 0; padding: 0; }

/* ============ 设计系统：CSS 变量 ============ */
:root {
  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* 主色（和 Tailwind 对齐） */
  --color-pass: #10b981;    /* emerald-500 */
  --color-fail: #ef4444;    /* red-500 */
  --color-warn: #f59e0b;    /* amber-500 */
  --color-info: #3b82f6;    /* blue-500 */
  --color-primary: #6366f1; /* indigo-500 */

  /* 文字层级 */
  --text-1: #1f2937;  /* 主文字 */
  --text-2: #374151;
  --text-3: #6b7280;  /* 次要 */
  --text-4: #9ca3af;  /* 三级 */
  --text-5: #d1d5db;  /* 分隔符/占位 */

  /* 边框 */
  --border-light: #f3f4f6;
  --border-default: #e5e7eb;
  --border-dark: #d1d5db;

  /* 投影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  font-size: 14px;
}

/* ============ 通用状态：加载 / 空 / 错误 ============ */
.app-loading,
.app-empty,
.app-error {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-4);
  font-size: 13px;
  line-height: 1.7;
}
.app-loading .app-status-icon {
  display: inline-block;
  width: 22px; height: 22px;
  border: 2px solid var(--border-default);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: app-spin 0.7s linear infinite;
  margin-bottom: 10px;
}
.app-empty .app-status-icon,
.app-error .app-status-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
  opacity: .55;
}
.app-error { color: var(--color-fail) }
@keyframes app-spin { to { transform: rotate(360deg) } }

/* 骨架占位条：给列表加载用 */
.skeleton-row {
  height: 14px;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% 0 }
  100% { background-position: -200% 0 }
}

/* ============ 通用悬浮 tooltip ============ */
.app-tooltip {
  display: none;
  position: absolute;
  background: #1f2937;
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  pointer-events: none;
  min-width: 180px;
  max-width: 420px;
  white-space: normal;
}
.app-tooltip code {
  background: rgba(255,255,255,0.08);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.app-tooltip-trigger { position: relative }
.app-tooltip-trigger:hover > .app-tooltip { display: block }

/* ============ 侧边栏布局 ============ */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.brand-text {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.sidebar-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}
.nav-item.active {
  background: rgba(99,102,241,0.2);
  color: #fff;
}
.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  color: currentColor;
  opacity: .85;
}
.nav-item.active .nav-icon { opacity: 1 }

/* 隐藏旧导航（兼容） */
.nav, .navbar { display: none; }

/* 主内容区 */
.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 0;
  min-height: 100vh;
}

/* 页面容器 */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 28px;
}

/* 通用卡片 */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* 徽章 */
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.badge-red  { background: #fef2f2; color: #dc2626; }
.badge-blue { background: #eef2ff; color: #6366f1; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-green { background: #ecfdf5; color: #059669; }

/* 聊天页面 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 52px);
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.message { display: flex; }
.message.user  { justify-content: flex-end; }
.message.assistant { justify-content: flex-start; }
.bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.message.user .bubble      { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-radius: 12px 12px 2px 12px; }
.message.assistant .bubble { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px 12px 12px 2px; }
.chat-input-area {
  padding: 16px 0 24px;
  display: flex;
  gap: 10px;
}
.chat-input-area textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}
.chat-input-area textarea:focus { border-color: #6366f1; }
.chat-input-area button {
  padding: 10px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  align-self: flex-end;
}

/* 配置页面 */
.config-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}
.config-nav {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.config-nav-item {
  padding: 11px 16px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}
.config-nav-item:last-child { border-bottom: none; }
.config-nav-item:hover { background: #fafafa; }
.config-nav-item.active { background: #f0f0f0; color: #1f2937; font-weight: 500; }
.config-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  min-height: 400px;
}

/* 表单 */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; }
.form-group label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #6366f1; }

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  transition: all 0.15s;
}
.btn:hover { background: #f9fafb; border-color: #d1d5db; }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-color: transparent; }
.btn-primary:hover { background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }

/* 执行中心 */
.execute-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  transition: grid-template-columns 0.3s ease;
}
.execute-layout.has-log {
  grid-template-columns: 240px 1fr 280px;
}
.execute-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}
.form-section { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 8px;
}
.form-section select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  user-select: none;
  white-space: nowrap;
}
.check-item:hover { background: #f3f4f6; }
.check-item input { cursor: pointer; outline: none; }
.btn-execute {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s;
}
.btn-execute:hover { box-shadow: 0 4px 12px rgba(99,102,241,0.35); transform: translateY(-1px); }
.btn-execute:disabled { background: #c7c7cc; cursor: not-allowed; box-shadow: none; transform: none; }

/* 用例列表 */
.execute-cases {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}
.cases-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.execute-case-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 560px;
}
.execute-case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
  gap: 8px;
}
.execute-case-item:hover { background: #fafafa; }

/* 日志面板 */
.execute-log-panel {
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  min-height: 500px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}
#log-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  font-family: "SF Mono", "Monaco", "Menlo", monospace;
  font-size: 12px;
  line-height: 1.8;
  background: #1e1e1e;
  color: #d4d4d4;
}

/* 用例管理 */
.upload-area { max-width: 600px; }
.upload-box {
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-box:hover { border-color: #6366f1; }
.upload-icon { font-size: 32px; color: #ccc; margin-bottom: 8px; }
.upload-text { font-size: 14px; color: #6b7280; }
.upload-hint { font-size: 12px; color: #bbb; margin-top: 8px; }

/* 生成用例卡片 */
.gen-case-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
}
.gen-case-card .case-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.gen-case-card .case-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #888;
  flex-wrap: wrap;
}

/* 报告页面 */
.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.report-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.report-status.pass { background: #10b981; }
.report-status.fail { background: #ef4444; }
.report-info { flex: 1; }
.report-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.report-meta { font-size: 12px; color: #888; }
.report-stats { text-align: right; font-size: 13px; }

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltip-text {
  visibility: hidden;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 100;
}
.tooltip:hover .tooltip-text { visibility: visible; }

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #bbb;
  font-size: 13px;
  gap: 8px;
}
.empty-state-icon { font-size: 36px; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ccc; }

/* ============================================================
   用例管理页样式
   ============================================================ */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0;
}
.tab {
  padding: 8px 18px;
  border: none;
  background: none;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
}
.tab:hover { color: #1f2937; }
.tab.active { color: #6366f1; border-bottom-color: #6366f1; font-weight: 500; }
.tab.drag-over { background: #f0f0f0; border-radius: 4px; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.sub-tab {
  padding: 6px 16px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}
.sub-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-color: transparent; }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-header h3 {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}
.filters { display: flex; gap: 8px; align-items: center; }
.filters select {
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.generate-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.generate-input {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}
.generate-result {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.input-type-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.input-type-tab {
  padding: 5px 14px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}
.input-type-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-color: transparent; }

.input-area textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  box-sizing: border-box;
}
.input-area textarea:focus { border-color: #6366f1; }

.btn-primary {
  padding: 8px 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-primary:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-cancel {
  padding: 8px 16px;
  background: #fff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.btn-cancel:hover { background: #f9fafb; }

.btn-sm {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
  transition: all 0.15s;
}
.btn-sm:hover { background: #f9fafb; border-color: #d1d5db; }
.btn-sm.btn-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-sm.btn-danger:hover { background: #fee2e2; }

.empty {
  text-align: center;
  color: #aaa;
  font-size: 13px;
  padding: 40px 0;
}

.case-list { display: flex; flex-direction: column; }
.case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.case-main { display: flex; align-items: center; gap: 8px; flex: 1; }
.case-meta { display: flex; gap: 8px; }

/* Dashboard */
.dash-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
}
.dash-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}
.dash-value {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
}
.dash-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
}
.dash-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

/* ============================================================
   配置管理页样式
   ============================================================ */
.card-list { display: flex; flex-direction: column; gap: 0; }

.card-group-label {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  margin-bottom: 10px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-fields {
  font-size: 13px;
  color: #555;
  line-height: 2;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-form {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.form-row label {
  width: 120px;
  flex-shrink: 0;
  color: #555;
  font-weight: 500;
}

.form-row input,
.form-row select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.form-row input:focus,
.form-row select:focus { border-color: #6366f1; }

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-left: 132px;
}

.pipeline-section {
  margin-bottom: 24px;
}

.pipeline-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.pipeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fff;
  font-size: 13px;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #e0e0e0;
  border-radius: 20px;
  transition: .2s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.toggle-switch input:checked + .toggle-slider { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

.timeout-label {
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeout-label input {
  padding: 3px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  text-align: center;
}

/* 配置卡片字段行 */
.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  padding: 3px 0;
}
.info-row span:first-child {
  color: #aaa;
  width: 80px;
  flex-shrink: 0;
}
.info-row code {
  font-family: monospace;
  font-size: 12px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  color: #333;
  word-break: break-all;
}
.status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.status-on  { background: #f0fff4; color: #389e0d; }
.status-off { background: #f3f4f6; color: #aaa; }

/* ============================================================
   配置管理细节修复
   ============================================================ */

/* 流水线配置 - 置信度行不换行 */
.pipeline-config .form-row label,
.add-form .form-row label {
  white-space: nowrap;
}

/* 流水线 runner 每项加卡片包裹感 */
.pipeline-runner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
  font-size: 13px;
  gap: 12px;
}
.pipeline-runner-row:hover { background: #fafafa; }

/* 超时输入行对齐 */
.timeout-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}
.timeout-label input {
  width: 56px;
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  text-align: center;
}

/* 客户端/产品线卡片内按钮间距 */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* 字段信息行间距 */
.info-row {
  padding: 4px 0;
  border-bottom: none;
}

/* 删除按钮 */
.btn-sm.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
  font-size: 12px;
}
.btn-sm.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* 流水线区块标题 */
.pipeline-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin: 16px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}

/* ============================================================
   config.html 专属样式补全
   ============================================================ */

.config-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.card-body { padding: 0; }

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge-green { background: #f0fff4; color: #389e0d; border-radius: 20px; font-size: 11px; padding: 2px 8px; font-weight: 500; }
.badge-gray  { background: #f3f4f6; color: #aaa;     border-radius: 20px; font-size: 11px; padding: 2px 8px; font-weight: 500; }
.badge-blue  { background: #e6f4ff; color: #1677ff;  border-radius: 20px; font-size: 11px; padding: 2px 8px; font-weight: 500; }
.badge-red   { background: #fff0f0; color: #c00;     border-radius: 20px; font-size: 11px; padding: 2px 8px; font-weight: 500; }

/* 流水线 runner 行 */
.runner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
  font-size: 13px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1f2937;
}

/* 流水线 section */
.pipeline-section {
  margin-bottom: 24px;
}

.pipeline-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* 置信度 label 不换行 */
.pipeline-section .form-row label {
  white-space: nowrap;
  min-width: 180px;
}

/* 删除按钮 */
.btn-sm.btn-danger {
  background: #fff0f0;
  color: #c00;
  border: 1px solid #fcc;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.btn-sm.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
