/* ═══════════════════════════════════════════
   雅拓内部系统 · 全局样式（PRD-130 苹果风门面）
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #0071e3;   /* PRD-130: Apple 蓝（原 #2563eb） */
  --blue-light: #e5f1fb;
  --blue-mid:   #b3d4f5;
  --blue-dark:  #004a9f;
  --red:        #ef4444;
  --red-dark:   #dc2626;
  --green:      #16a34a;
  --gray-50:    #fafafc;
  --gray-100:   #f5f5f7;
  --gray-200:   #e8e8ed;
  --gray-300:   #d2d2d7;
  --gray-500:   #6e6e73;
  --gray-700:   #3a3a3c;
  --gray-900:   #1d1d1f;
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  18px;
  --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.05), 0 0 0 .5px rgba(0,0,0,.03);
  --shadow:     0 2px 12px rgba(0,0,0,.06), 0 8px 28px -12px rgba(0,0,0,.10);
  --transition: 0.2s cubic-bezier(.25,.1,.25,1);
}

body {
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f7;
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── 顶栏（PRD-130：毛玻璃）── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.topbar h1 { font-size: 17px; font-weight: 700; color: var(--gray-900); letter-spacing: -.01em; }
.topbar nav { display: flex; gap: 4px; flex: 1 1 0%; min-width: 0; }
.topbar nav a {
  text-decoration: none;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 980px;
  transition: background var(--transition), color var(--transition);
}
.topbar nav a:hover { background: var(--gray-100); color: var(--gray-700); }
.topbar nav a.active { background: var(--blue); color: #fff; }

/* 导航分组：运营维度（全案总览/店铺诊断）靠左，销售/管理维度靠右，点击后位置固定不变 */
.topbar nav .nav-group { display: flex; align-items: center; gap: 4px; }
.topbar nav .nav-group-biz { margin-left: auto; }

/* 移动端：顶栏仅保留品牌 Logo，导航横向滚动以避免挤压溢出 */
@media (max-width: 640px) {
  .topbar { height: 52px; padding: 0 12px; gap: 8px; }
  .topbar > div:first-child { flex: 0 0 auto; }
  .topbar nav { min-width: 0; flex: 1; overflow-x: auto; gap: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }
  .topbar #currentUser { display: none; }
  .topbar nav button { flex: 0 0 auto; padding: 6px 9px !important; }
}

/* ── 页面容器 ── */
.container { max-width: 800px; margin: 32px auto; padding: 0 20px 60px; }

/* ── 通知条 ── */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn .2s ease;
}
.msg.ok  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.msg.err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.msg.warn { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* ── 卡片（表单外壳） ── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── 表单 section ── */
.card section {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.card section:last-of-type { border-bottom: none; }

.card section h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card section h2::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--blue);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── 网格布局 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 24px;
}
.grid .full { grid-column: 1 / -1; }

/* ── label + input ── */
.grid label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  gap: 6px;
}

label input,
label textarea,
label select {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
label input:focus,
label textarea:focus,
label select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
label input::placeholder,
label textarea::placeholder { color: var(--gray-300); }

/* select 自定义箭头 */
label select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* textarea */
label textarea { min-height: 56px; resize: vertical; line-height: 1.6; }
textarea.auto-grow { resize: none; overflow: hidden; min-height: 80px; }

/* ── field-block（明细列表区） ── */
.field-block { margin-top: 0; }
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.field-label .hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
}

/* ── 排序列表 ── */
.sortable-list { list-style: none; padding: 0; margin: 0; }
.sortable-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* 序号圆圈 */
.sortable-list li .seq {
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 单格输入 */
.sortable-list li input.single-inp {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.sortable-list li input.single-inp:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* 三段拼接行 */
.sortable-list li .triple-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;  /* 窄屏自动折行 */
}
.sortable-list li .triple-wrap input {
  flex: 1 1 80px;   /* 最小80px，可伸缩 */
  min-width: 0;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sortable-list li .triple-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* 历史直客选择器：作为 flex item 保持行内伸缩，内部 input 继承 triple-wrap 样式 */
.sortable-list li .triple-wrap .dc-picker {
  flex: 1 1 80px;
  min-width: 0;
}
.dc-picker { position: relative; display: inline-block; }
.dc-picker > input {
  width: 100%;
  flex: 1 1 80px;
  min-width: 0;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dc-picker > input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.dc-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,.14); max-height: 220px; overflow-y: auto;
  padding: 4px; margin-top: 2px;
}
.dc-opt { padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--gray-900); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-opt:hover { background: var(--gray-100); }
/* 两级直客选择器（总监→直客）树面板 */
.dc-suggest.dc-tree { max-height: 360px; display: flex; flex-direction: column; }
.dc-tree-search{
  margin: 2px 4px 6px; padding: 7px 10px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; background: var(--gray-50);
}
.dc-tree-search:focus{ border-color: var(--blue); background:#fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.dc-tree-list{ overflow-y: auto; flex: 1 1 auto; max-height: 280px; }
.dc-g { margin: 1px 0; }
.dc-g-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--gray-800); }
.dc-g-head:hover { background: var(--gray-50); }
.dc-caret { display: inline-block; color: var(--gray-400); font-size: 11px; transition: transform .15s; width: 12px; }
.dc-g-cnt { margin-left: auto; font-size: 11px; color: var(--gray-400); font-weight: 400; background: var(--gray-100); border-radius: 999px; padding: 1px 7px; }
.dc-g-body { display: none; padding: 2px 4px 4px 22px; }
.dc-g-body.dc-g-open { display: block; }
.dc-g-body .dc-opt { font-size: 13px; padding: 6px 10px; }
.dc-empty { padding: 8px 10px; font-size: 12px; color: var(--gray-400); border-top: 1px dashed var(--gray-200); margin-top: 4px; }
.dc-tree .dc-tip{ border-top:none; margin-top:6px; }
.sortable-list li .triple-wrap .arrow {
  color: var(--gray-300);
  font-size: 13px;
  flex-shrink: 0;
  user-select: none;
}

