:root {
  color-scheme: dark;
  --surface: #050505;
  --surface-2: #0a0a0a;
  --surface-3: rgba(255, 255, 255, 0.055);
  --surface-4: rgba(255, 255, 255, 0.085);
  --text: #ffffff;
  --copy: #b4b4b4;
  --muted: rgba(161, 161, 170, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent-dark: #0d9488;
  --accent: #14b8a6;
  --accent-light: #2dd4bf;
  --accent-glow: #5eead4;
  --danger: #f87171;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 70% 5%, rgba(20, 184, 166, 0.18), transparent 34rem),
    radial-gradient(circle at 10% 15%, rgba(45, 212, 191, 0.09), transparent 28rem),
    linear-gradient(180deg, #071010 0%, var(--surface) 34rem, var(--surface) 100%);
  color: var(--text);
  overflow: hidden;
}

button {
  font: inherit;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: 68px 1fr;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #061211;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  box-shadow: 0 0 28px rgba(94, 234, 212, 0.28);
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.view-tab {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.view-tab.is-active {
  color: #071110;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  font-weight: 700;
}

.view-tab:disabled {
  cursor: default;
  opacity: 0.48;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-btn {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ghost-btn:hover {
  border-color: rgba(45, 212, 191, 0.42);
  color: var(--accent-light);
}

.ghost-btn.danger:hover {
  border-color: rgba(248, 113, 113, 0.45);
  color: var(--danger);
}

.workspace {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.summary-panel {
  min-height: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
  overflow: auto;
}

.summary-card,
.phase-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.summary-card {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.total-card strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 8px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.4);
  transition: width 0.22s ease;
}

.phase-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.phase-card {
  width: 100%;
  padding: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.phase-card:hover,
.phase-card.is-active {
  border-color: rgba(45, 212, 191, 0.48);
}

.phase-card.is-active {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0.04));
}

.phase-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.phase-card-title strong {
  min-width: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.phase-card-title span {
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: grid;
}

.flow-panel {
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.flow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--line);
}

.flow-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.breadcrumb {
  max-width: min(54vw, 740px);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-head-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 0;
}

.gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.owner-filter-wrap {
  position: relative;
}

.owner-filter-btn.is-active,
.owner-filter-btn[aria-expanded="true"] {
  border-color: rgba(45, 212, 191, 0.42);
  color: var(--accent-light);
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
}

.icon-btn:hover:not(:disabled) {
  border-color: rgba(45, 212, 191, 0.42);
  color: var(--accent-light);
}

.icon-btn:disabled {
  cursor: default;
  opacity: 0.36;
}

.columns-wrap {
  position: relative;
  min-height: 0;
  overflow: auto;
  padding: 24px 26px 36px;
}

.links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.columns {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 34px;
  min-width: min-content;
}

.empty-hint {
  position: absolute;
  left: 374px;
  top: 76px;
  z-index: 0;
  max-width: 300px;
  margin: 0;
  color: rgba(180, 180, 180, 0.42);
  font-size: 14px;
}

.empty-hint[hidden] {
  display: none;
}

.column {
  width: 294px;
  flex: 0 0 294px;
}

.column-title {
  height: 26px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.node {
  width: 100%;
  min-height: 76px;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(10, 10, 10, 0.78);
  text-align: left;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
}

button.node {
  cursor: pointer;
}

.node:hover,
.node.is-active {
  border-color: rgba(45, 212, 191, 0.46);
  background: rgba(20, 184, 166, 0.1);
}

.node-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.node-name {
  min-width: 0;
  font-size: 14px;
  line-height: 1.28;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.task .node-name {
  font-weight: 520;
}

.node-date {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.node-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.mini-progress {
  width: 68px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-light);
}

.task {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.check:hover {
  border-color: var(--accent-light);
}

.task.is-done .check {
  color: #031312;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

.task.is-done .node-name {
  color: rgba(255, 255, 255, 0.52);
  text-decoration: line-through;
}

.task-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.error-state {
  max-width: 680px;
  margin: 48px auto;
  padding: 24px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 18px;
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.gantt-panel {
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.gantt-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.gantt-main {
  min-width: 0;
  min-height: 0;
  overflow: scroll;
  scrollbar-color: rgba(45, 212, 191, 0.72) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  border-right: 1px solid var(--line);
}

.gantt-main::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.gantt-main::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.gantt-main::-webkit-scrollbar-thumb {
  border: 3px solid rgba(5, 5, 5, 0.88);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.72);
}

.gantt-grid {
  --day-width: 34px;
  --label-width: 470px;
  --timeline-width: 2686px;
  position: relative;
  width: calc(var(--label-width) + var(--timeline-width));
  min-width: calc(var(--label-width) + var(--timeline-width));
  padding-bottom: 36px;
}

.gantt-month-header,
.gantt-header,
.gantt-phase-row,
.gantt-row {
  display: grid;
  grid-template-columns: var(--label-width) repeat(var(--day-count), var(--day-width));
}

.gantt-month-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 34px;
  background: rgba(5, 5, 5, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.gantt-header {
  position: sticky;
  top: 35px;
  z-index: 8;
  background: rgba(5, 5, 5, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.gantt-corner {
  position: sticky;
  left: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.96);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gantt-month-corner {
  min-height: 34px;
}

.gantt-month {
  grid-row: 1;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gantt-day {
  min-height: 50px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 11px;
}

.gantt-day.is-month-start {
  border-left: 1px solid var(--line-strong);
}

.gantt-day strong {
  color: var(--text);
  font-size: 12px;
}

.gantt-phase-row {
  position: sticky;
  top: 86px;
  z-index: 6;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.9);
}

.gantt-phase-label {
  position: sticky;
  left: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.phase-band {
  grid-row: 1;
  align-self: center;
  height: 30px;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--phase-main), white 22%);
  border-radius: 999px;
  color: var(--phase-text);
  background: linear-gradient(135deg, var(--phase-main), var(--phase-alt));
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 22px color-mix(in srgb, var(--phase-main), transparent 78%);
}

.gantt-body {
  display: grid;
}

.gantt-row {
  position: relative;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
}

.gantt-row.is-date-open {
  z-index: 40;
}

.gantt-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.gantt-row.is-date-open .gantt-label {
  z-index: 41;
}

.gantt-label {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-right: 1px solid color-mix(in srgb, var(--phase-main), white 12%);
  background: rgba(5, 5, 5, 0.92);
  box-shadow: inset 3px 0 0 var(--phase-main);
}

.gantt-toggle {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.gantt-toggle:hover {
  color: var(--accent-light);
  border-color: rgba(45, 212, 191, 0.4);
}

.gantt-toggle[disabled] {
  cursor: default;
  opacity: 0;
}

.gantt-label-main {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.gantt-label-name {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-label-context {
  min-width: 0;
  color: color-mix(in srgb, var(--phase-main), white 24%);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row.has-context .gantt-label-main {
  gap: 1px;
}

.gantt-row.has-context .gantt-label-name {
  font-size: 12px;
  line-height: 1.15;
}

.gantt-row.has-context .gantt-label-meta {
  line-height: 1.1;
}

.gantt-title-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--phase-main), white 18%);
  border-radius: 5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  outline: none;
}

.gantt-title-input:focus {
  border-color: var(--phase-main);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--phase-main), transparent 78%);
}

.gantt-row.is-task .gantt-label-name {
  font-weight: 500;
}

.gantt-label-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row.is-date-open .gantt-label-meta {
  overflow: visible;
}

.owner-editor-wrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.owner-inline-btn {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.owner-inline-btn:hover,
.owner-inline-btn[aria-expanded="true"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--phase-main), transparent 35%);
  text-underline-offset: 3px;
}

.owner-selector-popover {
  position: absolute;
  z-index: 60;
  width: 280px;
  display: none;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(8, 8, 8, 0.99);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

.owner-selector-popover.is-open {
  display: grid;
}

#ownerFilterPopover {
  top: calc(100% + 7px);
  right: 0;
}

.owner-editor-popover {
  top: 22px;
  left: 0;
}

.owner-search {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  outline: none;
}

.owner-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.15);
}

.owner-option-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 2px;
}

.owner-option {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.owner-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.owner-option input {
  accent-color: var(--accent);
}

.create-owner-btn,
.owner-clear-btn {
  min-height: 30px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.create-owner-btn:hover,
.owner-clear-btn:hover {
  color: var(--accent-light);
}

.owner-empty {
  padding: 10px 7px;
  color: var(--muted);
  font-size: 11px;
}

.owner-selector-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.date-popover-wrap {
  position: relative;
}

.gantt-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-creator-wrap {
  position: relative;
}

.add-task-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.58;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease;
}

.add-task-btn:hover,
.add-task-btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--phase-main), white 8%);
  color: var(--text);
  background: color-mix(in srgb, var(--phase-main), transparent 91%);
  opacity: 1;
}

.remove-task-btn {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
  line-height: 1;
  opacity: 0.35;
  cursor: pointer;
  transition: opacity 140ms ease, color 140ms ease, background 140ms ease;
}

.remove-task-btn:hover,
.remove-task-btn:focus-visible {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  opacity: 1;
  outline: none;
}

.calendar-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.58;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease;
}

.calendar-btn:hover,
.calendar-btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--phase-main), white 8%);
  background: color-mix(in srgb, var(--phase-main), transparent 91%);
  opacity: 1;
}

.calendar-btn span {
  width: 11px;
  height: 11px;
  display: block;
  border: 1.4px solid currentColor;
  border-top-width: 3px;
  border-radius: 2px;
}

.date-popover {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 50;
  width: 280px;
  display: none;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--phase-main), white 18%);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.44);
}

