/* WeKnora Native Design System — Ticket-Lite Workbench (v4.0) */
:root {
  --td-brand-color: #07c05f;
  --td-brand-color-hover: #06ad55;
  --td-brand-color-active: #059649;
  --td-brand-color-light: rgba(7, 192, 95, 0.10);
  --td-brand-color-soft: #eefaf2;

  --td-bg-color-page: #f9f9f9;
  --td-bg-color-container: #ffffff;
  --td-bg-color-secondarycontainer: #f3f3f3;
  --td-bg-color-container-hover: #efefef;

  --td-text-color-primary: #1d2129;
  --td-text-color-secondary: #4e5969;
  --td-text-color-placeholder: #86909c;
  --td-text-color-disabled: #c9cdd4;

  --td-component-stroke: #e7e7e7;
  --td-component-border: #dcdcdc;

  --td-error-color: #e34d59;
  --td-warning-color: #ed7b2f;
  --td-success-color: #07c05f;

  --app-radius-sm: 6px;
  --app-radius-md: 8px;
  --app-radius-lg: 10px;
  --app-radius-xl: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--td-bg-color-container);
  color: var(--td-text-color-primary);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==================== 整体布局 ==================== */
.wk-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--td-bg-color-container);
}

/* ==================== 一级左侧导航栏（精简 4 项） ==================== */
.wk-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #f9f9f9;
  border-right: 1px solid var(--td-component-stroke);
  display: flex;
  flex-direction: column;
  height: 100%;
  user-select: none;
}

.wk-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 14px 10px;
}

.wk-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(7, 192, 95, 0.22);
  flex-shrink: 0;
  overflow: hidden;
}

.wk-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wk-logo-lg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 14px rgba(7, 192, 95, 0.26);
}

.wk-brand-Text {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.wk-brand-title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1d2129;
}

.wk-brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--td-brand-color);
  background: var(--td-brand-color-light);
  padding: 1px 6px;
  border-radius: 4px;
}

.wk-workspace-box {
  margin: 4px 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--td-text-color-primary);
}

.wk-workspace-box .wk-icon {
  color: var(--td-brand-color);
  flex-shrink: 0;
}

.wk-workspace-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-nav {
  flex: 1;
  padding: 4px 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wk-nav-section {
  padding: 8px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--td-text-color-placeholder);
}

.wk-nav-item {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: none;
  border-radius: var(--app-radius-md);
  background: transparent;
  color: var(--td-text-color-primary);
  font: inherit;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wk-nav-item:hover {
  background: var(--td-bg-color-container-hover);
}

.wk-nav-item.active {
  background: rgba(7, 192, 95, 0.11);
  color: var(--td-brand-color);
  font-weight: 600;
}

.wk-nav-item span:nth-child(2) {
  flex: 1;
}

.wk-nav-count {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(7, 192, 95, 0.14);
  color: var(--td-brand-color);
}

.wk-nav-count-warn {
  background: rgba(237, 123, 47, 0.16);
  color: var(--td-warning-color);
}

.wk-nav-count-neutral {
  background: #eaeaea;
  color: var(--td-text-color-secondary);
}

.wk-sidebar-footer {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--td-component-stroke);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-back-weknora {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--app-radius-sm);
  color: var(--td-text-color-secondary);
  text-decoration: none;
  font-size: 12.5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.wk-back-weknora:hover {
  background: var(--td-bg-color-container-hover);
  color: var(--td-brand-color);
}

.wk-user-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--app-radius-md);
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
}

.wk-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--td-brand-color);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wk-user-meta {
  flex: 1;
  min-width: 0;
}

.wk-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-user-role {
  font-size: 11px;
  color: var(--td-text-color-placeholder);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-btn-link {
  border: none;
  background: transparent;
  color: var(--td-brand-color);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
}

.wk-btn-link:hover {
  text-decoration: underline;
}

/* ==================== 右侧主内容区 ==================== */
.wk-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--td-bg-color-container);
}

.wk-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.wk-view.active {
  display: flex;
}

.wk-page-header {
  padding: 16px 24px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  border-bottom: 1px solid var(--td-component-stroke);
  flex-shrink: 0;
}

.wk-page-header > div:first-child {
  flex: 1 1 320px;
  min-width: 280px;
}

.wk-page-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-page-desc {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 3px;
}

.wk-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.wk-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--app-radius-sm);
  border: 1px solid var(--td-component-stroke);
  background: #fafafa;
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wk-checkbox-inline:hover {
  border-color: #9be5be;
  background: #f5fcf7;
}

.wk-checkbox-inline input[type="checkbox"] {
  accent-color: var(--td-brand-color);
  cursor: pointer;
}

.wk-filter-select {
  width: 142px !important;
  flex-shrink: 0;
}

.wk-search-box {
  position: relative;
  width: 216px;
  flex-shrink: 0;
}

.wk-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--td-text-color-placeholder);
  pointer-events: none;
}

.wk-search-input {
  width: 100% !important;
  padding-left: 30px !important;
}

.wk-target-kb-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--app-radius-sm);
  border: 1px solid rgba(7, 192, 95, 0.28);
  background: #f3fcf6;
  color: var(--td-text-color-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wk-target-kb-pill:hover {
  border-color: var(--td-brand-color);
  background: #e8f9ef;
}

.wk-target-kb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--td-brand-color);
  flex-shrink: 0;
}

