.dashboard-chatbot {
  color-scheme: light;
  --brand-blue: #004aad;
  --brand-pink: #ff66c4;

  --bg: #ffffff;
  --panel: #f6f9ff;
  --panel-2: #f1f6ff;
  --border: rgba(0, 74, 173, 0.16);
  --border-strong: rgba(0, 74, 173, 0.26);
  --shadow: 0 14px 36px rgba(0, 74, 173, 0.12);

  --fg: var(--brand-blue);
  --muted: rgba(0, 74, 173, 0.72);
  --subtle: rgba(0, 74, 173, 0.48);

  --chip: rgba(0, 74, 173, 0.06);
  --chip-hover: rgba(255, 102, 196, 0.12);
  --focus: rgba(255, 102, 196, 0.22);

  --max: 48rem;
  --sidebar-width: 300px;
  --sidebar-rail-width: 72px;
  --radius: 1.5rem;
  --radius-sm: 1.15rem;

  background: var(--bg) !important;
  color: var(--fg) !important;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.dashboard-chatbot .top-nav {
  display: none !important;
}

.dashboard-chatbot .site-shell {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

.dashboard-chatbot .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dashboard-chatbot [hidden] {
  display: none !important;
}

.dashboard-chatbot .chat-app,
.dashboard-chatbot .sidebar,
.dashboard-chatbot .sidebar-scroll,
.dashboard-chatbot .sidebar-head,
.dashboard-chatbot .sidebar-foot,
.dashboard-chatbot .project-list,
.dashboard-chatbot .conversation-list,
.dashboard-chatbot .main-pane,
.dashboard-chatbot .thread-head,
.dashboard-chatbot .chat-scroll,
.dashboard-chatbot .hero-state,
.dashboard-chatbot .message-list,
.dashboard-chatbot .message-row,
.dashboard-chatbot .bubble,
.dashboard-chatbot .thread-footer,
.dashboard-chatbot .composer-shell,
.dashboard-chatbot .composer,
.dashboard-chatbot .composer-aux,
.dashboard-chatbot .composer-utils,
.dashboard-chatbot .search-shell,
.dashboard-chatbot .sources,
.dashboard-chatbot .source-sidebar,
.dashboard-chatbot .message-actions,
.dashboard-chatbot .apps-workspace,
.dashboard-chatbot .sidebar-quick-actions,
.dashboard-chatbot .project-folder-body,
.dashboard-chatbot .files-workspace,
.dashboard-chatbot .files-workspace-head,
.dashboard-chatbot .files-panel,
.dashboard-chatbot .files-queue-row,
.dashboard-chatbot .candidate-toolbar,
.dashboard-chatbot .candidate-compare-card {
  min-width: 0;
}

.dashboard-chatbot .chat-app svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chatbot .chat-app {
  --sidebar-balance-width: 0px;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 20% 60% 20%;
  grid-template-rows: minmax(0, 1fr);
  background: var(--bg);
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}

.dashboard-chatbot .chat-app.sidebar-collapsed {
  --sidebar-balance-width: 0px;
  grid-template-columns: 20% 60% 20%;
}

@media (min-width: 981px) {
  .dashboard-chatbot .chat-app,
  .dashboard-chatbot .chat-app.source-sidebar-open {
    grid-template-columns: 20% 60% 20%;
  }

  .dashboard-chatbot .chat-app.sidebar-collapsed,
  .dashboard-chatbot .chat-app.sidebar-collapsed.source-sidebar-open {
    grid-template-columns: 20% 60% 20%;
  }
}

@media (min-width: 981px) and (max-width: 1279px) {
  .dashboard-chatbot .chat-app,
  .dashboard-chatbot .chat-app.source-sidebar-open,
  .dashboard-chatbot .chat-app.sidebar-collapsed,
  .dashboard-chatbot .chat-app.sidebar-collapsed.source-sidebar-open {
    grid-template-columns: minmax(220px, 20%) minmax(0, 1fr) minmax(220px, 20%);
  }
}

/* Sidebar */
.dashboard-chatbot .sidebar {
  color-scheme: light;
  --sidebar-bg: #ffffff;
  --sidebar-bg-2: #ffffff;
  --sidebar-border: var(--border);
  --sidebar-fg: var(--fg);
  --sidebar-muted: var(--muted);
  --sidebar-subtle: var(--subtle);
  --sidebar-hover: var(--chip);
  --sidebar-active: rgba(0, 74, 173, 0.1);
  --sidebar-focus: var(--focus);

  border-right: 1px solid var(--sidebar-border);
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: var(--sidebar-width);
  transition: width 0.22s ease, transform 0.22s ease, opacity 0.18s ease, border-color 0.18s ease;
}

/* Keep all expanded sidebar sections in one shared scroll viewport. */
.dashboard-chatbot .sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-pink) rgba(255, 102, 196, 0.1);
  -webkit-overflow-scrolling: touch;
}

.dashboard-chatbot .sidebar-scroll::-webkit-scrollbar {
  width: 9px;
}

.dashboard-chatbot .sidebar-scroll::-webkit-scrollbar-track {
  background: rgba(255, 102, 196, 0.1);
  border-radius: 999px;
}

.dashboard-chatbot .sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-pink);
  border: 2px solid #ffffff;
  border-radius: 999px;
}

.dashboard-chatbot .sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: #f04cae;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar {
  width: var(--sidebar-rail-width);
  opacity: 1;
  pointer-events: auto;
  transform: none;
  overflow: visible;
  z-index: 5;
}

@media (min-width: 981px) {
  .dashboard-chatbot .chat-app:not(.sidebar-collapsed) .sidebar-topbar {
    position: relative;
    justify-content: center;
  }

  .dashboard-chatbot .chat-app:not(.sidebar-collapsed) .sidebar-brand {
    justify-content: center;
  }

  .dashboard-chatbot .chat-app:not(.sidebar-collapsed) .mobile-close {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .dashboard-chatbot .sidebar {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    justify-self: stretch;
  }

  .dashboard-chatbot .chat-app.sidebar-collapsed .sidebar {
    grid-column: 1;
    width: var(--sidebar-rail-width);
    max-width: var(--sidebar-rail-width);
    height: 100vh;
    justify-self: start;
  }

  .dashboard-chatbot .main-pane {
    grid-column: 2;
    height: 100vh;
  }

  .dashboard-chatbot .source-sidebar {
    grid-column: 3;
  }
}

.dashboard-chatbot .sidebar-head {
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-chatbot .sidebar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.dashboard-chatbot .sidebar-brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 14px;
  color: var(--sidebar-fg);
}

.dashboard-chatbot .dashboard-brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: min(205px, 100%);
  object-fit: contain;
}

.dashboard-chatbot .avatar .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  display: block;
}

.dashboard-chatbot .avatar .brand-logo {
  padding: 4px;
}

.dashboard-chatbot .sidebar-rows {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-chatbot .sidebar-row {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-fg);
  font: inherit;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .sidebar-row svg {
  width: 18px;
  height: 18px;
  color: var(--sidebar-muted);
}

.dashboard-chatbot .sidebar-row:hover {
  background: var(--sidebar-hover);
}

.dashboard-chatbot .sidebar-row.is-active {
  background: var(--sidebar-active);
  border-color: var(--sidebar-border);
}

.dashboard-chatbot .sidebar-section-control {
  padding: 0 10px 6px;
  flex: 0 0 auto;
}

.dashboard-chatbot .sidebar-section-toggle {
  width: 100%;
  min-height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--sidebar-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .sidebar-section-toggle:hover,
.dashboard-chatbot .sidebar-section-toggle:focus-visible {
  background: var(--sidebar-hover);
  color: var(--sidebar-fg);
}

.dashboard-chatbot .sidebar-section-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--sidebar-focus);
}

.dashboard-chatbot .sidebar-section-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-chatbot .sidebar-section-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  color: var(--sidebar-muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
}

.dashboard-chatbot .sidebar-section-chevron {
  width: 17px;
  height: 17px;
  color: var(--sidebar-muted);
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.dashboard-chatbot .sidebar-section-toggle[aria-expanded="false"] .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.dashboard-chatbot .sidebar-section-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  overflow: visible;
}

.dashboard-chatbot .sidebar-section-panel[hidden] {
  display: none;
}

