/* ================================================================
   橙卿运营工具箱 V3 - Premium Style System
   ================================================================ */

/* ===== Design Tokens - 三色系统 ===== */
:root {
  /* 主色 - 橙色（60% 比例，用于主要按钮、选中态） */
  --brand: #ff6b35;
  --brand-hover: #e55a2b;
  --brand-light: #fff5f0;

  /* 辅助色 - 蓝色（30% 比例，用于次要操作、信息提示） */
  --secondary: #4a90d9;
  --secondary-hover: #3a7bc8;
  --secondary-light: #f0f5ff;

  /* 点缀色 - 绿色（10% 比例，仅用于成功状态、同步飞书） */
  --accent: #52c41a;
  --accent-hover: #45a818;
  --accent-light: #f6ffed;

  /* Neutral - 灰阶 */
  --gray-50:  #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-300: #d9d9d9;
  --gray-400: #bfbfbf;
  --gray-500: #8c8c8c;
  --gray-600: #595959;
  --gray-700: #434343;
  --gray-800: #262626;
  --gray-900: #1f1f1f;

  /* 危险色 - 仅用于删除等危险操作 */
  --danger: #ff4d4f;
  --danger-hover: #d9363e;
  --danger-light: #fff1f0;

  /* Sidebar */
  --sidebar-bg:       #0f1420;
  --sidebar-hover:    rgba(255,255,255,.05);
  --sidebar-active:   rgba(255,107,53,.12);
  --sidebar-text:     #9ca3af;
  --sidebar-text-hi:  #f3f4f6;
  --sidebar-border:   rgba(255,255,255,.06);
  --sidebar-width:    220px;
  --sidebar-collapsed: 60px;

  /* Surface */
  --surface:       #ffffff;
  --surface-bg:    #f5f5f5;
  --border:        #e8e8e8;
  --border-light:  #f3f4f6;

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadow - 精简阴影 */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.06);
  --shadow-lg:  0 12px 24px rgba(0,0,0,.08);

  /* Motion */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-fast: .15s;
  --dur-normal: .2s;

  /* Font */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ===== Reset ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-sans);
  background: var(--surface-bg);
  color: var(--gray-800);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* Scrollbar - 更精致 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
.sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }
.sidebar ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }
.log-dark::-webkit-scrollbar-thumb { background: #2a3548; }
.log-dark::-webkit-scrollbar-thumb:hover { background: #3a4a60; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: all var(--dur-slow) var(--ease-out);
  z-index: 100;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.04);
  position: relative;
}
/* 侧边栏微妙渐变底纹 */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,.04) 0%, transparent 60%);
  pointer-events: none;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-tag,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .sidebar-version { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 0; }

/* Sidebar Header - 更精致 */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  position: relative;
  z-index: 1;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--brand-gradient);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(234,88,12,.35), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
/* Logo 光泽效果 */
.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(135deg, rgba(255,255,255,.25) 0%, transparent 50%);
  pointer-events: none;
}
.logo-icon svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.15));
}
.logo-text { display: flex; flex-direction: column; white-space: nowrap; }
.logo-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.logo-ver {
  font-size: 10px;
  color: var(--sidebar-text);
  margin-top: 2px;
  font-weight: 500;
  opacity: .7;
}

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; position: relative; z-index: 1; }
.nav-group-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--sidebar-text);
  padding: 16px 12px 8px;
  letter-spacing: 1.5px;
  font-weight: 600;
  opacity: .5;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--sidebar-text);
  font-size: 13px;
  transition: all var(--dur-fast) var(--ease-smooth);
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hi);
}
.nav-item.active {
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--brand-shadow), inset 0 1px 0 rgba(255,255,255,.15);
}
.nav-item.active .nav-icon { filter: brightness(1.1); }
.nav-item.disabled { opacity: .4; cursor: default; pointer-events: none; }
.nav-icon { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.nav-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.06);
  color: var(--sidebar-text);
  margin-left: auto;
  font-weight: 500;
  letter-spacing: .3px;
  border: 1px solid rgba(255,255,255,.06);
}

/* Sidebar Bottom */
.sidebar-bottom {
  padding: 6px 8px 10px;
  border-top: 1px solid var(--sidebar-border);
  position: relative;
  z-index: 1;
}
.sidebar-version {
  text-align: center;
  font-size: 10px;
  color: var(--sidebar-text);
  padding: 8px 0 2px;
  font-weight: 500;
  opacity: .4;
  letter-spacing: .5px;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: var(--surface-bg);
}
/* 主内容区微妙点状纹理 */
.main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--gray-300) .5px, transparent .5px);
  background-size: 24px 24px;
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}

/* Topbar - 更精致 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 50px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.02);
  position: relative;
  z-index: 2;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.btn-icon {
  font-size: 16px;
  color: var(--gray-400);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-smooth);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.topbar-module {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: .2px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
  animation: statusPulse 2.5s ease infinite;
}
@keyframes statusPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(5,150,105,.12); }
  50% { box-shadow: 0 0 0 6px rgba(5,150,105,.04); }
}
.status-text { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.topbar-time {
  font-size: 12px;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: .3px;
}

/* Page Container */
.page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}
.page { display: none; }
.page.active {
  display: flex;
  flex-direction: column;
  animation: pageIn var(--dur-slow) var(--ease-out);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bottom Bar */
.bottom-bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--gray-400);
  flex-shrink: 0;
  letter-spacing: .8px;
  position: relative;
  z-index: 2;
}

/* ===== Cards - 玻璃质感 ===== */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow var(--dur-normal) var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .3px;
}
.card-body { padding: 20px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.hint-text { font-size: 12px; color: var(--gray-400); }

/* ===== Buttons - 更精致 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease-smooth);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: .2px;
}
/* 按钮光泽扫过效果 */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transition: left .4s var(--ease-smooth);
  pointer-events: none;
}
.btn:hover::before { left: 100%; }
.btn:active { transform: scale(.98); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 10px 28px; font-size: 14px; border-radius: var(--r-lg); font-weight: 600; letter-spacing: .3px; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.btn-outline {
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  background: var(--surface);
}
.btn-outline:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); box-shadow: 0 2px 6px rgba(249,115,22,.08); }

