@use 'sass:math';
// 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;

// 主容器样式
.consultation-order-container {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  padding: 0;
  animation: fadeIn 0.5s ease-in-out;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  
  @media (max-width: 768px) {
    padding: 16px;
    gap: 20px;
  }
}

// 页面标题样式
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
  margin: -24px -24px 0 -24px;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  
  @media (max-width: 768px) {
    margin: -16px -16px 0 -16px;
    padding: 32px 0;
  }
  
  .header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    
    @media (max-width: 768px) {
      padding: 0 16px;
    }
  }
  
  h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    
    @media (max-width: 768px) {
      font-size: 2rem;
    }
  }
  
  .subtitle {
    font-size: 1.1rem;
    margin-top: 8px;
    font-weight: 400;
    opacity: 0.9;
  }
}

// 成功提示样式
.success-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
  text-align: center;
  font-weight: 500;
  animation: slideIn 0.5s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  
  .toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  svg {
    flex-shrink: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

// 现代化信息卡片样式
.info-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: slideInUp 0.5s ease-out;
  animation-fill-mode: both;
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  }
  
  &:nth-child(1) {
    animation-delay: 0.1s;
  }
  
  &:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  &:nth-child(3) {
    animation-delay: 0.3s;
  }
}

// 卡片头部样式
.card-header {
  padding: 24px 32px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  
  @media (max-width: 768px) {
    padding: 20px 24px 16px;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    &.customer-icon {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      color: white;
    }
    
    &.requirement-icon {
      background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
      color: white;
    }
    
    &.price-icon {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      color: white;
    }
  }
  
  .header-text {
    h2 {
      font-size: 1.5rem;
      font-weight: 700;
      color: #1e293b;
      margin: 0;
      line-height: 1.2;
    }
    
    p {
      font-size: 0.875rem;
      color: #64748b;
      margin: 4px 0 0;
      line-height: 1.4;
    }
  }
}

// 卡片内容样式
.card-content {
  padding: 32px;
  
  @media (max-width: 768px) {
    padding: 24px;
  }
}

// 表单分组样式
.form-section {
  margin-bottom: 32px;
  
  &:last-child {
    margin-bottom: 0;
  }
  
  .section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    
    &::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 40px;
      height: 2px;
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      border-radius: 1px;
    }
  }
}

// 表单网格布局
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  
  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

// 表单字段样式
.form-field {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  
  &.full-width {
    grid-column: 1 / -1;
  }
  
  .field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    transition: color 0.2s ease;
    
    .required {
      color: #ef4444;
      margin-left: 2px;
    }
  }
  
  .field-input,
  .field-select,
  .field-textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
    
    &:hover {
      border-color: #d1d5db;
    }
    
    &:focus {
      outline: none;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    &::placeholder {
      color: #9ca3af;
      transition: opacity 0.2s ease;
    }
    
    &:focus::placeholder {
      opacity: 0.7;
    }
  }
  
  .field-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
  }
}

// 带单位的输入框
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
  
  .field-input {
    flex: 1;
    padding-right: 50px;
  }
  
  .input-unit {
    position: absolute;
    right: 16px;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
  }
}

// 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: math.div(-$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;
}

// 客户搜索区域样式
.search-section {
  margin-bottom: 24px;
  
  .search-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    
    @media (max-width: 768px) {
      flex-direction: column;
      align-items: stretch;
    }
    
    .search-field {
      flex: 1;
    }
    
    .search-btn {
      padding: 12px 24px;
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      color: white;
      border: none;
      border-radius: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      
      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
      }
      
      &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
      }
    }
  }
}

// 搜索结果样式
.search-results {
  margin-top: 20px;
  
  .results-list {
    display: grid;
    gap: 12px;
  }
  
  .result-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    &:hover {
      border-color: #3b82f6;
      background: #eff6ff;
    }
    
    .result-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
      
      .customer-avatar {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 600;
        font-size: 0.875rem;
      }
      
      .customer-name {
        font-weight: 600;
        color: #1e293b;
        font-size: 1rem;
      }
    }
    
    .result-details {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      font-size: 0.875rem;
      color: #64748b;
      
      .detail-item {
        display: flex;
        align-items: center;
        gap: 4px;
      }
    }
    
    .result-tags {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      
      .tag {
        background: #dbeafe;
        color: #1d4ed8;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 500;
      }
    }
  }
}