.date-popover.is-open {
  display: grid;
}

.task-creator-popover {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 50;
  width: 300px;
  display: none;
  gap: 10px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--phase-main), white 18%);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.99);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

.task-creator-popover.is-open {
  display: grid;
}

.task-creator-popover > strong {
  font-size: 13px;
}

.task-creator-popover label {
  display: grid;
  gap: 5px;
}

.task-creator-popover label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.task-creator-popover input[type="text"] {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  outline: none;
}

.task-creator-popover input[type="text"]:focus {
  border-color: var(--phase-main);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--phase-main), transparent 78%);
}

.range-calendar {
  display: grid;
  gap: 8px;
}

.range-calendar-head {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  text-align: center;
}

.range-calendar-head strong {
  font-size: 12px;
  text-transform: uppercase;
}

.range-calendar-nav {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.range-calendar-nav:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.range-calendar-weekdays,
.range-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.range-calendar-weekdays span {
  padding: 3px 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.range-calendar-day,
.range-calendar-empty {
  aspect-ratio: 1;
}

.range-calendar-day {
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.range-calendar-day:hover {
  background: rgba(255, 255, 255, 0.09);
}

.range-calendar-day.is-between {
  color: var(--phase-text);
  background: color-mix(in srgb, var(--phase-main), transparent 68%);
}

.range-calendar-day.is-start,
.range-calendar-day.is-end {
  border-radius: 50%;
  color: var(--phase-text);
  background: var(--phase-main);
  font-weight: 800;
}

.range-calendar-summary {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
}

.date-popover-actions {
  display: flex;
  justify-content: flex-end;
}

.date-popover-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.gantt-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.035);
}

.gantt-cell.is-month-start {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.gantt-bar {
  grid-row: 1;
  align-self: center;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--phase-main), white 24%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--phase-alt), var(--phase-main));
  box-shadow: 0 0 22px color-mix(in srgb, var(--phase-main), transparent 82%);
  cursor: pointer;
}

