@charset "UTF-8";
/* ============================================================================
   DoSight · theme layer v2
   参考语言：Linear / Ramp / Mercury / Attio / PostHog 这一类 2025–2026 年的
   B 端产品——近黑导航、纯中性灰底、极轻边框、几乎不用重阴影，靠留白与
   字号对比分层；品牌绿退到「强调色」位置，不再大面积铺。

   硬约束：不动 DOM、不动 class 名、不动 JS、不动接口契约。
   删掉 index.html 里那行 <link href="/theme.css"> 即退回 demo 原样。
   ========================================================================= */

:root {
  /* 中性（带蓝，不是纯灰；卡片也不是纯白） */
  --bg: #e8eef8;
  --bg-sub: #dfe7f3;
  --card: #fcfdff;
  --card-2: #f4f8ff;
  --card-3: #e8effb;
  --line: #dce3ef;
  --line-soft: #e9eef8;
  --line-strong: #cad4e5;
  --ink: #0b1424;
  --ink-2: #27324a;
  --ink-3: #54617a;
  --ink-4: #7f8ba3;
  --ink-5: #9da9be;

  /* 品牌（只做强调）+ 一个相邻的青蓝，避免整页只有一种蓝 */
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-bright: #60a5fa;
  --brand-soft: #e7eefe;
  --accent: #0e9bd6;
  --accent-soft: #e4f4fc;
  --indigo: #4f46e5;
  --indigo-soft: #eceafe;

  /* 深色面 */
  --night: #090c12;
  --night-1: #0e131b;
  --night-2: #141a24;
  --night-line: rgba(255, 255, 255, 0.07);
  --night-text: #e8edf5;
  --night-dim: rgba(232, 237, 245, 0.52);
  --night-faint: rgba(232, 237, 245, 0.34);

  /* 兼容原变量 */
  --green: #2563eb;
  --muted: #7d847f;

  /* 阴影：只给「浮起来」的东西 */
  --sh-1: 0 1px 2px rgba(11, 15, 23, 0.04);
  --sh-2: 0 1px 3px rgba(11, 15, 23, 0.05), 0 10px 26px -18px rgba(11, 15, 23, 0.22);
  --sh-3: 0 30px 70px -34px rgba(11, 15, 23, 0.40), 0 2px 6px rgba(11, 15, 23, 0.05);

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------- 基础 */
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image: radial-gradient(1100px 520px at 50% -18%, rgba(37, 99, 235, 0.055), transparent 70%);
  background-attachment: fixed;
  color: var(--ink-2);
  font-feature-settings: "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: #c9dcff; color: #0b1e44; }

h1, h2, h3 { letter-spacing: -0.028em; }
h1 { font-weight: 600; color: var(--ink); }
p { color: var(--ink-3); }
a { color: var(--brand-deep); }
a:hover { text-decoration: none; }

*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(11, 15, 23, 0.14);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(11, 15, 23, 0.28); background-clip: content-box; }
/* Chrome 的自定义滚动条默认带上下两个箭头按钮，出现在窄列表里很扎眼，一律去掉 */
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------------------------------------------------------------- 侧栏 */
/* 近黑，不铺渐变绿；顶部只留一点极淡的品牌光。 */
.shell { background: var(--night); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 26px 16px 18px;
  gap: 28px;
  background:
    radial-gradient(420px 220px at 12% -8%, rgba(37, 99, 235, 0.18), transparent 70%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night) 46%, #06090e 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000, transparent 42%);
}
.sidebar > * { position: relative; z-index: 1; }
/* 侧栏是 flex 列，子项默认 flex-shrink:1：窗口一矮，第一个被压缩的就是
   「最近对话」列表——它会被压成只剩一条缝，条目文字被拦腰截断、日期压在滚动条下面。
   这里禁止收缩，让整条侧栏来滚；列表自己再单独滚。 */
.sidebar > * { flex: 0 0 auto; }

.sidebar .brand {
  color: var(--night-text);
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.025em;
  gap: 9px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--night-line);
}
.sidebar .brand img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.45));
}
.sidebar .brand em {
  color: var(--night-faint);
  border-left-color: var(--night-line);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding-left: 10px;
  margin-left: 2px;
}

.side-label {
  color: var(--night-faint);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 10px;
  margin-bottom: 10px;
}

.nav { gap: 2px; }
.nav-item {
  position: relative;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--night-dim);
  font-size: 12.5px;
  font-weight: 450;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: var(--night-text); text-decoration: none; }
.nav-item.active {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  font-weight: 520;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* 选中态：左侧一条 2px 实线，比发光条更克制 */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 2px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 0 2px 2px 0;
  background: var(--brand-bright);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
}
.nav-symbol {
  width: 16px;
  font-size: 14px;
  text-align: center;
  color: var(--night-faint);
  transition: color 0.16s var(--ease);
}
.nav-item:hover .nav-symbol { color: var(--night-dim); }
.nav-item.active .nav-symbol { color: var(--brand-bright); }

.side-bottom { border-top: 1px solid var(--night-line); padding-top: 16px; }
.side-profile { color: var(--night-dim); font-size: 11.5px; }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--night-text);
  font-size: 11px;
  font-weight: 600;
}
.side-version {
  color: var(--night-faint);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 14px;
  padding-left: 2px;
}
.side-bottom .nav-item { color: var(--night-faint); }
.side-bottom .nav-item:hover { color: var(--night-text); }

/* 侧栏内对话列表 */
.conversation-nav .side-label { color: var(--night-faint); }
.sidebar .new-chat {
  background-color: rgba(255, 255, 255, 0.045);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: var(--r-sm);
  color: var(--night-text);
  font-size: 11.5px;
  font-weight: 480;
  padding: 8px 11px;
  box-shadow: none;
}
.sidebar .new-chat:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.09);
  background-image: none;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}
