/* WANFAN_WORKSPACE_TABS_V2
   Global Admin header contract: center context, bounded workspace tabs, tools. */
body.wanfan-admin-light-shell .system-top {
  grid-template-columns: minmax(0, 1fr) max-content !important;
  overflow: visible !important;
}

body.wanfan-admin-light-shell .tab-strip {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(104px, 132px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  overflow: visible !important;
  background: #fff !important;
}

body.wanfan-admin-light-shell .top-context {
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 16px !important;
  border-right: 1px solid #eef1f5 !important;
  background: #fff !important;
}

body.wanfan-admin-light-shell .top-context strong {
  min-width: 0;
  overflow: hidden;
  color: var(--wanfan-admin-text-strong) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tabs-shell {
  position: relative;
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: stretch;
  overflow: visible;
  background: #fff;
}

body.wanfan-admin-light-shell .top-open-tabs {
  min-width: 0 !important;
  height: 36px !important;
  flex: 1 1 auto;
  display: flex !important;
  align-items: stretch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior-x: contain;
}

body.wanfan-admin-light-shell .top-open-tabs::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

body.wanfan-admin-light-shell .top-open-tabs .page-tab,
body.product-editor-route .top-open-tabs .page-tab,
body.dashboard-route .top-open-tabs .page-tab {
  width: auto !important;
  min-width: 112px !important;
  max-width: 156px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 15px !important;
  border: 0 !important;
  border-right: 1px solid #eef1f5 !important;
  background: #fff !important;
  color: #4b5565 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
}

body.wanfan-admin-light-shell .top-open-tabs .page-tab:hover {
  background: #f8fafc !important;
}

body.wanfan-admin-light-shell .top-open-tabs .page-tab.active,
body.product-editor-route .top-open-tabs .page-tab.active,
body.dashboard-route .top-open-tabs .page-tab.active {
  color: var(--wanfan-admin-primary-strong) !important;
  background: #fbfdff !important;
  box-shadow: inset 0 -2px 0 var(--wanfan-admin-primary-strong) !important;
  font-weight: 500 !important;
}

.page-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.wanfan-admin-light-shell .top-open-tabs .close-tab {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  margin-left: 1px !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: 50%;
  color: #a4acb8 !important;
  font-size: 13px !important;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background-color .15s ease;
}

body.wanfan-admin-light-shell .top-open-tabs .page-tab:hover .close-tab,
body.wanfan-admin-light-shell .top-open-tabs .page-tab.active .close-tab,
body.wanfan-admin-light-shell .top-open-tabs .close-tab:focus-visible {
  opacity: 1;
}

body.wanfan-admin-light-shell .top-open-tabs .close-tab:hover {
  color: #344054 !important;
  background: #e9eef5 !important;
}

.workspace-more {
  position: relative;
  z-index: 12;
  height: 36px;
  flex: 0 0 auto;
  background: #fff;
}

.workspace-more-trigger {
  min-width: 76px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid #eef1f5;
  background: #fff;
  color: #596579;
  font-size: 12px;
  white-space: nowrap;
}

.workspace-more-trigger:hover,
.workspace-more.open .workspace-more-trigger {
  color: var(--wanfan-admin-primary-strong);
  background: #f8fafc;
}

.workspace-more-trigger span {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  margin-left: 3px;
  border-radius: 9px;
  background: #eef4ff;
  color: var(--wanfan-admin-primary-strong);
  font-size: 10px;
}

.workspace-more-menu {
  position: absolute;
  top: 40px;
  right: 0;
  width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e5eaf1;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}

.workspace-more-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  border-radius: 4px;
}

.workspace-more-item:hover,
.workspace-more-item.active {
  background: #f3f7ff;
}

.workspace-more-item > button {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #475467;
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-more-item.active > button:first-child {
  color: var(--wanfan-admin-primary-strong);
}

.workspace-more-item > .workspace-more-close {
  width: 28px;
  padding: 0;
  color: #9aa4b2;
  text-align: center;
}

body.wanfan-admin-light-shell .system-tools {
  position: relative;
  z-index: 14;
  flex: 0 0 auto;
  border-left: 1px solid #eef1f5 !important;
  box-shadow: -8px 0 14px rgba(255, 255, 255, .96);
}

@media (max-width: 1180px) {
  body.wanfan-admin-light-shell .tab-strip {
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr) !important;
  }

  body.wanfan-admin-light-shell .top-open-tabs .page-tab,
  body.product-editor-route .top-open-tabs .page-tab,
  body.dashboard-route .top-open-tabs .page-tab {
    min-width: 104px !important;
    padding-inline: 11px !important;
  }

  .workspace-more-trigger {
    min-width: 68px;
    padding-inline: 8px;
  }
}
