// 质量管理页面样式

// 导入iOS主题变量 - 使用新的Sass @use语法以避免弃用警告
@use '../ios-theme' as *;

/* 强制缩小所有大的勾选图标和相关图标 */
svg[viewBox*="24 24"],
svg[width="24"][height="24"],
svg[width="20"][height="20"],
svg[width="56"][height="56"],
svg[width="60"][height="60"],
svg[width="80"][height="80"],
svg[width="100"][height="100"],
.header-icon svg,
.stat-icon svg,
.section-icon svg,
.title-icon svg,
.subsection-icon svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

/* 强制缩小所有大尺寸的图标容器 */
.header-icon,
.stat-icon,
.section-icon,
.title-icon,
.subsection-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

/* 特别针对大的圆形勾选图标 */
svg path[d*="12l2 2 4-4"],
svg path[d*="9 12l2 2 4-4"],
svg path[d*="10l2 2 4-4"],
svg path[d*="check"],
svg circle[r="8"],
svg circle[r="9"],
svg circle[r="10"],
svg circle[r="12"] {
  transform: scale(0.5) !important;
  transform-origin: center !important;
}

/* 全局强制缩小任何过大的SVG */
svg {
  max-width: 24px !important;
  max-height: 24px !important;
}

// 全局样式重置
.quality-management-main {
  width: 100%;
  height: 100vh;
  background-color: $ios-background;
  color: $ios-text-primary;
  font-family: $ios-font-family;
  padding: $ios-spacing-xl;
  overflow-y: auto;
  
  // 应用iOS风格滚动条
  scrollbar-width: $ios-scrollbar-width;
  &::-webkit-scrollbar {
    width: $ios-scrollbar-width;
  }
  &::-webkit-scrollbar-track {
    background: $ios-scrollbar-track;
  }
  &::-webkit-scrollbar-thumb {
    background: $ios-scrollbar-thumb;
    border-radius: $ios-radius-full;
  }
  &::-webkit-scrollbar-thumb:hover {
    background: $ios-scrollbar-thumb-hover;
  }
}

// 页面头部
.quality-management-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: $ios-radius-xl;
  padding: $ios-spacing-xl;
  margin-bottom: $ios-spacing-xl;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: $ios-spacing-lg;
    
    .header-left {
      display: flex;
      align-items: center;
      gap: $ios-spacing-lg;
      
      .header-icon {
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, $ios-primary 0%, #0056b3 100%);
        border-radius: $ios-radius-xl;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 4px 12px rgba(0, 71, 171, 0.3);
        
        svg {
          width: 28px;
          height: 28px;
        }
      }
      
      .header-text {
        h1 {
          font-size: 32px;
          font-weight: 700;
          color: $ios-text-primary;
          margin: 0 0 4px 0;
          letter-spacing: -0.5px;
        }
        
        .header-subtitle {
          font-size: $ios-font-size-base;
          color: $ios-text-secondary;
          margin: 0;
          font-weight: 400;
        }
      }
    }
    
    .header-actions {
      display: flex;
      gap: $ios-spacing-md;
      
      .header-btn {
        display: flex;
        align-items: center;
        gap: $ios-spacing-xs;
        padding: 12px 20px;
        border-radius: $ios-radius-lg;
        font-weight: 500;
        font-size: $ios-font-size-sm;
        transition: all 0.2s ease;
        border: none;
        cursor: pointer;
        
        svg {
          width: 16px;
          height: 16px;
        }
        
        &.btn-primary {
          background: linear-gradient(135deg, $ios-primary 0%, #0056b3 100%);
          color: white;
          box-shadow: 0 2px 8px rgba(0, 71, 171, 0.3);
          
          &:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 71, 171, 0.4);
          }
        }
        
        &.btn-secondary {
          background-color: $ios-background;
          color: $ios-text-primary;
          border: 1px solid $ios-border;
          
          &:hover {
            background-color: $ios-background-secondary;
            transform: translateY(-1px);
          }
        }
      }
    }
  }
  
  // 统计卡片
  .stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: $ios-spacing-lg;
    
    .stat-card {
      background: rgba(255, 255, 255, 0.7);
      border-radius: $ios-radius-lg;
      padding: $ios-spacing-lg;
      display: flex;
      align-items: center;
      gap: $ios-spacing-md;
      border: 1px solid rgba(255, 255, 255, 0.5);
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      
      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.9);
      }
      
      .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: $ios-radius-lg;
        display: flex;
        align-items: center;
        justify-content: center;
        
        &.pending {
          background: linear-gradient(135deg, #ff9500 0%, #ff7b00 100%);
          color: white;
        }
        
        &.processing {
          background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
          color: white;
        }
        
        &.completed {
          background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
          color: white;
        }
        
        &.quality {
          background: linear-gradient(135deg, #af52de 0%, #8e44ad 100%);
          color: white;
        }
      }
      
      .stat-content {
        .stat-number {
          font-size: 24px;
          font-weight: 700;
          color: $ios-text-primary;
          margin: 0;
          line-height: 1;
        }
        
        .stat-label {
          font-size: $ios-font-size-sm;
          color: $ios-text-secondary;
          margin: 4px 0 0 0;
          font-weight: 500;
        }
      }
    }
  }
}

// 内容区域
.quality-management-content {
  display: flex;
  flex-direction: column;
  gap: $ios-spacing-xxl;
}

// 通用Section样式
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: $ios-spacing-lg;
  
  h2 {
    font-size: $ios-font-size-xl;
    font-weight: $ios-font-weight-medium;
    color: $ios-text-primary;
    margin: 0;
    display: flex;
    align-items: center;
    
    &::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 24px;
      background-color: $ios-primary;
      border-radius: $ios-radius-full;
      margin-right: $ios-spacing-md;
    }
  }
}

// 筛选区域
.filter-section {
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-lg;
  padding: $ios-spacing-lg;
  margin-bottom: $ios-spacing-lg;
  border: 1px solid $ios-border;
  
  .search-filter {
    display: flex;
    align-items: center;
    gap: $ios-spacing-md;
    margin-bottom: $ios-spacing-md;
    
    .search-input {
      flex: 1;
      position: relative;
      
      input {
        width: 100%;
        padding: $ios-spacing-md $ios-spacing-lg $ios-spacing-md $ios-spacing-xxl;
        border: 1px solid $ios-border;
        border-radius: $ios-radius-md;
        background-color: $ios-background;
        color: $ios-text-primary;
        font-size: $ios-font-size-base;
        font-family: $ios-font-family;
        transition: border-color 0.2s ease;
        
        &:focus {
          outline: none;
          border-color: $ios-primary;
          box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
        }
        
        &::placeholder {
          color: $ios-text-tertiary;
        }
      }
      
      .search-icon {
        position: absolute;
        left: $ios-spacing-md;
        top: 50%;
        transform: translateY(-50%);
        color: $ios-text-tertiary;
      }
    }
    
    .filter-select {
      
      select {
        padding: $ios-spacing-md $ios-spacing-lg;
        border: 1px solid $ios-border;
        border-radius: $ios-radius-md;
        background-color: $ios-background;
        color: $ios-text-primary;
        font-size: $ios-font-size-base;
        font-family: $ios-font-family;
        cursor: pointer;
        transition: border-color 0.2s ease;
        
        &:focus {
          outline: none;
          border-color: $ios-primary;
          box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
        }
        
        option {
          background-color: $ios-background;
          color: $ios-text-primary;
        }
      }
    }
  }
}

