/* =====================================================================
   SJ 项目进度 · 样式（第三版：现代 SaaS，克制用色）
   规则：中性色打底，一个主色；红 / 琥珀 / 绿只用于小圆点、文字和 3px 细条，不铺底色。
   ===================================================================== */
:root {
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9;
  --line: #e2e8f0; --line-2: #cbd5e1;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --muted-2: #94a3b8;
  --primary: #0f172a; --primary-hover: #1e293b; --on-primary: #ffffff;
  --accent: #0369a1; --accent-soft: #e0f2fe;
  --red: #dc2626; --red-soft: #fef2f2; --amber: #d97706; --amber-soft: #fffbeb; --green: #16a34a; --green-soft: #f0fdf4;
  --radius: 8px; --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05); --shadow-md: 0 4px 12px rgba(15, 23, 42, .08); --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
  --focus: 0 0 0 3px rgba(3, 105, 161, .22);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.5 "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", -apple-system, "Microsoft YaHei", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12px; } .spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }

/* ---- 控件 ---- */
button, a.btn { font: inherit; cursor: pointer; white-space: nowrap; border-radius: var(--radius-sm); height: 34px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
button:hover, a.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
button:focus-visible, a.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--accent); }
button.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 500; }
button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button.danger { color: var(--red); } button.danger:hover { background: var(--red-soft); border-color: #fecaca; }
button.link { border: none; background: none; color: var(--accent); padding: 0 6px; height: auto; }
button.sm, a.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0 10px; height: 34px; transition: border-color .15s ease, box-shadow .15s ease; }
input.sm, select.sm { height: 30px; font-size: 12px; padding: 0 8px; }
textarea { padding: 8px 10px; height: auto; min-height: 70px; resize: vertical; line-height: 1.55; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 8px 16px; border-radius: var(--radius-sm); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; box-shadow: var(--shadow-md); }
.toast.show { opacity: 1; }

