/**
 * Session Hub Component - 高透明玻璃态设计
 * 会话中心面板样式
 * 创建时间: 2026-01-25
 * 更新时间: 2026-01-25 (UI升级：网格布局、终端风格预览)
 */

/* ===== Chat Panel Header ===== */
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  min-height: 40px;
  padding: 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius, 6px);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
}

.chat-header-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.chat-header-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.chat-header-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ===== Session Hub Panel - 高透明玻璃态 ===== */
.session-hub-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--sidebar-width, 64px) + var(--chat-panel-width, 380px));
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  animation: slideFromLeft 0.25s var(--ease-smooth, cubic-bezier(0.25, 0.46, 0.45, 0.94));
}

.session-hub-panel.closing {
  animation: slideToLeft 0.2s ease-out forwards;
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ===== Session Hub Header - 增强版 ===== */
.session-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.session-hub-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.session-hub-logo {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-hub-logo svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.session-hub-title-group h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  line-height: 1.2;
}

.session-hub-title-group .subtitle {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  opacity: 0.6;
  margin: 0;
}

.session-hub-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 搜索框 */
.session-hub-search {
  position: relative;
}

.session-hub-search-input {
  width: 180px;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.session-hub-search-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.session-hub-search-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
  outline: none;
}

.session-hub-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  opacity: 0.6;
  pointer-events: none;
}

.session-hub-search-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* 视图切换 */
.session-hub-view-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
}

.view-toggle-btn.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
}

.view-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* 关闭按钮 */
.session-hub-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-hub-close:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--foreground);
}

.session-hub-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ===== Stats Bar - 统计栏 ===== */
.session-hub-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.session-hub-stats-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.stat-item .count {
  color: var(--foreground);
  font-weight: 500;
}

/* 状态指示点 - 带发光效果 */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.idle {
  background: hsl(142 76% 36%);
  box-shadow: 0 0 8px hsl(142 76% 36% / 0.5);
}

