/* 对话归档、我的文件（chat-archive.js） */
.ca-table td { vertical-align: middle; }
.ca-row { cursor: pointer; }
.ca-row:hover td { background: var(--fill-soft); }
.ca-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.ca-preview, .ca-title, .ca-from { max-width: 360px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ca-preview { color: var(--text-muted); }
.ca-ops { text-align: right; white-space: nowrap; }
.ca-ops .chip-btn { display: inline-flex; align-items: center; margin-left: 6px; color: var(--text-regular); text-decoration: none; cursor: pointer; }
.ca-ops .chip-btn:hover { border-color: var(--blue); color: var(--blue); }
.ca-ops .ca-danger:hover { border-color: var(--danger); color: var(--danger); }
.ca-back { margin: -4px 0 12px; font-size: 13px; }
.ca-back a { color: var(--blue); text-decoration: none; }
.ca-thread { max-width: 860px; padding: 24px 28px 8px; }
.ca-msg { display: flex; flex-direction: column; margin: 0 0 22px; }
.ca-msg time { margin-top: 4px; color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.ca-user { align-items: flex-end; }
.ca-user .bubble { max-width: min(84%, 560px); padding: 10px 14px; border-radius: 14px; background: var(--fill); color: var(--text); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ca-bot { align-items: flex-start; }
.ca-bot .md { max-width: 100%; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.ca-file { display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 420px; }
.ca-file > span:last-child { display: grid; min-width: 0; line-height: 1.4; }
.ca-file b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ca-file small { color: var(--text-faint); font-size: 12px; }
.ca-thumb { flex: none; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e3e7ee; border-radius: 9px; background: #f3f5f8; }
.ca-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ca-doc svg { width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* 过期的附件：原文件没了，只剩名字（和读出来的文字） */
.msg-file.expired { border-style: dashed; color: #6b7280; background: #fafbfc; }
.msg-file.expired > svg { color: #8a94a3; background: #eef1f5; }
/* 会话栏：每段对话上的「归档」，底下进归档页和我的文件 */
.history-arc { position: absolute; right: 32px; top: 5px; width: 28px; height: 28px; display: none; place-items: center; border-radius: 50%; color: var(--text-muted); }
.history-arc svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.history-item:hover .history-arc, .history-item.active .history-arc { display: grid; }
.history-arc:hover { color: var(--blue); background: var(--surface); }
.history-item:hover, .history-item.active { padding-right: 64px; }
.rail-foot { display: flex; gap: 6px; margin-top: auto; padding: 10px 12px 12px; border-top: 1px solid #eceef1; }
.rail-foot a { flex: 1; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; color: var(--text-regular); font-size: 13px; text-decoration: none; }
.rail-foot a:hover { background: var(--fill-soft); color: var(--text); }
.rail-foot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 定时任务到点往这段对话里发了结果、还没点开看：标题前面一个小圆点。 */
.history-item.unread > span:first-child { position: relative; padding-left: 14px; font-weight: 600; color: var(--text); }
.history-item.unread > span:first-child::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(234, 152, 56, .22); animation: ca-ping 1.8s ease-out infinite; }
@keyframes ca-ping { 70% { box-shadow: 0 0 0 7px rgba(234, 152, 56, 0); } 100% { box-shadow: 0 0 0 0 rgba(234, 152, 56, 0); } }

/* 定时任务页 */
.ca-how { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; color: var(--text-regular); font-size: 13px; background: linear-gradient(120deg, #eefafe, #fff8ee); box-shadow: inset 0 0 0 1px #d9eff8; }
.ca-how b { color: var(--blue); }
.ca-how i { padding: 2px 10px; border-radius: 99px; color: var(--text); background: #fff; box-shadow: inset 0 0 0 1px var(--border); font-style: normal; }
.ca-how .tool-btn { margin-left: auto; }
.ca-task { max-width: 340px; }
.ca-task b, .ca-task small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ca-task small { color: var(--text-muted); font-size: 12.5px; }
.ca-bad { color: var(--danger); }
.ca-sub { margin: 22px 0 10px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.ca-none { padding: 28px 0; text-align: center; }

/* ---------- 定时任务：行尾的改、删，新建和改的弹窗（2026-12-04 照金聚诚的「新建任务」「编辑」） ---------- */
.xt-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; background: #f1f3f6; color: #1d2129; cursor: pointer; }
.xt-icon:hover { background: #e6e9ee; }
.xt-icon.danger:hover { background: #fdeeed; color: #b3372c; }
.xt-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.xt-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; background: #fff; color: #1d2129; box-shadow: 0 24px 64px rgb(15 23 42 / 22%); overflow: auto; }
.xt-dialog::backdrop { background: rgb(15 23 42 / 32%); }
.xt-dialog form { display: grid; gap: 18px; padding: 26px 30px 24px; }
.xt-head { display: flex; align-items: center; justify-content: space-between; }
.xt-head h2 { margin: 0; font-size: 20px; font-weight: 650; }
.xt-x { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: #1d2129; cursor: pointer; }
.xt-x:hover { background: #f1f3f6; }
.xt-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.xt-say { border: 1px solid #e1e4ea; border-radius: 14px; background: #fff; }
.xt-say:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
.xt-say textarea { display: block; width: 100%; min-height: 120px; padding: 14px 16px 6px; border: 0; border-radius: 14px; background: transparent; color: #1d2129; font: inherit; font-size: 15px; line-height: 1.7; resize: vertical; outline: 0; }
.xt-say-foot { display: flex; justify-content: flex-end; padding: 4px 8px 8px; }
.xt-row { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; }
.xt-label { color: #1d2129; font-size: 14px; font-weight: 500; }
.xt-when { display: grid; justify-items: start; gap: 10px; }
.xt-at { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.xt-row.xt-top { align-items: start; }
.xt-row.xt-top .xt-label { padding-top: 9px; }
.xt-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: #f1f3f6; }
.xt-seg[hidden] { display: none; }
.xt-seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; }
.xt-week button { width: 34px; padding: 0; }
.xt-seg button[aria-checked="true"] { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgb(15 23 42 / 12%); }
.xt-in { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #e1e4ea; border-radius: 10px; background: #fff; color: #1d2129; font: inherit; font-size: 14px; }
.xt-in[hidden] { display: none; }
.xt-in:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
label.xt-row .xt-in { width: 100%; }
.xt-check { display: inline-flex; align-items: center; gap: 8px; color: #1d2129; font-size: 14px; cursor: pointer; }
.xt-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.xt-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.xt-error { flex: 1; color: #c0392b; font-size: 13px; }
.xt-foot .xl-btn.primary { height: 40px; }
@media (max-width: 560px) {
  .xt-dialog form { padding: 22px 18px 18px; }
  .xt-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- 定时任务页第二版（2026-12-04 晚）：照客户档案列表，一行一个任务；空的时候一块空状态加例句 ---------- */
.xt-page .products-panel { padding: 6px 24px 20px; }
.xt-toolbar { min-height: 66px; }
.xt-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 11px; background: #f1f3f6; }
.xt-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; }
.xt-tabs button b { font-weight: 600; font-variant-numeric: tabular-nums; }
.xt-tabs button[aria-selected="true"] { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgb(15 23 42 / 12%); }
.xt-tabs button:disabled { cursor: default; opacity: .5; }
.xt-cap { color: #1d2129; font-size: 13.5px; }
.xt-table col.xt-c-name { width: 28%; }
.xt-table col.xt-c-when { width: 16%; }
.xt-table col.xt-c-next { width: 13%; }
.xt-table col.xt-c-to { width: 11%; }
.xt-table col.xt-c-last { width: 19%; }
.xt-table col.xt-c-ops { width: 148px; }
.workpage .ftable.cd-table.xt-table td.xt-ops { text-align: right; white-space: nowrap; }
.xt-ops .xt-icon + .xt-icon { margin-left: 6px; }
.xt-icon:disabled { cursor: not-allowed; opacity: .45; }
.xt-ok { color: #1e7b4d; font-weight: 500; }
.xt-bad { color: #c0392b; font-weight: 500; }
.xt-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 99px; background: #f1f3f6; color: #1d2129; font-size: 13px; font-style: normal; white-space: nowrap; }
.xt-tag.run { background: #e4f6fc; color: #0e5b81; }
.xt-tag.warn { background: #fdeeed; color: #b3372c; }
.xt-empty { display: grid; justify-items: center; gap: 10px; padding: 64px 20px 60px; text-align: center; }
.xt-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px; border-radius: 20px; background: #e4f6fc; color: var(--blue); }
.xt-empty-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.xt-empty b { color: #1d2129; font-size: 17px; font-weight: 600; }
.xt-empty p { margin: 0 0 8px; color: #1d2129; font-size: 14px; line-height: 1.7; }
.xt-says { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.xt-say { height: 36px; padding: 0 16px; border: 1px solid #e1e4ea; border-radius: 99px; background: #fff; color: #1d2129; font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.xt-say:hover { border-color: #b9e3f3; color: var(--blue); background: #f4fbfe; }
.xt-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef0f3; color: #1d2129; font-size: 13.5px; }
.xt-hint .xt-say { height: 32px; padding: 0 14px; font-size: 13.5px; }
.xt-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xt-card .xt-ops { display: flex; justify-content: flex-end; gap: 6px; }
