.qijian-ai-workbench, .qijian-ai-workbench * {
  box-sizing: border-box;
}
.qijian-ai-workbench {
  margin: 0;
  padding: 0;
}

.qijian-ai-workbench {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --purple-500: #a855f7;
  --primary-light: rgba(139, 92, 246, 0.1);
  --primary-border: rgba(139, 92, 246, 0.3);
  --bg-page: #ffffff;
  --bg-page-gradient: linear-gradient(
    145deg,
    #f9f6ff 0%,
    #ffffff 32%,
    #faf9fc 68%,
    #f3efff 100%
  );
  --bg-panel-gradient: linear-gradient(180deg, #fcfbff 0%, #ffffff 100%);
  --bg-chat: #f9fafb;
  --bg-chat-gradient: linear-gradient(
    180deg,
    #f7f4fc 0%,
    #f9fafb 45%,
    #faf8ff 100%
  );
  --bg-hover: #f7f7f8;
  --bg-card: #ffffff;
  --bg-muted: #f3f4f6;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-xl: 16px;
  --transition: 0.2s ease;
  --session-panel-width: 256px;
  --resource-panel-width: 360px;
  --header-bar-height: 64px;
  --chat-content-max-width: 1120px;
  --chat-bubble-max-width: 1000px;
  --chat-avatar-size: 40px;
}

.qijian-ai-workbench { overflow-x: hidden; }

.qijian-ai-workbench {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page-gradient);
  background-attachment: fixed;
  color: var(--text);
}

.qijian-ai-workbench {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: transparent;
}

.app-error {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text);
}

.app-error h1 {
  font-size: 20px;
  font-weight: 600;
}

.app-error p {
  max-width: 520px;
  color: var(--text-secondary);
  word-break: break-word;
}

.app-error button {
  margin-top: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  color: #fff;
  cursor: pointer;
}

.app-layout {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

.panel-shell {
  flex-shrink: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  overflow: hidden;
}

.panel-shell--sessions {
  width: var(--session-panel-width);
  min-width: var(--session-panel-width);
}

.panel-shell--resources {
  width: var(--resource-panel-width);
  min-width: var(--resource-panel-width);
  border-left: 1px solid var(--border);
}

.panel-shell .panel-sessions,
.panel-shell .panel-resources {
  width: 100%;
  min-width: 0;
  flex: 1;
}

.panel-resize-handle {
  width: 6px;
  flex-shrink: 0;
  cursor: col-resize;
  position: relative;
  z-index: 20;
  align-self: stretch;
  margin: 0 -1px;
}

.panel-resize-handle::after {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: var(--border);
  opacity: 0;
  transition: opacity 0.2s;
}

.panel-resize-handle:hover::after,
.panel-resize-handle.is-dragging::after {
  opacity: 1;
  background: var(--primary);
}

.panel-resizing .panel-shell,
.panel-resizing .panel-chat {
  transition: none !important;
}

/* ========== 左侧边栏 ========== */
.panel-sessions {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-panel-gradient);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--header-bar-height);
  flex-shrink: 0;
  padding: 0 12px 0 20px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-main--link {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.sidebar-brand-main--link:hover {
  opacity: 0.92;
}

.sidebar-brand-main--link:focus-visible {
  outline: 2px solid var(--primary-border);
  outline-offset: 2px;
  border-radius: 8px;
}

.sidebar-brand .brand-logo--image {
  position: relative;
  width: 92px;
  height: 38px;
  background: linear-gradient(120deg, #6d28d9 0%, #8b5cf6 38%, #a855f7 68%, #c084fc 100%);
  -webkit-mask-image: var(--brand-logo-url);
  mask-image: var(--brand-logo-url);
  -webkit-mask-source-type: luminance;
  mask-mode: luminance;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
  filter: drop-shadow(0 2px 10px rgba(124, 58, 237, 0.38));
}

.sidebar-brand .brand-logo--image::before {
  content: '';
  position: absolute;
  inset: -6px -4px;
  z-index: -1;
  background: linear-gradient(120deg, rgba(109, 40, 217, 0.28), rgba(168, 85, 247, 0.18));
  filter: blur(10px);
  border-radius: 12px;
  pointer-events: none;
}

.sidebar-brand .brand-title--ai {
  background: linear-gradient(
    90deg,
    #6d28d9 0%,
    #a78bfa 18%,
    #f5f3ff 32%,
    #8b5cf6 48%,
    #ede9fe 62%,
    #7c3aed 78%,
    #faf5ff 92%,
    #6d28d9 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: aiGradientFlow 5s ease-in-out infinite;
}

@keyframes aiGradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-brand .brand-title--ai {
    animation: none;
    background-position: 50% 50%;
  }
}

.sidebar-collapse-btn,
.sidebar-expand-trigger,
.resource-collapse-btn,
.resource-expand-trigger,
.panel-toggle-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.panel-toggle-btn .fa {
  font-size: 15px;
  line-height: 1;
}

.sidebar-collapse-btn:hover,
.sidebar-expand-trigger:hover,
.resource-collapse-btn:hover,
.resource-expand-trigger:hover,
.panel-toggle-btn:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
  transform: scale(1.04);
}

.sidebar-collapse-btn:active,
.sidebar-expand-trigger:active,
.resource-collapse-btn:active,
.resource-expand-trigger:active,
.panel-toggle-btn:active {
  transform: scale(0.96);
}

.sidebar-expand-trigger--inline {
  position: static;
  transform: none;
  z-index: auto;
  border-left: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  flex-shrink: 0;
}

.resource-expand-trigger--inline {
  position: static;
  transform: none;
  z-index: auto;
  border-right: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  flex-shrink: 0;
}

.sidebar-collapsed .chat-topbar {
  padding-left: 20px;
}

.sidebar-collapsed .chat-topbar-left {
  padding-left: 4px;
  gap: 14px;
}

.sidebar-collapsed .panel-shell--sessions {
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sidebar-collapsed .panel-resize-handle--session {
  display: none;
}

.qijian-ai-workbench.resource-collapsed .panel-shell--resources {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-left: none;
}

.qijian-ai-workbench.resource-collapsed .panel-resize-handle--resource {
  display: none;
}

.resource-collapsed .chat-topbar {
  padding-right: 20px;
}

.resource-collapsed .ws-page-topbar {
  padding-right: 20px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-logo--image {
  width: 88px;
  height: 36px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  -webkit-mask-image: var(--brand-logo-url);
  mask-image: var(--brand-logo-url);
  -webkit-mask-source-type: luminance;
  mask-mode: luminance;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.brand-title--ai {
  display: inline-flex;
  align-items: center;
  height: 36px;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 22px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-new {
  padding: 16px;
}

.session-new-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  background: var(--bg-page);
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.session-new-btn:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--primary);
  border-color: rgba(139, 92, 246, 0.3);
}

.session-new-btn .thin-plus {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.session-new-btn .thin-plus::before,
.session-new-btn .thin-plus::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.session-new-btn .thin-plus::before {
  width: 12px;
  height: 1.5px;
}

.session-new-btn .thin-plus::after {
  width: 1.5px;
  height: 12px;
}

.session-new-icon {
  font-size: 16px;
  line-height: 1;
}

.sidebar-divider {
  padding: 4px 20px 12px;
}

.sidebar-divider-line {
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.08) 15%,
    rgba(139, 92, 246, 0.28) 50%,
    rgba(139, 92, 246, 0.08) 85%,
    transparent 100%
  );
}

.sidebar-section {
  padding: 0 12px 16px;
}

.sidebar-section--grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-section-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px;
}

.session-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.session-nav-item .fa {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.session-nav-item:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--primary);
}

