* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  font-size: 13px;
  color: #222;
}

/* ---- Toolbar ---- */
#toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

#project-title {
  font-size: 15px;
  font-weight: 700;
  background: none;
  border: none;
  outline: none;
  min-width: 120px;
  max-width: 300px;
  cursor: text;
  padding: 2px 4px;
  border-radius: 3px;
}
#project-title:hover { background: #f0f4ff; }
#project-title:focus { background: #e8f0fe; }

#toolbar .sep { width: 1px; height: 20px; background: #ddd; margin: 0 4px; }

#toolbar button {
  padding: 5px 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
#toolbar button:hover { background: #f0f0f0; }
#toolbar button.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
#toolbar button.primary:hover { background: #1d4ed8; }

.toolbar-file-label {
  padding: 5px 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  color: #222;
}
.toolbar-file-label:hover { background: #f0f0f0; }

/* ---- Settings bar (below toolbar) ---- */
.settings-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
}

.settings-bar-title {
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #374151;
  user-select: none;
}
.setting-toggle input[type=checkbox] { cursor: pointer; }

.settings-bar-sep {
  width: 1px;
  height: 16px;
  background: #d1d5db;
}

.settings-danger-btn {
  padding: 3px 10px;
  border: 1px solid #fca5a5;
  background: #fff;
  color: #dc2626;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}
.settings-danger-btn:hover { background: #fff1f2; }

/* ---- Scroll area ---- */
#scroll-wrap {
  overflow: auto;
  padding: 16px;
  padding-bottom: 32px;
}

/* ---- Timeline container ---- */
#timeline {
  display: inline-block;
  min-width: 100%;
  user-select: none;
}

/* ---- Header rows ---- */
.header-row {
  display: flex;
  align-items: stretch;
}

.row-label { display: none; }

/* Week header */
.week-headers {
  display: flex;
  flex-shrink: 0;
}

.week-cell {
  border-left: 1px solid #d1d5db;
  text-align: center;
  padding: 3px 2px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  background: #fff;
  flex-shrink: 0;
}
.week-cell:first-child { border-left: none; }

/* Day sub-header */
.day-headers {
  display: flex;
  flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
}

.day-cell {
  text-align: center;
  padding: 2px 0;
  font-size: 9px;
  color: #aaa;
  background: #fafafa;
  border-left: 1px solid #eee;
  flex-shrink: 0;
  overflow: hidden;
}
.day-cell.week-end-day {
  border-right: 2px solid #94a3b8;
  color: #888;
  font-weight: 600;
}

/* Sprint header */
.sprint-header-row {
  margin-bottom: 4px;
}

.sprint-cell {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  cursor: default;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 6px;
}

/* ---- Content wrap (phases + day header + lanes + milestone overlays) ---- */
.content-wrap {
  position: relative;
}

/* ---- Lanes group (annotation overlay container) ---- */
.lanes-group {
  position: relative;
}

/* ---- Swim lanes: hidden labels, seamless single canvas ---- */
.lane {
  display: flex;
  min-height: 64px;
  margin-bottom: 0;
  align-items: stretch;
}

.lane-label { display: none; }

.lane-body {
  flex: 1;
  flex-shrink: 0;
  background: #fafafa;
  border: none;
  border-bottom: 1px solid #e8eaed;
  position: relative;
  min-height: 64px;
}

/* ---- Canvas expand handle (below all lanes) ---- */
.canvas-expand-handle {
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-top: 1px dashed #d1d5db;
  background: #f8fafc;
  transition: background 0.12s;
}
.canvas-expand-handle:hover { background: #e0f2fe; }

.canvas-expand-label {
  font-size: 10px;
  color: #94a3b8;
  user-select: none;
  letter-spacing: 0.3px;
}
.canvas-expand-handle:hover .canvas-expand-label { color: #0369a1; }

/* ---- Phase bars (between sprint and day header) ---- */
.phase-row { margin-bottom: 1px; }

.phase-cell {
  position: absolute;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  cursor: grab;
  overflow: hidden;
  white-space: nowrap;
  color: #1e293b;
  border: 1px solid rgba(0,0,0,0.1);
}
.phase-cell:hover { filter: brightness(0.93); }
.phase-cell.dragging { cursor: grabbing; opacity: 0.8; }

.phase-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  pointer-events: none;
}

.phase-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 100%;
  cursor: ew-resize;
  background: rgba(0,0,0,0.08);
  opacity: 0;
  transition: opacity 0.1s;
  flex-shrink: 0;
}
.phase-cell:hover .phase-resize-handle { opacity: 1; }

