/* ==========================================================================
   小泽 · 酆泽 SCRM 知识库助手 - 前沿科技风设计系统 (DeepSeek / ChatGPT Style)
   ========================================================================== */

:root {
  color-scheme: light dark;
  /* 基础色阶：浅色 / 深色 */
  --bg-deep: light-dark(#f8fafc, #07090e);
  --bg-base: light-dark(#f1f5f9, #0c1017);
  --bg-surface: light-dark(#ffffff, #121722);
  --bg-surface-elevated: light-dark(#ffffff, #181f2e);
  --bg-surface-hover: light-dark(#f8fafc, #202738);
  --bg-glass: light-dark(rgba(255, 255, 255, 0.82), rgba(18, 23, 34, 0.76));
  --bg-glass-strong: light-dark(rgba(255, 255, 255, 0.94), rgba(22, 28, 41, 0.88));

  /* 边框与微光晶体覆层 */
  --line-subtle: light-dark(rgba(15, 23, 42, 0.06), rgba(255, 255, 255, 0.05));
  --line: light-dark(rgba(15, 23, 42, 0.10), rgba(255, 255, 255, 0.09));
  --line-strong: light-dark(rgba(15, 23, 42, 0.16), rgba(255, 255, 255, 0.16));
  --line-glow: light-dark(rgba(37, 99, 235, 0.40), rgba(59, 130, 246, 0.4));
  --specular-top: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.12));

  /* 核心文字阶梯 */
  --ink: light-dark(#0f172a, #f8fafc);
  --ink-secondary: light-dark(#334155, #cbd5e1);
  --muted: light-dark(#64748b, #94a3b8);
  --muted-dark: light-dark(#94a3b8, #64748b);

  /* 科技前沿强调色 */
  --cyber-blue: light-dark(#2563eb, #3b82f6);
  --cyber-blue-hover: light-dark(#1d4ed8, #60a5fa);
  --cyber-blue-glow: light-dark(rgba(37, 99, 235, 0.16), rgba(59, 130, 246, 0.25));
  --cyber-cyan: light-dark(#0891b2, #06b6d4);
  --cyber-cyan-glow: light-dark(rgba(8, 145, 178, 0.14), rgba(6, 182, 212, 0.2));
  --cyber-emerald: light-dark(#059669, #10b981);
  --cyber-emerald-glow: light-dark(rgba(5, 150, 105, 0.16), rgba(16, 185, 129, 0.2));
  --cyber-amber: #f59e0b;
  --cyber-purple: #8b5cf6;
  --danger: light-dark(#e11d48, #f43f5e);

  --wash: light-dark(rgba(15, 23, 42, 0.045), rgba(255, 255, 255, 0.05));
  --wash-soft: light-dark(rgba(15, 23, 42, 0.03), rgba(255, 255, 255, 0.03));
  --wash-strong: light-dark(rgba(15, 23, 42, 0.08), rgba(255, 255, 255, 0.08));
  --wash-faint: light-dark(rgba(15, 23, 42, 0.025), rgba(255, 255, 255, 0.02));
  --hairline: light-dark(rgba(15, 23, 42, 0.10), rgba(255, 255, 255, 0.10));
  --hairline-strong: light-dark(rgba(15, 23, 42, 0.16), rgba(255, 255, 255, 0.14));
  --scrollbar: light-dark(rgba(15, 23, 42, 0.22), rgba(255, 255, 255, 0.16));
  --inset: light-dark(rgba(15, 23, 42, 0.045), rgba(0, 0, 0, 0.28));
  --inset-strong: light-dark(rgba(15, 23, 42, 0.07), rgba(0, 0, 0, 0.38));
  --field-bg: light-dark(#f8fafc, rgba(0, 0, 0, 0.4));
  --field-bg-focus: light-dark(#ffffff, rgba(0, 0, 0, 0.55));
  --menu-bg: light-dark(#ffffff, rgba(18, 22, 34, 0.98));
  --overlay: light-dark(rgba(15, 23, 42, 0.38), rgba(4, 6, 9, 0.75));
  --code-bg: light-dark(#f8fafc, #0d1117);
  --code-ink: light-dark(#1e293b, #e2e8f0);
  --inline-code: light-dark(#1d4ed8, #93c5fd);
  --ok-ink: light-dark(#047857, #34d399);
  --warn-ink: light-dark(#b45309, #fbbf24);
  --danger-soft: light-dark(#e11d48, #fb7185);
  --hl-keyword: light-dark(#e11d48, #f43f5e);
  --hl-string: light-dark(#047857, #34d399);
  --hl-number: light-dark(#b45309, #fbbf24);
  --hl-comment: #64748b;
  --hl-function: light-dark(#1d4ed8, #60a5fa);
  --hl-table: light-dark(#0369a1, #38bdf8);
  --glow-blue: light-dark(rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.14));
  --glow-cyan: light-dark(rgba(8, 145, 178, 0.08), rgba(6, 182, 212, 0.1));
  --glow-floor: light-dark(rgba(37, 99, 235, 0.05), rgba(15, 23, 42, 0.6));
  --disabled-ink: light-dark(rgba(15, 23, 42, 0.28), rgba(255, 255, 255, 0.25));

  /* 物理双层阴影层次 */
  --shadow-sm: 0 1px 3px light-dark(rgba(15, 23, 42, 0.06), rgba(0, 0, 0, 0.35));
  --shadow-md: 0 4px 6px -1px light-dark(rgba(15, 23, 42, 0.07), rgba(0, 0, 0, 0.35)),
               0 12px 24px -4px light-dark(rgba(15, 23, 42, 0.09), rgba(0, 0, 0, 0.45));
  --shadow-lg: 0 10px 15px -3px light-dark(rgba(15, 23, 42, 0.06), rgba(0, 0, 0, 0.4)),
               0 24px 48px -8px light-dark(rgba(15, 23, 42, 0.12), rgba(0, 0, 0, 0.6));
  --shadow-glow: 0 0 30px -5px light-dark(rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.25));
  --shadow-glass: inset 0 1px 0 0 var(--specular-top),
                  0 20px 40px -12px light-dark(rgba(15, 23, 42, 0.12), rgba(0, 0, 0, 0.55));

  /* 字体栈 */
  --sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* DSH 映射兼容 */
  --dsw-font-family: var(--sans);
  --ds-font-family-code: var(--mono);
  --dsw-alias-bg-base: var(--bg-base);
  --dsw-alias-bg-layer-1: var(--bg-surface);
  --dsw-alias-label-primary: var(--ink);
  --dsw-alias-label-secondary: var(--muted);
  --dsw-alias-border-l1: var(--line);
  --dsw-alias-border-l2: var(--line);
  --dsw-alias-button-primary-fill: var(--cyber-blue);
  --dsw-specific-bubble: var(--bg-surface);
  --dsw-specific-input-major: var(--bg-surface-elevated);
}
html[data-theme="light"],
html[data-theme-resolved="light"] {
  color-scheme: light;
}
html[data-theme="dark"],
html[data-theme-resolved="dark"] {
  color-scheme: dark;
}

/* 全局滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.45); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(1000px 500px at 15% -5%, var(--glow-blue), transparent 60%),
    radial-gradient(900px 500px at 85% 5%, var(--glow-cyan), transparent 55%),
    radial-gradient(1200px 800px at 50% 100%, var(--glow-floor), transparent 70%);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 细腻科技微噪点 */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.6'/></svg>");
}
html[data-theme-resolved="light"] .grain { opacity: 0.02; }

[hidden] { display: none !important; }

/* ==========================================================================
   主工作台框架布局 (Workbench Layout)
   ========================================================================== */

.workbench {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 0px;
  transition: grid-template-columns 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.workbench.is-rail-collapsed {
  grid-template-columns: 68px minmax(0, 1fr) 0px;
}

.workbench.is-tasks {
  grid-template-columns: 260px minmax(0, 1fr) min(380px, 36vw);
}

.workbench.is-rail-collapsed.is-tasks {
  grid-template-columns: 68px minmax(0, 1fr) min(380px, 36vw);
}

/* ==========================================================================
   左侧边栏 (Left Rail) - 极简科技风格
   ========================================================================== */

.left-rail {
  height: 100%;
  min-height: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 10px 14px;
  position: relative;
  z-index: 10;
  overflow: visible;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rail-top {
  display: grid;
  gap: 10px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  padding: 4px 4px 4px 6px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.workbench.is-rail-collapsed .rail-head {
  flex-direction: column;
  gap: 8px;
}

.workbench.is-rail-collapsed .rail-brand {
  width: 44px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.35));
}

.rail-icon-btn {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rail-icon-btn:hover,
.rail-icon-btn:focus-visible {
  background: var(--wash);
  color: var(--ink);
}

.rail-icon-btn:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

.rail-icon-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 30;
  padding: 5px 8px;
  border-radius: 8px;
  background: light-dark(#0f172a, #e2e8f0);
  color: light-dark(#f8fafc, #0f172a);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  transition: opacity 0.15s ease;
}

.rail-icon-btn:hover::after,
.rail-icon-btn:focus-visible::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .rail-icon-btn::after {
    transition: none;
  }
}

.rail-new {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rail-new:hover,
.rail-new:focus-visible {
  background: var(--wash-strong);
  border-color: var(--line-strong);
  color: var(--ink);
}

.rail-new:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

.rail-new-icon {
  flex: none;
  color: var(--ink-secondary);
  display: block;
}

.rail-new:hover .rail-new-icon {
  color: var(--ink);
}

/* 一级工作区导航组 (Primary Workspace Navigation) */
.rail-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0 2px;
}

.rail-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.rail-nav-btn:hover {
  background: var(--wash);
  color: var(--ink);
}

.rail-nav-btn:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 1px;
}

.rail-nav-btn.is-active,
.rail-nav-btn[aria-expanded="true"] {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.28);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rail-nav-btn.is-active::before,
.rail-nav-btn[aria-expanded="true"]::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--cyber-blue);
  box-shadow: 0 0 8px var(--cyber-blue);
}

.rail-nav-icon {
  flex: none;
  color: var(--ink-secondary);
  transition: color 0.15s ease;
}

.rail-nav-btn:hover .rail-nav-icon,
.rail-nav-btn.is-active .rail-nav-icon,
.rail-nav-btn[aria-expanded="true"] .rail-nav-icon {
  color: var(--cyber-blue);
}

.rail-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.16);
  color: var(--cyber-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
  line-height: 1.4;
}

.rail-mid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 20px;
  padding-right: 4px;
}

.rail-label {
  margin: 0 10px 10px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 会话历史列表项 */
.thread-list {
  display: grid;
  gap: 4px;
}

.thread-btn {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.thread-btn:hover {
  background: var(--wash);
  color: var(--ink);
}

.thread-btn.is-on {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-color: rgba(59, 130, 246, 0.28);
  color: var(--ink);
  font-weight: 550;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.thread-btn.is-on::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--cyber-blue);
  box-shadow: 0 0 8px var(--cyber-blue);
}

.thread-row {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.thread-row .thread-btn {
  flex: 1;
  min-width: 0;
  padding-right: 36px;
  mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent 100%);
}

.thread-row:hover .thread-btn,
.thread-btn.is-on {
  mask-image: linear-gradient(to right, #000 calc(100% - 50px), transparent calc(100% - 24px));
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 50px), transparent calc(100% - 24px));
}

.thread-more {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
}

.thread-more span {
  width: 3px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: -5px 0 0 currentColor, 5px 0 0 currentColor;
}

.thread-row:hover .thread-more,
.thread-more:hover,
.thread-more[aria-expanded="true"] {
  color: var(--ink);
  background: var(--wash-strong);
}

.thread-rename {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 34px;
  margin: 2px 36px 2px 0;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.55);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 0 10px;
}

.thread-menu {
  position: fixed;
  z-index: 40;
  min-width: 148px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--menu-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.thread-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.thread-menu button:hover { background: var(--wash); }
.thread-menu button.is-danger { color: var(--danger-soft); }

.rail-foot {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.rail-item:hover {
  background: var(--wash);
  color: var(--ink);
}

.rail-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--inset-strong);
  border-radius: 12px;
  border: 1px solid var(--wash-strong);
  min-width: 0;
}

.user-chip {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.user-chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyber-emerald);
  box-shadow: 0 0 8px var(--cyber-emerald);
  flex: none;
}

.rail-user #passkey-btn,
.rail-user #logout-btn {
  width: auto;
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.rail-user #passkey-btn .passkey-icon,
.rail-user #logout-btn .logout-icon {
  display: block;
  flex: none;
}

.rail-user #passkey-btn:hover {
  background: var(--wash-strong);
  color: var(--cyber-cyan, #22d3ee);
  border-color: rgba(34, 211, 238, 0.25);
}

.rail-user #passkey-btn[aria-pressed="true"] {
  color: var(--cyber-emerald, #34d399);
}

.rail-user #logout-btn:hover {
  background: var(--wash-strong);
  color: var(--danger, #ef4444);
  border-color: rgba(239, 68, 68, 0.2);
}

/* 侧边栏文字平滑过渡 */
.rail-brand span,
.rail-new-text,
.rail-item-text,
.rail-label,
.user-chip {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  white-space: nowrap;
  max-width: 200px;
  display: inline-block;
}

.rail-mid {
  transition: opacity 0.2s ease;
}

/* 侧边栏折叠形态 */
.workbench.is-rail-collapsed .rail-brand span,
.workbench.is-rail-collapsed .rail-new-text,
.workbench.is-rail-collapsed .rail-item-text,
.workbench.is-rail-collapsed .rail-label,
.workbench.is-rail-collapsed .user-chip {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

.workbench.is-rail-collapsed .thread-list {
  display: none !important;
}

.workbench.is-rail-collapsed .rail-badge {
  display: none !important;
}

.workbench.is-rail-collapsed .rail-nav-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
}

.workbench.is-rail-collapsed .rail-nav-btn::before {
  display: none;
}

.workbench.is-rail-collapsed .rail-new {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
}

.workbench.is-rail-collapsed .rail-user {
  background: transparent;
  border: none;
  padding: 0;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  justify-content: center;
}

.workbench.is-rail-collapsed .rail-user .user-chip {
  display: none !important;
}

.workbench.is-rail-collapsed .rail-user #passkey-btn {
  display: none !important;
}

.workbench.is-rail-collapsed .rail-user #logout-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--inset-strong);
  border: 1px solid var(--wash-strong);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.workbench.is-rail-collapsed .rail-user #logout-btn:hover {
  background: var(--wash-strong);
  color: var(--danger, #ef4444);
  border-color: rgba(239, 68, 68, 0.3);
}

.workbench.is-rail-collapsed .rail-user #logout-btn .logout-icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* ==========================================================================
   主对话核心区 (Main Conversation Frame)
   ========================================================================== */

.pI_x6G_frame, .pI_x6G_centerCol, .wSkVaW_root {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wSkVaW_scrollBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

/* 首屏和对话都在输入框上方的区域内滚动，不再把卡片画到输入框上。 */
.wSkVaW_root[data-phase=hero] .wSkVaW_scrollBody {
  justify-content: stretch;
  align-items: stretch;
  overflow: hidden;
}

/* ==========================================================================
   欢迎初始态 (Hero State)
   ========================================================================== */

.wSkVaW_viewArea#view-hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  width: 100%;
  max-width: 100%;
  padding: 12px 20px 20px;
  box-sizing: border-box;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.pXSMma_root {
  width: 100%;
  max-width: min(920px, 94vw);
  margin: 0 auto;
  box-sizing: border-box;
}

.pXSMma_stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* 小泽品牌发光徽章与动态光环 */
.hero-brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-avatar-glow {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-cyan));
  box-shadow: 0 0 36px rgba(59, 130, 246, 0.45);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 21px;
  background: var(--bg-surface);
  display: block;
}

.hero-status-pulse {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyber-emerald);
  border: 2px solid var(--bg-deep);
  box-shadow: 0 0 10px var(--cyber-emerald);
  animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--cyber-cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyber-cyan);
  box-shadow: 0 0 8px var(--cyber-cyan);
}

.hero-hello {
  margin: 0 0 20px;
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(17px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  background: linear-gradient(180deg, light-dark(#0f172a, #ffffff) 30%, light-dark(#64748b, #94a3b8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pXSMma_body {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 模式切换分段控件 (Segmented Control) */
.mode-row {
  display: inline-flex;
  align-items: center;
  background: var(--inset);
  border: 1px solid var(--line-subtle);
  padding: 3px;
  border-radius: 999px;
  gap: 3px;
  margin: 0 auto 14px;
  max-width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mode-chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  min-height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.mode-chip-icon {
  flex: none;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mode-chip:hover {
  color: var(--ink);
  background: var(--wash-soft);
}

.mode-chip:hover .mode-chip-icon {
  opacity: 1;
}

.mode-chip.is-on {
  background: var(--bg-surface-elevated);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--line-subtle);
}

html[data-theme="dark"] .mode-chip.is-on,
html[data-theme-resolved="dark"] .mode-chip.is-on {
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.mode-chip.is-on .mode-chip-icon {
  opacity: 1;
  color: var(--cyber-blue);
}

.req-guide {
  margin: 0 auto 14px;
  max-width: 640px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 20px;
  text-align: center;
}

/* 推荐提示词卡片网格 (Starter Prompt Cards) - 优美的 2 列晶体卡片矩阵 */
.starter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .starter-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.starter-chip {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, light-dark(rgba(255, 255, 255, 0.95), rgba(24, 31, 46, 0.8)) 0%, light-dark(rgba(248, 250, 252, 0.88), rgba(18, 23, 34, 0.7)) 100%);
  color: var(--ink-secondary);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 0 var(--specular-top), 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  user-select: none;
}

#starter-row .starter-chip {
  align-items: flex-start;
}

.starter-chip-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: light-dark(rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.16));
  color: var(--cyber-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.starter-chip-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  word-break: break-word;
}

#starter-row .starter-chip-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#starter-row .starter-chip-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

#starter-row .starter-chip-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
}

.starter-chip-arrow {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 3px;
  color: var(--muted);
  opacity: 0.35;
  transition: all 0.2s ease;
}

.starter-chip:hover {
  background: linear-gradient(135deg, light-dark(#ffffff, rgba(30, 41, 59, 0.9)) 0%, light-dark(rgba(241, 245, 249, 0.95), rgba(24, 31, 46, 0.85)) 100%);
  border-color: var(--line-glow);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 0 var(--specular-top), 0 8px 20px -4px var(--cyber-blue-glow), 0 2px 6px -1px rgba(0, 0, 0, 0.05);
}

.starter-chip:hover .starter-chip-badge {
  transform: scale(1.08);
  background: light-dark(rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.24));
}

.starter-chip:hover .starter-chip-arrow {
  opacity: 0.95;
  color: var(--cyber-blue);
  transform: translate(1.5px, -1.5px);
}

.starter-chip:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.starter-chip:focus-visible,
.ask-product:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

/* 产品范围筛选栏 (Scope Filters) - 优雅次级筛选，告别大圆框叠罗汉 */
.ask-product-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 680px;
  margin: 0 auto 16px;
}

#ask-product-row::before {
  content: "范围";
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-dark);
  margin-right: 3px;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--wash);
  user-select: none;
}

.ask-product {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ask-product:hover {
  color: var(--ink);
  background: var(--wash);
}

.ask-product.is-on {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--cyber-blue);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.04);
}

html[data-theme="dark"] .ask-product.is-on,
html[data-theme-resolved="dark"] .ask-product.is-on {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.ask-product.is-on::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  flex: none;
}

.ask-empty {
  margin: 0 auto;
  max-width: 580px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--wash-soft);
}

/* ==========================================================================
   快捷指令菜单 (Quick Command Context Menu) - 紧凑浮动上下文菜单（匹配参考图）
   ========================================================================== */

.quick-panel {
  position: absolute;
  left: 14px;
  bottom: 50px;
  z-index: 50;
  width: min(540px, calc(100% - 28px));
  max-height: min(440px, 62vh);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--bg-glass-strong);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--specular-top);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transform-origin: bottom left;
  animation: quick-panel-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes quick-panel-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .quick-panel { animation: none; }
}

/* 顶部标题栏与搜索框 */
.quick-header {
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-subtle);
  background: var(--wash-faint);
  flex: none;
}

.quick-header-text {
  flex: 1;
  min-width: 0;
}

.quick-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.quick-subtitle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.quick-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.quick-search-icon {
  position: absolute;
  left: 9px;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.7;
}

.quick-search-input {
  width: 130px;
  height: 28px;
  padding: 4px 22px 4px 26px;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-search-input:focus {
  width: 170px;
  border-color: var(--cyber-blue);
  box-shadow: 0 0 0 2px var(--cyber-blue-glow);
}

.quick-search-clear {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.quick-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-close-btn:hover {
  background: var(--wash);
  color: var(--ink);
}

/* 导航与分类筛选 (问产品/查日志/查数据 + 产品Tab) */
.quick-nav {
  padding: 10px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}

.quick-panel .quick-section-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  max-width: none;
}

.quick-panel .quick-section-row .ask-product {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--wash);
  color: var(--muted);
  border: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 26px;
}

.quick-panel .quick-section-row .ask-product:hover {
  color: var(--ink);
  background: var(--wash-strong);
}

.quick-panel .quick-section-row .ask-product.is-on {
  background: var(--ink);
  color: var(--bg-surface);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .quick-panel .quick-section-row .ask-product.is-on,
html[data-theme-resolved="dark"] .quick-panel .quick-section-row .ask-product.is-on {
  background: #f8fafc;
  color: #0f172a;
}

.quick-panel .quick-section-row .ask-product.is-on::before {
  display: none;
}

.quick-panel #quick-product-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  max-width: none;
  padding-bottom: 2px;
}

.quick-panel #quick-product-row .ask-product {
  border: 1px solid var(--line-subtle);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 500;
  min-height: 24px;
}

.quick-panel #quick-product-row .ask-product:hover {
  background: var(--wash);
  color: var(--ink);
}

.quick-panel #quick-product-row .ask-product.is-on {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--cyber-blue);
  font-weight: 600;
}

/* 列表滚动内容区 */
.quick-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 14px;
}

.quick-panel .quick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* 列表行样式 (发光圆点 + 标题 + 描述 + 快捷加号) */
.quick-panel .starter-chip {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
  min-height: 40px;
  box-shadow: none;
}

.quick-panel .starter-chip:hover {
  background: light-dark(#ffffff, rgba(30, 41, 59, 0.85));
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateX(3px);
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.08);
}

.quick-panel .starter-chip:active {
  transform: translateX(1px) scale(0.99);
}

/* 左侧微彩色发光圆点 */
.quick-panel .starter-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyber-emerald);
  box-shadow: 0 0 6px var(--cyber-emerald-glow);
  flex: none;
  margin-right: 8px;
}

.quick-panel .starter-chip-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
}

