/* ============================================================
   taskList.css — タスク一覧タブ(一覧表＋統合ガント)
   ============================================================ */
.legendChip{display:inline-block;width:14px;height:8px;border-radius:2px;margin:0 4px 0 8px;vertical-align:middle;}
.autoCalc{font-family:var(--font-mono);font-size:11px;color:var(--muted);}
/* テーブル自体は左固定列＋ガント全日数分の幅にそのまま広がってよく、
   横スクロールは .glWrap 側の1本だけで担う（行ごとの個別スクロールは廃止） */
table.taskTable{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px;}
table.taskTable th{
  text-align:left;font-family:var(--font-mono);font-size:10px;color:var(--muted);
  border-bottom:1px solid var(--line);padding:0 6px;letter-spacing:.02em;height:33px;box-sizing:border-box;white-space:nowrap;
  background:var(--panel);
}
table.taskTable td{padding:0 6px;border-bottom:1px solid var(--line);vertical-align:middle;height:27px;box-sizing:border-box;background:var(--panel);}
table.taskTable tr:hover td{background:#FAF8F2;}
/* ---- ヘッダー行の上固定(sticky) ---- */
table.taskTable thead th{position:sticky;top:0;z-index:4;}
/* ---- 左側の固定列(担当者〜操作)の左固定(sticky)。ガント列だけは対象外で横スクロールする ----
   left の実際の値はJS側(features/taskList.js の applyStickyOffsets)で、各列の実測幅から都度計算して
   インラインstyleに設定する。列を増減しても手計算のズレが起きないようにするため。 */
table.taskTable thead th:nth-child(-n+9),
table.taskTable tbody tr:not(.teamHeadRow) td:nth-child(-n+9){ position:sticky; z-index:2; }
/* チーム見出し行は colspan で1セルにまとまっているので、その1セルだけ左固定すればよい */
table.taskTable tbody tr.teamHeadRow td:nth-child(1){ position:sticky; left:0px; z-index:2; }
/* ヘッダー行は上下・左右どちらのstickyとも重なるので最前面に */
table.taskTable thead th:nth-child(1){ z-index:5; }
/* hoverの背景ハイライトがsticky列の明示背景色より確実に上に来るようにする(詳細度を揃えた上で後勝ち) */
table.taskTable tbody tr:hover td:nth-child(-n+9){ background:#FAF8F2; }
/* 「小」タスクの行色分け(予定終了日と今日の比較。大/中には付けない、実績終了日入力済みは対象外)。
   sticky列のhover背景は上のnth-child(-n+9)ルールで別途!important無しの背景を敷いているため、
   単純に`background`を足すだけだとhover時に負けて見えなくなる。稼働カレンダーで踏んだのと同じ問題なので
   !importantを付け、「行色×hover」の組み合わせも用意して両方が同時に分かるようにしている。 */
table.taskTable tbody tr.rowDueToday td{background:#FFF3C4 !important;}
table.taskTable tbody tr.rowDueToday:hover td{background:#FCE9A0 !important;}
table.taskTable tbody tr.rowOverdue td{background:#FBDCD7 !important;}
table.taskTable tbody tr.rowOverdue:hover td{background:#F6C6BE !important;}
table.taskTable input[type=text],table.taskTable input[type=date],table.taskTable select{
  border:1px solid transparent;background:transparent;padding:2px 4px;width:100%;height:22px;font-size:11.5px;
}
table.taskTable input[type=text]:hover,table.taskTable input[type=date]:hover,table.taskTable select:hover{border-color:var(--line);}
table.taskTable input[type=text]:focus,table.taskTable input[type=date]:focus,table.taskTable select:focus{border-color:var(--ink);outline:none;background:#fff;}
table.taskTable .assigneeCell{width:100px;text-align:left;}
/* 担当者セルもselect(左paddingあり)とプレーンテキスト(padding無し)が行によって混在するため、
   大/中/小と同様にselect側のpaddingを0にして開始X座標を揃える */
table.taskTable .assigneeCell select{text-align:left;padding-left:0;}
/* 大/中/小は「編集可能な入力欄」と「祖先タスク名のプレーンテキスト」が行によって混在する。
   中央揃えだと入力欄(左揃え)とプレーンテキスト(中央揃え)でX位置がバラつき縦に見たときにガタつくため、
   どちらも左揃えに統一する。「大」列の開閉トグルの有無による字下げのズレは
   .bigTitlePad（非表示の同幅プレースホルダ）で吸収する */
table.taskTable .titleCell{text-align:left;}
/* input自体の左paddingをなくし、プレーンテキスト（td直下のテキストノード）と
   文字の開始X座標が完全に一致するようにする */
table.taskTable .titleCell input[type=text]{text-align:left;padding-left:0;padding-right:0;}
table.taskTable .dateCell{width:160px;padding:3px 4px;height:40px;box-sizing:border-box;}
table.taskTable .statusCell{width:100px;}
table.taskTable .opsCell{width:172px;white-space:nowrap;}
table.taskTable .opsCell button{padding:2px 5px;font-size:10px;}
.memoBtn{opacity:.35;}
.memoBtn.has{opacity:1;}
.bigTitleWrap{display:flex;align-items:center;gap:4px;}
.bigTitleWrap input{flex:1 1 auto;min-width:0;}
.bigToggle{flex:none;cursor:pointer;color:var(--muted);font-size:10px;user-select:none;}
/* 開閉トグルが無い行（中/小の行が示す「大」列の祖先名）でも、トグル分の字下げを
   見えない形で確保し、列全体でタスク名の開始位置が縦に揃うようにする */
.bigToggle.bigTitlePad{visibility:hidden;cursor:default;}
.teamHeadRow td{background:#F3F0E7;font-weight:700;font-size:11px;height:27px;cursor:pointer;user-select:none;}
.dateRow{display:flex;align-items:center;gap:4px;height:17px;}
.dateRow .dtag{
  flex:none;width:14px;height:14px;border-radius:3px;font-size:9px;font-family:var(--font-mono);
  display:flex;align-items:center;justify-content:center;line-height:1;
}
.dateRow.plan .dtag{background:#B9C3D6;color:#22252A;}
.dateRow.actual .dtag{background:#2E5C8A;color:#fff;}
.dateRow input[type=date]{
  flex:1 1 auto;min-width:110px;width:auto;height:16px;font-size:10px;padding:0 2px;cursor:pointer;
}
.dateRow input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;}
.dateRow .dateReadonly{flex:1;font-family:var(--font-mono);font-size:10.5px;color:var(--muted);}

/* テーブルの列構造には一切影響しない、ガント列の説明用の見出し(表の外側)。 */
.ganttSectionLabel{
  font-family:var(--font-mono);font-size:10px;color:var(--muted);
  padding:2px 2px 4px;
}

/* ---- Gantt (同一tableの最終列に統合。行高は他列と共通のDOMなので構造上ズレない) ---- */
/* ガント列は幅を固定しない。テーブル全体(width:max-content)が全日数分そのまま横に伸び、
   横スクロールは .glWrap 側の1本だけで担う（行ごと・ヘッダーごとの個別スクロールは廃止） */
table.taskTable .ganttHeadCell,table.taskTable .ganttCell{
  padding:0;position:relative;
}
.ganttCellInner{position:relative;}
.ganttDayCells{display:flex;}
.ganttDayCell{border-right:1px solid var(--line);height:100%;flex:none;}
.ganttBar{position:absolute;height:7px;border-radius:3px;}
.ganttBar.plan{background:#B9C3D6;top:8px;}
.ganttBar.actual{background:#2E5C8A;top:25px;box-shadow:0 0 0 1px rgba(0,0,0,.08);}
.ganttBar.delay{background:var(--danger);}
.ganttToday{
  position:absolute;top:0;bottom:0;width:2px;background:#D6482E;z-index:2;
  box-shadow:0 0 0 1px rgba(214,72,46,.3);
}