.session-nav-item:hover .session-nav-icon {
  background: rgba(139, 92, 246, 0.1);
}

.session-nav-item.active:hover {
  background: rgba(139, 92, 246, 0.16);
  color: var(--primary);
}

.session-nav-item.active {
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary);
  font-weight: 500;
}

.session-nav-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  color: currentColor;
}

.session-nav-item.active .session-nav-icon {
  background: rgba(139, 92, 246, 0.12);
}

.session-nav-icon svg {
  width: 15px;
  height: 15px;
}

.session-nav-label {
  font-weight: 500;
}

.session-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

.session-item {
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  border-left: 2px solid transparent;
}

.session-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.session-item:hover:not(.active) {
  border-left-color: rgba(139, 92, 246, 0.35);
}

.session-item.active:hover {
  background: rgba(139, 92, 246, 0.16);
}

.session-item.active {
  background: rgba(139, 92, 246, 0.12);
  border-left-color: var(--primary);
}

.session-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-item:not(.active) .session-item-title {
  color: #4b5563;
}

.session-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sidebar-footer {
  position: relative;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-account-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  overflow: hidden;
}

.sidebar-org-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-org-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.22));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.sidebar-org-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-org-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-org-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-org-chevron {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-fuel-section {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-fuel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-fuel-stats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.sidebar-fuel-icon {
  font-size: 12px;
  color: #f59e0b;
}

.sidebar-fuel-current {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sidebar-fuel-total {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-fuel-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.sidebar-fuel-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-fuel-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.sidebar-fuel-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--purple-500));
  transition: width 0.3s ease;
}

.sidebar-fuel-fill--low {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.sidebar-fuel-warn {
  flex-shrink: 0;
  color: #ef4444;
  font-size: 12px;
  line-height: 1;
}

.sidebar-fuel-recharge {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.sidebar-fuel-recharge:hover {
  filter: brightness(0.98);
}

.sidebar-fuel-recharge-icon {
  font-size: 12px;
  color: #b45309;
}

.sidebar-fuel-recharge-text {
  flex: 1;
  text-align: left;
}

.sidebar-fuel-recharge-arrow {
  font-size: 11px;
  opacity: 0.85;
}

.sidebar-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user-trigger:hover {
  background: var(--bg-hover);
}

.sidebar-user-trigger[aria-expanded='true'] {
  background: var(--primary-light);
}

.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-user-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-switch {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
}

.sidebar-user-trigger[aria-expanded='true'] .sidebar-user-switch {
  color: var(--primary);
}

.dot.online {
  background: var(--success);
}

/* ========== 中间对话区 ========== */
.panel-chat {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-chat-gradient);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.panel-chat:has(.chat-attach-wrap:hover),
.panel-chat:has(.chat-attach-wrap:focus-within) {
  z-index: 25;
  overflow: visible;
}

.chat-topbar {
  height: var(--header-bar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.chat-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-session-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 0.19em;
}

.chat-status-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.chat-status-badge.completed {
  background: #f3f4f6;
  color: var(--text-secondary);
  border-color: var(--border);
}

.chat-topbar .header-actions {
  display: flex;
  gap: 4px;
}

.chat-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-topbar .header-actions button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  transition: background var(--transition);
}

.chat-topbar .header-actions button:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.chat-messages-inner {
  width: 100%;
  max-width: var(--chat-content-max-width);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  box-sizing: border-box;
}

.message {
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease-out;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.message.user {
  justify-content: flex-end;
  min-width: 0;
}

.message.user .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: min(var(--chat-bubble-max-width), 100%);
  min-width: 0;
  width: -moz-fit-content;
  width: fit-content;
}

.message-content {
  max-width: var(--chat-bubble-max-width);
  min-width: 0;
}

.message.assistant .message-content {
  flex: 1;
  min-width: 0;
  max-width: var(--chat-bubble-max-width);
}

.msg-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 500;
  font-size: 14px;
  color: #fff;
}

.msg-avatar--ai {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  font-weight: 700;
}

.msg-avatar--ai-image {
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  -webkit-mask-image: var(--ai-avatar-url);
  mask-image: var(--ai-avatar-url);
  -webkit-mask-size: 72%;
  mask-size: 72%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.msg-avatar--user {
  border-radius: 50%;
  background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
  color: #5b21b6;
}

.msg-user-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1;
}

.msg-bubble--assistant {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  border-top-left-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-bubble--typing {
  width: 100%;
  max-width: 100%;
}

.msg-bubble--process {
  width: 100%;
  max-width: 100%;
}

.think-process-list,
.msg-reply-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.msg-timeline--after-step {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.msg-preview-in-bubble {
  margin-top: 12px;
}

.msg-preview-in-bubble .chat-preview-intro {
  margin-bottom: 12px;
}

.think-process-list + .msg-preview-in-bubble,
.think-process-list + .msg-timeline {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.place-order-card + .msg-preview-in-bubble {
  margin-top: 12px;
}

.msg-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.msg-timeline > div {
  width: 100%;
  min-width: 0;
}

.msg-exec-card {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #f5f5f7;
  animation: none;
}

.msg-report-frame {
  display: block;
  width: 100%;
  min-height: 0;
  height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f6f4fb;
}

.msg-report-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.msg-exec-card .rp-section-name {
  flex: 1;
  min-width: 0;
}

.msg-exec-card .rp-section-view-btn {
  cursor: pointer;
}

.msg-exec-card.rp-section-item--active {
  border-color: rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.06);
}

.msg-exec-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 13px;
}

.resource-preview .preview-body--readonly,
.resource-preview .preview-body--readonly * {
  cursor: not-allowed;
}

.think-step {
  width: 100%;
}

.think-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  line-height: 22px;
}

.think-status-row {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 0;
}

.think-done-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.think-status-title {
  flex-shrink: 0;
  font-size: 14px;
  white-space: nowrap;
  background: linear-gradient(90deg, #254ef6 3.62%, #bf7cf7 96.38%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.think-status-spacer {
  flex: 1;
  min-width: 12px;
}

.process-tool-status {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 16px;
  border-radius: 3px;
  white-space: nowrap;
}

.process-tool-status.done {
  color: rgba(0, 0, 0, 0.45);
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
}

.process-tool-loading {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  height: 19px;
}

.process-tool-loading > i {
  width: 7px;
  height: 7px;
  margin: 0 2px;
  border-radius: 100%;
  background: linear-gradient(135deg, #254ef6 0%, #bf7cf7 100%);
  display: inline-block;
  animation: qijianBounceDelay 1.4s infinite ease-in-out both;
}

.process-tool-loading .bounce1 {
  animation-delay: -0.32s;
}

.process-tool-loading .bounce2 {
  animation-delay: -0.16s;
}

.process-tool-meta {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.think-content {
  margin: 0 0 8px;
  padding: 0 0 0 12px;
  max-height: 132px;
  overflow-y: auto;
}

.think-hint {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.55);
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes qijianBounceDelay {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.msg-typing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
}

.msg-typing--inline {
  margin-top: 10px;
  justify-content: flex-start;
}

.msg-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msg-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.35;
  animation: msgTypingBounce 1.4s infinite ease-in-out both;
}

.msg-typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.msg-typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes msgTypingBounce {
  0%,
  80%,
  100% {
    transform: scale(0.55);
    opacity: 0.28;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.message-content--preview {
  max-width: var(--chat-content-max-width);
  width: 100%;
}

.msg-bubble--preview {
  max-width: 100%;
  padding: 16px;
}

.chat-preview-intro {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.msg-bubble--user {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 55%, #e9e4ff 100%);
  color: #5b21b6;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-xl);
  border-top-right-radius: 4px;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1;
}

.message.user .msg-time {
  text-align: right;
}

.msg-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.msg-suggestion-chip {
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}

.msg-suggestion-chip:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.18);
  border-color: var(--primary);
}

.msg-suggestion-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.company-picker {
  margin-top: 12px;
}

.company-picker-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.company-picker-tag {
  border: 1px solid #eee8ff;
  background: #faf8ff;
  color: #5b21b6;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  white-space: normal;
  transition: background var(--transition), border-color var(--transition);
}

.company-picker-tag:hover:not(:disabled),
.company-picker-tag:focus-visible:not(:disabled) {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.company-picker-tag:active:not(:disabled) {
  background: #f5f3ff;
  border-color: #a78bfa;
}

.company-picker-tag:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.place-order-card {
  margin-top: 12px;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  max-width: 360px;
}

.place-order-card-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.place-order-card-company {
  margin: -4px 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  word-break: break-all;
}

.place-order-card-features {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.place-order-card-features li {
  margin: 0;
}

.place-order-card-btn {
  display: block;
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.place-order-card-btn--state-long {
  height: auto;
  min-height: 40px;
  padding: 8px 10px;
  line-height: 1.4;
  white-space: normal;
}

.place-order-card-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.place-order-card-btn-wrap {
  display: block;
}

.place-order-card-btn-wrap[title] {
  cursor: not-allowed;
}

.place-order-card-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.place-order-card-foot {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.place-order-card-status {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--primary);
}

.place-order-card-error {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}

.stale-order-card {
  margin-top: 12px;
  padding: 14px 16px 12px;
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  background: #f4f0ff;
  box-sizing: border-box;
  max-width: 420px;
}

.stale-order-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: #5b21b6;
  line-height: 1.4;
}

.stale-order-card-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #5b21b6;
}

.stale-order-card-error {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}

.stale-order-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stale-order-card-btn {
  flex: 1;
  min-width: 120px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.stale-order-card-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.stale-order-card-btn--ghost {
  background: #fff;
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
}

.stale-order-card-btn--ghost:hover:not(:disabled) {
  background: var(--primary-light);
}

.stale-order-card-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.company-picker-change {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}

.msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.msg-footer .msg-time {
  margin-top: 0;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.msg-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.msg-action-label {
  font-size: 12px;
  line-height: 1;
}

.msg-action-btn:hover:not(:disabled) {
  color: var(--primary);
  background: var(--bg-muted);
}

.msg-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.msg-bubble .tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  margin: 2px 4px 2px 0;
  background: var(--primary-light);
  color: var(--primary);
}

.welcome-cards-wrap {
  margin-top: 16px;
  max-width: 100%;
}

.welcome-cards {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.welcome-card {
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-chat);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition);
  flex: 1 1 0;
  min-width: 0;
}

.welcome-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.welcome-cards--expanded .welcome-card {
  flex: 1 1 0;
  min-width: 0;
}

.welcome-card:hover,
.welcome-card:focus-visible {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.22);
}

.welcome-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.welcome-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}

.welcome-card-icon {
  font-size: 16px;
  display: inline-flex;
  flex-shrink: 0;
  line-height: 1;
}

.welcome-icon-primary { color: var(--primary); }
.welcome-icon-purple { color: var(--purple-500); }
.welcome-icon-amber { color: var(--warning); }
.welcome-icon-green { color: var(--success); }
.welcome-icon-blue { color: #3b82f6; }
.welcome-icon-red { color: var(--danger); }

.welcome-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-area {
  flex-shrink: 0;
  padding: 20px 20px 0 20px;
  /* border-top: 1px solid var(--border); */
  background: transparent;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.chat-input-inner {
  max-width: var(--chat-content-max-width);
  margin: 0 auto;
  overflow: visible;
}

.chat-input-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-page);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.chat-pill:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.chat-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.chat-pill-icon {
  font-size: 12px;
}

.pill-icon-primary { color: var(--primary); }
.pill-icon-purple { color: var(--purple-500); }
.pill-icon-amber { color: var(--warning); }
.pill-icon-green { color: var(--success); }
.pill-icon-blue { color: #3b82f6; }
.pill-icon-red { color: var(--danger); }

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-page);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color var(--transition);
  min-height: 52px;
  position: relative;
  overflow: visible;
  margin: 0 var(--chat-avatar-size);
}

.chat-input-wrapper:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
}

.chat-input-wrapper--disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.chat-input-wrapper--disabled:focus-within {
  border-color: #d1d5db;
}

.chat-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 8px;
  transition:
    color var(--transition),
    background var(--transition);
}

.chat-attach-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  margin-left: 4px;
}

.chat-attach-wrap:hover,
.chat-attach-wrap:focus-within {
  z-index: 1001;
}

.chat-input-inner:has(.chat-attach-wrap:hover),
.chat-input-inner:has(.chat-attach-wrap:focus-within) {
  position: relative;
  z-index: 20;
}

.chat-attach-wrap:hover .chat-attach-btn,
.chat-attach-wrap:focus-within .chat-attach-btn {
  color: var(--primary);
  background: var(--primary-light);
}

/* 通用悬停提示框（紫色主题） */
.ui-tooltip,
.chat-attach-tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-dark), var(--purple-500));
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
  z-index: 10000;
  max-width: min(240px, calc(100vw - 24px));
}