/* ---- 语义小件：圆点、标签、日期 ---- */
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.bd { display: inline-flex; align-items: center; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; vertical-align: middle; margin-left: 6px; }
.bd.new { color: var(--accent); border-color: #bae6fd; }
.bd.crit { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }   /* 关键路径：唯一一个实心的标签 */
.bd.chg { color: var(--text-2); }
.bd.delay { color: var(--amber); border-color: #fde68a; }
.bd.red { color: var(--red); border-color: #fecaca; }
.bd.done { color: var(--green); border-color: #bbf7d0; }
.dtag { display: inline-flex; align-items: center; font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
.dtag.red { color: var(--red); border-color: #fecaca; font-weight: 600; }
.dtag.orange { color: var(--amber); border-color: #fde68a; font-weight: 600; }
.dtag.grey { color: var(--muted-2); border-style: dashed; }
.dtag.done { color: var(--green); border-color: #bbf7d0; }
.pillc { font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pillc::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--muted-2); }
.pillc.red { color: var(--red); } .pillc.red::before { background: var(--red); }
.pillc.orange { color: var(--amber); } .pillc.orange::before { background: var(--amber); }
.pillc.grey { color: var(--muted); }
.chip { font-size: 11px; background: var(--surface-2); color: var(--text-2); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.chip.warn { color: var(--amber); }
.kind-tag { font-size: 11px; border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--muted); white-space: nowrap; }

/* ---- 外壳 ---- */
#app { height: 100%; display: flex; flex-direction: column; }
.topbar { height: 56px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 24px; gap: 14px; flex-shrink: 0; }
.topbar .brand { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; display: inline-block; vertical-align: middle; }
.crumb a.brand-home { display: inline-flex; align-items: center; gap: 8px; }
.crumb { display: inline-flex; align-items: center; min-width: 0; white-space: nowrap; flex-shrink: 1; }
.crumb a { color: var(--muted); text-decoration: none; font-size: 13px; flex-shrink: 0; } .crumb a:hover { color: var(--text); }
.crumb .sep { color: var(--muted-2); margin: 0 8px; } .crumb .cur { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }   /* 面板名太长时省略，不折行 */
.tabs { display: flex; gap: 2px; margin-left: 20px; }
.tabs button { height: 32px; border: none; background: none; color: var(--muted); padding: 0 12px; border-radius: var(--radius-sm); }
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.tabs .pill { margin-left: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 0 6px; border-radius: 999px; line-height: 16px; }
.tabs .pill.red { color: var(--red); border-color: #fecaca; }
.search { height: 34px; width: 240px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 10px; gap: 8px; background: var(--surface); }
.search input { border: none; height: 100%; padding: 0; flex: 1; outline: none; box-shadow: none; background: transparent; min-width: 0; }
.search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search.sm { height: 28px; width: 180px; }
.subbar { height: 46px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 24px; gap: 8px; font-size: 12px; flex-shrink: 0; }
.subbar select, .subbar button, .subbar #count { flex-shrink: 0; white-space: nowrap; }
.subbar #count { overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.vsep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
main { flex: 1; display: flex; min-height: 0; }
.view { flex: 1; min-width: 0; min-height: 0; display: none; }
.view.active { display: flex; }
#mindmap { flex: 1; min-width: 0; background: var(--surface); }
#mindmap, #mindmap * { user-select: none; -webkit-user-select: none; }   /* 按住拖动是移动画布，不要把卡片上的字选中 */
/* ---- 进度树的时间轴：树右边按时间点对齐的快照卡片 ---- */
.nd-version { width: 100%; height: 100%; border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); padding: 2px 8px; display: flex; flex-direction: column; justify-content: center; gap: 1px; overflow: hidden; cursor: pointer; }
.nd-version:hover { border-color: var(--accent); }
.nd-version.new { border-left-color: var(--accent); }
.nd-version.last { background: var(--surface); border-left-color: var(--primary); }
.nd-version.manual { border-style: dashed; border-left-style: solid; }
.nd-version .chg { font-size: 11px; line-height: 16px; color: var(--text-2); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* ---- 事项快照面板（时间轴上点一张卡） ---- */
.sn-nav { display: flex; align-items: center; gap: 8px; }
.sn-nav .ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.sn-nav .ttl .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-nav .ttl .bd, .sn-nav .ttl .dtag { margin: 0; flex-shrink: 0; font-weight: 500; }
.sn-steps { display: flex; align-items: flex-start; padding: 2px 2px 0; overflow-x: auto; scrollbar-width: none; }
.sn-dot { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 40px; font-size: 11px; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.sn-dot i { width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--line-2); background: var(--surface); }
.sn-dot.manual i { border-style: dashed; }
.sn-dot:hover i { border-color: var(--accent); }
.sn-dot.cur { color: var(--text); font-weight: 600; }
.sn-dot.cur i { background: var(--primary); border: 2px solid var(--primary); box-shadow: 0 0 0 3px rgba(15, 23, 42, .12); }
.sn-line { flex: 0 1 56px; min-width: 14px; height: 2px; background: var(--line); margin-top: 4px; }
.panel-head h2 .was { display: block; font-size: 12px; font-weight: 400; }
.was { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted-2); text-decoration: line-through; display: block; margin-top: 2px; }
.kv .chgd > span::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: var(--amber); margin-left: 5px; vertical-align: 1px; }
mark.add { background: #dcfce7; color: inherit; border-radius: 3px; padding: 0 1px; }
.dots .gone span { text-decoration: line-through; color: var(--muted-2); }
.ax-head { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.ax-head .src { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ax-head.manual .src { font-weight: 400; color: var(--muted); }
.ax-head .dtag { margin: 0; }
.pane { flex: 1; overflow: auto; padding: 24px 32px; }
#gantt-wrap { flex: 1; overflow: auto; background: var(--surface); padding: 12px; }

/* ---- 看板列表 ---- */
.boards-head { padding: 32px 32px 0; display: flex; align-items: flex-end; gap: 16px; }
.boards-head h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.boards-grid { padding: 24px 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 20px; align-items: stretch; }   /* 随屏幕宽度排列 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; min-height: 236px; box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.card h3 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card .desc { font-size: 12px; color: var(--muted); margin-top: -4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .status-line { font-size: 14px; line-height: 1.6; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; color: var(--text-2); }
.card .foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); margin-top: auto; align-items: center; }
.card .foot > * { white-space: nowrap; }   /* 每一项整体换行，不在词中间断 */
.card .foot > :last-child:not(.spacer) { margin-left: auto; }   /* 挤到第二行时仍靠右 */
.card.new { border-style: dashed; box-shadow: none; align-items: center; justify-content: center; color: var(--muted); }
.card.new:hover { color: var(--text); }
.card form.nb-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.card form.nb-form .field { gap: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid3.ov-lists { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid3.ov-lists { margin-bottom: 20px; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.grid3.ov-lists .box { margin-bottom: 0; display: flex; flex-direction: column; min-height: 0; }
.grid3.ov-lists .box h3 { flex-shrink: 0; }
.grid3.ov-lists .box .rows { overflow: auto; min-height: 0; }   /* 屏幕矮、条数多：在栏里滚动 */
.grid3.ov-lists .box h3 { padding: 9px 14px; }
.grid3.ov-lists .box .empty { padding: 12px 14px; font-size: 12px; }
.grid3.ov-lists .box .more { padding: 6px 14px; }   /* 总览：受阻 / 待定或 7 天内 / 未来 3 周 / 延期风险高，放不下自动换行（本次会议更新那一栏删了，和现状描述重复，Wei 2026-10-09） */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* ---- 现状 ---- */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; display: flex; gap: 28px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.hero-l { flex: 1 1 560px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: var(--surface); }
.status-cur .txt, .status-compare { max-width: 1100px; }   /* 页面随屏幕铺满，但一行文字不要太长 */
.kpis { display: flex; gap: 12px; flex-shrink: 0; }
.kpi { width: 118px; min-height: 88px; height: auto; border-radius: var(--radius); border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 1.3; color: var(--muted); position: relative; }
.kpi b { font-size: 26px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.kpi::before { content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 4px; background: var(--muted-2); }
.kpi.red::before { background: var(--red); } .kpi.orange::before { background: var(--amber); } .kpi.grey::before { background: var(--green); }
.status-cur .lbl, .status-compare .lbl { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.status-cur .txt { font-size: 15px; font-weight: 400; line-height: 1.75; color: var(--text); text-wrap: pretty; }   /* 和对照视图同一套字号 */
.status-compare { display: grid; grid-template-columns: minmax(200px, 1fr) 1px minmax(300px, 1.35fr); gap: 0 24px; align-items: stretch; }
.status-compare .col.prev .txt { font-size: 14px; line-height: 1.75; color: var(--text-2); }
.status-compare .lbl .bd { margin-left: 0; }
.status-compare .lbl { min-width: 0; white-space: nowrap; }
.status-compare .lbl span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }   /* 纪要标题太长时省略，不折行 */
.status-compare .divider { background: var(--line); }
.status-compare textarea { width: 100%; font-size: 14px; line-height: 1.75; font-weight: 400; color: var(--text); resize: vertical; min-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.status-compare textarea:focus { background: var(--surface); }
.status-compare .acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.gen { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.gen .spinner { width: 16px; height: 16px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.box h3 { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.box h3 .n { margin-left: auto; color: var(--muted); font-weight: 400; display: inline-flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
#owners .box h3 .pt { flex-shrink: 0; white-space: nowrap; }
#owners .box h3 > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 人名单太长就截断，不把右边的计数挤成竖排 */
.box h3 .n button { margin-left: 8px; }
.box .li { padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; align-items: center; transition: background .15s ease; }
.box .li:last-child { border-bottom: none; }
.box .li:hover { background: var(--surface-2); }
#overview .box .li { flex-direction: column; align-items: stretch; gap: 2px; padding: 7px 16px; }   /* 行矮一点；一排清单的高度按屏幕算（见 fitOverview），时间线留在一屏里 */
#overview .box .li .t { font-weight: 500; }
#overview .box .li .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; overflow: hidden; }   /* 标签不换行：每条固定两行高，时间线才放得进一屏 */
#overview .box .li .m > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 40px; }
#overview .box .li .m > :not(:first-child) { flex-shrink: 0; }
.box .empty { padding: 16px; color: var(--muted); }
.box .more { padding: 8px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.box .more a { text-decoration: none; }
/* 关键时间节点 */
.ms-scroll { overflow-x: auto; overflow-y: hidden; cursor: grab; user-select: none; scroll-behavior: smooth; }
.ms-scroll.dragging { cursor: grabbing; scroll-behavior: auto; }
.ms-strip { position: relative; }
.ms-month { position: absolute; top: 0; height: 24px; line-height: 24px; font-size: 11px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; white-space: nowrap; overflow: hidden; }
.ms-week { position: absolute; width: 1px; background: var(--surface-2); }
.ms-axis { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); }
.ms-today { position: absolute; width: 1px; background: var(--accent); z-index: 3; pointer-events: none; }
.ms-today span { position: absolute; top: -2px; left: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 4px; }
.ms-lead { position: absolute; width: 1px; background: var(--line); }
.ms-dot { position: absolute; width: 10px; height: 10px; border-radius: 5px; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c); transform: translateX(-50%); z-index: 2; }
.ms-card { position: absolute; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 0 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; z-index: 2; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.ms-card .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.ms-card.done { color: var(--muted); box-shadow: none; }
.ms-card:hover, .ms-card:focus-visible { border-color: var(--accent); box-shadow: var(--focus); outline: none; z-index: 4; }
.ms-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 400; margin-right: 6px; }
.ms-legend i { width: 8px; height: 8px; border-radius: 4px; display: inline-block; margin-left: 8px; margin-right: 2px; }

/* ---- 进度树 ---- */
.chips-f { display: flex; gap: 6px; align-items: center; }
.chips-f select { height: 28px; border-radius: 999px; padding: 0 28px 0 12px; font-size: 12px; }
.chipf { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; color: var(--text-2); }
.chipf i { width: 6px; height: 6px; border-radius: 3px; display: inline-block; }
.chipf.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.legend-float { position: absolute; right: 20px; bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; box-shadow: var(--shadow-sm); }
.legend-float i { width: 3px; height: 12px; border-radius: 2px; display: inline-block; vertical-align: -2px; margin-right: 5px; }
.legend-float .bd { margin-left: 0; margin-right: 5px; }
.lg-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; min-height: 24px; }
.lg-row > :first-child { justify-self: start; }
.lg-group + .lg-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.lg-title { font-size: 11px; color: var(--muted-2); letter-spacing: .04em; margin-bottom: 2px; }
.lg-bar { width: 3px; height: 14px; border-radius: 2px; display: inline-block; }
.legend-float .lg-node { font-size: 11px; padding: 2px 0; width: 56px; text-align: center; box-sizing: border-box; }   /* 四个节点标签等宽 */
.lg-head { display: flex; align-items: center; gap: 4px; }
.lg-head .sm { height: 24px; padding: 0 8px; font-size: 11px; }
.lg-body { margin-top: 8px; display: flex; flex-direction: column; }
.legend-float .lg-row i { margin-right: 0; }
.lg-node { font-size: 10px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.lg-node.project { background: var(--primary); color: #fff; border-color: var(--primary); }
.lg-node.party { font-weight: 600; position: relative; }
.legend-float .lg-node.party::after { content: "▸"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 9px; color: var(--muted-2); }   /* 和树上可展开的责任方卡片一样带箭头 */
.legend-float .lg-node.item { border-left: 3px solid #cbd5e1; font-weight: 400; color: var(--text); }   /* 和事项卡片一样带左侧状态条 */
.lg-node.person { background: var(--surface-2); }
.nd { font: 13px/1.3 "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", system-ui, sans-serif; color: var(--text); box-sizing: border-box; white-space: nowrap; }
.nd-root { height: 36px; padding: 0 18px; border-radius: var(--radius); background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; display: flex; align-items: center; }
.nd-project { height: 30px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nd-project .cnt { font-style: normal; font-size: 11px; color: var(--red); font-weight: 600; }
.nd-project .cnt::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: var(--red); margin-right: 4px; vertical-align: 1px; }
.nd-party { width: 240px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.nd-party:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.nd-party.open { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.nd-party .bar, .nd-item .bar { width: 3px; background: var(--c); flex-shrink: 0; align-self: stretch; }
.nd-party .body { padding: 5px 10px; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.nd-party .t { font-weight: 600; display: flex; align-items: center; gap: 6px; line-height: 16px; height: 16px; }
.nd-party .t .bd { margin-left: 0; line-height: 16px; }
.nd-party .s { font-size: 11px; color: var(--muted); line-height: 14px; height: 14px; margin-top: 2px; }
.nd-party .s b { font-weight: 500; }
.nd-party .arr { padding: 0 10px; display: flex; align-items: center; color: var(--muted-2); font-size: 11px; }
.nd-party.open .arr { color: var(--text); }
.nd-self { height: 40px; padding: 0 10px; display: flex; align-items: center; font-size: 12px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.nd-person { height: 28px; padding: 0 10px 0 8px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 999px; border: 1px solid transparent; }
.nd-person::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--c); }
.nd-person .t { font-weight: 500; }
.nd-person .s { font-size: 11px; color: var(--muted); }
.nd-person .s b { font-weight: 500; }
.nd-item { width: 420px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; overflow: hidden; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.nd-item:hover { border-color: var(--accent); box-shadow: var(--focus); }
.nd-item.sev-done { opacity: .55; } .nd-item.sev-done .t { text-decoration: line-through; }
.nd-item .body { padding: 0 10px; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.nd-item .p { font-size: 10px; color: var(--muted); line-height: 1; margin-bottom: 2px; }
.nd-item .t { overflow: hidden; text-overflow: ellipsis; }
.nd-item .bd { margin-left: 0; margin-right: 2px; }
.nd-item .d { padding: 0 8px 0 4px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bd.st { margin: 0; flex-shrink: 0; }
.bd.blue { color: var(--accent); border-color: #bae6fd; }
.bd.st.orange { border-color: #fde68a; } .bd.st.red { border-color: #fecaca; } .bd.st.done { border-color: #bbf7d0; }

/* ---- 各方待办 ---- */
#owners .box .li .bar { width: 3px; height: 20px; border-radius: 2px; flex-shrink: 0; }
#owners .box .li { flex-wrap: wrap; row-gap: 4px; }
#owners .box .li .t { flex: 1 1 160px; min-width: 0; }   /* 窄的时候标签换到下一行，不把标题挤成竖排 */
#owners .box h3 .pt { font-size: 14px; }
details.undated summary { padding: 10px 16px; font-size: 12px; color: var(--muted); cursor: pointer; }
details.undated summary:hover { color: var(--text); }

/* ---- 资料库 ---- */
table.files { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.files th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 10px 16px; }
table.files td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.files .sub { font-size: 12px; color: var(--muted); }

/* ---- 事项面板 ---- */
aside#panel { width: 460px; background: var(--surface); border-left: 1px solid var(--line); display: none; overflow: hidden; position: relative; flex-shrink: 0; }
aside#panel.open { display: flex; }
.panel-inner { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel-grip { width: 8px; margin-left: -4px; cursor: col-resize; flex-shrink: 0; position: relative; z-index: 5; touch-action: none; }
.panel-grip::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s ease; }
.panel-grip:hover::after, .panel-grip.active::after { background: var(--accent); }
.panel-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.panel-head .title-row { display: flex; align-items: flex-start; gap: 12px; }
.panel-head .title-row h2 { flex: 1; min-width: 0; }
.panel-head .title-row button { flex-shrink: 0; margin-top: 2px; }
.panel-body { flex: 1; overflow: auto; padding: 4px 22px 16px; display: flex; flex-direction: column; gap: 0; }
.panel-body:not(.edit) > .sect { padding: 18px 0; border-top: 1px solid var(--line); }
.panel-body:not(.edit) > .sect:first-child { border-top: 0; padding-top: 14px; }
.panel-body.edit { gap: 16px; padding-top: 16px; }
.panel-foot { padding: 12px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.sect label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.sect .text { line-height: 1.6; white-space: pre-wrap; color: var(--text-2); }
.state { border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2) !important; border: 1px solid var(--line) !important; }
.state .why { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.kv { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: 12px; }
.kv span { color: var(--muted); display: block; } .kv b { font-weight: 500; font-size: 13px; }
.kv b span.dtag, .kv b span.bd { display: inline-flex; }   /* 值里的日期标签别被上面那条规则撑成整行 */
.tls { display: flex; flex-direction: column; position: relative; }
.tls::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl { display: flex; gap: 14px; padding: 4px 0 14px; position: relative; font-size: 13px; line-height: 1.5; }
.tl:last-child { padding-bottom: 4px; }
.tl .dot { width: 11px; height: 11px; border-radius: 6px; border: 2px solid #fff; margin-top: 4px; box-sizing: border-box; }
.tl a { cursor: pointer; text-decoration: none; }
.dots { display: flex; flex-direction: column; gap: 6px; }
.dots div { display: flex; gap: 8px; align-items: flex-start; }
.dots i { width: 5px; height: 5px; border-radius: 3px; background: var(--muted-2); margin-top: 8px; flex-shrink: 0; }
.dots i.red { background: var(--red); } .dots i.blue { background: var(--accent); } .dots i.amber { background: var(--amber); }
.panel-body:not(.edit) > .sect.remind { padding: 8px 0; }
.sect.remind .rm-line { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.sect.remind .rm-line button.link { padding: 0; height: auto; font-size: 12px; flex-shrink: 0; }
/* 项目阶段：横向一排栏，栏宽按屏幕平分（最窄 180px），窄屏放不下才左右滚动 */
#stages { display: flex; flex-direction: column; min-height: 0; }
.stage-cols { display: flex; gap: 12px; overflow-x: auto; flex: 1; min-height: 0; padding-bottom: 8px; }
.stage-col { flex: 1 1 180px; min-width: 180px; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stage-col.none { border-style: dashed; background: var(--surface-2); }
.stage-head .row { display: flex; align-items: center; gap: 8px; }
.stage-head { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.stage-body { overflow: auto; min-height: 0; }
.stage-body .li { padding: 8px 12px 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; grid-template-columns: 3px 1fr; column-gap: 9px; row-gap: 5px; align-items: start; font-size: 13px; }
.stage-body .li:hover { background: var(--surface-2); }
.stage-body .li .bar { grid-row: 1 / span 2; width: 3px; height: 100%; min-height: 16px; border-radius: 2px; }   /* 彩条贴在左边，和标题、标签同高 */
.stage-body .li .t { grid-column: 2; min-width: 0; line-height: 1.4; }
.stage-body .li .tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.stage-body .li .tags .bd, .stage-body .li .tags .dtag { margin: 0; }
.stage-body details.undated summary { padding: 8px 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.stage-body details.undated .li { opacity: .7; }
/* 事项面板的“延期风险”一节：默认一行，点开才看理由、同类事项、备选方案 */
.panel-body:not(.edit) > .sect.risk { padding: 10px 0; border-top: 0; }
.sect.risk > details, .sect.risk > .rk-line { padding: 10px 14px; background: var(--amber-soft); border: 1px solid #fde68a; border-left: 3px solid var(--amber); border-radius: var(--radius-sm); }
.sect.risk details.mid, .sect.risk .rk-line.mid { background: var(--surface-2); border-color: var(--line); border-left-color: var(--line-2); }
.sect.risk .rk-line { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; list-style: none; }
.sect.risk .rk-line::-webkit-details-marker { display: none; }
.sect.risk .bd.rk { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 1px 10px; }
.sect.risk .bd.rk.hi { color: var(--amber); border-color: #fcd34d; background: var(--surface); }
.sect.risk .bd.rk.mid { color: var(--text-2); border-color: var(--line-2); background: var(--surface); }
.sect.risk .rk-sum { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sect.risk details[open] .rk-sum { white-space: normal; }
.sect.risk .rk-more { flex-shrink: 0; } .sect.risk details[open] .rk-more { display: none; }
.sect.risk .rk-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sect.risk .rk-sub { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
.sect.risk .rk-sub .muted { font-weight: 400; margin-left: 4px; }
.sect.risk .rk-sim a, .sect.risk .rk-imp a { cursor: pointer; }
.sect.risk .rk-foot button.link { padding: 0; height: auto; font-size: 12px; }
.wz-left .deps .dep .rk-why { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.more-deps { margin-top: 6px; } .more-deps summary { cursor: pointer; font-size: 12px; color: var(--accent); list-style: none; }
.more-deps summary::-webkit-details-marker { display: none; } .more-deps .deps { margin-top: 6px; }
.dots .del { color: var(--red); font-size: 12px; cursor: pointer; margin-left: auto; }
.related { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.related div { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.related div:hover { color: var(--accent); }
.ref { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ref .kind { font-size: 11px; border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.ref a { text-decoration: none; cursor: pointer; }
.empty-box { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 10px 12px; color: var(--muted); }
.history { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.addline { display: flex; gap: 6px; } .addline input { flex: 1; }
.status-tag { padding: 3px 9px; border-radius: 999px; font-size: 12px; }

/* ---- 弹窗（上传向导、原文） ---- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal.open { display: flex; }
.dialog { background: var(--surface); width: min(1000px, 94vw); max-height: 90vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.dialog.narrow { width: min(1100px, 94vw); height: 90vh; }
.dialog.narrow.form { width: min(520px, 92vw); height: auto; }
.dialog.narrow.form .body { display: grid; gap: 12px; }
.dialog.narrow.form form .body { display: flex; }
.dialog > header, .wz-left > header { padding: 16px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.dialog > header h2, .wz-left > header h2 { margin: 0; font-size: 15px; }
.dialog > .body, .dialog > form > .body, .wz-left > .body { overflow: auto; padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.dialog > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dialog > footer, .dialog > form > footer, .wz-left > footer { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.src-body { padding: 0 !important; display: flex; flex-direction: column; }
.src-pdf { flex: 1; width: 100%; border: none; min-height: 0; }
.src-body .doc { padding: 20px 24px; overflow: auto; }
.doc { font-size: 13px; line-height: 1.8; color: var(--text-2); white-space: pre-wrap; }
.doc mark { background: #fef08a; padding: 1px 2px; border-radius: 3px; color: var(--text); }
.steps { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.steps span { display: flex; align-items: center; gap: 6px; }
.steps i { width: 18px; height: 18px; border-radius: 9px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; }
.steps span.done i { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.steps span.cur { color: var(--text); font-weight: 500; }
.steps span.cur i { background: var(--primary); color: #fff; border-color: var(--primary); }
.steps .bar { width: 24px; height: 1px; background: var(--line); }
.notice { border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface-2); }
.notice.warn { border-left: 3px solid var(--amber); }
.notice.danger { border-left: 3px solid var(--red); }
.notice.info { border-left: 3px solid var(--accent); }
.etable { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.etable .r { display: grid; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); align-items: center; }
.etable .r:first-child { border-top: none; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.etable .r.new { background: #fcfcfd; }
.etable .r.off { opacity: .45; }
.etable.orgs .r { grid-template-columns: 28px 1.2fr 1fr 1.2fr 80px; }
.etable.people .r { grid-template-columns: 28px 1.3fr .9fr .9fr 1fr 1.3fr 1.2fr; }
.etable .r > input, .etable .r > select { min-width: 0; width: 100%; }
.etable .r > input:disabled { opacity: .45; background: var(--surface-2); }
.etable .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etable input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.etable .name { display: flex; gap: 6px; align-items: center; }
.etable .add { padding: 9px 12px; border-top: 1px solid var(--line); }
.group-head { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.group-head::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.prop { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; background: var(--surface); }
.prop.off { opacity: .45; }
.prop input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); }
.prop .head { display: flex; align-items: center; gap: 8px; }
.prop .kind { font-size: 11px; padding: 0 6px; line-height: 18px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.prop .kind.update { color: var(--text-2); }
.prop .title { font-weight: 600; }
.prop .flag { width: 6px; height: 6px; border-radius: 3px; background: var(--red); }
.prop .edit { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.prop .desc { color: var(--text-2); margin-top: 6px; }
.prop .diff { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.prop .why { font-size: 12px; color: var(--red); margin-top: 4px; }
.prop .why.audit { color: var(--text-2); display: flex; gap: 6px; align-items: baseline; } .prop .why.audit .bd { margin-left: 0; flex-shrink: 0; }
.prop .quote { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; margin-top: 6px; white-space: pre-wrap; }
.prop ul { margin: 4px 0; padding-left: 18px; }
.seg { display: flex; gap: 2px; font-size: 12px; }
.seg button { height: 28px; border: none; background: none; color: var(--muted); padding: 0 10px; border-radius: var(--radius-sm); }
.seg button.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.seg button.red { color: var(--red); }
.loading { padding: 40px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.smm-richtext-node-wrap p { margin: 0; }
/* 甘特：状态色只做条形 */
.gantt .bar-待办 .bar { fill: #cbd5e1 !important; } .gantt .bar-进行中 .bar { fill: #94a3b8 !important; }
.gantt .bar-待定 .bar { fill: #f59e0b !important; } .gantt .bar-已完成 .bar { fill: #16a34a !important; } .gantt .bar-阻塞 .bar { fill: #dc2626 !important; }
.gantt .bar-label { fill: var(--text) !important; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .spinner { animation-duration: 1.5s; } }

.nd-empty { height: 36px; padding: 0 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); display: flex; align-items: center; background: var(--surface); }

/* ---- 时间线（自研甘特） ---- */
.gt { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gt-left { position: relative; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.gl-row { position: absolute; left: 0; right: 0; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; border-bottom: 1px solid var(--surface-2); cursor: pointer; }
.gl-row.corner { top: 0; height: 28px; cursor: default; border-bottom: 1px solid var(--line); }
.gl-row.head { background: var(--surface-2); cursor: pointer; user-select: none; }
.gl-row.head:hover { background: var(--line); }
.gl-row.head .arr { color: var(--muted-2); font-size: 11px; width: 10px; }
.gl-row.head .fold-sum { margin-left: auto; font-size: 11px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.gl-row.head .fold-sum .dot { width: 6px; height: 6px; margin-right: 2px; }
.gl-row .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-row:not(.head):not(.corner):hover { background: var(--surface-2); }
.gt-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; cursor: grab; user-select: none; }
.gt-scroll.dragging { cursor: grabbing; }
.gt-strip { position: relative; }
.gt-band { position: absolute; left: 0; height: 34px; background: var(--surface-2); }
.gt-bar { position: absolute; height: 18px; border-radius: 4px; background: var(--c); opacity: .9; cursor: pointer; }
.gt-bar.normal { background: #cbd5e1; }
.gt-bar.done { background: #16a34a; opacity: .5; }
.gt-bar:hover { opacity: 1; box-shadow: var(--focus); }
.gt-bar .lab { position: absolute; top: -1px; white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.gt-bar .lab .bd { margin-left: 0; }
.gt-foot { display: flex; align-items: center; gap: 12px; padding: 10px 4px 0; }
#gantt-wrap { padding: 16px 24px 24px; background: var(--bg); }
.empty-page { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 64px 24px; text-align: center; }
.empty-page .t { font-size: 15px; font-weight: 600; }
.empty-page button { margin-top: 8px; }
/* 资料库 */
table.files thead th { font-weight: 500; }
table.files .fn { font-weight: 500; }
table.files tbody tr:hover { background: var(--surface-2); }
.st-busy, .st-wait, .st-err, .st-done { display: inline-flex; align-items: center; gap: 6px; }
.st-wait { color: var(--amber); font-weight: 500; } .st-err { color: var(--red); }

/* ---- 确认对话框 ---- */
.dialog.confirm { width: min(440px, 92vw); }
.dialog.confirm .body { gap: 8px; padding: 22px 24px 16px; }
.dialog.confirm .ct { font-size: 15px; font-weight: 600; }
.dialog.confirm .cx { font-size: 13px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
/* ---- 列表小编辑器 ---- */
.mini-editor { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.mini-editor textarea { width: 100%; min-height: 64px; background: var(--surface); }
.dots .editable { cursor: pointer; border-radius: 4px; padding: 2px 4px; margin: 0 -4px; }
.dots .editable:hover { background: var(--surface-2); }

.mini-editor[hidden] { display: none; }
[hidden] { display: none !important; }

#ref-pick-sel { width: 100%; font-size: 12px; padding: 4px; }
#ref-pick-sel option { padding: 4px 6px; }
table.files .sub a { cursor: pointer; }

/* 向导头部不换行 */
.dialog > header, .wz-left > header { flex-wrap: nowrap; }
.dialog > header h2, .wz-left > header h2, .steps span { white-space: nowrap; }
.dialog > header .muted.small, .wz-left > header .muted.small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.dialog > .body .seg, .wz-left > .body .seg { margin: -6px 0 -4px; }

.gt-bar.undated { background: transparent !important; border: 1px dashed var(--line-2); opacity: 1; }
.gt-bar.undated.blocked { border-color: var(--red); }
.gt-bar.undated.attention { border-color: var(--amber); }

.gt-band.folded { background: var(--surface-2); }
.gt-mini { position: absolute; top: 12px; width: 10px; height: 10px; border-radius: 5px; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c); transform: translateX(-50%); cursor: pointer; }

/* ---- 纪要来源：两种方式 ---- */
.src-choice { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.src-choice .opt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.src-choice .opt.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.src-choice .opt .t { font-weight: 600; font-size: 14px; display: flex; align-items: center; }
.src-choice .hook { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }

/* ---- 导入会议弹窗 ---- */
.seg-tabs { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.seg-tabs button { height: 30px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-size: 13px; border-radius: 6px; box-shadow: none; }
.seg-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); font-weight: 600; }
.seg-tabs.sub { margin-bottom: 12px; }
.seg-tabs.sub button { height: 26px; font-size: 12px; }
#im-recording .field + .field { margin-top: 12px; }
.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 34px 20px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--surface); }
.drop .t { font-weight: 600; font-size: 14px; }
.pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; background: var(--surface); min-width: 0; }
.pick:hover { border-color: var(--primary); }
.pick .pk-btn { flex: none; height: 26px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.pick .pk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.has .pk-name { color: var(--text); }

/* ---- 责任方页面 ---- */
.bd.known { color: var(--green); border-color: #bbf7d0; }
.parties { display: grid; gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pcard.head { background: var(--surface-2); border: none; }
.pcard.head .ph { font-size: 12px; color: var(--muted); padding: 6px 16px; }
.ph, .pr { display: grid; grid-template-columns: 1.2fr 1.4fr 1.2fr 220px; gap: 12px; align-items: center; padding: 12px 16px; }
.pr { padding: 8px 16px 8px 32px; border-top: 1px solid var(--line); font-size: 13px; }
.pr.head { font-size: 12px; color: var(--muted); background: var(--surface-2); }
.pr.add { display: block; }
.pr .nm { font-weight: 500; }
.alias { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); margin: 2px 4px 2px 0; }
.use { display: inline-block; font-size: 12px; color: var(--accent); margin-right: 10px; text-decoration: none; }
.use:hover { text-decoration: underline; }
.topbar a.btn { text-decoration: none; }
/* Markdown 排版的纪要原文 */
.doc.md { white-space: normal; }
.doc.md h1, .doc.md h2, .doc.md h3 { color: var(--text); margin: 18px 0 6px; line-height: 1.4; }
.doc.md h1 { font-size: 18px; } .doc.md h2 { font-size: 15px; } .doc.md h3 { font-size: 14px; }
.doc.md p { margin: 0 0 8px; }
.doc.md ul, .doc.md ol { padding-left: 22px; margin: 0 0 8px; }
.doc.md li { margin: 2px 0; }
.doc.md table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.doc.md th, .doc.md td { border: 1px solid var(--line); padding: 4px 8px; }
.doc.md th { background: var(--surface-2); }
.doc.md strong { color: var(--text); }
.doc.md code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
.nd-party.idle { opacity: .75; border-style: dashed; }
.nd-party.idle .s { font-size: 11px; margin-top: 2px; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; }
.pchip .x { height: 22px; padding: 0 8px; font-size: 11px; border-radius: 999px; }
.pchip .x.danger { color: var(--red); }
.pr .contact { font-weight: 400; margin-top: 2px; }
.pr .contact a { color: var(--muted); text-decoration: none; }
.pr .contact a:hover { color: var(--accent); text-decoration: underline; }

/* ---- 滚动条：细、圆角、悬停才加深 ---- */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }
.prop .link-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.prop .link-row select { max-width: 360px; }

/* ---- 前置事项 ---- */
.bd.wait { color: var(--amber); border-color: #fde68a; }
.deps { display: flex; flex-direction: column; gap: 6px; }
.deps .dep { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; cursor: pointer; }
.deps .dep .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deps .dep .chip { flex-shrink: 0; }
.deps .dep .del { color: var(--muted); padding: 0 4px; font-size: 14px; }
.deps .dep .del:hover { color: var(--red); }
.gt-deps { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; }
.gt-deps path { fill: none; stroke: #94a3b8; stroke-width: 1.5; stroke-dasharray: 4 3; }
.gt-deps circle { fill: #94a3b8; }
.gt-deps path.late { stroke: var(--amber); stroke-dasharray: none; }
.gt-deps circle.late { fill: var(--amber); }
.bd.sub { color: var(--text-2); border-color: var(--line-2); }
.split-head, .split-row { display: grid; grid-template-columns: 2fr 1fr 140px 32px; gap: 8px; align-items: center; }
.split-head { font-size: 11px; color: var(--muted); }
.split-row { margin-top: 6px; }
.split-row .sm[data-rm] { padding: 0; width: 32px; justify-content: center; }
.dialog.narrow.form.wide { width: min(760px, 94vw); }
.loading .prog { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; }
.loading .prog span { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.loading .prog span.done { color: var(--green); border-color: #bbf7d0; }

/* ---- 登录 / 设置 ---- */
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-md); }
.login-card .brand { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: 600; }
.login-card .brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.login-card .err { color: var(--red); font-size: 12px; background: var(--red-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid transparent; }
.user-chip:hover { background: var(--surface-2); border-color: var(--line); }
.user-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.user-chip .un { font-weight: 500; }
.settings { max-width: 1100px; }
.settings .sbody { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.settings .kv { display: flex; gap: 32px; } .settings .kv span { color: var(--muted); font-size: 12px; display: block; }
.sdet summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.urow { display: grid; grid-template-columns: 1.2fr 150px 2fr auto; gap: 16px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: none; }
.urow.head { font-size: 12px; color: var(--muted); background: var(--surface-2); }
.urow.off > div:first-child { opacity: .5; }
.acc-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.acc-row { display: grid; grid-template-columns: 18px 1fr 220px; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.acc-row select:disabled { opacity: .45; }
.deps .dep.masked { cursor: default; border-style: dashed; color: var(--muted); }
@media (max-width: 800px) { .urow { grid-template-columns: 1fr; gap: 6px; } .acc-row { grid-template-columns: 18px 1fr; } .acc-row select { grid-column: 2; } }
a.btn.acc { color: var(--accent); border-color: #bae6fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
a.btn.acc.off { color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.crumb { overflow: hidden; min-width: 150px; }   /* 窗口窄时优先压页签，面包屑至少留出面板名 */
.tabs { flex-shrink: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 1100px) { .user-chip .un, .user-chip .small { display: none; } .user-chip { padding: 4px; } }
.lang-btn { font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: .02em; min-width: 44px; justify-content: center; }

/* ---- 意见审核 ---- */
.op { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.op.draft { border-left: 3px solid var(--amber); }
.op .head { display: flex; gap: 10px; align-items: center; }
.op .head .kind { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.op .head input { flex: 1; font-size: 14px; font-weight: 500; }
.op .edit { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.op .st { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.op .obj-pick { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.op .obj-pick label { flex-shrink: 0; margin: 0; font-size: 12px; color: var(--muted); }
.op .obj-pick select { flex: 1; min-width: 0; max-width: 460px; }
.op .obj-pick a { flex-shrink: 0; }
.pill-radio { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; cursor: pointer; background: var(--surface); color: var(--text-2); }
.pill-radio input { margin: 0; width: 12px; height: 12px; accent-color: var(--primary); }
.pill-radio.on { border-color: var(--primary); color: var(--text); font-weight: 500; }
.pill-radio.on.done { border-color: var(--green); color: var(--green); }
.pill-radio.on.orange { border-color: var(--amber); color: var(--amber); }
.cgroup { border: 1px solid #fecaca; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.cgroup.resolved { border-color: var(--line); }
.cgroup .resolve { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.cgroup .resolve input.sm[data-note] { flex: 1; min-width: 160px; }
.cgroup.dropped { opacity: .6; }
.cgroup .verdict { font-size: 12px; display: flex; flex-direction: column; gap: 4px; padding: 8px 0 10px; }
.cgroup .verdict .quote { color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
.cgroup .carry-op { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 13px; }
.cgroup .carry-op .bd { margin-left: 0; flex-shrink: 0; }
.op-add { margin-top: 12px; }
.origins { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.origins .origin { font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.decs { display: flex; flex-direction: column; gap: 10px; }
.dec { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.dec { padding: 14px 16px; gap: 10px; box-shadow: var(--shadow-sm); }
.dec .who { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.dec .who b { font-weight: 600; }
.dec .who .bd { margin: 0; }
.dec .who .disc { margin-left: auto; flex-shrink: 0; font-size: 11px; line-height: 18px; padding: 0 8px; border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.dec .t { font-size: 14px; line-height: 1.55; color: var(--text); }
.dec .said { font-size: 13px; line-height: 1.6; color: var(--text-2); background: var(--surface-2); border-left: 3px solid var(--line-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 8px 12px; }
.dec .said .lbl { display: block; font-size: 11px; color: var(--muted-2); margin-bottom: 2px; }
.decs, .dec, .dec > *, .cf-b > * { min-width: 0; max-width: 100%; }
.dec .said, .dec .t { overflow-wrap: anywhere; }
.dec .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dec .act { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; color: var(--text-2); text-decoration: none; cursor: pointer; white-space: nowrap; }
.dec .act:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.dec .act svg { flex-shrink: 0; color: var(--muted); }
.dec .act.doc { min-width: 0; overflow: hidden; }
.dec button.act { font: inherit; }
.dec .act.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
/* 引用弹窗：上半部分是意见卡，下半部分嵌着原文 / 回放 / 图纸 */
.dialog.cite { height: 90vh; }
.dialog.cite > .body.cite-body { padding: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0; overflow: hidden; }
.cite-top { overflow: auto; max-height: 40vh; padding: 16px 24px; border-bottom: 1px solid var(--line); }   /* 卡片少时按内容高，多了最多占四成、里面滚动 */
.cite-emb { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.cite-src { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cite-src .wz-src-head { height: auto; padding: 8px 16px; }
.cite-src .wz-screen { height: 46%; min-height: 160px; }
.cite-src .wz-src-body { flex: 1; min-height: 0; }
.cite-shot { margin: 12px 16px; flex: 1 1 auto; min-height: 0; }
.cite-vers { display: flex; gap: 6px; padding: 0 16px 12px; flex-wrap: wrap; flex-shrink: 0; }
.wz-src-wait { padding: 40px 20px; text-align: center; }
.dec .act.doc .nm { overflow: hidden; text-overflow: ellipsis; }
.dec .act.doc .ver { flex-shrink: 0; color: var(--muted); padding-left: 6px; border-left: 1px solid var(--line); }
.dec.conflict { box-shadow: none; }
/* 小弹窗统一的标题栏和说明块（见 app.js popHead） */
.dialog > header.pop-head { align-items: flex-start; padding: 18px 24px 16px; }
.dialog > header.pop-head .ph { display: block; flex: 1 1 auto; min-width: 0; }
.dialog > header.pop-head .spacer { display: none; }
.dialog > header.pop-head .kicker { font-size: 12px; line-height: 1.5; color: var(--muted); margin-bottom: 2px; }
.dialog > header.pop-head .kicker span + span::before { content: ' · '; white-space: pre; }
.dialog > header.pop-head h2 { font-size: 16px; line-height: 1.4; white-space: normal; overflow-wrap: break-word; }
.dialog > header.pop-head > .seg, .dialog > header.pop-head > .btn, .dialog > header.pop-head > button { flex-shrink: 0; }
/* 发提醒邮件：像邮件客户端那样一行一个字段，正文大框 */
.body.compose { display: flex !important; flex-direction: column; gap: 0; }
.body.compose .c-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.body.compose .c-row label { flex: 0 0 56px; margin: 0; font-size: 13px; color: var(--muted); }
.body.compose .c-row input { flex: 1; border: 0; padding: 4px 0; font-size: 14px; background: transparent; }
.body.compose .c-row input:focus { outline: none; box-shadow: none; }
.body.compose textarea { margin-top: 12px; border: 0; padding: 4px 0; font-size: 14px; line-height: 1.6; resize: vertical; background: transparent; }
.body.compose textarea:focus { outline: none; box-shadow: none; }
.pop-note { font-size: 12.5px; line-height: 1.6; color: var(--text-2); background: var(--surface-2); border-left: 3px solid var(--line-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 8px 12px; }
.st-opt { box-shadow: var(--shadow-sm); }
/* 意见冲突卡：几条互相矛盾的意见并排，整组的拍板说明在底部 */
.dec.conflict { padding: 0; gap: 0; overflow: hidden; }
.dec.conflict.open { border-color: #fcd34d; box-shadow: inset 3px 0 0 var(--amber); }
.dec.conflict .cf-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dec.conflict.open .cf-head { background: #fffbeb; border-bottom-color: #fde68a; }
.cf-tag { font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.dec.conflict.open .cf-tag { background: var(--amber); border-color: var(--amber); color: #fff; }
.cf-op { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px dashed var(--line); }
.cf-op:has(+ .cf-foot:empty) { border-bottom: 0; }
.cf-op .cf-n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.cf-op .cf-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cf-op.win .cf-n { background: var(--green); color: #fff; }
.cf-op.lose .cf-b .t { color: var(--muted); text-decoration: line-through; }
.cf-foot { padding: 8px 12px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.bd.done { color: var(--green); } .bd.orange { color: var(--amber); } .bd.grey { color: var(--muted); } .bd.red { color: var(--red); }

/* ---- 回放 ---- */
.replay { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rp-head { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rp-body { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(0, 2.2fr) minmax(320px, 1fr); flex: 1; min-height: 0; }   /* 屏幕越宽，两边的逐字稿和意见也跟着变宽，视频不独占 */
.rp-left, .rp-right { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.rp-left { border-right: 1px solid var(--line); padding: 10px; gap: 8px; }
.rp-right { border-left: 1px solid var(--line); }
.rp-rh { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
#rp-ops { overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
#rp-note-box { margin: 10px; }
.segs { overflow: auto; flex: 1; display: flex; flex-direction: column; }
.tseg { padding: 8px 10px; border-radius: var(--radius); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.tseg:hover { background: var(--surface-2); }
.tseg.cur { background: var(--surface-2); border-left: 3px solid var(--accent); }
.tseg .sh { display: flex; gap: 8px; align-items: center; font-size: 12px; } .tseg .who { font-weight: 600; }
.tseg .tx { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.rp-center { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; gap: 10px; }
.rp-screen { background: #0f172a; border-radius: var(--radius); flex: 1 1 0; min-height: 160px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rp-center > .rp-screen { aspect-ratio: 16 / 9; width: auto; max-width: 100%; align-self: center; }   /* 视频区按 16:9 随高度定宽，不再两边一大片黑 */
/* 回放页按屏幕高度放：视频随剩下的高度缩放，逐字稿、缩略图条和意见都在一屏里，整页不滚 */
#view-replay { overflow: hidden; }
.rp-center { min-height: 0; }
.rp-screen video, .rp-screen img { max-height: 100%; }
.rp-screen video, .rp-screen img { width: 100%; height: 100%; object-fit: contain; }
.rp-now { display: flex; align-items: center; gap: 10px; font-size: 13px; min-height: 22px; flex-wrap: wrap; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.strip .th { flex-shrink: 0; width: 118px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.strip .th img { width: 118px; height: 66px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; background: #e2e8f0; }
.strip .th.cur img { border-color: var(--accent); } .strip .th.cur span { color: var(--accent); font-weight: 600; }
.op-mini { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; opacity: .55; }
.op-mini.cur { opacity: 1; border-left: 3px solid var(--accent); }
.op-mini .tx { font-size: 13px; line-height: 1.5; }
.ev-frame { display: flex; align-items: center; gap: 10px; }
.ev-frame img { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.ev-frame a.dtag { text-decoration: none; }

/* ---- 图纸与版本 ---- */
.ocard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.vstrip, .vchain { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.vcard, .vnode { flex-shrink: 0; width: 200px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); text-decoration: none; color: var(--text); }
.vcard.sketch, .vnode.sketch { border-color: #93c5fd; }
.vnode.cur { border-color: var(--accent); border-width: 2px; }
.vcard img, .vnode img, .vcard .noimg, .vnode .noimg { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); text-align: center; padding: 4px; box-sizing: border-box; }
.vcard .vl, .vnode .vl { font-size: 13px; font-weight: 600; }
/* 图纸名称单独一行、够宽，看得出是能改的；版本名平时像普通文字，鼠标移上去或点进去才显出输入框 */
.ocard .oname { display: flex; align-items: center; gap: 10px; }
.ocard .oname label { flex-shrink: 0; margin: 0; font-size: 12px; color: var(--muted); }
.ocard .oname input { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.ocard select[data-merge] { flex: 0 1 220px; min-width: 0; max-width: 220px; }
.vcard .vl-in { width: 100%; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); padding: 2px 4px; margin: 0 -4px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-overflow: ellipsis; }
.vcard .vl-in:hover { border-color: var(--line-2); background: var(--surface); }
.vcard .vl-in:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: var(--focus); }
.vcard.add, .vnode.add { border-style: dashed; justify-content: center; text-align: center; cursor: pointer; }
.vnode.add:hover { border-color: var(--primary); }
.vcard .row.small a, .vcard .row.small .link { font-size: 12px; }
button.sm.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; }
/* 待判断的画面：左边缩略图，右边上面是标题和描述、下面一行是操作；下拉框里图纸名再长也不把文字挤没 */
.unspan .row { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.unspan .row select { flex: 0 1 240px; min-width: 0; max-width: 240px; }
.unspan { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #fde68a; background: #fffbeb; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.unspan img, .unspan .noimg { width: 120px; height: 68px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.vscreen { flex: 1; min-width: 0; background: #0f172a; border-radius: var(--radius); min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vscreen img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.vscreen iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
/* 右侧意见栏和画面一样高，列表自己滚，不把页面撑长 */
.vops { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; max-height: 70vh; min-height: 0; }
.vops .decs { overflow-y: auto; min-height: 0; padding-right: 4px; }

.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.dcard:hover { border-color: var(--line-2); box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.dcard img, .dcard .noimg { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.dcard .dn { font-size: 14px; font-weight: 600; margin-top: 4px; }

/* 顶栏页签多时窄窗口可横向滚动，不把右侧按钮挤掉 */
.topbar .tabs { overflow-x: auto; flex-shrink: 1; min-width: 0; scrollbar-width: none; }
.topbar .tabs::-webkit-scrollbar { display: none; }



/* ---- 编辑事项表单 ---- */
.panel-body.edit .grid3 { gap: 12px; }
.panel-body.edit .field label, .panel-body.edit .sect > label, .ef-h label { font-size: 12px; color: var(--muted); margin: 0; }
.panel-body.edit .field label .muted, .panel-body.edit .sect > label .muted { margin-left: 4px; }
.panel-body.edit input.lg { font-size: 15px; font-weight: 600; height: 38px; }
.panel-body.edit textarea { line-height: 1.55; }
.ef-list { border-top: 1px solid var(--line); padding-top: 12px; }
.ef-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ef-h label { font-weight: 600; color: var(--text-2); font-size: 13px; }
button.ghost { border-color: transparent; background: transparent; color: var(--accent); box-shadow: none; }
button.ghost:hover { background: var(--surface-2); }
.panel-body.edit .dots { gap: 2px; }
.panel-body.edit .dots .editable { align-items: flex-start; padding: 5px 6px; margin: 0 -6px; }
.panel-body.edit .dots .tx { flex: 1; min-width: 0; line-height: 1.5; }
.panel-body.edit .dots .del, .panel-body.edit .ref .del { margin-left: auto; flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--muted-2); font-size: 16px; line-height: 1; cursor: pointer; }
.panel-body.edit .dots .del:hover, .panel-body.edit .ref .del:hover { background: #fee2e2; color: var(--red); }
.panel-body.edit .ref { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-body.edit .ref > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-more { border-top: 1px solid var(--line); padding-top: 12px; }
.ef-more summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); user-select: none; }
.ef-more summary::-webkit-details-marker { display: none; }
.ef-more summary::before { content: "▸"; color: var(--muted-2); font-size: 11px; width: 10px; }
.ef-more[open] summary::before { content: "▾"; }
.ef-more summary .muted { font-weight: 400; font-size: 12px; }
.ef-in { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
/* ---- 把待定事项定下来的弹窗 ---- */
.st-opts { display: flex; flex-direction: column; gap: 8px; }
.st-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 13px; line-height: 1.5; color: var(--text) !important; }
.st-opt:hover { border-color: var(--line-2); }
.st-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.st-opt input { width: auto; margin-top: 3px; flex-shrink: 0; }
.st-opt .cf-n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.st-opt .tx { flex: 1; min-width: 0; }
.st-opt .tx b { display: block; font-weight: 600; }
.state .st-tags { flex-wrap: wrap; gap: 6px; }
.state .st-tags .bd, .state .st-tags .dtag { margin: 0; }
/* 编辑表单里的意见冲突栏（状态选待定时出现） */
.ef-cf { border: 1px solid #fde68a; background: #fffbeb; border-radius: var(--radius); padding: 10px 12px; }
.ef-cf .ef-h label .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.cf-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.cf-row .cf-n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 10px; background: var(--surface); border: 1px solid #fde68a; color: var(--text-2); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.cf-row .who { width: 110px; flex-shrink: 0; }
.cf-row .tx { flex: 1; min-width: 0; }
.cf-row .del { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--muted-2); font-size: 16px; cursor: pointer; }
.cf-row .del:hover { background: #fee2e2; color: var(--red); }
#overview .box .li .m .bd, #overview .box .li .m .dtag { margin: 0; }
.cf-who { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.cf-who label { color: var(--muted); flex-shrink: 0; margin: 0; }
.cf-who select { flex: 1; min-width: 0; }
/* 确认变更里 AI 找出的前置关系 */
.deplinks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.depchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 6px 2px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); max-width: 100%; }
.depchip .bd { margin: 0; }
.depchip .x { font-style: normal; cursor: pointer; color: var(--muted-2); width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 14px; }
.depchip .x:hover { background: #fee2e2; color: var(--red); }

/* 向导左右分栏：左边步骤，右边源文件（回放 / 原文），右边跨步骤保留 */
.wz-left { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; }
.dialog.split { width: min(1800px, 96vw); height: 92vh; max-height: 92vh; display: grid; grid-template-columns: minmax(560px, 48%) 1fr; }
.dialog.split .wz-left { border-right: 1px solid var(--line); }
.wz-src { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
.wz-src-head { display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.dialog.split .wz-left > header, .dialog.split .wz-src-head { height: 60px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; flex-shrink: 0; }   /* 左右两边的标题栏一样高，底线对齐 */
.wz-src-head .muted.small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-src .wz-screen { flex: 0 0 auto; height: 38%; min-height: 200px; margin: 12px 16px 0; }
.wz-src .rp-now { padding: 8px 16px 0; }
.wz-src #ws-q { margin: 8px 16px; }
.wz-src .segs { padding: 0 8px 8px; }
.wz-src .tseg.hit { background: #fef9c3; border-left: 3px solid var(--amber); }
.wz-src .wz-src-body { flex: 1; min-height: 0; }
.wz-src-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .dialog.split { grid-template-columns: 1fr; } .dialog.split .wz-src { display: none; } .dialog.split .wz-left { border-right: 0; } }

/* 审核意见卡：上面是可以改的「意见」（AI 概括），下面是不能改的「原话」（记录里一字不差的那句） */
.op .head .lbl, .op .quote.said .lbl { flex-shrink: 0; margin-right: 8px; }
.op .quote.said { display: flex; align-items: baseline; color: var(--text-2); border-left: 2px solid var(--line-2); padding-left: 10px; font-style: normal; }

/* 确认变更：带标签的输入框；说明和解决方案在这一步也能改 */
.prop label.fld { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prop label.fld > span { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.prop label.fld input, .prop label.fld textarea { flex: 1; min-width: 0; }
.prop label.fld.block { align-items: flex-start; margin-top: 6px; }
.prop label.fld.block > span { width: 56px; padding-top: 5px; }
.prop textarea.sm { font: inherit; font-size: 13px; line-height: 1.5; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }

/* 协同的人 */
.collab { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.collab select.sm { width: auto; }

/* 统一的事项卡 */
.kv.own { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.kv.own > div.wide { grid-column: 1 / -1; }
.kv.own b { display: block; min-width: 0; }
.kv.own b .was, .panel-head .kv .was { display: block; font-style: normal; font-size: 11px; color: var(--amber); font-weight: 400; margin-top: 2px; }
.prop .kv.own { margin-top: 8px; }
.prop .kv.own select.sm, .prop .kv.own input.sm { width: 100%; box-sizing: border-box; }
.prop .sect { margin-top: 10px; }
.prop .sect > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.prop .sect .text { color: var(--text-2); white-space: pre-wrap; line-height: 1.55; }
.prop .sect textarea.sm { width: 100%; box-sizing: border-box; }
.prop .sect .text.add, .prop .dots.add { margin-top: 6px; }
.prop .sect .bd.new { margin: 0 6px 0 0; }
.prop .title-in { font-weight: 600; flex: 1; }
.prop .head .title { flex: 1; min-width: 0; display: flex; }
.panel-body.edit .own-edit { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.deplinks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.deplinks select.sm { width: auto; max-width: 320px; }

/* 确认变更的事项卡：收紧 */
.prop { padding: 14px 16px; }
.prop .kv.own { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.prop .kv.own > div.wide { grid-column: auto; }
.prop .kv.own span { font-size: 11px; }
.prop .kv.own .collab { display: flex; gap: 4px; }
.prop .kv.own .collab select.sm { max-width: 100%; }
.prop .collab .depchip { font-size: 12px; padding: 1px 4px 1px 6px; }
.prop .sect { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.prop .sect > label { font-size: 11px; margin-bottom: 6px; }
.prop .sect textarea.sm { line-height: 1.55; }
.prop .title-in { font-size: 14px; font-weight: 600; border-color: transparent; background: transparent; padding-left: 6px; margin-left: -6px; }
.prop .title-in:hover, .prop .title-in:focus { border-color: var(--line); background: var(--surface); }
.prop .origins { gap: 3px; }
.prop .origins > .muted.small { margin-bottom: 2px; }
.prop .origins .origin { gap: 6px; align-items: baseline; line-height: 1.5; }
.prop .origins .origin b { flex-shrink: 0; font-weight: 500; color: var(--text); }
.prop .origins .origin .tx { color: var(--text-2); }
.prop .origins .origin .bd { margin: 0; flex-shrink: 0; }
.prop .origins details.more summary { cursor: pointer; font-size: 12px; color: var(--accent); list-style: none; margin: 2px 0; }
.prop .origins details.more summary::-webkit-details-marker { display: none; }
.prop .quote.said { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; }
.prop .quote.said .lbl { flex-shrink: 0; }
.prop .link-row { margin: 0 0 6px; }
.prop .deplinks { gap: 6px 8px; }
.prop .deplinks .depchip { font-size: 12px; }
.prop .deplinks select.sm { width: auto; max-width: 260px; }
@media (max-width: 1400px) { .prop .kv.own { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 确认议题 */
.tpbox { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.tpbox.plain { border-style: dashed; }
.tpbox input.name { font-weight: 600; width: 260px; }
.tpbox .tp-ops { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tp-op { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.tp-op:hover { background: var(--surface-2); }
.tp-op .who { flex-shrink: 0; font-weight: 500; }
.tp-op .tx { flex: 1; min-width: 0; color: var(--text-2); }
.tp-op select.sm { width: auto; max-width: 200px; }
.tp-op .bd { margin: 0; }

/* 向导分栏时左边标题栏放不下六步：不是当前步的只显示数字（鼠标放上去有名字），文件名不显示（右边已经有） */
.steps em { font-style: normal; }
.dialog.split .steps { gap: 4px; }
.dialog.split .steps span:not(.cur) em { display: none; }
.dialog.split .steps span:not(.cur) { gap: 0; }
.dialog.split .steps .bar { width: 12px; }
.dialog.split .wz-left > header > .muted.small { display: none; }
.dialog.split .wz-left > header > button { flex-shrink: 0; margin-left: auto; }
.dialog.split .wz-left > header > .spacer { display: none; }

.tl.snap { cursor: pointer; border-radius: var(--radius-sm); }
.tl.snap:hover { background: var(--bg); }
.tl-then { display: inline-flex; gap: 6px; align-items: center; margin-right: 4px; }
.tl-then .bd { margin-left: 0; }
