// ==============================================
// 简历列表页面样式 - 极简现代设计
// ==============================================

@use '@/assets/style/theme.scss' as *;
@use '@/assets/style/variables.scss' as *;
@use '@/assets/global.scss' as *;

// ==============================================
// 主容器
// ==============================================
.resume-list-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f6f9fc 0%, #eef2f6 100%);
  padding: var(--spacing-xl);
  
  .container-content {
    max-width: 1400px;
    margin: 0 auto;
  }
}

// ==============================================
// 优化页面头部
// ==============================================
.page-header {
  margin-bottom: var(--spacing-xxl);
  
  .header-content {
    @include flex-between;
    align-items: flex-start;
    padding: var(--spacing-xl) 0;
    
    .header-left {
      flex: 1;
      
      .title-section {
        margin-bottom: var(--spacing-lg);
        
        .page-title {
          font-size: 32px;
          font-weight: 700;
          color: var(--text-primary);
          margin: 0 0 var(--spacing-xs) 0;
          letter-spacing: -0.5px;
        }
        
        .page-description {
          font-size: var(--font-size-lg);
          color: var(--text-secondary);
          margin: 0;
          font-weight: 400;
        }
      }
      
      .stats-row {
        @include flex-start;
        gap: var(--spacing-xl);
        
        .stat-item {
          text-align: center;
          padding: var(--spacing-md) var(--spacing-lg);
          background: rgba(255, 255, 255, 0.8);
          border-radius: var(--radius-lg);
          border: 1px solid rgba(255, 255, 255, 0.6);
          backdrop-filter: blur(10px);
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
          transition: all 0.2s ease;
          
          &:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
          }
          
          &.highlight {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
            border-color: rgba(59, 130, 246, 0.2);
            
            .stat-number {
              color: var(--primary-color);
            }
          }
          
          .stat-number {
            display: block;
            font-size: var(--font-size-xxl);
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
          }
          
          .stat-label {
            font-size: var(--font-size-sm);
            color: var(--text-secondary);
            font-weight: 500;
          }
        }
      }
    }
    
    .header-actions {
      .create-button {
        height: 48px;
        padding: 0 var(--spacing-xl);
        font-size: var(--font-size-md);
        font-weight: 600;
        border-radius: var(--radius-lg);
        background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
        border: none;
        color: white;
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
        transition: all 0.3s ease;
        
        &:hover {
          background: linear-gradient(135deg, var(--primary-dark) 0%, #4338ca 100%);
          transform: translateY(-2px);
          box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
        }
        
        &:active {
          transform: translateY(0);
        }
      }
    }
  }
}

// ==============================================
// 优化工具栏
// ==============================================
.toolbar {
  @include flex-between;
  gap: var(--spacing-xl);
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  
  .toolbar-section {
    @include flex-start;
    gap: var(--spacing-lg);
    flex: 1;
    
    .search-section {
      flex: 1;
      max-width: 400px;
      
      .search-input {
        :deep(.el-input__wrapper) {
          border-radius: var(--radius-lg);
          border: 2px solid transparent;
          background: white;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
          transition: all 0.3s ease;
          height: 48px;
          
          &:hover {
            border-color: rgba(59, 130, 246, 0.3);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
          }
          
          &.is-focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
          }
        }
        
        :deep(.el-input__inner) {
          font-size: var(--font-size-md);
          color: var(--text-primary);
          
          &::placeholder {
            color: var(--text-tertiary);
          }
        }
      }
    }
    
    .filter-section {
      .sort-select {
        width: 160px;
        
        :deep(.el-select__wrapper) {
          border-radius: var(--radius-lg);
          border: 2px solid transparent;
          background: white;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
          transition: all 0.3s ease;
          height: 48px;
          
          &:hover {
            border-color: rgba(59, 130, 246, 0.3);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
          }
          
          &.is-focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
          }
        }
      }
    }
  }
  
  .toolbar-actions {
    @include flex-center;
    gap: var(--spacing-lg);
    
    // 批量操作动画
    .slide-fade-enter-active {
      transition: all 0.3s ease;
    }
    
    .slide-fade-leave-active {
      transition: all 0.3s ease;
    }
    
    .slide-fade-enter-from {
      transform: translateX(20px);
      opacity: 0;
    }
    
    .slide-fade-leave-to {
      transform: translateX(20px);
      opacity: 0;
    }
    
    .batch-indicator {
      @include flex-center;
      gap: var(--spacing-md);
      padding: var(--spacing-sm) var(--spacing-lg);
      background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
      border-radius: var(--radius-lg);
      border: 1px solid #fecaca;
      
      .selection-info {
        @include flex-center;
        gap: var(--spacing-xs);
        
        .selection-count {
          background: var(--error-color);
          color: white;
          font-size: var(--font-size-xs);
          font-weight: 600;
          padding: 2px 8px;
          border-radius: var(--radius-full);
          min-width: 20px;
          text-align: center;
        }
        
        .selection-text {
          font-size: var(--font-size-sm);
          color: var(--error-color);
          font-weight: 500;
        }
      }
      
      .batch-delete {
        background: var(--error-color);
        border-color: var(--error-color);
        color: white;
        font-weight: 500;
        
        &:hover {
          background: #dc2626;
          border-color: #dc2626;
        }
      }
    }
    
    .view-switcher {
      .view-toggle-group {
        @include flex-center;
        background: white;
        border-radius: var(--radius-lg);
        padding: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(226, 232, 240, 0.8);
        
        .view-toggle-btn {
          @include flex-center;
          gap: var(--spacing-xs);
          padding: var(--spacing-sm) var(--spacing-md);
          border: none;
          background: transparent;
          color: var(--text-secondary);
          border-radius: var(--radius-md);
          cursor: pointer;
          font-size: var(--font-size-sm);
          font-weight: 500;
          transition: all 0.2s ease;
          
          &:hover {
            background: rgba(59, 130, 246, 0.1);
            color: var(--primary-color);
          }
          
          &.active {
            background: var(--primary-color);
            color: white;
            box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
          }
          
          .el-icon {
            font-size: 16px;
          }
        }
      }
    }
  }
}