.conversation-item {
  color: var(--night-dim);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 11.5px;
}
.conversation-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--night-text); }
.conversation-item.selected {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.conversation-item small { color: var(--night-faint); font-size: 9.5px; flex: 0 0 auto; }
.conversation-item span { min-width: 0; }
/* 桌面端给列表留个下限：至少看得见三条，不够高就让侧栏自己滚，
   不要再把列表压成一条缝（窄屏是横向滚动条，不受影响） */
@media (min-width: 761px) {
  .conversation-list { min-height: 108px; }
}
.conversation-empty { color: var(--night-faint); font-size: 11px; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 58px;
  padding: 0 40px;
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(11, 15, 23, 0.07);
  box-shadow: none;
}
.breadcrumb { color: var(--ink-4); font-size: 11.5px; letter-spacing: 0.01em; }
.breadcrumb b { color: var(--ink); font-weight: 550; }
.top-meta { color: var(--ink-4); font-size: 11px; font-variant-numeric: tabular-nums; gap: 14px; }
.dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------------------------------------------------------------- 主区 */
.workspace { background: var(--bg); }
.main-content { padding: 36px 40px 56px; max-width: 1440px; position: relative; }
.main-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: radial-gradient(720px 220px at 16% -50%, rgba(37, 99, 235, 0.07), transparent 72%);
  pointer-events: none;
}
.main-content > * { position: relative; }

