/* 群推送（/#mgmt-custpush，app/bigcust_push.py）。颜色只用 tokens.css 的变量（UI 门禁）。 */
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); }
.cp-app { max-width: 1280px; margin: 0 auto; padding: 18px 16px 72px; }
.cp-head h1 { margin: 0 0 6px; font-size: 22px; }
.cp-head p { margin: 0; max-width: 860px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.cp-fresh { margin: 8px 0 2px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.cp-fresh b { color: var(--ink); font-weight: var(--fw-semibold); }
.cp-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.cp-links a { color: var(--accent); text-decoration: none; }
.cp-links a:hover { text-decoration: underline; }
.cp-closed { margin: 16px 0; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken);
  color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.cp-dim { color: var(--muted); }
.cp-empty { margin: 12px 0; color: var(--muted); font-size: 13px; }

.cp-btn { white-space: nowrap; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit; line-height: 1.4; display: inline-flex; align-items: center; gap: 4px; }
.cp-btn:hover { background: var(--surface-hover); }
.cp-btn.on { border-color: var(--accent); color: var(--accent); }
.cp-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.cp-btn.primary:hover { background: var(--accent-hover); }
.cp-btn.small { padding: 3px 9px; font-size: 12px; }
.cp-btn:disabled { opacity: .55; cursor: default; }

/* 块 */
.cp-block { margin: 16px 0 0; }
.cp-block-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.cp-block-h h2 { margin: 0; font-size: 17px; flex: 1 1 auto; min-width: 0; }
.cp-block-h h2 small { margin-left: 8px; font-weight: var(--fw-regular); font-size: 12px; color: var(--muted); }

/* 状态色：草稿灰、待批黄、排着蓝、已发绿、先别发红、暂停深灰 */
.cp-st { display: inline-block; white-space: nowrap; padding: 1px 8px; border-radius: var(--radius-full); font-size: 12px; line-height: 1.6; border: 1px solid transparent; }
.cp-st.tone-muted { background: var(--neutral-bg); color: var(--neutral-fg); border-color: var(--neutral-border); }
.cp-st.tone-warn { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-border); }
.cp-st.tone-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-border); }
.cp-st.tone-good { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }
.cp-st.tone-bad { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.cp-late { margin-left: 6px; color: var(--danger-fg); font-size: 12px; white-space: nowrap; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-leg-dm { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* 日历：两周、每周 7 格 */
.cp-cal { display: flex; flex-direction: column; gap: 10px; }
.cp-week { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: stretch; }
.cp-week-h { font-size: 12px; color: var(--muted); padding-top: 6px; white-space: nowrap; }
.cp-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cp-day { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-height: 86px; display: flex; flex-direction: column; }
.cp-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cp-day.past { background: var(--surface-sunken); }
.cp-day-h { padding: 4px 8px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.cp-day-h b { color: var(--accent); font-weight: var(--fw-semibold); }
.cp-day-b { padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.cp-none { color: var(--text-disabled); font-size: 12px; padding: 2px 4px; }
.cp-ev { display: block; width: 100%; text-align: left; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius-sm);
  background: var(--surface); padding: 3px 6px; font: inherit; font-size: 12px; line-height: 1.45; cursor: pointer; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-ev:hover { background: var(--surface-hover); }
.cp-ev .t { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.cp-ev i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.cp-ev.tone-muted { border-left-color: var(--neutral-border); }
.cp-ev.tone-warn { border-left-color: var(--warning-fg); background: var(--warning-bg); }
.cp-ev.tone-info { border-left-color: var(--info-fg); background: var(--info-bg); }
.cp-ev.tone-good { border-left-color: var(--success-fg); background: var(--success-bg); }
.cp-ev.tone-bad { border-left-color: var(--danger-fg); background: var(--danger-bg); }
.cp-ev.late { box-shadow: inset 0 0 0 1px var(--danger-border); }
.cp-ev.dm { border-left-color: var(--border-strong); color: var(--muted); background: var(--surface); font-size: 11px; }
.cp-ev.on { outline: 2px solid var(--accent); outline-offset: 0; }

/* 看哪些：一排互斥的数字按钮（再点同一个 = 回到全部） */
.cp-views { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cp-views button { white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-full);
  padding: 3px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.cp-views button i { font-style: normal; margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-views button.on { border-color: var(--accent); background: var(--accent-soft-bg); color: var(--accent-soft-fg); font-weight: var(--fw-semibold); }

/* 按客户分组的表 */
.cp-cust { margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.cp-cust-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); }
.cp-cust-h h3 { margin: 0; font-size: 15px; }
.cp-cust-m { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--muted); }
.cp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; }
.cp-table th { text-align: left; font-weight: var(--fw-medium); color: var(--text-secondary); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap; background: var(--surface); }
.cp-table td { padding: 6px 10px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 22px; }
.cp-table tr:last-child td { border-bottom: 0; }
.cp-table th:nth-child(1), .cp-table td:nth-child(1) { width: 56px; text-align: center; }
.cp-table th:nth-child(2), .cp-table td:nth-child(2) { width: 108px; font-variant-numeric: tabular-nums; }
.cp-table th:nth-child(3), .cp-table td:nth-child(3) { width: 150px; }
.cp-table th:nth-child(4), .cp-table td:nth-child(4) { width: 96px; }
.cp-table th:nth-child(6), .cp-table td:nth-child(6) { width: 168px; }
.cp-table th:nth-child(7), .cp-table td:nth-child(7) { width: 200px; }
.cp-row { cursor: pointer; }
.cp-row:hover td { background: var(--surface-hover); }
.cp-row.on td { background: var(--surface-selected); }
.cp-row.draft td { color: var(--text-secondary); }

/* 右边面板 */
.cp-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface-raised); border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3); z-index: var(--z-modal); overflow-y: auto; }
.cp-panel-head { position: sticky; top: 0; z-index: 2; background: var(--surface-raised); border-bottom: 1px solid var(--border-subtle); }
.cp-panel-top { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 6px; }
.cp-panel-title { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.5; }
.cp-p-topic { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.cp-panel-acts { padding: 4px 14px 10px; }
.cp-acts-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cp-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.cp-flash { margin: 8px 0 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--success-bg); color: var(--success-fg); font-size: 13px; }
.cp-form { margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cp-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.cp-form input { height: 34px; padding: 4px 10px; border: 1px solid var(--border-control); border-radius: var(--radius-sm); font: inherit; font-size: 14px;
  background: var(--surface); color: var(--ink); }
.cp-form input:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; }
.cp-form-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cp-form-msg { flex: 1 1 auto; font-size: 12px; color: var(--danger-fg); }
.cp-panel-body { padding: 4px 14px 40px; }
.cp-panel-body h5 { margin: 14px 0 6px; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.cp-kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 13px; line-height: 1.6; padding: 1px 0; }
.cp-kv .k { color: var(--muted); }
.cp-kv .v { min-width: 0; overflow-wrap: anywhere; }
.cp-text, .cp-log { margin: 0; padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-sunken);
  white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-sans); font-size: 13px; line-height: 1.6; color: var(--ink); }
