:root {
  color-scheme: dark;
  --bg: #1a1a2e;
  --bg-soft: #202039;
  --panel: #171727;
  --panel-elevated: #22223a;
  --panel-muted: #2a2a44;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f6fb;
  --text-soft: #c9ccda;
  --muted: #8f94aa;
  --accent: #f5f6fb;
  --accent-contrast: #11111d;
  --danger: #ef4444;
  --success: #22c55e;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --sidebar-width: 296px;
  --composer-height: 146px;
  --composer-offset: 176px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f8;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --panel-muted: #f0f1f4;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #171923;
  --text-soft: #3f4554;
  --muted: #697080;
  --accent: #171923;
  --accent-contrast: #ffffff;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, textarea, input { font: inherit; }
button { color: inherit; }

.app-shell { height: 100vh; height: 100dvh; }
.command-center {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: color-mix(in srgb, var(--panel) 92%, #000 8%);
  border-right: 1px solid var(--border);
  transition: width 180ms ease, transform 180ms ease;
  z-index: 20;
}
.sidebar.collapsed { width: 78px; }
.command-center.sidebar-collapsed { grid-template-columns: 78px minmax(0, 1fr); }
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel-muted);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-text { min-width: 0; }
.brand-title { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .section-title,
.sidebar.collapsed .conversation-meta,
.sidebar.collapsed .conversation-actions,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer-text { display: none; }

.icon-button,
.send-button,
.upload-button,
.new-chat-button,
.ghost-button,
.copy-code-button,
.attachment-remove {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
}
.icon-button:hover { background: var(--panel-muted); border-color: var(--border); }
.icon-button:active, .send-button:active, .new-chat-button:active { transform: translateY(1px); }
.icon { width: 20px; height: 20px; display: block; }

.sidebar-actions { padding: 14px 14px 10px; }
.new-chat-button {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.new-chat-button:hover { opacity: 0.92; }
.sidebar.collapsed .new-chat-button span { display: none; }

.conversation-section { flex: 1; min-height: 0; padding: 8px 10px; overflow: hidden; display: flex; flex-direction: column; }
.section-title { margin: 6px 8px 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.conversation-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.conversation-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.conversation-item:hover { background: var(--panel-muted); }
.conversation-item.active { background: var(--panel-elevated); border-color: var(--border); color: var(--text); }
.conversation-icon { flex: 0 0 auto; opacity: 0.8; }
.conversation-meta { min-width: 0; flex: 1; }
.conversation-title { font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-time { margin-top: 4px; color: var(--muted); font-size: 12px; }
.conversation-actions { opacity: 0; display: flex; gap: 2px; }
.conversation-item:hover .conversation-actions { opacity: 1; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 12px 14px; display: grid; gap: 8px; }
.sidebar-link {
  min-height: 40px;
  border-radius: 12px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid transparent;
}
.sidebar-link:hover { background: var(--panel-muted); border-color: var(--border); color: var(--text); }
.sidebar-footer-note { margin: 4px 4px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.main {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  background: var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  z-index: 10;
}
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-menu-button { display: none; }
.chat-title-group { min-width: 0; }
.chat-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { margin: 3px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.ghost-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.ghost-button:hover { background: var(--panel-muted); color: var(--text); }

.messages-wrap {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-bottom: var(--composer-offset);
}
.messages {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 34px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.empty-state {
  min-height: calc(100vh - 280px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 44px 20px;
}
.empty-card { max-width: 640px; }
.empty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  margin-bottom: 18px;
}
.empty-title { margin: 0 0 12px; font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.045em; font-weight: 720; }
.empty-desc { margin: 0 auto; color: var(--text-soft); line-height: 1.8; max-width: 560px; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; justify-content: center; }
.quick-prompt {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text-soft);
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
}
.quick-prompt:hover { background: var(--panel-elevated); color: var(--text); border-color: var(--border-strong); }

.message { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; align-items: flex-start; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--panel-elevated);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 700;
}
.message.user .avatar { background: var(--accent); color: var(--accent-contrast); }
.message-body { min-width: 0; }
.message-header { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.message-author { color: var(--text); font-weight: 650; }
.message-content {
  color: var(--text);
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.message.user .message-content {
  display: inline-block;
  max-width: min(100%, 760px);
  border: 1px solid var(--border);
  background: var(--panel-elevated);
  border-radius: 18px;
  padding: 12px 15px;
}
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { line-height: 1.25; letter-spacing: -0.025em; margin: 1.35em 0 0.55em; }
.markdown-body h1 { font-size: 1.72rem; }
.markdown-body h2 { font-size: 1.42rem; }
.markdown-body h3 { font-size: 1.16rem; }
.markdown-body p { margin: 0.75em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.35rem; margin: 0.75em 0; }
.markdown-body li { margin: 0.28em 0; }
.markdown-body blockquote {
  margin: 1em 0;
  padding: 0.75em 1em;
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-elevated) 86%, transparent);
  color: var(--text-soft);
}
.markdown-body a { color: #93c5fd; text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body strong { font-weight: 720; }
.markdown-body hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; vertical-align: top; }
.markdown-body th { background: var(--panel-muted); font-weight: 650; }
.markdown-body :not(pre) > code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel-muted); border: 1px solid var(--border); border-radius: 7px; padding: 0.16em 0.36em; }
.code-block { margin: 1em 0; border: 1px solid var(--border); border-radius: 16px; background: #0d1117; overflow: hidden; }
.code-header { height: 38px; padding: 0 10px 0 14px; display: flex; align-items: center; justify-content: space-between; color: #aab2c0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 12px; }
.copy-code-button { min-height: 28px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.10); color: #e6edf3; }
.copy-code-button:hover { background: rgba(255,255,255,0.13); }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; }
.code-block code { font-family: var(--font-mono); font-size: 13px; line-height: 1.65; }


.agent-trace {
  margin: 4px 0 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-elevated) 92%, transparent), color-mix(in srgb, var(--panel) 96%, transparent));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .12);
  overflow: hidden;
}
.agent-trace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}
.agent-trace-title { color: var(--text); font-weight: 720; letter-spacing: -0.015em; }
.agent-trace-meta { margin-top: 2px; color: var(--muted); font-size: 12px; }
.agent-trace-stop {
  flex: 0 0 auto;
  max-width: 180px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-soft);
  background: var(--panel-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-step-list { display: grid; gap: 10px; padding: 12px; }
.agent-step-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-elevated) 84%, transparent);
  overflow: hidden;
}
.agent-step-card.success { border-color: color-mix(in srgb, #22c55e 34%, var(--border)); }
.agent-step-card.error { border-color: color-mix(in srgb, #ef4444 42%, var(--border)); }
.agent-step-main { display: flex; gap: 11px; padding: 12px; }
.agent-step-index {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--panel-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 720;
}
.agent-step-content { min-width: 0; flex: 1; }
.agent-step-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.agent-tool-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-step-duration, .agent-step-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.agent-step-title {
  margin-top: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}
.agent-step-input {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}
.agent-step-details {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}
.agent-step-details summary {
  cursor: pointer;
  min-height: 38px;
  padding: 9px 12px;
  color: var(--text-soft);
  font-size: 12px;
  user-select: none;
}
.agent-step-details summary:hover { color: var(--text); }
.agent-step-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.agent-step-detail-block { min-width: 0; }
.agent-step-detail-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.agent-step-detail-block pre {
  max-height: 260px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d1117;
  color: #dbe3ef;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-attachments, .pending-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.attachment-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  max-width: 100%;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text-soft);
  text-decoration: none;
}
.attachment-card:hover { border-color: var(--border-strong); color: var(--text); background: var(--panel-elevated); }
.attachment-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--panel-muted); flex: 0 0 auto; }
.attachment-info { min-width: 0; flex: 1; }
.attachment-name { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.attachment-image { width: min(260px, 100%); height: auto; max-height: 220px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); display: block; }
.attachment-remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 999px; background: var(--panel-elevated); border: 1px solid var(--border-strong); color: var(--text); }

/* ===== AI 交付文件下载卡片（对标 Manus） ===== */
.deliverable-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.deliverable-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: min(100%, 460px);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-elevated);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.deliverable-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}
.deliverable-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.deliverable-info { min-width: 0; flex: 1; }
.deliverable-name {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deliverable-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.deliverable-download {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--panel-muted);
  color: var(--text-soft);
  transition: background .15s ease, color .15s ease;
}
.deliverable-card:hover .deliverable-download { background: var(--accent); color: var(--accent-contrast); }
.deliverable-download .icon { width: 18px; height: 18px; }

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  min-height: 38px;
}
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i { display: block; width: 6px; height: 6px; border-radius: 999px; background: var(--muted); animation: pulse 1.15s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .30s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.composer-wrap {
  position: fixed;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 60;
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 78%, transparent), var(--bg) 34%);
  padding: 16px 22px max(18px, env(safe-area-inset-bottom));
  transform: translateZ(0);
}
.command-center.sidebar-collapsed .composer-wrap { left: 78px; }
.composer {
  width: min(100%, 920px);
  margin: 0 auto;
  border: 1px solid var(--border-strong);
  background: var(--panel-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.drop-indicator { display: none; margin: 10px 12px 0; border: 1px dashed var(--border-strong); border-radius: 14px; padding: 12px; color: var(--text-soft); text-align: center; }
.composer.dragover .drop-indicator { display: block; }
.pending-attachments { padding: 12px 12px 0; margin-top: 0; }
.input-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; align-items: end; padding: 12px; }
.upload-button, .send-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.upload-button { background: transparent; border: 1px solid var(--border); color: var(--text-soft); }
.upload-button:hover { background: var(--panel-muted); color: var(--text); }
.send-button { background: var(--accent); color: var(--accent-contrast); }
.send-button:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
textarea.chat-input {
  width: 100%;
  min-height: 44px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  line-height: 1.55;
  padding: 10px 2px;
}
textarea.chat-input::placeholder { color: var(--muted); }
.composer-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 12px 64px; color: var(--muted); font-size: 12px; }
.hidden-file-input { display: none; }