/* 向上弹出（用于底部输入区等） */
.ui-tooltip--top,
.chat-attach-tooltip {
  bottom: calc(100% + 10px);
  top: auto;
}

/* 曲别针靠左，提示向右展开，避免左侧栏展开时被裁切或遮挡 */
.chat-attach-tooltip {
  left: 0;
  right: auto;
  transform: none;
}

.ui-tooltip--top::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--primary-dark);
}

.chat-attach-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 22px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--primary-dark);
}

/* 向下弹出（用于顶栏按钮） */
.ui-tooltip--bottom {
  top: calc(100% + 10px);
  bottom: auto;
}

.ui-tooltip--bottom::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--primary-dark);
}

/* 向左弹出（用于右侧按钮，保持在顶栏内） */
.ui-tooltip--left {
  top: 50%;
  bottom: auto;
  right: calc(100% + 10px);
  left: auto;
  transform: translateY(-50%);
}

.ui-tooltip--left::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--primary-dark);
}

/* 向右弹出（用于左侧按钮，保持在顶栏内） */
.ui-tooltip--right {
  top: 50%;
  bottom: auto;
  left: calc(100% + 10px);
  right: auto;
  transform: translateY(-50%);
}

.ui-tooltip--right::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  left: auto;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--primary-dark);
}