.page-heading { margin-bottom: 26px; align-items: flex-end; gap: 24px; }
.page-heading h1 {
  font-size: 29px;
  margin: 10px 0 8px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.page-heading p { color: var(--ink-4); font-size: 12.5px; margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------------------------------------------------------------- 统计卡 */
.stat {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px 16px;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}
.stat:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
}
.stat-label {
  font-size: 11.5px;
  font-weight: 520;
  letter-spacing: 0;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-label span {
  display: none;
}
.stat-number {
  font-size: 40px;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-number span {
  font-size: 11px;
  color: var(--ink-4);
  font-weight: 450;
  letter-spacing: 0;
  margin-left: 6px;
}

/* 首张卡做视觉锚点：深色，和其余三张白卡形成主次（Ramp / Mercury 的 KPI 页做法） */
.stats .stat:first-child {
  background: linear-gradient(150deg, #161817 0%, #0c0d0d 62%, #090c12 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.65);
}
.stats .stat:first-child::before {
  height: 1px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.85), rgba(96, 165, 250, 0));
}
.stats .stat:first-child .stat-label { color: rgba(232, 237, 245, 0.55); }
.stats .stat:first-child .stat-number { color: #fff; }
.stats .stat:first-child .stat-number span { color: rgba(232, 237, 245, 0.42); }
.stats .stat:first-child:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
}

/* ---------------------------------------------------------------- 面板 */
.panel {
  background: linear-gradient(180deg, #fdfeff 0%, var(--card) 120px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.panel-heading {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  gap: 14px;
}
.panel-heading h2 {
  font-size: 13.5px;
  font-weight: 580;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-heading h2::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}
.panel-heading h2 small { font-weight: 400; color: var(--ink-5); font-size: 11px; }
.panel-heading small { color: var(--ink-4); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap { background: var(--card); }
table { font-size: 12.5px; font-variant-numeric: tabular-nums; }
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card-2);
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0.02em;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 12.5px;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.14s var(--ease); }
tbody tr:hover { background: #f7f8fa; }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
td strong { color: var(--ink); font-weight: 560; }
td .cell-sub { color: var(--ink-5); font-size: 11px; margin-top: 2px; }
.table-footer {
  background: transparent;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-4);
  font-size: 11px;
  padding: 12px 20px;
}
.footer-note { color: var(--ink-5); font-size: 11px; }

/* ---------------------------------------------------------------- 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 2px 7px 2px 6px;
  font-size: 10.5px;
  font-weight: 540;
  letter-spacing: 0.01em;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid rgba(37, 99, 235, 0.16);
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.badge.amber { background: #fdf7e9; color: #8f6a12; border-color: #f1e3c1; }
.badge.gray { background: #f1f3f7; color: var(--ink-3); border-color: var(--line); }
.badge.red { background: #fdf1ed; color: #a8492f; border-color: #f2ddd4; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-weight: 520;
  font-size: 12.5px;
  padding: 8px 14px;
  box-shadow: 0 1px 1px rgba(11, 15, 23, 0.03);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover:not(:disabled) {
  background: #fdfeff;
  border-color: #c2cad6;
  box-shadow: var(--sh-1);
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-color: #1746b8;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(10, 32, 90, 0.22);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #4b8ff8, #2158e0);
  border-color: #1746b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 2px 6px rgba(10, 32, 90, 0.24);
}
.btn.subtle {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--brand-deep);
  font-weight: 520;
}
.btn.subtle:hover:not(:disabled) { background: var(--brand-soft); border-color: transparent; }
.btn.danger { color: #a8492f; }
.btn.danger:hover:not(:disabled) { background: #fdf4f1; border-color: #efd6cc; }

/* ---------------------------------------------------------------- 表单 */
.field { gap: 6px; margin-bottom: 16px; }
.field > span { color: var(--ink-2); font-weight: 540; font-size: 12px; letter-spacing: 0.005em; }
.field small { color: var(--ink-5); font-size: 11px; }
.field input, .field select, .field textarea, .search, .inline-input {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 12.5px;
  box-shadow: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover,
.search:hover, .inline-input:hover { border-color: #bfc8d4; }
.field input:focus, .field select:focus, .field textarea:focus,
.search:focus, .inline-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--ink-5); }
input[type=checkbox] { accent-color: var(--brand); }
.search { background: #fafbfd; font-size: 12px; min-height: 34px; max-width: 240px; }
.search:focus { background: var(--card); }

/* ---------------------------------------------------------------- 空态 */
.empty { color: var(--ink-4); padding: 64px 24px; }
.empty-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  /* 蓝色调的浅金属面：跟主色呼应，不要纯白 + 描边（那样等于方块套方块，
     再放一个带斜纹的字符就像「图片加载失败」的占位图） */
  background: linear-gradient(180deg, #fbfdff 0%, #eef4ff 100%);
  border: 1px solid #dbe6f8;
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px -12px rgba(11, 30, 68, .5);
  color: var(--brand);
}
.empty-mark svg {
  width: 21px;
  height: 21px;
  opacity: .82;
}
.empty h3 { color: var(--ink); font-size: 13.5px; font-weight: 560; margin-bottom: 5px; }
.empty p { color: var(--ink-4); font-size: 12px; }

/* ---------------------------------------------------------------- 提示 */
.notice {
  background: #fbf7ec;
  border: 1px solid #efe3c8;
  border-left: 2px solid #d9a93f;
  color: #7a5c18;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  padding: 12px 16px;
  box-shadow: none;
}
.error {
  background: #fdf3f1;
  border: 1px solid #f0d9d3;
  border-left: 2px solid #c2603f;
  color: #9a3f28;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  /* 后端的报错是多行的（先说什么文件、再说缺哪列），必须保留换行 */
  white-space: pre-line;
  line-height: 1.65;
  padding: 10px 14px;
}
.bulk-bar {
  background: #f3f7fe;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.helper-line { font-size: 11.5px; }
.audit-values {
  color: var(--ink-4);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------------------------------------------------------- 弹窗 */
dialog {
  border: 1px solid rgba(11, 15, 23, 0.08);
  border-radius: 18px;
  padding: 28px 30px;
  background: var(--card);
  box-shadow: var(--sh-3);
  color: var(--ink-2);
  animation: modalIn 0.2s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(6px) scale(0.995); } }
dialog::backdrop { background: rgba(6, 9, 14, 0.55); backdrop-filter: blur(5px); }
.modal-heading { margin-bottom: 18px; }
.modal-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.close-button { color: var(--ink-5); border-radius: 6px; font-size: 20px; }
.close-button:hover { background: var(--bg-sub); color: var(--ink-2); }
.modal-section { border-top: 1px solid var(--line-soft); }
.modal-copy { color: var(--ink-3); font-size: 12.5px; line-height: 1.8; }
.invite-code {
  border: 1px dashed rgba(37, 99, 235, 0.4);
  background: #f5f8ff;
  color: var(--brand-deep);
  border-radius: var(--r-sm);
  font-size: 17px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.invite-link { background: var(--bg-sub); border-color: var(--line); color: var(--ink-4); border-radius: 6px; }

.toast {
  background: #101211;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f4fa;
  border-radius: 9px;
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.7);
  font-size: 12px;
  padding: 10px 18px;
}
.toast.error-toast { background: #2a1410; border-color: rgba(255, 255, 255, 0.12); color: #ffeae2; }

/* ---------------------------------------------------------------- 折叠区 */
.ops-security > summary,
.report-methods > summary,
details > summary.muted {
  cursor: pointer;
  color: var(--ink-4);
  font-size: 11.5px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
}
.ops-security > summary::-webkit-details-marker,
.report-methods > summary::-webkit-details-marker,
details > summary.muted::-webkit-details-marker { display: none; }
.ops-security > summary::before,
.report-methods > summary::before {
  content: "▸";
  font-size: 8px;
  color: var(--ink-5);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}
details[open] > summary::before { transform: rotate(90deg); color: var(--brand); }
.ops-security > summary:hover, .report-methods > summary:hover { color: var(--ink-2); }

/* ---------------------------------------------------------------- 工作台 */
.thread-panel {
  border-radius: var(--r-lg);
  border-color: var(--line);
  box-shadow: var(--sh-1);
  background: var(--card);
  background-image: linear-gradient(180deg, #fdfeff 0%, #f8fbff 100%);
}
.thread-heading {
  padding: 0 18px;
  min-height: 50px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
.thread-heading strong { font-size: 12.5px; font-weight: 560; color: var(--ink); }
.thread-indicator {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}
.intake-notice {
  background: #fafbfd;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-4);
  font-size: 10.5px;
  padding: 8px 18px;
}
.chat-feed { background: var(--card-2); padding: 22px 24px; }

.chat-welcome { background: none; border: 0; margin: 0; position: relative; }
.chat-welcome::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: 560px;
  height: 340px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.11), rgba(14, 155, 214, 0.05) 55%, transparent 78%);
  pointer-events: none;
}
.chat-welcome > * { position: relative; z-index: 1; }
.welcome-mark {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(150deg, #ffffff 0%, #eaf1fe 44%, #d6e4fb 100%);
  border: 1px solid #c6d8f6;
  color: var(--brand-deep);
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(11, 15, 23, 0.06),
    0 10px 24px -14px rgba(11, 30, 68, 0.45);
  margin-bottom: 18px;
}
.welcome-mark span { color: var(--brand); }
.chat-welcome .eyebrow { color: var(--ink-5); font-size: 9px; letter-spacing: 0.18em; }
.chat-welcome .eyebrow::before { background: var(--brand); }
.chat-welcome h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 8px 0 10px;
}
.chat-welcome p { color: var(--ink-4); font-size: 12px; line-height: 1.8; margin-bottom: 20px; }

.starter-prompts { gap: 7px; max-width: 340px; }
.starter-prompts button {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 11.5px;
  padding: 9px 12px;
  box-shadow: none;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.16s var(--ease);
}
.starter-prompts button:hover {
  background: #fdfeff;
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--sh-1);
}
.starter-prompts span { color: var(--brand); font-size: 14px; }
.starter-prompts button:nth-child(2) span { color: var(--accent); }
.starter-prompts button:nth-child(3) span { color: var(--indigo); }
.starter-prompts b { color: var(--ink-5); font-size: 13px; }

.message { margin: 2px 0 22px; }
.message-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #eef1f5;
  border: 1px solid var(--line);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 600;
}
.from-user .message-avatar { background: #f4f6fa; color: var(--ink-4); border-color: var(--line); }
.message-meta { margin: 2px 0 8px; }
.message-meta b { font-size: 11.5px; font-weight: 560; color: var(--ink); }
.message-meta span { font-size: 10px; color: var(--ink-5); }
.message-text { color: var(--ink-2); font-size: 12.5px; line-height: 1.85; }
.from-user .message-text {
  background: #f4f6fa;
  border: 1px solid var(--line-soft);
  border-radius: 3px 10px 10px 10px;
  color: var(--ink-2);
  padding: 10px 13px;
  box-shadow: none;
}
.message-attachments { margin-top: 10px; }
.older-messages { color: var(--ink-4); font-size: 10.5px; }

.chat-composer {
  background: var(--card);
  border-top: 1px solid var(--line-soft);
  padding: 12px 18px 11px;
}
.chat-composer textarea { color: var(--ink-2); font-size: 12.5px; padding: 6px 2px; }
.chat-composer textarea:focus { box-shadow: none; }
.composer-hint, .composer-formats { color: var(--ink-5); font-size: 9.5px; }
.send-message { border-radius: 7px; font-size: 11.5px; padding: 7px 14px; font-weight: 520; }

.thread-files {
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 14px;
}
.thread-files-heading h2 { font-size: 11.5px; font-weight: 560; color: var(--ink-2); }
.thread-files-heading > span {
  background: var(--bg-sub);
  color: var(--ink-4);
  border-radius: 5px;
  font-size: 10px;
  padding: 0 6px;
}
.thread-files-description { color: var(--ink-5); font-size: 10px; }
.file-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.file-tile:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.file-type {
  background: var(--bg-sub);
  border: 1px solid var(--line);
  color: var(--ink-4);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 600;
}
.file-name { color: var(--ink-2); }
.file-name strong { font-weight: 520; }
.file-name small { color: var(--ink-5); }
.file-download { color: var(--ink-4); }
.file-download:hover { color: var(--brand); }
.files-empty { color: var(--ink-5); }
/* 空的时候把这段居中，别让图标贴着标题、下面空一大片；
   有资料时不加 flex（避免改变 file-tile 的原有堆叠与间距） */
.thread-file-list:has(.files-empty) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.thread-file-list:has(.files-empty) .files-empty { min-height: 0; }
/* 右侧「本次对话资料」只有 218px 宽，图标要小而实：给一个浅蓝底板托住，
   不要用 31px 的字符（原来的 ▧ 在这里就是一块放大的斜纹方块） */
.files-empty > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #eef4ff 100%);
  border: 1px solid #dbe6f8;
  box-shadow: inset 0 1px 0 #fff;
  color: var(--brand);
  font-size: 0;
  margin-bottom: 12px;
}
.files-empty > span svg { width: 17px; height: 17px; opacity: .82; }
.files-tip { border-top: 1px solid var(--line-soft); color: var(--ink-5); }
.files-tip b { color: var(--ink-4); }
.chat-mode-bar { border-bottom: 1px solid var(--line-soft); color: var(--ink-4); font-size: 10px; }
.chat-mode-bar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink-3);
  font-size: 10.5px;
}
.chat-generation { color: var(--ink-4); }