// ==============================================
// 优化卡片样式
// ==============================================
.resume-cards-container {
  padding: var(--spacing-xl);
  
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
  }
  
  .resume-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(20px);
    
    &:hover {
      border-color: rgba(59, 130, 246, 0.3);
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
      transform: translateY(-4px);
    }
    
    &.selected {
      border-color: var(--primary-color);
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    // 选择器
    .card-selector {
      position: absolute;
      top: var(--spacing-lg);
      left: var(--spacing-lg);
      z-index: 3;
      background: rgba(255, 255, 255, 0.95);
      border-radius: var(--radius-md);
      padding: 4px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(10px);
    }
    
    // 菜单
    .card-menu {
      position: absolute;
      top: var(--spacing-lg);
      right: var(--spacing-lg);
      z-index: 3;
      opacity: 0;
      transition: all 0.2s ease;
      background: rgba(255, 255, 255, 0.95);
      border-radius: var(--radius-md);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(10px);
    }
    
    &:hover .card-menu {
      opacity: 1;
    }
    
    // 卡片主体
    .card-body {
      padding: var(--spacing-xl);
      
      .card-icon-section {
        @include flex-between;
        align-items: flex-start;
        margin-bottom: var(--spacing-lg);
        
        .card-icon {
          width: 64px;
          height: 64px;
          @include flex-center;
          background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
          color: var(--primary-color);
          border-radius: var(--radius-xl);
          font-size: 28px;
          box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
          border: 1px solid rgba(59, 130, 246, 0.1);
        }
        
        .card-status {
          @include flex-center;
          gap: var(--spacing-xs);
          
          .status-dot {
            width: 8px;
            height: 8px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-radius: var(--radius-full);
            box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
          }
          
          .status-text {
            font-size: var(--font-size-sm);
            color: #059669;
            font-weight: 500;
          }
        }
      }
      
      .card-content {
        margin-bottom: var(--spacing-xl);
        
        .card-title-section {
          margin-bottom: var(--spacing-lg);
          
          .card-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0 0 var(--spacing-xs) 0;
            line-height: 1.3;
            cursor: pointer;
            padding: var(--spacing-xs) 0;
            transition: all 0.2s ease;
            
            &:hover {
              color: var(--primary-color);
            }
          }
          
          .card-subtitle {
            font-size: var(--font-size-xs);
            color: var(--text-tertiary);
            margin: 0;
            opacity: 0;
            transition: opacity 0.2s ease;
          }
          
          .title-editor {
            :deep(.el-input__wrapper) {
              border-radius: var(--radius-md);
              border: 2px solid var(--primary-color);
              box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
            }
          }
        }
        
        &:hover .card-subtitle {
          opacity: 1;
        }
        
        .card-meta {
          @include flex-column;
          gap: var(--spacing-sm);
          
          .meta-item {
            @include flex-start;
            gap: var(--spacing-sm);
            font-size: var(--font-size-sm);
            
            &:first-child {
              color: var(--primary-color);
              font-weight: 500;
              
              .meta-icon {
                color: var(--primary-color);
              }
            }
            
            &:last-child {
              color: var(--text-secondary);
              
              .meta-date {
                color: var(--text-primary);
                font-weight: 500;
              }
            }
          }
        }
      }
      
      .card-actions {
        .primary-action {
          width: 100%;
          height: 44px;
          border-radius: var(--radius-lg);
          font-weight: 600;
          background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
          border: none;
          color: white;
          font-size: var(--font-size-md);
          transition: all 0.3s ease;
          box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
          
          &:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, #4338ca 100%);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
          }
          
          .el-icon {
            margin-right: var(--spacing-sm);
            font-size: 18px;
          }
        }
      }
    }
  }
}

