/* Pipeline Console styles — ported from _pipeline_prototype.html, p-prefixed to match
   app.js viewPipeline() emitted classes. Colors inlined (NO :root vars) so this cannot
   clobber the dashboard shell palette. Shared classes (.btn .btn-primary .ghost .pill
   .dot .topbar .spacer .footer-note .mono .panel .data .section-title) stay in styles.css. */

/* ── connection bar ───────────────────────────────────────────── */
.pipe-conn{background:#fff;border:1px solid #e6e9f0;border-radius:12px;padding:14px 18px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:22px}
.pipe-field label{font-size:11px;font-weight:600;color:#9ca3af;display:block;margin-bottom:2px}
.pipe-conn input{font-family:ui-monospace,'JetBrains Mono',Menlo,monospace;font-size:12px;border:1px solid #e6e9f0;border-radius:7px;padding:7px 10px;background:#fafbfd;color:#111827}
.pipe-conn input:focus{outline:2px solid #eef1ff;border-color:#3b5bfd}
#pipe-bearer{width:240px}
.pipe-complaint{width:220px}
.pipe-sid{font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#9ca3af}
.pipe-btn{white-space:nowrap}

/* ── two-column layout: rail + stage ──────────────────────────── */
.pipe-wrap{display:grid;grid-template-columns:300px 1fr;gap:26px;align-items:start;margin-top:4px}
.pipe-rail{position:sticky;top:16px;display:flex;flex-direction:column}
.pipe-main{min-width:0}

/* ── rail nodes (was .stage) ──────────────────────────────────── */
.pnode{display:flex;align-items:flex-start;gap:0;width:100%;background:none;border:none;cursor:pointer;text-align:left;padding:0 8px 0 0;font-family:inherit}
.pline{width:44px;flex:0 0 44px;display:flex;flex-direction:column;align-items:center;align-self:stretch}
.pdot{width:22px;height:22px;border-radius:50%;border:2px solid #e6e9f0;background:#fff;display:grid;place-items:center;font-size:9px;font-weight:700;color:#9ca3af;font-family:ui-monospace,Menlo,monospace;z-index:1}
.pwire{width:2px;flex:1;background:#e6e9f0;min-height:10px}
.pwire.par{background:repeating-linear-gradient(#e6e9f0 0 4px,transparent 4px 8px)}
.pbody{padding:2px 0 14px;flex:1}
.pnode .pt{display:block;font-size:13px;font-weight:600;color:#4b5563}
.pnode .ps{display:block;font-size:11px;color:#9ca3af}
.ppar{display:inline-block;font-size:9px;font-weight:700;letter-spacing:.06em;color:#6d28d9;background:#f1ebfd;border-radius:4px;padding:1px 5px;margin-left:4px;vertical-align:1px}
.pnode:hover .pt{color:#111827}
.pnode.active .pdot{border-color:#3b5bfd;background:#3b5bfd;color:#fff}
.pnode.active .pt{color:#3b5bfd}

/* ── stage head (was .stage-head) ─────────────────────────────── */
.pipe-head{margin-bottom:18px}
.peyebrow{font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#3b5bfd;font-weight:600;letter-spacing:.06em}
.pipe-head h2{font-size:24px;font-weight:800;letter-spacing:-.02em;margin:2px 0 4px}
.pipe-head p{color:#4b5563;max-width:760px}

/* ── flow map (was .flow-map / .toggle-map) ───────────────────── */
.pipe-mapbtn{font-size:12px;color:#3b5bfd;background:none;border:none;cursor:pointer;font-weight:600;margin-bottom:10px}
.pipe-map{background:#fff;border:1px solid #e6e9f0;border-radius:12px;padding:16px 18px;margin-bottom:18px;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:#4b5563;overflow-x:auto;white-space:pre;display:none}
.pipe-map.show{display:block}

/* ── endpoint card (was .ep) ──────────────────────────────────── */
.pep{background:#fff;border:1px solid #e6e9f0;border-radius:12px;margin-bottom:16px;overflow:hidden}
.pep-head{display:flex;align-items:center;gap:10px;padding:14px 18px;cursor:pointer;user-select:none}
.pep-head:hover{background:#fafbfd}
.pchev{color:#9ca3af;transition:transform .15s;font-size:12px}
.pep.open .pchev{transform:rotate(90deg)}
.pmethod{font-family:ui-monospace,Menlo,monospace;font-size:10px;font-weight:700;border-radius:5px;padding:3px 7px}
.pmethod.GET{background:#eafbf1;color:#16a34a}
.pmethod.POST{background:#eef1ff;color:#3b5bfd}
.ppath{font-family:ui-monospace,Menlo,monospace;font-size:13px;font-weight:600;color:#111827}
.pkind{font-family:ui-monospace,Menlo,monospace;font-size:10px;color:#6d28d9;background:#f1ebfd;border-radius:5px;padding:3px 7px;font-weight:600}
.ppill{font-size:10px;font-weight:700;border-radius:5px;padding:3px 7px}
.paccess{font-family:ui-monospace,Menlo,monospace;font-size:10px;border-radius:5px;padding:3px 7px;font-weight:600;margin-left:auto}
.paccess.bearer{background:#fdf3e3;color:#b45309}
.paccess.token{background:#f1ebfd;color:#6d28d9}
.paccess.public{background:#eafbf1;color:#16a34a}
.paccess.admin{background:#fdecec;color:#dc2626}
.pep-body{display:none;border-top:1px solid #e6e9f0}
.pep.open .pep-body{display:grid;grid-template-columns:1fr 1fr;gap:0}
.pep-col{padding:16px 18px}
.pep-col+.pep-col{border-left:1px solid #e6e9f0}

/* ── sections (was .sec) ──────────────────────────────────────── */
.psec{margin-bottom:14px}
.psec h4{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#9ca3af;font-weight:700;margin-bottom:6px}
.psec p{font-size:13px;color:#4b5563}
.pprompt{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;background:#fafbfd;border:1px solid #e6e9f0;border-radius:8px;padding:10px 12px;color:#4b5563;white-space:pre-wrap}
.pfns{font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#4b5563}
.pchips{display:flex;flex-wrap:wrap;gap:6px}
.pchip{font-family:ui-monospace,Menlo,monospace;font-size:10.5px;background:#fafbfd;border:1px solid #e6e9f0;border-radius:6px;padding:3px 8px;color:#4b5563}
.pchip.llm{border-color:#c7d2fe;background:#eef1ff;color:#3b5bfd}
.pchip.det{border-color:#bbe9cd;background:#eafbf1;color:#16a34a}

/* ── tester (was .tester) ─────────────────────────────────────── */
.ptester textarea{width:100%;font-family:ui-monospace,Menlo,monospace;font-size:12px;border:1px solid #e6e9f0;border-radius:8px;padding:10px;min-height:84px;background:#fafbfd;resize:vertical;color:#111827}
.ptester textarea:focus{outline:2px solid #eef1ff;border-color:#3b5bfd}
.ptrow{display:flex;gap:8px;align-items:center;margin-top:8px;flex-wrap:wrap}
.pbtn{background:#3b5bfd;color:#fff;border:none;border-radius:8px;font-weight:600;font-size:13px;padding:8px 16px;cursor:pointer;font-family:inherit}
.pbtn:hover{filter:brightness(1.08)}
.pbtn:disabled{opacity:.5;cursor:default}
.pbtn.ghost{background:#fafbfd;color:#4b5563;border:1px solid #e6e9f0}
.pmeta{font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#9ca3af}
.pout{margin-top:10px;font-family:ui-monospace,Menlo,monospace;font-size:11.5px;background:#0f1420;color:#d6e2ff;border-radius:8px;padding:12px;max-height:320px;overflow:auto;white-space:pre-wrap;display:none}
.pout.show{display:block}
.pgrade{display:flex;gap:4px;margin-top:10px;align-items:center;flex-wrap:wrap}
.pgrade>span{font-size:11px;color:#9ca3af;margin-right:4px}
.pg{width:26px;height:24px;border:1px solid #e6e9f0;background:#fff;border-radius:6px;font-family:ui-monospace,Menlo,monospace;font-size:11px;cursor:pointer;color:#4b5563}
.pg.on{background:#3b5bfd;border-color:#3b5bfd;color:#fff}

/* ── golden suite table ───────────────────────────────────────── */
.pipe-bad td{background:#fdecec}
.pipe-suite td,.pipe-suite th{white-space:nowrap}

@media(max-width:980px){
  .pipe-wrap{grid-template-columns:1fr}
  .pipe-rail{position:static}
  .pep.open .pep-body{grid-template-columns:1fr}
  .pep-col+.pep-col{border-left:none;border-top:1px solid #e6e9f0}
}