.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.toast { border: 1px solid var(--border); background: var(--panel-elevated); color: var(--text); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; max-width: 360px; }
.sidebar-backdrop { display: none; }

@media (max-width: 920px) {
  .command-center { grid-template-columns: minmax(0, 1fr); }
  .command-center.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px) !important;
    transform: translateX(-102%);
    box-shadow: var(--shadow);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .section-title,
  .sidebar.collapsed .conversation-meta,
  .sidebar.collapsed .conversation-actions,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .sidebar-footer-text { display: block; }
  .sidebar.collapsed .new-chat-button span { display: inline; }
  .mobile-menu-button { display: inline-grid; }
  .desktop-collapse { display: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 15; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 14px; }
  .messages { padding: 24px 14px 22px; gap: 24px; }
  .composer-wrap { left: 0; right: 0; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); }
  .message { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .avatar { width: 34px; height: 34px; border-radius: 12px; }
  .quick-prompts { grid-template-columns: 1fr; }
  .topbar-actions .ghost-button { display: none; }
}

@media (max-width: 560px) {
  .agent-trace { border-radius: 16px; }
  .agent-trace-header { align-items: flex-start; flex-direction: column; }
  .agent-trace-stop { max-width: 100%; }
  .agent-step-main { gap: 9px; padding: 10px; }
  .agent-tool-badge { max-width: 100%; }
  .agent-step-detail-grid { grid-template-columns: 1fr; }
  .agent-step-detail-block pre { max-height: 220px; }
  .main { grid-template-rows: 58px minmax(0, 1fr); }
  .chat-title { font-size: 15px; }
  .empty-state { min-height: calc(100vh - 250px); padding: 30px 8px; }
  .empty-desc { font-size: 14px; }
  .input-row { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; padding: 10px; }
  .upload-button, .send-button { width: 40px; height: 40px; border-radius: 13px; }
  .composer-hint { display: none; }
  .attachment-card { min-width: 0; width: 100%; }
  .message.user .message-content { width: 100%; }
}