.quick-panel .starter-chip-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}

.quick-panel .starter-chip-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* 右侧 '+' 加号按钮 */
.quick-panel .starter-chip-action {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  flex: none;
  margin-left: 8px;
  transition: all 0.15s ease;
}

.quick-panel .starter-chip:hover .starter-chip-action {
  background: rgba(37, 99, 235, 0.12);
  color: var(--cyber-blue);
  transform: scale(1.1);
}

/* 区分首屏大卡片与快捷面板行列表 */
#starter-row .starter-chip-dot,
#starter-row .starter-chip-label,
#starter-row .starter-chip-action {
  display: none !important;
}

#starter-row .starter-chip-content {
  display: flex !important;
}

.quick-panel .starter-chip-badge,
.quick-panel .starter-chip-label,
.quick-panel .starter-chip-arrow {
  display: none !important;
}

.quick-panel .ask-empty {
  margin: 10px 0 0;
  max-width: none;
  padding: 12px;
  font-size: 12.5px;
}

/* ==========================================================================
   对话消息流 (Conversation Stream) 与视图切换
   ========================================================================== */

#view-hero {
  position: relative;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#view-hero::before {
  content: "";
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(580px, 90vw);
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.12) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  animation: hero-glow-float 8s ease-in-out infinite alternate;
}