.btn-danger-outline {
  border: 1px solid #fecaca;
  color: var(--danger);
  background: var(--surface);
}
.btn-danger-outline:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-ai {
  background: var(--ai-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(99,102,241,.2);
}
.btn-ai:hover { box-shadow: 0 4px 16px rgba(99,102,241,.3); transform: translateY(-1px); }

.btn-success {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}
.btn-success:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-success:disabled, .btn-pink:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-pink {
  background: linear-gradient(135deg, #9f1239, #be123c, #f43f5e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(190,18,60,.2);
  border: 1px solid rgba(255,255,255,.1);
}
.btn-pink:hover { box-shadow: 0 4px 16px rgba(190,18,60,.28); transform: translateY(-1px); }

.btn-gray {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.btn-gray:hover { background: var(--gray-200); color: var(--gray-700); }

.btn-ai-purple {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.2);
  border: none;
}
.btn-ai-purple:hover { box-shadow: 0 4px 16px rgba(124,58,237,.3); transform: translateY(-1px); }

.btn-text {
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.btn-text:hover { background: var(--brand-50); }

.btn-block { width: 100%; margin-top: 8px; }

/* ===== Forms - 更精致 ===== */
.form-input, .form-select {
  padding: 9px 36px 9px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  transition: all var(--dur-fast) var(--ease-smooth);
  background: var(--surface);
  color: var(--gray-800);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  min-width: 140px;
}
.form-input:hover, .form-select:hover { 
  border-color: var(--gray-300);
  background-color: var(--gray-50);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1), 0 2px 8px rgba(249,115,22,.08);
  background-color: var(--surface);
}
.form-select option {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--gray-800);
  background: var(--surface);
}
.form-select option:hover {
  background: var(--gray-100);
}
.form-select option:checked {
  background: linear-gradient(to bottom, var(--brand-50) 0%, var(--brand-100) 100%);
  color: var(--brand-700);
  font-weight: 500;
}
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  font-size: 13px;
  resize: none;
  transition: all var(--dur-fast) var(--ease-smooth);
  line-height: 1.7;
  font-family: inherit;
  background: var(--surface);
  color: var(--gray-800);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.form-textarea:hover { border-color: var(--gray-300); }
.form-textarea::placeholder { color: var(--gray-400); }
.field-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--gray-300);
  border-radius: var(--r-full);
  transition: var(--dur-normal) var(--ease-smooth);
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 15px; width: 15px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--dur-normal) var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.switch input:checked + .switch-slider { background: var(--brand-500); }
.switch input:checked + .switch-slider::before { transform: translateX(17px); }

/* 小开关：控制区里紧凑显示 */
.switch-sm { width: 32px; height: 18px; }
.switch-sm .switch-slider::before { width: 14px; height: 14px; left: 2px; bottom: 2px; }
.switch-sm input:checked + .switch-slider::before { transform: translateX(14px); }

/* Radio & Checkbox */
.radio-label, .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background var(--dur-fast);
}
.radio-label:hover, .checkbox-label:hover { background: var(--gray-50); }
.radio-label input, .checkbox-label input { accent-color: var(--brand-500); }

/* ===== Template Bar ===== */
.template-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.template-bar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.template-bar-right { display: flex; align-items: center; gap: 6px; }

/* ===== Tab Bar - 现代设计 ===== */
.tab-bar {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.tab-item {
  flex: 1;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--dur-normal) var(--ease-out);
  text-align: center;
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
}
.tab-item:hover {
  color: var(--gray-700);
  background: var(--gray-50);
}
.tab-item.active {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-light);
}
.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
}

/* ===== Fission Workspace ===== */
.fission-workspace { display: flex; gap: 14px; flex: 1; min-height: 0; }
.fission-left, .fission-right { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.fission-textarea {
  min-height: 200px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}
/* 左侧素材输入框：撑满卡片剩余空间 */
.card-body-flex > .fission-textarea:first-child { flex: 1; }
/* 右侧裂变结果框：不拉伸，内容少时自动压缩，最大 320px 防过高挤压下方调优区 */
.card-body-flex > .fission-textarea[id$="Result"] {
  flex: 0 0 auto;
  min-height: 100px;
  max-height: 320px;
}
.fission-controls { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; margin-top: 14px; align-items: center; }
.control-row { display: flex; align-items: center; gap: 10px; }
.result-count {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--gray-50);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
}

/* Section Dots */
.section-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.dot-orange { background: var(--brand); }
.dot-green { background: var(--success); }

/* Link Button */
.btn-link {
  background: none;
  border: none;
  color: var(--info);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 12px;
  transition: color var(--dur-fast);
}
.btn-link:hover {
  color: var(--info-dark);
  text-decoration: underline;
}

/* AI Header */
.ai-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.ai-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}
.result-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Tab Content */
.tab-content { display: none; flex: 1; min-height: 0; }
.tab-content.active { display: flex; flex-direction: column; }

/* Template Header */
.template-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.template-title { font-size: 14px; font-weight: 600; color: var(--gray-800); margin: 0; }
.template-subtitle { font-size: 12px; color: var(--gray-400); }
.template-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Utility */
.mb-3 { margin-bottom: 12px; }

/* Image Fission Controls */
.img-fission-controls { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.img-fission-controls .control-row.full { flex-direction: column; align-items: stretch; }
.size-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gray-100);
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  border: 1px solid var(--border-subtle);
}

/* Image Upload Area */
.image-upload-area {
  width: 100%;
  min-height: 100px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth);
  background: var(--gray-50);
}
.image-upload-area:hover { border-color: var(--brand-400); background: var(--brand-50); }
.upload-placeholder { text-align: center; padding: 16px; }
.upload-icon { font-size: 24px; color: var(--gray-400); display: block; margin-bottom: 4px; }
.upload-text { font-size: 13px; color: var(--gray-600); display: block; }
.upload-hint { font-size: 11px; color: var(--gray-400); display: block; margin-top: 2px; }

/* Image Result Placeholder */
.image-result-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--gray-50);
  border-radius: var(--r-lg);
  border: 1px dashed var(--gray-200);
}
.placeholder-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.5; }
.placeholder-text { font-size: 13px; color: var(--gray-400); margin: 0; }