/* 右侧资料栏只有 218px，塞不下两个操作按钮，会把文件名挤成一条竖线：
   这里只做「清单」，生成报告的操作留在对话里的附件卡和资料库 */
.thread-files .file-analysis { display: none; }
.thread-files .file-tile { padding: 9px 8px; gap: 7px; }
.thread-files .file-name strong { font-size: 11px; }
.thread-files .file-name small { font-size: 9px; }

/* ---------------------------------------------------------------- 报告 */
.report-start {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.report-start::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}
.report-start:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.report-start h2 { font-size: 15px; font-weight: 580; color: var(--ink); letter-spacing: -0.02em; }
.report-start p { color: var(--ink-4); font-size: 12px; }
.report-card-link {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.report-card-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
}
.report-card-link b { color: var(--ink); font-weight: 560; }
.report-detail-heading { border-bottom: 1px solid var(--line-soft); padding-bottom: 16px; }
/* 它只是一个数字，不是卡片：不要给底和描边，否则深色 KPI 卡上会浮出一圈白框 */
.report-metric { background: none; border: 0; }
.profit-table td { font-variant-numeric: tabular-nums; }
.profit-total td { background: #f3f7fe; font-weight: 600; color: var(--brand-deep); }
.negative { color: #a8492f; }
.report-checks .check-warning { color: #8f6a12; }

/* ---------- 报告页：reports.css 里还留着一整套绿色，这里逐条改到蓝系（含 SVG 描边） */
.report-metric { color: var(--ink); }
/* 首张 KPI 是深色卡：报告页用的是 .report-metric 而不是 .stat-number，得单独给银字 */
.stats .stat:first-child .report-metric {
  background: linear-gradient(180deg, #ffffff 0%, #eaf1fc 52%, #c2d1e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stats .stat:first-child small { color: rgba(232, 237, 245, 0.5); }
.report-metric.negative { color: #b0553c; }
.cash-chart text { fill: var(--ink-4); }
.chart-line { stroke: var(--brand); stroke-width: 2.2; }
.chart-zero { stroke: #c3cee2; stroke-dasharray: 5 4; }
.cash-facts span { color: var(--ink-4); }
.cash-facts b { color: var(--ink); }
.cash-assumptions dt { color: var(--ink-4); }
.cash-assumptions dd { color: var(--ink-2); }
.cash-facts { border-bottom: 1px solid var(--line-soft); }
.report-checks {
  border: 1px solid #f0e3c6;
  background: #fdf9ef;
  border-radius: var(--r-sm);
}
.report-checks p { color: #8a6b24; }
.report-checks .check-warning { color: #8a5c12; }
.report-panel-note { color: var(--ink-5); }
.report-methods > summary { color: var(--ink-3); }
.report-methods > div { color: var(--ink-3); }
.report-methods h3 { color: var(--ink); }
.report-title-link { color: var(--ink); font-weight: 560; }
.report-card-link {
  background: var(--brand-soft);
  border: 1px solid #cfdcf5;
  color: var(--brand-deep);
}
.report-card-link small { color: var(--ink-4); }
.file-tile .file-analysis { color: var(--brand-deep); }
.cash-event { border: 1px solid var(--line); background: var(--card-2); border-radius: var(--r-sm); }

/* ---------------------------------------------------------------- 资讯 */
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.news-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
}
.news-card h2 button { color: var(--ink); font-weight: 560; letter-spacing: -0.015em; }
.news-card h2 button:hover { color: var(--brand-deep); }
.news-topic {
  background: var(--indigo-soft);
  color: var(--indigo);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  padding: 1px 6px;
}
.news-excerpt { color: var(--ink-4); }
.news-live-dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }
.news-detail h1 { font-size: 27px; line-height: 1.28; letter-spacing: -0.03em; }
.news-impact { border-left: 2px solid var(--brand); background: #f7f9fd; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.news-text { color: var(--ink-2); }
.news-intro, .news-filters { border-radius: var(--r-lg); }

/* ---------------------------------------------------------------- AI / 后台 */
.ai-stat-value {
  font-size: 34px;
  font-weight: 560;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 12px;
  line-height: 1.05;
}
.ai-settings, .copy-brief, .copy-output { border-radius: var(--r-lg); }
.copy-output, .copy-brief { min-height: 100%; }
.copy-grid { align-items: stretch; }
.ai-module-stats > div { background: #fafbfd; border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.ai-module-stats dd { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 520; }
.copy-content {
  background: #fafbfd;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 账户 */
.account-grid { align-items: start; }
.service-card {
  background:
    radial-gradient(380px 180px at 88% -18%, rgba(96, 165, 250, 0.20), transparent 66%),
    linear-gradient(150deg, #121821 0%, #0b1017 55%, #090c12 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 56px -34px rgba(0, 0, 0, 0.85);
  color: var(--night-text);
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(160deg, #000, transparent 68%);
  pointer-events: none;
}
.service-card:after {
  color: rgba(255, 255, 255, 0.035);
  font-size: 190px;
  top: -30px;
  right: 10px;
}
.service-card > * { position: relative; z-index: 1; }
.service-card .eyebrow { color: rgba(96, 165, 250, 0.85); }
.service-card .eyebrow::before { background: var(--brand-bright); }
.service-card h2 { color: #fff; font-weight: 580; letter-spacing: -0.035em; font-size: 30px; }
.service-card p { color: rgba(232, 237, 245, 0.55); font-size: 12px; }
.info-panel h3, .password-panel h3 { color: var(--ink); font-size: 13.5px; font-weight: 580; }
.info-line { border-bottom: 1px solid var(--line-soft); color: var(--ink-2); font-size: 12.5px; }
.info-line span:first-child { color: var(--ink-4); }
.support {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-4);
  font-size: 11.5px;
}
.support b { color: var(--ink-2); }
.account-grid .panel { box-shadow: var(--sh-1); }

/* ---------------------------------------------------------------- 登录 / 注册
   整页近黑，右侧一张白卡浮在上面（Vercel / Linear / Stripe 的登录做法）。 */
/* 背景统一由 shell 承载：两栏只是透明的「洞」，中间不存在可对齐的接缝。 */
.auth-shell {
  position: relative;
  min-height: 100vh;
  background-color: #070a0f;
  background-image:
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px),
    radial-gradient(860px 580px at 2% -10%, rgba(37, 99, 235, 0.30) 0%, transparent 58%),
    radial-gradient(780px 540px at 74% 116%, rgba(29, 78, 216, 0.26) 0%, transparent 62%),
    linear-gradient(118deg, #101825 0%, #0b1018 48%, #070a0f 100%);
  overflow: hidden;
}
.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(102deg, #000 0%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.18) 72%, transparent 90%);
}
.auth-shell::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  right: -240px;
  bottom: -320px;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.20), rgba(96, 165, 250, 0.03) 50%, transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  animation: floaty 16s ease-in-out infinite;
}

/* 两栏只做「透明的洞」：背景统一由 .auth-shell 承载，交界处不存在可对齐的接缝。 */
.auth-story {
  padding: 42px 8%;
  background: transparent;
  border: 0;
  color: var(--night-text);
  overflow: visible;
  position: relative;
  z-index: 1;
}
/* 必须显式关掉：原 demo 给 .auth-story 留了一套浅色网格底纹（#dce5d970 / 52px），
   在近黑背景上会变成一条条亮线，且被两栏各自裁剪，看上去就像一道接缝。 */
.auth-story::before,
.auth-story::after { content: none !important; }

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-16px, -20px, 0) scale(1.04); }
}
.auth-story > * { position: relative; z-index: 1; }
.auth-story .brand { color: #fff; font-size: 19px; font-weight: 620; letter-spacing: -0.025em; }
.auth-story .brand img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 16px rgba(96, 165, 250, 0.5));
}
.auth-story .brand em { color: rgba(232, 237, 245, 0.34); border-left-color: rgba(255, 255, 255, 0.14); }

.story-body { max-width: 480px; margin: 44px 0 24px; }
.story-body .eyebrow { color: rgba(96, 165, 250, 0.85); font-size: 9.5px; letter-spacing: 0.22em; }
.story-body .eyebrow::before { background: var(--brand-bright); box-shadow: 0 0 10px rgba(96, 165, 250, 0.9); }
.story-body h1 {
  color: #fff;
  font-size: 47px;
  line-height: 1.22;
  letter-spacing: -0.045em;
  font-weight: 560;
  margin: 20px 0 20px;
  text-wrap: balance;
}
.story-body h1 span {
  background: linear-gradient(96deg, #b7d3ff 0%, #6fa4ff 40%, #3b7bf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(53, 221, 151, 0.22));
}
.story-body > p { color: rgba(232, 237, 245, 0.52); max-width: 350px; line-height: 1.9; font-size: 13px; }

/* 柱状图：细长条 + 顶端亮度，像数据产品的「信号」 */
.story-art {
  height: 132px;
  gap: 10px;
  padding: 14px 26px 0 14px;
  margin: 40px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  align-items: flex-end;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 33.3%;
  background-position: 0 100%;
}
.story-art .bar { position: relative; overflow: hidden; }
.story-art .bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.42));
  opacity: 0.55;
}
.story-art .bar,
.story-art .bar:nth-child(2),
.story-art .bar:nth-child(3),
.story-art .bar:nth-child(4),
.story-art .bar:nth-child(5),
.story-art .bar:nth-child(6),
.story-art .bar:nth-child(7) {
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.85), rgba(37, 99, 235, 0.10));
  box-shadow: none;
  animation: grow 0.8s var(--ease) both;
}
.story-art .bar:nth-child(1) { opacity: 0.70; animation-delay: 0.02s; }
.story-art .bar:nth-child(2) { opacity: 0.75; animation-delay: 0.08s; }
.story-art .bar:nth-child(3) { opacity: 0.80; animation-delay: 0.14s; }
.story-art .bar:nth-child(4) { opacity: 0.86; animation-delay: 0.20s; }
.story-art .bar:nth-child(5) { opacity: 0.91; animation-delay: 0.26s; }
.story-art .bar:nth-child(6) { opacity: 0.96; animation-delay: 0.32s; }
.story-art .bar:nth-child(7) {
  background: linear-gradient(180deg, #a9cdff, #5490f6);
  opacity: 1;
  animation-delay: 0.38s;
  box-shadow: 0 0 22px rgba(127, 176, 255, 0.55);
}
@keyframes grow { from { transform: scaleY(0.15); opacity: 0; transform-origin: bottom; } }

.story-footer {
  color: rgba(232, 237, 245, 0.46);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* 右侧：深底 + 白卡 */
.auth-main {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  padding: 40px 32px;
}
.auth-form-wrap {
  width: 100%;
  max-width: 396px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 30px 28px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.auth-form-wrap h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 6px; }
.auth-form-wrap .eyebrow { color: var(--ink-5); font-size: 9.5px; }
.auth-form-wrap .eyebrow::before { background: var(--brand); box-shadow: none; }
.auth-intro { color: var(--ink-4); font-size: 12.5px; margin-bottom: 24px; }
.auth-main .field > span { color: var(--ink-2); }
.auth-main .field input { min-height: 42px; }
.auth-main .btn.primary.full { min-height: 42px; font-size: 13px; border-radius: 9px; margin-top: 6px; }
.auth-bottom { color: var(--ink-4); font-size: 12px; margin-top: 22px; }
.auth-bottom a { color: var(--brand-deep); font-weight: 540; }
.auth-strap { margin-bottom: 18px; }
.dev-notice { background: #fbf7ec; border-color: #eee1c4; color: #7a5c18; border-radius: var(--r-sm); font-size: 11.5px; }
.development-code { color: #7a5c18; font-size: 11.5px; }
.code-row .btn { border-radius: 8px; }

/* ============================================================================
   金属层：冷银 + 钴蓝。金属感靠三件事——斜向拉丝、单向高光、边缘暗线，
   不用图片、不用 SVG，全部是 CSS 渐变，所以换主题只改这一节即可。
   ========================================================================= */
:root {
  --steel-hi: #ffffff;
  --steel-1: #eef2f9;
  --steel-2: #d3dbe8;
  --steel-3: #9dabc0;
  --steel-4: #6d7b92;
  --blue-hi: #7fb0ff;
  --blue: #2563eb;
  --blue-deep: #1a45c0;
}

/* 顶栏：磨砂银 */
.topbar {
  background: rgba(232, 238, 248, 0.78);
  border-bottom: 1px solid rgba(11, 15, 23, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.35) 28%, rgba(127, 176, 255, 0.15) 64%, transparent);
  pointer-events: none;
}

/* 侧栏：近黑底 + 112° 细拉丝 + 顶部银蓝冷光 + 右侧银线 */
.sidebar {
  background:
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 5px),
    radial-gradient(480px 240px at 10% -10%, rgba(96, 165, 250, 0.20), transparent 70%),
    linear-gradient(180deg, #121a26 0%, #0b1017 44%, #070a0f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.045);
}
.sidebar::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000, transparent 38%);
}

/* 品牌区：银线 + 冷光 */
.sidebar .brand { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar .brand img { filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.55)); }

/* 导航选中：银白高光条 + 冷蓝描边 */
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.4);
}
.nav-item.active::before {
  background: linear-gradient(180deg, #ffffff, var(--blue-hi));
  box-shadow: 0 0 12px rgba(127, 176, 255, 0.85);
}
.nav-item.active .nav-symbol { color: var(--blue-hi); }

/* 卡片 / 面板：顶部一条银色高光（模拟金属边缘反光） */
.panel { position: relative; }
.panel::before,
.stat::before,
.report-start::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98) 32%, rgba(255, 255, 255, 0.98) 68%, transparent);
  pointer-events: none;
  z-index: 3;
}
.report-start::before {
  left: 0;
  top: 16px;
  bottom: 16px;
  right: auto;
  width: 2px;
  height: auto;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
}
.panel-heading h2::before {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue-deep));
}