/* ==================== 胶囊筛选栏与态势工具条 ==================== */
.wk-workbench-toolbar {
  padding: 12px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.wk-pill-tabs {
  padding: 3px;
  border-radius: var(--app-radius-md);
  background: var(--td-bg-color-secondarycontainer);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  align-self: flex-start;
  flex-shrink: 0;
}

.wk-pill {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--app-radius-sm);
  background: transparent;
  color: var(--td-text-color-secondary);
  font: inherit;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.wk-pill:hover {
  color: var(--td-text-color-primary);
}

.wk-pill.active {
  background: #ffffff;
  color: var(--td-brand-color);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wk-pill-count {
  padding: 0 6px;
  min-width: 18px;
  height: 17px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--td-text-color-secondary);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wk-pill.active .wk-pill-count {
  background: rgba(7, 192, 95, 0.14);
  color: var(--td-brand-color);
}

.wk-pill-count--danger {
  background: rgba(227, 77, 89, 0.14) !important;
  color: var(--td-error-color) !important;
}

.wk-workbench-kpis {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--td-text-color-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.wk-kpi-chip strong {
  font-weight: 700;
  color: var(--td-text-color-primary);
}

.wk-kpi-chip--blue {
  background: #eef4ff;
  color: #1d4ed8;
}

.wk-kpi-chip--blue strong {
  color: #1d4ed8;
}

.wk-kpi-chip--red {
  background: #fff1f2;
  color: #e11d48;
}

.wk-kpi-chip--red strong {
  color: #e11d48;
}

/* ==================== 工单与 FAQ 双栏工作台 ==================== */
.wk-workbench {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  padding: 12px 28px 20px;
  overflow: hidden;
  background: #fbfbfb;
  margin-top: 10px;
}

.wk-ticket-list-panel {
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.wk-list-panel-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--td-component-stroke);
  background: #fcfcfd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.wk-list-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-list-panel-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--td-text-color-secondary);
  font-size: 11.5px;
  font-weight: 500;
}

.wk-ticket-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-ticket-item {
  padding: 12px 14px;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wk-ticket-item:hover {
  border-color: #9be5be;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wk-ticket-item.active {
  border-color: var(--td-brand-color);
  background: #f4fcf7;
  box-shadow: 0 2px 10px rgba(7, 192, 95, 0.08);
}

.wk-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.wk-item-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--td-text-color-secondary);
}

.wk-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wk-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--td-text-color-placeholder);
}

.wk-ticket-detail {
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-lg);
  padding: 18px 22px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ==================== 工单详情内部组件（双栏重构版） ==================== */
.wk-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--td-component-stroke);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.wk-detail-header-main {
  min-width: 0;
  flex: 1;
}

.wk-detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.wk-detail-summary {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  line-height: 1.4;
  word-break: break-word;
}

.wk-verify-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--app-radius-md);
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  font-size: 12px;
}

.wk-verify-box--ai {
  background: #faf5ff;
  border-color: #e9d5ff;
}

.wk-verify-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #165dff;
  letter-spacing: 0.06em;
}

/* 快捷动作条 */
.wk-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--app-radius-md);
  background: #f4fcf7;
  border: 1px solid #cdeed9;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.wk-stage-bar--ai {
  background: linear-gradient(90deg, #faf5ff 0%, #f4fcf7 100%);
  border-color: #e2d4f0;
}

.wk-stage-info {
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wk-stage-desc {
  color: #64748b;
}

.wk-stage-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Outbox 通知投递状态横幅 */
.wk-outbox-banner {
  padding: 10px 14px;
  border-radius: var(--app-radius-md);
  background: #fff7e8;
  border: 1px solid #ffd591;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  flex-shrink: 0;
}

.wk-outbox-banner.ok {
  background: #f6ffed;
  border-color: #b7eb8f;
}

/* 双栏主网格：左主工作区 + 右侧画像与审计轴 */
.wk-detail-grid {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 1280px) {
  .wk-detail-grid {
    grid-template-columns: 1fr;
  }
  .wk-chat-card,
  .wk-aside-timeline-card {
    height: auto;
  }
  .wk-chat-stream,
  .wk-vtimeline {
    max-height: 400px;
  }
}

.wk-detail-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.wk-detail-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

/* ==================== 结构化对话气泡流卡片 ==================== */
.wk-chat-card {
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  background: #ffffff;
  overflow: hidden;
  flex: 1 1 0;
  height: 0;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.wk-chat-card-head {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--td-component-stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.wk-chat-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-chat-turn-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
}

.wk-chat-stream {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  background: #fbfcfe;
}

.wk-chat-bubble {
  border-radius: 8px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.wk-chat-bubble--user {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left: 3px solid #3b82f6;
}

.wk-chat-bubble--ai {
  background: #f6fef9;
  border-color: #d1fae5;
  border-left: 3px solid var(--td-brand-color);
}

.wk-chat-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.wk-chat-role {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--td-text-color-primary);
}

.wk-chat-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #e2e8f0;
}

.wk-chat-avatar.ai {
  background: #dcfce7;
}

.wk-chat-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
}

.wk-chat-time {
  font-size: 11px;
  color: #94a3b8;
}

.wk-chat-bubble-body {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.6;
}

.wk-md-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 6px 0 4px;
}

.wk-md-para {
  margin: 2px 0;
  word-break: break-word;
}

.wk-md-spacer {
  height: 6px;
}

.wk-md-list-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 3px 0;
  padding-left: 2px;
}

.wk-md-bullet {
  color: var(--td-brand-color);
  font-weight: 700;
  flex-shrink: 0;
}

.wk-md-num {
  color: #0f766e;
  font-weight: 600;
  min-width: 18px;
  flex-shrink: 0;
}

.wk-md-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f766e;
}

.wk-chat-citations {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed #bbf7d0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.wk-chat-cite-label {
  font-size: 11.5px;
  color: #15803d;
  font-weight: 500;
}

.wk-chat-cite-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-weight: 500;
}

/* ==================== 多功能处置工作区（4 Tabs 升级） ==================== */
.wk-composer-card {
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.wk-composer-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid var(--td-component-stroke);
  overflow-x: auto;
}

.wk-composer-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--td-text-color-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.wk-composer-tab:hover {
  color: var(--td-text-color-primary);
  background: rgba(255, 255, 255, 0.6);
}

.wk-composer-tab.active {
  color: var(--td-brand-color);
  border-bottom-color: var(--td-brand-color);
  background: #ffffff;
  font-weight: 600;
}

.wk-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--td-brand-color);
}

.wk-composer-pane {
  display: none;
  padding: 14px 16px;
}

.wk-composer-pane.active {
  display: block;
}

.wk-quick-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.wk-quick-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.wk-quick-chip,
.wk-handover-reason-chip {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wk-quick-chip:hover,
.wk-handover-reason-chip:hover {
  border-color: var(--td-brand-color);
  background: #f0fdf4;
  color: #15803d;
}

.wk-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.wk-composer-foot-left,
.wk-composer-foot-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Tab 2：可视化状态选择卡片网格 */
.wk-status-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.wk-status-card-opt {
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wk-status-card-opt:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.wk-status-card-opt.active {
  border-color: var(--td-brand-color);
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
}

.wk-status-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 12.5px;
  color: #0f172a;
}

.wk-status-card-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: #94a3b8;
}

.wk-status-card-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

/* Tab 3：转交顾问负载卡片网格 */
.wk-handover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.wk-handover-member-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wk-handover-member-card:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.wk-handover-member-card.active {
  border-color: var(--td-brand-color);
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
}

