/* Seeder 前端 demo 样式 */
:root {
  --bg: #ffffff;
  --side: #f7f7f5;
  --surface: #ffffff;
  --text: #232423;
  --muted: #676a66;
  --faint: #979a95;
  --border: #e8e8e5;
  --border-strong: #d5d5d1;
  --fill: #f3f3f1;          /* 浅灰底：气泡、标签、序号、头像 */
  --fill-strong: #e9e9e6;   /* 选中、按下 */
  --icon: #8b8e89;          /* 完成状态等中性图标 */
  --accent: #44735d;        /* 低饱和灰绿，只用在品牌、发送、主按钮、进行中 */
  --accent-hover: #385f4d;
  --accent-weak: #edf2ef;
  --accent-text: #ffffff;
  --money: #84683a;
  --money-weak: #f5f0e6;
  --hover: rgba(35, 36, 35, 0.045);
  --active: #ececea;
  --shadow: 0 1px 2px rgba(30, 30, 20, 0.04), 0 10px 30px rgba(30, 30, 20, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* 默认固定白色主题；需要深色时在网址后加 ?theme=dark */
:root[data-theme="dark"] {
  --bg: #141615; --side: #1a1d1b; --surface: #202422; --text: #e9e8e3; --muted: #a6a9a2; --faint: #7f837c;
  --border: #2d322f; --border-strong: #3c423e; --fill: #262a28; --fill-strong: #2e3330; --icon: #8a8e88;
  --accent: #7fa892; --accent-hover: #93b9a5; --accent-weak: #22302a;
  --accent-text: #0f1612; --money: #cfb07a; --money-weak: #322b1f; --hover: rgba(255, 255, 255, 0.05);
  --active: #2a2e2c; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }   /* 整页不滚动，只让侧栏、对话、面板各自滚 */
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); height: 100vh; height: 100dvh; }

/* ---------- 侧栏 ---------- */
.side { background: var(--side); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 12px 10px; min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand .logo { width: 26px; height: 26px; color: var(--accent); }
.new-btn { margin: 14px 2px 4px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s; }
.new-btn:hover { border-color: var(--border-strong); background: var(--fill); }
.new-btn svg { width: 16px; height: 16px; }
.side-label { padding: 18px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--faint); }
.proj-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.proj-list a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.proj-list a:hover { background: var(--hover); }
.proj-list a.on { background: var(--active); }
.proj-list a.on .proj-title { color: var(--text); font-weight: 600; }
.proj-title { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.side-empty { padding: 8px 10px; font-size: 13px; color: var(--faint); line-height: 1.6; }
.side-user { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 8px; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; cursor: pointer; }
.side-user:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-strong); color: var(--muted); font-weight: 700; flex: none; }
.user-text { min-width: 0; }
.user-text b { display: block; font-size: 14px; font-weight: 600; }
.user-text small { display: block; font-size: 12px; color: var(--faint); }
.user-menu { position: absolute; left: 4px; right: 4px; bottom: calc(100% + 6px); padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; }
.user-menu a, .user-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; color: var(--text); text-decoration: none; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: var(--hover); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.only-mobile, .mobile-bar, .scrim { display: none; }