// 任务列表样式
.task-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: $ios-spacing-lg;
  
  .task-card {
    background-color: $ios-background;
    border-radius: $ios-radius-lg;
    padding: $ios-spacing-lg;
    border: 1px solid $ios-border;
    box-shadow: $ios-shadow-sm;
    transition: all 0.2s ease;
    cursor: pointer;
    
    &:hover {
      box-shadow: $ios-shadow-md;
      transform: translateY(-2px);
    }
    
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: $ios-spacing-md;
      
      .task-title {
        font-size: $ios-font-size-base;
        font-weight: $ios-font-weight-medium;
        color: $ios-text-primary;
        margin: 0;
        flex: 1;
        margin-right: $ios-spacing-md;
        line-height: 1.4;
      }
      
      .task-status {
        font-size: $ios-font-size-xs;
        padding: 4px $ios-spacing-sm;
        border-radius: $ios-radius-full;
        font-weight: $ios-font-weight-medium;
        white-space: nowrap;
      }
      
      .status-pending {
        background-color: rgba(255, 149, 0, 0.1);
        color: $ios-warning;
      }
      
      .status-completed {
        background-color: rgba(52, 199, 89, 0.1);
        color: $ios-success;
      }
      
      .status-rejected {
        background-color: rgba(255, 59, 48, 0.1);
        color: $ios-danger;
      }
    }
    
    .card-body {
      font-size: $ios-font-size-sm;
      color: $ios-text-secondary;
      margin-bottom: $ios-spacing-md;
      
      .task-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: $ios-spacing-xs;
        
        .info-label {
          color: $ios-text-tertiary;
        }
        
        .info-value {
          font-weight: $ios-font-weight-medium;
          color: $ios-text-primary;
        }
      }
    }
    
    .card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: $ios-spacing-md;
      border-top: 1px solid $ios-border;
      
      .task-date {
        font-size: $ios-font-size-xs;
        color: $ios-text-tertiary;
      }
      
      .task-priority {
        font-size: $ios-font-size-xs;
        padding: 2px $ios-spacing-xs;
        border-radius: $ios-radius-sm;
        font-weight: $ios-font-weight-medium;
        
        &.high {
          background-color: rgba(255, 59, 48, 0.1);
          color: $ios-danger;
        }
        
        &.medium {
          background-color: rgba(255, 149, 0, 0.1);
          color: $ios-warning;
        }
        
        &.low {
          background-color: rgba(52, 199, 89, 0.1);
          color: $ios-success;
        }
      }
    }
  }
}

// 操作按钮样式 - iOS风格设计
.action-buttons {
  display: flex;
  gap: $ios-spacing-md;
  margin-bottom: $ios-spacing-lg;
  
  .btn {
    padding: $ios-spacing-sm $ios-spacing-md;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    font-weight: $ios-font-weight-medium;
    cursor: pointer;
    font-family: $ios-font-family;
    transition: $ios-feedback-tap;
    // 添加iOS风格的按钮背景模糊效果
    backdrop-filter: blur(8px);
    // 添加iOS风格的点击反馈效果
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    
    &.btn-primary {
      // 克莱因蓝主色调，添加微妙的渐变效果
      background: linear-gradient(145deg, $ios-primary, #003D99);
      color: white;
      border: none;
      // 添加iOS风格的光泽效果
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: all 0.3s ease;
      }
      
      &:hover {
        // 悬停时轻微变亮并上移
        background: linear-gradient(145deg, #0052CC, $ios-primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 71, 171, 0.3);
      }
      
      &:active {
        // 点击时轻微压缩
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 71, 171, 0.2);
      }
    }
    
    &.btn-secondary {
      background-color: $ios-background-secondary;
      color: $ios-text-primary;
      border: 1px solid $ios-border;
      
      &:hover {
        background-color: $ios-background;
        transform: translateY(-1px);
      }
    }
  }
}

// 分页控件样式
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: $ios-spacing-sm;
  margin-top: $ios-spacing-xl;
  
  .page-item {
    
    .page-link {
      padding: $ios-spacing-xs $ios-spacing-md;
      border: 1px solid $ios-border;
      border-radius: $ios-radius-md;
      background-color: $ios-background;
      color: $ios-text-primary;
      cursor: pointer;
      transition: $ios-feedback-tap;
      
      &:hover:not(:disabled) {
        background-color: $ios-background-secondary;
        transform: translateY(-1px);
      }
      
      &.active {
        background-color: $ios-primary;
        color: white;
        border-color: $ios-primary;
      }
      
      &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }
    }
  }
}

// 质量验收标准表格样式
.quality-table {
  width: 100%;
  border-collapse: collapse;
  background-color: $ios-background;
  border-radius: $ios-radius-lg;
  overflow: hidden;
  box-shadow: $ios-shadow-sm;
  border: 1px solid $ios-border;
  
  thead {
    background-color: $ios-background-secondary;
    
    th {
      padding: $ios-spacing-md;
      text-align: left;
      font-weight: $ios-font-weight-medium;
      color: $ios-text-secondary;
      font-size: $ios-font-size-sm;
      border-bottom: 1px solid $ios-border;
    }
  }
  
  tbody {
    
    td {
      padding: $ios-spacing-md;
      color: $ios-text-primary;
      font-size: $ios-font-size-base;
      border-bottom: 1px solid $ios-border;
      
      &:last-child {
        text-align: center;
      }
    }
    
    tr:last-child td {
      border-bottom: none;
    }
    
    tr:hover {
      background-color: $ios-background-secondary;
    }
  }
}

// 培训资源区域样式
.training-section {
  margin-top: $ios-spacing-xxl;
  
  .training-content {
    display: flex;
    gap: $ios-spacing-lg;
    flex-wrap: wrap;
  }
  
  .video-list {
    flex: 1;
    min-width: 300px;
    
    .video-item {
      display: flex;
      gap: $ios-spacing-md;
      padding: $ios-spacing-md;
      border-radius: $ios-radius-lg;
      background-color: $ios-background;
      border: 1px solid $ios-border;
      margin-bottom: $ios-spacing-md;
      transition: all 0.2s ease;
      cursor: pointer;
      
      &:hover {
        box-shadow: $ios-shadow-sm;
        transform: translateY(-2px);
      }
      
      .video-thumbnail {
        width: 120px;
        height: 70px;
        border-radius: $ios-radius-md;
        overflow: hidden;
        flex-shrink: 0;
        position: relative;
        
        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
        
        .play-icon {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 30px;
          height: 30px;
          background-color: rgba(0, 0, 0, 0.7);
          border-radius: $ios-radius-full;
          display: flex;
          align-items: center;
          justify-content: center;
          color: white;
        }
      }
      
      .video-info {
        flex: 1;
        
        .video-title {
          font-size: $ios-font-size-base;
          font-weight: $ios-font-weight-medium;
          color: $ios-text-primary;
          margin: 0 0 $ios-spacing-xs 0;
        }
        
        .video-meta {
          font-size: $ios-font-size-xs;
          color: $ios-text-tertiary;
        }
      }
    }
  }
}

