/* ===================================================================
 * GESTÃO DO PROJETO — Frente 3, Fase 2A
 * -------------------------------------------------------------------
 * Estilos novos que complementam as regras .pm-* existentes.
 * Cole este bloco no FINAL do app.css, sem tocar em nada acima.
 * Não sobrescreve nenhuma regra existente — só adiciona classes .gp-*.
 * ================================================================== */

/* ---------- Página ---------- */

.gp-page-shell {
  gap: 1.25rem;
}

.gp-hero-card {
  /* herda .pm-hero-card */
}

.gp-kpi-grid {
  /* herda .pm-kpi-grid */
}

/* ---------- Filtros ---------- */

.gp-filter-card {
  /* herda .pm-filter-card */
}

.gp-filter-grid {
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(180px, 1fr);
}

@media (max-width: 980px) {
  .gp-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Board (lista de projetos) ---------- */

.gp-board {
  /* herda .pm-stage-board */
}

.gp-board-head {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1.2fr) minmax(140px, 1fr) 110px 110px 110px minmax(180px, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #6b7280);
  background: var(--surface-muted, #f3f4f6);
  border-bottom: 1px solid var(--border-soft, #e5e7eb);
}

.gp-board-rows {
  display: flex;
  flex-direction: column;
}

.gp-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1.2fr) minmax(140px, 1fr) 110px 110px 110px minmax(180px, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft, #e5e7eb);
  transition: background-color 0.15s ease;
  align-items: center;
}

.gp-row:hover {
  background: var(--surface-hover, #f9fafb);
}

.gp-row.selected {
  background: var(--accent-soft, #ecfdf5);
  border-left: 3px solid var(--accent-strong, #14b8a6);
  padding-left: calc(1rem - 3px);
}

.gp-row.late {
  border-left: 3px solid var(--danger-strong, #ef4444);
  padding-left: calc(1rem - 3px);
}

.gp-row.selected.late {
  border-left: 3px solid var(--danger-strong, #ef4444);
}

@media (max-width: 980px) {
  .gp-board-head { display: none; }
  .gp-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem;
  }
}

.gp-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.gp-count {
  font-size: 0.72rem;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  background: var(--surface-muted, #f3f4f6);
  color: var(--text-default, #374151);
  white-space: nowrap;
}

.gp-late-text {
  color: var(--danger-strong, #b91c1c);
  font-weight: 600;
}

.gp-empty-panel {
  padding: 1.5rem;
}

/* ---------- Detalhe ---------- */

.gp-detail-card {
  background: var(--surface-default, #ffffff);
  border: 1px solid var(--border-soft, #e5e7eb);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gp-detail-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft, #e5e7eb);
}

.gp-detail-header-main h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.2rem;
  color: var(--text-default, #111827);
}

.gp-detail-client {
  color: var(--text-muted, #6b7280);
  font-weight: 500;
  font-size: 0.95rem;
}

.gp-detail-header-main p {
  margin: 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
}

.gp-detail-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gp-detail-header-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 120px;
}

.gp-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #6b7280);
}

.gp-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---------- Sub-tabs ---------- */

.gp-sub-tabs {
  /* herda .pm-tabs, adicionando contagens */
}

.gp-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.gp-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-muted, #e5e7eb);
  color: var(--text-default, #374151);
}

.gp-sub-tab.active .gp-tab-count {
  background: var(--accent-soft, #ccfbf1);
  color: var(--accent-strong, #0f766e);
}

/* ---------- Conteúdo das sub-abas ---------- */

.gp-tab-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gp-tab-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gp-pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: var(--surface-muted, #f3f4f6);
  padding: 0.25rem;
  border-radius: 999px;
}

.gp-pill {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: all 0.12s ease;
}

.gp-pill:hover {
  color: var(--text-default, #111827);
}

.gp-pill.active {
  background: var(--surface-default, #ffffff);
  color: var(--accent-strong, #0f766e);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---------- Badges de tipo de item de cronograma ---------- */

.gp-tipo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.gp-tipo-marco {
  background: #dbeafe;
  color: #1e40af;
}

.gp-tipo-funcao {
  background: #fef3c7;
  color: #92400e;
}

.gp-tipo-pre {
  background: #ede9fe;
  color: #5b21b6;
}

/* ---------- Badges de origem ---------- */

.gp-origem-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.gp-origem-diagnostico {
  background: var(--surface-muted, #f3f4f6);
  color: var(--text-muted, #6b7280);
}

.gp-origem-execucao {
  background: #ecfeff;
  color: #155e75;
  border: 1px dashed #67e8f9;
}

/* ---------- Conteúdo das tabelas dentro das sub-abas ---------- */

.gp-item-name {
  font-weight: 500;
  color: var(--text-default, #111827);
}

.gp-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.15rem;
}

.gp-jira-key {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.gp-secondary-chip {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--surface-muted, #f3f4f6);
  color: var(--text-default, #374151);
}

.gp-nivel-alto,
.gp-nivel-altissimo,
.gp-nivel-critico {
  background: #fee2e2;
  color: #b91c1c;
}

.gp-nivel_medio,
.gp-nivel-medio {
  background: #fef3c7;
  color: #92400e;
}

.gp-nivel_baixo,
.gp-nivel-baixo {
  background: #dcfce7;
  color: #166534;
}

.gp-empty-inline-row {
  background: transparent;
  padding: 1.25rem;
}

/* ---------- Abas de seção (nível 1: Visão geral | Detalhes | Histórico) ---------- */

.gp-section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid #e2e8f0;
  margin: 0 0 0;
}
.gp-section-tab {
  padding: 12px 20px;
  font-size: 14px;
  color: #64748b;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s;
}
.gp-section-tab.active {
  color: #0f172a;
  font-weight: 500;
  border-bottom: 2px solid #1D9E75;
}
.gp-section-tab:hover:not(.active) { color: #334155; }
.gp-section-content { }

/* ---------- Visão geral ---------- */

.gp-visao-geral { padding: 20px 0 0; }

.gp-health-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.gp-health-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.gp-health-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.gp-health-desc  { font-size: 12px; color: #475569; line-height: 1.5; }

.gp-vg-two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.gp-chart-card {
  background: #f8fafc;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  overflow: hidden;
}

.gp-vg-divider {
  border: none;
  border-top: 0.5px solid #e2e8f0;
  margin: 20px 0 16px;
}
.gp-vg-subtabs-label {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.gp-vg-subpanel { margin-top: 8px; }

/* ---------- Barras comparativas ---------- */

.gp-comparativo-section { margin-bottom: 4px; }
.gp-progress-row {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.gp-progress-label { font-size: 12px; color: #64748b; text-align: right; }
.gp-progress-track { background: #f1f5f9; border-radius: 6px; height: 10px; overflow: hidden; }
.gp-progress-fill  { height: 100%; border-radius: 6px; transition: width .4s ease; }
.gp-progress-pct   { font-size: 13px; font-weight: 500; }

/* ---------- Painel analítico ---------- */

.gp-analysis-panel { display: flex; flex-direction: column; gap: 10px; }
.gp-analysis-card {
  background: #f8fafc;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}
.gp-analysis-card-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.gp-analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  font-size: 12px;
}
.gp-analysis-row:last-child { margin-bottom: 0; }
.gp-analysis-key { color: #475569; }
.gp-analysis-val { font-weight: 500; color: #0f172a; text-align: right; margin-left: 8px; }

@media (max-width: 900px) {
  .gp-vg-two-col { grid-template-columns: 1fr; }
  .gp-progress-row { grid-template-columns: 110px 1fr 42px; }
}

/* ---------- Sub-aba: Gestão de Horas ---------- */

/* Cards de resumo de horas — colapsa para 2 colunas em telas médias */
@media (max-width: 900px) {
  .gp-horas-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 500px) {
  .gp-horas-cards {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- FIM Gestão do Projeto ---------- */