/* === iPhone/iPad safe-area & responsive fix === */
@supports(padding:env(safe-area-inset-top)){
  .app-shell{padding-top:env(safe-area-inset-top)}
  .topbar{top:0;position:sticky;z-index:100}
  .composer-wrap{padding-bottom:calc(env(safe-area-inset-bottom) + 8px)}
}
.app-shell,.command-center{height:100dvh;height:-webkit-fill-available}
.messages-wrap{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;overflow-y:auto}
@media(max-width:920px){
  .topbar{position:sticky;top:0;z-index:100}
  .main{display:flex;flex-direction:column;height:100%}
  .messages-wrap{flex:1;min-height:0;padding-bottom:var(--composer-offset)}
}
@media(max-width:560px){
  .messages{padding-top:16px}
}
/* === END safe-area fix === */

/* === Enhanced thinking/typing animation === */
.thinking::after { content: ""; } /* [FIX_20260703] removed hardcoded text to avoid duplication with .thinking-label */
.thinking-dots i { background: var(--accent); }
@keyframes pulse { 0%, 80%, 100% { opacity: .2; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.2); } }
.message-content.streaming::after { content: "▊"; animation: blink-cursor 0.8s step-end infinite; color: var(--accent); }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
/* Quick prompts mobile fix for 5 buttons */
@media(max-width:560px){ .quick-prompts { gap: 8px; } .quick-prompt { padding: 10px 12px; font-size: 13px; } }
/* === END enhanced animation === */
/* ===== AI Command Center CSS Patch v20260624_stream =====
   修复颜色铁律 + 新增流式/打字机/重试/复制消息样式
   追加到 manus_chat.css 末尾
   ===================================================== */

