/* 상세 페이지 — 메인 ref-hub 테마 색상 (타이포·구조는 quarter-board/detail 클래스 유지) */

.detail-page-shell {
  /* 메인 dummy-board / ref-hub 테마와 동일 팔레트 (타이포·구조는 유지) */
  --detail-ref-hub: #4a90d9;
  --detail-ref-hub-dark: #2563ab;
  --detail-ref-hub-border: #3578c4;
  --detail-ref-hub-soft: #f5faff;
  --detail-ref-title: #1e3a5f;

  --detail-header-bg: var(--app-header-bg);
  --detail-header-border: var(--app-header-border);
  --detail-page-bg: #f2f5f9;
  --detail-aside-bg: #ffffff;
  --detail-panel-bg: #ffffff;
  --detail-zone-border: var(--detail-border);
  --detail-card-bg: #ffffff;
  --detail-text-title: var(--detail-ref-title);
  --detail-text-body: var(--detail-ref-title);
  --detail-text-secondary: var(--detail-ref-hub-dark);
  --detail-text-muted: #64748b;
  --detail-accent: var(--detail-ref-hub);
  --detail-border: #e8edf2;

  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
  background: var(--detail-page-bg);
  color: var(--detail-text-title);
}

/* ─── 상단바 (메인 dashboard-header-bar 와 동일) ─── */
.detail-page-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: visible;
  height: 48px;
  min-height: 48px;
  padding: 0 22px 0 20px;
  background: var(--detail-header-bg);
  border-bottom: 1px solid var(--detail-header-border);
  box-shadow: var(--app-header-shadow);
  color: #fff;
}

.detail-page-header__title {
  position: relative;
  z-index: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #bad8ca;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  text-shadow:
    -1px -1px 1px rgba(0, 0, 0, 0.25),
    1px -1px 1px rgba(0, 0, 0, 0.25),
    -1px 1px 1px rgba(0, 0, 0, 0.25),
    1px 1px 1px rgba(0, 0, 0, 0.25);
}

.detail-page-header__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.detail-page-header__meta-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.detail-page-header__meta-value {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.detail-page-header__divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.25);
}

.detail-page-header__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* 상시업무 상세 — 헤더 탭 (detail-page-header · dashboard 톤) */
.detail-page-header--routine {
  gap: 16px;
}

.detail-page-header__tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-page-header__tabs::-webkit-scrollbar {
  display: none;
}

.detail-page-header__tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.detail-page-header__tab::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.detail-page-header__tab:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.detail-page-header__tab.is-active {
  border-color: rgba(255, 255, 255, 0.35);
  background: #fff;
  color: var(--detail-ref-title);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.detail-page-header__tab.is-active::before {
  background: var(--detail-ref-hub-dark);
}

.detail-page-header__tab:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* ─── 본문 타이포 (quarter-board project-field · board-project-title) ─── */
.detail-section-label {
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--detail-ref-hub);
  color: var(--detail-text-title);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.detail-section-label-sub {
  color: var(--detail-accent);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.detail-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--detail-border);
  flex-shrink: 0;
}

.detail-body-title {
  margin: 0;
  color: var(--detail-text-title);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.detail-body-text {
  margin: 0;
  color: var(--detail-text-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.1px;
}

/** 업무내용·피드백 본문 */
.detail-body-content {
  margin: 0;
  color: var(--detail-text-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.1px;
}

.detail-body-muted {
  color: var(--detail-text-muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0.9;
}

.milestone-content-block__label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--detail-text-secondary);
}

.milestone-content-period {
  position: relative;
  flex-shrink: 0;
  max-width: 52%;
}

.milestone-content-period__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--detail-accent);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1.35;
  cursor: default;
  white-space: nowrap;
}

.milestone-content-period__btn:not(:disabled) {
  cursor: pointer;
}

.milestone-content-period__btn:not(:disabled):hover,
.milestone-content-period__btn.is-open {
  background: rgba(74, 144, 217, 0.1);
}