// 质量整改跟踪 - iOS风格现代化设计
.rectification-section {
  margin-top: $ios-spacing-xxl;
  
  // 现代化搜索筛选区域
  .search-filter-modern {
    display: flex;
    gap: $ios-spacing-lg;
    margin-bottom: $ios-spacing-xl;
    align-items: center;
    
    .search-input-wrapper {
      flex: 1;
      position: relative;
      
      .search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        color: $ios-text-tertiary;
        pointer-events: none;
      }
      
      input {
        width: 100%;
        padding: 14px 16px 14px 48px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: $ios-radius-lg;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        font-size: $ios-font-size-base;
        font-family: $ios-font-family;
        color: $ios-text-primary;
        transition: all 0.3s ease;
        
        &::placeholder {
          color: $ios-text-tertiary;
        }
        
        &:focus {
          outline: none;
          border-color: $ios-primary;
          box-shadow: 0 0 0 3px rgba($ios-primary, 0.1);
        }
      }
    }
    
    .filter-dropdown {
      position: relative;
      min-width: 160px;
      
      select {
        width: 100%;
        padding: 14px 40px 14px 16px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: $ios-radius-lg;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        font-size: $ios-font-size-base;
        font-family: $ios-font-family;
        color: $ios-text-primary;
        cursor: pointer;
        appearance: none;
        transition: all 0.3s ease;
        
        &:focus {
          outline: none;
          border-color: $ios-primary;
          box-shadow: 0 0 0 3px rgba($ios-primary, 0.1);
        }
      }
      
      .dropdown-icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        color: $ios-text-tertiary;
        pointer-events: none;
      }
    }
  }
  
  .rectification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: $ios-spacing-xl;
    
    .rectification-card {
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
      backdrop-filter: blur(20px);
      border-radius: $ios-radius-xl;
      padding: $ios-spacing-xl;
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, $ios-primary 0%, #0056CC 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      
      &:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
        
        &::before {
          opacity: 1;
        }
      }
      
      .card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: $ios-spacing-lg;
        
        .project-info {
          display: flex;
          align-items: center;
          gap: $ios-spacing-md;
          flex: 1;
          
          .project-avatar {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, $ios-primary 0%, #0056CC 100%);
            border-radius: $ios-radius-lg;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            
            svg {
              width: 24px;
              height: 24px;
            }
          }
          
          .project-details {
            flex: 1;
            
            h4 {
              font-size: $ios-font-size-lg;
              font-weight: $ios-font-weight-semibold;
              color: $ios-text-primary;
              margin: 0 0 4px 0;
              line-height: 1.3;
            }
            
            .project-designer {
              font-size: $ios-font-size-sm;
              color: $ios-text-secondary;
              margin: 0;
            }
          }
        }
        
        .status-badge {
          display: flex;
          align-items: center;
          gap: 6px;
          padding: 8px 12px;
          border-radius: $ios-radius-full;
          font-size: $ios-font-size-xs;
          font-weight: $ios-font-weight-medium;
          white-space: nowrap;
          
          .status-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            animation: pulse 2s infinite;
          }
          
          &.status-pending {
            background-color: rgba(255, 149, 0, 0.1);
            color: $ios-warning;
            
            .status-indicator {
              background-color: $ios-warning;
            }
          }
          
          &.status-processing {
            background-color: rgba(0, 122, 255, 0.1);
            color: $ios-primary;
            
            .status-indicator {
              background-color: $ios-primary;
            }
          }
          
          &.status-review {
            background-color: rgba(175, 82, 222, 0.1);
            color: $ios-info;
            
            .status-indicator {
              background-color: $ios-info;
            }
          }
          
          &.status-completed {
            background-color: rgba(52, 199, 89, 0.1);
            color: $ios-success;
            
            .status-indicator {
              background-color: $ios-success;
            }
          }
          
          &.status-rejected {
            background-color: rgba(255, 59, 48, 0.1);
            color: $ios-danger;
            
            .status-indicator {
              background-color: $ios-danger;
            }
          }
        }
      }
      
      .rectification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: $ios-spacing-md;
        
        h4 {
          font-size: $ios-font-size-base;
          font-weight: $ios-font-weight-medium;
          color: $ios-text-primary;
          margin: 0;
          flex: 1;
          margin-right: $ios-spacing-md;
        }
        
        .rectification-status {
          font-size: $ios-font-size-xs;
          padding: 4px $ios-spacing-sm;
          border-radius: $ios-radius-full;
          font-weight: $ios-font-weight-medium;
          white-space: nowrap;
        }
        
        .status-pending {
          background-color: rgba(255, 149, 0, 0.1);
          color: $ios-warning;
        }
        
        .status-processing {
          background-color: rgba(0, 122, 255, 0.1);
          color: $ios-primary;
        }
        
        .status-review {
          background-color: rgba(175, 82, 222, 0.1);
          color: $ios-info;
        }
        
        .status-completed {
          background-color: rgba(52, 199, 89, 0.1);
          color: $ios-success;
        }
        
        .status-rejected {
          background-color: rgba(255, 59, 48, 0.1);
          color: $ios-danger;
        }
      }
      
      .rectification-details {
        font-size: $ios-font-size-sm;
        color: $ios-text-secondary;
        margin-bottom: $ios-spacing-md;
        
        .detail-item {
          display: flex;
          margin-bottom: $ios-spacing-xs;
          
          .detail-label {
            width: 80px;
            color: $ios-text-tertiary;
            flex-shrink: 0;
          }
          
          .detail-value {
            flex: 1;
            
            &.priority-high {
              color: $ios-danger;
              font-weight: $ios-font-weight-medium;
            }
            
            &.priority-medium {
              color: $ios-warning;
              font-weight: $ios-font-weight-medium;
            }
            
            &.priority-low {
              color: $ios-success;
              font-weight: $ios-font-weight-medium;
            }
            
            &.score {
              color: $ios-primary;
              font-weight: $ios-font-weight-semibold;
            }
          }
        }
      }
    }
  }
}
      
      .rectification-actions {
        display: flex;
        justify-content: flex-end;
        gap: $ios-spacing-sm;
        padding-top: $ios-spacing-md;
        border-top: 1px solid $ios-border;
        
        // iOS风格按钮组间距调整
        .btn {
          padding: $ios-spacing-xs $ios-spacing-lg;
          font-size: $ios-font-size-sm;
        }
      }
      
      .btn {
        padding: $ios-spacing-xs $ios-spacing-md;
        border-radius: $ios-radius-md;
        font-size: $ios-font-size-sm;
        border: 1px solid $ios-border;
        background-color: transparent;
        color: $ios-text-primary;
        cursor: pointer;
        font-family: $ios-font-family;
        transition: $ios-feedback-tap;
        
        &.btn-primary {
          background-color: $ios-primary;
          color: white;
          border-color: $ios-primary;
        }
        
        &:hover {
          opacity: 0.9;
          transform: translateY(-1px);
        }
      }
    