.wk-handover-member-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wk-handover-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wk-handover-info {
  min-width: 0;
  flex: 1;
}

.wk-handover-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.wk-handover-uid {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-handover-load {
  margin-top: 8px;
}

.wk-handover-load-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.wk-handover-bar {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.wk-handover-bar-fill {
  height: 100%;
  background: var(--td-brand-color);
  border-radius: 999px;
}

/* Tab 4：FAQ Maker-Checker 流转横幅 */
.wk-faq-flow-banner {
  padding: 9px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.wk-faq-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.wk-faq-step.active {
  color: #0f766e;
  font-weight: 600;
}

.wk-faq-arrow {
  color: #cbd5e1;
}

/* ==================== 右侧栏：工单档案卡片 + 纵向审计时间轴 ==================== */
.wk-aside-card {
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  background: #ffffff;
  padding: 13px 15px;
  flex-shrink: 0;
}

.wk-aside-timeline-card {
  flex: 1 1 0;
  height: 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wk-aside-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

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

.wk-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.wk-kv-label {
  color: #64748b;
  flex-shrink: 0;
}

.wk-kv-val {
  color: #0f172a;
  font-weight: 500;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-kv-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #475569;
}

.wk-kv-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 2px 0;
}

/* 纵向步骤审计时间轴 */
.wk-vtimeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding-left: 4px;
  padding-right: 4px;
}

.wk-vtimeline-item {
  position: relative;
  padding: 0 0 12px 18px;
  border-left: 2px solid #e2e8f0;
}

.wk-vtimeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 2px;
}

.wk-vtimeline-dot {
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px #ffffff;
}

.wk-vtimeline-item.tone-green .wk-vtimeline-dot {
  background: var(--td-brand-color);
}

.wk-vtimeline-item.tone-purple .wk-vtimeline-dot {
  background: #9333ea;
}

.wk-vtimeline-item.tone-blue .wk-vtimeline-dot {
  background: #2563eb;
}

.wk-vtimeline-item.tone-amber .wk-vtimeline-dot {
  background: #d97706;
}

.wk-vtimeline-item.tone-red .wk-vtimeline-dot {
  background: #e11d48;
}

.wk-vtimeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wk-vtimeline-title {
  font-size: 12.5px;
  color: #0f172a;
}

.wk-vtimeline-time {
  font-size: 11px;
  color: #94a3b8;
  flex-shrink: 0;
}

.wk-vtimeline-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.wk-vtimeline-desc {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  word-break: break-word;
}

/* ==================== 视图 3：独立「值班排班」业务页 ==================== */
.wk-oncall-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 32px;
  background: #fbfbfb;
}

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

.wk-stat-card {
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-lg);
  padding: 16px 20px;
}

.wk-stat-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--td-text-color-secondary);
}

.wk-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--td-text-color-primary);
  margin: 6px 0 4px;
}

.wk-stat-desc {
  font-size: 12px;
  color: var(--td-text-color-placeholder);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-card {
  background: #ffffff;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-lg);
  padding: 18px 20px;
}

.wk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wk-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-card-sub {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 2px;
}

.wk-load-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-load-bar {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: #eceef2;
  overflow: hidden;
}

.wk-load-fill {
  height: 100%;
  background: var(--td-brand-color);
  border-radius: 999px;
}

.wk-load-fill.warn {
  background: var(--td-warning-color);
}

/* ==================== 视图 4：渠道与设置（二级菜单架构） ==================== */
.wk-settings-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.wk-settings-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: #fbfbfb;
  border-right: 1px solid var(--td-component-stroke);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wk-settings-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  padding: 2px 10px 12px;
  border-bottom: 1px solid var(--td-component-stroke);
  margin-bottom: 6px;
}

.wk-settings-group-label {
  padding: 10px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--td-text-color-placeholder);
}

.wk-settings-tab {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--app-radius-sm);
  background: transparent;
  color: var(--td-text-color-primary);
  font: inherit;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.wk-settings-tab:hover {
  background: var(--td-bg-color-container-hover);
}

.wk-settings-tab.active {
  background: rgba(7, 192, 95, 0.11);
  color: var(--td-brand-color);
  font-weight: 600;
}

.wk-settings-tab span:nth-child(2) {
  flex: 1;
}

.wk-tab-badge {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  background: #eaeaea;
  color: var(--td-text-color-secondary);
}

.wk-settings-body {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 32px 48px;
  background: #ffffff;
}

.wk-settings-panel {
  display: none;
  max-width: 980px;
}

.wk-settings-panel.active {
  display: block;
}

.wk-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--td-component-stroke);
  margin-bottom: 20px;
}

.wk-settings-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 4px;
}

.wk-settings-subtitle {
  font-size: 13px;
  color: var(--td-text-color-placeholder);
  line-height: 1.5;
}

.wk-section-block {
  margin-bottom: 20px;
}

.wk-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wk-section-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  position: relative;
  padding-left: 10px;
}

.wk-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--td-brand-color);
}

.wk-section-desc {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 3px;
}

/* ==================== 修复后的企微/im 渠道卡片（双行宽卡片，彻底解决截断挤压） ==================== */
.wk-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.wk-channel-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-lg);
  background: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wk-channel-card:hover {
  border-color: #9be5be;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.wk-channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wk-channel-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wk-channel-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--app-radius-md);
  background: #f3f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.wk-channel-name-wrap {
  min-width: 0;
}

.wk-channel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-channel-agent {
  font-size: 12px;
  color: var(--td-text-color-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-channel-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--td-component-stroke);
}

.wk-channel-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wk-channel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wk-channel-card--add {
  border-style: dashed;
  background: #fbfdfc;
  justify-content: center;
  align-items: flex-start;
  cursor: pointer;
  text-decoration: none;
  color: var(--td-text-color-secondary);
}

.wk-channel-card--add:hover {
  border-color: var(--td-brand-color);
  background: rgba(7, 192, 95, 0.04);
  color: var(--td-brand-color);
}

/* ==================== WeKnora IM 集成 1:1 视觉复刻与说明区 ==================== */
.wk-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  color: var(--td-brand-color);
  font-weight: 500;
  text-decoration: none;
}

.wk-doc-link:hover {
  text-decoration: underline;
}

.wk-im-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 14px;
}

.wk-im-toolbar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wk-im-toolbar-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-im-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--td-text-color-placeholder);
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.wk-im-filter-wrap:hover {
  background: #f2f4f7;
}

