/* 玥玺湾精装管理系统 — Ollama 风格（纯白画布 / 严格灰阶 / 药丸交互 / 零阴影）
   规范：容器圆角 12px，交互元素一律药丸 9999px；无渐变、无阴影；字重只用 400/500；
   唯一非灰阶 = 键盘焦点环（蓝 50%）+ 数据语义色（完成/施工/异常/滞后，仅用于数据本身）。
   ============================================================ */
:root {
  /* 灰阶 */
  --ink: #000000;
  --ink-2: #262626;
  --near: #404040;
  --stone: #737373;
  --mid: #525252;
  --silver: #a3a3a3;
  --snow: #fafafa;
  --line: #e5e5e5;
  --line-2: #d4d4d4;
  --white: #ffffff;

  /* 兼容旧变量名（app.js 内联样式引用 --pewter） */
  --pewter: #737373;
  --primary: #000000;
  --primary-hover: #262626;
  --sidebar-bg: #ffffff;
  --sidebar-hover: #f5f5f5;
  --sidebar-active: #f5f5f5;
  --header-bg: #ffffff;
  --body-bg: #ffffff;
  --card-bg: #ffffff;
  --border: #e5e5e5;
  --text: #262626;
  --text-2: #737373;
  --text-3: #a3a3a3;
  /* 仅用于数据语义（完成/异常/滞后/警示），非装饰 */
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --ind-yellow: #eab308;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius: 12px;      /* 容器唯一圆角 */
  --pill: 9999px;      /* 一切交互元素 */
  --sidebar-w: 220px;
  --header-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus-visible { outline: 2px solid rgba(59,130,246,0.5); outline-offset: 1px; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ========== 三段式布局 ========== */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
.app-body-row {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.app-header { flex-shrink: 0; }
.app-sidebar { flex-shrink: 0; }
.app-main { flex: 1; min-width: 0; overflow: auto; }
.app-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* 顶部 header —— 纯白 + 单像素底线，无阴影 */
.app-header {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.app-header-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle-btn {
  background: transparent; border: none; color: var(--stone);
  font-size: 18px; cursor: pointer; padding: 4px 10px; border-radius: var(--pill);
}
.sidebar-toggle-btn:hover { background: var(--snow); color: var(--ink-2); }
.app-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500; color: var(--ink); letter-spacing: 0;
}
.app-header-right { display: flex; align-items: center; gap: 10px; }
.header-user { font-size: 13px; color: var(--stone); }
.header-time { font-size: 12px; color: var(--silver); min-width: 120px; text-align: right; }
.header-btn {
  background: var(--white); border: 1px solid var(--line-2); color: var(--near);
  padding: 5px 14px; font-size: 12px; cursor: pointer; border-radius: var(--pill);
  font-family: var(--font);
}
.header-btn:hover { background: var(--snow); border-color: var(--silver); color: var(--ink-2); }

/* 侧边栏 —— 纯白 + 右侧单像素分隔，菜单项为药丸 */
.app-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--white);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}
.app-sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}
.sidebar-nav { padding: 14px 10px; }

.mod {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  margin-bottom: 2px;
  background: transparent;
  border: none;
  border-radius: var(--pill);
  color: var(--stone);
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}
.mod:hover { background: var(--snow); color: var(--ink-2); }
.mod.active {
  background: var(--line);
  color: var(--ink);
  font-weight: 500;
}

/* 右侧主体 */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
}

/* 二级 Tab —— 药丸标签：选中浅灰底 */
.subtabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px 2px;
  flex-shrink: 0;
  overflow-x: auto;
}
.sub {
  border: none;
  background: transparent;
  color: var(--stone);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--pill);
}
.sub:hover { color: var(--ink-2); background: var(--snow); }
.sub.active {
  background: var(--line);
  color: var(--ink);
  font-weight: 500;
}

/* 内容滚动区 */
#main {
  flex: 1;
  overflow: auto;
  padding: 16px 20px 40px;
  background: var(--white);
}

.loading { padding: 60px; text-align: center; color: var(--silver); font-size: 13px; }

