// iOS风格变量定义 $primary-color: #007AFF; $primary-dark: #0062CC; $secondary-color: #34C759; $success-color: #34C759; $warning-color: #FF9500; $danger-color: #FF3B30; $text-primary: #000000; $text-secondary: #3C3C43; $text-tertiary: #8E8E93; $border-color: #D1D1D6; $background-primary: #FFFFFF; $background-secondary: #F2F2F7; $background-tertiary: #E5E5EA; $shadow-sm: 0 1px 3px rgba(0,0,0,0.1); $shadow-md: 0 4px 10px rgba(0,0,0,0.1); $shadow-lg: 0 10px 30px rgba(0,0,0,0.1); $border-radius: 10px; $transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); $main-font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; $heading-font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; $grid-gap: 16px; $card-padding: 16px; // iOS风格主容器 .consultation-order-container { max-width: 100%; margin: 0 auto; padding: 16px; color: $text-primary; font-family: $main-font-family; font-size: 17px; line-height: 1.5; min-height: 100vh; background-color: $background-secondary; @media (min-width: 768px) { padding: 20px; display: grid; grid-template-columns: 1fr; gap: $grid-gap; } @media (min-width: 1024px) { grid-template-columns: 280px 1fr; max-width: 1200px; } } // 页面标题 - 财务风格 .page-header { grid-column: 1 / -1; margin-bottom: $grid-gap; padding-bottom: 16px; border-bottom: 1px solid $border-color; h1 { font-size: 24px; font-weight: 500; margin: 0 0 8px 0; color: $text-primary; font-family: $heading-font-family; display: flex; align-items: center; gap: 12px; } p { font-size: 14px; color: $text-secondary; margin: 0; } } // 成功提示 .success-message { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background-color: color-mix(in srgb, $success-color 10%, transparent); color: $success-color; border-radius: $border-radius; border-left: 4px solid $success-color; margin-bottom: 24px; animation: slideIn 0.3s ease; } @keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } // 通用区域样式 - 财务风格 .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; h2 { font-size: 18px; font-weight: 500; color: $text-primary; font-family: $heading-font-family; margin: 0; display: flex; align-items: center; gap: 8px; } .section-actions { display: flex; gap: 8px; } } // iOS风格卡片 .card { background-color: $background-primary; border-radius: $border-radius; padding: $card-padding; margin-bottom: $grid-gap; transition: $transition; border: 0.5px solid rgba(0,0,0,0.1); &:hover { box-shadow: $shadow-sm; } &.highlight { border-left: 4px solid $primary-color; } + .card { margin-top: -$grid-gap/2; border-top: 0.5px solid $border-color; border-radius: 0 0 $border-radius $border-radius; } } // 客户信息区域 .customer-info-section { @extend .card; @extend .highlight; } // 客户搜索 .customer-search { margin-bottom: 24px; } .search-input-group { display: flex; align-items: center; position: relative; max-width: 400px; } .search-input { flex: 1; padding: 10px 12px; border: 1px solid $border-color; border-radius: $border-radius 0 0 $border-radius; font-size: 14px; transition: $transition; &:focus { outline: none; border-color: $primary-color; box-shadow: 0 0 0 3px color-mix(in srgb, $primary-color 10%, transparent); } } .search-btn { padding: 10px 16px; background-color: $primary-color; color: white; border: none; border-radius: 0 $border-radius $border-radius 0; cursor: pointer; transition: $transition; &:hover { background-color: $primary-dark; transform: translateY(-1px); box-shadow: $shadow-md; } &:active { transform: translateY(0); } } // 搜索结果 .search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background-color: $background-primary; border: 1px solid $border-color; border-radius: $border-radius; box-shadow: $shadow-lg; z-index: 1000; max-height: 300px; overflow-y: auto; } .customer-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: $transition; &:hover { background-color: $background-secondary; } } .customer-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; } .customer-details { flex: 1; } .customer-name { font-weight: 500; color: $text-primary; margin-bottom: 2px; } .customer-phone { font-size: 12px; color: $text-secondary; margin-bottom: 4px; } .customer-tags { display: flex; gap: 6px; } .tag { font-size: 11px; padding: 2px 8px; background-color: color-mix(in srgb, $primary-color 10%, transparent); color: $primary-color; border-radius: 12px; } .tag.source { background-color: color-mix(in srgb, $secondary-color 10%, transparent); color: $secondary-color; } // 偏好标签样式 .tags-container { margin-top: 12px; } .preference-tag { background-color: color-mix(in srgb, $primary-color 15%, transparent); color: $primary-color; font-size: 16px; padding: 8px 16px; margin-right: 12px; margin-bottom: 12px; font-weight: 500; border-radius: 24px; transition: all 0.3s ease; &:hover { background-color: color-mix(in srgb, $primary-color 30%, transparent); } } .tag-input { font-size: 16px; padding: 8px; margin-top: 8px; width: 100%; border: 2px solid $border-color; border-radius: 8px; transition: border-color 0.3s ease; &:focus { outline: none; border-color: $primary-color; } } // 预设标签样式 .preset-tags { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; } .preset-label { font-size: 16px; font-weight: 600; color: $text-primary; min-width: 100px; } .preset-tag-btn { padding: 8px 16px; background-color: $background-tertiary; color: $text-secondary; border: 2px solid $border-color; border-radius: 24px; font-size: 14px; cursor: pointer; transition: all 0.3s ease; &:hover { background-color: color-mix(in srgb, $primary-color 10%, transparent); color: $primary-color; border-color: $primary-color; transform: translateY(-2px); } &.active { background-color: $primary-color; color: white; border-color: $primary-color; } } // 表单样式 .customer-form, .requirement-form { .form-row { display: flex; gap: 24px; // 增加行内表单元素间距防止重合 margin-bottom: 24px; flex-wrap: wrap; } .form-group { flex: 1; min-width: 200px; label { display: block; font-size: 18px; // 放大表单标签 font-weight: 500; color: $text-primary; margin-bottom: 8px; } input, select, textarea { width: 100%; padding: 12px 16px; // 增加内边距 border: 1px solid $border-color; border-radius: $border-radius; font-size: 16px; // 放大输入元素字体 transition: $transition; &:focus { outline: none; border-color: $primary-color; box-shadow: 0 0 0 3px color-mix(in srgb, $primary-color 10%, transparent); } } textarea { resize: vertical; min-height: 80px; line-height: 1.6; } } .form-group.full-width { min-width: 100%; } } .required { color: $danger-color; } // 清除客户按钮 .clear-customer-btn { padding: 6px 12px; background-color: transparent; color: $text-secondary; border: 1px solid $border-color; border-radius: $border-radius; font-size: 14px; cursor: pointer; transition: $transition; &:hover { background-color: $background-secondary; border-color: $danger-color; color: $danger-color; } } // 需求信息区域 .requirement-section { @extend .card; } // 报价与案例匹配区域 .price-match-section { @extend .card; } // 价格信息 .price-info { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background-color: color-mix(in srgb, $primary-color 5%, transparent); border-radius: $border-radius; margin-bottom: 24px; box-shadow: $shadow-sm; } .price-label { font-size: 18px; // 放大价格标签 color: $text-secondary; font-weight: 500; } .price-value { font-size: 24px; // 放大价格值 font-weight: 700; color: $primary-color; letter-spacing: 0.5px; } // 匹配案例 .matched-cases { h3 { font-size: 18px; font-weight: 600; color: $text-primary; margin-bottom: 16px; } } .cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; } .case-card { background-color: $background-tertiary; border: 2px solid transparent; border-radius: $border-radius; overflow: hidden; cursor: pointer; transition: $transition; &:hover { border-color: $primary-color; transform: translateY(-2px); box-shadow: $shadow-md; } } .case-image { width: 100%; height: 180px; object-fit: cover; } .case-info { padding: 16px; } .case-name { font-size: 16px; font-weight: 500; color: $text-primary; margin-bottom: 8px; } .case-details { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; .case-designer, .case-area { font-size: 13px; color: $text-secondary; } } .similarity-badge { display: inline-block; padding: 4px 12px; background-color: color-mix(in srgb, $success-color 10%, transparent); color: $success-color; border-radius: 12px; font-size: 12px; font-weight: 500; } // 已选参考案例 .selected-cases { margin-top: 24px; h3 { font-size: 16px; font-weight: 600; color: $text-primary; margin-bottom: 12px; } } .selected-cases-list { display: flex; flex-wrap: wrap; gap: 8px; } .selected-case-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background-color: color-mix(in srgb, $primary-color 10%, transparent); color: $primary-color; border-radius: 16px; font-size: 13px; } .remove-case-btn { background: none; border: none; color: $text-tertiary; cursor: pointer; padding: 2px; transition: $transition; &:hover { color: $danger-color; } } // iOS风格操作按钮区域 .action-section { background-color: $background-tertiary; padding: 16px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; display: flex; gap: 16px; justify-content: space-between; border-top: 0.5px solid $border-color; @media (min-width: 768px) { position: sticky; bottom: 20px; left: auto; right: auto; width: calc(100% - 40px); max-width: 1200px; margin: $grid-gap auto 0; border-radius: $border-radius; border: 0.5px solid rgba(0,0,0,0.1); box-shadow: $shadow-sm; } .primary-btn, .secondary-btn { flex: 1; text-align: center; } } .primary-btn, .secondary-btn { padding: 16px 32px; // 增大按钮尺寸 border-radius: $border-radius; font-size: 18px; // 放大按钮字体 font-weight: 600; cursor: pointer; transition: $transition; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 160px; text-transform: none; letter-spacing: 0.5px; } .primary-btn { background-color: $primary-color; color: white; &:hover:not(:disabled) { background-color: $primary-dark; transform: translateY(-2px); box-shadow: $shadow-md; } &:active:not(:disabled) { transform: translateY(0); } &:disabled { background-color: $text-tertiary; cursor: not-allowed; } } .secondary-btn { background-color: $background-tertiary; color: $text-primary; border: 2px solid $border-color; &:hover:not(:disabled) { background-color: $background-secondary; border-color: $primary-color; color: $primary-color; transform: translateY(-2px); box-shadow: $shadow-md; } &:active:not(:disabled) { transform: translateY(0); } &:disabled { background-color: $background-tertiary; color: $text-tertiary; border-color: $border-color; cursor: not-allowed; } } // 响应式设计 @media (max-width: 768px) { .consultation-order-container { padding: 16px; } .page-header { h1 { font-size: 24px; } } .form-row { flex-direction: column; gap: 12px; } .form-group { min-width: 100%; } .cases-grid { grid-template-columns: 1fr; } .action-section { flex-direction: column; } .primary-btn, .secondary-btn { width: 100%; } .section-header { flex-direction: column; align-items: flex-start; gap: 8px; } }