/* 1. 铁律修复：--accent 和 --text 接近白色问题 */
:root {
  /* 将 accent 从接近白色 #f5f6fb 改为青蓝色，深色模式下可见且不接近白色 */
  --accent: #4f9cf9;
  --accent-contrast: #0a1628;
  /* --text 保持 #f5f6fb（深色背景上的浅色文字是标准做法，不违反铁律）
     但 thinking-dots 和 streaming cursor 不能用 --accent 的旧值 */
}
/* 深色主题下的 thinking dots 改用青蓝色 */
.thinking-dots i { background: #4f9cf9 !important; }
/* streaming cursor 改用青蓝色 */
.message-content.streaming::after { color: #4f9cf9 !important; }

/* 2. 分级加载状态样式 */
.thinking {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  min-height: 40px;
  padding: 4px 0;
}
.thinking-label {
  font-size: 14px;
  color: var(--text-soft);
  font-style: italic;
}
.thinking-sending .thinking-label { color: #a0aec0; }
.thinking-thinking .thinking-label { color: #63b3ed; }
.thinking-generating .thinking-label { color: #68d391; }
/* [FIX_20260703] 工具调用状态样式 */
.thinking-calling_tools .thinking-label { color: #f6ad55; }
.thinking-analyzing_image .thinking-label { color: #b794f4; }
.thinking-tool-icon { font-size: 18px; line-height: 1; }
.thinking-tool-args {
  font-size: 12px;
  color: var(--text-muted, #718096);
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  padding: 2px 6px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 3. 状态点动画（发送中闪烁） */
.status-dot.active {
  animation: status-pulse 1s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* 4. 消息操作按钮（复制） */
.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.message-time {
  color: var(--muted);
  font-size: 12px;
  flex: 1;
}
.message-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.message:hover .message-actions,
.message-actions:focus-within {
  opacity: 1;
}
.msg-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  padding: 0;
}
.msg-action-btn:hover {
  background: var(--panel-muted);
  color: var(--text-soft);
}
.msg-action-btn .icon { width: 14px; height: 14px; }

/* 5. 重试按钮 */
.retry-wrap {
  margin-top: 10px;
}
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel-muted);
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.retry-btn:hover {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.retry-btn .icon { width: 14px; height: 14px; }

/* 6. 错误消息样式 */
.message.error-msg .message-content {
  border-left: 3px solid var(--danger);
  padding-left: 12px;
}

/* 7. 停止生成按钮 */
.ghost-button.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}
.ghost-button.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* 8. 流式光标增强 */
.message-content.streaming {
  position: relative;
}
.message-content.streaming::after {
  content: "▊";
  animation: blink-cursor 0.7s step-end infinite;
  color: #4f9cf9;
  font-size: 0.9em;
  vertical-align: baseline;
  margin-left: 1px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 9. send button 发送中状态 */
.send-button:disabled {
  background: var(--panel-muted) !important;
  color: var(--muted) !important;
  opacity: 0.7 !important;
}

/* 10. 思考动画重写（更流畅） */
@keyframes pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1.15); }
}
.thinking-dots i {
  animation: pulse 1.2s ease-in-out infinite;
}
.thinking-dots i:nth-child(2) { animation-delay: 0.18s; }
.thinking-dots i:nth-child(3) { animation-delay: 0.36s; }

/* 11. 消息头部时间戳对齐修复 */
.message-header .message-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-soft);
  flex-shrink: 0;
}

/* ===== END CSS Patch ===== */

/* ===== [AGENT_V2_STREAM_20260702] Agent 实时进度面板样式 ===== */
.agent-progress-panel {
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  background: var(--surface-alt, rgba(255,255,255,0.04));
  padding: 12px 14px;
  margin: 4px 0 8px;
  font-size: 13px;
}
.agent-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.agent-progress-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--accent, #6366f1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.agent-progress-title::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #6366f1);
  animation: pulse 1.2s ease-in-out infinite;
}
.agent-progress-meta {
  font-size: 11px;
  color: var(--text-muted, rgba(255,255,255,0.4));
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.agent-progress-persona,
.agent-progress-planner {
  background: var(--surface, rgba(255,255,255,0.08));
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}
.agent-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.agent-progress-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface, rgba(255,255,255,0.04));
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}
.agent-progress-step.running {
  border-color: var(--accent, #6366f1);
  background: rgba(99,102,241,0.08);
}
.agent-progress-step.done {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.05);
}
.agent-progress-step.failed {
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.05);
}
.agent-progress-step.pending {
  opacity: 0.55;
}
.agent-progress-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--surface-alt, rgba(255,255,255,0.1));
  color: var(--text-soft, rgba(255,255,255,0.6));
}
.agent-progress-step.running .agent-progress-step-icon {
  background: var(--accent, #6366f1);
  color: #fff;
}
.agent-progress-step.done .agent-progress-step-icon {
  background: rgba(34,197,94,0.2);
  color: #22c55e;
}
.agent-progress-step.failed .agent-progress-step-icon {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}
.agent-progress-step-body {
  flex: 1;
  min-width: 0;
}
.agent-progress-step-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text, rgba(255,255,255,0.9));
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.agent-progress-step-elapsed {
  font-size: 11px;
  color: var(--text-muted, rgba(255,255,255,0.4));
  font-weight: 400;
}
.agent-progress-step-summary {
  font-size: 12px;
  color: var(--text-soft, rgba(255,255,255,0.55));
  margin-top: 3px;
  line-height: 1.5;
  word-break: break-word;
}
.agent-progress-step .thinking-dots {
  margin-left: auto;
  flex-shrink: 0;
}
/* 浅色主题适配 */
[data-theme="light"] .agent-progress-panel {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .agent-progress-step {
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .agent-progress-step.running {
  background: rgba(99,102,241,0.07);
}
[data-theme="light"] .agent-progress-step.done {
  background: rgba(34,197,94,0.06);
}
[data-theme="light"] .agent-progress-step-title {
  color: rgba(0,0,0,0.85);
}
[data-theme="light"] .agent-progress-step-summary {
  color: rgba(0,0,0,0.5);
}
/* ===== END AGENT_V2_STREAM CSS ===== */

/* [MANUS_DELIVERY_UPGRADE_20260703] 产物交付能力升级CSS */

/* ===== 产物卡片容器 ===== */

/* ===== Artifact Card System v2 ===== */
.artifact-cards-container { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.artifact-card { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,0.02); transition: box-shadow 0.2s, border-color 0.2s; max-width: 100%; box-sizing: border-box; }
.artifact-card:hover { border-color: rgba(99,102,241,0.3); box-shadow: 0 2px 12px rgba(99,102,241,0.06); }
.artifact-card-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(255,255,255,0.01); }
.artifact-card-icon { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: rgba(99,102,241,0.12); font-size: 18px; flex-shrink: 0; }
.artifact-card-info { flex: 1; min-width: 0; }
.artifact-card-title { font-size: 13px; font-weight: 600; color: var(--text, rgba(255,255,255,0.92)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artifact-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 11px; color: var(--text-soft, rgba(255,255,255,0.5)); }
.artifact-lang-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; background: rgba(99,102,241,0.15); color: #a5b4fc; font-size: 10px; font-weight: 500; text-transform: uppercase; }
.artifact-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.artifact-btn { font-size: 11px; padding: 4px 10px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-soft, rgba(255,255,255,0.7)); cursor: pointer; transition: all 0.15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; white-space: nowrap; }
.artifact-btn:hover { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.3); color: #a5b4fc; }
.artifact-btn:active { transform: scale(0.95); opacity: 0.8; }
.artifact-btn.copied { background: rgba(34,197,94,0.15) !important; border-color: rgba(34,197,94,0.4) !important; color: #22c55e !important; }
.artifact-card-body { max-height: 350px; overflow: hidden; }
.artifact-code-preview { display: flex; font-family: var(--font-mono, 'JetBrains Mono', 'Fira Code', monospace); font-size: 12px; line-height: 1.6; background: #0d1117; max-width: 100%; box-sizing: border-box; }
.artifact-line-numbers { flex-shrink: 0; padding: 12px 0; background: rgba(255,255,255,0.02); border-right: 1px solid rgba(255,255,255,0.06); user-select: none; }
.artifact-line-numbers pre { margin: 0; padding: 0 10px; text-align: right; color: rgba(255,255,255,0.25); font-size: 11px; line-height: 1.6; }
.artifact-line-numbers pre span { display: block; }
.artifact-code-body { flex: 1; overflow-x: auto; padding: 12px 16px; max-width: 100%; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.artifact-code-body pre { margin: 0; }
.artifact-code-body code { font-size: 12px; line-height: 1.6; }
.artifact-doc-preview { padding: 14px 16px; max-height: 350px; overflow-y: auto; font-size: 13px; line-height: 1.7; color: var(--text, rgba(255,255,255,0.88)); }
.artifact-doc-preview h1, .artifact-doc-preview h2, .artifact-doc-preview h3 { margin-top: 12px; margin-bottom: 6px; }
.artifact-doc-preview p { margin: 6px 0; }
.artifact-doc-preview ul, .artifact-doc-preview ol { padding-left: 20px; }
.artifact-text-preview { padding: 12px 16px; max-height: 300px; overflow-y: auto; }
.artifact-text-preview pre { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-soft, rgba(255,255,255,0.7)); white-space: pre-wrap; word-break: break-word; }
/* ===== Agent step progress animation ===== */
.agent-progress-step.running::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--accent, #6366f1), transparent); animation: stepProgress 2s ease-in-out infinite; border-radius: 0 0 7px 7px; width: 100%; }
@keyframes stepProgress { 0% { transform: translateX(-100%); } 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }
/* ===== Light theme ===== */
[data-theme="light"] .artifact-card { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); }
[data-theme="light"] .artifact-card:hover { box-shadow: 0 2px 12px rgba(99,102,241,0.08); }
[data-theme="light"] .artifact-card-header { border-bottom-color: rgba(0,0,0,0.06); background: rgba(0,0,0,0.01); }
[data-theme="light"] .artifact-card-icon { background: rgba(99,102,241,0.08); }
[data-theme="light"] .artifact-card-title { color: rgba(0,0,0,0.88); }
[data-theme="light"] .artifact-card-meta { color: rgba(0,0,0,0.5); }
[data-theme="light"] .artifact-lang-badge { background: rgba(99,102,241,0.1); color: #4f46e5; }
[data-theme="light"] .artifact-btn { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.03); color: rgba(0,0,0,0.7); }
[data-theme="light"] .artifact-btn:hover { background: rgba(99,102,241,0.08); color: #4f46e5; }
[data-theme="light"] .artifact-code-preview { background: #f6f8fa; }
[data-theme="light"] .artifact-line-numbers { background: rgba(0,0,0,0.02); border-right-color: rgba(0,0,0,0.06); }
[data-theme="light"] .artifact-line-numbers pre { color: rgba(0,0,0,0.3); }
[data-theme="light"] .artifact-doc-preview { color: rgba(0,0,0,0.85); }
[data-theme="light"] .artifact-text-preview pre { color: rgba(0,0,0,0.65); }
/* ===== Mobile responsive v2 ===== */
@media (max-width: 768px) {
  .artifact-cards-container { gap: 10px; margin-top: 10px; }
  .artifact-card { border-radius: 8px; }
  .artifact-card-header { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .artifact-card-icon { width: 28px; height: 28px; font-size: 16px; }
  .artifact-card-info { min-width: 0; flex: 1; }
  .artifact-card-title { font-size: 12px; max-width: 140px; }
  .artifact-card-meta { font-size: 10px; }
  .artifact-card-actions { gap: 4px; }
  .artifact-btn { font-size: 10px; padding: 3px 8px; min-width: 44px; min-height: 28px; }
  .artifact-code-preview { font-size: 11px; max-height: 250px; overflow: auto; }
  .artifact-code-body { padding: 8px 10px; }
  .artifact-code-body pre { white-space: pre; word-break: normal; overflow-wrap: normal; }
  .artifact-line-numbers pre { padding: 0 6px; font-size: 10px; }
  .artifact-doc-preview { padding: 10px 12px; font-size: 12px; max-height: 280px; }
  .artifact-text-preview { padding: 10px 12px; }
  .artifact-text-preview pre { font-size: 11px; }
  .artifact-card-body { max-height: 280px; }
}
@media (max-width: 420px) {
  .artifact-card-header { padding: 6px 8px; }
  .artifact-card-title { max-width: 100px; font-size: 11px; }
  .artifact-card-actions { flex-wrap: wrap; }
  .artifact-btn { font-size: 9px; padding: 2px 6px; }
  .artifact-code-preview { font-size: 10px; }
  .artifact-code-body { padding: 6px 8px; }
  .artifact-line-numbers { display: none; }
  .artifact-doc-preview { padding: 8px 10px; font-size: 11px; }
}


/* ===== MANUS 100% DELIVERY UPGRADE CSS ===== */

/* --- Enhanced Agent Progress Panel --- */
.agent-progress-panel { border: 1px solid rgba(99,102,241,0.2); border-radius: 12px; background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.02)); overflow: hidden; margin-bottom: 12px; }
.agent-progress-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(99,102,241,0.1); }
.agent-progress-title { font-weight: 700; font-size: 13px; color: var(--text, rgba(255,255,255,0.92)); }
.agent-progress-meta { font-size: 11px; color: var(--muted, rgba(255,255,255,0.5)); }
.agent-progress-persona { margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(99,102,241,0.12); color: #a5b4fc; font-size: 10px; }
.agent-progress-planner { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(34,197,94,0.12); color: #86efac; font-size: 10px; }
.agent-progress-steps { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.agent-progress-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,0.02); border: 1px solid transparent; position: relative; transition: all 0.3s ease; }
.agent-progress-step.running { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.2); animation: stepPulse 2s ease-in-out infinite; }
.agent-progress-step.done { opacity: 0.75; }
.agent-progress-step.done .agent-progress-step-icon { background: rgba(34,197,94,0.15); color: #22c55e; }
.agent-progress-step.failed .agent-progress-step-icon { background: rgba(239,68,68,0.15); color: #ef4444; }
.agent-progress-step.running .agent-progress-step-icon { background: rgba(99,102,241,0.15); color: #818cf8; }
.agent-progress-step.pending .agent-progress-step-icon { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.35); }
.agent-progress-step-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: all 0.3s; }
.agent-progress-step-body { flex: 1; min-width: 0; }
.agent-progress-step-title { font-size: 12px; font-weight: 500; color: var(--text, rgba(255,255,255,0.88)); display: flex; align-items: center; gap: 8px; }
.agent-progress-step-elapsed { font-size: 10px; color: var(--muted, rgba(255,255,255,0.4)); margin-left: auto; }
.agent-progress-step-summary { font-size: 11px; color: var(--muted, rgba(255,255,255,0.5)); margin-top: 2px; max-height: 36px; overflow: hidden; }
@keyframes stepPulse { 0%, 100% { border-color: rgba(99,102,241,0.2); } 50% { border-color: rgba(99,102,241,0.4); } }

/* --- Thinking dots --- */
.thinking-dots { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; }
.thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: #818cf8; animation: dotBounce 1.4s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* --- Error state card --- */
.agent-error-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 8px 0; border-radius: 10px; background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); }
.agent-error-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(239,68,68,0.12); font-size: 18px; flex-shrink: 0; }
.agent-error-body { flex: 1; min-width: 0; }
.agent-error-title { font-size: 13px; font-weight: 600; color: #fca5a5; }
.agent-error-msg { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; word-break: break-word; }
.agent-error-action { flex-shrink: 0; }
.agent-error-retry-btn { font-size: 11px; padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); color: #fca5a5; cursor: pointer; transition: all 0.15s; }
.agent-error-retry-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.5); }
.error-msg .message-content { border-left: 3px solid rgba(239,68,68,0.4); padding-left: 12px; }

