/* 贷款评估页面样式 */

/* 顶部导航 */
.loan-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    z-index: 100;
    transition: transform 0.3s ease;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #1a3a52;
    font-size: 1.5rem;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a3a52;
}

.header-placeholder {
    width: 40px;
}

/* 进度条 */
.progress-section {
    margin-top: 56px;
    padding: 20px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #ff6b35;
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}

/* 评估容器 */
.assessment-container {
    padding: 20px 10px 80px;
    min-height: calc(100vh - 140px);
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 卡片样式 */
.section-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 表单组 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.form-item {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.9rem;
    color: #1a3a52;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-select {
    height: 48px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 0.95rem;
    color: #333;
    background: white;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: #bbb;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    /* 垂直水平居中 */
    display: inline-grid;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label span {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.radio-label input[type="radio"]:checked + span {
    color: #ff6b35;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.05);
}

/* 竖向单选：每行一项，适合多档金额等选项 */
.radio-group.vertical {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.radio-group.vertical .radio-label {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    height: auto;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.radio-group.vertical .radio-label span {
    white-space: nowrap;
}

/* 复选框 */
.checkbox-item {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.5;
}

.link {
    color: #2c5f8d;
    text-decoration: none;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.prev-btn,
.next-btn,
.submit-btn {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn {
    background: #f0f0f0;
    color: #666;
}

.next-btn,
.submit-btn {
    background: #ff6b35;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.prev-btn:active,
.next-btn:active,
.submit-btn:active {
    transform: scale(0.98);
}

.next-btn:only-child,
.submit-btn:only-child {
    flex: none;
    width: 100%;
}

/* 评估结果弹窗 */
.result-modal {
    text-align: center;
    padding: 30px 24px;
    /* max-width: 340px; */
    width: 90%;
}

.result-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #ff6b35;
    color: white;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-title {
    font-size: 1.3rem;
    color: #1a3a52;
    margin-bottom: 20px;
}

.result-content {
    margin-bottom: 24px;
}

.result-quota {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.result-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 8px;
}

.result-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
    margin: 10px 0;
}

.result-details {
    display: flex;
    gap: 12px;
}

.detail-item {
    flex: 1;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item span:first-child {
    font-size: 0.85rem;
    color: #999;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c5f8d;
}

.result-modal .modal-btn {
    width: 100%;
    height: 48px;
    background: #ff6b35;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* 弹窗遮罩 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: block;
}

.modal-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    z-index: 2001;
    animation: slideUp 0.3s ease;
}

.modal-box.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (min-width: 768px) {
    .loan-header {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    .progress-section {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .assessment-container {
        max-width: 480px;
        margin: 0 auto;
    }
}

/* 输入验证样式 */
.form-input.error,
.form-select.error {
    border-color: #e74c3c;
}

.form-input.success,
.form-select.success {
    border-color: #27ae60;
}

.error-message {
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 5px;
}

/* 客服展示样式 */
.service-section {
  margin: 20px 0;
  text-align: center;
}
.service-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}
.service-qrcode {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  display: block;
  border-radius: 4px;
}
.service-phone {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}
.service-phone a {
  color: #ff6b35;
  text-decoration: none;
}

/* =============================================
   未登录弹窗（与评估流程样式统一）
   ============================================= */
.login-modal {
  width: 85%;
  max-width: 340px;
  padding: 32px 24px 28px;
  text-align: center;
  border-radius: 12px;
}

.login-modal-icon {
  font-size: 42px;
  margin-bottom: 10px;
  line-height: 1;
}

.login-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a3a52;
  margin-bottom: 8px;
}

.login-modal-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* 按钮组：垂直排列 */
.login-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 通用按钮基础 */
.login-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.login-btn:active {
  transform: scale(0.98);
}

/* 微信登录按钮 */
.login-btn.wechat {
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

/* 取消按钮 */
.login-btn.cancel {
  background: #f0f0f0;
  color: #666;
}