.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;
}

// 偏好标签样式
.preference-tags {
  .tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    
    @media (max-width: 768px) {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 8px;
    }
  }
  
  .tag-chip {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    
    &:hover {
      border-color: #3b82f6;
      background: #eff6ff;
      color: #1d4ed8;
    }
    
    &.selected {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      border-color: #1d4ed8;
      color: white;
    }
  }
  
  .preset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    
    .preset-tag-btn {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 16px;
      padding: 6px 12px;
      font-size: 0.75rem;
      color: #64748b;
      cursor: pointer;
      transition: all 0.2s ease;
      
      &:hover {
        background: #e2e8f0;
        color: #374151;
      }
    }
  }
}

// 表单样式
.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-section {
  margin-bottom: 32px;
  
  .price-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    
    .price-header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 12px;
      color: #0369a1;
      font-weight: 600;
      font-size: 0.875rem;
    }
    
    .price-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: #0c4a6e;
      line-height: 1.2;
    }
  }
}

// 案例区域样式
.cases-section {
  margin-bottom: 32px;
  
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    
    h3 {
      font-size: 1.125rem;
      font-weight: 600;
      color: #1e293b;
      margin: 0;
    }
    
    .section-subtitle {
      font-size: 0.875rem;
      color: #64748b;
    }
  }
}

// 报价与案例匹配区域
.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(300px, 1fr));
  gap: 20px;
  
  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

// 案例卡片样式
.case-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
  }
  
  .case-image-wrapper {
    position: relative;
    
    .case-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }
    
    .similarity-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
  }
  
  .case-content {
    padding: 20px;
    
    .case-name {
      font-size: 1.125rem;
      font-weight: 600;
      color: #1e293b;
      margin: 0 0 12px 0;
      line-height: 1.3;
    }
    
    .case-meta {
      display: flex;
      gap: 16px;
      font-size: 0.875rem;
      color: #64748b;
      
      .case-designer,
      .case-area {
        display: flex;
        align-items: center;
        gap: 6px;
      }
    }
  }
}

.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-section {
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    
    h3 {
      font-size: 1.125rem;
      font-weight: 600;
      color: #1e293b;
      margin: 0;
    }
    
    .section-subtitle {
      font-size: 0.875rem;
      color: #64748b;
      background: #f1f5f9;
      padding: 4px 12px;
      border-radius: 12px;
    }
  }
  
  .selected-cases-list {
    display: grid;
    gap: 12px;
  }
  
  .selected-case-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    
    &:hover {
      border-color: #10b981;
      background: #f0fdf4;
    }
    
    .case-info {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #059669;
      font-weight: 500;
      font-size: 0.875rem;
    }
    
    .remove-case-btn {
      background: none;
      border: none;
      color: #ef4444;
      cursor: pointer;
      padding: 8px;
      border-radius: 8px;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      
      &:hover {
        background: #fef2f2;
        color: #dc2626;
      }
    }
  }
}

// 已选参考案例
.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;
  }
}

// 操作按钮区域
.action-section {
  margin-top: 40px;
  
  .action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    
    button {
      transition: all 0.3s ease;
      
      &:hover:not([disabled]) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      }
      
      &:active:not([disabled]) {
        transform: translateY(0);
      }
    }
    
    .btn-primary {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    }
    
    .btn-secondary {
      background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    }
  }
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
  
  .action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    
    @media (max-width: 768px) {
      flex-direction: column;
      gap: 12px;
    }
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 180px;
    
    &.btn-lg {
      padding: 18px 36px;
      font-size: 1.125rem;
    }
    
    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }
    
    .animate-spin {
      animation: spin 1s linear infinite;
    }
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    
    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 12px 48px rgba(59, 130, 246, 0.4);
    }
  }
  
  .btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
    
    &:hover:not(:disabled) {
      background: #3b82f6;
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    }
  }
}

// 旋转动画
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

// 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;
  }
}