/* ========== 统计卡 ========== */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; min-width: 136px;
}
.stat-card .num { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.stat-card .lbl { font-size: 12px; color: var(--silver); margin-top: 4px; }
.stat-card.green .num { color: var(--ok); }
.stat-card.blue .num { color: var(--ink); }
.stat-card.orange .num { color: var(--warn); }
.stat-card.red .num { color: var(--err); }

/* ========== 表格 ========== */
.table-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: auto;
}
table.grid { border-collapse: separate; border-spacing: 0; min-width: max-content; font-size: 12px; }
table.grid th, table.grid td {
  border: 1px solid var(--line); padding: 6px 10px; white-space: nowrap; text-align: center;
  font-weight: 400;
}
table.grid thead th { background: var(--snow); position: sticky !important; top: 0; z-index: 5; font-weight: 500; color: var(--ink-2); }
table.grid th.pin, table.grid td.pin { position: sticky; left: 0; background: var(--snow); z-index: 6; }
table.grid thead th.pin { z-index: 8; }
table.grid tr:nth-child(even) td { background: var(--white); }
table.grid tr:nth-child(even) td.pin { background: var(--snow); }
/* 数据语义色（仅表达状态，不做装饰） */
td.cell-done { background: #f0fdf4 !important; color: var(--ok); cursor: pointer; font-weight: 500; }
td.cell-prog { background: #f5f5f5 !important; color: var(--ink-2); cursor: pointer; }
td.cell-err { background: #fef2f2 !important; color: var(--err); cursor: pointer; }
td.cell-empty { color: #d4d4d4; cursor: pointer; }
td.cell-empty:hover, td.cell-done:hover, td.cell-prog:hover, td.cell-err:hover {
  outline: 2px solid var(--ink); outline-offset: -2px;
}
th.lag-neg, td.lag-neg { background: #fef2f2 !important; color: #b91c1c; font-weight: 500; }
td.lag-cell { background: #fef2f2 !important; }
td.st-done { background: #f0fdf4 !important; }
td.st-going { background: #f5f5f5 !important; }
td.plan-past { background: #fef2f2 !important; }
td.rate { position: relative; overflow: hidden; min-width: 86px; color: var(--stone); text-align: center; }
td.rate .rbar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0,0,0,0.07); pointer-events: none; }
td.rate .rt { position: relative; z-index: 1; font-weight: 500; color: var(--ink-2); }
th.rate { position: relative; overflow: hidden; min-width: 74px; }
th.rate .rbar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0,0,0,0.05); pointer-events: none; }
th.rate .rt { position: relative; z-index: 1; font-weight: 500; color: var(--ink-2); }

/* ========== 输入 ========== */
input.cell-in, select.cell-in {
  width: 100%; min-width: 60px; border: 1px solid transparent; background: transparent;
  font-size: 12px; text-align: center; padding: 2px 4px; border-radius: 8px;
  font-family: var(--font); color: inherit;
}
input.cell-in:hover, select.cell-in:hover { border-color: var(--line-2); background: var(--white); }
input.cell-in:focus, select.cell-in:focus { border-color: var(--ink-2); background: var(--white); outline: none; }
input.date-in { min-width: 118px; }

/* ========== 按钮（全部药丸） ========== */
.btn {
  border: 1px solid var(--line); background: var(--line); color: var(--ink-2);
  padding: 0 18px; border-radius: var(--pill); cursor: pointer; font-size: 13px; font-weight: 400;
  min-height: 32px; font-family: var(--font);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.btn:hover { background: #dcdcdc; border-color: var(--line-2); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); }
.btn.danger { background: var(--white); border-color: var(--line-2); color: var(--err); }
.btn.danger:hover { background: #fef2f2; border-color: var(--err); color: var(--err); }
.save {
  background: var(--ink); color: var(--white); border: 1px solid var(--ink);
  border-radius: var(--pill); padding: 0 20px; cursor: pointer; font-size: 13px; font-weight: 400;
  min-height: 32px; font-family: var(--font);
}
.save:hover { background: var(--ink-2); }
.close {
  border: 1px solid var(--line-2); background: var(--white); color: var(--near);
  border-radius: var(--pill); padding: 7px 18px; cursor: pointer; font-size: 13px; font-family: var(--font);
}
.close:hover { background: var(--snow); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .hint-text { color: var(--silver); font-size: 12px; }

/* ========== 弹窗 ========== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.28); z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--white); border-radius: var(--radius); padding: 24px; width: 420px; max-width: 92vw;
  border: 1px solid var(--line);
}
.modal-title { font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--ink); margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--stone); margin-bottom: 12px; line-height: 1.6; }
.fill-form { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; margin-bottom: 10px; align-items: center; }
.fill-form label { font-size: 13px; color: var(--stone); text-align: right; }
.fill-form select, .fill-form input {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--pill);
  font-size: 13px; font-family: var(--font); background: var(--white); color: var(--ink-2);
}
.fill-form select:focus, .fill-form input:focus { outline: none; border-color: var(--ink-2); }

/* 工序流水排布弹窗：不遮暗、不拦截下方表格，可拖动挪开查看单元格 */
#fillModal { background: transparent; pointer-events: none; }
#fillModal .modal {
  pointer-events: auto;
  border: 1px solid var(--line-2);
  max-height: 88vh; overflow-y: auto;
}

/* ========== Toast ========== */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--white); padding: 10px 22px; border-radius: var(--pill);
  z-index: 99; font-size: 13px;
}
.hidden { display: none !important; }

/* ========== 下拉/批量栏 ========== */
.cell-dropdown {
  position: fixed; z-index: 1200; min-width: 200px; background: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px;
}
.cd-item { padding: 8px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; border-radius: var(--pill); }
.cd-item:hover { background: var(--snow); }
.cd-item.done { color: var(--ok); font-weight: 500; }
.cd-clear { padding: 4px 14px; font-size: 12px; color: var(--silver); cursor: pointer; border-radius: var(--pill); }
.cd-clear:hover { color: var(--err); }
.cd-sub { background: var(--snow); padding: 6px 10px; margin: 2px 0; border-radius: 8px; }
.cd-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cd-row label { font-size: 12px; color: var(--stone); width: 34px; text-align: right; }
.cd-row input[type=number] { width: 60px; }
.cd-row input[type=date] { flex: 1; }
.cd-row span { font-size: 12px; color: var(--stone); }
.cd-tip { font-size: 12px; color: var(--silver); margin-top: 2px; }

.batch-bar {
  position: fixed; z-index: 1300;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--pill);
  padding: 8px 12px; display: flex; align-items: center; gap: 8px; max-width: 96vw; flex-wrap: wrap;
}
.bb {
  border: 1px solid var(--line); background: var(--line); border-radius: var(--pill); padding: 5px 14px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: var(--font);
}
.bb:hover { background: #dcdcdc; border-color: var(--line-2); color: var(--ink); }
.bb.done { background: var(--white); border-color: var(--line-2); color: var(--ok); font-weight: 500; }
.bb.danger { background: var(--white); color: var(--err); }
.bb.paste { border-color: var(--ink); color: var(--white); background: var(--ink); font-weight: 400; }
.bb-inp { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--stone); }
.bb-inp input[type=number] { width: 52px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--pill); }
.bb-inp input[type=date] { padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--pill); }
.bb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* ========== 进度填报表格 ========== */
#detailGrid { table-layout: fixed; }
#detailGrid thead th { box-sizing: border-box !important; overflow: hidden !important; padding: 3px 8px !important; height: 28px !important; line-height: 22px !important; white-space: nowrap; }
#detailGrid thead th.pin { z-index: 11; }
#detailGrid td.pin { z-index: 10; }

/* ========== 工种矩阵 ========== */
.trades-cell { text-align: left; }
.trade-tag {
  display: inline-flex; align-items: center; margin: 2px 6px 2px 0;
  background: var(--snow); border: 1px solid var(--line); border-radius: var(--pill); padding: 1px 10px;
}
.trade-tag .cell-in { border: none; background: transparent; min-width: 60px; }
.trade-del { border: none; background: transparent; color: var(--err); font-size: 14px; cursor: pointer; padding: 0 2px; line-height: 1; }
.trades-matrix th.tunit { min-width: 60px; text-align: center; position: relative; background: var(--snow); cursor: grab; }
.trades-matrix td.trades-cell { min-width: 60px; padding: 3px 6px; }
.trades-matrix { table-layout: fixed; }
table.grid.trades-matrix th, table.grid.trades-matrix td { white-space: normal; word-break: break-all; }

/* ========== 筛选面板 ========== */
.filter-panel {
  position: fixed; z-index: 999; background: var(--white); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 10px; min-width: 180px; max-width: 260px;
}
.filter-panel .fp-list { max-height: 280px; overflow: auto; }
.filter-panel .fp-list label {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px; cursor: pointer;
  font-size: 12px; white-space: nowrap; border-radius: var(--pill);
}
.filter-panel .fp-list label:hover { background: var(--snow); }

/* ========== 汇总表特殊列（灰阶层级代替彩色表头） ========== */
#summaryGrid thead th[data-col="工效"],
#summaryGrid thead th[data-col="已完成层数"], #summaryGrid thead th[data-col="总完成率"],
#summaryGrid thead th[data-col="剩余层数"], #summaryGrid thead th[data-col="剩余工数"] { background: #f5f5f5; }
#summaryGrid thead th[data-col="预期完成楼层"], #summaryGrid thead th[data-col="预期未完成楼层"],
#summaryGrid thead th[data-col="预期完成率"] { background: #f0f0f0; }
#summaryGrid thead th[data-col="现场工人数"], #summaryGrid thead th[data-col="人数纠偏"],
#summaryGrid thead th[data-col="计划滞后天数"], #summaryGrid thead th[data-col="节点需求人数"],
#summaryGrid thead th[data-col="现场人数完成时间"] { background: #f5f5f5; }
#summaryGrid thead th[data-col="备注"], #summaryGrid thead th[data-col="材料"] { background: #f0f0f0; }
#summaryGrid { table-layout: fixed; }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: var(--pill); border: 2px solid var(--white); }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 表单卡片 ========== */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 14px; max-width: 640px;
}
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.form-row label { width: 110px; text-align: right; color: var(--stone); font-size: 13px; flex-shrink: 0; }
.form-row input { flex: 1; max-width: 420px; }

/* ========== badge（药丸标签；彩色仅用于状态语义） ========== */
.badge { display: inline-block; padding: 2px 12px; border-radius: var(--pill); font-size: 12px; font-weight: 400; }
.badge.g { background: #f0fdf4; color: var(--ok); }
.badge.o { background: #fffbeb; color: var(--warn); }
.badge.r { background: #fef2f2; color: var(--err); }
.badge.b { background: var(--line); color: var(--mid); }

/* 旧topbar样式兼容（已废弃但保留防止引用报错） */
.topbar { display: none !important; }

/* 单元格选中高亮（灰阶，不用蓝） */
td.sel { outline: 2px solid var(--ink) !important; outline-offset: -2px; background: var(--snow) !important; }
td.sel-batch { outline: 1px solid var(--ink-2) !important; outline-offset: -1px; background: var(--snow) !important; }

.th-resizer { position:absolute; right:-3px; top:0; width:6px; height:100%; cursor:col-resize; z-index:10; }
th { position:relative; }

/* 列筛选隐藏 */
.col-hide { display: none !important; }

/* 点击单元格的十字高亮（整行 + 整列），灰阶 */
.hl-row { background: #f5f5f5 !important; }
.hl-col { background: #f5f5f5 !important; }
.hl-row.hl-col { background: #ebebeb !important; }
.modal-overlay .modal { top: 10% !important; left: 50% !important; transform: translateX(-50%) !important; max-height: 80vh; overflow-y: auto; }
/* 鏂藉伐鐘舵€佸崟鍏冩牸娣¤摑鑹插～鍏?*/
td.status-prog, td.prog, td[class*="prog"] {
  background: #e3f2fd !important;
}

/* 总览汇总：总完成率＝淡绿渐变、预期完成率＝淡紫渐变（按表头文字定位列，见 app.js colorRateCols） */
/* 按数值宽度填充：0% 不填（纯白），100% 铺满；宽度由 app.js colorRateCols 写 background-size */
.rate-green { background-color: transparent !important; background-image: linear-gradient(90deg, #f7e3e3 0%, #d9a3a3 100%) !important; background-repeat: no-repeat !important; background-position: left center !important; }
.rate-purple { background-color: transparent !important; background-image: linear-gradient(90deg, #faf5ff 0%, #d8b4fe 100%) !important; background-repeat: no-repeat !important; background-position: left center !important; }

/* 总览汇总：自动换行 + 列宽/表头行高可拖 */
#summaryGrid.summary-resizable th, #summaryGrid.summary-resizable td { white-space: normal !important; word-break: break-word; line-height: 1.35; }
#summaryGrid.summary-resizable th { vertical-align: middle; }
.col-rz { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 6; }
.col-rz:hover { background: rgba(0,0,0,0.10); }
.row-rz { position: absolute; left: 0; bottom: -3px; height: 7px; width: 56px; cursor: row-resize; z-index: 7; }
.row-rz:hover { background: rgba(0,0,0,0.10); }
/* 杩涘害鏉″僵鑹叉笎鍙?*/
.progress-bar {
  background: linear-gradient(90deg, #22c55e, #10b981, #06b6d4) !important;
  border-radius: 4px;
  height: 8px;
  box-shadow: 0 0 4px rgba(34,197,94,0.3);
}
/* 杩涘害鏉″僵鑹叉笎鍙?*/
.rbar {
  background: linear-gradient(90deg, #22c55e, #10b981, #06b6d4) !important;
  border-radius: 4px;
  height: 6px;
  box-shadow: 0 0 4px rgba(34,197,94,0.3);
}
/* 杩涘害鏉″～鍏呮暣涓牸瀛愭贰缁挎笎鍙?*/
td.rate, th.rate {
  background: linear-gradient(90deg, #dcfce7, #bbf7d0, #86efac) !important;
}
.rbar {
  display: none !important;
}
/* 杩涘害鏍煎瓙娴呮贰鍝戝厜缁挎笎鍙?*/
td.rate, th.rate {
  background: linear-gradient(90deg, #f0fdf4, #ecfdf5, #d1fae5) !important;
}
.rbar {
  display: none !important;
}
/* 杩涘害鎸夌櫨鍒嗘瘮娣＄豢濉厖 */
td.rate, th.rate {
  position: relative;
  background: #f8fafc !important;
}
td.rate::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: calc(var(--rate, 0) * 1%);
  background: #bbf7d0;
  z-index: 0;
}
td.rbar, .rbar {
  display: none !important;
}
td.rate span, td.rate .rt {
  position: relative;
  z-index: 1;
}

/* 通用可调表格（材料跟踪等）：自动换行 */
.grid-resizable th, .grid-resizable td { white-space: normal !important; word-break: break-word; line-height: 1.35; }

/* 总览汇总：现场工人数有人数的格子标蓝底 */
.qty-blue { background: #dbeafe !important; color: #1d4ed8 !important; font-weight: 500; }

/* ===== 完成率数据条最终生效（覆盖本文件前面若干历史试验规则：.rbar 被 display:none、td.rate::before 用 --rate 但 JS 从没设过）===== */
/* 颜色由 app.js 的 colorRateCols 给每个 .rbar 内联设定：总完成率玫瑰、预期完成率浅玫瑰；这里只负责让它显示出来 */
#summaryGrid td.rate, #summaryGrid th.rate { position: relative !important; background: transparent !important; }
#summaryGrid td.rate::before, #summaryGrid th.rate::before { content: none !important; }
#summaryGrid td.rate .rbar, #summaryGrid th.rate .rbar { display: block !important; position: absolute !important; left: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.06); }
#summaryGrid td.rate .rt, #summaryGrid th.rate .rt { position: relative; z-index: 1; }

/* ===== 完成率整格填充最终生效（覆盖本文件前面历史试验规则：td.rate 灰底、.rbar 数据条）===== */
#summaryGrid td.rate, #summaryGrid th.rate { position: relative !important; background: transparent !important; }
#summaryGrid td.rate::before, #summaryGrid th.rate::before { content: none !important; }
#summaryGrid td.rate .rbar, #summaryGrid th.rate .rbar { display: none !important; }
#summaryGrid td.rate .rt, #summaryGrid th.rate .rt { position: relative; z-index: 1; }
/* 总完成率＝淡哑绿；预期完成率＝淡哑紫；宽度由 app.js 写 background-size，0% 即纯白 */
#summaryGrid td.rate.rate-green { background-color: transparent !important; background-image: linear-gradient(90deg, #e9f0e6 0%, #b7ccb3 100%) !important; background-size: var(--rw, 0%) 100% !important; background-repeat: no-repeat !important; background-position: left center !important; }
#summaryGrid td.rate.rate-purple { background-color: transparent !important; background-image: linear-gradient(90deg, #edebf2 0%, #c3bbd8 100%) !important; background-size: var(--rw, 0%) 100% !important; background-repeat: no-repeat !important; background-position: left center !important; }

/* 完成率数字颜色：与底色对比（原来是 var(--stone) 浅灰，铺上绿/紫填充后几乎看不清） */
#summaryGrid td.rate, #summaryGrid td.rate .rt { color: #1f2937 !important; }
#summaryGrid td.rate .rt { font-weight: 500; }
/* 悬停时不再整格变色，避免与填充色混在一起，只加深文字 */
#summaryGrid td.rate:hover, #summaryGrid td.rate:hover .rt { color: #000 !important; }

/* 计划滞后天数：粉红高亮加强（原 #fef2f2 几乎看不出高亮） */
td.lag-cell, #summaryGrid td.lag-cell { background: #fbd5d5 !important; color: #b91c1c !important; font-weight: 500; }
