@use '../../../shared/styles/_ios-theme.scss' as *;
@import './components/vertical-nav/vertical-nav-styles';

/* 项目详情容器 */
.project-detail-container {
  padding: $ios-spacing-lg; // 使用统一的间距变量
  background-color: #f5f7fa;
  color: #333;
  min-height: 100vh;
  box-sizing: border-box; // 确保内边距计算正确
  overflow-x: auto; // 允许水平滚动以防内容过宽
}

/* 四大板块按钮组 - 位于项目标题区域正下方 */
.sections-toolbar-header {
  display: flex;
  gap: 12px;
  width: 100%;
  margin: 20px 0 24px 0;
  padding: 0 24px; /* 与项目详情容器保持一致的左右边距 */
  
  .section-btn {
    flex: 1;
    appearance: none;
    border: 1px solid $ios-border;
    background: $ios-background;
    color: $ios-text-primary;
    padding: 12px 16px;
    border-radius: $ios-radius-md;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    .section-label {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    &.completed {
      background: linear-gradient(135deg, #e6f7e6 0%, #d4edda 100%);
      color: $ios-success;
      border-color: $ios-success;
      box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
    }
    
    &.active {
      background: linear-gradient(135deg, #e8f0fe 0%, #cce7ff 100%);
      color: $ios-primary;
      border-color: $ios-primary;
      box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    }
    
    &.pending {
      background: $ios-background;
      color: $ios-text-secondary;
      border-color: rgba(0, 0, 0, 0.1);
    }
  }
}

// 图片预览模态框样式
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  
  .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
  }
  
  .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
    
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid #e9ecef;
      
      h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 400px;
      }
      
      .close-btn {
        width: 40px;
        height: 40px;
        border: none;
        background: #f8f9fa;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        
        &:hover {
          background: #e9ecef;
          color: #dc3545;
        }
      }
    }
    
    .modal-body {
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      max-height: 60vh;
      
      img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 8px;
      }
    }
    
    .modal-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-top: 1px solid #e9ecef;
      background: #f8f9fa;
      
      .image-info {
        display: flex;
        gap: 12px;
        align-items: center;
        font-size: 14px;
        color: #666;
        
        .status-badge {
          padding: 4px 8px;
          border-radius: 4px;
          font-size: 12px;
          font-weight: 500;
          background: #e9ecef;
          color: #495057;
        }
      }
      
      .modal-actions {
        display: flex;
        gap: 12px;
        
        button {
          padding: 8px 16px;
          border: none;
          border-radius: 6px;
          font-size: 14px;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.2s ease;
          
          &.secondary-btn {
            background: #6c757d;
            color: white;
            
            &:hover {
              background: #5a6268;
            }
          }
          
          &.danger-btn {
            background: #dc3545;
            color: white;
            
            &:hover {
              background: #c82333;
            }
          }
        }
      }
    }

    // 需求关键信息同步区域样式
    .requirement-sync-info {
      margin-top: 16px;
      padding: 16px;
      background: rgba(0, 122, 255, 0.02);
      border: 1px solid rgba(0, 122, 255, 0.1);
      border-radius: 8px;

      h4 {
        font-size: 14px;
        font-weight: 600;
        color: #1d1d1f;
        margin: 0 0 12px 0;
        display: flex;
        align-items: center;
        gap: 6px;

        &::before {
          content: '';
          width: 3px;
          height: 14px;
          background: #007aff;
          border-radius: 2px;
        }
      }

      .key-info-grid {
        display: grid;
        gap: 12px;

        .info-item {
          display: flex;
          align-items: center;
          gap: 8px;
          padding: 8px 12px;
          background: white;
          border-radius: 6px;
          border: 1px solid rgba(0, 0, 0, 0.06);
          font-size: 13px;

          .info-label {
            font-weight: 500;
            color: #666;
            min-width: 60px;
            flex-shrink: 0;
          }

          .info-value {
            color: #1d1d1f;
            font-weight: 500;
            flex: 1;
          }

          .color-preview {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            flex-shrink: 0;
          }

          .color-temp {
            font-size: 11px;
            color: #8e8e93;
            background: rgba(142, 142, 147, 0.1);
            padding: 2px 6px;
            border-radius: 4px;
          }

          .material-weights {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;

            .weight-item {
              font-size: 11px;
              background: rgba(52, 199, 89, 0.1);
              color: #34c759;
              padding: 2px 6px;
              border-radius: 4px;
              font-weight: 500;
            }
          }
        }
      }

      .sync-placeholder {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        background: rgba(142, 142, 147, 0.05);
        border-radius: 6px;
        border: 1px dashed rgba(142, 142, 147, 0.3);

        .placeholder-text {
          font-size: 13px;
          color: #8e8e93;
        }

        .sync-btn {
          padding: 6px 12px;
          background: #007aff;
          color: white;
          border: none;
          border-radius: 4px;
          font-size: 12px;
          font-weight: 500;
          cursor: pointer;
          transition: background-color 0.2s ease;

          &:hover {
            background: #0056cc;
          }

          &:active {
            background: #004499;
          }
        }
      }
    }
  }
}

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

