/* ===== 状态栏 ===== */
.status-bar {
  height: var(--safe-top);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-card);
  position: sticky;
  top: 0;
  z-index: 100;
}
.status-bar-time { font-size: 14px; font-weight: 700; }

/* ===== 内容区域 ===== */
.content-area {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
}
.section-title {
  padding: 12px 16px 8px;
  font-size: 13px; font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: none; letter-spacing: normal;
}

/* ===== 警告横幅 ===== */
.alert-banner {
  margin: 0 16px 8px; padding: 8px 16px;
  background: #FEF3C7;
  border: none;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #92400E; line-height: 1.5;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ===== 搜索栏 ===== */
.search-bar {
  margin: 12px 16px; padding: 10px 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--color-text-tertiary);
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:hover { border-color: var(--color-brand); }
.search-bar:focus-within,
.search-bar.search-bar--focused {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: var(--color-card);
}

/* ===== 筛选标签 ===== */
.filter-tabs {
  display: flex; gap: 8px; padding: 8px 16px 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--color-border);
  background: var(--color-card); color: var(--color-text-secondary);
}
.filter-tab.active {
  background: var(--color-brand); color: white;
  border-color: var(--color-brand);
}

/* ===== 客户卡片 ===== */
.customer-card {
  margin: 0 16px 10px; padding: 14px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.2s;
  border: 1px solid transparent;
}
.customer-list-content .customer-card {
  margin: 0 16px 2px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  box-shadow: none;
  border: none;
}
.customer-list-content .customer-card:active {
  background: var(--color-border-light);
}
.customer-list-content .customer-card.due {
  background: #FFFBEB;
}
.customer-list-content .customer-card.due:active {
  background: #FEF3C7;
}
.customer-list-content .customer-card-top {
  margin-bottom: 0;
  align-items: flex-start;
}
.customer-list-content .customer-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.customer-list-content .customer-name-row .customer-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-list-content .customer-name-row .customer-follow-badge {
  flex-shrink: 0;
}
.customer-list-content .customer-list-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-tertiary);
}
.customer-list-content .customer-name .status-dot {
  display: none;
}
.customer-list-content .customer-tags {
  margin-top: 2px;
}
.customer-list-content .customer-follow-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}
.customer-list-content .customer-follow-badge.today {
  background: #FEF3C7;
  color: #92400E;
}
.customer-list-content .customer-follow-badge.overdue {
  background: #FEE2E2;
  color: #991B1B;
}
.customer-list-content .customer-follow-badge.normal {
  background: var(--color-border-light);
  color: var(--color-text-tertiary);
}
.customer-desc {
  font-size: 11px;
  color: var(--color-text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.customer-arrow {
  color: var(--color-text-tertiary);
  font-size: 17px;
  flex-shrink: 0;
  margin-left: auto;
}
.customer-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-light);
}
.customer-list-content .customer-card:hover {
  box-shadow: none;
  border-color: transparent;
}
.customer-card-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.customer-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--color-brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--color-brand);
  font-weight: 600; flex-shrink: 0;
}
.customer-info { flex: 1; min-width: 0; }
.customer-name {
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.customer-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag {
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
}
.tag-blue { background: var(--color-brand-light); color: var(--color-brand); }
.tag-green { background: var(--color-success-light); color: #047857; }
.tag-orange { background: var(--color-warning-light); color: #92400E; }
.tag-red { background: var(--color-error-light); color: #B91C1C; }
.tag-gray { background: var(--color-border-light); color: var(--color-text-secondary); }
.tag-more {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: var(--color-brand-light);
  color: var(--color-brand);
  position: relative;
  z-index: 2;
}
.tag-more:active { opacity: 0.85; }
.tag-collapse {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--color-text-tertiary);
  padding: 2px 6px;
  position: relative;
  z-index: 2;
}
.tag-collapse span {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
}
.tag-collapse:active { color: var(--color-text-secondary); }
.tag-outline {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* Get 笔记 · 统一标签（详情页 / 录音草稿 / 链接笔记） */
.note-detail-tags,
.trx-draft-tags {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.note-detail-tags { margin-top: 10px; }
.trx-draft-tags { margin-top: 8px; }
.note-detail-tags--fold .note-tag-chip:not(.note-tag-more):not(.note-tag-chip--kb),
.trx-draft-tags--fold .trx-draft-tag-chip:not(.trx-draft-tag-more) {
  padding: 2px 8px;
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
}
.note-detail-tags--expanded,
.trx-draft-tags--expanded {
  flex-wrap: wrap;
  overflow: visible;
}
.note-detail-tags--expanded .note-tag-chip,
.note-detail-tags--expanded .note-tag-chip--kb,
.trx-draft-tags--expanded .trx-draft-tag-chip {
  flex: 0 0 auto;
  max-width: none;
}
.note-tag-plus,
.trx-draft-tag-plus {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #ebebeb;
  border-radius: 4px;
  background: #fff;
  color: #999;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.note-tag-plus:active,
.trx-draft-tag-plus:active { background: #fafafa; }
/* Get笔记式标签：白底 + 极淡边 + 浅灰字，不抢标题 */
.note-tag-chip,
.trx-draft-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ebebeb;
  color: #999;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button.note-tag-chip,
button.trx-draft-tag-chip,
button.note-tag-more,
button.trx-draft-tag-more {
  font-size: 12px;
  font-family: inherit;
  font-weight: 400;
}
.note-tag-chip--kb {
  cursor: pointer;
  font-family: inherit;
  color: #999;
}
.note-tag-more,
.trx-draft-tag-more {
  cursor: pointer;
  font-family: inherit;
  background: #fff;
  border: 1px solid #ebebeb;
  color: #999;
  flex-shrink: 0;
  flex-grow: 0;
  min-width: auto;
}
.note-tag-more:active,
.trx-draft-tag-more:active { background: var(--color-border-light, #F3F4F6); }
.note-tag-collapse,
.trx-draft-tag-collapse {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
  padding: 3px 4px;
  border: none;
  background: transparent;
  color: var(--color-text-tertiary, #9CA3AF);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.note-tag-collapse span,
.trx-draft-tag-collapse span {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
}
.note-tag-collapse:active,
.trx-draft-tag-collapse:active { color: var(--color-text-secondary, #6B7280); }

.detail-source-link {
  padding: 0 16px 12px;
  font-size: 13px;
}
.detail-source-link .detail-save-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-brand-light);
}

.customer-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--color-text-tertiary);
}
.customer-meta-right { display: flex; align-items: center; gap: 4px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.green { background: var(--color-success); }
.status-dot.orange { background: var(--color-warning); }
.status-dot.red { background: var(--color-error); }
.status-dot.gray { background: var(--color-text-tertiary); }

/* ===== FAB 悬浮按钮 ===== */
.fab {
  position: fixed; right: 20px;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 20px);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-brand); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  cursor: pointer; transition: all 0.2s;
  z-index: 60; border: none;
  max-width: 375px; margin: 0 auto; right: auto; left: 50%;
  transform: translateX(calc(375px/2 - 20px - 56px));
}
.fab:hover { transform: translateX(calc(375px/2 - 20px - 56px)) scale(1.08); }

/* ===== 按钮系统 ===== */
.action-btn {
  flex: 1; padding: 12px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
}
.action-btn-primary {
  background: var(--color-brand); color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.action-btn-secondary {
  background: var(--color-card); color: var(--color-brand);
  border: 1.5px solid var(--color-brand);
}
.action-row { display: flex; gap: 10px; padding: 0 16px; margin: 14px 0; }

.save-btn {
  margin: 20px 16px; width: calc(100% - 32px);
  padding: 14px; background: var(--color-brand); color: white;
  border: none; border-radius: var(--radius-md);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s; display: block;
}
.save-btn:hover { background: var(--color-brand-dark); }

.wide-btn {
  margin: 12px 16px; width: calc(100% - 32px);
  padding: 12px; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  border: 1.5px solid var(--color-brand);
  background: var(--color-card); color: var(--color-brand);
  text-align: center; display: block;
}
.wide-btn:hover { background: var(--color-brand-light); }

/* ===== 表单元素 ===== */
.form-group { margin: 0 16px 14px; }
.form-label {
  font-size: 13px; font-weight: 600;
  color: var(--color-text-primary); margin-bottom: 6px; display: block;
}
.form-label .required { color: var(--color-error); margin-left: 2px; }
.form-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px; background: var(--color-card);
  color: var(--color-text-primary);
  transition: all 0.2s; font-family: var(--font-family);
}
.form-input:focus {
  outline: none; border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input::placeholder { color: var(--color-text-tertiary); }
textarea.form-input { min-height: 100px; resize: vertical; line-height: 1.5; }
textarea.form-input-lg { min-height: 120px; }

.form-select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px; background: var(--color-card);
  color: var(--color-text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Chip 标签选择 */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 16px 14px; }
.chip {
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid var(--color-border);
  background: var(--color-card); color: var(--color-text-secondary);
  user-select: none;
}
.chip.active {
  background: var(--color-brand-light);
  color: var(--color-brand); border-color: var(--color-brand);
}

/* Checkbox */
.checkbox-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--color-brand); cursor: pointer;
}
.checkbox-row label { font-size: 15px; color: var(--color-text-primary); cursor: pointer; }

/* ===== 名片展示 ===== */
.biz-card-hero {
  background: linear-gradient(135deg, var(--color-brand) 0%, #1D4ED8 100%);
  margin: 12px 16px; border-radius: var(--radius-lg);
  padding: 24px 20px; color: white; position: relative; overflow: hidden;
}
.biz-card-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; background: rgba(255,255,255,0.1); border-radius: 50%;
}
.biz-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white; font-weight: 700; margin-bottom: 14px;
}
.biz-name { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.biz-title { font-size: 14px; opacity: 0.85; margin-bottom: 12px; }
.biz-company { font-size: 13px; opacity: 0.75; display: flex; align-items: center; gap: 4px; }
.biz-stats {
  display: flex; gap: 20px; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.2);
}
.biz-stat { text-align: center; flex: 1; }
.biz-stat-num { font-size: 20px; font-weight: 700; }
.biz-stat-label { font-size: 11px; opacity: 0.7; margin-top: 2px; }

/* ===== 菜单列表 ===== */
.menu-list {
  background: var(--color-card);
  margin: 12px 16px; border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.menu-item {
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--color-border-light);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #F9FAFB; }
.menu-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--color-brand-light); color: var(--color-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.menu-label { flex: 1; font-size: 15px; font-weight: 500; }
.menu-arrow { color: var(--color-text-tertiary); font-size: 14px; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center; padding: 40px 30px;
  color: var(--color-text-tertiary);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--color-text-secondary); }
.empty-state-desc { font-size: 13px; line-height: 1.5; }

/* ===== 详情区块 ===== */
.detail-section {
  background: var(--color-card); margin: 0 16px 10px;
  padding: 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.detail-section-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 12px; }
.detail-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light); font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--color-text-secondary); }
.detail-row-value { color: var(--color-text-primary); font-weight: 500; }

/* ===== 时间线 ===== */
.timeline { padding: 0 16px; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 2px; background: var(--color-border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-brand-light); color: var(--color-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; z-index: 2;
}
.timeline-content { flex: 1; }
.timeline-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.timeline-desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; }

/* ===== 7步模型步骤卡片 ===== */
.step-card {
  background: var(--color-card); margin: 0 16px 10px;
  padding: 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); border-left: 3px solid var(--color-brand);
}
.step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.step-number {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-brand); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step-name { font-size: 15px; font-weight: 600; color: var(--color-brand); }
.step-content { font-size: 14px; color: var(--color-text-primary); line-height: 1.6; }

/* ===== 套餐卡片 ===== */
.plan-card {
  background: var(--color-card); margin: 0 16px 10px;
  padding: 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); border: 2px solid var(--color-border);
  cursor: pointer; transition: all 0.2s;
}
.plan-card:hover { border-color: var(--color-brand); }
.plan-card.active { border-color: var(--color-brand); background: var(--color-brand-light); }
.plan-name { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.plan-feature {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 14px; color: var(--color-text-secondary);
}
.plan-feature-value { font-weight: 600; color: var(--color-text-primary); }
.plan-feature-value.yes { color: var(--color-success); }
.plan-feature-value.no { color: var(--color-error); }

/* ===== 底部操作栏 ===== */
.bottom-bar {
  position: fixed; bottom: 0;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  background: var(--color-card);
  border-top: 1px solid var(--color-border-light);
  display: flex; gap: 10px; z-index: 90;
}
.bottom-bar .action-btn { flex: 1; min-width: 0; }

/* 案例详情页底栏由 02-layout 接管为 flex 子项，不走 fixed */
#page-detail .bottom-bar {
  position: relative;
  bottom: auto;
}

/* ===== 辅助文字 ===== */
.sub-info { margin: -8px 16px 12px; font-size: 12px; color: var(--color-text-tertiary); }
.divider { height: 1px; background: var(--color-border-light); margin: 0 16px; }

/* ===== 响应式：防止超出 375px ===== */
@media (min-width: 376px) {
  body { box-shadow: 0 0 40px rgba(0,0,0,0.1); }
  .fab { left: auto; right: auto; margin-left: calc(375px - 76px); transform: none; }
  .fab:hover { transform: scale(1.08); }
}
