/* 首页上传提示独立限定，不改变其他页面和公共 tooltip 的默认外观。 */
.jufa-home-page .as-tooltip__popper.jufa-home-upload-tooltip {
  width: 261px;
  max-width: calc(100vw - 16px);
  min-height: 93.5px;
  box-sizing: border-box;
  padding: 12px;
  margin: 0;
  border: 1px solid #E3E3E3;
  border-radius: 8px;
  background: #FFFFFF;
  color: #333333;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, .1);
  font-size: 14px;
  line-height: 21px;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.jufa-home-page .jufa-home-upload-tooltip[data-placement="top"] .as-tooltip__arrow {
  border-top-color: #E3E3E3;
}

.jufa-home-page .jufa-home-upload-tooltip[data-placement="bottom"] .as-tooltip__arrow {
  border-bottom-color: #E3E3E3;
}

:root {
  --home-accent: #333;
  --home-accent-soft: rgba(227, 227, 227, .4);
  --home-bg: #fff;
  --home-sidebar: #f5f5f8;
  --home-text: #333;
  --home-muted: #999;
  --home-border: #e3e3e3;
}

html,
body.jufa-home-page {
  width: 100%;
  height: 100%;
  min-width: 0 !important;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  color: var(--home-text);
  background: var(--home-bg);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.jufa-home-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 620px;
  background: var(--home-bg);
}

.jufa-home-page--embedded .jufa-home-layout {
  height: 100vh;
  min-height: 560px;
}

.jufa-home-sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 242px;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  padding: 8px 13px 29px 12px;
  overflow-y: hidden;
  border-right: 1px solid #e3e3e3;
  background: var(--home-sidebar);
  scrollbar-width: none;
}

.jufa-home-sidebar-toggle {
  position: fixed;
  /* 菜单位于侧栏层叠上下文内，收展按钮须在其下方以免遮挡和抢占点击。 */
  z-index: 19;
  top: calc(50vh - 33px);
  left: 241px;
  width: 16px;
  height: 44px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.jufa-home-sidebar-toggle > svg {
  display: block;
  width: 8px;
  height: 28px;
  overflow: visible;
}

.jufa-home-sidebar-toggle path { fill: none; stroke: #D6DAE1; stroke-width: 4px; stroke-linecap: round; }

.jufa-home-sidebar.is-collapsed {
  flex-basis: 62px;
  padding-right: 13px;
}

.jufa-home-sidebar-toggle.is-collapsed { left: 63px; }
.jufa-home-sidebar-toggle.is-collapsed > svg { transform: scaleX(-1); }

.jufa-home-sidebar.is-collapsed > .jufa-home-new-task,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge[data-home-knowledge] {
  justify-content: center;
  width: 36px;
  padding: 8px;
}

.jufa-home-sidebar.is-collapsed .jufa-home-new-task > span,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__label,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__icon:last-child,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge__label { display: none; }

.jufa-home-sidebar.is-collapsed > .jufa-home-new-task > .jufa-home-menu__icon,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__icon,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge__icon[aria-hidden="true"] { margin-right: 0; }

.jufa-home-sidebar.is-collapsed .jufa-home-sidebar-divider { width: 36px; }

.jufa-home-sidebar::-webkit-scrollbar {
  display: none;
}

.jufa-home-new-task,
.jufa-home-menu__control {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.jufa-home-new-task {
  color: #333;
  background: rgba(227, 227, 227, .4);
  font-weight: 400;
}

.jufa-home-new-task:hover,
.jufa-home-new-task.is-active,
.jufa-home-menu__control:hover,
.jufa-home-menu__control:focus,
.jufa-home-menu__control:focus-visible {
  color: #333;
  background: rgba(227, 227, 227, .4);
  outline: 0;
  text-decoration: none;
}

.jufa-home-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  color: currentColor;
  font-size: 18px;
  line-height: 20px;
}

.jufa-home-menu__icon--image {
  padding: 0;
  object-fit: contain;
}

.jufa-home-menu-wrap {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 0;
  margin-top: 10px;
  overflow-x: visible;
  overflow-y: auto;
  scrollbar-width: none;
}

.jufa-home-menu-wrap::-webkit-scrollbar {
  display: none;
}

.jufa-home-menu,
.jufa-home-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jufa-home-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jufa-home-menu__item {
  position: relative;
  margin: 0;
}

.jufa-home-menu__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 仅调整可用一级菜单文字，保留图标、二级菜单及禁用状态原色。 */
.jufa-home-menu > .jufa-home-menu__item:not(.is-disabled) > .jufa-home-menu__control > .jufa-home-menu__label {
  color: #666666;
}

.jufa-home-menu__control > .jufa-home-menu__icon:last-child {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0 0 0 8px;
  color: #666;
  font-size: 16px;
  line-height: 16px;
}

.jufa-home-submenu {
  position: fixed;
  top: var(--home-submenu-top, 0px);
  left: var(--home-submenu-left);
  display: none;
  flex-direction: column;
  gap: 6px;
  width: var(--home-submenu-width);
  max-height: var(--home-submenu-max-height, calc(100vh - 32px));
  box-sizing: border-box;
  padding: 4px;
  overflow-x: visible;
  overflow-y: auto;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.jufa-home-submenu .jufa-home-menu__control {
  padding: 8px;
  color: #666;
}

/* 仅由统一交互状态控制浮层，避免已点击叶子的焦点或悬停重新撑开旧分支。 */
.jufa-home-menu__item.is-submenu-open > .jufa-home-submenu {
  display: flex;
}

.jufa-home-menu__item.is-disabled .jufa-home-menu__control {
  color: #b4b7c1;
  cursor: not-allowed;
}

.jufa-home-sidebar__empty,
.jufa-home-history__empty {
  margin: 12px 8px;
  color: #a0a4b0;
  font-size: 12px;
}

.jufa-home-sidebar-footer {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-height: 0;
}

.jufa-home-sidebar-divider {
  display: block;
  flex: 0 0 1px;
  width: 216px;
  height: 1px;
  background: #e3e3e3;
}

/* 新建任务下方分隔线按设计图位于 36px 按钮后的第 46px，并保持首个菜单原有纵向位置。 */
.jufa-home-sidebar-divider--new-task {
  margin-top: 10px;
}

.jufa-home-knowledge {
  display: flex;
  align-items: center;
  flex: 0 0 36px;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: #666;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
}

.jufa-home-knowledge:hover,
.jufa-home-knowledge:focus,
.jufa-home-knowledge:focus-visible {
  color: #666;
  background: rgba(227, 227, 227, .4);
  outline: 0;
  text-decoration: none;
}

/* 覆盖旧Bootstrap普通焦点；仅键盘导航保留蓝色提示，不用blur破坏焦点。 */
body.jufa-home-page .jufa-home-menu__control:focus-visible,
body.jufa-home-page .jufa-home-knowledge:focus-visible {
  outline: 2px solid #076cf1;
  outline-offset: -2px;
}

.jufa-home-knowledge__icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.jufa-home-knowledge__label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jufa-home-history {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
  width: 216px;
  height: auto;
  min-height: 0;
}

.jufa-home-history[hidden] { display: none; }

.jufa-home-history-compact {
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 35px;
  height: 28px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  color: #666;
  background: rgba(227, 227, 227, .6);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 11px;
  cursor: pointer;
}

.jufa-home-history-compact:not([hidden]) { display: flex; }
.jufa-home-history-compact > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 20px;
  border-radius: 4px;
  background: #fff;
}

.jufa-home-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 28px;
  width: 216px;
  height: 28px;
}

.jufa-home-history__tabs {
  display: flex;
  flex: 0 0 124px;
  gap: 0;
  width: 124px;
  height: 28px;
  box-sizing: border-box;
  margin-left: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(227, 227, 227, .6);
}

.jufa-home-history__tabs[hidden] {
  display: none !important;
}

.jufa-home-history__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 20px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #999;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
  line-height: 11px;
  cursor: pointer;
}

