/* 咨询流程模块样式 */
.cf-app {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1a1a2e;
  min-height: 100vh;
  background: #f8f9fc;
}

/* Header */
.cf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid #e8eaf0;
}
.cf-logo {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cf-tabs {
  display: flex;
  gap: 8px;
}
.cf-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.cf-tab:hover { background: #f0f2f8; }
.cf-tab.active {
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff;
  font-weight: 600;
}

/* Loading */
.cf-loading {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 15px;
}

/* Avatar */
.cf-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
}
.cf-avatar-lg { width: 80px; height: 80px; font-size: 32px; }
.cf-avatar-sm { width: 40px; height: 40px; font-size: 16px; }
.cf-ai-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  border: 2px solid #fff;
}
.cf-ai-badge-sm { font-size: 8px; padding: 1px 4px; }

/* Consultant Grid */
.cf-consultant-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-consultant-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.cf-consultant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,110,247,0.12);
  border-color: #e0e7ff;
}
.cf-info { flex: 1; min-width: 0; }
.cf-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.cf-name-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.cf-rating {
  color: #f59e0b;
  font-size: 14px;
  font-weight: 600;
}
.cf-title {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}
.cf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.cf-tag {
  padding: 3px 10px;
  background: #eef2ff;
  color: #4f6ef7;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.cf-intro {
  color: #9ca3af;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.cf-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.cf-price {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
}
.cf-price-unit {
  font-size: 12px;
  color: #9ca3af;
}