// 任务详情样式
.task-details-modal {
  background-color: $ios-background;
  border-radius: $ios-radius-xl;
  padding: $ios-spacing-xl;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: $ios-spacing-lg;
    padding-bottom: $ios-spacing-md;
    border-bottom: 1px solid $ios-border;
    
    h3 {
      font-size: $ios-font-size-xl;
      font-weight: $ios-font-weight-medium;
      color: $ios-text-primary;
      margin: 0;
    }
    
    .close-button {
      background: none;
      border: none;
      font-size: $ios-font-size-xl;
      color: $ios-text-tertiary;
      cursor: pointer;
      padding: $ios-spacing-xs;
      border-radius: $ios-radius-full;
      transition: $ios-feedback-tap;
      
      &:hover {
        background-color: $ios-background-secondary;
      }
    }
  }
  
  .task-info-section {
    margin-bottom: $ios-spacing-lg;
    
    .info-item {
      display: flex;
      margin-bottom: $ios-spacing-sm;
      
      .info-label {
        width: 120px;
        color: $ios-text-tertiary;
        font-weight: $ios-font-weight-medium;
        flex-shrink: 0;
      }
      
      .info-value {
        flex: 1;
        color: $ios-text-primary;
      }
    }
  }
  
  .task-description {
    margin-bottom: $ios-spacing-lg;
    
    h4 {
      font-size: $ios-font-size-base;
      font-weight: $ios-font-weight-medium;
      color: $ios-text-primary;
      margin: 0 0 $ios-spacing-md 0;
    }
    
    p {
      color: $ios-text-secondary;
      line-height: 1.5;
      margin: 0;
    }
  }
}

// 任务页脚
.task-footer {
  display: flex;
  justify-content: flex-end;
  gap: $ios-spacing-md;
  margin-top: $ios-spacing-lg;
  padding-top: $ios-spacing-lg;
  border-top: 1px solid $ios-border;
  
  .btn {
    padding: $ios-spacing-sm $ios-spacing-lg;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    font-weight: $ios-font-weight-medium;
    cursor: pointer;
    font-family: $ios-font-family;
    transition: $ios-feedback-tap;
    
    &.btn-primary {
      background-color: $ios-primary;
      color: white;
      border: none;
      
      &:hover {
        background-color: $ios-primary-light;
        transform: translateY(-1px);
      }
    }
    
    &.btn-secondary {
      background-color: $ios-background-secondary;
      color: $ios-text-primary;
      border: 1px solid $ios-border;
      
      &:hover {
        background-color: $ios-background;
        transform: translateY(-1px);
      }
    }
    
    &.btn-danger {
      background-color: $ios-danger;
      color: white;
      border: none;
      
      &:hover {
        background-color: #FF453A; // 稍微浅一点的红色
        transform: translateY(-1px);
      }
    }
  }
}

// 任务操作按钮
.task-operation-buttons {
  display: flex;
  gap: $ios-spacing-sm;
  
  .btn {
    padding: $ios-spacing-xs $ios-spacing-md;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    font-weight: $ios-font-weight-medium;
    cursor: pointer;
    font-family: $ios-font-family;
    transition: $ios-feedback-tap;
    
    &.btn-small {
      padding: $ios-spacing-xs $ios-spacing-sm;
      font-size: $ios-font-size-xs;
    }
  }
}

// SOP标签页 - iOS风格现代化设计
.sop-tabs {
  margin-bottom: $ios-spacing-lg;
  
  .tab-buttons {
    display: flex;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: $ios-radius-lg;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: $ios-spacing-lg;
    position: relative;
    overflow: hidden;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
      pointer-events: none;
    }
    
    .tab-button {
      flex: 1;
      padding: 14px 20px;
      background-color: transparent;
      border: none;
      color: $ios-text-secondary;
      font-size: $ios-font-size-base;
      font-weight: $ios-font-weight-medium;
      cursor: pointer;
      font-family: $ios-font-family;
      transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      position: relative;
      text-align: center;
      border-radius: $ios-radius-md;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      
      .tab-icon {
        width: 18px;
        height: 18px;
        transition: all 0.3s ease;
        
        svg {
          width: 100%;
          height: 100%;
          fill: currentColor;
        }
      }
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, $ios-primary 0%, #0056CC 100%);
        border-radius: $ios-radius-md;
        opacity: 0;
        transform: scale(0.8);
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1;
      }
      
      span {
        position: relative;
        z-index: 2;
        transition: all 0.3s ease;
      }
      
      &.active {
        color: white;
        font-weight: $ios-font-weight-semibold;
        
        &::before {
          opacity: 1;
          transform: scale(1);
        }
        
        .tab-icon {
          transform: scale(1.1);
        }
      }
      
      &:hover:not(.active) {
        background-color: rgba($ios-primary, 0.08);
        color: $ios-primary;
        transform: translateY(-1px);
        
        .tab-icon {
          transform: scale(1.05);
        }
      }
      
      &:active {
        transform: scale(0.98) translateY(0);
      }
    }
  }
}

// 标签切换动画
@keyframes tabSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

