/* pages/customer-records/customer-records.wxss */
/* CHANGE 2026-03-29 | CUST-3: 客户消费记录页面样式 */
/* Banner 复用 customer-detail，月份切换复用 customer-service-records，卡片复用 customer-detail */

page {
  background-color: var(--bg-primary);
  line-height: 1.5;
}

/* ========== 页面状态 ========== */
.page-loading, .page-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 24rpx;
}
.error-text { font-size: 26rpx; color: var(--color-error, #e34d59); }
.retry-btn {
  padding: 16rpx 48rpx;
  background: var(--color-primary, #0052d9);
  color: #ffffff;
  border-radius: 16rpx;
  font-size: 26rpx;
}
.retry-btn--hover { opacity: 0.7; }

/* ========== Banner（复用 customer-detail 暗金色风格）========== */
.banner-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.banner-bg-img {
  position: absolute;
  top: -20rpx;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 0;
}
.banner-overlay {
  position: relative;
  z-index: 2;
  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, #fff);
}
.info-right { flex: 1; }
.name-row {
  display: flex;
  align-items: center;
  gap: 12rpx;
  margin-bottom: 16rpx;
}
.customer-name {
  font-size: 36rpx;
  font-weight: 600;
  color: var(--color-white, #fff);
}
.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, #fff);
}
.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;
}

/* ========== 月份切换（复用 customer-service-records）========== */
.month-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48rpx;
  background: #ffffff;
  padding: 24rpx 32rpx;
  border-bottom: 2rpx solid #eeeeee;
}
.month-btn { padding: 12rpx; border-radius: 50%; }
.month-btn.disabled { opacity: 0.3; }
.month-label { font-size: 26rpx; font-weight: 600; color: #242424; }

/* ========== 月度汇总 ========== */
.month-summary {
  display: flex;
  align-items: flex-start;
  background: #ffffff;
  padding: 24rpx 0;
  border-bottom: 2rpx solid #eeeeee;
}
.summary-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rpx;
}
.summary-label { font-size: 20rpx; color: #a6a6a6; line-height: 29rpx; }
.summary-value {
  font-size: 34rpx;
  font-weight: 700;
  color: #242424;
  font-variant-numeric: tabular-nums;
  line-height: 44rpx;
}
.value-primary { color: #0052d9; }
.value-green { color: #2ba471; }
.summary-divider { width: 2rpx; height: 64rpx; background: #eeeeee; margin-top: 4rpx; }

/* ========== 消费记录列表 ========== */
.records-container {
  padding: 24rpx 30rpx;
  padding-bottom: 100rpx;
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}
.month-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80rpx 0;
  gap: 16rpx;
}
.month-loading-text { font-size: 26rpx; color: #a6a6a6; }
.no-month-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80rpx 0;
  gap: 20rpx;
}
.no-month-text { font-size: 26rpx; color: #a6a6a6; }
.list-footer { text-align: center; padding: 20rpx 0 8rpx; }
.footer-text { font-size: 20rpx; color: #c5c5c5; }

/* ========== 消费记录卡片（复用 customer-detail）========== */
.record-card {
  border-radius: 24rpx;
  border: 2rpx solid var(--color-gray-4, #dcdcdc);
  overflow: hidden;
  background: #ffffff;
}
.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, #e8f0fe), #eef2ff); }
.record-header-green { background: linear-gradient(90deg, var(--tag-consume-bg, #e6f9f0), #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, #0052d9); }
.record-dot-green { background: var(--color-success, #2ba471); }
.record-project-name { font-size: 24rpx; font-weight: 600; }
.record-name-blue { color: var(--color-primary, #0052d9); }
.record-name-green { color: var(--color-success, #2ba471); }
.record-date { font-size: 24rpx; color: var(--text-secondary, #666); }
.record-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 24rpx;
  border-bottom: 2rpx solid var(--border-light, #f0f0f0);
}
.record-time-left { display: flex; align-items: center; gap: 12rpx; }
.record-time-text {
  font-size: 28rpx;
  font-weight: 500;
  color: var(--text-primary, #242424);
  font-variant-numeric: tabular-nums;
}
.record-time-arrow { font-size: 24rpx; color: var(--text-secondary, #666); }
.record-duration-tag {
  font-size: 22rpx;
  padding: 4rpx 16rpx;
  margin-left: 20rpx;
  background: var(--color-primary-shadow-minimal, rgba(0,82,217,0.08));
  color: var(--color-primary, #0052d9);
  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, #242424);
  font-variant-numeric: tabular-nums;
}
.record-fee-orig {
  font-size: 22rpx;
  color: var(--text-tertiary, #999);
  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, #242424); }
.record-coach-type { font-size: 22rpx; color: var(--text-secondary, #666); }
.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, #ed7b2f); flex: 1; }
.record-coach-fee {
  font-size: 24rpx;
  font-weight: 700;
  color: var(--text-primary, #242424);
  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, #f0f0f0);
  gap: 16rpx;
}
.record-food-label {
  font-size: 24rpx;
  color: var(--text-secondary, #666);
  flex: 1;
  min-width: 0;
  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, #ed7b2f);
  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, #dcdcdc);
}
.record-total-label { font-size: 24rpx; font-weight: 600; color: var(--text-secondary, #666); }
.record-total-right { display: flex; align-items: baseline; gap: 8rpx; }
.record-total-amount {
  font-size: 32rpx;
  font-weight: 700;
  color: var(--color-error, #e34d59);
  font-variant-numeric: tabular-nums;
}
