@use '../../styles/_ios-theme.scss' as *;
@use 'sass:color';

:host {
  display: block;
  height: 100%;
}

.proposal-confirm-card {
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: $ios-spacing-md;
    
    h4 {
      margin: 0;
      font-size: $ios-font-size-sm;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
    }
    
    .progress-indicator {
      display: flex;
      align-items: center;
      gap: $ios-spacing-xs;
      
      .progress-bar {
        width: 80px;
        height: 4px;
        background: $ios-border;
        border-radius: 2px;
        overflow: hidden;
        
        .progress-fill {
          height: 100%;
          background: linear-gradient(90deg, #007AFF 0%, #34C759 100%);
          transition: width 0.3s ease;
        }
      }
      
      .progress-text {
        font-size: $ios-font-size-xs;
        color: $ios-text-secondary;
        font-weight: $ios-font-weight-medium;
      }
    }
  }

  // 标签页导航
  .tab-navigation {
    display: flex;
    background: $ios-background-secondary;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: $ios-spacing-md;
    
    .tab-button {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: $ios-spacing-xs;
      padding: $ios-spacing-sm $ios-spacing-xs;
      border: none;
      background: transparent;
      color: $ios-text-secondary;
      font-weight: $ios-font-weight-medium;
      border-radius: 6px;
      transition: all 0.2s ease;
      cursor: pointer;
      
      svg {
        width: 14px;
        height: 14px;
      }
      
      &:hover {
        color: $ios-text-primary;
        background: rgba(0, 122, 255, 0.1);
      }
      
      &.active {
        background: white;
        color: $ios-primary;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      }
    }
  }

  // 标签页内容
  .tab-content {
    min-height: 300px;
  }

  // 方案概览部分
  .overview-section {
    .overview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: $ios-spacing-md;
      margin-bottom: $ios-spacing-lg;
      
      .overview-item {
        border: 1px solid $ios-border;
        border-radius: 8px;
        padding: $ios-spacing-md;
        background: white;
        
        h5 {
          margin: 0 0 $ios-spacing-sm 0;
          font-size: $ios-font-size-sm;
          font-weight: $ios-font-weight-semibold;
          color: $ios-text-primary;
        }
        
        .overview-content {
          .overview-list {
            .overview-row {
              display: grid;
              grid-template-columns: 1fr 2fr 2fr 1fr;
              border-bottom: 1px solid $ios-border;
              
              &:last-child {
                border-bottom: none;
              }
              
              .overview-cell {
                padding: $ios-spacing-sm;
                font-size: $ios-font-size-xs;
                color: $ios-text-secondary;
                
                &.cell-name {
                  font-weight: $ios-font-weight-medium;
                  color: $ios-text-primary;
                }
                
                &.cell-price {
                  color: $ios-primary;
                  font-weight: $ios-font-weight-semibold;
                }
                
                &.cell-status {
                  .status-badge {
                    display: inline-block;
                    padding: 2px 6px;
                    border-radius: 4px;
                    font-size: $ios-font-size-xs;
                    font-weight: $ios-font-weight-medium;
                    
                    &.status-confirmed {
                      background: rgba(52, 199, 89, 0.1);
                      color: #34C759;
                    }
                    
                    &.status-pending {
                      background: rgba(255, 149, 0, 0.1);
                      color: #FF9500;
                    }
                    
                    &.status-rejected {
                      background: rgba(255, 59, 48, 0.1);
                      color: $ios-error;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  // 版本对比部分
  .comparison-section {
    .comparison-warning {
      display: flex;
      align-items: center;
      gap: $ios-spacing-xs;
      padding: $ios-spacing-sm;
      background: rgba(255, 149, 0, 0.1);
      border: 1px solid rgba(255, 149, 0, 0.2);
      border-radius: 6px;
      color: #FF9500;
      font-size: $ios-font-size-xs;
      margin-bottom: $ios-spacing-md;
      
      svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
      }
    }
    
    .comparison-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: $ios-spacing-lg;
      
      .version-panel {
        border: 1px solid $ios-border;
        border-radius: 8px;
        padding: $ios-spacing-md;
        background: white;
        
        .panel-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: $ios-spacing-md;
          padding-bottom: $ios-spacing-sm;
          border-bottom: 1px solid $ios-border;
          
          h5 {
            margin: 0;
            font-size: $ios-font-size-sm;
            font-weight: $ios-font-weight-semibold;
            color: $ios-text-primary;
          }
          
          .version-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: $ios-spacing-xs;
            
            .version-date {
              font-size: $ios-font-size-xs;
              color: $ios-text-secondary;
            }
            
            .version-status {
              .status-badge {
                padding: 2px 6px;
                border-radius: 4px;
                font-size: $ios-font-size-xs;
                font-weight: $ios-font-weight-medium;
                
                &.status-current {
                  background: rgba(0, 122, 255, 0.1);
                  color: $ios-primary;
                }
                
                &.status-previous {
                  background: $ios-background-secondary;
                  color: $ios-text-secondary;
                }
              }
            }
          }
        }
        
        .version-content {
          .content-section {
            margin-bottom: $ios-spacing-md;
            
            &:last-child {
              margin-bottom: 0;
            }
            
            h6 {
              margin: 0 0 $ios-spacing-xs 0;
              font-size: $ios-font-size-xs;
              font-weight: $ios-font-weight-semibold;
              color: $ios-text-primary;
              text-transform: uppercase;
              letter-spacing: 0.5px;
            }
            
            .content-list {
              .content-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: $ios-spacing-xs 0;
                border-bottom: 1px dashed $ios-border;
                
                &:last-child {
                  border-bottom: none;
                }
                
                .item-name {
                  font-size: $ios-font-size-xs;
                  color: $ios-text-primary;
                }
                
                .item-value {
                  font-size: $ios-font-size-xs;
                  color: $ios-text-secondary;
                  font-weight: $ios-font-weight-medium;
                  
                  &.value-price {
                    color: $ios-primary;
                  }
                  
                  &.value-changed {
                    color: #FF9500;
                    position: relative;
                    
                    &::after {
                      content: '●';
                      position: absolute;
                      right: -8px;
                      top: 0;
                      font-size: 6px;
                      color: #FF9500;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    
    .differences-summary {
      margin-top: $ios-spacing-lg;
      padding: $ios-spacing-md;
      background: $ios-background-secondary;
      border-radius: 8px;
      
      h5 {
        margin: 0 0 $ios-spacing-sm 0;
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
      }
      
      .differences-list {
        .difference-item {
          display: flex;
          align-items: center;
          gap: $ios-spacing-sm;
          padding: $ios-spacing-xs 0;
          
          .difference-icon {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: white;
            
            &.icon-added {
              background: #34C759;
            }
            
            &.icon-removed {
              background: #FF3B30;
            }
            
            &.icon-modified {
              background: #FF9500;
            }
          }
          
          .difference-text {
            font-size: $ios-font-size-xs;
            color: $ios-text-primary;
          }
        }
      }
    }
  }

  // 家具清单部分
  .furniture-section {
    .furniture-categories {
      .category-group {
        margin-bottom: $ios-spacing-lg;
        
        .category-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: $ios-spacing-md;
          padding-bottom: $ios-spacing-sm;
          border-bottom: 2px solid $ios-border;
          
          h5 {
            margin: 0;
            font-size: $ios-font-size-sm;
            font-weight: $ios-font-weight-semibold;
            color: $ios-text-primary;
          }
          
          .category-summary {
            display: flex;
            gap: $ios-spacing-md;
            
            .summary-item {
              text-align: center;
              
              .summary-value {
                display: block;
                font-size: $ios-font-size-sm;
                font-weight: $ios-font-weight-bold;
                color: $ios-primary;
              }
              
              .summary-label {
                font-size: $ios-font-size-xs;
                color: $ios-text-secondary;
              }
            }
          }
        }
        
        .furniture-grid {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
          gap: $ios-spacing-md;
          
          .furniture-card {
            border: 1px solid $ios-border;
            border-radius: 8px;
            padding: $ios-spacing-md;
            background: white;
            transition: all 0.2s ease;
            
            &:hover {
              box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }
            
            .furniture-image {
              width: 100%;
              height: 120px;
              background: $ios-background-secondary;
              border-radius: 6px;
              margin-bottom: $ios-spacing-sm;
              display: flex;
              align-items: center;
              justify-content: center;
              
              img {
                max-width: 100%;
                max-height: 100%;
                border-radius: 6px;
              }
              
              .image-placeholder {
                color: $ios-text-tertiary;
                font-size: $ios-font-size-xs;
              }
            }
            
            .furniture-info {
              h6 {
                margin: 0 0 $ios-spacing-xs 0;
                font-size: $ios-font-size-sm;
                font-weight: $ios-font-weight-semibold;
                color: $ios-text-primary;
              }
              
              .furniture-specs {
                display: flex;
                flex-wrap: wrap;
                gap: $ios-spacing-sm;
                margin-bottom: $ios-spacing-xs;
                
                .spec {
                  font-size: $ios-font-size-xs;
                  color: $ios-text-secondary;
                  
                  &.price {
                    font-weight: $ios-font-weight-medium;
                    color: $ios-primary;
                  }
                }
              }
              
              .furniture-features {
                display: flex;
                flex-wrap: wrap;
                gap: $ios-spacing-xs;
                
                .feature-tag {
                  padding: 2px $ios-spacing-xs;
                  background: $ios-background-tertiary;
                  color: $ios-text-secondary;
                  border-radius: 4px;
                  font-size: $ios-font-size-xs;
                }
              }
            }
            
            .furniture-actions {
              display: flex;
              gap: $ios-spacing-xs;
              margin-top: $ios-spacing-sm;
              padding-top: $ios-spacing-sm;
              border-top: 1px solid $ios-border;
              
              .btn {
                flex: 1;
                padding: $ios-spacing-xs;
                border: none;
                border-radius: 4px;
                font-size: $ios-font-size-xs;
                cursor: pointer;
                transition: all 0.2s ease;
                
                &.btn-primary {
                  background: $ios-primary;
                  color: white;
                  
                  &:hover {
                    background: color.adjust($ios-primary, $lightness: -10%);
                  }
                }
                
                &.btn-secondary {
                  background: $ios-background-secondary;
                  color: $ios-text-primary;
                  
                  &:hover {
                    background: color.adjust($ios-background-secondary, $lightness: -5%);
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  // 协作批注部分
  .collaboration-section {
    .collaboration-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: $ios-spacing-md;
      
      h5 {
        margin: 0;
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
      }
      
      .collaboration-controls {
        display: flex;
        gap: $ios-spacing-sm;
        
        .filter-dropdown {
          position: relative;
          
          .dropdown-toggle {
            padding: $ios-spacing-xs $ios-spacing-sm;
            border: 1px solid $ios-border;
            border-radius: 4px;
            background: white;
            font-size: $ios-font-size-xs;
            cursor: pointer;
          }
        }
      }
    }
    
    .annotations-list {
      .annotation-item {
        border: 1px solid $ios-border;
        border-radius: 8px;
        padding: $ios-spacing-md;
        margin-bottom: $ios-spacing-md;
        background: white;
        
        &.annotation-resolved {
          opacity: 0.7;
          background: rgba(52, 199, 89, 0.02);
          border-color: rgba(52, 199, 89, 0.3);
        }
        
        &.annotation-urgent {
          border-left: 4px solid #FF3B30;
        }
        
        .annotation-header {
          display: flex;
          justify-content: space-between;
          align-items: flex-start;
          margin-bottom: $ios-spacing-sm;
          
          .annotation-meta {
            .annotation-author {
              font-size: $ios-font-size-xs;
              font-weight: $ios-font-weight-semibold;
              color: $ios-text-primary;
              margin-bottom: 2px;
            }
            
            .annotation-time {
              font-size: $ios-font-size-xs;
              color: $ios-text-tertiary;
            }
            
            .annotation-location {
              font-size: $ios-font-size-xs;
              color: $ios-text-secondary;
              margin-top: 2px;
            }
          }
          
          .annotation-actions {
            display: flex;
            gap: $ios-spacing-xs;
            
            .action-btn {
              padding: 4px 8px;
              border: none;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              cursor: pointer;
              
              &.btn-resolve {
                background: rgba(52, 199, 89, 0.1);
                color: #34C759;
              }
              
              &.btn-reply {
                background: rgba(0, 122, 255, 0.1);
                color: $ios-primary;
              }
            }
          }
        }
        
        .annotation-content {
          .annotation-text {
            font-size: $ios-font-size-sm;
            color: $ios-text-primary;
            line-height: 1.4;
            margin-bottom: $ios-spacing-sm;
          }
          
          .annotation-attachments {
            display: flex;
            gap: $ios-spacing-xs;
            margin-bottom: $ios-spacing-sm;
            
            .attachment-item {
              padding: $ios-spacing-xs;
              background: $ios-background-secondary;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              color: $ios-text-secondary;
            }
          }
          
          .annotation-replies {
            border-top: 1px solid $ios-border;
            padding-top: $ios-spacing-sm;
            
            .reply-item {
              display: flex;
              gap: $ios-spacing-sm;
              margin-bottom: $ios-spacing-sm;
              
              .reply-avatar {
                width: 24px;
                height: 24px;
                border-radius: 50%;
                background: $ios-background-secondary;
                flex-shrink: 0;
              }
              
              .reply-content {
                flex: 1;
                
                .reply-header {
                  display: flex;
                  align-items: center;
                  gap: $ios-spacing-xs;
                  margin-bottom: 2px;
                  
                  .reply-author {
                    font-size: $ios-font-size-xs;
                    font-weight: $ios-font-weight-medium;
                    color: $ios-text-primary;
                  }
                  
                  .reply-time {
                    font-size: $ios-font-size-xs;
                    color: $ios-text-tertiary;
                  }
                }
                
                .reply-text {
                  font-size: $ios-font-size-sm;
                  color: $ios-text-secondary;
                }
              }
            }
            
            .reply-form {
              display: flex;
              gap: $ios-spacing-sm;
              margin-top: $ios-spacing-sm;
              
              .form-control {
                flex: 1;
                padding: $ios-spacing-xs $ios-spacing-sm;
                border: 1px solid $ios-border;
                border-radius: $ios-radius-sm;
                font-size: $ios-font-size-sm;
              }
              
              .btn {
                padding: $ios-spacing-xs $ios-spacing-sm;
                border: none;
                border-radius: $ios-radius-sm;
                font-size: $ios-font-size-xs;
                cursor: pointer;
                
                &.btn-secondary {
                  background: $ios-background-tertiary;
                  color: $ios-text-primary;
                }
              }
            }
          }
        }
      }
    }
    
    // 协作批注标签
    .collaboration-content {
      .annotation-toolbar {
        background: $ios-background-secondary;
        border-radius: $ios-radius-md;
        padding: $ios-spacing-md;
        margin-bottom: $ios-spacing-md;
        
        .annotation-form {
          display: flex;
          gap: $ios-spacing-sm;
          
          .form-control {
            flex: 1;
            padding: $ios-spacing-xs $ios-spacing-sm;
            border: 1px solid $ios-border;
            border-radius: $ios-radius-sm;
            font-size: $ios-font-size-sm;
          }
          
          .btn-add {
            padding: $ios-spacing-xs $ios-spacing-sm;
            background: $ios-primary;
            color: white;
            border: none;
            border-radius: $ios-radius-sm;
            font-size: $ios-font-size-xs;
            cursor: pointer;
          }
        }
      }
      
      .annotations-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: $ios-spacing-md;
        
        .annotation-card {
          border: 1px solid $ios-border;
          border-radius: 8px;
          padding: $ios-spacing-md;
          background: white;
          
          .annotation-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: $ios-spacing-sm;
            
            .annotation-type {
              padding: 2px 6px;
              background: $ios-background-secondary;
              color: $ios-text-secondary;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              text-transform: uppercase;
            }
            
            .annotation-priority {
              &.priority-high {
                color: #FF3B30;
              }
              
              &.priority-medium {
                color: #FF9500;
              }
              
              &.priority-low {
                color: $ios-text-secondary;
              }
            }
          }
          
          .annotation-content {
            .annotation-title {
              font-size: $ios-font-size-sm;
              font-weight: $ios-font-weight-medium;
              color: $ios-text-primary;
              margin-bottom: $ios-spacing-xs;
            }
            
            .annotation-description {
              font-size: $ios-font-size-xs;
              color: $ios-text-secondary;
              line-height: 1.4;
              margin-bottom: $ios-spacing-sm;
            }
            
            .annotation-meta {
              display: flex;
              justify-content: space-between;
              align-items: center;
              font-size: $ios-font-size-xs;
              color: $ios-text-tertiary;
              
              .annotation-author {
                font-weight: $ios-font-weight-medium;
              }
            }
          }
        }
      }
    }
  }

  // 确认流程部分
  .confirmation-section {
    .confirmation-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: $ios-spacing-lg;
      
      h4 {
        margin: 0;
        font-size: $ios-font-size-md;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
      }
      
      .overall-progress {
        display: flex;
        align-items: center;
        gap: $ios-spacing-sm;
        
        .progress-circle {
          width: 40px;
          height: 40px;
          border-radius: 50%;
          background: conic-gradient(#34C759 0deg 180deg, $ios-border 180deg 360deg);
          display: flex;
          align-items: center;
          justify-content: center;
          
          .progress-inner {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: $ios-font-size-xs;
            font-weight: $ios-font-weight-bold;
            color: $ios-text-primary;
          }
        }
        
        .progress-text {
          font-size: $ios-font-size-sm;
          color: $ios-text-secondary;
        }
      }
    }
    
    .confirmation-steps {
      .confirmation-step {
        display: flex;
        gap: $ios-spacing-md;
        margin-bottom: $ios-spacing-md;
        
        &.pending {
          .step-indicator {
            background: $ios-background-tertiary;
            color: $ios-text-secondary;
          }
        }
        
        &.confirmed {
          .step-indicator {
            background: $ios-success;
            color: white;
          }
        }
        
        &.rejected {
          .step-indicator {
            background: $ios-error;
            color: white;
          }
        }
        
        .step-indicator {
          width: 40px;
          height: 40px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: $ios-font-weight-bold;
          position: relative;
          
          .step-number {
            position: absolute;
            font-size: $ios-font-size-xs;
          }
          
          i {
            font-size: $ios-font-size-sm;
          }
        }
        
        .step-content {
          flex: 1;
          
          .step-header {
            display: flex;
            align-items: center;
            gap: $ios-spacing-sm;
            margin-bottom: $ios-spacing-xs;
            
            h5 {
              margin: 0;
              font-size: $ios-font-size-sm;
              font-weight: $ios-font-weight-semibold;
              color: $ios-text-primary;
            }
            
            .step-status {
              padding: 2px 6px;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              font-weight: $ios-font-weight-medium;
              
              &.status-pending {
                background: rgba(255, 149, 0, 0.1);
                color: #FF9500;
              }
              
              &.status-confirmed {
                background: rgba(52, 199, 89, 0.1);
                color: #34C759;
              }
              
              &.status-rejected {
                background: rgba(255, 59, 48, 0.1);
                color: #FF3B30;
              }
            }
          }
          
          .step-description {
            font-size: $ios-font-size-xs;
            color: $ios-text-secondary;
            margin-bottom: $ios-spacing-sm;
            line-height: 1.4;
          }
          
          .step-actions {
            display: flex;
            gap: $ios-spacing-xs;
            
            .btn {
              padding: $ios-spacing-xs $ios-spacing-sm;
              border: none;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              cursor: pointer;
              transition: all 0.2s ease;
              
              &.btn-confirm {
                background: #34C759;
                color: white;
                
                &:hover {
                  background: color.adjust(#34C759, $lightness: -10%);
                }
              }
              
              &.btn-reject {
                background: #FF3B30;
                color: white;
                
                &:hover {
                  background: color.adjust(#FF3B30, $lightness: -10%);
                }
              }
              
              &.btn-comment {
                background: $ios-background-secondary;
                color: $ios-text-primary;
                
                &:hover {
                  background: color.adjust($ios-background-secondary, $lightness: -5%);
                }
              }
            }
          }
          
          .step-comments {
            margin-top: $ios-spacing-sm;
            padding-top: $ios-spacing-sm;
            border-top: 1px solid $ios-border;
            
            .comment-item {
              display: flex;
              gap: $ios-spacing-sm;
              margin-bottom: $ios-spacing-sm;
              
              .comment-avatar {
                width: 24px;
                height: 24px;
                border-radius: 50%;
                background: $ios-background-secondary;
                flex-shrink: 0;
              }
              
              .comment-content {
                flex: 1;
                
                .comment-header {
                  display: flex;
                  align-items: center;
                  gap: $ios-spacing-xs;
                  margin-bottom: 2px;
                  
                  .comment-author {
                    font-size: $ios-font-size-xs;
                    font-weight: $ios-font-weight-medium;
                    color: $ios-text-primary;
                  }
                  
                  .comment-time {
                    font-size: $ios-font-size-xs;
                    color: $ios-text-tertiary;
                  }
                }
                
                .comment-text {
                  font-size: $ios-font-size-sm;
                  color: $ios-text-secondary;
                }
              }
            }
          }
        }
      }
    }
    
    .confirmation-summary {
      margin-top: $ios-spacing-lg;
      padding: $ios-spacing-md;
      background: $ios-background-secondary;
      border-radius: 8px;
      
      .summary-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: $ios-spacing-md;
        
        .summary-item {
          text-align: center;
          
          .summary-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin: 0 auto $ios-spacing-xs;
            display: flex;
            align-items: center;
            justify-content: center;
            
            &.icon-confirmed {
              background: rgba(52, 199, 89, 0.1);
              color: #34C759;
            }
            
            &.icon-pending {
              background: rgba(255, 149, 0, 0.1);
              color: #FF9500;
            }
            
            &.icon-rejected {
              background: rgba(255, 59, 48, 0.1);
              color: #FF3B30;
            }
          }
          
          .summary-value {
            display: block;
            font-size: $ios-font-size-lg;
            font-weight: $ios-font-weight-bold;
            color: $ios-text-primary;
            margin-bottom: 2px;
          }
          
          .summary-label {
            font-size: $ios-font-size-xs;
            color: $ios-text-secondary;
          }
        }
      }
    }
  }

  // 时间轴部分
  .timeline-section {
    .timeline-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: $ios-spacing-md;
      
      h5 {
        margin: 0;
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
      }
      
      .timeline-filters {
        display: flex;
        gap: $ios-spacing-xs;
        
        .filter-btn {
          padding: 4px 8px;
          border: 1px solid $ios-border;
          border-radius: 4px;
          background: white;
          font-size: $ios-font-size-xs;
          cursor: pointer;
          
          &.active {
            background: $ios-primary;
            color: white;
            border-color: $ios-primary;
          }
        }
      }
    }
    
    .timeline-container {
      position: relative;
      
      &::before {
        content: '';
        position: absolute;
        left: 20px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: $ios-border;
      }
      
      .timeline-item {
        position: relative;
        padding-left: 50px;
        margin-bottom: $ios-spacing-lg;
        
        &:last-child {
          margin-bottom: 0;
        }
        
        .timeline-marker {
          position: absolute;
          left: 12px;
          top: 0;
          width: 16px;
          height: 16px;
          border-radius: 50%;
          background: white;
          border: 3px solid $ios-border;
          
          &.marker-confirmed {
            border-color: #34C759;
            background: #34C759;
          }
          
          &.marker-rejected {
            border-color: #FF3B30;
            background: #FF3B30;
          }
          
          &.marker-pending {
            border-color: #FF9500;
            background: #FF9500;
          }
        }
        
        .timeline-content {
          .timeline-time {
            font-size: $ios-font-size-xs;
            color: $ios-text-tertiary;
            margin-bottom: $ios-spacing-xs;
          }
          
          .timeline-title {
            font-size: $ios-font-size-sm;
            font-weight: $ios-font-weight-medium;
            color: $ios-text-primary;
            margin-bottom: $ios-spacing-xs;
          }
          
          .timeline-description {
            font-size: $ios-font-size-xs;
            color: $ios-text-secondary;
            line-height: 1.4;
            margin-bottom: $ios-spacing-sm;
          }
          
          .timeline-meta {
            display: flex;
            align-items: center;
            gap: $ios-spacing-sm;
            
            .timeline-author {
              font-size: $ios-font-size-xs;
              color: $ios-text-secondary;
            }
            
            .timeline-status {
              padding: 2px 6px;
              border-radius: 4px;
              font-size: $ios-font-size-xs;
              font-weight: $ios-font-weight-medium;
              
              &.status-confirmed {
                background: rgba(52, 199, 89, 0.1);
                color: #34C759;
              }
              
              &.status-rejected {
                background: rgba(255, 59, 48, 0.1);
                color: #FF3B30;
              }
              
              &.status-pending {
                background: rgba(255, 149, 0, 0.1);
                color: #FF9500;
              }
            }
          }
          
          .timeline-attachments {
            margin-top: $ios-spacing-sm;
            
            .attachment-list {
              display: flex;
              gap: $ios-spacing-xs;
              
              .attachment-item {
                padding: $ios-spacing-xs;
                background: $ios-background-secondary;
                border-radius: 4px;
                font-size: $ios-font-size-xs;
                color: $ios-text-secondary;
                text-decoration: none;
                
                &:hover {
                  background: color.adjust($ios-background-secondary, $lightness: -5%);
                }
              }
            }
          }
          
          .timeline-actions {
            margin-top: $ios-spacing-sm;
            
            .action-list {
              display: flex;
              gap: $ios-spacing-xs;
              
              .action-btn {
                padding: 4px 8px;
                border: none;
                border-radius: 4px;
                font-size: $ios-font-size-xs;
                cursor: pointer;
                
                &.btn-reply {
                  background: rgba(0, 122, 255, 0.1);
                  color: $ios-primary;
                }
                
                &.btn-edit {
                  background: rgba(255, 149, 0, 0.1);
                  color: #FF9500;
                }
              }
            }
          }
        }
      }
    }
    
    .timeline-summary {
      margin-top: $ios-spacing-lg;
      padding: $ios-spacing-md;
      background: $ios-background-secondary;
      border-radius: 8px;
      
      .summary-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: $ios-spacing-md;
        
        .stat-item {
          text-align: center;
          
          .stat-value {
            display: block;
            font-size: $ios-font-size-lg;
            font-weight: $ios-font-weight-bold;
            color: $ios-text-primary;
            margin-bottom: 2px;
          }
          
          .stat-label {
            font-size: $ios-font-size-xs;
            color: $ios-text-secondary;
          }
        }
      }
      
      .timeline-progress {
        margin-top: $ios-spacing-md;
        
        .progress-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: $ios-spacing-xs;
          
          .progress-label {
            font-size: $ios-font-size-xs;
            color: $ios-text-secondary;
          }
          
          .progress-percentage {
            font-size: $ios-font-size-xs;
            font-weight: $ios-font-weight-medium;
            color: $ios-text-primary;
          }
        }
        
        .progress-bar {
          width: 100%;
          height: 6px;
          background: $ios-border;
          border-radius: 3px;
          overflow: hidden;
          
          .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #007AFF 0%, #34C759 100%);
            transition: width 0.3s ease;
          }
        }
        
        .progress-details {
          display: flex;
          justify-content: space-between;
          margin-top: $ios-spacing-xs;
          
          .detail-item {
            font-size: $ios-font-size-xs;
            color: $ios-text-tertiary;
            
            .detail-value {
              font-weight: $ios-font-weight-medium;
              color: $ios-text-secondary;
            }
          }
        }
      }
      
      .estimated-completion {
        margin-top: $ios-spacing-md;
        padding-top: $ios-spacing-md;
        border-top: 1px solid $ios-border;
        text-align: center;
        
        .completion-label {
          font-size: $ios-font-size-xs;
          color: $ios-text-secondary;
          margin-bottom: $ios-spacing-xs;
        }
        
        .completion-date {
          font-size: $ios-font-size-sm;
          font-weight: $ios-font-weight-semibold;
          color: $ios-primary;
        }
        
        .completion-confidence {
          font-size: $ios-font-size-xs;
          color: $ios-text-tertiary;
          margin-top: 2px;
        }
      }
    }
  }

  // 通用按钮样式
  .btn-primary, .btn-success, .btn-ghost {
    border: none;
    border-radius: 6px;
    font-size: $ios-font-size-xs;
    font-weight: $ios-font-weight-medium;
    cursor: pointer;
    transition: all 0.2s ease;
    
    &.btn-sm {
      padding: 6px 12px;
    }
    
    &.btn-xs {
      padding: 4px 8px;
    }
    
    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
  
  .btn-primary {
    background: $ios-primary;
    color: white;
    
    &:hover:not(:disabled) {
      background: color.adjust($ios-primary, $lightness: -10%);
    }
  }
  
  .btn-success {
    background: #34C759;
    color: white;
    
    &:hover:not(:disabled) {
      background: color.adjust(#34C759, $lightness: -10%);
    }
  }
  
  .btn-ghost {
    background: transparent;
    color: $ios-text-secondary;
    border: 1px solid $ios-border;
    
    &:hover:not(:disabled) {
      background: $ios-background-secondary;
      color: $ios-text-primary;
    }
  }
}

// 方案调整面板
.adjustment-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  
  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: $ios-spacing-lg;
    border-bottom: 1px solid $ios-border;
    
    h4 {
      margin: 0;
      font-size: $ios-font-size-md;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
    }
    
    .close-btn {
      width: 32px;
      height: 32px;
      border: none;
      background: $ios-background-secondary;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      
      &:hover {
        background: color.adjust($ios-background-secondary, $lightness: -5%);
      }
    }
  }
  
  .panel-content {
    padding: $ios-spacing-lg;
    max-height: 60vh;
    overflow-y: auto;
    
    .adjustment-form {
      .form-group {
        margin-bottom: $ios-spacing-md;
        
        label {
          display: block;
          font-size: $ios-font-size-xs;
          font-weight: $ios-font-weight-medium;
          color: $ios-text-primary;
          margin-bottom: $ios-spacing-xs;
        }
        
        .form-control {
          width: 100%;
          padding: $ios-spacing-sm;
          border: 1px solid $ios-border;
          border-radius: 6px;
          font-size: $ios-font-size-sm;
          
          &:focus {
            outline: none;
            border-color: $ios-primary;
            box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
          }
        }
        
        .form-help {
          font-size: $ios-font-size-xs;
          color: $ios-text-secondary;
          margin-top: $ios-spacing-xs;
        }
      }
      
      .adjustment-preview {
        margin-top: $ios-spacing-lg;
        padding: $ios-spacing-md;
        background: $ios-background-secondary;
        border-radius: 8px;
        
        h5 {
          margin: 0 0 $ios-spacing-sm 0;
          font-size: $ios-font-size-sm;
          font-weight: $ios-font-weight-semibold;
          color: $ios-text-primary;
        }
        
        .preview-content {
          font-size: $ios-font-size-xs;
          color: $ios-text-secondary;
          line-height: 1.4;
        }
      }
    }
  }
  
  .panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: $ios-spacing-sm;
    padding: $ios-spacing-lg;
    border-top: 1px solid $ios-border;
    
    .btn {
      padding: $ios-spacing-sm $ios-spacing-md;
      border: none;
      border-radius: 6px;
      font-size: $ios-font-size-sm;
      cursor: pointer;
      transition: all 0.2s ease;
      
      &.btn-cancel {
        background: $ios-background-secondary;
        color: $ios-text-primary;
        
        &:hover {
          background: color.adjust($ios-background-secondary, $lightness: -5%);
        }
      }
      
      &.btn-save {
        background: $ios-primary;
        color: white;
        
        &:hover {
          background: color.adjust($ios-primary, $lightness: -10%);
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .proposal-confirm-card {
    .card-header {
      flex-direction: column;
      gap: $ios-spacing-sm;
      text-align: center;
    }
    
    .tab-navigation {
      .tab-button {
        padding: $ios-spacing-xs;
        font-size: $ios-font-size-xs;
        
        svg {
          width: 12px;
          height: 12px;
        }
      }
    }
    
    .overview-grid,
    .comparison-grid,
    .furniture-grid,
    .annotations-grid {
      grid-template-columns: 1fr;
    }
    
    .confirmation-steps {
      .confirmation-step {
        flex-direction: column;
        text-align: center;
      }
    }
    
    .timeline-container {
      &::before {
        left: 10px;
      }
      
      .timeline-item {
        padding-left: 30px;
        
        .timeline-marker {
          left: 2px;
        }
      }
    }
    
    .summary-grid,
    .summary-stats {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .adjustment-panel {
      width: 90%;
      max-width: 400px;
    }
  }
}
