/* BG6SVE 工作台 · iOS 风格主屏幕 */
:root {
  --bg: #e8eef8;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6b7280;
  --accent: #5b8def;
  --accent-dark: #3a6fd8;
  --danger: #e85d5d;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 10%, #c7d7f5 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, #d4e4fc 0%, transparent 45%),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px;
  padding-top: max(12px, var(--safe-top));
  padding-bottom: max(12px, var(--safe-bottom));
}

/* 桌面端手机框；窄屏全宽 */
#phone-frame {
  width: 100%;
  max-width: 420px;
  min-height: min(860px, calc(100vh - 24px));
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 20px 50px rgba(60, 90, 140, 0.18);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  body { padding: 0; }
  #phone-frame {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* 状态栏 */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.75;
}
.status-right { font-size: 11px; letter-spacing: 1px; opacity: 0.55; pointer-events: none; user-select: none; }

/* 屏幕切换 */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.screen.active { display: flex; }

/* —— 主屏幕 —— */
.home-header {
  text-align: center;
  padding: 18px 16px 8px;
}
.home-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.home-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.home-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 10px;
  padding: 28px 18px 16px;
}

.app-icon {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font: inherit;
  min-height: 88px; /* 大点击区 */
}
.app-icon:active .icon-tile { transform: scale(0.92); opacity: 0.9; }

