/* Grade do Cronograma do Projeto (12 semanas) -- compartilhada entre a
   página própria (cronograma.html) e a miniatura dentro do Cockpit de
   Status Report (status-report.html). Markup gerado por
   assets/js/cronograma-shared.js (renderCronogramaGrid) -- mantenha as
   classes abaixo em sincronia com esse arquivo. Prefixo cr-. */

.cr-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.cr-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-row__label {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.cr-row__title {
  font-size: 0.92rem;
  color: var(--grey-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-row__sub {
  font-size: 0.62rem;
  color: var(--grey-500);
}

.cr-row__track {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cr-cell {
  flex: 1;
  height: 20px;
  min-width: 0;
  border-radius: 3px;
  background: var(--grey-100);
  box-sizing: border-box;
}

.cr-cell--head {
  height: auto;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 0.6rem;
  color: var(--grey-500);
}

.cr-cell--now-head {
  color: var(--peers-blue);
}

.cr-cell--now {
  box-shadow: 0 0 0 2px var(--peers-lime) inset;
}

.cr-now-tag {
  height: auto;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--peers-blue);
  background: var(--peers-lime) !important;
  border-radius: var(--radius-full);
  padding: 1px 4px;
  white-space: nowrap;
}

.cr-row--header {
  padding: 3px 0;
  border-top: 1px solid var(--grey-200);
  margin-top: 3px;
}

.cr-row--header .cr-row__title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--peers-blue);
  white-space: normal;
}

.cr-row--header .cr-cell {
  height: 24px;
}

/* Modo compacto (miniatura nos 4Ps): só as linhas de frente/marco, sem
   atividade individual -- ainda mais enxuto. */
.cr-grid--compact .cr-row__label {
  width: 320px;
}

.cr-grid--compact .cr-row__title {
  font-size: 0.86rem;
}

.cr-grid--compact .cr-cell {
  height: 18px;
}

.cr-grid--compact .cr-row--header .cr-cell {
  height: 20px;
}

/* Cabeçalho de semanas travado no topo ao rolar (usado quando um
   ancestral limita a altura e cria scroll -- ver .sr-timeline-strip em
   status-report.css; na página própria do cronograma, sem esse limite de
   altura, position:sticky não tem efeito visível). O fundo branco
   (--peers-white) cobre as linhas que passam por baixo ao rolar -- ambos
   os contextos (cronograma.html e a miniatura) usam fundo branco atrás
   do grid. */
.cr-row--weekhead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--peers-white);
}

.cr-row--nowmarker {
  margin-bottom: 2px;
  position: sticky;
  top: 22px;
  z-index: 2;
  background: var(--peers-white);
}

@media (max-width: 860px) {
  .cr-row__label {
    width: 220px;
  }

  .cr-row__sub {
    display: none;
  }
}
