/* =========================================================================
   PIPELINE — 9 fases del Playbook
   ========================================================================= */

/* Phase steps (horizontal stepper) */
.pl-steps { display: flex; align-items: stretch; gap: 0; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; }
.pl-step { flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px; background: var(--bg-surface); border: 1px solid var(--border-1); position: relative; cursor: pointer; transition: background 120ms; }
.pl-step + .pl-step { border-left: none; }
.pl-step:first-child { border-radius: 4px 0 0 4px; }
.pl-step:last-child { border-radius: 0 4px 4px 0; }
.pl-step:hover { background: var(--bg-inset); }
.pl-step.active { background: var(--revin-black); color: #fff; border-color: var(--revin-black); }
.pl-step.active .pl-step-num, .pl-step.active .pl-step-lbl, .pl-step.active .pl-step-count { color: #fff; }
.pl-step.done { background: var(--bg-inset); color: var(--fg-3); }
.pl-step.done .pl-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.pl-step::after { content: ""; position: absolute; right: -8px; top: 50%; transform: translateY(-50%) rotate(45deg); width: 14px; height: 14px; border-top: 1px solid var(--border-1); border-right: 1px solid var(--border-1); background: var(--bg-surface); z-index: 1; }
.pl-step.active::after { background: var(--revin-black); border-color: var(--revin-black); }
.pl-step.done::after { background: var(--bg-inset); }
.pl-step:last-child::after { display: none; }
.pl-step-num { width: 22px; height: 22px; border-radius: 2px; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--fg-2); background: var(--bg-surface); margin-bottom: 8px; }
.pl-step-lbl { font-size: 11px; font-weight: 700; color: var(--fg-1); text-transform: uppercase; letter-spacing: .04em; line-height: 1.3; }
.pl-step-count { font-size: 10px; color: var(--fg-3); margin-top: 2px; font-family: var(--font-mono); }

/* Kanban */
.kb { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; min-height: 480px; }
.kb-col { background: var(--bg-inset); border: 1px solid var(--border-1); border-radius: 4px; padding: 10px; min-width: 260px; width: 260px; display: flex; flex-direction: column; max-height: 700px; }
.kb-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.kb-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-2); display: inline-flex; align-items: center; gap: 6px; }
.kb-name .num { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; background: var(--revin-black); color: #fff; font-family: var(--font-mono); font-size: 9px; padding: 0 4px; border-radius: 2px; }
.kb-count { font-size: 11px; color: var(--fg-3); font-weight: 600; }
.kb-body { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 0; }
.kb-card { background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: 4px; padding: 10px; cursor: grab; transition: border-color 120ms, box-shadow 120ms; }
.kb-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.kb-card.cooling { border-left: 2px solid var(--revin-red); }
.kb-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.kb-addr { font-size: 13px; font-weight: 600; color: var(--fg-1); line-height: 1.3; }
.kb-code { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); letter-spacing: .04em; }
.kb-sub { font-size: 11px; color: var(--fg-2); display: flex; gap: 8px; align-items: center; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-3); }
.kb-price { font-family: var(--font-display); font-size: 13px; color: var(--fg-1); letter-spacing: .02em; }
.kb-ava { width: 20px; height: 20px; border-radius: 999px; background: var(--neutral-700); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }

/* Checklist drawer */
.pl-checklist { background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: 4px; padding: 16px; margin-top: 20px; }
.pl-checklist h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); }
.pl-checklist .ck-sub { font-size: 12px; color: var(--fg-3); margin-bottom: 12px; }
.pl-check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-3); }
.pl-check-row:last-child { border-bottom: none; }
.pl-check-row .chk { width: 16px; height: 16px; border: 1.5px solid var(--border-2); border-radius: 2px; flex-shrink: 0; cursor: pointer; background: var(--bg-surface); position: relative; }
.pl-check-row .chk.done { background: var(--revin-red); border-color: var(--revin-red); }
.pl-check-row .chk.done::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(45deg); }
.pl-check-row.req .label::after { content: " *"; color: var(--revin-red); }
.pl-check-row .label { font-size: 13px; color: var(--fg-1); flex: 1; }
.pl-check-row.done .label { text-decoration: line-through; color: var(--fg-3); }
.pl-check-row .meta { font-size: 11px; color: var(--fg-3); }

/* Pipeline timeline variant */
.pl-timeline { background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: 4px; padding: 0; overflow: hidden; }
.pl-tl-row { display: grid; grid-template-columns: 32px 1fr; gap: 0; padding: 16px 20px; border-bottom: 1px solid var(--border-3); position: relative; }
.pl-tl-row:last-child { border-bottom: none; }
.pl-tl-num { width: 24px; height: 24px; border-radius: 2px; background: var(--bg-inset); border: 1px solid var(--border-2); color: var(--fg-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.pl-tl-row.done .pl-tl-num { background: var(--success); color: #fff; border-color: var(--success); }
.pl-tl-row.active .pl-tl-num { background: var(--revin-red); color: #fff; border-color: var(--revin-red); }
.pl-tl-row::before { content: ""; position: absolute; left: 31px; top: 40px; bottom: -1px; width: 1px; background: var(--border-1); }
.pl-tl-row:last-child::before { display: none; }
.pl-tl-body { padding-left: 16px; min-width: 0; }
.pl-tl-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pl-tl-title { font-size: 14px; font-weight: 600; color: var(--fg-1); }
.pl-tl-meta { font-size: 11px; color: var(--fg-3); }
.pl-tl-items { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-tl-chip { font-size: 11px; padding: 3px 8px; background: var(--bg-inset); border: 1px solid var(--border-1); border-radius: 2px; color: var(--fg-2); display: inline-flex; align-items: center; gap: 4px; }
.pl-tl-chip.done { background: var(--success-bg); color: var(--success-fg); border-color: rgba(31,157,85,.2); }