// SOP内容样式 - iOS风格现代化卡片布局
.phase-content {
  display: flex;
  gap: $ios-spacing-xl;
  background-color: transparent;
  padding: 0;
  margin-top: $ios-spacing-lg;
  
  .sop-section {
    flex: 1;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: $ios-radius-xl;
    padding: $ios-spacing-xl;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, $ios-primary 0%, #0056CC 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
      
      &::before {
        opacity: 1;
      }
    }
    
    h3 {
      font-size: $ios-font-size-lg;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
      margin: 0 0 $ios-spacing-lg 0;
      padding-bottom: $ios-spacing-md;
      border-bottom: 1px solid $ios-border;
      display: flex;
      align-items: center;
      
      span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background-color: $ios-primary;
        color: white;
        border-radius: $ios-radius-full;
        font-size: $ios-font-size-sm;
        margin-right: $ios-spacing-md;
        font-weight: $ios-font-weight-semibold;
      }
    }
    
    .requirement-list,
    .rule-list {
      list-style: none;
      padding: $ios-spacing-md;
      margin: 0 0 $ios-spacing-lg 0;
      background-color: rgba(0, 71, 171, 0.03);
      border-radius: $ios-radius-lg;
      border-left: 3px solid $ios-primary;
      
      li {
        position: relative;
        padding-left: $ios-spacing-lg;
        margin-bottom: $ios-spacing-md;
        color: $ios-text-primary;
        line-height: 1.6;
        
        &:before {
          content: '✓';
          position: absolute;
          left: 0;
          color: $ios-primary;
          font-size: $ios-font-size-base;
          font-weight: $ios-font-weight-semibold;
          line-height: 1;
        }
        
        &:last-child {
          margin-bottom: 0;
        }
      }
    }
    
    .quality-table {
      width: 100%;
      border-collapse: collapse;
      background-color: $ios-background;
      border-radius: $ios-radius-xl;
      overflow: hidden;
      box-shadow: $ios-shadow-sm;
      border: 1px solid $ios-border;
      
      thead {
        // iOS风格表格头部
        background-color: $ios-background-secondary;
        
        th {
          padding: $ios-spacing-lg $ios-spacing-lg;
          text-align: left;
          font-weight: $ios-font-weight-semibold;
          color: $ios-text-secondary;
          font-size: $ios-font-size-sm;
          border-bottom: 1px solid $ios-border;
          letter-spacing: 0.5px;
          text-transform: uppercase;
        }
      }
      
      tbody {
        tr {
          transition: background-color 0.2s ease;
          
          &:hover {
            background-color: rgba(0, 71, 171, 0.03);
          }
          
          td {
            padding: $ios-spacing-lg $ios-spacing-lg;
            border-bottom: 1px solid $ios-border;
            color: $ios-text-primary;
            
            // iOS风格表格数据对齐和间距
            &:first-child {
              font-weight: $ios-font-weight-medium;
            }
            
            &:last-child {
              font-weight: $ios-font-weight-semibold;
              color: $ios-primary;
            }
          }
          
          &:last-child td {
            border-bottom: none;
          }
        }
      }
      
      tbody {
        
        td {
          padding: $ios-spacing-lg $ios-spacing-md;
          color: $ios-text-primary;
          font-size: $ios-font-size-base;
          border-bottom: 1px solid $ios-border;
          transition: all 0.2s ease;
          
          &:last-child {
            text-align: center;
          }
        }
        
        tr:last-child td {
          border-bottom: none;
        }
        
        tr {
          transition: all 0.3s ease;
          
          &:hover {
            background-color: $ios-background-secondary;
            transform: translateX(4px);
          }
        }
      }
    }
    
    .table-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: $ios-spacing-md;
      
      h4 {
        font-size: $ios-font-size-base;
        font-weight: $ios-font-weight-medium;
        color: $ios-text-primary;
        margin: 0;
      }
    }
  }
}

// 审核任务列表
.audit-task-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: $ios-spacing-xl;
  
  .audit-task-item {
    padding: $ios-spacing-lg;
    border-radius: $ios-radius-xl;
    background-color: $ios-background;
    border: 1px solid $ios-border;
    box-shadow: $ios-shadow-md;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    
    &:hover {
      box-shadow: $ios-shadow-lg;
      transform: translateY(-4px);
    }
    
    &.priority-high {
      border-left: 4px solid $ios-danger;
    }
    
    &.priority-medium {
      border-left: 4px solid $ios-warning;
    }
    
    &.priority-low {
      border-left: 4px solid $ios-success;
    }
    
    .task-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: $ios-spacing-md;
      
      h4 {
        font-size: $ios-font-size-base;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
        margin: 0 0 $ios-spacing-xs 0;
        flex: 1;
        margin-right: $ios-spacing-md;
        line-height: 1.4;
      }
      
      .task-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: $ios-spacing-xs;
      }
      
      .task-status {
        font-size: $ios-font-size-xs;
        padding: 4px $ios-spacing-sm;
        border-radius: $ios-radius-full;
        font-weight: $ios-font-weight-medium;
        white-space: nowrap;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
      
      .status-pending {
        background-color: rgba(255, 149, 0, 0.15);
        color: $ios-warning;
      }
      
      .status-completed {
        background-color: rgba(52, 199, 89, 0.15);
        color: $ios-success;
      }
      
      .status-rejected {
        background-color: rgba(255, 59, 48, 0.15);
        color: $ios-danger;
      }
      
      .priority-badge {
        font-size: $ios-font-size-xs;
        padding: 2px $ios-spacing-xs;
        border-radius: $ios-radius-sm;
        font-weight: $ios-font-weight-medium;
        white-space: nowrap;
        
        &.high {
          background-color: rgba(255, 59, 48, 0.1);
          color: $ios-danger;
        }
        
        &.medium {
          background-color: rgba(255, 149, 0, 0.1);
          color: $ios-warning;
        }
        
        &.low {
          background-color: rgba(52, 199, 89, 0.1);
          color: $ios-success;
        }
      }
    }
    
    .task-details {
      font-size: $ios-font-size-sm;
      color: $ios-text-secondary;
      margin-bottom: $ios-spacing-lg;
      padding: $ios-spacing-md;
      background-color: $ios-background-secondary;
      border-radius: $ios-radius-md;
      
      .detail-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: $ios-spacing-sm;
        padding-bottom: $ios-spacing-sm;
        border-bottom: 1px solid $ios-border;
        
        &:last-child {
          margin-bottom: 0;
          padding-bottom: 0;
          border-bottom: none;
        }
        
        .detail-label {
          font-weight: $ios-font-weight-medium;
          color: $ios-text-tertiary;
          flex-shrink: 0;
        }
        
        .detail-value {
          font-weight: $ios-font-weight-medium;
          color: $ios-text-primary;
          text-align: right;
        }
        
        .score {
          font-size: $ios-font-size-base;
          font-weight: $ios-font-weight-semibold;
          color: $ios-primary;
        }
      }
    }
    
    .task-comments {
      margin-bottom: $ios-spacing-lg;
      padding: $ios-spacing-md;
      background-color: rgba(0, 71, 171, 0.03);
      border-radius: $ios-radius-md;
      border-left: 3px solid $ios-primary;
      
      .comments-label {
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-medium;
        color: $ios-text-secondary;
        margin-bottom: $ios-spacing-xs;
      }
      
      .comment-text {
        font-size: $ios-font-size-sm;
        color: $ios-text-primary;
        line-height: 1.5;
      }
    }
    
    .task-actions {
      display: flex;
      justify-content: flex-end;
      gap: $ios-spacing-sm;
      padding-top: $ios-spacing-md;
      border-top: 1px solid $ios-border;
    }
    
    .btn {
      padding: $ios-spacing-sm $ios-spacing-lg;
      border-radius: $ios-radius-md;
      font-size: $ios-font-size-sm;
      border: 1px solid $ios-border;
      background-color: transparent;
      color: $ios-text-primary;
      cursor: pointer;
      font-family: $ios-font-family;
      font-weight: $ios-font-weight-medium;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: $ios-radius-full;
        background-color: rgba(0, 0, 0, 0.1);
        transform: translate(-50%, -50%);
        transition: all 0.3s ease;
      }
      
      &:hover::before {
        width: 100px;
        height: 100px;
      }
      
      &.btn-primary {
        background-color: $ios-primary;
        color: white;
        border-color: $ios-primary;
        
        &::before {
          background-color: rgba(255, 255, 255, 0.2);
        }
      }
      
      &.btn-success {
        background-color: $ios-success;
        color: white;
        border-color: $ios-success;
        
        &::before {
          background-color: rgba(255, 255, 255, 0.2);
        }
      }
      
      &.btn-warning {
        background-color: $ios-warning;
        color: white;
        border-color: $ios-warning;
        
        &::before {
          background-color: rgba(255, 255, 255, 0.2);
        }
      }
      
      &:hover {
        opacity: 0.9;
        transform: translateY(-2px);
      }
    }
  }
}

