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

body {
  font-family: "Space Mono", ui-monospace, monospace;
  background: #f6f2ff;
  color: #111;
}

.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 32px;
}

header {
  border: 4px solid #111;
  background: #ffe66d;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 8px 8px 0 #111;
}

header.header-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.save-alert {
  margin-top: 16px;
  border: 3px solid #111;
  background: #ffb3b3;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 4px 4px 0 #111;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
}

.btn {
  border: 3px solid #111;
  background: #fff;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 4px 4px 0 #111;
  cursor: pointer;
}

.ghost-btn {
  border: 2px solid #111;
  background: #fff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.menu-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  border: none;
  background: transparent;
  box-shadow: none;
  margin-left: 6px;
}

.header-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 2px solid #111;
  box-shadow: 4px 4px 0 #111;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
  min-width: 200px;
}

.header-menu-address {
  border: 2px solid #111;
  padding: 8px 10px;
  font-weight: 700;
  background: #fff7d1;
}

.header-menu-item {
  border: 2px solid #111;
  background: #fff;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.wallet-btn {
  min-width: 160px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(246, 242, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.auth-card {
  border: 3px solid #111;
  background: #fff;
  padding: 24px;
  box-shadow: 6px 6px 0 #111;
  text-align: center;
  max-width: 360px;
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.auth-card p {
  margin-top: 0;
  margin-bottom: 18px;
  font-weight: 600;
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: min(520px, 100%);
  background: #fff;
  border: 3px solid #111;
  box-shadow: 6px 6px 0 #111;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal h2 {
  margin: 0;
  font-size: 18px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.modal input,
.modal textarea,
.modal select {
  width: 100%;
  border: 2px solid #111;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}

.modal textarea {
  resize: vertical;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.duration-track {
  position: relative;
  padding-top: 26px;
}

.duration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.duration-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  pointer-events: none;
}

.duration-markers span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 6px;
  border: 2px solid #111;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.duration-summary {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.duration-date-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  cursor: pointer;
  background: transparent;
}

.duration-date-icon {
  font-size: 12px;
  line-height: 1;
}

.duration-date-trigger:hover {
  background: #fff;
  box-shadow: 0 0 0 2px #111;
}

.duration-inline-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}


.duration-dates {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.duration-dates input {
  width: 140px;
}

.progress-input {
  display: flex;
  justify-content: center;
}

.progress-field {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.progress-field span {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  outline: none;
  cursor: text;
}

.progress-target {
  font-size: 36px;
  line-height: 1;
  min-width: 32px;
}

.progress-unit {
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-align: left;
}

.progress-field input[type="number"]::-webkit-outer-spin-button,
.progress-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.progress-field input[type="number"] {
  -moz-appearance: textfield;
}

.task-picker {
  position: relative;
}

.task-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.task-chip {
  border: 2px solid #111;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  background: #fff3c8;
  cursor: pointer;
}

.task-search {
  width: 100%;
  border: 2px solid #111;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
}

.task-results {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 100%;
  background: #fff;
  border: 2px solid #111;
  box-shadow: 3px 3px 0 #111;
  max-height: 180px;
  overflow: auto;
  z-index: 10;
}

.task-results button {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

.task-results button:hover {
  background: #ffe6b3;
}

.duration-range {
  width: 100%;
  appearance: none;
  height: 14px;
  background-image: var(--duration-overlay, linear-gradient(0deg, transparent, transparent)),
    var(--duration-gradient, #fff);
  border: 2px solid #111;
  box-shadow: 3px 3px 0 #111;
  cursor: pointer;
}

.duration-range:focus {
  outline: none;
}

.duration-range::-webkit-slider-thumb {
  appearance: none;
  width: 4px;
  height: 18px;
  background: #dc2626;
  border: 0;
  margin-top: -3px;
}

.duration-range::-moz-range-thumb {
  width: 4px;
  height: 18px;
  background: #dc2626;
  border: 0;
}

.duration-range::-webkit-slider-runnable-track {
  height: 14px;
  background-image: var(--duration-overlay, linear-gradient(0deg, transparent, transparent)),
    var(--duration-gradient, #fff);
}

.duration-range::-moz-range-track {
  height: 14px;
  background-image: var(--duration-overlay, linear-gradient(0deg, transparent, transparent)),
    var(--duration-gradient, #fff);
}




.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.strip-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
}

.strip-left {
  flex: 1;
  min-width: 260px;
}

.strip-right {
  margin-left: 0;
}

.strip-group.strip-left {
  max-width: 520px;
}

.strip-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.strip-btn {
  border: 3px solid #111;
  background: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 #111;
}

.strip-btn.active {
  background: #ffd6e0;
}

.sort-arrow {
  font-size: 12px;
  margin-left: 6px;
}

.strip-search-wrap {
  position: relative;
  width: 100%;
  border: 3px solid #111;
  background: #fff;
  box-shadow: 4px 4px 0 #111;
}

.strip-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.strip-search {
  border: none;
  padding: 10px 14px 10px 32px;
  font-family: inherit;
  font-size: 13px;
  background: transparent;
  width: 100%;
  min-width: 320px;
  height: 40px;
  box-shadow: none;
  outline: none;
}

.strip-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 10px;
  border: 3px solid #111;
  box-shadow: 4px 4px 0 #111;
  background: #fff;
}

.strip-toggle input {
  accent-color: #111;
}

.layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 24px;
  height: calc(100vh - 190px);
}

.tree,
.gantt {
  border: 3px solid #111;
  background: #fff;
  padding: 18px;
  box-shadow: 6px 6px 0 #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gantt-scale {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 6px 0;
}

.gantt-scale-tabs {
  display: inline-flex;
  border: 2px solid #111;
  background: #fff;
  box-shadow: 3px 3px 0 #111;
}

.gantt-reset {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gantt-reset.hidden {
  display: none;
}

.gantt-scale-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.gantt-scale-btn.active {
  background: #ffe66d;
}

.pane-scroll {
  flex: 0 1 auto;
  overflow: auto;
  max-height: 100%;
  padding-right: 8px;
}

.gantt .pane-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none;
}

.pane-scroll-tree {
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  margin-left: -8px;
  padding-left: 8px;
}

.pane-scroll-tree > * {
  direction: ltr;
}

.pane-scroll-tree:hover {
  scrollbar-color: #111 transparent;
}

.pane-scroll-tree::-webkit-scrollbar {
  width: 8px;
}

.pane-scroll-tree::-webkit-scrollbar-track {
  background: transparent;
}

.pane-scroll-tree::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
}

.pane-scroll-tree:hover::-webkit-scrollbar-thumb {
  background: #111;
}

.node {
  border: 3px solid #111;
  padding: 16px 12px 28px;
  background: #fff;
  margin-bottom: 18px;
  position: relative;
}

.node-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.node-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.node-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.meta-inline {
  margin-top: 0;
  font-size: 14px;
  font-weight: 700;
}

.meta-inline.align-right {
  margin-left: auto;
}

.task-check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 6px;
}

.task-check.align-right {
  margin-left: auto;
  margin-right: 0;
}

.tier-row {
  display: flex;
  gap: 0;
  align-items: center;
}

.tier-status {
  font-size: 24px;
  font-weight: 800;
  margin-left: 10px;
}

.tier-status-completed {
  color: #2e7d32;
}

.tier-status-cancelled {
  color: #c0392b;
}

.modal-tier-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.modal-tier-row .tier-tile {
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  font-size: 16px;
}

.tier-tile {
  width: 26px;
  height: 24px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
  background: #fff;
  margin-left: -1px;
  color: #111;
}

.tier-tile:first-child {
  margin-left: 0;
}

.tier-tile.active {
  outline: 3px solid #111;
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px #fff;
}

.node,
.child {
  border-color: #111;
}

.time-timeline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.time-track {
  position: relative;
  height: 14px;
  border: none;
  background: #fff;
  overflow: hidden;
  display: flex;
}


.time-band {
  height: 100%;
}

.time-track-now {
  position: absolute;
  top: 0;
  width: 4px;
  height: 14px;
  background: #dc2626;
  transform: translateX(-50%);
}

.time-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border: 2px solid #111;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 3px 3px 0 #111;
  transition: opacity 0.1s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.time-tooltip.visible {
  opacity: 1;
}

.time-week {
  background: #f1a8c6;
}

.time-month {
  background: #dcc0f1;
}

.time-quarter {
  background: #9fbfff;
}

.time-year {
  background: #c3e0ff;
}

.time-5y {
  background: #e6f4ff;
}

.tier-tile.tier-E.active {
  outline-color: #6b7280;
}

.tier-tile.tier-D.active {
  outline-color: #5b6db2;
}

.tier-tile.tier-C.active {
  outline-color: #2e8b57;
}

.tier-tile.tier-B.active {
  outline-color: #b7791f;
}

.tier-tile.tier-A.active {
  outline-color: #c05621;
}

.tier-tile.tier-S.active {
  outline-color: #b91c1c;
}

.tier-tile.tier-E {
  background: #e5e7eb;
}

.tier-tile.tier-D {
  background: #cbd5f5;
}

.tier-tile.tier-C {
  background: #b8f1d1;
}

.tier-tile.tier-B {
  background: #ffe7a1;
}

.tier-tile.tier-A {
  background: #ffd1b3;
}

.tier-tile.tier-S {
  background: #ffb5b5;
}

.node-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-action-btn {
  border: none;
  background: transparent;
  width: 20px;
  height: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
}

.task-action-btn.status-toggle {
  font-size: 16px;
}

.task-action-btn.status-toggle:hover {
  color: #2e7d32;
}

.task-action-btn.status-toggle.completed {
  color: #2e7d32;
}

.task-action-btn.status-toggle.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.task-action-btn.danger {
  color: #111;
}

.task-action-btn.danger:hover {
  color: #c0392b;
}


.collapse-btn {
  border: none;
  background: transparent;
  padding: 0;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

.task-check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 6px;
}

.task-check.align-right {
  margin-left: auto;
}

.child,
.node {
  padding-right: 16px;
}

.node.tier-E,
.child.tier-E {
  border-color: #6b7280;
}

.node.tier-D,
.child.tier-D {
  border-color: #5b6db2;
}

.node.tier-C,
.child.tier-C {
  border-color: #2e8b57;
}

.node.tier-B,
.child.tier-B {
  border-color: #b7791f;
}

.node.tier-A,
.child.tier-A {
  border-color: #c05621;
}

.node.tier-S,
.child.tier-S {
  border-color: #b91c1c;
}

.task-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-check-box {
  width: 38px;
  height: 38px;
  border: 2px solid #111;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-check-box::after {
  content: "✓";
  font-size: 30px;
  line-height: 1;
  color: #ff6b6b;
  opacity: 0.6;
  position: relative;
  top: -2px;
}

.task-check input:checked + .task-check-box::after {
  opacity: 1;
}


.children.collapsed {
  display: none;
}

.title {
  font-weight: 700;
  font-size: 16px;
}

.meta {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

.progress-inline {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.progress-plus {
  width: 18px;
  height: 18px;
  border: none;
  background: #fff;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.progress-plus.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.progress-current {
  min-width: 18px;
  display: inline-block;
  cursor: text;
}

.progress-current.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.progress {
  margin-top: 8px;
  border: 2px solid #111;
  height: 16px;
  background: #fff;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.progress.disabled {
  background: #f3f3f3;
  border-color: #666;
  cursor: not-allowed;
}

.progress.disabled .progress-bar {
  background: #cfcfcf;
}

.progress.disabled .progress-preview {
  background: rgba(207, 207, 207, 0.35);
}

.progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / var(--segments, 1) - 1px),
    #111 calc(100% / var(--segments, 1) - 1px),
    #111 calc(100% / var(--segments, 1))
  );
  pointer-events: none;
}

.progress-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  padding: 4px 8px;
  border: 2px solid #111;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 3px 3px 0 #111;
  transition: opacity 0.1s ease;
  z-index: 20;
}

.progress-tooltip.visible {
  opacity: 1;
}

.progress-complete-marker {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #111;
  pointer-events: none;
}

.progress::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: calc(100% / var(--segments, 1));
  height: 100%;
  border: 1px solid #111;
  box-sizing: border-box;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  width: var(--filled-pct, 0%);
  background: #ff6b6b;
}

.progress-preview {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--filled-pct, 0%);
  width: calc(var(--preview-pct, 0%) - var(--filled-pct, 0%));
  background: rgba(255, 107, 107, 0.35);
}

