﻿/* 消息 v2（dm2）· 只作用于 #dm2-root，不动老样式 */
.dm2-root { height: calc(100vh - 150px); min-height: 430px; }
.dm2.folded { grid-template-columns: 282px 1fr 46px; }
.dm2 { display: grid; grid-template-columns: 282px 1fr 300px; gap: 14px; height: 100%; min-height: 0; }

/* ---------- 左侧 ---------- */
.dm2-side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.dm2-side-head { padding: 11px 12px 9px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.dm2-side-head .r1 { display: flex; align-items: center; justify-content: space-between; }
.dm2-side-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.dm2-ibtn {
  font: inherit; font-size: 12px; color: var(--gold-text); background: var(--gold-bg);
  border: 1px solid var(--gold-line); border-radius: 8px; padding: 3px 9px; cursor: pointer;
}
.dm2-ibtn:hover { background: #3c341f; }
.dm2-ibtn.plain { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.dm2-search { display: flex; align-items: center; gap: 6px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.dm2-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 12.5px; outline: none; }
.dm2-search input::placeholder { color: var(--text-mute); }
.dm2-search .k { font-size: 10px; color: var(--text-mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.dm2-chips { display: flex; gap: 5px; }
.dm2-chip { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; background: var(--surface-2); cursor: pointer; }
.dm2-chip.on { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); }
.dm2-threads { flex: 1; overflow-y: auto; }
.dm2-thr { display: flex; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: center; position: relative; }
.dm2-thr:hover { background: var(--surface-2); }
.dm2-thr.on { background: var(--gold-bg); }
.dm2-thr.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--gold); }
.dm2-av { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--gold); color: #1b1508; }
.dm2-av.b { background: #3b4a5a; color: #dbe6f0; }
.dm2-av.g { background: #2f4a3c; color: #bfe6d2; }
.dm2-ti { flex: 1; min-width: 0; }
.dm2-tl { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.dm2-tn { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm2-tn em { font-style: normal; font-size: 10.5px; color: var(--text-mute); margin-left: 4px; }
.dm2-tt { font-size: 10.5px; color: var(--text-mute); flex: none; }
.dm2-tp { font-size: 11.5px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm2-tc { font-size: 10.5px; background: var(--danger); color: #1b0f0e; border-radius: 20px; padding: 0 5px; min-width: 16px; text-align: center; font-weight: 700; flex: none; }
.dm2-side-foot { border-top: 1px solid var(--line-2); padding: 7px 9px; display: flex; gap: 6px; }
.dm2-side-foot > * { flex: 1; font-size: 11.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.dm2-side-foot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.dm2-side-foot > *:hover { color: var(--gold-text); border-color: var(--gold-line); }

/* ---------- 右侧 ---------- */
.dm2-main { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.dm2-head { padding: 9px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; flex: none; }
.dm2-head .kv b { font-size: 13.5px; display: block; line-height: 1.35; }
.dm2-head .kv span { font-size: 11px; color: var(--text-mute); }
.dm2-head .acts { margin-left: auto; display: flex; gap: 4px; }
.dm2-square { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); border: 1px solid transparent; background: none; cursor: pointer; }
.dm2-square:hover { background: var(--surface-2); color: var(--text); }
.dm2-square svg, .dm2-tool svg, .dm2-ibtn svg, .dm2-ctx svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.dm2-msgs { flex: 1; overflow-y: auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dm2-empty { margin: auto; color: var(--text-mute); font-size: 13px; text-align: center; line-height: 1.9; }
.dm2-daysep { text-align: center; font-size: 11px; color: var(--text-mute); position: relative; margin: 2px 0; }
.dm2-daysep::before, .dm2-daysep::after { content: ""; position: absolute; top: 50%; width: 30%; height: 1px; background: var(--line-2); }
.dm2-daysep::before { left: 0; } .dm2-daysep::after { right: 0; }
.dm2-older { align-self: center; font-size: 11px; color: var(--text-3); border: 1px dashed var(--line); border-radius: 20px; padding: 3px 12px; background: rgba(0, 0, 0, .15); cursor: pointer; }
.dm2-unread { display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--gold); }
.dm2-unread::before, .dm2-unread::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(211, 173, 99, .55), transparent); }

.dm2-row { display: flex; gap: 8px; align-items: flex-start; position: relative; }
/* 消息本体：时间和已读挂在这个盒子上，所以永远贴着气泡 */ 
.dm2-body { position: relative; display: flex; max-width: 100%; }
.dm2-row.out .dm2-body { justify-content: flex-end; }
.dm2-tail {
  position: absolute; bottom: 2px; display: flex; align-items: center; gap: 5px;
  white-space: nowrap; pointer-events: none; z-index: 2;
}
.dm2-row:not(.out) .dm2-tail { left: 100%; margin-left: 6px; }
.dm2-row.out .dm2-tail { right: 100%; margin-right: 6px; }
.dm2-tail .tm { font-size: 10px; color: var(--text-mute); opacity: 0; transition: opacity .12s; }
.dm2-row:hover .dm2-tail .tm { opacity: 1; }
.dm2-tail .read { font-size: 9.5px; color: var(--ok); opacity: .85; }
@media (max-width: 760px) { .dm2-tail .tm { display: none; } }

.dm2-row.out { justify-content: flex-end; }
.dm2-row .mav { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: #3b4a5a; color: #dbe6f0; margin-top: 3px; }
.dm2-col { position: relative; max-width: 74%; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dm2-row.out .dm2-col { align-items: flex-end; }
.dm2-name { font-size: 10.5px; color: var(--text-mute); padding-left: 2px; }
.dm2-bubble { padding: 7px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.dm2-bubble.me { background: var(--gold-bg); color: #f6ead0; border-color: var(--gold-line); }
.dm2-bubble.sys { background: none; border: 0; color: var(--text-mute); font-size: 11.5px; text-align: center; padding: 2px 0; }
.dm2-meta { font-size: 10.5px; color: var(--text-mute); display: flex; gap: 5px; align-items: center; padding-right: 2px; }
.dm2-meta .tick { color: var(--gold); letter-spacing: -2px; }
.dm2-quote { border-left: 2px solid var(--gold); background: rgba(211, 173, 99, .08); border-radius: 6px; padding: 4px 8px; font-size: 12px; color: var(--text-3); margin-bottom: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm2-quote b { color: var(--gold-text); font-weight: 500; }
.dm2-fwd { font-size: 10.5px; color: var(--gold-text); margin-bottom: 4px; }
.dm2-img { max-width: 240px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line); display: block; cursor: zoom-in; background: #0d0f11; }
.dm2-file { display: flex; gap: 9px; align-items: center; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); width: 288px; }
.dm2-file.me { background: var(--gold-bg); border-color: var(--gold-line); }
.dm2-fico { width: 34px; height: 38px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; background: #3a2422; color: #e8a49c; border: 1px solid #4d2f2c; }
.dm2-fico.xls { background: #1d2f26; color: #8fd3ab; border-color: #2c4636; }
.dm2-fico.img { background: #2a2a3c; color: #a8b6e8; border-color: #383a52; }
.dm2-fico.doc { background: #23303c; color: #9fc0dd; border-color: #2f4354; }
.dm2-finfo { flex: 1; min-width: 0; }
.dm2-fname { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm2-fsub { font-size: 10.5px; color: var(--text-mute); }
.dm2-facts { display: flex; gap: 8px; font-size: 11.5px; color: var(--gold-text); margin-top: 2px; }
.dm2-facts a { cursor: pointer; text-decoration: none; }
.dm2-facts a:hover { text-decoration: underline; }
.dm2-task { width: 330px; border-radius: 10px; border: 1px solid var(--gold-line); background: linear-gradient(180deg, #2b2718, #221f14); padding: 9px 11px 7px; position: relative; overflow: hidden; cursor: pointer; }
.dm2-task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.dm2-task .tk { font-size: 10.5px; color: var(--gold); letter-spacing: .6px; margin-bottom: 2px; }
.dm2-task .tt { font-size: 13.5px; font-weight: 600; color: #f4e9d3; }
.dm2-task .tm { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.dm2-task .tf { margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--gold-line); display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.dm2-task .tf a { color: var(--gold-text); }
.dm2-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; border-radius: 20px; padding: 1px 7px; border: 1px solid; line-height: 18px; }
.dm2-pill.wait { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); }
.dm2-pill.ok { color: var(--ok); background: var(--ok-bg); border-color: #24463a; }
.dm2-pill.mute { color: var(--text-3); background: var(--surface-3); border-color: var(--line); }
.dm2-pill.red { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.dm2-sticker { max-width: 130px; max-height: 130px; border-radius: 12px; border: 1px solid var(--gold-line); cursor: pointer; }
.dm2-jump { position: absolute; right: 16px; bottom: 150px; display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11.5px; color: var(--gold-text); background: rgba(51, 44, 27, .95); border: 1px solid var(--gold-line); border-radius: 20px; padding: 4px 11px; cursor: pointer; box-shadow: 0 8px 20px -10px #000; }

/* ---------- 输入区 ---------- */
.dm2-compose { border-top: 1px solid var(--line-2); padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); flex: none; position: relative; }
.dm2-toolbar { display: flex; align-items: center; gap: 2px; color: var(--text-3); }
.dm2-tool { display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; font-size: 11.5px; cursor: pointer; border: 0; background: none; color: inherit; font-family: inherit; }
.dm2-tool:hover { background: var(--surface-2); color: var(--text); }
.dm2-tool.on { color: var(--gold); background: var(--gold-bg); }
.dm2-tool .k { font-size: 10px; color: var(--text-mute); }
.dm2-tool .ico { width: 16px; height: 16px; }
.dm2-inputbox { border: 1px solid var(--line); border-radius: 10px; background: var(--input); padding: 6px 10px; display: flex; gap: 8px; align-items: flex-end; }
.dm2-inputbox:focus-within { border-color: var(--gold-line); }
.dm2-inputbox > div { flex: 1; min-width: 0; }
.dm2-inputbox textarea { display: block; width: 100%; box-sizing: border-box; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; resize: none; outline: none; max-height: 160px; min-height: 42px; line-height: 1.55; overflow-y: auto; }
.dm2-send { font: inherit; font-size: 12.5px; padding: 6px 16px; border-radius: 9px; border: 1px solid #8f7131; background: linear-gradient(180deg, #dcb873, #c19a4e); color: #22190a; font-weight: 600; cursor: pointer; }
.dm2-send:disabled { opacity: .5; cursor: default; }
.dm2-hint { font-size: 10.5px; color: var(--text-mute); padding: 0 2px; display: flex; justify-content: space-between; gap: 10px; }
.dm2-quotebar { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--gold-text); background: rgba(211, 173, 99, .08); border-left: 2px solid var(--gold); border-radius: 4px; padding: 3px 8px; margin-bottom: 5px; }
.dm2-quotebar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm2-quotebar b { font-weight: 500; }
.dm2-drop { position: absolute; inset: 0; background: rgba(16, 18, 20, .88); border: 2px dashed var(--gold); border-radius: var(--radius); display: grid; place-items: center; font-size: 15px; color: var(--gold-text); z-index: 5; }

/* ---------- 浮层 ---------- */
.dm2-pop { position: absolute; bottom: 132px; left: 12px; width: 372px; max-height: 380px; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 20; }
.dm2-pop.wide { width: 420px; }
.dm2-pop-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; position: sticky; top: 0; background: var(--bg-2); }
.dm2-pop-head .x { color: var(--text-mute); cursor: pointer; font-weight: 400; }
.dm2-emojis { display: grid; grid-template-columns: repeat(9, 1fr); gap: 1px; padding: 6px 8px; }
.dm2-emojis button { font-size: 19px; line-height: 1; background: none; border: 0; border-radius: 6px; padding: 5px 0; cursor: pointer; }
.dm2-emojis button:hover { background: var(--surface-2); }
.dm2-stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 9px 10px; }
.dm2-stickers button { border: 1px solid var(--line); background: #221d15; border-radius: 9px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.dm2-stickers img { width: 100%; height: 58px; object-fit: cover; border-radius: 6px; }
.dm2-stickers span { font-size: 9.5px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm2-stickers .add { justify-content: center; color: var(--text-mute); font-size: 11px; height: 78px; border-style: dashed; }
.dm2-tabs { display: flex; gap: 12px; padding: 8px 12px 0; font-size: 12px; color: var(--text-3); }
.dm2-tabs b { color: var(--gold-text); font-weight: 500; border-bottom: 2px solid var(--gold); padding-bottom: 4px; cursor: pointer; }
.dm2-tabs span { padding-bottom: 4px; cursor: pointer; }

.dm2-mask { position: fixed; inset: 0; background: rgba(6, 7, 9, .62); display: grid; place-items: center; z-index: 60; padding: 20px; }
.dm2-modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.dm2-modal.wide { width: min(860px, 100%); }
.dm2-mhead { padding: 11px 14px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; }
.dm2-mhead .x { color: var(--text-mute); cursor: pointer; font-weight: 400; }
.dm2-mbody { padding: 12px 14px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.dm2-mfoot { padding: 9px 14px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: rgba(0, 0, 0, .12); }
.dm2-field { display: flex; flex-direction: column; gap: 4px; }
.dm2-field > label { font-size: 11px; color: var(--text-3); }
.dm2-field input, .dm2-field textarea, .dm2-field select { font: inherit; font-size: 12.5px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 6px 9px; outline: none; }
.dm2-field input:focus, .dm2-field textarea:focus { border-color: var(--gold-line); }
.dm2-row2 { display: flex; gap: 10px; }
.dm2-row2 > * { flex: 1; }
.dm2-minis { display: flex; gap: 6px; }
.dm2-mini { font-size: 11.5px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 3px 10px; color: var(--text-2); cursor: pointer; }
.dm2-mini.on { background: var(--gold-bg); border-color: var(--gold-line); color: var(--gold-text); }
.dm2-btn { font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.dm2-btn.primary { background: linear-gradient(180deg, #dcb873, #c19a4e); color: #22190a; border-color: #8f7131; font-weight: 600; }
.dm2-btn.danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.dm2-hintline { font-size: 11px; color: var(--text-mute); line-height: 1.6; }

/* 搜索结果 */
.dm2-res { display: flex; flex-direction: column; gap: 1px; }
.dm2-hit { display: flex; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.dm2-hit:hover { background: var(--surface); }
.dm2-hit .h b { font-size: 12px; color: var(--gold-text); font-weight: 500; }
.dm2-hit .h { flex: 1; min-width: 0; }
.dm2-hit .h .t { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm2-hit .h .tag { font-size: 10px; color: var(--text-mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 5px; }
.dm2-mark { background: rgba(211, 173, 99, .22); color: var(--gold-text); border-radius: 3px; }

/* 右键菜单 */
.dm2-ctx { position: fixed; z-index: 70; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.dm2-ctx button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px 9px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 12.5px; border-radius: 7px; cursor: pointer; text-align: left; }
.dm2-ctx button:hover { background: var(--surface-2); }
.dm2-ctx button.danger { color: var(--danger); }
.dm2-ctx button .k { margin-left: auto; font-size: 10px; color: var(--text-mute); }

/* 灯箱 */
.dm2-light { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 80; display: grid; place-items: center; cursor: zoom-out; }
.dm2-light img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px -30px #000; }
.dm2-light .bar { position: fixed; top: 16px; right: 18px; display: flex; gap: 8px; }

/* 上传进度 */
.dm2-up { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 12px; }
.dm2-up .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.dm2-up .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c19a4e, #e3c284); transition: width .2s; }
.dm2-up .pct { width: 42px; text-align: right; color: var(--text-3); font-size: 11px; }

/* 手机 */
@media (max-width: 760px) {
  .dm2 { grid-template-columns: 1fr; }
  .dm2-work { display: none; }
  .dm2-side { display: none; }
  .dm2-root.has-peer .dm2-side { display: none; }
  .dm2-root:not(.has-peer) .dm2-main { display: none; }
  .dm2-root:not(.has-peer) .dm2-side { display: flex; }
  .dm2-col { max-width: 82%; }
  .dm2-pop { left: 6px; right: 6px; width: auto; }
  .dm2-file { width: min(260px, 72vw); }
  .dm2-task { width: min(300px, 80vw); }
}

/* 转为待办：来源条 + 附件 */
.dm2-src { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border-radius: 9px;
  border: 1px solid var(--gold-line); background: rgba(211, 173, 99, .07); }
.dm2-src img { width: 52px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line-2); flex: none; }
.dm2-src .ic { width: 52px; height: 40px; border-radius: 6px; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-size: 10px; color: var(--text-mute); background: var(--surface-2); flex: none; }
.dm2-src b { display: block; font-size: 11px; color: var(--gold-text); font-weight: 500; }
.dm2-src span { display: block; font-size: 10.5px; color: var(--text-mute); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.dm2-atts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dm2-att { width: 62px; height: 48px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line);
  position: relative; flex: none; background: var(--surface-2); }
.dm2-att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm2-att .nm { display: block; font-size: 9px; color: var(--text-3); padding: 4px; word-break: break-all;
  height: 100%; overflow: hidden; }
.dm2-att .del { position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(0, 0, 0, .68); color: #fff; font-size: 9px; display: grid; place-items: center; cursor: pointer; }
.dm2-att.add { display: grid; place-items: center; border-style: dashed; color: var(--text-mute); font-size: 17px; cursor: pointer; }
.dm2-task .thumbs { display: flex; gap: 5px; margin-top: 7px; align-items: center; }
.dm2-task .thumbs img { width: 46px; height: 38px; border-radius: 5px; object-fit: cover;
  border: 1px solid var(--line-2); cursor: zoom-in; }
.dm2-task .thumbs .more { font-size: 10px; color: var(--text-mute); }
/* ---------- 右侧「这个对话的工作」---------- */
.dm2-work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.dm2-work-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 7px; }
.dm2-work-head b { font-size: 13px; font-weight: 600; }
.dm2-work-head .n { font-size: 10px; color: var(--gold-text); background: var(--gold-bg);
  border: 1px solid var(--gold-line); border-radius: 20px; padding: 0 6px; }
.dm2-work-fold { margin-left: auto; font-size: 11px; color: var(--text-mute); background: none; border: 0;
  cursor: pointer; font-family: inherit; }
.dm2-work-fold:hover { color: var(--gold-text); }
.dm2-work-tabs { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.dm2-wt { font-size: 11px; border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px;
  color: var(--text-3); background: var(--surface-2); cursor: pointer; }
.dm2-wt.on { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); }
.dm2-work-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.dm2-wc { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 8px 9px; cursor: pointer; }
.dm2-wc:hover { border-color: var(--line-2); background: var(--surface-3); }
.dm2-wc.focus { border-color: var(--gold-line); background: #26221a; }
.dm2-wc .t { font-size: 12.5px; line-height: 1.45; margin-bottom: 4px; }
.dm2-wc .m { font-size: 10px; color: var(--text-mute); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dm2-wc .a { display: flex; gap: 6px; margin-top: 6px; }
.dm2-wb { font-size: 10.5px; border-radius: 6px; padding: 2px 9px; border: 1px solid var(--line);
  color: var(--text-2); background: var(--surface); cursor: pointer; font-family: inherit; }
.dm2-wb:hover { color: var(--text); }
.dm2-wb.ok { color: var(--ok); border-color: #2c5340; background: rgba(22, 40, 31, .6); }
.dm2-wb.gold { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-bg); }
.dm2-work-new { margin: 6px 8px 10px; border: 1px dashed var(--line); border-radius: 9px; padding: 7px;
  text-align: center; font-size: 11.5px; color: var(--text-3); background: none; cursor: pointer; font-family: inherit; }
.dm2-work-new:hover { color: var(--gold-text); border-color: var(--gold-line); }
.dm2-work-rail { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0;
  background: var(--bg-2); height: 100%; cursor: pointer; }
.dm2.folded .dm2-work > *:not(.dm2-work-rail) { display: none; }
.dm2.folded .dm2-work-rail { display: flex; }
.dm2-work-rail .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--gold-bg); border: 1px solid var(--gold-line); color: var(--gold); position: relative; font-size: 13px; }
.dm2-work-rail .ic .n { position: absolute; right: -4px; top: -4px; background: var(--danger); color: #1b0f0e;
  font-size: 9px; border-radius: 20px; padding: 0 4px; font-weight: 700; }
.dm2-work-rail .vt { writing-mode: vertical-rl; font-size: 10.5px; color: var(--text-3); letter-spacing: 2px; }
@media (max-width: 1280px) { .dm2 { grid-template-columns: 250px 1fr 260px; } }
/* ===================================================================
   2026-11-17 · 重设计皮肤：黑白 + 一点朱砂（只覆盖视觉）
   =================================================================== */

.dm2 { grid-template-columns: 244px 1fr 292px; }
.dm2.folded { grid-template-columns: 244px 1fr 46px; }

/* ---- 左：会话 ---- */
.dm2-side { border-right: 1px solid var(--line); background: var(--bg-2); }
.dm2-side-head { padding: 14px 12px 8px; border-bottom: 0; }
.dm2-side-head h2 { font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.dm2-search { margin: 8px 0 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 4px 2px; }
.dm2-search input { background: transparent; }
.dm2-search .k { display: none; }
.dm2-chips { gap: 14px; padding: 8px 2px 2px; }
.dm2-chip { font-size: 12px; color: var(--text-mute); padding: 0 0 2px; border: 0; border-bottom: 1.5px solid transparent; border-radius: 0; background: transparent; letter-spacing: .2px; line-height: 1.6; }
.dm2-chip.on { color: var(--text); font-weight: 600; background: transparent; border-bottom-color: var(--danger); }
.dm2-threads { padding: 0; }
.dm2-thr { border-radius: 0; padding: 10px 12px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.dm2-thr.on { background: var(--surface-2); }
.dm2-thr:hover { background: var(--surface-2); }
.dm2-av { width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; background: var(--text); color: #fff; }
.dm2-av.g { background: #44637f; }
.dm2-av.b { background: #6a7440; }
.dm2-av.p { background: #6b5175; }
.dm2-tn { font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.dm2-tn em { font-size: 10px; color: var(--text-mute); margin-left: 4px; font-style: normal; font-weight: 400; }
.dm2-tp { font-size: 11px; color: var(--text-mute); margin-top: 1px; }
.dm2-tt { font-size: 10px; color: var(--text-mute); }
.dm2-tc { background: var(--danger); color: #fff; font-size: 9.5px; padding: 0 5px; min-width: 15px; }
.dm2-side-foot { border-top: 1px solid var(--line-2); padding: 8px; gap: 6px; }
.dm2-side-foot button { font-size: 11.5px; color: var(--text-3); border-color: var(--line); background: var(--bg-2); }

/* ---- 中：聊天 ---- */
.dm2-head { padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.dm2-head .kv b { font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.dm2-head .kv span { font-size: 10.5px; color: var(--text-mute); }
.dm2-msgs { padding: 16px 18px 10px; background: var(--bg-2); }
.dm2-bubble { border-radius: 3px 10px 10px 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; line-height: 1.65; padding: 8px 12px; }
.dm2-bubble.me { background: #f6f3f0; border-color: #eae6e2; border-radius: 10px 3px 10px 10px; }
.dm2-mav { width: 24px; height: 24px; border-radius: 7px; background: var(--danger); color: #fff; font-size: 10px; }
.dm2-mav.g { background: #44637f; }
.dm2-mav.b { background: #6a7440; }
.dm2-mav.p { background: #6b5175; }
.dm2-tail .tm { font-size: 10px; color: var(--text-mute); }
.dm2-tail .read { color: var(--ok); }

/* 任务卡：瘦成两行 + 左边一条朱砂 */
.dm2-task { border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 6px; background: #fff; padding: 9px 11px; max-width: 320px; }
.dm2-task .tk { font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--text); display: flex; align-items: center; gap: 7px; }
.dm2-task .tk i { font-style: normal; font-size: 9.5px; border: 1px solid var(--danger-line); color: var(--danger); border-radius: 3px; padding: 0 4px; line-height: 14px; font-weight: 500; flex: none; }
.dm2-task .tm { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 11px; color: var(--text-mute); }
.dm2-task .tm .go { margin-left: auto; color: var(--danger); font-weight: 600; }
.dm2-task .tt, .dm2-task .tf, .dm2-task .thumbs { display: none; }

/* 输入区 */
.dm2-compose { padding: 9px 12px 10px; border-top: 1px solid var(--line-2); }
.dm2-toolbar { gap: 16px; font-size: 11px; color: var(--text-mute); }
.dm2-tool { font-size: 11px; color: var(--text-mute); gap: 4px; }
.dm2-tool .k { color: var(--text-mute); opacity: .8; }
.dm2-inputbox { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px 6px 10px; }
.dm2-inputbox textarea { font-size: 13px; }
.dm2-send { background: var(--text); border-radius: 7px; font-size: 12.5px; padding: 6px 14px; }
.dm2-send:hover { background: var(--text-2); }
.dm2-jump { background: var(--text); color: #fff; border-radius: 20px; font-size: 11.5px; padding: 5px 12px; }

/* 状态胶囊 */
.dm2-pill { font-size: 10.5px; line-height: 17px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); }
.dm2-pill.red { background: var(--danger); border-color: var(--danger); color: #fff; }
.dm2-pill.wait { background: #fff; border-color: var(--danger-line); color: var(--danger); }
.dm2-pill.gold { background: var(--gold-bg); border-color: var(--gold-line); color: var(--gold); }
.dm2-pill.ok { background: #eef5f1; border-color: #d5e6de; color: var(--ok); }
.dm2-pill.mute { background: var(--bg-2); border-color: var(--line); color: var(--text-3); }

/* ---- 右：这个对话的工作 ---- */
.dm2-work { border-left: 1px solid var(--line); background: var(--bg-2); }
.dm2-work-head { padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.dm2-work-head b { font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
.dm2-work-head .n { font-size: 10px; border: 1px solid var(--danger-line); color: var(--danger); border-radius: 20px; padding: 0 6px; background: #fff; }
.dm2-work-fold { font-size: 11px; color: var(--text-mute); }
.dm2-work-tabs { padding: 9px 14px; gap: 14px; border-bottom: 1px solid var(--line-2); }
.dm2-wt { display: inline-flex; align-items: center; gap: 4px; width: auto; flex: none;
  font-size: 11.5px; line-height: 18px; color: var(--text-3); background: #fff;
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; cursor: pointer; white-space: nowrap; }
.dm2-wt:hover { border-color: var(--text-mute); }
.dm2-wt.on { color: #fff; font-weight: 600; background: var(--text); border-color: var(--text); }
.dm2-wt em { font-style: normal; opacity: .75; }
.dm2-work-list { padding: 10px; }
.dm2-wc { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; background: #fff; }
.dm2-wc .t { font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .2px; }
.dm2-wc .m { display: flex; gap: 6px; align-items: center; margin-top: 5px; font-size: 10.5px; color: var(--text-mute); flex-wrap: wrap; }
.dm2-wc .a { display: flex; gap: 6px; margin-top: 8px; }
.dm2-wb { font-size: 10.5px; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text-2); }
.dm2-wb.gold { background: var(--text); border-color: var(--text); color: #fff; }
.dm2-wb.ok { background: #fff; border-color: var(--line); color: var(--ok); }
.dm2-work-new { margin: 0 10px 10px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px; font-size: 11px; color: var(--text-mute); background: transparent; }
.dm2-work-rail { background: var(--surface-2); border-left: 1px solid var(--line); }
/* 浅色收尾：深色时代留下的字色/底色（2026-11-17） */
.dm2-bubble { color: var(--text); }
.dm2-bubble.me { color: var(--text); background: #f6f3f0; border-color: #eae6e2; }
.dm2-bubble strong { color: var(--text); }
.dm2-send { color: #fff; border-color: var(--text); background: var(--text); }
.dm2-send:hover { background: var(--text-2); }
.dm2-btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.dm2-fico { background: #fdf0ee; color: #b3524a; border-color: #f0d6d2; }
.dm2-fico.xls { background: #eef6f1; color: #2f7d5d; border-color: #d6e8de; }
.dm2-fico.img { background: #eef1f7; color: #4a5a7a; border-color: #dbe0ec; }
.dm2-fico.doc { background: #eef3f8; color: #3d5c78; border-color: #d7e2ec; }
.dm2-stickers button { background: #fff; }
.dm2-wc.focus { background: var(--surface-2); border-color: var(--danger-line); }
.dm2-wb.ok { background: #fff; border-color: var(--line); color: var(--ok); }
.dm2-img { background: var(--surface-2); }
.dm2-task .t { color: var(--text); }