/* pages/customer-detail/customer-detail.wxss */
page {
  background-color: var(--bg-primary);
  line-height: 1.5;
}

view {
  line-height: inherit;
}

.page-loading,
.page-empty,
.page-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 24rpx;
}

.empty-text,
.error-text {
  font-size: 26rpx;
  color: var(--text-tertiary);
  line-height: 36rpx;
}

.retry-btn {
  padding: 16rpx 48rpx;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 16rpx;
  font-size: 26rpx;
  line-height: 36rpx;
}

.retry-btn--hover {
  opacity: 0.7;
}

.banner-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 100%;
}

.banner-bg-img {
  position: absolute;
  top: -20rpx;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
}

.banner-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36rpx 40rpx;
}

.customer-header {
  display: flex;
  align-items: center;
  gap: 32rpx;
}

.avatar-box {
  width: 128rpx;
  height: 128rpx;
  border-radius: 32rpx;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
}

.avatar-text {
  font-size: 48rpx;
  font-weight: 700;
  color: var(--color-white);
}

.info-right {
  flex: 1;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 12rpx;
  margin-bottom: 16rpx;
  flex-wrap: wrap;
}

.customer-name {
  font-size: 36rpx;
  font-weight: 600;
  color: var(--color-white);
}

.sub-info {
  display: flex;
  align-items: center;
  gap: 24rpx;
  margin-top: 8rpx;
}

.phone {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.7);
}

.phone-toggle-btn {
  padding: 4rpx 14rpx;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 8rpx;
  display: flex;
  align-items: center;
}

.phone-toggle-text {
  font-size: 22rpx;
  line-height: 32rpx;
  color: rgba(255, 255, 255, 0.9);
}

.phone-toggle-btn--hover {
  opacity: 0.7;
}

.banner-stats {
  margin: 24rpx 0 0 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 24rpx;
  backdrop-filter: blur(8px);
  display: flex;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 24rpx 0;
}

.stat-border {
  border-right: 2rpx solid rgba(255, 255, 255, 0.1);
}

.stat-value {
  display: block;
  font-size: 28rpx;
  font-weight: 700;
  color: var(--color-white);
}

.stat-green {
  color: #6ee7b7;
}

.stat-amber {
  color: #fcd34d;
}

.stat-label {
  display: block;
  font-size: 22rpx;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rpx;
}

.main-content {
  padding: 32rpx;
  padding-bottom: 220rpx;
  display: flex;
  flex-direction: column;
  gap: 32rpx;
}

.ai-insight-card {
  border-radius: 32rpx;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 40rpx 40rpx 0 40rpx;
  color: var(--color-white);
}

.ai-insight-header {
  display: flex;
  align-items: center;
  gap: 16rpx;
  margin-bottom: 20rpx;
}