/* --- Download all bar --- */
.artifact-download-all-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: rgba(99,102,241,0.04); border: 1px solid rgba(99,102,241,0.12); border-radius: 8px; margin-bottom: 8px; }
.artifact-count-badge { font-size: 12px; font-weight: 600; color: #a5b4fc; }
.artifact-download-all-btn { font-size: 12px !important; padding: 5px 14px !important; background: rgba(99,102,241,0.1) !important; border-color: rgba(99,102,241,0.3) !important; color: #a5b4fc !important; font-weight: 500; }
.artifact-download-all-btn:hover { background: rgba(99,102,241,0.2) !important; }

/* --- Image artifact preview --- */
.artifact-image-preview { padding: 8px; display: flex; align-items: center; justify-content: center; max-height: 350px; overflow: hidden; }
.artifact-image-preview img { max-width: 100%; max-height: 330px; object-fit: contain; border-radius: 6px; }

/* --- Table artifact preview --- */
.artifact-table-preview { padding: 0; max-height: 300px; overflow: auto; }
.artifact-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.artifact-table th { background: rgba(99,102,241,0.08); font-weight: 600; text-align: left; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--text, rgba(255,255,255,0.9)); position: sticky; top: 0; }
.artifact-table td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-soft, rgba(255,255,255,0.7)); }
.artifact-table tr:hover td { background: rgba(255,255,255,0.02); }