@keyframes hero-glow-float {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
  100% { transform: translate(-50%, -52%) scale(1.06); opacity: 1; }
}

#view-hero.is-leaving {
  opacity: 0;
  transform: translateY(-16px) scale(0.98);
  pointer-events: none;
}

.wSkVaW_viewArea#view-chat {
  flex: 1 1 auto;
  padding: 24px 20px 28px;
  width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#view-chat.is-entering {
  animation: chat-view-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes chat-view-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.Md3f7G_root {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
}

.Md3f7G_column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 单条消息包装流 */
.Md3f7G_flowItem {
  width: 100%;
  animation: message-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 用户发言气泡 - 科技深蓝微光晶体 */
.gdEzaW_userRow {
  display: flex;
  justify-content: flex-end;
}

.gdEzaW_userStack {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.user-pics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.user-pics img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.gdEzaW_bubble {
  background: var(--bg-surface-elevated, #edf2f7);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.1));
  color: var(--ink, #0f172a);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 20px 20px 4px 20px !important;
  padding: 12px 18px !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 浅色主题：柔和高阶浅灰蓝晶体气泡 + 深黑字符（高对比、不刺眼） */
html[data-theme-resolved="light"] .gdEzaW_bubble,
html[data-theme="light"] .gdEzaW_bubble {
  background: #edf2f7 !important;
  border: 1px solid rgba(15, 23, 42, 0.11) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

/* 深色主题：深空晶体气泡 + 纯净亮白字体 */
html[data-theme-resolved="dark"] .gdEzaW_bubble,
html[data-theme="dark"] .gdEzaW_bubble,
body[data-ds-dark-theme] .gdEzaW_bubble {
  background: #1e2638 !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

/* 小泽助手发言流 - 科技全景沉浸排版 */
.assistant-flow {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

.assistant-avatar-wrap {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-cyan));
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}

.assistant-avatar-wrap::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-color: var(--bg-surface);
  background-image: url("/chat/xiaoze_avatar.jpg?v=xiaoze-avatar-1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.assistant-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: var(--bg-surface);
}

.pick-customer-panel {
  margin-top: 12px;
  max-width: 560px;
}

.pick-customer-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.pick-customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.pick-customer-card {
  appearance: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pick-customer-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
  transform: translateY(-2px);
}

.pick-customer-card:active {
  transform: translateY(0) scale(0.97);
}

.pick-customer-card.is-selected {
  border-color: var(--cyber-blue);
  background: rgba(59, 130, 246, 0.16);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
  transform: scale(1.02);
}

.pick-customer-grid.has-selection .pick-customer-card:not(.is-selected) {
  opacity: 0.45;
  transform: scale(0.98);
}

.pick-customer-card:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pick-customer-card,
  .pick-customer-card:hover {
    transition: none;
    transform: none;
  }
}

@media (max-width: 640px) {
  .pick-customer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.assistant-content-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.assistant-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.assistant-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.assistant-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: var(--cyber-cyan);
}

.assistant-elapsed {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.assistant-elapsed.is-live {
  color: var(--cyber-cyan);
}

/* 正在检索/思考中加载状态 */
.chat-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--cyber-cyan);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; box-shadow: 0 0 0 rgba(59, 130, 246, 0); }
  50% { opacity: 1; box-shadow: 0 0 16px rgba(59, 130, 246, 0.3); }
}

.chat-loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.25);
  border-top-color: var(--cyber-cyan);
  animation: chat-spin 0.65s linear infinite;
  flex: none;
}

@keyframes chat-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   DeepSeek 深度思考卡片 (Deep Thinking Block)
   ========================================================================== */

.think-fold {
  margin: 0 0 16px;
  border-radius: 14px;
  border: 1px solid var(--wash-strong);
  background: var(--inset);
  box-shadow: inset 0 1px 0 0 var(--specular-top);
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.think-fold .think-label {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  user-select: none;
}

.think-fold .think-title {
  flex: none;
}

.think-fold .think-line {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--muted);
}

.think-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyber-blue);
  flex: none;
  display: inline-block;
}