/* Buttons */
.cf-btn-primary {
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cf-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.cf-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.cf-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cf-btn-sm { padding: 6px 16px; font-size: 13px; }
.cf-btn-lg { padding: 14px 32px; font-size: 16px; }
.cf-btn-block { width: 100%; }

/* Back button */
.cf-back-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
}
.cf-back-btn:hover { color: #4f6ef7; }

/* Detail Page */
.cf-detail-page { max-width: 640px; margin: 0 auto; }
.cf-detail-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.cf-detail-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f2f8;
}
.cf-detail-info h2 { margin: 0 0 6px 0; font-size: 24px; }
.cf-rating-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.cf-count { color: #9ca3af; font-size: 13px; }
.cf-detail-section {
  margin-bottom: 20px;
}
.cf-detail-section h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #374151;
}
.cf-detail-section p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
  font-size: 14px;
}
.cf-price-display {
  font-size: 32px;
  font-weight: 700;
  color: #ef4444;
}
.cf-unit { font-size: 14px; color: #9ca3af; font-weight: 400; }
.cf-hint { color: #9ca3af; font-size: 13px; margin-top: 8px !important; }
.cf-detail-footer { margin-top: 24px; }

/* Confirm Page */
.cf-confirm-page { max-width: 560px; margin: 0 auto; }
.cf-confirm-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.cf-confirm-card h2 { margin: 0 0 20px 0; font-size: 22px; }
.cf-confirm-consultant {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  margin-bottom: 24px;
}
.cf-confirm-consultant strong { font-size: 16px; }
.cf-form-group { margin-bottom: 20px; }
.cf-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.cf-required { color: #ef4444; }
.cf-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.cf-textarea:focus { outline: none; border-color: #4f6ef7; }
.cf-duration-options {
  display: flex;
  gap: 10px;
}
.cf-duration-opt {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.cf-duration-opt input { position: absolute; opacity: 0; }
.cf-duration-opt span {
  display: block;
  padding: 12px;
  text-align: center;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.cf-duration-opt input:checked + span {
  border-color: #4f6ef7;
  background: #eef2ff;
  color: #4f6ef7;
}
.cf-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  cursor: pointer;
}
.cf-confirm-summary {
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  margin-bottom: 20px;
}
.cf-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Pay Page */
.cf-pay-page { max-width: 480px; margin: 0 auto; }
.cf-pay-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.cf-pay-card h2 { margin: 0 0 24px 0; font-size: 22px; text-align: center; }
.cf-pay-amount {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 16px;
  margin-bottom: 24px;
}
.cf-pay-label { font-size: 14px; color: #92400e; margin-bottom: 8px; }
.cf-pay-number {
  font-size: 42px;
  font-weight: 700;
  color: #92400e;
}
.cf-pay-detail {
  padding: 16px 0;
  border-top: 1px solid #f0f2f8;
  border-bottom: 1px solid #f0f2f8;
  margin-bottom: 20px;
}
.cf-pay-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.cf-pay-row span:first-child { color: #6b7280; }
.cf-order-no { font-family: monospace; font-size: 12px; color: #9ca3af; }
.cf-pay-methods h4 { margin: 0 0 12px 0; font-size: 15px; }
.cf-pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.cf-pay-method input { display: none; }
.cf-pay-method:has(input:checked) {
  border-color: #4f6ef7;
  background: #eef2ff;
}
.cf-pay-icon { font-size: 22px; }
.cf-pay-name { flex: 1; font-size: 15px; font-weight: 500; }
.cf-pay-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
}
.cf-pay-hint {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  margin: 16px 0;
}

/* Chat Page */
.cf-chat-page {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.cf-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2f8;
  background: #fff;
}
.cf-chat-consultant {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.cf-chat-consultant strong { font-size: 16px; }
.cf-chat-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: 8px;
}
.cf-status-pending { background: #fef3c7; color: #92400e; }
.cf-status-info { background: #dbeafe; color: #1e40af; }
.cf-status-warn { background: #fee2e2; color: #991b1b; }
.cf-status-success { background: #d1fae5; color: #065f46; }
.cf-status-active { background: #d1fae5; color: #065f46; }
.cf-status-done { background: #e5e7eb; color: #374151; }
.cf-status-cancel { background: #f3f4f6; color: #6b7280; }

.cf-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fc;
}
.cf-chat-empty {
  text-align: center;
  color: #9ca3af;
  padding: 40px 20px;
  font-size: 14px;
}
.cf-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.cf-msg-user {
  flex-direction: row-reverse;
}
.cf-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.cf-msg-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.cf-msg-consultant .cf-msg-bubble {
  background: #fff;
  color: #1a1a2e;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cf-msg-user .cf-msg-bubble {
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff;
  border-top-right-radius: 4px;
}

.cf-chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #f0f2f8;
  background: #fff;
  align-items: flex-end;
}
.cf-msg-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  box-sizing: border-box;
}
.cf-msg-input:focus { outline: none; border-color: #4f6ef7; }
.cf-btn-send { flex-shrink: 0; padding: 10px 20px; }

/* My Sessions */
.cf-session-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cf-session-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.cf-session-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.cf-session-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cf-session-info strong { font-size: 16px; }
.cf-session-price {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
}
.cf-session-question {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 10px 0;
  line-height: 1.5;
}
.cf-session-meta {
  display: flex;
  gap: 16px;
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 12px;
}
.cf-session-actions {
  display: flex;
  gap: 8px;
}

/* Empty State */
.cf-empty-state {
  text-align: center;
  padding: 80px 20px;
}
.cf-empty-icon { font-size: 64px; margin-bottom: 16px; }
.cf-empty-state p { color: #9ca3af; margin-bottom: 20px; }

/* Toast */
.cf-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  animation: cfFadeIn 0.2s;
}
@keyframes cfFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Modal */
.cf-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.cf-modal {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  overflow: hidden;
}
.cf-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f2f8;
}
.cf-modal-head h3 { margin: 0; font-size: 18px; }
.cf-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
}
.cf-modal-body { padding: 24px; }
.cf-modal-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f0f2f8;
}
.cf-modal-foot button { flex: 1; }

/* Star Rating */
.cf-star-rating {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.cf-star {
  font-size: 36px;
  color: #d1d5db;
  cursor: pointer;
  transition: color 0.2s;
}
.cf-star.active, .cf-star:hover { color: #f59e0b; }

/* Responsive */
@media (max-width: 640px) {
  .cf-app { padding: 12px; }
  .cf-consultant-card { flex-direction: column; }
  .cf-price-col { flex-direction: row; align-items: center; justify-content: space-between; }
  .cf-detail-card, .cf-confirm-card, .cf-pay-card { padding: 20px; }
  .cf-chat-page { height: calc(100vh - 24px); border-radius: 12px; }
  .cf-msg-bubble { max-width: 80%; }
}