.wk-im-filter-select {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
  cursor: pointer;
}

.wk-im-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--td-text-color-secondary);
  font-size: 12px;
  font-weight: 500;
}

.wk-im-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.wk-im-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid #e7e9eb;
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
  color: var(--td-text-color-primary);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wk-im-card:hover {
  border-color: #b5e6cc;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.wk-im-card--active {
  border-color: var(--td-brand-color);
  background: #f9fefb;
  box-shadow: 0 2px 10px rgba(7, 192, 95, 0.06);
}

.wk-im-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wk-kb-target-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(7, 192, 95, 0.12);
  color: var(--td-brand-color);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.wk-im-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.wk-im-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f4f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wk-im-card-info {
  min-width: 0;
  flex: 1;
}

.wk-im-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-im-card-sub {
  font-size: 12px;
  color: var(--td-text-color-placeholder);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-im-card-actions {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wk-im-card:hover .wk-im-card-actions,
.wk-im-card:focus-within .wk-im-card-actions {
  display: inline-flex;
}

@media (hover: none), (max-width: 900px) {
  .wk-im-card-actions {
    display: inline-flex;
  }
}

.wk-im-card-btn {
  border: 1px solid #e7e9eb;
  background: #ffffff;
  color: var(--td-text-color-secondary);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wk-im-card-btn:hover {
  border-color: var(--td-brand-color);
  color: var(--td-brand-color);
}

.wk-im-card-btn--danger:hover {
  border-color: #f53f3f;
  color: #f53f3f;
  background: #fff3f3;
}

.wk-im-card--add {
  border-style: dashed;
  border-color: #dcdcdc;
  background: #fcfcfd;
  justify-content: flex-start;
}

.wk-im-card--add:hover {
  border-color: var(--td-brand-color);
  background: rgba(7, 192, 95, 0.03);
}

.wk-im-card--add .wk-im-card-icon {
  background: rgba(7, 192, 95, 0.08);
  color: var(--td-brand-color);
  font-size: 20px;
  font-weight: 400;
}

.wk-im-card--add .wk-im-card-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--td-text-color-placeholder);
}

.wk-im-card--add:hover .wk-im-card-title {
  color: var(--td-brand-color);
}

/* 工单中心复用 WeKnora IM 集成信息说明盒 */
.wk-im-explain-box {
  padding: 18px 20px;
  border-radius: 12px;
  background: #f5fbf7;
  border: 1px solid #d8f2e3;
}

.wk-im-explain-title {
  position: relative;
  padding-left: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 6px;
}

.wk-im-explain-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--td-brand-color);
}

.wk-im-explain-sub {
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.wk-im-explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wk-im-explain-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 15px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(7, 192, 95, 0.12);
}

.wk-im-explain-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--td-brand-color);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.wk-im-explain-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 4px;
}

.wk-im-explain-desc {
  font-size: 12px;
  color: var(--td-text-color-secondary);
  line-height: 1.55;
}

/* ==================== 工单状态管理表格与流程条 ==================== */
.wk-status-flow-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f5fbf7;
  border: 1px solid #d5f0e0;
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
  margin-bottom: 16px;
}

.wk-flow-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wk-flow-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e3efe8;
  font-size: 12px;
  color: var(--td-text-color-primary);
}

.wk-flow-arrow {
  color: var(--td-brand-color);
  font-weight: 700;
  font-size: 13px;
}

.wk-status-config-table td {
  vertical-align: middle;
  padding: 13px 14px;
}

.wk-status-config-table tbody tr {
  transition: background 0.14s ease;
}

.wk-status-config-table tbody tr:hover {
  background: #fafcfd;
}

.wk-status-code-pill {
  display: inline-block;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f2f4f7;
  color: #344054;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid #e4e7ec;
}

.wk-status-rule-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
}

.wk-status-desc-cell {
  font-size: 13px;
  color: var(--td-text-color-primary);
  line-height: 1.45;
}

/* 状态编辑弹窗预览与色卡选择器 */
.wk-status-modal-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.wk-status-modal-preview-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-status-modal-preview-label {
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
}

.wk-status-modal-rule {
  font-size: 12px;
  color: var(--td-text-color-placeholder);
}

.wk-color-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wk-color-swatch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  color: var(--td-text-color-primary);
  transition: all 0.15s ease;
}

.wk-color-swatch-btn:hover {
  border-color: #cbd5e1;
  background: #f9fafb;
}

.wk-color-swatch-btn.active {
  border-color: var(--td-brand-color);
  background: rgba(7, 192, 95, 0.06);
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
  font-weight: 600;
}

.wk-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==================== SLA 时效 3 列优先级卡片与自动归档卡片 ==================== */
.wk-sla-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.wk-sla-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e7e9eb;
  border-top: 3px solid #d0d5dd;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

.wk-sla-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.wk-sla-card--p1 {
  border-top-color: #f53f3f;
}

.wk-sla-card--p2 {
  border-top-color: #ff7d00;
}

.wk-sla-card--p3 {
  border-top-color: #267ef0;
}

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

.wk-sla-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-sla-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-sla-calendar-tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--td-text-color-secondary);
  white-space: nowrap;
}

.wk-sla-calendar-tag--24h {
  background: #fff1f0;
  color: #cf1322;
  font-weight: 500;
}

.wk-sla-card-desc {
  font-size: 12px;
  color: var(--td-text-color-placeholder);
  line-height: 1.45;
  margin: 0 0 14px;
}

.wk-sla-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wk-sla-metric-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #eef0f3;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wk-sla-metric-box label {
  font-size: 12px;
  font-weight: 500;
  color: var(--td-text-color-secondary);
}

.wk-sla-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wk-sla-num-input {
  width: 78px;
  height: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.wk-sla-unit {
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
}

.wk-sla-hint {
  font-size: 11.5px;
  color: var(--td-brand-color);
  font-weight: 500;
}

.wk-sla-autoclose-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e7e9eb;
}

.wk-sla-autoclose-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.wk-sla-autoclose-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-sla-autoclose-desc {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 3px;
  line-height: 1.45;
}

.wk-sla-autoclose-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--td-text-color-secondary);
}

.wk-sla-day-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(7, 192, 95, 0.1);
  color: var(--td-brand-color);
  font-size: 12px;
  font-weight: 600;
}

/* ==================== 表单与通用控件 ==================== */
.wk-form-card {
  background: #fafafa;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  padding: 14px 16px;
}

.wk-form-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 10px;
}