.jufa-home-history__tab.is-active {
  color: #666;
  background: #fff;
  font-weight: 400;
}

.jufa-home-history__tab:focus-visible {
  outline: 1px solid #999;
  outline-offset: -1px;
}

.jufa-home-history__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  color: #040000;
  transition: width .3s ease, flex-basis .3s ease;
}

.jufa-home-history__search.is-expanded {
  justify-content: flex-start;
  flex: 0 0 216px;
  gap: 6px;
  width: 216px;
  height: 28px;
  box-sizing: border-box;
  margin-right: 0;
  padding: 0 6px;
  border: 1px solid #e8eaf2;
  border-radius: 8px;
  background: #fff;
}

.jufa-home-history__search.is-expanded:focus-within {
  border-color: #076cf1;
}

.jufa-home-history__search-trigger,
.jufa-home-history__search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.jufa-home-history__search-trigger img {
  display: block;
  width: 16px;
  height: 16px;
}

.jufa-home-history__search-trigger:focus-visible,
.jufa-home-history__search-clear:focus-visible {
  border-radius: 2px;
  outline: 1px solid #076cf1;
  outline-offset: 1px;
}

.jufa-home-history__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #333;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 24px;
}

.jufa-home-history__search-input::placeholder {
  color: #999;
}

.jufa-home-history__search-input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.jufa-home-history__search-clear {
  color: #999;
}

.jufa-home-history__search-clear .iconfont {
  font-size: 12px;
  line-height: 16px;
}

.jufa-home-history__search [hidden] {
  display: none !important;
}

.jufa-home-history__list {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 2px;
  width: 216px;
  height: auto;
  min-height: 0;
  overflow-y: auto;
}

