/* 顶部导航 — 轨道 1144×42@y8；选中底 156×46（3:01117） */

.nav {
  --nav-green: var(--app-green, #139686);
  --nav-text: var(--text-secondary, #606266);
  --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* 默认/选中共用：padding 0 32px；宽度由 nav-config 各页签 width 固定 */
  --nav-pad-x: 32px;

  position: absolute;
  left: 322.77px;
  top: 12px;
  width: 1144px;
  height: 50px;
  z-index: 2;
}

/*
 * 磨砂轨道：relativeY:8 height:42
 * viewBox 已含 relativeX:2，容器 left:0 避免双重偏移
 */
.nav__rail-bg {
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 42px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nav__rail-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nav__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-end; /* 底边与轨道底齐平 */
  height: 50px;
  width: 100%;
}

.nav__divider {
  flex: 0 0 1px;
  align-self: center;
  width: 1px;
  height: 14px;
  margin-top: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav__tab.is-active + .nav__divider,
.nav__divider:has(+ .nav__tab.is-active) {
  opacity: 0;
}

/* ========== Tab ========== */
.nav__tab {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  /* 默认：坐在 42px 轨道上；宽见 inline style（设计稿默认宽度） */
  height: 42px;
  padding: 0 var(--nav-pad-x);
  cursor: pointer;
  outline: none;
  z-index: 1;
  transition: height 0.25s var(--nav-ease);
}

.nav__tab:hover {
  z-index: 2;
}

.nav__tab:focus-visible {
  outline: 2px solid rgba(19, 150, 134, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}

/*
 * 选中：高 46（3:01117），底边贴轨道底
 * 宽度与默认态相同（nav-config.width），背景 inset:0 铺满
 */
.nav__tab.is-active {
  height: 46px;
  z-index: 3;
}

.nav__tab-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  transition: opacity 0.22s ease;
}

/* 左右圆角帽：固定稿面肩宽，不随页签变宽被拉扁 */
.nav__tab-bg-cap {
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
}

.nav__tab-bg-cap--l {
  width: 42.520866px;
}

.nav__tab-bg-cap--r {
  width: 41.44064px;
}

.nav__tab-bg-cap svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 中间平直段：与左右帽视觉一致（path flip 后绿在上、白边在上） */
.nav__tab-bg-mid {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(19, 150, 134, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
    #ffffff;
  box-shadow: inset 0 1px 0 #ffffff;
}

.nav__tab.is-active .nav__tab-bg {
  opacity: 1;
}

.nav__tab:hover:not(.is-active) .nav__tab-bg {
  opacity: 0.18;
}

.nav__tab-label {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--nav-text);
  transition: color 0.2s ease, font-size 0.2s ease, font-weight 0.2s ease;
}

.nav__tab:hover:not(.is-active) .nav__tab-label {
  color: var(--nav-green);
}

/* 选中：18 Medium / 主色；稿面 relativeY:12 → 容器内垂直居中即可 */
.nav__tab.is-active .nav__tab-label {
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  color: var(--nav-green);
}

/* CTA */
.user__cta {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.user__cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 4px 12px rgba(19, 150, 134, 0.16);
}

.user__cta:active,
.user__cta.is-pressed {
  transform: scale(0.98);
}

.user__cta:hover .user__cta-icon {
  transform: translateX(2px);
}

.user__cta-icon {
  transition: transform 0.2s ease;
}

.workspace__panel {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.workspace__panel.is-switching {
  animation: workspaceSwap 0.28s var(--nav-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

@keyframes workspaceSwap {
  from {
    opacity: 0.45;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace__title {
  font-size: 28px;
  font-weight: 500;
  line-height: 40px;
  color: var(--text-primary, #303133);
}

@media (prefers-reduced-motion: reduce) {
  .nav__tab,
  .nav__tab-bg,
  .nav__tab-label,
  .workspace__panel {
    transition: none !important;
    animation: none !important;
  }
}
