/* 统一驾驶舱外壳：只收拢跨页面的导航与动效，不触碰各看板的数据模块。 */
:root {
  --route-duration: 220ms;
  --route-ease: cubic-bezier(.22, .8, .24, 1);
  --route-focus: rgba(96, 165, 250, .62);
}

::selection { color: #eef3f8; background: rgba(255, 112, 67, .32); }

.cockpit-nav,
.page-tabs,
.nav-pill {
  isolation: isolate;
}

.cockpit-nav a,
.page-tabs .tab-button,
.nav-links a {
  position: relative;
  transition: color var(--route-duration) var(--route-ease), background var(--route-duration) var(--route-ease), transform var(--route-duration) var(--route-ease);
}

.cockpit-nav a::after,
.page-tabs .tab-button::after,
.nav-links a::after {
  position: absolute;
  right: 16px;
  bottom: 5px;
  left: 16px;
  height: 2px;
  border-radius: 999px;
  background: #ff7043;
  content: "";
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity var(--route-duration) var(--route-ease), transform var(--route-duration) var(--route-ease);
}

.cockpit-nav a.active::after,
.page-tabs .tab-button.active::after,
.nav-links a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.cockpit-nav a:hover,
.page-tabs .tab-button:hover,
.nav-links a:hover {
  transform: translateY(-1px);
}

.cockpit-nav a:focus-visible,
.page-tabs .tab-button:focus-visible,
.nav-links a:focus-visible,
.module-card:focus-visible,
.hero-cta:focus-visible {
  outline: 3px solid var(--route-focus);
  outline-offset: 3px;
}

html.is-entering body {
  opacity: 0;
  transform: translateY(8px);
}

html.is-leaving body {
  opacity: 0;
  transform: translateY(-5px);
}

html body {
  transition: opacity var(--route-duration) var(--route-ease), transform var(--route-duration) var(--route-ease);
}

/* 样板页用更低矮的命令栏，让数据而不是导航成为首屏重点。 */
.overview-page .app-shell { padding-top: 0; }

.overview-page .page-tabs {
  top: 0;
  width: 100%;
  max-width: none;
  min-height: 44px;
  justify-content: flex-start;
  margin: 0 0 24px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  border-radius: 0;
  background: rgba(5, 8, 12, .94);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.overview-page .nav-brand { padding-left: 0; font-size: 12px; }
.overview-page .tab-button { min-width: 52px; min-height: 34px; padding-inline: 10px; font-size: 12px; }

.overview-page .topbar {
  min-height: 190px;
  gap: 24px;
  align-items: center;
  padding: 8px 0 24px;
}

.overview-page .topbar h1 {
  font-size: clamp(38px, 3.2vw, 52px);
  letter-spacing: -.02em;
  white-space: normal;
}

.overview-page .source-note { max-width: 58ch; line-height: 1.6; }
.overview-page .status-strip { border-radius: 8px; box-shadow: none; }
.overview-page .status-strip div { min-height: 62px; padding: 11px 14px; }

.overview-page .control-bar {
  min-height: 58px;
  margin: 0 0 24px;
  padding: 8px 0;
  border-top: 1px solid rgba(148, 163, 184, .18);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.overview-page .control-group > span { font-size: 10px; }
.overview-page .control-bar button { min-height: 34px; padding-inline: 10px; font-size: 12px; }
.overview-page .metric-grid { gap: 8px; }
.overview-page .metric-card,
.overview-page .panel,
.overview-page .ownership-card,
.overview-page .drill-card { border-radius: 8px; box-shadow: none; }
.overview-page .metric-card { min-height: 124px; padding: 14px; }
.overview-page .panel { padding: 16px; }

.innovation-page .cockpit-nav {
  top: 0;
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  width: auto;
  max-width: none;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  border-radius: 0;
  background: rgba(5, 8, 12, .94);
  box-shadow: none;
  transform: none;
}

.innovation-page .cockpit-nav strong { padding-left: 0; font-size: 12px; }
.innovation-page .cockpit-nav a { min-width: 52px; min-height: 34px; padding-inline: 10px; font-size: 12px; }
.innovation-page .main-content { padding-top: 70px; }

.innovation-page .topbar {
  min-height: 168px;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
}

.innovation-page .topbar h1 { font-size: clamp(38px, 3.6vw, 56px); letter-spacing: -.02em; }
.innovation-page .page-description { max-width: 62ch; }
.innovation-page .topbar-meta div { min-width: 132px; padding: 10px 12px; border-radius: 8px; box-shadow: none; }

.innovation-page .filter-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: none;
}

.innovation-page .filter-grid { gap: 8px; margin-top: 10px; }
.innovation-page .field-control input,
.innovation-page .field-control select,
.innovation-page .reset-button { min-height: 38px; border-radius: 6px; }
.innovation-page .date-presets button { min-height: 32px; padding-inline: 10px; }
.innovation-page .kpi-grid { gap: 8px; }
.innovation-page .kpi-card { min-height: 122px; padding: 14px; border-radius: 8px; box-shadow: none; }
.innovation-page .panel { padding: 16px; border-radius: 8px; box-shadow: none; }

/* 直营与代销沿用同一业务外壳，避免只因业务归属不同就像两套产品。 */
:is(.direct-page, .reseller-page) .cockpit-nav {
  top: 0;
  left: calc(var(--sidebar-width) + 24px);
  right: 24px;
  width: auto;
  max-width: none;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  border-radius: 0;
  background: rgba(5, 8, 12, .94);
  box-shadow: none;
  transform: none;
}

:is(.direct-page, .reseller-page) .cockpit-nav strong { padding-left: 0; font-size: 12px; }
:is(.direct-page, .reseller-page) .cockpit-nav a { min-width: 52px; min-height: 34px; padding-inline: 10px; font-size: 12px; }
:is(.direct-page, .reseller-page) .main-content { padding-top: 70px; }

:is(.direct-page, .reseller-page) .topbar {
  min-height: 168px;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
}

:is(.direct-page, .reseller-page) .topbar h1 { font-size: clamp(38px, 3.6vw, 56px); letter-spacing: -.02em; }
:is(.direct-page, .reseller-page) .page-description { max-width: 62ch; }
:is(.direct-page, .reseller-page) .topbar-meta div { min-width: 132px; padding: 10px 12px; border-radius: 8px; box-shadow: none; }

:is(.direct-page, .reseller-page) .filter-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: none;
}

:is(.direct-page, .reseller-page) .filter-grid { gap: 8px; margin-top: 10px; }
:is(.direct-page, .reseller-page) .field-control input,
:is(.direct-page, .reseller-page) .field-control select,
:is(.direct-page, .reseller-page) .reset-button { min-height: 38px; border-radius: 6px; }
:is(.direct-page, .reseller-page) .date-presets button { min-height: 32px; padding-inline: 10px; }
:is(.direct-page, .reseller-page) .kpi-grid { gap: 8px; }
:is(.direct-page, .reseller-page) .kpi-card { min-height: 122px; padding: 14px; border-radius: 8px; box-shadow: none; }
:is(.direct-page, .reseller-page) .panel { padding: 16px; border-radius: 8px; box-shadow: none; }

.home-page .nav-pill {
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: none;
}

.home-page .nav-brand { font-size: 12px; }
.home-page .nav-links { gap: 16px; }
.home-page .nav-links a { font-size: 12px; }
.home-page .module-card { border-radius: 8px; box-shadow: none; }

.home-page .section-inner { padding-top: 64px; padding-bottom: 64px; }

@media (max-width: 1024px) {
  .innovation-page .cockpit-nav { left: calc(var(--sidebar-width) + 16px); right: 16px; }
  :is(.direct-page, .reseller-page) .cockpit-nav { left: calc(var(--sidebar-width) + 16px); right: 16px; }
}

@media (max-width: 768px) {
  /* 首页不能只留下品牌名；横向滑动保留五个核心模块的直达入口。 */
  .nav-wrap { padding-inline: 12px; }

  .nav-pill {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-pill::-webkit-scrollbar { display: none; }

  .nav-left { min-width: max-content; }

  .nav-links {
    display: flex !important;
    gap: 14px;
    padding-right: 12px;
  }

  .nav-live { display: none; }

  .overview-page .page-tabs { margin-bottom: 16px; }
  .overview-page .topbar { min-height: 0; align-items: start; padding-bottom: 18px; }
  .overview-page .control-bar { align-items: flex-start; }

  .innovation-page .cockpit-nav {
    left: 0;
    right: 0;
    padding-inline: 10px;
    border-radius: 0;
  }

  .innovation-page .main-content { padding-top: 64px; }
  .innovation-page .topbar { min-height: 0; align-items: start; }
  .innovation-page .topbar-meta { width: 100%; }
  .innovation-page .topbar-meta div { flex: 1 1 0; min-width: 0; }

  :is(.direct-page, .reseller-page) .cockpit-nav {
    left: 0;
    right: 0;
    padding-inline: 10px;
    border-radius: 0;
  }

  :is(.direct-page, .reseller-page) .main-content { padding-top: 64px; }
  :is(.direct-page, .reseller-page) .topbar { min-height: 0; align-items: start; }
  :is(.direct-page, .reseller-page) .topbar-meta { width: 100%; }
  :is(.direct-page, .reseller-page) .topbar-meta div { flex: 1 1 0; min-width: 0; }

  .home-page .section-inner { padding-top: 44px; padding-bottom: 44px; }

  .cockpit-nav,
  .page-tabs { scroll-snap-type: x proximity; }

  .cockpit-nav a,
  .page-tabs .tab-button,
  .nav-links a { scroll-snap-align: start; }

  .cockpit-nav a::after,
  .page-tabs .tab-button::after,
  .nav-links a::after { bottom: 3px; }
}

/* 低饱和深色：用石墨灰建立层级，铜棕只服务于当前态与关键动作。 */
:root {
  --route-focus: rgba(167, 122, 99, .52);
  --text-primary: #e9eaec;
  --text-secondary: #a4a8ae;
}

::selection { color: var(--text-primary); background: rgba(167, 122, 99, .28); }

.cockpit-nav a::after,
.page-tabs .tab-button::after,
.nav-links a::after { background: var(--primary); }

.cockpit-nav,
.page-tabs,
.nav-pill {
  border-color: rgba(164, 168, 174, .16) !important;
  background: rgba(16, 18, 22, .92) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}

:is(.innovation-page, .direct-page, .reseller-page) .filter-panel,
.overview-page .control-bar {
  border-color: rgba(164, 168, 174, .16);
  background: var(--surface);
}

:is(.innovation-page, .direct-page, .reseller-page) .filter-heading,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-toolbar,
.overview-page .export-actions {
  border-color: rgba(164, 168, 174, .14);
}

:is(.innovation-page, .direct-page, .reseller-page) .date-presets,
:is(.innovation-page, .direct-page, .reseller-page) .field-control,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-actions button,
.overview-page .control-bar button {
  border-color: rgba(164, 168, 174, .18);
  background: rgba(255, 255, 255, .018);
  color: var(--text-secondary);
}

:is(.innovation-page, .direct-page, .reseller-page) .date-presets button.active,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button.active,
.overview-page .control-bar button.active {
  border-color: rgba(167, 122, 99, .38);
  background: var(--primary-soft);
  color: var(--text-primary);
}

:is(.innovation-page, .direct-page, .reseller-page) .field-control:focus-within,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select[open] {
  border-color: rgba(167, 122, 99, .48);
  background: rgba(167, 122, 99, .055);
  box-shadow: 0 0 0 3px rgba(167, 122, 99, .07);
}

:is(.innovation-page, .direct-page, .reseller-page) .reset-button,
.overview-page .export-actions button:first-child {
  border-color: rgba(167, 122, 99, .42);
  background: rgba(167, 122, 99, .11);
  color: var(--text-primary);
}

:is(.innovation-page, .direct-page, .reseller-page) .reset-button:hover,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-actions button:hover,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button:hover,
.overview-page .control-bar button:hover {
  border-color: rgba(167, 122, 99, .48);
  background: rgba(167, 122, 99, .14);
  color: var(--text-primary);
}

.eyebrow,
.section-kicker,
.operation-metric-group .section-kicker { color: var(--primary) !important; }

.kpi-card.primary {
  border-color: rgba(167, 122, 99, .30) !important;
  background: rgba(167, 122, 99, .13) !important;
}

.kpi-card.primary > span,
.kpi-card.primary .kpi-meta,
.kpi-card.primary .mode-caption { color: var(--text-secondary) !important; }

.dimension-actions button,
.room-detail-button,
.creator-unlock-button,
.creator-actions button {
  border-color: rgba(164, 168, 174, .28) !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
}

.dimension-actions .next-button,
.next-button {
  border-color: rgba(167, 122, 99, .44) !important;
  background: var(--color-primary-strong) !important;
  color: var(--bg) !important;
}

.channel-insight-card.highlight,
.channel-insight-card,
.anchor-rank-card,
.anchor-rank-main { background: var(--surface-soft) !important; }

.home-page .module-card:focus-visible,
.home-page .module-card:hover {
  border-color: rgba(167, 122, 99, .34);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

/* 操作层统一：让“时间→条件→执行”一眼可辨，保持原字段和数据逻辑不变。 */
:is(.innovation-page, .direct-page, .reseller-page) .filter-panel {
  margin-top: 0;
  padding: 16px;
  border-color: rgba(148, 163, 184, .24);
  background: rgba(14, 20, 28, .96);
}

:is(.innovation-page, .direct-page, .reseller-page) .filter-heading {
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

:is(.innovation-page, .direct-page, .reseller-page) .filter-heading h2 {
  font-size: 18px;
  letter-spacing: -.01em;
}

:is(.innovation-page, .direct-page, .reseller-page) .date-presets {
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(5, 8, 12, .45);
}

:is(.innovation-page, .direct-page, .reseller-page) .date-presets button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--text-secondary);
}

:is(.innovation-page, .direct-page, .reseller-page) .date-presets button.active {
  background: rgba(239, 117, 37, .18);
  color: var(--text-primary);
  box-shadow: none;
}

:is(.innovation-page, .direct-page, .reseller-page) .filter-grid {
  gap: 10px;
  margin-top: 14px;
}

:is(.innovation-page, .direct-page, .reseller-page) .field-control,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select {
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 8px;
  background: rgba(5, 8, 12, .34);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

:is(.innovation-page, .direct-page, .reseller-page) .field-control:focus-within,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select[open] {
  border-color: rgba(239, 117, 37, .64);
  background: rgba(239, 117, 37, .055);
  box-shadow: 0 0 0 3px rgba(239, 117, 37, .09);
}

:is(.innovation-page, .direct-page, .reseller-page) .field-control > span,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select summary > span {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: .02em;
}

:is(.innovation-page, .direct-page, .reseller-page) .field-control input,
:is(.innovation-page, .direct-page, .reseller-page) .field-control select,
:is(.innovation-page, .direct-page, .reseller-page) .multi-select summary {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
}

:is(.innovation-page, .direct-page, .reseller-page) .reset-button {
  align-self: stretch;
  min-height: 58px;
  border-color: rgba(239, 117, 37, .5);
  border-radius: 8px;
  background: rgba(239, 117, 37, .10);
  color: var(--text-primary);
  font-size: 13px;
}

:is(.innovation-page, .direct-page, .reseller-page) .reset-button:hover {
  background: rgba(239, 117, 37, .18);
  transform: translateY(-1px);
}

:is(.innovation-page, .direct-page, .reseller-page) .active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-top: 10px;
}

/* 总览的时间、跳转和输出统一为同一类操作组，避免导出按钮淹没在筛选信息里。 */
.overview-page .control-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 0;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 8px;
  background: rgba(14, 20, 28, .78);
}

.overview-page .control-group {
  min-width: 0;
}

.overview-page .control-group > span {
  display: block;
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: .08em;
}

.overview-page .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.overview-page .control-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 999px;
  background: rgba(5, 8, 12, .32);
  color: var(--text-secondary);
  font-size: 12px;
}