// ==============================================
// 表格样式
// ==============================================
.resume-table-container {
  padding: var(--spacing-lg);
  
  .resume-table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    
    :deep(.el-table__header) {
      th {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-bottom: 2px solid #e5e7eb;
        font-weight: 600;
        color: var(--text-primary);
        font-size: var(--font-size-md);
      }
    }
    
    :deep(.el-table__body) {
      tr {
        transition: background-color 0.2s ease;
        
        &:hover {
          background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, #f8fafc 100%);
        }
        
        td {
          border-bottom: 1px solid #f1f5f9;
          padding: var(--spacing-md);
        }
      }
    }
    
    .title-cell {
      .title-display {
        @include flex-start;
        gap: var(--spacing-md);
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
        transition: all 0.2s ease;
        cursor: pointer;
        
        &:hover {
          background: #f0f9ff;
          transform: translateX(2px);
        }
        
        .resume-icon {
          width: 36px;
          height: 36px;
          @include flex-center;
          background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
          color: var(--primary-color);
          border-radius: var(--radius-md);
          border: 1px solid rgba(59, 130, 246, 0.1);
        }
        
        .title-content {
          flex: 1;
          
          .title-text {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 2px;
            font-size: var(--font-size-md);
          }
          
          .title-meta {
            font-size: var(--font-size-sm);
            color: var(--text-secondary);
          }
        }
      }
    }
    
    .time-cell {
      @include flex-center;
      gap: var(--spacing-xs);
      color: var(--text-secondary);
      font-size: var(--font-size-sm);
      
      .el-icon {
        color: var(--primary-color);
      }
    }
    
    .status-cell {
      .status-tag {
        &.success {
          background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
          color: #059669;
          padding: 4px 12px;
          border-radius: var(--radius-md);
          font-size: var(--font-size-xs);
          font-weight: 500;
          border: 1px solid rgba(5, 150, 105, 0.1);
        }
      }
    }
    
    .action-cell {
      @include flex-center;
      gap: var(--spacing-sm);
      
      .action-btn {
        &.primary {
          background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
          border-color: var(--primary-color);
          font-weight: 500;
          
          &:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
            transform: translateY(-1px);
          }
        }
        
        &.more {
          border: 1px solid #e5e7eb;
          
          &:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
          }
        }
      }
    }
  }
}

// ==============================================
// 主内容区域
// ==============================================
.main-content {
  .content-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
  }
}

// ==============================================
// 分页样式
// ==============================================
.pagination-container {
  .pagination-wrapper {
    @include flex-center;
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.9);
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
  }
}

// ==============================================
// 空状态
// ==============================================
.empty-container {
  @include flex-center;
  flex-direction: column;
  padding: var(--spacing-xxxl);
  text-align: center;
  
  :deep(.el-empty) {
    .el-empty__description {
      h3 {
        font-size: var(--font-size-xl);
        color: var(--text-primary);
        margin-bottom: var(--spacing-md);
        font-weight: 600;
      }
      
      p {
        color: var(--text-secondary);
        margin-bottom: var(--spacing-xl);
        font-size: var(--font-size-md);
      }
    }
  }
  
  .empty-action-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 500;
    
    &:hover {
      background: var(--primary-dark);
      border-color: var(--primary-dark);
    }
  }
}

// ==============================================
// 响应式
// ==============================================
@media (max-width: 768px) {
  .resume-list-container {
    padding: var(--spacing-lg);
  }
  
  .page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .toolbar {
    flex-direction: column;
    gap: var(--spacing-md);
    
    .toolbar-left {
      width: 100%;
      
      .search-input {
        max-width: none;
        flex: 1;
      }
    }
    
    .toolbar-right {
      width: 100%;
      justify-content: space-between;
    }
  }
  
  .resume-cards-container {
    .cards-grid {
      grid-template-columns: 1fr;
      gap: var(--spacing-md);
    }
  }
}