.status-dot.processing {
  background: hsl(38 92% 50%);
  box-shadow: 0 0 8px hsl(38 92% 50% / 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.connected {
  background: hsl(217 91% 60%);
  box-shadow: 0 0 8px hsl(217 91% 60% / 0.5);
}

.status-dot.disconnected {
  background: var(--muted-foreground);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 新增目录按钮 - 主要按钮样式 */
.session-hub-new-dir-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.session-hub-new-dir-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

.session-hub-new-dir-btn:active {
  transform: scale(0.98);
}

.session-hub-new-dir-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* 兼容旧版 actions 区域 */
.session-hub-actions {
  display: none;
}

/* ===== Session Hub List - 自适应网格布局 ===== */
.session-hub-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  /* 卡片最小宽度 280px，自动填充列数 */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-content: start;
}

/* ===== Session Card - 高透明玻璃卡片 ===== */
.session-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.25rem;
  /* 限定卡片最大宽度，防止单卡时过宽 */
  max-width: 420px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: slideIn 0.3s ease-out;
}

.session-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.session-card.current {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.session-card.current:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Session Card Header */
.session-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.session-card-title {
  flex: 1;
  min-width: 0;
}

.session-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

/* 当前会话标签 */
.session-card-current-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.session-card-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.session-card-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
}

.session-card-status-dot.idle {
  background: hsl(142 76% 36%);
  box-shadow: 0 0 6px hsl(142 76% 36% / 0.4);
}

.session-card-status-dot.processing {
  background: hsl(38 92% 50%);
  box-shadow: 0 0 6px hsl(38 92% 50% / 0.4);
  animation: pulse 1.5s ease-in-out infinite;
}

.session-card-status-dot.connected {
  background: hsl(217 91% 60%);
  box-shadow: 0 0 6px hsl(217 91% 60% / 0.4);
}

.session-card-status-text {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.session-card-path {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.125rem;
}

.session-card-fullpath {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Session Card Actions */
.session-card-actions {
  flex-shrink: 0;
}

.session-card-badge {
  display: none;
}

/* Switch Button - 玻璃态 */
.switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--foreground);
}

.switch-btn:active {
  transform: scale(0.96);
}

.switch-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ===== Terminal Preview - 终端风格消息预览 ===== */
.terminal-preview {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.terminal-dot.red { background: rgba(239, 68, 68, 0.6); }
.terminal-dot.yellow { background: rgba(234, 179, 8, 0.6); }
.terminal-dot.green { background: rgba(34, 197, 94, 0.6); }

.terminal-title {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  opacity: 0.5;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 0.5rem 0.625rem;
  max-height: 100px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.terminal-body::-webkit-scrollbar {
  width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Terminal Line */
.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.1875rem 0;
  font-size: 0.6875rem;
  line-height: 1.5;
}

.terminal-line .prefix {
  flex-shrink: 0;
  font-weight: 600;
  width: 1rem;
  text-align: center;
}

.terminal-line.user .prefix {
  color: rgba(255, 255, 255, 0.9);
}

.terminal-line.user .content {
  color: rgba(255, 255, 255, 0.7);
}

.terminal-line.assistant .prefix {
  color: rgba(255, 255, 255, 0.5);
}

.terminal-line.assistant .content {
  color: rgba(255, 255, 255, 0.5);
}

.terminal-line.processing .prefix {
  color: hsl(38 92% 50%);
}

.terminal-line.processing .content {
  color: rgba(255, 255, 255, 0.6);
}

.terminal-line .content {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Terminal Empty */
.terminal-empty {
  color: var(--muted-foreground);
  opacity: 0.4;
  font-size: 0.6875rem;
  text-align: center;
  padding: 1rem 0;
}

/* Card Footer */
.session-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.session-card-msg-count {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  opacity: 0.6;
}

.session-card-typing {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
}

.session-card-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(38 92% 50%);
  animation: pulse 1s ease-in-out infinite;
}

/* ===== 兼容旧版消息预览 ===== */
.message-preview {
  display: none;
}

.preview-message,
.preview-role,
.preview-text,
.no-messages {
  display: none;
}

/* ===== Session Hub Footer ===== */
.session-hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.session-hub-footer-left {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.session-hub-footer-left .count {
  color: var(--foreground);
  font-weight: 500;
}

.session-hub-footer-right {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.session-hub-footer-right kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.375rem;
  margin: 0 0.25rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-foreground);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.625rem;
}

/* ===== Add New Card ===== */
.session-card-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.session-card-add:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.session-card-add-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.session-card-add-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--muted-foreground);
  stroke-width: 2;
  fill: none;
}

.session-card-add-text {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* ===== Empty State ===== */
.session-hub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: var(--muted-foreground);
  grid-column: 1 / -1;
}

.session-hub-empty-icon {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.session-hub-empty-icon svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.session-hub-empty p {
  font-size: 0.875rem;
  margin: 0;
}

/* ===== Loading State ===== */
.session-hub-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--muted-foreground);
  grid-column: 1 / -1;
}

.session-hub-loading .loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinSmooth 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin-bottom: 0.75rem;
}