/* 删除按钮 */
.sortable-list li .btn-del {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.sortable-list li .btn-del:hover { background: var(--red-dark); }

/* 添加按钮 */
.btn-add {
  margin-top: 6px;
  width: 100%;
  background: var(--blue-light);
  color: var(--blue);
  border: 1.5px dashed var(--blue-mid);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-add:hover { background: #dbeafe; border-color: var(--blue); }

/* ── 提交区 ── */
.actions {
  padding: 20px 32px 28px;
  display: flex;
  gap: 12px;
}

/* ── 通用按钮（PRD-130：iOS 胶囊）── */
button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background var(--transition), transform .15s cubic-bezier(.25,.1,.25,1), box-shadow var(--transition), filter var(--transition);
}
button:hover  { background: var(--blue-dark); filter: brightness(1.04); box-shadow: 0 6px 18px rgba(0,113,227,.28); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(.98); }

button.secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
button.secondary:hover { background: var(--gray-200); }

button.danger {
  background: var(--red);
}
button.danger:hover { background: var(--red-dark); }

/* ── 看板专用 ── */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  background: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.toolbar input, .toolbar select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--blue); }
.toolbar .muted { color: var(--gray-500); font-size: 12px; margin-left: auto; }

/* 统计卡片 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.cardmini {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cardmini:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cardmini .num { font-size: 28px; font-weight: 800; color: var(--blue); line-height: 1.1; }
.cardmini .lbl { font-size: 12px; color: var(--gray-500); margin-top: 6px; line-height: 1.3; }

/* 表格 */
.tablewrap {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 400px; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--gray-100); }
th { background: var(--gray-50); color: var(--gray-500); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }

/* 看板 h2 */
.container > h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--blue);
}

