/* ============================================================
   Pipeline page layout — compact card + sticky phase bar
   ============================================================ */

/* Kill legacy fixed-footer rules that still appear in old CSS copies */
body.pipeline-page footer,
.pipeline-main ~ footer,
footer.site-footer {
  position: static !important;
}
body.pipeline-page main,
main.pipeline-main {
  padding-bottom: 3rem !important;
}

/* ---------- Radial loader ---------- */
.pipeline-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.pipeline-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pipeline-loader-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #0891b2 0deg, #06b6d4 90deg, #a5f3fc 180deg, transparent 270deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  animation: pipeline-spin 0.85s linear infinite;
}
.pipeline-loader-text {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0e7490;
  letter-spacing: 0.02em;
}
@keyframes pipeline-spin {
  to { transform: rotate(360deg); }
}
.pipeline-container.is-loading {
  opacity: 0.35;
  pointer-events: none;
  filter: saturate(0.85);
}

/* ---------- Guest teaser: blur locked rows/cards ---------- */
.gantt-label-item.guest-locked,
.gantt-row.guest-locked,
.gantt-bar-container.guest-locked,
.project-card.guest-locked {
  filter: blur(5px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}
.gantt-label-item.guest-locked a,
.gantt-row.guest-locked a,
.project-card.guest-locked a {
  pointer-events: none;
  cursor: default;
}
.project-card.guest-locked {
  position: relative;
  overflow: hidden;
}
.project-card .guest-lock-badge {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  filter: none;
  pointer-events: auto;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0e7490;
  background: linear-gradient(transparent, rgba(255,255,255,0.95) 35%);
  padding: 1.75rem 0.75rem 0.65rem;
}
.pipeline-guest-gate {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0.25rem;
}
.pipeline-guest-gate-inner,
.pipeline-gantt-gate .pipeline-guest-gate-inner {
  text-align: center;
  padding: 1.25rem 1.1rem;
  border-radius: 12px;
  border: 1px solid #a5f3fc;
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 55%, #fff 100%);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.1);
}
.pipeline-guest-gate-inner strong {
  display: block;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.35rem;
}
.pipeline-guest-gate-inner p {
  margin: 0 0 0.9rem;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
}
.pipeline-guest-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.btn-gate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.btn-gate.primary {
  background: #0891b2;
  color: #fff;
  border: 1px solid #0891b2;
}
.btn-gate.primary:hover { background: #0e7490; }
.btn-gate.secondary {
  background: #fff;
  color: #0e7490;
  border: 1px solid #67e8f9;
}
.btn-gate.secondary:hover { border-color: #0891b2; color: #0891b2; }

/* Overlay CTA on Gantt when guest has locked rows */
.gantt-container {
  position: relative;
}
.pipeline-gantt-gate {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 30;
  width: min(420px, calc(100% - 2rem));
  pointer-events: auto;
}
.pipeline-gantt-gate[hidden] {
  display: none !important;
}
body.pipeline-guest .gantt-wrapper {
  /* keep scroll but soft-mask the locked area feel */
  position: relative;
}

/* Phase filter — sticky under shared site header; centered */
.phase-filter-sticky {
  position: sticky;
  top: 60px;
  z-index: 95;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  text-align: center;
}
.phase-filter-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}
.phase-filter-sticky .phase-chip-bar {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: center;
}

/* Compact pipeline chrome — Project pipeline card */
.pipeline-main {
  max-width: 1400px;
  margin: 0.75rem auto 2rem;
  padding: 0 1rem 3rem;
  box-sizing: border-box;
  width: 100%;
}
.pipeline-stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  color: #475569;
  box-sizing: border-box;
}
.pipeline-stats-strip strong { color: #0f172a; font-weight: 800; }
.pipeline-stats-strip .stats-cta {
  margin-left: auto;
  font-weight: 700;
  color: #0891b2;
  text-decoration: none;
  font-size: 12.5px;
}
.pipeline-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  padding: 0.85rem 1rem 1rem !important;
  background: #fff !important;
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.pipeline-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.toolbar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.toolbar-title-row h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.results-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  white-space: nowrap;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.55rem;
  min-width: 0;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.filter-field > span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.filter-field select,
.filter-field input {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fff;
  min-height: 34px;
  max-width: 140px;
  box-sizing: border-box;
}
.filter-field.filter-search {
  flex: 1 1 160px;
  min-width: 140px;
}
.filter-field.filter-search input {
  max-width: none;
  width: 100%;
  min-width: 140px;
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}
.btn-tool {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  min-height: 34px;
  box-sizing: border-box;
}
.btn-tool:hover {
  border-color: #0891b2;
  color: #0891b2;
}
.zoom-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  min-width: 2.5rem;
}
.phase-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}
/*
 * Phase filter chips — high contrast (WCAG-friendly).
 * Important: override phases.css .phase-* { background } which otherwise
 * paints solid Gantt colours onto these buttons and kills readability.
 */