.icon-tile {
  width: 62px;
  height: 62px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, opacity 0.12s ease;
  user-select: none;
}
.icon-ledger {
  background: linear-gradient(145deg, #34c759, #1a9e45);
  font-size: 26px;
  font-weight: 700;
}
.icon-visits { background: linear-gradient(145deg, #5b8def, #3a6fd8); }
.icon-projects { background: linear-gradient(145deg, #ff9f0a, #e68600); }
.icon-files { background: linear-gradient(145deg, #af52de, #8e3cb8); }
.icon-contacts { background: linear-gradient(145deg, #64d2ff, #32ade6); }
.icon-sync { background: linear-gradient(145deg, #5ac8fa, #007aff); font-size: 30px; }
.app-icon.is-syncing .icon-tile { opacity: 0.75; }
.app-icon.sync-ok .icon-label { color: var(--accent, #5b8def); }
.app-icon.sync-err .icon-label { color: #ff3b30; }

.icon-label {
  font-size: 12px;
  text-align: center;
  line-height: 1.25;
  max-width: 76px;
  word-break: keep-all;
}

.home-foot {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 16px 12px 28px;
}

/* —— 应用内屏幕 —— */
.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 2;
}
.app-bar h2 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  text-align: center;
}
.back-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 500;
  padding: 8px 6px;
  cursor: pointer;
  min-width: 72px;
  text-align: left;
}
.bar-action {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font-size: 26px;
  line-height: 1;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 10px;
}
.bar-action:active { background: rgba(91, 141, 239, 0.12); }

/* 客户拜访：右上角新建更醒目 */
.bar-action-add {
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 10px rgba(58, 111, 216, 0.35);
}
.bar-action-add:active {
  background: var(--accent-dark);
  color: #fff;
}

.visit-list-card .item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.visit-card-line {
  margin-top: 2px;
}
.visit-card-follow {
  margin-top: 4px;
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.visit-time-list {
  margin-bottom: 72px;
}

.fab-add {
  appearance: none;
  position: sticky;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 16px 0 4px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(58, 111, 216, 0.35);
  z-index: 2;
}
.fab-add:active { background: var(--accent-dark); }


.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 28px;
  -webkit-overflow-scrolling: touch;
}

.hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 28px 12px;
}

.hidden { display: none !important; }
/* 拜访表单默认不露：防其它规则把 card-form 顶出来 */
#visits-form.hidden,
#visits-form[hidden],
.card-form.hidden,
.card-form[hidden] {
  display: none !important;
}

/* 表单 */
.card-form {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.card-form input,
.card-form select,
.card-form textarea {
  font: inherit;
  font-size: 16px; /* 避免 iOS 缩放 */
  color: var(--text);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f9fafb;
}
.card-form textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.4;
}
.card-form input:focus,
.card-form select:focus,
.card-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-heading {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
}
.search-wrap {
  margin-bottom: 12px;
}
.search-wrap input[type="search"] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.9);
}
.search-wrap input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.item-card-tap { cursor: pointer; }
.item-card-tap:active { background: #f3f6fb; }
.item-meta-block { display: flex; flex-direction: column; gap: 2px; }
.item-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 500;
}
.item-link:active { opacity: 0.7; }
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.btn-primary, .btn-secondary {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  min-height: 44px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:active { background: var(--accent-dark); }
.btn-secondary {
  background: #eef1f6;
  color: var(--text);
}

/* 列表 */
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.item-main { flex: 1; min-width: 0; }
.item-title {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 2px;
  word-break: break-word;
}
.item-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
.item-del {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  padding: 8px 6px;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
}

.group-block { margin-bottom: 16px; }
.group-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-dark);
  margin: 0 0 8px;
  padding-left: 2px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent-dark);
  margin-left: 6px;
  vertical-align: middle;
}
.badge-done { background: #e8f8ee; color: #1a9e45; }
.badge-hold { background: #f3f4f6; color: #6b7280; }
.badge-wait { background: #fff4e5; color: #c77700; }
.badge-call { background: #f3e8ff; color: #7c3aed; }

/* 拜访「联系电话」更醒目 */
.card-form label.phone-field {
  display: block;
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(91, 141, 239, 0.08);
  border: 1px solid rgba(91, 141, 239, 0.28);
  font-weight: 600;
}
.card-form label.phone-field input {
  font-weight: 500;
  letter-spacing: 0.02em;
}

.call-notes-label textarea { min-height: 6.5em; }
.call-notes-emphasize { border: 1px solid #e9d5ff; background: #faf5ff; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.call-notes-emphasize textarea { background: #fff; }
.dimmed-when-call { opacity: 0.72; }

/* 工具条 / 芯片按钮 */
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 12px;
}
.btn-chip {
  appearance: none;
  border: none;
  background: #eef4ff;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
}
.btn-chip:active { background: #dce8ff; }

.toast {
  background: #1c1c1e;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.item-edit {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  padding: 8px 6px;
  cursor: pointer;
  min-height: 36px;
}

.contact-expand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef1f6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.expand-title {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-dark);
}
.expand-hint {
  color: var(--accent-dark) !important;
  font-weight: 500;
}
.visit-snip {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.visit-snip:active { background: #eef4ff; }
.visit-snip-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.visit-snip-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.extract-panel { margin-bottom: 14px; }
.extract-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.extract-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 10px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}
.extract-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.extract-row-exists {
  opacity: 0.72;
  background: #f3f4f6;
}
.extract-body { flex: 1; min-width: 0; }
.extract-name {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.file-subhead {
  margin: 10px 0 6px;
  padding-left: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}


/* —— 同步芯片 —— */
.sync-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  flex: 0 0 auto;
  max-width: 14rem;
  min-width: 6.5rem;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(91, 141, 239, 0.45);
  background: #eef4ff;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent, #5b8def);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(91, 141, 239, 0.18);
}
.sync-chip.syncing { color: var(--accent, #5b8def); border-color: var(--accent, #5b8def); }
.sync-chip.ok { color: var(--accent, #5b8def); }
.sync-chip.err { color: #ff3b30; border-color: color-mix(in srgb, #ff3b30 40%, rgba(0,0,0,0.12)); }
.sync-chip:active { background: rgba(0, 0, 0, 0.06); }

.badge-visit { background: #eef4ff; color: var(--accent-dark); }
.badge-wechat { background: #e8f8ee; color: #1a9e45; }
.btn-chip.is-active {
  background: var(--accent, #5b8def);
  color: #fff;
}
.file-chip { display: inline-flex; align-items: center; cursor: pointer; }
.file-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.wechat-panel {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wechat-panel.hidden { display: none; }
.wechat-notes-label textarea { min-height: 5.5em; background: #fff; }
.wechat-attach-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  color: #166534;
}
.wechat-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.wechat-preview-cell {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #fff;
}
.wechat-preview-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.wechat-preview-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.visit-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.visit-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: zoom-in;
}
.visit-thumb-more {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.img-lightbox.hidden { display: none; }
.img-lightbox img {
  max-width: min(96vw, 900px);
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.img-lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}


/* 编辑拜访：业务跟进入口 */
.visits-append-tip {
  margin: 8px 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff8e8;
  color: #8a5a00;
  border: 1px solid #f0d9a0;
  font-size: 12.5px;
  line-height: 1.45;
}
.visits-append-actions,
.contact-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.btn-append {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  min-height: 40px;
  flex: 1 1 auto;
  text-align: center;
}
.btn-append-call {
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #e9d5ff;
}
.btn-append-wechat {
  background: #e8f8ee;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.btn-append-visit {
  background: #eef4ff;
  color: var(--accent-dark);
  border: 1px solid #cfe0ff;
}
.btn-append:active { opacity: 0.85; }
#visits-location-label {
  display: block;
}


/* 业务历程：全文分区（不截断） */
.group-block-person .item-list {
  position: relative;
  gap: 12px;
}
.group-block-person .item-card {
  border-left: 3px solid rgba(91, 141, 239, 0.45);
  padding-left: 12px;
}
.visit-journey {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.visit-journey-head {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}
.visit-journey-extra {
  margin: 0 !important;
}
.visit-section {
  background: #f7f9fc;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  padding: 8px 10px;
}
.visit-section-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
}
.visit-section-body {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.contact-journey-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.visit-journey-card {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
  border-left: 3px solid rgba(91, 141, 239, 0.45);
}
.visit-journey-card:active { background: #f3f6fb; }
.visit-journey-card .visit-journey { margin-top: 0; }
.visits-person-journey {
  margin: 0 0 10px;
}
.person-journey-fold {
  background: #f7f9fc;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 8px 10px;
}
.person-journey-fold > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-dark);
  list-style: none;
}
.person-journey-fold > summary::-webkit-details-marker { display: none; }
.person-journey-fold-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.visit-snip-compact { padding: 8px 10px; }


/* 客户拜访：单人业务历程页 */
.visits-person-detail {
  margin: 0 0 12px;
}
.visits-detail-card {
  background: var(--card, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.visits-detail-order-hint {
  margin: 4px 0 10px;
}
.visits-detail-actions {
  margin: 0 0 10px;
}
.visits-detail-actions .btn-primary,
.visits-detail-actions .btn-secondary {
  flex: 1 1 auto;
  min-height: 42px;
}
.visits-channel-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #e8edf5;
}
.visits-channel-picker.hidden,
.visits-person-detail.hidden {
  display: none !important;
}
.visits-channel-picker-title {
  flex: 1 1 100%;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}
.visits-channel-picker .btn-append,
.visits-channel-picker .btn-secondary {
  flex: 1 1 40%;
}
.visits-detail-journey {
  max-height: min(62vh, 560px);
  margin-top: 4px;
}
.visits-detail-empty {
  margin: 8px 0 0;
  color: var(--muted, #6b7280);
  font-size: 13px;
}

.visits-group-journey {
  max-height: min(55vh, 480px);
  margin-top: 6px;
}
.group-block .group-title {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* 业务历程卡：只读展示；编辑走小按钮 */
.visit-journey-card-ro {
  cursor: default;
}
.visit-journey-card-ro:active {
  background: #fff;
}
.visit-journey-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e8edf5;
}
.visit-journey-edit {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 650;
}
.visits-list-channel-picker {
  margin-top: 12px;
}

/* 历程追加跟进：精简表单 */
.visits-followup-context {
  margin: -4px 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef4ff;
  color: #1e3a5f;
  font-size: 13px;
  line-height: 1.4;
}
#visits-form.visits-form-compact .form-row:has(#visits-date-label) {
  display: block;
}
#visits-form.visits-form-compact #visits-date-label {
  display: block;
  width: 100%;
}
#visits-form.visits-form-compact #visits-channel-label.hidden + #visits-date-label,
#visits-form.visits-form-compact #visits-date-label {
  flex: 1;
}
