:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --border: #e3e8ef;
  --text: #1f2733;
  --text-soft: #647084;
  --primary: #3b82f6;
  --primary-d: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
#app { display: flex; height: 100vh; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: 260px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px; gap: 12px;
}
/* 侧栏响应式：窗口小时同比例缩窄，给主区域留更多空间 */
@media (max-width: 1200px) { .sidebar { width: 220px; padding: 14px 12px; gap: 10px; } .brand { font-size: 15px; } }
@media (max-width: 960px)  { .sidebar { width: 190px; padding: 12px 10px; gap: 8px;  } .brand { font-size: 14px; } .sidebar .focus-panel-title { font-size: 10px; } }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; padding: 4px 2px 12px; flex-wrap: wrap; row-gap: 4px; }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--primary); box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
.search-wrap input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel-2); font-size: 13px; outline: none;
}
.search-wrap input:focus { border-color: var(--primary); background: #fff; }
.proj-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -4px; padding: 0 4px; }
.proj-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
}
.proj-item:hover { background: var(--panel-2); }
.proj-item.active { background: #eaf1ff; border-color: #cfe0ff; }
.proj-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.proj-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-item .cnt { font-size: 11px; color: var(--text-soft); background: var(--panel-2); padding: 1px 7px; border-radius: 10px; }
.proj-item .sync-mini { width: 22px; height: 22px; padding: 0; border: none; background: transparent; color: var(--text-soft); cursor: pointer; border-radius: 4px; font-size: 14px; }
.proj-item .sync-mini:hover { background: var(--primary); color: #fff; }
.proj-item .work-new-btn { width: 20px; height: 20px; padding: 0; border: none; background: transparent; color: var(--text-soft); cursor: pointer; border-radius: 4px; font-size: 15px; line-height: 1; margin-left: 2px; }
.proj-item .work-new-btn:hover { background: var(--primary); color: #fff; }
.ct-parent-item:hover { background: #eaf1ff; }
.proj-all { gap: 4px; }
.sidebar-foot { font-size: 11px; color: var(--text-soft); text-align: center; padding-top: 6px; border-top: 1px solid var(--border); }
/* 业务总览顶部统计卡片 */
.biz-cards { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; padding: 10px 16px 16px; }
.biz-card {
  border: 1px dashed #b9c8e8;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fbfcff;
  min-height: 52px;
  overflow: hidden;
}
.biz-card-icon { font-size: 17px; flex-shrink: 0; }
.biz-card-val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.biz-card-label { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.biz-card.bound { border-style: solid; border-color: #9db8f5; background: #f0f6ff; cursor: pointer; }
.biz-card.bound:hover { background: #e3eeff; }
.biz-card:not(.bound) { cursor: pointer; }
.biz-card:not(.bound):hover { background: #f0f5ff; }
/* 业务总览底部信息框 */
.biz-info-box { margin: 14px 16px 0; border: 1px dashed #b9c8e8; border-radius: 10px; padding: 16px 20px; background: #fbfcff; min-height: 33vh; }
.biz-info-title { font-size: 12px; font-weight: 700; color: var(--text-soft); margin-bottom: 6px; }
.biz-info-content { font-size: 13px; }
/* 业务总览 2×2 窗口 */
.biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 38vh; gap: 12px; padding: 14px 16px; }
.biz-window { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.biz-window.w1 { grid-column: 1 / -1; }
.biz-window-title { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); background: var(--panel-2); flex-shrink: 0; }
.biz-window-body { flex: 1; padding: 8px 12px; overflow-y: auto; min-height: 0; }
.biz-name-link { cursor: pointer; }
.biz-name-link:hover { color: var(--primary); text-decoration: underline; }
/* 专注中的业务行：置顶 + 蓝色（单行不换行保持行高一致） */
.biz-row-focus { background: #eaf1ff !important; }
.biz-row-focus .biz-cell, .biz-row-focus .biz-name, .biz-row-focus .biz-name-link { color: #1d4ed8; }
.biz-row-focus .biz-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-row-focus .biz-name-link:hover { color: #1e40af; }
/* 窗口4 文件列表 */
.bzf-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; border-bottom: 1px dashed var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bzf-item:hover { background: #eaf1ff; }
.bzf-item.is-dir { font-weight: 600; }
/* 业务行内文件夹占位卡片 */
.biz-fcard {
  display: inline-block;
  border: 1px dashed #c3cfe8;
  border-radius: 4px;
  padding: 0 3px;
  margin-right: 0;
  font-size: 10px;
  line-height: 16px;
  color: var(--text-soft);
  background: #fbfcff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.biz-fcard:hover { background: #eaf1ff; color: var(--primary); }
.biz-fcard.match { border-color: #86c79a; color: #15803d; background: #f0faf3; }
.biz-fcard.no-match { border-color: #d1d5db; color: #9ca3af; background: #f3f4f6; }
.biz-fcard.no-match:hover { background: #ececec; color: #6b7280; }
/* 侧栏专注面板（★ v1.5.1.12：按钮移标题行、删任务名行，高度再降） */
.focus-panel {
  padding: 4px 12px;
  margin: 4px 10px;
  border: 1px solid #c7d6f7;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2f7ff 0%, #f5f1ff 100%);
  box-shadow: 0 1px 4px rgba(79, 110, 247, .08);
  flex-shrink: 0;
}
.focus-panel-title { font-size: 12px; font-weight: 700; color: #4f6ef7; margin-bottom: 2px; letter-spacing: .5px; }
.focus-panel-timer { font-size: 18px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: #3b5bdb; letter-spacing: 1px; line-height: 1.2; }
.focus-panel-input { width: 100%; padding: 4px 8px; border: 1px solid #cfdcf8; border-radius: 6px; font-size: 12px; margin-bottom: 4px; background: #fff; }
.focus-panel-list { position: absolute; top: 100%; left: 0; right: 0; max-height: 150px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); z-index: 99; margin-top: -4px; }
.focus-panel-list.up { top: auto; bottom: calc(100% - 6px); margin-top: 0; }
.focus-panel-list .fp-item { padding: 5px 8px; cursor: pointer; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-panel-list .fp-item:hover { background: #eaf1ff; }
.focus-panel-list .fp-item.selected { background: #d8ecff; }
.focus-panel-list .fp-empty { padding: 8px; text-align: center; color: var(--text-soft); font-size: 11px; }
.focus-panel-ctrls { display: flex; gap: 6px; margin-top: 4px; }
.focus-panel-status { font-size: 11px; color: #6b7fc9; text-align: center; margin-top: 6px; }

/* 今日时间线独立页：面板 + 底部调节条（v15 新方案：position 绝对定位） */
#tlPanelWrap {
  position: absolute;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#tlPanelWrap #timelinePanel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, .06);
}
#tlResizeBar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  cursor: ns-resize;
  z-index: 7;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(226, 232, 240, .92), rgba(226, 232, 240, 0));
  border-radius: 0 0 10px 10px;
  user-select: none;
  transition: background .15s;
}
#tlResizeBar::before {
  content: '';
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: rgba(100, 116, 139, .5);
  transition: background .15s;
}
#tlResizeBar:hover::before { background: #4f6ef7; }
#tlResizeBar.dragging::before { background: #4f6ef7; }
#tlResizeBar.dragging { background: linear-gradient(to top, rgba(79, 110, 247, .25), rgba(79, 110, 247, 0)); }

/* ---------- 主区域 ---------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
#tabBody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#main { flex: 1; min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
#main > .topbar { flex-shrink: 0; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }

/* 顶部固定区（项目台账 / 基本信息）：flex 顶部，不滚动 */
.ledger-sticky {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  background: #f5f7fa;
  padding: 24px 28px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}
.ledger-sticky .topbar { margin: 0 0 8px; padding: 0; }
.ledger-sticky .topbar h1 { font-size: 18px; }
.ledger-sticky .topbar .sub { font-size: 12px; }
.ledger-sticky .sheet-tabs { margin: 6px 0 8px; padding: 0 4px; }
.ledger-sticky .ledger-summary { margin: 4px 0; padding: 6px 10px; }
.ledger-sticky .ledger-filters { margin: 0 0 4px; }
.ledger-sticky .ledger-toolbar { margin: 4px 0 6px; }
.ledger-sticky .btn { padding: 5px 11px; font-size: 12px; }

/* 表格容器：flex: 1 占满 .main 剩余空间，自己滚动 */
.table-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.10);
  background: #fff;
}
.table-panel .panel { border: none; border-radius: 0; padding: 0; }
.table-panel .data-table { min-width: max-content; }

/* 表头 sticky 在 .table-panel 内（自己滚动容器的 top 0） */
.table-panel .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel-2);
  box-shadow: inset 0 -1px 0 var(--border);
}
.topbar h1 { font-size: 22px; margin: 0; }
.topbar .sub { color: var(--text-soft); font-size: 13px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab { padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-soft); font-weight: 500; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }
.tab[draggable="true"] { cursor: grab; }
.tab[draggable="true"]:active { cursor: grabbing; }
.tab.dragging { opacity: .45; }
#workPlanTabs { flex-wrap: wrap; }

/* ---------- 卡片/网格 ---------- */
.grid { display: grid; gap: 16px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-5 { grid-template-columns: repeat(5, 1fr); }
.cards-6 { grid-template-columns: repeat(6, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cards-4 { grid-template-columns: repeat(2,1fr); } .cards-5 { grid-template-columns: repeat(2,1fr); } .cards-6 { grid-template-columns: repeat(3,1fr); } .cards-3 { grid-template-columns: 1fr; } }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); text-align: center; }
.stat-card .label { color: var(--text-soft); font-size: 11px; }
.stat-card .value { font-size: 20px; font-weight: 700; margin-top: 8px; }
.stat-card .value.green { color: var(--green); }
.stat-card .value.amber { color: var(--amber); }
.stat-card .value.red { color: var(--red); }

/* ---------- 业务总览 ---------- */
.biz-header { display: flex; align-items: center; padding: 8px 12px; background: var(--panel-2); border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 600; color: var(--text-soft); border: 1px solid var(--border); border-bottom: none; }
.biz-row { display: flex; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-top: none; background: var(--panel); }
.biz-row:last-child { border-radius: 0 0 8px 8px; }
.biz-row:hover { background: #f8faff; }
.biz-cell { padding: 0 6px; font-size: 13px; }
.biz-header .biz-cell, .biz-row .biz-cell { text-align: center; }
.biz-name { flex: 2; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 项目组成员列：默认列宽单行截断，点击查看完整 */
.biz-staff { flex: 1; min-width: 60px; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.biz-staff:hover { color: var(--primary); }
.biz-due { flex: 1; color: var(--text-soft); min-width: 80px; }
.biz-hours { flex: 0 0 90px; color: var(--text-soft); font-weight: 600; }
.biz-folders { flex: 2; display: flex; justify-content: center; gap: 3px; flex-wrap: nowrap; overflow: hidden; min-width: 0; }

.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

/* ---------- 阶段 / 附件 ---------- */
.stage-block { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.stage-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.stage-head .title { font-weight: 700; font-size: 15px; flex: 1; }
.stage-head .title[contenteditable] { outline: 1px dashed transparent; }
.stage-head .title:focus { outline: 1px dashed var(--primary); border-radius: 4px; }
.dropzone {
  padding: 22px; text-align: center; color: var(--text-soft); border: 2px dashed var(--border);
  margin: 14px 16px; border-radius: 8px; cursor: pointer; transition: .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: #f0f6ff; color: var(--primary); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.file-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: #fff; }
.file-card .ic { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.file-card .meta { flex: 1; overflow: hidden; }
.file-card .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .fsub { font-size: 11px; color: var(--text-soft); }
.file-card .acts { display: flex; gap: 4px; }
.file-card img.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } }
.kcol { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.kcol-head { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.kcol-head .pill { font-size: 11px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; color: var(--text-soft); }
.task-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.task-card .tt { font-weight: 600; margin-bottom: 6px; }
.task-card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-soft); }
.tag { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.tag.due-over { background: #fde8e8; color: var(--red); border-color: #f5c2c2; }
.task-card .ctrls { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.task-card select { font-size: 12px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border); }

/* ---------- 按钮 ---------- */
.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: .12s; }
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { color: var(--red); border-color: #f3c2c2; }
.btn-danger:hover { background: #fdeaea; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-soft); padding: 4px 8px; }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-block { width: 100%; }
/* ===== 侧栏分区挡板（工作区 / 生活区 / 信息区） ===== */
.nav-section {
  font-size: 0; line-height: 0; color: transparent; user-select: none;
  margin: 0 2px; padding-top: 10px; border-top: 1px dashed var(--border);
}
/* ===== 侧栏导航按钮：主题色区分（基本信息/项目台账/今日任务/工作计划/业务总览/时间线） ===== */
.sidebar > .btn[data-nav] {
  --nav: #3b82f6;
  border-left: 3px solid var(--nav);
  text-align: left;
  padding: 8px 12px;
}
.sidebar > .btn[data-nav]:hover { background: color-mix(in srgb, var(--nav) 8%, #fff); }
.sidebar > .btn[data-nav].active {
  background: color-mix(in srgb, var(--nav) 12%, #fff);
  border-color: var(--nav);
  color: var(--nav);
  font-weight: 600;
}
/* ===== 页面主题：与侧栏按钮同色（#main 内 --primary 变量跟随，主按钮/焦点/激活标签同步变色） ===== */
#main[data-page="customer"] { --primary: #3b82f6; --primary-d: #2563eb; }
#main[data-page="ledger"]   { --primary: #16a34a; --primary-d: #15803d; }
#main[data-page="today"]    { --primary: #f59e0b; --primary-d: #d97706; }
#main[data-page="work"]     { --primary: #8b5cf6; --primary-d: #7c3aed; }
#main[data-page="biz"]      { --primary: #0ea5e9; --primary-d: #0284c7; }
#main[data-page="tl"]       { --primary: #ec4899; --primary-d: #db2777; }
/* 页面顶栏标题左侧主题色条 */
#main[data-page] .topbar h1::before {
  content: ''; display: inline-block; width: 10px; height: 18px;
  border-radius: 3px; background: var(--primary); margin-right: 8px; vertical-align: -2px;
}

/* ---------- 弹窗 ---------- */
.modal-mask[hidden] { display: none !important; }
.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 460px; max-width: 92vw; max-height: 88vh; overflow-y: auto; padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
/* 临时沟通弹窗：标签与控件同一行（沟通人/单位各占一行，紧凑） */
.cm-row { display: flex; align-items: center; gap: 8px; }
.cm-row > label { display: inline-block; margin: 0; flex-shrink: 0; width: 42px; text-align: right; }
.cm-row > label::after { content: '：'; }
.cm-row > input { flex: 1; min-width: 0; }
.cm-row > div { flex: 1; min-width: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- 杂项 ---------- */
.empty { text-align: center; color: var(--text-soft); padding: 70px 20px; }
.empty .big { font-size: 46px; margin-bottom: 10px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2733; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 99; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-soft); }
.progressbar { height: 9px; background: var(--panel-2); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progressbar > span { display: block; height: 100%; background: linear-gradient(90deg,#3b82f6,#2563eb); }
.list-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; min-width: 0; }
.list-line:last-child { border-bottom: none; }
/* 任务行标题：科学截断（不硬折成竖排），hover 显示完整 */
.list-line .title-cell,
.today-task-row .title-cell,
.subtask-row .title-cell,
.task-list-row .title-cell {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}
/* 今日任务页：单行紧凑布局（标题截断、日期同排、项目标签小） */
.today-task-row {
  gap: 5px;
}
.today-task-row .title-cell {
  white-space: nowrap; word-break: normal; overflow-wrap: normal;
  text-overflow: ellipsis; overflow: hidden; line-height: 1.4; max-width: 100%;
}
.today-task-row .task-actions {
  display: flex; gap: 4px; flex-shrink: 0;
}
/* 项目标签（如「未分类」）：紧凑小标签 */
.proj-tag {
  flex-shrink: 0; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--text-soft); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; line-height: 16px;
}
.today-task-row, .subtask-row, .task-list-row { min-width: 0; }
/* 时间线条目内长文本截断（避免硬折） */
.tl-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-green { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.dot-amber { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.dot-red { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.dot-today { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* ---------- 项目概览：左=固定宽度任务列表，右=任务详情三窗口（宽度锁定，点击不跳动） ---------- */
.overview-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: stretch; flex: 1; min-height: 0; height: 100%; min-height: 340px; }
.ov-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ov-left { min-height: 0; }
.ov-scroll { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px; margin-top: 4px; }
.ov-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
/* 右侧三个小窗口：各自窗口内滚动（不再是整列滚动） */
.ov-section { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ov-section .section-title { flex-shrink: 0; }
.ov-section-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: 1fr; height: auto; }
  .ov-scroll { max-height: 50vh; }
  .ov-right { overflow: visible; }
}
a.link { color: var(--primary); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ---------- 侧栏分组（滴答式下拉） ---------- */
.group-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px; margin-top: 8px; cursor: pointer; border-radius: 8px; color: var(--text-soft); font-size: 12px; font-weight: 700; }
.group-head:hover { background: var(--panel-2); }
.group-head .chev { width: 14px; text-align: center; font-size: 10px; }
.group-head .gname { flex: 1; }
.group-head .cnt { font-size: 11px; background: var(--panel-2); padding: 1px 7px; border-radius: 10px; }
.proj-item.child { padding-left: 24px; }

/* ---------- 任务卡片（可点击） ---------- */
.task-card { cursor: pointer; transition: .12s; }
.task-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(59,130,246,.15); }

/* ---------- 任务详情 ---------- */
.detail-back { display: flex; align-items: center; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; min-height: 0; }
.detail-cols2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.detail-cols2 > .panel { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* ---------- 项目进度时间线 ---------- */
.feed-list { display: flex; flex-direction: column; gap: 4px; }
.feed-item { border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.feed-head { display: flex; align-items: center; gap: 6px; padding: 5px 10px; cursor: pointer; user-select: none; }
.feed-head:hover { background: #e9eef6; }
.feed-time { font-size: 11px; color: var(--text-soft); font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 80px; }
.feed-kind { font-size: 10px; padding: 0 6px; border-radius: 8px; flex-shrink: 0; color: #fff; background: var(--text-soft); }
.feed-kind.kind-focus { background: #6366f1; }
.feed-kind.kind-note { background: #d97706; }
.feed-kind.kind-create { background: #16a34a; }
.feed-kind.kind-edit { background: #3b82f6; }
.feed-src { font-size: 11px; color: #7c3aed; background: #f3e8ff; padding: 0 6px; border-radius: 8px; flex-shrink: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-brief { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.feed-arrow { color: var(--text-soft); flex-shrink: 0; transition: transform .12s; }
.feed-detail { padding: 4px 12px 12px 12px; font-size: 12px; color: var(--text); white-space: pre-wrap; border-top: 1px dashed var(--border); margin: 0 12px; padding-left: 0; padding-right: 0; }

/* ---------- 工作日志 ---------- */
.wl-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0 16px; }
.wl-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); }
.wl-f select, .wl-f input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; color: var(--text); }
.wl-list { display: flex; flex-direction: column; gap: 6px; }
.wl-item { border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.wl-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; user-select: none; }
.wl-head:hover { background: #e9eef6; }
.wl-proj { flex-shrink: 0; max-width: 150px; color: var(--text-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-task { flex-shrink: 0; max-width: 220px; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-detail { padding: 4px 12px 12px 12px; font-size: 13px; color: var(--text); border-top: 1px dashed var(--border); margin: 0 12px; padding-left: 0; padding-right: 0; }
.wl-meta { color: var(--text-soft); font-size: 12px; margin-bottom: 6px; }

/* 任务详情页：整体占满视口，每个 panel 独立滚动（不整体滚动） */
.detail-page { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 12px; }
.detail-page > .detail-back { flex-shrink: 0; }
.detail-page > .topbar { flex-shrink: 0; margin-top: 0 !important; }
.detail-page > .detail-grid { flex: 1; min-height: 0; overflow: hidden; }
.detail-page > .detail-cols3 { flex: 1.35; }
.detail-page > .detail-cols2 { flex: 1; }
.detail-page .detail-grid > .panel { overflow-y: auto; min-height: 0; }

.detail-cols3 { grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; min-height: 0; }
.detail-cols3 > .panel { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.detail-cols3 #taskNote { flex: 1; min-height: 140px; }
.detail-cols3 #taskFolderArea { flex: 1; min-height: 0; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.detail-cols3 .file-list { flex: 1; min-height: 120px; max-height: none; min-width: 0; overflow-x: hidden; overflow-y: auto; }
@media (max-width: 1100px) { .detail-cols3 { grid-template-columns: 1fr; min-height: auto; } .detail-cols3 #taskNote { flex: 0 0 auto; min-height: 120px; } .detail-cols3 .file-list { flex: 0 0 auto; max-height: 58vh; } }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.meta-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.meta-row:last-child { border-bottom: none; }
.meta-row .ml { width: 84px; color: var(--text-soft); flex-shrink: 0; }
.meta-row .mv { flex: 1; font-weight: 400; }
.title-input { font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); width: 100%; padding: 4px 6px; font-family: inherit; }
.title-input:hover { border-color: var(--border); }
.title-input:focus { outline: none; border-color: #2563eb; background: #fff; }
.meta-row .mv select, .meta-row .mv input { width: 100%; font-size: 13px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font-family: inherit; }
.meta-row .mv select:focus, .meta-row .mv input:focus { outline: none; border-color: #2563eb; }
.tag-mini { font-size: 10px; color: var(--text-soft); border: 1px solid var(--border); border-radius: 8px; padding: 0 6px; margin-left: 6px; font-weight: 400; }

/* ---------- 提示横幅 ---------- */
.callout { background: #eef4ff; border: 1px solid #cfe0ff; color: #1e3a8a; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 14px 0 4px; line-height: 1.6; }
.callout .btn { vertical-align: middle; }
.subtask-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; }
.subtask-row:hover { background: #f8fafc; }
.sub-check { width: 18px; height: 18px; flex-shrink: 0; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--border); color: var(--text-soft); }
.sub-check.done { background: #16a34a; border-color: #16a34a; color: #fff; }
.subtask-row.is-done span:last-child { text-decoration: line-through; color: var(--text-soft); }

/* ---------- 本地文件夹映射（存储·资料） ---------- */
.text-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; outline: none; font-family: inherit; color: var(--text); }
.text-input:focus { border-color: var(--primary); }
.folder-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-soft); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; max-height: 58vh; overflow-y: auto; }
.bc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; font-size: 12px; }
.bc { cursor: pointer; color: var(--primary); padding: 2px 4px; border-radius: 5px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc:hover { background: #e0ecff; }
.bc-cur { color: var(--text); cursor: default; font-weight: 600; }
.bc-cur:hover { background: transparent; }
.bc-sep { color: var(--text-soft); }
.fl-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 13px; min-width: 0; }
.fl-row:last-child { border-bottom: none; }
.fl-row:hover { background: var(--panel-2); }
.fl-dir { cursor: pointer; }
.fl-dir:hover { background: #eef4ff; }
.fl-ic { width: 38px; height: 24px; flex-shrink: 0; border-radius: 5px; background: #647084; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: .3px; }
.fl-dir-ic { background: #d9963a; font-size: 13px; }
.fl-name { font-weight: 600; flex: 0 1 auto; min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-path { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.fl-size { width: 84px; text-align: right; flex-shrink: 0; font-size: 12px; }
.fl-mtime { width: 92px; text-align: right; flex-shrink: 0; font-size: 12px; }
.fl-acts { display: flex; gap: 6px; flex-shrink: 0; }
.bv-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.bv-item:hover { background: var(--panel-2); }

/* ---------- 任务列表（贴合滴答：全部任务，含无日期） ---------- */
.task-list-row { align-items: center; gap: 4px; }
/* 主任务整行深蓝背景+左侧蓝条渲染，与子任务（is-child 灰底灰条）清晰区分 */
.task-list-row.is-parent { background: #dbeafe; border-left: 3px solid #3b82f6; border-radius: 6px; padding-left: 8px; padding-right: 4px; }
.task-list-row.is-parent:hover { background: #cfe4ff; }
.task-list-row.is-child { border-left: 2px solid var(--border); background: var(--panel-2); border-radius: 0 6px 6px 0; }
.task-list-row.is-child:hover { background: #eef4ff; }
.parent-badge { background: #eaf1ff; color: #2563eb; border-color: #cfe0ff; }
.add-sub-btn { opacity: 0; transition: opacity .15s; padding: 1px 6px; font-size: 11px; margin-left: 4px; flex-shrink: 0; }
.task-list-row:hover .add-sub-btn { opacity: 1; }
.task-check { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; accent-color: var(--primary); }
.tdot { width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--text-soft); background: #fff; }
.tdot.is-doing { border-color: var(--amber); background: var(--amber); }
.tdot.is-done { border-color: var(--green); background: var(--green); }
.struck { text-decoration: line-through; color: var(--text-soft); }
.tag-muted { background: var(--panel-2); color: var(--text-soft); border: 1px solid var(--border); }
.sub-flag { font-size: 10px; color: var(--text-soft); border: 1px solid var(--border); border-radius: 6px; padding: 0 4px; margin-left: 4px; }
.task-card.is-sub { border-left: 3px solid var(--primary); }

/* ---------- 项目台账 ---------- */
.ledger-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 6px; }
.ledger-filters .text-input { min-width: 240px; flex: 1 1 240px; max-width: 360px; font-size: 12px; padding: 4px 8px; }
/* ★ v1.5.1.10：筛选区字体/框调小到 12px，与表格文字统一 */
.ledger-filters select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 12px; color: var(--text); font-family: inherit; }
/* ★ v1.5.1.18：企业/回款状态下拉收窄，让回款状态与搜索框同行显示 */
.ledger-filters #ledCompany { width: 120px; max-width: 120px; }
.ledger-filters #ledPaid { width: 105px; max-width: 105px; }
.ledger-filters .btn { margin-left: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.data-table thead th { text-align: center; }
/* 调整列宽确保完整显示 */
.data-table td.col-seq { width: 50px; min-width: 40px; text-align: center; }
.data-table td.center { text-align: center; }
/* 客户信息列 */
.data-table td[data-key="company"] { min-width: 160px; }
.data-table td[data-key="shortName"] { min-width: 100px; }
.data-table td[data-key="address"] { min-width: 180px; }
.data-table td[data-key="contact"] { min-width: 80px; }
.data-table td[data-key="phone"] { min-width: 110px; }
.data-table td[data-key="region"] { min-width: 90px; }
/* 项目组信息列 */
.data-table td[data-key="name"] { min-width: 70px; }
.data-table td[data-key="joinDate"] { min-width: 90px; }
.data-table td[data-key="leaveDate"] { min-width: 90px; }
/* 服务单位列 */
.data-table td[data-key="unitName"] { min-width: 120px; }
.data-table td[data-key="invoice"] { min-width: 140px; }
.data-table td[data-key="receipt"] { min-width: 140px; }
/* 弹窗表格列（已参与/承做项目） */
.modal .data-table th, .modal .data-table td { white-space: normal; word-break: break-word; min-width: 80px; }
/* 列宽拖拽手柄 */
.data-table th.th-sort { position: relative; }
.data-table th .col-resize {
  position: absolute; right: -3px; top: 0; width: 8px; height: 100%;
  cursor: col-resize; z-index: 2; user-select: none;
}
.data-table th .col-resize::after {
  content: ""; position: absolute; right: 3px; top: 25%; height: 50%; width: 2px;
  background: transparent; border-radius: 2px;
}
.data-table th .col-resize:hover::after { background: var(--primary); }
.data-table th { background: var(--panel-2); position: sticky; top: 0; z-index: 1; font-weight: 600; color: var(--text-soft); }
.data-table th.th-sort { cursor: pointer; user-select: none; }
.data-table th.th-sort:hover { color: var(--primary); }
.data-table th.active { color: var(--primary); }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: var(--panel-2); }
.data-table td { color: var(--text); }

/* ★ v1.4.2.26 搜索框右侧 ✕ 清除按钮（全局自动挂载） */
.search-clear-wrap { position: relative; display: inline-flex; align-items: center; }
.search-clear-wrap input { padding-right: 22px !important; box-sizing: border-box; }
.search-clear-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-soft); font-size: 11px; line-height: 1; cursor: pointer; border-radius: 50%; padding: 0; z-index: 3; }
.search-clear-btn:hover { color: var(--text); background: rgba(0,0,0,.08); }

/* ★ 台账报告用途列：★ 符号单元格（点击弹窗管理多条用途） */
.reportuse-star { color: #f59e0b; cursor: pointer; font-size: 14px; }
.reportuse-star.empty { color: #cbd5e1; }
/* v1.5.1.29：客户信息 办公地址/邮寄地址 ★（有值金色+数量 / 无值灰☆） */
.addr-star { color: #f59e0b; cursor: pointer; font-size: 14px; }
.addr-star.empty { color: #cbd5e1; }

/* 台账：表格内就地编辑 */
.data-table td .cell-edit {
  width: 100%; min-width: 72px;
  border: 1px solid transparent; background: transparent;
  border-radius: 6px; padding: 5px 7px;
  font: inherit; color: var(--text); outline: none;
}
.data-table td .cell-edit:hover { border-color: var(--border); background: #fff; }
.data-table td .cell-edit:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }
/* ★ 项目台账：行高紧凑 + 字号小一号（只影响台账 #ledTable，不动基本信息等其它表） */
#ledTable .data-table { font-size: 12px; }
#ledTable .data-table th, #ledTable .data-table td { padding: 3px 8px; }
#ledTable .data-table td .cell-edit { padding: 2px 6px; }
#ledTable .data-table th { padding-top: 5px; padding-bottom: 5px; }
/* ★ v1.4.2.24 台账：合同额>0 且未回款=0（已回款完成）→ 单元格绿色 */
#ledTable .data-table td.cell-paid-done { background: #e5f7ea; color: #15803d; font-weight: 600; }
/* ★ v1.5.1.55 台账：无回款标记 → 回款金额单元格黄色 */
#ledTable .data-table td.cell-no-pay { background: #fef9c3; color: #a16207; font-weight: 600; }
.data-table td .cell-edit.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td .cell-edit.select { cursor: pointer; }
.data-table td .cell-edit.region-sel { cursor: pointer; background: transparent; }
.data-table td .cell-edit.region-sel:hover { border-color: var(--border); background: #fff; }
.data-table td .cell-edit.region-sel:focus { border-color: var(--primary); background: #fff; }
.data-table tr.saving-row { opacity: .55; }
.cell-edit.hl { background: #fff7d6; }

/* 联系人：所属客户未匹配客户信息表 → 整格标红 + 一键新增单位 */
.data-table td.cell-cust-bad { background: #fef2f2; }
.data-table td.cell-cust-bad .cell-edit { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; font-weight: 600; }
.data-table td.cell-cust-bad .cell-edit:hover,
.data-table td.cell-cust-bad .cell-edit:focus { border-color: #ef4444; background: #fef2f2; }
.data-table td.cell-cust-bad .cust-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 4px; border-radius: 50%;
  border: 1px solid #ef4444; background: #ef4444; color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer; vertical-align: middle; flex-shrink: 0;
}
.data-table td.cell-cust-bad .cust-add-btn:hover { background: #dc2626; }
.onlyd-toggle {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
  font-size: 12px; color: var(--text); cursor: pointer; user-select: none;
}
.onlyd-toggle input { cursor: pointer; accent-color: var(--primary); }
.data-table td.contacts-cell { cursor: pointer; text-align: center; }
.data-table td.contacts-cell .contacts-star { color: #eab308; font-size: 17px; line-height: 1; }
.data-table td.contacts-cell:not(.has) .contacts-star { color: #cbd5e1; }
.data-table td.contacts-cell:hover .contacts-star { transform: scale(1.2); display: inline-block; }
.data-table td.cust-pop-cell { cursor: pointer; }
.data-table td.cust-pop-cell .cust-display { font-size: 12px; color: var(--text); }
.data-table td.cust-pop-cell .cust-display.bad { color: #b91c1c; font-weight: 600; }
.data-table td.cust-pop-cell:hover .cust-display { text-decoration: underline; }
/* 联系人「状态」列：点击弹窗查看/设置 */
.data-table td.status-cell { cursor: pointer; }
.data-table td.status-cell .status-display { font-size: 12px; color: var(--text); }
.data-table td.status-cell .status-display.empty { color: var(--text-soft); }
.data-table td.status-cell:hover .status-display { text-decoration: underline; }
/* 所属公司为空 → 状态显示「不确定」（弱化） */
.data-table td.status-cell.status-unsure .status-display { color: var(--text-soft); font-style: italic; }
/* 联系人/客户信息：普通列只读展示（不允许行内直接修改） */
.data-table td .ro-cell { font-size: 12px; color: var(--text); display: inline-block; padding: 4px 2px; }
/* 联系人「姓名」/客户「企业名称」：点击弹窗修改所有信息 */
.data-table td.row-edit-cell { cursor: pointer; }
.data-table td.row-edit-cell .row-edit-label { font-size: 12px; color: var(--text); font-weight: 600; }
.data-table td.row-edit-cell:hover .row-edit-label { text-decoration: underline; color: var(--primary); }
.row-actions .btn-wb { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.row-actions .btn-wb:hover { background: #dbeafe; }
.row-actions .btn-wb:disabled { opacity: .5; }
.btn-danger { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.data-table td.row-sel-td { text-align: center; padding: 0; }
.data-table .row-sel, .data-table #selAll { cursor: pointer; accent-color: var(--primary); }


/* 列宽微调 */
.data-table th.col-seq, .data-table td.col-seq { width: 56px; min-width: 56px; text-align: center; padding-left: 6px; padding-right: 6px; }
.data-table th.col-company, .data-table td.col-company { width: 230px; min-width: 170px; }
/* 企业名称列：文字可点击弹窗，下角标可选择 */

/* 服务单位"发票信息/收款信息"：★ 标记弹窗 */
.svc-info-cell { text-align: center; cursor: pointer; font-size: 18px; padding: 6px; }
.svc-info-cell:hover { background: #fff8e0; }
/* 服务单位详情弹窗 textarea */
.svc-info-textarea { box-sizing: border-box; }
.company-dd-panel { display: none; position: fixed; z-index: 999; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); min-width: 200px; max-height: 300px; overflow-y: auto; padding: 4px 0; }
.company-dd-item { padding: 7px 12px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.company-dd-item:hover { background: #eaf1ff; }
.company-dd-on { background: #f0f6ff; color: var(--primary); font-weight: 600; }
.company-dd-empty { padding: 14px; text-align: center; color: var(--text-soft); font-size: 13px; }
/* 企业名称前的项目进度星标 */
.prog-star { display: inline-block; cursor: pointer; font-size: 14px; margin-right: 4px; vertical-align: middle; color: var(--primary); user-select: none; }
.prog-star:hover { transform: scale(1.2); }
.prog-sun { display: inline-block; cursor: pointer; font-size: 14px; margin-right: 6px; vertical-align: middle; color: var(--primary); user-select: none; }
.prog-sun:hover { transform: scale(1.2); }
.data-table td .cell-edit.fmtnum { text-align: right; font-variant-numeric: tabular-nums; }
.data-table th.center, .data-table td.center { text-align: center; }
/* 台账：让居中也作用于单元格内的输入控件 */
.data-table td .cell-edit.center { text-align: center; }
.data-table td .cell-edit.select.center { text-align-last: center; }
.data-table td .seq-val { font-variant-numeric: tabular-nums; }

/* 空日期用空白 text input 占位，不显示 yyyy-mm-日；hover/focus 提示可编辑 */
.cell-edit.date-empty { cursor: pointer; }
.cell-edit.date-empty:hover { border-color: var(--border); background: #fff; }
.cell-edit.date-empty:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }

/* 回款 / 回款日期：主页面只读，点击弹窗修改 */
.data-table td.cell-ro.popup-edit { cursor: pointer; border-radius: 4px; }
.data-table td.cell-ro.popup-edit:hover { background: rgba(59,130,246,.10); outline: 1px dashed var(--border); }
.data-table td.cell-ro.popup-edit.empty { color: var(--text-soft); font-style: italic; }

/* 有备注的行高亮浅黄 */
.data-table tbody tr.row-has-notes { background: #fffbe6; }
.data-table tbody tr.row-has-notes:hover { background: #fff4cc; }

/* ★ v1.5.1.6：项目状态行颜色规则已去掉（进行中/已完成/已暂停不再涂色）；
   保留 cell-paid-done（已回款完成单元格绿色）+ ledger-highlight（定位高亮） */

/* 定位高亮行（从任务详情「📍 台账」定位而来）：深橙底+粗橙框+阴影 */
.data-table tbody tr.ledger-highlight { background: #fed7aa !important; outline: 3px solid #ea580c !important; outline-offset: -1px; box-shadow: 0 0 0 1px #fff inset, 0 0 6px rgba(234, 88, 12, .45); }
.data-table tbody tr.ledger-highlight:hover { background: #fdba74 !important; }
.data-table tbody tr.ledger-highlight td { font-weight: 600; }
.ledger-hl-tip { padding: 8px 16px; font-size: 12px; color: #7c2d12; background: #fed7aa; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid #ea580c; font-weight: 600; }
.ledger-hl-tip a { color: #c2410c; font-weight: 600; }
.ledger-hl-tip a:hover { text-decoration: underline; }

/* 新建弹窗里的备注提示框 */
.notes-hint-box { font-size: 12px; color: var(--text-soft); line-height: 1.5; padding: 8px 10px; background: var(--panel-2); border: 1px dashed var(--border); border-radius: 6px; }

/* 备注弹窗 */
.notes-input { width: 100%; min-height: 84px; resize: vertical; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; box-sizing: border-box; }
.notes-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,.12); }
.notes-add-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.notes-hint { color: var(--text-soft); font-size: 12px; }
.notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding-right: 2px; }
.notes-empty { color: var(--text-soft); font-size: 13px; text-align: center; padding: 18px 0; }
.notes-item { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff; }
.notes-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.notes-time { color: var(--text-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.notes-del { border: none; background: transparent; color: var(--text-soft); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.notes-del:hover { background: #fdeaea; color: var(--red); }
.notes-content { white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--text); line-height: 1.5; }

/* 项目进度弹窗——任务连接 */
.prog-task-link { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); padding: 6px 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
.prog-task-link code { flex: 1; font-size: 13px; color: var(--primary); font-weight: 500; letter-spacing: 0.5px; }
.prog-task-link .btn-mini { padding: 2px 6px; font-size: 12px; cursor: pointer; }

/* 进度弹窗 —— 工作日志 */
.prog-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* 甘特图 */
.gantt-wrap svg { display: block; }
.gantt-wrap text { font-family: inherit; }
.gantt-wrap .gantt-names { background: #fff; }

/* 弹窗内弹出表格：优先不换行，必要时允许换行 */
.popup-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popup-table td.num { white-space: nowrap; text-align: right; }
.popup-table th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 项目进度信息面板（开始日/历时/用时/完结日） */
.prog-info-panel {
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px;
}
.prog-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
}
.prog-info-cell { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.prog-info-label { font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.prog-info-value { font-size: 13px; color: var(--text); font-weight: 500; }
.prog-info-value.muted { color: var(--text-soft); font-weight: normal; }
.prog-info-duration { color: #e6a23c; font-weight: 600; }
.prog-info-completed { color: #67c23a; font-weight: 600; }
.prog-info-loading { font-size: 12px; color: var(--text-soft); text-align: center; padding: 8px; }
.prog-logs { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 6px 8px; }
.prog-logs-empty { font-size: 12px; color: var(--text-soft); padding: 12px; text-align: center; }
.prog-log-item { display: flex; gap: 10px; align-items: center; padding: 5px 4px; border-bottom: 1px solid var(--border); font-size: 12px; }
.prog-log-item:last-child { border-bottom: none; }
.prog-log-time { color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 110px; }
.prog-log-dur { color: var(--primary); font-weight: 600; white-space: nowrap; min-width: 60px; font-variant-numeric: tabular-nums; }
.prog-log-note { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* 手工匹配弹窗列表 */
.match-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 4px; }
.match-item { padding: 8px 10px; border-radius: 4px; cursor: pointer; border-bottom: 1px solid var(--border); }
.match-item:last-child { border-bottom: none; }
.match-item:hover { background: var(--panel-2); }
.match-title { font-size: 14px; color: var(--text); font-weight: 500; }
.match-sub { font-size: 12px; margin-top: 2px; }

/* 企业名称模糊搜索 */
.company-fuzzy { position: relative; }
.company-fuzzy-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; outline: none; }
.company-fuzzy-input:focus { border-color: var(--primary); }
.company-fuzzy-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 0 0 6px 6px; max-height: 200px; overflow-y: auto; z-index: 100; display: none; }
.company-fuzzy-item { padding: 7px 10px; cursor: pointer; font-size: 13px; }
.company-fuzzy-item:hover { background: var(--panel-2); }
.company-fuzzy-empty { padding: 12px; text-align: center; font-size: 12px; color: var(--text-soft); }

/* 基本信息表签（Sheet 切换） */
.sheet-tabs { display: flex; gap: 4px; margin: 6px 0 4px; border-bottom: 1px solid var(--border); padding: 0 4px; }
.sheet-tab { padding: 8px 18px; border: 1px solid transparent; border-bottom: none; background: transparent; cursor: pointer; font-size: 13px; color: var(--text-soft); border-radius: 6px 6px 0 0; transition: all .15s; }
.sheet-tab:hover { background: var(--panel-2); color: var(--text); }
.sheet-tab.active { background: #fff; border-color: var(--border); color: var(--primary); font-weight: 600; border-bottom: 1px solid #fff; margin-bottom: -1px; }

/* 项目人员多选 */
.staff-multi-trigger {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; background: #fff; cursor: pointer; text-align: left; min-height: 36px;
}
.staff-multi-trigger:hover { border-color: var(--primary); }
.staff-multi-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: 4px; }
.staff-multi-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; border-radius: 4px; }
.staff-multi-item:hover { background: var(--panel-2); }

/* 表单内项目人员多选 */
.staff-form-wrap { position: relative; }
.staff-form-trigger {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; background: #fff; cursor: pointer; text-align: left; min-height: 36px;
}
.staff-form-trigger:hover { border-color: var(--primary); }
.staff-form-panel {
  position: fixed; z-index: 9999;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); max-height: 280px; overflow-y: auto; padding: 6px;
  display: none; text-align: left;
}
.staff-multi-item input { margin: 0; }
.staff-pick { padding: 6px 8px; cursor: pointer; }
.staff-pick:hover { background: #fff8e0; }

/* 项目人员下拉多选 */
.staff-dd-td { cursor: pointer; padding: 4px 6px; white-space: nowrap; }
.staff-dd-td:hover { background: #f0f6ff; }
/* 负责人/人员列：居中；人员多时单行截断（隐藏显示），点击下拉查看完整名单 */
.leader-dd-td, .staff-dd-td { text-align: center; }
.leader-dd-label, .staff-dd-label { display: inline-block; min-width: 80px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: 13px; }
.staff-dd-panel, .leader-dd-panel { display: none; z-index: 999; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); min-width: 150px; max-height: 260px; overflow-y: auto; padding: 6px; }
.sdd-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; cursor: pointer; font-size: 13px; border-radius: 4px; white-space: nowrap; text-align: left; width: 100%; min-width: 160px; box-sizing: border-box; }
.sdd-item:hover { background: var(--panel-2); }
.sdd-item input { margin: 0; }
.staff-pick .staff-clear {
  display: inline-block;
  margin-left: 6px;
  width: 18px; height: 18px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  background: #fde2e2;
  color: #c53030;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.15s;
}
.staff-pick:hover .staff-clear { opacity: 1; }
.staff-pick .staff-clear:hover { background: #f8b4b4; }

/* 项目组"已参与项目"列 */
.projects-cell, .tasks-cell { padding: 6px 10px; cursor: pointer; text-align: center; }
.projects-cell:hover, .tasks-cell:hover { background: #f0f6ff; }
.projects-cell .projects-count, .tasks-cell .projects-count {
  display: inline-block;
  padding: 3px 10px;
  background: #eaf1ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* 项目组已参与项目弹窗的合计行 */
.data-table tr.gp-total td {
  background: var(--panel-2);
  border-top: 2px solid var(--primary);
  padding: 10px 8px;
}

/* 回款记录（多次回款弹窗） */
.paid-add-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.paid-add-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.paid-add-row input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; color: var(--text); }
.paid-summary { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.paid-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.paid-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; padding-right: 2px; }
.paid-item { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff; }
.paid-meta { display: flex; align-items: center; gap: 10px; }
.paid-time { color: var(--text-soft); font-size: 12px; font-variant-numeric: tabular-nums; flex: 1; }
.paid-amt { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.paid-del { border: none; background: transparent; color: var(--text-soft); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.paid-del:hover { background: #fdeaea; color: var(--red); }
.paid-note { margin-top: 4px; white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--text); line-height: 1.5; }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 13px; }
.bar-label { width: 96px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bar-track { flex: 1; background: var(--panel-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 6px; }
.bar-val { width: 150px; text-align: right; color: var(--text-soft); flex-shrink: 0; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.pill-green { background: #e7f6ec; color: var(--green); border: 1px solid #bfe6cb; }
.pill-amber { background: #fdf0e0; color: var(--amber); border: 1px solid #f3d9b0; }
.pill-gray { background: #eef1f5; color: var(--text-soft); border: 1px solid var(--border); }

/* ---------- 台账：工具栏 / 行操作 / 编辑弹窗 ---------- */
.ledger-toolbar { display: flex; gap: 10px; margin: 4px 0 2px; flex-wrap: wrap; }
.ledger-summary { display: flex; gap: 10px; align-items: center; margin: 8px 0 6px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.ledger-summary .summary-label { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.ledger-summary .summary-cat { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 12px; color: var(--text); font-family: inherit; }
.ledger-summary .summary-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); background: #fff; border-radius: 999px; font-size: 12px; color: var(--text); cursor: default; }
.ledger-summary .summary-pill b { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; width: 80px; min-width: 80px; text-align: center; }
.btn-mini { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 0 3px; border-radius: 3px; cursor: pointer; font-size: 10px; margin-right: 2px; line-height: 1.3; }
.btn-mini:hover { background: var(--panel-2); }
.btn-mini-danger { color: var(--red); border-color: #f3c2c2; }
.btn-mini-danger:hover { background: #fdeaea; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 16px; }
/* 在 .form-grid 容器内的 .form-grid-3 跨整行，按行排列三列 */
.form-grid > .form-grid-3 { grid-column: 1 / -1; }
/* 编辑/新增弹窗：紧凑显示 */
.form-grid > .form-grid-3 { gap: 10px 14px; }
.form-grid > .form-grid-3 .ff { gap: 3px; }
.form-grid > .form-grid-3 .ff > span { font-size: 11px; }
.form-grid > .form-grid-3 .ff input, .form-grid > .form-grid-3 .ff select { padding: 5px 8px; font-size: 12px; }
/* 弹窗内直接子级 .ff（如备注）跨整行，与状态信息左右对齐 */
.form-grid > .ff { grid-column: 1 / -1; }
.form-grid > .ff .ff { }
.form-grid > .ff input { padding: 5px 8px; font-size: 12px; }
.form-grid > .st-log-box { grid-column: 1 / -1; }
/* 编辑联系人/客户信息弹窗：左输入栏 + 右信息栏 分栏布局 */
.split-body { display: flex; gap: 16px; align-items: stretch; }
.split-left { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* 客户弹窗第一行：名称、简称 并排（每个仍是「标签：输入框」横排） */
/* 名称长 → 占 1.6；简称列更宽（1.2）避免框太小；标签左对齐靠前、不右对齐贴框 */
.split-left .split-row-2 { display: flex; gap: 10px; min-width: 0; }
.split-left .split-row-2 .ff { min-width: 0; }
.split-left .split-row-2 .ff:first-child { flex: 1.6; }
.split-left .split-row-2 .ff:last-child { flex: 1.2; }
.split-left .split-row-2 .ff > span { flex: 0 0 36px; width: 36px; text-align: left; font-size: 12px; }
.split-left .split-row-2 .ff input { min-width: 0; width: 100%; flex: 1; }
/* 联系人弹窗：姓名/单位/电话 三列并排 */
.split-left .split-row-3 { display: flex; gap: 10px; min-width: 0; }
.split-left .split-row-3 .ff { flex: 1; min-width: 0; }
.split-left .split-row-3 .ff > span { flex: 0 0 36px; width: 36px; text-align: left; font-size: 12px; }
.split-left .split-row-3 .ff input { min-width: 0; width: 100%; flex: 1; }
/* ★ 左栏字段：标签 auto 宽度紧贴输入框（消除"名称"和框之间的空白） */
.split-left .ff:not(.st-note-field) { flex-direction: row; align-items: center; gap: 4px; }
.split-left .ff:not(.st-note-field) > span { flex: 0 0 auto; min-width: 36px; font-size: 12px; text-align: left; white-space: nowrap; }
.split-left .ff:not(.st-note-field) input,
.split-left .ff:not(.st-note-field) select { flex: 1; width: auto; padding: 6px 10px; font-size: 13px; }
/* 左栏备注：标签 auto 紧贴输入框 */
.split-left .st-note-field { flex: 1; display: flex; flex-direction: row; align-items: stretch; gap: 4px; }
.split-left .st-note-field > span { flex: 0 0 auto; min-width: 36px; font-size: 12px; text-align: left; white-space: nowrap; padding-top: 7px; }
.split-left .st-note-field input { flex: 1; width: auto; padding: 6px 10px; font-size: 13px; }
/* 生日行：年龄显示 */
.split-left .age-show { flex: 0 0 auto; font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.split-right { flex: 0 0 360px; display: flex; flex-direction: column; gap: 8px; min-width: 0; border-left: 1px solid var(--border); padding-left: 14px; }
.split-right-title { font-size: 12px; color: var(--text-soft); font-weight: 600; }
/* 右栏名单/信息栏占满剩余高度，与左栏等底边 */
.split-right .st-log-box, .split-right .st-cc-box { flex: 1; display: flex; flex-direction: column; }
.split-right .st-log-box .st-log-title, .split-right .st-cc-box .cust-contact-head { flex-shrink: 0; }
.split-right .st-log-box { overflow-y: auto; }
@media (max-width: 720px) { .split-body { flex-direction: column; } .split-right { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 10px; } }
@media (max-width: 640px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.form-grid .area-sel {
  width: 100%; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 13px; outline: none; background: #fff; color: var(--text);
}
.form-grid .area-sel:focus { border-color: var(--primary); }
.ff { display: flex; flex-direction: column; gap: 5px; }
.ff > span { font-size: 12px; color: var(--text-soft); }
.ff input, .ff select, .ff textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; background: #fff; color: var(--text);
}
.ff input:focus, .ff select:focus, .ff textarea:focus { border-color: var(--primary); }
.ff textarea { min-height: 60px; resize: vertical; }
/* 联系人状态管理弹窗：左侧状态单选 + 右侧公司/部门/岗位 */
/* ★ 状态弹窗 z-index 必须高于 ★ 弹窗（modal-mask 默认 50），否则点联系人开后弹窗被 ★ 弹窗遮罩盖住 */
#stModal.modal-mask { z-index: 60; }
#stModal { z-index: 60; }
.modal.status-modal { width: 660px; max-width: 95vw; }
.status-body { display: flex; gap: 16px; }
.st-left { flex: 0 0 128px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--border); padding-right: 14px; }
.st-left-title { font-size: 12px; color: var(--text-soft); margin-bottom: 2px; }
.st-opt { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; text-align: center; background: #fff; transition: all .15s; }
.st-opt:hover { border-color: var(--primary); color: var(--primary); }
.st-opt.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.st-right { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* 状态管理：原 → 新 双列布局 */
.st-change-grid { display: flex; align-items: stretch; gap: 8px; }
.st-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-col-title { font-size: 11px; color: var(--text-soft); font-weight: 600; text-align: center; margin-bottom: 1px; }
.st-arrow { display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); flex-shrink: 0; padding-top: 20px; }
/* 原列：只读框（与新列同结构，无标签；标题"原 只读"已说明字段含义） */
.st-orig-row { display: flex; align-items: center; min-height: 40px; }
.st-orig-row .st-orig-val { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; font-family: inherit; background: #fff; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; box-sizing: border-box; }
/* 新列：与原列等高/等宽；appearance:none 去除浏览器原生下拉箭头占空间（确保左右框精确等宽） */
.st-new-row { display: flex; align-items: center; min-height: 40px; position: relative; }
.st-new-row select { flex: 1; width: auto; min-width: 0; padding: 6px 10px; font-size: 13px; font-family: inherit; border: 1px solid var(--border); border-radius: 7px; outline: none; background: #fff; color: var(--text); min-height: 40px; box-sizing: border-box; appearance: none; -webkit-appearance: none; -moz-appearance: none; }
/* 自定义下拉箭头（替代浏览器原生，保持下拉功能） */
.st-new-row::after { content: "▾"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text-soft); pointer-events: none; }
.st-ro-tag { font-size: 10px; color: var(--text-soft); font-weight: 400; background: #eef2f7; border-radius: 4px; padding: 0 4px; margin-left: 2px; }
/* 新列下拉与左列等高，保证三行对齐 */
.st-right .ff select.st-sel { width: 100%; padding: 7px 10px; font-size: 12px; min-height: 40px; }
.st-right .ff { gap: 2px; }
/* 联系人编辑弹窗：状态变更历史显示框 */
.st-log-box { border: 1px solid var(--border); border-radius: 8px; background: #fafafa; padding: 10px 12px; margin-top: 4px; max-height: 150px; overflow-y: auto; }
.st-log-title { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; font-weight: 600; }
.st-log-item { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
.st-log-item:last-child { border-bottom: none; }
.st-log-time { color: var(--text-soft); font-size: 11px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.st-log-change { color: var(--text); font-weight: 500; }
.st-log-empty { color: var(--text-soft); font-size: 12px; padding: 6px 0; }
/* 客户信息弹窗：联系人自动抓取区块 */
.cust-contact-box { border: 1px solid var(--border); border-radius: 8px; background: #fafafa; padding: 10px 12px; margin-top: 4px; }
.cust-contact-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: var(--text-soft); font-weight: 600; }
.cust-contact-head .btn { font-size: 12px; padding: 4px 10px; }
.cust-contact-list { max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cust-contact-list .muted { font-size: 12px; color: var(--text-soft); }
.cc-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 12px; text-align: left; }
/* 联系人名单：联系人 | 部门 | 职位 | 联系电话 四列对齐（左对齐文字） */
.cc-grid4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; gap: 6px; align-items: center; justify-items: start; }
.cc-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.cc-dept { color: var(--text-soft); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.cc-title { color: var(--text-soft); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
/* 部门字数多时允许换行完整显示（不省略号截断） */
.cc-dept-wrap { white-space: normal; word-break: break-all; line-height: 1.4; }
.cc-phone { color: var(--text); text-align: left; font-variant-numeric: tabular-nums; }
.cc-extra { color: #64748b; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 调整联系人弹窗 */
.cs-btn-current { opacity: .5; cursor: not-allowed; }
/* 状态弹窗：按规则禁用的下拉 */
.st-sel:disabled { opacity: .55; background: #f1f5f9; cursor: not-allowed; }
/* 客户★弹窗：联系人卡片可点击编辑 */
/* ★ v1.4.2.10 修复：v1.4.2.7 文字消失 + v1.4.2.8 高度失控并存。
   最终方案：cl-item 锁死 36px（含 padding+border）+ overflow hidden + box-sizing border-box；
   cl-grid6 不给显式 height（避免与显式父高度冲突）  */
/* ★ v1.4.2.17：卡片右侧加「✏️ 修改」按钮（绝对定位，不改 block 布局避免高度问题） */
.cl-item { padding: 4px 10px; border: 1px solid var(--border); border-radius: 7px; margin-bottom: 4px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; height: 36px; min-height: 36px; box-sizing: border-box; overflow: hidden; position: relative; padding-right: 58px; }
.cl-item:hover { border-color: var(--primary); background: #f8faff; }
.cl-item:last-child { margin-bottom: 0; }
.cl-edit-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 1px solid var(--border); background: #fff; color: var(--primary); font-size: 11px; line-height: 1.4; padding: 2px 8px; border-radius: 6px; cursor: pointer; z-index: 2; white-space: nowrap; }
.cl-edit-btn:hover { background: #eaf1ff; border-color: var(--primary); }
/* ★ 弹窗联系人：六列对齐 */
.cl-grid6 { display: grid; grid-template-columns: 0.9fr 1.8fr 1fr 1fr 1.2fr 0.7fr; gap: 6px; height: 100%; }
.cl-cell { font-size: 12px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; min-width: 0; }
.cl-name { font-weight: 600; color: var(--text); }
.cl-cust { color: var(--text-soft); }
.cl-dept { color: var(--text-soft); }
.cl-title { color: var(--text-soft); }
.cl-phone { color: var(--text); font-variant-numeric: tabular-nums; }
.cl-status { text-align: center; }
.cl-status.empty { color: var(--text-soft); }
.modal.wide { width: 800px; max-width: 95vw; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 17px; }
/* 客户弹窗：右上角地址输入框（与标题同一行） */
.modal-head .head-addr { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.modal-head .head-addr-label { font-size: 12px; color: var(--text-soft); }
.modal-head .head-addr input { padding: 5px 10px; font-size: 13px; border: 1px solid var(--border); border-radius: 7px; outline: none; width: 240px; }
.modal-head .head-addr input:focus { border-color: var(--primary); }
.modal-x { border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-soft); }
.modal-x:hover { color: var(--text); }
.modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.modal-foot .spacer { flex: 1; }

/* 客户批量导入弹窗 */
.imp-tip { font-size: 12.5px; color: var(--text-soft); background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; line-height: 1.6; }
.imp-sheet-row { font-size: 13px; margin-bottom: 10px; }
.imp-sheet-row select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; }
.imp-map-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.imp-map-table th { text-align: left; font-size: 12.5px; color: var(--text-soft); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.imp-map-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.imp-map-table td:first-child { width: 110px; font-weight: 600; }
.imp-map-sel { width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.imp-map-sel:focus { border-color: var(--primary); }
.imp-map-table .req { color: var(--red); }
.imp-preview-title { font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.imp-preview { max-height: 200px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.imp-preview .data-table { font-size: 12px; }
.imp-preview .data-table th, .imp-preview .data-table td { padding: 4px 8px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.imp-skip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); margin-top: 10px; cursor: pointer; }
.muted { color: var(--text-soft); }

/* 客户信息/项目组信息 sheet：所有列居中 */
.data-table.center-all th, .data-table.center-all td { text-align: center; }
.data-table.center-all .cell-edit { text-align: center; }

/* ========== 手机端响应式适配（≤768px 生效，桌面端样式零改动） ========== */
#mobileMenuBtn { display: none; position: fixed; top: 10px; left: 10px; z-index: 70; width: 40px; height: 40px; border: none; border-radius: 10px; background: var(--primary); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
#sbMask { display: none; }
@media (max-width: 768px) {
  #mobileMenuBtn { display: flex; align-items: center; justify-content: center; }
  #app { position: relative; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 300px;
    z-index: 60; transform: translateX(-100%); transition: transform .25s ease;
    padding: 14px 12px; gap: 10px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.18); }
  #sbMask { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  #sbMask.show { opacity: 1; pointer-events: auto; }
  .main { width: 100%; }
  .topbar { gap: 8px; margin-bottom: 12px; padding: 0 12px; }
  .topbar h1 { font-size: 17px; }
  .topbar .sub { font-size: 12px; }
  .biz-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px 12px 12px; }
  .biz-card { padding: 10px 8px; }
  .biz-card .num { font-size: 18px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; border-radius: 14px 14px 0 0; padding: 16px; }
  .modal-mask { align-items: flex-end; }
  .modal h3 { font-size: 16px; margin-bottom: 12px; }
  .modal-actions { position: sticky; bottom: 0; background: #fff; padding: 8px 0 2px; }
  .today-cols { flex-direction: column !important; overflow-y: auto !important; }
  .today-cols > div { flex: 0 0 auto !important; width: 100% !important; max-width: 100% !important; }
  #timelinePanel { max-height: 45vh; }
  .data-table th, .data-table td { white-space: nowrap; }
  .panel { padding: 12px !important; }
  .btn, .btn-sm { min-height: 40px; }
  .field input, .field select, .field textarea { font-size: 16px !important; padding: 10px; }
  input[type="text"], input[type="date"], input[type="search"], select, textarea { font-size: 16px !important; }
  #tlUserSel { max-width: 84px; }
  .search-wrap input { font-size: 16px !important; }
  .proj-item { padding: 12px 10px; }
  .focus-panel-input { font-size: 16px !important; }
}
@media (max-width: 480px) {
  .biz-cards { grid-template-columns: 1fr 1fr; }
  .biz-card .lbl { font-size: 11px; }
}

/* ========== 平板/窄窗增强（≤900px：抽屉+卡片2列） ========== */
@media (max-width: 900px) {
  #mobileMenuBtn { display: flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 300px;
    z-index: 60; transform: translateX(-100%); transition: transform .25s ease;
    padding: 14px 12px; gap: 10px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.18); }
  #sbMask { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  #sbMask.show { opacity: 1; pointer-events: auto; }
  .main { width: 100%; }
  .cards-4, .cards-5, .cards-6 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .stat-card { padding: 12px 10px; }
  .stat-card .label { font-size: 13px; }
  .stat-card .value { font-size: 18px; }
}
@media (max-width: 600px) {
  .cards-4, .cards-5, .cards-6 { grid-template-columns: repeat(2, 1fr); }
  .stat-card .label { font-size: 12px; }
  .stat-card .value { font-size: 16px; }
}

/* ========== 卡片与时间线视觉分隔 ========== */
@media (max-width: 900px) {
  .today-cols { gap: 18px !important; margin-bottom: 24px !important; }
  .cards-6, .cards-5, .cards-4 { gap: 12px !important; }
  .stat-card { padding: 14px 12px !important; box-shadow: 0 1px 4px rgba(16,24,40,.08) !important; }
  .stat-card .label { font-size: 13px !important; margin-bottom: 6px !important; }
  .stat-card .value { font-size: 20px !important; line-height: 1.3 !important; }
  #timelinePanel {
    border-top: 3px solid var(--primary) !important;
    padding-top: 12px !important;
    background: #fafbff !important;
    border-radius: 8px !important;
    margin-top: 8px !important;
  }
  #timelinePanel .panel { margin-bottom: 8px !important; }
}
@media (max-width: 600px) {
  .stat-card .label { font-size: 12px !important; }
  .stat-card .value { font-size: 17px !important; }
  #timelinePanel { max-height: 50vh; }
}

/* ========== 卡片紧凑化（让卡片只是显示，不抢眼） ========== */
@media (max-width: 900px) {
  .cards-6, .cards-5, .cards-4 { gap: 8px !important; }
  .today-cols { gap: 14px !important; }
  .stat-card {
    padding: 8px 10px !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
  }
  .stat-card .label {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    color: var(--text-soft) !important;
  }
  .stat-card .value {
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }
}
@media (max-width: 600px) {
  .stat-card { padding: 6px 8px !important; }
  .stat-card .label { font-size: 10px !important; }
  .stat-card .value { font-size: 15px !important; }
}

/* ========== 卡片紧凑化（让卡片只是显示，不抢眼） ========== */
@media (max-width: 900px) {
  .cards-6, .cards-5, .cards-4 { gap: 8px !important; }
  .today-cols { gap: 14px !important; }
  .stat-card {
    padding: 8px 10px !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
  }
  .stat-card .label {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    color: var(--text-soft) !important;
  }
  .stat-card .value {
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }
}
@media (max-width: 600px) {
  .stat-card { padding: 6px 8px !important; }
  .stat-card .label { font-size: 10px !important; }
  .stat-card .value { font-size: 15px !important; }
}

/* ========== 今日时间线专属主题（浅蓝紫现代风） ========== */
.tl-wrap { border: 1px solid #dbe4f7; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(59,130,246,.10); background: #fff; }
.tl-time-txt { color: #2563eb; font-weight: 700; }
.tl-hover-row { border-radius: 6px; padding: 1px 6px; transition: background .12s; }
.tl-hover-row:hover { background: #eef4ff; }
.tl-point-col { background: #fbfcff; }
.tl-seg-col { background: #fbfcff; }
.tl-axis-col { background: #fbfcff; }

/* ========== 业务总览 v2：主任务列表 + 任务详情（2026-08-08） ========== */
.biz-layout { display: flex; flex: 1; min-height: 0; padding: 12px 16px; gap: 12px; }
.biz-left { width: 360px; min-width: 300px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; overflow: hidden; }
.biz-left-search { padding: 10px 10px 6px; flex-shrink: 0; }
.biz-left-search input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 13px; outline: none; }
.biz-left-search input:focus { border-color: var(--primary); background: #fff; }
.biz-left-list { flex: 1; overflow-y: auto; padding: 2px 8px 10px; }
/* ★ v1.5.1.44：左侧上下半区，各自独立滚动 */
.biz-left-half { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 10px; }
.biz-left-half-btm { border-top: 1px solid var(--border); flex: 0 0 38%; min-height: 120px; }
.biz-left-group { font-size: 11px; color: var(--text-soft); font-weight: 600; padding: 10px 6px 4px; display: flex; align-items: center; gap: 6px; }
.biz-left-group .cnt { background: var(--panel-2); padding: 0 6px; border-radius: 8px; font-weight: 500; }
.biz-left-item { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.biz-left-item:hover { background: var(--panel-2); }
.biz-left-item.active { background: #eaf1ff; border-color: #cfe0ff; }
.biz-left-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.biz-left-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.biz-left-item .meta { font-size: 11px; color: var(--text-soft); display: flex; gap: 5px; flex-shrink: 0; align-items: center; }
.biz-left-item .meta .tag { background: var(--panel-2); padding: 0 6px; border-radius: 8px; }
.biz-left-item .meta .focus-ico { color: #2563eb; }
.biz-left-empty { padding: 30px 10px; text-align: center; color: var(--text-soft); font-size: 13px; }
.biz-right { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; overflow: hidden; }
.biz-right-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-soft); font-size: 14px; gap: 8px; }
.biz-right-empty .big { font-size: 40px; }
.biz-detail-header { padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); flex-shrink: 0; }
.biz-detail-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.biz-badge { font-size: 11px; padding: 1px 9px; border-radius: 10px; font-weight: 600; flex-shrink: 0; }
.biz-badge.st-todo { background: #eaf1ff; color: #2563eb; }
.biz-badge.st-doing { background: #fef3c7; color: #b45309; }
.biz-badge.st-done { background: #dcfce7; color: #15803d; }
.biz-badge.st-default { background: var(--panel-2); color: var(--text-soft); }
.biz-detail-sub { display: flex; gap: 14px; margin-top: 7px; font-size: 12px; color: var(--text-soft); flex-wrap: wrap; align-items: center; }
.biz-detail-sub .proj { color: var(--primary); font-weight: 600; }
.biz-detail-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); background: var(--panel); flex-shrink: 0; overflow-x: auto; }
.biz-detail-tab { padding: 7px 14px; font-size: 13px; cursor: pointer; border-radius: 8px 8px 0 0; color: var(--text-soft); border: 1px solid transparent; border-bottom: none; white-space: nowrap; }
.biz-detail-tab:hover { background: var(--panel-2); }
.biz-detail-tab.active { background: var(--panel); color: var(--primary); font-weight: 600; border-color: var(--border); }
.biz-detail-body { flex: 1; overflow-y: auto; padding: 12px 16px; min-height: 0; }
.biz-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.biz-kids { display: flex; flex-wrap: wrap; gap: 5px; }
.biz-kid { font-size: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; color: var(--text); }
.biz-meeting-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.biz-meeting-card .m-date { font-size: 12px; color: var(--primary); font-weight: 600; }
.biz-meeting-card .m-title { font-size: 14px; font-weight: 600; margin: 2px 0; }
.biz-meeting-card .m-meta { font-size: 12px; color: var(--text-soft); margin-bottom: 4px; }
.biz-meeting-card .m-notes { font-size: 13px; white-space: pre-wrap; line-height: 1.6; color: var(--text); }
.biz-meeting-card .m-actions { margin-top: 6px; display: flex; gap: 6px; }
.biz-wlog-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.biz-wlog-item:last-child { border-bottom: none; }
.biz-wlog-time { width: 150px; flex-shrink: 0; font-size: 12px; color: var(--text-soft); }
.biz-wlog-text { flex: 1; min-width: 0; line-height: 1.5; }
.biz-memo-box { width: 100%; min-height: 170px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 13px; line-height: 1.7; outline: none; resize: vertical; font-family: inherit; background: var(--panel); }
.biz-memo-box:focus { border-color: var(--primary); }
.biz-file-wrap { border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); padding: 8px 10px; }
.biz-meeting-form { border: 1px dashed #b9c8e8; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcff; }
.biz-meeting-form label { display: block; font-size: 12px; color: var(--text-soft); margin: 6px 0 2px; }
.biz-meeting-form input, .biz-meeting-form textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; outline: none; font-family: inherit; }
.biz-meeting-form input:focus, .biz-meeting-form textarea:focus { border-color: var(--primary); }
@media (max-width: 1200px) { .biz-left { width: 290px; min-width: 250px; } }
@media (max-width: 960px) { .biz-layout { flex-direction: column; } .biz-left { width: 100%; min-width: 0; max-height: 42vh; } }

/* ========== 业务总览 v2.1：时间线列表 + 弹窗详情（2026-08-08） ========== */
.biz-detail-ops { display: flex; gap: 8px; padding: 10px 16px 0; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.biz-detail-ops .hint { font-size: 12px; color: var(--text-soft); margin-left: 4px; }
.biz-filter-bar { display: flex; gap: 8px; align-items: center; padding: 8px 16px 0; flex-shrink: 0; flex-wrap: wrap; }
.biz-filter-bar select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; outline: none; background: var(--panel-2); color: var(--text); cursor: pointer; }
.biz-filter-bar select:focus { border-color: var(--primary); }
.biz-filter-bar input { flex: 1; min-width: 160px; max-width: 300px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; outline: none; background: var(--panel-2); }
.biz-filter-bar input:focus { border-color: var(--primary); background: #fff; }
/* ========== 时间线（列表样式：时间前置 + 图标 + 内容） ========== */
.biz-tl { display: flex; flex-direction: column; }
.biz-tl-item { display: flex; gap: 8px; padding: 4px 6px; border-bottom: 1px dashed var(--border); cursor: pointer; border-radius: 6px; align-items: center; }
.biz-tl-item:hover { background: #f4f8ff; }
.biz-tl-item .tl-ic { flex-shrink: 0; font-size: 13px; width: 20px; text-align: center; }
.biz-tl-item .tl-main { flex: 1; min-width: 0; }
.biz-tl-item .tl-title { font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.biz-tl-item .tl-sub { font-size: 11.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; vertical-align: bottom; }
.biz-tl-item .tl-time { font-size: 11.5px; color: #334155; font-weight: 600; flex-shrink: 0; white-space: nowrap; min-width: 100px; }
.biz-mdl-field { margin-bottom: 8px; }
.biz-mdl-field label { font-size: 12px; color: var(--text-soft); display: block; margin-bottom: 2px; }

/* ========== 事件体系（开会/备忘录/工作记录/阶段成果/成果反馈/自定义） ========== */
.biz-ev-label { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.biz-ev-types { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.biz-ev-chip { font-size: 12px; padding: 4px 12px; border-radius: 14px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.biz-ev-chip:hover { background: #e8eefb; }
.biz-ev-chip.on { background: #eaf1ff; border-color: var(--primary); color: var(--primary); font-weight: 600; }
.biz-ev-files { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; min-height: 4px; }
.biz-ev-file { font-size: 12px; background: #f0f4fb; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.biz-ev-file b { cursor: pointer; color: var(--red); font-weight: 700; }
.biz-ev-tag { font-size: 11px; background: #eaf1ff; color: #2563eb; border-radius: 4px; padding: 0 6px; margin-right: 4px; font-weight: 600; }

/* ========== 事件类型筛选框（可搜索下拉） ========== */
.biz-ev-picker { position: relative; display: inline-block; }
.biz-ev-picker .sel { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); cursor: pointer; font-size: 13px; color: var(--text); }
.biz-ev-picker .sel:hover { border-color: var(--primary); background: #eaf1ff; }
.biz-ev-picker .sel .arr { opacity: .55; font-size: 10px; }
/* 下拉层是 body 直接子元素（fixed 定位），必须用独立类，不能挂在 .biz-ev-picker 后代选择器下 */
.biz-ev-drop { position: fixed; z-index: 2147483000; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(16,24,40,.16); width: 230px; max-height: 280px; display: flex; flex-direction: column; overflow: hidden; }
.biz-ev-drop input { padding: 7px 10px; border: none; border-bottom: 1px solid var(--border); outline: none; font-size: 12px; }
.biz-ev-drop .list { flex: 1; overflow-y: auto; padding: 3px 0; }
.biz-ev-drop .opt { padding: 6px 12px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.biz-ev-drop .opt:hover { background: #f0f5ff; }
.biz-ev-drop .opt.on { background: #eaf1ff; color: var(--primary); font-weight: 600; }
.biz-ev-drop .new { padding: 7px 12px; font-size: 12px; color: var(--primary); cursor: pointer; border-top: 1px dashed var(--border); }
.biz-ev-drop .new:hover { background: #f0f5ff; }

/* ========== Markdown 编辑器（事件内容） ========== */
.biz-md-label { font-size: 12px; color: var(--text-soft); margin: 8px 0 4px; }
.biz-md-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 6px; border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--panel-2); }
.biz-md-toolbar button { border: 1px solid var(--border); background: var(--panel); border-radius: 5px; padding: 3px 9px; font-size: 12px; cursor: pointer; color: var(--text); line-height: 1.5; }
.biz-md-toolbar button:hover { background: #eaf1ff; border-color: var(--primary); color: var(--primary); }
.biz-md-editor { width: 100%; min-height: 300px; flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 0 0 8px 8px; font-size: 13px; line-height: 1.8; outline: none; resize: none; font-family: Consolas, "Courier New", monospace; background: var(--panel); }
.biz-md-editor:focus { border-color: var(--primary); }
.biz-ev-form-body { display: flex; flex-direction: column; min-height: 0; }
/* ========== 临时沟通（新增弹窗 / 单位模糊选择 / 详情） ========== */
.comm-org-wrap { position: relative; }
.comm-org-list { position: absolute; top: 100%; left: 0; right: 0; max-height: 180px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 0 0 8px 8px; box-shadow: var(--shadow); z-index: 2147483001; }
.comm-org-opt { padding: 6px 10px; font-size: 12.5px; cursor: pointer; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm-org-opt:hover { background: #f0f5ff; }
.biz-comm-reply { margin-left: 20px; background: #f0fdf4; border-left: 3px solid #22c55e; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; line-height: 1.7; }