// 下拉菜单动画
@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 项目标题栏 */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: $ios-spacing-xl; // 增加底部间距
  background-color: white;
  padding: $ios-spacing-lg;
  border-radius: $ios-radius-lg;
  width: 100%;
  box-sizing: border-box;
  position: relative; // 确保下拉菜单正确定位
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  .header-left {
    flex: 1;
    
    .header-content {
      h1 {
        margin: 0 0 8px 0;
        font-size: $ios-font-size-xl;
        font-weight: $ios-font-weight-semibold;
        color: $ios-text-primary;
      }
      
      .project-meta {
        display: flex;
        align-items: center;
        gap: $ios-spacing-md;
        
        .project-id {
          font-size: $ios-font-size-sm;
          color: $ios-text-secondary;
        }
        
        .project-status {
          padding: $ios-spacing-xs $ios-spacing-sm;
          border-radius: $ios-radius-full;
          font-size: $ios-font-size-xs;
          font-weight: $ios-font-weight-medium;
          background-color: $ios-primary;
          color: white;
        }
      }
    }
  }
  
  .header-right {
    .header-actions {
      display: flex;
      align-items: center;
      gap: $ios-spacing-sm;
      
      // 顶部导航条容器样式
      .top-nav-container {
        display: flex;
        align-items: center;
        margin-right: $ios-spacing-md; // 与导出按钮保持间距
        
        // 顶部导航条样式
        .top-nav {
          .vertical-nav {
            display: flex;
            flex-direction: row; // 水平排列
            gap: 10px; // 导航按钮之间的间距
            background: rgba(0, 122, 255, 0.05);
            border-radius: 8px;
            padding: 4px;
            
            .nav-item {
              padding: 8px 16px;
              border: none;
              border-radius: 6px;
              background: transparent;
              color: $ios-text-primary;
              font-size: 14px;
              font-weight: 500;
              cursor: pointer;
              transition: all 0.2s ease;
              white-space: nowrap;
              min-height: 36px;
              display: flex;
              align-items: center;
              justify-content: center;
              
              &:hover {
                background: rgba(0, 122, 255, 0.1);
                color: $ios-primary;
              }
              
              &.active {
                background: $ios-primary;
                color: white;
                font-weight: 600;
              }
              
              .nav-text {
                white-space: nowrap;
              }
            }
          }
        }
      }
      
      .action-btn {
        padding: 10px 16px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 40px;
        white-space: nowrap;
        text-decoration: none;
        
        svg {
          flex-shrink: 0;
        }
        
        &:focus {
          outline: 2px solid $ios-primary;
          outline-offset: 2px;
        }
        
        &:hover {
          transform: translateY(-1px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        &:active {
          transform: translateY(0);
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        }
        
        // 主要按钮样式（返回工作台）
        &.primary {
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          color: white;
          font-weight: 600;
          
          &:hover {
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
          }
        }
        
        // 次要按钮样式
        &.secondary-btn {
          background-color: #f8f9fa;
          color: #495057;
          border: 1px solid #e9ecef;
          
          &:hover {
            background-color: #e9ecef;
            border-color: #dee2e6;
          }
        }
        
        // 停滞按钮样式
        &.stagnation-btn {
          background-color: #fff3cd;
          color: #856404;
          border: 1px solid #ffeaa7;
          
          &:hover {
            background-color: #ffeaa7;
            border-color: #ffdd57;
          }
        }
        
        // 切换项目按钮样式
        &.switch-btn {
          background-color: #e3f2fd;
          color: #1565c0;
          border: 1px solid #bbdefb;
          
          .dropdown-icon {
            transition: transform 0.2s ease-in-out;
          }
          
          &:hover {
            background-color: #bbdefb;
            border-color: #90caf9;
          }
        }
      }
      
      // 项目切换器
      .project-switcher {
        position: relative;
        
        .switch-dropdown {
          position: absolute;
          top: calc(100% + 8px);
          right: 0;
          background: white;
          border: 1px solid #e9ecef;
          border-radius: 8px;
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
          z-index: 1000;
          min-width: 280px;
          max-height: 300px;
          overflow-y: auto;
          animation: dropdown-fade-in 0.2s ease-out;
          
          .project-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #f8f9fa;
            transition: background-color 0.2s ease-in-out;
            
            &:last-child {
              border-bottom: none;
            }
            
            &:hover {
              background-color: #f8f9fa;
            }
            
            &.active {
              background-color: #e3f2fd;
              
              .project-name {
                color: #1565c0;
                font-weight: 600;
              }
            }
            
            .project-name {
              display: block;
              font-weight: 500;
              margin-bottom: 4px;
            }
            
            .project-status-badge {
              font-size: 12px;
              padding: 2px 8px;
              border-radius: 12px;
              
              &.ongoing {
                background-color: #e8f5e8;
                color: #2e7d32;
              }
              
              &.completed {
                background-color: #e3f2fd;
                color: #1565c0;
              }
              
              &.pending {
                background-color: #fff3e0;
                color: #ef6c00;
              }
            }
          }
        }
      }
    }
  }
}

