/* Vendored verbatim from the spec repo: docs-implementation/orchestrator/intake/2026-10-09_design-handoff/orchestrator-ui/assets/orchestrator.css.
   Update by re-copying the source file; do not edit here. */
/* =========================================================
   Orchestrator UI — additive styles on top of Meridian
   (../../foundation-ui/assets/meridian.css). Internal tool,
   reuses the "sa" (violet) sidebar variant throughout.
   ========================================================= */

/* ---------- Env filter (global, top-right) ---------- */
.env-filter { display: flex; align-items: center; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.env-filter button {
  border: none; background: transparent; font-size: 11.5px; font-weight: 600; padding: 5px 12px;
  border-radius: var(--r-pill); color: var(--text-2); cursor: pointer; font-family: inherit;
}
.env-filter button.active { background: var(--sa-accent); color: #fff; }
.env-filter button:not(.active):hover { color: var(--text-1); }

/* ---------- Search bar ---------- */
.o-search { position: relative; margin-bottom: 20px; max-width: 640px; }
.o-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.o-search input {
  width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border-hv); border-radius: var(--r-btn);
  font-size: 13px; font-family: inherit; color: var(--text-1); background: var(--surface); outline: none;
}
.o-search input:focus { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-lt); }

.o-filters { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------- Stat tiles ---------- */
.o-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.o-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; }
.o-stat-val { font-size: 24px; font-weight: 600; color: var(--text-1); font-family: var(--serif); letter-spacing: -0.02em; line-height: 1; }
.o-stat-lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin-top: 7px; }

/* ---------- Table ---------- */
.o-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.o-table th { background: var(--surface-2); text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); padding: 9px 14px; border-bottom: 1px solid var(--border); }
.o-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-1); vertical-align: middle; }
.o-table tr:last-child td { border-bottom: none; }
.o-table tbody tr:hover { background: var(--surface-2); }
.o-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.o-table th.num { text-align: right; }
.o-id { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 2px; }
.o-name { font-weight: 500; color: var(--text-1); }
.o-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.o-link { color: var(--sa-accent); font-weight: 500; }
.o-link:hover { text-decoration: underline; }
.o-mono { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }

/* ---------- Page header actions ---------- */
.ph-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Code / YAML / bash editor ---------- */
.code-editor {
  width: 100%; min-height: 280px; padding: 14px 16px; border: 1px solid var(--border-hv); border-radius: var(--r-btn);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text-1); background: var(--surface-2);
  outline: none; resize: vertical; tab-size: 2;
}
.code-editor:focus { border-color: var(--sa-accent); box-shadow: 0 0 0 3px var(--sa-accent-lt); }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.var-chip { font-family: var(--mono); font-size: 11px; background: var(--sa-accent-lt); color: var(--sa-accent); border: 1px solid var(--sa-accent-bd); border-radius: 3px; padding: 2px 7px; }
.var-chip.missing { background: var(--err-lt); color: var(--err); border-color: var(--err-bd); }

/* ---------- Template / script library picker ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lib-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px 14px; cursor: pointer; }
.lib-card:hover { border-color: var(--sa-accent-bd); }
.lib-card.selected { border-color: var(--sa-accent); background: var(--sa-accent-lt); }
.lib-card-title { font-size: 12.5px; font-weight: 600; color: var(--text-1); margin-bottom: 3px; }
.lib-card-desc { font-size: 11px; color: var(--text-3); }
.lib-cat { display: inline-block; margin-top: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); background: var(--bg); border-radius: 3px; padding: 2px 6px; }

/* ---------- Firewall rule rows ---------- */
.rule-row { display: grid; grid-template-columns: 1fr 90px 1fr 110px 1fr 32px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rule-row:last-child { border-bottom: none; }
.rule-row .finp, .rule-row .fsel { padding: 6px 9px; font-size: 12px; }

/* ---------- Key/value rows (env vars) ---------- */
.kv-row { display: grid; grid-template-columns: 1fr 1fr 70px 32px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-row .finp { padding: 6px 9px; font-size: 12px; }

/* ---------- Job timeline ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tl-step::before { content: ''; position: absolute; left: 7px; top: 24px; bottom: -10px; width: 1px; background: var(--border); }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 1px; z-index: 1; background: var(--surface); border: 2px solid var(--border-hv); }
.tl-dot.ok { border-color: var(--ok); background: var(--ok); }
.tl-dot.running { border-color: var(--sa-accent); background: var(--sa-accent); }
.tl-dot.err { border-color: var(--err); background: var(--err); }
.tl-dot.pending { border-color: var(--border-hv); background: var(--surface); }
.tl-dot svg { width: 9px; height: 9px; color: #fff; }
.tl-body { flex: 1; }
.tl-title { font-size: 12.5px; font-weight: 500; color: var(--text-1); }
.tl-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; font-family: var(--mono); }
.tl-log { margin-top: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 8px 10px; font-family: var(--mono); font-size: 11px; color: var(--text-2); white-space: pre-wrap; }

/* ---------- Secret value mask ---------- */
.secret-val { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.secret-val.masked { letter-spacing: 1px; }

/* ---------- Master-detail split (template/script editors) ---------- */
.split { display: flex; gap: 20px; align-items: flex-start; }
.split-list { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.split-main { flex: 1; min-width: 0; }
.split-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 10px 12px; cursor: pointer; }
.split-item:hover { border-color: var(--sa-accent-bd); }
.split-item.selected { border-color: var(--sa-accent); background: var(--sa-accent-lt); }
.split-item-title { font-size: 12.5px; font-weight: 600; color: var(--text-1); }
.split-item-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.split-group { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 10px 12px 4px; }

/* ---------- Empty detail placeholder ---------- */
.o-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.raw-box { margin-top: 6px; }
.raw-box summary { cursor: pointer; font-size: 12px; color: var(--text-2); }
.raw-hd { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--text-2); }
.raw-box pre { margin: 4px 0 0; max-height: 24rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-btn); padding: 8px 10px; }
.o-sort { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.o-sort:hover { color: var(--text-1); }
.o-sort:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; }
.o-sort-arrow { display: inline-block; margin-left: 4px; }
th[aria-sort="ascending"] .o-sort-arrow::after { content: "\25B2"; font-size: 8px; }
th[aria-sort="descending"] .o-sort-arrow::after { content: "\25BC"; font-size: 8px; }