/* AI Tuning */
.ai-tuning {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}
.ai-tuning-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--ai-gradient);
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 1px 4px rgba(99,102,241,.2);
}
.ai-label { font-size: 12px; color: var(--gray-400); }
.ai-input-row { display: flex; gap: 6px; }
.ai-input { flex: 1; }

/* ===== Auto Listing ===== */
.stats-row { display: flex; gap: 14px; margin-bottom: 14px; }
.mini-stat-card {
  flex: 1;
  background: linear-gradient(180deg, var(--surface) 0%, var(--gray-50) 100%);
  border-radius: var(--r-xl);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: all var(--dur-normal) var(--ease-smooth);
}
.mini-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mini-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gray-200);
}
.mini-stat-card.success::before { background: linear-gradient(90deg, #047857, #10b981); }
.mini-stat-card.danger::before  { background: linear-gradient(90deg, #b91c1c, #f87171); }
.mini-stat-card:first-child::before { background: var(--brand-gradient); }
.mini-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.mini-stat-card.success .mini-stat-value { color: var(--success); }
.mini-stat-card.danger .mini-stat-value  { color: var(--danger); }
.mini-stat-label { font-size: 12px; color: var(--gray-400); font-weight: 500; letter-spacing: .3px; }

.listing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.listing-toolbar-left { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.listing-toolbar-right { display: flex; align-items: center; gap: 6px; }

.listing-workspace { display: flex; gap: 14px; flex: 1; min-height: 0; }
.listing-left, .listing-right { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Data Table - 更精致 */
.data-table { width: 100%; font-size: 13px; }
.data-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-500);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--gray-700);
  font-size: 13px;
}
.data-table tbody tr { transition: background var(--dur-fast); }
.data-table tbody tr:hover { background: var(--brand-50); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table input[type="checkbox"] { accent-color: var(--brand-500); width: 15px; height: 15px; }

/* Log Dark - 终端质感 */
.log-dark {
  background: #0a0e17;
  padding: 16px;
  height: 100%;
  min-height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  position: relative;
}
/* 日志区域微妙网格底纹 */
.log-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 27px,
    rgba(255,255,255,.015) 27px,
    rgba(255,255,255,.015) 28px
  );
  pointer-events: none;
}
.log-dark > * { position: relative; z-index: 1; }
.log-line { display: flex; gap: 8px; }
.log-dark .log-time { color: #3d4f6f; flex-shrink: 0; }
.log-dark .log-msg  { color: #a8b8d0; word-break: break-all; }
.log-dark .log-tag  { padding: 1px 5px; border-radius: 3px; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.log-entry { display: flex; gap: 8px; align-items: flex-start; }
.log-entry.info .log-tag    { background: var(--info); color: #fff; }
.log-entry.success .log-tag { background: var(--success); color: #fff; }
.log-entry.warn .log-tag    { background: var(--warning); color: #fff; }
.log-entry.error .log-tag   { background: var(--danger); color: #fff; }

/* Listing Footer */
.listing-footer {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 0;
}

/* ===== Activity Center ===== */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.activity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-smooth);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
/* 活动卡片左侧彩色条 */
.activity-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gray-200);
  border-radius: 0 2px 2px 0;
  transition: all var(--dur-normal);
}
.activity-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.activity-card:hover::before {
  width: 4px;
  background: var(--brand-gradient);
}
.activity-card.disabled { opacity: .45; cursor: default; pointer-events: none; }
.activity-card.disabled:hover { border-color: var(--border-subtle); box-shadow: none; transform: none; }
.activity-card.disabled::before { background: var(--gray-200); }
.activity-icon {
  width: 46px; height: 46px;
  background: var(--gray-50);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  transition: all var(--dur-normal);
}
.activity-card:not(.disabled):hover .activity-icon {
  background: var(--brand-50);
  border-color: var(--brand-200);
}
.activity-info { flex: 1; min-width: 0; }
.activity-info h4 { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; letter-spacing: .2px; }
.activity-info p  { font-size: 12px; color: var(--gray-400); line-height: 1.5; }

/* ===== Placeholder Page ===== */
.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  color: var(--gray-400);
  text-align: center;
  padding: 40px 20px;
}
.placeholder-icon {
  width: 84px; height: 84px;
  background: linear-gradient(145deg, #f8f9fb 0%, #eef0f4 100%);
  border-radius: var(--r-2xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin-bottom: 4px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.8);
}
.placeholder-page h2 { font-size: 18px; font-weight: 600; color: var(--gray-600); letter-spacing: .3px; }
.placeholder-page p  { font-size: 13px; max-width: 320px; line-height: 1.7; color: var(--gray-400); }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(5,150,105,.12); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(217,119,6,.12); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(220,38,38,.12); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(37,99,235,.12); }

/* ===== Toast - 玻璃质感 ===== */
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 11px 20px;
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--dur-slow) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  letter-spacing: .2px;
}
.toast.success { background: rgba(5,150,105,.92); }
.toast.error   { background: rgba(220,38,38,.92); }
.toast.info    { background: rgba(37,99,235,.92); }
.toast.warning { background: rgba(217,119,6,.92); }
@keyframes toastIn  { from { transform: translateX(100%) scale(.92); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0) scale(1); opacity: 1; } to { transform: translateX(100%) scale(.92); opacity: 0; } }

/* ===== Layout Helpers ===== */
.card-body-compact { padding: 12px 20px; }
.card-flex { flex: 1; display: flex; flex-direction: column; }
.card-body-flex { flex: 1; display: flex; flex-direction: column; }
.card-body-table { flex: 1; padding: 0; overflow: auto; }
.card-body-log { flex: 1; padding: 0; }

/* ===== Fission Sizing ===== */
.select-template { width: 170px; }
.input-keyword  { width: 200px; }
.input-count    { width: 80px; }
.col-check      { width: 36px; }
.col-category   { width: 120px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar-width)); z-index: 200; }
  .sidebar.mobile-open { left: 0; box-shadow: 4px 0 32px rgba(0,0,0,.5); }
  .fission-workspace, .listing-workspace { flex-direction: column; }
  .stats-row { flex-wrap: wrap; }
  .mini-stat-card { min-width: calc(50% - 8px); }
  .template-bar { flex-direction: column; align-items: stretch; }
  .template-bar-right { justify-content: flex-start; flex-wrap: wrap; }
  .listing-toolbar { flex-direction: column; align-items: stretch; }
  .activity-grid { grid-template-columns: 1fr; }
  .page-container { padding: 14px 16px; }
  .topbar { padding: 0 16px; }
}