button.phase-chip-btn,
.phase-chip-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  cursor: pointer;
  line-height: 1.25;
  box-sizing: border-box;
  text-shadow: none;
}
button.phase-chip-btn:hover,
.phase-chip-btn:hover {
  border-color: #0f172a;
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
button.phase-chip-btn:focus-visible,
.phase-chip-btn:focus-visible {
  outline: 3px solid #0891b2;
  outline-offset: 2px;
}

/* Inactive: light tint + dark text (readable) + colour border cue */
button.phase-chip-btn.phase-procurement,
.phase-chip-btn.phase-procurement {
  background: #ecfdf5 !important;
  border-color: #059669;
  color: #064e3b !important;
}
button.phase-chip-btn.phase-design,
.phase-chip-btn.phase-design {
  background: #ecfeff !important;
  border-color: #0891b2;
  color: #164e63 !important;
}
button.phase-chip-btn.phase-construction,
.phase-chip-btn.phase-construction {
  background: #e0f2fe !important;
  border-color: #0369a1;
  color: #0c4a6e !important;
}
button.phase-chip-btn.phase-testing,
.phase-chip-btn.phase-testing {
  background: #f0fdfa !important;
  border-color: #0f766e;
  color: #134e4a !important;
}
button.phase-chip-btn.phase-operation,
.phase-chip-btn.phase-operation {
  background: #f1f5f9 !important;
  border-color: #475569;
  color: #1e293b !important;
}

/* Active: darker solid fill + white text for AA contrast */
button.phase-chip-btn.active,
.phase-chip-btn.active {
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
button.phase-chip-btn[data-phase="all"].active,
.phase-chip-btn[data-phase="all"].active {
  background: #1e3a5f !important;
  border-color: #0f172a !important;
}
button.phase-chip-btn.phase-procurement.active,
.phase-chip-btn.phase-procurement.active {
  background: #047857 !important;
}
button.phase-chip-btn.phase-design.active,
.phase-chip-btn.phase-design.active {
  background: #0e7490 !important;
}
button.phase-chip-btn.phase-construction.active,
.phase-chip-btn.phase-construction.active {
  background: #0369a1 !important;
}
button.phase-chip-btn.phase-testing.active,
.phase-chip-btn.phase-testing.active {
  background: #0f766e !important;
}
button.phase-chip-btn.phase-operation.active,
.phase-chip-btn.phase-operation.active {
  background: #334155 !important;
}

@media (max-width: 720px) {
  .phase-filter-sticky {
    padding: 0.55rem 0.85rem;
    top: 0;
    flex-direction: column;
    gap: 0.4rem;
  }
  .phase-filter-label {
    width: 100%;
    text-align: center;
  }
  .pipeline-main {
    padding: 0 0.75rem 2rem;
  }
  .filter-field select,
  .filter-field input {
    max-width: none;
  }
  .filter-actions {
    margin-left: 0;
    width: 100%;
  }
}

    /* legacy colour helpers kept for bars */
    .phase-procurement { background: #10b981; }
    .phase-design { background: #06b6d4; }
    .phase-construction { background: #0891b2; }
    .phase-testing { background: #0d9488; }
    .phase-operation { background: #94a3b8; }

    .pipeline-header h2 {
      font-size: 24px;
      font-weight: 700;
      color: #1e3a5f;
      margin: 0;
    }
    .pipeline-filters {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .filter-btn {
      padding: 8px 16px;
      border: 1px solid #e5e7eb;
      background: #faf9f7;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      color: #1e3a5f;
      transition: all 0.2s;
    }
    .filter-btn:hover,
    .filter-btn.active {
      background: #1e3a5f;
      color: #fff;
      border-color: #1e3a5f;
    }
    .gantt-container {
      position: relative;
    }
    .gantt-nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 40px;
      height: 40px;
      border: none;
      background: #1e3a5f;
      color: #fff;
      border-radius: 4px;
      cursor: pointer;
      font-size: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      z-index: 20;
    }
    .gantt-nav-btn:hover {
      background: #0891b2;
      transform: translateY(-50%) scale(1.1);
    }
    .gantt-nav-btn.left {
      left: 10px;
    }
    .gantt-nav-btn.right {
      right: 10px;
    }
    .gantt-nav-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .gantt-wrapper {
      overflow-x: hidden;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      background: #faf9f7;
      width: 100%;
    }
    .gantt-chart {
      display: flex;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      width: 100%;
    }
    .gantt-labels {
      flex: 0 0 220px;
      border-right: 1px solid #e5e7eb;
      background: #fff;
      display: flex;
      flex-direction: column;
      min-width: 220px;
      max-width: 220px;
    }
    .gantt-labels-header {
      flex: 0 0 auto;
      border-bottom: 1px solid #e5e7eb;
      background: #faf9f7;
    }
    .gantt-labels-header-year {
      padding: 6px;
      font-size: 11px;
      font-weight: 700;
      color: #1e3a5f;
      height: 30px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #e5e7eb;
    }
    .gantt-labels-header-months {
      padding: 6px;
      font-size: 11px;
      color: #999;
      height: 30px;
      display: flex;
      align-items: center;
    }
    .gantt-labels-items {
      flex: 1;
      overflow-y: auto;
    }
    .gantt-label-item {
      padding: 12px;
      border-bottom: 1px solid #e5e7eb;
      font-size: 13px;
      font-weight: 600;
      color: #1e3a5f;
      height: 80px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      overflow: hidden;
    }
    .gantt-label-item a {
      color: #0891b2;
      text-decoration: none;
      transition: all 0.2s;
      cursor: pointer;
      font-weight: 600;
      margin-bottom: 4px;
    }
    .gantt-label-item a:hover {
      color: #06b6d4;
      text-decoration: underline;
    }
    .gantt-label-entity {
      font-size: 11px;
      color: #666;
      font-weight: 500;
      opacity: 0.8;
    }
    .gantt-timeline {
      flex: 1;
      position: relative;
      min-height: 400px;
    }
    .gantt-header {
      display: flex;
      flex-direction: column;
      border-bottom: 1px solid #e5e7eb;
      background: #fff;
      position: sticky;
      top: 0;
      z-index: 10;
    }
    #ganttBars {
      display: flex;
      flex-direction: column;
      width: 100%;
      min-height: 300px;
    }
    .gantt-year-row {
      display: flex;
      border-bottom: 1px solid #e5e7eb;
    }
    .gantt-year {
      flex: 1;
      padding: 8px;
      font-size: 12px;
      font-weight: 700;
      color: #1e3a5f;
      border-right: 1px solid #e5e7eb;
      text-align: center;
      background: #faf9f7;
    }
    .gantt-month-row {
      display: flex;
    }
    .gantt-month {
      flex: 1;
      min-width: 45px;
      max-width: 55px;
      padding: 6px 2px;
      font-size: 11px;
      font-weight: 600;
      color: #666;
      border-right: 1px solid #e5e7eb;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .gantt-row {
      display: flex;
      border-bottom: 1px solid #e5e7eb;
      position: relative;
      height: 80px;
      min-width: 100%;
    }
    .gantt-cell {
      flex: 1;
      min-width: 45px;
      max-width: 55px;
      border-right: 1px solid #e5e7eb;
      position: relative;
      background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect fill="%23f0f0f0" width="1" height="1"/></svg>');
    }
    .gantt-bar-container {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      height: 32px;
      display: flex;
      align-items: center;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.2s;
      overflow: hidden;
      margin: 0;
      padding: 0;
      z-index: 5;
    }
    .gantt-bar-container:hover {
      box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
      transform: translateY(-50%) scale(1.02);
      z-index: 6;
    }
    .gantt-bar-container.filtered-out {
      opacity: 0.3;
    }
    .gantt-bar-container.filtered-out .gantt-bar {
      border: 2px dashed currentColor;
      background: transparent !important;
    }
    .gantt-bar.past-activity {
      border: 2px dashed currentColor !important;
      background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
      ) !important;
    }
    .gantt-label-item.filtered-out {
      opacity: 0.4;
    }
    #ganttBars {
      position: relative;
    }
    .gantt-current-month-line {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 3px;
      background: linear-gradient(to bottom, #ec4899, #db2777);
      opacity: 0.9;
      z-index: 12;
      box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
      pointer-events: none;
      transform: translateX(-50%);
    }
    .gantt-current-month-label {
      position: absolute;
      top: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #be185d;
      white-space: nowrap;
      background: #fff;
      padding: 3px 8px;
      border-radius: 999px;
      border: 1px solid #ec4899;
      z-index: 13;
      pointer-events: none;
      transform: translateX(-50%);
      box-shadow: 0 2px 8px rgba(190, 24, 93, 0.15);
    }
    .gantt-bar {
      position: relative;
      height: 100%;
      border-radius: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 10px;
      font-weight: 600;
      padding: 0 4px;
      width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      border: none;
      cursor: pointer;
      font-family: inherit;
      line-height: 1.1;
      transition: filter 0.15s ease, box-shadow 0.15s ease;
    }
    button.gantt-bar.phase-seg:hover,
    button.gantt-bar.phase-seg:focus-visible {
      filter: brightness(1.08);
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
      z-index: 2;
      outline: none;
    }
    .gantt-bar-label {
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      pointer-events: none;
    }
    /* Phase colours (match legend) — override status-only colours on segments */
    .gantt-bar.phase-procurement { background: #10b981 !important; }
    .gantt-bar.phase-design { background: #06b6d4 !important; }
    .gantt-bar.phase-construction { background: #0891b2 !important; }
    .gantt-bar.phase-testing { background: #0d9488 !important; }
    .gantt-bar.phase-operation { background: #94a3b8 !important; }
    .gantt-bar.phase-seg.past-activity {
      opacity: 0.75;
    }

    /* Phase detail modal */
    .phase-detail-modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 2000;
    }
    .phase-detail-modal.open { display: block; }
    .phase-detail-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.55);
    }
    .phase-detail-panel {
      position: relative;
      z-index: 1;
      max-width: 720px;
      width: calc(100% - 2rem);
      max-height: min(88vh, 900px);
      overflow: auto;
      margin: 5vh auto;
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
      padding: 1.5rem 1.5rem 1.25rem;
    }
    .phase-detail-close {
      position: absolute;
      top: 0.75rem;
      right: 0.85rem;
      border: none;
      background: #f1f5f9;
      color: #334155;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }
    .phase-detail-close:hover { background: #e2e8f0; }
    .phase-detail-kicker {
      margin: 0 0 0.35rem;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #64748b;
    }
    .phase-detail-header h3 {
      margin: 0 0 0.75rem;
      color: #0f172a;
      font-size: 1.35rem;
      padding-right: 2rem;
    }
    .phase-detail-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-bottom: 1rem;
    }
    .phase-badge {
      display: inline-flex;
      align-items: center;
      padding: 0.25rem 0.65rem;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      text-transform: capitalize;
      color: #fff;
      background: #0891b2;
    }
    .phase-badge.phase-procurement { background: #10b981; }
    .phase-badge.phase-design { background: #06b6d4; }
    .phase-badge.phase-construction { background: #0891b2; }
    .phase-badge.phase-testing { background: #0d9488; }
    .phase-badge.phase-operation { background: #64748b; }
    .phase-badge.status { background: #1e3a5f; }
    .phase-badge.muted { background: #e2e8f0; color: #0f172a; }
    .phase-detail-meta {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 0.5rem 1rem;
      padding: 0.85rem 1rem;
      background: #f8fafc;
      border-radius: 10px;
      font-size: 13px;
      color: #334155;
      margin-bottom: 1.1rem;
    }
    .phase-detail-columns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }
    @media (max-width: 700px) {
      .phase-detail-columns { grid-template-columns: 1fr; }
    }
    .phase-detail-columns section {
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      padding: 0.85rem 1rem;
    }
    .phase-detail-columns h4 {
      margin: 0 0 0.55rem;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: #1e3a5f;
    }
    .phase-detail-columns ul {
      margin: 0;
      padding-left: 1.1rem;
      color: #334155;
      font-size: 13.5px;
      line-height: 1.45;
    }
    .phase-detail-columns li { margin-bottom: 0.35rem; }
    .phase-detail-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem;
      margin-top: 1.25rem;
      align-items: center;
    }
    .phase-detail-primary {
      display: inline-flex;
      align-items: center;
      padding: 0.7rem 1.1rem;
      background: #0891b2;
      color: #fff !important;
      text-decoration: none;
      border-radius: 8px;
      font-weight: 600;
      font-size: 14px;
    }
    .phase-detail-primary:hover { background: #0e7490; }
    .phase-detail-secondary {
      border: 1px solid #cbd5e1;
      background: #fff;
      color: #334155;
      border-radius: 8px;
      padding: 0.65rem 1rem;
      font-weight: 600;
      cursor: pointer;
      font-size: 14px;
    }
    a.gantt-bar.phase-seg {
      box-sizing: border-box;
    }
    .gantt-project-link {
      color: #0891b2;
      font-weight: 600;
      text-decoration: none;
    }
    .gantt-project-link:hover {
      text-decoration: underline;
    }
    .card-phase-btn {
      border: none;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 600;
      color: #fff;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
    }
    .card-phase-btn.phase-procurement { background: #10b981; }
    .card-phase-btn.phase-design { background: #06b6d4; }
    .card-phase-btn.phase-construction { background: #0891b2; }
    .card-phase-btn.phase-testing { background: #0d9488; }
    .card-phase-btn.phase-operation { background: #94a3b8; }
    .project-card-title-link { text-decoration: none; cursor: pointer; }
    .status-planning {
      background: #94a3b8;
    }
    .status-active {
      background: #0891b2;
    }
    .status-completed {
      background: #2ed573;
    }
    .status-on-hold {
      background: #f59e0b;
    }
    .pipeline-legend {
      display: flex;
      gap: 2rem;
      flex-wrap: wrap;
      padding: 1rem 0;
      border-top: 1px solid #e5e7eb;
      margin-top: 1rem;
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
    }
    .legend-color {
      width: 16px;
      height: 16px;
      border-radius: 3px;
    }
    .project-details {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1rem;
      margin-top: 2rem;
    }
    .project-card {
      background: #faf9f7;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 1rem;
    }
    .project-card h4 {
      margin: 0 0 0.5rem 0;
      font-size: 14px;
      font-weight: 700;
      color: #1e3a5f;
    }
    .project-info {
      font-size: 12px;
      color: #666;
      line-height: 1.6;
    }
    .progress-bar {
      width: 100%;
      height: 6px;
      background: #e5e7eb;
      border-radius: 3px;
      overflow: hidden;
      margin-top: 0.5rem;
    }
    .progress-fill {
      height: 100%;
      background: #0891b2;
      border-radius: 3px;
    }
    .timeline-toggle {
      display: flex;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .timeline-btn {
      padding: 10px 20px;
      border: 2px solid #e5e7eb;
      background: #fff;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      color: #1e3a5f;
      transition: all 0.2s;
    }
    .timeline-btn.active {
      background: #1e3a5f;
      color: #fff;
      border-color: #1e3a5f;
    }
    .timeline-btn:hover {
      border-color: #1e3a5f;
    }
    .profile-section {
      background: linear-gradient(135deg, #1e3a5f 0%, #2d4a70 100%);
      color: #fff;
      padding: 2rem;
      border-radius: 12px;
      margin-bottom: 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 2rem;
    }
    .profile-content h2 {
      color: #fff;
      margin-bottom: 0.5rem;
      font-size: 24px;
    }
    .profile-content p {
      color: rgba(255, 255, 255, 0.9);
      margin-bottom: 1rem;
      font-size: 14px;
      line-height: 1.6;
    }
    .apply-button {
      padding: 12px 32px;
      background: #0891b2;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }
    .apply-button:hover {
      background: #06b6d4;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
    }
    .project-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 1rem;
      margin-bottom: 2rem;
    }
    .stat-box {
      background: #faf9f7;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 1rem;
      text-align: center;
    }
    .stat-number {
      font-size: 28px;
      font-weight: 700;
      color: #0891b2;
      margin-bottom: 0.25rem;
    }
    .stat-label {
      font-size: 12px;
      color: #666;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 600;
    }
    @media (max-width: 768px) {
      .pipeline-container {
        padding: 1rem;
      }
      .gantt-labels {
        flex: 0 0 120px;
      }
      .gantt-label-item {
        padding: 8px;
        font-size: 11px;
        height: 60px;
      }
      .gantt-row {
        height: 60px;
      }
      .gantt-month {
        font-size: 10px;
        padding: 4px;
      }
      .pipeline-legend {
        gap: 1rem;
      }
      .project-details {
        grid-template-columns: 1fr;
      }
      .profile-section {
        flex-direction: column;
        text-align: center;
      }
      .apply-button {
        width: 100%;
      }
    }
    .country-selector {
      position: relative;
      display: inline-block;
    }
    .country-selector-btn {
      background: none;
      border: 1px solid #e5e7eb;
      padding: 8px 12px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      color: #1e3a5f;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .country-selector-btn:hover {
      border-color: #0891b2;
      background: #f0f9ff;
    }
    .country-selector-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      min-width: 200px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      z-index: 1000;
      display: none;
      margin-top: 8px;
    }
    .country-selector-dropdown.active {
      display: block;
    }
    .country-option {
      padding: 10px 16px;
      cursor: pointer;
      transition: background 0.2s;
      border-bottom: 1px solid #f0f0f0;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .country-option:last-child {
      border-bottom: none;
    }
    .country-option:hover {
      background: #f0f9ff;
      color: #0891b2;
    }
    .country-option.active {
      background: #f0f9ff;
      color: #0891b2;
      font-weight: 600;
    }
    .header-left {
      display: flex;
      align-items: center;
      gap: 2rem;
    }