/* ---- Milestone diamonds in sprint row ---- */
.ms-diamond {
  position: absolute;
  width: 14px;
  height: 14px;
  top: 7px;
  transform: rotate(45deg);
  cursor: pointer;
  z-index: 20;
  border-radius: 2px;
  transition: filter 0.1s;
}
.ms-diamond:hover { filter: brightness(0.8); }

/* ---- Milestone vertical lines (in content-wrap, above phase bars) ---- */
.milestone-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-left: 2px dashed currentColor;
  z-index: 50;
  cursor: ew-resize;
  pointer-events: auto;
}
.milestone-line::before {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: 0;
  bottom: 0;
}
.milestone-line:hover { opacity: 0.7; }

/* ---- Milestone foot strip (label row below lanes) ---- */
.milestone-foot-strip {
  position: relative;
  height: 36px;
  margin-top: 0;
}

.ms-foot-label {
  position: absolute;
  top: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  padding-left: 4px;
  border-left: 2px dashed;
  line-height: 1.4;
}

/* ---- Annotation overlays ---- */
.annotation-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  border-left: 2px solid;
  border-radius: 3px;
  overflow: hidden;
  cursor: grab;
  transition: filter 0.1s;
}
.annotation-overlay:hover { filter: brightness(0.95); }
.annotation-overlay.dragging { cursor: grabbing; opacity: 0.7; }

.ann-title {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px 2px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ann-content { padding: 0 8px 4px; }
.ann-line {
  font-size: 10px;
  color: #334155;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ann-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 100%;
  cursor: ew-resize;
  background: rgba(0,0,0,0.08);
  opacity: 0;
  transition: opacity 0.1s;
}
.annotation-overlay:hover .ann-resize-handle { opacity: 1; }

/* ---- Task blocks ---- */
.task-block {
  position: absolute;
  top: 6px;
  height: 52px;
  z-index: 10;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3px 8px 3px 6px;
  cursor: grab;
  overflow: hidden;
  border: 1.5px solid rgba(0,0,0,0.10);
  transition: box-shadow 0.1s;
}
.task-block:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); overflow: visible; }
.task-block.dragging {
  opacity: 0.75;
  cursor: grabbing;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.task-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.task-visible-meta {
  font-size: 10px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.2;
}

.resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 100%;
  cursor: ew-resize;
  background: rgba(0,0,0,0.06);
  opacity: 0;
  transition: opacity 0.1s;
  border-radius: 0 6px 6px 0;
}
.task-block:hover .resize-handle { opacity: 1; }

/* Meta tooltip on hover */
.meta-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 0;
  background: #1e293b;
  color: #f1f5f9;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 11px;
  z-index: 300;
  pointer-events: none;
  max-width: 280px;
  white-space: normal;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.task-block:hover .meta-tooltip { display: block; }

.tip-row { display: block; }
.tip-vis { color: #93c5fd; }
.tip-eye { font-size: 10px; }
.tip-title { font-weight: 700; font-size: 12px; margin-bottom: 1px; white-space: nowrap; }
.tip-description { color: #cbd5e1; white-space: pre-wrap; }
.tip-assignee { color: #c7d2fe; white-space: nowrap; }
.tip-assignee b { color: #f1f5f9; }

/* ---- Overlap indicator ---- */
/* Shown on the portion of a task hidden underneath a later (higher-stacked)
   task in the same lane, so overlaps stay visible without repositioning cards. */
.task-overlap-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.18) 0,
    rgba(0,0,0,0.18) 5px,
    transparent 5px,
    transparent 10px
  );
  pointer-events: none;
}

/* A task completely hidden behind another is nudged down-right so a sliver
   of its edge, with a dashed outline, peeks out from underneath. */
.task-fully-covered {
  outline: 2px dashed rgba(0,0,0,0.35);
  outline-offset: -1px;
}

/* ---- Add-lane row (kept for legacy references, hidden) ---- */
.add-lane-row { display: none; }

/* ---- Color Legend ---- */
.legend-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  flex-wrap: wrap;
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  white-space: nowrap;
}

.legend-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}

.legend-input {
  width: 130px;
  padding: 3px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  font-size: 11px;
  background: #f8fafc;
  color: #374151;
}
.legend-input:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
}

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.modal h2 { font-size: 15px; margin-bottom: 14px; }

.modal label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-top: 10px;
  margin-bottom: 3px;
}

.modal input[type=text],
.modal input[type=number],
.modal textarea,
.modal select {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}
.modal input[type=text],
.modal textarea,
.modal select { width: 100%; }