.milestone-content-period__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.milestone-content-period__chev {
  flex-shrink: 0;
  opacity: 0.85;
}

.milestone-content-period__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 148px;
  max-width: 240px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--detail-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 35, 52, 0.12);
}

.milestone-content-period__option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--detail-text-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.milestone-content-period__option:hover {
  background: rgba(74, 144, 217, 0.08);
}

.milestone-content-period__option.is-active {
  color: var(--detail-accent);
  background: rgba(74, 144, 217, 0.12);
}

.detail-body-caption {
  color: var(--detail-text-secondary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.1px;
  opacity: 1;
}

.detail-aside {
  background: var(--detail-aside-bg);
  border-right: 1px solid var(--detail-border);
}

.detail-aside > section {
  background: transparent;
  border-bottom-color: var(--detail-border);
}

.detail-main-panel {
  background: var(--detail-panel-bg);
  border-left: 1px solid var(--detail-border);
}

.detail-page-shell > .grid {
  background: var(--detail-page-bg);
}

/* 프로젝트 상세 — 업무 일정 3단계 고정 노출, 업무내용 위로 */
.detail-aside--project {
  --detail-stage-card-h: 80px;
  --detail-stage-gap: 8px;
  --detail-stage-list-extra: 6px; /* 3번째 카드 하단선·ring 여유 */
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 0.85fr);
}

.detail-aside--project > section:first-child,
.detail-aside--project > section:nth-child(3) {
  padding-block: 8px;
}

.detail-aside--project > section:nth-child(2) {
  padding-bottom: 10px;
}

.detail-aside--project > section:nth-child(3) {
  margin-top: 4px;
}

.detail-aside--project > section:first-child .detail-body-text {
  flex: 0 0 auto;
}

.detail-overview {
  position: relative;
  width: 100%;
  min-width: 0;
}

.detail-overview--has-detail .detail-overview__text {
  padding-right: 26px;
}

.detail-overview__text {
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.detail-overview-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    margin-top 0.28s ease;
}

.detail-overview-detail.is-expanded {
  max-height: min(42vh, 280px);
  opacity: 1;
  margin-top: 6px;
  overflow-y: auto;
}

.detail-overview-detail__text {
  margin: 0;
  padding-top: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--detail-text-body, #1e293b);
  font-size: var(--detail-body-size, 20px);
  line-height: 1.45;
}

.detail-overview__text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}

.detail-overview.is-expanded .detail-overview__text {
  max-height: min(42vh, 280px);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-overview__more {
  position: absolute;
  top: 2px;
  right: 0;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--detail-card-bg, #fff);
  color: var(--detail-text-secondary);
  cursor: pointer;
  opacity: 0.72;
  transition:
    opacity 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.detail-overview__more:hover {
  opacity: 1;
  color: var(--detail-ref-hub-dark);
  background: rgba(74, 144, 217, 0.1);
}

.detail-overview__chevrons {
  display: block;
  transition: transform 0.15s ease;
}

.detail-overview__chevrons.is-up {
  transform: rotate(180deg);
}

.detail-aside--project .detail-stage-list {
  height: calc(
    var(--detail-stage-card-h) * 3 + var(--detail-stage-gap) * 2 + var(--detail-stage-list-extra)
  );
  padding-bottom: 4px;
  box-sizing: border-box;
  overflow-y: auto;
  flex-shrink: 0;
}

.detail-aside--project .detail-stage-card {
  min-height: var(--detail-stage-card-h);
  box-sizing: border-box;
}

.detail-panel-footer-title {
  color: var(--detail-text-title);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.35;
}

.detail-panel-footer-sub {
  color: var(--detail-accent);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.detail-stage-card {
  border-color: var(--detail-border);
  background: #fff;
}

.detail-stage-card.is-selected {
  border-color: var(--detail-ref-hub);
  background: var(--detail-ref-hub-soft);
}

.detail-stage-card.is-selected .detail-body-title {
  color: var(--detail-ref-title);
}

.detail-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--detail-ref-hub-border);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--detail-ref-hub) 0%, var(--detail-ref-hub-dark) 100%);
  color: #e8f2fc;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 99, 171, 0.28);
  transition: all 0.2s ease;
}