// 下拉菜单动画
@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// 响应式设计
@media (max-width: 768px) {
  .project-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    
    .header-right {
      .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        
        .action-btn {
          font-size: 13px;
          padding: 8px 12px;
          min-height: 36px;
        }
      }
    }
  }
}

/* 项目内容区域 */
.project-content {
  .action-btn {
    padding: $ios-spacing-sm $ios-spacing-md;
    border: 1px solid $ios-border;
    border-radius: $ios-radius-md;
    font-size: $ios-font-size-sm;
    font-weight: $ios-font-weight-medium;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: $ios-spacing-xs;
    
    svg {
      width: 16px;
      height: 16px;
      fill: currentColor;
    }
      
    &:hover {
      background-color: $ios-background-tertiary;
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      border-color: color-mix(in srgb, $ios-border 70%, $ios-primary);
    }
    
    &:active {
      transform: translateY(0);
      background-color: $ios-background-secondary;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
  }
    
    .switch-btn {
      background-color: $ios-primary;
      color: white;
      position: relative;
      
      &:hover {
        background-color: color-mix(in srgb, $ios-primary 85%, black);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(22, 93, 255, 0.25);
      }
      
      &:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(22, 93, 255, 0.2);
      }
    }
    
    .secondary-btn {
      background-color: $ios-background-secondary;
      color: $ios-text-primary;
      border: 1px solid $ios-border;
      
      &:hover {
        background-color: $ios-background-tertiary;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-color: color-mix(in srgb, $ios-border 70%, $ios-primary);
      }
      
      &:active {
        transform: translateY(0);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      }
    }
    
    .stagnation-btn {
      background-color: $ios-warning;
      color: white;
      
      &:hover {
        background-color: color-mix(in srgb, $ios-warning 85%, black);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 125, 0, 0.25);
      }
      
      &:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(255, 125, 0, 0.2);
      }
    }
    
    .project-switcher {
      position: relative;
      
      .switch-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: $ios-spacing-xs;
        background-color: white;
        border: 1px solid $ios-border;
        border-radius: $ios-radius-md;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        min-width: 280px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        
        // 添加动画效果
        animation: dropdown-fade-in 0.2s ease-out;
        
        .project-item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: $ios-spacing-md;
          cursor: pointer;
          transition: all 0.15s ease-in-out;
          border-bottom: 1px solid $ios-border;
          
          &:last-child {
            border-bottom: none;
          }
          
          &:hover {
            background-color: $ios-background-secondary;
            transform: translateX(2px);
          }
          
          &.active {
            background-color: color-mix(in srgb, $ios-primary 10%, white);
            color: $ios-primary;
            border-left: 3px solid $ios-primary;
            padding-left: calc(#{$ios-spacing-md} - 3px);
          }
          
          .project-name {
            font-size: $ios-font-size-sm;
            font-weight: $ios-font-weight-medium;
            color: $ios-text-primary;
          }
          
          .project-status-badge {
            padding: $ios-spacing-xs $ios-spacing-sm;
            border-radius: $ios-radius-full;
            font-size: $ios-font-size-xs;
            font-weight: $ios-font-weight-medium;
            
            &.ongoing {
              background-color: color-mix(in srgb, $ios-success 15%, white);
              color: $ios-success;
              border: 1px solid color-mix(in srgb, $ios-success 30%, white);
            }
            
            &.completed {
              background-color: color-mix(in srgb, $ios-primary 15%, white);
              color: $ios-primary;
              border: 1px solid color-mix(in srgb, $ios-primary 30%, white);
            }
            
            &.pending {
              background-color: color-mix(in srgb, $ios-warning 15%, white);
              color: $ios-warning;
              border: 1px solid color-mix(in srgb, $ios-warning 30%, white);
            }
          }
        }
      }
    }
  }

