/* ============================================================
   AI+CRM 2.0 应用样式 · v6 视觉层
   ============================================================ */

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--text-primary);
  background: #eef0f4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
  line-height: var(--leading-normal);
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(226, 104, 88, .25); border-radius: 6px; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { list-style: none; }
a { color: var(--brand); text-decoration: none; }

/* ===== 应用外壳：内容自然撑开，超出严格裁剪 ===== */
.app-shell {
  width: var(--app-width);
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, #f6f7fa 0%, #eef0f4 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12), 0 4px 12px rgba(15, 23, 42, .04);
  overflow: hidden;          /* 🔑 修复超出：任何子元素都不撑出边界 */
  isolation: isolate;
}
@media (min-width: 480px) {
  body { display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; background: #e3e6ec; }
  .app-shell { min-height: 100vh; }
}

/* ============================================================
   新设计组件（live 页面：renderNewDetail）
   ============================================================ */

/* ---- 1. Hero Header（品牌渐变 sticky 顶部） ---- */
.hero-header {
  position: sticky;
  top: 0; z-index: 30;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .18) 0%, transparent 50%),
    linear-gradient(155deg, #EC7767 0%, #E26858 45%, #D85A4B 100%);
  padding: calc(var(--header-h) + 6px) 18px 18px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(226, 104, 88, .22);
  flex: 0 0 auto;
}
.hero-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .06) 0%, transparent 100%);
  pointer-events: none;
}
.hero-header__back {
  position: absolute; top: calc(var(--header-h) - 6px); left: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; border-radius: 50%;
  font-size: 22px; font-weight: var(--fw-medium);
  transition: background .15s ease, transform .12s ease;
}
.hero-header__back:active { background: rgba(255, 255, 255, .18); transform: scale(.94); }
.hero-header__name {
  font-size: 24px; font-weight: var(--fw-bold);
  line-height: 1.25; letter-spacing: -.01em;
  padding-right: 48px;
  word-break: break-all;
}
.hero-header__meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; flex-wrap: wrap;
}
.hero-header__tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .20);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px; font-weight: var(--fw-medium);
  border-radius: 9999px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.hero-header__tag.is-glass {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .14);
}
.hero-header__actions {
  position: absolute; top: calc(var(--header-h) - 4px); right: 12px;
  display: flex; gap: 8px;
}
.hero-header__action {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background .15s ease, transform .12s ease;
}
.hero-header__action:active { background: rgba(255, 255, 255, .32); transform: scale(.94); }

