/* 管家后台两页共用（提醒 /butler、群聊总结 /butler-chats；2026-10-16，app/butler.py）。颜色只用 tokens.css 变量（UI 门禁）。 */
[hidden] { display: none !important; }
.bt-h { margin: 12px 0 6px; font-size: 16px; flex: 1 1 auto; }
.bt-note { color: var(--text-muted); font-size: 12px; }
.bt-app button { font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.bt-app button.primary { background: var(--accent); color: var(--text-on-accent); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 14px; }
.bt-app button.primary:hover { background: var(--accent-hover); }
.bt-app button.soft { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; }
.bt-app button.soft:hover { border-color: var(--accent); color: var(--accent); }
.bt-app button.danger { background: var(--danger-solid); color: var(--text-on-accent); border: 1px solid var(--danger-solid); border-radius: 8px; padding: 6px 14px; }
.bt-app button:disabled { opacity: .5; cursor: default; }

/* 一句话 */
.bt-say { display: flex; flex-direction: column; gap: 8px; }
.bt-say textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.6; padding: 10px 12px;
  border: 1px solid var(--border-control); border-radius: 10px; background: var(--surface); color: var(--text-primary); resize: vertical; }
.bt-say textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.bt-say-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 预览卡 */
.bt-draft { margin-top: 12px; border: 1px solid var(--accent-soft-border); background: var(--accent-soft-bg); border-radius: 10px; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bt-form { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 10px; align-items: center; font-size: 13px; }
.bt-form > label { color: var(--text-secondary); white-space: nowrap; }
.bt-form input[type=text], .bt-form input[type=number], .bt-form input[type=date], .bt-form select, .bt-form textarea {
  font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--border-control); border-radius: 6px; background: var(--surface);
  color: var(--text-primary); min-width: 0; box-sizing: border-box; }
.bt-form textarea { width: 100%; resize: vertical; line-height: 1.5; }
.bt-form .bt-wd { display: flex; gap: 8px; flex-wrap: wrap; }
.bt-form .bt-wd label { display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.bt-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 13px; }
.bt-msg { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  font-size: 13px; line-height: 1.6; max-height: 320px; overflow: auto; }
.bt-box { border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.6; }
.bt-box.bad { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-fg); }
.bt-box.warn { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning-fg); }
.bt-box.info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info-fg); }
.bt-box.good { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-fg); }
.bt-box ul { margin: 2px 0 0; padding-left: 18px; }
.bt-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bt-next { color: var(--text-secondary); }
.bt-next b { font-variant-numeric: tabular-nums; }

/* 表（我加的 / 系统自带的） */
.bt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; }
.bt-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-sunken); color: var(--text-secondary); font-weight: 600; text-align: left;
  padding: 7px 8px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.bt-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; }
.bt-table td.nw { white-space: nowrap; }
.bt-table td.clip { white-space: nowrap; }
.bt-table tbody tr[data-id] { cursor: pointer; }
.bt-table tbody tr[data-id]:hover td { background: var(--surface-hover); }
.bt-table tr.on td { background: var(--surface-selected); }
.bt-table tr.grp td { background: var(--canvas); color: var(--text-secondary); font-weight: 600; padding-top: 12px; cursor: default; }
.bt-table .muted { color: var(--text-muted); }
.bt-table .zero { color: var(--text-disabled); }
.bt-tag { display: inline-block; border-radius: var(--radius-full); padding: 0 8px; font-size: 12px; line-height: 20px; white-space: nowrap;
  border: 1px solid var(--neutral-border); background: var(--neutral-bg); color: var(--neutral-fg); }
.bt-tag.good { border-color: var(--success-border); background: var(--success-bg); color: var(--success-fg); }
.bt-tag.warn { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning-fg); }
.bt-tag.bad { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-fg); }
.bt-tag.info { border-color: var(--info-border); background: var(--info-bg); color: var(--info-fg); }
.bt-tag.muted { color: var(--text-muted); }
.bt-wrap { overflow-x: auto; }
.bt-wrap.fits { overflow: visible; }

.bt-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.bt-kpi { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; min-width: 110px; background: var(--surface); }
.bt-kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.bt-kpi span { color: var(--text-muted); font-size: 12px; }
.bt-kpi-ch { display: grid; grid-template-columns: repeat(2, auto); gap: 2px 14px; align-content: center; }
.bt-kpi-ch span { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.bt-kpi-ch b { display: inline; font-size: 15px; }
.bt-flt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.bt-flt button { border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-full); padding: 4px 12px; }
.bt-flt button.on { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.bt-flt input { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--border-control); border-radius: var(--radius-full); min-width: 160px; }

