/* 各视图的样式：人物墙、任务页、日志、版本历史、diff、模型、监控、设置 */

/* markdown 轻渲染 */
.md { line-height: 1.8; font-size: var(--fs-md); overflow-wrap: anywhere; }
.md p + p, .md ul + p, .md ol + p, .md p + ul, .md p + ol { margin-top: 12px; }
.md h2, .md h3, .md h4, .md h5 { font-family: var(--font-read); margin: 20px 0 8px; }
.md h2 { font-size: var(--fs-xl); } .md h3 { font-size: var(--fs-lg); } .md h4, .md h5 { font-size: var(--fs-md); }
.md ul { list-style: disc; padding-left: 24px; } .md ol { list-style: decimal; padding-left: 24px; }
.md li + li { margin-top: 4px; }
.md code { padding: 1px 6px; border-radius: 4px; background: var(--hover-2); font-size: .92em; }
.md pre { padding: 12px 16px; border-radius: var(--r-sm); background: var(--log-bg); color: var(--log-ink); overflow-x: auto; font-size: var(--fs-sm); }
.md pre code { background: none; padding: 0; }
.reply { padding: 20px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }

/* 人物卡片墙 */
.cwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ccard { display: flex; gap: 16px; align-items: flex-start; padding: 20px; color: var(--ink); text-decoration: none; }
.ccard:hover { text-decoration: none; }
.ccard__body { flex: 1; min-width: 0; }
.ccard__name { font: 600 var(--fs-lg)/1.4 var(--font-read); }
.ccard__sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--note); }
.ccard__bio { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.ccard__bio.is-empty { color: var(--muted); }
.ccard--add { flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; border: 2px dashed var(--line-2); border-radius: var(--r-md); color: var(--note); transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.ccard--add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* 任务页 */
.jobtools { display: flex; flex-direction: column; gap: 12px; padding: 16px; margin-bottom: 20px; background: var(--hover); border-radius: var(--r-md); }
.joblist { display: flex; flex-direction: column; gap: 12px; }
.jobrow { display: flex; align-items: center; gap: 16px; padding: 14px 20px; color: var(--ink); text-decoration: none; }
.jobrow:hover { text-decoration: none; }
.jobrow__main { flex: 1; min-width: 0; }
.jobrow__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobmeta { margin: -12px 0 16px; }
.jobprog { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.logbox { margin: 0; padding: 16px; max-height: 420px; min-height: 120px; overflow: auto; background: var(--log-bg); color: var(--log-ink); border-radius: var(--r-md); font: 400 var(--fs-sm)/1.7 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.issue__q { color: var(--ink-2); margin: 4px 0; font-family: var(--font-read); }
.followup { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.rawres { margin-top: 16px; }
.rawres summary { cursor: pointer; color: var(--note); font-size: var(--fs-sm); margin-bottom: 8px; }

/* 版本历史 */
.hist { display: flex; flex-direction: column; gap: 12px; }
.hist__item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist__top { display: flex; align-items: center; gap: 8px; }
.hist__rev { font: 500 var(--fs-xs)/1 var(--font-mono); padding: 3px 6px; border-radius: 4px; background: var(--hover-2); color: var(--ink-2); }
.hist__time { font-size: var(--fs-xs); color: var(--note); }
.hist__msg { margin: 8px 0; line-height: 1.6; overflow-wrap: anywhere; }
.hist__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hist__diff { margin-top: 8px; }
.diff { margin: 0; padding: 8px 0; max-height: 360px; overflow: auto; background: var(--hover); border-radius: var(--r-sm); font: 400 var(--fs-xs)/1.7 var(--font-mono); }
.diff__ln { display: block; padding: 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff__add { background: var(--ok-bg); color: var(--ok); }
.diff__del { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.diff__hunk { color: var(--run); }
.diff__meta { color: var(--muted); }
.tl { position: relative; display: flex; flex-direction: column; gap: 4px; padding-left: 24px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl__item { position: relative; padding: 8px 0 16px; }
.tl__dot { position: absolute; left: -24px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.tl__head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--note); }
.tl__msg { margin: 4px 0 8px; line-height: 1.6; overflow-wrap: anywhere; }
.tl__files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 监控 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat__k { font-size: var(--fs-sm); color: var(--note); }
.stat__v { margin-top: 4px; font: 600 var(--fs-2xl)/1.3 var(--font-read); font-variant-numeric: tabular-nums; }
.stat__s { margin-top: 4px; font-size: var(--fs-xs); color: var(--note); }
.monpanel { display: flex; flex-direction: column; gap: 8px; }
.monpanel .sec-title { margin-bottom: 4px; }
.livecall { display: flex; align-items: center; gap: 8px; }
.events { display: flex; flex-direction: column; }
.events li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); line-height: 1.6; }
.events li:last-child { border-bottom: 0; }
.events time { flex: none; width: 88px; color: var(--note); font-variant-numeric: tabular-nums; }

/* 操作卡（评审、交付） */
.acard { display: flex; gap: 16px; align-items: flex-start; }
.acard__ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.acard__body { flex: 1; min-width: 0; }
.acard__title { font: 600 var(--fs-lg)/1.4 var(--font-read); }
.acard__text { margin-top: 4px; color: var(--ink-2); line-height: 1.7; }
.acard__act { flex: none; }
.checkout { display: flex; flex-direction: column; gap: 12px; }

/* 设置 */
.keys { display: grid; grid-template-columns: 96px 1fr; gap: 12px 16px; margin: 0; align-items: center; }
.keys dt { margin: 0; } .keys dd { margin: 0; color: var(--ink-2); }

@media (max-width: 759px) {
  .acard { flex-wrap: wrap; }
  .acard__act { width: 100%; }
  .events li { flex-direction: column; gap: 0; }
  .cwall { grid-template-columns: 1fr; }
}