@keyframes spinSmooth {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.session-hub-loading p {
  font-size: 0.875rem;
  margin: 0;
}

/* ===== Scrollbar ===== */
.session-hub-list::-webkit-scrollbar {
  width: 6px;
}

.session-hub-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.session-hub-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.session-hub-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 899px) {
  .session-hub-panel {
    left: 0;
    bottom: var(--bottom-nav-height, 64px);
    border-left: none;
  }
  
  .session-hub-header {
    padding: 0.75rem 1rem;
  }
  
  .session-hub-search {
    display: none;
  }
  
  .session-hub-view-toggle {
    display: none;
  }
  
  .session-hub-stats {
    padding: 0.75rem 1rem;
  }
  
  .session-hub-list {
    padding: 1rem;
    /* 移动端使用更小的最小宽度 */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .session-card {
    max-width: none;
  }
  
  .session-hub-footer {
    padding: 0.5rem 1rem;
  }
  
  .chat-panel-header {
    padding: 0 0.5rem;
  }
}

@media (max-width: 599px) {
  .session-hub-stats-left {
    gap: 1rem;
  }
  
  .session-hub-new-dir-btn span {
    display: none;
  }
}

/* ===== 浅色主题样式 - 颜色反转 ===== */

/* Chat Panel Header - 浅色主题 */
body:not(.dark) .chat-panel-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

body:not(.dark) .chat-header-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

body:not(.dark) .chat-header-btn:active {
  background: rgba(0, 0, 0, 0.15);
}

/* Session Hub Panel - 浅色主题 */
body:not(.dark) .session-hub-panel {
  background: rgba(0, 0, 0, 0.02);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Session Hub Header - 浅色主题 */
body:not(.dark) .session-hub-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-hub-logo {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-hub-logo svg {
  stroke: rgba(0, 0, 0, 0.7);
}

/* 搜索框 - 浅色主题 */
body:not(.dark) .session-hub-search-input {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-hub-search-input:focus {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* 视图切换 - 浅色主题 */
body:not(.dark) .session-hub-view-toggle {
  background: rgba(0, 0, 0, 0.05);
}

body:not(.dark) .view-toggle-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.03);
}

body:not(.dark) .view-toggle-btn.active {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

/* 关闭按钮 - 浅色主题 */
body:not(.dark) .session-hub-close {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.dark) .session-hub-close:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Stats Bar - 浅色主题 */
body:not(.dark) .session-hub-stats {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(0, 0, 0, 0.02);
}

/* 新增目录按钮 - 浅色主题 */
body:not(.dark) .session-hub-new-dir-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.05);
}

body:not(.dark) .session-hub-new-dir-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Session Card - 浅色主题 */
body:not(.dark) .session-card {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-card:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

body:not(.dark) .session-card.current {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

body:not(.dark) .session-card.current:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

/* 当前会话标签 - 浅色主题 */
body:not(.dark) .session-card-current-badge {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Switch Button - 浅色主题 */
body:not(.dark) .switch-btn {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.dark) .switch-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Terminal Preview - 浅色主题 */
body:not(.dark) .terminal-preview {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .terminal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark) .terminal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

body:not(.dark) .terminal-line.user .prefix {
  color: rgba(0, 0, 0, 0.9);
}

body:not(.dark) .terminal-line.user .content {
  color: rgba(0, 0, 0, 0.7);
}

body:not(.dark) .terminal-line.assistant .prefix {
  color: rgba(0, 0, 0, 0.5);
}

body:not(.dark) .terminal-line.assistant .content {
  color: rgba(0, 0, 0, 0.5);
}

body:not(.dark) .terminal-line.processing .content {
  color: rgba(0, 0, 0, 0.6);
}

/* Card Footer - 浅色主题 */
body:not(.dark) .session-card-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.dark) .session-card-typing {
  color: rgba(0, 0, 0, 0.6);
}

/* Session Hub Footer - 浅色主题 */
body:not(.dark) .session-hub-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(0, 0, 0, 0.02);
}

body:not(.dark) .session-hub-footer-right kbd {
  background: rgba(0, 0, 0, 0.1);
}

/* Add New Card - 浅色主题 */
body:not(.dark) .session-card-add {
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-card-add:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}

body:not(.dark) .session-card-add-icon {
  background: rgba(0, 0, 0, 0.05);
  border: 1px dashed rgba(0, 0, 0, 0.2);
}

body:not(.dark) .session-card-add-icon svg {
  stroke: var(--muted-foreground);
}

/* Loading State - 浅色主题 */
body:not(.dark) .session-hub-loading .loading-spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary);
}

/* Scrollbar - 浅色主题 */
body:not(.dark) .session-hub-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

body:not(.dark) .session-hub-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

body:not(.dark) .session-hub-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}