.think-fold.is-thinking .think-indicator-dot {
  background: var(--cyber-cyan);
  box-shadow: 0 0 8px var(--cyber-cyan);
  animation: pulse-ring 1.8s infinite;
}

.think-fold .think-label::before {
  content: "✦";
  color: var(--cyber-blue);
  font-size: 13px;
  display: inline-block;
}

.think-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.think-fold.is-open .think-body-wrapper {
  grid-template-rows: 1fr;
}

.think-body {
  overflow: hidden;
  max-height: 380px;
  overflow-y: auto;
  padding: 0 16px 12px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  border-left: 2px solid rgba(59, 130, 246, 0.4);
  margin: 0 14px 12px;
  background: var(--wash-soft);
  border-radius: 0 8px 8px 0;
}

.think-fold:not(.is-open) .think-body {
  display: none;
}

.think-fold.is-open .think-body {
  display: block;
}

/* 动态多阶段管线指示器 */
.pipeline-progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--wash-soft);
  border-radius: 10px;
  border: 1px solid var(--wash-strong);
  font-size: 12px;
  color: var(--muted);
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.pipeline-step .step-icon {
  font-weight: 700;
}

.pipeline-step.is-done {
  color: #10b981;
}

.pipeline-step.is-active {
  color: var(--cyber-cyan);
  font-weight: 600;
}

.pipeline-arrow {
  color: var(--muted-soft);
  font-size: 11px;
}

.pipeline-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 6px 12px;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyber-cyan);
  box-shadow: 0 0 8px var(--cyber-cyan);
  animation: pulse-ring 1.5s infinite;
}

@keyframes think-fade-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Markdown 正文排版与语法高亮 (Markdown Typography & Highlights)
   ========================================================================== */

.Sxvs8a_root {
  font-size: 15px !important;
  line-height: 1.75 !important;
  color: var(--ink) !important;
}

.Sxvs8a_body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.Sxvs8a_body p { margin: 0; }

.Sxvs8a_body h1, .Sxvs8a_body h2, .Sxvs8a_body h3, .Sxvs8a_body h4 {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.Sxvs8a_body h1 {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
  margin: 16px 0 6px;
}

.Sxvs8a_body h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 14px 0 5px;
}

.Sxvs8a_body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin: 12px 0 4px;
}

.Sxvs8a_body h4 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  margin: 10px 0 3px;
}

.Sxvs8a_body ul, .Sxvs8a_body ol {
  margin: 4px 0;
  padding-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.Sxvs8a_body li {
  line-height: 1.65;
}

.Sxvs8a_body hr.md-hr {
  border: 0;
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent 0%, var(--line-strong) 25%, var(--cyber-blue) 50%, var(--line-strong) 75%, transparent 100%);
  opacity: 0.6;
}

/* 引用块 */
.Sxvs8a_body blockquote {
  margin: 8px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--cyber-cyan);
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.02) 100%);
  border-radius: 0 10px 10px 0;
  color: var(--ink-secondary);
}

/* 行内代码 */
.Sxvs8a_body code {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--inline-code);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 13px;
}

/* 链接样式 */
.Sxvs8a_body a {
  color: var(--cyber-cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.5);
  transition: all 0.15s ease;
}

.Sxvs8a_body a:hover {
  color: var(--ink);
  border-bottom-color: var(--cyber-cyan);
}

/* 业务判定科技胶囊徽标 (Decision Badges) */
.decision-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 2px;
  vertical-align: middle;
}

.decision-badge.badge-standard {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--ok-ink);
}

.decision-badge.badge-extension {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--warn-ink);
}

.decision-badge.badge-custom {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--danger-soft);
}

.decision-badge.badge-insufficient {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

/* 表格科技样式 */
.md-table-wrap {
  overflow-x: auto;
  max-height: 480px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inset);
  box-shadow: inset 0 1px 0 0 var(--specular-top);
  scrollbar-gutter: stable;
}

.md-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}

.md-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-weight: 650;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 var(--line);
}

.md-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--wash);
  color: var(--ink-secondary);
}

.md-table tr:nth-child(even) td {
  background: var(--wash-faint);
}

.md-table tr:last-child td { border-bottom: 0; }
.md-table tr:hover td { background: rgba(59, 130, 246, 0.05); }

/* ==========================================================================
   现代终端代码块 (Terminal IDE Codeblock)
   ========================================================================== */

.md-code-block {
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  margin: 14px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.md-code-block-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--wash-soft);
  border-bottom: 1px solid var(--wash-strong);
}

.md-code-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mac-dots {
  display: flex;
  gap: 6px;
}

.mac-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.8;
}

.mac-dot.dot-red { background: #ff5f56; }
.mac-dot.dot-yellow { background: #ffbd2e; }
.mac-dot.dot-green { background: #27c93f; }

.md-code-lang {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cyber-cyan);
  letter-spacing: 0.06em;
}

.md-code-dml-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.md-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.md-copy:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--ink);
}

.md-copy.is-copied {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: var(--cyber-emerald) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25) !important;
}

.md-copy.is-copied svg {
  animation: icon-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes icon-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.md-copy svg {
  width: 13px;
  height: 13px;
}

.md-code-lines {
  --line-num-width: 3.2ch;
  margin: 0;
  padding: 12px 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 22px;
  list-style: none;
  counter-reset: mdline;
  color: var(--code-ink);
}

.md-code-lines li {
  padding: 0 16px 0 calc(var(--line-num-width) + 24px);
  position: relative;
  white-space: pre;
}

.md-code-lines li::before {
  counter-increment: mdline;
  content: counter(mdline);
  position: absolute;
  left: 12px;
  width: var(--line-num-width);
  color: var(--muted);
  text-align: right;
  user-select: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* 语法高亮着色器 */
.hl-keyword { color: var(--hl-keyword); font-weight: 600; }
.hl-string { color: var(--hl-string); }
.hl-number { color: var(--hl-number); }
.hl-comment { color: var(--hl-comment); font-style: italic; }
.hl-function { color: var(--hl-function); }
.hl-table { color: var(--hl-table); font-weight: 600; }

/* 打字机呼吸光标 */
.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 16px;
  background: var(--cyber-cyan);
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyber-cyan);
  animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 消息尾部快捷操作栏 */
.msg-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 10px !important;
  padding-top: 4px !important;
  clear: both !important;
}

.msg-copy {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 28px !important;
  line-height: 28px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: fit-content !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--wash-strong) !important;
  background: var(--wash-soft) !important;
  color: var(--muted) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.msg-copy svg {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  pointer-events: none !important;
}

.msg-copy span {
  display: inline-block !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

.msg-copy:hover {
  background: rgba(59, 130, 246, 0.12) !important;
  color: var(--ink) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.2) !important;
  transform: translateY(-1px) !important;
}

.msg-copy:active {
  transform: translateY(0) scale(0.97) !important;
  background: rgba(59, 130, 246, 0.2) !important;
}

.msg-copy.is-copied {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--ok-ink) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25) !important;
}

.msg-copy.is-copied svg {
  animation: icon-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}