.detail-add-btn:hover {
  color: #fff;
  border-color: #5a9ee8;
  background: linear-gradient(180deg, #5a9ee8 0%, var(--detail-ref-hub-border) 100%);
}

.detail-add-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ─── 업무별 타임라인 (간트) — 대시보드 타이포 기준 ─── */
.milestone-timeline {
  /* 타이포: 최소 18 / 내용 20 / 강조 24 */
  --mt-font-min: 18px;
  --mt-font-min-weight: 500;
  --mt-font-content: 20px;
  --mt-font-content-weight: 500;
  --mt-font-title: 24px;
  --mt-font-title-weight: 600;

  --mt-row-height: 38px;
  --mt-bar-height: 28px;
  --mt-tick-height: 26px;
  --mt-row-gap: 6px;
  --mt-visible-rows: 4;
  --mt-chart-height: calc(
    var(--mt-visible-rows) * var(--mt-row-height)
    + (var(--mt-visible-rows) - 1) * var(--mt-row-gap)
    + 14px
  );
  --mt-footer-height: calc(
    38px + 8px + var(--mt-tick-height) + 4px + var(--mt-chart-height) + 26px
  );

  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: var(--mt-footer-height);
  min-height: var(--mt-footer-height);
  max-height: var(--mt-footer-height);
  padding: 12px 20px 14px;
  border-top: 1px solid var(--detail-border);
  background: #fff;
  overflow: hidden;
}

.milestone-timeline__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.milestone-timeline__title {
  color: var(--detail-text-title);
  font-size: var(--mt-font-title);
  font-weight: var(--mt-font-title-weight);
  letter-spacing: -0.2px;
  line-height: 1.35;
}

.milestone-timeline__subtitle {
  color: var(--detail-accent);
  font-size: var(--mt-font-content);
  font-weight: var(--mt-font-content-weight);
  letter-spacing: -0.1px;
  max-width: 45%;
}

.milestone-timeline__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--detail-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--detail-text-muted);
  font-size: var(--mt-font-content);
  font-weight: var(--mt-font-content-weight);
  line-height: 1.45;
  opacity: 0.72;
  text-align: center;
}

.milestone-timeline__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  position: relative;
}

.milestone-timeline__ticks {
  position: relative;
  flex-shrink: 0;
  height: var(--mt-tick-height);
  margin: 0 4px;
}

.milestone-timeline__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--detail-text-body);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  letter-spacing: -0.2px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.85;
}

.milestone-timeline__tick-label {
  line-height: 1;
}

.milestone-timeline__tick.is-today {
  opacity: 1;
}

.milestone-timeline__tick.is-today .milestone-timeline__tick-label {
  color: var(--detail-ref-hub-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--detail-ref-hub);
  text-underline-offset: 2px;
  text-decoration-thickness: 2px;
}

.milestone-timeline__chart {
  position: relative;
  flex: none;
  height: var(--mt-chart-height);
  min-height: var(--mt-chart-height);
  max-height: var(--mt-chart-height);
  overflow: hidden auto;
  margin: 0 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--detail-border);
  isolation: isolate;
}

.milestone-timeline__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.milestone-timeline__grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(74, 144, 217, 0.08);
}

.milestone-timeline__rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--mt-row-gap);
  padding: 6px 0;
}

.milestone-timeline__row {
  position: relative;
  height: var(--mt-row-height);
  flex-shrink: 0;
}

.milestone-timeline__bar {
  position: absolute;
  top: 50%;
  height: var(--mt-bar-height);
  transform: translateY(-50%);
  padding: 0;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  transition:
    width 0.2s ease,
    left 0.2s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
  opacity: 0.92;
}

.milestone-timeline__bar.is-gantt {
  overflow: visible;
}

