// 知识管理组件样式
.section-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }

  .section-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;

    .section-icon {
      margin-right: 12px;
      font-size: 1.5rem;
    }

    h2 {
      flex: 1;
      margin: 0;
      font-size: 1.25rem;
      font-weight: 600;
    }

    .section-actions {
      display: flex;
      gap: 8px;
    }
  }

  .section-content {
    padding: 24px;
  }
}

// 按钮样式
.btn-primary {
  background: #4299e1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;

  &:hover {
    background: #3182ce;
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.3);
  }
}

.btn-icon {
  background: none;
  border: none;
  color: #718096;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: #f7fafc;
    color: #4a5568;
  }
}

.btn-filter {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
}

// 搜索栏样式
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;

  input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
  }
}

// 知识分类样式
.knowledge-categories {
  margin-bottom: 24px;

  .category-tree {
    .category-node {
      margin-bottom: 8px;

      .category-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: #f7fafc;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.2s ease;

        &:hover {
          background: #edf2f7;
        }

        .icon-folder {
          transition: transform 0.2s ease;

          &.expanded {
            transform: rotate(90deg);
          }
        }

        .item-count {
          color: #718096;
          font-size: 0.875rem;
        }
      }

      .category-children {
        margin-top: 8px;
        margin-left: 20px;

        .knowledge-item {
          display: flex;
          align-items: flex-start;
          gap: 12px;
          padding: 12px;
          border: 1px solid #e2e8f0;
          border-radius: 8px;
          margin-bottom: 8px;
          transition: all 0.2s ease;

          &:hover {
            border-color: #cbd5e0;
            background: #f7fafc;
          }

          .item-type-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #e2e8f0;
            border-radius: 6px;
          }

          .item-info {
            flex: 1;

            h4 {
              margin: 0 0 4px 0;
              font-size: 0.875rem;
              color: #2d3748;
            }

            p {
              margin: 0 0 8px 0;
              font-size: 0.75rem;
              color: #718096;
            }

            .item-tags {
              display: flex;
              flex-wrap: wrap;
              gap: 4px;
              margin-bottom: 8px;

              .tag {
                background: #e2e8f0;
                padding: 2px 6px;
                border-radius: 12px;
                font-size: 0.625rem;
                color: #4a5568;
              }
            }

            .item-meta {
              display: flex;
              gap: 12px;
              font-size: 0.625rem;
              color: #a0aec0;
            }
          }

          .item-actions {
            display: flex;
            gap: 4px;
          }
        }
      }
    }
  }
}

// 知识洞察样式
.knowledge-insights {
  h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
  }

  .insight-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    .insight-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      background: #f7fafc;
      border-radius: 8px;

      i {
        font-size: 1.25rem;
        color: #4299e1;
      }

      h4 {
        margin: 0 0 2px 0;
        font-size: 0.875rem;
        color: #2d3748;
      }

      p {
        margin: 0;
        font-size: 0.75rem;
        color: #718096;
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .knowledge-insights .insight-cards {
    grid-template-columns: 1fr;
  }
}