/* 主内容布局 */
.main-content-layout {
  display: grid;
  grid-template-columns: 1fr 350px; // 调整为两列：主内容区和右侧栏
  gap: $ios-spacing-lg;
  max-width: calc(100vw - 40px);
  margin: 0 auto;
  overflow: visible;
  align-items: start;
  
  // 移除导航栏列相关样式
  .nav-column {
    display: none; // 隐藏导航栏列
  }
  
  .left-column {
    padding: 0;
    min-width: 0;
    flex: 1;
  }
  
  .right-column {
    padding: 0;
    min-width: 300px;
    max-width: 400px;
  }
}

// 响应式设计优化
@media (max-width: 1400px) {
  .project-detail-container {
    padding: $ios-spacing-md;
  }

  .main-content-layout {
    grid-template-columns: 1fr 300px; // 中等屏幕调整
    gap: $ios-spacing-md;
  }
  
  .horizontal-nav-container {
    margin-bottom: $ios-spacing-md;
    padding: $ios-spacing-sm;
  }
}

@media (max-width: 1200px) {
  .project-detail-container {
    padding: $ios-spacing-sm;
  }

  .main-content-layout {
    grid-template-columns: 1fr 280px; // 进一步减小右侧栏宽度
    gap: $ios-spacing-sm;
    
    .right-column {
      min-width: 260px;
      max-width: 320px;
    }
  }
  
  .horizontal-nav {
    .nav-item {
      padding: $ios-spacing-sm $ios-spacing-md;
      font-size: $ios-font-size-sm;
    }
  }
}

@media (max-width: 768px) {
  .project-detail-container {
    padding: $ios-spacing-sm;
  }
  
  .main-content-layout {
    grid-template-columns: 1fr;
    gap: $ios-spacing-md;
    
    .left-column,
    .right-column {
      width: 100%;
      min-width: unset;
      max-width: unset;
      margin-bottom: $ios-spacing-md;
    }
  }
  
  .horizontal-nav-container {
    margin-bottom: $ios-spacing-md;
    padding: $ios-spacing-xs;
  }
  
  .horizontal-nav {
    .nav-item {
      padding: $ios-spacing-sm;
      font-size: $ios-font-size-sm;
      
      .nav-text {
        font-size: $ios-font-size-sm;
      }
    }
  }
  
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: $ios-spacing-md;
    
    .header-actions {
      width: 100%;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: $ios-spacing-sm;
      
      // 移动端顶部导航条样式调整
      .top-nav-container {
        order: -1; // 确保导航条在移动端显示在最前面
        width: 100%;
        margin-right: 0;
        margin-bottom: $ios-spacing-sm;
        
        .top-nav {
          .vertical-nav {
            width: 100%;
            justify-content: center;
            gap: 8px; // 移动端减小间距
            
            .nav-item {
              flex: 1;
              min-height: 32px;
              padding: 6px 12px;
              font-size: 13px;
              
              .nav-text {
                font-size: 13px;
              }
            }
          }
        }
      }
    }
  }
}

@media (max-width: 480px) {
  .project-detail-container {
    padding: $ios-spacing-xs;
  }
  
  .horizontal-nav {
    .nav-item {
      padding: $ios-spacing-xs $ios-spacing-sm;
      font-size: $ios-font-size-xs;
      
      .nav-text {
        font-size: $ios-font-size-xs;
      }
    }
  }
  
  // 超小屏幕下的顶部导航条优化
  .project-header {
    .header-actions {
      .top-nav-container {
        .top-nav {
          .vertical-nav {
            gap: 6px;
            padding: 3px;
            
            .nav-item {
              min-height: 28px;
              padding: 4px 8px;
              font-size: 12px;
              
              .nav-text {
                font-size: 12px;
              }
            }
          }
        }
      }
    }
  }
}