/* 建议 / 该合并的：一条一块 */
.bt-cards { display: flex; flex-direction: column; gap: 8px; }
.bt-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); font-size: 13px; line-height: 1.6; }
.bt-card.warn { border-left: 4px solid var(--warning-border); }
.bt-card.info { border-left: 4px solid var(--info-border); }
.bt-card.muted { border-left: 4px solid var(--neutral-border); }
.bt-card h3 { margin: 0 0 4px; font-size: 14px; }
.bt-card .why { color: var(--text-secondary); }
.bt-card .sug { color: var(--text-primary); margin-top: 4px; }
.bt-card .keys { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.bt-quote { border-left: 3px solid var(--border-strong); padding: 2px 8px; margin: 4px 0; color: var(--text-secondary); }
.bt-quote small { color: var(--text-muted); }
.bt-card .bt-act { margin-top: 6px; }

/* 右侧详情 */
.bt-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-3); z-index: 30; overflow-y: auto; }
.bt-ph { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 16px; display: flex; gap: 10px; z-index: 2; }
.bt-ph-t { flex: 1 1 auto; min-width: 0; }
.bt-ph h2 { margin: 0; font-size: 16px; }
.bt-p-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.bt-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.bt-pb { padding: 12px 16px 40px; font-size: 13px; line-height: 1.7; }
.bt-dl { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 10px; margin: 0; }
.bt-dl dt { color: var(--text-muted); }
.bt-dl dd { margin: 0; }
.bt-hist { list-style: none; margin: 6px 0 0; padding: 0; }
.bt-hist li { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.bt-lines { list-style: none; margin: 0; padding: 0; }
.bt-lines li { padding: 3px 0; display: grid; grid-template-columns: 44px 84px minmax(0, 1fr); gap: 6px; border-bottom: 1px dashed var(--border-subtle); }
.bt-lines li .t { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bt-lines li .w { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-lines li.hit { background: var(--warning-bg); }

/* 群聊总结 */
.bt-days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bt-days button { border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-full); padding: 4px 12px; }
.bt-days button.on { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.bt-chats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bt-chat { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); cursor: pointer; min-width: 0; }
.bt-chat:hover { border-color: var(--accent); }
.bt-chat.on { border-color: var(--accent); box-shadow: var(--focus-ring); }
.bt-chat h3 { margin: 0; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bt-chat .meta { color: var(--text-muted); font-size: 12px; margin: 2px 0 6px; }
.bt-chat ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.bt-chat li b { font-weight: 600; }
.bt-follow { list-style: none; margin: 0; padding: 0; }
.bt-follow li { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px; line-height: 1.6; }
.bt-follow li .what b { font-weight: 600; }
.bt-follow li .what small { display: block; color: var(--text-muted); }

@media (max-width: 900px) {
  .bt-draft { grid-template-columns: minmax(0, 1fr); }
  .bt-chats { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bt-follow li { grid-template-columns: minmax(0, 1fr); }
  .bt-form { grid-template-columns: minmax(0, 1fr); }
}
/* 总表（10-16）：一件事一行、一格一行不换行，放不下的「…」、悬停看全文 */
.bt-bflt .bt-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.bt-bflt select { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--border-control); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text-primary); max-width: 220px; }
.bt-grid td.bt-who { font-weight: 600; }
.bt-grid td.bt-who-q { color: var(--warning-fg); font-weight: 600; }
.bt-grid td.bt-where { color: var(--text-muted); font-size: 12px; }
.bt-urg { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--danger-fg); }
.bt-dl.bt-dl-5w { grid-template-columns: 120px minmax(0, 1fr); }
.bt-dl dd .bt-box { margin-top: 4px; }
/* 提醒一览里的 AI 建议一组（10-16 晚）：已经处理 / 不用处理的淡一点，待你看的行内两个小按钮 */
.bt-grp-sub { margin-left: 10px; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.bt-table tr.bt-idea.settled td { color: var(--text-muted); }
.bt-table tr.bt-idea.settled td b { font-weight: 500; }
.bt-table button.sm { padding: 0 8px; min-height: 22px; font-size: 12px; line-height: 20px; }
.bt-skipcats { margin: 4px 0 8px; font-size: 12px; color: var(--text-secondary); }
.bt-skipcats:empty { display: none; }
.bt-skipcats button.sm { padding: 0 8px; min-height: 22px; font-size: 12px; margin-left: 4px; }