.wk-form-grid-5 {
  display: grid;
  grid-template-columns: 150px 150px 160px 160px 1fr;
  gap: 10px;
}

.wk-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.wk-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.wk-form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.wk-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wk-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--td-text-color-secondary);
}

.wk-input, .wk-select, .wk-textarea {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--td-component-border);
  border-radius: var(--app-radius-sm);
  background: #ffffff;
  color: var(--td-text-color-primary);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wk-input-sm, .wk-select-sm {
  height: 30px;
  font-size: 12.5px;
}

.wk-input-lg {
  height: 38px;
  font-size: 13.5px;
}

.wk-input-num {
  width: 76px;
  text-align: center;
}

.wk-textarea {
  height: auto;
  min-height: 76px;
  padding: 8px 10px;
  resize: vertical;
}

.wk-input:focus, .wk-select:focus, .wk-textarea:focus {
  border-color: var(--td-brand-color);
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
}

.wk-section-group {
  margin-bottom: 24px;
}

.wk-section-bar {
  position: relative;
  padding-left: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 8px;
}

.wk-section-bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--td-brand-color);
}

.wk-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--td-component-stroke);
}

.wk-setting-info {
  flex: 1;
  min-width: 0;
}

.wk-setting-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--td-text-color-primary);
}

.wk-setting-desc {
  font-size: 12px;
  color: var(--td-text-color-placeholder);
  margin-top: 2px;
}

.wk-setting-control {
  width: 420px;
  flex-shrink: 0;
}

.wk-control-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.wk-sla-inputs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 12.5px;
  color: var(--td-text-color-secondary);
}

.wk-settings-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ==================== 按钮与状态标签色系 ==================== */
.wk-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--app-radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.wk-btn-primary {
  background: var(--td-brand-color);
  color: #ffffff;
}

.wk-btn-primary:hover {
  background: var(--td-brand-color-hover);
}

.wk-btn-outline {
  background: #ffffff;
  border-color: var(--td-component-border);
  color: var(--td-text-color-primary);
}

.wk-btn-outline:hover {
  border-color: var(--td-brand-color);
  color: var(--td-brand-color);
}

.wk-btn-danger {
  background: #fff0f1;
  border-color: #fac8cc;
  color: var(--td-error-color);
}

.wk-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.wk-btn-lg {
  height: 40px;
  font-size: 14px;
}

.wk-btn-block {
  width: 100%;
}

/* 7 种可配置状态标签颜色 */
.wk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.wk-badge-amber {
  background: #fff3e8;
  color: #d46b08;
}

.wk-badge-blue {
  background: #eaf2ff;
  color: #165dff;
}

.wk-badge-indigo {
  background: #eef0ff;
  color: #3b4cca;
}

.wk-badge-purple {
  background: #f5efff;
  color: #722ed1;
}

.wk-badge-red {
  background: #ffecee;
  color: #e34d59;
}

.wk-badge-green {
  background: #e8f8ee;
  color: #07c05f;
}

.wk-badge-gray {
  background: #f2f3f5;
  color: #4e5969;
}

/* ==================== 表格 ==================== */
.wk-table-wrap {
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  overflow: hidden;
  background: #ffffff;
}

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

.wk-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f7f8fa;
  color: var(--td-text-color-secondary);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--td-component-stroke);
}

.wk-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--td-component-stroke);
  color: var(--td-text-color-primary);
}

.wk-table tr:last-child td {
  border-bottom: none;
}

.wk-empty, .wk-empty-cell {
  text-align: center;
  padding: 28px 16px;
  color: var(--td-text-color-placeholder);
  font-size: 13px;
}

.wk-ticket-list .wk-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
}

.wk-empty-detail {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--td-text-color-placeholder);
  padding: 32px 24px;
}

.wk-empty-svg-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(7, 192, 95, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.wk-empty-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.wk-empty-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 6px;
}

.wk-empty-sub {
  font-size: 13px;
  max-width: 440px;
  color: var(--td-text-color-placeholder);
  line-height: 1.5;
}

.wk-empty-guide-grid {
  margin-top: 24px;
  width: 100%;
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: left;
}

.wk-empty-guide-card {
  padding: 14px 16px;
  border-radius: var(--app-radius-md);
  border: 1px solid rgba(7, 192, 95, 0.18);
  background: #f8fcf9;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.wk-empty-guide-step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--td-brand-color);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.wk-empty-guide-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  margin-bottom: 4px;
}

.wk-empty-guide-text {
  font-size: 12px;
  color: var(--td-text-color-secondary);
  line-height: 1.5;
}

.wk-empty-guide-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(7, 192, 95, 0.12);
  color: #059649;
}

.wk-empty-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==================== 弹窗与 Toast ==================== */
.wk-modal-backdrop, .wk-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.wk-modal {
  width: 560px;
  max-width: 94vw;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.wk-modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--td-component-stroke);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wk-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-modal-subtitle {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 3px;
}

.wk-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--app-radius-sm);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--td-text-color-placeholder);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.wk-modal-close:hover {
  background: var(--td-bg-color-secondarycontainer);
  color: var(--td-text-color-primary);
}

.wk-modal-body {
  padding: 20px 24px;
}

.wk-oncall-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wk-oncall-form .wk-input,
.wk-oncall-form .wk-select {
  height: 36px;
  font-size: 13.5px;
}

/* 班次角色双卡片选择器 */
.wk-role-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.wk-role-card {
  padding: 12px 14px;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-md);
  background: #fafafa;
  cursor: pointer;
  transition: all 0.16s ease;
}

.wk-role-card:hover {
  border-color: #9be5be;
  background: #ffffff;
}

.wk-role-card.active {
  border-color: var(--td-brand-color);
  background: #f3fcf6;
  box-shadow: 0 2px 8px rgba(7, 192, 95, 0.08);
}

.wk-role-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.wk-role-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c9cdd4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wk-role-card.active .wk-role-dot {
  border-color: var(--td-brand-color);
}

.wk-role-card.active .wk-role-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--td-brand-color);
}

.wk-role-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  flex: 1;
}

.wk-role-desc {
  font-size: 12px;
  color: var(--td-text-color-secondary);
  line-height: 1.45;
}

/* 每日值班时段组合框 */
.wk-time-range-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.wk-time-sep {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
}

/* 带单位后缀的输入框 */
.wk-input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.wk-input-suffix-wrap .wk-input {
  padding-right: 36px;
}

.wk-input-suffix {
  position: absolute;
  right: 12px;
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
  pointer-events: none;
}

