.appbot-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--wk-color-bg, #fff);
}

.appbot-page-header {
  flex-shrink: 0;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--wk-color-border, #f0f0f0);
}

.appbot-page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--wk-color-text, #1f2937);
  margin-bottom: 10px;
}

.appbot-search-input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--wk-color-text, #1f2937);
  background: var(--wk-color-bg-subtle, #f3f4f6);
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}

.appbot-search-input:focus {
  border-color: var(--wk-color-primary, #5b6abf);
  background: var(--wk-color-bg, #fff);
}

.appbot-page-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.appbot-list-section {
  margin-bottom: 4px;
}

.appbot-list-section-title {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wk-color-text-tertiary, #9ca3af);
}

.appbot-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.appbot-list-item:hover {
  background: var(--wk-color-bg-hover, #f9fafb);
}

.appbot-page .appbot-list-item.appbot-list-item-active {
  background: var(--wk-color-primary-light, #eef2ff);
}

.appbot-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #6366f1;
}

.appbot-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appbot-list-avatar .wk-avatar {
  border-radius: var(--wk-r-sm, 10px);
}

.appbot-list-info {
  flex: 1;
  min-width: 0;
}

.appbot-list-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--wk-color-text, #1f2937);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.appbot-list-desc {
  font-size: 12px;
  color: var(--wk-color-text-secondary, #6b7280);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  margin-top: 2px;
}

.appbot-list-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 16px;
  font-size: 13px;
  color: var(--wk-color-text-secondary, #6b7280);
}

.appbot-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--wk-color-border, #e5e7eb);
  border-top-color: var(--wk-color-primary, #5b6abf);
  animation: appbot-spin 0.8s linear infinite;
}

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

.appbot-retry-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--wk-color-border, #d1d5db);
  border-radius: 4px;
  background: var(--wk-color-bg, #fff);
  color: var(--wk-color-text, #374151);
  cursor: pointer;
}

.appbot-retry-btn:hover {
  border-color: var(--wk-color-primary, #5b6abf);
  color: var(--wk-color-primary, #5b6abf);
}

/* Bot chat header — direct render, no SDK dependency */
.appbot-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--wk-color-border, #f0f0f0);
  background: var(--wk-color-bg, #fff);
  flex-shrink: 0;
}

.appbot-chat-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.appbot-chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appbot-chat-header-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--wk-color-text, #1f2937);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Wrap Conversation component with our header */
.appbot-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
