/* ------------------------------------------------------------------
   04-board.css
   背景粒子与坐标网格、看板面板自适应、甘特图、任务页内子菜单
   ------------------------------------------------------------------ */
/* ---------- 背景粒子与坐标网格 ---------- */
#bgCanvas{position:fixed;left:0;top:0;width:100%;height:100%;z-index:0;pointer-events:none}
body::before{
  content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(230,0,39,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(230,0,39,.055) 1px,transparent 1px);
  background-size:32px 32px;
}
#view{position:relative;z-index:2}
.topbar{position:sticky;z-index:60}

/* ---------- 看板：面板高度随内容自适应（不裁切） ---------- */
.board{--panel-h:330px}
.board .grid-2{grid-template-columns:1.34fr 1fr;align-items:stretch;gap:12px;margin-bottom:12px}
.board .panel{
  height:auto;min-height:var(--panel-h);margin-bottom:0;
  display:flex;flex-direction:column;overflow:hidden;
}
.board .panel>.panel-head{flex:0 0 auto}
.board .panel>.panel-body{flex:1;min-height:0;overflow:visible;display:flex;flex-direction:column;justify-content:center}
.board .panel .chart-flex{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center}
.board .panel .rank-row{padding:6px 16px}
.board .panel .task-row{padding:9px 14px}
.board .panel .empty{flex:1;display:grid;place-items:center}
.sub-divider{height:1px;background:var(--line-2);margin:8px 0}

/* 矩阵在看板内改为左右并排 */
.board .matrix-wrap{display:flex;flex-direction:row;align-items:center;gap:16px}
.board .matrix{flex:0 0 242px;width:242px;height:242px;max-width:none}
.board .matrix-side{flex:1;min-width:0;width:auto;display:flex;flex-direction:column;gap:6px}

/* ---------- 甘特图 ---------- */
.gantt{--lw:238px;display:flex;flex-direction:column;flex:1;min-height:0}
.gantt-head{display:flex;align-items:center;height:22px;border-bottom:1px solid var(--line-2);margin-bottom:3px}
.gantt-hd{flex:0 0 var(--lw);font-size:9.5px;color:var(--muted);font-family:var(--mono);letter-spacing:.08em;text-transform:uppercase}
.gantt-scale{position:relative;flex:1;height:100%}
.gantt-scale span{position:absolute;top:4px;transform:translateX(-50%);font-size:9.5px;color:var(--muted-2);font-family:var(--mono);white-space:nowrap}
.gantt-rows{position:relative;flex:1;min-height:0}
.gantt-row{display:flex;align-items:center;height:27px}
.gantt-lb{flex:0 0 var(--lw);padding-right:10px;font-size:11.5px;color:#4A4D52;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gantt-lb em{font-style:normal;font-size:10px;color:var(--muted-2);margin-left:8px;letter-spacing:.02em}
.gantt-track{position:relative;flex:1;height:13px}
.gantt-track::before{content:"";position:absolute;inset:0;background:#F5F6F8;border-radius:3px}
.gbar{
  position:absolute;top:0;height:13px;border-radius:3px;background:#DDE2E9;
  overflow:hidden;min-width:4px;cursor:pointer;transition:transform .15s;
}
.gbar:hover{transform:scaleY(1.18)}
.gbar>b{display:block;height:100%;background:var(--red);border-radius:3px}
.gbar.pri-normal>b{background:var(--orange)}
.gbar.pri-low>b{background:#A9B0BA}
.gbar.over{background:#FFE1E5;box-shadow:0 0 0 1px rgba(230,0,39,.35) inset}
.gbar.over>b{background:var(--red-deep)}
.gantt-today{position:absolute;top:0;bottom:0;width:1px;background:rgba(230,0,39,.5);z-index:3}
.gantt-today::before{
  content:"";position:absolute;top:-4px;left:-2.5px;width:6px;height:6px;border-radius:50%;
  background:var(--red);
}

/* ---------- 小屏适配 ---------- */
@media(max-width:900px){
  .gantt{--lw:130px}
  .board{--panel-h:auto}
  .board .matrix-wrap{flex-direction:column;align-items:center;gap:12px}
  .board .matrix{flex:0 0 auto;width:100%;max-width:270px;height:auto}
  .board .matrix-side{width:100%;min-width:0}
  .board .panel{height:auto;min-height:270px}
  .board .grid-2{grid-template-columns:1fr}
}
@media(max-width:620px){
  .gantt{--lw:108px}
  .board .panel{min-height:0}
  .gantt-lb{font-size:11px}
  .gantt-hd{font-size:9px}
  .gantt-row{height:30px}
}

/* ---------- 任务管理页内子菜单 ---------- */
.panel-foot{
  display:flex;justify-content:flex-end;gap:8px;
  padding:12px 16px;border-top:1px solid var(--line-2);background:#FAFBFC;
  border-radius:0 0 var(--radius) var(--radius);
}
.task-form-page{padding:18px 20px 20px;max-width:920px}
.task-form-page textarea{min-height:76px}
.task-form-page .form-row{margin-bottom:14px}

/* ============================================================
   第五版：工作台 · 智慧驾驶舱
   ============================================================ */