.panel-toggle-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.panel-toggle-wrap:hover,
.panel-toggle-wrap:focus-within {
  z-index: 1001;
}

.sidebar-brand:has(.panel-toggle-wrap:hover),
.sidebar-brand:has(.panel-toggle-wrap:focus-within),
.resource-header:has(.panel-toggle-wrap:hover),
.resource-header:has(.panel-toggle-wrap:focus-within),
.chat-topbar:has(.panel-toggle-wrap:hover),
.chat-topbar:has(.panel-toggle-wrap:focus-within),
.ws-page-topbar:has(.panel-toggle-wrap:hover),
.ws-page-topbar:has(.panel-toggle-wrap:focus-within) {
  z-index: 20;
}

.panel-toggle-wrap:hover .ui-tooltip,
.panel-toggle-wrap:focus-within .ui-tooltip,
.chat-attach-wrap:hover .chat-attach-tooltip,
.chat-attach-wrap:focus-within .chat-attach-tooltip {
  opacity: 1;
  visibility: visible;
}

.sidebar-brand,
.resource-header,
.chat-topbar,
.ws-page-topbar {
  position: relative;
  z-index: 10;
}

.chat-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.chat-attach-btn:hover {
  color: var(--text-secondary);
}

.chat-input-field {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  min-height: 44px;
  padding: 11px 8px;
  align-self: center;
  box-sizing: border-box;
}

.chat-input-hint {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 22px;
  white-space: normal;
  flex: 0 1 auto;
}

.chat-input-field textarea {
  flex: 1 1 auto;
  min-width: 80px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  resize: none;
  line-height: 22px;
  min-height: 22px;
  padding: 0;
  max-height: 200px;
  color: var(--text);
  box-sizing: border-box;
}

.chat-input-field textarea::-moz-placeholder {
  color: var(--text-muted);
}

.chat-input-field textarea::placeholder {
  color: var(--text-muted);
}

.chat-input-wrapper--disabled,
.chat-input-wrapper--disabled * {
  cursor: not-allowed !important;
}

.chat-input-field textarea:disabled {
  cursor: not-allowed;
  color: var(--text-muted);
}

.chat-input-wrapper .send-btn {
  margin: 0 8px 0 4px;
  padding: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--purple-500));
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.chat-input-wrapper .send-btn:hover {
  opacity: 0.9;
}

.chat-input-wrapper .send-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.chat-input-wrapper .send-btn.send-btn--stop {
  border-radius: 50%;
}

.chat-input-wrapper .send-btn .send-btn-stop {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #fff;
  display: block;
}

.chat-input-wrapper .send-btn .fa {
  font-size: 16px;
}

.chat-privacy {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.chat-privacy-icon {
  margin-right: 4px;
}

/* ========== 右侧资源面板 ========== */
.panel-resources {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-panel-gradient);
  overflow: hidden;
}

.resource-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: var(--header-bar-height);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.resource-collapse-btn {
  margin-right: 12px;
}

.resource-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.resource-tab {
  flex: 1 1 0;
  min-width: 96px;
  height: 100%;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.resource-tab:hover {
  color: var(--text-secondary);
}

.resource-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.resource-tab .fa {
  flex-shrink: 0;
  font-size: 13px;
}

.resource-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}

/* ========== 右侧正式版 Dashboard ========== */
.rp-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rp-dashboard--chat {
  gap: 12px;
}

.rp-dashboard--chat .rp-card {
  padding: 12px;
}

.rp-dashboard--chat .rp-deliverable-ai-card {
  padding: 10px 12px;
  gap: 8px;
}

.rp-dashboard--chat .rp-deliverable-ai-icon {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 8px;
}

.rp-dashboard--chat .rp-deliverable-ai-name {
  font-size: 12px;
}

.rp-dashboard--chat .rp-deliverable-ai-hint {
  font-size: 10px;
}

.rp-dashboard--chat .rp-deliverable-ai-actions {
  gap: 4px;
}

.rp-dashboard--chat .rp-deliverable-ai-btn {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.rp-card--output {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.04) 0%, var(--bg-chat) 100%);
}

.rp-deliverable-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rp-deliverable-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rp-deliverable-group-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.rp-deliverable-group-tag--ai {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.22);
}

.rp-deliverable-group-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.rp-deliverable-ai-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-deliverable-ai-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, #fff 100%);
}

.rp-deliverable-ai-card--primary {
  border-color: rgba(139, 92, 246, 0.28);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, #fff 100%);
}

.rp-deliverable-ai-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  font-size: 14px;
}

.rp-deliverable-ai-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.rp-deliverable-ai-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.rp-deliverable-ai-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.rp-deliverable-ai-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.rp-deliverable-ai-actions--single .rp-deliverable-ai-btn--download,
.rp-deliverable-expand-actions .rp-deliverable-ai-btn--download {
  min-width: 72px;
}

.rp-deliverable-ai-card--pack {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.rp-deliverable-pack-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.rp-deliverable-pack-toggle:hover {
  background: rgba(139, 92, 246, 0.04);
}

.rp-deliverable-pack-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.rp-deliverable-expand-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 12px;
}

.rp-deliverable-expand-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.rp-deliverable-expand-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.rp-deliverable-expand-name .fa {
  color: #7c3aed;
  flex-shrink: 0;
}

.rp-deliverable-expand-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.rp-deliverable-ai-card--pack.is-expanded {
  border-color: rgba(139, 92, 246, 0.28);
}

.rp-deliverable-expand-row .rp-deliverable-ai-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rp-deliverable-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.rp-deliverable-ai-btn .fa {
  font-size: 12px;
}

.rp-deliverable-ai-btn--edit {
  color: var(--text-secondary);
  background: var(--bg-page);
  border-color: var(--border);
}

.rp-deliverable-ai-btn--edit:hover {
  color: var(--primary);
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.06);
}

.rp-deliverable-ai-btn--download {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.22);
}

.rp-deliverable-ai-btn--download:hover {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.32);
}

.rp-deliverable-download-dropdown {
  position: relative;
  flex-shrink: 0;
}

.rp-deliverable-download-dropdown .rp-deliverable-ai-btn--download {
  width: auto;
}

.rp-deliverable-download-caret {
  font-size: 10px;
  margin-left: 1px;
  opacity: 0.75;
}

.rp-deliverable-download-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 120px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.rp-deliverable-download-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition:
    background var(--transition),
    color var(--transition);
}

.rp-deliverable-download-item .fa {
  font-size: 13px;
  color: #8b5cf6;
}

.rp-deliverable-download-item:hover {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}

.rp-output-deliverables {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rp-output-deliverables-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1;
}

.rp-deliverable-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.rp-deliverable-btn .fa {
  font-size: 12px;
  flex-shrink: 0;
}

.rp-deliverable-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: rgba(139, 92, 246, 0.2);
}

.rp-deliverable-btn--primary {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.28);
}

.rp-deliverable-btn--primary:hover {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.4);
}

.rp-output-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.rp-output-btn {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.rp-output-btn .fa {
  font-size: 16px;
  flex-shrink: 0;
}

.rp-output-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rp-output-btn-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.rp-output-btn-desc {
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.85;
}

.rp-output-btn--primary {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #7c3aed;
}

.rp-output-btn--primary:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.4);
  color: #6d28d9;
}

