:root {
  --theme-ink: #303444;
  --theme-muted: #68707d;
  --theme-blue: #6958df;
  --theme-violet: #8b7de8;
  --theme-border: #e8e9ef;
  --theme-surface: #ffffff;
  --theme-background: #f7f8fb;
  --theme-wash:
    radial-gradient(ellipse at 20% 0%, #e7f3ff 0, transparent 52%),
    radial-gradient(ellipse at 86% 8%, #eeebff 0, transparent 48%),
    linear-gradient(180deg, #f9fbff, #f7f8fb 85%);
  color: var(--theme-ink);
  background: var(--theme-background);
}

body {
  background: var(--theme-background);
}

/* 隐藏横纵向滚动条，保留页面、编辑器和嵌入式对话的滚动能力。 */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

.sidebar {
  width: 72px;
  color: #657195;
  background: #fbfbfd;
  border-right: 1px solid var(--theme-border);
  box-shadow: none;
  transition: width .22s ease;
}

.brand {
  height: 68px;
  padding: 0;
  justify-content: center;
  border-color: #e5eafa;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: radial-gradient(circle at 28% 20%, #9fc8ff, #6b7bec 58%, #7665d5);
  box-shadow: 0 6px 15px #7384e745;
}

.brand > div:nth-child(2),
.nav-label,
.history-group,
.nav-count {
  display: none;
}

.sidebar-main {
  padding: 18px 12px;
}

.new-chat {
  width: 46px;
  height: 46px;
  gap: 0;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: #fff;
  box-shadow: 0 2px 8px #30344406;
  color: var(--theme-blue);
  font-size: 0;
}

.new-chat:hover {
  background: #f3f1fc;
}

.new-chat svg {
  width: 19px;
  height: 19px;
}

.nav-group {
  margin-top: 20px;
}

.nav-item {
  position: relative;
  width: 46px;
  height: 45px;
  gap: 0;
  justify-content: center;
  padding: 0;
  margin-bottom: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #5e6472;
  font-size: 0;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  color: var(--theme-blue);
  background: #f3f1fc;
}

.nav-item.active {
  color: var(--theme-blue);
  background: #f3f1fc;
  border-color: transparent;
  box-shadow: none;
}

.history-item {
  color: #5e6472;
  font-size: 14px;
  font-weight: 600;
}

.history-item:hover {
  color: var(--theme-blue);
  background: transparent;
}

.history-item.active {
  color: var(--theme-blue);
  background: #f3f1fc;
}

.history-item {
  text-overflow: clip;
}

.history-item-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-bottom {
  padding: 10px 12px 17px;
}

.account {
  width: 46px;
  height: 46px;
  justify-content: center;
  padding: 0;
}

.account:hover {
  background: #e8edff;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #dce5ff;
  color: #596dd4;
}

.sidebar.expanded {
  width: 232px;
}

.sidebar.expanded .brand {
  justify-content: flex-start;
  padding: 0 17px;
}

.sidebar.expanded .brand > div:nth-child(2),
.sidebar.expanded .nav-label,
.sidebar.expanded .history-group,
.sidebar.expanded .nav-count {
  display: block;
}

.sidebar.expanded .sidebar-main {
  overflow-y: auto;
}

.sidebar.expanded .new-chat {
  width: 100%;
  height: 38px;
  gap: 9px;
  font-size: 12px;
}

.sidebar.expanded .nav-item {
  width: 100%;
  gap: 9px;
  justify-content: flex-start;
  padding: 0 10px;
  font-size: 12px;
}

.sidebar.expanded .nav-count {
  margin-left: auto;
}

.sidebar .nav-label {
  color: #71809d;
  font-size: 14px;
}

.sidebar .nav-count {
  color: #596784;
}

.sidebar.expanded .history-group {
  margin-top: 28px;
}

.sidebar.expanded .history-label {
  display: flex;
}

.sidebar.expanded .account {
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
  flex: none;
}

.sidebar.expanded .sidebar-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 17px;
}

.mobile-menu {
  display: flex;
  color: #6979a2;
  padding: 5px;
  border-radius: 6px;
}

.mobile-menu:hover {
  color: var(--theme-blue);
  background: #e9edff;
}

.workspace {
  background: var(--theme-background);
  background-image: var(--theme-wash);
  background-size: 100% min(600px, 78vh);
  background-repeat: no-repeat;
}

.topbar {
  height: 60px;
  background: #fbfbfd;
  border-color: var(--theme-border);
  padding: 0 27px;
  backdrop-filter: blur(15px);
}

.topbar-left strong,
.page-view-heading h1,
.section-title h2 {
  color: var(--theme-ink);
}

.version {
  color: #5869d5;
  background: #e8ecff;
}

.status span {
  background: #66bdac;
}

.main-content {
  background: transparent;
}

.conversation-scroll,
.page-view {
  background: transparent;
}

.conversation-inner {
  max-width: 1030px;
  padding-top: 28px;
}

.page-heading {
  height: 150px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  color: #7f8ed0;
}

.page-heading .eyebrow {
  justify-content: center;
}

.eyebrow-line {
  background: var(--theme-violet);
}

.page-heading h1 {
  color: #3b4bb7;
  font-size: 26px;
  margin: 14px 0 7px;
}

.page-heading h1 span {
  color: #8b78ee;
}

.page-heading p {
  color: #7e8dae;
}

.heading-decoration {
  right: 8px;
  opacity: .33;
}

.prompt-card,
.answer-card,
.session-row,
.tool-card,
.source-table-wrap,
.profile-card,
.settings-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  box-shadow: 0 3px 12px #30344405;
  backdrop-filter: blur(10px);
}

.prompt-card,
.answer-card,
.result-panel,
.session-row,
.tool-card,
.source-table-wrap,
.profile-card,
.settings-card {
  border-radius: 8px;
}

.filter-button.active {
  color: var(--theme-blue);
  background: #f3f1fc;
  border-color: #e2ddf6;
}

.prompt-card {
  height: 78px;
}

.prompt-card:hover,
.session-row:hover {
  border-color: #aebcf5;
  box-shadow: 0 7px 18px #7b8cd329;
}

.prompt-icon.violet,
.tool-card-icon {
  color: #7069e8;
  background: #ebeaff;
}

.prompt-icon.blue {
  color: #5475e7;
  background: #e7eeff;
}

.prompt-icon.mint {
  color: #48a7b7;
  background: #e6f4f9;
}

.question-bubble {
  color: #4354ae;
  background: #e3e8ff;
}

.assistant-avatar,
.session-symbol {
  color: #6575e6;
  background: #e7ebff;
}

.assistant-avatar svg {
  display: none;
}

.assistant-avatar {
  background: transparent var(--agent-avatar-image, url("./assets/agent-orbit-animated.svg?v=5")) center / contain no-repeat;
}

.metric-card {
  background: #f8faff;
  border-color: #edf0fc;
  border-radius: 6px;
}

.result-panel {
  border-color: #e4e9fa;
}

.result-tab.active {
  color: var(--theme-blue);
  border-color: var(--theme-blue);
}

.bar-fill,
.bar-row:nth-child(2) .bar-fill,
.bar-row:nth-child(3) .bar-fill {
  background: linear-gradient(90deg, #8aa3ff, #675fe2);
}

.bar-row:nth-child(2) .bar-fill {
  opacity: .72;
}

.bar-row:nth-child(3) .bar-fill {
  opacity: .5;
}

.composer-wrap {
  position: relative;
  background: linear-gradient(180deg, #f7f8fb00, var(--theme-background) 25%);
  max-width: 980px;
}

.scroll-to-bottom {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dce3f6;
  border-radius: 50%;
  background: #fff;
  color: #5267d9;
  box-shadow: 0 4px 16px #34446b29;
  z-index: 1;
}

.scroll-to-bottom[hidden] {
  display: none;
}

.scroll-to-bottom:hover {
  background: #f3f5ff;
}

.scroll-to-bottom.is-loading::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid transparent;
  border-top-color: #6679e9;
  border-radius: 50%;
  animation: session-spin .8s linear infinite;
}

.composer {
  border-color: #dedfe8;
  border-radius: 9px;
  box-shadow: 0 4px 16px #30344408;
}

.composer:focus-within {
  border-color: #aa9bea;
  box-shadow: 0 0 0 3px #8b7de812, 0 4px 16px #30344408;
}

.send-button,
.page-primary,
.dialog-confirm {
  background: var(--theme-blue);
  border-radius: 7px;
}

.send-button:hover,
.page-primary:hover {
  background: #5d4dce;
}

.table-status.ready {
  color: #438f89;
  background: #e9f7f4;
}

.page-view-inner {
  max-width: 1240px;
}

.page-view-heading {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  align-items: center;
  padding: 28px 34px;
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: var(--theme-wash);
}

.page-view-heading::after {
  display: none;
  content: "";
  position: absolute;
  right: 7%;
  top: 16%;
  width: 100px;
  height: 100px;
  border: 1px solid #ffffffaf;
  border-radius: 50%;
  box-shadow: 0 0 0 24px #ffffff36, 0 0 0 51px #ffffff1e;
  pointer-events: none;
}

.page-view-heading > * {
  position: relative;
  z-index: 1;
}

.page-view-heading h1 {
  color: var(--theme-ink);
  font-size: 25px;
}

.page-view-heading p {
  color: var(--theme-muted);
}

.page-outline {
  color: #5d70c9;
  background: #ffffff9c;
  border-color: #d6dfff;
}

.search-field {
  border-color: #dce3f9;
  border-radius: 6px;
  background: #ffffffd9;
}

.tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card {
  min-height: 178px;
}

.tool-card:hover {
  border-color: #b6c3f5;
}

.source-table th {
  background: #f7f8fc;
}

.source-table td {
  border-color: #e8edfa;
}

.feedback-table td:first-child { width: 55%; }
.feedback-table td button:disabled { color: #a0adbf; cursor: default; }

.profile-avatar {
  color: #5d70d5;
  background: #e5eaff;
}

.info-dialog {
  border-color: #dce3fb;
  background: #fbfcff;
}

.conversation:not(.has-conversation) .result-title,
.conversation:not(.has-conversation) .composer-wrap,
.conversation.has-conversation .page-heading,
.conversation.has-conversation .welcome-composer,
.conversation.has-conversation .prompt-title,
.conversation.has-conversation .prompt-grid {
  display: none;
}

.conversation:not(.has-conversation) .page-heading {
  height: 185px;
}

.conversation:not(.has-conversation) .conversation-inner {
  padding-top: 40px;
}

.conversation.has-conversation .conversation-inner {
  max-width: 980px;
  padding-top: 24px;
}

.welcome-composer {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 13px 15px 11px;
  background: #fff;
  border: 1px solid #becaf9;
  border-radius: 9px;
  box-shadow: 0 8px 24px #7789d026;
}

.welcome-composer:focus-within {
  border-color: #aa9bea;
  box-shadow: 0 0 0 3px #8b7de812, 0 4px 16px #30344408;
}

.welcome-composer textarea {
  display: block;
  width: 100%;
  min-height: 57px;
  max-height: 126px;
  resize: none;
  border: 0;
  outline: 0;
  color: #263653;
  background: none;
  font-size: 12px;
}

.welcome-composer textarea::placeholder {
  color: #a0adc1;
}

.welcome-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9aa8ba;
  font-size: 10px;
}

.conversation:not(.has-conversation) .prompt-title,
.conversation:not(.has-conversation) .prompt-grid {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.conversation.has-conversation .result-title {
  margin-top: 15px;
}

.answer-process {
  margin: 12px 0 15px;
  border: 1px solid #e6eafb;
  border-radius: 7px;
  background: #f8faff;
  color: #687897;
  font-size: 11px;
}

.answer-process summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: #415276;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.answer-process summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
}

.answer-process[open] summary::after {
  transform: rotate(225deg);
}

.answer-process summary::-webkit-details-marker {
  display: none;
}

.answer-process summary span {
  color: #8290ad;
  font-weight: 400;
}

.answer-process ol {
  margin: 0;
  padding: 0 20px 13px 31px;
  line-height: 1.8;
}

.follow-up-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.follow-up-suggestions > span {
  color: #99a5bc;
  font-size: 10px;
}

.follow-up-suggestions button {
  border: 1px solid #dfe5fa;
  border-radius: 5px;
  background: #f8faff;
  color: #6071c9;
  padding: 6px 9px;
  font-size: 10px;
}

.follow-up-suggestions button:hover {
  background: #edf0ff;
}

.dialog-icon {
  color: var(--theme-violet);
  background: #ebeaff;
}

.dialog-icon svg {
  fill: var(--theme-violet);
}

@media (max-width: 1250px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 521px) and (max-width: 1000px) {
  .sidebar.expanded + .workspace .prompt-grid {
    display: flex;
  }
}

@media (max-width: 520px) {
  .sidebar {
    width: 232px;
    box-shadow: 12px 0 35px #4f5f9e35;
  }

  .sidebar.expanded {
    width: 232px;
  }

  .brand {
    justify-content: flex-start;
    padding: 0 20px;
  }

  .brand > div:nth-child(2),
  .nav-label,
  .history-group,
  .nav-count {
    display: block;
  }

  .nav-label {
    color: #a1abc1;
  }

  .sidebar-main {
    padding: 18px 12px;
  }

  .new-chat {
    width: 100%;
    gap: 9px;
    font-size: 12px;
  }

  .nav-item {
    width: 100%;
    gap: 12px;
    justify-content: flex-start;
    padding: 0 14px;
    font-size: 14px;
  }

  .nav-count {
    margin-left: auto;
  }

  .history-group {
    margin-top: 28px;
  }

  .history-label {
    display: flex;
  }

  .account {
    width: 100%;
    justify-content: flex-start;
    padding: 10px;
    height: auto;
  }

  .topbar {
    height: 58px;
  }

  .page-heading {
    min-height: 135px;
    height: auto;
  }

  .conversation:not(.has-conversation) .page-heading {
    height: auto;
    min-height: 150px;
  }

  .conversation:not(.has-conversation) .conversation-inner {
    padding-top: 25px;
  }

  .welcome-composer {
    padding: 12px;
  }

  .conversation.has-conversation .conversation-inner {
    padding-top: 16px;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .page-heading p {
    max-width: 330px;
    margin: auto;
  }

  .heading-decoration {
    display: none;
  }

  .page-view-heading {
    min-height: 150px;
    padding: 22px;
  }

  .page-view-heading h1 {
    font-size: 22px;
  }

  .page-view-heading::after {
    right: -30px;
    opacity: .5;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* 与 Figma 画板一致的工作台骨架和欢迎页 */
.sidebar {
  width: 76px;
  background: #fbfbfd;
}

.sidebar.expanded {
  width: 232px;
}

.brand {
  height: 56px;
  justify-content: flex-start;
  padding: 0 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  background: none;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand strong {
  color: var(--theme-ink);
  font-size: 13px;
}
.brand span { display: none; }
.sidebar.expanded .brand span {
  display: block;
  margin-top: 2px;
  color: #8795b5;
  font-size: 9px;
  letter-spacing: .8px;
  font-weight: 600;
}

.sidebar-toggle {
  width: 46px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #8593af;
  font-size: 0;
}

.sidebar-toggle:hover {
  color: #5266d9;
  background: #e5eaff;
}

.sidebar-toggle svg {
  width: 17px;
  height: 17px;
}

.sidebar-toggle span {
  display: none;
}

.sidebar.expanded .brand {
  padding: 0 16px;
}

.sidebar.expanded .sidebar-toggle {
  width: 42px;
  justify-content: center;
  align-items: flex-end;
  padding: 0;
  padding-bottom: 6px;
  font-size: 0;
}

.sidebar.expanded .sidebar-toggle span {
  display: none;
}

.sidebar.expanded .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar.expanded .brand-mark {
  width: 36px;
  height: 36px;
  margin-right: 4px;
}

.sidebar.expanded .sidebar-main {
  padding: 15px 12px;
}

.sidebar.expanded .nav-group {
  margin-top: 16px;
}

.sidebar.expanded .nav-item {
  height: 38px;
}

@media (min-width: 521px) {
  .sidebar:not(.expanded) [data-tooltip] {
    position: relative;
  }

  .sidebar:not(.expanded) [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 4;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 10px;
    border-radius: 6px;
    background: #263253;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
  }

  .sidebar:not(.expanded) [data-tooltip]:hover::after,
  .sidebar:not(.expanded) [data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
  }
}

.workspace {
  background-color: var(--theme-background);
  background-image: var(--theme-wash);
  background-position: center top;
  background-size: 100% min(600px, 78vh);
  background-repeat: no-repeat;
}

.page-view {
  background: transparent;
}

.conversation:not(.has-conversation) .conversation-inner {
  width: 100%;
  max-width: 836px;
  margin: 0 auto;
  padding: clamp(120px, 21vh, 168px) 28px 30px;
}

.conversation:not(.has-conversation) .page-heading {
  display: flex;
  width: min(780px, 100%);
  height: auto;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0 0 20px;
  text-align: left;
  overflow: visible;
}

.hero-bots {
  display: none;
  flex: none;
  align-items: center;
  width: 52px;
}

.hero-bots img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hero-copy h1 {
  margin: 0 0 12px;
  color: var(--theme-ink);
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.hero-copy h1 strong { color: #7a6ce2; font-weight: 650; }
.hero-copy h1 em { color: #7a6ce2; font-style: italic; font-weight: 650; }
.welcome-agent-name { font-synthesis: style; }

.hero-copy p {
  max-width: none;
  margin: 0;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.7;
}

.welcome-composer {
  width: min(780px, 100%);
  margin: 0;
  min-height: 108px;
  padding: 9px 13px 7px;
  border-color: transparent;
  border-width: 1px;
  border-radius: 10px;
  box-shadow: none;
}

.welcome-composer textarea {
  height: 36px;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.7;
}

.welcome-composer-actions,
.composer-bottom {
  gap: 8px;
}

.send-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.send-button:disabled {
  background: #d8dce6;
  box-shadow: none;
  cursor: not-allowed;
}

.conversation:not(.has-conversation) .prompt-grid {
  display: flex;
  flex-direction: column;
  width: min(780px, 100%);
  max-width: none;
  gap: 0;
  margin: 0;
}

.conversation:not(.has-conversation) .prompt-title {
  width: min(780px, 100%);
  margin: 26px 0 10px;
}
.prompt-title h2 { color: #858b98; font-size: 12px; font-weight: 400; }
.refresh-questions { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; background: none; color: #969ca8; font: inherit; font-size: 11px; }
.refresh-questions svg { width: 12px; height: 12px; }
.refresh-questions:hover:not(:disabled) { color: var(--theme-blue); }
.refresh-questions:disabled { opacity: .5; cursor: default; }
.ask-selection-hint { display: none; }
.ask-select-trigger { font-size: 12px; font-weight: 400; }
.ask-selection-row:has(.ask-selection-hint) .ask-select-trigger { flex-direction: row-reverse; color: #858b98; }
.ask-selection-bar { margin-bottom: 3px; }

.prompt-card {
  position: relative;
  display: flex;
  min-height: 34px;
  height: auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.prompt-card:hover {
  transform: none;
  background: #ffffff80;
  box-shadow: none;
}

.prompt-icon,
.prompt-icon.violet,
.prompt-icon.blue,
.prompt-icon.mint {
  width: 16px;
  height: 16px;
  color: #939aa7;
  background: none;
}

.prompt-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.prompt-copy {
  width: 100%;
}

.prompt-copy strong {
  font-size: 13px;
  font-weight: 400;
  color: #5f6675;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.prompt-copy small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
}

.prompt-arrow {
  display: none;
}

.conversation.has-conversation .conversation-inner,
.composer-wrap {
  max-width: 900px;
}

.page-view-heading {
  background-image: var(--theme-wash);
  background-position: center;
  background-size: cover;
}

@media (min-width: 521px) {
  .topbar {
    display: none;
  }
}

@media (min-width: 521px) and (max-width: 1000px) {
  .sidebar.expanded + .workspace .prompt-grid,
  .conversation:not(.has-conversation) .prompt-grid {
    display: flex;
  }
}

@media (min-width: 521px) and (max-width: 900px) {
  .sidebar.expanded + .workspace .hero-copy h1 {
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .sidebar,
  .sidebar.expanded {
    width: 232px;
  }

  .sidebar:not(.open) {
    visibility: hidden;
  }

  .sidebar-toggle {
    display: none;
  }

  .conversation:not(.has-conversation) .conversation-inner {
    padding: 64px 20px 25px;
  }

  .conversation:not(.has-conversation) .page-heading {
    gap: 5px;
    margin-bottom: 14px;
  }

  .hero-bots {
    width: 63px;
  }

  .hero-bots img {
    width: 34px;
    height: 34px;
  }

  .hero-copy h1 {
    font-size: 20px;
  }

  .hero-copy p {
    font-size: 11px;
  }

  .welcome-composer {
    min-height: 108px;
  }

  .conversation:not(.has-conversation) .prompt-grid {
    display: flex;
  }

  .prompt-card {
    min-height: 36px;
    padding: 6px 5px;
  }
}

@media (min-width: 521px) and (max-width: 700px) {
  .sidebar.expanded {
    width: 200px;
  }

  .sidebar:not(.expanded) {
    width: 61px;
  }

  .sidebar:not(.expanded) .sidebar-main,
  .sidebar:not(.expanded) .sidebar-bottom {
    padding-left: 7px;
    padding-right: 7px;
  }

  .sidebar:not(.expanded) .brand {
    padding: 0 7px;
  }

  .sidebar:not(.expanded) .brand-mark img {
    width: 29px;
    height: 29px;
  }

  .conversation:not(.has-conversation) .conversation-inner {
    padding: 97px 13px 20px;
  }

  .conversation:not(.has-conversation) .page-heading {
    margin-bottom: 20px;
  }

  .hero-copy p {
    max-width: 350px;
  }

  .welcome-composer {
    min-height: 108px;
  }

  .welcome-composer textarea {
    min-height: 36px;
  }

  .conversation:not(.has-conversation) .prompt-grid,
  .sidebar.expanded + .workspace .prompt-grid {
    display: flex;
  }

  .prompt-card {
    min-height: 34px;
  }

  #toolsPage .tool-hero p {
    max-width: 270px;
  }
}

.history-row {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 8px;
}

.history-row:hover,
.history-row.menu-open {
  background: #e8edff;
}

.history-recent-label {
  margin-top: 18px;
}

.history-label {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.history-label:hover,
.history-label:focus-visible {
  color: var(--theme-blue);
}

.history-label svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}

.history-label[aria-expanded="false"] svg {
  transform: none;
}

.history-empty {
  padding: 4px 13px;
  color: #65718b;
  font-size: 11px;
}

.history-row.menu-open {
  z-index: 5;
}

.history-item {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 4px;
}

.history-item-label {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.history-item-text {
  display: inline-block;
}

.history-item.is-scrolling .history-item-label {
  text-overflow: clip;
}

.history-item.is-scrolling .history-item-text {
  animation: history-title-scroll var(--history-scroll-duration) linear forwards;
}

@keyframes history-title-scroll {
  0%, 12% { transform: translateX(0); }
  88%, 100% { transform: translateX(calc(-1 * var(--history-scroll-distance))); }
}

.history-pin {
  width: 13px;
  height: 13px;
  color: #7281c9;
}

.history-status {
  flex: none;
  margin-left: auto;
}

.history-unread {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6078ec;
}

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #cbd4fc;
  border-top-color: #6679e9;
  border-radius: 50%;
  animation: session-spin .8s linear infinite;
}

@keyframes session-spin {
  to { transform: rotate(360deg); }
}

.history-more {
  flex: none;
  width: 25px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #8996ae;
  opacity: 0;
  display: grid;
  place-items: center;
}

.history-more svg {
  width: 15px;
  height: 15px;
}

.history-row:hover .history-more,
.history-more:focus-visible,
.history-row.menu-open .history-more {
  opacity: 1;
}

.history-more:hover,
.history-row.menu-open .history-more {
  color: #5267d9;
  background: transparent;
}

.history-menu {
  position: absolute;
  top: calc(100% - 3px);
  right: 0;
  z-index: 6;
  width: 132px;
  padding: 5px;
  border: 1px solid #dfe5f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px #34446b30;
}

.history-row:nth-last-child(-n+2) .history-menu {
  top: auto;
  bottom: calc(100% - 3px);
}

.history-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #41516d;
  text-align: left;
  font-size: 12px;
}

.history-menu button:hover {
  background: #edf1ff;
}

.history-menu button.danger {
  color: #d4515e;
}

.history-rename {
  display: flex;
  gap: 4px;
  width: 100%;
  padding: 5px 0;
}

.history-rename input {
  min-width: 0;
  flex: 1;
  padding: 5px;
  border: 1px solid #8d9ced;
  border-radius: 5px;
  outline: none;
  font-size: 11px;
}

.history-rename button {
  border: 0;
  background: none;
  color: #5267d9;
  font-size: 11px;
}

.answer-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--theme-surface);
  color: #7685a1;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner,
  .scroll-to-bottom.is-loading::before,
  .history-item.is-scrolling .history-item-text { animation: none; }
}

@media (max-width: 520px) {
  .history-more { opacity: 1; }
}

/* 工具广场对齐画板中的横幅、分类栏与紧凑卡片 */
#toolsPage .page-view-inner {
  max-width: none;
  padding: 0 30px 16px;
}

#toolsPage .tool-hero {
  min-height: 220px;
  align-items: flex-start;
  margin: 0 -30px 16px;
  padding: 42px 6% 26px;
  border: 0;
  border-radius: 0;
  background-image: var(--theme-wash);
  background-position: center top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

#toolsPage .tool-hero::after {
  display: none;
}

#toolsPage .tool-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--theme-ink);
  font-size: 28px;
  line-height: 1.4;
}

.tool-hero-search {
  display: flex;
  width: min(610px, 100%);
  height: 42px;
  margin-top: 25px;
  border: 1px solid var(--theme-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--theme-surface);
  box-shadow: 0 3px 12px #30344405;
}

.tool-hero-search svg {
  width: 16px;
  height: 16px;
  align-self: center;
  margin-left: 12px;
  color: #8796b6;
}

.tool-hero-search input {
  flex: 1;
  min-width: 0;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: none;
  color: #334267;
  font: inherit;
  font-size: 12px;
}

.tool-hero-search input::placeholder {
  color: #9ca9c1;
}

#toolsPage .page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--theme-border);
  border-radius: 5px;
  background: var(--theme-surface);
}

#toolsPage .filter-group {
  gap: 7px;
}

#toolsPage .filter-button {
  padding: 8px 15px;
  border: 1px solid #e2e7f5;
  border-radius: 4px;
  background: #fff;
  color: #5e6c86;
}

#toolsPage .filter-button.active {
  border-color: var(--theme-blue);
  background: var(--theme-blue);
  color: #fff;
}

.page-toolbar-note {
  color: #9eabc0;
  font-size: 10px;
}

#toolsPage .tool-grid {
  gap: 12px;
}

#toolsPage .tool-card {
  display: grid;
  min-height: 158px;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 38px 1fr auto;
  column-gap: 8px;
  row-gap: 7px;
  padding: 14px;
  border-radius: 5px;
  box-shadow: none;
}

#toolsPage .tool-card-icon {
  grid-column: 1;
  grid-row: 1;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 7px;
  background: #586feb;
  color: #fff;
}

