/* 标签导航容器 */
.tabs-nav-container {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  padding-right: 8px;
  overflow: hidden;
  position: relative;
}

/* 标签样式 - 扁平化设计 */
.tabs-nav {
  height: 100%;
  width: 100%;
}

.tabs-nav .ant-tabs-nav {
  height: 100%;
  margin: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
}

.tabs-nav .ant-tabs-nav::before {
  border: none;
}

.tabs-nav .ant-tabs-nav-wrap {
  display: flex;
  align-items: center;
  height: auto;
}

.tabs-nav .ant-tabs-nav-list {
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding-top: 8px;
}

.tabs-nav .ant-tabs-tab {
  background: transparent;
  border: none;
  border-radius: 4px 4px 0 0;
  margin: 0;
  padding: 0 12px;
  height: 40px;
  line-height: 40px;
  min-width: 90px;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.2s;
}

/* 第一个标签特殊处理 - 左侧无圆角 */
.tabs-nav .ant-tabs-tab:first-child {
  border-top-left-radius: 0;
  padding-left: 16px;
}

.tabs-nav .ant-tabs-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.tabs-nav .ant-tabs-tab-active {
  background: #f0f2f5;
  color: #262626;
  position: relative;
  border-left: 1px solid #d9d9d9;
  border-top: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #f0f2f5;
  font-weight: 500;
  z-index: 20;
  height: 41px;
  padding: 0 12px;
  margin-bottom: -1px;
}

/* 第一个激活标签左侧无边框 */
.tabs-nav .ant-tabs-tab-active:first-child {
  padding-left: 16px;
  border-left: none;
}

.tabs-nav .ant-tabs-tab-active:hover {
  background: #f0f2f5;
  color: #262626;
}

.tabs-nav .ant-tabs-tab-btn {
  color: inherit;
}

/* 标签内容样式 */
.tab-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  font-size: 13px;
  white-space: nowrap;
  line-height: 1;
}

/* 概览标签特殊样式 - 居中显示 */
.tab-label-center {
  justify-content: center;
  width: 100%;
  text-align: center;
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.8;
}

/* 关闭按钮样式 */
.tabs-nav .ant-tabs-tab-remove {
  margin-left: 8px;
  margin-right: -6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  transition: all 0.2s;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  opacity: 0;
  visibility: hidden;
}

/* 鼠标悬停在标签上时显示关闭按钮 */
.tabs-nav .ant-tabs-tab:hover .ant-tabs-tab-remove {
  opacity: 1;
  visibility: visible;
}

.tabs-nav .ant-tabs-tab-remove:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* 激活标签的关闭按钮 - 始终显示 */
.tabs-nav .ant-tabs-tab-active .ant-tabs-tab-remove {
  color: rgba(0, 0, 0, 0.45);
  opacity: 1;
  visibility: visible;
}

.tabs-nav .ant-tabs-tab-active .ant-tabs-tab-remove:hover {
  color: rgba(0, 0, 0, 0.65);
  background: rgba(0, 0, 0, 0.06);
}

/* 禁用Ant Design的卡片样式 */
.tabs-nav.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab,
.tabs-nav.ant-tabs-editable-card > .ant-tabs-nav .ant-tabs-tab {
  background: transparent;
  border: none;
}

.tabs-nav.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active,
.tabs-nav.ant-tabs-editable-card > .ant-tabs-nav .ant-tabs-tab-active {
  background: #f0f2f5;
  border-left: 1px solid #d9d9d9;
  border-top: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: -1px;
}

/* 导航操作按钮 */
.tabs-nav .ant-tabs-nav-operations {
  display: none;
}

/* 标签ink bar隐藏 */
.tabs-nav .ant-tabs-ink-bar {
  display: none;
}

/* 滚动条样式 */
.tabs-nav .ant-tabs-nav-wrap {
  overflow: hidden;
}

.tabs-nav .ant-tabs-nav-list {
  transition: transform 0.3s;
}

/* 上下文菜单样式 */
.ant-dropdown-menu {
  min-width: 120px;
}

.ant-dropdown-menu-item {
  padding: 8px 12px;
}

.ant-dropdown-menu-item .anticon {
  margin-right: 8px;
}

/* 移除多余的边距和填充 */
.tabs-nav.ant-tabs {
  line-height: 1;
}

.tabs-nav .ant-tabs-content-holder {
  display: none;
}

/* 标签分隔线 - 仅非激活标签显示 */
.tabs-nav .ant-tabs-tab {
  position: relative;
}

.tabs-nav .ant-tabs-tab:not(.ant-tabs-tab-active)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.tabs-nav .ant-tabs-tab:last-child::after,
.tabs-nav .ant-tabs-tab-active::after,
.tabs-nav .ant-tabs-tab-active + .ant-tabs-tab::after {
  display: none;
}