.tags {
  margin-top: 8px;
}

.tag {
  background: #ffe6b3;
  border: 2px solid #111;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
}

.highlight {
  background: #ffe66d;
  padding: 0;
  box-shadow: inset 0 -0.15em 0 #ffe66d;
}


.children {
  margin-left: 28px;
  margin-top: 10px;
  position: relative;
}

.children::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #111;
}

.children-add {
  position: absolute;
  left: -21px;
  bottom: -8px;
  width: 18px;
  height: 18px;
  border: none;
  background: #fff;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.child {
  border: 2px solid #111;
  padding: 14px 12px 24px;
  margin-bottom: 14px;
  background: #fff;
  box-shadow: 4px 4px 0 #111;
  position: relative;
}

.child::before {
  content: "";
  position: absolute;
  left: -18px;
  margin-top: 10px;
  width: 16px;
  height: 4px;
  background: #111;
}

.gantt-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 1 auto;
  max-height: 100%;
}

.gantt-scroll-rows {
  flex: 0 1 auto;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: none;
  border-bottom: 2px solid #111;
}

.gantt-scroll-rows::-webkit-scrollbar {
  width: 0;
  height: 0;
}



.gantt-scroll-rows:hover {
  scrollbar-color: #111 transparent;
}

.gantt-scroll-rows::-webkit-scrollbar {
  width: 8px;
}