.milestone-timeline__bar.is-expanded {
  z-index: 5;
  overflow: visible;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(74, 144, 217, 0.28);
}

.milestone-timeline__bar.is-expanded .milestone-timeline__bar-track,
.milestone-timeline__bar.is-expanded .milestone-timeline__bar-fill {
  border-radius: 999px;
}

.milestone-timeline__measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  letter-spacing: -0.1px;
}

.milestone-timeline__bar:hover {
  opacity: 1;
  z-index: 4;
}

.milestone-timeline__bar.is-selected {
  z-index: 2;
  opacity: 1;
  box-shadow: 0 0 0 2px var(--detail-ref-hub), 0 2px 8px rgba(74, 144, 217, 0.35);
}

.milestone-timeline__bar-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(74, 144, 217, 0.18);
}

.milestone-timeline__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--detail-ref-hub-dark) 0%, var(--detail-ref-hub) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: width 0.2s ease;
}

.milestone-timeline__bar-label-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.milestone-timeline__bar-label {
  position: absolute;
  inset: 0;
  padding: 0 10px;
  overflow: hidden;
  min-width: 0;
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  line-height: var(--mt-bar-height);
  letter-spacing: -0.1px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.milestone-timeline__bar-label--fill {
  color: #fff;
}

.milestone-timeline__bar-label--track {
  color: var(--detail-ref-title);
}

.milestone-timeline__bar.is-selected .milestone-timeline__bar-label {
  font-weight: 600;
}

.milestone-timeline__bar.is-selected .milestone-timeline__bar-label--track {
  color: var(--detail-ref-hub-dark);
}

.milestone-timeline__bar.is-expanded .milestone-timeline__bar-label {
  overflow: visible;
  text-overflow: clip;
}

/* ─── 타임라인 보기 전환 ─── */
.milestone-timeline__view-toggle {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--detail-border);
}

.milestone-timeline__view-toggle button {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--detail-text-muted);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  cursor: pointer;
  white-space: nowrap;
}

.milestone-timeline__view-toggle button.is-active {
  background: var(--detail-ref-hub);
  color: #fff;
  font-weight: 600;
}

.detail-panel--gantt {
  min-height: 0;
}

.detail-page-grid--portfolio {
  grid-template-columns: 1fr;
}

.detail-panel--portfolio {
  min-height: 0;
}

.detail-panel--gantt .milestone-timeline--gantt,
.detail-panel--portfolio .milestone-timeline--portfolio {
  flex: 1;
  min-height: 0;
  max-height: none;
  height: auto;
  --mt-visible-rows: max(4, var(--mt-row-count, 4));
}

.milestone-timeline--gantt .milestone-timeline__gantt-layout,
.milestone-timeline--portfolio .milestone-timeline__gantt-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(200px, 32%) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.milestone-timeline--gantt .milestone-timeline__row-labels,
.milestone-timeline--portfolio .milestone-timeline__row-labels {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--detail-border);
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

.milestone-timeline--gantt .milestone-timeline__row-labels-head,
.milestone-timeline--portfolio .milestone-timeline__row-labels-head {
  flex-shrink: 0;
  height: var(--mt-tick-height);
  margin-bottom: 4px;
  padding: 0 10px;
  color: var(--detail-text-muted);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  letter-spacing: 0.02em;
  line-height: var(--mt-tick-height);
}

.milestone-timeline--gantt .milestone-timeline__row-labels-body,
.milestone-timeline--portfolio .milestone-timeline__row-labels-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--mt-row-gap);
  padding: 6px 0;
}

