/* 页面专属样式：cockpit（IP 运营驾驶舱 ck-、选题思维导图 mm-） */

/* ================= 驾驶舱 ================= */
.ck-page { min-width: 0; }
.ck-h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ck-h1-badges { display: inline-flex; gap: 6px; align-items: center; }
.ck-ip-switch { width: auto; min-width: 150px; height: 36px; background-color: #fff; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ck-card { min-width: 0; }
.ck-card .card-title { flex-wrap: wrap; margin-bottom: 14px; }
.ck-card .card-title h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; }
.ck-card .card-title h3 small { margin-left: 0; font-size: 13px; }
.ck-title-badge { display: inline-flex; }

/* IP 选择卡片 */
.ck-pick { display: flex; flex-direction: column; gap: 7px; text-align: left; width: 100%; font-size: 14px; color: var(--ink-2); }
.ck-pick-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ck-pick-head b { display: block; font-size: 17px; color: #264763; line-height: 1.3; }
.ck-pick-head small { display: block; color: var(--muted); font-size: 13px; }
.ck-pick-kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
.ck-pick-kv > span:first-child { color: var(--muted); }

/* 1. 当前状态 */
.ck-tiles { display: grid; grid-template-columns: minmax(0, .8fr) repeat(3, minmax(0, 1.2fr)); gap: 12px; }
.ck-tile { background: var(--soft); border: 1px solid var(--soft-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ck-tile > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.ck-tile > div { font-size: 15px; color: #2c4d6a; font-weight: 600; line-height: 1.55; }
.ck-tile-stage { background: linear-gradient(150deg, #2f6aa3, #4f92d2); border-color: transparent; }
.ck-tile-stage > span { color: #cfe4f7; }
.ck-tile-stage > div { color: #fff; font-size: 18px; }
.ck-tile-stage .pending { color: #ffe3b3; }
.ck-tile-warn { background: var(--warn-bg); border-color: #f3dfb8; }
.ck-tile-warn > div { color: #7a4f10; }
.ck-profs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ck-prof-k { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 3px; }
.ck-prof-v { font-size: 14.5px; color: var(--ink-2); }

/* 2. 内容进度 */
.ck-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ck-stat { text-align: left; width: 100%; transition: border-color .12s, box-shadow .12s, background .12s; }
.ck-stat b { font-size: 28px; }
.ck-stat span { font-size: 13px; }
.ck-stat.is-zero b { color: var(--faint); }
.ck-stat.active { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(90, 155, 214, .16); }
.ck-tip { margin-top: 10px; font-size: 13px; color: var(--muted); }
.ck-bucket { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 6px; background: #fbfdff; }
.ck-sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ck-sub-head b { font-size: 14.5px; color: #2c4d6a; }
.ck-sub-head b small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }
.ck-row, .ck-ev { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 9px; border-bottom: 1px solid #eef4fa; font-size: 14px; color: var(--ink-2); }
.ck-row:last-child, .ck-ev:last-child { border-bottom: 0; }
.ck-row:hover, .ck-ev:hover { background: var(--soft); }
.ck-row b { display: block; font-size: 14.5px; color: #2f506c; font-weight: 600; }
.ck-row-sub { display: block; font-size: 13px; color: var(--muted); }
.ck-part { font-weight: 400; font-size: 12.5px; color: var(--brand-ink); background: var(--soft-2); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.ck-late { color: var(--danger); }
.ck-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px 30px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ck-ev-date { flex: none; width: 104px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ck-ev-date small { margin-left: 4px; color: var(--brand); font-weight: 600; font-size: 12px; }
.ck-ev-date.is-today { color: var(--brand-ink); font-weight: 600; }
.ck-ev-label { flex: none; font-size: 12.5px; padding: 1px 8px; border-radius: 7px; background: var(--soft-2); color: #4f7ba3; }
.ck-ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2f506c; }
.ck-ev-owner { flex: none; font-size: 13px; color: var(--muted); }
.ck-ev.is-done .ck-ev-title { color: var(--muted); }
.ck-none { padding: 14px 12px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 13.5px; background: #fbfdff; }
.ck-unavail { margin: 4px 0; }

/* 4 / 5. 观察和灵感、复盘反馈 */
.ck-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 26px; }
.ck-note { display: block; width: 100%; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid #eef4fa; background: none; font-size: 14px; color: var(--ink-2); }
.ck-note:last-child { border-bottom: 0; }
.ck-note > b { display: block; font-size: 14.5px; color: #2f506c; }
.ck-note p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.ck-note-click { border-radius: 9px; padding: 10px 8px; margin: 0 -8px; width: calc(100% + 16px); }
.ck-note-click:hover { background: var(--soft); }
.ck-note-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 3px; }
.ck-quote { font-size: 14.5px; color: #2f506c; line-height: 1.6; }
.ck-k { display: inline-block; font-size: 12.5px; color: #5b85aa; background: var(--soft-2); border-radius: 6px; padding: 0 6px; margin-right: 6px; }
.ck-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ck-sum > div { background: var(--soft); border: 1px solid var(--soft-2); border-radius: 10px; padding: 8px 10px; }
.ck-sum b { display: block; font-size: 19px; color: var(--brand-ink); line-height: 1.3; }
.ck-sum span { font-size: 12.5px; color: var(--muted); }
.ck-future { margin-top: 10px; font-size: 13px; color: var(--muted); border-left: 3px solid var(--line-2); padding-left: 10px; }

/* 6. 简报 */
.ck-briefcard { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, #f4f9ff, #ffffff 60%); }
.ck-briefcard h3 { font-size: 17px; color: #2c4d6a; }
.ck-briefcard p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.modal-body.ck-brief { max-height: calc(100vh - 12vh - 210px); min-height: 200px; overflow-y: auto; }
.ck-brief-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ck-brief-sec { padding: 12px 0 4px; border-top: 1px solid var(--line); }
.ck-brief-sec:first-of-type { border-top: 0; }
.ck-brief-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #2c4d6a; margin-bottom: 4px; }
.ck-brief-sec ul { margin: 0; padding-left: 20px; }
.ck-brief-sec li { font-size: 14px; color: var(--ink-2); line-height: 1.75; word-break: break-word; }
.ck-brief-sec li.is-none { color: #b98a4a; list-style: none; margin-left: -20px; }
.ck-brief-ai { background: #faf9ff; border: 1px solid #e3def8; border-radius: 12px; padding: 14px 16px; margin: 12px 0 8px; }
.ck-ai-text { font-size: 14.5px; color: var(--ink); margin-top: 10px; line-height: 1.8; }
.ck-ai-off { font-size: 13px; color: var(--muted); align-self: center; }

/* ================= 思维导图 ================= */
.mm { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.mm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfdff; }
.mm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mm-hint { font-size: 13px; color: var(--muted); }
.mm-save { font-size: 13px; color: var(--muted); min-width: 62px; text-align: right; }
.mm-save.is-ok { color: var(--ok); }
.mm-save.is-failed { color: var(--danger); }
.mm-zoom { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: #fff; height: 30px; }
.mm-zoom button { border: 0; background: none; height: 100%; min-width: 30px; padding: 0 9px; color: #456f95; font-size: 14px; }
.mm-zoom button:hover { background: var(--soft); }
.mm-zoom button + button, .mm-zoom span { border-left: 1px solid var(--line); }
.mm-zoom span { display: inline-flex; align-items: center; justify-content: center; height: 100%; min-width: 52px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mm-zoom span + button { border-left: 1px solid var(--line); }
.mm-menu-wrap { position: relative; }
.mm-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; width: 236px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.mm-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; }
.mm-menu button:hover { background: var(--soft); }
.mm-menu b { display: block; font-size: 14px; color: #2c4d6a; }
.mm-menu span { display: block; font-size: 12.5px; color: var(--muted); }

.mm-body { display: flex; min-height: 0; min-width: 0; }
.mm-stage { position: relative; flex: 1; min-width: 0; background-color: #f7fbff; background-image: radial-gradient(#dbe8f4 1px, transparent 1px); background-size: 22px 22px; }
.mm-viewport { overflow: auto; height: calc(100vh - 262px); min-height: 440px; cursor: grab; outline: none; overscroll-behavior: contain; }
.mm-viewport.is-panning { cursor: grabbing; }
.mm-compact .mm-viewport { height: 440px; min-height: 0; }
.mm-sizer { position: relative; min-width: 100%; min-height: 100%; }
.mm-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.mm-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mm-links path { fill: none; stroke-width: 2; stroke-linecap: round; opacity: .75; }
.mm-nodes { position: absolute; inset: 0; }
.mm-cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(247, 251, 255, .92); z-index: 5; }
.mm-cover-box { max-width: 420px; text-align: center; padding: 16px; }

.mm-node { position: absolute; left: 0; top: 0; width: max-content; min-width: 118px; max-width: 260px; background: #fff; border: 1px solid var(--line-2); border: 1px solid color-mix(in srgb, var(--mm-c) 46%, #fff); border-left: 5px solid var(--mm-c); border-radius: 11px; padding: 7px 13px 7px 11px; box-shadow: 0 2px 8px rgba(74, 126, 176, .1); cursor: pointer; outline: none; transition: box-shadow .12s; }
.mm-node:hover { box-shadow: 0 5px 16px rgba(74, 126, 176, .2); }
.mm-node-title { font-size: 14px; font-weight: 600; color: #2c4d6a; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere; }
.mm-node-meta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mm-compact .mm-node { padding: 6px 12px 6px 10px; }
.mm-sel { box-shadow: 0 0 0 3px rgba(90, 155, 214, .38), 0 6px 18px rgba(74, 126, 176, .2); border-color: var(--brand-2); border-left-color: var(--mm-c); }
.mm-node:focus-visible { box-shadow: 0 0 0 3px rgba(63, 127, 191, .55), 0 6px 18px rgba(74, 126, 176, .2); }
.mm-root { border: 0; border-radius: 14px; padding: 12px 18px; max-width: 250px; background: linear-gradient(150deg, #2a5f96, #4f92d2); box-shadow: 0 8px 22px rgba(42, 95, 150, .28); }
.mm-compact .mm-root { padding: 10px 16px; }
.mm-root .mm-node-title { color: #fff; font-size: 16px; }
.mm-root .mm-node-meta, .mm-root .mm-note-ico { color: #d3e6f7; }
.mm-root.mm-sel { box-shadow: 0 0 0 3px rgba(143, 191, 230, .75), 0 8px 22px rgba(42, 95, 150, .28); }
.mm-st { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mm-st i, .mm-status i { width: 7px; height: 7px; border-radius: 50%; background: #a9bccc; flex: none; }
.mm-st-1 i { background: #5a9bd6; }
.mm-st-2 i { background: #2f9a72; }
.mm-st-3 i { background: #d9962f; }
.mm-st-4 i { background: #8494a3; }
.mm-st-2 { color: var(--ok); }
.mm-st-3 { color: var(--warn); }
.mm-root .mm-st { color: #d3e6f7; }
.mm-note-ico { white-space: nowrap; color: #7a94ab; }
.mm-plan-chip { border: 0; padding: 0 7px; height: 20px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mm-plan-chip:hover { background: #d3efe2; }
.mm-toggle { position: absolute; left: calc(100% - 2px); top: 50%; transform: translateY(-50%); min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; color: #5d86aa; font-size: 13px; line-height: 1; z-index: 2; }
.mm-toggle:hover { background: var(--soft-2); }
.mm-toggle.is-collapsed { background: var(--mm-c); border-color: var(--mm-c); color: #fff; font-size: 12px; font-weight: 600; }
.mm-inline { display: block; height: 28px; padding: 0 7px; border: 1px solid #8fbfe6; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(111, 170, 222, .2); user-select: text; -webkit-user-select: text; }

.mm-pop { position: absolute; z-index: 6; width: 290px; max-width: calc(100% - 16px); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; }
.mm-pop-title { font-size: 12.5px; color: var(--muted); padding: 2px 6px 6px; }
.mm-plan-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.mm-plan-item:hover { background: var(--soft); }
.mm-plan-item b { font-weight: 600; color: #2f506c; min-width: 0; word-break: break-word; }
.mm-plan-item span { flex: none; font-size: 12.5px; color: var(--brand-ink); background: var(--soft-2); border-radius: 8px; padding: 1px 8px; }

/* 编辑面板 */
.mm-panel { flex: none; width: 330px; border-left: 1px solid var(--line); background: #fff; padding: 16px 16px 14px; overflow-y: auto; max-height: max(440px, calc(100vh - 262px)); display: flex; flex-direction: column; gap: 4px; }
.mm-panel:empty { display: none; }
.mm-panel .field { margin-bottom: 12px; }
.mm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-panel-head b { font-size: 15px; color: #2c4d6a; }
.mm-path { font-size: 13px; color: var(--muted); margin: 2px 0 12px; word-break: break-word; }
.mm-status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-status { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 15px; background: #fff; font-size: 13px; color: var(--ink-2); }
.mm-status:hover { background: var(--soft); }
.mm-status.active { background: var(--info-bg); border-color: #9cc6ea; color: var(--brand-ink); font-weight: 600; }
.mm-colors { display: flex; gap: 9px; flex-wrap: wrap; }
.mm-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); padding: 0; }
.mm-swatch:hover { transform: scale(1.08); }
.mm-swatch.active { box-shadow: 0 0 0 2px var(--brand-deep); }
.mm-meta { display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--muted); }
.mm-plan-box { display: flex; flex-direction: column; gap: 6px; background: var(--soft); border: 1px solid var(--soft-2); border-radius: 12px; padding: 12px; margin: 10px 0 12px; }
.mm-plan-title { font-size: 13.5px; font-weight: 600; color: var(--ok); }
.mm-plan-none { font-size: 13.5px; color: var(--muted); }
.mm-plan-box .mm-plan-item { background: #fff; border: 1px solid var(--line); }
.mm-plan-box .mm-plan-item:hover { border-color: #b9d6ee; }
.mm-plan-btn { width: 100%; margin-top: 2px; }
.mm-plan-hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* 紧凑模式（驾驶舱里）：编辑面板放到画布下方，分三栏 */
.mm-compact .mm-body { flex-direction: column; }
.mm-compact .mm-panel { width: auto; max-height: none; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: 4px 24px; overflow: visible; }
.mm-compact .mm-plan-box { margin-top: 0; }

.mm-page .page-head { margin-bottom: 14px; }

@media (max-width: 1280px) {
  .ck-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ck-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-compact .mm-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-compact .mm-panel-acts { grid-column: 1 / -1; }
  .mm-panel { width: 300px; }
}
@media (max-width: 820px) {
  .ck-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-tiles, .ck-profs, .ck-two, .ck-cols { grid-template-columns: minmax(0, 1fr); }
  .ck-ev { flex-wrap: wrap; }
  .ck-ev-title { white-space: normal; flex-basis: 100%; order: 3; }
  .mm-body { flex-direction: column; }
  .mm-panel, .mm-compact .mm-panel { width: auto; max-height: none; border-left: 0; border-top: 1px solid var(--line); display: flex; }
  .mm-viewport, .mm-compact .mm-viewport { height: 62vh; min-height: 320px; }
  .mm-hint { display: none; }
}

/* 打印运营简报：只打印弹窗里的简报正文 */
@media print {
  body.ck-print-brief .app { display: none !important; }
  body.ck-print-brief #overlays .overlay:not(.ck-brief-overlay) { display: none !important; }
  body.ck-print-brief .ck-brief-overlay { position: static; display: block; background: none; padding: 0; overflow: visible; animation: none; }
  body.ck-print-brief .ck-brief-overlay .modal { width: 100%; box-shadow: none; border-radius: 0; }
  body.ck-print-brief .modal-body.ck-brief { max-height: none; overflow: visible; }
  body.ck-print-brief .ck-brief-overlay .modal-foot, body.ck-print-brief .ck-brief-overlay .xbtn, body.ck-print-brief [data-copy-ai] { display: none !important; }
}