/* 销售管理面板 */
.mgmt-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.mgmt-panel h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 18px;
}
.mgmt-add-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.mgmt-add-row input, .mgmt-add-row select {
  flex: 1;
  min-width: 100px;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.mgmt-add-row input:focus, .mgmt-add-row select:focus { border-color: var(--blue); }
.mgmt-add-row button { white-space: nowrap; padding: 9px 20px; }

.group-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gray-100, #f1f5f9); border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 99px; padding: 4px 12px; font-size: 12px; color: var(--gray-700, #334155);
}
.chip-x {
  border: none; background: transparent; color: var(--gray-500, #64748b);
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.chip-x:hover { color: #dc2626; }

/* PRD-022 2026-08-28：汇报组 team_scope 徽标（国内/海外，可点击切换） */
.chip-scope {
  border: 1px solid transparent; border-radius: 8px;
  padding: 1px 8px; font-size: 10px; line-height: 1.4; cursor: pointer;
  font-weight: 600; letter-spacing: 0.3px;
  transition: all 0.15s ease;
}
.chip-scope-domestic {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
.chip-scope-domestic:hover { background: #d1fae5; }
.chip-scope-overseas {
  background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.chip-scope-overseas:hover { background: #dbeafe; }

.biz-chip-wrap { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; }
.biz-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gray-100, #f1f5f9); border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 99px; padding: 3px 10px; font-size: 12px; color: var(--gray-600, #475569);
  cursor: pointer; transition: all .15s; user-select: none;
}
.biz-chip:hover { border-color: var(--blue, #2563eb); color: var(--blue, #2563eb); }
.biz-chip.on {
  background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.badge.active   { background: #dcfce7; color: #166534; }
.badge.inactive { background: var(--gray-100); color: var(--gray-500); }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.btn-del-sm {
  background: #fee2e2;
  color: var(--red-dark);
  border: none;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-del-sm:hover { background: #fecaca; }
.btn-toggle {
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-toggle:hover { background: var(--gray-200); }

/* ── 响应式 ── */
@media (max-width: 640px) {
  .container { padding: 0 12px 48px; margin: 20px auto; }
  .card section { padding: 20px 16px 18px; }
  .actions { padding: 16px 16px 24px; }
  .grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .sortable-list li .triple-wrap { flex-direction: column; align-items: stretch; }
  .sortable-list li .triple-wrap .arrow { display: none; }
  .sortable-list li .triple-wrap input { flex: none; width: 100%; }
}
/* ── KPI 卡片（目标 + 进度合并展示 + 进度条） ── */
.kpi-card {
  background: #fff;
  border: 1px solid var(--blue-mid);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kpi-card-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* PRD-064b：紧凑进度条组 —— 名称+数字+百分比徽章一行，进度条一行 */
.kpi-bar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-bar-group + .kpi-bar-group {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
}
.kpi-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.kpi-bar-name {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi-bar-nums { font-size: 14px; white-space: nowrap; }
.kpi-bar-actual { color: var(--blue); font-weight: 700; font-style: normal; }
.kpi-bar-target { color: var(--gray-400); font-size: 12px; }
.kpi-bar-pct {
  font-size: 11px;
  color: var(--gray-500);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
  flex: none;
}
.kpi-bar-pct.done { color: #15803d; background: #dcfce7; }
.kpi-progress {
  position: relative;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.kpi-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399 0%, #2dd4bf 50%, #6366f1 100%);
  transition: width 0.4s ease;
}
.kpi-progress-fill[data-pct="0"] { width: 0 !important; }
/* PRD-065：提交校验失败定位 —— 问题控件红光闪烁（闪烁 3 次后由 JS 移除类）*/
@keyframes fieldErrorFlash {
  0%, 100% { background-color: #fff; border-color: #d1d5db; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  30%, 70% { background-color: #fee2e2; border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22); }
  50% { background-color: #fecaca; border-color: #dc2626; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.3); }
}
.field-error-flash { animation: fieldErrorFlash 0.8s ease-in-out 3; border-radius: 8px; }
/* PRD-064：合并卡多进度条 —— 同矩阵块主/附加指标堆叠在同一张卡内 */
.kpi-bar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-bar-group + .kpi-bar-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-200);
}
.kpi-bar-name {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 600;
}

/* ── 客户进展汇报 ── */
.biz-client-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.biz-client-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  border-color: var(--gray-300, #cbd5e1);
}
.biz-client-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  border-left: 3px solid var(--blue);
  padding-left: 10px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
/* PRD-062b：列表与分组标题文字左对齐（标题起点 = 3px 边框 + 10px padding） */
.biz-client-card .sortable-list { margin-left: 7px; }
/* PRD-062：分组头部客户数徽章 */
.biz-client-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500, #64748b);
  background: var(--gray-100);
  border-radius: 999px;
  padding: 2px 10px;
  letter-spacing: 0;
}
/* PRD-062：广告客户线索标识 chip（如「CNOB广告·美国」「本本广告·日本」） */
.cp-name-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cp-biz-chip {
  display: inline-block;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: 600;
  color: #7c2d12;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 1.5px 9px;
  line-height: 1.5;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.archived-name-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.archived-name-wrap .archived-name { flex: 0 1 auto; }
.client-progress-row {
  padding: 10px 6px;
  border-bottom: 1px dashed var(--gray-200);
  border-radius: 6px;
  transition: background-color .2s ease;
}
/* PRD-062b：行真三列 grid（名字自适应 / 进度框吃剩余 / 按钮）。
   ⚠️ 特异性必须压过 .sortable-list li 的 display:flex（0,1,1），否则 grid 永远不生效
   （2026-09-02 松哥反馈「名字挤成一坨」根因：旧规则 0,1,0 输给 flex，名字列被压到 min-content 逐字折行）。
   ⚠️ 名字列不能用 minmax(150px, fit-content(38%))：Chrome 下 fit-content 百分比在 minmax() 内解析失败整个声明作废塌成单列（实测踩坑）。
   用固定上限 240px：短名单行，长名（11 字以上）在 240px 处折行。 */
ul.sortable-list li.client-progress-row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(240px, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
}
.client-progress-row:hover { background: var(--gray-100); }
.client-progress-row:last-child { border-bottom: none; }
/* 窄屏：单列堆叠（名字+chip / 进度框 / 按钮各一行） */
@media (max-width: 760px) {
  ul.sortable-list li.client-progress-row { grid-template-columns: 1fr; }
}
/* 标记状态：绿色合作 / 红色完拒 — 行背景高亮 */
.client-progress-row.row-status-ok { background: rgba(34, 197, 94, 0.08); }
.client-progress-row.row-status-no { background: rgba(239, 68, 68, 0.08); }
/* 客户名：全名显示，不省略不简写，多行折行 */
.kv-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 14.5px;
  line-height: 1.5;
  min-width: 0;
  word-break: break-word;
  white-space: normal;
}
/* 可编辑进度文本框：与销售日报里填的自由文本保持一致 */
.kv-progress-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  min-width: 0;
  color: var(--gray-800);
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.kv-progress-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
/* 状态标签按钮组：绿色合作 / 红色完拒 */
.kv-progress-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.kv-tag {
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  background: #fff;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.kv-tag-ok {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.kv-tag-ok:hover { background: #dcfce7; border-color: #86efac; }
.kv-tag-ok.active {
  color: #fff;
  background: #16a34a;
  border-color: #15803d;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}
.kv-tag-no {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}
.kv-tag-no:hover { background: #fee2e2; border-color: #fca5a5; }
.kv-tag-no.active {
  color: #fff;
  background: #dc2626;
  border-color: #b91c1c;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* ===== PRD-054 客户进展定档：已合作/已完拒折叠分组 ===== */
.archived-group {
  margin-top: 10px;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.archived-group > summary {
  padding: 10px 14px;
  font-size: 13px;
  list-style: none;
  user-select: none;
}
.archived-group > summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform .15s ease;
}
.archived-group[open] > summary::before {
  transform: rotate(90deg);
}
.archived-group > summary::-webkit-details-marker { display: none; }
.archived-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px dashed var(--gray-200, #e2e8f0);
}
.archived-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--gray-600, #475569);
}
.kv-tag-reopen {
  padding: 4px 12px;
  font-size: 12px;
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.kv-tag-reopen:hover { background: #dbeafe; border-color: #93c5fd; }

/* ===== PRD-010 客户变动动态板块 + 客户明细更新时间列 ===== */

/* 客户明细 · 更新时间列 */
.cli-row .cp-row-time {
  flex-shrink: 0;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  color: #94a3b8;
  min-width: 86px;
  text-align: right;
}

/* 客户明细 · 跳转高亮动画 */
@keyframes cp-row-flash {
  0%   { background: transparent; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  15%  { background: rgba(254, 243, 199, 0.6); box-shadow: 0 0 0 4px rgba(245, 158, 11, .35); }
  50%  { background: rgba(253, 230, 138, 0.5); box-shadow: 0 0 0 6px rgba(245, 158, 11, .5); }
  100% { background: transparent; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
.cli-row.cp-row-highlight {
  animation: cp-row-flash 3s ease-out;
  border-radius: 6px;
}

/* 客户明细 · 定档归档行配色（2026-08-21） */
.cli-row.cli-status-won {
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  border-radius: 6px;
  padding: 3px 8px;
  margin: 1px 0;
}
.cli-row.cli-status-won .cl-prog { color: #05603a; font-weight: 600; }
.cli-row.cli-status-lost {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 3px 8px;
  margin: 1px 0;
}
.cli-row.cli-status-lost .cl-prog { color: #b91c1c; font-weight: 600; text-decoration: line-through; }

/* 客户变动动态 · 纯文本分组 */
.cp-feed-group { margin-bottom: 14px; }
.cp-feed-group:last-child { margin-bottom: 0; }
.cp-feed-group-head {
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  padding: 6px 10px;
  background: #f1f5f9;
  border-left: 3px solid #2563eb;
  border-radius: 4px;
  margin-bottom: 6px;
}
.cp-feed-group-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 8px;
}
.cp-feed-line {
  font-size: 13px;
  line-height: 1.8;
  color: #334155;
  word-break: break-word;
}
.cp-feed-line .cp-feed-time {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  color: #94a3b8;
}
.cp-feed-line .cp-feed-change {
  color: #0f172a;
}
/* 客户进展定档：成交→绿 / 拒绝→红（整行） */
.cp-feed-line.status-won {
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  padding: 1px 8px;
  color: #065f46;
  border-radius: 4px;
  margin: 1px 0;
}
.cp-feed-line.status-won .cp-feed-change { color: #05603a; font-weight: 600; }
.cp-feed-line.status-won .cp-feed-time { color: #34d399; }
.cp-feed-line.status-rejected {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  padding: 1px 8px;
  color: #991b1b;
  border-radius: 4px;
  margin: 1px 0;
}
.cp-feed-line.status-rejected .cp-feed-change { color: #b91c1c; font-weight: 600; }
.cp-feed-line.status-rejected .cp-feed-time { color: #f87171; }

/* 刷新按钮 */
.btn-refresh {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s ease;
}
.btn-refresh:hover { background: #e2e8f0; }
.btn-refresh:active { background: #cbd5e1; }
