.session-list { flex: 1; min-height: 0; align-content: start; }
.theme-toggle { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
@media (hover: hover) { .theme-toggle:hover { color: var(--text); background: var(--panel-2); } }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#theme-icon { display: inline-flex; justify-content: center; width: 22px; font-size: 21px; }
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #18191b;
  --sidebar: #111214;
  --panel: #232529;
  --panel-2: #2c2f34;
  --line: #393d44;
  --text: #eceef2;
  --muted: #a9b0bc;
  --accent: #78a4ff;
  --accent-dark: #263858;
  --danger: #ff9595;
  scrollbar-color: #555c68 var(--bg);
}
html[data-theme="dark"] :is(.nav-item.active, .session.active, .sidebar-toggle[aria-expanded="true"]) { background: var(--panel-2); color: var(--text); }
@media (hover: hover) { html[data-theme="dark"] :is(.new-chat:hover, .nav-item:hover, .session:hover, .sidebar-toggle:hover) { background: var(--panel-2); color: var(--text); } }
html[data-theme="dark"] .sidebar-toggle { background: var(--sidebar); color: var(--muted); }
html[data-theme="dark"] .topbar { background: #18191bed; }
html[data-theme="dark"] .connector-configuration :is(input, select) { background: var(--panel); color: var(--text); }
html[data-theme="dark"] .connector-card { background: var(--panel); }
html[data-theme="dark"] .connector-actions button { background: var(--panel-2); }
html[data-theme="dark"] :is(.section-label, .stream-activity, .run-status, .composer-camera, .connector-scope) { color: var(--muted); }
html[data-theme="dark"] :is(.message.assistant .message-content, #skills-panel .catalog-card p) { color: var(--text); }
html[data-theme="dark"] .main-panel .message.assistant .message-content strong { color: #f5f6f8; }
html[data-theme="dark"] .message.assistant .message-content a { color: var(--accent); }
html[data-theme="dark"] .message.assistant .message-content code { color: #c6d8ff; background: var(--panel-2); }
html[data-theme="dark"] .message.assistant .message-content pre { background: #101114; color: #eceef2; }
html[data-theme="dark"] .message.assistant .message-content pre code { background: transparent; color: inherit; }
html[data-theme="dark"] .message.assistant .message-content blockquote { color: var(--muted); border-color: var(--accent); }
html[data-theme="dark"] .message.user .message-content { background: #244b90; border-color: #365f9f; }
html[data-theme="dark"] .composer { background: var(--panel); border-color: var(--line); box-shadow: 0 8px 24px #0003; }
html[data-theme="dark"] #prompt { color: var(--text); }
html[data-theme="dark"] #prompt::placeholder { color: var(--muted); }
html[data-theme="dark"] :is(.send-button, .dictation-stop) { background: #2563eb; }
html[data-theme="dark"] .send-button:hover { background: #1d4ed8; }
html[data-theme="dark"] .connector-setup-notice { background: #202f49; border-color: #365985; color: #bcd3ff; }
html[data-theme="dark"] .connector-logo { color: var(--text); }
html[data-theme="dark"] .run-status-phase { background-image: linear-gradient(100deg, #b0b8c5 20%, #f3f5f8 45%, #b0b8c5 70%); }
html[data-theme="dark"] { --bg: #111111; --sidebar: #111111; --panel: #1f1f1f; --panel-2: #282828; --line: #3d3d3b; --text: #efeee9; --muted: #93938c; }
html[data-theme="dark"] #chat-view .topbar { background: #111111; }
html[data-theme="dark"] .mode-switch { background: #202020; }
html[data-theme="dark"] .mode-switch button[aria-checked="true"] { background: #303030; border-color: #474745; box-shadow: 0 0 0 1px #3a3a38; }
html[data-theme="dark"] .sidebar-toggle { background: transparent; }

/* 侧边栏底部：主题切换与语言切换并排。 */
.sidebar-footer { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.lang-toggle { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .lang-toggle:hover { color: var(--text); background: var(--panel-2); } }
.lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* 暗黑模式下提高侧边栏辨识度：文字和图标接近白色，选中/悬停项用更亮的白色。 */
html[data-theme="dark"] :is(.new-chat, .nav-item, .session, .theme-toggle, .lang-toggle, .mode-switch button) { color: #d9d9d4; }
html[data-theme="dark"] .sidebar .section-label { color: #a6a6a0; }
html[data-theme="dark"] :is(.nav-item.active, .session.active, .mode-switch button[aria-checked="true"]) { color: #ffffff; }
@media (hover: hover) { html[data-theme="dark"] :is(.new-chat:hover, .nav-item:hover, .session:hover, .theme-toggle:hover, .lang-toggle:hover) { color: #ffffff; } }