.overview-page .control-bar button.active,
.overview-page .control-bar button:hover {
  border-color: rgba(239, 117, 37, .56);
  background: rgba(239, 117, 37, .12);
  color: var(--text-primary);
}

.overview-page .export-actions {
  padding-left: 14px;
  border-left: 1px solid rgba(148, 163, 184, .16);
}

.overview-page .export-actions button:first-child {
  border-color: rgba(239, 117, 37, .60);
  color: var(--text-primary);
}

/* 首页是入口页：保留内容结构，强化模块的可点击反馈。 */
.home-page .module-card:focus-visible,
.home-page .module-card:hover {
  border-color: rgba(239, 117, 37, .48);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
}

@media (max-width: 900px) {
  .overview-page .control-bar { grid-template-columns: 1fr; gap: 10px; }
  .overview-page .export-actions { padding-left: 0; border-left: 0; }
}

@media (max-width: 768px) {
  :is(.innovation-page, .direct-page, .reseller-page) .filter-panel { padding: 12px; }
  :is(.innovation-page, .direct-page, .reseller-page) .filter-heading { align-items: flex-start; }
  :is(.innovation-page, .direct-page, .reseller-page) .date-presets { width: 100%; justify-content: space-between; }
  :is(.innovation-page, .direct-page, .reseller-page) .date-presets button { flex: 1 1 0; }
  :is(.innovation-page, .direct-page, .reseller-page) .reset-button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html body,
  .cockpit-nav a,
  .page-tabs .tab-button,
  .nav-links a,
  .cockpit-nav a::after,
  .page-tabs .tab-button::after,
  .nav-links a::after { transition: none !important; }
}

