.container {
  display: flex;
  height: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

// 左侧面板
.leftPanel {
  width: 280px;
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  padding: 0 20px;
}

.tabItem {
  padding: 16px 20px;
  font-size: 14px;
  color: #8c8c8c;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;

  &:hover {
    color: #262626;
  }

  &.activeTab {
    color: #262626;
    font-weight: 500;

    &::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: #165dff;
    }
  }
}

.searchWrapper {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.employeeList {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;

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

  &::-webkit-scrollbar-track {
    background: transparent;
  }
}

.employeeCard {
  display: flex;
  cursor: pointer;
  padding: 8px 12px;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  border-radius: 8px;

  &:hover {
    background: #fafafa;
  }

  &.selected {
    border: 1px solid var(--user-primary-primary-6, #165dff);
  }

  .employeeAvatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
  }

  .employeeInfo {
    flex: 1;
    min-width: 0;
  }

  .employeeName {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;

    .nameText {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 258px;
      min-width: 0;
    }

    .memoryTag {
      display: flex;
      height: 20px;
      padding: 0 4px;
      justify-content: center;
      align-items: center;
      gap: 2px;
      border-radius: 22px;
      font-size: 10px;
      color: #00b42a;
      background: var(--user-success-success-01, #e8ffea);

      .memoryIcon {
        font-size: 10px;
        color: #52c41a;
      }
    }
  }

  .employeeDescription {
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-all;
  }
}

// 右侧面板
.rightPanel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
  padding: 24px;
  height: 100%;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;

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

  &::-webkit-scrollbar-track {
    background: transparent;
  }
}

.closeButton {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8c8c8c;
  transition: color 0.3s;

  &:hover {
    color: #262626;
  }
}

.memorySection {
  margin-bottom: 24px;

  .sectionTitle {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 12px;
  }
}

.memoryTable {
  :global {
    .@{antPrefix}-table-thead > tr > th {
      background: #fafafa;
      font-weight: 500;
      color: #262626;
      border-bottom: 1px solid #f0f0f0;
    }

    .@{antPrefix}-table-tbody > tr > td {
      border-bottom: 1px solid #f0f0f0;
    }

    .@{antPrefix}-table-tbody > tr:hover > td {
      background: #fafafa;
    }
  }
}

.tableCell {
  font-size: 14px;
  color: #262626;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 138px;
}

.toolTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  //max-width: 185px;
}

.toolTag {
  margin: 0;
  padding: 2px 8px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  color: #4080ff !important;
}

.questionTag {
  margin: 0;
  padding: 2px 8px;
  background: #f5f5f5;
  border: none;
  display: flex;
  border-radius: 4px;
  font-size: 12px;
  color: #14161a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 138px;
}

.paramTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paramTag {
  margin: 0;
  padding: 2px 8px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  color: #14161a;
}

.memoryRules {
  margin-bottom: 24px;
  .noData {
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  :global {
    .beyond-collapse-item {
      margin-bottom: 8px;
    }

    .@{antPrefix}-collapse-header {
      padding: 16px 0;
    }

    .@{antPrefix}-collapse-content-box {
      padding: 0 0 16px 0;
    }
  }
}

.ruleHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 16px;
}

.ruleDescription {
  font-size: 14px;
  color: #8c8c8c;
  line-height: 1.6;
}

.preferenceSection {
  margin-top: 16px;

  .preferenceTitle {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 12px;
  }

  .preferenceTags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .preferenceTag {
    margin: 0;
    padding: 4px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    color: #262626;
  }
}