.msg-copy.msg-submit {
  background: var(--cyber-blue) !important;
  color: #fff !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}

.msg-copy.msg-submit:hover {
  background: var(--cyber-blue-hover) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.msg-copy.msg-submit:active {
  background: var(--cyber-blue-hover) !important;
  color: #fff !important;
}

.export-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  max-width: min(440px, 100%);
}

.export-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-card:hover {
  border-color: light-dark(rgba(37, 99, 235, 0.35), rgba(96, 165, 250, 0.45));
  background: var(--bg-surface-hover);
}

.export-card:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

.export-card:disabled,
.export-card.is-busy {
  cursor: progress;
  opacity: 0.72;
}

.export-card.is-done .export-card-down {
  color: var(--ok-ink);
}

.export-card-icon,
.export-card-text,
.export-card-title,
.export-card-meta,
.export-card-down {
  pointer-events: none;
}

.export-card-icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: light-dark(#e8f0fe, #1c2740);
  color: light-dark(#3b6fd8, #8eb4ff);
}

.export-card-icon.is-pptx {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.export-card-icon svg,
.export-card-down svg {
  width: 18px;
  height: 18px;
  display: block;
}

.export-card-icon.is-pptx svg {
  width: 36px;
  height: 36px;
}

.export-card-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.export-card-meta {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.export-card-down {
  flex: 0 0 auto;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.chat-error {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   悬浮微光岛输入区域 (Floating Island Composer)
   ========================================================================== */

.wSkVaW_composerSeat {
  position: relative;
  flex: 0 0 auto;
  z-index: 20;
  pointer-events: none;
  padding: 0 20px 16px;
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.wSkVaW_composerHero { display: none; }

.uV2eYG_root {
  pointer-events: auto;
  width: 100%;
  max-width: var(--dsh-composer-card-max-width, 780px);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.composer-shell {
  position: relative;
  width: 100%;
  max-width: var(--dsh-composer-card-max-width, 780px);
  border-radius: 24px;
}

.composer-shell .uV2eYG_card {
  position: relative;
  z-index: 1;
  max-width: none !important;
  background: var(--bg-glass-strong) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.composer-shell .uV2eYG_card:focus-within {
  border-color: var(--cyber-blue) !important;
  box-shadow: inset 0 1px 0 0 var(--specular-top),
              0 0 0 1px var(--cyber-blue),
              0 16px 36px -8px light-dark(rgba(37, 99, 235, 0.2), rgba(0, 0, 0, 0.6)),
              0 0 24px -4px var(--cyber-blue-glow) !important;
}

.composer-shell.is-generating .uV2eYG_card {
  border-color: rgba(59, 130, 246, 0.45) !important;
  box-shadow: inset 0 1px 0 0 var(--specular-top),
              0 8px 30px -10px rgba(59, 130, 246, 0.22),
              0 16px 36px -14px rgba(15, 23, 42, 0.35) !important;
}

.composer-note {
  margin: 8px 0 0;
  text-align: center;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.composer-note.is-hint {
  color: var(--muted);
}

.composer-note[hidden] {
  display: none !important;
}

.uV2eYG_card {
  display: flex !important;
  flex-direction: column !important;
}

/* 关联任务微上下文药丸 (Context Pill) */
.task-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 4px 10px 4px 6px;
  margin: 2px 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.08);
  animation: pill-enter 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pill-enter {
  0% { opacity: 0; transform: translateY(-4px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.task-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--cyber-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.task-context-badge svg {
  display: block;
}

.task-context-name {
  font-weight: 550;
  color: var(--ink);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-context-close {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}

.task-context-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger, #ef4444);
}

/* 附件预览：贴在输入文字上面 */
.attach-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 2px 0 8px;
}
.attach-row[hidden] { display: none !important; }
.attach-note {
  flex: 1 0 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.attach-chip {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--wash);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.uV2eYG_card.is-drop {
  border-color: rgba(59, 130, 246, 0.7) !important;
}

.attach-chip img { width: 100%; height: 100%; object-fit: cover; }

.attach-chip button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 输入框核心毛玻璃卡片 */
.uV2eYG_card {
  background: var(--bg-glass-strong) !important;
  border: 1px solid var(--hairline-strong) !important;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--wash) !important;
  border-radius: 24px !important;
  padding: 10px 14px 10px 18px !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.uV2eYG_card:focus-within {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1.5px rgba(59, 130, 246, 0.4), 0 0 24px rgba(59, 130, 246, 0.2) !important;
}

.uV2eYG_scroll {
  width: 100%;
  max-height: 250px;
}

.uV2eYG_grow {
  min-height: 38px;
  width: 100%;
  display: flex;
}

.uV2eYG_input {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 38px !important;
  max-height: 240px !important;
  box-sizing: border-box !important;
  color: var(--ink) !important;
  caret-color: var(--cyber-cyan) !important;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  font-family: var(--sans) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  resize: none !important;
  padding: 6px 0 !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  field-sizing: content;
}

.uV2eYG_input::placeholder {
  color: var(--muted-dark);
}

.uV2eYG_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  gap: 12px;
}

.uV2eYG_tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 附件上传按钮 */
.attach-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--wash);
  color: var(--muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.attach-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--ink);
}

.attach-btn svg {
  display: block;
}

.attach-btn:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 2px;
}

.attach-btn.quick-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attach-btn.quick-btn.is-on {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: var(--cyber-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.attach-btn.is-listening {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  border-color: var(--danger);
  color: var(--danger);
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .attach-btn.is-listening { animation: none; }
}

/* ==========================================================================
   小泽智能语音交互中枢 (Voice Modal Redesign)
   ========================================================================== */
.voice-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  overflow: auto;
  animation: voice-mask-fade 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes voice-mask-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.voice-mask[hidden] { display: none !important; }
.voice-mask:focus { outline: none; }
.voice-mask.is-recognizing { cursor: progress; }

/* 动态背景空间极光光晕 */
.voice-ambient-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.voice-orb-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  animation: voice-aurora-drift 14s ease-in-out infinite alternate;
}

.voice-orb-1 {
  width: 440px;
  height: 440px;
  top: 15%;
  left: 20%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(37, 99, 235, 0.1) 60%, transparent 80%);
}

.voice-orb-2 {
  width: 420px;
  height: 420px;
  bottom: 15%;
  right: 20%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(14, 165, 233, 0.1) 60%, transparent 80%);
  animation-delay: -5s;
}

.voice-orb-3 {
  width: 380px;
  height: 380px;
  top: 40%;
  left: 45%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(168, 85, 247, 0.08) 60%, transparent 80%);
  animation-delay: -9s;
}

@keyframes voice-aurora-drift {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(28px, -20px) scale(1.08); }
  100% { transform: translate(-24px, 22px) scale(0.95); }
}

/* 旗舰级悬浮声学岛舱 */
.voice-mask-stage {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: #ffffff;
  pointer-events: auto;
  cursor: default;
  padding: 30px 36px 28px;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 50px rgba(59, 130, 246, 0.14);
  border-radius: 28px;
  animation: voice-stage-fade 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes voice-stage-fade {
  from { opacity: 0; transform: scale(0.94) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 顶部状态舱 */
.voice-top-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.voice-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.voice-live-beacon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
}

.voice-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.voice-beacon-ping {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.5);
  animation: beacon-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beacon-ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.voice-live-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f1f5f9;
}

.voice-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.voice-time-icon {
  display: flex;
  align-items: center;
  color: var(--cyber-cyan);
}

.voice-time {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}

/* 视觉声学中枢 */
.voice-center-visual {
  position: relative;
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-wave {
  width: 100%;
  height: 180px;
  display: block;
}

/* 实时字幕卡片 (Keynote Real-time Card) */
.voice-transcript-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.voice-draft {
  width: 100%;
  max-height: 4em;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-transcript-card {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.voice-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 500;
}

.voice-placeholder[hidden] {
  display: none !important;
}

.voice-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.voice-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  animation: typing-dots 1.4s infinite ease-in-out both;
}

.voice-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.voice-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-dots {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 8px #38bdf8; }
}

.voice-partial {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.48;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 2px 14px rgba(6, 182, 212, 0.4);
  max-width: 100%;
  overflow-wrap: anywhere;
  animation: partial-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.voice-partial:not([hidden])::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--cyber-cyan);
  margin-left: 4px;
  vertical-align: -2px;
  box-shadow: 0 0 8px var(--cyber-cyan);
  animation: cursor-blink 0.9s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes partial-appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.voice-hint {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-hint-spark {
  color: #38bdf8;
  font-size: 12px;
}

.voice-hint[hidden] { display: none !important; }

/* 底部操作控制台 */
.voice-bottom-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-top: 4px;
}

.voice-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.voice-btn {
  pointer-events: auto;
  min-width: 110px;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.voice-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.voice-btn-cancel:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fca5a5;
  transform: translateY(-1px);
}

.voice-btn-primary {
  min-width: 130px;
  border: 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.voice-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.55), 0 0 20px rgba(6, 182, 212, 0.4), inset 0 1px 0 #ffffff;
}

.voice-btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.voice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.voice-caption {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.voice-caption kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: var(--mono);
  color: #f1f5f9;
}

.voice-mask.is-recognizing .voice-beacon-dot {
  background: var(--cyber-cyan);
  box-shadow: 0 0 12px var(--cyber-cyan);
}

.voice-mask.is-recognizing .voice-beacon-ping {
  background: rgba(6, 182, 212, 0.5);
}

.voice-mask.is-recognizing .voice-orb-glow {
  animation-duration: 4s;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .voice-mask-stage { min-height: auto; padding: 22px 18px; }
  .voice-center-visual, .voice-wave { height: 140px; }
  .voice-partial { font-size: 18px; }
  .voice-btn-group { flex-direction: column; width: 100%; }
  .voice-btn { width: 100%; }
}

.attach-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 发送/停止按钮 - 高质感触控按钮 */
.uV2eYG_primary {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 50% !important;
  border: 1px solid transparent !important;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
              0 2px 6px -1px rgba(37, 99, 235, 0.4),
              0 1px 2px rgba(15, 23, 42, 0.08) !important;
  position: relative !important;
}

.uV2eYG_primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%) !important;
  transform: translateY(-1px) scale(1.04) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
              0 6px 16px -2px rgba(37, 99, 235, 0.55),
              0 2px 4px rgba(15, 23, 42, 0.1) !important;
}

.uV2eYG_primary:active:not(:disabled) {
  transform: translateY(0) scale(0.96) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25),
              0 1px 2px rgba(37, 99, 235, 0.3) !important;
}

.uV2eYG_primary:disabled {
  background: var(--wash-strong) !important;
  color: var(--muted-dark) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.6 !important;
}

.uV2eYG_primary.is-busy {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
              0 4px 14px rgba(225, 29, 72, 0.45) !important;
  animation: none !important;
}

.chat-disclaimer {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted-dark);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   右侧任务侧栏抽屉 (Task Drawer)
   ========================================================================== */

.task-rail {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--bg-surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.workbench.is-tasks .task-rail {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.task-rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex: none;
}

.task-rail-head strong {
  font-size: 15px;
  color: var(--ink);
}

.task-close {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.task-close:hover { color: var(--ink); background: var(--wash); }

.task-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--wash);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: none;
}

.task-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-tab:hover {
  color: var(--ink);
}

.task-tab.is-on {
  background: var(--bg-surface);
  color: var(--cyber-blue);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.task-status {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  flex: none;
}

.task-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.task-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--wash-soft);
  border: 1px solid var(--line);
  border-left: 3.5px solid var(--line);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  animation: task-in 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@keyframes task-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-card:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.task-card:active {
  transform: translateY(0) scale(0.99);
}

.task-card.is-selected {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.03) 100%) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 8px 20px rgba(59, 130, 246, 0.12) !important;
}

/* 优雅告警体系：绝不粗暴糊红，采用微光重音边框与现代精致柔光胶囊 */
.task-card.is-overdue {
  border-left-color: #f43f5e;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.06) 0%, var(--wash-soft) 28%);
}
.task-card.is-overdue:hover {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.12);
}