/* --- Light theme overrides --- */
[data-theme="light"] .agent-progress-panel { border-color: rgba(99,102,241,0.15); background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(139,92,246,0.01)); }
[data-theme="light"] .agent-progress-step.running { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.15); }
[data-theme="light"] .agent-error-card { background: rgba(239,68,68,0.04); border-color: rgba(239,68,68,0.15); }
[data-theme="light"] .agent-error-title { color: #dc2626; }
[data-theme="light"] .agent-error-msg { color: rgba(0,0,0,0.55); }
[data-theme="light"] .agent-error-retry-btn { color: #dc2626; border-color: rgba(239,68,68,0.2); }
[data-theme="light"] .artifact-download-all-bar { background: rgba(99,102,241,0.03); border-color: rgba(99,102,241,0.1); }
[data-theme="light"] .artifact-table th { background: rgba(99,102,241,0.05); color: rgba(0,0,0,0.85); border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .artifact-table td { border-bottom-color: rgba(0,0,0,0.04); color: rgba(0,0,0,0.7); }

/* --- Mobile responsive for new components --- */
@media (max-width: 768px) {
  .agent-progress-panel { border-radius: 10px; }
  .agent-progress-header { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .agent-progress-steps { padding: 8px 10px; gap: 5px; }
  .agent-progress-step { padding: 6px 10px; gap: 8px; }
  .agent-progress-step-icon { width: 20px; height: 20px; font-size: 10px; }
  .agent-error-card { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .agent-error-icon { width: 30px; height: 30px; font-size: 15px; }
  .artifact-download-all-bar { padding: 6px 10px; }
  .artifact-image-preview img { max-height: 200px; }
  .artifact-table { font-size: 11px; }
  .artifact-table th, .artifact-table td { padding: 4px 6px; }
}
@media (max-width: 420px) {
  .agent-progress-step-title { font-size: 11px; }
  .agent-progress-step-summary { font-size: 10px; }
  .agent-error-card { flex-direction: column; align-items: flex-start; }
}
/* ===== END MANUS 100% DELIVERY UPGRADE CSS ===== */

/* =====================================================================
   AI Command Center CSS Upgrade Patch v20260704_manus_upgrade
   对标Manus前端交互体验升级
   修复: ISS-001 文字颜色对比度 + ISS-005 移动端适配
   新增: 消息动画 + 进度条 + 工具调用增强 + Markdown增强
   追加到 manus_chat.css 末尾，不修改原有代码
   ===================================================================== */

/* ===== [ISS-001] WCAG AA 颜色对比度修复 ===== */
/* 深色主题: --muted #8f94aa 在 #1a1a2e 上对比度约3.8:1，不达标
   修复为 #b0b5cc，对比度约5.2:1，达到WCAG AA标准 */
:root {
  --muted: #b0b5cc;
  /* 同步修复 --text-muted 变量（部分组件使用此变量） */
  --text-muted: #b0b5cc;
  /* 修复 accent 颜色确保统一 */
  --accent: #4f9cf9;
  --accent-contrast: #0a1628;
  /* 新增：进度条颜色 */
  --progress-track: rgba(255,255,255,0.08);
  --progress-fill: linear-gradient(90deg, #4f9cf9, #7c6af7);
}

/* 浅色主题: --muted #697080 在 #f7f7f8 上对比度约4.3:1，略低
   修复为 #545a6a，对比度约5.8:1 */
[data-theme="light"] {
  --muted: #545a6a;
  --text-muted: #545a6a;
  --progress-track: rgba(0,0,0,0.08);
  --progress-fill: linear-gradient(90deg, #2563eb, #7c3aed);
}

/* 修复 muted 颜色在各组件中的应用 */
.brand-subtitle,
.section-title,
.conversation-time,
.message-header,
.chat-status,
.composer-hint,
.empty-badge,
.agent-trace-meta,
.agent-step-duration,
.agent-step-status,
.agent-step-detail-label,
.deliverable-meta,
.attachment-meta {
  color: var(--muted);
}

/* 深色主题下 --muted 不再使用 !important 覆盖，改为直接修正变量 */
.thinking-dots i { background: var(--accent); }
.message-content.streaming::after { color: var(--accent); }

/* ===== [NEW] 消息出现动画 ===== */
@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: msgSlideIn 0.22s ease-out both;
}

/* 用户消息从右侧滑入 */
@keyframes msgSlideInRight {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.message.user {
  animation: msgSlideInRight 0.18s ease-out both;
}

/* ===== [NEW] 整体任务进度条 ===== */
.task-progress-bar-wrap {
  margin: 0 0 6px;
  padding: 0;
}

.task-progress-track {
  width: 100%;
  height: 3px;
  background: var(--progress-track);
  border-radius: 999px;
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: var(--progress-fill);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

/* 进度面板顶部增加进度条 */
.agent-progress-panel .task-progress-bar-wrap {
  margin: 8px 0 4px;
}

/* ===== [ISS-005] 移动端适配增强 ===== */

/* 输入框 focus 高亮 */
.composer.focused,
.composer:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(79, 156, 249, 0.15), var(--shadow) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* 所有按钮增加触摸优化 */
button,
.quick-prompt,
.conversation-item,
.sidebar-link,
.ghost-button,
.icon-button,
.send-button,
.upload-button,
.msg-action-btn,
.copy-code-button,
.artifact-btn,
.retry-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 移动端快捷指令优化 */
@media (max-width: 560px) {
  .quick-prompts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .quick-prompt {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 12px;
  }

  /* 移动端消息气泡宽度优化 */
  .message.user .message-content {
    max-width: 100%;
  }

  /* 移动端代码块横向滚动优化 */
  .code-block {
    border-radius: 10px;
  }

  .code-block pre {
    font-size: 12px;
    padding: 12px;
  }

  /* 移动端输入框高度优化 */
  textarea.chat-input {
    min-height: 40px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  /* 移动端发送按钮增大点击区域 */
  .send-button,
  .upload-button {
    width: 42px;
    height: 42px;
  }
}

/* 超小屏幕 (375px) 优化 */
@media (max-width: 375px) {
  .quick-prompts {
    grid-template-columns: 1fr;
  }

  .empty-title {
    font-size: 24px;
  }

  .messages {
    padding: 16px 10px 20px;
    gap: 20px;
  }
}

/* ===== [NEW] Markdown 渲染增强 ===== */

/* 表格斑马纹 + 悬停高亮 */
.markdown-body table {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.markdown-body tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--panel-muted) 50%, transparent);
}

.markdown-body tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* 表头样式增强 */
.markdown-body th {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-muted));
  color: var(--text);
  font-weight: 650;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 引用块增强 */
.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel-elevated));
  padding: 10px 16px;
  margin: 1em 0;
  color: var(--text-soft);
  font-style: italic;
}

.markdown-body blockquote p {
  margin: 0;
}

/* 行内代码增强 */
.markdown-body :not(pre) > code {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-muted));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  color: var(--text);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

/* 有序/无序列表增强 */
.markdown-body ul li::marker {
  color: var(--accent);
}

.markdown-body ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* 标题下划线 */
.markdown-body h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

/* 链接样式 */
.markdown-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s;
}

.markdown-body a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ===== [NEW] 代码块增强 ===== */

/* 代码块语言标签增强 */
.code-header {
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-header > span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c8fa8;
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 5px;
}

/* 复制按钮增强 */
.copy-code-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.copy-code-button::before {
  content: '⎘';
  font-size: 13px;
}

.copy-code-button.copied {
  background: rgba(34,197,94,0.15) !important;
  border-color: rgba(34,197,94,0.3) !important;
  color: #22c55e !important;
}

.copy-code-button.copied::before {
  content: '✓';
}

/* ===== [NEW] 工具调用可视化增强 ===== */

/* 工具调用状态卡片 */
.tool-call-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 10px;
  border: 1px solid rgba(79, 156, 249, 0.2);
  background: rgba(79, 156, 249, 0.06);
  font-size: 12px;
  color: var(--text-soft);
  animation: toolCallAppear 0.2s ease-out;
}

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