/* 休假与替班折叠区 */
.wk-leave-section {
  padding: 12px 14px;
  border-radius: var(--app-radius-md);
  background: #f9fafb;
  border: 1px solid var(--td-component-stroke);
}

.wk-leave-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wk-leave-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-leave-sub {
  font-size: 11.5px;
  color: var(--td-text-color-placeholder);
  margin-top: 2px;
}

.wk-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--td-text-color-primary);
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid var(--td-component-border);
  border-radius: 999px;
}

.wk-leave-fields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--td-component-stroke);
}

/* ==================== MCP 服务注册与工具目录状态卡片 ==================== */
.wk-mcp-status-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f5fbf7;
  border: 1px solid #d5f0e0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.wk-mcp-status-info {
  min-width: 0;
  flex: 1;
}

.wk-mcp-status-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wk-mcp-status-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--td-text-color-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.wk-mcp-status-url {
  font-size: 12px;
  color: var(--td-text-color-secondary);
  margin-top: 3px;
}

.wk-mcp-tools-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px dashed #c8ead6;
}

.wk-mcp-tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--td-text-color-secondary);
}

.wk-mcp-tool-code {
  padding: 2px 7px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid #ccebd9;
  color: #059449;
  font-size: 11.5px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.wk-mcp-tool-desc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-modal-footer {
  padding: 14px 24px;
  background: #f9fafb;
  border-top: 1px solid var(--td-component-stroke);
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==================== WeKnora TDesign 可搜索下拉选择器 (Combobox) ==================== */
.wk-combobox {
  position: relative;
  width: 100%;
}

.wk-combobox-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  background: #ffffff;
  border: 1px solid var(--td-component-border);
  border-radius: var(--app-radius-sm);
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wk-combobox-control:hover {
  border-color: #b5b9c0;
}

.wk-combobox.open .wk-combobox-control,
.wk-combobox-control:focus-within {
  border-color: var(--td-brand-color);
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
}

.wk-combobox-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--td-text-color-primary);
  padding: 0;
}

.wk-combobox-input::placeholder {
  color: var(--td-text-color-placeholder);
}

.wk-combobox-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--td-text-color-placeholder);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease;
}

.wk-combobox.open .wk-combobox-arrow {
  color: var(--td-brand-color);
  transform: rotate(180deg);
}

.wk-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1200;
  background: #ffffff;
  border: 1px solid #e7e9eb;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  padding: 4px;
  max-height: 176px;
  overflow-y: auto;
}

.wk-combobox-dropdown::-webkit-scrollbar {
  width: 6px;
}

.wk-combobox-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.wk-combobox-dropdown::-webkit-scrollbar-thumb {
  background: #d0d5dd;
  border-radius: 3px;
}

.wk-combobox-dropdown::-webkit-scrollbar-thumb:hover {
  background: #98a2b3;
}

.wk-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--td-text-color-primary);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.wk-combobox-option:hover {
  background: #f3f4f6;
}

.wk-combobox-option.selected {
  background: rgba(7, 192, 95, 0.08);
  color: var(--td-brand-color);
  font-weight: 500;
}

.wk-combobox-opt-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.wk-combobox-opt-name {
  font-size: 13.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-combobox-opt-sub {
  font-size: 11.5px;
  color: var(--td-text-color-placeholder);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-combobox-opt-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f2f4f7;
  color: var(--td-text-color-secondary);
  flex-shrink: 0;
}

.wk-combobox-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
}

.wk-login-card {
  width: 400px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: var(--app-radius-xl);
  padding: 28px 26px 24px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
}

.wk-login-header {
  text-align: center;
  margin-bottom: 14px;
}

.wk-login-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.wk-login-header p {
  font-size: 12.5px;
  color: var(--td-text-color-placeholder);
}

.wk-login-Notice {
  padding: 8px 12px;
  border-radius: var(--app-radius-sm);
  background: var(--td-brand-color-soft);
  color: var(--td-brand-color);
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.wk-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wk-req {
  color: var(--td-error-color);
}

.wk-login-error {
  padding: 8px 10px;
  border-radius: var(--app-radius-sm);
  background: #ffecee;
  color: var(--td-error-color);
  font-size: 12.5px;
}

.wk-toast {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: var(--app-radius-md);
  background: #1d2129;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

/* ==================== 存量群聊历史导入弹窗样式 ==================== */
.wk-modal-card-xl {
  width: min(1040px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.wk-hist-modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 130px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wk-hist-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.wk-hist-mode-btn {
  border: 1px solid var(--td-component-border);
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.16s ease;
}

.wk-hist-mode-btn:hover {
  border-color: #9be5be;
  background: #ffffff;
}

.wk-hist-mode-btn.active {
  background: #f3fcf6;
  border-color: var(--td-brand-color);
  box-shadow: 0 2px 8px rgba(7, 192, 95, 0.1);
}

.wk-hist-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--td-text-color-primary);
}

.wk-hist-mode-btn.active .wk-hist-tab-top {
  color: var(--td-brand-color);
}

.wk-hist-tab-sub {
  font-size: 11.5px;
  color: var(--td-text-color-secondary);
  line-height: 1.35;
}

.wk-hist-tab-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(7, 192, 95, 0.14);
  color: #059669;
}

.wk-hist-pane-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wk-hist-conn-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12.5px;
}

.wk-hist-conn-bar.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.wk-hist-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

.wk-hist-conn-bar.is-warn .wk-hist-conn-dot {
  background: #f59e0b;
}

.wk-btn-link {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--td-brand-color);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
}

.wk-btn-link:hover {
  text-decoration: underline;
}

.wk-hist-custom-box {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.wk-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
}

.wk-hist-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--td-component-stroke);
  flex-wrap: wrap;
}

.wk-hist-file-top {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.wk-hist-file-custom {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.wk-hist-subtle-note {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--td-text-color-placeholder);
}

.wk-hist-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wk-hist-compare-item {
  padding: 10px 12px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

.wk-hist-compare-item.is-highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}

.wk-hist-compare-item p {
  margin: 4px 0 0;
}

.wk-hist-compare-tag {
  font-weight: 600;
  font-size: 12.5px;
  color: #0f172a;
}

.wk-hist-watermark-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--td-component-stroke);
  font-size: 12px;
  color: #475569;
  flex-wrap: wrap;
}

.wk-hist-range-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.wk-hist-range-card {
  border: 1px solid var(--td-component-border);
  background: #ffffff;
  border-radius: 7px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
}