.gantt-bar.is-inferred {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.gantt-bar.is-done {
  background: linear-gradient(90deg, color-mix(in srgb, var(--phase-alt), transparent 44%), rgba(255, 255, 255, 0.28));
  opacity: 0.68;
}

body[data-view="deliverables"] .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body[data-view="deliverables"] .summary-panel {
  display: none;
}

.deliverables-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.deliverables-content {
  height: calc(100% - 104px);
  padding: 8px 28px 48px;
  overflow: auto;
}

.deliverables-head-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.deliverables-owner-filter .owner-selector-popover {
  right: 0;
  left: auto;
}

.deliverables-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.deliverables-mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.deliverables-mode button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.deliverables-mode button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.deliverables-week {
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.week-heading {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.week-heading strong {
  font-size: 15px;
}

.week-heading > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.week-chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.deliverables-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.58);
}

.deliverables-week.is-collapsed .deliverables-table-wrap {
  display: none;
}

.deliverables-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.deliverables-table th,
.deliverables-table td {
  height: 42px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.deliverables-table th:last-child,
.deliverables-table td:last-child {
  border-right: 0;
}

.deliverables-table tbody tr:last-child td {
  border-bottom: 0;
}

.deliverables-table th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deliverables-table th:nth-child(1) { width: 28%; }
.deliverables-table th:nth-child(2) { width: 30%; }
.deliverables-table th:nth-child(3) { width: 16%; }
.deliverables-table th:nth-child(4),
.deliverables-table th:nth-child(5) { width: 8%; }
.deliverables-table th:nth-child(6) { width: 10%; }

.deliverables-table td {
  color: var(--copy);
  font-size: 12px;
}

.deliverables-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.028);
}