/* ===== 裂变按钮容器 ===== */
.fission-btn-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  margin-bottom: 12px;
}

.fission-btn-container .btn {
  width: auto;
  min-width: 96px;        /* 固定最小宽度，防止左侧状态文字变化时按钮被挤得左右抖动 */
  padding: 8px 20px;
  font-size: 14px;
}

/* 裂变状态条：按钮左侧空白区，替代右上角 toast */.fission-status {
  flex: 1;
  min-width: 0;          /* flex 子元素默认 min-width:auto，不加这行长文本会撑开父列、省略号失效 */
  max-width: 100%;
  align-self: center;
  text-align: right;
  margin-right: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s ease;
}
.fission-status.is-running { color: var(--brand); animation: fissionPulse 1.2s ease-in-out infinite; }
.fission-status.is-success { color: var(--accent); animation: none; }
.fission-status.is-error { color: var(--danger); animation: none; }
.fission-status.is-warn { color: #d98f0e; animation: none; }

/* 模板搜索框：放大镜图标 + 限定宽度 */
.search-wrap { position: relative; flex: 0 1 340px; min-width: 200px; display: flex; align-items: center; }
.search-wrap .search-icon { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--gray-400); pointer-events: none; flex-shrink: 0; }
.search-wrap input { width: 100%; padding-left: 30px; }

/* 旧版本服务警告横幅 */
.version-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  background: var(--danger-light); color: var(--danger);
  border-bottom: 1px solid var(--danger);
  padding: 10px 16px; font-size: 13px; font-weight: 600; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.version-banner b { color: var(--danger-hover); }
