/* ==========================================================================
   独立「本地助理」(Local Assistant Hub) 专属定制样式表
   严格遵循腾讯 WorkBuddy 极简双色与官方截图规范（纯白卡片、大圆角、中性灰阶）
   ========================================================================== */

/* 1. 主舞台布局与顶部操作状态栏 */
.assistant-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: #F8FAFC;
  overflow: hidden;
}

.assistant-top-header {
  height: 52px;
  padding: 0 20px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.assistant-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-main-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-channel-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  transition: all 0.15s ease;
}

.assistant-channel-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2.4s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.assistant-channel-status-pill .channel-name {
  color: #0F172A;
  font-weight: 600;
}

.btn-assistant-settings {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-assistant-settings:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #CBD5E1;
}

/* 2. 沉浸式工作台主视窗与会话区域 */
.assistant-chat-stage {
  flex: 1;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 140px;
}

.assistant-welcome-hero {
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
  padding: 32px 20px;
}

.assistant-hero-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #2563EB;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.assistant-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.assistant-hero-desc {
  font-size: 13.5px;
  color: #64748B;
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 24px;
}

.assistant-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 600px;
}

.assistant-prompt-pill {
  padding: 7px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.assistant-prompt-pill:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
  color: #0F172A;
  transform: translateY(-1px);
}

/* 3. 底部居中 18px 大圆角悬浮控制台 */
.assistant-console-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 48px));
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  padding: 12px 14px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.assistant-console-dock:focus-within {
  border-color: #94A3B8;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 6px 16px -2px rgba(15, 23, 42, 0.06);
}

.console-input-row {
  width: 100%;
}

.console-textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: #0F172A;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  padding: 4px 0;
}

.console-textarea::placeholder {
  color: #94A3B8;
}

.console-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.console-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-console-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-console-tool:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

.btn-console-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-console-icon:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.console-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-console-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0F172A;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-console-send:hover {
  background: #2563EB;
  transform: scale(1.04);
}

.btn-console-send:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
  transform: none;
}

/* 4. 助理设置 620px 居中大圆角模态对话框 */
.modal-assistant-settings-dialog {
  width: 660px;
  max-width: 92vw;
  max-height: 88vh;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.25), 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  border: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-settings-header {
  padding: 18px 24px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-settings-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

.modal-settings-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 7 大通道 2 列大圆角纯白微卡片网格 (严格对标用户上传的真实截图) */
.assistant-channels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assistant-channel-card {
  background: #FFFFFF;
  border: 1px solid #ECEEF1;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.assistant-channel-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.assistant-channel-card.connected {
  border-color: #E2E8F0;
  background: #FFFFFF;
}

.channel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.channel-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.channel-logo-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-logo-wrap svg {
  display: block;
}

.channel-name-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 连接胶囊按钮 (对标截图：黑色小胶囊) */
.btn-channel-connect {
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: #18181B;
  color: #FFFFFF;
  transition: all 0.15s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-channel-connect:hover {
  background: #27272A;
}

.btn-channel-connect .btn-text-hover {
  display: none;
}

/* 已连接状态 */
.btn-channel-connect.connected {
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  font-weight: 600;
}

.btn-channel-connect.connected:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.btn-channel-connect.connected:hover .btn-text-default {
  display: none;
}

.btn-channel-connect.connected:hover .btn-text-hover {
  display: inline;
}

.channel-card-desc {
  margin-top: 10px;
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.55;
  min-height: 38px;
}

/* 5. 上下文记忆策略面板与步进器 (严格对标截图) */
.context-management-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.context-left {
  flex: 1;
}

.context-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #0F172A;
  font-weight: 600;
  margin-bottom: 4px;
}

.context-subtext {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
}

/* 步进器 [-] [6] [+] */
.stepper-box {
  display: inline-flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  overflow: hidden;
  vertical-align: middle;
}

.stepper-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: #FFFFFF;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease;
}

.stepper-btn:hover {
  background: #F1F5F9;
}

.stepper-value {
  min-width: 26px;
  padding: 0 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}

/* 现代 Switch 开关 */
.wb-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.wb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wb-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: 0.2s ease;
  border-radius: 22px;
}

.wb-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wb-switch input:checked + .wb-switch-slider {
  background-color: #10B981;
}

.wb-switch input:checked + .wb-switch-slider:before {
  transform: translateX(18px);
}
