/* ========== 档案引导页面样式 ========== */

.profile-step {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.profile-card {
  background-color: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  text-align: center;
}

.step-desc {
  font-size: 15px;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.6;
}

.step-question {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 24px;
}

/* ========== 身份选择卡片 ========== */
.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  background-color: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.role-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.role-icon {
  font-size: 40px;
  line-height: 1;
}

.role-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}

.role-hint {
  font-size: 13px;
  color: var(--color-text-light);
}

/* ========== 进度条 ========== */
.progress-bar {
  position: relative;
  height: 28px;
  background-color: var(--color-border);
  border-radius: 14px;
  margin-bottom: 28px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--color-primary);
  border-radius: 14px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  z-index: 1;
}

/* ========== 问题输入 ========== */
.answer-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.answer-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.answer-input::placeholder {
  color: #9ca3af;
}

/* ========== 步骤按钮 ========== */
.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.step-actions .btn {
  flex: 1;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-height: 48px;
}

.btn-secondary {
  background-color: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.step-actions .btn-primary {
  border: none;
}

/* ========== 加载中 ========== */
.loading-card {
  text-align: center;
  padding: 56px 32px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.loading-hint {
  font-size: 14px;
  color: var(--color-text-light);
}

/* ========== 档案预览 ========== */
.profile-preview {
  background-color: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 8px;
  text-align: left;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
}

.profile-field:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 600;
}

.field-value {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.6;
}

.field-value.array-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-value.array-list .array-item {
  padding-left: 12px;
  position: relative;
}

.field-value.array-list .array-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.field-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.tag-yes { background-color: #dcfce7; color: #166534; }
.tag-no { background-color: #fee2e2; color: #991b1b; }

.profile-summary {
  margin-top: 16px;
  padding: 14px 16px;
  background-color: #eef2ff;
  border-left: 3px solid var(--color-primary);
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
}

/* ========== 错误提示 ========== */
.error-card {
  text-align: center;
}

.error-msg {
  font-size: 15px;
  color: #ef4444;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .profile-card {
    padding: 28px 20px;
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

  .role-card {
    padding: 24px 16px;
  }

  .step-actions {
    flex-direction: column;
  }
}
