body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  margin: 0;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.topbar {
  background: #111;
  color: #fff;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar nav a {
  color: #fff;
  margin-right: 16px;
  text-decoration: none;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  text-align: left;
}
button {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  cursor: pointer;
}
button:hover {
  background: #eef2ff;
}
button.danger {
  background: #fee2e2;
  border-color: #fecaca;
}
label {
  display: block;
  margin-bottom: 8px;
}
input,
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}
.muted {
  color: #6b7280;
}
.flashwrap {
  margin: 8px 0;
}
.flash.ok {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  padding: 8px;
  border-radius: 8px;
}
.flash.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 8px;
  border-radius: 8px;
}
.pillwrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.pill.active {
  background: #dbeafe;
  border-color: #bfdbfe;
}
.metrics {
  display: flex;
  gap: 24px;
  padding-top: 8px;
}

/* Drag & drop + timeline */
.grab {
  cursor: move;
  opacity: 0.7;
  font-size: 18px;
}
tr.dragging {
  opacity: 0.5;
}

.timeline {
  display: flex;
  width: 100%;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  margin: 8px 0 6px;
}
.timeline .seg {
  height: 100%;
}
.timeline .seg.step {
  background: #93c5fd;
} /* blue */
.timeline .seg.pause {
  background: #fca5a5;
} /* red */
.timeline .seg.milestone {
  background: #a7f3d0;
} /* green */

.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
.legend .chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: -2px;
}
.legend .chip.step {
  background: #93c5fd;
}
.legend .chip.pause {
  background: #fca5a5;
}
.legend .chip.milestone {
  background: #a7f3d0;
}
/* Drag & drop + timeline + print helpers */
.grab {
  cursor: move;
  opacity: 0.7;
  font-size: 18px;
}
tr.dragging {
  opacity: 0.5;
}

.timeline {
  display: flex;
  width: 100%;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  margin: 8px 0 6px;
}
.timeline .seg {
  height: 100%;
}
.timeline .seg.step {
  background: #93c5fd;
} /* blue */
.timeline .seg.pause {
  background: #fca5a5;
} /* red */
.timeline .seg.milestone {
  background: #a7f3d0;
} /* teal */

.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
.legend .chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: -2px;
}
.legend .chip.step {
  background: #93c5fd;
}
.legend .chip.pause {
  background: #fca5a5;
}
.legend .chip.milestone {
  background: #a7f3d0;
}

@media print {
  .topbar,
  .noprint,
  a[href]:after {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

.chartCard {
  padding: 12px;
  height: 260px;
} /* ~200px canvas + padding/title */
.chartCard canvas {
  width: 100% !important;
  height: 100% !important;
}

@media print {
  @page {
    size: Letter;
    margin: 10mm;
  }
}

/* Charts layout + spacing */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px; /* horizontal gap */
  row-gap: 32px; /* vertical gap — make this bigger for more space */
  align-items: stretch;
}

/* optional quick margin utilities */
.mt-24 {
  margin-top: 24px;
}
.mt-32 {
  margin-top: 32px;
}
.mb-24 {
  margin-bottom: 24px;
}

.col-1 {
  grid-column: 1 / 2;
} /* force into left column */
.mt-16 {
  margin-top: 16px;
}
.mb-16 {
  margin-bottom: 16px;
}

/* Ensure chart cards reserve height so nothing overlaps */
.chartCard {
  padding: 8px 12px 12px;
  height: 300px;
}
.chartCard canvas {
  width: 100% !important;
  height: 100% !important;
}
.chartCard h4 {
  margin: 0 0 8px;
  line-height: 1.2;
} /* remove big top margin */

.col-2 {
  grid-column: 2 / 3;
} /* place a card in the right column */

.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #444;

  display: flex;
  justify-content: space-between; /* default layout */
  align-items: center;
}

.app-footer .center {
  margin: 0 auto; /* pushes it to center */
  text-align: center;
}
canvas {
  max-height: 180px;
  width: 100%;
}

/* highlight the active running step row */
tr.active-step {
  background-color: #7eff05; /* light blue */
}

button.active-btn {
  background-color: #0d6efd; /* bootstrap primary */
  color: #fff;
}

/* highlight for active step row */
.active-step {
  background-color: #f31010;
  transition: background-color 0.3s ease;
}

/* 🔹 Apply to both sequential and concurrent buttons */
#seqSteps button.active-btn,
#concurrentTable button.active-btn {
  background-color: #66d14b !important;
  color: #fff !important;
  border-color: #ff00d4 !important;
  transition: background-color 0.3s ease;
}

/* 🔹 (Optional) Highlight full row if row.classList.add('active-btn') */
#concurrentTable tr.active-btn td {
  background-color: hsl(202, 100%, 84%) !important;
  color: #fff !important;
}

/* Make navbar text white */
.navbar-dark .navbar-nav .nav-link {
  color: #ffffff !important; /* force white text */
}

/* Optional: brighter on hover */
.navbar-dark .navbar-nav .nav-link:hover {
  color: #f8f9fa !important;
}

/* Make the active link stand out (optional) */
.navbar-dark .navbar-nav .nav-link.active {
  color: #0d6efd !important; /* Bootstrap blue */
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Final Report / Title Page === */
.title-page {
  padding-top: 3in;
  page-break-after: always;
}
.title-page h1,
.title-page h4 {
  font-weight: 600;
}
.executive-teaser {
  max-width: 70%;
  margin: 0 auto;
  font-style: italic;
}
.pagebreak {
  page-break-before: always;
}
.confidential-footer {
  margin-top: 1in;
  border-top: 1px solid #ccc;
  padding-top: 0.2in;
  font-size: 0.9rem;
  color: #555;
}
@media print {
  @page {
    size: Letter;
    margin: 15mm;
  }
  .pagebreak {
    page-break-before: always;
  }
  .title-page {
    page-break-after: always;
  }
}

.final-report .title-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.final-report .logo-block img {
  max-width: 2in;
  height: auto;
}

.pagebreak {
  page-break-before: always;
}

.confidential-footer {
  margin-top: 1rem;
  border-top: 1px solid #ccc;
  padding-top: 0.5rem;
}

.title-page h1 {
  font-size: 28pt;
  font-weight: bold;
}

.title-page h4 {
  font-size: 16pt;
  color: #555;
}

.title-page table {
  margin: 1rem auto;
  font-size: 10pt;
}

.accordion-body,
.accordion-collapse.show {
  overflow: visible !important; /* ✅ allows charts to expand fully */
}