.ai-icon-box {
  width: 44rpx;
  height: 44rpx;
  background: linear-gradient(135deg, #ee00ff9c, #764ba284);
  border-radius: 14rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ai-icon-img {
  width: 30rpx;
  height: 30rpx;
}

.ai-insight-label {
  font-size: 26rpx;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.ai-insight-summary-v{
  line-height: 34rpx;
  margin-bottom: 28rpx;
}

.ai-insight-summary {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.9);
}

.ai-strategy-box {
  background: rgba(0, 0, 0, 0.08);
  margin: 0 -40rpx;
  padding: 38rpx 40rpx 40rpx 40rpx;
}

.strategy-title {
  font-size: 24rpx;
  color: rgba(255, 255, 255);
  margin-bottom: 10rpx;
  display: block;
  font-weight: 700;
}

.strategy-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.strategy-item {
  display: flex;
  align-items: flex-start;
  gap: 24rpx;
  margin: 14rpx 14rpx 10rpx 8rpx;
  padding: 0rpx 0 14rpx 16rpx;
  border-left: 6rpx solid;
  border-bottom: 2rpx solid rgba(255, 255, 255, 0.1);
  line-height: 36rpx;
}

.strategy-item-last {
  border-bottom: none;
}

.strategy-item-green {
  border-left-color: #6ee7b7;
}

.strategy-item-amber {
  border-left-color: #fcd34d;
}

.strategy-item-pink {
  border-left-color: #f9a8d4;
}

.strategy-dot {
  width: 12rpx;
  height: 12rpx;
  border-radius: 50%;
  margin-top: 12rpx;
  flex-shrink: 0;
}

.dot-green {
  background: #6ee7b7;
}

.dot-amber {
  background: #fcd34d;
}

.dot-pink {
  background: #f9a8d4;
}

.strategy-text {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.85);
}

.card {
  background: var(--bg-secondary);
  border-radius: 32rpx;
  padding: 40rpx;
  box-shadow: 0 8rpx 32rpx var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32rpx;
}

.card-header--hover {
  opacity: 0.7;
}

.section-title {
  font-size: 28rpx;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-left: 20rpx;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6rpx;
  height: 28rpx;
  border-radius: 4rpx;
}

.title-green::before {
  background: linear-gradient(180deg, var(--color-success), #4cd964);
}

.title-blue::before {
  background: linear-gradient(180deg, var(--color-primary), var(--primary-500));
}

.title-orange::before {
  background: linear-gradient(180deg, var(--color-warning), #ffc107);
}

.title-pink::before {
  background: linear-gradient(180deg, var(--rel-excellent-from), #f5a0c0);
}

.header-hint {
  font-size: 22rpx;
  color: var(--text-tertiary);
}

.ai-badge-box {
  display: flex;
  align-items: center;
  gap: 8rpx;
  background: var(--color-primary-light);
  padding: 4rpx 16rpx;
  border-radius: 100rpx;
}

.ai-badge-icon {
  width: 24rpx;
  height: 24rpx;
}

.ai-badge-text {
  font-size: 22rpx;
  color: var(--color-primary);
}

.clue-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.coach-task-list {
  display: flex;
  flex-direction: column;
  gap: 24rpx;
}

.coach-task-card {
  border-radius: 24rpx;
  padding: 24rpx;
}

/* 助教任务卡片背景 — 严格对齐 VI-DESIGN-SYSTEM.md 1.1 节 */
.coach-card-red {
  background: linear-gradient(135deg, rgb(255 158 158 / 8%), rgb(220 101 101 / 6%));
  border: 2rpx solid rgba(220, 38, 38, 0.3);
}

.coach-card-pink {
  background: linear-gradient(135deg, rgb(255 187 221 / 8%), rgb(201 106 153 / 6%));
  border: 2rpx solid rgba(236, 72, 153, 0.3);
}

.coach-card-orange {
  background: linear-gradient(135deg, rgb(247 202 171 / 8%), rgb(209 120 58 / 6%));
  border: 2rpx solid rgba(249, 115, 22, 0.3);
}

.coach-card-teal {
  background: linear-gradient(135deg, rgb(167 255 245 / 8%), rgb(85 138 132 / 6%));
  border: 2rpx solid rgba(20, 184, 166, 0.3);
}

.coach-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rpx;
}

.coach-name-row {
  display: flex;
  align-items: center;
  gap: 12rpx;
}

.coach-task-right {
  display: flex;
  align-items: center;
  gap: 8rpx;
  flex-shrink: 0;
}

.coach-name {
  font-size: 26rpx;
  font-weight: 600;
  color: var(--text-primary);
}

.coach-level {
  font-size: 22rpx;
  padding: 4rpx 16rpx;
  border-radius: 100rpx;
  font-weight: 500;
}

.level-pink {
  background: var(--coach-senior-bg);
  color: var(--coach-senior-text);
}

.level-purple {
  background: var(--tag-social-bg);
  color: var(--tag-social-text);
}

.level-green {
  background: var(--tag-consume-bg);
  color: var(--tag-consume-text);
}

.coach-task-type {
  font-size: 22rpx;
  padding: 4rpx 16rpx;
  border-radius: 100rpx;
  font-weight: 500;
}

.type-red {
  background: var(--color-error-light);
  color: var(--task-high-priority-from);
}

.type-pink {
  background: var(--coach-senior-bg);
  color: var(--rel-excellent-from);
}

.type-orange {
  background: var(--tag-hobby-bg);
  color: var(--tag-hobby-text);
}

.type-teal {
  background: var(--task-callback-bg, #e6f9f6);
  color: var(--task-callback-to);
}

.coach-task-status {
  font-size: 20rpx;
  padding: 4rpx 12rpx;
  border-radius: 100rpx;
  font-weight: 500;
}

.status-pinned {
  background: var(--status-pinned-shadow-light);
  color: var(--color-primary);
}

.status-abandoned {
  background: rgba(156, 163, 175, 0.2);
  color: var(--status-abandoned-text);
}

.coach-last-service {
  font-size: 22rpx;
  color: var(--text-secondary);
  margin-bottom: 24rpx;
  display: block;
}

.coach-metrics {
  display: flex;
  gap: 16rpx;
}

.coach-metric {
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16rpx;
  padding: 12rpx 0;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 20rpx;
  color: var(--text-tertiary);
  margin-bottom: 4rpx;
}

.metric-value {
  display: block;
  font-size: 24rpx;
  font-weight: 700;
  color: var(--text-primary);
}

.fav-coach-list {
  display: flex;
  flex-direction: column;
  gap: 24rpx;
}

.fav-coach-card {
  border-radius: 24rpx;
  padding: 24rpx;
}

.fav-card-pink {
  background: linear-gradient(135deg, rgb(255 158 158 / 8%), rgb(220 101 101 / 6%));
  border: 2rpx solid rgba(249, 168, 212, 0.6);
}

.fav-card-amber {
  background: linear-gradient(135deg, rgb(255 253 246 / 80%), rgb(255 251 206 / 60%));
  border: 2rpx solid rgba(252, 211, 77, 0.6);
}

.fav-card-blue {
  background: linear-gradient(135deg, rgb(248 251 255 / 80%), rgb(238 245 250 / 60%));
  border: 2rpx solid rgba(147, 197, 253, 0.6);
}

.fav-coach-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0rpx;
}

.fav-coach-name {
  display: flex;
  align-items: center;
  gap: 8rpx;
}

.fav-emoji {
  font-size: 30rpx;
}

.fav-name {
  font-size: 30rpx;
  font-weight: 600;
  color: var(--text-primary);
}

.fav-index {
  display: flex;
  align-items: center;
  gap: 12rpx;
}

.fav-index-label {
  font-size: 22rpx;
  color: var(--text-secondary);
}

.fav-index-value {
  font-size: 36rpx;
  font-weight: 700;
}

.fav-period {
  font-size: 22rpx;
  color: var(--text-secondary);
  margin-bottom: 12rpx;
  padding-left: 4rpx;
}

.fav-stats {
  display: flex;
  gap: 16rpx;
}

.fav-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16rpx;
  padding: 16rpx 0;
  text-align: center;
}

.fav-stat-label {
  display: block;
  font-size: 22rpx;
  color: var(--text-secondary);
  margin-bottom: 4rpx;
}

.fav-stat-value {
  display: block;
  font-size: 28rpx;
  font-weight: 700;
  color: var(--text-primary);
}

/* CHANGE 2026-03-29 | 展开/收起按钮 */
.expand-btn {
  display: flex;
  justify-content: center;
  padding: 20rpx 0;
}
.expand-btn-text {
  font-size: 24rpx;
  color: var(--color-primary);
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 24rpx;
}

.record-card {
  border-radius: 24rpx;
  border: 2rpx solid var(--color-gray-4);
  overflow: hidden;
}

.record-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 24rpx;
  border-bottom: 2rpx solid rgba(219, 234, 254, 0.5);
}

.record-header-blue {
  background: linear-gradient(90deg, var(--color-primary-light), #eef2ff);
}

.record-header-green {
  background: linear-gradient(90deg, var(--tag-consume-bg), #f0fdf4);
}

.record-project {
  display: flex;
  align-items: center;
  gap: 12rpx;
}

.record-dot {
  width: 12rpx;
  height: 12rpx;
  border-radius: 50%;
}

.record-dot-blue {
  background: var(--color-primary);
}

.record-dot-green {
  background: var(--color-success);
}

.record-project-name {
  font-size: 24rpx;
  font-weight: 600;
}

.record-name-blue {
  color: var(--color-primary);
}

.record-name-green {
  color: var(--color-success);
}

.record-date {
  font-size: 24rpx;
  color: var(--text-secondary);
}

.record-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 24rpx;
  border-bottom: 2rpx solid var(--border-light);
}

.record-time-left {
  display: flex;
  align-items: center;
  gap: 12rpx;
}

.record-time-text {
  font-size: 28rpx;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.record-time-arrow {
  font-size: 24rpx;
  color: var(--text-secondary);
}

.record-duration-tag {
  font-size: 22rpx;
  padding: 4rpx 16rpx;
  margin-left: 20rpx;
  background: var(--color-primary-shadow-minimal);
  color: var(--color-primary);
  border-radius: 100rpx;
  font-weight: 500;
}

.record-fee-right {
  display: flex;
  align-items: baseline;
  gap: 8rpx;
  flex-shrink: 0;
}

.record-fee-amount {
  font-size: 28rpx;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.record-fee-orig {
  font-size: 22rpx;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.record-coaches {
  padding: 20rpx 24rpx ;
}

.record-coach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16rpx;
}

.record-coach-card {
  background: #fafafa;
  border-radius: 16rpx;
  padding: 20rpx;
}

.record-coach-name-row {
  display: flex;
  align-items: center;
  gap: 8rpx;
  margin-bottom: 4rpx;
}

.record-coach-name {
  font-size: 24rpx;
  font-weight: 700;
  color: var(--text-primary);
}

.record-coach-level {
  font-size: 20rpx;
  padding: 2rpx 8rpx;
  border-radius: 4rpx;
}

.level-tag-pink {
  background: var(--coach-senior-bg);
  color: var(--coach-senior-text);
}

.level-tag-purple {
  background: var(--tag-social-bg);
  color: var(--tag-social-text);
}

.level-tag-green {
  background: var(--tag-consume-bg);
  color: var(--tag-consume-text);
}

.record-coach-type {
  font-size: 22rpx;
  color: var(--text-secondary);
}

.record-coach-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4rpx;
}

.record-coach-perf {
  font-size: 22rpx;
  color: var(--color-warning);
  flex: 1;
}

.record-coach-fee {
  font-size: 24rpx;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.record-food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16rpx 24rpx;
  border-top: 2rpx solid var(--border-light);
  gap: 16rpx;
}

.record-food-label {
  font-size: 24rpx;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  word-break: break-all;
}

.record-food-right {
  display: flex;
  align-items: baseline;
  gap: 8rpx;
}

.record-food-amount {
  font-size: 28rpx;
  font-weight: 500;
  color: var(--color-warning);
  font-variant-numeric: tabular-nums;
}

.record-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16rpx 24rpx 20rpx;
  border-top: 2rpx solid var(--color-gray-4);
}

.record-total-label {
  font-size: 24rpx;
  font-weight: 600;
  color: var(--text-secondary);
}

.record-total-right {
  display: flex;
  align-items: baseline;
  gap: 8rpx;
}

.record-total-amount {
  font-size: 32rpx;
  font-weight: 700;
  color: var(--color-error);
  font-variant-numeric: tabular-nums;
}

.record-loading-more {
  display: flex;
  justify-content: center;
  padding: 24rpx 0;
}

.record-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48rpx 0;
  gap: 16rpx;
}

.empty-hint {
  font-size: 24rpx;
  color: var(--text-disabled);
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 128rpx;
  background: var(--color-white-overlay-light);
  backdrop-filter: blur(20px);
  border-top: 2rpx solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 24rpx;
  padding: 0 32rpx;
  z-index: 100;
}

.btn-chat {
  flex: 1;
  height: 88rpx;
  background: linear-gradient(135deg, var(--color-primary), var(--primary-500));
  color: var(--color-white);
  font-weight: 500;
  border-radius: 24rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
  font-size: 28rpx;
  box-shadow: 0 8rpx 24rpx var(--color-primary-shadow);
}

.btn-chat--hover {
  opacity: 0.85;
}

.btn-note {
  flex: 1;
  height: 88rpx;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 500;
  border-radius: 24rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
  font-size: 28rpx;
}

.btn-note--hover {
  background: var(--border-light);
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.note-item {
  background: #fafafa;
  border-radius: 24rpx;
  border: 2rpx solid #e7e7e7;
  padding: 24rpx;
}

.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12rpx;
}

.note-top-right {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.note-delete-btn {
  padding: 8rpx;
  border-radius: 8rpx;
}

.note-delete-btn--hover {
  background: rgba(0, 0, 0, 0.05);
}

.note-author {
  font-size: 24rpx;
  font-weight: 500;
  color: var(--text-primary);
}

.note-time {
  font-size: 22rpx;
  color: var(--text-tertiary);
}

.note-content {
  font-size: 24rpx;
  color: var(--text-secondary);
  line-height: 1.6;
}

.note-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48rpx 0;
  gap: 16rpx;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.text-error {
  color: var(--color-error) !important;
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}