.jufa-home-history__item {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  gap: 6px;
  width: 216px;
  height: 32px;
  box-sizing: border-box;
  /* 右侧沿用侧栏外层留白，避免与行内8px叠加。 */
  padding: 8px 0 8px 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

/* 分页状态在历史滚动区内，不挤占固定批量操作栏。 */
.jufa-home-history__page-status {
  flex: 0 0 32px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font: 12px/20px "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.jufa-home-history__page-status:disabled {
  color: #999;
  cursor: default;
}

.jufa-home-history__page-status:focus-visible {
  outline: 1px solid #005fff;
  outline-offset: -2px;
}

.jufa-home-history__page-status[hidden] {
  display: none;
}

.jufa-home-history__item:hover,
.jufa-home-history__item:focus-visible {
  color: #333;
  background: rgba(227, 227, 227, .4);
  outline: 0;
}

.jufa-home-history__title {
  color: #777777;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jufa-home-history__open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 18px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.jufa-home-history__open:focus-visible {
  outline: 1px solid #999;
  outline-offset: 2px;
}

.jufa-home-history__select {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history.is-batch .jufa-home-history__select {
  display: inline-flex;
}

.jufa-home-history__item.is-selected .jufa-home-history__select {
  border-color: #333;
  background: #333;
}

.jufa-home-history__item.is-selected .jufa-home-history__select > span {
  width: 8px;
  height: 4px;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.jufa-home-history__more {
  /* 覆盖末尾而不参与排版，避免悬停或键盘聚焦时文字再次截断。 */
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #333;
  padding: 0;
  border: 0;
  background: var(--home-sidebar, #f5f5f7);
  opacity: 0;
  pointer-events: none;
}

.jufa-home-history__item:hover .jufa-home-history__more {
  background: linear-gradient(rgba(227, 227, 227, .4), rgba(227, 227, 227, .4)), var(--home-sidebar, #f5f5f7);
}

.jufa-home-history__item:hover .jufa-home-history__more,
.jufa-home-history__item:focus-within .jufa-home-history__more {
  display: inline-flex;
  opacity: 1;
  pointer-events: auto;
}

.jufa-home-history.is-batch .jufa-home-history__more {
  display: none;
}

.jufa-home-history__more .iconfont {
  font-size: 16px;
  line-height: 16px;
}

/* 历史三点弹层严格采用 MasterGo 图层 634:11830 的边界、间距和阴影。 */
.jufa-home-history__menu {
  position: fixed;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 120px;
  height: 148px;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.jufa-home-history__menu[hidden] {
  display: none;
}

.jufa-home-history__menu-item {
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  gap: 8px;
  width: 112px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.jufa-home-history__menu-item:hover,
.jufa-home-history__menu-item:focus-visible {
  background: rgba(227, 227, 227, .4);
  outline: 0;
}

.jufa-home-history__menu-item .iconfont {
  flex: 0 0 16px;
  font-size: 16px;
}

.jufa-home-history__menu-item.is-danger {
  color: #e03333;
}

.jufa-home-history__menu-item.is-danger:hover,
.jufa-home-history__menu-item.is-danger:focus-visible {
  color: #e03333;
  background: #fdeffe;
}

/* 历史批量操作区采用 MasterGo 图层 634:16594 的尺寸、间距和按钮状态。 */
.jufa-home-history__batch {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  width: 216px;
  height: 74px;
  box-sizing: border-box;
  background: var(--home-sidebar);
}

.jufa-home-history__batch[hidden] {
  display: none;
}

/* 批量模式为底部操作区弹性预留 74px，保证不同视口下最后一条记录都可滚动到操作区上方。 */
.jufa-home-history.is-batch .jufa-home-history__list {
  height: auto;
  margin-bottom: 74px;
}

.jufa-home-history__select-all {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 32px;
  gap: 6px;
  width: 200px;
  height: 32px;
  padding: 0;
  border: 0;
  color: #333;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}

.jufa-home-history__check {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
}

.jufa-home-history__select-all.is-checked .jufa-home-history__check,
.jufa-home-history__select-all.is-half .jufa-home-history__check {
  border-color: #333;
  background: #333;
}

.jufa-home-history__select-all.is-checked .jufa-home-history__check::after {
  display: block;
  width: 8px;
  height: 4px;
  margin: 3px auto 0;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  content: "";
  transform: rotate(-45deg);
}

.jufa-home-history__select-all.is-half .jufa-home-history__check::after {
  display: block;
  width: 8px;
  height: 2px;
  margin: 5px auto 0;
  background: #fff;
  content: "";
}

.jufa-home-history__batch-actions {
  display: flex;
  gap: 10px;
  width: 200px;
}

.jufa-home-history__batch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 95px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #e03333;
  border-radius: 6px;
  color: #e03333;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.jufa-home-history__batch-action:not(:disabled):hover {
  background: #fdeffe;
}

.jufa-home-history__batch-action:not(:disabled):focus-visible {
  background: #fdeffe;
  outline: 0;
}

.jufa-home-history__batch-action:disabled {
  color: #999;
  border-color: #e3e3e3;
  background: #fff;
  cursor: default;
}

.jufa-home-history__batch-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 95px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  color: #333;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.jufa-home-history__batch-cancel:focus-visible {
  outline: 1px solid #999;
  outline-offset: 1px;
}

.jufa-home-history__batch-action .iconfont,
.jufa-home-history__batch-cancel .iconfont {
  flex: 0 0 16px;
  font-size: 16px;
  line-height: 16px;
}

.jufa-home-history__rename-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
}

.jufa-home-history__rename-mask[hidden] {
  display: none;
}

.jufa-home-history__rename-dialog {
  width: 360px;
  box-sizing: border-box;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.jufa-home-history__rename-dialog h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.jufa-home-history__rename-dialog input {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  outline: 0;
}

.jufa-home-history__rename-dialog input:focus {
  border-color: #0a5de7;
}

.jufa-home-history__rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.jufa-home-history__rename-actions button {
  min-width: 64px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history__rename-actions button:last-child {
  border-color: #0a5de7;
  color: #fff;
  background: #0a5de7;
}

/* 单条与批量删除共用确认弹窗，所有关闭路径都在确认前保持零删除请求。 */
.jufa-home-history__delete-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
}

.jufa-home-history__delete-mask[hidden] {
  display: none;
}

.jufa-home-history__delete-dialog {
  width: 360px;
  box-sizing: border-box;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.jufa-home-history__delete-dialog h3 {
  margin: 0 0 12px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.jufa-home-history__delete-dialog p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 22px;
}

.jufa-home-history__delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.jufa-home-history__delete-actions button {
  min-width: 64px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  color: #333;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history__delete-actions button.is-danger {
  border-color: #e03333;
  color: #fff;
  background: #e03333;
}

.jufa-home-history__delete-actions button:disabled {
  opacity: .55;
  cursor: default;
}

.jufa-home-workspace {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--home-bg);
}

/* 首页拖拽提示仅覆盖右侧可见区，不影响侧栏、顶部导航及普通输入点击。 */
.jufa-home-workspace > .jufa-ai-drag-upload-mask {
  bottom: auto;
  padding: 24px;
  overflow-anchor: none;
}

@media (max-width: 600px) {
  .jufa-home-workspace > .jufa-ai-drag-upload-mask .jufa-ai-drag-upload-mask__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
  }

  .jufa-home-workspace > .jufa-ai-drag-upload-mask .jufa-ai-drag-upload-mask__title {
    font-size: 16px;
  }
}

/* 桌面版入口严格采用 MasterGo 634:16231 的 117×36 画布与 20px 官方导出图标。 */
.jufa-home-desktop-download {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 8;
  display: flex;
  width: 117px;
  height: 36px;
  padding: 0 10px 0 11px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  border: 1px solid #e3e3e3;
  border-radius: 20px;
  color: #9e9e9e;
  background: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.jufa-home-desktop-download:hover,
.jufa-home-desktop-download:focus-visible {
  border-color: #0a5de7;
  color: #0a5de7;
  outline: 0;
}

.jufa-home-desktop-download img {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.jufa-home-page--embedded .jufa-home-desktop-download {
  display: none !important;
}

.jufa-home-page--embedded .jufa-home-workspace {
  width: 100%;
}

.jufa-home-hero {
  position: relative;
  left: 4px;
  width: min(774px, calc(100% - 72px));
  margin: 0 auto;
  padding: 110px 0 50px;
}

.jufa-home-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 76px;
  color: #333;
  font-family: "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0;
  text-align: center;
}

.jufa-home-slogan__logo {
  display: block;
  width: 36px;
  height: 35px;
  object-fit: contain;
}

.jufa-home-slogan__accent {
  color: inherit;
}

.jufa-home-mode-scroller {
  position: relative;
  width: 100%;
  height: 32px;
  margin-bottom: 12px;
  overflow: hidden;
}

.jufa-home-mode-list {
  width: 100%;
  height: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* 箭头20px加8px间距；仅为有后续内容的方向预留栏位，首尾标签贴齐对应边缘。 */
.jufa-home-mode-scroller.has-overflow .jufa-home-mode-list {
  width: calc(100% - var(--home-mode-prev-space, 0px) - var(--home-mode-next-space, 0px));
  margin: 0 var(--home-mode-next-space, 0px) 0 var(--home-mode-prev-space, 0px);
}

/* 两端分别控制，边界连点保护由脚本负责，不保留不可用箭头的空白。 */
.jufa-home-mode-scroller.has-scroll-prev {
  --home-mode-prev-space: 28px;
}

.jufa-home-mode-scroller.has-scroll-next {
  --home-mode-next-space: 28px;
}

/* 仅首页采用设计稿的中性选中底色和蓝色纯勾，不覆盖公共模型组件。 */
body.jufa-home-page .model-dropdown-menu li.active {
  color: #333;
  background: #f5f5f7;
  border-radius: 4px;
}

body.jufa-home-page .model-dropdown-menu li.active::after {
  content: "";
  box-sizing: border-box;
  width: 7px;
  height: 12px;
  top: 50%;
  right: 12px;
  border: solid #0561ff;
  border-width: 0 2px 2px 0;
  background: transparent;
  border-radius: 0;
  transform: translateY(-65%) rotate(45deg);
}

.jufa-home-mode-track {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  /* 轨道只占实际标签宽度，隐藏入口后不以多余空白触发滚动箭头。 */
  width: max-content;
  height: 32px;
}

.jufa-home-mode-list::-webkit-scrollbar {
  display: none;
}

/* 横向任务入口采用 MasterGo 87×32 渐变和 20×20 源图标按钮，边界状态由脚本控制。 */
.jufa-home-mode-scroll-control {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 115px;
  height: 32px;
  pointer-events: none;
  cursor: pointer;
}

.jufa-home-mode-scroll-control[hidden] {
  display: none;
}

.jufa-home-mode-scroll-control::before {
  position: absolute;
  top: 0;
  width: 87px;
  height: 32px;
  content: "";
  z-index: 1;
  pointer-events: auto;
}

.jufa-home-mode-scroll-control::after {
  position: absolute;
  top: 0;
  z-index: 1;
  width: 28px;
  height: 32px;
  background: #fff;
  content: "";
  pointer-events: auto;
}

/* 边界保留箭头与实色栏位，但移除渐变命中区，让首尾标签完整可读、可点。 */
.jufa-home-mode-scroll-control.is-disabled::before {
  visibility: hidden;
  pointer-events: none;
}

.jufa-home-mode-scroll-control--prev {
  left: 0;
}

.jufa-home-mode-scroll-control--prev::before {
  right: 0;
  background: linear-gradient(90deg, #fff 26%, rgba(255, 255, 255, 0) 100%);
}

.jufa-home-mode-scroll-control--prev::after {
  left: 0;
}

.jufa-home-mode-scroll-control--next {
  right: 0;
}

.jufa-home-mode-scroll-control--next::before {
  left: 0;
  background: linear-gradient(270deg, #fff 26%, rgba(255, 255, 255, 0) 100%);
}

.jufa-home-mode-scroll-control--next::after {
  right: 0;
}

.jufa-home-mode-scroll-control > button {
  position: absolute;
  top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 50%;
  background: #f5f5f8;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.jufa-home-mode-scroll-control > button:disabled {
  opacity: .45;
  cursor: default;
}

.jufa-home-mode-scroll-control--prev > button {
  left: 0;
}

.jufa-home-mode-scroll-control--next > button {
  right: 0;
}

.jufa-home-mode-scroll-control > button > img {
  display: block;
  width: 10px;
  height: 10px;
}

.jufa-home-mode-scroll-control--prev > button > img {
  transform: rotate(180deg);
}

.jufa-home-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  color: #333;
  background: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .16s ease;
}

.jufa-home-mode__icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
}

.jufa-home-mode:hover,
.jufa-home-mode.is-active {
  border-color: #0a5de7;
  color: #0a5de7;
  background: rgba(10, 93, 231, .06);
}

/* 按任务类型保留 MasterGo 设计宽度，隐藏或调整标签顺序时不套用其他任务的宽度。 */
.jufa-home-mode[data-home-question-type="doc_generate"] { width: 91px; }
.jufa-home-mode[data-home-question-type="element_generation"] { width: 104px; }
.jufa-home-mode[data-home-question-type="contract_review"] { width: 91px; }
.jufa-home-mode[data-home-question-type="case_analysis"] { width: 91px; }
.jufa-home-mode[data-home-question-type="case_search"] { width: 91px; }
.jufa-home-mode[data-home-question-type="timeline_generate"] { width: 104px; }
.jufa-home-mode[data-home-question-type="ai_free_marking"] { width: 91px; }
.jufa-home-mode[data-home-question-type="bank_flow_analysis"] { width: 117px; }

.jufa-home-question-box .chat-input-wrapper {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.jufa-home-question-box .chat-input-container {
  width: 100%;
  /* 保留默认高度，以正文自然高度撑开外框，底部留出工具栏和点击间隙。 */
  height: auto;
  min-height: 134px;
  padding-bottom: 51px;
  box-sizing: border-box;
  border: 2px solid rgba(227, 227, 227, .6);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 13px rgba(0, 0, 0, .01);
}

/* 上传文件回显严格采用 MasterGo 图层 331:36564；状态类由脚本同步以兼容客户端旧内核。 */
body.jufa-home-page .jufa-home-question-box .chat-input-container.has-home-attachments {
  height: auto;
  min-height: 210px;
}

body.jufa-home-page .jufa-home-question-box .chat-input-container.has-home-attachments .chat-input-area {
  /* 附件仍固定在顶部，正文参与文档流以便长内容撑高容器。 */
  position: relative;
  margin-top: 75px;
  min-height: 48px;
}

/* 未上传时不让空附件占位重复增加输入框高度。 */
body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper:not(.chat-upload-wrapper--active) {
  display: none;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper.chat-upload-wrapper--active {
  position: absolute;
  top: 5px;
  right: 16px;
  left: 10px;
  z-index: 4;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper.chat-upload-wrapper--active::after {
  position: absolute;
  right: -6px;
  bottom: 0;
  left: 0;
  height: 1px;
  background: #ededed;
  content: "";
}

/* 多附件前后控件采用 MasterGo 634:16305 的 22×46 实际参数，并以不透明底色遮住边缘内容。 */
.jufa-home-attachment-scroll {
  position: absolute;
  top: 5px;
  z-index: 7;
  display: flex;
  width: 22px;
  height: 46px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  background: #f5f5f8;
  cursor: pointer;
}

.jufa-home-attachment-scroll[hidden] {
  display: none !important;
}

.jufa-home-attachment-scroll--prev {
  left: 0;
}

.jufa-home-attachment-scroll--next {
  right: 0;
}

.jufa-home-attachment-scroll img {
  display: block;
  width: 10px;
  height: 10px;
}

.jufa-home-attachment-scroll--prev img {
  transform: rotate(180deg);
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__inner {
  width: 100%;
  height: 51px;
  padding-top: 5px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__file-list {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: visible;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__inner::-webkit-scrollbar {
  display: none;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-type="file"],
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-type="img"] {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  max-width: 180px;
  height: 46px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background-color: #fff;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item:hover {
  background-color: #f5f5f8;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img {
  position: absolute;
  top: 9px;
  left: 11px;
  width: 23px;
  min-width: 23px;
  height: 28px;
  border-radius: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 23px 28px;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-generic.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img {
  background-image: none;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img img {
  width: 23px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="doc"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="docx"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="wps"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-word.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="pdf"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-pdf.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="xls"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="xlsx"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-excel.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="txt"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="md"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="markdown"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-generic.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__info {
  position: absolute;
  top: 7px;
  left: 40px;
  display: flex;
  width: 108px;
  max-width: none;
  height: 33px;
  margin: 0;
  justify-content: flex-start;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__title {
  width: 108px;
  height: 17px;
  color: #333;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__desc {
  display: flex;
  width: 108px;
  height: 16px;
  margin: 0;
  align-items: center;
  column-gap: 2px;
  overflow: hidden;
  color: #999;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="doc"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="docx"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="wps"] .attachment-file__desc::before {
  content: "WORD";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="pdf"] .attachment-file__desc::before {
  content: "PDF";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="xls"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="xlsx"] .attachment-file__desc::before {
  content: "EXCEL";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="txt"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="md"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="markdown"] .attachment-file__desc::before {
  content: "FILE";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del {
  position: absolute;
  top: -5px;
  right: -6px;
  z-index: 2;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: url("/static/Public/images/new_home/home-file-remove.svg") center / 16px 16px no-repeat;
  opacity: 0;
  color: transparent;
  cursor: pointer;
  transition: opacity .15s ease;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item:hover .file_del,
body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del:focus-visible {
  opacity: 1;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del i {
  display: none;
}

.jufa-home-question-box .chat-input-area {
  min-height: 64px;
}

/* 首页问题框工具栏严格按 MasterGo 图层 331:36516 定位，避免通用组件的药丸按钮样式泄漏。 */
.jufa-home-question-box .chat-input-tool {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 10px;
  width: auto;
  height: 32px;
  padding: 0;
  align-items: flex-end;
}

.jufa-home-question-box .left-tools-wrapper {
  flex: 0 0 140px;
  width: 140px;
  height: 24px;
  flex-wrap: nowrap;
  gap: 16px;
  row-gap: 0;
}

.jufa-home-question-box .left-tools-wrapper > .online-search,
.jufa-home-question-box .left-tools-wrapper > .follow-questions,
.jufa-home-question-box .left-tools-wrapper > .relate-project,
.jufa-home-question-box .left-tools-wrapper > .recently-questions,
.jufa-home-question-box .left-tools-wrapper > .timeline-cost-wrapper {
  display: none !important;
}

.jufa-home-question-box .model-select {
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 24px;
}

.jufa-home-question-box .model-select .ai-btn.model-trigger {
  width: 32px;
  height: 24px;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.jufa-home-question-box .left-tools-wrapper > .model-select > span,
.jufa-home-question-box .left-tools-wrapper > .knowledge-base > span {
  margin-right: 0;
}

.jufa-home-question-box .model-select .ai-btn__image,
.jufa-home-question-box .model-select .ai-btn__image img {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.jufa-home-question-box .model-select .ai-btn__image img {
  display: block;
  opacity: 1;
  object-fit: contain;
}

.jufa-home-question-box .model-select .icon-xiala1 {
  width: 10px;
  height: 10px;
  background: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat;
  font-size: 0;
  line-height: 0;
  transform: rotate(90deg);
}

.jufa-home-question-box .knowledge-base {
  display: flex;
  align-items: center;
  flex: 0 0 92px;
  width: 92px;
  height: 24px;
}

.jufa-home-question-box .knowledge-base .ai-btn.knowledge-trigger {
  justify-content: flex-start;
  width: 92px;
  height: 24px;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #666;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.jufa-home-question-box .knowledge-base .ai-btn.knowledge-trigger:hover {
  border-color: transparent;
  color: #666;
  background: transparent;
}

.jufa-home-question-box .knowledge-base .ai-btn__text {
  line-height: 24px;
}

.jufa-home-question-box .knowledge-base .ai-btn__text em {
  margin-left: 0;
  color: #0a5de7;
}

.jufa-home-question-box .knowledge-base .icon-xiala1 {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  background: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat;
  color: #666;
  font-size: 0;
  line-height: 0;
  transform: rotate(90deg);
}

/* 知识库弹层严格覆盖为 MasterGo 634:16737；仅命中新首页追加到 body 的直属弹层。 */
body.jufa-home-page > .knowledge-dropdown-menu {
  width: 206px !important;
  min-width: 206px !important;
  max-width: 206px !important;
  height: 280px !important;
  min-height: 280px !important;
  max-height: 280px !important;
  padding: 8px !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  border: 1px solid #e3e3e3;
  border-radius: 6px !important;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1) !important;
  scrollbar-color: #e3e3e3 transparent;
  scrollbar-width: thin;
}

body.jufa-home-page > .knowledge-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu::-webkit-scrollbar-thumb {
  border-radius: 1px;
  background: #e3e3e3;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-container {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 264px;
  padding: 0 !important;
  box-sizing: border-box;
  flex-direction: column;
  gap: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title {
  display: flex;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 18px;
  margin: 0 !important;
  padding: 0 0 0 7px;
  box-sizing: border-box;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 4px;
  color: #999;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
}

/* 上传和更多同时出现时禁止单个控件拆字，空间不足则整项换行并撑开标题高度。 */
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title > * {
  flex-shrink: 0;
  white-space: nowrap;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-title-more {
  margin-left: auto;
  font-size: 11px;
  line-height: 18px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title-count {
  color: #999;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-baseline {
  display: none;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list.knowledge-self {
  display: flex;
  width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0 !important;
  overflow: visible;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list.knowledge-self li {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  margin: 0 !important;
  padding: 0 4px !important;
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: 0 !important;
  border-radius: 4px;
  color: #333 !important;
  background: transparent !important;
  font-size: 13px;
  line-height: 17px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li:hover {
  background: #f5f5f8 !important;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: row;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li > div > span {
  overflow: hidden;
  color: #333;
  font-size: 13px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.jufa-home-page > .knowledge-dropdown-menu em.checkbox,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox {
  position: static;
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 0 !important;
  border-radius: 0;
  background: url("/static/Public/images/new_home/home-knowledge-book.svg") center / 20px 20px no-repeat !important;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox {
  background-image: url("/static/Public/images/new_home/home-knowledge-book-active.svg") !important;
}

body.jufa-home-page > .knowledge-dropdown-menu em.checkbox::before {
  display: none;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked::after {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: url("/static/Public/images/new_home/home-knowledge-check.svg") center / 16px 16px no-repeat;
  content: "";
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-upload {
  display: flex;
  height: 18px;
  margin: 0 0 0 auto;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: 0;
  color: #0a5de7;
  background: transparent;
  font-size: 11px;
  line-height: 15px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-upload i {
  width: 12px;
  height: 12px;
  margin: 0;
  background: url("/static/Public/images/new_home/home-knowledge-upload.svg") center / 12px 12px no-repeat;
  font-size: 0;
}

.jufa-home-question-box .right-tools-wrapper {
  display: flex;
  align-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 32px;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.jufa-home-question-box .right-tools-wrapper > :last-child {
  margin-left: 0;
}

/* 首页不显示清空按钮；覆盖公共组件输入后写入的内联 display，保持20+12+32px工具栏。 */
body.jufa-home-page .jufa-home-question-box #clearInputBtn {
  display: none !important;
}

/* 三种新接入模式沿用公共上传控件实际宽度，不能继续受首页图标栏的64px固定宽约束。 */
body.jufa-home-page[data-home-mode="timeline_generate"] .jufa-home-question-box .right-tools-wrapper,
body.jufa-home-page[data-home-mode="ai_free_marking"] .jufa-home-question-box .right-tools-wrapper,
body.jufa-home-page[data-home-mode="bank_flow_analysis"] .jufa-home-question-box .right-tools-wrapper {
  flex: 0 0 auto;
  width: auto;
}

.jufa-home-question-box #fileUploadBtn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}

.jufa-home-question-box #fileUploadBtn .tool-btn__icon,
.jufa-home-question-box #fileUploadBtn .tool-btn__icon > img {
  display: block;
  width: 20px;
  height: 20px;
}

.jufa-home-question-box #createContentBtn {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
}

.jufa-home-question-box #createContentBtn.is-disabled {
  background: rgba(3, 81, 236, .3);
}

.jufa-home-question-box .chat-input-textarea {
  min-height: 48px;
  color: #333846;
  font-size: 15px;
  line-height: 24px;
}

/* 标签只占首行：浮动绕排让后续正文回到左侧，行高与32px标签一致以免占两行。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor.chat-input-type-tag {
  display: block;
  line-height: 32px;
}

/* 默认编辑高度不变；与CoWork首页一样增高至160px后在编辑区内部滚动。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor {
  min-height: 64px;
  max-height: 160px;
}

.jufa-home-question-box .chat-input-type-label.jufa-home-input-type-label {
  /* 正文块覆盖整行宽度，标签需保持在其上方才能点击关闭。 */
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
  height: 32px;
  margin: 0 10px 0 0;
  padding: 0 10px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 5px;
  float: left;
  /* MasterGo 964:006933：灰色描边与6%蓝色填充分别设置，不使用整体透明度。 */
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  color: #0a5de7;
  background: rgba(10, 93, 231, .06);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

.jufa-home-input-type-icon,
.jufa-home-input-type-close,
.jufa-home-input-type-close img {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.jufa-home-input-type-icon,
.jufa-home-input-type-close img {
  display: block;
}

.jufa-home-input-type-text {
  flex: 0 0 auto;
  width: auto;
  height: 16px;
  line-height: 16px;
  white-space: nowrap;
}

/* 首页三种任务使用顶部相同图标字体，保持与关闭按钮同行对齐。 */
.jufa-home-question-box i.jufa-home-input-type-icon {
  font-size: 14px;
  line-height: 14px;
  font-style: normal;
  text-align: center;
}

.jufa-home-input-type-close {
  display: inline-flex;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.jufa-home-input-type-close:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(10, 93, 231, .35);
  outline-offset: 1px;
}

.jufa-home-input-type-close img {
  pointer-events: none;
}

/* 正文不建立独立排版上下文，允许文本绕过首行标签；空值仍沿用公共占位布局。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor .chat-input-editor-content {
  display: block;
  width: auto;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-editor-content::before {
  right: 0;
  width: auto;
  height: auto;
  white-space: nowrap;
  word-break: normal;
}

.jufa-home-question-box .chat-fn-tabs {
  display: none !important;
}

.jufa-home-examples {
  width: 782px;
  margin-top: 34px;
}

.jufa-home-examples__default[hidden],
.jufa-home-examples__dynamic[hidden] {
  display: none !important;
}

/* 默认四卡复用新首页首版视觉与类型切换入口，不参与动态示例接口加载。 */
.jufa-home-default-examples__title {
  display: none;
}

.jufa-home-default-examples__grid {
  display: grid;
  grid-template-columns: repeat(4, 182px);
  justify-content: space-between;
  gap: 0;
}

.jufa-home-default-example {
  width: 182px;
  height: 212px;
  min-width: 0;
  min-height: 212px;
  box-sizing: border-box;
  padding: 14px 14px 12px;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background: #fff;
  color: #353a49;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.jufa-home-default-example:hover,
.jufa-home-default-example:focus-visible,
.jufa-home-default-example.is-active {
  border-color: #cfd5ff;
  box-shadow: 0 8px 22px rgba(50, 62, 136, .09);
  outline: 0;
  transform: translateY(-1px);
}

.jufa-home-default-example strong {
  display: block;
  margin-bottom: 8px;
  color: #353a49;
  font-size: 14px;
  font-weight: 600;
}

.jufa-home-default-example > span:not(.jufa-home-default-example__preview) {
  display: block;
  overflow: hidden;
  color: #9296a2;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jufa-home-default-example__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 111px;
  margin-top: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.jufa-home-default-example__preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.jufa-home-default-example__view-sample {
  position: absolute;
  display: block;
  bottom: 8px;
  left: 50%;
  width: 88px;
  max-width: none;
  height: 30px;
  max-height: none;
  background: url('/static/Public/images/new_home/home-example-view-sample.svg') center / 88px 30px no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

/* 保留原胶囊背景和文字，仅在原鼠标区域覆盖用户提供的透明 GIF。 */
.jufa-home-default-example__view-sample .jufa-home-default-example__pointer {
  position: absolute;
  left: 12px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: #333;
}

/* 仅首页福利官活动弹窗：去除 Bootstrap 内边距，避免固定宽度内层挤出关闭按钮。 */
body.jufa-home-page .siyu_dialog .jufa_fuliguan_box > .jufa_siyu_box {
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .jufa-home-default-example__view-sample .jufa-home-default-example__pointer {
    display: none;
  }
}

.jufa-home-default-example:hover .jufa-home-default-example__view-sample,
.jufa-home-default-example:focus-visible .jufa-home-default-example__view-sample {
  opacity: 1;
}

.jufa-home-examples__heading {
  display: flex;
  align-items: center;
  height: 24px;
  margin-bottom: 16px;
}

.jufa-home-examples__bulb.iconfont {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  color: #06f;
  font-size: 18px;
  line-height: 18px;
}

.jufa-home-examples__title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #333;
  font-size: 12px;
  font-weight: 400;
  line-height: 24px;
}

/* 主标题与辅助说明分别设样式，避免通用 span 规则覆盖标题层级。 */
.jufa-home-examples__title-main {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}

.jufa-home-examples__caption {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.jufa-home-examples__grid {
  display: grid;
  grid-template-columns: repeat(2, 385px);
  gap: 14px 12px;
}

.jufa-home-example {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 385px;
  height: 84px;
  box-sizing: border-box;
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(245, 245, 248, .7);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

/* 示例可能渲染为链接：去除鼠标焦点的公共黑框，键盘仍保留下方原有蓝色边框。 */
body.jufa-home-page .jufa-home-example:focus,
body.jufa-home-page .jufa-home-default-example:focus {
  outline: 0;
  text-decoration: none;
}

.jufa-home-example:hover,
.jufa-home-example:focus-visible {
  border-color: #315efb;
  background: #fff;
  outline: 0;
}

.jufa-home-example__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 18px;
  padding: 0 4px;
  overflow: hidden;
  border-radius: 4px;
  color: #315efb;
  background: #e8edff;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

/* 动态示例按展示顺序区分两种设计色，保持标签原有尺寸和排版。 */
.jufa-home-example__type--green {
  color: #2CA79C;
  background: rgba(44, 167, 156, .10);
}

.jufa-home-example__type--blue {
  color: #0A5DE7;
  background: rgba(10, 93, 231, .08);
}

.jufa-home-example__content {
  display: -webkit-box;
  flex: 1 1 auto;
  overflow: hidden;
  color: #666;
  font-size: 14px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: clip;
  white-space: normal;
}

.jufa-home-examples__empty {
  margin: 26px 0 0;
  color: #999;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 1100px) {
  .jufa-home-hero { left: 0; width: min(760px, calc(100% - 48px)); padding-top: 54px; }
  .jufa-home-mode-list { width: 100%; }
  .jufa-home-examples { width: 100%; }
  .jufa-home-examples__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .jufa-home-example { width: 100%; }
  .jufa-home-default-examples__grid { grid-template-columns: repeat(2, 182px); justify-content: space-around; gap: 12px; }
}

@media (max-width: 760px) {
  .jufa-home-layout { height: calc(100dvh - 60px); min-height: 0; }
  .jufa-home-page--embedded .jufa-home-layout { height: 100dvh; }
  .jufa-home-sidebar { display: none; }
  .jufa-home-sidebar-toggle { display: none; }
  .jufa-home-hero { left: 0; width: calc(100% - 28px); padding-top: 42px; }
  .jufa-home-slogan { font-size: 28px; }
  .jufa-home-mode-list { justify-content: flex-start; }
  .jufa-home-examples__heading { align-items: flex-start; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .jufa-home-new-task,
  .jufa-home-menu__control,
  .jufa-home-mode { transition: none; }
}