// 导出按钮样式
.btn-export {
  padding: $ios-spacing-sm $ios-spacing-lg;
  background-color: $ios-primary;
  color: white;
  border: none;
  border-radius: $ios-radius-md;
  font-size: $ios-font-size-sm;
  font-weight: $ios-font-weight-semibold;
  cursor: pointer;
  font-family: $ios-font-family;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: $ios-spacing-xs;
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: $ios-radius-full;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
  }
  
  &:hover {
    background-color: $ios-primary-light;
    transform: translateY(-2px);
  }
  
  &:hover::before {
    width: 100px;
    height: 100px;
  }
}

// 状态徽章优化
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px $ios-spacing-sm;
  border-radius: $ios-radius-full;
  font-size: $ios-font-size-xs;
  font-weight: $ios-font-weight-medium;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  
  &.status-approved {
    background-color: rgba(52, 199, 89, 0.15);
    color: $ios-success;
  }
  
  &.status-pending {
    background-color: rgba(255, 149, 0, 0.15);
    color: $ios-warning;
  }
  
  &.status-rejected {
    background-color: rgba(255, 59, 48, 0.15);
    color: $ios-danger;
  }
  
  &.status-processing {
    background-color: rgba(0, 71, 171, 0.15);
    color: $ios-primary;
  }
  
  &:hover {
    transform: scale(1.05);
  }
}

// 进度条样式
.progress-bar {
  height: 8px;
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-full;
  overflow: hidden;
  margin: $ios-spacing-md 0;
  position: relative;
  
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, $ios-primary 0%, $ios-primary-light 100%);
    border-radius: $ios-radius-full;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
    
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
      animation: shimmer 2s infinite;
    }
  }
}

// 动画效果
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

// 卡片悬停效果增强
.card-hover {
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: $ios-shadow-lg;
  }
}

// 列表项增强
.list-item-enhanced {
  transition: all 0.2s ease;
  
  &:hover {
    background-color: $ios-background-secondary;
    transform: translateX(4px);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .quality-management-main {
    padding: $ios-spacing-md;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: $ios-spacing-md;
    
    h2 {
      &::before {
        display: none;
      }
    }
  }
  
  .search-filter {
    width: 100%;
    flex-direction: column;
    
    input,
    select {
      flex: 1;
      width: 100%;
    }
  }
  
  .sop-tabs .tab-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    
    &::-webkit-scrollbar {
      display: none;
    }
  }
  
  .task-details .detail-item {
    flex-direction: column;
    
    .label {
      width: auto;
      margin-bottom: $ios-spacing-xs;
    }
  }
  
  .training-content {
    flex-direction: column;
  }
  
  .video-item {
    flex-direction: column;
    
    .video-thumbnail {
      width: 100%;
      height: auto;
      aspect-ratio: 16/9;
    }
  }
  
  .rectification-list {
    grid-template-columns: 1fr;
  }
  
  .quality-table {
    display: block;
    overflow-x: auto;
    
    thead {
      white-space: nowrap;
    }
    
    tbody {
      
      td {
        white-space: nowrap;
      }
    }
  }
}