.cp-text.zh { background: var(--surface); }
.cp-log { font-size: 12px; color: var(--text-secondary); }
.cp-why { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; }
.cp-copy { border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-full); padding: 0 10px;
  font: inherit; font-size: 12px; cursor: pointer; line-height: 1.7; }
.cp-copy:hover { border-color: var(--accent); color: var(--accent); }

.cp-how { margin: 18px 0 0; font-size: 13px; color: var(--text-secondary); }
.cp-how summary { cursor: pointer; }
.cp-how ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }

/* 窄窗口（≈770，侧栏变顶部横条）：日历一周两排 */
@media (max-width: 900px) {
  .cp-week { grid-template-columns: 1fr; }
  .cp-week-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cp-table th:nth-child(3), .cp-table td:nth-child(3) { display: none; }
  .cp-table th:nth-child(7), .cp-table td:nth-child(7) { width: 140px; }
}

/* 手机：日历一天一行（没有事的过去日子收起），表格排成小卡 */
@media (max-width: 640px) {
  .cp-app { padding: 12px 12px 60px; }
  .cp-week-days { grid-template-columns: 1fr; }
  .cp-day { min-height: 0; flex-direction: row; align-items: flex-start; }
  .cp-day-h { border-bottom: 0; border-right: 1px solid var(--border-subtle); width: 92px; flex: none; white-space: nowrap; }
  .cp-day-b { flex: 1 1 auto; min-width: 0; }
  .cp-day.empty.past { display: none; }
  .cp-table thead { display: none; }
  .cp-table, .cp-table tbody, .cp-table tr { display: block; width: 100%; }
  .cp-table tr { padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); }
  .cp-table td { display: none; padding: 0; border: 0; height: auto; white-space: normal; width: auto !important; text-align: left !important; }
  .cp-table td[data-l="主题"] { display: block; font-size: 14px; color: var(--ink); }
  .cp-table td[data-l="计划（北京）"], .cp-table td[data-l="状态"] { display: inline-block; margin: 4px 8px 0 0; font-size: 12px; }
  .cp-table td[data-l="客户回了"] { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .cp-table td[data-l="客户回了"].is-empty { display: none; }
  .cp-panel { width: 100vw; }
  .cp-form input { font-size: 16px; }
}