.version-banner span { margin: 0 8px; }
.version-restart-btn {
  margin: 0 8px; padding: 4px 16px; border: none; border-radius: 6px;
  background: var(--danger); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.version-restart-btn:hover { background: var(--danger-hover); }
.version-restart-btn:disabled { opacity: .6; cursor: default; }
.version-banner-hint { font-size: 12px; font-weight: 500; opacity: .75; }

/* 远程新版本提示横幅（红色，醒目提醒运营点击更新） */
.update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  background: var(--danger-light); color: var(--danger);
  border-bottom: 1px solid var(--danger);
  padding: 10px 16px; font-size: 13px; font-weight: 600; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.update-banner b { color: var(--danger-hover); }
.update-banner span { margin: 0 8px; }
.update-apply-btn {
  margin: 0 8px; padding: 4px 16px; border: none; border-radius: 6px;
  background: var(--danger); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.update-apply-btn:hover { background: var(--danger-hover); }
.update-apply-btn:disabled { opacity: .6; cursor: default; }
@keyframes fissionPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* ===== 文本框和按钮并排布局 ===== */
.textarea-btn-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.textarea-btn-row .fission-textarea {
  flex: 1;
  min-height: 200px;
}

.textarea-btn-row .fission-btn-container {
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
  padding-top: 0;
}

/* ===== 同步飞书按钮加载状态 ===== */
.btn-success.syncing {
  pointer-events: none;
  opacity: 0.8;
}

.btn-success.syncing::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 控制行按钮布局 ===== */
.control-row-btn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.control-row-btn .btn {
  width: auto;
  padding: 8px 20px;
}

/* ===== 活动弹窗（网页版新增） ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--gray-800);
}

.modal-subtitle {
  color: var(--gray-500);
  font-size: 12px;
  margin: 0 0 12px;
}

.modal-log {
  height: 220px;
  overflow-y: auto;
  margin-top: 6px;
  border-radius: 8px;
}

.log-msg.log-success { color: #52c41a; }
.log-msg.log-error { color: #ff4d4f; }

/* ===== 选择填入弹窗（复刻 exe 样式） ===== */
.modal-card-sm {
  width: 440px;
  padding: 0;
  overflow: hidden;
}

.modal-header-fill {
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 14px 20px;
}

.modal-body {
  padding: 16px 24px 12px;
}

.fill-item-label {
  color: #6b7280;
  font-size: 10px;
}

.fill-prompt {
  color: #374151;
  font-size: 11px;
  margin: 12px 0 8px;
}

.fill-quick-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.fill-quick-btn {
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-size: 10px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.fill-quick-btn:hover {
  background: #e2e8f0;
  color: var(--brand);
}

.fill-entry-outer {
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 1px;
}

.fill-entry {
  width: 100%;
  border: none;
  outline: none;
  font-size: 12px;
  padding: 10px 12px;
  color: #111827;
  box-sizing: border-box;
}

.fill-hint {
  color: #9ca3af;
  font-size: 9px;
  margin-top: 8px;
}

.modal-footer {
  background: #f8fafc;
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== 上架执行日志框：固定高度 + 内部滚动（不再无限拉长） ===== */
.listing-right .card-body-log {
  max-height: 520px;
  display: flex;
  flex-direction: column;
}

.listing-right .card-body-log .log-dark {
  height: 520px;
  max-height: 65vh;
  min-height: 200px;
  flex: 1;
  overflow-y: auto;
}


/* ===== 访问密码登录遮罩 ===== */
.login-mask {
  z-index: 9999;
  background: rgba(15, 18, 30, 0.62);
  backdrop-filter: blur(3px);
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px 32px 26px;
  width: 340px;
  max-width: calc(100vw - 40px);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.login-logo { font-size: 34px; margin-bottom: 8px; }
.login-title { font-size: 18px; font-weight: 700; color: #1c2333; }
.login-sub { font-size: 13px; color: #8a91a3; margin: 6px 0 18px; }
.login-input { width: 100%; text-align: center; letter-spacing: 1px; }
.login-error { min-height: 20px; font-size: 12px; color: #e04a5a; margin: 8px 0 10px; }
.login-pwd-wrap { position: relative; }
.login-pwd-wrap .login-input { padding-right: 42px; }
.login-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; cursor: pointer; opacity: .5;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: opacity .15s, background .15s; color: #5a6172;
}
.login-eye:hover { opacity: .95; background: rgba(0,0,0,.05); }
.login-eye svg { width: 18px; height: 18px; display: block; }



/* ===== DeepSeek 调优徽章（黑金会员风） ===== */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #3a3a3a 0%, #161616 55%, #000000 100%);
  border: 1px solid rgba(240, 195, 92, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  user-select: none;
}
.ai-badge-text {
  background: linear-gradient(90deg, #ffe9a8 0%, #f0c35c 50%, #d99b1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f0c35c; /* 不支持渐变文字时的回退色 */
}


/* ===== 开关/勾选 可见性修复：--brand-500 未定义导致 ON 态透明，统一改用醒目蓝 ===== */
.switch input:checked + .switch-slider { background: #2f7cf6; }
.radio-label input, .checkbox-label input { accent-color: #2f7cf6; }

/* ===== DeepSeek 调优常驻状态条（与裂变状态条同风格，不消失） ===== */
.ai-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-status.is-running { color: #2f7cf6; animation: fissionPulse 1.2s ease-in-out infinite; }
.ai-status.is-success { color: var(--accent); animation: none; }
.ai-status.is-error { color: var(--danger); animation: none; }
.ai-status.is-warn { color: #d98f0e; animation: none; }

/* 深度思考过程日志：折叠式显示在结果上方，实时流式显示 AI 思维链 */
.ai-thinking-log {
  display: none;
  height: 54px;               /* 固定 2~3 行，不挤压下方 textarea */
  overflow-y: auto;           /* 超出的可以滚回看 */
  margin-bottom: 8px;
  padding: 10px 12px;
  background: #f8f9fb;
  border: 1px dashed #d0d5dd;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.55;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
  color: #5a6470;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-thinking-log:not([data-empty="1"]) {
  display: block;
}
.ai-thinking-log::before {
  content: "AI 思考过程";
  display: block;
  font-family: inherit;
  font-size: 10px;
  color: #98a2b3;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}


/* ===== 选择填入弹窗：字号放大（原 9~12px 太小） ===== */
.modal-header-fill { font-size: 15px; }
.fill-item-label { font-size: 13px; color: #4b5563; }
.fill-prompt { font-size: 14px; }
.fill-quick-btn { font-size: 13px; padding: 7px 14px; }
.fill-entry { font-size: 15px; padding: 12px 14px; }
.fill-hint { font-size: 12px; color: #8a91a3; }


/* ===== 选品中心 ===== */
.promo-bar {
  margin: 4px 20px 0;
  padding: 10px 14px;
  background: #f0f6ff;
  border: 1px solid #d6e6ff;
  border-radius: 8px;
  font-size: 12px;
  color: #345;
  line-height: 1.7;
}
.sel-filters { padding: 12px 20px 4px; display: flex; flex-direction: column; gap: 10px; }
.sel-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-label { flex: 0 0 34px; font-size: 12px; font-weight: 700; color: #8a91a3; }
.sel-months, .sel-cats { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.sel-chip {
  border: 1px solid #e2e6ee;
  background: #f7f8fa;
  color: #556;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.sel-chip:hover { border-color: #2f7cf6; color: #2f7cf6; }
.sel-chip.active { background: #2f7cf6; border-color: #2f7cf6; color: #fff; font-weight: 600; }
.sel-month { padding: 3px 9px; font-size: 11px; }
.seg-group { display: inline-flex; border: 1px solid #e2e6ee; border-radius: 8px; overflow: hidden; }
.seg-btn {
  border: none;
  background: #fff;
  color: #556;
  padding: 6px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.seg-btn + .seg-btn { border-left: 1px solid #e2e6ee; }
.seg-btn.active { background: var(--brand); color: #fff; font-weight: 600; }
.sel-view-hint { font-size: 11px; color: #9aa1b0; }
.sel-search { flex: 0 1 240px; margin-left: auto; }
.sel-table-wrap { margin: 10px 12px 16px; overflow-x: auto; border: 1px solid #eef0f4; border-radius: 10px; }
.sel-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 860px; }
.sel-table th {
  position: sticky; top: 0;
  background: #f7f8fa;
  color: #8a91a3;
  font-weight: 600;
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #eef0f4;
  white-space: nowrap;
  z-index: 1;
}
.sel-table td { padding: 9px 10px; border-bottom: 1px solid #f3f4f7; vertical-align: top; }
.sel-table tr:hover td { background: #fafbff; }
.sel-cat { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sel-cat-main { background: #fff3ec; color: #e55a2b; }
.sel-cat-ext { background: #f1f2f4; color: #8a91a3; }
.sel-name { font-weight: 600; color: #2a2f3a; white-space: nowrap; }
.sel-tag-ever {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  background: linear-gradient(135deg, #3a3a3a, #000); color: #f0c35c;
  border-radius: 4px; font-size: 10px; font-weight: 700;
}
.sel-note { font-weight: 400; color: #9aa1b0; font-size: 11px; margin-top: 2px; white-space: normal; }
.sel-time { color: #556; white-space: nowrap; }
.sel-price { color: #e55a2b; font-weight: 600; white-space: nowrap; }
.sel-stars { color: #f0a020; letter-spacing: 1px; white-space: nowrap; }
.sel-kw { color: #667; max-width: 240px; }
.sel-ops { white-space: nowrap; }
.sel-op-btn {
  border: 1px solid #d9dde5; background: #fff; color: #556;
  border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; margin-right: 4px;
}
.sel-op-btn:hover { border-color: #2f7cf6; color: #2f7cf6; }
.sel-op-fill { border-color: #ffd9c7; color: #e55a2b; }
.sel-op-fill:hover { border-color: var(--brand); color: var(--brand); background: #fff5f0; }
.sel-empty { text-align: center; color: #9aa1b0; font-size: 13px; padding: 30px 0; }

/* ==================== 批量询盘 向导 ==================== */
.inquiry-wizard { padding: 28px 32px; }
.iq-step { margin-bottom: 30px; }
.iq-step-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; color: #1f2329; margin-bottom: 14px;
}
.iq-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; flex: none;
}
.iq-hint { font-size: 12px; color: #9aa1b0; font-weight: 400; }
.iq-count { font-size: 13px; color: var(--brand); font-weight: 500; }
.iq-checkall { margin-left: auto; font-size: 13px; font-weight: 400; color: #4e5566; cursor: pointer; user-select: none; }
.iq-checkall input { margin-right: 4px; accent-color: var(--brand); }

.iq-import-row { display: flex; gap: 18px; align-items: stretch; }
.iq-dropzone {
  flex: 1; border: 1.5px dashed var(--gray-300); border-radius: 12px;
  padding: 30px 20px; text-align: center; color: #8a919f;
  cursor: pointer; transition: all .18s ease; background: var(--gray-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.iq-dropzone:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.iq-dz-title { font-size: 14px; font-weight: 500; color: #4e5566; }
.iq-dropzone:hover .iq-dz-title { color: var(--brand); }
.iq-dropzone-paste { cursor: default; }
.iq-dropzone-paste:hover { border-color: var(--gray-300); color: #8a919f; background: var(--gray-50); }
.iq-paste-row { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.iq-paste-row input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; outline: none; transition: border-color .15s;
}
.iq-paste-row input:focus { border-color: var(--brand); }
.iq-or { align-self: center; color: #c0c6d0; font-size: 13px; flex: none; }

.iq-table-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 10px; }

.iq-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.iq-chip {
  padding: 8px 16px; border: 1px solid var(--gray-200); border-radius: 999px;
  font-size: 13px; color: #4e5566; cursor: pointer; user-select: none;
  background: #fff; transition: all .15s ease;
}
.iq-chip:hover { border-color: var(--brand); color: var(--brand); }
.iq-chip.on {
  border-color: var(--brand); color: var(--brand); background: var(--brand-light); font-weight: 500;
}
.iq-chip-add { border-style: dashed; color: #9aa1b0; }
.iq-sub-label { font-size: 13px; color: #9aa1b0; margin: 16px 0 8px; }
.iq-extra {
  width: 100%; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; outline: none; resize: vertical;
  transition: border-color .15s; font-family: inherit;
}
.iq-extra:focus { border-color: var(--brand); }

.iq-advanced { margin-top: 12px; }
.iq-advanced summary {
  font-size: 12px; color: #9aa1b0; cursor: pointer; user-select: none; outline: none;
}
.iq-advanced summary:hover { color: var(--brand); }
.iq-advanced textarea {
  width: 100%; margin-top: 8px; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; outline: none; resize: vertical; font-family: inherit;
}
.iq-advanced textarea:focus { border-color: var(--brand); }

.iq-options { display: flex; gap: 26px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.iq-options label { font-size: 13px; color: #4e5566; display: flex; align-items: center; gap: 6px; }
.iq-options input[type="number"], .iq-options select {
  border: 1px solid var(--gray-200); border-radius: 8px; padding: 6px 10px;
  font-size: 13px; outline: none; background: #fff;
}
.iq-options input[type="number"] { width: 84px; }
.iq-options input[type="number"]:focus, .iq-options select:focus { border-color: var(--brand); }

.iq-toggle { cursor: pointer; margin-left: auto; }
.iq-toggle input { display: none; }
.iq-toggle-track {
  display: inline-block; width: 38px; height: 20px; border-radius: 999px;
  background: var(--gray-300); position: relative; transition: background .18s; flex: none;
}
.iq-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.iq-toggle input:checked + .iq-toggle-track { background: var(--brand); }
.iq-toggle input:checked + .iq-toggle-track::after { left: 20px; }

.iq-footer { display: flex; gap: 14px; justify-content: center; padding-top: 8px; }
.iq-footer .btn-lg { min-width: 200px; }

@media (max-width: 900px) {
  .iq-import-row { flex-direction: column; }
  .iq-or { display: none; }
  .iq-footer .btn-lg { min-width: 0; flex: 1; }
}

/* ---- 询盘任务 & 对比结果 ---- */
.iq-task {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px; margin-bottom: 10px; background: #fff;
}
.iq-task-main { flex: 1; min-width: 0; }
.iq-task-title { font-size: 14px; font-weight: 600; color: #1f2430; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iq-task-meta { font-size: 12px; color: #8a93a6; margin-top: 4px; }
.iq-task-status {
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border-radius: 999px; white-space: nowrap;
}
.iq-result-table td { vertical-align: top; font-size: 13px; }
.iq-answer { margin-bottom: 6px; line-height: 1.6; color: #333a4d; }
.iq-answer b { color: #1f2430; }
.iq-seller-msg {
  margin-top: 4px; padding: 6px 10px; background: #f6f8fb;
  border-radius: 8px; font-size: 12px; color: #4e5566; line-height: 1.5;
}
.iq-insight {
  margin-top: 14px; padding: 12px 14px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 10px;
  font-size: 13px; line-height: 1.7; color: #785a10;
}
.iq-task-del { color: #c53030; }
.iq-task-del:hover { color: #9b2c2c; text-decoration: underline; }
.iq-task-check { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.iq-task-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 2px 12px;
  justify-content: flex-start; text-align: left;
}
.iq-task-toolbar .iq-checkall { font-size: 13px; color: #4e5566; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.iq-task-toolbar .iq-hint { font-size: 12px; color: #a0a8bb; margin-left: auto; }
.btn-danger { background: #c53030; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn-danger:hover { background: #9b2c2c; }
.btn-danger:disabled { opacity: .5; cursor: default; }
.iq-price { font-size: 15px; font-weight: 700; color: #c53030; }
.iq-group-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 18px 0 8px; padding: 8px 12px;
  background: linear-gradient(90deg, #fff7ed, #fff);
  border-left: 4px solid #ea7a3c; border-radius: 8px;
}
.iq-group-name { font-size: 15px; font-weight: 700; color: #2d3748; }
.iq-group-meta { font-size: 12px; color: #a0a8bb; }
.iq-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 12px 0 4px;
}
.iq-pager-info { font-size: 13px; color: #8a93a6; }
.iq-thumb {
  width: 44px; height: 44px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--gray-200, #e5e7eb); cursor: zoom-in; display: block;
}
.iq-result-head {
  display: flex; gap: 14px; align-items: center;
  padding: 4px 2px 14px; font-size: 14px; color: #1f2430;
}
.iq-result-img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--gray-200, #e5e7eb); cursor: zoom-in; flex-shrink: 0;
}

/* ==================== 供应商库 / 意向供货商 ==================== */
.sl-layout { display: flex; gap: 16px; align-items: flex-start; }
.sl-side { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.sl-lib { padding: 10px 12px; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; cursor: pointer; transition: all .15s; }
.sl-lib:hover { border-color: var(--primary, #4f6ef7); }
.sl-lib.active { border-color: var(--primary, #4f6ef7); background: rgba(79,110,247,.06); }
.sl-lib-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-lib-meta { font-size: 12px; color: var(--text-3, #9ca3af); margin-top: 3px; }
.sl-empty { text-align: center; color: var(--text-3, #9ca3af); font-size: 13px; padding: 40px 8px; line-height: 1.8; }
.sl-main { flex: 1; min-width: 0; }
.sl-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sl-toolbar b { font-size: 14px; }
.sl-search { width: 180px; margin-left: auto; }
.sl-replace { font-size: 12px; color: var(--text-3, #9ca3af); display: flex; align-items: center; gap: 4px; }
.sl-table-wrap { max-height: 560px; overflow-y: auto; }
.sl-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-200, #e5e7eb); cursor: zoom-in; }
.sl-noimg { color: var(--gray-400, #9ca3af); font-size: 12px; }
.sl-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-shop a { color: var(--primary, #4f6ef7); text-decoration: none; }
.sl-price { font-weight: 600; color: #c2410c; }
.sl-note { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.sl-pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 12px; font-size: 13px; color: var(--text-2, #4b5563); }
.it-status { padding: 4px 6px; border-radius: 8px; border: 1px solid var(--gray-200, #e5e7eb); font-size: 12px; background: #fff; font-weight: 600; }
.it-status.st-0 { background: #eef2ff; color: #4f6ef7; border-color: #c7d2fe; }
.it-status.st-1 { background: #fff7ed; color: #d97706; border-color: #fed7aa; }
.it-status.st-2 { background: #ecfdf5; color: #16a34a; border-color: #bbf7d0; }
.it-status.st-3 { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--gray-200, #e5e7eb); background: #fff; font-size: 13px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--primary, #4f6ef7); }
.chip.active { background: var(--primary, #4f6ef7); color: #fff; border-color: var(--primary, #4f6ef7); }
@media (max-width: 900px) {
  .sl-layout { flex-direction: column; }
  .sl-side { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .sl-lib { flex: 1 1 45%; }
}

/* 意向标注切换按钮：默认描边，标注后绿底白字 */
.it-mark-btn {
  padding: 5px 12px; border-radius: 8px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--gray-300, #d1d5db); background: #fff; color: var(--text-2, #4b5563);
  white-space: nowrap; transition: all .15s;
}
.it-mark-btn:hover { border-color: #16a34a; color: #16a34a; }
.it-mark-btn.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.it-mark-btn:disabled { opacity: .6; cursor: wait; }

/* 询盘页：从供应商库选 */
.iq-dropzone-lib { cursor: default; }
.iq-lib-row { display: flex; gap: 8px; margin: 8px 12px 4px; }
.iq-lib-row .form-input { flex: 1; min-width: 0; }
.sl-edit { float: right; color: var(--gray-400, #9ca3af); font-size: 12px; cursor: pointer; padding: 0 3px; border-radius: 4px; }
.sl-edit:hover { color: var(--primary, #4f6ef7); background: rgba(79,110,247,.1); }
.sl-cat { cursor: pointer; } .sl-cat:hover { color: var(--primary, #4f6ef7); }

/* ==================== 学习中心 ==================== */
.lc-wrap { max-width: 1180px; margin: 0 auto; padding: 8px 4px 40px; }
.lc-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, #fff7f2 0%, #ffefe4 55%, #ffe7d6 100%);
  border: 1px solid #ffd9c2; border-radius: 16px; padding: 22px 26px; margin-bottom: 16px; }
.lc-hero-text h2 { margin: 0 0 6px; font-size: 22px; color: #9a3412; letter-spacing: .5px; }
.lc-hero-text p { margin: 0; color: #c2622f; font-size: 13px; }
.lc-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.lc-stat { background: #fff; border: 1px solid #ffd9c2; border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 84px;
  box-shadow: 0 2px 8px rgba(234,88,12,.06); }
.lc-stat b { display: block; font-size: 20px; color: var(--brand); line-height: 1.2; }
.lc-stat span { font-size: 12px; color: #9a3412; }

.lc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lc-tab { border: 1px solid var(--gray-200, #e5e7eb); background: #fff; color: var(--gray-600, #4b5563);
  border-radius: 999px; padding: 8px 18px; font-size: 13px; cursor: pointer; transition: all .18s; display: flex; align-items: center; gap: 6px; }
.lc-tab:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.lc-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(255,107,53,.3); }
.lc-tab .lc-tab-n { font-size: 11px; opacity: .75; }
.lc-tab-wrap { position: relative; display: inline-flex; }
.lc-tab-drop { padding-right: 14px; }
.lc-drop-caret { font-size: 10px; opacity: .7; margin-left: 2px; }
.lc-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 148px;
  background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; z-index: 50; flex-direction: column; gap: 2px; }
.lc-tab-wrap:hover .lc-dropdown, .lc-tab-wrap.open .lc-dropdown { display: flex; }
.lc-drop-item { border: none; background: none; width: 100%; text-align: left; padding: 9px 12px;
  font-size: 13px; color: var(--gray-700, #374151); border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; transition: all .15s; }
.lc-drop-item:hover { background: var(--brand); color: #fff; }
.lc-drop-item-off { color: var(--gray-400, #9ca3af); cursor: default; }
.lc-drop-item-off:hover { background: #fff5f0; color: var(--gray-400, #9ca3af); }
.lc-drop-tag { font-size: 10px; background: #fff0e6; color: #ea580c; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.lc-loading { text-align: center; color: var(--gray-400, #9ca3af); padding: 60px 0; }

/* 知识库 */
.lc-section { margin-bottom: 26px; }
.lc-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lc-section-head::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--brand); }
.lc-section-head h3 { margin: 0; font-size: 16px; color: var(--gray-800, #1f2937); }
.lc-section-head span { font-size: 12px; color: var(--gray-400, #9ca3af); }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.lc-card { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; padding: 14px 16px;
  transition: all .18s; position: relative; }
.lc-card:hover { border-color: #ffb48a; box-shadow: 0 6px 18px rgba(234,88,12,.09); transform: translateY(-2px); }
.lc-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lc-card-no { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-light, #fff5f0); color: var(--brand);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.lc-card-title { font-weight: 600; font-size: 14px; color: var(--gray-800, #1f2937); flex: 1; }
.lc-card-tag { font-size: 11px; color: var(--brand); background: var(--brand-light, #fff5f0); border-radius: 999px; padding: 2px 8px; flex: none; }
.lc-card-body { font-size: 13px; color: var(--gray-600, #4b5563); line-height: 1.75; white-space: pre-line; }
.lc-card-src { margin-top: 8px; font-size: 11px; color: var(--gray-400, #9ca3af); }

/* 每日SOP 时间线 */
.lc-tl { position: relative; padding-left: 26px; }
.lc-tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(#ffb48a, #ffd9c2); border-radius: 2px; }
.lc-tl-slot { position: relative; margin-bottom: 20px; }
.lc-tl-slot::before { content: ''; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); border: 3px solid #ffe7d6; }
.lc-tl-time { font-weight: 700; font-size: 14px; color: #9a3412; margin-bottom: 10px; white-space: pre-line; line-height: 1.4; }
.lc-tl-items { display: grid; gap: 8px; }
.lc-tl-item { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; padding: 12px 14px; }
.lc-tl-item:hover { border-color: #ffb48a; }
.lc-tl-act { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--gray-800, #1f2937); }
.lc-tl-act .lc-card-no { width: 20px; height: 20px; font-size: 11px; }
.lc-tl-meta { margin-top: 6px; font-size: 12px; color: var(--gray-500, #6b7280); line-height: 1.7; }
.lc-tl-meta b { color: var(--gray-700, #374151); font-weight: 600; }
.lc-tl-warn { margin-top: 6px; font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 6px 10px; }

/* 规则表格 */
.lc-table-wrap { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; overflow: hidden; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lc-table th { background: #fff7f2; color: #9a3412; text-align: left; padding: 11px 14px; font-size: 12px; letter-spacing: .5px; }
.lc-table td { padding: 11px 14px; border-top: 1px solid var(--gray-100, #f3f4f6); color: var(--gray-700, #374151); line-height: 1.6; vertical-align: top; }
.lc-table tr:hover td { background: #fffaf6; }
.lc-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lc-pill.up { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.lc-pill.down { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lc-pill.hold { background: #f9fafb; color: #4b5563; border: 1px solid #e5e7eb; }
.lc-pill.budget { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.lc-pill.act { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* 红线 */
.lc-red-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.lc-red-card { background: linear-gradient(135deg, #fff 0%, #fff5f5 100%); border: 1px solid #fecaca; border-left: 4px solid #ef4444;
  border-radius: 12px; padding: 14px 16px; }
.lc-red-card:hover { box-shadow: 0 6px 18px rgba(239,68,68,.1); }
.lc-red-title { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; font-size: 14px; color: #991b1b; line-height: 1.5; }
.lc-red-no { flex: none; width: 22px; height: 22px; border-radius: 7px; background: #fee2e2; color: #dc2626;
  font-size: 12px; display: flex; align-items: center; justify-content: center; }
.lc-red-meta { margin-top: 8px; font-size: 12px; color: var(--gray-600, #4b5563); line-height: 1.7; }
.lc-red-meta b { color: #b91c1c; }

/* 课程索引 */
.lc-course-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.lc-link { color: var(--brand); text-decoration: none; font-weight: 600; }
.lc-link:hover { text-decoration: underline; }

/* ===== AI 记忆弹窗（调优要求 + 聊天记录） ===== */
.modal-card-md { width: 680px; padding: 0; overflow: hidden; }
.modal-card-md .modal-body { max-height: 62vh; overflow-y: auto; }
.mem-body { padding: 14px 20px 6px; }
.mem-block { margin-bottom: 14px; }
.mem-title { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.mem-tip { font-weight: 400; font-size: 11px; color: var(--gray-400); margin-left: 6px; }
.mem-empty { color: var(--gray-400); font-size: 12px; padding: 14px 10px; background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: 8px; line-height: 1.7; }
.mem-sub { font-size: 12px; color: var(--gray-500); margin: 8px 0 6px; }
.mem-note { display: flex; align-items: flex-start; gap: 8px; background: #fffdf5; border: 1px solid #f0e6c8; border-radius: 8px; padding: 7px 8px; margin-bottom: 6px; }
.mem-note-text { flex: 1; font-size: 12px; color: var(--gray-700); line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.mem-note-actions { display: flex; gap: 4px; flex-shrink: 0; }
.mem-msg { border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 12px; line-height: 1.7; }
.mem-msg-user { background: var(--brand-light); border: 1px solid #ffe0c7; }
.mem-msg-ai { background: var(--gray-100); border: 1px solid var(--gray-200); }
.mem-msg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mem-msg-who { font-weight: 700; font-size: 11px; color: var(--gray-500); }
.mem-msg-text { white-space: pre-wrap; word-break: break-all; color: var(--gray-800); max-height: 220px; overflow-y: auto; }
.btn-xs { padding: 1px 8px; font-size: 11px; line-height: 18px; height: 20px; border-radius: 6px; }
.mem-footer { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--gray-200); }

/* ===== 裂变前 AI 分组确认弹窗 ===== */
.preview-body { padding: 16px 20px 12px; }
.preview-analysis { background: #fff8f0; border: 1px solid #f0d9b8; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--gray-800); line-height: 1.7; margin-bottom: 12px; }
.preview-options { display: flex; flex-direction: column; gap: 8px; }
.preview-option { display: flex; align-items: flex-start; gap: 10px; background: #f8fafc; border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.preview-option:hover { border-color: var(--brand); background: #fff8f0; }
.preview-option-label { font-weight: 600; font-size: 13px; color: var(--gray-800); flex-shrink: 0; min-width: 80px; }
.preview-option-detail { font-size: 12px; color: var(--gray-600); line-height: 1.6; }
.preview-option-reason { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