.task-card.is-urgent {
  border-left-color: #a855f7;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.06) 0%, var(--wash-soft) 28%);
}
.task-card.is-urgent:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.12);
}

.task-card.is-overdue.is-urgent {
  border-left-color: #f43f5e;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.08) 0%, rgba(168, 85, 247, 0.04) 30%, var(--wash-soft) 60%);
}

.task-card.is-due-today:not(.is-overdue) {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, var(--wash-soft) 28%);
}

.task-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-card-id {
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.task-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* 胶囊徽标体系 */
.task-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.35;
  border: 1px solid transparent;
}

.task-pill-overdue {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.28);
}
html[data-theme-resolved="light"] .task-pill-overdue,
html[data-theme="light"] .task-pill-overdue {
  color: #e11d48;
  background: #ffe4e6;
  border-color: #fecdd3;
}

.task-pill-due-today {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
}
html[data-theme-resolved="light"] .task-pill-due-today,
html[data-theme="light"] .task-pill-due-today {
  color: #d97706;
  background: #fef3c7;
  border-color: #fde68a;
}

.task-pill-urgent {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.28);
}
html[data-theme-resolved="light"] .task-pill-urgent,
html[data-theme="light"] .task-pill-urgent {
  color: #7e22ce;
  background: #f3e8ff;
  border-color: #e9d5ff;
}

.task-pill-status {
  background: var(--wash-strong);
  color: var(--ink-secondary);
  border-color: var(--line);
}

.task-card-header h3 {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-footer {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-card-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card-action {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.task-card:hover .task-card-action {
  color: var(--cyber-blue);
}

.task-card-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.task-card-btn:hover {
  background: var(--wash);
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.task-card-ai-btn {
  background: rgba(59, 130, 246, 0.1);
  color: var(--cyber-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 2.5px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.task-card-ai-btn:hover {
  background: var(--cyber-blue);
  color: #fff;
  border-color: var(--cyber-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   模态框体系 (Login / Requirement / Intake Modals) - 统一动效
   ========================================================================== */

.login-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-mask.is-open,
.login-mask.intake-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.15);
  position: relative;
  transform: scale(0.96) translateY(14px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease-out;
}

.login-mask.is-open .login-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.login-mask:not(.is-open) .login-card {
  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 1, 1), opacity 0.18s ease-in;
}

@media (prefers-reduced-motion: reduce) {
  .login-mask,
  .login-mask.intake-mask,
  .login-card,
  .login-card.intake-card {
    transition: none !important;
  }
}

.login-mask.intake-mask {
  overflow: auto;
}

.login-card.intake-card {
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-height: none;
  overflow: visible;
  padding: 24px 24px 18px;
}

.login-card.intake-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.intake-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intake-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.intake-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}

.intake-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--inset-strong);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.intake-seg-4,
.intake-seg-5 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.intake-seg-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.intake-log-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.intake-log-range input[type="datetime-local"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--inset);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.intake-seg button {
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.intake-seg button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-blue-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.intake-seg button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
}

.intake-seg button:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 1px;
}

.login-card.intake-card input,
.login-card.intake-card textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.login-card.intake-card textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

#intake-pane-log textarea,
#intake-pane-data textarea {
  min-height: 88px;
}

.login-card.intake-card input:focus,
.login-card.intake-card textarea:focus {
  outline: none;
  border-color: var(--cyber-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

@media (max-width: 520px) {
  .intake-row { grid-template-columns: 1fr; }
  .intake-seg-4,
  .intake-seg-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-log-range { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .login-mask.intake-mask,
  .login-mask.intake-mask:not(.is-open),
  .login-card.intake-card,
  .login-mask.intake-mask:not(.is-open) .intake-card {
    transition: none;
  }
}

.login-card.req-card {
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100vw - 48px));
  max-width: none;
  height: min(860px, calc(100vh - 48px));
  overflow: hidden;
  padding: 28px 36px 20px;
}

.login-card.req-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
  margin-top: 12px;
}

.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.redmine-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.req-combo {
  position: relative;
}

.req-combo.is-open {
  z-index: 8;
}

.intake-combo input {
  padding-right: 38px;
}

.intake-combo-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.36, 1), border-color 0.2s ease;
}

.intake-combo.is-open .intake-combo-caret {
  margin-top: -2px;
  transform: rotate(225deg);
  border-color: var(--cyber-blue);
}

.req-combo-list {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(220px, 36vh);
  overflow: auto;
  background: var(--bg-surface-elevated);
  color: var(--ink);
  border: 1px solid var(--hairline-strong, var(--line));
  border-radius: 14px;
  box-shadow: var(--shadow-lg), 0 12px 28px -12px rgba(37, 99, 235, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transform-origin: top center;
  transition: opacity 0.18s ease-out, transform 0.22s cubic-bezier(0.16, 1, 0.36, 1), visibility 0.18s;
}

.req-combo.is-open .req-combo-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.req-combo-list[hidden] {
  display: none;
}

.req-combo-list [role="option"] {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  color: var(--ink);
}

.req-combo-list [role="option"].is-active,
.req-combo-list [role="option"]:hover {
  background: color-mix(in srgb, var(--cyber-blue) 12%, transparent);
  color: var(--ink);
}

.req-combo-list [aria-selected="true"] {
  font-weight: 700;
  color: var(--cyber-blue);
}

.req-combo-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .req-combo-list,
  .intake-combo-caret {
    transition: none;
  }
}

.login-card.req-card .login-field {
  gap: 8px;
}

.req-body-field {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.login-card.req-card select,
.login-card.req-card input,
.login-card.req-card textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.login-card.req-card textarea {
  flex: 1;
  min-height: 280px;
  resize: none;
  line-height: 1.6;
}

.login-card.req-card.is-update form {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-body-field {
  flex: 1 1 auto;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.edit-toolbar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.edit-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--wash);
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.edit-tool-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.edit-tool-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.edit-tool-btn.is-active,
.edit-tool-preview-btn:hover {
  color: var(--cyber-blue);
}

.edit-toolbar-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 2px;
}

.edit-tool-preview-btn {
  color: var(--cyber-blue);
  font-weight: 600;
}

.login-card.req-card.is-update textarea#redmine-confirm-body {
  min-height: 220px;
  flex: 1 1 220px;
  font-family: var(--mono, monospace);
  font-size: 13.5px;
  line-height: 1.6;
}

