.schedule-shell { overflow:hidden }
.schedule-toolbar, .schedule-tools, .schedule-view-tabs, .schedule-inline-add, .schedule-gantt-tools, .schedule-weekdays {
  display:flex; align-items:center; flex-wrap:wrap; gap:.65rem;
}
.schedule-toolbar { justify-content:space-between; padding:1rem; border-bottom:1px solid var(--line,#e2e8e5) }
.schedule-view-tabs button[aria-pressed="true"] { background:var(--green,#176c50); color:white }
.schedule-tools label, .schedule-gantt-tools label { display:flex; align-items:center; gap:.35rem; margin:0 }
.schedule-context, .schedule-panel-body, .schedule-gantt-tools, .schedule-table-options { padding:.75rem 1rem }
.schedule-context { margin:0; color:var(--muted,#5c6d65) }
.schedule-table-options:empty { display:none }
.schedule-group { margin:0 1rem 1rem; border:1px solid var(--line,#e2e8e5); border-radius:.55rem; overflow:hidden }
.schedule-group h2 { font-size:1rem; margin:0; padding:.75rem 1rem; border-left:4px solid var(--green,#176c50) }
.schedule-group h2 small { color:var(--muted,#5c6d65); font-weight:400; margin-left:.4rem }
.schedule-group table { white-space:nowrap }
.schedule-group td { padding:.3rem .45rem }
.schedule-group td input, .schedule-group td select { padding:.35rem .45rem; min-width:7rem }
.schedule-group .schedule-name { min-width:15rem }
.schedule-name input { width:11rem }
.schedule-child .schedule-name { padding-left:2rem }
.schedule-add { padding:.65rem 1rem }
.schedule-inline-add { padding:.5rem; align-items:end }
.schedule-inline-add label { margin:0 }
.schedule-status { display:inline-block; border-radius:.35rem }
.schedule-status select { color:inherit; background:transparent; border-color:transparent }
.schedule-status.Done { color:#086448; background:#d7f3e6 }
.schedule-status.InProgress { color:#824400; background:#fff0cc }
.schedule-status.OnHold { color:#a32d3a; background:#fbe1e4 }
.schedule-status.NotStarted { color:#52635c; background:#edf1ef }
.schedule-warnings { margin:.5rem 1rem; padding:.65rem .85rem; color:#824400; background:#fff5da; border-radius:.45rem }
.schedule-warnings ul { margin:.5rem 0 .2rem }
.schedule-detail-fields { border:0; margin:0; padding:0; min-width:0 }
.schedule-detail-fields select[multiple] { min-height:7rem }
.schedule-files { margin-top:.75rem; border-top:1px solid var(--line,#e2e8e5) }
.schedule-files input { max-width:100% }
.schedule-exception { display:flex; align-items:center; gap:.55rem; margin:.4rem 0 }
.schedule-exception input, .schedule-exception select { width:auto; min-width:0 }
.schedule-weekdays label { margin:0 }
#schedule-exceptions { max-height:14rem; overflow:auto }
#schedule-preview:not(:empty) { margin-top:.75rem }
.schedule-gantt-host { border-top:1px solid var(--line,#e2e8e5); max-height:65vh; overflow:auto; scrollbar-color:#738d80 #e9efeb; scrollbar-width:auto }
.schedule-gantt-grid { display:grid; grid-template-columns:clamp(7rem,19vw,14rem) max-content; width:max-content; align-items:start }
.schedule-gantt-names { position:sticky; left:0; z-index:2; background:#f7f9f8; border-right:1px solid #dce5df; min-width:0 }
.gantt-name-heading { position:sticky; top:0; left:0; z-index:5; height:40px; box-sizing:border-box; padding:.6rem .75rem; font-size:.8rem; font-weight:700; background:#f7f9f8; border-right:1px solid #dce5df }
.gantt-date-header { position:sticky; top:0; z-index:3; height:40px; background:#fff }
.gantt-date-header svg { display:block; max-width:none }
.gantt-name { display:flex; flex-direction:column; justify-content:center; box-sizing:border-box; text-align:left; height:44px; min-height:44px; max-height:44px; width:100%; border:0; border-top:1px solid #e3ebe6; border-radius:0; padding:0 .65rem; background:transparent; overflow:hidden }
.gantt-name strong,.gantt-name small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.gantt-name strong { width:100%; font-size:14px; line-height:20px }
.gantt-name small { width:100%; font-size:11px; line-height:14px; color:#52645c }
.gantt-child { padding-left:1.3rem }
.schedule-gantt-scroll { min-width:0 }
.schedule-gantt-chart { display:block; max-width:none; background:#fff; user-select:none }
.gantt-heading { fill:#3d5449; font-size:12px }
.gantt-grid { stroke:#e3ebe6; fill:none }
.gantt-holiday { fill:#edf2ef }
.gantt-today { stroke:#1978a2; stroke-width:2 }
.gantt-task { cursor:pointer }
.gantt-editable .gantt-task { cursor:grab; touch-action:pan-y }
.gantt-editable .gantt-task:active { cursor:grabbing }
.gantt-task:focus-visible .gantt-bar { stroke:#24483a; stroke-width:2 }
.gantt-bar-label { font-size:12px; font-weight:600; pointer-events:none }
.gantt-link { fill:none; stroke:#737b88; stroke-width:1; pointer-events:none }
#schedule-arrow path { fill:#737b88 }
@media(max-width:650px) {
  .schedule-toolbar { align-items:flex-start }
  .schedule-tools input, .schedule-tools select { max-width:12rem }
}
.gantt-scrollbar { display:flex; align-items:center; gap:.75rem; margin:0; padding:.55rem 1rem; border-top:1px solid #dce5df }
.gantt-scrollbar input { flex:1; min-width:0; width:auto; padding:0; accent-color:var(--green,#176c50) }
.schedule-level-1 { --wbs-indent:.55rem }
.schedule-level-2 { --wbs-indent:1.1rem }
.schedule-level-3 { --wbs-indent:1.65rem }
.schedule-level-4 { --wbs-indent:2.2rem }
.schedule-level-5 { --wbs-indent:2.75rem }
.schedule-level-6 { --wbs-indent:3.3rem }
.schedule-level-7 { --wbs-indent:3.85rem }
.schedule-group .schedule-name, .gantt-name { padding-left:calc(.65rem + var(--wbs-indent, 0rem)) }
.gantt-editable .gantt-summary { cursor:pointer }
.gantt-summary .gantt-bar { stroke:#172b2b; stroke-width:1 }
.gantt-baseline { stroke:#67746e; stroke-width:3 }
.gantt-task:focus-visible .gantt-milestone { stroke:#24483a; stroke-width:2 }
.schedule-group-head { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; padding-right:.7rem; border-bottom:1px solid var(--line) }
.schedule-group-head label { display:flex; align-items:center; gap:.35rem; margin:0 }
.schedule-group-head input { margin:0; padding:.3rem .4rem; width:4.2rem }
.schedule-group-order { display:flex; gap:.3rem; margin-left:auto }
.schedule-group-order button { padding:.25rem .55rem }
.schedule-group-order [draggable] { cursor:grab }
.schedule-drop-target .schedule-group-head { background:#e2f2eb }
.schedule-group .table-wrap { overflow:auto; scrollbar-gutter:stable }
.schedule-group thead th { position:sticky; top:0; z-index:2; background:#fafbf9 }
.schedule-group tr[data-task]:hover > td { background:#e8f4ee }
.schedule-group tr[data-task]:hover input,
.schedule-group tr[data-task]:hover select:not(.schedule-status select, [data-edit="priority"]) { background:#f2faf6 }
.schedule-group td:is(.schedule-wbs, :has([data-edit="status"], [data-edit="workDays"], [data-edit="priority"])) { width:1% }
.schedule-group .schedule-wbs input,
.schedule-group input[data-edit="workDays"] {
  min-width:0; width:4rem; padding-inline:.3rem; font-variant-numeric:tabular-nums;
}
.schedule-group select:is([data-edit="status"], [data-edit="priority"]) {
  min-width:0; width:5rem; padding-inline:.3rem;
}
.schedule-group select[data-edit="priority"] { color:#485952; background:#edf1ef }
.schedule-group select[data-edit="priority"]:has(option[value="Low"]:checked) { color:#214d86; background:#e1edff }
.schedule-group select[data-edit="priority"]:has(option[value="Medium"]:checked) { color:#583d8a; background:#eee5ff }
.schedule-group select[data-edit="priority"]:has(option[value="High"]:checked) { color:#824400; background:#fff0cc }
.schedule-group select[data-edit="priority"]:has(option[value="Critical"]:checked) { color:#a32d3a; background:#fbe1e4 }
.schedule-group select:is([data-edit="status"], [data-edit="priority"]):disabled { opacity:1 }
.schedule-predecessor-cell, .schedule-attachment-cell { max-width:12rem; overflow:hidden; text-overflow:ellipsis }
.schedule-predecessor-cell button { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.schedule-predecessor-picker {
  position:fixed; inset:auto; margin:0; width:min(24rem,calc(100vw - 1.5rem)); max-height:calc(100dvh - 1rem); overflow:auto;
  background:white; border:1px solid var(--line); border-radius:.6rem; padding:.8rem;
  box-shadow:0 8px 25px #172b2b22; color:var(--ink);
}
.schedule-predecessor-picker label { margin:0 }
.schedule-predecessor-picker .check { padding:.32rem .1rem }
.schedule-predecessor-picker .check[hidden] { display:none }
.schedule-picker-items { max-height:12rem; overflow:auto; margin:.5rem 0 }
.schedule-picker-items small { display:block }
[data-picker-message] { color:var(--muted); font-size:.85rem; margin:.4rem 0 }
.schedule-color-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem }
.schedule-color-grid fieldset { min-width:0; border:1px solid var(--line); border-radius:.5rem; padding:.75rem }
.schedule-color-grid input[type=color] { height:2.6rem; padding:.2rem }