/* 主页导航作为全站母版：居中、胶囊、自然占位，不再遮住看板内容。 */
:is(.overview-page, .innovation-page, .direct-page, .reseller-page) .page-tabs,
:is(.innovation-page, .direct-page, .reseller-page) .cockpit-nav {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: 20;
  width: min(960px, calc(100% - 48px));
  max-width: 960px;
  min-height: 48px;
  margin: 24px auto 18px;
  padding: 6px 12px;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  background: rgba(5, 8, 12, .86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: none;
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

:is(.overview-page, .innovation-page, .direct-page, .reseller-page) .page-tabs::-webkit-scrollbar,
:is(.innovation-page, .direct-page, .reseller-page) .cockpit-nav::-webkit-scrollbar { display: none; }

:is(.overview-page, .innovation-page, .direct-page, .reseller-page) .nav-brand,
:is(.innovation-page, .direct-page, .reseller-page) .cockpit-nav strong {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--text-primary);
  font-size: 13px;
  letter-spacing: .02em;
}

:is(.overview-page, .innovation-page, .direct-page, .reseller-page) .tab-button,
:is(.innovation-page, .direct-page, .reseller-page) .cockpit-nav a {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

:is(.innovation-page, .direct-page, .reseller-page) .app-shell {
  display: block;
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
}

:is(.innovation-page, .direct-page, .reseller-page) .main-content {
  width: 100%;
  margin: 0;
  padding: 0 0 52px;
}

/* 侧栏信息合并为标题后的工作栏：保留切换、状态和导出，不再挤占横向数据空间。 */
:is(.innovation-page, .direct-page, .reseller-page) .workspace-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, .18);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button.active {
  border-color: rgba(239, 117, 37, .64);
  background: rgba(239, 117, 37, .14);
  color: var(--text-primary);
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-actions button:hover,
:is(.innovation-page, .direct-page, .reseller-page) .workspace-switcher .nav-button:hover {
  border-color: rgba(239, 117, 37, .58);
  color: var(--text-primary);
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

:is(.innovation-page, .direct-page, .reseller-page) .workspace-status .status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
}

@media (max-width: 768px) {
  :is(.overview-page, .innovation-page, .direct-page, .reseller-page) .page-tabs,
  :is(.innovation-page, .direct-page, .reseller-page) .cockpit-nav {
    width: calc(100% - 24px);
    min-height: 44px;
    margin: 12px auto 14px;
    padding: 5px 8px;
    border-radius: 999px;
  }

  :is(.innovation-page, .direct-page, .reseller-page) .app-shell { width: calc(100% - 24px); }
  :is(.innovation-page, .direct-page, .reseller-page) .main-content { padding-top: 0; }

  :is(.innovation-page, .direct-page, .reseller-page) .workspace-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 9px;
  }

  :is(.innovation-page, .direct-page, .reseller-page) .workspace-status { justify-content: flex-start; white-space: normal; }
  :is(.innovation-page, .direct-page, .reseller-page) .workspace-actions { width: 100%; }
  :is(.innovation-page, .direct-page, .reseller-page) .workspace-actions button { flex: 1 1 0; }
}

/* 知识库独立成页：沿用驾驶舱层级，避免把高密度目录挤进经营看板。 */
.knowledge-page {
  min-height: 100vh;
  background: var(--bg);
}

.knowledge-page .cockpit-nav {
  position: relative;
  top: auto;
  left: auto;
  z-index: 20;
  display: flex;
  width: min(960px, calc(100% - 48px));
  max-width: 960px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 24px auto 18px;
  padding: 6px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav);
  box-shadow: var(--shadow-float);
  transform: none;
}