.edit-body-preview {
  min-height: 220px;
  max-height: 380px;
  overflow-y: auto;
  padding: 12px 16px;
  background: var(--inset-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}

.edit-notes-field {
  flex: 0 0 auto;
}

.login-field-sub {
  font-size: 12px;
  font-weight: normal;
  color: var(--muted);
}

.login-card.req-card.is-update textarea#redmine-confirm-notes {
  min-height: 60px;
  max-height: 100px;
  flex: 0 0 auto;
  font-size: 13px;
}

.login-card.req-card select:focus,
.login-card.req-card input:focus,
.login-card.req-card textarea:focus {
  outline: none;
  border-color: var(--cyber-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-card.req-card input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.login-card.req-card input:disabled {
  opacity: 0.7;
}

/* ==========================================================================
   任务详情弹窗 (Task Detail Modal)
   ========================================================================== */

.login-card.task-detail-card {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  padding: 24px 28px 20px;
}

.task-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.task-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
  border: 1px solid var(--line);
}

.task-badge-id {
  background: rgba(59, 130, 246, 0.12);
  color: var(--cyber-blue);
  border-color: rgba(59, 130, 246, 0.3);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono, monospace);
}

.task-issue-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: baseline;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.88em;
  font-weight: 600;
  color: var(--cyber-blue, #2563eb);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 6px;
  padding: 1px 7px;
  margin: 0 3px;
  cursor: pointer;
  line-height: 1.4;
  transition: all 0.15s ease;
  text-decoration: none;
}
.task-issue-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.55);
  color: var(--cyber-blue, #1d4ed8);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}
.task-issue-chip:active {
  transform: translateY(0);
}
.task-issue-chip .task-issue-icon {
  display: inline-block;
  vertical-align: -1px;
  opacity: 0.8;
  flex: none;
}

.task-badge-status {
  background: var(--wash-strong);
  color: var(--ink);
}

.task-badge-tracker {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyber-cyan);
  border-color: rgba(6, 182, 212, 0.25);
}

.task-badge-priority {
  background: var(--wash);
  color: var(--muted);
}

.task-detail-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-detail-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--cyber-blue);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.task-detail-ext-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--ink);
}

.task-detail-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.task-detail-close:hover {
  color: var(--ink);
  background: var(--wash-strong);
}

.task-detail-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.task-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  background: var(--wash-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  flex: none;
}

.task-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.task-meta-k {
  font-size: 11px;
  color: var(--muted);
}

.task-meta-v {
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 4px;
  margin-bottom: 16px;
}

.task-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-section-head {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-section-head svg {
  color: var(--cyber-blue);
  flex: none;
}

.task-desc-body {
  padding: 14px 16px;
  background: var(--inset-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.task-desc-body:empty::before {
  content: "（无描述）";
  color: var(--muted);
  font-style: italic;
}

.task-journals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-journal-card {
  padding: 10px 12px;
  background: var(--wash-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.task-journal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.task-journal-author {
  font-weight: 600;
  color: var(--ink);
}

.task-journal-text {
  color: var(--ink-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.task-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 图片附件网格 */
.task-attach-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.task-attach-img-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wash-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-attach-img-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.task-attach-img-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--inset-strong);
  overflow: hidden;
}

.task-attach-img-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.task-attach-img-card:hover .task-attach-img-thumb {
  transform: scale(1.06);
}

.task-attach-img-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.task-attach-img-card:hover .task-attach-img-hover-overlay {
  opacity: 1;
}

.task-attach-hover-view {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.task-attach-img-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--line);
}

.task-attach-img-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.task-attach-img-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.task-attach-size {
  font-size: 10px;
  color: var(--muted);
}

.task-attach-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--wash);
  color: var(--muted);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.15s ease;
}

.task-attach-dl-btn:hover {
  background: var(--cyber-blue);
  color: #fff;
  border-color: var(--cyber-blue);
}

/* 非图片文件清单 */
.task-attach-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-attach-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--wash-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all 0.18s ease;
}

.task-attach-file-item:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.25);
}

.task-attach-file-icon {
  font-size: 16px;
  flex: none;
}

.task-attach-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-attach-file-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-attach-file-dl {
  width: auto;
  height: auto;
  padding: 4px 10px;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  flex: none;
}

/* 图片灯箱 (Lightbox) 弹窗 */
.image-lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-content {
  display: flex;
  flex-direction: column;
  max-width: min(92vw, 1200px);
  max-height: min(92vh, 900px);
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.image-lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: none;
}

.image-lightbox-name {
  color: #f1f5f9;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.image-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.image-lightbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.image-lightbox-btn:hover {
  background: var(--cyber-blue);
  border-color: var(--cyber-blue);
  color: #fff;
}

.image-lightbox-close {
  padding: 5px 10px;
  font-size: 14px;
}

.image-lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.task-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.task-edit-detail-btn,
.task-analyze-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  font-weight: 500 !important;
}

.task-analyze-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-cyan)) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 0 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.task-analyze-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
}

.task-analyze-btn:active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 640px) {
  .login-card.task-detail-card {
    padding: 16px;
    height: calc(100vh - 24px);
  }
  .task-detail-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .task-detail-actions {
    flex-direction: column-reverse;
  }
  .task-detail-actions button {
    width: 100%;
  }
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 24px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: hidden;
  animation: card-appear 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes card-appear {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-card.is-shaking {
  animation: card-shake 0.4s ease-in-out;
}

@keyframes card-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.login-card-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 75%);
  pointer-events: none;
  filter: blur(20px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.brand-dual-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: var(--inset-strong);
  border: 1px solid var(--wash-strong);
  border-radius: 12px;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--hairline-strong);
}

.brand-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-wrap strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.brand-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyber-emerald);
  box-shadow: 0 0 8px var(--cyber-emerald);
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-header-group {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyber-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-card h2 {
  margin: 6px 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.login-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.login-field-wrap {
  margin-bottom: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-dark);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.15s ease;
}

.input-icon-group input {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 40px 11px 36px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-icon-group input::placeholder {
  color: var(--muted-dark);
  font-size: 13px;
}

.input-icon-group input:focus {
  border-color: var(--cyber-blue);
  background: var(--field-bg-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 0 20px rgba(59, 130, 246, 0.15);
}

.input-icon-group input:focus + .pwd-toggle-btn {
  color: var(--muted);
}

.input-icon-group:focus-within .input-prefix-icon {
  color: var(--cyber-cyan);
}

/* 密码明文/密文切换按钮 */
.pwd-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted-dark);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pwd-toggle-btn:hover {
  color: var(--ink);
}

.login-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: message-in 0.2s ease-out;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.login-passkey {
  margin-top: 14px;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted-dark);
  font-size: 12px;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--wash);
}

.login-or span {
  flex: none;
}

.btn-passkey {
  width: 100%;
  padding: 11px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.btn-passkey:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.passkey-prompt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
  background: var(--bg-glass-strong, light-dark(#fff, #1a2230));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-glass, 0 8px 24px rgba(15, 23, 42, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.passkey-prompt.is-open {
  opacity: 1;
  transform: none;
}

.passkey-prompt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--cyber-cyan, #22d3ee);
  background: color-mix(in srgb, var(--cyber-cyan, #22d3ee) 12%, transparent);
  flex: none;
}

.passkey-prompt-copy {
  min-width: 0;
}

.passkey-prompt-copy strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
}

.passkey-prompt-copy p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.passkey-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.passkey-prompt-actions .btn,
.passkey-prompt-actions .btn-ghost {
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .passkey-prompt {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .passkey-prompt-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .passkey-prompt {
    transition: none;
  }
}

.btn-login-submit {
  width: 100%;
  padding: 12px 20px;
  font-size: 14.5px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: chat-spin 0.65s linear infinite;
}

.login-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--wash);
  color: var(--muted-dark);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.login-security-badge svg {
  color: var(--cyber-emerald);
}

.btn {
  border: 0;
  background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-blue-hover));
  color: #fff;
  border-radius: 12px;
  padding: 10px 22px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.5);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--wash);
  color: var(--ink);
}