/* 阶段详情网格 */
.stage-details-grid {
  display: flex;
  gap: $ios-spacing-md;
  overflow-x: auto;
  padding-bottom: $ios-spacing-sm;
}

.stage-details-cell {
  flex: 1 1 auto;
  min-width: 200px;
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-md;
  padding: $ios-spacing-md;
}

@media (max-width: 1200px) {
  .project-detail-container {
    padding: $ios-spacing-sm; // 减小容器内边距
  }

  .main-content-layout {
    grid-template-columns: 160px 1fr 260px; // 进一步减小列宽
    gap: $ios-spacing-sm; // 减小间距
  }
}

@media (max-width: 768px) {
  .project-detail-container {
    padding: $ios-spacing-xs; // 移动端进一步减小内边距
  }

  .main-content-layout {
    grid-template-columns: 1fr;
    gap: $ios-spacing-sm;

    .left-column,
    .right-column {
      min-width: unset;
      max-width: unset;
    }
  }
}

/* 水平导航栏容器 */
.horizontal-nav-container {
  margin-bottom: $ios-spacing-lg;
  background-color: white;
  border-radius: $ios-radius-lg;
  padding: $ios-spacing-md;
  box-shadow: $ios-shadow-sm;
}

/* 水平导航栏样式 */
.horizontal-nav {
  .vertical-nav {
    display: flex;
    flex-direction: row; // 改为横向排列
    gap: 0; // 移除间距，让按钮紧密排列
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: unset;
    max-width: unset;
    width: 100%;
  }

  .nav-item {
    flex: 1; // 每个按钮均分宽度
    display: flex;
    align-items: center;
    justify-content: center;
    padding: $ios-spacing-md $ios-spacing-lg;
    border-radius: 0; // 移除圆角
    cursor: pointer;
    transition: all 0.2s ease;
    color: $ios-text-primary;
    text-decoration: none;
    font-size: $ios-font-size-md;
    font-weight: $ios-font-weight-medium;
    line-height: 1.4;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent; // 添加底部边框用于激活状态

    &:first-child {
      border-top-left-radius: $ios-radius-md;
      border-bottom-left-radius: $ios-radius-md;
    }

    &:last-child {
      border-top-right-radius: $ios-radius-md;
      border-bottom-right-radius: $ios-radius-md;
    }

    &:hover {
      background-color: $ios-background-secondary;
    }

    &.active {
      background-color: rgba(0, 122, 255, 0.1); // 使用透明度替代不存在的变量
      color: $ios-primary;
      font-weight: $ios-font-weight-semibold;
      border-bottom-color: $ios-primary; // 激活状态的底部边框
    }

    .nav-text {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
      text-align: center;
    }

    // 移除图标相关样式，因为当前导航项没有图标
    .nav-icon {
      display: none;
    }
  }
}

