/* === 45-watch.css ===
   值守(P746):对话顶栏小字 + 值守面板 + 共用卡片 + 对话里“值守 · 标题 · 时间”一行与建立时小卡。
   面板沿用 .modal-overlay / .modal-sheet(06-panels,PC 在 08-responsive 居中),这里只管内容。
   效果图 xhtml_collaboration/xhtml_archive/2026-10-15_watch_redesign_map.html(入口选甲“顶栏小字”) */

/* ── 顶栏小字:主题名下一行 ── */
.topbar-watch {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 2px 0 0; padding: 0 2px; border: 0; background: none;
  font: inherit; font-size: 11.5px; line-height: 1.35; color: var(--text-muted);
  cursor: pointer; -webkit-user-select: none; user-select: none; max-width: 100%;
}
.topbar-watch[hidden] { display: none; }
.topbar-watch-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-watch-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--success-color); }
.topbar-watch.is-failing .topbar-watch-dot { background: var(--warning-color); }
.topbar-watch:hover { color: var(--text-main); }
/* 手机顶栏多一行时整体加高,正文起点跟着下移(同一个变量) */
@media (max-width: 1023px) {
  #chat-view.has-watch-line { --chat-topbar-h: 66px; }
}

/* ── 面板 ── */
.wt-overlay { align-items: flex-end; padding: 0; }
.wt-sheet { position: relative; max-height: 82vh; padding-left: 16px; padding-right: 16px; }
.wt-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; color: var(--text-muted); }
.wt-close svg { width: 18px; height: 18px; }
.wt-sheet-title { font-size: 16px; font-weight: 600; color: var(--text-main); margin: 0 44px 12px 2px; }
.wt-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wt-muted { font-size: 14px; line-height: 1.65; color: var(--text-muted); padding: 4px 2px 12px; }
@media (min-width: 1024px) {
  .wt-overlay { align-items: center; padding: 16px; }
  .wt-sheet { max-width: 520px; max-height: 80vh; }
}

/* ── 卡片(面板与自动化页共用)── */
.wt-card {
  border: 1px solid var(--border-glass); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--bg-subtle);
}
.wt-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wt-title { font-size: 15px; font-weight: 600; color: var(--text-main); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-kind { flex: none; font-size: 11px; color: var(--text-dim); border: 1px solid var(--border-glass); border-radius: 6px; padding: 0 5px; }
.wt-status { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.wt-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); }
.wt-status.is-active i { background: var(--success-color); }
.wt-status.is-failing i { background: var(--warning-color); }
.wt-where { margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.wt-ln { display: grid; grid-template-columns: 62px 1fr; gap: 6px; margin-top: 6px; font-size: 13px; line-height: 1.5; }
.wt-k { color: var(--text-dim); }
.wt-v { color: var(--text-body); min-width: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wt-log { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-glass); font-size: 12.5px; color: var(--text-muted); }
.wt-log-h { color: var(--text-dim); margin-bottom: 2px; }
.wt-log-row { line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wt-log-t { color: var(--text-dim); }
.wt-acts { display: flex; gap: 8px; margin-top: 10px; }
.wt-act {
  font: inherit; font-size: 12.5px; color: var(--text-muted); background: none;
  border: 1px solid var(--border-light); border-radius: 8px; padding: 4px 12px; cursor: pointer;
}
.wt-act:hover { color: var(--text-main); }
.wt-act.is-danger:hover { color: var(--error-text); border-color: var(--error-border-strong); }

/* ── 对话里:值守主动说的话上方一行(event_banner 变体,左对齐、无底框)── */
.event-banner.is-watch-source {
  justify-content: flex-start; max-width: none; margin: 18px 0 6px; padding: 0;
  background: none; border: 0; font-size: 12.5px; color: var(--text-dim); letter-spacing: 0;
}
.event-banner.is-watch-source svg { width: 14px; height: 14px; flex: none; }

/* ── 对话里:建立值守时的小卡(event_banner 变体,点开值守面板)── */
.event-banner.is-watch-card {
  display: block; max-width: 420px; margin: 4px 0 10px; padding: 0;
  background: none; border: 0; letter-spacing: 0; text-align: left;
}
.wt-mini {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--border-glass); background: var(--bg-surface); border-radius: 14px;
  padding: 10px 12px; margin-bottom: 6px; color: var(--text-main);
}
.wt-mini-h { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.wt-mini-h svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }
.wt-mini-d { margin-top: 3px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.wt-mini-go { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); }