// 质量整改跟踪板块 - 搜索和筛选样式
.rectification-section {
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: $ios-spacing-xl;
  }
  
  .search-filter {
    display: flex;
    align-items: center;
    gap: $ios-spacing-md;
    padding: $ios-spacing-sm $ios-spacing-md;
    background-color: $ios-background;
    border: 1px solid $ios-border;
    border-radius: $ios-radius-lg;
    box-shadow: $ios-shadow-sm;
  }
  
  .search-filter input {
    flex: 1;
    padding: $ios-spacing-sm $ios-spacing-md;
    border: 1px solid $ios-border;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    color: $ios-text-primary;
    background-color: $ios-background-secondary;
    font-family: $ios-font-family;
    transition: all 0.2s ease;
    min-width: 200px;
  }
  
  .search-filter input:focus {
    outline: none;
    border-color: $ios-primary;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.1);
  }
  
  .search-filter select {
    padding: $ios-spacing-sm $ios-spacing-md;
    border: 1px solid $ios-border;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    color: $ios-text-primary;
    background-color: $ios-background-secondary;
    font-family: $ios-font-family;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238E8E93" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right $ios-spacing-md center;
    background-size: 16px;
    padding-right: $ios-spacing-lg;
  }
  
  .search-filter select:focus {
    outline: none;
    border-color: $ios-primary;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.1);
  }
  
  .search-filter select::-ms-expand {
    display: none;
  }
  
  // 整改任务列表样式
  .rectification-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: $ios-spacing-xl;
  }
  
  // 整改任务卡片样式 - 现代感边缘优化
  .rectification-item {
    padding: $ios-spacing-lg;
    border-radius: $ios-radius-xl;
    background-color: $ios-background;
    border: 1px solid $ios-border;
    box-shadow: $ios-shadow-md;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    // 添加现代感边缘光晕效果
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.05),
      0 1px 3px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(0, 71, 171, 0.03);
    
    // 悬停效果增强
    &:hover {
      box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 4px 6px -2px rgba(0, 0, 0, 0.04),
        0 0 0 2px rgba(0, 71, 171, 0.07);
      transform: translateY(-2px);
    }
    
    // 高优先级任务特殊边缘样式
    &.priority-high {
      border-left: 4px solid $ios-danger;
      // 添加红色边缘发光效果
      box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 59, 48, 0.05),
        inset 0 0 0 1px rgba(255, 59, 48, 0.1);
    }
    
    &.priority-medium {
      border-left: 4px solid $ios-warning;
      // 添加黄色边缘发光效果
      box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 149, 0, 0.05),
        inset 0 0 0 1px rgba(255, 149, 0, 0.1);
    }
    
    &.priority-low {
      border-left: 4px solid $ios-success;
      // 添加绿色边缘发光效果
      box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(52, 199, 89, 0.05),
        inset 0 0 0 1px rgba(52, 199, 89, 0.1);
    }
  }
  
  // 卡片头部样式
  .rectification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: $ios-spacing-md;
    
    h4 {
      font-size: $ios-font-size-base;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
      margin: 0;
      line-height: 1.4;
    }
  }
  
  // 状态标签样式
  .rectification-status {
    font-size: $ios-font-size-xs;
    padding: 4px $ios-spacing-sm;
    border-radius: $ios-radius-full;
    font-weight: $ios-font-weight-medium;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

// iOS风格滚动条
::-webkit-scrollbar {
  width: $ios-scrollbar-width;
}

::-webkit-scrollbar-track {
  background: $ios-scrollbar-track;
}

::-webkit-scrollbar-thumb {
  background: $ios-scrollbar-thumb;
  border-radius: $ios-radius-full;
}

::-webkit-scrollbar-thumb:hover {
  background: $ios-scrollbar-thumb-hover;
}

// 能力提升工具板块样式 - iOS风格现代化设计
.training-section {
  margin-top: $ios-spacing-xxl;
  
  // 主标题样式
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: $ios-spacing-xxl;
    
    .section-title {
      display: flex;
      align-items: center;
      gap: $ios-spacing-md;
      
      .title-icon {
        width: 32px;
        height: 32px;
        background: linear-gradient(135deg, $ios-primary 0%, #0056CC 100%);
        border-radius: $ios-radius-lg;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        flex-shrink: 0;
        
        svg {
          width: 16px;
          height: 16px;
        }
      }
      
      .title-content {
        h2 {
          font-size: $ios-font-size-xl;
          font-weight: $ios-font-weight-semibold;
          color: $ios-text-primary;
          margin: 0 0 4px 0;
        }
        
        p {
          font-size: $ios-font-size-sm;
          color: $ios-text-secondary;
          margin: 0;
        }
      }
    }
    
    .section-actions {
      .progress-btn {
        display: flex;
        align-items: center;
        gap: $ios-spacing-xs;
        padding: 10px 16px;
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-medium;
        color: $ios-primary;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba($ios-primary, 0.2);
        border-radius: $ios-radius-lg;
        cursor: pointer;
        transition: all 0.3s ease;
        font-family: $ios-font-family;
        
        svg {
          width: 16px;
          height: 16px;
        }
        
        &:hover {
          background: rgba($ios-primary, 0.05);
          border-color: $ios-primary;
          transform: translateY(-1px);
        }
      }
    }
  }
   
   // 培训内容整体布局
   .training-content {
     display: flex;
     flex-direction: column;
     gap: $ios-spacing-lg;
   }
   
   .subsection-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: $ios-spacing-lg;
    
    .subsection-title {
      display: flex;
      align-items: center;
      gap: $ios-spacing-sm;
      
      .subsection-icon {
        width: 20px !important;
        height: 20px !important;
        background: linear-gradient(135deg, $ios-primary 0%, #0056CC 100%);
        border-radius: $ios-radius-sm;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        flex-shrink: 0;
        
        svg {
          width: 10px !important;
          height: 10px !important;
        }
      }
      
      h3 {
    font-size: $ios-font-size-base;
    font-weight: $ios-font-weight-medium;
    color: $ios-text-primary;
    margin: 0;
    line-height: 1.3;
  }
    }
    
    .view-all-btn {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 8px 12px;
      font-size: $ios-font-size-xs;
      font-weight: $ios-font-weight-medium;
      color: $ios-primary;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(20px);
      border: 1px solid rgba($ios-primary, 0.2);
      border-radius: $ios-radius-md;
      cursor: pointer;
      transition: all 0.3s ease;
      font-family: $ios-font-family;
      
      svg {
        width: 12px;
        height: 12px;
        transition: transform 0.3s ease;
      }
      
      &:hover {
        background: rgba($ios-primary, 0.05);
        border-color: $ios-primary;
        transform: translateY(-1px);
        
        svg {
          transform: translateX(2px);
        }
      }
    }
  }
}

  // 视频教程样式 - iOS风格现代化设计
  // 移除底部边距，使用父容器的gap控制间距
  
  .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: $ios-spacing-lg;
  }
  
  .video-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: $ios-radius-xl;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, $ios-primary 0%, #0056CC 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    &:hover {
      transform: translateY(-8px);
      box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
      
      &::before {
        opacity: 1;
      }
    }
  }
  
  .video-thumbnail-container {
    position: relative;
    overflow: hidden;
  }
  
  .video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    
    .thumbnail-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }
    
    &:hover .thumbnail-img {
      transform: scale(1.08);
    }
  }
  
  .video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 10px;
    border-radius: $ios-radius-full;
    font-size: $ios-font-size-xs;
    font-weight: $ios-font-weight-medium;
    font-family: $ios-font-family;
  }
  
  .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    
    .play-button {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(20px);
      border: none;
      border-radius: 50%;
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      
      svg {
        width: 24px;
        height: 24px;
        fill: $ios-primary;
        margin-left: 2px;
      }
      
      &:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
      }
    }
    
    &.visible {
      opacity: 1;
    }
  }
  
  .video-info {
    padding: $ios-spacing-lg;
    
    .category-badge {
      display: inline-block;
      padding: 4px 12px;
      background: rgba($ios-primary, 0.1);
      color: $ios-primary;
      border-radius: $ios-radius-full;
      font-size: $ios-font-size-xs;
      font-weight: $ios-font-weight-medium;
      margin-bottom: $ios-spacing-sm;
    }
    
    .video-title {
      font-size: $ios-font-size-base;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
      margin: 0 0 $ios-spacing-xs 0;
      line-height: 1.4;
    }
    
    .video-description {
      font-size: $ios-font-size-sm;
      color: $ios-text-secondary;
      margin: 0 0 $ios-spacing-md 0;
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-clamp: 2;
      overflow: hidden;
    }
    
    .video-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: $ios-font-size-xs;
      color: $ios-text-tertiary;
      
      .views {
        font-weight: $ios-font-weight-medium;
      }
    }
  }

.play-button {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  
  &:hover {
    transform: scale(1.1);
  }
}

.video-info {
  padding: $ios-spacing-md;
}

.category-badge {
  display: inline-block;
  background-color: $ios-primary-light;
  color: $ios-primary;
  padding: 2px $ios-spacing-sm;
  border-radius: $ios-radius-full;
  font-size: $ios-font-size-xs;
  margin-bottom: $ios-spacing-sm;
}