.gantt-scroll-rows::-webkit-scrollbar-track {
  background: transparent;
}

.gantt-scroll-rows::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
}

.gantt-scroll-rows:hover::-webkit-scrollbar-thumb {
  background: #111;
}

.gantt-rows {
  display: grid;
  gap: 0;
}


.gantt-axis {
  display: grid;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0;
  user-select: none;
  border: 2px dashed #111;
  padding: 14px 0;
  background: #fff7d1;
  position: relative;
  box-sizing: border-box;
  cursor: grab;
}

.gantt-axis.dragging {
  cursor: grabbing;
}

.gantt-axis-labels {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days, 7), 1fr);
  gap: 0;
  grid-column: 1 / -1;
}

.axis-label {
  text-align: center;
  border-right: 2px dotted #111;
  white-space: nowrap;
}

.axis-label-split {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-size: 10px;
}

.axis-label-compact {
  font-size: 10px;
}

.axis-label-split.axis-label-compact {
  font-size: 9px;
}

.axis-label-split .axis-month {
  font-size: 9px;
}

.axis-label:last-child {
  border-right: none;
}

.gantt-nav {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  opacity: 0;
  transition: opacity 0.2s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gantt-nav[data-gantt-nav="prev"] {
  left: 2px;
}

.gantt-nav[data-gantt-nav="next"] {
  right: 2px;
}

.gantt-axis:hover .gantt-nav {
  opacity: 1;
}

.gantt-row {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.gantt-track {
  border: 1px solid #111;
  background-color: #fff;
  background-image: linear-gradient(to right, rgba(17, 17, 17, 0.6) 1px, transparent 1px);
  background-size: calc(100% / var(--gantt-days, 7)) 100%;
  background-repeat: repeat;
  height: 42px;
  padding: 6px 0;
  position: relative;
}

.gantt-days-left {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 4;
  background: transparent;
  text-shadow: -1px -1px 0 #111, 1px -1px 0 #111, -1px 1px 0 #111, 1px 1px 0 #111;
}

.gantt-row:hover .gantt-days-left,
.gantt-track:hover .gantt-days-left,
.gantt-bar:hover ~ .gantt-days-left {
  opacity: 1;
}

.gantt-days-left.time-week {
  color: #f1a8c6;
}

.gantt-days-left.time-month {
  color: #dcc0f1;
}

.gantt-days-left.time-quarter {
  color: #9fbfff;
}

.gantt-days-left.time-year {
  color: #c3e0ff;
}

.gantt-days-left.time-5y {
  color: #e6f4ff;
}

.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  background: var(--bar-color, #ffd6e0);
  border: 3px solid #111;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
  cursor: pointer;
}

.gantt-bar:hover {
  overflow: visible;
}

.gantt-bar-label {
  position: relative;
  z-index: 2;
  background: var(--bar-color, #ffd6e0);
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
}

.gantt-bar.clipped-left {
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.gantt-bar.clipped-right {
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.gantt-bar.fade-out {
  animation: ganttFadeOut 0.8s ease-out;
}

.gantt-progress-overlay {
  position: absolute;
  inset: 0;
  width: 0;
  background-image: repeating-linear-gradient(135deg, rgba(234, 88, 12, 0.7) 0 3px, transparent 3px 7px);
  border-right: 2px solid rgba(234, 88, 12, 0.8);
  pointer-events: none;
  z-index: 1;
}

.gantt-increment {
  position: fixed;
  font-size: 22px;
  font-weight: 900;
  color: #2e7d32;
  animation: ganttIncrement 1s ease-out;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 50;
  text-shadow: 0 0 0 #111, 1px 1px 0 #111, -1px 1px 0 #111, 1px -1px 0 #111;
}

@keyframes ganttIncrement {
  0% { opacity: 0; transform: translate(0, 6px); }
  40% { opacity: 1; transform: translate(8px, -8px); }
  100% { opacity: 0; transform: translate(16px, -18px); }
}


@keyframes ganttFadeOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes ganttIncrement {
  0% { opacity: 0; transform: translateY(4px); }
  40% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.gantt-bar.tier-E {
  --bar-color: #e5e7eb;
}

.gantt-bar.tier-D {
  --bar-color: #cbd5f5;
}

.gantt-bar.tier-C {
  --bar-color: #b8f1d1;
}

.gantt-bar.tier-B {
  --bar-color: #ffe7a1;
}

.gantt-bar.tier-A {
  --bar-color: #ffd1b3;
}

.gantt-bar.tier-S {
  --bar-color: #ffb5b5;
}

.gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e11d48;
  left: 0;
  z-index: 1;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