.deliverable-name {
  color: var(--text) !important;
}

.deliverable-name-inner {
  display: flex;
  align-items: center;
  min-width: 0;
}

.deliverable-title-wrap {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.deliverable-title-wrap small,
.deliverable-title-wrap strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deliverable-title-wrap small {
  color: color-mix(in srgb, var(--phase-main), white 24%);
  font-size: 9px;
  font-weight: 750;
}

.deliverable-name strong {
  font-weight: 600;
}

.deliverable-color {
  display: inline-block;
  width: 3px;
  height: 18px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--phase-main);
  vertical-align: middle;
}

.deliverable-stage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deliverable-date {
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.deliverable-status {
  min-width: 82px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 5px;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  font-size: 11px;
  cursor: pointer;
}

.deliverable-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.deliverable-status.is-done {
  border-color: rgba(45, 212, 191, 0.22);
  color: var(--accent-light);
  background: rgba(45, 212, 191, 0.09);
}

.deliverables-table tr.is-done .deliverable-name strong {
  color: var(--muted);
  text-decoration: line-through;
}

.front-progress {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.front-progress span strong {
  color: var(--text);
  font-weight: 700;
}

.front-progress > div {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.front-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--phase-main);
}

.gantt-marker {
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--phase-main);
  background: #061211;
  box-shadow: 0 0 18px color-mix(in srgb, var(--phase-main), transparent 62%);
  cursor: pointer;
}

.gantt-marker.is-inferred {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px;
  }

  .view-tabs,
  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .workspace {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    grid-template-columns: 1fr;
  }

  .summary-panel {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .phase-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .flow-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .deliverables-head-actions {
    width: 100%;
    justify-items: start;
  }

  .deliverables-toolbar {
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .flow-panel,
  .gantt-panel,
  .deliverables-panel {
    width: 100%;
    min-height: 70vh;
    overflow: visible;
  }

  .columns-wrap {
    min-height: 520px;
  }

  .gantt-head-actions {
    justify-items: start;
    width: 100%;
  }

  .gantt-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #ownerFilterPopover {
    right: auto;
    left: 0;
  }

  .zoom-controls {
    max-width: 100%;
    overflow-x: auto;
  }

  .breadcrumb {
    max-width: 100%;
    text-align: left;
  }

  .gantt-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  body[data-view="gantt"] .summary-panel {
    display: none;
  }

  .phase-list {
    grid-template-columns: 1fr;
  }

  .gantt-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .breadcrumb {
    white-space: normal;
  }

  .gantt-grid {
    --label-width: 300px;
  }

  .deliverables-content {
    height: auto;
    padding: 4px 14px 36px;
  }

  .flow-head {
    padding: 20px 18px 14px;
  }

  .flow-head h1 {
    font-size: 28px;
  }

  .columns-wrap {
    padding: 20px 18px 32px;
  }
}