.knowledge-page .cockpit-nav strong,
.knowledge-page .cockpit-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 36px;
  text-decoration: none;
  white-space: nowrap;
}

.knowledge-page .cockpit-nav strong { color: var(--ink); }

.knowledge-page .cockpit-nav a:hover,
.knowledge-page .cockpit-nav a.active {
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--ink);
}

.knowledge-shell {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.knowledge-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.knowledge-header h1 {
  margin: 6px 0 12px;
  color: var(--ink);
  font-family: VideoJS, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(42px, 4.4vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.knowledge-header > div > p:last-child {
  max-width: 62ch;
  margin: 0;
  color: var(--text-secondary, var(--muted));
  font-size: 16px;
  line-height: 1.6;
}

.knowledge-source {
  display: grid;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 176px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.knowledge-source span { color: var(--ink); font-weight: 600; }
.knowledge-source small { color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.knowledge-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.knowledge-search {
  display: flex;
  min-width: min(100%, 372px);
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.knowledge-search span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.knowledge-search input {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  font: inherit;
}

.knowledge-search input::placeholder { color: var(--muted); }

.knowledge-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.filter-button,
.catalog-item,
.featured-list button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-secondary, var(--muted));
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.filter-button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .02em;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--color-primary);
  background: var(--primary-soft);
  color: var(--ink);
}

/* 为动态目录和筛选补齐键盘焦点，鼠标与键盘都能明确看到当前位置。 */
.knowledge-page .knowledge-search:focus-within,
.knowledge-page .filter-button:focus-visible,
.knowledge-page .catalog-item:focus-visible,
.knowledge-page .featured-list button:focus-visible,
.knowledge-page .show-more-documents:focus-visible,
.knowledge-page .error-state button:focus-visible {
  outline: 3px solid var(--color-primary-strong);
  outline-offset: 3px;
}

.knowledge-page .knowledge-search:focus-within { border-color: var(--color-primary-strong); }

.knowledge-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.knowledge-page .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.knowledge-page .panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.knowledge-page .panel-header h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.knowledge-page .section-kicker { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.catalog-count,
.sync-state,
.document-state {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.catalog-list { padding: 8px; }

.knowledge-catalog { position: static; }

.catalog-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 12px 10px;
  border-width: 1px 0 0;
  border-radius: 0;
  text-align: left;
}

.catalog-item:first-child { border-top: 0; }
.catalog-item:hover,
.catalog-item.active { color: var(--ink); background: var(--primary-soft); }
.catalog-item span { display: grid; gap: 3px; min-width: 0; }
.catalog-item strong { font-size: 14px; font-weight: 550; }
.catalog-item small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item b { color: var(--muted); font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

.knowledge-center { display: grid; gap: 16px; min-width: 0; }

.strategy-panel {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) minmax(210px, .62fr);
  align-items: center;
  min-height: 112px;
}

.strategy-label,
.strategy-selection { display: grid; align-content: center; gap: 5px; min-height: 112px; padding: 20px; }
.strategy-label { border-right: 1px solid var(--line); }
.strategy-label strong { color: var(--ink); font-size: 18px; font-weight: 600; }
.strategy-path { display: flex; min-width: 0; align-items: center; justify-content: center; gap: clamp(8px, 1.5vw, 20px); padding: 16px; }
.strategy-path span { color: var(--text-secondary, var(--muted)); font-size: 14px; font-weight: 550; white-space: nowrap; }
.strategy-path i { width: 18px; height: 1px; flex: 0 0 18px; background: var(--line-strong); }
.strategy-selection { border-left: 1px solid var(--line); }
.strategy-selection > span { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.strategy-selection strong { color: var(--color-primary-strong); font-size: 15px; font-weight: 600; }
.strategy-selection small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.document-list { display: grid; }
.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.document-row:last-child { border-bottom: 0; }
.document-row > div { min-width: 0; }
.document-type { color: var(--color-primary-strong); font-size: 11px; letter-spacing: .05em; }
.document-row h3 { margin: 5px 0 3px; color: var(--ink); font-size: 16px; font-weight: 550; }
.document-row p { margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { margin: 0; padding: 40px 18px; color: var(--muted); text-align: center; }
.results-status { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.loading-state { margin: 0; padding: 28px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.error-state { display: grid; justify-items: center; gap: 12px; padding: 36px 20px; color: var(--muted); text-align: center; }
.loading-state[hidden],
.error-state[hidden] { display: none; }
.error-state p { margin: 0; }
.error-state button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.error-state button:hover { border-color: var(--color-primary); background: var(--primary-soft); }

.show-more-documents {
  display: flex;
  width: calc(100% - 40px);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 16px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, var(--muted));
  font: inherit;
  font-size: 13px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.show-more-documents[hidden] { display: none; }

.show-more-documents:hover {
  border-color: var(--color-primary);
  background: var(--primary-soft);
  color: var(--ink);
}

.featured-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
}
.featured-strip > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.featured-list { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; }
.featured-list button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; border-radius: 999px; font-size: 11px; }
.featured-list button:hover { color: var(--ink); border-color: var(--color-primary); background: var(--primary-soft); }
.featured-list span { color: var(--muted); font-size: 10px; letter-spacing: .03em; }
.featured-list strong { color: inherit; font-size: 11px; font-weight: 550; }

@media (max-width: 1100px) {
  .strategy-panel { grid-template-columns: 150px minmax(0, 1fr); }
  .strategy-selection { grid-column: 1 / -1; min-height: 68px; grid-template-columns: 90px auto minmax(0, 1fr); align-items: center; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  .knowledge-page .cockpit-nav {
    width: calc(100% - 24px);
    min-height: 44px;
    justify-content: flex-start;
    margin: 12px auto 14px;
    padding: 5px 8px;
  }

  .knowledge-shell { padding-top: 8px; }

  .knowledge-shell { width: calc(100% - 24px); }
  .knowledge-header,
  .knowledge-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-header { gap: 20px; }
  .knowledge-header h1 { font-size: clamp(38px, 13vw, 58px); }
  .knowledge-source { width: 100%; }
  .knowledge-search { width: 100%; }
  .knowledge-filters { justify-content: flex-start; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .strategy-panel { grid-template-columns: 1fr; }
  .strategy-label { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--line); }
  .strategy-path { justify-content: flex-start; overflow-x: auto; }
  .strategy-selection { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .featured-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .document-row { align-items: start; flex-direction: column; }
  .document-row p { white-space: normal; }
  .show-more-documents { width: calc(100% - 32px); margin: 14px 16px 16px; }
}