.wk-hist-range-card strong {
  font-size: 13px;
  color: var(--td-text-color-primary);
}

.wk-hist-range-card span {
  font-size: 11.5px;
  color: var(--td-text-color-secondary);
}

.wk-hist-range-card.active {
  border-color: var(--td-brand-color);
  background: #f3fcf6;
}

.wk-hist-range-card.active strong {
  color: var(--td-brand-color);
}

.wk-hist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wk-hist-toolbar-btns {
  display: flex;
  gap: 6px;
}

.wk-hist-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  min-height: 128px;
}

.wk-hist-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--td-component-stroke);
  border-radius: var(--app-radius-sm);
  flex-wrap: wrap;
}

.wk-hist-checks {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.wk-hist-preview {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-hist-pull-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr;
  gap: 10px;
}

.wk-hist-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(7, 192, 95, 0.08);
  border: 1px solid rgba(7, 192, 95, 0.24);
  border-radius: 6px;
  font-size: 12.5px;
  color: #166534;
  flex-wrap: wrap;
}

.wk-hist-workbench-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.wk-hist-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wk-hist-pill {
  border: 1px solid var(--td-component-border);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}

.wk-hist-pill:hover {
  border-color: #9be5be;
  color: #0f172a;
}

.wk-hist-pill.active {
  background: #07c05f;
  border-color: #07c05f;
  color: #ffffff;
}

.wk-hist-pill-cnt {
  font-size: 11px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
}

.wk-hist-pill.active .wk-hist-pill-cnt {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.wk-hist-search-wrap {
  min-width: 240px;
  flex: 0 1 280px;
}

.wk-hist-search-input {
  height: 30px;
  font-size: 12px;
}

.wk-hist-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid var(--td-component-stroke);
  border-radius: 6px;
  font-size: 12px;
  flex-wrap: wrap;
}

.wk-hist-batch-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wk-hist-batch-summary {
  color: #475569;
}

.wk-hist-batch-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.wk-hist-batch-hint {
  color: #64748b;
  font-size: 11.5px;
}

.wk-btn-xs {
  height: 24px;
  padding: 0 8px;
  font-size: 11.5px;
  border-radius: 4px;
}

.wk-hist-cand-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--td-component-border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.wk-hist-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}

.wk-hist-row:last-child {
  border-bottom: none;
}

.wk-hist-row:hover {
  background: #f8fafc;
}

.wk-hist-row.is-expanded {
  background: #fcfdfd;
}

.wk-hist-row.is-dup {
  background: #f8fafc;
}

.wk-hist-row-main {
  display: grid;
  grid-template-columns: 26px 52px 86px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 42px;
}

.wk-hist-row.is-dup .wk-hist-row-title {
  color: #64748b;
}

.wk-hist-row-summary {
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wk-hist-row-title {
  font-size: 13px;
  font-weight: 500;
  color: #1d2129;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-hist-row-ans-snip {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-hist-row-meta {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-hist-faq-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}

.wk-hist-faq-chip.is-on {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}

.wk-hist-faq-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wk-hist-expand-btn {
  border: none;
  background: transparent;
  color: #07c05f;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.wk-hist-expand-btn:hover {
  background: rgba(7, 192, 95, 0.1);
}

.wk-hist-row-drawer {
  padding: 10px 14px 12px 38px;
  border-top: 1px dashed #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-hist-cand-grid {
  display: grid;
  grid-template-columns: 1fr 120px 175px;
  gap: 8px;
}

.wk-hist-raw-details {
  font-size: 12px;
  color: #475569;
}

.wk-hist-raw-details summary {
  cursor: pointer;
  color: #059669;
  font-weight: 500;
  user-select: none;
}

.wk-hist-raw-thread {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wk-hist-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid var(--td-component-stroke);
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
}

.wk-hist-page-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-hist-mac-tip {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: var(--app-radius-sm);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  font-size: 12px;
  line-height: 1.55;
}

.wk-hist-mac-tip code {
  background: rgba(14, 116, 144, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
}

.wk-hist-conn-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.wk-hist-conn-actions .wk-btn-link {
  margin-left: 0;
}

.wk-hist-conn-sep {
  color: #cbd5e1;
  font-size: 11px;
  user-select: none;
}

/* ==================== 商家在线 SSO 登录与移动端自适应布局 ==================== */
.wk-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  background: #059669;
  border-color: #059669;
  white-space: normal;
  height: auto;
  min-height: 42px;
  padding: 9px 14px;
  line-height: 1.35;
  text-align: center;
}

.wk-sso-btn:hover {
  background: #047857;
  border-color: #047857;
}

@media (max-width: 1080px) {
  .wk-workbench {
    grid-template-columns: 310px minmax(0, 1fr);
    padding: 12px 16px 18px;
  }
  .wk-workbench-toolbar {
    padding: 10px 16px 0;
  }
}

@media (max-width: 860px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .wk-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .wk-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--td-component-stroke);
    padding: 10px 12px;
    gap: 8px;
  }

  .wk-brand {
    padding: 0 2px;
  }

  .wk-workspace-box {
    margin: 0;
    padding: 6px 10px;
  }

  .wk-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 0;
    gap: 6px;
  }

  .wk-nav-section {
    display: none;
  }

  .wk-nav-item {
    width: auto;
    height: 34px;
    padding: 0 10px;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12.5px;
    background: #ffffff;
    border: 1px solid var(--td-component-stroke);
  }

  .wk-nav-item.active {
    border-color: var(--td-brand-color);
  }

  .wk-sidebar-footer {
    padding: 6px 0 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .wk-back-weknora {
    padding: 4px 8px;
    font-size: 12px;
  }

  .wk-user-bar {
    padding: 5px 8px;
    flex: 1 1 auto;
    min-width: 175px;
  }

  .wk-main,
  .wk-view {
    height: auto;
    overflow: visible;
  }

  .wk-page-header {
    padding: 14px 12px 10px;
    gap: 10px;
  }

  .wk-page-header > div:first-child {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .wk-header-actions {
    width: 100%;
    gap: 6px;
  }

  .wk-filter-select {
    flex: 1 1 calc(50% - 4px);
    width: auto !important;
    min-width: 120px;
  }

  .wk-search-box {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .wk-workbench-toolbar {
    padding: 10px 12px 0;
    gap: 8px;
  }

  .wk-pill-tabs {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .wk-workbench {
    grid-template-columns: 1fr;
    padding: 10px 12px 20px;
    height: auto;
    overflow: visible;
  }

  .wk-ticket-list-panel {
    max-height: 250px;
  }

  .wk-ticket-detail {
    padding: 14px 12px;
    height: auto;
    overflow: visible;
  }

  .wk-detail-header {
    flex-direction: column;
    gap: 8px;
  }

  .wk-detail-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .wk-chat-card,
  .wk-aside-timeline-card {
    height: auto;
    min-height: 180px;
    flex: none;
  }

  .wk-chat-stream,
  .wk-vtimeline {
    max-height: 300px;
    flex: none;
  }

  .wk-stat-grid,
  .wk-sla-cards-grid,
  .wk-empty-guide-grid {
    grid-template-columns: 1fr;
  }

  .wk-login-card {
    width: calc(100vw - 24px) !important;
    max-width: 400px !important;
    padding: 22px 18px !important;
  }
}



/* ==================== 一商多站 (1 Merchant -> N Brand Apps) 站点切换栏与管理面板 ==================== */
.wk-brand-portfolio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f8fafc 0%, #f0fdf4 100%);
  border: 1px solid #dbeafe;
  border-radius: 10px;
}
.wk-brand-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.wk-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.wk-brand-chip:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.wk-brand-chip.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}
.wk-brand-chip-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(100, 116, 139, 0.14);
  color: inherit;
}
.wk-brand-chip.active .wk-brand-chip-cnt {
  background: rgba(255, 255, 255, 0.22);
}
.wk-brand-manage-link {
  flex-shrink: 0;
  border: 1px dashed #94a3b8;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.wk-brand-manage-link:hover {
  border-color: #059669;
  color: #059669;
}
.wk-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #0f172a;
  white-space: nowrap;
}
.wk-brand-page-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: #0284c7;
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-brand-page-link:hover {
  text-decoration: underline;
}
.wk-brand-gateway-banner {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 12.5px;
  color: #14532d;
  line-height: 1.55;
}
.wk-brand-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.wk-brand-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}
.wk-brand-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wk-brand-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.wk-brand-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}
.wk-brand-code-snippet {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.wk-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--td-component-stroke);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.wk-detail-header-main {
  min-width: min(100%, 280px);
  flex: 1 1 300px;
}

