/* ============ 芸昌堂运营台 · 设计还原 ============ */
:root {
  --paper: #F6F4EF;          /* 宣纸底 */
  --ink: #1E2A27;            /* 主文字 */
  --ink-2: #3D4C48;
  --ink-3: #5E6E69;
  --ink-4: #7C8B86;
  --ink-5: #97A5A0;
  --ink-6: #A0ADA8;
  --line: #E6E0D4;           /* 卡片描边 */
  --line-2: #EFEDE6;
  --line-3: #F0EEE7;
  --soft: #FAF8F4;           /* 卡片内浅底 */
  --jade: #2E6B5E;           /* 芸香青 */
  --jade-soft: #EAF1EE;
  --jade-ink: #2E4A42;
  --jade-mid: #5E7A72;
  --jade-line: #E3EDE9;
  --jade-deep: #D7E7E1;
  --cinnabar: #B8453A;       /* 朱砂 */
  --cinnabar-soft: #FBEEEB;
  --cinnabar-deep: #F7E2DF;
  --gold: #C2903A;           /* 金桂 */
  --gold-soft: #FBF3E3;
  --ai: #5A6BAE;             /* AI 蓝 */
  --ai-soft: #ECEEF8;
  --sidebar: #1F312C;
  --sidebar-2: #263934;
  --sidebar-3: #2C403A;
  --side-txt: #F4F1EA;
  --side-sub: #A9BCB6;
  --side-dim: #7E918B;
  --radius-card: 12px;
  --radius-block: 8px;
  --radius-field: 10px;
  --radius-tag: 6px;
  --shadow: 0 1px 2px rgba(30, 42, 39, .04);
  font-size: 16px;
}

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

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.num { font-family: Inter, "Noto Sans SC", sans-serif; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: 220px; flex: 0 0 220px;
  background: var(--sidebar);
  color: var(--side-txt);
  display: flex; flex-direction: column;
  padding: 16px; gap: 4px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.brand-seal {
  width: 34px; height: 34px; border-radius: 9px; background: #2E6B5E;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--side-txt); flex: 0 0 34px;
}
.brand-txt { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 14px; font-weight: 600; }
.brand-ver { font-size: 11px; color: var(--side-dim); }

.side-divider { height: 1px; background: var(--sidebar-3); margin: 8px 0; }
.side-sec { font-size: 11px; font-weight: 500; color: #6E807A; padding: 4px 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  height: 40px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; color: var(--side-sub);
  cursor: pointer; user-select: none;
  transition: background .15s, color .15s;
  border: none; background: transparent; width: 100%;
  text-align: left; font-family: inherit;
}
.nav-item svg { flex: 0 0 18px; width: 18px; height: 18px; }
.nav-item:hover { background: rgba(46, 107, 94, .35); }
.nav-item:focus { outline: none; }
.nav-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.nav-item.active { background: var(--jade); color: #fff; font-weight: 600; }

.side-progress {
  margin-top: 12px;
  background: var(--sidebar-2);
  border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.sp-head { display: flex; justify-content: space-between; align-items: center; }
.sp-title { font-size: 12px; font-weight: 500; color: #CFD9D5; }
.sp-step { font-size: 11px; color: var(--side-dim); }
.sp-track { height: 6px; border-radius: 3px; background: #1B2A26; overflow: hidden; }
.sp-fill { width: 90%; height: 100%; border-radius: 3px; background: var(--gold); }
.sp-note { font-size: 11px; color: var(--side-dim); }

.side-footer {
  margin-top: auto;
  background: var(--sidebar-2);
  border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.sf-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #CFD9D5; font-weight: 500; }
.sf-dot { width: 8px; height: 8px; border-radius: 4px; background: #4A8A5C; }
.sf-line { font-size: 11px; color: var(--side-dim); }

/* ============ 主区 ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* 屏幕显隐：由 .screen.active 统一控制（修复点击不切换） */
.screen { display: none; flex: 1; min-height: 0; flex-direction: column; }
.screen.active { display: flex; }

.topbar {
  height: 72px; flex: 0 0 72px;
  background: #fff; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.tb-title { display: flex; flex-direction: column; gap: 2px; }
.tb-h1 { font-size: 18px; font-weight: 600; }
.tb-sub { font-size: 12px; color: var(--ink-4); }
.tb-actions { display: flex; align-items: center; gap: 12px; }

.badge {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 8px;
  font-size: 12px; font-weight: 500;
}
.badge-green { background: var(--jade-soft); color: var(--jade); }
.badge-red { background: var(--cinnabar-soft); color: var(--cinnabar); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge .dot { width: 8px; height: 8px; border-radius: 4px; }
.badge-green .dot { background: #4A8A5C; }
.badge-red .dot { background: var(--cinnabar); }
.badge-gold .dot { background: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  border: none; cursor: pointer;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn-primary-red { background: var(--cinnabar); color: #fff; }
.btn-primary-jade { background: var(--jade); color: #fff; }
.btn-ghost {
  background: #fff; color: var(--ink-2);
  border: 1px solid #DED9CE; font-weight: 500; font-size: 13px;
}
.btn-sm { height: 38px; padding: 0 14px; }
.btn svg { width: 16px; height: 16px; }

.content { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }

.row { display: flex; gap: 16px; }
/* 修复：曾用 min-height:0 允许 flex 压缩，导致内容多的行被压扁、
   溢出的卡片被后续栏目（如"云端功能同步"）白底盖住。改为按内容撑开，
   由 .content 的 overflow-y 承担滚动。 */
.row-grow { flex: 1 1 auto; min-height: fit-content; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.flex1 { flex: 1; min-width: 0; }

/* ============ 卡片 ============ */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 600; }
.card-meta { font-size: 12px; color: var(--ink-4); }
.card-foot { font-size: 11px; color: var(--ink-6); }
.card-note { font-size: 12px; color: var(--ink-3); line-height: 20px; }

/* ============ KPI ============ */
.kpi-row { display: flex; gap: 12px; }
.kpi {
  flex: 1; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow);
}
.kpi-label { font-size: 12px; color: var(--ink-4); }
.kpi-value { font-size: 28px; font-weight: 700; font-family: Inter, "Noto Sans SC", sans-serif; color: var(--ink); }
.kpi-value.jade { color: var(--jade); }
.kpi-value.gold { color: var(--gold); }
.kpi-value.red { color: var(--cinnabar); }
.kpi-desc { font-size: 11px; color: var(--ink-4); }
.kpi-desc.up { color: #4A8A5C; }
.kpi-desc.warn { color: var(--gold); }
.kpi-desc.bad { color: var(--cinnabar); }

/* ============ 列表行 ============ */
.line-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--soft); border-radius: var(--radius-block);
  padding: 10px 12px;
}
.line-item.danger { background: var(--cinnabar-soft); }

.checkbox {
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 5px; border: 1.5px solid #C9D1CE; background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.checkbox.done { background: var(--jade); border-color: var(--jade); }
.checkbox svg { width: 18px; height: 18px; display: none; }
.checkbox.done svg { display: block; }

.li-text { flex: 1; font-size: 13px; color: var(--ink-2); min-width: 0; }
.li-text.muted { color: var(--ink-5); text-decoration: line-through; text-decoration-color: #C9D1CE; }
.li-text.strong { font-weight: 500; color: var(--ink); }

.tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px; border-radius: var(--radius-tag);
  font-size: 11px; font-weight: 500; white-space: nowrap; flex: 0 0 auto;
}
.tag-jade { background: var(--jade-soft); color: var(--jade); }
.tag-red { background: var(--cinnabar-soft); color: var(--cinnabar); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }
.tag-ai { background: var(--ai-soft); color: var(--ai); }
.tag-gray { background: #EDEBE4; color: var(--ink-4); }

.date-chip {
  width: 64px; height: 22px; flex: 0 0 64px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-tag); font-size: 11px; font-weight: 500;
}
.date-chip.jade { background: var(--jade-soft); color: var(--jade); }
.date-chip.gold { background: var(--gold-soft); color: var(--gold); }
.date-chip.red { background: var(--cinnabar-deep); color: var(--cinnabar); }

.node-chip {
  width: 44px; height: 22px; flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-tag); font-size: 11px; font-weight: 500;
}
.type-chip {
  width: 52px; height: 22px; flex: 0 0 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-tag); font-size: 11px; font-weight: 500;
}

.link-more { font-size: 11px; font-weight: 500; color: var(--jade); cursor: pointer; }

/* ============ 信任飞轮 ============ */
.stage-row { display: flex; gap: 8px; }
.stage {
  flex: 1; border-radius: var(--radius-field); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.stage-name { font-size: 12px; color: var(--ink-4); }
.stage-value { font-size: 18px; font-weight: 700; font-family: Inter, "Noto Sans SC", sans-serif; color: var(--ink); }
.stage-1 { background: var(--paper); }
.stage-2 { background: #F1EFE7; }
.stage-3 { background: var(--jade-soft); }
.stage-4 { background: var(--jade-line); }
.stage-5 { background: var(--jade-deep); }
.stage-6 { background: var(--jade); }
.stage-6 .stage-name { color: #C6DCD5; }
.stage-6 .stage-value { color: #fff; }

.stage-divider { height: 1px; background: var(--line-2); }
.rate-row { display: flex; gap: 12px; }
.rate {
  flex: 1; background: var(--soft);
  border-radius: var(--radius-field); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.rate-name { font-size: 12px; color: var(--ink-4); }
.rate-value { font-size: 20px; font-weight: 700; font-family: Inter, "Noto Sans SC", sans-serif; color: var(--jade); }

/* ============ 平台打卡 ============ */
.media-row { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: var(--radius-block); padding: 12px; }
.media-name { width: 52px; flex: 0 0 52px; font-size: 13px; font-weight: 500; }
.media-desc { flex: 1; font-size: 11px; color: var(--ink-4); min-width: 0; }

/* ============ 表单区（获客中心） ============ */
.form-label { font-size: 12px; font-weight: 500; color: var(--ink-4); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 14px; border-radius: 15px;
  display: inline-flex; align-items: center;
  font-size: 12px; background: #fff; color: var(--ink-3);
  border: 1px solid #C9D1CE; cursor: pointer; user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.chip.on { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 500; }

.draft-box {
  background: var(--soft); border-radius: var(--radius-field);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.draft-title { font-size: 14px; font-weight: 600; }
.draft-body { font-size: 12px; line-height: 20px; color: var(--ink-2); white-space: pre-line; }

.check-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check-label { font-size: 12px; font-weight: 500; color: var(--ink-4); }

.action-row { display: flex; gap: 8px; align-items: center; }
.btn-mini {
  height: 34px; padding: 0 14px; border-radius: 9px;
  display: inline-flex; align-items: center;
  font-size: 12px; background: #fff; color: var(--ink-2);
  border: 1px solid #C9D1CE; cursor: pointer; font-weight: 500; font-family: inherit;
}
.btn-mini:hover { background: var(--soft); }
.btn-mini.solid { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 600; }
.btn-mini.tint { background: var(--ai-soft); border-color: var(--ai-soft); color: var(--ai); font-weight: 600; }
.spacer { flex: 1; }

.input-box {
  background: var(--soft); border-radius: var(--radius-field);
  padding: 14px; font-size: 12px; color: var(--ink-6);
}
.point-row { display: flex; align-items: center; gap: 8px; }
.point-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--ai); flex: 0 0 6px; }
.point-text { font-size: 12px; color: var(--ink-2); }

.tab-row { display: flex; gap: 8px; }
.tab {
  height: 30px; padding: 0 14px; border-radius: var(--radius-block);
  display: inline-flex; align-items: center; font-size: 12px;
  background: #fff; color: var(--ink-3); border: 1px solid #C9D1CE; cursor: pointer;
}
.tab.on { background: var(--jade-soft); border-color: var(--jade-soft); color: var(--jade); font-weight: 500; }

.lib-item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--soft); border-radius: var(--radius-block); padding: 12px;
}
.lib-item.pending { background: var(--gold-soft); }
.lib-title { font-size: 13px; font-weight: 500; }
.lib-meta { font-size: 11px; color: var(--ink-5); }
.lib-item.pending .lib-meta { color: var(--gold); }

/* ============ 线索管理 ============ */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 14px;
  box-shadow: var(--shadow);
}
.search-box {
  width: 260px; height: 36px; flex: 0 0 260px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--soft); border: 1px solid #D9D4C9; border-radius: var(--radius-block);
  font-size: 12px; color: var(--ink-6);
}
.search-box svg { width: 16px; height: 16px; flex: 0 0 16px; }
.vsep { width: 1px; height: 24px; background: var(--line-2); flex: 0 0 1px; }
.filter-label { font-size: 12px; font-weight: 500; color: var(--ink-4); }
.chip-sm { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px;
  display: inline-flex; align-items: center; cursor: pointer; user-select: none;
  background: #fff; color: var(--ink-3); border: 1px solid #C9D1CE; }
.chip-sm.on { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 500; }
.chip-sm.red { background: var(--cinnabar-soft); border-color: var(--cinnabar-soft); color: var(--cinnabar); font-weight: 500; }
.filter-sum { margin-left: auto; font-size: 12px; color: var(--ink-4); white-space: nowrap; }

.table {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow);
}
.tr { display: flex; align-items: stretch; border-bottom: 1px solid #F5F3EB; }
.tr:last-child { border-bottom: none; }
.tr-head { background: var(--soft); border-bottom: 1px solid #EDEAE0; }
.th, .td { padding: 12px; display: flex; align-items: center; font-size: 12px; min-width: 0; }
.th { font-weight: 500; color: var(--ink-4); }
.td { font-size: 13px; }
.c-name { flex: 1.1; }
.c-name .td, .c-name .th { font-weight: 500; }
.c-channel { flex: 0 0 100px; }
.c-demand { flex: 1.6; color: var(--ink-3); }
.c-score { flex: 0 0 130px; }
.c-next { flex: 0 0 100px; color: var(--ink-3); }
.score-pill {
  height: 22px; padding: 0 8px; border-radius: var(--radius-tag);
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 500;
}
.score-hi { background: var(--cinnabar-soft); color: var(--cinnabar); }
.score-mid { background: var(--gold-soft); color: var(--gold); }
.table-foot {
  height: 40px; background: var(--soft);
  display: flex; align-items: center; padding: 0 12px;
  font-size: 11px; color: var(--ink-5);
}

.stat-row { display: flex; gap: 12px; }
.stat {
  flex: 1; background: var(--soft); border-radius: var(--radius-field);
  padding: 12px; display: flex; flex-direction: column; gap: 4px;
}
.stat.jade { background: var(--jade-soft); }
.stat-name { font-size: 12px; color: var(--ink-4); }
.stat-value { font-size: 20px; font-weight: 700; font-family: Inter, "Noto Sans SC", sans-serif; color: var(--ink); }
.stat.jade .stat-value { color: var(--jade); }

.chart-title { font-size: 12px; font-weight: 500; color: var(--ink-4); }
.bar-chart { display: flex; gap: 12px; height: 96px; }
.bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 6px;
}
.bar { width: 30px; border-radius: 4px; }
.bar-lbl { font-size: 10px; color: var(--ink-4); }
.bar-lbl.strong { color: var(--jade); font-weight: 500; }

.dist-row { display: flex; align-items: center; gap: 10px; }
.dist-name { width: 44px; flex: 0 0 44px; font-size: 12px; color: var(--ink-3); }
.dist-track { flex: 1; height: 8px; border-radius: 4px; background: var(--line-3); overflow: hidden; }
.dist-fill { height: 100%; border-radius: 4px; }
.dist-value { font-size: 12px; font-weight: 600; font-family: Inter, sans-serif; }

/* ============ 诊疗跟进 ============ */
.profile-head { display: flex; align-items: center; gap: 10px; }
.profile-name { font-size: 20px; font-weight: 600; }
.profile-tag { height: 24px; padding: 0 10px; border-radius: 7px;
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; }
.field-row { display: flex; gap: 12px; }
.field {
  flex: 1; background: var(--soft); border-radius: var(--radius-field);
  padding: 12px; display: flex; flex-direction: column; gap: 4px;
}
.field-name { font-size: 11px; color: var(--ink-5); }
.field-value { font-size: 13px; font-weight: 500; }
.field-value.red { color: var(--cinnabar); }

.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-label { font-size: 12px; font-weight: 500; color: var(--ink-4); flex: 0 0 auto; }
.progress-track { flex: 1; height: 8px; border-radius: 4px; background: var(--line-3); overflow: hidden; }
.progress-fill { width: 67%; height: 100%; border-radius: 4px; background: var(--jade); }
.progress-value { font-size: 12px; font-weight: 600; font-family: Inter, sans-serif; }

.record-row { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: var(--radius-block); padding: 12px; }
.record-date { width: 48px; flex: 0 0 48px; font-size: 11px; font-weight: 600; font-family: Inter, sans-serif; color: var(--ink-5); }
.record-text { flex: 1; font-size: 12px; color: var(--ink-2); }

.subhead-row { display: flex; align-items: center; justify-content: space-between; }
.subhead { font-size: 13px; font-weight: 600; }
.subhead-meta { font-size: 11px; color: var(--cinnabar); }

.report-card {
  background: #FFF9F8; border: 1px solid #E8D1CD;
  border-radius: var(--radius-card); padding: 20px;
  display: flex; flex-direction: column; gap: 10px; flex: 0 0 260px;
}
.report-title { font-size: 15px; font-weight: 600; color: var(--cinnabar); }
.report-desc { font-size: 12px; color: #7C5A55; line-height: 19px; }
.report-btn {
  height: 38px; border-radius: var(--radius-field); background: var(--cinnabar);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.report-btn:hover { filter: brightness(1.05); }
.report-foot { font-size: 11px; color: #A2827D; }

/* ============ 经营执行 ============ */
.week-strip { display: flex; gap: 4px; }
.week-strip .seg { flex: 1; height: 10px; border-radius: 3px; background: #EDEBE4; }
.week-strip .seg.done { background: var(--jade); }
.week-strip .seg.current { background: var(--gold); }

.phase-row { display: flex; gap: 10px; }
.phase { flex: 1; border-radius: var(--radius-field); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.phase-title { font-size: 12px; font-weight: 600; }
.phase-desc { font-size: 11px; }
.phase-1 { background: var(--jade-soft); }
.phase-1 .phase-title { color: var(--jade); }
.phase-1 .phase-desc { color: var(--jade-mid); }
.phase-2 { background: var(--gold-soft); }
.phase-2 .phase-title { color: var(--gold); }
.phase-2 .phase-desc { color: #8A7345; }
.phase-3, .phase-4 { background: var(--soft); }
.phase-3 .phase-title, .phase-4 .phase-title { color: var(--ink-4); }
.phase-3 .phase-desc, .phase-4 .phase-desc { color: var(--ink-5); }

.channel-row { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: var(--radius-block); padding: 10px 12px; }
.channel-name { flex: 1; font-size: 12px; font-weight: 500; }
.level-chip { width: 34px; height: 22px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-tag); font-size: 11px; font-weight: 500; }
.channel-focus { font-size: 11px; color: var(--ink-4); }

.fission-item { display: flex; flex-direction: column; gap: 4px; background: var(--soft); border-radius: var(--radius-block); padding: 12px; }
.fission-title { font-size: 13px; font-weight: 500; }
.fission-desc { font-size: 11px; color: var(--ink-4); }
.fission-block { background: var(--jade-soft); border-radius: var(--radius-block); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.fission-block .fission-title { color: var(--jade); }
.fission-block .fission-desc { color: var(--jade-mid); }

/* ============ 数据与合规 ============ */
.msg-row { display: flex; gap: 10px; }
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 16px; background: var(--line);
}
.bubble { flex: 1; border-radius: var(--radius-field); padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bubble-user { background: var(--soft); }
.bubble-ai { background: var(--jade-soft); margin-left: 42px; }
.bubble-role { font-size: 11px; color: var(--ink-6); }
.bubble-ai .bubble-role { color: var(--jade); font-weight: 500; }
.bubble-text { font-size: 12px; line-height: 19px; color: var(--ink-2); }
.bubble-ai .bubble-text { color: var(--jade-ink); }

.redline-card { border-color: #E8D1CD; }
.redline-title { font-size: 15px; font-weight: 600; color: var(--cinnabar); }
.redline-meta { font-size: 12px; color: var(--cinnabar); }
.redline-desc { font-size: 12px; color: #7C5A55; line-height: 19px; }
.word-row { display: flex; gap: 8px; flex-wrap: wrap; }
.word {
  height: 26px; padding: 0 10px; border-radius: 7px;
  display: inline-flex; align-items: center;
  background: var(--cinnabar-soft); color: var(--cinnabar);
  font-size: 12px; font-weight: 500;
}
.redline-note { font-size: 11px; color: #A2827D; }
.stat-red { background: var(--cinnabar-soft); border-radius: var(--radius-field); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.stat-red .stat-name { color: var(--cinnabar); font-size: 11px; }
.stat-red .stat-value { color: var(--cinnabar); font-size: 18px; }

.op-tile {
  flex: 1; border-radius: var(--radius-field); padding: 14px;
  display: flex; flex-direction: column; gap: 4px; background: var(--soft);
}
.op-tile.danger { background: var(--cinnabar-soft); }
.op-title { font-size: 13px; font-weight: 500; }
.op-tile.danger .op-title { color: var(--cinnabar); }
.op-desc { font-size: 11px; line-height: 17px; color: var(--ink-4); }
.op-tile.danger .op-desc { color: var(--cinnabar); }

.selfcheck-row { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: var(--radius-block); padding: 10px 12px; }
.selfcheck-text { flex: 1; font-size: 12px; color: var(--ink-2); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D8D3C6; border-radius: 5px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ S6 合规新增 / S4B 售后随访 / S6A AI工作台 ============ */
.rule-label { font-size: 12px; font-weight: 600; color: var(--cinnabar); }
.bound-box { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.bound-box.ok { background: var(--jade-soft); }
.bound-box.no { background: var(--cinnabar-soft); flex: 1; }
.bound-tt { font-size: 12px; font-weight: 600; }
.bound-item { font-size: 11px; color: var(--ink-2); }
.btn-go { font-size: 11px; font-weight: 500; color: #fff; padding: 4px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.cap-row { display: flex; gap: 12px; }
.cap-tile { flex: 1; background: var(--soft); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cap-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.cap-desc { font-size: 11px; color: var(--ink-4); }

/* 演示数据提示条（全屏共用） */
.demo-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 24px; font-size: 12px; letter-spacing: .2px;
  color: #8A5A12; background: #FBF1DC;
  border-bottom: 1px solid rgba(194,144,58,.35);
  flex: 0 0 auto;
}
.demo-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #C2903A); flex: 0 0 auto; }

/* 表单标签右侧说明 */
.lbl-note { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--ink-4, #8A9691); }
/* 渠道 SOP 提示条 */
.sop-tip {
  background: #F1F7F4; border: 1px dashed #B9D3CA; border-radius: 8px;
  padding: 8px 12px; font-size: 11.5px; line-height: 1.8; color: var(--ink-3);
}
.sop-tip b { color: var(--jade); font-weight: 600; }

/* [YSYNC:BEGIN] 云端同步模块 2026-09-09 17:51 */
.ysync-card { gap: 10px; }
.ysync-card .card-title { display: flex; flex-direction: column; gap: 2px; }
.ys-meta { font-size: 11px; font-weight: 400; color: var(--ink-5); }
.ys-pane { display: none; flex-direction: column; gap: 8px; }
.ys-pane.on { display: flex; }
.ys-grid9, #yp-matrix { display: none; }
#yp-matrix.on { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ys-p { background: var(--soft); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.ys-p.hl { border: 1.5px solid var(--jade); background: var(--jade-soft); }
.ys-p-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); flex-wrap: wrap; }
.ys-ic { width: 20px; height: 20px; border-radius: 5px; background: var(--jade); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.ys-pri { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--line-2); color: var(--ink-3); font-weight: 600; }
.ys-pri.p0 { background: var(--cinnabar-soft); color: var(--cinnabar); }
.ys-loc { font-size: 10.5px; color: var(--ink-5); }
.ys-p-row i, .ys-p-red i { font-style: normal; color: var(--ink-5); margin-right: 4px; }
.ys-p-red { color: var(--cinnabar); font-size: 11px; }
.ys-stats { display: flex; gap: 12px; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.ys-stat { display: flex; flex-direction: column; }
.ys-stat b { font-size: 13px; color: var(--jade-ink); }
.ys-stat span { font-size: 10px; color: var(--ink-5); }
.ys-table { width: 100%; border-collapse: collapse; font-size: 11px; color: var(--ink-3); }
.ys-table th { text-align: left; font-weight: 600; color: var(--ink-4); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); position: sticky; top: 0; }
.ys-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-3); vertical-align: top; line-height: 1.55; }
.ys-table tr:last-child td { border-bottom: none; }
.ys-td-dt { white-space: nowrap; color: var(--ink-2); font-weight: 500; }
.ys-td-task { color: var(--ink); }
.ys-td-deliv { color: var(--ink-4); }
.ys-td-def { color: var(--ink-5); font-size: 10.5px; max-width: 260px; }
.ys-td-target { color: var(--jade); font-weight: 600; }
.ys-st { font-size: 10px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.ys-st-t { background: var(--line-2); color: var(--ink-4); }
.ys-st-d { background: var(--gold-soft); color: var(--gold); }
.ys-st-ok { background: var(--jade-soft); color: var(--jade); }
.ys-cat { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--jade-soft); color: var(--jade-ink); white-space: nowrap; }
.ys-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ys-stage { background: var(--soft); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: 11px; color: var(--ink-3); line-height: 1.6; display: flex; flex-direction: column; gap: 5px; }
.ys-stage-h { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 12.5px; }
.ys-pp { font-size: 10px; font-weight: 700; color: var(--jade); background: var(--jade-soft); border-radius: 5px; padding: 1px 6px; }
.ys-tm { margin-left: auto; font-size: 10px; color: var(--ink-5); }
.ys-stage ul { margin: 0; padding-left: 16px; }
.ys-goal { border-top: 1px dashed var(--line); padding-top: 5px; color: var(--jade-ink); font-size: 10.5px; }
.ys-g30-t { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
/* [YSYNC:END] */