/* KPI 首卡：暗金属 + 银色数字（金属反光的核心一招） */
.stats .stat:first-child {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 24%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    linear-gradient(152deg, #1e2733 0%, #0d131c 58%, #090d13 100%);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 16px 36px -22px rgba(0, 10, 30, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.stats .stat:first-child .stat-number {
  background: linear-gradient(180deg, #ffffff 0%, #eaf1fc 52%, #c2d1e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stats .stat:first-child .ai-stat-value {
  background: linear-gradient(180deg, #ffffff 0%, #eaf1fc 52%, #c2d1e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stats .stat:first-child .stat-number span {
  background: none;
  -webkit-text-fill-color: rgba(226, 234, 247, 0.45);
  color: rgba(226, 234, 247, 0.45);
}
.stats .stat:first-child::before { background: linear-gradient(90deg, rgba(127, 176, 255, 0.9), rgba(127, 176, 255, 0)); }

/* 普通 KPI 卡：顶部银线 + 极轻内高光 */
.stat { background: linear-gradient(180deg, #ffffff, #fdfeff); box-shadow: var(--sh-1), inset 0 1px 0 #fff; }

/* 主按钮：金属按键（上高光 + 下暗边 + 冷阴影） */
.btn.primary {
  background: linear-gradient(180deg, #5b96f8 0%, #2f6cef 42%, #1f52d4 76%, #1a45c0 100%);
  border-color: #1740b0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(8, 26, 76, 0.35),
    0 1px 2px rgba(10, 30, 90, 0.28),
    0 8px 18px -12px rgba(31, 82, 212, 0.95);
  text-shadow: 0 1px 1px rgba(8, 26, 72, 0.32);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #6ba1fa 0%, #3674f4 42%, #2258dc 76%, #1c49c6 100%);
  border-color: #1740b0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(8, 26, 76, 0.3),
    0 2px 4px rgba(10, 30, 90, 0.26),
    0 12px 24px -14px rgba(31, 82, 212, 1);
}
/* 次按钮：拉丝银 */
.btn {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 55%, #eff3f9 100%);
  border-color: var(--steel-2);
  box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(11, 15, 23, 0.035);
}
.btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #fafcfe 55%, #f2f6fb 100%);
  border-color: var(--steel-3);
}

/* 输入框：内嵌银边 */
.field input, .field select, .field textarea, .search, .inline-input {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-color: var(--steel-2);
}

/* 徽章：金属描边 */
.badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }

/* 表格表头：拉丝银 */
thead th {
  background-image: linear-gradient(180deg, #fdfeff, #f4f7fb);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 var(--line);
}
tbody tr:hover { background: #f7f9fd; }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--blue); }

/* 账户服务卡：深蓝金属 + 拉丝 */
.service-card {
  background:
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 5px),
    radial-gradient(380px 180px at 88% -18%, rgba(96, 165, 250, 0.28), transparent 66%),
    linear-gradient(150deg, #1a2433 0%, #0e141d 56%, #0a0e15 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 26px 60px -36px rgba(0, 8, 26, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* 登录页：柱子换蓝金属；白卡加银边 */
.story-art .bar,
.story-art .bar:nth-child(2),
.story-art .bar:nth-child(3),
.story-art .bar:nth-child(4),
.story-art .bar:nth-child(5),
.story-art .bar:nth-child(6),
.story-art .bar:nth-child(7) {
  background: linear-gradient(180deg, rgba(127, 176, 255, 0.95), rgba(37, 99, 235, 0.20));
  box-shadow: none;
}
.story-art .bar:nth-child(7) {
  background: linear-gradient(180deg, #eaf2ff, #7fb0ff);
  box-shadow: 0 0 24px rgba(127, 176, 255, 0.6), inset 0 1px 0 #fff;
}
.story-body h1 span {
  /* 首尾同色 + 位移恰好一个图片宽 = 无缝循环，动画停在哪一帧都看不出接缝 */
  background: linear-gradient(96deg, #b7d3ff 0%, #6fa4ff 25%, #3b7bf8 50%, #6fa4ff 75%, #b7d3ff 100%);
  background-size: 220% 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(111, 164, 255, 0.28));
  animation: textFlow 7s linear infinite;
}
@keyframes textFlow {
  /* -183.33% × (容器−图片) = 恰好一个图片宽，跑完视觉上与起点完全一致 */
  from { background-position: 0% 0; }
  to { background-position: -183.33% 0; }
}
/* .auth-story 的背景已在「登录 / 注册」一节统一到 .auth-shell，此处不再重复上色——
   左右两栏各有一套渐变，色值和角度不一致时，中线必然出现一条色阶断层。 */

.auth-form-wrap {
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.92),
    0 2px 6px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 #fff;
}

/* 滚动条：银 */
*::-webkit-scrollbar-thumb { background: rgba(157, 171, 192, 0.55); background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(109, 123, 146, 0.7); background-clip: content-box; }

/* 选中文本 / 焦点环 */
::selection { background: #c9dcff; color: #0b1e44; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }

/* ---------------------------------------------------------------- 响应 */
@media (max-width: 1100px) {
  .main-content { padding: 28px 24px 40px; }
  .topbar { padding: 0 24px; }
  .sidebar { padding: 22px 12px 16px; }
  .stat-number { font-size: 33px; }
  .ai-stat-value { font-size: 30px; }
  .story-body h1 { font-size: 38px; }
  .auth-story { padding: 38px 6%; }
}

@media (max-width: 760px) {
  .sidebar {
    position: relative;
    height: auto;
    overflow: visible;
    gap: 12px;
    padding: 14px 16px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, var(--night-1), var(--night));
  }
  .sidebar::after { mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 82%); }
  .sidebar .brand { font-size: 18px; padding: 0 4px 12px; }
  .sidebar .brand img { width: 18px; height: 18px; }
  .nav { gap: 3px; }
  .nav-item { padding: 7px 9px; font-size: 11.5px; border-radius: 7px; }
  .nav-item.active::before { display: none; }
  .nav-symbol { width: 15px; font-size: 13px; }
  .conversation-nav { min-height: 0; margin-top: 0; gap: 8px; }
  .conversation-nav .side-label { display: none; }
  .conversation-nav .new-chat {
    position: static;
    width: 100%;
    padding: 8px 12px;
    font-size: 11.5px;
    justify-content: center;
  }
  .conversation-list {
    display: flex;
    gap: 6px;
    max-height: 38px;
    overflow-x: auto;
    margin-top: 2px;
    padding-bottom: 0;
    scrollbar-width: none;
  }
  .conversation-list::-webkit-scrollbar { display: none; }
  .conversation-item {
    width: auto;
    max-width: 146px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 9px;
    font-size: 10px;
  }
  .conversation-item small, .conversation-empty { display: none; }
  .side-bottom { position: absolute; right: 12px; top: 12px; padding: 0; border: 0; margin: 0; }
  .side-profile { display: none; }
  .side-bottom .nav-item { font-size: 11px; padding: 6px 8px; }
  .side-version { display: none; }

  .topbar { height: 50px; padding: 0 16px; }
  .main-content { padding: 20px 16px 32px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .stat { padding: 15px 15px 13px; border-radius: 10px; }
  .stat-number { font-size: 27px; margin-top: 9px; }
  .panel { border-radius: 12px; }
  .empty { padding: 44px 18px; }

  .chat-layout { height: calc(100dvh - 200px); min-height: 480px; }
  .chat-feed { padding: 16px 14px; }
  .chat-welcome { min-height: 260px; }
  .chat-welcome h2 { font-size: 19px; }

  .auth-shell { display: block; }
  .auth-shell::before { mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 60%, transparent 92%); }
  .auth-shell::after { display: none; }
  .auth-story { padding: 20px 20px; background: transparent; }
  .auth-story:after { display: none; }
  .auth-main { padding: 22px 16px 40px; min-height: auto; align-items: flex-start; background: transparent; }
  .auth-form-wrap { max-width: 100%; padding: 26px 20px 22px; border-radius: 16px; }
  .auth-form-wrap h2 { font-size: 22px; }
  .service-card { border-radius: 14px; }
  .service-card h2 { font-size: 25px; }
  .account-grid { gap: 16px; }
  dialog { padding: 22px 18px; border-radius: 16px; }
}

/* ---------------------------------------------------------------- 动效 */
@media (prefers-reduced-motion: no-preference) {
  .stat, .panel, .news-card, .report-card-link, .file-tile, .btn, .nav-item,
  .starter-prompts button, .conversation-item { transition-duration: 0.16s; }

  .stats .stat { animation: rise 0.38s var(--ease) both; }
  .stats .stat:nth-child(1) { animation-delay: 0s; }
  .stats .stat:nth-child(2) { animation-delay: 0.04s; }
  .stats .stat:nth-child(3) { animation-delay: 0.08s; }
  .stats .stat:nth-child(4) { animation-delay: 0.12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }

  .panel { animation: fadeIn 0.3s var(--ease) both; }
  @keyframes fadeIn { from { opacity: 0; } }

  .auth-form-wrap { animation: cardIn 0.4s var(--ease) both; }
  @keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } }
}

@media (prefers-reduced-motion: reduce) {
  .auth-story:after, .story-art .bar, .dot, .stats .stat, .panel, .auth-form-wrap { animation: none !important; }
}

/* ============================================================================
   动效层（第三层）：不新增 DOM、不改 JS，全部 CSS/SMIL。
   原则——动的是「光」和「位置」，不动元素的明暗；用 brightness 会把蓝色冲成灰白。
   ========================================================================= */

@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---------------- 品牌：光晕呼吸 + hover 放大（字形动效在 favicon.svg 里） */
@keyframes brandPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.35)); }
  50% { filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.9)); }
}
.brand img { transition: transform 0.28s var(--ease); }
.brand:hover img { transform: scale(1.09); }
.sidebar .brand img,
.auth-story .brand img { animation: brandPulse 3.4s ease-in-out infinite; }

