/* ============================================================
   company-canvas.css — 公司全景·战略画布（里程碑航线）
   夜色画布：红色脊线钉公司里程碑，牛皮纸项目节点挂在下方；数据只在节点颜色、悬停与下钻里出现。
   ============================================================ */
.cv-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin: 6px 0 12px; flex-wrap: wrap; }
.cv-hero .case-title { margin: 6px 0 6px; }
.cv-lede { margin: 0; color: var(--text-2); max-width: 64ch; line-height: 1.6; }
.cv-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cv-seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 3px; }
.cv-seg button { font: inherit; border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.cv-seg button[aria-selected="true"] { background: var(--surface); color: var(--text-1); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.cv-seg-sm button { font-size: 13px; padding: 5px 12px; }
.cv-data-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--sep); border-radius: 12px; padding: 10px 14px; }
.cv-data-head p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.6; flex: 1 1 320px; }

.cv-shell { position: relative; border-radius: 12px; overflow: hidden; background: var(--case-night); box-shadow: 0 20px 50px rgba(18, 20, 25, .3); }
.cv-shell.cv-full { position: fixed; inset: 0; z-index: 2000; border-radius: 0; display: flex; flex-direction: column; }
.cv-shell.cv-full .cv-vp { flex: 1; height: auto; }
html.tg-lock:has(.cv-shell.cv-full) .modal-overlay { z-index: 2100; }
.fx-enter:has(.cv-shell.cv-full) { animation: none !important; opacity: 1 !important; transform: none !important; }
.cv-bar { display: flex; justify-content: space-between; gap: 8px 10px; align-items: center; padding: 8px 10px; background: #0D0F13; color: #E8E2D6; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, .06); }
.cv-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: #9C978C; }
.cv-legend i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.cv-k-link { width: 18px; border-top: 2px solid #E7DCC4; }
.cv-k-dot { width: 9px; height: 9px; border-radius: 50%; background: #D99A2B; }
#cv-hidden-note { color: #E9A39C; }
.cv-cam { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-family: var(--case-mono); font-size: 12px; color: #D9D3C7; }
.cv-cam .btn { background: rgba(255, 255, 255, .08); color: #F1EDE4; border-color: transparent; }
.cv-cam .btn:hover { background: rgba(255, 255, 255, .16); }

.cv-vp { position: relative; height: calc(100vh - 290px); min-height: 480px; overflow: hidden; cursor: grab; touch-action: none;
  background: radial-gradient(ellipse at 25% 0%, rgba(200, 48, 42, .10), transparent 50%),
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 48px 48px, #14171D; }
.cv-vp.dragging { cursor: grabbing; }
.cv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-world > * { position: absolute; }
.cv-loading { left: 40px; top: 60px; color: #D9D3C7; }
/* 时间轴钉在画布顶边 */
.cv-axis { position: absolute; left: 0; right: 0; top: 0; height: 34px; background: rgba(13, 15, 19, .94); border-bottom: 1px solid rgba(255, 255, 255, .08); z-index: 8; overflow: hidden; pointer-events: none; }
.cv-axis span { position: absolute; top: 0; height: 34px; padding: 9px 8px 0; font-family: var(--case-mono); font-size: 12px; color: #9C978C; border-left: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; }
.cv-axis .cv-ax-month { color: #E8E2D6; font-weight: 700; }
.cv-axis .cv-ax-today { color: #FF5A4E; border-left: 2px solid #FF5A4E; font-weight: 700; }
.cv-month { width: 0; border-left: 1px solid rgba(255, 255, 255, .05); }
.cv-today { width: 0; border-left: 2px solid rgba(255, 90, 78, .55); }
.cv-spine { height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(200, 48, 42, .25), #C8302A 6%, #C8302A 94%, rgba(200, 48, 42, .25)); box-shadow: 0 0 18px rgba(200, 48, 42, .45); }
.cv-spine-label { font-family: var(--case-mono); font-size: 11.5px; letter-spacing: .14em; color: #E9A39C; }

/* 里程碑 */
.cv-ms { background: none; border: 0; padding: 0; cursor: pointer; text-align: center; z-index: 5; font: inherit; color: inherit; display: flex; flex-direction: column; align-items: center; }
.cv-pin { width: 18px; height: 18px; flex: none; margin-bottom: 8px; transform: rotate(45deg); background: #C8302A; border: 2px solid #FFD9D5; box-shadow: 0 0 0 5px rgba(200, 48, 42, .25); }
.cv-ms-done .cv-pin { background: #3E9B63; border-color: #CDEBD8; box-shadow: 0 0 0 5px rgba(62, 155, 99, .22); }
.cv-ms-todo .cv-pin, .cv-ms-dropped .cv-pin { background: #14171D; border-color: #E9A39C; }
.cv-stem { width: 0; border-left: 2px dotted rgba(233, 163, 156, .55); margin-top: -8px; flex: none; }
.cv-tag { display: block; width: 100%; height: 104px; overflow: hidden; background: #E7DCC4; color: #1E1B16; border-radius: 3px 10px 4px 4px; padding: 8px 10px 9px; box-shadow: 0 10px 22px rgba(0, 0, 0, .45); text-align: left; }
.cv-date { font-family: var(--case-mono); font-size: 12px; color: #C8302A; font-weight: 700; }
.cv-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--case-serif); font-weight: 800; font-size: 15px; line-height: 1.35; margin-top: 2px; }
.cv-s { display: block; font-size: 12px; color: #5C4422; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-ms-dropped .cv-tag { opacity: .6; }
.cv-ms-dropped .cv-t { text-decoration: line-through; }
.cv-ms:hover .cv-tag, .cv-ms.sel .cv-tag { outline: 2px solid #FF5A4E; }
.cv-slot { border: 1.5px dashed rgba(232, 226, 214, .35); border-radius: 10px; padding: 10px 12px; color: #9C978C; font: inherit; font-size: 12.5px; line-height: 1.5; background: rgba(255, 255, 255, .02); cursor: pointer; text-align: left; z-index: 5; }
.cv-slot b { color: #E8E2D6; display: block; font-size: 13px; margin-bottom: 2px; }
.cv-tray { border: 1.5px dashed rgba(232, 226, 214, .22); border-radius: 14px; pointer-events: none; }
.cv-tray > span { position: absolute; top: -10px; left: 14px; background: #14171D; padding: 0 8px; font-family: var(--case-mono); font-size: 11.5px; color: #E9A39C; letter-spacing: .1em; }
.cv-empty { width: 340px; background: rgba(255, 255, 255, .04); border: 1.5px dashed rgba(232, 226, 214, .35); border-radius: 12px; padding: 14px 16px; color: #C9C3B7; font-size: 13.5px; line-height: 1.6; }
.cv-empty b { display: block; color: #F1EDE4; font-size: 15px; margin-bottom: 4px; }

/* 项目节点 */
.cv-node { background: #F7F1E4; color: #1E1B16; border: 0; border-radius: 4px 12px 6px 6px; padding: 12px 14px; text-align: left; cursor: pointer; z-index: 6; font: inherit;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(90, 60, 25, .2); transition: transform .15s, box-shadow .15s; display: block; height: 132px; overflow: hidden; }
.cv-node::before { content: ""; position: absolute; left: 16px; top: -1px; width: 92px; height: 5px; border-radius: 0 0 6px 6px; background: #C9A877; }
.cv-node:hover, .cv-node.sel { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(0, 0, 0, .6), 0 0 0 2px #FF5A4E; }
.cv-no { font-family: var(--case-mono); font-size: 11px; color: #8A6A3E; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cv-nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--case-serif); font-weight: 800; font-size: 16px; line-height: 1.35; margin: 3px 0 8px; }
.cv-health { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.cv-health::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.h-red { color: #C8302A; } .h-warn { color: #B97D12; } .h-ok { color: #3E9B63; } .h-idle { color: #8F877A; }
.cv-meter { display: block; height: 5px; border-radius: 3px; background: rgba(90, 60, 25, .16); overflow: hidden; }
.cv-meter i { display: block; height: 100%; background: #3E9B63; }
.cv-next { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: #5C4422; margin-top: 7px; line-height: 1.5; }
.cv-next b { font-family: var(--case-mono); color: #C8302A; }
.cv-span { height: 6px; border-radius: 3px; background: rgba(231, 220, 196, .18); z-index: 2; }
.cv-span i { position: absolute; top: -3px; width: 2px; height: 12px; background: #E7DCC4; }
.cv-span em { position: absolute; top: 9px; transform: translateX(-50%); font-style: normal; font-family: var(--case-mono); font-size: 10.5px; color: #9C978C; white-space: nowrap; }
.cv-hidden { width: 220px; border: 1.5px dashed rgba(232, 226, 214, .3); border-radius: 10px; padding: 14px; color: #E8E2D6; font-size: 14px; line-height: 1.55; }
.cv-hidden b { font-family: var(--case-mono); color: #FF5A4E; font-size: 18px; }
.cv-hidden span { color: #9C978C; font-size: 12px; }
.cv-links { left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 4; }
.cv-lk { fill: none; stroke: #E7DCC4; stroke-width: 2; opacity: .55; }
.cv-lk.hot { opacity: 1; stroke: #FFE7B8; stroke-width: 2.6; }
.cv-world .dim { opacity: .25; }

/* 悬停卡 */
.cv-tip { position: fixed; z-index: 2050; width: 300px; background: var(--surface); color: var(--text-1); border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, .35); pointer-events: none; font-size: 12.5px; line-height: 1.55; }
.cv-tip h4 { margin: 0 0 6px; font-family: var(--case-serif); font-size: 14.5px; }
.cv-tip dl, .cv-dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.cv-tip dt, .cv-dl dt { color: var(--text-2); }
.cv-tip dd, .cv-dl dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cv-tip-foot { margin-top: 8px; color: var(--text-2); border-top: 1px solid var(--sep); padding-top: 6px; }

/* 抽屉：下钻与里程碑维护 */
.cv-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); color: var(--text-1); z-index: 20; box-shadow: -20px 0 50px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .28s var(--ease-spring); visibility: hidden; }
.cv-drawer.open { transform: none; visibility: visible; }
.cv-dh { padding: 14px 18px 10px; border-bottom: 1px solid var(--sep); display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cv-dh h3 { margin: 2px 0 0; font-family: var(--case-serif); font-size: 20px; text-wrap: balance; overflow-wrap: anywhere; }
.cv-db { padding: 14px 18px 20px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.cv-x { border: 0; background: var(--fill); color: var(--text-1); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; flex: none; font: inherit; }
.cv-crumb { font-size: 12px; color: var(--text-2); }
.cv-crumb b { color: var(--case-red); font-weight: 600; }
.cv-desc { margin: 0; color: var(--text-2); line-height: 1.6; }
.cv-muted { color: var(--text-2); font-size: 13px; margin: 0; }
.cv-loading-dark { color: var(--text-2); }
.cv-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cv-kv div { background: var(--fill); border-radius: 8px; padding: 8px 10px; }
.cv-kv b { display: block; font-family: var(--case-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.cv-kv span { font-size: 12px; color: var(--text-2); }
.cv-kv .r b { color: var(--case-red); }
.cv-sec h5 { margin: 0 0 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.cv-ms-line { font-size: 13.5px; line-height: 1.6; }
.cv-ms-line b { font-family: var(--case-mono); color: var(--case-red); }
.cv-ms-line span { color: var(--text-2); }
.cv-keys { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cv-keys li { display: grid; grid-template-columns: 54px 1fr; gap: 8px; }
.cv-keys time { font-family: var(--case-mono); color: var(--case-red); font-weight: 700; }
.cv-mini { background: #14171D; border-radius: 10px; padding: 10px 10px 12px; color: #E8E2D6; overflow-x: auto; }
.cv-mini-grid { position: relative; min-width: 480px; }
.cv-mini-head, .cv-mini-row { display: grid; grid-template-columns: 128px 1fr; }
.cv-mini-head { font-family: var(--case-mono); font-size: 10.5px; color: #9C978C; height: 18px; }
.cv-mini-head div { position: relative; }
.cv-mini-head span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.cv-mini-row { align-items: center; height: 26px; border-top: 1px solid rgba(255, 255, 255, .05); }
.cv-ln { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.cv-tr { position: relative; height: 100%; }
.cv-bar2 { position: absolute; top: 6px; height: 14px; border-radius: 3px; background: rgba(231, 220, 196, .55); font-family: var(--case-mono); font-size: 10.5px; color: #1E1B16; padding-left: 4px; line-height: 14px; white-space: nowrap; min-width: 18px; }
.cv-bar2.ext { background: rgba(255, 90, 78, .55); color: #FFF; }
.cv-bar2 b { color: #C8302A; } .cv-bar2.ext b { color: #FFF; }
.cv-mini-keys { position: absolute; left: 128px; right: 0; top: 18px; bottom: 0; pointer-events: none; }
.cv-mini-key { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed rgba(255, 90, 78, .7); }
.cv-go-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-form { display: flex; flex-direction: column; gap: 10px; }
.cv-form label, .cv-label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.cv-form input:not([type=checkbox]), .cv-form textarea, .cv-form select { font: inherit; font-size: 14px; color: var(--text-1); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--sep-strong); background: var(--surface); }
.cv-form textarea { min-height: 70px; resize: vertical; }
.cv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-checks { display: flex; flex-direction: column; gap: 6px; }
.cv-checks label { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text-1); font-size: 13.5px; cursor: pointer; }
.cv-checks input { margin-top: 3px; flex: none; }
.cv-checks b { font-family: var(--case-mono); color: var(--case-red); }
.cv-perm { font-size: 12px; color: var(--text-2); background: var(--case-red-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.6; margin: 0; }
.btn-danger-ghost { color: var(--case-red); }

@media (max-width: 760px) {
  .cv-vp { height: calc(100vh - 250px); min-height: 420px; }
  .cv-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-row2 { grid-template-columns: 1fr; }
  .cv-drawer { width: 100%; }
  .cv-hero .cv-acts { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cv-drawer, .cv-node { transition: none; } }

/* 长期战略目标：横贯画布的色带（企业主自己写；没有时是“由你来安”的虚线槽） */
.cv-goal { display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; border-radius: 18px; cursor: pointer; z-index: 3; font: inherit; text-align: left;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gc) 42%, transparent), color-mix(in srgb, var(--gc) 14%, transparent) 60%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gc) 65%, transparent); color: #F1EDE4; }
.cv-goal:hover, .cv-goal.sel { box-shadow: inset 0 0 0 2px var(--gc), 0 0 18px color-mix(in srgb, var(--gc) 45%, transparent); }
.cv-goal-t { font-family: var(--case-serif); font-weight: 800; font-size: 16px; white-space: nowrap; }
.cv-goal-s { font-size: 12px; color: #C9C3B7; white-space: nowrap; }
.cv-goal-empty { background: rgba(255,255,255,.03); box-shadow: none; border: 1.5px dashed rgba(232,226,214,.4); }
.cv-goal-empty:hover { border-color: #FF5A4E; box-shadow: none; }
.cv-ms-goal .cv-pin { background: var(--gc); border-color: #F7F1E4; box-shadow: 0 0 0 5px color-mix(in srgb, var(--gc) 30%, transparent); }
.cv-glk { fill: none; stroke-width: 2.4; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .85; }
.cv-glk-p { stroke-dasharray: 6 6; opacity: .6; }
.cv-gdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.cv-start { width: 420px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.cv-start b { font-size: 17px; }
.cv-start-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cv-start-list { position: static; width: auto; margin-bottom: 12px; }
.cv-gcard { border-left: 5px solid var(--gc) !important; }
.cv-goal-rep { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--case-serif); font-weight: 700; font-size: 14px; color: rgba(241,237,228,.55); white-space: nowrap; }
.cv-start .btn:not(.btn-primary) { background: rgba(255,255,255,.12); color: #F1EDE4; border-color: rgba(255,255,255,.2); }
.cv-start-list .btn:not(.btn-primary) { background: var(--surface); color: var(--text-1); border-color: var(--sep-strong); }