.theme-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
}
.theme-row .theme-switch,
.rail-foot .theme-switch { width: min(196px, 100%); }
.rail-foot .theme-switch { width: 100%; }
.theme-switch button {
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.theme-switch button .theme-icon {
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
.theme-switch button[aria-pressed="true"] {
  background: var(--cyber-blue);
  color: #fff;
}
.theme-switch button:hover:not([aria-pressed="true"]) { color: var(--ink); }
.theme-switch button:focus-visible {
  outline: 2px solid var(--cyber-blue);
  outline-offset: 1px;
}
.workbench.is-rail-collapsed .rail-foot .theme-switch {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 auto;
  grid-template-columns: 1fr;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--inset-strong);
  border: 1px solid var(--wash-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.workbench.is-rail-collapsed .rail-foot .theme-switch button:not([aria-pressed="true"]) {
  display: none;
}
.workbench.is-rail-collapsed .rail-foot .theme-switch button[aria-pressed="true"] {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--cyber-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.workbench.is-rail-collapsed .rail-foot .theme-switch .theme-text {
  display: none;
}
.workbench.is-rail-collapsed .rail-foot .theme-switch .theme-icon {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 720px) {
  .login-mask { padding: 12px; }
  .login-card.req-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    padding: 18px 16px 14px;
    border-radius: 16px;
  }
  .req-grid,
  .redmine-fields { grid-template-columns: 1fr; }
  .req-combo-list { max-height: 32vh; }
  .login-card.req-card textarea { min-height: 180px; }
}

/* ==========================================================================
   三期增强: Toast 瞬态通知、结论 Bento 卡片、海报预览淡出、表结构与排障卡片
   ========================================================================== */

/* 1. Toast 容器与浮层 */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  cursor: pointer;
  user-select: none;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.is-hiding {
  animation: toastSlideOut 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-item.is-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.toast-item.is-info {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(14, 165, 233, 0.45);
  color: #38bdf8;
}

.toast-item.is-warning {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.toast-item.is-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

/* 2. 结论 Bento 卡片 (Verdict Bento Card) - 高级质感与超高文字对比度 */
.verdict-bento-card {
  margin: 0 0 16px 0;
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.12));
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.verdict-bento-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

/* 浅色主题卡片质感优化 */
html[data-theme="light"] .verdict-bento-card,
html:not([data-theme="dark"]) .verdict-bento-card {
  background: #ffffff;
}

html[data-theme="light"] .verdict-bento-card.verdict-standard,
html:not([data-theme="dark"]) .verdict-bento-card.verdict-standard {
  border: 1px solid #86efac;
  border-left: 5px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 70%);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
}

html[data-theme="light"] .verdict-bento-card.verdict-custom,
html:not([data-theme="dark"]) .verdict-bento-card.verdict-custom {
  border: 1px solid #fecdd3;
  border-left: 5px solid #f43f5e;
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 70%);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.09);
}

html[data-theme="light"] .verdict-bento-card.verdict-extension,
html:not([data-theme="dark"]) .verdict-bento-card.verdict-extension {
  border: 1px solid #bae6fd;
  border-left: 5px solid #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 70%);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.08);
}

html[data-theme="light"] .verdict-bento-card.verdict-insufficient,
html:not([data-theme="dark"]) .verdict-bento-card.verdict-insufficient {
  border: 1px solid #fde68a;
  border-left: 5px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 70%);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

/* 深色主题卡片质感 */
html[data-theme="dark"] .verdict-bento-card.verdict-standard {
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-left: 5px solid #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .verdict-bento-card.verdict-custom {
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-left: 5px solid #fb7185;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .verdict-bento-card.verdict-extension {
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-left: 5px solid #38bdf8;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .verdict-bento-card.verdict-insufficient {
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 5px solid #fbbf24;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.verdict-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.verdict-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.verdict-product-pill {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 6px;
  background: light-dark(rgba(15, 23, 42, 0.06), rgba(255, 255, 255, 0.12));
  color: light-dark(#334155, #cbd5e1);
  border: 1px solid light-dark(rgba(15, 23, 42, 0.12), rgba(255, 255, 255, 0.15));
}

.verdict-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.verdict-standard .verdict-status-badge {
  background: light-dark(#dcfce7, rgba(16, 185, 129, 0.22));
  border: 1px solid light-dark(#16a34a, rgba(16, 185, 129, 0.55));
  color: light-dark(#15803d, #4ade80);
}

.verdict-custom .verdict-status-badge {
  background: light-dark(#ffe4e6, rgba(244, 63, 94, 0.22));
  border: 1px solid light-dark(#e11d48, rgba(244, 63, 94, 0.55));
  color: light-dark(#be123c, #fb7185);
}

.verdict-extension .verdict-status-badge {
  background: light-dark(#e0f2fe, rgba(14, 165, 233, 0.22));
  border: 1px solid light-dark(#0284c7, rgba(14, 165, 233, 0.55));
  color: light-dark(#0369a1, #38bdf8);
}

.verdict-insufficient .verdict-status-badge {
  background: light-dark(#fef3c7, rgba(245, 158, 11, 0.22));
  border: 1px solid light-dark(#d97706, rgba(14, 165, 233, 0.55));
  color: light-dark(#b45309, #fbbf24);
}

/* 重点修复：正文摘要在浅色下强制使用纯正深墨灰色，彻底告别看不清的问题 */
.verdict-card-summary {
  font-size: 14px;
  line-height: 1.68;
  margin-bottom: 12px;
}

html[data-theme="light"] .verdict-card-summary,
html:not([data-theme="dark"]) .verdict-card-summary {
  color: #1e293b !important;
  font-weight: 550;
}

html[data-theme="dark"] .verdict-card-summary {
  color: #f1f5f9 !important;
  font-weight: 450;
}

.verdict-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.verdict-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid light-dark(rgba(15, 23, 42, 0.16), rgba(255, 255, 255, 0.18));
  background: light-dark(#ffffff, rgba(255, 255, 255, 0.08));
  color: light-dark(#1e293b, #f8fafc) !important;
  box-shadow: light-dark(0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.2));
  user-select: none;
}

.verdict-action-btn:hover {
  background: light-dark(#f8fafc, rgba(255, 255, 255, 0.16));
  border-color: light-dark(rgba(15, 23, 42, 0.3), rgba(255, 255, 255, 0.3));
  transform: translateY(-1px);
}

.verdict-action-btn.is-poster {
  background: light-dark(#f0f9ff, rgba(14, 165, 233, 0.15)) !important;
  color: light-dark(#0284c7, #38bdf8) !important;
  border: 1px solid light-dark(#bae6fd, rgba(14, 165, 233, 0.35)) !important;
  box-shadow: none !important;
}

.verdict-action-btn.is-poster:hover {
  background: light-dark(#e0f2fe, rgba(14, 165, 233, 0.25)) !important;
  border-color: light-dark(#7dd3fc, rgba(14, 165, 233, 0.5)) !important;
  transform: translateY(-1px);
}

.verdict-action-btn.is-submit {
  background: light-dark(rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.15));
  border-color: light-dark(rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.4));
  color: light-dark(#1d4ed8, #60a5fa) !important;
}

.verdict-action-btn.is-submit:hover {
  background: light-dark(rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.25));
}

.verdict-action-btn.is-poster:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.5);
}

.verdict-action-btn.is-submit {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.4);
  color: #60a5fa;
}

.verdict-action-btn.is-submit:hover {
  background: rgba(37, 99, 235, 0.25);
}

/* 3. 海报预览与平滑淡出浮层 */
.poster-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.poster-badge-spark {
  color: #38bdf8;
  font-size: 14px;
}

.poster-fade-hint {
  font-size: 11.5px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  font-weight: 500;
}

.poster-stage {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-img {
  max-width: 100%;
  max-height: calc(85vh - 100px);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  user-select: none;
}

/* 4. 数据字典表结构卡片 (Schema Bento Card) */
.schema-bento-card {
  margin: 16px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.schema-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 10px;
  flex-wrap: wrap;
}

.schema-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

.schema-card-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-weight: 500;
}

.schema-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schema-filter-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #f1f5f9;
  outline: none;
  width: 120px;
  transition: all 0.15s ease;
}

.schema-filter-input:focus {
  border-color: #38bdf8;
  width: 150px;
}

.schema-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.schema-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.schema-toggle-btn {
  width: 100%;
  padding: 9px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.06);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
}

.schema-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.14);
}

.schema-table tr.schema-hidden-row {
  display: none;
}

.schema-bento-card.is-expanded .schema-table tr.schema-hidden-row {
  display: table-row;
}

/* 5. Loki 事故排障诊断卡片 (Incident Bento Card) */
.incident-bento-card {
  margin: 16px 0;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.02));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.incident-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.incident-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.incident-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.incident-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  cursor: pointer;
  transition: all 0.15s ease;
}

.incident-chip:hover {
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* Bento 卡片指针聚光灯 (Mouse Spotlight) */
.verdict-bento-card::after,
.schema-bento-card::after,
.export-card::after,
.composer-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), rgba(56, 189, 248, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.verdict-bento-card:hover::after,
.schema-bento-card:hover::after,
.export-card:hover::after,
.composer-shell:hover::after {
  opacity: 1;
}

/* 全局滚动条现代规范 (MANDATORY: scrollbar-color & scrollbar-width) */
* {
  --scrollbar-thumb: light-dark(rgba(15, 23, 42, 0.22), rgba(255, 255, 255, 0.22));
  --scrollbar-track: transparent;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-item,
  .verdict-bento-card,
  .verdict-action-btn,
  .schema-filter-input,
  .incident-chip {
    animation: none !important;
    transition: none !important;
  }
}