/* ---------------- 登录页背景：只让网格缓慢流动，不加扫光 */
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 44px, 44px 0; }
}
.auth-shell::before { animation: gridDrift 26s linear infinite; }

/* ---------------- 左栏分段入场 */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.story-body .eyebrow { animation: heroIn 0.55s var(--ease) both 0.02s; }
.story-body h1 { animation: heroIn 0.68s var(--ease) both 0.1s; }
.story-body h1 span { animation: textFlow 2.6s ease-out both; }

.story-body > p { animation: heroIn 0.68s var(--ease) both 0.22s; }
.story-art { animation: heroIn 0.85s var(--ease) both 0.3s; }
.story-footer { animation: heroIn 0.6s var(--ease) both 0.46s; }

/* 柱状图：只在入场时长起来一次，之后完全静止（不做任何循环动画） */

/* ---------------- 登录卡：绕着边框转的一道冷光 */
.auth-form-wrap { position: relative; }
.auth-form-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  padding: 2px;
  border-radius: 20px;
  background: conic-gradient(
    from var(--ang),
    rgba(0, 0, 0, 0.62) 0deg 226deg,
    rgba(127, 176, 255, 0.95) 266deg,
    #ffffff 292deg,
    rgba(127, 176, 255, 0.95) 318deg,
    rgba(0, 0, 0, 0.62) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: ringSpin 7s linear infinite;
  pointer-events: none;
}
@keyframes ringSpin { to { --ang: 360deg; } }