.tool-call-icon {
  font-size: 16px;
  flex-shrink: 0;
  animation: toolIconSpin 1.5s linear infinite;
}

.tool-call-card.done .tool-call-icon {
  animation: none;
}

@keyframes toolIconSpin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.tool-call-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.tool-call-status {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-call-card.done {
  border-color: rgba(34,197,94,0.2);
  background: rgba(34,197,94,0.04);
}

.tool-call-card.done .tool-call-name {
  color: #22c55e;
}

.tool-call-card.failed {
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.04);
}

/* 工具调用列表 */
.tool-calls-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
}

/* ===== [NEW] 进度面板增强 ===== */

/* 在进度面板标题旁显示百分比 */
.agent-progress-percent {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-left: auto;
}

/* 进度面板底部进度条 */
.agent-progress-panel-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.agent-progress-bar-track {
  width: 100%;
  height: 4px;
  background: var(--progress-track);
  border-radius: 999px;
  overflow: hidden;
}

.agent-progress-bar-fill {
  height: 100%;
  background: var(--progress-fill);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

/* 进度面板步骤图标动画增强 */
.agent-progress-step.running .agent-progress-step-icon {
  animation: stepIconPulse 1.2s ease-in-out infinite;
}

@keyframes stepIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 156, 249, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(79, 156, 249, 0); }
}

/* ===== [NEW] 输入框增强 ===== */

/* 输入框字符计数 */
.input-char-count {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  padding: 0 14px 6px;
  transition: color 0.2s;
}

.input-char-count.near-limit {
  color: #f59e0b;
}

.input-char-count.at-limit {
  color: #ef4444;
}