/* 客户 × 进度（Edmond 10-24）：一行一个客户（客户那一列横着滚也钉在左边），往右一格一条；格子左边一道色 = 状态 */
.cp-mx-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.cp-mx { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.cp-mx th, .cp-mx td { vertical-align: top; text-align: left; border-bottom: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
.cp-mx thead th { padding: 6px 10px; font-weight: var(--fw-medium); color: var(--text-secondary); background: var(--surface-sunken); white-space: nowrap; }
.cp-mx th.c { position: sticky; left: 0; z-index: 2; width: 168px; min-width: 168px; padding: 8px 10px; background: var(--surface); font-weight: var(--fw-regular); }
.cp-mx thead th.c { z-index: 3; background: var(--surface-sunken); }
.cp-mx th.c b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.cp-mx th.c span { display: block; color: var(--muted); line-height: 1.5; }
.cp-mx td.now { width: 170px; min-width: 170px; padding: 8px 10px; line-height: 1.5; background: var(--surface); }
.cp-mx td.now p { margin: 0 0 3px; }
.cp-mx-rep { color: var(--success-fg); }
.cp-mx-wait { color: var(--warning-fg); }
.cp-mx-why { margin: 4px 0 0; color: var(--muted); }
.cp-mx-cell { width: 230px; min-width: 230px; max-width: 230px; padding: 8px 10px; cursor: pointer; border-left: 3px solid transparent; line-height: 1.5; background: var(--surface); }
.cp-mx-cell:hover { background: var(--surface-hover); }
.cp-mx-cell.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.cp-mx-cell.late { box-shadow: inset 0 0 0 1px var(--danger-border); }
.cp-mx-cell.tone-muted { border-left-color: var(--neutral-border); color: var(--text-secondary); }
.cp-mx-cell.tone-warn { border-left-color: var(--warning-fg); }
.cp-mx-cell.tone-info { border-left-color: var(--info-fg); }
.cp-mx-cell.tone-good { border-left-color: var(--success-fg); }
.cp-mx-cell.tone-bad { border-left-color: var(--danger-fg); }
.cp-mx-cell .d { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.cp-mx-cell .t { font-variant-numeric: tabular-nums; color: var(--text-secondary); white-space: nowrap; }
.cp-mx-cell .w { font-size: 13px; color: var(--ink); font-weight: var(--fw-medium); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cp-mx-cell .y { margin-top: 3px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cp-mx-cell .r { margin-top: 4px; color: var(--muted); }
.cp-mx-cell .r.good { color: var(--success-fg); }
.cp-mx-empty { min-width: 230px; background: var(--surface-sunken); }
.cp-mx tr.hold th.c, .cp-mx tr.hold td { background: var(--surface-sunken); }
.cp-mx tbody tr:last-child th, .cp-mx tbody tr:last-child td { border-bottom: 0; }
.cp-mx-key { margin: -2px 0 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) {
  .cp-mx th.c { width: 118px; min-width: 118px; }
  .cp-mx td.now { width: 128px; min-width: 128px; }
  .cp-mx-cell, .cp-mx-empty { width: 200px; min-width: 200px; max-width: 200px; }
}

/* 链接点了没（app/push_links.py，10-24） */
.cp-q { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; font-size: 11px;
  color: var(--muted); border: 1px solid var(--border-subtle); cursor: help; vertical-align: 1px; }
.cp-lk { padding: 8px 10px; margin: 6px 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; }
.cp-lk-t { color: var(--ink); overflow-wrap: anywhere; }
.cp-lk-k { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.cp-lk-n { font-weight: var(--fw-medium); color: var(--ink-2); }
.cp-lk-n.good { color: var(--success-fg); }
.cp-lk-u { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; overflow-wrap: anywhere; }
.cp-lk-r { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; color: var(--text-secondary); }
.cp-lk-r li { display: grid; grid-template-columns: 88px 38px 1fr; gap: 6px; }
.cp-lk-r .w.good { color: var(--success-fg); }

/* 配图（10-24 晚） */
.cp-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.cp-imgs a { display: block; width: 132px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-sunken); }
.cp-imgs img { display: block; width: 100%; height: auto; }
.cp-img-n { display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-2); font-size: 11px; font-weight: normal; white-space: nowrap; }