.modal .start-dur-row {
  display: flex;
  gap: 12px;
}
.modal .start-dur-row > div { display: flex; flex-direction: column; }
.modal .start-dur-row label { margin-top: 0; }

.color-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.1s, transform 0.1s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: #1e293b; }

/* Meta params in modal */
.meta-param-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
  align-items: center;
}
.meta-param-row input { flex: 1; }
.meta-param-row button {
  padding: 4px 7px;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.meta-param-row button:hover { background: #f0f0f0; }

.eye-btn {
  padding: 3px 5px;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.eye-btn:hover { background: #e0f2fe; }

#add-meta-btn {
  margin-top: 4px;
  font-size: 11px;
  padding: 3px 9px;
  border: 1px dashed #aaa;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
}
#add-meta-btn:hover { background: #f0f0f0; }

/* Sprint list in modal */
.sprint-list-item {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}
.sprint-list-item input[type=text] { flex: 1; }
.sprint-list-item button {
  padding: 4px 8px;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
}
.sprint-list-item button:hover { background: #fee2e2; }

.btn-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.btn-row button {
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  border: 1px solid #ccc;
  background: #fff;
}
.btn-row button:hover { filter: brightness(0.92); }
.btn-row button.save   { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-row button.danger { background: #dc2626; color: #fff; border-color: #dc2626; }

/* ---- Priority picker in task modal ---- */
.priority-picker {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.pri-btn {
  flex: 1;
  padding: 5px 0;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  font-family: inherit;
  transition: all 0.12s;
}
.pri-btn:hover { background: #f0f0f0; color: #444; }

.pri-btn.active[data-priority="high"]   { background: #fee2e2; border-color: #ef4444; color: #b91c1c; font-weight: 700; }
.pri-btn.active[data-priority="medium"] { background: #fefce8; border-color: #eab308; color: #854d0e; font-weight: 700; }
.pri-btn.active[data-priority="low"]    { background: #f1f5f9; border-color: #94a3b8; color: #475569; font-weight: 700; }

/* ---- Priority left-border stripe on task blocks ---- */
.task-block[data-priority="high"]   { border-left: 4px solid #ef4444; }
.task-block[data-priority="medium"] { border-left: 1.5px solid rgba(0,0,0,0.10); }
.task-block[data-priority="low"]    { border-left: 4px solid #94a3b8; }

/* ---- Priority icon prefix in task title ---- */
.task-priority-icon {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.task-priority-icon[data-priority="high"] { color: #dc2626; }
.task-priority-icon[data-priority="low"]  { color: #94a3b8; }

/* ---- Dependency warning on task blocks ---- */
.dep-warn {
  position: absolute;
  top: 3px;
  right: 20px;
  font-size: 11px;
  cursor: help;
  z-index: 5;
}

/* ---- Assignee chips on task blocks ---- */
.task-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.assignee-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0,0,0,0.18);
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.assignee-chip-group {
  background: rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.55);
}

/* ---- Task modal: assignment rows ---- */
#task-assignments { margin-bottom: 4px; }

.assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
}
.assign-row:last-child { border-bottom: none; }

.assign-pct-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.assign-pct {
  width: 54px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  text-align: right;
}

.assign-total {
  font-size: 11px;
  color: #888;
  text-align: right;
  min-height: 16px;
  margin-top: 2px;
}
.assign-total-error { color: #dc2626; font-weight: 700; }

/* Deps list in modal */
#task-deps {
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 2px;
}
#task-deps:empty { display: none; }

.dep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
  color: #333;
}
.dep-row label { flex: 1; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Groups in team section ---- */
.team-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.group-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
}

.group-name {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  outline: none;
  min-width: 40px;
}
.group-name:focus { background: #e0f2fe; border-radius: 2px; }

.group-members {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  background: #bae6fd;
  color: #0c4a6e;
  padding: 2px 5px;
  border-radius: 10px;
}

.group-member-rm {
  cursor: pointer;
  font-size: 11px;
  color: #0369a1;
  line-height: 1;
}
.group-member-rm:hover { color: #dc2626; }

.add-group-btn {
  margin-top: 5px;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px dashed #7dd3fc;
  background: #f0f9ff;
  border-radius: 4px;
  cursor: pointer;
  color: #0369a1;
}
.add-group-btn:hover { background: #e0f2fe; }

.group-add-sel {
  font-size: 11px;
  border: 1px dashed #7dd3fc;
  background: #fff;
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
  color: #0369a1;
}

/* ---- Team section (bottom of board) ---- */
.team-section {
  margin-top: 20px;
}

.team-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.team-members {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  min-width: 240px;
}

.member-name {
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  outline: none;
  color: #1e293b;
}
.member-name:focus { background: #f0f4ff; border-radius: 2px; }

.member-role-edit {
  font-size: 11px;
  color: #888;
  min-width: 60px;
  flex: 1;
  outline: none;
}
.member-role-edit:empty::before {
  content: attr(data-placeholder);
  color: #ccc;
  pointer-events: none;
}
.member-role-edit:focus { background: #f0f4ff; border-radius: 2px; }

.member-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.member-del-btn:hover { color: #e53e3e; }

.add-member-btn {
  margin-top: 5px;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px dashed #aaa;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  align-self: flex-start;
}
.add-member-btn:hover { background: #f0f0f0; }

/* ---- Utilization rows ---- */
.util-row {
  display: flex;
  margin-bottom: 4px;
}

.util-label {
  width: 140px;
  min-width: 140px;
  flex-shrink: 0;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.util-name { font-size: 12px; font-weight: 700; color: #1e293b; }
.util-role-txt { font-size: 10px; color: #94a3b8; }

.util-peak-txt {
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}
.util-peak-txt.peak-ok   { color: #16a34a; }
.util-peak-txt.peak-busy { color: #d97706; }
.util-peak-txt.peak-over { color: #dc2626; }

.util-body {
  position: relative;
  min-height: 80px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 0 4px 4px 0;
  flex-shrink: 0;
  overflow: hidden; /* JS sets explicit height when overloaded, so bars don't clip */
  background-image:
    repeating-linear-gradient(to right, transparent 0, transparent 98px, rgba(0,0,0,0.22) 98px, rgba(0,0,0,0.22) 100px),
    repeating-linear-gradient(to right, transparent 0, transparent 19px, rgba(0,0,0,0.05) 19px, rgba(0,0,0,0.05) 20px);
}

.util-seg {
  position: absolute;
  border-radius: 2px 2px 0 0;
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: auto;
  cursor: default;
  transition: filter 0.1s;
}
.util-seg:hover { filter: brightness(0.82); }

/* Red tint + top border on overloaded periods */
.util-overload-cap {
  position: absolute;
  background: rgba(220, 38, 38, 0.13);
  border-top: 3px solid #ef4444;
  pointer-events: none;
  z-index: 4;
}

/* Dashed horizontal line at the 100% mark (BOT_PAD=8 + INNER_H=64 = 72px from bottom) */
.util-cap-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  height: 0;
  border-top: 1px dashed rgba(220, 38, 38, 0.45);
  z-index: 5;
  pointer-events: none;
}

.util-cap-label {
  position: absolute;
  left: 2px;
  top: 2px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(220, 38, 38, 0.6);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 3px;
  border-radius: 2px;
  line-height: 1.3;
}

/* Text label inside a utilization segment */
.util-seg-label {
  position: absolute;
  bottom: 3px;
  left: 3px;
  right: 3px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(0,0,0,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  pointer-events: none;
}

/* Ctrl+click multi-select */
.task-block.task-selected {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.20);
  z-index: 12;
}

/* Task block highlight when hovering its utilization segment */
.task-block.task-highlight {
  outline: 2px solid #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22), 0 2px 10px rgba(0,0,0,0.18);
  z-index: 15;
}

/* Auto-arrange button at bottom of utilization section */
.auto-arrange-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid #2563eb;
  background: #fff;
  color: #2563eb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.auto-arrange-btn:hover { background: #eff6ff; }

/* ---- App brand in toolbar ---- */
.app-brand {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.3px;
  white-space: nowrap;
  user-select: none;
}
/* ---- Info strip (between toolbar and timeline) ---- */
#info-strip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.info-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 11px;
  color: #475569;
}

.info-icon {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
}

.info-text {
  color: #475569;
}
.info-text strong {
  color: #1e293b;
  font-weight: 600;
}

/* ---- Footer (inside scroll-wrap, below timeline) ---- */
.site-footer {
  display: inline-block;
  min-width: 100%;
  margin-top: 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  user-select: none;
  box-sizing: border-box;
}

.footer-intro {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.footer-quote {
  margin: 0 0 12px 0;
  padding: 12px 18px;
  border-left: 3px solid #cbd5e1;
  font-size: 15px;
  font-style: italic;
  color: #1e293b;
  line-height: 1.5;
}

.footer-cite {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2px;
}