.dashboard-chatbot #recentChatsPanel,
.dashboard-chatbot #projectsPanel {
  flex: 0 0 auto;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-head {
  padding: 12px 10px 10px;
  align-items: center;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-topbar {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  gap: 0;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-brand {
  position: relative;
  grid-area: 1 / 1;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .dashboard-brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  max-width: 42px;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-topbar:hover .dashboard-brand-logo,
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-topbar:focus-within .dashboard-brand-logo {
  opacity: 0;
  transform: scale(0.88);
}

.dashboard-chatbot .chat-app.sidebar-collapsed .mobile-close {
  display: inline-flex;
  position: relative;
  grid-area: 1 / 1;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--sidebar-border);
  color: var(--sidebar-fg);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-topbar:hover .mobile-close,
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-topbar:focus-within .mobile-close,
.dashboard-chatbot .chat-app.sidebar-collapsed .mobile-close:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-rows {
  padding: 0 10px 10px;
  align-items: center;
  gap: 8px;
}

/* Add breathing room directly above New chat without changing its horizontal position. */
.dashboard-chatbot .sidebar-scroll > .sidebar-rows:first-child .sidebar-row--new {
  margin-top: 10px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-scroll > .sidebar-rows:first-child .sidebar-row--new {
  margin-top: 0;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-row {
  position: relative;
  width: 46px;
  min-height: 46px;
  justify-content: center;
  padding: 0;
  gap: 0;
  border-color: transparent;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-row svg {
  width: 20px;
  height: 20px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-row > span:not(.app-store-icon),
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-row--search input,
.dashboard-chatbot .chat-app.sidebar-collapsed .app-store-copy {
  display: none;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-quick-actions {
  display: none;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-scroll {
  overflow: hidden;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .project-list,
.dashboard-chatbot .chat-app.sidebar-collapsed .conversation-list,
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-section-control,
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-section-panel,
.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-section-title {
  display: none;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-apps {
  margin-top: auto;
  padding: 0 10px 10px;
  align-items: center;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .app-store-row {
  min-height: 46px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .app-store-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .sidebar-foot {
  padding: 10px;
  align-items: center;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-row {
  position: relative;
  width: 46px;
  min-height: auto;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:hover {
  background: var(--sidebar-hover);
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:focus-visible {
  background: var(--sidebar-hover);
  box-shadow: 0 0 0 4px var(--sidebar-focus);
  outline: none;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-meta {
  display: none;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-logout-form {
  display: block;
  margin: 8px 0 0;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-logout-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:hover)::before,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:hover)::after,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:focus-visible)::before,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:focus-visible)::after {
  opacity: 0;
  visibility: hidden;
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip] {
  position: relative;
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0s linear 0.14s;
  z-index: 40;
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]::after {
  content: attr(data-sidebar-tooltip);
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: var(--brand-blue);
  box-shadow: 0 12px 28px rgba(0, 74, 173, 0.14);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
  transform: translate(0, -50%) translateX(-4px);
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-bottom: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  background: #ffffff;
  transform: translate(-4px, -50%) rotate(45deg);
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:hover::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:hover::after,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-visible::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-visible::after,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-within::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-within::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:hover::after,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-visible::after,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-within::after {
  transform: translate(0, -50%);
}

.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:hover::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-visible::before,
.dashboard-chatbot .chat-app.sidebar-collapsed [data-sidebar-tooltip]:focus-within::before {
  transform: translate(-4px, -50%) rotate(45deg);
}

.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:hover)::before,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:hover)::after,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:focus-visible)::before,
.dashboard-chatbot .chat-app.sidebar-collapsed .account-row:has(.account-logout-btn:focus-visible)::after {
  opacity: 0;
  visibility: hidden;
}

.dashboard-chatbot .sidebar-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--sidebar-focus);
}

.dashboard-chatbot .sidebar-row--new {
  border-color: var(--sidebar-border);
}

.dashboard-chatbot .sidebar-row--search {
  cursor: text;
}

.dashboard-chatbot .sidebar-row--search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--sidebar-fg);
  font-size: 0.9rem;
}

.dashboard-chatbot .sidebar-row--search input:focus,
.dashboard-chatbot .sidebar-row--search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.dashboard-chatbot .sidebar-row--search input::placeholder {
  color: var(--sidebar-subtle);
}

.dashboard-chatbot .sidebar-row--search:focus-within {
  background: transparent;
  border-color: transparent;
}

.dashboard-chatbot .sidebar-quick-actions,
.dashboard-chatbot .sidebar-apps {
  flex: 0 0 auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-chatbot .sidebar-apps {
  margin-top: auto;
}

.dashboard-chatbot .sidebar-section-title {
  margin: 8px 8px 4px;
  color: var(--sidebar-subtle);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-chatbot .app-store-row {
  min-height: 58px;
  align-items: center;
  border-color: var(--sidebar-border);
  background: rgba(255, 255, 255, 0.86);
}

.dashboard-chatbot .app-store-row:hover,
.dashboard-chatbot .app-store-row.is-active {
  background: var(--sidebar-active);
  border-color: var(--border-strong);
}

.dashboard-chatbot .app-store-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--chip);
  color: var(--sidebar-fg);
}

.dashboard-chatbot .app-store-icon svg {
  width: 17px;
  height: 17px;
  color: currentColor;
}

.dashboard-chatbot .app-store-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.dashboard-chatbot .app-store-copy strong,
.dashboard-chatbot .app-store-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .app-store-copy strong {
  color: var(--sidebar-fg);
  font-size: 0.9rem;
  font-weight: 850;
}

.dashboard-chatbot .app-store-copy small {
  color: var(--sidebar-muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-chatbot .quick-action-row {
  min-height: 40px;
  border-color: var(--sidebar-border);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}

.dashboard-chatbot .quick-action-row:hover,
.dashboard-chatbot .quick-action-row:focus-visible {
  background: var(--sidebar-active);
  border-color: var(--border-strong);
}

.dashboard-chatbot .btn-chip,
.dashboard-chatbot .ghost-btn,
.dashboard-chatbot .conversation-card,
.dashboard-chatbot .drawer-btn,
.dashboard-chatbot .icon-btn,
  .dashboard-chatbot .model-selector-btn,
  .dashboard-chatbot .model-selector-item,
  .dashboard-chatbot .model-selector-config,
  .dashboard-chatbot .msg-icon-btn,
  .dashboard-chatbot .prompt-action-btn,
  .dashboard-chatbot .composer-icon,
  .dashboard-chatbot .composer-tool,
  .dashboard-chatbot .composer-send,
  .dashboard-chatbot .composer-cancel,
.dashboard-chatbot .scroll-to-bottom,
.dashboard-chatbot .followup-btn,
.dashboard-chatbot .code-copy-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .btn-chip {
  min-height: 40px;
  padding: 0 14px;
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 14px 30px rgba(0, 74, 173, 0.22);
}

.dashboard-chatbot .btn-chip:hover {
  background: #003f95;
}

.dashboard-chatbot .ghost-btn {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--border);
  color: var(--fg);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-chatbot .ghost-btn:hover {
  background: var(--chip);
  border-color: var(--border-strong);
}

.dashboard-chatbot .ghost-btn[disabled],
.dashboard-chatbot .btn-chip[disabled],
.dashboard-chatbot .icon-btn[disabled],
.dashboard-chatbot .model-selector-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.dashboard-chatbot .sidebar-search input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg);
  padding: 0 12px;
}

.dashboard-chatbot .sidebar-search input::placeholder {
  color: var(--subtle);
}

.dashboard-chatbot .sidebar-search input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .project-list {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-chatbot .conversation-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 6px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-chatbot .empty-sidebar {
  padding: 10px 12px;
  border-radius: 14px;
  border: none;
  color: var(--sidebar-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  background: transparent;
}

.dashboard-chatbot .conversation-card {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border-color: transparent;
  padding: 10px 12px;
  color: var(--sidebar-fg);
  background: transparent;
}

.dashboard-chatbot .conversation-section-title {
  margin: 10px 8px 4px;
  color: var(--sidebar-subtle);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-chatbot .conversation-card--group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-chatbot .conversation-card-text {
  min-width: 0;
  display: block;
}

.dashboard-chatbot .conversation-group-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-muted);
  flex: 0 0 auto;
}

.dashboard-chatbot .conversation-group-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-chatbot .conversation-card:hover {
  background: var(--sidebar-hover);
}

.dashboard-chatbot .conversation-card.is-active {
  background: var(--sidebar-active);
  border-color: var(--border-strong);
  box-shadow: none;
}

.dashboard-chatbot .project-card.is-active .project-folder-icon {
  background: rgba(255, 102, 196, 0.12);
  border-color: rgba(255, 102, 196, 0.32);
  color: var(--brand-pink);
}

.dashboard-chatbot .project-card {
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-chatbot .project-folder-icon {
  width: 34px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(0, 74, 173, 0.08);
  border: 1px solid var(--sidebar-border);
  color: var(--sidebar-fg);
}

.dashboard-chatbot .project-folder-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-chatbot .project-folder-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-chatbot .conversation-card-row,
.dashboard-chatbot .project-card-row,
.dashboard-chatbot .project-chat-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.dashboard-chatbot .conversation-card-row .conversation-card,
.dashboard-chatbot .project-card-row .conversation-card,
.dashboard-chatbot .project-chat-row .conversation-card {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-chatbot .project-row-action {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: 0;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .project-row-action svg {
  width: 17px;
  height: 17px;
}

.dashboard-chatbot .conversation-card-row:hover .project-row-action,
.dashboard-chatbot .project-card-row:hover .project-row-action,
.dashboard-chatbot .project-chat-row:hover .project-row-action,
.dashboard-chatbot .project-row-action:focus-visible {
  opacity: 1;
}

.dashboard-chatbot .project-row-action:hover,
.dashboard-chatbot .project-row-action:focus-visible {
  background: var(--sidebar-hover);
  border-color: var(--border-strong);
  color: var(--brand-pink);
  outline: none;
}

.dashboard-chatbot .project-preview,
.dashboard-chatbot .project-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .project-preview {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
}

.dashboard-chatbot .project-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-subtle);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: capitalize;
  white-space: nowrap;
}

.dashboard-chatbot .project-chat-list {
  margin: 0 0 4px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-chatbot .project-chat-card {
  border-radius: 12px;
  padding: 8px 10px;
}

.dashboard-chatbot .project-chat-card--new {
  color: var(--muted);
  font-weight: 850;
}

@media (hover: none) {
  .dashboard-chatbot .project-row-action {
    opacity: 1;
  }
}

.dashboard-chatbot .conversation-title {
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .conversation-preview {
  display: none;
}

.dashboard-chatbot .conversation-meta {
  display: none;
}

.dashboard-chatbot .sidebar-foot {
  padding: 10px 12px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.dashboard-chatbot .account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: transparent;
  color: var(--sidebar-fg);
}

.dashboard-chatbot .account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-hover);
  color: var(--sidebar-fg);
  font-weight: 900;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.dashboard-chatbot .account-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-chatbot .account-name {
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .account-email {
  margin-top: 1px;
  font-size: 0.76rem;
  color: var(--sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .account-logout-form {
  margin: 0;
  flex: 0 0 auto;
}

.dashboard-chatbot .account-logout-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .account-logout-btn svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .account-logout-btn:hover,
.dashboard-chatbot .account-logout-btn:focus-visible {
  background: var(--sidebar-hover);
  border-color: var(--border-strong);
  color: var(--brand-pink);
  outline: none;
}

.dashboard-chatbot .account-logout-btn[data-tooltip]::before,
.dashboard-chatbot .account-logout-btn[data-tooltip]::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0s linear 0.14s;
}

.dashboard-chatbot .account-logout-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  z-index: 50;
  width: max-content;
  max-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 74, 173, 0.14);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, 4px);
}

.dashboard-chatbot .account-logout-btn[data-tooltip]::before {
  content: "";
  bottom: calc(100% + 5px);
  z-index: 51;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: #ffffff;
  transform: translate(-50%, 4px) rotate(45deg);
}

.dashboard-chatbot .account-logout-btn[data-tooltip]:hover::before,
.dashboard-chatbot .account-logout-btn[data-tooltip]:hover::after,
.dashboard-chatbot .account-logout-btn[data-tooltip]:focus-visible::before,
.dashboard-chatbot .account-logout-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.dashboard-chatbot .account-logout-btn[data-tooltip]:hover::after,
.dashboard-chatbot .account-logout-btn[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.dashboard-chatbot .account-logout-btn[data-tooltip]:hover::before,
.dashboard-chatbot .account-logout-btn[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

/* Main */
.dashboard-chatbot .main-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.dashboard-chatbot .thread-head {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.dashboard-chatbot .thread-titles {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-chatbot .product-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
}

.dashboard-chatbot .product-sidebar-toggle {
  order: 0;
  flex: 0 0 40px;
}

.dashboard-chatbot .product-brand-link {
  order: 1;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  color: var(--fg);
  padding: 0 8px;
}

.dashboard-chatbot .product-brand-link:hover,
.dashboard-chatbot .product-brand-link:focus-visible {
  background: var(--chip);
  outline: none;
}

.dashboard-chatbot .product-brand-link img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.dashboard-chatbot .product-brand-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--fg);
  line-height: 1;
  white-space: nowrap;
}

.dashboard-chatbot .product-brand-copy strong {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-chatbot .product-brand-copy span {
  font-size: 0.86rem;
  font-weight: 850;
  color: var(--muted);
}

.dashboard-chatbot .thread-actions {
  white-space: nowrap;
}

.dashboard-chatbot .group-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.dashboard-chatbot .project-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.dashboard-chatbot .group-header[hidden],
.dashboard-chatbot .project-header[hidden] {
  display: none;
}

.dashboard-chatbot .group-header-btn svg:first-child,
.dashboard-chatbot .project-header-btn svg:first-child {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.dashboard-chatbot .model-selector-btn {
  height: 40px;
  max-width: min(340px, 100%);
  padding: 0 12px 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--border);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 850;
  letter-spacing: -0.01em;
}

.dashboard-chatbot .model-selector-btn:hover {
  background: var(--chip);
  border-color: var(--border-strong);
}

.dashboard-chatbot .model-selector-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .model-selector-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .model-selector-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.dashboard-chatbot .model-selector-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform-origin: top left;
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 40;
}

.dashboard-chatbot .model-selector-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dashboard-chatbot .model-selector-item,
.dashboard-chatbot .model-selector-config {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
}

.dashboard-chatbot .model-selector-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
}

.dashboard-chatbot .model-selector-item:hover,
.dashboard-chatbot .model-selector-config:hover,
.dashboard-chatbot .model-selector-item:focus-visible,
.dashboard-chatbot .model-selector-config:focus-visible {
  background: var(--chip);
  border-color: var(--border-strong);
  outline: none;
}

.dashboard-chatbot .model-selector-item[aria-checked="true"] {
  background: var(--chip);
}

.dashboard-chatbot .model-selector-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dashboard-chatbot .model-selector-item-title {
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.dashboard-chatbot .model-selector-item-help {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--muted);
}

.dashboard-chatbot .model-selector-check {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(1px) scale(0.9);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-chatbot .model-selector-check svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .model-selector-item[aria-checked="true"] .model-selector-check {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dashboard-chatbot .model-selector-divider {
  height: 1px;
  margin: 6px 6px;
  background: var(--border);
}

.dashboard-chatbot .model-selector-config {
  padding: 10px 12px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.dashboard-chatbot .group-header-menu {
  width: min(300px, calc(100vw - 32px));
}

.dashboard-chatbot .project-header-menu {
  width: min(320px, calc(100vw - 32px));
}

.dashboard-chatbot .group-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.dashboard-chatbot .group-menu-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.dashboard-chatbot .group-menu-item.danger {
  color: var(--fg);
}

.dashboard-chatbot .group-menu-item.danger svg {
  color: var(--muted);
}

.dashboard-chatbot .thread-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .thread-subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  display: none;
}

@media (min-width: 1100px) {
  .dashboard-chatbot .thread-subtitle {
    display: block;
  }
}

.dashboard-chatbot .thread-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  min-width: 0;
}

.dashboard-chatbot .workspace-top-label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-chatbot .dashboard-language-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.dashboard-chatbot .dashboard-language-select {
  appearance: none;
  width: clamp(112px, 14vw, 156px);
  min-height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-blue);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  text-overflow: ellipsis;
}

.dashboard-chatbot .dashboard-language-shell::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.dashboard-chatbot .dashboard-language-select:hover,
.dashboard-chatbot .dashboard-language-select:focus {
  border-color: var(--border-strong);
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip] {
  position: relative;
}

.dashboard-chatbot .drawer-btn,
.dashboard-chatbot .icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-chatbot .drawer-btn:hover,
.dashboard-chatbot .icon-btn:hover {
  background: var(--chip);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .drawer-btn {
  display: inline-flex !important;
}

.dashboard-chatbot .icon-btn.is-active {
  background: var(--chip);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::before,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0s linear 0.14s;
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  top: calc(100% + 10px);
  z-index: 60;
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 74, 173, 0.14);
  color: var(--brand-blue);
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -4px);
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::before {
  content: "";
  top: calc(100% + 5px);
  z-index: 61;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  background: #ffffff;
  transform: translate(-50%, -4px) rotate(45deg);
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:hover::before,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:hover::after,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:focus-visible::before,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:hover::after,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:hover::before,
.dashboard-chatbot .thread-actions .icon-btn[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]::after {
  right: 0;
  left: auto;
  transform: translate(0, -4px);
}

.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]::before {
  right: 15px;
  left: auto;
  transform: translate(0, -4px) rotate(45deg);
}

.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]:hover::after,
.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]:focus-visible::after {
  transform: translate(0, 0);
}

.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]:hover::before,
.dashboard-chatbot .thread-actions .icon-btn:last-child[data-tooltip]:focus-visible::before {
  transform: translate(0, 0) rotate(45deg);
}

.dashboard-chatbot .chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 981px) {
  .dashboard-chatbot .thread-head {
    height: 65px;
  }

  .dashboard-chatbot .source-sidebar:not(.is-hidden) .source-sidebar-head {
    height: 65px;
    box-sizing: border-box;
  }

  .dashboard-chatbot .thread-head {
    padding-right: 16px;
    transition: padding-right 0.22s ease;
  }

  .dashboard-chatbot .chat-scroll {
    padding-right: 0;
    transition: none;
  }
}

/* Empty state: composer centered */
.dashboard-chatbot .chat-app.is-empty .chat-scroll {
  padding-top: 0;
}

.dashboard-chatbot .chat-app.is-empty .thread-footer {
  display: none;
}

.dashboard-chatbot .chat-app.is-files .thread-footer,
.dashboard-chatbot .chat-app.is-files .thread-actions,
.dashboard-chatbot .chat-app.is-app-store .thread-footer,
.dashboard-chatbot .chat-app.is-app-store .thread-actions {
  display: none;
}

.dashboard-chatbot .chat-app.is-booting .hero-state {
  display: none;
}

.dashboard-chatbot .chat-app.is-empty .hero-state {
  flex: 1 1 auto;
  max-width: none;
  width: 100%;
  padding: 0 16px;
  justify-content: center;
}

.dashboard-chatbot .hero-state {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-chatbot .hero-state.is-hidden {
  display: none;
}

.dashboard-chatbot .apps-workspace {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0 16px 44px;
}

.dashboard-chatbot .apps-workspace.is-hidden {
  display: none;
}

.dashboard-chatbot .apps-shell {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.dashboard-chatbot .apps-hero h3,
.dashboard-chatbot .apps-section h3 {
  margin: 0;
  color: var(--fg);
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-chatbot .apps-hero {
  width: min(100%, 920px);
  margin: 18px auto 6px;
  text-align: center;
}

.dashboard-chatbot .apps-hero h3 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.02;
}

.dashboard-chatbot .apps-hero p {
  width: min(100%, 760px);
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.45;
}

.dashboard-chatbot .apps-search {
  width: min(100%, 760px);
  min-height: 60px;
  margin: 28px auto 0;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 14px 34px rgba(0, 74, 173, 0.08);
}

.dashboard-chatbot .apps-search svg {
  width: 20px;
  height: 20px;
  color: var(--subtle);
}

.dashboard-chatbot .apps-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}

.dashboard-chatbot .apps-search input::placeholder {
  color: var(--subtle);
}

.dashboard-chatbot .apps-search:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--focus), 0 14px 34px rgba(0, 74, 173, 0.08);
}

.dashboard-chatbot .app-store-tabs {
  width: min(100%, 920px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
}

.dashboard-chatbot .app-store-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .app-store-tab:hover,
.dashboard-chatbot .app-store-tab.is-active {
  background: var(--chip);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .apps-section {
  width: min(100%, 920px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-chatbot .apps-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-chatbot .apps-section h3 {
  font-size: 1.3rem;
}

.dashboard-chatbot .apps-section p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.dashboard-chatbot .app-store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-chatbot .app-store-card {
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 74, 173, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-chatbot .app-store-card:hover,
.dashboard-chatbot .app-store-card:focus-visible {
  background: #ffffff;
  border-color: var(--border-strong);
  box-shadow: 0 18px 38px rgba(0, 74, 173, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-chatbot .app-store-card.is-disabled {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.dashboard-chatbot .app-store-card.is-disabled:hover,
.dashboard-chatbot .app-store-card.is-disabled:focus-visible {
  transform: none;
  border-color: var(--border);
}

.dashboard-chatbot .app-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.12), rgba(255, 102, 196, 0.16));
  color: var(--fg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.dashboard-chatbot .app-card-icon svg {
  width: 29px;
  height: 29px;
}

.dashboard-chatbot .app-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  flex: 1;
}

.dashboard-chatbot .app-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.dashboard-chatbot .app-card-title-row strong {
  min-width: 0;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.dashboard-chatbot .app-card-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.dashboard-chatbot .app-card-description,
.dashboard-chatbot .app-card-meta,
.dashboard-chatbot .apps-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.dashboard-chatbot .app-card-description {
  min-height: 46px;
}

.dashboard-chatbot .app-card-meta {
  margin-top: auto;
  color: var(--subtle);
  font-weight: 800;
}

.dashboard-chatbot .apps-empty {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  text-align: center;
  background: var(--panel);
}

.dashboard-chatbot .apps-empty.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .dashboard-chatbot .app-store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-chatbot .app-store-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chatbot .app-store-card {
    min-height: 188px;
    align-items: flex-start;
  }

  .dashboard-chatbot .app-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
}

.dashboard-chatbot .files-workspace {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-chatbot .files-workspace.is-hidden {
  display: none;
}

.dashboard-chatbot .files-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-chatbot .files-eyebrow {
  margin: 0 0 6px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-chatbot .files-workspace h2,
.dashboard-chatbot .files-panel h3 {
  margin: 0;
  color: var(--fg);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.dashboard-chatbot .files-workspace h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.dashboard-chatbot .files-panel h3 {
  font-size: 0.98rem;
}

.dashboard-chatbot .files-head-actions,
.dashboard-chatbot .candidate-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-chatbot .files-drop-zone {
  min-height: 176px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 22px;
  background: rgba(246, 249, 255, 0.82);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-chatbot .files-drop-zone:hover,
.dashboard-chatbot .files-drop-zone.is-dragging,
.dashboard-chatbot .files-drop-zone:focus-visible {
  background: var(--chip);
  border-color: var(--brand-blue);
  box-shadow: 0 14px 32px rgba(0, 74, 173, 0.1);
  outline: none;
}

.dashboard-chatbot .files-drop-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.dashboard-chatbot .files-drop-zone strong {
  font-size: 1rem;
  font-weight: 900;
}

.dashboard-chatbot .files-drop-zone span,
.dashboard-chatbot .files-panel-head span,
.dashboard-chatbot .files-empty-state,
.dashboard-chatbot .files-queue-main small,
.dashboard-chatbot .files-queue-main p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.dashboard-chatbot .files-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-chatbot .files-stats div,
.dashboard-chatbot .files-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-chatbot .files-stats div {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-chatbot .files-stats strong {
  color: var(--fg);
  font-size: 1.08rem;
  font-weight: 950;
}

.dashboard-chatbot .files-stats span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-chatbot .files-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-chatbot .files-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-chatbot .files-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .files-queue-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--chip);
}

.dashboard-chatbot .files-queue-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-chatbot .files-queue-main strong {
  color: var(--fg);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .files-queue-main p {
  margin: 0;
}

.dashboard-chatbot .files-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 74, 173, 0.1);
}

.dashboard-chatbot .files-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-blue);
  transition: width 0.18s ease;
}

.dashboard-chatbot .files-queue-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-chatbot .files-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-chatbot .files-status-pill.is-success {
  color: var(--fg);
  background: rgba(0, 74, 173, 0.08);
}

.dashboard-chatbot .files-status-pill.is-processing {
  color: var(--fg);
  border-color: var(--border-strong);
}

.dashboard-chatbot .files-status-pill.is-error,
.dashboard-chatbot .files-status-pill.is-unsupported {
  color: var(--brand-pink);
  border-color: rgba(255, 102, 196, 0.32);
}

.dashboard-chatbot .candidate-toolbar {
  justify-content: space-between;
}

.dashboard-chatbot .candidate-search {
  min-height: 40px;
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.dashboard-chatbot .candidate-search svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: 0 0 auto;
}

.dashboard-chatbot .candidate-search input,
.dashboard-chatbot .candidate-toolbar select {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
}

.dashboard-chatbot .candidate-search input {
  width: 100%;
}

.dashboard-chatbot .candidate-toolbar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.dashboard-chatbot .candidate-table-wrap table {
  min-width: 980px;
}

.dashboard-chatbot .candidate-select-cell {
  width: 42px;
  text-align: center;
}

.dashboard-chatbot .candidate-select-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-blue);
}

.dashboard-chatbot .candidate-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-chatbot .candidate-sort:hover {
  color: var(--brand-pink);
}

.dashboard-chatbot .candidate-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-chatbot .candidate-compare-card {
  padding: 12px;
  border-radius: 16px;
  background: var(--chip);
}

.dashboard-chatbot .candidate-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--fg);
}

.dashboard-chatbot .candidate-compare-head strong,
.dashboard-chatbot .candidate-compare-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .candidate-compare-card dl {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 6px 10px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.dashboard-chatbot .candidate-compare-card dt {
  color: var(--subtle);
  font-weight: 900;
}

.dashboard-chatbot .candidate-compare-card dd {
  margin: 0;
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.dashboard-chatbot .hero-center {
  padding: 56px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.dashboard-chatbot .chat-app.is-empty .hero-center {
  padding: 0;
}

.dashboard-chatbot .hero-state h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-chatbot .empty-composer-mount {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

/* Messages */
.dashboard-chatbot .message-list {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dashboard-chatbot .message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-chatbot .message-row.user {
  justify-content: flex-end;
}

.dashboard-chatbot .message-row.group-message {
  gap: 10px;
}

.dashboard-chatbot .message-row.group-message.is-own {
  justify-content: flex-end;
}

.dashboard-chatbot .message-row.group-message.is-own .group-avatar {
  display: none;
}

.dashboard-chatbot .message-row.system {
  justify-content: center;
}

.dashboard-chatbot .avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(0, 74, 173, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--fg);
  flex-shrink: 0;
}

.dashboard-chatbot .avatar {
  display: none;
}

.dashboard-chatbot .message-row.group-message .avatar {
  display: inline-flex;
}

.dashboard-chatbot .message-row.user .avatar {
  display: none;
}

.dashboard-chatbot .bubble {
  min-width: 0;
  max-width: 100%;
}

.dashboard-chatbot .message-row.user .bubble {
  border-radius: var(--radius);
  background: var(--chip);
  border: 0;
  padding: 8px 20px;
}

.dashboard-chatbot .message-row.group-message .bubble {
  min-width: 0;
}

.dashboard-chatbot .message-author {
  margin: 0 0 4px;
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-chatbot .message-row.group-message.is-own .message-author {
  text-align: right;
}

.dashboard-chatbot .system-message {
  max-width: min(100%, 36rem);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}

.dashboard-chatbot .deleted-message {
  color: var(--subtle);
}

.dashboard-chatbot .message-row.assistant .bubble {
  padding: 4px 0 0;
  border: 0;
  background: transparent;
}

.dashboard-chatbot .bubble-copy {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--fg);
}

.dashboard-chatbot .bubble-copy p,
.dashboard-chatbot .bubble-copy h3,
.dashboard-chatbot .bubble-copy h4,
.dashboard-chatbot .bubble-copy ul,
.dashboard-chatbot .bubble-copy pre,
.dashboard-chatbot .bubble-copy .table-wrap {
  margin: 0;
}

.dashboard-chatbot .bubble-copy h3,
.dashboard-chatbot .bubble-copy h4 {
  color: var(--fg);
  font-weight: 900;
  line-height: 1.35;
}

.dashboard-chatbot .bubble-copy h3 {
  font-size: 1rem;
}

.dashboard-chatbot .bubble-copy h4 {
  font-size: 0.95rem;
}

.dashboard-chatbot .bubble-copy p + p,
.dashboard-chatbot .bubble-copy ul + p,
.dashboard-chatbot .bubble-copy pre + p,
.dashboard-chatbot .bubble-copy p + ul,
.dashboard-chatbot .bubble-copy ul + ul,
.dashboard-chatbot .bubble-copy pre + ul,
.dashboard-chatbot .bubble-copy p + pre,
.dashboard-chatbot .bubble-copy p + h3,
.dashboard-chatbot .bubble-copy p + h4,
.dashboard-chatbot .bubble-copy ul + h3,
.dashboard-chatbot .bubble-copy ul + h4,
.dashboard-chatbot .bubble-copy pre + h3,
.dashboard-chatbot .bubble-copy pre + h4,
.dashboard-chatbot .bubble-copy h3 + p,
.dashboard-chatbot .bubble-copy h4 + p,
.dashboard-chatbot .bubble-copy h3 + ul,
.dashboard-chatbot .bubble-copy h4 + ul {
  margin-top: 0.9em;
}

.dashboard-chatbot .bubble-copy ul {
  padding-left: 1.15rem;
}

.dashboard-chatbot .bubble-copy li + li {
  margin-top: 0.35rem;
}

.dashboard-chatbot .bubble-copy a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.dashboard-chatbot .bubble-copy code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 0.55em;
  background: rgba(0, 74, 173, 0.08);
}

/* Progress panel (developer-controlled checkpoints) */
.dashboard-chatbot .thinking-panel {
  width: 100%;
  margin: 0 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
}

.dashboard-chatbot .deep-research-panel {
  width: 100%;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 74, 173, 0.04);
  color: var(--fg);
}

.dashboard-chatbot .deep-research-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dashboard-chatbot .deep-research-head > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-chatbot .deep-research-head strong {
  font-size: 0.86rem;
  line-height: 1.3;
}

.dashboard-chatbot .deep-research-head span:not(.thinking-spinner),
.dashboard-chatbot .deep-research-meta {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.dashboard-chatbot .deep-research-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 800;
}

.dashboard-chatbot .deep-research-cancel {
  margin-top: 10px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-chatbot .deep-research-cancel:hover {
  border-color: var(--border-strong);
  background: var(--chip-hover);
  color: var(--fg);
}

.dashboard-chatbot .deep-research-sources {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.dashboard-chatbot .deep-research-sources summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.dashboard-chatbot .deep-research-sources-body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.dashboard-chatbot .deep-research-sources-body .source-card {
  box-shadow: none;
}

.dashboard-chatbot .deep-research-sources-body p {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-chatbot .thinking-toggle {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .thinking-toggle:hover {
  background: rgba(0, 74, 173, 0.04);
}

.dashboard-chatbot .thinking-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .thinking-spinner,
.dashboard-chatbot .thinking-dot {
  flex-shrink: 0;
}

.dashboard-chatbot .thinking-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(0, 74, 173, 0.18);
  border-top-color: rgba(0, 74, 173, 0.55);
  animation: thinkingSpin 0.9s linear infinite;
}

@keyframes thinkingSpin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-chatbot .thinking-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 74, 173, 0.28);
}

.dashboard-chatbot .thinking-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-chatbot .thinking-toggle-label {
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-size: 0.83rem;
  line-height: 1.15;
}

.dashboard-chatbot .thinking-toggle-meta {
  font-weight: 700;
  color: var(--subtle);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chatbot .thinking-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--subtle);
  transition: transform 0.18s ease;
}

.dashboard-chatbot .thinking-panel.is-open .thinking-chevron {
  transform: rotate(180deg);
}

.dashboard-chatbot .thinking-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.22s ease;
}

.dashboard-chatbot .thinking-panel.is-open .thinking-body {
  max-height: 260px;
  opacity: 1;
}

.dashboard-chatbot .thinking-body-inner {
  border-top: 1px solid var(--border);
  padding: 10px 12px 12px;
  max-height: 240px;
  overflow-y: auto;
}

.dashboard-chatbot .thinking-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-chatbot .thinking-step {
  display: flex;
  align-items: flex-start;
  gap: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dashboard-chatbot .thinking-step-indicator {
  display: none;
}

.dashboard-chatbot .thinking-step-text {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-chatbot .thinking-step.is-active .thinking-step-indicator {
  border-color: var(--border-strong);
  color: var(--fg);
  background: rgba(255, 102, 196, 0.12);
}

.dashboard-chatbot .thinking-step.is-active .thinking-step-text {
  color: var(--fg);
}

.dashboard-chatbot .thinking-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dashboard-chatbot .thinking-ellipsis {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dashboard-chatbot .thinking-ellipsis span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 74, 173, 0.35);
  animation: dotPulse 1s infinite ease-in-out;
}

.dashboard-chatbot .thinking-ellipsis span:nth-child(2) {
  animation-delay: 0.15s;
}

.dashboard-chatbot .thinking-ellipsis span:nth-child(3) {
  animation-delay: 0.3s;
}

.dashboard-chatbot .typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}

.dashboard-chatbot .typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 74, 173, 0.45);
  animation: dotPulse 1s infinite ease-in-out;
}

.dashboard-chatbot .typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.dashboard-chatbot .typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

.dashboard-chatbot .sources {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-chatbot .source-pill,
.dashboard-chatbot .sources-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  max-width: 100%;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.dashboard-chatbot button.source-pill,
.dashboard-chatbot button.sources-button {
  font: inherit;
  text-align: left;
}

.dashboard-chatbot .source-pill:hover,
.dashboard-chatbot .source-pill:focus-visible,
.dashboard-chatbot .sources-button:hover,
.dashboard-chatbot .sources-button:focus-visible {
  background: var(--chip);
  border-color: var(--border-strong);
  color: var(--fg);
  outline: none;
}

.dashboard-chatbot .citation-fallback-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: 0.35em;
  vertical-align: baseline;
}

.dashboard-chatbot .citation-marker {
  appearance: none;
  margin: 0 0.08em;
  padding: 0.12em 0.48em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 74, 173, 0.06);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.72em;
  font-weight: 850;
  line-height: 1.35;
  vertical-align: baseline;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .citation-marker:hover,
.dashboard-chatbot .citation-marker:focus-visible {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
  outline: none;
}

.dashboard-chatbot .source-favicon-stack {
  display: inline-flex;
  align-items: center;
  min-width: 28px;
}

.dashboard-chatbot .source-favicon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.dashboard-chatbot .source-favicon--stacked {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 0 2px #ffffff;
}

.dashboard-chatbot .source-favicon--stacked + .source-favicon--stacked,
.dashboard-chatbot .source-favicon-more {
  margin-left: -6px;
}

.dashboard-chatbot .source-favicon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-chatbot .source-favicon-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-chatbot .source-favicon-fallback.is-visible,
.dashboard-chatbot .source-favicon img[hidden] + .source-favicon-fallback {
  display: inline-flex;
}

.dashboard-chatbot .source-favicon-more {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 900;
  box-shadow: 0 0 0 2px #ffffff;
}

.dashboard-chatbot .source-sidebar {
  --sidebar-border: var(--border);
  --sidebar-fg: var(--fg);
  --sidebar-muted: var(--muted);
  --sidebar-subtle: var(--subtle);
  --sidebar-hover: var(--chip);
  --sidebar-active: rgba(0, 74, 173, 0.1);
  --sidebar-focus: var(--focus);

  min-height: 0;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #ffffff);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-chatbot .source-sidebar.is-hidden {
  display: none;
}

@media (min-width: 981px) {
  .dashboard-chatbot .source-sidebar {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    box-shadow: none;
    justify-self: stretch;
  }

  .dashboard-chatbot .source-sidebar.is-hidden {
    display: flex;
    width: var(--sidebar-rail-width);
    justify-self: end;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-sidebar-body {
    display: none;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-sidebar-head {
    height: 100%;
    padding: 12px 10px;
    border-bottom: 0;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-sidebar-head h2 {
    display: none;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-sidebar-head {
    visibility: visible;
    pointer-events: auto;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-panel-section,
  .dashboard-chatbot .source-sidebar.is-hidden .source-card-list {
    visibility: hidden;
    pointer-events: none;
  }

  .dashboard-chatbot .source-sidebar.is-hidden .source-sidebar-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
}

.dashboard-chatbot .source-sidebar-head {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-chatbot .source-sidebar-head h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--fg);
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.dashboard-chatbot .source-sidebar-toggle {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .source-sidebar-toggle:hover,
.dashboard-chatbot .source-sidebar-toggle:focus-visible {
  background: var(--chip);
  color: var(--fg);
  outline: none;
}

.dashboard-chatbot .source-sidebar-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .source-sidebar-close:hover,
.dashboard-chatbot .source-sidebar-close:focus-visible {
  background: var(--sidebar-hover);
  border-color: var(--sidebar-border);
  color: var(--sidebar-fg);
  outline: none;
}

.dashboard-chatbot .source-sidebar-toggle-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  color: currentColor;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .source-sidebar .sidebar-row {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding: 0 12px;
  gap: 10px;
  border-color: var(--sidebar-border);
}

.dashboard-chatbot .chat-app.sidebar-collapsed .source-sidebar .sidebar-row svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .source-sidebar .sidebar-row > span:not(.app-store-icon) {
  display: inline;
}

.dashboard-chatbot .chat-app.sidebar-collapsed .source-sidebar .sidebar-section-title {
  display: block;
}

.dashboard-chatbot .source-sidebar-body {
  min-height: 0;
  overflow: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-chatbot .source-sidebar-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
}

.dashboard-chatbot .source-sidebar-tab {
  min-width: 0;
  min-height: 32px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .source-sidebar-tab span:first-child {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.dashboard-chatbot .source-sidebar-tab-count {
  display: none;
}

.dashboard-chatbot .source-sidebar-tab:hover,
.dashboard-chatbot .source-sidebar-tab:focus-visible,
.dashboard-chatbot .source-sidebar-tab.is-active {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--fg);
  outline: none;
}

.dashboard-chatbot .source-sidebar-tab:focus-visible {
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .source-sidebar-tabpanels {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-chatbot .source-tab-panel {
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
}

.dashboard-chatbot .workspace-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.dashboard-chatbot .workspace-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-chatbot .workspace-panel-head h3 {
  margin: 0;
  color: var(--fg);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-chatbot .workspace-panel-head span,
.dashboard-chatbot .workspace-upload-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-chatbot .workspace-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dashboard-chatbot .workspace-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
}

.dashboard-chatbot .workspace-form input,
.dashboard-chatbot .workspace-form textarea,
.dashboard-chatbot .workspace-form select {
  width: 100%;
  min-width: 0;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--fg);
  padding: 8px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-chatbot .workspace-form textarea {
  min-height: 58px;
  resize: vertical;
}

.dashboard-chatbot .workspace-form input:focus,
.dashboard-chatbot .workspace-form textarea:focus,
.dashboard-chatbot .workspace-form select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .workspace-full {
  width: 100%;
  justify-content: center;
}

.dashboard-chatbot .source-sidebar .workspace-full,
.dashboard-chatbot .source-sidebar .workspace-upload-row .ghost-btn {
  min-height: 36px;
  font-size: 0.8rem;
  font-weight: 800;
}

.dashboard-chatbot .workspace-panel-body,
.dashboard-chatbot .source-panel-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
}

.dashboard-chatbot .workspace-action-grid {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dashboard-chatbot .workspace-accordion {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 74, 173, 0.05);
  overflow: hidden;
}

.dashboard-chatbot .workspace-accordion summary {
  min-height: 38px;
  padding: 8px 11px;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.dashboard-chatbot .workspace-accordion summary strong {
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-chatbot .workspace-accordion summary::-webkit-details-marker {
  display: none;
}

.dashboard-chatbot .workspace-accordion summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: #2f6fca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-right: 4px;
  transform: rotate(45deg);
  transition: transform 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .workspace-accordion:not([open]) summary::after {
  transform: rotate(-45deg);
}

.dashboard-chatbot .workspace-accordion summary:hover,
.dashboard-chatbot .workspace-accordion summary:focus-visible {
  background: var(--chip);
  outline: none;
}

.dashboard-chatbot .workspace-accordion summary:focus-visible {
  box-shadow: inset 0 0 0 3px var(--focus);
}

.dashboard-chatbot .workspace-accordion summary span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-chatbot .workspace-accordion summary small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
  font-weight: 800;
}

.dashboard-chatbot .workspace-accordion-body {
  padding: 0 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .workspace-upload-row,
.dashboard-chatbot .workspace-generated-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-chatbot .workspace-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .workspace-list-section {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .workspace-subhead {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-chatbot .workspace-subhead h4 {
  margin: 0;
  color: var(--fg);
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 850;
}

.dashboard-chatbot .workspace-subhead span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-chatbot .workspace-list--bounded,
.dashboard-chatbot .source-card-list--bounded {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-chatbot .workspace-item,
.dashboard-chatbot .workspace-generated {
  display: flex;
  gap: 8px;
  padding: 9px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 74, 173, 0.05);
}

.dashboard-chatbot .workspace-generated {
  flex-direction: column;
}

.dashboard-chatbot .workspace-item-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-chatbot .workspace-item-main strong,
.dashboard-chatbot .workspace-generated strong {
  color: var(--fg);
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-chatbot .workspace-item-main small {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-chatbot .workspace-item-main p,
.dashboard-chatbot .workspace-generated p,
.dashboard-chatbot .workspace-empty,
.dashboard-chatbot .workspace-error {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-chatbot .workspace-list--bounded .workspace-item-main p {
  max-height: 4.35em;
  overflow: hidden;
}

.dashboard-chatbot .workspace-item--prompt .workspace-item-main p,
.dashboard-chatbot .workspace-generated p {
  max-height: 112px;
  overflow: auto;
  white-space: pre-wrap;
}

.dashboard-chatbot .workspace-list--bounded .workspace-item--prompt .workspace-item-main p {
  max-height: 4.35em;
  overflow: hidden;
}

.dashboard-chatbot .workspace-error {
  color: var(--brand-pink);
}

.dashboard-chatbot .workspace-empty {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.dashboard-chatbot .workspace-item-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-chatbot .workspace-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.dashboard-chatbot .workspace-status.is-ready {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.dashboard-chatbot .workspace-status.is-processing {
  border-color: rgba(0, 74, 173, 0.24);
  background: rgba(0, 74, 173, 0.08);
  color: var(--fg);
}

.dashboard-chatbot .workspace-status.is-failed {
  border-color: rgba(255, 102, 196, 0.3);
  background: rgba(255, 102, 196, 0.08);
  color: var(--brand-pink);
}

.dashboard-chatbot .source-panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-chatbot .source-panel-heading {
  margin: 0;
  color: var(--fg);
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.dashboard-chatbot .source-empty {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.dashboard-chatbot .source-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-chatbot .source-card {
  display: block;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 74, 173, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-chatbot .source-card--link {
  cursor: pointer;
}

.dashboard-chatbot .source-card--link:hover,
.dashboard-chatbot .source-card--link:focus-visible {
  background: var(--panel);
  border-color: var(--border-strong);
  box-shadow: 0 14px 28px rgba(0, 74, 173, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.dashboard-chatbot .source-card.is-highlighted {
  border-color: var(--brand-pink);
  background: rgba(255, 102, 196, 0.08);
  box-shadow: 0 0 0 4px var(--focus), 0 10px 24px rgba(0, 74, 173, 0.08);
}

.dashboard-chatbot .source-card-domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-chatbot .source-card-title {
  min-width: 0;
  margin: 10px 0 0;
  color: var(--fg);
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 850;
  word-break: break-word;
}

.dashboard-chatbot .source-domain {
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .source-card-preview {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.dashboard-chatbot .source-open-link {
  display: inline-flex;
  margin-top: 9px;
  color: var(--fg);
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 850;
}

.dashboard-chatbot .source-open-link.is-missing {
  color: var(--subtle);
}

.dashboard-chatbot .source-sidebar-backdrop {
  display: none;
}

.dashboard-chatbot .artifact-card {
  margin-top: 14px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(0, 74, 173, 0.08);
}

.dashboard-chatbot .artifact-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--chip);
  border: 1px solid var(--border);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.dashboard-chatbot .artifact-icon svg {
  width: 19px;
  height: 19px;
}

.dashboard-chatbot .artifact-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-chatbot .artifact-copy strong,
.dashboard-chatbot .artifact-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .artifact-copy strong {
  color: var(--fg);
  font-size: 0.86rem;
  font-weight: 900;
}

.dashboard-chatbot .artifact-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.dashboard-chatbot .artifact-download-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.dashboard-chatbot .artifact-download-btn:hover,
.dashboard-chatbot .artifact-download-btn:focus-visible {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  outline: none;
}

.dashboard-chatbot .artifact-download-btn[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.dashboard-chatbot .artifact-card.is-error {
  border-color: rgba(255, 102, 196, 0.34);
}

.dashboard-chatbot .artifact-card.is-error .artifact-copy small {
  color: var(--brand-pink);
}

.dashboard-chatbot .followup-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-chatbot .followup-btn {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-chatbot .followup-btn:hover {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .reaction-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-chatbot .reaction-btn {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.dashboard-chatbot .reaction-btn:hover,
.dashboard-chatbot .reaction-btn.is-active {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .message-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-chatbot .message-row.user .message-actions {
  justify-content: flex-end;
}

.dashboard-chatbot .prompt-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 100%;
  min-width: 0;
}

.dashboard-chatbot .prompt-actions {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.14s ease 0.25s,
    transform 0.14s ease 0.25s,
    visibility 0s linear 0.39s;
  z-index: 5;
}

.dashboard-chatbot .prompt-wrap:hover .prompt-actions,
.dashboard-chatbot .prompt-wrap:focus-within .prompt-actions,
.dashboard-chatbot .message-row.user.is-editing .prompt-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.dashboard-chatbot .prompt-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.dashboard-chatbot .prompt-action-btn svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .prompt-action-btn:hover,
.dashboard-chatbot .prompt-action-btn:focus-visible {
  background: var(--chip);
  color: var(--fg);
  outline: none;
}

.dashboard-chatbot .prompt-action-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-chatbot .msg-icon-btn[data-tooltip],
.dashboard-chatbot .prompt-action-btn[data-tooltip] {
  position: relative;
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]::before,
.dashboard-chatbot .msg-icon-btn[data-tooltip]::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0s linear 0.14s;
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  top: calc(100% + 10px);
  z-index: 40;
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 74, 173, 0.14);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -4px);
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]::before {
  content: "";
  top: calc(100% + 5px);
  z-index: 41;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  background: #ffffff;
  transform: translate(-50%, -4px) rotate(45deg);
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]:hover::before,
.dashboard-chatbot .msg-icon-btn[data-tooltip]:hover::after,
.dashboard-chatbot .msg-icon-btn[data-tooltip]:focus-visible::before,
.dashboard-chatbot .msg-icon-btn[data-tooltip]:focus-visible::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:hover::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:hover::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:focus-visible::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]:hover::after,
.dashboard-chatbot .msg-icon-btn[data-tooltip]:focus-visible::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:hover::after,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.dashboard-chatbot .msg-icon-btn[data-tooltip]:hover::before,
.dashboard-chatbot .msg-icon-btn[data-tooltip]:focus-visible::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:hover::before,
.dashboard-chatbot .prompt-action-btn[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

@media (hover: none) {
  .dashboard-chatbot .prompt-actions {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    margin-top: 10px;
    transition: none;
    flex-wrap: wrap;
  }
}

.dashboard-chatbot .prompt-edit-shell {
  display: block;
}

.dashboard-chatbot .prompt-edit-textarea {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  padding: 0;
  border: 0;
  outline: none;
  box-shadow: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
}

.dashboard-chatbot .prompt-edit-textarea:focus {
  outline: none;
  box-shadow: none;
}

.dashboard-chatbot .msg-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border-color: transparent;
  color: var(--muted);
}

.dashboard-chatbot .msg-icon-btn svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .msg-icon-btn:hover {
  background: var(--chip);
  color: var(--fg);
}

.dashboard-chatbot .message-meta {
  color: var(--subtle);
  font-size: 0.72rem;
  margin-left: 6px;
}

/* Code + tables */
.dashboard-chatbot .code-block-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.dashboard-chatbot .code-block-wrap pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
}

.dashboard-chatbot .code-block-wrap code {
  display: block;
  font-size: 0.85rem;
  line-height: 1.55;
}

.dashboard-chatbot .code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
}

.dashboard-chatbot .code-copy-btn:hover {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-chatbot .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.dashboard-chatbot .table-wrap th,
.dashboard-chatbot .table-wrap td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.dashboard-chatbot .table-wrap th {
  color: var(--fg);
  background: rgba(0, 74, 173, 0.04);
  font-weight: 900;
}

/* Footer composer */
.dashboard-chatbot .thread-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 16px 16px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  margin-top: auto;
}

.dashboard-chatbot .thread-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}

.dashboard-chatbot .scroll-to-bottom {
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.dashboard-chatbot .scroll-to-bottom:hover {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .scroll-to-bottom:disabled {
  opacity: 0;
  pointer-events: none;
}

.dashboard-chatbot .composer-shell {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-chatbot .attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-chatbot .attachment-tray.is-hidden {
  display: none;
}

.dashboard-chatbot .composer-mode-tray {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-chatbot .composer-mode-tray.is-hidden {
  display: none;
}

.dashboard-chatbot .composer-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 74, 173, 0.07);
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-chatbot .composer-mode-pill svg {
  width: 16px;
  height: 16px;
}

.dashboard-chatbot .composer-mode-close {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  cursor: pointer;
}

.dashboard-chatbot .composer-mode-close:hover {
  background: var(--chip-hover);
  color: var(--fg);
}

.dashboard-chatbot .attachment-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.dashboard-chatbot .attachment-pill span {
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--subtle);
}

.dashboard-chatbot .attachment-pill strong {
  font-weight: 900;
  color: var(--fg);
  max-width: min(42vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .attachment-pill small {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .attachment-pill::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--attachment-progress, 0%);
  height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-pink));
  opacity: 0;
  transition: width 0.18s ease, opacity 0.18s ease;
}

.dashboard-chatbot .attachment-pill--queued,
.dashboard-chatbot .attachment-pill--uploading {
  border-color: var(--border-strong);
}

.dashboard-chatbot .attachment-pill--queued::after,
.dashboard-chatbot .attachment-pill--uploading::after {
  opacity: 1;
}

.dashboard-chatbot .attachment-pill--error,
.dashboard-chatbot .attachment-pill--canceled {
  border-color: rgba(255, 102, 196, 0.34);
}

.dashboard-chatbot .attachment-pill--error small,
.dashboard-chatbot .attachment-pill--canceled small {
  color: var(--brand-pink);
}

.dashboard-chatbot .attachment-pill .attachment-remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.dashboard-chatbot .attachment-pill .attachment-remove:hover {
  background: var(--chip-hover);
  border-color: var(--border-strong);
  color: var(--fg);
}

.dashboard-chatbot .composer {
  width: 100%;
  margin: 0;
  padding: 10px;
  border-radius: 34px;
  border: 1.5px solid rgba(0, 74, 173, 0.16);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 74, 173, 0.12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.dashboard-chatbot .composer:hover {
  border-color: rgba(0, 74, 173, 0.22);
}

.dashboard-chatbot .search-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  min-width: 0;
}

.dashboard-chatbot .search-shell::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-pink);
  box-shadow: 0 0 0 5px rgba(255, 102, 196, 0.12);
  flex: 0 0 auto;
}

.dashboard-chatbot .composer-utils {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}

.dashboard-chatbot .composer-plus-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.dashboard-chatbot .composer-tool-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 45;
  width: min(260px, calc(100vw - 32px));
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(0, 74, 173, 0.16);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-chatbot .composer-tool-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dashboard-chatbot .composer-tool-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-chatbot .composer-tool-menu-item:hover,
.dashboard-chatbot .composer-tool-menu-item:focus-visible {
  background: var(--chip);
  outline: none;
}

.dashboard-chatbot .composer-tool-menu-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.dashboard-chatbot .composer:focus-within {
  border-color: rgba(0, 74, 173, 0.28);
  box-shadow: 0 0 0 4px var(--focus), 0 18px 40px rgba(0, 74, 173, 0.12);
}

.dashboard-chatbot .composer-shell.is-dragging::before {
  content: "Drop files to attach";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-chatbot .composer-shell.is-dragging .composer {
  border-color: rgba(0, 74, 173, 0.28);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 4px var(--focus), 0 18px 40px rgba(0, 74, 173, 0.12);
}

.dashboard-chatbot .composer-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.dashboard-chatbot .composer-icon:hover {
  background: var(--chip);
  color: var(--fg);
}

.dashboard-chatbot .composer textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 64px;
  max-height: 160px;
  padding: 19px 0;
  border: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-chatbot .composer #composerInput:focus,
.dashboard-chatbot .composer #composerInput:focus-visible,
.dashboard-chatbot .composer textarea:focus,
.dashboard-chatbot .composer textarea:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

.dashboard-chatbot .composer textarea::placeholder {
  color: #8aa0bf;
  opacity: 1;
}

.dashboard-chatbot .composer-send,
.dashboard-chatbot .composer-cancel {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--brand-pink);
  background: var(--brand-pink);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(255, 102, 196, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.dashboard-chatbot .composer-send svg,
.dashboard-chatbot .composer-cancel svg {
  width: 22px;
  height: 22px;
}

.dashboard-chatbot .composer-send:hover,
.dashboard-chatbot .composer-send:focus-visible,
.dashboard-chatbot .composer-cancel:hover,
.dashboard-chatbot .composer-cancel:focus-visible {
  transform: translateY(-1px);
  background: #f04fb7;
  border-color: #f04fb7;
  box-shadow: 0 22px 44px rgba(255, 102, 196, 0.28);
}

.dashboard-chatbot .composer-send[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 12px 24px rgba(255, 102, 196, 0.14);
}

.dashboard-chatbot .stop-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #ffffff;
}

.dashboard-chatbot .composer-tool {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 74, 173, 0.12);
  background: rgba(247, 250, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f75a0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dashboard-chatbot .composer-tool svg {
  width: 18px;
  height: 18px;
}

.dashboard-chatbot .composer-tool:hover,
.dashboard-chatbot .composer-tool:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 102, 196, 0.38);
  background: rgba(255, 102, 196, 0.08);
  color: var(--brand-pink);
  box-shadow: 0 12px 26px rgba(255, 102, 196, 0.14);
  outline: none;
}

.dashboard-chatbot .composer-tool[disabled],
.dashboard-chatbot .composer-tool-menu-item[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dashboard-chatbot .composer-tool.is-recording {
  border-color: rgba(255, 102, 196, 0.8);
  background: rgba(255, 102, 196, 0.16);
  color: var(--brand-pink);
}

.dashboard-chatbot .composer .aux-label {
  display: none !important;
}

.dashboard-chatbot .composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-chatbot .status-line {
  color: var(--muted);
  font-size: 0.74rem;
}

.dashboard-chatbot .status-line.is-error {
  color: var(--brand-pink);
}

.dashboard-chatbot .chat-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.dashboard-chatbot .chat-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-chatbot .chat-modal {
  width: min(460px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(0, 74, 173, 0.18);
  padding: 18px;
  color: var(--fg);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.14s ease;
}

.dashboard-chatbot .chat-modal-backdrop.is-open .chat-modal {
  transform: translateY(0) scale(1);
}

.dashboard-chatbot .chat-modal-head h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.dashboard-chatbot .chat-modal-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.dashboard-chatbot .chat-modal-body p {
  margin: 0;
}

.dashboard-chatbot .chat-modal-link {
  color: var(--fg);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-chatbot .chat-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-chatbot .ghost-btn.danger {
  color: var(--brand-pink);
  border-color: rgba(255, 102, 196, 0.32);
}

.dashboard-chatbot .chat-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-chatbot .chat-field input,
.dashboard-chatbot .chat-field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--fg);
  padding: 10px 12px;
  font: inherit;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-chatbot .chat-field textarea {
  min-height: 84px;
  resize: vertical;
}

.dashboard-chatbot .chat-field input:focus,
.dashboard-chatbot .chat-field textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.dashboard-chatbot .member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .group-email-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.dashboard-chatbot .group-email-invite .btn-chip {
  min-height: 42px;
  padding-inline: 16px;
}

@media (max-width: 560px) {
  .dashboard-chatbot .group-email-invite {
    grid-template-columns: 1fr;
  }
}

.dashboard-chatbot .member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--chip);
}

.dashboard-chatbot .member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  font-weight: 900;
  flex: 0 0 auto;
}

.dashboard-chatbot .member-meta {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.dashboard-chatbot .member-meta strong,
.dashboard-chatbot .member-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .member-meta strong {
  color: var(--fg);
  font-size: 0.88rem;
}

.dashboard-chatbot .member-meta small,
.dashboard-chatbot .safety-note,
.dashboard-chatbot .privacy-note,
.dashboard-chatbot .toggle-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.dashboard-chatbot .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--chip);
}

.dashboard-chatbot .toggle-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.dashboard-chatbot .toggle-row strong {
  color: var(--fg);
  font-size: 0.9rem;
}

.dashboard-chatbot .toggle-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--brand-blue);
}

.dashboard-chatbot .project-file-panel,
.dashboard-chatbot .project-instructions-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-chatbot .project-file-toolbar {
  display: flex;
  justify-content: flex-start;
}

.dashboard-chatbot .project-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-chatbot .project-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--chip);
}

.dashboard-chatbot .project-file-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-chatbot .project-file-meta strong,
.dashboard-chatbot .project-file-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chatbot .project-file-meta strong {
  color: var(--fg);
  font-size: 0.88rem;
}

.dashboard-chatbot .project-file-meta small,
.dashboard-chatbot .project-empty-state {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.dashboard-chatbot .project-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.dashboard-chatbot .project-file-detail pre {
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Sidebar shell */
.dashboard-chatbot .sidebar-backdrop {
  display: none;
}

.dashboard-chatbot .mobile-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  position: relative;
  z-index: 10;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dashboard-chatbot .sidebar-toggle-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  color: currentColor;
}

.dashboard-chatbot .mobile-close:hover,
.dashboard-chatbot .mobile-close:focus-visible {
  background: var(--sidebar-hover);
  border-color: var(--sidebar-border);
  color: var(--sidebar-fg);
  outline: none;
}

@media (max-width: 980px) {
  .dashboard-chatbot .chat-app {
    --sidebar-width: min(300px, calc(100vw - 24px));
    --sidebar-rail-width: 72px;
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-chatbot .chat-app.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-chatbot .drawer-btn {
    display: inline-flex !important;
  }

  .dashboard-chatbot .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 140;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition: width 0.22s ease, transform 0.22s ease, opacity 0.18s ease, border-color 0.18s ease;
    box-shadow: 18px 0 44px rgba(0, 74, 173, 0.16);
  }

  .dashboard-chatbot .chat-app.sidebar-collapsed .sidebar {
    width: var(--sidebar-width);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    overflow: hidden;
    z-index: 140;
  }

  .dashboard-chatbot .main-pane {
    grid-column: 1;
  }

  .dashboard-chatbot .chat-app.sidebar-open .sidebar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .dashboard-chatbot .mobile-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    color: var(--muted);
    font-size: 1.1rem;
  }

  .dashboard-chatbot .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .dashboard-chatbot .chat-app:not(.sidebar-collapsed) .sidebar-backdrop,
  .dashboard-chatbot .chat-app.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .dashboard-chatbot .files-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-chatbot .files-head-actions,
  .dashboard-chatbot .candidate-toolbar {
    justify-content: flex-start;
  }

  .dashboard-chatbot .files-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chatbot .files-queue-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-chatbot .files-queue-status {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-chatbot .candidate-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-chatbot .candidate-compare-card dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-chatbot .project-file-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-chatbot .project-file-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-chatbot .chat-app.source-sidebar-open,
  .dashboard-chatbot .chat-app.sidebar-collapsed.source-sidebar-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-chatbot .source-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 140;
    width: min(380px, calc(100vw - 24px));
    max-width: 100%;
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 44px rgba(0, 74, 173, 0.16);
  }

  .dashboard-chatbot .source-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .dashboard-chatbot .chat-app.source-sidebar-open .source-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 980px) {
  .dashboard-chatbot .source-sidebar-head {
    min-height: 61px;
  }

  .dashboard-chatbot .thread-head {
    padding: 10px 12px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-chatbot .thread-titles {
    flex: 1 1 auto;
    gap: 8px;
  }

  .dashboard-chatbot .product-topbar-brand {
    grid-template-columns: 40px minmax(0, auto);
    gap: 8px;
  }

  .dashboard-chatbot .product-brand-copy strong {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-chatbot .drawer-btn {
    flex: 0 0 40px;
    border-radius: 999px;
  }

  .dashboard-chatbot .group-header,
  .dashboard-chatbot .project-header {
    flex: 1 1 auto;
  }

  .dashboard-chatbot .model-selector-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px 0 12px;
    gap: 8px;
  }

  .dashboard-chatbot .thread-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .dashboard-chatbot .drawer-btn,
  .dashboard-chatbot .icon-btn {
    width: 40px;
    height: 40px;
  }

  .dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::before,
  .dashboard-chatbot .thread-actions .icon-btn[data-tooltip]::after {
    display: none;
  }

  .dashboard-chatbot .chat-scroll {
    padding-top: 14px;
    scrollbar-gutter: auto;
  }

  .dashboard-chatbot .chat-app.is-empty .hero-state {
    padding: 0 12px;
  }

  .dashboard-chatbot .hero-state h2 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.14;
    text-align: center;
  }

  .dashboard-chatbot .thread-footer {
    padding: 12px 12px max(10px, env(safe-area-inset-bottom));
  }

  .dashboard-chatbot .composer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 26px;
    box-shadow: 0 16px 34px rgba(0, 74, 173, 0.12);
  }

  .dashboard-chatbot .search-shell {
    gap: 12px;
    padding: 0 10px;
  }

  .dashboard-chatbot .search-shell::before {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 5px rgba(255, 102, 196, 0.11);
  }

  .dashboard-chatbot .composer textarea {
    min-height: 52px;
    padding: 14px 0;
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .dashboard-chatbot .composer-utils {
    justify-content: flex-start;
    gap: 8px;
    padding: 2px 0 0;
  }

  .dashboard-chatbot .composer-icon,
  .dashboard-chatbot .composer-tool,
  .dashboard-chatbot .composer-cancel {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 999px;
  }

  .dashboard-chatbot .composer-send,
  .dashboard-chatbot .composer-cancel {
    width: 100%;
    min-height: 54px;
    border-radius: 999px;
  }

  .dashboard-chatbot .attachment-pill strong {
    max-width: min(56vw, 240px);
  }

  .dashboard-chatbot .chat-modal-backdrop {
    align-items: flex-end;
    padding: 10px;
  }

  .dashboard-chatbot .chat-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .dashboard-chatbot .source-sidebar-head {
    min-height: 55px;
    padding: 8px 10px;
  }

  .dashboard-chatbot .thread-head {
    padding: 8px 10px;
    gap: 6px;
  }

  .dashboard-chatbot .thread-titles {
    gap: 6px;
  }

  .dashboard-chatbot .thread-actions {
    gap: 5px;
  }

  .dashboard-chatbot .product-topbar-brand {
    grid-template-columns: 38px minmax(0, auto);
    gap: 6px;
  }

  .dashboard-chatbot .product-brand-link {
    padding: 0 4px;
  }

  .dashboard-chatbot .product-brand-link img {
    width: 28px;
    height: 28px;
  }

  .dashboard-chatbot .product-brand-copy strong {
    display: none;
  }

  .dashboard-chatbot .workspace-top-label {
    display: none;
  }

  .dashboard-chatbot .drawer-btn,
  .dashboard-chatbot .icon-btn {
    width: 38px;
    height: 38px;
  }

  .dashboard-chatbot .model-selector-btn {
    height: 38px;
    padding: 0 8px 0 10px;
    gap: 6px;
    font-size: 0.9rem;
  }

  .dashboard-chatbot .model-selector-chevron {
    width: 16px;
    height: 16px;
  }

  .dashboard-chatbot .composer {
    gap: 8px;
    padding: 10px;
    border-radius: 24px;
  }

  .dashboard-chatbot .composer textarea {
    min-height: 50px;
    padding: 14px 0;
    font-size: 0.88rem;
  }

  .dashboard-chatbot .composer-icon,
  .dashboard-chatbot .composer-tool,
  .dashboard-chatbot .composer-cancel {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .dashboard-chatbot .composer-send,
  .dashboard-chatbot .composer-cancel {
    width: 100%;
    min-height: 52px;
  }
}

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

.review {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.review:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 46px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.person strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
}

.person span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 3px;
}

.review .stars {
  color: #f59e0b;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.quote {
  color: #334155;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 16px;
}

.date {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(14, 165, 233, 0.16);
  padding: 7px 10px;
  border-radius: 999px;
}

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

@media (max-width: 640px) {
  .rev-head {
    gap: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .reviews-section .reviews {
    grid-template-columns: 1fr;
  }

  .review {
    padding: 19px;
    border-radius: 18px;
  }
}