/* ---------- 主区域 ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.home { flex: 1; overflow-y: auto; display: flex; }
.home-inner { width: min(740px, 100%); margin: auto; padding: 40px 24px 14vh; display: flex; flex-direction: column; align-items: center; }
.hero { margin: 0 0 10px; font-size: clamp(26px, 3.4vw, 36px); font-weight: 650; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.hero-brand { color: var(--accent); }
.hero-sub { margin: 0 0 30px; font-size: 15px; color: var(--muted); text-align: center; }
.home .composer { width: 100%; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip-btn { padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.chip-btn:hover:not(:disabled) { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.chip-btn:disabled { opacity: .5; cursor: default; }

/* ---------- 输入框 ---------- */
.composer { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 12px 10px 18px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: #c4c4bf; box-shadow: 0 0 0 3px rgba(35, 36, 35, 0.04), var(--shadow); }
.composer textarea { display: block; width: 100%; max-height: 240px; padding: 2px 6px 2px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; }
.composer textarea::placeholder { color: var(--faint); }
.composer.big textarea { min-height: 86px; font-size: 17px; }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tool { height: 32px; display: inline-flex; align-items: center; gap: 4px; padding: 0 11px 0 9px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.tool:hover { color: var(--text); border-color: var(--border-strong); background: var(--hover); }
.tool svg { width: 16px; height: 16px; }
.hint { flex: 1; font-size: 12px; color: var(--faint); }
.send { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-text); cursor: pointer; transition: background .15s, opacity .15s; }
.send:hover:not(:disabled) { background: var(--accent-hover); }
.send:disabled { background: var(--border); color: var(--faint); cursor: default; }   /* 没内容时是灰的，有内容才变绿 */
.send svg { width: 19px; height: 19px; }

/* ---------- 对话 ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--border); }
.chat-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tag { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--muted); font-size: 12px; }
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 28px 8px; }
.thread-inner { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.msg.user { display: flex; justify-content: flex-end; }
.bubble { max-width: min(80%, 560px); padding: 10px 15px; border-radius: 18px 18px 4px 18px; background: var(--fill); font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.agent { display: flex; }            /* 回复不带头像，直接占满宽度 */
.agent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.step-icon { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; }
.step-icon svg { width: 11px; height: 11px; }
.step.wait .step-icon { border: 1.5px solid var(--border-strong); }
.step.run .step-icon { border: 2px solid var(--fill-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.step.done .step-icon { background: var(--icon); color: #fff; }
.step-title { font-size: 14px; font-weight: 600; line-height: 20px; }
.step.wait .step-title { color: var(--faint); font-weight: 500; }
.step-detail { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.65; }
.kv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kv span { padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 12.5px; }
.kv span.guess { border-style: dashed; color: var(--muted); }
.kv b { margin-right: 5px; font-weight: 500; color: var(--faint); }
.confirm { margin-top: 6px; font-size: 12.5px; color: var(--money); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step.run .step-icon { animation-duration: 2.4s; } }

.result h3 { margin: 2px 0 10px; font-size: 15px; font-weight: 650; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card-top { display: flex; align-items: center; gap: 10px; }
.rank { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--fill); color: var(--muted); font-size: 13px; font-weight: 700; }
.card-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fit { flex: none; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.badges, .why, .creators, .card-actions { margin-left: 34px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { padding: 2px 8px; border-radius: 6px; background: var(--hover); color: var(--muted); font-size: 12px; }
.badge.money { background: var(--money-weak); color: var(--money); font-weight: 600; }
.why { margin-top: 8px; margin-bottom: 0; font-size: 13.5px; line-height: 1.65; }
.creators { list-style: none; margin-top: 8px; margin-bottom: 0; padding: 8px 0 0; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 4px; }
.creators li { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.creators b { flex: 1; min-width: 0; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-actions.flush { margin-left: 0; }
.btn { height: 32px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 8px; background: transparent; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled) { background: var(--hover); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: default; }
.draft pre { margin: 10px 0 12px; font: inherit; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.summary { margin: 0; font-size: 15px; line-height: 1.75; white-space: pre-line; }
.followups { display: flex; flex-wrap: wrap; gap: 8px; }

.dock { padding: 10px 28px 14px; background: linear-gradient(to top, var(--bg) 75%, transparent); }
.dock .composer { max-width: 780px; margin: 0 auto; padding-top: 12px; }
.dock-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--faint); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow); z-index: 50; }

/* ---------- 对话 + 右侧客户投放诉求 ---------- */
.chat-body { flex: 1; min-height: 0; display: flex; position: relative; }
.chat-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.head-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 13px; cursor: pointer; }
.head-btn svg { width: 16px; height: 16px; }
.head-btn:hover { background: var(--fill); }
.head-btn.on { background: var(--fill-strong); border-color: var(--border-strong); }
.panel { flex: none; width: 380px; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--border); }
.panel-head { display: flex; align-items: flex-start; gap: 8px; padding: 16px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.panel-head > div { flex: 1; min-width: 0; }
.panel-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.panel-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.panel-body { flex: 1; overflow-y: auto; padding: 6px 20px 24px; }
.brief-sec { padding: 14px 0 6px; border-bottom: 1px dashed var(--border); }
.brief-sec:last-child { border-bottom: 0; }
.brief-sec h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--faint); }
.brief-sec dl { margin: 0; }
.brief-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; font-size: 13.5px; line-height: 1.6; }
.brief-row dt { color: var(--muted); }
.brief-row dd { margin: 0; overflow-wrap: anywhere; }
.brief-row.changed { background: var(--fill); }
.brief-row.changed dt::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.tag { display: inline-block; margin: 0 4px 4px 0; padding: 1px 7px; border: 1px solid transparent; border-radius: 6px; background: var(--fill); font-size: 12.5px; line-height: 1.6; }
.muted { color: var(--faint); }
.confirm-sec ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--money); }
.sources summary, .ocr-result summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.sources summary:hover, .ocr-result summary:hover { color: var(--text); }
.source { margin-top: 10px; }
.source b, .ocr-item b { font-size: 12.5px; font-weight: 600; }
.source pre, .ocr-item pre { margin: 4px 0 0; padding: 8px 10px; max-height: 220px; overflow: auto; border-radius: 8px; background: var(--hover); font: inherit; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ocr-result { margin-top: 6px; }
.ocr-item { margin-top: 8px; }
.ocr-item p { margin: 4px 0 0; font-size: 12.5px; }
.link-btn { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.step-main { min-width: 0; }
.step-warn { margin-top: 3px; font-size: 13px; line-height: 1.6; color: var(--money); }
.step.warn .step-icon { background: var(--money); color: var(--surface); }
.step.skip .step-icon { border: 1.5px dashed var(--border-strong); }
.step.skip .step-title { color: var(--faint); font-weight: 500; text-decoration: line-through; }

/* ---------- 图片附件 ---------- */
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.attach { position: relative; width: 64px; height: 64px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--hover); }
.attach img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-file { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; color: var(--muted); }
.attach-file small { max-width: 100%; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
.attach-x svg { width: 12px; height: 12px; }
.user-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: min(80%, 560px); }
.user-stack .bubble { max-width: 100%; }
.bubble-images { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bubble-images img { max-width: 180px; max-height: 140px; border-radius: 12px; border: 1px solid var(--border); display: block; }
.img-file { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 12.5px; color: var(--muted); }
.drop-layer { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(35, 36, 35, .22); backdrop-filter: blur(2px); pointer-events: none; }
.drop-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 40px; border: 2px dashed var(--icon); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.drop-box svg { width: 34px; height: 34px; color: var(--muted); }
.drop-box b { font-size: 16px; }
.drop-box span { font-size: 13px; color: var(--muted); }

/* 中等宽度：右侧面板浮在对话上面 */
@media (max-width: 1240px) {
  .panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 20; box-shadow: var(--shadow); }
}

/* ---------- 窄屏：侧栏变抽屉 ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 300px); z-index: 40; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .side-open .side { transform: none; }
  .side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 35; }
  .only-mobile { display: grid; }
  .mobile-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
  .mobile-title { flex: 1; min-width: 0; text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-head { display: none; }
  .home-inner { padding: 28px 16px 10vh; }
  .hero-sub { margin-bottom: 22px; }
  .thread { padding: 18px 16px 6px; }
  .dock { padding: 8px 16px 12px; }
  .hint { visibility: hidden; }
  .badges, .why, .creators, .card-actions { margin-left: 0; }
  .bubble { max-width: 88%; }
  .user-stack { max-width: 88%; }
  .panel { position: fixed; inset: 0; width: auto; z-index: 42; border-left: 0; }
  .bubble-images img { max-width: 140px; }
}

/* ---------- 真实检索结果 ---------- */
.fit.weak { color: var(--faint); }
.creators a { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.creators a:hover { border-bottom-color: var(--text); }
.creators .c-tag { max-width: 34%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); }
.more-btn { align-self: flex-start; margin-top: 10px; padding: 7px 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.more-btn:hover { color: var(--text); border-color: var(--icon); background: var(--fill); }
.result { display: flex; flex-direction: column; }
.funnel { list-style: none; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--hover); display: flex; flex-direction: column; gap: 3px; }
.funnel li { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.funnel b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 项目子页：MCN 触达列表 / 达人上报清单 ---------- */
.proj { display: flex; flex-direction: column; }
.proj-list a.cur:not(.on) { background: transparent; }
.proj-list a.cur .proj-title { font-weight: 600; }
.sub-tabs { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 12px; padding-left: 8px; border-left: 1px solid var(--border-strong); }
.sub-tabs a { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 7px; font-size: 13px; color: var(--muted); text-decoration: none; }
.sub-tabs a:hover { background: var(--hover); color: var(--text); }
.sub-tabs a.on { background: var(--active); color: var(--text); font-weight: 600; }
.cnt { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--fill-strong); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.seg { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--fill); }
.seg a { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 7px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.chat-head .seg { display: none; }            /* 电脑上用左侧栏切换子页，顶栏只放标题和右侧操作 */
.head-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; }

.page { flex: 1; min-width: 0; overflow-y: auto; }
.page-inner { max-width: 860px; margin: 0 auto; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; align-items: flex-start; gap: 12px; }
.page-head > div { flex: 1; min-width: 0; }
.page-head h3 { margin: 0; font-size: 18px; font-weight: 650; }
.page-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-row span { padding: 4px 10px; border-radius: 8px; background: var(--fill); font-size: 12.5px; color: var(--muted); }
.stat-row b { margin-left: 4px; color: var(--text); }
.empty { padding: 28px; border: 1px dashed var(--border-strong); border-radius: 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty p { margin: 0 0 12px; }
.small { font-size: 12px; }

.o-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.o-card.dim { opacity: .6; }
.o-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.o-chev { width: 16px; color: var(--faint); font-size: 18px; line-height: 1; transition: transform .15s; }
.o-chev.open { transform: rotate(90deg); }
.o-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.o-title b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-pills { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pill { padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: transparent; font-size: 12px; color: var(--muted); cursor: pointer; }
.pill:hover { background: var(--fill); }
.pill.on { border-color: transparent; background: var(--fill-strong); color: var(--text); font-weight: 600; }
.pill.on.st-已谈妥 { background: var(--accent); color: var(--accent-text); }
.pill.on.st-放弃 { background: var(--fill); color: var(--faint); }
.o-body { padding: 4px 16px 14px 40px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); }
.o-body section { padding-top: 10px; }
.o-body h5 { margin: 0 0 8px; font-size: 13px; font-weight: 650; display: flex; align-items: baseline; gap: 8px; }
.o-msg { margin: 0; padding: 10px 12px; max-height: 220px; overflow: auto; border-radius: 10px; background: var(--fill); font: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.paste { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.6; resize: vertical; }
.paste:focus { outline: 0; border-color: #c4c4bf; box-shadow: 0 0 0 3px rgba(35, 36, 35, 0.04); }
.o-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }
.btn.ghost { border-color: transparent; color: var(--muted); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }

.c-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.c-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.c-row:first-child { border-top: 0; }
.c-row.off { opacity: .55; }
.c-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.in-report { width: 16px; flex: none; color: var(--accent); font-weight: 700; text-align: center; }
.c-main { flex: 1; min-width: 0; }
.c-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13.5px; font-weight: 600; }
.c-name a { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.c-name a:hover { border-bottom-color: var(--text); }
.c-plat { font-size: 11.5px; font-weight: 500; color: var(--faint); }
.src { padding: 0 6px; border-radius: 5px; background: var(--fill); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.src.wild { background: var(--accent-weak); color: var(--accent); }
.c-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.c-flags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 40%; }
.flag { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--money-weak); color: var(--money); font-size: 11.5px; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 14px; height: 14px; }

.enough { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--fill); }
.enough.is-enough { border-color: #cfdcd4; background: var(--accent-weak); }
.enough-nums { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.enough-nums div { display: flex; flex-direction: column; }
.enough-nums span { font-size: 12px; color: var(--muted); }
.enough-nums b { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.enough-nums small { font-size: 11.5px; color: var(--faint); }
.enough.is-short .enough-nums div:last-child b { color: var(--money); }
.enough-note { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.per-product { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.per-product span { padding: 2px 8px; border-radius: 6px; background: var(--surface); font-size: 12px; color: var(--muted); }
.per-product span.short { color: var(--money); }
.self-find { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.self-find.urge { border-color: #d8ccb4; }
.self-find h4 { margin: 0; font-size: 15px; font-weight: 650; }
.self-find > p { margin: 0; font-size: 13px; line-height: 1.6; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-link { padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 9px; font-size: 13px; color: var(--text); text-decoration: none; }
.tool-link:hover { background: var(--fill); }
.kit-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13px; }
.kit-label { color: var(--muted); padding-top: 2px; }
.kit-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.tag-btn { cursor: pointer; }
.tag-btn:hover { background: var(--fill-strong); }

@media (max-width: 1100px) {
  .chat-head h2 { max-width: 40%; }
}
@media (max-width: 860px) {
  .page-inner { padding: 16px 16px 40px; }
  .o-body { padding-left: 16px; }
  .o-top { flex-wrap: wrap; }
  .status-pills { width: 100%; justify-content: flex-start; padding-left: 26px; }
  .c-row { flex-wrap: wrap; }
  .c-flags { max-width: none; justify-content: flex-start; width: 100%; padding-left: 26px; }
  .kit-row { grid-template-columns: 1fr; gap: 4px; }
  .chat-head { display: flex; padding: 8px 12px; }      /* 手机上顶栏只留三个子页的切换 */
  .chat-head h2, .chat-head .demo-tag, .chat-head .head-btn { display: none; }
  .chat-head .seg { display: flex; flex: 1; min-width: 0; }      /* 手机上没有侧栏，顶栏保留子页切换 */
  .head-actions { margin-left: 0; }
  .seg a { flex: 1; justify-content: center; padding: 6px 4px; font-size: 12.5px; }
}

/* ---------- 账号菜单、成员管理、项目菜单、共享 ---------- */
.side-user .cnt.warn { position: absolute; top: 8px; left: 30px; }
.cnt.warn { background: var(--money); color: #fff; }
.menu-who { padding: 6px 10px 8px; font-size: 12px; color: var(--faint); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu a { display: flex; align-items: center; justify-content: space-between; }
.user-menu .danger { color: #b54a2a; }
.proj-menu-wrap { position: relative; flex: none; }
.proj-menu-wrap .icon-btn { font-size: 18px; letter-spacing: 1px; }
.proj-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); min-width: 170px; }
.members-page .m-block { display: flex; flex-direction: column; gap: 8px; }
.members-page h4 { margin: 6px 0 0; font-size: 14px; font-weight: 650; }
.m-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-form .paste { width: auto; flex: 1 1 180px; min-width: 0; padding: 8px 10px; }
.m-form select.paste { flex: 0 0 auto; }
.m-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.m-check input { accent-color: var(--accent); }
.warn-line { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--money-weak); color: var(--money); font-size: 13px; }
.loading-page { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.modal-layer { position: fixed; inset: 0; z-index: 46; display: grid; place-items: center; padding: 16px; background: rgba(35, 36, 35, .25); }
.modal { width: min(460px, 100%); max-height: 80vh; overflow-y: auto; padding: 18px 20px 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.modal header { display: flex; align-items: center; gap: 8px; }
.modal h3 { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal p { margin: 0; line-height: 1.6; }