.rp-output-btn--secondary {
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.rp-output-btn--secondary:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: rgba(139, 92, 246, 0.2);
}

.rp-card {
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.rp-progress-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rp-progress-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rp-progress-icon .fa {
  font-size: 20px;
}

.rp-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.rp-card-title--row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rp-progress-copy {
  min-width: 0;
  flex: 1;
}

.rp-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}

.rp-progress-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.rp-label {
  color: var(--text-secondary);
}

.rp-progress-percent {
  color: var(--primary);
  font-weight: 500;
}

.rp-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.rp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple-500));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.rp-progress-eta {
  font-size: 12px;
  color: var(--text-muted);
}

.rp-section-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  animation: rp-section-in 0.28s ease-out;
}

.rp-section-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rp-section-view-btn {
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.rp-section-view-btn:hover {
  background: var(--primary);
  color: #fff;
}

.rp-section-item--active,
.rp-section-item--done.rp-section-item--active,
.rp-section-item--processing.rp-section-item--active {
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.06);
}

.rp-section-item--done {
  background: #f3f4f6;
}

.rp-section-item--done .rp-section-name {
  color: var(--text);
}

.rp-section-metric {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5;
}

.rp-section-metric--done {
  color: var(--primary);
  background: var(--primary-light);
}

.rp-section-metric--processing {
  color: #059669;
  background: #d1fae5;
}

.rp-section-metric--pending {
  color: var(--text-muted);
  background: #f3f4f6;
}

.rp-section-item--processing {
  background: #f0fdf4;
}

.rp-section-item--partial {
  background: #fffbeb;
}

.rp-section-item--pending {
  background: var(--bg-muted);
}

.rp-section-name {
  font-size: 14px;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.rp-section-item--pending .rp-section-name {
  color: var(--text-muted);
}

.rp-section-status-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5;
}

.rp-section-status-tag--done {
  color: #9ca3af;
  background: #e5e7eb;
}

.rp-section-status-tag--processing {
  color: #059669;
  background: #d1fae5;
}

.rp-section-status-tag--partial {
  color: #b45309;
  background: #fef3c7;
}

.rp-section-status-tag--pending {
  color: #9ca3af;
  background: #f3f4f6;
}

.rp-section-time {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5;
}

.rp-section-time--done {
  color: #9ca3af;
  background: #e5e7eb;
}

.rp-section-time--processing {
  color: #059669;
  background: #d1fae5;
}

.rp-section-time--pending {
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--border);
}

.rp-findings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rp-finding {
  padding: 12px;
  border-radius: 8px;
}