.milestone-timeline--gantt .milestone-timeline__row-label,
.milestone-timeline--portfolio .milestone-timeline__row-label {
  height: var(--mt-row-height);
  flex-shrink: 0;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: var(--detail-text-title);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  text-align: left;
  line-height: var(--mt-row-height);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.milestone-timeline--gantt .milestone-timeline__row-label.is-selected,
.milestone-timeline--portfolio .milestone-timeline__row-label.is-selected {
  color: var(--detail-ref-hub-dark);
  background: rgba(74, 144, 217, 0.1);
  font-weight: 600;
}

.milestone-timeline--portfolio .milestone-timeline__portfolio-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.milestone-timeline--portfolio .milestone-timeline__portfolio-head {
  display: grid;
  grid-template-columns: minmax(200px, 32%) minmax(0, 1fr);
  gap: 0;
  flex-shrink: 0;
  align-items: end;
}

.milestone-timeline--portfolio .milestone-timeline__portfolio-chart-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.milestone-timeline--portfolio .milestone-timeline__body--ticks-only {
  position: relative;
  height: var(--mt-tick-height);
  margin: 0 4px;
}

.milestone-timeline--portfolio .milestone-timeline__viewport-range {
  padding: 0 8px 2px;
  color: var(--detail-text-muted);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  text-align: right;
}

.milestone-timeline__viewport-range {
  padding: 0 8px 2px;
  color: var(--detail-text-muted);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  text-align: right;
}

.milestone-timeline--portfolio .milestone-timeline__portfolio-scroll {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(200px, 32%) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.milestone-timeline--portfolio .milestone-timeline__group-label {
  height: var(--mt-row-height);
  flex-shrink: 0;
  padding: 0 10px;
  color: var(--detail-text-title);
  font-size: var(--mt-font-content);
  font-weight: 600;
  line-height: var(--mt-row-height);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(74, 144, 217, 0.06);
  border-bottom: 1px solid rgba(74, 144, 217, 0.1);
}

.milestone-timeline--portfolio .milestone-timeline__row-label--child {
  padding-left: 24px;
  font-weight: var(--mt-font-min-weight);
  font-size: var(--mt-font-min);
}

.milestone-timeline--portfolio .milestone-timeline__row--group {
  background: transparent;
  pointer-events: none;
}

.milestone-timeline__chart-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 0;
}

.milestone-timeline__focus-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.milestone-timeline__chart--pannable {
  cursor: grab;
  user-select: none;
}

.milestone-timeline__chart--pannable.is-panning {
  cursor: grabbing;
}

.milestone-timeline__pan-hint,
.milestone-timeline--portfolio .milestone-timeline__portfolio-hint {
  flex-shrink: 0;
  margin: 0;
  padding: 0 4px 2px;
  color: var(--detail-text-muted);
  font-size: var(--mt-font-min);
  font-weight: var(--mt-font-min-weight);
  text-align: right;
  opacity: 0.85;
}

.milestone-timeline--portfolio .milestone-timeline__grid--rows {
  inset: 0;
  z-index: 0;
}

.milestone-timeline--portfolio .milestone-timeline__row-label.is-other-task,
.milestone-timeline--portfolio .milestone-timeline__row.is-other-task .milestone-timeline__bar {
  opacity: 0.72;
}

.milestone-timeline--portfolio .milestone-timeline__row-labels-body {
  border-right: 1px solid var(--detail-border);
  background: rgba(255, 255, 255, 0.55);
}

.milestone-timeline--gantt .milestone-timeline__body,
.milestone-timeline--portfolio .milestone-timeline__body {
  min-width: 0;
}

.milestone-timeline--gantt .milestone-timeline__chart,
.milestone-timeline--portfolio .milestone-timeline__chart {
  flex: 1;
  min-height: calc(var(--mt-visible-rows) * var(--mt-row-height) + (var(--mt-visible-rows) - 1) * var(--mt-row-gap) + 14px);
  max-height: none;
  height: auto;
}

.milestone-timeline__today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--detail-ref-hub);
  box-shadow: 0 0 6px rgba(74, 144, 217, 0.35);
  z-index: 2;
  pointer-events: none;
}

.milestone-timeline__bar-progress {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--detail-ref-hub-dark);
  border: 1px solid rgba(74, 144, 217, 0.25);
  font-size: var(--mt-font-min);
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;
}