/* ---------------- WELCOME BACK 前的小圆点：待机闪烁 */
@keyframes dotBlink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0); }
}
.auth-form-wrap .eyebrow::before { animation: dotBlink 2.6s ease-in-out infinite; }

/* ---------------- 主按钮：一道高光扫过（登录页常驻，其余 hover 触发） */
@keyframes sheenSweep {
  from { transform: translateX(-140%) skewX(-18deg); }
  to { transform: translateX(340%) skewX(-18deg); }
}
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-140%) skewX(-18deg);
  pointer-events: none;
}
.auth-main .btn.primary::after { animation: sheenSweep 5.2s ease-in-out infinite 1.2s; }
.btn.primary:hover::after { animation: sheenSweep 0.85s ease-out; }

/* ---------------- 内页：顶栏底部冷光缓慢呼吸 */
@keyframes topGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.topbar::after { animation: topGlow 6s ease-in-out infinite; }

/* ---------------- 空态图标轻浮动 */
@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.empty-mark { animation: markFloat 4.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .sidebar .brand img,
  .auth-story .brand img,
  .auth-shell,
  .auth-shell::before,
  .auth-shell::after,
  .story-body .eyebrow,
  .story-body h1,
  .story-body h1 span,
  .story-body > p,
  .story-art,
  .story-art .bar,
  .story-art .bar:nth-child(7),
  .auth-form-wrap,
  .auth-form-wrap::before,
  .auth-form-wrap .eyebrow::before,
  .auth-main .btn.primary::after,
  .btn.primary:hover::after,
  .topbar::after,
  .empty-mark { animation: none !important; }
  .brand:hover img { transform: none; }
}