@media (max-width: 900px) {
  .wk-settings-shell {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .wk-settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--td-component-stroke);
    padding: 12px;
  }
  .wk-settings-content {
    padding: 14px 12px 24px !important;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .wk-brand-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== Ultra-Clean Add/Edit Site Modal & Login Language Toggle ==================== */
.wk-login-lang-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 0 9px;
  height: 26px;
  font-size: 12px;
  border-radius: 999px;
  background: #f8fafc;
}

.wk-ba-modal {
  max-width: 470px;
}

.wk-ba-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.wk-ba-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wk-ba-label-row label {
  margin-bottom: 0;
}

.wk-ba-slug-chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  transition: all 0.14s ease;
}

.wk-ba-slug-chip:hover:not(:disabled) {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f1f5f9;
}

.wk-ba-slug-chip:disabled {
  cursor: default;
  opacity: 0.78;
}

.wk-ba-key-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
}

.wk-ba-key-custom .wk-input {
  flex: 1;
  height: 28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wk-ba-appearance-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.wk-ba-icons-group,
.wk-ba-colors-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wk-ba-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.wk-ba-icon-btn:hover {
  border-color: #cbd5e1;
}

.wk-ba-icon-btn.active {
  border-color: var(--td-brand-color);
  background: rgba(7, 192, 95, 0.1);
  box-shadow: 0 0 0 2px rgba(7, 192, 95, 0.12);
}

.wk-ba-icon-custom {
  width: 36px !important;
  height: 30px !important;
  padding: 0 4px !important;
  text-align: center;
  font-size: 14px;
}

.wk-ba-color-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  padding: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.wk-ba-color-dot:hover {
  transform: scale(1.1);
}

.wk-ba-color-dot.active {
  box-shadow: 0 0 0 2px #0f172a;
  transform: scale(1.1);
}

.wk-ba-color-native {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.wk-ba-adv-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.wk-ba-adv-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: none;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.wk-ba-adv-toggle:hover {
  background: #f1f5f9;
}

.wk-ba-adv-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: #64748b;
}

.wk-ba-adv-body {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 520px) {
  .wk-ba-appearance-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==================== 原生知识库内容浏览器与危险线框按钮 ==================== */
.wk-btn-danger-outline {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #e11d48;
}
.wk-btn-danger-outline:hover:not(:disabled) {
  background: #ffe4e6;
  border-color: #fda4af;
}
.wk-kb-insp-modal {
  width: min(860px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.wk-kb-insp-head-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.wk-kb-insp-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wk-kb-insp-sub {
  font-size: 12px;
  color: #64748b;
}
.wk-kb-insp-body {
  overflow-y: auto;
  max-height: calc(88vh - 132px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wk-kb-insp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.wk-kb-editor-box {
  border: 1px solid #a7f3d0;
  background: #f0fdf4;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wk-kb-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #065f46;
}
.wk-kb-editor-tip {
  font-size: 11.5px;
  color: #047857;
}
.wk-kb-entries-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wk-kb-entry-card {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}
.wk-kb-entry-card:hover {
  border-color: #cbd5e1;
}
.wk-kb-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wk-kb-entry-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}
.wk-kb-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 11.5px;
  color: #64748b;
}
.wk-kb-entry-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.wk-kb-entry-body {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
}
.wk-im-guide-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wk-im-guide-card + .wk-im-guide-card {
  margin-top: 8px;
}

/* ==================== Day-0 First-Admin Setup & 3-Step Quickstart Wizard ==================== */
.wk-setup-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 11.5px;
  font-weight: 600;
}

.wk-onboarding-card {
  margin: 0 0 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #f8fafc 100%);
  border: 1px solid #86efac;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.wk-ob-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wk-ob-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-ob-sub {
  font-size: 12.5px;
  color: #475569;
  margin-top: 2px;
}

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

.wk-ob-step {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wk-ob-step.is-active {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.wk-ob-step.is-done {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.wk-ob-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wk-ob-step-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.wk-ob-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.wk-ob-pill.done {
  background: #dcfce7;
  color: #166534;
}

.wk-ob-pill.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.wk-ob-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.wk-ob-code {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow-x: auto;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .wk-ob-grid {
    grid-template-columns: 1fr;
  }
}