.rp-finding--risk {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.rp-finding--clue {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.rp-finding-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rp-finding-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.rp-finding-title {
  font-size: 13px;
  font-weight: 600;
}

.rp-finding--risk .rp-finding-icon { color: #b45309; }
.rp-finding--clue .rp-finding-icon { color: #059669; }

.rp-finding-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.rp-finding-time {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.rp-empty {
  text-align: center;
  padding: 40px 16px;
}

.rp-empty-icon {
  font-size: 36px;
  color: #d1d5db;
  margin-bottom: 12px;
}

.rp-empty-text {
  font-size: 14px;
  color: var(--text-muted);
}

.icon-primary { color: var(--primary); }
.icon-green { color: var(--success); }
.icon-amber { color: var(--warning); }

.resource-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.resource-item:hover {
  background: var(--bg-hover);
}

.resource-item.active {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

.resource-item .ri-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-item .ri-icon .function-icon {
  background: transparent;
}

.resource-item .ri-icon.pdf {
  background: #fee2e2;
  color: var(--danger);
}

.resource-item .ri-icon.excel {
  background: #d1fae5;
  color: var(--success);
}

.resource-item .ri-icon.word {
  background: #dbeafe;
  color: #3b82f6;
}

.resource-item .ri-icon.order {
  background: #fef3c7;
  color: var(--warning);
}

.resource-item .ri-icon.report {
  background: var(--primary-light);
  color: var(--primary);
}

.resource-item .ri-info {
  flex: 1;
  min-width: 0;
}

.resource-item .ri-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-item .ri-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-item .ri-meta .ri-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}

.resource-item .ri-meta .ri-badge.pdf { background: #fee2e2; color: var(--danger); }
.resource-item .ri-meta .ri-badge.excel { background: #d1fae5; color: #059669; }
.resource-item .ri-meta .ri-badge.word { background: #dbeafe; color: #3b82f6; }
.resource-item .ri-meta .ri-badge.order { background: #fef3c7; color: #b45309; }
.resource-item .ri-meta .ri-badge.report { background: var(--primary-light); color: var(--primary); }

.resource-item-actions {
  display: none;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

.resource-item:hover .resource-item-actions {
  display: flex;
}

.resource-item-actions .ri-action {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}

.resource-item-actions .ri-action:hover {
  background: var(--bg-muted);
  color: var(--primary);
}

.resource-preview {
  padding: 12px;
  border-top: 1px solid var(--border);
  max-height: 260px;
  overflow-y: auto;
  flex-shrink: 0;
}

.resource-preview .preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  min-width: 0;
}

.preview-title span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-actions {
  display: flex;
  gap: 4px;
}

.preview-actions .pv-action,
.resource-preview .close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.preview-actions .pv-action:hover,
.resource-preview .close-btn:hover {
  background: var(--bg-muted);
  color: var(--primary);
}

.resource-preview .preview-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.resource-preview .preview-body .info-h {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.resource-preview .preview-body .info-h .ih-label {
  color: var(--text-muted);
  margin-right: 6px;
}

.resource-preview .preview-body .info-h .ih-value {
  color: var(--text);
  font-weight: 500;
}

.resource-preview .preview-body .order-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.resource-preview .preview-body .order-status.paid { background: #d1fae5; color: #059669; }
.resource-preview .preview-body .order-status.pending { background: #fef3c7; color: #b45309; }
.resource-preview .preview-body .order-status.cancelled { background: #fee2e2; color: var(--danger); }

.preview-content { padding: 4px 0; }

.preview-section { margin-bottom: 20px; }

.preview-section .ps-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.preview-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.preview-section th {
  background: var(--bg-muted);
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.preview-section td {
  padding: 7px 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.preview-section tr:hover td {
  background: var(--bg-hover);
}

.resource-empty,
.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

/* ========== 维度尽调状态预览 ========== */
.clue-status-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.clue-status-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.clue-status-overview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.clue-status-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.clue-status-metric-label {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.clue-status-metric-value {
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #059669;
  text-align: right;
  word-break: break-word;
}

.clue-status-excerpt {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-chat);
}

.clue-status-excerpt-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.clue-status-excerpt-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clue-status-excerpt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.clue-status-excerpt-index {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.clue-status-excerpt-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
}

.clue-status-empty {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.clue-status-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.clue-status-dimension {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.clue-status-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.clue-status-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clue-status-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
  overflow: hidden;
}

.clue-status-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-chat);
  border-bottom: 1px solid var(--border);
}

.clue-status-group-title .fa {
  color: var(--primary);
  font-size: 13px;
}

.clue-status-group-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.clue-status-group .clue-status-list {
  padding: 8px;
}

.clue-status-item--processing {
  background: #fffbeb;
}

.clue-status-item--done {
  background: #f9fafb;
}

.clue-status-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.clue-status-badge--done {
  background: #d1fae5;
  color: #059669;
}

.clue-status-badge--processing {
  background: #fef3c7;
  color: #b45309;
}

.clue-status-badge--pending {
  background: #f3f4f6;
  color: #6b7280;
}

.clue-status-badge--partial {
  background: #fef3c7;
  color: #b45309;
}

.clue-status-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.clue-status-stat {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.clue-status-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.clue-status-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.clue-status-stat--done .clue-status-stat-value { color: #059669; }
.clue-status-stat--processing .clue-status-stat-value { color: #b45309; }
.clue-status-stat--pending .clue-status-stat-value { color: #6b7280; }

.clue-status-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.clue-status-section-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.clue-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clue-status-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.clue-status-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.clue-status-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.clue-status-item-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.clue-status-item-badge--done {
  background: #d1fae5;
  color: #059669;
}

.clue-status-item-badge--processing {
  background: #fef3c7;
  color: #b45309;
}

.clue-status-item-badge--pending {
  background: #f3f4f6;
  color: #6b7280;
}

.clue-status-item-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.clue-status-item-time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.clue-status-section--done .clue-status-section-title { color: #059669; }
.clue-status-section--processing .clue-status-section-title { color: #b45309; }
.clue-status-section--partial .clue-status-section-title { color: #b45309; }
.clue-status-section--pending .clue-status-section-title { color: #6b7280; }

/* ========== 结果面板 ========== */
.dr-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding: 4px 0;
}

.dr-header {
  padding: 0 4px;
}

.dr-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dr-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.dr-dimension-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dr-dimension-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.dr-dimension-tab:hover {
  color: var(--primary);
  border-color: rgba(139, 92, 246, 0.35);
}

.dr-dimension-tab.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.4);
  font-weight: 600;
}

.dr-sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dr-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.dr-sub-tab:hover {
  color: var(--text);
  border-color: var(--border);
}

.dr-sub-tab.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.3);
  font-weight: 600;
}

.dr-sub-tab-count {
  font-size: 10px;
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
  text-align: center;
}

.dr-dimension-tab.active .dr-sub-tab-count,
.dr-sub-tab.active .dr-sub-tab-count {
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary);
}

.dr-sub-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--bg-chat);
}

.dr-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.dr-sub-row:last-child {
  border-bottom: none;
}

.dr-sub-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dr-sub-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.dr-tables {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.dr-table-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dr-table-block-title {
  margin: 0;
  padding-left: 8px;
  border-left: 3px solid #8b5cf6;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.dr-table-wrap {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--bg-chat);
}

.dr-table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 24px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.dr-table-empty p {
  margin: 0;
}

.dr-table-empty-cell {
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-chat);
}

.dr-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
}

.dr-data-table th,
.dr-data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
}

.dr-data-table th:last-child,
.dr-data-table td:last-child {
  border-right: none;
}

.dr-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.dr-data-table tbody tr:last-child td {
  border-bottom: none;
}

.dr-col-index {
  width: 48px;
  text-align: center;
  color: var(--text-muted);
  white-space: nowrap;
}

.dr-col-action {
  width: 56px;
  text-align: center;
  white-space: nowrap;
}

.dr-tm-img {
  display: block;
  height: 48px;
  max-width: 72px;
  margin: 0 auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.dr-detail-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 12px;
}

.dr-detail-btn:hover {
  text-decoration: underline;
}

.dr-detail-link {
  display: inline;
  text-align: left;
  line-height: 1.5;
  word-break: break-word;
  white-space: normal;
}

.dr-site-links {
  display: block;
}

.dr-site-link {
  display: block;
  color: #7c3aed;
  word-break: break-word;
  text-decoration: none;
}

.dr-col-nowrap .dr-site-links,
.dr-col-nowrap .dr-site-link {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.dr-site-link:hover {
  text-decoration: underline;
}

.dr-data-table th.dr-col-clamp,
.dr-data-table th.dr-col-clamp-line {
  white-space: nowrap;
  word-break: keep-all;
}

.dr-data-table td.dr-col-clamp {
  text-align: left;
  vertical-align: top;
}

.dr-data-table th.dr-col-clamp-line,
.dr-data-table td.dr-col-clamp-line {
  width: 96px;
  max-width: 96px;
  vertical-align: middle;
  white-space: nowrap;
  word-break: keep-all;
}

.dr-clamp {
  text-align: left;
}

.dr-clamp--line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dr-clamp--line.open {
  display: block;
}

.dr-clamp-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-align: left;
  line-height: 1.5;
  word-break: break-word;
}

.dr-clamp-text--lines-1 {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  -webkit-box-orient: unset;
  -webkit-line-clamp: unset;
}

.dr-clamp-text--lines-2 {
  -webkit-line-clamp: 2;
}

.dr-clamp-text.open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.dr-clamp-text--lines-1.open {
  white-space: normal;
  word-break: break-word;
  text-overflow: unset;
}

.dr-clamp-text--toggle {
  cursor: pointer;
}

.dr-clamp-btn {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 12px;
  text-align: right;
}

.dr-clamp--line .dr-clamp-btn {
  display: inline;
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  white-space: nowrap;
}

.dr-clamp--line.open .dr-clamp-btn {
  display: block;
  width: 100%;
  margin-top: 2px;
}

.dr-clamp-btn:hover {
  text-decoration: underline;
}

.dr-data-table th.dr-col-nowrap,
.dr-data-table td.dr-col-nowrap {
  width: 1%;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
  word-break: keep-all;
}

.dr-data-table th.dr-col-wrap2,
.dr-data-table td.dr-col-wrap2 {
  width: 48px;
  max-width: 52px;
  min-width: 48px;
  padding-left: 6px;
  padding-right: 6px;
  white-space: normal;
  word-break: break-all;
  text-align: center;
  line-height: 1.35;
}

.dr-data-table th.dr-col-compact,
.dr-data-table td.dr-col-compact {
  width: 72px;
  max-width: 80px;
  padding-left: 6px;
  padding-right: 6px;
  white-space: normal;
  word-break: break-all;
  text-align: center;
  line-height: 1.35;
}

.dr-data-table th.dr-col-fill,
.dr-data-table td.dr-col-fill {
  min-width: 168px;
}

.dr-data-row:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.dr-table {
  display: grid;
  width: 100%;
  min-width: 0;
  font-size: 12px;
}

.dr-table-cell {
  min-width: 0;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.65;
}

.dr-table-cell--head {
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dr-table-col--index {
  text-align: center;
  color: var(--text-muted);
}

.dr-table-col--metric {
  font-weight: 600;
  color: #059669;
}

.dr-table-col--excerpt {
  line-height: 1.7;
}

.dr-table-cell--action {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: none;
  background: var(--bg-chat);
}

.dr-table-cell--head.dr-table-cell--action {
  background: var(--bg-muted);
}

.dr-pagination.ant-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 0 2px;
}

.dr-pagination .ant-pagination-options-quick-jumper input {
  border-radius: 6px;
}

.resource-empty .resource-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-muted);
  color: var(--text-muted);
  opacity: 0.55;
}

.resource-empty .resource-empty-icon svg {
  width: 22px;
  height: 22px;
}

.function-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.function-icon--resource svg { width: 16px; height: 16px; }
.function-icon--tab svg { width: 14px; height: 14px; }
.function-icon--inline svg { width: 16px; height: 16px; color: var(--primary); }

.back-icon {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 15px;
  transition: color var(--transition);
}

.back-icon:hover {
  color: var(--primary);
}

.sessions-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 48px;
  border: none;
  border-radius: 0 6px 6px 0;
  background: var(--bg-page);
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 12px;
  z-index: 99;
}

.file-view-mode .sessions-toggle {
  display: flex;
}

.file-view-mode:not(.sidebar-collapsed) .sessions-toggle {
  left: var(--session-panel-width);
}

/* 预览模式：中间对话区与右侧内容区各占一半 */
.file-view-mode .panel-chat {
  flex: 1 1 50%;
  width: auto;
  min-width: 0;
  max-width: none;
}

.file-view-mode .panel-shell--resources {
  flex: 1 1 50%;
  width: auto;
  min-width: 0;
  max-width: none;
}

/* 维度「查看」：右侧预览区收窄，中间对话区占更大比例 */
.file-view-mode.clue-preview-mode .panel-chat {
  flex: 1 1 68%;
}

.file-view-mode.clue-preview-mode .panel-shell--resources {
  flex: 0 1 32%;
  min-width: 280px;
  max-width: 400px;
}

.file-view-mode .panel-resize-handle--resource {
  display: none;
}

.file-view-mode .panel-resources {
  flex: 1;
  min-width: 0;
}

.file-view-mode .resource-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: none;
  min-height: 0;
  padding: 16px 20px 20px;
  border-top: none;
  overflow: hidden;
}

.file-view-mode .resource-preview .preview-header {
  flex-shrink: 0;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.file-view-mode .resource-preview .preview-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-top: 16px;
}

.file-view-mode .panel-resources .resource-header {
  display: none;
}

.file-view-mode .panel-resources .resource-content:not(.resource-content--clue-preview) {
  display: none;
}

.file-view-mode .resource-content--clue-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16px 20px 20px;
}

.file-view-mode .resource-content--clue-preview .resource-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: none;
  min-height: 0;
  padding: 0;
  border-top: none;
  overflow: hidden;
}

.file-view-mode .resource-content--clue-preview .resource-preview .preview-header {
  flex-shrink: 0;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.file-view-mode .resource-content--clue-preview .resource-preview .preview-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-top: 16px;
}

/* 预览模式不得覆盖「右侧收起」：维度完成不能把右侧自动拉开 */
.qijian-ai-workbench.resource-collapsed .panel-shell--resources {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border-left: none !important;
}

.panel-shell--sessions,
.panel-shell--resources {
  transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rp-section-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes settingsSlideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========== 设置弹窗（侧边栏内浮层） ========== */
.settings-popover {
  position: absolute;
  right: 12px;
  bottom: calc(100% + 8px);
  left: 12px;
  z-index: 120;
  width: auto;
  max-height: min(420px, 70vh);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow:
    0 12px 40px rgba(17, 24, 39, 0.12),
    0 0 0 1px rgba(139, 92, 246, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: settingsPopoverIn 0.18s ease-out;
}

@keyframes settingsPopoverIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-popover .settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.settings-popover .settings-panel-menu {
  overflow-y: auto;
  min-height: 0;
}

.settings-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.settings-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.settings-panel-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.settings-panel-menu {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-panel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.settings-panel-item:hover {
  background: var(--bg-hover);
}

.settings-panel-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.settings-panel-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-panel-item-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.settings-panel-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-panel-item-arrow {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.settings-panel-item--danger .settings-panel-item-icon {
  background: #fef2f2;
  color: var(--danger);
}

.settings-panel-item--danger .settings-panel-item-label {
  color: var(--danger);
}

.settings-panel-item--highlight .settings-panel-item-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.15));
  color: var(--primary);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.settings-panel-item--highlight:hover {
  background: rgba(139, 92, 246, 0.08);
}

/* ========== 尽调结果面板 ========== */
.dd-result {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dd-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.dd-result-company {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.dd-result-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.dd-conclusion-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.dd-conclusion-level--low {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.dd-conclusion-level--medium {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.dd-conclusion-level--high {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.dd-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.dd-section-title .fa {
  color: var(--primary);
}

.dd-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dd-step {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.dd-step-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dd-step-body {
  flex: 1;
  min-width: 0;
}

.dd-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dd-step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.dd-step-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dd-step-status--done {
  background: #ecfdf5;
  color: #059669;
}

.dd-step-status--processing {
  background: #f5f3ff;
  color: #7c3aed;
}

.dd-step-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.dd-step-details {
  margin-top: 8px;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.dd-step-details li {
  margin-bottom: 2px;
}

.dd-conclusion-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid;
}

.dd-conclusion-card.dd-conclusion-level--low {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.dd-conclusion-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.dd-conclusion-points {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.dd-conclusion-points li {
  margin-bottom: 6px;
}

.dd-conclusion-rec {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.dd-conclusion-rec .fa {
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.dd-result-time {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ========== 当前会话：尽调结果 / 文件列表 ========== */
.sr-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sr-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.sr-context-main {
  min-width: 0;
}

.sr-context-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.sr-context-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.sr-context-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.sr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sr-file-deliverable-list {
  gap: 8px;
}

.sr-file-deliverable-card {
  padding: 0;
  overflow: hidden;
}

.sr-file-deliverable-card--active {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12);
}

.sr-file-deliverable-card--generating {
  opacity: 0.88;
}

.sr-file-deliverable-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 12px 0 12px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sr-file-deliverable-main:disabled {
  cursor: default;
}

.sr-file-deliverable-card .rp-deliverable-ai-actions {
  padding-right: 14px;
}

.sr-card,
.sr-file-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
  cursor: pointer;
  text-align: left;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.sr-card:hover:not(:disabled),
.sr-file-card:hover:not(:disabled) {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.sr-card.active,
.sr-file-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary-border);
}

.sr-card--disabled,
.sr-file-card--generating {
  opacity: 0.55;
  cursor: not-allowed;
}

.sr-card-icon,
.sr-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  background: var(--primary-light);
  color: var(--primary);
}

.sr-card-body,
.sr-file-body {
  flex: 1;
  min-width: 0;
}

.sr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.sr-card-name,
.sr-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-status {
  flex-shrink: 0;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
}

.sr-status--done {
  background: #ecfdf5;
  color: #059669;
}

.sr-status--processing {
  background: #fffbeb;
  color: #b45309;
}

.sr-status--pending {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.sr-card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-card-foot,
.sr-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sr-file-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.sr-tag {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  line-height: 1.6;
}

.sr-metric {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.sr-card-chevron {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.sr-card:hover .sr-card-chevron,
.sr-file-card:hover .sr-card-chevron {
  color: var(--primary);
}

.finding-detail-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.finding-highlights {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.finding-highlights li {
  margin-bottom: 4px;
}

.msg-bubble--assistant strong {
  color: var(--text);
  font-weight: 600;
}

.msg-markdown > *:first-child {
  margin-top: 0;
}

.msg-markdown {
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

.msg-markdown table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0;
  font-size: 13px;
  border: 1px solid var(--border);
}

.msg-markdown th,
.msg-markdown td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}

.msg-markdown thead th {
  background: var(--bg-muted);
  font-weight: 600;
}

.msg-markdown tbody tr:nth-child(even) {
  background: #fafafa;
}

.msg-markdown > *:last-child {
  margin-bottom: 0;
}

.msg-markdown p {
  margin: 0 0 0.6em;
}

.msg-markdown h1 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.35em 0 0.5em;
}

.msg-markdown h2 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.5em 0 0.4em;
}

.msg-markdown .insight-heading {
  position: relative;
  padding-left: 22px;
}

.msg-markdown .insight-dot {
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.msg-markdown .insight-heading--red .insight-dot {
  background: #f5222d;
}

.msg-markdown .insight-heading--yellow .insight-dot {
  background: #faad14;
}

.msg-markdown .insight-heading--green .insight-dot {
  background: #52c41a;
}

.msg-markdown h3,
.msg-markdown h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.45em 0 0.35em;
}

.msg-markdown h5,
.msg-markdown h6 {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0.4em 0 0.3em;
}

.msg-markdown ul,
.msg-markdown ol {
  margin: 0.4em 0 0.7em;
  padding-left: 1.4em;
}

.msg-markdown li {
  margin: 0.2em 0;
}

.msg-markdown li > p {
  margin: 0;
}

.msg-markdown hr {
  border: none;
  height: 0;
  margin: 16px 0;
  border-top: 1px solid var(--border);
}

.msg-markdown blockquote {
  margin: 0.5em 0;
  padding: 0.15em 0 0.15em 12px;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}

.msg-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--bg-muted);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-markdown pre {
  margin: 0.6em 0;
  padding: 12px 14px;
  background: var(--bg-muted);
  border-radius: 8px;
  overflow-x: auto;
}

.msg-markdown pre code {
  background: transparent;
  padding: 0;
  white-space: pre;
  word-break: normal;
}

.msg-timeline .msg-mermaid-source,
.msg-markdown .msg-mermaid-source {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.msg-timeline .mermaid-wrap,
.msg-markdown .mermaid-wrap {
  position: relative;
}

.mermaid-container.is-offscreen {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 640px;
  visibility: hidden;
  pointer-events: none;
}

.msg-markdown .mermaid-container,
.msg-timeline .mermaid-container {
  margin: 12px 0;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.msg-markdown .mermaid,
.msg-timeline .mermaid {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.msg-markdown .mermaid svg,
.msg-timeline .mermaid svg {
  max-width: 100%;
  height: auto;
}

.eq-org {
  margin: 18px 0 24px;
  overflow-x: auto;
  padding: 4px 8px 10px;
  color: #222;
}

.eq-org-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eq-org-edges {
  display: flex;
  justify-content: center;
  width: 100%;
}

.eq-org-edge-slot {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  min-width: 220px;
}

.eq-org-frame {
  min-width: 280px;
  max-width: 100%;
}

.eq-org-rail {
  height: 1px;
  background: #333;
  position: relative;
}

.eq-org-rail::before,
.eq-org-rail::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 10px;
  background: #333;
}

.eq-org-rail--top::before,
.eq-org-rail--top::after {
  top: 0;
}

.eq-org-rail--bottom::before,
.eq-org-rail--bottom::after {
  bottom: 0;
}

.eq-org-rail::before {
  left: 0;
}

.eq-org-rail::after {
  right: 0;
}

.eq-org-notch {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 1px;
  height: 10px;
  background: #333;
  transform: translateX(-50%);
}

.eq-org-notch.is-left {
  left: 25%;
}

.eq-org-notch.is-right {
  left: 75%;
}

.eq-org-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.eq-org-cell {
  position: relative;
  flex: 1 1 0;
  min-width: 220px;
  padding: 10px 32px;
  text-align: center;
  line-height: 1.75;
}

.eq-org-cell::before,
.eq-org-cell::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #333;
}

.eq-org-cell::before {
  left: 14px;
}

.eq-org-cell::after {
  right: 14px;
}

.eq-org-title,
.eq-org-line {
  font-size: 14px;
  font-weight: 400;
  color: #222;
}

.eq-org-edge {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  margin: 2px 0 8px;
  min-height: 28px;
}

.eq-org-edge.is-left {
  flex-direction: row-reverse;
}

.eq-org-stem-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12px;
  flex-shrink: 0;
}

.eq-org-stem {
  display: block;
  width: 1px;
  flex: 1;
  min-height: 10px;
  background: #333;
}

.eq-org-arrow {
  font-size: 10px;
  line-height: 1;
  color: #333;
  margin-top: -1px;
}

.eq-org-edge-text {
  padding: 4px 0 2px 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #222;
  text-align: left;
}

.eq-org-edge.is-left .eq-org-edge-text {
  padding: 4px 8px 2px 0;
  text-align: right;
}

.eq-org-edge-line {
  white-space: nowrap;
}

.msg-markdown a {
  color: var(--primary);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-markdown > p:last-child a {
  display: inline-block;
  line-height: 1.5;
  margin-bottom: 6px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── 燃料值提问门控 ── */
.fuel-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.fuel-gate-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 24px 24px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.fuel-gate-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  color: var(--primary);
  font-size: 20px;
}

.fuel-gate-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.fuel-gate-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fuel-gate-notice-icon {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 16px;
  color: #d97706;
}

.fuel-gate-notice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #92400e;
}

.fuel-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.fuel-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.fuel-gate-btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}

.fuel-gate-btn--ghost:hover {
  background: var(--bg-muted);
}

.fuel-gate-btn--recharge {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.fuel-gate-btn--recharge:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--primary);
}

.fuel-gate-btn--continue {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.fuel-gate-btn--continue:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--primary);
}

.fuel-gate-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
  color: #92400e;
}

.fuel-gate-banner-icon {
  flex-shrink: 0;
  color: #d97706;
}

.fuel-gate-banner-text {
  flex: 1;
  line-height: 1.45;
}

.fuel-gate-banner-link {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.fuel-gate-banner-link:hover {
  text-decoration: underline;
}

.fuel-gate-banner-dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #b45309;
  cursor: pointer;
}

.fuel-gate-banner-dismiss:hover {
  background: rgba(217, 119, 6, 0.12);
}

/* ── 对话内燃料提醒（嵌套在助手气泡中） ── */
.fuel-chat-notice {
  margin-bottom: 4px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.fuel-chat-notice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fuel-chat-notice-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: #d97706;
}

.fuel-chat-notice-title {
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
}

.fuel-chat-notice-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fuel-chat-notice-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #92400e;
}

.fuel-chat-btn--inline {
  display: inline-flex;
  vertical-align: middle;
  min-height: 30px;
  margin-left: 8px;
  padding: 0 12px;
  white-space: nowrap;
}

.fuel-chat-notice-extra {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.fuel-chat-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuel-chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.fuel-chat-btn--recharge {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.fuel-chat-btn--recharge:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--primary);
}

.fuel-chat-btn--ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}

.fuel-chat-btn--ghost:hover {
  background: var(--bg-muted);
}

.fuel-chat-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  font-size: 13px;
  color: #92400e;
  line-height: 1.45;
}

.fuel-chat-warn-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: #d97706;
}

.fuel-chat-warn-text {
  flex: 1;
}

.fuel-chat-warn-link {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.fuel-chat-warn-link:hover {
  text-decoration: underline;
}