/* ===== [NEW] 滚动到底部按钮 ===== */
.scroll-to-bottom-btn {
  position: fixed;
  right: 24px;
  bottom: calc(var(--composer-offset) + 16px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 55;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.scroll-to-bottom-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-bottom-btn:hover {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

/* ===== [NEW] 消息操作按钮增强 ===== */
.message-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.message:hover .message-actions,
.message-actions:focus-within {
  opacity: 1;
}

/* 移动端消息操作按钮始终显示 */
@media (max-width: 768px) {
  .message-actions {
    opacity: 1;
  }
}

/* ===== [NEW] 空状态增强 ===== */
.empty-badge {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
  color: var(--accent);
  font-weight: 500;
}

/* ===== [NEW] 侧边栏对话项悬停增强 ===== */
.conversation-item {
  transition: background 0.12s ease, transform 0.1s ease;
}

.conversation-item:hover {
  transform: translateX(2px);
}

/* ===== [NEW] 发送按钮动画 ===== */
.send-button:not(:disabled) {
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.send-button:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(79, 156, 249, 0.3);
}

.send-button:not(:disabled):active {
  transform: scale(0.95);
}

/* ===== [NEW] Toast 增强 ===== */
.toast {
  animation: toastSlideIn 0.2s ease-out;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== [NEW] 浅色主题 Markdown 增强 ===== */
[data-theme="light"] .markdown-body blockquote {
  background: color-mix(in srgb, var(--accent) 5%, var(--panel-elevated));
}

[data-theme="light"] .markdown-body :not(pre) > code {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-muted));
  color: #1d4ed8;
}

[data-theme="light"] .markdown-body a {
  color: #2563eb;
  border-bottom-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .markdown-body a:hover {
  border-bottom-color: #2563eb;
}

[data-theme="light"] .markdown-body th {
  background: color-mix(in srgb, #2563eb 8%, var(--panel-muted));
}

[data-theme="light"] .code-header > span {
  color: #4b5563;
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .tool-call-card {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.04);
}

[data-theme="light"] .tool-call-card.done {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.04);
}

/* ===== [NEW] 移动端 composer 优化 ===== */
@media (max-width: 560px) {
  .composer-wrap {
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  .composer {
    border-radius: 18px;
  }

  .input-row {
    padding: 8px 10px;
    gap: 6px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .send-button,
  .upload-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  /* 移动端隐藏 composer hint */
  .composer-hint {
    display: none;
  }

  /* 移动端进度面板紧凑 */
  .agent-progress-panel {
    padding: 10px 12px;
  }

  .agent-progress-step {
    padding: 6px 8px;
  }
}

/* ===== [NEW] 深色主题代码块增强 ===== */
.code-block {
  border-color: rgba(255,255,255,0.08);
}

.code-block:hover {
  border-color: rgba(255,255,255,0.14);
}

/* ===== [NEW] 图片上传预览增强 ===== */
.attachment-image {
  border-radius: 12px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.attachment-image:hover {
  transform: scale(1.02);
}

/* 图片预览容器 */
.attachment-card:has(.attachment-image) {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}

/* ===== [NEW] 快捷指令图标 ===== */
.quick-prompt {
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.quick-prompt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, color-mix(in srgb, var(--accent) 6%, transparent));
  opacity: 0;
  transition: opacity 0.2s;
}

.quick-prompt:hover::after {
  opacity: 1;
}

/* ===== [NEW] 顶栏状态指示器增强 ===== */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--accent);
  animation: statusPulse 1.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(79, 156, 249, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 3px rgba(79, 156, 249, 0); }
}

/* ===== [NEW] 整体滚动条美化 ===== */
.messages-wrap::-webkit-scrollbar {
  width: 4px;
}

.messages-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.messages-wrap::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.messages-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ===== [NEW] 代码块内容滚动条 ===== */
.code-block pre::-webkit-scrollbar {
  height: 4px;
}

.code-block pre::-webkit-scrollbar-track {
  background: transparent;
}

.code-block pre::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

/* ===== END CSS Upgrade Patch v20260704 ===== */

/* [FILECARD_20260706] Inline file card styles */
.inline-file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-elevated);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  vertical-align: middle;
  margin: 2px 4px;
}
.inline-file-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.inline-file-badge {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0 4px;
}
.inline-file-name {
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-file-dl {
  font-size: 14px;
  opacity: 0.5;
  transition: opacity .15s;
}
.inline-file-card:hover .inline-file-dl {
  opacity: 1;
}

/* T014-AUTONOMOUS-WHITE-THEME-V1 */
:root,[data-theme="dark"],[data-theme="light"]{color-scheme:light!important;--bg:#FFFFFF!important;--bg-soft:#FFFFFF!important;--panel:#FFFFFF!important;--panel-elevated:#FFFFFF!important;--panel-muted:#FFFFFF!important;--text:#333333!important;--text-soft:#333333!important;--muted:#333333!important}html,body,#app,.app-shell,.command-center,.main,.sidebar,.chat-header,.composer-wrap{background-color:#FFFFFF!important;color:#333333!important}.command-center,.command-center button,.command-center input,.command-center textarea,.command-center a,.command-center h1,.command-center h2,.command-center h3,.command-center p,.command-center span,.command-center label{color:#333333!important}

/* FILE_CARD_ACCESSIBILITY_FIX_20260721 */
.deliverable-card,
.message-attachments .attachment-card,
.inline-file-card {
  background: #FFFFFF !important;
  border-color: #D9DEE7 !important;
  color: #1A1A1A !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
}
.deliverable-card:hover,
.message-attachments .attachment-card:hover,
.inline-file-card:hover {
  background: #F8F9FA !important;
  border-color: #AAB4C3 !important;
}
.deliverable-card .deliverable-name,
.message-attachments .attachment-card .attachment-name,
.inline-file-card .inline-file-name {
  color: #1A1A1A !important;
}
.deliverable-card .deliverable-meta,
.message-attachments .attachment-card .attachment-meta {
  color: #5F6368 !important;
}
.deliverable-card .fc-btn-download {
  background: #1A73E8 !important;
  color: #FFFFFF !important;
  border: 1px solid #1A73E8 !important;
}
.deliverable-card .fc-btn-open {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border: 1px solid #AAB4C3 !important;
}
.inline-file-card .inline-file-dl {
  color: #1A73E8 !important;
  opacity: 1 !important;
}

