/* Pipeline critical — flat suite style (survives stale CSS deploys) */
body.pipeline-page footer { position: static !important; }
main.pipeline-main { max-width:1400px; margin:0 auto; padding:8px 16px 48px !important; box-sizing:border-box; width:100%; }
body.pipeline-page { padding-top:0 !important; margin-top:0 !important; background:#f8fafc; color:#0f172a; }

.pipeline-stats-strip {
  display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1.25rem;
  padding:.55rem .85rem; margin-bottom:.65rem; background:#fff;
  border:1px solid #e2e8f0; border-radius:10px; font-size:13px; color:#64748b;
}
.pipeline-stats-strip strong { color:#0f172a; font-weight:800; }
.pipeline-stats-strip .stats-cta { margin-left:auto; font-weight:700; color:#0a66c2; text-decoration:none; font-size:12.5px; }

.pipeline-container {
  display:flex !important; flex-direction:column !important; gap:1rem !important;
  padding:.85rem 1rem 1.15rem !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:.55rem; min-width:0; }
.toolbar-title-row { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
.toolbar-title-row h2 { margin:0; font-size:1.15rem; font-weight:800; color:#0f172a; letter-spacing:-.02em; line-height:1.25; }
.results-badge {
  font-size:11px; font-weight:700; padding:.3rem .65rem; border-radius:999px;
  background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; white-space:nowrap;
}

.filter-bar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.45rem .55rem; min-width:0; }
.filter-field { display:flex; flex-direction:column; gap:.2rem; min-width:0; }
.filter-field > span { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.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:.4rem .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:.3rem; margin-left:auto; }
.btn-tool {
  font:inherit; font-size:12px; font-weight:700; padding:.4rem .6rem; border-radius:8px;
  border:1px solid #cbd5e1; background:#fff; color:#334155; cursor:pointer; min-height:34px; text-decoration:none;
}
.btn-tool:hover { border-color:#94a3b8; color:#0f172a; background:#f8fafc; }
.btn-tool.is-on, .view-btn.is-on { background:#0f172a; color:#fff; border-color:#0f172a; }
.zoom-label { font-size:11px; font-weight:700; color:#94a3b8; min-width:2.5rem; }

.phase-filter-row {
  display:flex; flex-wrap:wrap; align-items:center; gap:.45rem .55rem;
  padding:.15rem 0 .15rem; margin:0;
}
.phase-filter-label {
  font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  color:#64748b; white-space:nowrap; min-width:3.2rem;
}
.phase-chip-bar { display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; }
button.phase-chip-btn, .phase-chip-btn {
  font:inherit; font-size:12px; font-weight:700; padding:.32rem .65rem; border-radius:8px;
  border:1px solid #e2e8f0; background:#fff !important; color:#334155 !important; cursor:pointer; line-height:1.25;
}
button.phase-chip-btn:hover, .phase-chip-btn:hover {
  border-color:#94a3b8; background:#f8fafc !important; color:#0f172a !important;
}
button.phase-chip-btn.active, .phase-chip-btn.active {
  background:#0f172a !important; color:#fff !important; border-color:#0f172a !important;
}
.phase-chip-count {
  display:inline-block; margin-left:.25rem; font-size:10px; font-weight:800;
  min-width:1rem; padding:0 .22rem; border-radius:999px; background:rgba(15,23,42,.08); color:inherit; line-height:1.35;
}
.phase-chip-btn.active .phase-chip-count { background:rgba(255,255,255,.2); }

.gantt-bar.phase-seg.phase-seg-muted { opacity:.28; filter:saturate(.35); }
.gantt-bar.phase-seg.phase-seg-focus { box-shadow:inset 0 0 0 1px rgba(15,23,42,.35); }

.pipeline-empty-phase {
  margin:0; padding:1.25rem 1rem; text-align:center; color:#475569; font-size:13px; font-weight:600;
  background:#f8fafc; border:1px dashed #cbd5e1; border-radius:10px;
}
.pipeline-empty-phase button { font:inherit; font-weight:800; color:#0a66c2; background:none; border:none; cursor:pointer; text-decoration:underline; }

.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,.9); transition:opacity .25s ease, visibility .25s ease;
}
.pipeline-loader.is-hidden { opacity:0; visibility:hidden; pointer-events:none; }
.pipeline-loader-ring {
  width:36px; height:36px; border-radius:50%;
  border:3px solid #e2e8f0; border-top-color:#0f172a;
  animation:pipeline-spin .75s linear infinite;
  background:none; -webkit-mask:none; mask:none;
}
.pipeline-loader-text { margin:0; font-size:13px; font-weight:600; color:#64748b; }
@keyframes pipeline-spin { to { transform:rotate(360deg); } }
.pipeline-container.is-loading { opacity:.35; pointer-events:none; }

.gantt-label-item.guest-locked, .gantt-row.guest-locked, .gantt-bar-container.guest-locked, .pipeline-row.guest-locked {
  filter:blur(4px); opacity:.55; user-select:none; pointer-events:none;
}

.pipeline-guest-gate-inner {
  text-align:center; padding:1.1rem 1rem; border-radius:10px;
  border:1px solid #e2e8f0; background:#f8fafc;
}
.pipeline-guest-gate-inner strong { display:block; font-size:1rem; color:#0f172a; margin-bottom:.35rem; }
.pipeline-guest-gate-inner p { margin:0 0 .9rem; font-size:13.5px; color:#475569; line-height:1.45; }
.pipeline-guest-gate-actions { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; }
.btn-gate { display:inline-flex; align-items:center; justify-content:center; padding:.55rem 1rem; border-radius:8px; font-size:13px; font-weight:700; text-decoration:none; line-height:1.2; }
.btn-gate.primary { background:#0a66c2; color:#fff; border:1px solid #0a66c2; }
.btn-gate.secondary { background:#fff; color:#0f172a; border:1px solid #cbd5e1; }

.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)); }
.pipeline-gantt-gate[hidden] { display:none !important; }

.pipeline-reality-banner {
  display:flex; flex-wrap:wrap; align-items:center; gap:.65rem 1rem;
  margin:0 0 .75rem; padding:.65rem .85rem; border-radius:10px;
  border:1px solid #e2e8f0; background:#fff;
  font-size:13px; color:#64748b; line-height:1.4;
}
.pipeline-reality-banner .reality-copy { margin:0; flex:1 1 220px; }
.pipeline-reality-banner strong { color:#0f172a; }
.pipeline-reality-banner .reality-actions { display:flex; flex-wrap:wrap; gap:.35rem; margin-left:auto; align-items:center; }
.pipeline-reality-banner button, .pipeline-reality-banner a.reality-btn {
  font:inherit; font-size:12px; font-weight:700; padding:.35rem .7rem; border-radius:999px;
  border:1px solid #cbd5e1; background:#fff; color:#334155; cursor:pointer; text-decoration:none;
}
.pipeline-reality-banner button.is-on, .pipeline-reality-banner a.reality-btn.is-on {
  background:#0f172a; color:#fff; border-color:#0f172a;
}
.pipeline-reality-banner button.real-on { background:#0a66c2; border-color:#0a66c2; color:#fff; }

.badge-real, .badge-sample {
  display:inline-flex; align-items:center; padding:2px 7px; border-radius:999px;
  font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  vertical-align:middle; margin-left:6px;
}
.badge-real { background:#f8fafc; color:#334155; border:1px solid #cbd5e1; }
.badge-sample { background:#f1f5f9; color:#64748b; border:1px solid #e2e8f0; }

.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.pipeline-product-strip a:hover { border-color:#0a66c2 !important; box-shadow:0 4px 12px rgba(10,102,194,.08); }

/* List + timeline sections */
.pipeline-list-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:.5rem; margin:0 0 .55rem; }
.pipeline-list-head h3 { margin:0; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:#64748b; }
.pipeline-list-hint { margin:0; font-size:12px; color:#94a3b8; }
.pipeline-table-wrap { overflow:auto; border:1px solid #e2e8f0; border-radius:10px; }
.pipeline-table { width:100%; border-collapse:collapse; font-size:13px; min-width:720px; }
.pipeline-table th, .pipeline-table td {
  text-align:left; padding:10px 12px; border-bottom:1px solid #eef2f7; vertical-align:middle;
}
.pipeline-table th {
  font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:#64748b;
  background:#f8fafc; font-weight:800; position:sticky; top:0; z-index:1;
}
.pipeline-table tr:last-child td { border-bottom:0; }
.pipeline-row:hover td { background:#f8fafc; }
.pipe-row-name { display:flex; flex-wrap:wrap; align-items:center; gap:4px; font-weight:700; color:#0f172a; }
.pipe-row-name a { color:#0f172a; text-decoration:none; }
.pipe-row-name a:hover { color:#0a66c2; text-decoration:underline; }
.pipe-row-meta { font-size:12px; color:#64748b; font-weight:500; margin-top:2px; }
.pipe-status { text-transform:capitalize; }
.pipe-progress { display:flex; align-items:center; gap:8px; min-width:110px; }
.pipe-progress-bar { flex:1; height:6px; background:#e2e8f0; border-radius:99px; overflow:hidden; }
.pipe-progress-bar i { display:block; height:100%; background:#0a66c2; border-radius:99px; }
.pipe-progress span { font-size:12px; font-weight:700; color:#64748b; min-width:2.5rem; }
.pipe-actions { white-space:nowrap; }
.pipeline-guest-gate-row td { padding:12px; background:#fff; }

.pipeline-legend { display:flex; flex-wrap:wrap; gap:12px 16px; margin-top:.75rem; font-size:12px; color:#64748b; }
.legend-item { display:flex; align-items:center; gap:6px; }
.legend-color { width:12px; height:8px; border-radius:2px; background:#94a3b8; }
.legend-color.status-planning { background:#cbd5e1; }
.legend-color.status-active { background:#0a66c2; }
.legend-color.status-completed { background:#64748b; }
.legend-color.status-on-hold { background:#94a3b8; }

/* View modes */
html[data-pipeline-view="list"] .pipeline-timeline-section { display:none !important; }
html[data-pipeline-view="timeline"] .pipeline-list-section { display:none !important; }

@media (max-width:720px) {
  .phase-filter-row { align-items:flex-start; }
  .filter-field select, .filter-field input { max-width:none; }
  .filter-actions { margin-left:0; width:100%; }
}