// 优化交付执行模块中的"选择图片"按钮样式 - 提高选择器特异性
.project-detail-container.designer-page {
  .upload-section {
    margin: 20px 0;
    
    .upload-header {
      margin-bottom: 16px;
      
      h4 {
        margin: 0 0 8px 0;
        font-size: 16px;
        font-weight: 600;
        color: #333;
      }
      
      .hint {
        font-size: 14px;
        color: #666;
      }
    }
    
    // 新的大型上传框样式
    .upload-dropzone {
      width: 100%;
      min-height: 200px;
      border: 2px dashed #d0d7de;
      border-radius: 12px;
      background: #f8f9fa;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
      margin-bottom: 16px;
      
      &:hover {
        border-color: #4A90E2;
        background: #f0f6ff;
        
        .upload-icon {
          color: #4A90E2;
          transform: scale(1.1);
        }
        
        .upload-text {
          color: #4A90E2;
        }
      }
      
      &.drag-over {
        border-color: #4A90E2;
        background: #e6f3ff;
        
        .upload-icon {
          color: #4A90E2;
          animation: bounce 0.6s ease-in-out infinite alternate;
        }
      }
      
      // 有图片时的样式
      &.has-images {
        min-height: 250px;
        padding: 16px;
        cursor: default;
        
        &:hover {
          border-color: #d0d7de;
          background: #f8f9fa;
        }
      }
      
      .upload-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        color: #8b949e;
        transition: all 0.3s ease;
        
        // 加号图标样式
        &::before {
          content: '+';
          font-size: 48px;
          font-weight: 300;
          line-height: 1;
          display: block;
        }
      }
      
      .upload-text {
        font-size: 16px;
        font-weight: 500;
        color: #656d76;
        margin-bottom: 8px;
        text-align: center;
        transition: color 0.3s ease;
      }
      
      .upload-hint {
        font-size: 14px;
        color: #8b949e;
        text-align: center;
        line-height: 1.4;
      }
      
      // 上传后的图片网格
      .uploaded-images-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        width: 100%;
        
        .uploaded-image-item {
          position: relative;
          aspect-ratio: 1;
          border-radius: 8px;
          overflow: hidden;
          cursor: pointer;
          transition: all 0.3s ease;
          
          &:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            
            .image-overlay {
              opacity: 1;
            }
          }
          
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
          }
          
          .image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 8px;
            
            .image-name {
              color: white;
              font-size: 12px;
              font-weight: 500;
              text-shadow: 0 1px 2px rgba(0,0,0,0.5);
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
            
            .image-actions {
              display: flex;
              gap: 8px;
              justify-content: center;
              
              button {
                width: 32px;
                height: 32px;
                border: none;
                border-radius: 6px;
                background: rgba(255, 255, 255, 0.9);
                color: #333;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: all 0.2s ease;
                
                &:hover {
                  background: white;
                  transform: scale(1.1);
                }
                
                &.preview-btn:hover {
                  color: #4A90E2;
                }
                
                &.remove-btn:hover {
                  color: #dc3545;
                }
              }
            }
          }
        }
        
        .add-more-btn {
          aspect-ratio: 1;
          border: 2px dashed #d0d7de;
          border-radius: 8px;
          background: #f8f9fa;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          transition: all 0.3s ease;
          
          &:hover {
            border-color: #4A90E2;
            background: #f0f6ff;
            
            .add-icon {
              color: #4A90E2;
              transform: scale(1.1);
            }
            
            .add-text {
              color: #4A90E2;
            }
          }
          
          .add-icon {
            font-size: 24px;
            color: #8b949e;
            margin-bottom: 4px;
            transition: all 0.3s ease;
          }
          
          .add-text {
            font-size: 12px;
            color: #8b949e;
            transition: color 0.3s ease;
          }
        }
      }
      
      // 隐藏的文件输入框
      input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
      }
    }
    
    // 弹跳动画
    @keyframes bounce {
      0% { transform: translateY(0); }
      100% { transform: translateY(-8px); }
    }
  }
  
  .upload-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    
    .secondary-btn {
      // 保持原有的按钮样式，但调整为辅助按钮
      padding: 8px 16px !important;
      min-height: 36px;
      font-size: 14px !important;
      font-weight: 500 !important;
      
      background: #f6f8fa !important;
      color: #24292f !important;
      border: 1px solid #d0d7de !important;
      border-radius: 8px !important;
      
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
      
      transition: all 0.2s ease !important;
      
      &:hover {
        background: #f3f4f6 !important;
        border-color: #c7c7c7 !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
      }
      
      &:active {
        transform: translateY(1px) !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
      }
    }
    
    .primary-btn {
      padding: 8px 16px;
      min-height: 36px;
      font-size: 14px;
      font-weight: 500;
      
      background: #4A90E2;
      color: white;
      border: 1px solid #4A90E2;
      border-radius: 8px;
      
      box-shadow: 0 1px 3px rgba(74, 144, 226, 0.3);
      
      transition: all 0.2s ease;
      cursor: pointer;
      
      &:hover:not(:disabled) {
        background: #357ABD;
        border-color: #357ABD;
        box-shadow: 0 2px 6px rgba(74, 144, 226, 0.4);
      }
      
      &:disabled {
        background: #e9ecef;
        color: #6c757d;
        border-color: #dee2e6;
        cursor: not-allowed;
        box-shadow: none;
      }
    }
  }
}

// 响应式设计优化
@media (max-width: 768px) {
  .project-detail-container.designer-page {
    .upload-actions {
      flex-direction: column;
      gap: 12px;
      
      .secondary-btn {
        width: 100% !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
        min-height: 48px;
        
        &::after {
          font-size: 18px;
        }
      }
      
      .primary-btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        min-height: 48px;
      }
    }
  }
}

@media (max-width: 480px) {
  .project-detail-container.designer-page {
    .upload-actions {
      .secondary-btn {
        padding: 18px 24px !important;
        font-size: 17px !important;
        min-height: 52px;
        
        &::after {
          font-size: 20px;
        }
      }
    }
  }
}