#toolsPage .tool-card:nth-child(2) .tool-card-icon,
#toolsPage .tool-card:nth-child(6) .tool-card-icon {
  background: #47ae86;
}

#toolsPage .tool-card:nth-child(3) .tool-card-icon,
#toolsPage .tool-card:nth-child(8) .tool-card-icon {
  background: #9850db;
}

#toolsPage .tool-card:nth-child(4) .tool-card-icon,
#toolsPage .tool-card:nth-child(7) .tool-card-icon {
  background: #ec9146;
}

#toolsPage .tool-card:nth-child(5) .tool-card-icon {
  background: #e6b643;
}

#toolsPage .tool-card h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: 12px;
}

#toolsPage .tool-card p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 2px 0;
  color: #7f8da8;
  font-size: 10px;
}

#toolsPage .tool-card-meta {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  margin: 0;
  white-space: nowrap;
}

#toolsPage .tool-card button {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  align-self: end;
  margin: 0;
  font-size: 10px;
}

@media (max-width: 1120px) {
  #toolsPage .tool-hero h1 {
    max-width: 570px;
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  #toolsPage .page-view-inner {
    padding: 0 17px 16px;
  }

  #toolsPage .tool-hero {
    min-height: 190px;
    margin: 0 -17px 16px;
    padding: 28px 22px;
  }

  #toolsPage .tool-hero h1 {
    max-width: 300px;
    font-size: 20px;
  }

  .tool-hero-search {
    margin-top: 18px;
  }

  #toolsPage .tool-hero {
    background-image: var(--theme-wash);
  }
}