/* ---- 2. Source Card（白卡浮在 hero 之下） ---- */
.source-card {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 16px 18px;
  margin: -10px 14px 0;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, .04),
    0 12px 28px rgba(15, 23, 42, .08);
  z-index: 5;
}
.source-card__rows {
  display: flex; flex-direction: column;
  gap: 8px;
  padding-right: 64px;
  min-width: 0;
}
.source-card__row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px;
  min-width: 0;
}
.source-card__row dt {
  color: var(--text-tertiary);
  flex: 0 0 auto;
  min-width: 72px;
  font-size: 12px;
}
.source-card__row dd {
  color: var(--text-primary);
  flex: 1 1 auto;
  min-width: 0;
  font-weight: var(--fw-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-card__log {
  position: absolute; top: 16px; right: 16px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #16a34a 0%, #0e76fd 100%);
  color: #fff;
  font-size: 11px; font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(14, 118, 253, .25);
  cursor: pointer;
}

/* ---- 3. Icon Actions（5 彩色图标按钮） ---- */
.icon-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 18px 14px 14px;
  background: var(--surface);
  margin: 12px 14px 0;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .04);
}
.icon-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 2px 0;
  cursor: pointer;
  min-width: 0;
}
.icon-action__icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: transform .12s ease, box-shadow .15s ease;
}
.icon-action:active .icon-action__icon { transform: scale(.92); }
.icon-action__label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-action--blue   .icon-action__icon { background: #E6F0FF; color: #0e76fd; }
.icon-action--purple .icon-action__icon { background: #F3E8FF; color: #8b5cf6; }
.icon-action--green  .icon-action__icon { background: #DCFCE7; color: #16a34a; }
.icon-action--orange .icon-action__icon { background: #FEF3C7; color: #f59e0b; }
.icon-action--pink   .icon-action__icon { background: #FCE7F3; color: #ec4899; }

/* ---- 4. Pill Tabs（居中 tab + 下划线） ---- */
.pill-tabs {
  display: flex; justify-content: center; gap: 32px;
  padding: 14px 14px 0;
  margin: 0 14px;
  border-bottom: 1px solid var(--border);
}
.pill-tab {
  background: none; border: none;
  padding: 8px 4px 10px;
  font-size: 14px; font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  position: relative;
  transition: color .15s ease;
}
.pill-tab.is-active {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}
.pill-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -1px;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  border-radius: 9999px;
  background: var(--brand-gradient);
}

/* ---- 5. Detail Body ---- */
.detail-body {
  padding: 14px 14px 110px;
}
.detail-body > * + * { margin-top: 12px; }

/* ---- 6. Stage Group（首见阶段 / 二见阶段） ---- */
.todo-group {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.todo-group__head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  cursor: pointer; user-select: none;
  transition: background .15s ease;
  border-bottom: 1px solid transparent;
}
.todo-group__head:active { background: rgba(15, 23, 42, .02); }
/* 合并展示：head 与 meet-info 之间不加分隔线，统一作为阶段头部 */
.todo-group__head { border-bottom-color: transparent; }
.todo-group__label {
  font-size: 15px; font-weight: var(--fw-semibold);
  color: var(--text-primary);
  letter-spacing: -.01em;
}
.todo-group__arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  display: inline-block;
}
.todo-group.is-collapsed .todo-group__arrow { transform: rotate(0deg); }

/* 二见阶段 · 修改见面日期按钮（head 内） */
.todo-group__meet-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFE9E5 0%, #FFD8D2 100%);
  color: #B14A3F;
  font-size: 12px;
  font-weight: var(--fw-medium);
  border: 1px solid rgba(226, 104, 88, .25);
  transition: transform .12s ease, box-shadow .15s ease;
  cursor: pointer;
  pointer-events: auto;
}
.todo-group__meet-btn:active {
  transform: scale(.96);
  box-shadow: 0 2px 6px rgba(226, 104, 88, .18);
}
.todo-group__meet-icon { font-size: 12px; line-height: 1; }
.todo-group__meet-text { white-space: nowrap; }

/* v8：head 内「修改见面日期」图标化（去掉文字，完整信息下移到 meet-info） */
.todo-group__meet-btn--icon {
  margin-left: auto;       /* 推靠右 */
  margin-right: 6px;
  padding: 4px 8px;
  font-size: 13px;
}
.todo-group__meet-btn--icon:active {
  transform: scale(.92);
}

/* v8：阶段见面信息卡（首见/二见共用，head 下方） */
.todo-group__meet-info {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 0 16px 12px;
  background: linear-gradient(135deg, rgba(255, 233, 229, .35) 0%, rgba(255, 216, 210, .12) 100%);
  border-bottom: 1px solid var(--border);
}
/* 合并展示：折叠时只收起 body，meet-info 始终与 head 一起固定展示 */
.todo-group__meet-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.todo-group__meet-row .todo-group__meet-icon {
  font-size: 14px;
  width: 18px; flex-shrink: 0;
  text-align: center;
}
.todo-group__meet-row .todo-group__meet-text {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-group__meet-countdown {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  flex-shrink: 0;
  background: rgba(15, 23, 42, .06);
  color: var(--text-secondary);
}
.todo-group__meet-countdown.is-future {
  background: linear-gradient(135deg, rgba(226, 104, 88, .12) 0%, rgba(226, 104, 88, .18) 100%);
  color: var(--brand-dark, #C8554A);
}
.todo-group__meet-countdown.is-today {
  background: linear-gradient(135deg, rgba(34, 197, 94, .14) 0%, rgba(34, 197, 94, .22) 100%);
  color: #15803D;
}
.todo-group__meet-countdown.is-past {
  background: rgba(15, 23, 42, .06);
  color: var(--text-tertiary);
}
.todo-group__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 1500px;
  transition: max-height .32s cubic-bezier(.4, 0, .2, 1), padding .32s cubic-bezier(.4, 0, .2, 1), opacity .18s ease;
  padding: 0 14px 14px;
}
.todo-group__body > .task-card + .task-card { margin-top: 10px; }
.todo-group.is-collapsed .todo-group__body {
  max-height: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* ---- 7. Task Card ---- */
.task-card {
  background: #FBFAF9;
  border: 1px solid #F1EFEC;
  border-radius: 14px;
  padding: 14px 14px 12px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease, background .2s ease;
}
.task-card:active { transform: scale(.995); }
.task-card--done {
  background: #F8F7F5;
  border-color: #ECEAE5;
}
.task-card--done .task-card__title,
.task-card--done .task-card__meta { color: var(--text-tertiary); }
.task-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.task-card__title {
  font-size: 14px; font-weight: var(--fw-semibold);
  color: var(--text-primary);
  letter-spacing: -.005em;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.task-card__meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; flex-wrap: wrap;
}

/* 状态徽章（更强语义） */
.tag--state-doing  { color: var(--state-doing);  background: var(--state-doing-bg);  font-weight: var(--fw-medium); }
.tag--state-done   { color: var(--state-done);   background: var(--state-done-bg);   font-weight: var(--fw-medium); }
.tag--state-overdue{ color: var(--state-overdue);background: var(--state-overdue-bg);font-weight: var(--fw-medium); }
.tag--danger       { color: var(--danger);       background: var(--danger-light);     font-weight: var(--fw-medium); }
.tag--success      { color: var(--success);      background: var(--success-light);    font-weight: var(--fw-medium); }
.tag--warning      { color: #b45309;             background: var(--warning-light);    font-weight: var(--fw-medium); }
.tag--brand        { color: var(--brand);        background: var(--brand-light);      font-weight: var(--fw-medium); }
.tag--neutral      { color: var(--text-secondary); background: var(--surface-3);      font-weight: var(--fw-medium); }
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 11px;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* @人 mention */
.todo__mention { color: var(--brand); font-weight: var(--fw-medium); }
.tag--ai { color: #7c3aed; background: #f3e8ff; padding: 1px 7px; font-size: 10px; font-weight: var(--fw-medium); }
.tag--manual { color: #0f766e; background: #ccfbf1; padding: 1px 7px; font-size: 10px; font-weight: var(--fw-medium); }

/* 去完成按钮（更大更明显） */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px;
  border-radius: 9999px;
  font-size: 13px; font-weight: var(--fw-medium);
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(226, 104, 88, .35); }
.btn--primary:active { background: var(--brand-dark); box-shadow: 0 1px 3px rgba(226, 104, 88, .3); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(226, 104, 88, .28); }
.btn--brand:active { background: var(--brand-dark); }
.btn--secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn--ghost { color: var(--brand); }
.btn--disabled { background: var(--surface-3); color: var(--text-tertiary); cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 12px; }

.todo__action { margin-top: 12px; }

/* 跟进总结（可展开） */
.task-followup { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.task-followup__toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 0;
}
.task-followup__body {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  background: #FCFAF8;
  border-radius: 10px;
  border: 1px solid #F0EDE7;
}
.task-followup.is-expanded .task-followup__body { display: block; }
.task-followup__content { font-size: 13px; color: var(--text-secondary); line-height: var(--leading-relaxed); }

/* 跟进总结 · 操作行（设计师 chip + 复制按钮） */
.task-followup__ops {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, .06);
}
.task-followup__copy {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(226, 104, 88, .08);
  color: var(--brand);
  font-size: 12px;
  font-weight: var(--fw-medium);
  border: 1px solid rgba(226, 104, 88, .2);
  transition: background .15s ease, transform .12s ease;
  cursor: pointer;
}
.task-followup__copy:active {
  background: rgba(226, 104, 88, .16);
  transform: scale(.96);
}
.task-followup__copy-icon {
  font-size: 13px; line-height: 1;
  display: inline-block;
  transform: scale(1.1);
}

/* 浮层 · 见面日期 · 清除按钮（次级动作） */
.meet-clear-btn {
  display: block;
  margin: 12px auto 0;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.meet-clear-btn:active {
  color: var(--brand-dark);
  border-color: var(--brand);
}

/* ---- 8. Bottom Bar（固定吸底操作条） ---- */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(15, 23, 42, .06);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.bottom-bar__btn {
  flex: 1; height: 44px;
  border-radius: 12px;
  font-size: 14px; font-weight: var(--fw-semibold);
  letter-spacing: -.005em;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.bottom-bar__btn:active { transform: scale(.97); }
.bottom-bar__btn--outline {
  background: var(--surface);
  color: var(--brand);
  border: 1.5px solid var(--brand);
  box-shadow: 0 1px 2px rgba(226, 104, 88, .1);
}
.bottom-bar__btn--outline:active { background: var(--brand-light); }
.bottom-bar__btn--solid {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(226, 104, 88, .35);
}
.bottom-bar__btn--solid:active { box-shadow: 0 2px 6px rgba(226, 104, 88, .3); }

/* ============================================================
   共用样式（兼容旧/通用）
   ============================================================ */

/* ---- 顶部状态栏 ---- */
.topbar {
  height: var(--header-h); flex: 0 0 var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar__title {
  font-size: 16px; font-weight: var(--fw-semibold);
  letter-spacing: -.01em;
}
.topbar__back {
  display: flex; align-items: center; gap: 2px;
  font-size: 14px; color: var(--brand);
  padding: 4px 8px; border-radius: 6px;
}
.topbar__back:active { background: var(--surface-3); }
.topbar__right { display: flex; align-items: center; gap: 8px; }

/* ---- 角色切换条 ---- */
.role-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.role-bar::-webkit-scrollbar { display: none; }
.role-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px; font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all .15s ease;
}
.role-chip.is-active {
  color: #fff;
  background: var(--brand);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(226, 104, 88, .3);
}
.role-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }

/* ---- 主内容 ---- */
.main { flex: 1 1 auto; padding: 12px; }
.main::-webkit-scrollbar { width: 0; }

/* ---- 区块 ---- */
.section { margin-bottom: 16px; }
.section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}
.section__title {
  font-size: 13px; font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  letter-spacing: .04em;
}
.section__action { font-size: 13px; color: var(--brand); }

/* ---- 卡片 ---- */
.card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card__body { padding: 16px; }
.card--pad-sm .card__body { padding: 12px; }

/* ---- 客户详情：基础信息（旧，保留兼容）---- */
.detail-hero {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.detail-hero__name {
  font-size: 20px; font-weight: var(--fw-bold);
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.detail-hero__sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.detail-hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.stat { text-align: center; }
.stat__label { font-size: 11px; color: var(--text-tertiary); }
.stat__value { font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-primary); margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin-top: 12px; }
.info-grid dt { font-size: 11px; color: var(--text-tertiary); }
.info-grid dd { font-size: 13px; color: var(--text-primary); font-weight: var(--fw-medium); }

/* ---- 节点进度（旧）---- */
.nodes {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.node { display: flex; gap: 12px; position: relative; padding-bottom: 12px; }
.node:last-child { padding-bottom: 0; }
.node::before {
  content: ""; position: absolute;
  left: 11px; top: 24px; bottom: -4px;
  width: 2px; background: var(--border);
}
.node:last-child::before { display: none; }
.node__dot {
  flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: var(--fw-bold);
  background: var(--surface-3); color: var(--text-tertiary);
  border: 2px solid var(--surface-3);
  position: relative; z-index: 1;
}
.node--done .node__dot { background: var(--success); color: #fff; border-color: var(--success); }
.node--doing .node__dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
.node--overdue .node__dot { background: var(--danger); color: #fff; border-color: var(--danger); }
.node__body { flex: 1 1 auto; padding-top: 1px; }
.node__title { font-size: 14px; font-weight: var(--fw-semibold); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.node__desc { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.node__todos { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }

/* ---- 待办项（旧 todo）---- */
.todo {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.todo--done { opacity: .55; }
.todo--overdue { background: var(--danger-light); border-color: #fecaca; }
.todo__check {
  flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; transition: all .15s ease;
}
.todo--done .todo__check { background: var(--success); border-color: var(--success); color: #fff; }
.todo__check svg { width: 12px; height: 12px; }
.todo__main { flex: 1 1 auto; min-width: 0; }
.todo__title { font-size: 13px; font-weight: var(--fw-medium); color: var(--text-primary); }
.todo--done .todo__title { text-decoration: line-through; color: var(--text-tertiary); }
.todo__meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo__followup { margin-top: 8px; padding: 8px 10px; background: var(--success-light); border-radius: 8px; border: 1px solid #bbf7d0; }
.todo__followup-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.todo__followup-content { font-size: 11px; color: var(--text-secondary); line-height: var(--leading-relaxed); }
.todo__followup-row { font-size: 11px; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 4px; }
.todo__followup-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* ---- 时间轴 ---- */
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item__time {
  flex: 0 0 56px;
  font-size: 11px; color: var(--text-tertiary);
  text-align: right; padding-top: 2px;
}
.timeline-item__body { flex: 1 1 auto; }
.timeline-item__head { display: flex; align-items: center; gap: 8px; }
.timeline-item__actor { font-size: 13px; font-weight: var(--fw-semibold); }
.timeline-item__tag { font-size: 11px; }
.timeline-item__content { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: var(--leading-relaxed); }
.timeline-item__extracted { margin-top: 8px; padding: 8px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border); }
.timeline-item__extracted-row { font-size: 11px; color: var(--text-secondary); display: flex; gap: 8px; }
.timeline-item__extracted-row b { color: var(--text-primary); font-weight: var(--fw-medium); }

/* ---- 占位按钮（转协议/收款/改见面时间/标记状态）---- */
.placeholder-btn { position: relative; }

/* ---- 底部操作栏 ---- */
.actionbar {
  flex: 0 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
  position: sticky; bottom: 0; z-index: 20;
}

/* ---- 浮层 / 模态 ---- */
.overlay {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 50;
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  max-height: 92%;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22, .84, .36, 1);
  box-shadow: 0 -8px 40px rgba(15, 23, 42, .2);
}
.overlay.is-open .sheet { transform: translateY(0); }
.sheet__handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border-strong);
  margin: 8px auto 4px;
  flex: 0 0 auto;
}
.sheet__head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sheet__title { font-size: 16px; font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.sheet__close {
  font-size: 22px; color: var(--text-tertiary);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sheet__close:active { background: var(--surface-3); }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px; }
.sheet__foot {
  flex: 0 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

/* ---- Agent 浮层 ---- */
.agent-bubble {
  background: linear-gradient(135deg, #FBE9E5 0%, #FCEDEA 100%);
  border: 1px solid rgba(226, 104, 88, .15);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: 12px;
}
.agent-bubble__head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--brand);
  font-weight: var(--fw-semibold);
}
.agent-bubble__avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: var(--fw-bold);
}

.input-area { margin-bottom: 12px; }
.input-area__label {
  font-size: 13px; font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.textarea {
  width: 100%; min-height: 110px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 13px;
  line-height: var(--leading-relaxed);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(226, 104, 88, .15); background: var(--surface); }
.upload-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 8px; display: flex; align-items: center; gap: 4px; }

/* ---- AI 提取结果 ---- */
.extract-card {
  background: var(--surface);
  border: 1px solid rgba(226, 104, 88, .18);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.extract-card__head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--brand);
}
.extract-card__head::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-gradient);
  flex: 0 0 auto;
}
.extract-field { margin-bottom: 10px; }
.extract-field:last-child { margin-bottom: 0; }
.extract-field__label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.extract-field__input, .extract-field__select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.extract-field__input:focus, .extract-field__select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(226, 104, 88, .15); }
.extract-field__input--edited { border-color: var(--warning); background: #fffbeb; }
.chip-group { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all .12s ease;
}
.chip.is-selected { background: var(--brand); color: #fff; border-color: var(--brand); }

.confirm-tip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: var(--warning-light);
  border-radius: 10px;
  font-size: 11.5px;
  color: #92400e;
  margin-bottom: 12px;
  line-height: var(--leading-relaxed);
}

/* ---- 空状态 / 提示 ---- */
.empty { text-align: center; padding: 40px 16px; color: var(--text-tertiary); }
.empty__icon { font-size: 36px; margin-bottom: 8px; }
.empty__text { font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 29, 33, .92);
  color: #fff;
  padding: 9px 16px;
  border-radius: 9999px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .2);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: all .25s ease;
  white-space: nowrap;
  max-width: 90%;
  max-width: calc(100vw - 40px);
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 搜索 / 筛选 ---- */
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 9999px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.search input { flex: 1; border: none; background: none; font-size: 13px; }
.search input:focus { outline: none; }
.search svg { color: var(--text-tertiary); flex: 0 0 auto; }

.filter-bar { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto; padding: 5px 12px;
  border-radius: 9999px;
  font-size: 13px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary);
}
.filter-chip.is-active { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }

/* ---- 盘点任务卡 ---- */
.inv-task {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFFBF5 100%);
  border: 1px solid #FED7AA;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.inv-task--overdue { background: linear-gradient(135deg, #FEF2F2 0%, #FFF5F5 100%); border-color: #FECACA; }
.inv-task__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.inv-task__title {
  font-size: 13px; font-weight: var(--fw-semibold);
  color: #9A3412;
  display: flex; align-items: center; gap: 4px;
}
.inv-task--overdue .inv-task__title { color: var(--danger); }
.inv-task__deadline { font-size: 11px; color: var(--text-tertiary); }
.inv-task__desc { font-size: 11px; color: var(--text-secondary); line-height: var(--leading-relaxed); margin-bottom: 8px; }

/* ---- 工具类 ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 13px; }
.text-caption { font-size: 11px; }
.fw-semibold { font-weight: var(--fw-semibold); }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.mono { font-family: var(--font-mono); }

/* ---- 客户列表项 ---- */
.cust-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s ease;
}
.cust-item:last-child { border-bottom: none; }
.cust-item:active { background: var(--surface-2); }
.cust-item__avatar {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: var(--fw-semibold);
}
.cust-item__main { flex: 1 1 auto; min-width: 0; }
.cust-item__name {
  font-size: 14px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; gap: 8px;
}
.cust-item__meta {
  font-size: 11px; color: var(--text-tertiary);
  margin-top: 2px;
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cust-item__arrow { color: var(--text-tertiary); font-size: 16px; }

/* ============================================================
   企微群聊 / 1.0 推送卡片入口（首页）
   ============================================================ */
.wecom-topbar {
  height: var(--header-h); flex: 0 0 var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.wecom-topbar__title {
  font-size: 15px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; gap: 6px;
  flex-direction: column; align-items: flex-start;
  line-height: 1.2;
}
.wecom-topbar__title-main { display: flex; align-items: center; gap: 8px; }
.wecom-topbar__title-sub { font-size: 11px; color: var(--text-tertiary); font-weight: var(--fw-regular); }
.wecom-topbar__logo {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: var(--fw-bold);
}

.chat-messages { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.chat-time { text-align: center; font-size: 11px; color: var(--text-tertiary); padding: 8px 0; }
.chat-robot { display: flex; gap: 8px; align-items: flex-start; }
.chat-robot__avatar {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: var(--fw-bold);
}
.chat-robot__body { flex: 1 1 auto; min-width: 0; }
.chat-robot__name { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }
.chat-robot__bubble {
  background: var(--surface);
  border-radius: 0 12px 12px 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  display: inline-block; max-width: 100%;
}
.chat-robot__bubble .mention { color: var(--brand); font-weight: var(--fw-medium); }

.push-msg { display: flex; gap: 8px; align-items: flex-start; }
.push-msg__avatar {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: var(--fw-bold);
}
.push-msg__body { flex: 1 1 auto; min-width: 0; }
.push-msg__name { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }
.push-card-1 {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .04);
  border: 1px solid var(--border);
  overflow: hidden;
}
.push-card-1__header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FCFAF8 0%, #F8F6F2 100%);
}
.push-card-1__icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.push-card-1__title { font-size: 13px; font-weight: var(--fw-semibold); flex: 1; min-width: 0; }
.push-card-1__tag { flex: 0 0 auto; }
.push-card-1__body { padding: 12px 14px; }
.push-card-1__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.push-card-1__row:last-child { border-bottom: none; }
.push-card-1__row-label { color: var(--text-secondary); }
.push-card-1__row-value { font-weight: var(--fw-medium); color: var(--text-primary); }
.push-card-1__todos {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
}
.push-card-1__todo {
  font-size: 11px; color: var(--text-secondary);
  padding: 3px 0;
  display: flex; align-items: center; gap: 4px;
}
.push-card-1__todo-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--warning);
  flex: 0 0 auto;
}
.push-card-1__todo-dot--overdue { background: var(--danger); }
.push-card-1__footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.push-card-1__cta {
  color: var(--brand); font-size: 13px;
  font-weight: var(--fw-medium);
  display: flex; align-items: center; gap: 2px;
}

.chat-inputbar {
  flex: 0 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  position: sticky; bottom: 0; z-index: 20;
}
.chat-inputbar__icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  font-size: 18px; flex: 0 0 auto;
}
.chat-inputbar__field {
  flex: 1; height: 32px;
  border-radius: 9999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---- 群应用 dock ---- */
.app-dock {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 20;
}
.app-dock__btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; padding: 0;
  cursor: pointer;
}
.app-dock__icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform .12s ease;
}
.app-dock__btn:active .app-dock__icon { transform: scale(.94); }
.app-dock__btn--primary .app-dock__icon {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(226, 104, 88, .35);
}
.app-dock__label { font-size: 11px; color: var(--text-secondary); }
.app-dock__btn--primary .app-dock__label { color: var(--brand); font-weight: var(--fw-medium); }

/* ============================================================
   表单（录入跟进弹层）
   ============================================================ */
.fm-form { padding: 0 16px; }
.fm-field {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.fm-field:last-child { border-bottom: none; }
.fm-field__label { flex: 0 0 96px; font-size: 13px; color: var(--text-secondary); }
.fm-field__select, .fm-field__input {
  flex: 1; min-width: 0;
  padding: 6px 8px;
  border: none; background: transparent;
  font-size: 13px; color: var(--text-primary);
  text-align: right;
}
.fm-field__select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
  padding-right: 18px;
}
.fm-field__select:focus, .fm-field__input:focus { outline: none; }
.fm-field__textarea {
  flex: 1; min-width: 0;
  padding: 6px 8px;
  border: none; background: transparent;
  font-size: 13px; color: var(--text-primary);
  resize: vertical; min-height: 60px;
}
.fm-field__textarea:focus { outline: none; }
.fm-radio-group { display: flex; gap: 16px; flex: 1; justify-content: flex-end; }
.fm-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.fm-radio input { accent-color: var(--brand); width: 16px; height: 16px; }
.fm-submit { background: var(--danger); color: #fff; }
.fm-submit:active { background: #dc2626; }
.fm-field__ctrl { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.fm-field__hint { font-size: 10px; color: var(--brand); text-align: right; margin-bottom: 2px; line-height: 1.2; }
.fm-field__ctrl .fm-field__select { width: 100%; }
.fm-field--ai-todo {
  background: var(--brand-light);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ============================================================
   Tab 切换栏
   ============================================================ */
.tab-bar {
  display: flex; gap: 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: 10px 12px;
  font-size: 14px; font-weight: var(--fw-medium);
  color: var(--text-secondary);
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s ease;
}
.tab-btn.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: var(--fw-semibold); }

/* ============================================================
   群成员/聊天项
   ============================================================ */
.chat-list {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
  border: 1px solid var(--border);
}
.chat-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; align-items: center;
  transition: background .12s ease;
}
.chat-item:last-child { border-bottom: none; }
.chat-item:active { background: var(--surface-2); }
.chat-item__avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: var(--fw-semibold);
  position: relative;
}
.chat-item__badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface); line-height: 1;
}
.chat-item__main { flex: 1 1 auto; min-width: 0; }
.chat-item__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-item__name { font-size: 14px; font-weight: var(--fw-semibold); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.chat-item__time { font-size: 11px; color: var(--text-tertiary); flex: 0 0 auto; }
.chat-item__preview {
  font-size: 12px; color: var(--text-tertiary);
  margin-top: 3px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 4px;
}
.chat-item__preview-icon { color: var(--brand); font-size: 11px; }
.chat-item__members { display: flex; margin-left: auto; }
.chat-item__member {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-secondary);
  font-size: 9px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--surface); margin-left: -6px;
}
.chat-item__member:first-child { margin-left: 0; }

/* ============================================================
   列表（兼容）
   ============================================================ */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.detail-hero--compact { padding: 12px; }