.video-title {
  font-size: $ios-font-size-base;
  font-weight: $ios-font-weight-medium;
  color: $ios-text-primary;
  margin: 0 0 $ios-spacing-sm 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.video-description {
  font-size: $ios-font-size-sm;
  color: $ios-text-secondary;
  margin: 0 0 $ios-spacing-sm 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: $ios-font-size-xs;
  color: $ios-text-tertiary;
}

  // 实践作业样式 - iOS风格现代化设计
  .practice-assignments {
    margin-top: $ios-spacing-md;
  }
  
  .assignment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: $ios-spacing-lg;
  }
  
  .assignment-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: $ios-radius-xl;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, #FF6B35 0%, #F7931E 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    &:hover {
      transform: translateY(-8px);
      box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
      
      &::before {
        opacity: 1;
      }
    }
  }
  
  .assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: $ios-spacing-lg $ios-spacing-lg $ios-spacing-md;
    
    .assignment-icon {
      width: 48px;
      height: 48px;
      background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
      border-radius: $ios-radius-lg;
      display: flex;
      align-items: center;
      justify-content: center;
      
      svg {
        width: 24px;
        height: 24px;
        color: white;
      }
    }
    
    .assignment-meta {
      display: flex;
      flex-direction: column;
      gap: $ios-spacing-xs;
      align-items: flex-end;
      
      .difficulty-badge {
        padding: 4px 10px;
        border-radius: $ios-radius-full;
        font-size: $ios-font-size-xs;
        font-weight: $ios-font-weight-medium;
        
        &.difficulty-初级 {
          background: rgba(52, 199, 89, 0.15);
          color: #34C759;
        }
        
        &.difficulty-中级 {
          background: rgba(255, 149, 0, 0.15);
          color: #FF9500;
        }
        
        &.difficulty-高级 {
          background: rgba(255, 59, 48, 0.15);
          color: #FF3B30;
        }
      }
      
      .assignment-type {
        font-size: $ios-font-size-xs;
        color: $ios-text-tertiary;
        font-weight: $ios-font-weight-medium;
      }
    }
  }
  
  .assignment-content {
    padding: 0 $ios-spacing-lg $ios-spacing-md;
    
    .assignment-title {
      font-size: $ios-font-size-lg;
      font-weight: $ios-font-weight-semibold;
      color: $ios-text-primary;
      margin: 0 0 $ios-spacing-sm 0;
      line-height: 1.3;
    }
    
    .assignment-description {
      font-size: $ios-font-size-sm;
      color: $ios-text-secondary;
      margin: 0 0 $ios-spacing-md 0;
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-clamp: 2;
      overflow: hidden;
    }
    
    .assignment-progress {
      display: flex;
      align-items: center;
      gap: $ios-spacing-sm;
      
      .progress-bar {
        flex: 1;
        height: 6px;
        background: rgba(0, 0, 0, 0.06);
        border-radius: $ios-radius-full;
        overflow: hidden;
        
        .progress-fill {
          height: 100%;
          background: linear-gradient(90deg, #FF6B35 0%, #F7931E 100%);
          border-radius: $ios-radius-full;
          transition: width 0.3s ease;
        }
      }
      
      .progress-text {
        font-size: $ios-font-size-xs;
        font-weight: $ios-font-weight-medium;
        color: $ios-text-tertiary;
        min-width: 35px;
      }
    }
  }
  
  .assignment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: $ios-spacing-md $ios-spacing-lg $ios-spacing-lg;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    
    .assignment-stats {
      display: flex;
      flex-direction: column;
      gap: 2px;
      
      .deadline {
        font-size: $ios-font-size-xs;
        color: $ios-text-tertiary;
      }
      
      .points {
        font-size: $ios-font-size-sm;
        font-weight: $ios-font-weight-medium;
        color: #FF6B35;
      }
    }
    
    .start-btn {
      display: flex;
      align-items: center;
      gap: $ios-spacing-xs;
      padding: 8px 16px;
      background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
      color: white;
      border: none;
      border-radius: $ios-radius-lg;
      font-size: $ios-font-size-sm;
      font-weight: $ios-font-weight-medium;
      cursor: pointer;
      transition: all 0.3s ease;
      
      svg {
        width: 16px;
        height: 16px;
      }
      
      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
      }
      
      &.completed {
        background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
        
        &:hover {
          box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
        }
      }
    }
  }

// 响应式设计 - 移动端和平板端优化
@media (max-width: 768px) {
  .quality-management {
    padding: $ios-spacing-md;
    
    .page-header {
      .header-content {
        flex-direction: column;
        gap: $ios-spacing-md;
        
        .header-actions {
          width: 100%;
          justify-content: space-between;
        }
      }
    }
    
    .stats-overview {
      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: $ios-spacing-md;
      }
    }
    
    .main-content {
      .content-sections {
        .section {
          .section-title {
            .title-content {
              h2 {
                font-size: $ios-font-size-xl;
              }
            }
          }
          
          // SOP标准区域移动端优化
          &.sop-standards {
            .phase-content {
              .sop-grid {
                grid-template-columns: 1fr;
                gap: $ios-spacing-md;
              }
            }
          }
          
          // 质量整改跟踪移动端优化
          &.rectification-section {
            .rectification-grid {
              grid-template-columns: 1fr;
              gap: $ios-spacing-md;
            }
          }
          
          // 能力提升工具移动端优化
          &.training-section {
            .video-grid {
              grid-template-columns: 1fr;
              gap: $ios-spacing-md;
            }
            
            .assignment-grid {
              grid-template-columns: 1fr;
              gap: $ios-spacing-md;
            }
          }
        }
      }
    }
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .quality-management {
    .stats-overview {
      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    
    .main-content {
      .content-sections {
        .section {
          // SOP标准区域平板端优化
          &.sop-standards {
            .phase-content {
              .sop-grid {
                grid-template-columns: repeat(2, 1fr);
              }
            }
          }
          
          // 质量整改跟踪平板端优化
          &.rectification-section {
            .rectification-grid {
              grid-template-columns: repeat(2, 1fr);
            }
          }
          
          // 能力提升工具平板端优化
          &.training-section {
            .video-grid {
              grid-template-columns: repeat(2, 1fr);
            }
            
            .assignment-grid {
              grid-template-columns: repeat(2, 1fr);
            }
          }
        }
      }
    }
  }
}

// 微交互效果增强
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

// 为各个区域添加进入动画
.quality-management {
  .stats-card {
    animation: fadeInUp 0.6s ease-out;
    
    @for $i from 1 through 4 {
      &:nth-child(#{$i}) {
        animation-delay: #{($i - 1) * 0.1}s;
      }
    }
  }
  
  .section {
    animation: fadeInUp 0.8s ease-out;
    
    &.sop-standards {
      animation-delay: 0.2s;
    }
    
    &.rectification-section {
      animation-delay: 0.4s;
    }
    
    &.training-section {
      animation-delay: 0.6s;
    }
  }
  
  .sop-card,
  .rectification-card,
  .video-card,
  .assignment-card {
    animation: scaleIn 0.5s ease-out;
    animation-fill-mode: both;
    
    @for $i from 1 through 6 {
      &:nth-child(#{$i}) {
        animation-delay: #{0.8 + ($i - 1) * 0.1}s;
      }
    }
  }
}

// 滚动时的视差效果
.section {
  transform: translateZ(0);
  will-change: transform;
}

// 优化触摸设备的交互
@media (hover: none) and (pointer: coarse) {
  .sop-card,
  .rectification-card,
  .video-card,
  .assignment-card {
    &:hover {
      transform: none;
    }
    
    &:active {
      transform: scale(0.98);
      transition: transform 0.1s ease;
    }
  }
  
  .btn,
  .tab-button,
  .start-btn,
  .progress-btn {
    &:hover {
      transform: none;
    }
    
    &:active {
      transform: scale(0.95);
      transition: transform 0.1s ease;
    }
  }
}