/* 智能体配置页左侧编排、右侧预览 */
.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 18px;
}

.config-editor,
.config-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--theme-border);
  border-radius: 20px;
  background: var(--theme-surface);
  overflow: hidden;
}

.config-heading,
.config-preview-heading { flex: none; margin-bottom: 22px; }
.config-heading { margin-bottom: 12px; }
.config-save-actions { display: flex; flex: none; align-items: center; justify-content: center; margin-top: 8px; padding-top: 6px; border-top: 1px solid #d9e0f1; }
.config-save-actions .page-primary { min-width: 76px; height: 30px; justify-content: center; align-items: center; padding: 0 16px; line-height: 1; }
.config-heading h1,
.config-preview-heading h2 {
  position: relative;
  width: max-content;
  margin: 0;
  padding-bottom: 10px;
  color: #171d2e;
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 800;
  letter-spacing: .2em;
}
.config-heading h1::after,
.config-preview-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 88px;
  height: 7px;
  background: linear-gradient(90deg, #4d63ff, #7886ff52, transparent);
}
.config-editor-scroll,
.config-preview-card { min-height: 0; overflow: auto; }
.config-editor-scroll {
  flex: 1;
  padding-right: 2px;
}

.config-tabs {
  display: flex;
  flex: none;
  gap: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid #d9e0f1;
  overflow-x: auto;
}
.config-tabs button {
  flex: none;
  padding: 10px 2px 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #3f4759;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.config-tabs button.active {
  border-bottom-color: var(--theme-blue);
  color: var(--theme-blue);
}
.config-tab-panel {
  padding: 20px 0;
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: var(--theme-surface);
}
.config-tab-panel[hidden] { display: none; }
@media (min-width: 1051px) {
  #configBasicPanel, #configModelPanel { min-height: 100%; }
}
.config-section {
  margin-bottom: 14px;
  border: 1px solid var(--theme-border);
  border-radius: 9px;
  background: var(--theme-surface);
  box-shadow: 0 3px 12px #30344405;
  overflow: hidden;
}
.config-section summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: #333b4c;
  font-size: 17px;
  font-weight: 750;
}
.config-section summary::-webkit-details-marker { display: none; }
.config-section summary small { display: block; margin-top: 4px; color: #91a3b5; font-size: 11px; font-weight: 400; }
.config-chevron { width: 17px; height: 17px; margin-left: auto; color: #778194; transform: rotate(90deg); }
.config-section[open] .config-chevron { transform: rotate(-90deg); }
.config-fields { display: grid; gap: 18px; padding: 0 24px 24px; }
.config-fields label { display: block; min-width: 0; color: #555f70; font-size: 12px; font-weight: 650; }
.config-fields input,
.config-fields textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid #d8deed;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: #39445a;
  font: inherit;
  font-weight: 400;
  line-height: 1.5;
}
.config-fields textarea { resize: vertical; }
.config-fields input:focus,
.config-fields textarea:focus { border-color: #6177f7; box-shadow: 0 0 0 2px #6177f721; }
.required { color: #ec616c; font-style: normal; }

.config-basic-fields { gap: 22px; padding-bottom: 0; }
.config-basic-fields > label,
.config-upload-row > span { color: #505b6b; font-size: 13px; font-weight: 700; }
.config-input-wrap { display: block; position: relative; }
.config-fields .config-input-wrap input,
.config-fields .config-input-wrap textarea { padding-right: 65px; }
.config-input-wrap small {
  position: absolute;
  right: 13px;
  bottom: 12px;
  color: #939baa;
  font-size: 11px;
  font-weight: 400;
}
.config-upload-row > span { display: block; margin-bottom: 10px; }
.config-upload-content { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.config-upload-content small { padding-bottom: 4px; color: #a1a6af; font-size: 11px; }
.config-fields .config-upload-box {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  border: 1px dashed #dce1ed;
  border-radius: 6px;
  color: #8a92a1;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}
.config-upload-box input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.config-logo-upload img { width: 96px; height: 96px; object-fit: contain; }
.config-logo-upload > span { position: absolute; inset: auto 0 0; padding: 5px; background: #e7e9eead; color: #636b79; font-size: 11px; text-align: center; }
.config-upload-plus { color: #a2a8b2; font-size: 40px; font-weight: 300; }
.config-fields .config-background-upload {
  background-image: var(--theme-wash);
  background-size: cover;
  background-position: center;
}
.config-background-upload.has-image .config-upload-plus { opacity: 0; }

.config-prompt-fields { gap: 12px; padding-bottom: 0; }
.config-prompt-fields > label { font-size: 14px; }
.config-prompt-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.config-prompt-heading > label { color: #505b6b; font-size: 14px; font-weight: 700; }
.prompt-ai-actions { display: flex; gap: 8px; }
.prompt-ai-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; padding: 0 8px; border: 1px solid #ddd8fb; border-radius: 6px; background: #f4f1ff; color: #6e5bd1; font: inherit; font-size: 11px; cursor: pointer; }
.prompt-ai-actions button:hover { border-color: #b7a9fa; background: #ede7ff; }
.prompt-ai-actions svg { width: 13px; height: 13px; }
.prompt-ai-actions button:focus-visible { outline: 2px solid #a595ed; outline-offset: 2px; }
.prompt-action-status { margin: 0; color: #6175cb; font-size: 12px; line-height: 1.6; }
.prompt-action-status.error { color: #c8495a; }
.prompt-assistant-dialog { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #dce3f4; border-radius: 14px; background: #fff; color: #354560; box-shadow: 0 24px 80px #26365640; }
.prompt-assistant-dialog::backdrop { background: #16213a66; }
.prompt-assistant-dialog [hidden] { display: none !important; }
.prompt-assistant-form { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.prompt-assistant-header { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid #e5e9f3; }
.prompt-assistant-header h2 { margin: 0; font-size: 17px; }
.prompt-assistant-header p { margin: 7px 0 0; color: #8a98af; font-size: 12px; line-height: 1.6; }
.prompt-assistant-header > button { display: grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: #f4f6fb; color: #8090ac; cursor: pointer; }
.prompt-assistant-header > button svg { width: 16px; height: 16px; }
.prompt-assistant-body { min-height: 0; padding: 20px; overflow: auto; }
.prompt-model-target { margin: 0 0 8px; color: #626bc0; font-size: 12px; overflow-wrap: anywhere; }
.prompt-assistant-notice { margin: 0 0 18px; padding: 10px 12px; border-radius: 6px; background: #f5f6fc; color: #8793aa; font-size: 11px; line-height: 1.7; }
.prompt-assistant-body label { display: block; color: #53617b; font-size: 13px; font-weight: 600; }
.prompt-assistant-body textarea { display: block; box-sizing: border-box; width: 100%; min-height: 100px; margin-top: 8px; padding: 12px; border: 1px solid #dce3f0; border-radius: 7px; background: #fff; color: #354560; font: inherit; font-size: 13px; line-height: 1.7; resize: vertical; }
.prompt-assistant-body textarea:focus { outline: 2px solid #637afa66; outline-offset: 1px; }
.prompt-assistant-body textarea[readonly] { background: #f7f9fd; color: #7a88a1; }
.prompt-original-section { margin-bottom: 18px; }
.prompt-assistant-status { margin: 14px 0 0; color: #6175cb; font-size: 12px; line-height: 1.6; }
.prompt-assistant-status.error { color: #c8495a; }
.prompt-draft-section { margin-top: 18px; }
.prompt-draft-section textarea { min-height: 200px; }
.prompt-assistant-footer { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid #e5e9f3; background: #fafbff; }
.prompt-assistant-footer > button { padding: 0; border: 0; background: transparent; color: #7161d8; font: inherit; font-size: 12px; cursor: pointer; }
.prompt-assistant-footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-assistant-footer > div > button { height: 32px; padding: 0 12px; border: 1px solid #dce3f0; border-radius: 6px; background: #fff; color: #677895; font: inherit; font-size: 12px; cursor: pointer; }
.prompt-assistant-footer > div > .page-primary { border-color: #6a65e8; background: #6a65e8; color: #fff; }
.prompt-assistant-footer button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 520px) {
  .prompt-ai-actions { width: 100%; }
  .prompt-ai-actions button { flex: 1; }
  .prompt-assistant-header, .prompt-assistant-body { padding: 16px; }
  .prompt-assistant-body textarea { font-size: 16px; }
  .prompt-assistant-footer { align-items: stretch; flex-direction: column; padding: 16px; }
  .prompt-assistant-footer > button { text-align: left; }
  .prompt-assistant-footer > div > button { flex: 1; }
}
.config-help { margin: 0; color: #8b9fac; font-size: 12px; line-height: 1.6; }
#configModelPanel { padding: 22px; background: #f8faffd9; }
#configModelPanel [hidden] { display: none !important; }
.model-config-card { min-width: 0; padding: 22px; border: 1px solid #e1e7f4; border-radius: 10px; background: #fff; }
.model-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.model-config-card h3 { margin: 0; color: #2e3d58; font-size: 15px; font-weight: 700; }
.model-section-heading h3 > span { margin-left: 7px; color: #8d99af; font-size: 12px; font-weight: 400; }
.model-help { margin: 7px 0 0; color: #7c8aa1; font-size: 12px; line-height: 1.6; }
.model-section-heading > .page-primary { flex: none; height: 32px; padding: 0 14px; font-size: 12px; }
.model-section-heading > button:disabled { opacity: .45; cursor: not-allowed; }
.model-connection-status { display: flex; align-items: center; gap: 6px; color: #8a97ac; font-size: 12px; }
.model-connection-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.model-connection-status.connected { color: #289475; }
.model-connection-status.error, .model-message.error { color: #c8495a; }
.model-connection-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.model-connection-fields label { display: block; margin-bottom: 8px; color: #586780; font-size: 13px; font-weight: 600; }
.model-connection-fields input, .model-search input {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #dce3f0; border-radius: 6px;
  background: #fff; color: #3b4961; font: inherit; font-size: 13px;
}
.model-connection-fields input::placeholder, .model-search input::placeholder { color: #a0aabd; }
.model-connection-fields input:focus, .model-search:focus-within { outline: 2px solid #637afa66; outline-offset: 1px; }
.model-connection-input { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model-connection-input > input, .model-connection-input > .model-secret-input { flex: 1; min-width: 0; }
.model-connection-input > .page-primary { flex: none; min-width: 60px; height: 32px; justify-content: center; align-items: center; padding: 0 10px; border-radius: 6px; font-size: 12px; line-height: 1; }
.model-connection-input > button:disabled { opacity: .45; cursor: not-allowed; }
.model-address-input, .model-key-input { gap: 0; border-radius: 6px; }
.model-address-input > input, .model-key-input .model-secret-input > input { height: 32px; border-right: 0; border-radius: 6px 0 0 6px; }
.model-address-input > .page-primary, .model-key-input > .page-primary { border-radius: 0 6px 6px 0; }
.model-address-input:focus-within, .model-key-input:focus-within { outline: 2px solid #637afa66; outline-offset: 1px; }
.model-address-input > input:focus, .model-key-input .model-secret-input > input:focus { outline: none; }
.model-secret-input { position: relative; }
.model-secret-input > input { display: block; padding-right: 42px; }
.model-secret-input > button { position: absolute; top: 0; right: 5px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #7c8ca9; }
.model-secret-input > button:hover { background: #f1f5ff; color: var(--theme-blue); }
.model-connection-actions { margin-top: 20px; }
.model-message { margin: 0; color: #7c8aa1; font-size: 12px; line-height: 1.7; }
.model-selection-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.model-search { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; padding: 0 12px; border: 1px solid #dce3f0; border-radius: 6px; }
.model-search svg { flex: none; width: 16px; height: 16px; color: #98a5bd; }
.model-search input { height: 38px; padding: 0; border: 0; background: transparent; outline: none; }
.model-list { display: grid; gap: 10px; }
.model-option-card { min-width: 0; border: 1px solid #e2e8f5; border-radius: 8px; overflow: hidden; }
.model-option-card:hover { border-color: #bccbfa; background: #fafbff; }
.model-option-card.selected { border-color: #849aff; background: #f3f6ff; box-shadow: 0 0 0 1px #849aff33; }
.model-option { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 15px; cursor: pointer; }
.model-option.selected { background: #edefff; }
.model-option.selected .model-option-text strong { color: #5263ce; }
.model-option > input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--theme-blue); }
.model-option-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 1px solid #e1e7ff; border-radius: 9px; color: #637bf6; background: #eff3ff; }
.model-option-icon svg { width: 22px; height: 22px; }
.model-option-text { display: grid; flex: 1; min-width: 0; gap: 4px; overflow-wrap: anywhere; }
.model-option-text strong { color: #354560; font-size: 14px; font-weight: 650; }
.model-option-text small { color: #8a98af; font-size: 12px; }
.model-parameters { padding: 16px; border-top: 1px solid #dce2fc; background: #fbfcff; }
.model-parameters-heading { display: flex; align-items: flex-start; gap: 10px; list-style: none; cursor: pointer; }
.model-parameters-heading::-webkit-details-marker { display: none; }
.model-parameters-heading > div { flex: 1; min-width: 0; }
.model-parameters-chevron { flex: none; width: 14px; height: 14px; margin-top: 3px; color: #8a98af; }
.model-parameters[open] .model-parameters-chevron { transform: rotate(90deg); }
.model-parameters-heading h4 { margin: 0; color: #354560; font-size: 13px; }
.model-parameters-heading p { margin: 5px 0 0; color: #8a98af; font-size: 11px; line-height: 1.5; }
.model-parameters-status { flex: none; padding: 4px 6px; border-radius: 4px; background: #eeebff; color: #7161d8; font-size: 10px; }
.model-parameters-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }
.model-parameters-toolbar strong { color: #53617b; font-size: 12px; }
.model-parameters-toolbar button { padding: 0; border: 0; background: transparent; color: #7161d8; font: inherit; font-size: 11px; cursor: pointer; }
.model-parameters-heading:focus-visible { outline: 2px solid #637afa66; outline-offset: 4px; border-radius: 4px; }
.model-parameter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 12px; min-width: 0; margin-top: 10px; padding: 12px; border: 1px solid #e4e8f5; border-radius: 7px; background: #fff; }
.model-parameter-copy { display: grid; gap: 4px; }
.model-parameter-copy strong { color: #354560; font-size: 12px; }
.model-parameter-copy small { color: #8a98af; font-size: 11px; line-height: 1.5; }
.model-parameter-controls { display: flex; align-items: center; gap: 12px; min-width: 0; }
.model-parameter-controls input[type="range"] { flex: 1; width: 0; min-width: 0; height: 20px; margin: 0; accent-color: #7161d8; cursor: pointer; }
.model-parameter-number { flex: none; box-sizing: border-box; width: 68px; height: 32px; padding: 0 6px; border: 1px solid #dce3f0; border-radius: 6px; background: #fff; color: #3b4961; font: inherit; font-size: 12px; text-align: center; }
.model-parameter-number:focus { outline: 2px solid #637afa66; outline-offset: 1px; }
.model-parameter-number[aria-invalid="true"] { border-color: #c8495a; }
.model-parameter-error { margin: 12px 0 0; color: #c8495a; font-size: 12px; line-height: 1.5; }
.model-parameters-note { margin: 12px 0 0; color: #8a98af; font-size: 10px; line-height: 1.6; }
.model-list-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 200px; padding: 26px 12px; border: 1px dashed #dfe6f4; border-radius: 8px; color: #94a0b6; text-align: center; }
.model-list-empty svg { width: 28px; height: 28px; margin-bottom: 4px; color: #9aace4; }
.model-list-empty strong { color: #657591; font-size: 14px; font-weight: 500; }
.model-list-empty p { margin: 0; font-size: 12px; line-height: 1.6; }
.model-save-message { min-width: 0; margin: 16px 0 0; color: #7c89a2; font-size: 12px; overflow-wrap: anywhere; }
.model-save-message.saved { color: #289475; }
@media (max-width: 520px) {
  #configModelPanel { padding: 14px; }
  .model-config-card { padding: 16px; }
  .model-option { gap: 8px; padding: 12px 10px; }
  .model-option-icon { width: 30px; height: 30px; }
  .model-parameters { padding: 12px; }
  .model-parameter { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .model-parameter-controls { gap: 8px; }
  .model-parameter-number { width: 60px; font-size: 16px; }
  .model-section-heading { flex-wrap: wrap; }
  .model-connection-fields input, .model-search input { font-size: 16px; }
}
.config-prompt-fields > textarea { min-height: 260px; margin-top: 0; font-size: 14px; line-height: 1.6; }
.config-prompt-fields > textarea + label { margin-top: 18px; }

.config-tab-panel .config-section { margin: 0 0 18px; }
.config-greeting-section { border: 0; background: transparent; box-shadow: none; }
.config-greeting-section summary { font-size: 15px; }
.config-conversation-fields { padding-bottom: 0; }
.config-conversation-fields > label,
.config-conversation-fields .config-suggestions-heading strong,
.config-conversation-fields .config-upload-row > span { color: #505b6b; font-size: 13px; font-weight: 700; line-height: 1.5; }
.config-suggestions-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.config-suggestions-heading button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dce5ff;
  border-radius: 8px;
  background: #eef2ff;
  color: #5871e9;
  font-size: 20px;
}
.config-suggestions-heading button:hover:not(:disabled) { background: #e3eaff; border-color: #b6c4fb; }
.config-suggestions button:disabled { opacity: .45; cursor: default; }
.config-suggestion-list { display: grid; gap: 8px; }
.config-suggestion-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) repeat(3, 28px);
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px 7px;
  border: 1px solid #e1e7f5;
  border-radius: 9px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.config-suggestion-row:hover { border-color: #bdc9f6; box-shadow: 0 4px 12px #7185c714; }
.config-suggestion-row:focus-within { border-color: #8197f4; box-shadow: 0 0 0 2px #8094f21c; }
.config-suggestion-row.drag-over { outline: 2px dashed #6e82f0; outline-offset: 3px; }
.config-suggestion-grip { display: grid; place-items: center; color: #a5b2ca; cursor: grab; user-select: none; font-size: 16px; }
.config-suggestion-input { position: relative; min-width: 0; }
.config-fields .config-suggestion-input input {
  height: 34px;
  margin: 0;
  padding: 7px 54px 7px 6px;
  border: 0;
  background: transparent;
  color: #344561;
  font-size: 12px;
}
.config-fields .config-suggestion-input input:focus { border: 0; box-shadow: none; }
.config-suggestion-input small { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); color: #969eac; font-size: 11px; pointer-events: none; }
.config-suggestion-row button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8190aa;
  font-size: 17px;
}
.config-suggestion-row button:hover:not(:disabled) { background: #eef2ff; color: #4c68e8; }
.config-suggestion-row button[data-remove]:hover { background: #fff0f1; color: #df6873; }
.config-suggestions > small {
  display: block;
  width: max-content;
  margin: 10px 0 0 auto;
  padding: 3px 8px;
  border-radius: 12px;
  background: #eef2ff;
  color: #7889ac;
  font-size: 11px;
}
.config-rich-editor { border: 1px solid #dfe3ec; background: #fff; }
.config-rich-editor:focus-within { border-color: #6177f7; }
.config-rich-toolbar.ql-toolbar.ql-snow { display: flex; flex-wrap: wrap; padding:6px 8px; border: 0; border-bottom: 1px solid #e3e6ec; background: #fff; }
.config-rich-toolbar .ql-formats { margin-right: 8px; }
.config-rich-toolbar .ql-picker.ql-header .ql-picker-label::before,
.config-rich-toolbar .ql-picker.ql-header .ql-picker-item::before { content: "正文"; }
.config-rich-toolbar .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.config-rich-toolbar .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "二级标题"; }
.config-rich-toolbar .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.config-rich-toolbar .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "三级标题"; }
.config-rich-toolbar .ql-undo,
.config-rich-toolbar .ql-redo { font-size: 18px; }
.config-rich-body.ql-container.ql-snow {
  border: 0;
  font-family: inherit;
}
.config-rich-body .ql-editor {
  min-height: 160px;
  padding: 14px 16px;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.hero-copy h1,
.config-rich-body .ql-editor h2:first-child {
  margin: 0 0 12px;
  color: var(--theme-ink);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
}
.config-rich-body .ql-editor h2:first-child strong { color: #7a6ce2; font-weight: 650; }
.hero-copy h1 em,
.config-rich-body .ql-editor h2:first-child em { color: #7a6ce2; font-style: italic; font-weight: 650; }
.config-rich-body .ql-editor strong,
.config-greeting-preview strong { font-weight: 800; }
.config-greeting-preview h2:first-child strong { font-weight: 900; }
.config-greeting-preview h2,
.config-greeting-preview h3 { margin: 8px 0; }
.hero-copy p,
.config-rich-body .ql-editor p { margin: 0; color: var(--theme-muted); font-size: 12px; line-height: 1.7; }
.config-greeting-preview p { margin: 0 0 8px; }
.config-rich-body p:last-child,
.config-greeting-preview p:last-child { margin-bottom: 0; }
.config-rich-body .ql-editor p:last-child { margin-bottom: 0; }
.config-rich-body .ql-editor h2:first-child strong em { font-weight: 650; }
@media (max-width: 520px) {
  .hero-copy h1,
  .config-rich-body .ql-editor h2:first-child { font-size: 20px; }
  .hero-copy p,
  .config-rich-body .ql-editor p { font-size: 11px; }
}
.config-rich-body ul,
.config-rich-body ol,
.config-greeting-preview ul,
.config-greeting-preview ol { margin: 8px 0; padding-left: 22px; }
.config-preview { background: var(--theme-wash); }
.config-preview-card {
  display: flex;
  flex: 1;
  padding: 0;
}
.config-preview-frame { display: block; flex: 1; width: 100%; min-height: 0; border: 0; }

.config-preview [hidden] { display: none !important; }
.config-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.preview-mode-switch {
  display: flex;
  gap: 0;
  padding: 3px;
  border: 1px solid #cfd8f2;
  border-radius: 8px;
  background: #ffffff9c;
}
.preview-standalone-group {
  display: flex;
  border-radius: 5px;
  color: #7b89a6;
  overflow: hidden;
}
.preview-mode-switch button {
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: transparent;
  color: #7b89a6;
  font-size: 11px;
  white-space: nowrap;
}
.preview-standalone-group button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.preview-standalone-group:has(.active),
.preview-mode-switch > button.active {
  background: var(--theme-blue);
  color: #fff;
  box-shadow: 0 2px 7px #6958df18;
}
.preview-mode-switch .preview-browser-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; padding: 0; border-left: 1px solid #cfd8f2; }
.preview-standalone-group:has(.active) .preview-browser-button { border-left-color: #ffffff40; }
.preview-mode-switch .preview-browser-button:hover { background: #6176e91a; }
.preview-standalone-group:has(.active) .preview-browser-button:hover { background: #ffffff24; }
.preview-mode-switch button:focus-visible { outline: 2px solid #94a6fb; outline-offset: -3px; }
.preview-browser-button svg { width: 14px; height: 14px; }
.widget-preview-stage {
  position: relative;
  flex: 1;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-background);
}
.widget-preview-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px;
  color: #435478;
}
.widget-page-kicker {
  color: #8697b9;
  font-size: 10px;
  letter-spacing: .16em;
}
.widget-preview-page strong { font-size: 17px; }
.widget-page-line {
  width: 70%;
  height: 8px;
  border-radius: 9px;
  background: #d8e1f4;
}
.widget-page-line.short { width: 48%; }
.widget-page-blocks { display: flex; gap: 12px; margin-top: 10px; }
.widget-page-blocks span {
  width: 36%;
  height: 100px;
  border: 1px solid #e2e9f8;
  border-radius: 10px;
  background: #ffffffa8;
}
.widget-preview-panel {
  position: absolute;
  right: 18px;
  bottom: 78px;
  display: flex;
  flex-direction: column;
  width: min(348px, calc(100% - 36px));
  height: 408px;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 74px);
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  background: #fff;
  background-image: var(--theme-wash);
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 32px #30344418;
}
.widget-panel-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--theme-border);
  background: #fafaff;
  color: var(--theme-blue);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.widget-panel-header:active { cursor: grabbing; }
.widget-panel-actions { display: flex; gap: 5px; }
.widget-panel-header button,
.widget-history-toolbar button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6477b7;
  cursor: pointer;
}
.widget-panel-header button:hover,
.widget-panel-header button.active,
.widget-history-toolbar button:hover { background: #e1e5ff; color: #405ad1; }
.widget-panel-header button svg,
.widget-history-toolbar button svg { width: 17px; height: 17px; }
.widget-resize-edge { position: absolute; z-index: 1; touch-action: none; }
.widget-resize-edge[data-resize-edge="n"] { top: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.widget-resize-edge[data-resize-edge="s"] { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.widget-resize-edge[data-resize-edge="w"] { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.widget-resize-edge[data-resize-edge="e"] { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.widget-resize-edge[data-resize-edge="nw"],
.widget-resize-edge[data-resize-edge="ne"],
.widget-resize-edge[data-resize-edge="sw"],
.widget-resize-edge[data-resize-edge="se"] { width: 12px; height: 12px; }
.widget-resize-edge[data-resize-edge="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.widget-resize-edge[data-resize-edge="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.widget-resize-edge[data-resize-edge="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.widget-resize-edge[data-resize-edge="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
.widget-launcher {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
}
.widget-launcher img { width: 50px; height: 50px; object-fit: contain; }
.widget-history-overlay { position: absolute; inset: 0; z-index: 2; }
.widget-history-backdrop { position: absolute; inset: 0; border: 0; background: #4e5c884d; }
.widget-history-dialog {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(280px, 85%);
  container: widget-history / size;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #d9e0f4;
  background: #f7f8ff;
  box-shadow: 0 16px 40px #34447830;
  animation: widget-history-enter .18s ease-out;
}
@keyframes widget-history-enter {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .widget-history-dialog { animation: none; }
}
.widget-history-toolbar { display: flex; align-items: center; justify-content: flex-end; padding: 7px 10px; border-bottom: 1px solid var(--theme-border); background: #fafaff; }
.widget-history-content { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 18px 16px; }
.widget-history-identity { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: #3f5be0; font-size: 15px; }
.widget-history-identity img { width: 38px; height: 38px; object-fit: contain; }
.widget-history-new { width: 100%; padding: 10px; border: 1px solid #b6aaff; border-radius: 8px; background: #f2eeff; color: #6554d7; font-size: 13px; font-weight: 700; }
.widget-history-search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 10px; border: 1px solid #dfe5f4; border-radius: 8px; background: #fff; color: #9aa6bf; }
.widget-history-search svg { width: 16px; height: 16px; }
.widget-history-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: none; color: #435274; font: inherit; font-size: 12px; }
.widget-history-list { flex: 1; min-height: 0; overflow: auto; padding-top: 12px; }
.widget-history-list .history-label { display: flex; }
.widget-history-list .history-row { position: static; }
.widget-history-list .history-menu { right: 16px; }
.widget-history-empty { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #9aa6c4; font-size: 12px; }
.widget-history-empty svg { width: 30px; height: 30px; }
@container widget-history (max-height: 320px) {
  .widget-history-content { padding: 10px 12px; }
  .widget-history-identity { margin-bottom: 10px; }
  .widget-history-identity img { width: 28px; height: 28px; }
  .widget-history-new { padding: 7px; }
  .widget-history-search { margin-top: 8px; padding: 7px 8px; }
  .widget-history-list { padding-top: 8px; }
}
@media (max-width: 1050px) {
  .config-layout { height: auto; grid-template-columns: minmax(0, 1fr); }
  .config-editor, .config-preview { min-height: 650px; }
  .config-editor-scroll, .config-preview-card { overflow: visible; }
}
@media (max-width: 520px) {
  .config-layout { gap: 14px; padding: 14px; }
  .config-editor, .config-preview { min-height: 0; padding: 16px; }
  .config-preview-heading { flex-wrap: wrap; }
  .preview-mode-switch { width: 100%; }
  .preview-standalone-group { flex: 1; min-width: 0; }
  .preview-mode-switch button { flex: 1; }
  .config-fields { padding: 0 14px 18px; }
  .config-tabs { gap: 12px; }
  .config-tabs button { font-size: 12px; }
  .config-basic-fields, .config-prompt-fields { padding-bottom: 0; }
  .config-suggestion-row { grid-template-columns: 24px minmax(0, 1fr) repeat(3, 24px); gap: 2px; padding: 4px; }
  .config-suggestion-row button { width: 24px; }
  .config-upload-content small { width: 100%; }
  .config-preview-card { padding: 0; }
  .config-preview-frame { min-height: 480px; }
}

/* 对外接入沿用左侧编排、右侧预览的布局。 */
.integration-panel { padding: 8px 0 0; border: 0; background: none; }
.integration-heading { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.integration-heading h2 { margin: 0; color: #263653; font-size: 14px; font-weight: 650; }
.integration-heading > span { color: #8390aa; font-size: 12px; }
.integration-list, .integration-protocol { border: 1px solid #dce3f3; border-radius: 12px; background: #ffffffc9; overflow: hidden; }
.integration-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
.integration-row + .integration-row { border-top: 1px solid #e1e7f3; }
.integration-description { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px 16px; align-content: start; }
.integration-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d9e2ff; border-radius: 11px; background: #edf1ff; color: #5272ff; }
.integration-icon svg { width: 22px; height: 22px; }
.integration-description h3, .integration-protocol h3 { margin: 2px 0 8px; color: #2a3954; font-size: 14px; font-weight: 650; }
.integration-description p { margin: 0; color: #7b88a1; font-size: 13px; line-height: 1.8; }
.integration-code-card { min-width: 0; border: 1px solid #dce3f3; border-radius: 10px; background: #f7f9fdd9; overflow: hidden; }
.integration-code-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e0e6f2; background: #ffffffba; }
.integration-code-heading > strong { color: #536580; font-size: 12px; white-space: nowrap; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.integration-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid #d5deef; border-radius: 7px; background: #fff; color: #536581; font: inherit; font-size: 12px; cursor: pointer; }
.integration-actions button:hover { border-color: #94a6fb; background: #f3f5ff; color: #4d65df; }
.integration-actions button:disabled { opacity: .5; cursor: wait; }
.integration-actions svg { width: 14px; height: 14px; }
.integration-code-card pre { overflow: auto; margin: 0; padding: 20px 16px; color: #485b80; font-size: 12px; line-height: 1.8; }
.integration-code-card code, .integration-agent-card code { font-family: "SFMono-Regular", Consolas, monospace; }
.integration-code-tip { margin: 0; padding: 0 16px 16px; color: #8b98af; font-size: 11px; line-height: 1.6; }
.integration-protocol-heading { justify-content: space-between; margin-top: 28px; }
.integration-protocol { padding: 24px; }
.integration-protocol-top { display: flex; align-items: center; gap: 16px; }
.integration-protocol-details { margin: 22px 0 0 58px; padding-top: 22px; border-top: 1px solid #e5eaf5; }
.integration-protocol-details h3 { margin: 0 0 16px; font-size: 13px; }
.integration-agent-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #dce3f3; border-radius: 8px; background: #fff; }
.integration-agent-card code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: #596d8b; font-size: 12px; line-height: 1.7; }
.integration-agent-card button { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #7e8eab; }
.integration-agent-card button:hover { background: #eef2ff; color: #5272ff; }
.integration-streaming { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #455875; font-size: 13px; cursor: pointer; }
.integration-streaming input { width: 16px; height: 16px; margin: 0; accent-color: #5b73ee; }
.integration-feedback { margin: 12px 0 0; color: #5872ce; font-size: 12px; }
.integration-embedded:not(.integration-widget) .sidebar-main > .nav-group:not(.history-group) { display: none; }
.integration-embedded .topbar { display: none; }
.integration-embedded .main-content { height: 100dvh; }
/* 独立预览的收起侧栏使用紧凑加号按钮，避免沿用宽导航按钮的尺寸。 */
.integration-embedded .sidebar:not(.expanded) .new-chat {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-size: 0;
}

.integration-embedded .sidebar:not(.expanded) .new-chat svg {
  width: 16px;
  height: 16px;
}

.integration-widget .sidebar { display: none; }
.integration-widget .conversation .welcome-composer,
.integration-widget .composer-note { display: none; }
.integration-widget .conversation .composer-wrap {
  display: block;
  flex: none;
  width: 100%;
  padding: 0 12px 8px;
  background: none;
}
.integration-widget .composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 108px;
  padding: 14px 16px 10px;
  border-color: #d8e0f5;
  border-radius: 22px;
}
.integration-widget .composer textarea { display: block; flex: 1; min-height: 44px; padding: 0; line-height: 1.5; }
.integration-widget .send-button { background: #eef1ff; color: #7688e9; }
.integration-widget .send-button:disabled { background: #eef1ff; color: #a1acc0; }

/* 对话页沿用当前视觉 token，消息层级与智能体调试页对齐。 */
.conversation.has-conversation .conversation-inner {
  padding-top: 32px;
  padding-bottom: 28px;
}

.conversation.has-conversation .result-title {
  display: none;
}

.conversation-feed {
  display: grid;
  gap: 22px;
  padding-bottom: 0;
}

.question-row {
  justify-content: flex-end;
  align-items: flex-end;
  gap: 9px;
  margin: 0;
}

.question-avatar {
  order: 2;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.question-content {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: min(72%, 640px);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  margin: 0 0 7px;
  color: #536481;
}

.message-meta time,
.answer-header time {
  color: #9aa7bb;
  font-size: 10px;
  font-weight: 400;
}

.question-bubble {
  border-radius: 12px 3px 12px 12px;
  text-align: left;
}

.message-references {
  justify-content: flex-end;
}

.conversation-feed > .answer-card,
.conversation-feed > .answer-loading {
  width: 100%;
  margin: 0 auto;
}

.answer-card {
  padding: 18px 20px 16px;
}

.answer-header {
  gap: 8px;
}

.answer-demo {
  margin-left: auto;
}

.answer-loading {
  min-height: 64px;
}

@media (max-width: 520px) {
  .conversation.has-conversation .conversation-inner {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .conversation-feed {
    gap: 18px;
  }

  .question-row {
    gap: 7px;
  }

  .question-avatar {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 10px;
  }

  .question-content {
    max-width: calc(100% - 31px);
  }

  .answer-card {
    padding: 16px 14px;
  }

  .answer-header {
    flex-wrap: wrap;
  }

  .answer-demo {
    margin-left: 0;
  }
}

@media (max-width: 800px) {
  .integration-heading { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 520px) {
  .integration-row, .integration-protocol { padding: 16px; }
  .integration-description { column-gap: 12px; }
  .integration-protocol-top { gap: 12px; flex-wrap: wrap; }
  .integration-protocol-details { margin-left: 0; }
  .integration-embedded:not(.integration-widget) .sidebar {
    position: relative;
    inset: auto;
    transform: none;
    visibility: visible;
    width: min(180px, 40vw);
    height: 100dvh;
    min-height: 0;
  }
}

/* 隐藏页面级标题，保留描述、导航位置、栏目标题与操作按钮。 */
.page-view-heading h1,
.page-view-heading .eyebrow,
.page-view-heading p,
.page-view-heading > div,
.config-heading,
.breadcrumb,
#currentPageTitle,
.breadcrumb-chevron {
  display: none !important;
}

.page-view-heading:has(> div:only-child) {
  display: none !important;
}

.page-view-heading {
  min-height: 0;
  padding: 16px 22px;
  margin-bottom: 18px;
}

.page-view-heading p {
  margin: 0;
}

/* 会话记忆表格横向滚动时，保持会话名称与操作入口可见。 */
.session-memory-table th:first-child,
.session-memory-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f7f9fc;
}

.session-memory-table td:first-child {
  background: #fff;
}

.session-memory-table th:nth-child(2),
.session-memory-table td:nth-child(2) {
  position: sticky;
  left: 56px;
  z-index: 2;
  background: #f7f9fc;
  box-shadow: 5px 0 8px -7px #26395666;
}

.session-memory-table td:nth-child(2) {
  background: #fff;
}

.session-memory-table th:last-child,
.session-memory-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  background: #f7f9fc;
  box-shadow: -5px 0 8px -7px #26395666;
  text-align: center;
}

.session-memory-table td:last-child {
  background: #fff;
}

.session-memory-table thead th:first-child,
.session-memory-table thead th:nth-child(2),
.session-memory-table thead th:last-child {
  z-index: 3;
}

/* 首页按小 Q 参考图还原导航密度、开场区和快捷提问卡片。 */
.sidebar {
  width: 90px;
  background: #fff;
  border-right-color: #e8edf6;
}

.sidebar .brand {
  height: 75px;
}

.sidebar .brand-mark {
  width: 38px;
  height: 38px;
}

.sidebar .brand-mark {
  border-radius: 13px;
}

.sidebar .brand-mark img {
  width: 36px;
  height: 36px;
}

.sidebar .sidebar-main {
  padding: 20px 17px;
}

.sidebar .new-chat,
.sidebar .nav-item {
  width: 56px;
}

.sidebar .new-chat {
  height: 54px;
  border: 0;
  border-radius: 12px;
  background: #edf1ff;
  box-shadow: none;
  color: #536cf0;
}

.sidebar .new-chat:hover {
  background: #e4eaff;
  transform: none;
}

.sidebar .new-chat svg {
  width: 19px;
  height: 19px;
}

.sidebar .nav-group {
  margin-top: 20px;
}

.sidebar .nav-item {
  height: 55px;
  margin-bottom: 5px;
  border-radius: 11px;
  color: #354462;
}

.sidebar .nav-item svg {
  width: 18px;
  height: 18px;
}

.sidebar .nav-item.active,
.sidebar .nav-item:hover {
  background: #f1f4ff;
  color: #536cf0;
}

.sidebar .sidebar-bottom {
  padding: 10px 17px 20px;
}

.sidebar .account,
.sidebar .sidebar-toggle {
  width: 56px;
}

.sidebar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #e6ebff;
  color: #5b70d8;
}

.conversation:not(.has-conversation) .conversation-inner {
  width: min(925px, 54.2vw);
  max-width: 925px;
  margin: 0 auto;
  position: relative;
  left: -82px;
  padding: clamp(115px, 22vh, 230px) 0 30px;
}

.conversation:not(.has-conversation) {
  background-color: var(--theme-background);
  background-image:
    radial-gradient(ellipse 50% 56% at 12% 0%, #e8f3ff 0, transparent 100%),
    radial-gradient(ellipse 42% 48% at 89% 4%, #f0efff 0, transparent 100%),
    linear-gradient(180deg, #f1f6ff 0%, #f7f9fd 48%, #fff 100%);
  background-position: center top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.conversation:not(.has-conversation) .page-heading {
  width: 100%;
  height: auto;
  min-height: 0;
  position: relative;
  overflow: visible;
  justify-content: flex-start;
  margin: 0 0 12px;
  text-align: left;
}

.conversation:not(.has-conversation) .hero-bots {
  display: none !important;
}

.conversation:not(.has-conversation) .hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
}

.conversation:not(.has-conversation) .hero-copy h1,
.conversation:not(.has-conversation) .hero-copy h1 strong,
.conversation:not(.has-conversation) .hero-copy h1 em {
  font-weight: 700;
  font-style: normal;
}

.conversation:not(.has-conversation) .hero-copy h1 {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 7px;
  color: #263653;
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: -.6px;
}

.conversation:not(.has-conversation) .hero-copy h1 strong,
.conversation:not(.has-conversation) .hero-copy h1 em {
  color: inherit;
  background: none;
  -webkit-text-fill-color: inherit;
}

.hero-copy h1 {
  margin-bottom: 8px;
}

.hero-copy p {
  max-width: 700px;
  margin: 0;
  color: #8592a8;
  font-size: 16px;
  line-height: 1.6;
}

.welcome-composer {
  width: 100%;
  min-height: 154px;
  padding: 12px 15px 10px;
  border: 1px solid #dfe5ef;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 15px #3349670a;
}

.welcome-composer:focus-within {
  border-color: #8fa2ed;
  box-shadow: 0 0 0 2px #8495ed14, 0 6px 17px #536c9510;
}

.welcome-composer textarea {
  height: 68px;
  min-height: 68px;
  font-size: 18px;
}

.welcome-composer textarea::placeholder {
  color: #a0a4b1;
}

.welcome-composer-actions > span {
  color: #a0a4b1;
  font-size: 13px;
}

.conversation:not(.has-conversation) .welcome-composer {
  position: relative;
  left: 50%;
  width: min(1072px, 64.5vw);
  max-width: none;
  min-height: 154px;
  padding: 18px 20px 14px;
  transform: translateX(-50%);
  border: 1.5px solid #9ab3ff;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px #6f88b21a;
}

.conversation:not(.has-conversation) .welcome-composer textarea {
  height: 62px;
  min-height: 62px;
  padding: 8px 12px;
  font-size: 18px;
  line-height: 1.6;
}

.conversation:not(.has-conversation) .welcome-composer textarea::placeholder {
  color: #b4bac6;
  font-weight: 400;
  opacity: 1;
}

.conversation:not(.has-conversation) .chat-feature-toolbar {
  gap: 12px;
}

.conversation:not(.has-conversation) .chat-toolbar-divider {
  display: none;
}

.conversation:not(.has-conversation) .ask-selection-bar {
  margin: 0 0 2px;
  font-size: 11px;
}

.conversation:not(.has-conversation) .ask-selection-row {
  min-height: 18px;
  gap: 4px;
}

.conversation:not(.has-conversation) .ask-select-trigger {
  min-height: 18px;
  padding: 0 4px;
  font-size: 11px;
}

.conversation:not(.has-conversation) .chat-feature-toolbar button:not([data-chat-action="upload"]) {
  min-width: 102px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #e8ecf2;
  border-radius: 25px;
  background: #fff;
  color: #667080;
  font-size: 16px;
  box-shadow: none;
}

.conversation:not(.has-conversation) .chat-feature-toolbar [data-chat-action="upload"] {
  width: 56px;
  min-width: 56px;
  height: 50px;
  padding: 0;
  border-radius: 17px;
  box-shadow: none;
}

.conversation:not(.has-conversation) .chat-feature-toolbar svg {
  width: 22px;
  height: 22px;
}

.conversation:not(.has-conversation) .chat-feature-toolbar button:not([data-chat-action="upload"]):hover,
.conversation:not(.has-conversation) .chat-feature-toolbar button[aria-expanded="true"] {
  border-color: #dfe6f1;
  background: #f8faff;
  color: #536ba8;
}

.conversation:not(.has-conversation) .chat-feature-toolbar [data-chat-action="reference"]:hover,
.conversation:not(.has-conversation) .chat-feature-toolbar [data-chat-action="reference"][aria-expanded="true"] {
  border-color: #ded5fb;
  background: #f4f0ff;
  color: #7863d5;
}

.conversation:not(.has-conversation) .send-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.conversation:not(.has-conversation) .prompt-title {
  width: 100%;
  margin: 50px 0 32px;
}

.prompt-title h2 {
  color: #79869a;
  font-size: 16px;
  font-weight: 450;
}

.conversation:not(.has-conversation) .prompt-grid {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0;
}

.sidebar.expanded + .workspace .conversation:not(.has-conversation) .prompt-grid {
  display: flex;
}

.conversation:not(.has-conversation) .prompt-card {
  min-height: 54px;
  height: auto;
  align-items: center;
  padding: 5px 8px;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
}

.conversation:not(.has-conversation) .prompt-card:hover {
  background: #edf2ff;
}

.conversation:not(.has-conversation) .prompt-icon,
.conversation:not(.has-conversation) .prompt-icon.violet,
.conversation:not(.has-conversation) .prompt-icon.blue,
.conversation:not(.has-conversation) .prompt-icon.mint {
  width: 18px;
  height: 18px;
  margin-top: 0;
  border-radius: 0;
  color: #7488e4;
  background: transparent;
}

.conversation:not(.has-conversation) .prompt-icon.violet {
  color: #7184e8;
}

.conversation:not(.has-conversation) .prompt-icon.blue {
  color: #7184e8;
}

.conversation:not(.has-conversation) .prompt-icon.mint {
  color: #7184e8;
}

.conversation:not(.has-conversation) .prompt-icon.orange {
  color: #7184e8;
}

.conversation:not(.has-conversation) .prompt-icon svg {
  width: 16px;
  height: 16px;
}

.conversation:not(.has-conversation) .prompt-copy {
  flex: 1;
}

.conversation:not(.has-conversation) .prompt-copy strong {
  color: #45546d;
  font-size: 16px;
  font-weight: 450;
  white-space: normal;
}

.conversation:not(.has-conversation) .prompt-copy small {
  display: none;
}

.conversation:not(.has-conversation) .prompt-arrow {
  display: none;
}

@media (min-width: 521px) and (max-width: 1104px) {
  .conversation:not(.has-conversation) .conversation-inner {
    left: 0;
    width: min(700px, calc(100% - 32px));
  }
}

@media (max-width: 520px) {
  .conversation:not(.has-conversation) .conversation-inner {
    left: 0;
    width: calc(100% - 32px);
    padding: 48px 0 24px;
  }

  .conversation:not(.has-conversation) .hero-copy h1 {
    font-size: 28px;
    letter-spacing: -.5px;
  }

  .conversation:not(.has-conversation) .hero-copy p {
    font-size: 14px;
  }

  .conversation:not(.has-conversation) .page-heading {
    margin-bottom: 10px;
    text-align: left;
  }

  .conversation:not(.has-conversation) .prompt-card {
    min-height: 36px;
  }
}

/* 首页对齐小Q问数的全宽渐变工作台头部。 */
@media (min-width: 521px) {
  .workspace.is-home .topbar {
    display: none;
  }
}

/* 小Q首页侧栏把三种能力作为一级菜单展示。 */
.sidebar.expanded.q-home {
  width: 232px;
}

.sidebar.q-home .sidebar-main {
  padding: 15px 12px;
}

.sidebar.q-home .quick-q-nav {
  margin: 16px 0 17px;
}

.sidebar.q-home .quick-q-nav .nav-item {
  width: 100%;
  height: 40px;
  gap: 9px;
  justify-content: flex-start;
  padding: 0 10px;
  font-size: 16px;
}

.sidebar.q-home .quick-q-nav .nav-item svg {
  width: 18px;
  height: 18px;
}

.sidebar.q-home .quick-q-nav .nav-item.active,
.sidebar.q-home .quick-q-nav .nav-item:hover {
  border-color: #e3e8fb;
  background: #edf1ff;
  color: #576edc;
}

.sidebar.q-home .quick-q-nav + .nav-group {
  margin-top: 17px;
}

.conversation:not(.has-conversation) .prompt-title {
  margin-top: 50px;
}

.conversation:not(.has-conversation) .prompt-card {
  min-height: 54px;
}

@media (max-width: 520px) {
  .conversation:not(.has-conversation) .welcome-composer {
    left: 0;
    width: 100%;
    min-height: 128px;
    padding: 12px;
    transform: none;
  }

  .conversation:not(.has-conversation) .welcome-composer textarea {
    height: 52px;
    min-height: 52px;
    padding: 5px 6px;
    font-size: 15px;
  }

  .conversation:not(.has-conversation) .chat-feature-toolbar button:not([data-chat-action="upload"]) {
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .conversation:not(.has-conversation) .chat-feature-toolbar [data-chat-action="upload"] {
    width: 36px;
    min-width: 36px;
    height: 34px;
  }

  .conversation:not(.has-conversation) .send-button {
    width: 38px;
    height: 38px;
  }

  .conversation:not(.has-conversation) .prompt-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .conversation:not(.has-conversation) .prompt-card {
    min-height: 78px;
  }
}

.integration-embedded .quick-q-nav {
  display: none;
}

/* 小Q三大模块：共享入口，报告与搭建使用独立的真实交互面板。 */
.capability-panel[hidden] {
  display: none !important;
}

.conversation[data-capability="report"] .page-heading,
.conversation[data-capability="build"] .page-heading,
.conversation[data-capability="report"] .composer-wrap,
.conversation[data-capability="build"] .composer-wrap {
  display: none;
}

.conversation[data-capability="report"] .conversation-inner,
.conversation[data-capability="build"] .conversation-inner {
  left: -17px;
  width: 100%;
  max-width: 1072px;
  padding: 30px 0;
}

/* 首页恢复为欢迎区、问数入口与双列快捷提问。 */
.conversation:not(.has-conversation) .conversation-inner {
  width: min(970px, calc(100% - 48px));
  max-width: 970px;
  left: 0;
  padding: clamp(150px, 22.5vh, 262px) 0 30px;
}

.conversation:not(.has-conversation) .page-heading {
  align-items: center;
  justify-content: flex-start;
  gap: 26px;
  margin-bottom: 14px;
}

.conversation:not(.has-conversation) .hero-bots {
  display: grid !important;
  width: 82px;
  height: 82px;
  flex: none;
  place-items: center;
}

.conversation:not(.has-conversation) .hero-bots img {
  display: block;
  width: 72px;
  height: 72px;
}

.conversation:not(.has-conversation) .hero-copy h1 {
  width: auto;
  margin-bottom: 4px;
  color: #5798ed;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: 0;
}

.conversation:not(.has-conversation) .hero-copy h1 strong,
.conversation:not(.has-conversation) .hero-copy h1 em {
  color: #8272ec;
}

.conversation:not(.has-conversation) .hero-copy p {
  color: #8592a8;
  font-size: 16px;
}

.conversation:not(.has-conversation) .quick-q-nav {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
}

.conversation.has-conversation .quick-q-nav {
  display: none;
}

.conversation:not(.has-conversation) .quick-q-nav .nav-item {
  width: auto;
  height: 48px;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid #e5eaf2;
  border-radius: 26px;
  background: #ffffffbd;
  color: #667286;
  font-size: 16px;
  font-weight: 600;
}

.conversation:not(.has-conversation) .quick-q-nav .nav-item.active {
  border-color: #cbd9ff;
  background: #eef3ff;
  color: #607be2;
}

.conversation:not(.has-conversation) .quick-q-nav .nav-item svg {
  width: 18px;
  height: 18px;
}

.conversation:not(.has-conversation) .welcome-composer {
  left: auto;
  width: 100%;
  min-height: 146px;
  padding: 12px 20px 14px;
  transform: none;
  border: 1.5px solid #9ab3ff;
  border-radius: 20px;
  box-shadow: 0 10px 28px #6f88b21a;
}

.conversation:not(.has-conversation) .welcome-composer textarea {
  height: 62px;
  min-height: 62px;
  padding: 8px 4px;
  font-size: 18px;
}

.conversation:not(.has-conversation) .prompt-title {
  width: 100%;
  margin: 42px 0 16px;
}

.conversation:not(.has-conversation) .prompt-title h2 {
  color: #78869c;
  font-size: 16px;
  font-weight: 600;
}

.conversation:not(.has-conversation) .prompt-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.conversation:not(.has-conversation) .prompt-card {
  min-height: 92px;
  padding: 12px 18px;
  gap: 16px;
  border: 1px solid #e2e8f2;
  border-radius: 18px;
  background: #ffffffc9;
  box-shadow: 0 6px 20px #6d83ab0d;
}

.conversation:not(.has-conversation) .prompt-card:hover {
  transform: translateY(-1px);
  border-color: #c9d5fb;
  background: #fff;
  box-shadow: 0 8px 20px #536c9514;
}

.conversation:not(.has-conversation) .prompt-icon,
.conversation:not(.has-conversation) .prompt-icon.violet,
.conversation:not(.has-conversation) .prompt-icon.blue,
.conversation:not(.has-conversation) .prompt-icon.mint,
.conversation:not(.has-conversation) .prompt-icon.orange {
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border-radius: 17px;
  color: #4d9ce9;
  background: #e9f4ff;
}

.conversation:not(.has-conversation) .prompt-icon svg {
  width: 32px;
  height: 32px;
}

.conversation:not(.has-conversation) .prompt-icon.violet {
  color: #9852e9;
  background: #f3eaff;
}

.conversation:not(.has-conversation) .prompt-icon.mint {
  color: #159e76;
  background: #e3f8ee;
}

.conversation:not(.has-conversation) .prompt-icon.orange {
  color: #e9a400;
  background: #fff3dc;
}

.conversation:not(.has-conversation) .prompt-copy strong {
  color: #45546d;
  font-size: 17px;
  font-weight: 600;
}

.conversation:not(.has-conversation) .prompt-copy small {
  display: block;
  color: #8d9ab0;
  font-size: 14px;
}

.conversation:not(.has-conversation) .prompt-arrow-circle {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #f0f3ff;
  color: #7489d6;
}

.conversation:not(.has-conversation) .prompt-arrow-circle svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .conversation:not(.has-conversation) .conversation-inner {
    width: calc(100% - 32px);
    padding: 88px 0 24px;
  }

  .conversation:not(.has-conversation) .hero-bots {
    width: 56px;
    height: 56px;
  }

  .conversation:not(.has-conversation) .hero-bots img {
    width: 52px;
    height: 52px;
  }

  .conversation:not(.has-conversation) .hero-copy h1 {
    font-size: 26px;
  }

  .conversation:not(.has-conversation) .hero-copy p {
    font-size: 13px;
  }

  .conversation:not(.has-conversation) .quick-q-nav .nav-item {
    height: 40px;
    padding: 0 11px;
    font-size: 13px;
  }

  .conversation:not(.has-conversation) .prompt-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .conversation:not(.has-conversation) .prompt-card {
    min-height: 78px;
    padding: 10px 12px;
    gap: 11px;
  }

  .conversation:not(.has-conversation) .prompt-icon,
  .conversation:not(.has-conversation) .prompt-icon.violet,
  .conversation:not(.has-conversation) .prompt-icon.mint,
  .conversation:not(.has-conversation) .prompt-icon.orange {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .conversation:not(.has-conversation) .prompt-icon svg {
    width: 27px;
    height: 27px;
  }

  .conversation:not(.has-conversation) .prompt-copy strong {
    font-size: 14px;
  }

  .conversation:not(.has-conversation) .prompt-copy small {
    font-size: 11px;
  }

  .conversation:not(.has-conversation) .prompt-arrow-circle {
    display: none;
  }
}

.quick-module-page {
  min-height: calc(100vh - 180px);
  color: #202e49;
}

.quick-module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.quick-module-heading h1 {
  margin: 0 0 8px;
  color: #1d2b49;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.4px;
}

.quick-module-heading p,
.quick-section-heading p {
  margin: 0;
  color: #8491a7;
  font-size: 14px;
}

.quick-module-heading-actions {
  display: flex;
  gap: 10px;
}

.quick-primary-button,
.quick-outline-button,
.quick-back-button,
.quick-text-button,
.quick-icon-button,
.quick-module-tabs button,
.quick-report-outline button,
.quick-outline-add,
.quick-add-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.quick-primary-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #536bf0;
  background: linear-gradient(110deg, #536cf0, #7184f6);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 5px 13px #6378ed29;
}

.quick-primary-button:hover {
  border-color: #435ce1;
  background: linear-gradient(110deg, #4963e7, #6579f0);
  box-shadow: 0 7px 17px #6378ed35;
}

.quick-primary-button svg,
.quick-outline-button svg {
  width: 17px;
  height: 17px;
}

.quick-outline-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #dfe5f1;
  background: #ffffffd9;
  color: #52617d;
  font-size: 13px;
  font-weight: 600;
}

.quick-outline-button:hover {
  border-color: #bfcbf6;
  background: #f8f9ff;
  color: #536bdc;
}

.quick-module-tabs {
  display: flex;
  gap: 25px;
  margin: 0 0 22px;
  border-bottom: 1px solid #e7ebf3;
}

.quick-module-tabs button {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7b879b;
  font-size: 14px;
}

.quick-module-tabs button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: #eef1ff;
  color: #6175dc;
  font-size: 11px;
}

.quick-module-tabs button.active {
  color: #4f65d9;
  font-weight: 700;
}

.quick-module-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #5470f0, #9871ec);
}

.quick-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 15px;
}

.quick-section-heading h2 {
  margin: 0 0 5px;
  color: #273653;
  font-size: 17px;
  font-weight: 700;
}

.quick-section-heading p {
  font-size: 12px;
}

.quick-search {
  display: flex;
  width: min(270px, 100%);
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #e3e8f1;
  border-radius: 9px;
  background: #fff;
  color: #8996aa;
}

.quick-search svg {
  width: 16px;
  height: 16px;
}

.quick-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #35435f;
  font: inherit;
  font-size: 12px;
}

.quick-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-template-card {
  display: flex;
  min-height: 158px;
  align-items: flex-start;
  gap: 15px;
  padding: 19px;
  border: 1px solid #e6eaf3;
  border-radius: 15px;
  background: #ffffffd9;
  box-shadow: 0 5px 18px #3d54800a;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.quick-template-card:hover {
  transform: translateY(-2px);
  border-color: #c2cff8;
  box-shadow: 0 10px 24px #5870b318;
}

.quick-template-icon,
.quick-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: #edf2ff;
  color: #5b77ed;
}

.quick-template-icon svg,
.quick-card-icon svg {
  width: 23px;
  height: 23px;
}

.quick-template-icon.area-trend {
  background: #f2ebff;
  color: #9661e8;
}

.quick-template-icon.county-detail {
  background: #e7f8f1;
  color: #2bb58b;
}

.quick-template-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.quick-template-copy strong {
  color: #2b3955;
  font-size: 15px;
  font-weight: 700;
}

.quick-template-copy small {
  margin-top: 8px;
  color: #8692a7;
  font-size: 12px;
  line-height: 1.65;
}

.quick-template-copy em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 13px;
  color: #5e73df;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.quick-template-copy em svg {
  width: 14px;
  height: 14px;
}

.quick-report-list {
  display: grid;
  gap: 12px;
}

.quick-module-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 19px;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  background: #ffffffd9;
  box-shadow: 0 4px 15px #3d548008;
}

.quick-card-main {
  min-width: 0;
  flex: 1;
}

.quick-card-state {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f2f7;
  color: #8791a2;
  font-size: 10px;
  line-height: 1;
}

.quick-card-state.published {
  background: #e9f7f2;
  color: #399d7e;
}

.quick-card-main h3 {
  overflow: hidden;
  margin: 8px 0 5px;
  color: #2d3b57;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-card-main p {
  margin: 0;
  color: #8b97a9;
  font-size: 11px;
}

.quick-card-actions {
  display: flex;
  gap: 17px;
  margin-top: 11px;
}

.quick-text-button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5c71df;
  font-size: 11px;
}

.quick-text-button:hover {
  color: #465fcf;
}

.quick-text-button.danger {
  color: #be7781;
}

.quick-dashboard-thumb {
  display: flex;
  width: 125px;
  height: 76px;
  flex: none;
  align-items: end;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e8ecf6;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8faff, #f4f2ff);
}

.quick-dashboard-thumb i {
  width: 18px;
  height: var(--thumb-height);
  border-radius: 4px 4px 1px 1px;
  background: var(--series-color);
  opacity: .8;
}

.quick-empty-panel {
  display: flex;
  min-height: 185px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #dfe5f1;
  border-radius: 14px;
  background: #ffffff96;
  color: #8c98ab;
  text-align: center;
}

.quick-empty-panel > svg {
  width: 34px;
  height: 34px;
  margin-bottom: 3px;
  color: #8293e9;
}

.quick-empty-panel strong {
  color: #516079;
  font-size: 14px;
}

.quick-empty-panel span,
.quick-empty {
  color: #97a2b3;
  font-size: 12px;
}

.quick-build-prompt-card {
  padding: 23px;
  border: 1px solid #e3e8f5;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 92% 2%, #eeeaffb3 0, transparent 40%),
    linear-gradient(135deg, #f4f8ff, #fff 67%);
  box-shadow: 0 8px 24px #53678e10;
}

.build-prompt-head,
.quick-build-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.build-spark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #e6edff, #f1eaff);
  color: #6877e7;
}

.build-spark svg {
  width: 22px;
  height: 22px;
}

.build-prompt-head strong,
.quick-build-chat-head strong {
  display: block;
  color: #293956;
  font-size: 15px;
}

.build-prompt-head small,
.quick-build-chat-head small {
  display: block;
  margin-top: 5px;
  color: #8895a9;
  font-size: 11px;
}

.build-start-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 22px 0 12px;
}

.build-start-controls label,
.quick-form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #64718a;
  font-size: 11px;
  font-weight: 650;
}

.build-start-controls select,
.build-start-controls input,
.quick-form-field input,
.quick-form-field select,
.quick-form-field textarea {
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #35425d;
  font: inherit;
  font-size: 12px;
}

.build-start-controls select:focus,
.build-start-controls input:focus,
.quick-form-field input:focus,
.quick-form-field select:focus,
.quick-form-field textarea:focus {
  border-color: #91a1ee;
  box-shadow: 0 0 0 3px #7183ed15;
}

.quick-build-prompt-card > textarea,
.quick-build-chat textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 13px;
  border: 1px solid #dfe5f0;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #35425d;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
}

.quick-build-prompt-card > textarea:focus,
.quick-build-chat textarea:focus {
  border-color: #8ea0f0;
  box-shadow: 0 0 0 3px #7183ed15;
}

.build-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}

.build-prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.build-prompt-suggestions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #e1e6f2;
  border-radius: 16px;
  background: #ffffffb3;
  color: #6e7b95;
  font-size: 10px;
  cursor: pointer;
}

.build-prompt-suggestions button:hover {
  border-color: #c5d0f7;
  background: #fff;
  color: #586fda;
}

.quick-build-recent {
  margin-top: 27px;
}

.quick-report-editor,
.quick-dashboard-studio {
  min-height: calc(100vh - 220px);
}

.quick-editor-toolbar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -4px 17px;
  padding: 8px 4px;
  border-bottom: 1px solid #e6eaf2;
  background: #fbfcffed;
  backdrop-filter: blur(12px);
}

.quick-editor-toolbar > div {
  display: flex;
  gap: 8px;
}

.quick-back-button {
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #5d6d88;
  font-size: 12px;
}

.quick-back-button svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.quick-back-button:hover {
  color: #4f68d6;
}

.quick-save-status {
  color: #8c98aa;
  font-size: 10px;
}

.quick-report-editor-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  align-items: start;
  gap: 21px;
}

.quick-report-outline {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e7ebf3;
  border-radius: 12px;
  background: #ffffffd9;
}

.quick-report-outline > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px;
  padding: 2px 3px;
  color: #43516d;
  font-size: 12px;
}

.quick-report-outline button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #78859b;
  text-align: left;
  font-size: 11px;
}

.quick-report-outline button.active,
.quick-report-outline button:hover {
  background: #f0f3ff;
  color: #596fdb;
}

.quick-report-outline button i {
  color: #9aa5b7;
  font-size: 9px;
  font-style: normal;
}

.quick-report-outline .quick-icon-button {
  width: 27px;
  min-height: 27px;
  justify-content: center;
}

.quick-icon-button {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #8793a7;
}

.quick-icon-button svg {
  width: 15px;
  height: 15px;
}

.quick-icon-button:hover {
  border-color: #e1e6f1;
  background: #f7f8fd;
  color: #566bdb;
}

.quick-report-outline .quick-outline-add {
  justify-content: center;
  margin-top: 7px;
  border: 1px dashed #d9e0ef;
  color: #6578dc;
}

.quick-outline-add svg,
.quick-add-block svg {
  width: 15px;
  height: 15px;
}

.quick-report-paper {
  min-height: 700px;
  padding: 36px clamp(24px, 6vw, 74px) 48px;
  border: 1px solid #e7ebf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 30px #344b7310;
}

.quick-report-cover {
  padding: 20px 0 24px;
  border-bottom: 1px solid #edf0f6;
}

.quick-report-cover > span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 5px;
  background: #f0f2ff;
  color: #6274d9;
  font-size: 10px;
  font-weight: 650;
}

.quick-report-cover > input {
  display: block;
  width: 100%;
  margin: 16px 0 9px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #24324e;
  font-size: 28px;
  font-weight: 750;
}

.quick-report-cover > p {
  margin: 0;
  color: #96a0b0;
  font-size: 11px;
}

.quick-report-blocks {
  display: grid;
  gap: 19px;
  padding-top: 24px;
}

.report-editor-block {
  position: relative;
  padding: 17px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: #fff;
}

.report-editor-block:focus-within {
  border-color: #cbd5f8;
  box-shadow: 0 0 0 3px #7488ed0b;
}

.report-block-title,
.report-block-heading > input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #34425e;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.text-block textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid #ebeff5;
  border-radius: 7px;
  outline: 0;
  color: #707d91;
  font: inherit;
  font-size: 12px;
  line-height: 1.8;
  resize: vertical;
}

.report-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.report-block-heading > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.report-block-heading select,
.quick-dashboard-chart select {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #e5e9f1;
  border-radius: 6px;
  background: #fff;
  color: #728097;
  font: inherit;
  font-size: 10px;
}

.report-bar-chart {
  display: grid;
  gap: 11px;
  padding: 4px 5px 0;
}

.report-chart-row {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  color: #8591a4;
  font-size: 10px;
}

.report-chart-row > div {
  height: 13px;
  overflow: hidden;
  border-radius: 7px;
  background: #f0f3f8;
}

.report-chart-row i {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--series-color), #91a3f5);
}

.report-chart-row strong {
  color: #586780;
  text-align: right;
}

.report-bar-chart > small {
  padding-left: 77px;
  color: #a0a9b7;
  font-size: 9px;
}

.report-pie-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  padding: 7px;
}

.report-pie {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(#6480f2 0 36%, #9b70e8 36% 61%, #54c3a0 61% 82%, #f2b35d 82% 100%);
  box-shadow: inset 0 0 0 1px #ffffffa8;
}

.report-pie-chart ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  color: #78859b;
  font-size: 10px;
  list-style: none;
}

.report-line-chart,
.dashboard-line-chart {
  display: block;
  width: 100%;
  height: 150px;
  margin: 7px 0;
  overflow: visible;
}

.chart-grid-line {
  fill: none;
  stroke: #edf0f5;
  stroke-width: 1;
}

.chart-axis {
  fill: none;
  stroke: #d9e0eb;
  stroke-width: 1.2;
}

.chart-line {
  fill: none;
  stroke: #687ff0;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-points circle {
  fill: #fff;
  stroke: #687ff0;
  stroke-width: 3;
}

.report-line-chart text,
.dashboard-line-chart text {
  fill: #98a3b4;
  font-family: inherit;
  font-size: 9px;
}

.report-chart-demo-note {
  margin: 0;
  color: #a0a9b7;
  font-size: 9px;
  text-align: right;
}

.report-pie-chart li {
  display: grid;
  grid-template-columns: 9px auto auto;
  align-items: center;
  gap: 7px;
}

.report-pie-chart li i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--series-color);
}

.report-pie-chart li strong {
  color: #53617a;
}

.report-data-table,
.dashboard-mini-table {
  overflow: auto;
  border: 1px solid #e9edf4;
  border-radius: 8px;
}

.report-data-table table,
.dashboard-mini-table {
  width: 100%;
  border-collapse: collapse;
  color: #66748c;
  font-size: 10px;
}

.report-data-table th,
.report-data-table td,
.dashboard-mini-table th,
.dashboard-mini-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
}

.report-data-table th,
.dashboard-mini-table th {
  background: #f7f9fc;
  color: #8491a6;
  font-weight: 650;
}

.report-data-table tr:last-child td,
.dashboard-mini-table tr:last-child td {
  border-bottom: 0;
}

.remove-text-block {
  position: absolute;
  top: 10px;
  right: 10px;
}

.quick-add-block {
  min-height: 39px;
  justify-content: center;
  width: 100%;
  margin-top: 17px;
  border: 1px dashed #d8e0ef;
  background: #fbfcff;
  color: #697cdf;
  font-size: 11px;
}

.quick-add-block:hover {
  border-color: #b9c7f4;
  background: #f7f8ff;
}

.quick-dashboard-workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 17px;
  min-height: 660px;
}

.quick-build-chat {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e9f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 20px #364b7610;
}

.quick-build-chat-head {
  flex: none;
  padding: 15px;
  border-bottom: 1px solid #edf0f5;
}

.quick-build-chat-head .build-spark {
  width: 36px;
  height: 36px;
}

.quick-build-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.build-message {
  max-width: 96%;
  align-self: flex-start;
  padding: 10px 11px;
  border: 1px solid #e7ebf4;
  border-radius: 5px 11px 11px;
  background: #f7f9fd;
  color: #65728a;
  font-size: 11px;
  line-height: 1.7;
}

.build-message.user {
  align-self: flex-end;
  border-color: #d9e0ff;
  border-radius: 11px 5px 11px 11px;
  background: #edf1ff;
  color: #4e60b6;
}

.quick-build-chat form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #edf0f5;
}

.quick-build-chat textarea {
  min-height: 78px;
  font-size: 11px;
}

.quick-build-chat form button {
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.quick-dashboard-canvas {
  min-width: 0;
  padding: 18px;
  border: 1px solid #e5e9f2;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 91% 4%, #eff0ff85 0, transparent 35%),
    #f7f9fd;
}

.quick-dashboard-canvas[data-theme="soft"] {
  background:
    radial-gradient(ellipse at 91% 4%, #e8faf5 0, transparent 35%),
    #f7fbfa;
}

.quick-dashboard-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.quick-dashboard-canvas-toolbar > div {
  min-width: 0;
}

.quick-dashboard-canvas-toolbar span {
  display: block;
  margin-bottom: 5px;
  color: #8995a8;
  font-size: 9px;
}

.quick-dashboard-canvas-toolbar input {
  width: min(420px, 100%);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #2c3b57;
  font-size: 17px;
  font-weight: 700;
}

.quick-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
}

.quick-dashboard-chart {
  min-width: 0;
  min-height: 205px;
  padding: 14px;
  border: 1px solid #e7ebf3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px #344b7309;
}

.quick-dashboard-chart > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-dashboard-chart > header > div {
  display: flex;
  align-items: center;
  gap: 3px;
}

.quick-dashboard-chart > header input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #42516b;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.quick-dashboard-chart > header > strong {
  color: #42516b;
  font-size: 12px;
}

.quick-dashboard-grid.preview .quick-dashboard-chart {
  min-height: 190px;
}

.dashboard-bars {
  display: flex;
  height: 130px;
  align-items: end;
  justify-content: space-around;
  gap: 10px;
  margin: 13px 0 6px;
  padding: 8px 10px 0;
  border-bottom: 1px solid #edf0f5;
}

.dashboard-bars > div {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 5px;
}

.dashboard-bars i {
  width: min(28px, 62%);
  height: var(--bar-height);
  max-height: 100%;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--series-color), white 20%), var(--series-color));
}

.dashboard-bars.line i {
  min-height: 4px;
  border-radius: 6px;
  transform: rotate(-10deg);
}

.dashboard-bars small {
  color: #9aa5b5;
  font-size: 8px;
}

.dashboard-donut {
  display: grid;
  width: 130px;
  height: 130px;
  place-items: center;
  margin: 13px auto 7px;
  border-radius: 50%;
  background: conic-gradient(var(--pie-color) 0 42%, #a77be9 42% 68%, #55c6a2 68% 84%, #f0b25b 84% 100%);
}

.dashboard-donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
}

.dashboard-donut span {
  z-index: 1;
  grid-area: 1 / 1;
  color: #5c6a83;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.dashboard-mini-table {
  margin-top: 16px;
  font-size: 9px;
}

.quick-dashboard-chart > footer {
  margin-top: 8px;
  color: #a1aab7;
  font-size: 8px;
}

.quick-module-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: min(780px, 90vh);
  padding: 0;
  overflow: auto;
  border: 1px solid #e1e6f1;
  border-radius: 16px;
  background: #fff;
  color: #35425d;
  box-shadow: 0 24px 80px #192a4b33;
}

.quick-module-dialog::backdrop {
  background: #14213b7a;
  backdrop-filter: blur(3px);
}

.quick-module-dialog > form > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 23px 17px;
  border-bottom: 1px solid #edf0f5;
  background: linear-gradient(120deg, #f3f7ff, #f7f3ff);
}

.quick-module-dialog h2 {
  margin: 0;
  color: #273652;
  font-size: 18px;
}

.quick-dialog-content {
  display: grid;
  gap: 16px;
  max-height: 61vh;
  overflow: auto;
  padding: 21px 23px;
}

.quick-form-field textarea {
  min-height: 92px;
  resize: vertical;
}

.quick-local-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ece8ff;
  border-radius: 8px;
  background: #f8f6ff;
  color: #8b80ae;
  font-size: 10px;
  line-height: 1.6;
}

.quick-module-dialog > form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 23px;
  border-top: 1px solid #edf0f5;
  background: #fcfcfe;
}

.quick-module-dialog > form > footer .quick-primary-button,
.quick-module-dialog > form > footer .quick-outline-button {
  min-height: 36px;
  font-size: 11px;
}

.quick-report-preview {
  display: grid;
  gap: 15px;
}

.quick-report-preview > h1 {
  margin: 0;
  color: #283752;
  font-size: 22px;
}

.quick-report-preview > section {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid #edf0f5;
  border-radius: 9px;
}

.quick-report-preview h2 {
  margin: 0;
  color: #45536d;
  font-size: 14px;
}

.quick-report-preview p {
  margin: 0;
  color: #748198;
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 1104px) {
  .conversation[data-capability="report"] .conversation-inner,
  .conversation[data-capability="build"] .conversation-inner {
    left: 0;
    width: calc(100% - 32px);
  }

  .quick-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .quick-module-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-module-heading-actions {
    width: 100%;
  }

  .quick-module-heading-actions > button {
    flex: 1;
  }

  .quick-template-grid {
    grid-template-columns: 1fr;
  }

  .quick-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-search {
    width: 100%;
  }

  .quick-report-editor-layout {
    grid-template-columns: 1fr;
  }

  .quick-report-outline {
    position: static;
  }

  .quick-dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .quick-build-chat {
    min-height: 280px;
  }

  .build-prompt-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .conversation[data-capability="report"] .conversation-inner,
  .conversation[data-capability="build"] .conversation-inner {
    padding: 16px 0 24px;
  }

  .quick-module-heading h1 {
    font-size: 23px;
  }

  .quick-module-heading-actions {
    flex-direction: column;
  }

  .quick-report-paper {
    padding: 23px 17px 30px;
  }

  .quick-editor-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .quick-editor-toolbar > div {
    width: 100%;
    justify-content: flex-end;
  }

  .quick-module-card {
    align-items: flex-start;
  }

  .quick-dashboard-thumb {
    display: none;
  }
}

/* 首页对话区仅收小尺寸与字号，保留现有配色、圆角、图标和双列卡片样式。 */
body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
  width: min(820px, calc(100% - 48px));
  max-width: 820px;
  padding: clamp(120px, 18vh, 210px) 0 26px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .page-heading {
  gap: 20px;
  margin-bottom: 12px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy h1 {
  font-size: 30px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy p {
  font-size: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .quick-q-nav {
  gap: 8px;
  margin-bottom: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .quick-q-nav .nav-item {
  height: 32px;
  gap: 5px;
  padding: 0 12px;
  font-size: 12px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .quick-q-nav .nav-item svg {
  width: 14px;
  height: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .welcome-composer {
  min-height: 124px;
  padding: 10px 16px 12px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .welcome-composer textarea {
  height: 50px;
  min-height: 50px;
  padding: 6px 4px;
  font-size: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar {
  gap: 8px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar button:not([data-chat-action="upload"]) {
  min-width: 70px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar [data-chat-action="upload"] {
  width: 30px;
  min-width: 30px;
  height: 30px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar svg,
body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .send-button svg {
  width: 16px;
  height: 16px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .at-symbol {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .send-button {
  width: 32px;
  height: 32px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-title {
  margin: 32px 0 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-title h2 {
  font-size: 14px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-grid {
  gap: 12px 16px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-card {
  min-height: 78px;
  padding: 10px 14px;
  gap: 12px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-copy strong {
  font-size: 15px;
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-copy small {
  font-size: 12px;
}

@media (max-width: 760px) {
  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
    width: calc(100% - 32px);
    padding: 72px 0 24px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy h1 {
    font-size: 24px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy p {
    font-size: 12px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .quick-q-nav .nav-item {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .welcome-composer {
    min-height: 116px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar {
    gap: 5px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .chat-feature-toolbar button:not([data-chat-action="upload"]) {
    min-width: 0;
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-card {
    min-height: 72px;
    padding: 8px 10px;
    gap: 10px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-copy strong {
    font-size: 13px;
  }

  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .prompt-copy small {
    font-size: 11px;
  }
}

/* 首页快捷提问固定双列，取消首页内部滚动；长对话保持原有滚动。 */
body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .conversation-scroll {
  overflow: visible;
}

@media (max-height: 720px) {
  body:not(.integration-embedded) .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
    padding-top: 24px;
  }
}

@media (max-width: 520px) {
  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .prompt-grid {
    grid-template-columns: 1fr;
  }
}