/* ============================================================================
   品牌字：DoSight 拆成两段着色——「Do」深蓝、「Sight」白。
   DOM 里品牌名是一整段纯文本，没有 span 可挂钩，所以用伪元素重写：
   原文本 font-size:0 隐掉，间距交给伪元素，两个伪元素紧挨着就是完整单词。
   ⚠️ 品牌名若改动，这里的 content 要同步。
   ========================================================================= */
.brand {
  --brand-size: 19px;
  /* 必须 !important：.sidebar .brand / .auth-story .brand 都带 font-size，特定性更高 */
  font-size: 0 !important;
  gap: 0 !important;
}
.brand img { margin-right: 9px; }
/* 只能用一个伪元素：::before 永远排在 <img> 之前，"Do" 会跑到图标左边去。
   所以整词一次写出，用 background-clip:text 按宽度比例切色。
   「Do」占整词约 35.8%（实测 canvas measureText：131/367），取 36% 让分界落在字母间隙。 */
.brand::after {
  /* 斜杠后的空串是给读屏用的替代文本：视觉有字、无障碍名字为空，
     否则会和原文本（font-size:0 但仍可朗读）重复念一遍 */
  content: "DoSight";
  content: "DoSight" / "";   /* 不支持替代文本语法时，上一行兜底 */
  font-size: var(--brand-size);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.25;
  background: linear-gradient(90deg, #2563eb 0 36%, #ffffff 36%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* 深底上「Do」的深蓝需要一点辉光才立得住 */
.auth-story .brand::after { filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.45)); }

@media (max-width: 760px) {
  .brand { --brand-size: 18px; }
  .brand img { margin-right: 7px; }
}

@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}
