/* ───── Cloud tab (27 Oct 2026): Backbone Cloud control plane, owner only ───── */
.cl-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink); }
.cl-hero b { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 26px; display: block; line-height: 1.05; }
.cl-hero small { opacity: .85; font-size: 12.5px; }
.cl-hero .cl-btn.primary { background: var(--accent-ink); color: var(--accent); flex: none; }
.cl-btn { padding: 9px 14px; min-height: 40px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; }
.cl-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cl-btn:disabled { opacity: .45; cursor: default; }
.cl-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cl-btn.primary:hover:not(:disabled) { color: var(--accent-ink); filter: brightness(1.08); }
.cl-btn.danger { background: #e0353b; color: #fff; border-color: transparent; }
.cl-btn.danger-ghost { color: #c62828; }
.cl-btn.wide { width: 100%; margin-top: 12px; }
.cl-of { font-family: "Geist", system-ui, sans-serif; font-size: 13px; color: var(--muted); }
.cl-big { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: -.02em; }
#view-cloud code, .cl-modal code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; }
.cl-upd { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: #fff1d6; color: #8a4b00; margin-left: 6px; vertical-align: 1px; }

/* list */
.cl-head, .cl-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr) minmax(0, 1.2fr) minmax(0, 1.3fr); gap: 10px; align-items: center; }
.cl-head { font-size: 11.5px; color: var(--muted); padding: 0 10px 6px; border-bottom: 1px solid var(--rule); }
.cl-row { width: 100%; text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--rule); border-radius: 10px; }
.cl-row:last-child { border-bottom: 0; }
.cl-row:hover { background: var(--accent-soft); }
.cl-c1 { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cl-name { min-width: 0; } .cl-name b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-name small, .cl-c2 small, .cl-c4 small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-c2 { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.cl-c3 { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.cl-c3 > span { white-space: nowrap; }
.cl-c3 b { color: var(--ink); font-weight: 600; } .cl-c3.hot b { color: #c2410c; }
.cl-c4 code { font-size: 13px; background: var(--bg); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; }
.cl-pill { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.cl-pill.ok { background: #e3f6ec; color: #17784e; } .cl-pill.bad { background: #fdecea; color: #b42318; } .cl-pill.warn { background: #fff4e5; color: #8a4b00; }
.cl-meter { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--rule); vertical-align: middle; overflow: hidden; }
.cl-meter i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 600px) {
  .cl-head { display: none; }
  .cl-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .cl-c3 { flex-direction: row; gap: 12px; grid-column: 1; flex-wrap: wrap; }
  .cl-c4 { grid-column: 2; text-align: right; } .cl-c4 small { display: none; }
  .cl-c2 { align-items: flex-end; }
}

/* jobs + audit */
.cl-jobs { list-style: none; margin: 0; padding: 0; }
.cl-job { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13.5px; }
.cl-job:first-child { border-top: 0; } .cl-job small { flex-basis: 100%; color: var(--muted); padding-left: 17px; font-size: 12px; }
.cl-js, .cl-res { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; margin-left: auto; }
.cl-js.ok, .cl-res.ok { background: #e3f6ec; color: #17784e; } .cl-js.bad, .cl-res.bad { background: #fdecea; color: #b42318; } .cl-js.warn, .cl-res.warn { background: #fff4e5; color: #8a4b00; }
.cl-audit { font-size: 13px; }
.cl-arow { display: grid; grid-template-columns: 112px 52px 80px minmax(0, 1fr) auto; gap: 4px 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule); }
.cl-arow:first-child { border-top: 0; }
.cl-arow time, .cl-who { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cl-pod { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.cl-arow .cl-res { margin: 0; }
.cl-arow small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cl-arow { grid-template-columns: 1fr auto; } .cl-arow time { grid-column: 1 / -1; } .cl-who { display: none; } .cl-arow small { grid-column: 1 / -1; } .cl-arow b { grid-column: 1; } .cl-pod { grid-column: 1; } .cl-arow .cl-res { grid-row: 2; grid-column: 2; } }

/* panels */
.cl-sheet.cl-wide { max-width: 740px; height: min(820px, 92dvh); }
.cl-sheet.cl-small { max-width: 520px; height: auto; max-height: 92dvh; overflow-y: auto; }
.cl-ttl { flex: 1; min-width: 0; } .cl-ttl small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.cl-confirm { font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cl-confirm input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); width: 180px; }
.cl-jobbar { margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--rule); }
.cl-jobttl { display: flex; align-items: center; gap: 6px; font-size: 13.5px; } .cl-jobttl .cl-x { margin-left: auto; color: var(--muted); padding: 2px 6px; }
.cl-tabs { margin: 10px 16px 0; overflow-x: auto; scrollbar-width: none; flex: none; }
.cl-tabs::-webkit-scrollbar { display: none; }
.cl-tabs button { white-space: nowrap; }
.cl-body { flex: 1; overflow-y: auto; padding: 12px 16px 18px; -webkit-overflow-scrolling: touch; }
.cl-body h4, .cl-progress h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cl-body h4:first-child { margin-top: 2px; }
.cl-progress h4 small { text-transform: none; letter-spacing: 0; font-family: ui-monospace, Menlo, monospace; }
.cl-row2 { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; } .cl-row2 .note { margin: 0; }
.cl-logs { margin: 0; padding: 12px; border-radius: 12px; background: #0b0d14; color: #d7dbea; font: 12px/1.55 ui-monospace, Menlo, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 52dvh; overflow-y: auto; }
.cl-logs .t { color: #7d86a8; }
.cl-log { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.cl-log li { padding: 5px 0; border-top: 1px solid var(--rule); } .cl-log li:first-child { border-top: 0; }
.cl-log time { color: var(--muted); font-size: 12px; margin-right: 8px; font-variant-numeric: tabular-nums; }
.cl-log li.bad { color: #b42318; } .cl-log small { color: var(--muted); }
.cl-steps { list-style: none; display: flex; gap: 0; margin: 8px 0 4px; padding: 0; }
.cl-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); position: relative; }
.cl-steps li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); background: var(--surface); z-index: 1; }
.cl-steps li + li::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--rule); }
.cl-steps li.did { color: var(--ink); } .cl-steps li.did i { background: #22a06b; border-color: #22a06b; }
.cl-steps li.did::before { background: #22a06b; }
.cl-steps li.now { color: var(--accent); font-weight: 600; } .cl-steps li.now i { border-color: var(--accent); animation: blink 1.2s infinite; }
.cl-steps li.bad { color: #b42318; font-weight: 600; } .cl-steps li.bad i { background: #e0353b; border-color: #e0353b; }
.cl-form { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.cl-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.cl-form label small { font-weight: 400; color: var(--muted); font-size: 12px; }
.cl-form input { font: inherit; font-weight: 400; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); outline: none; min-width: 0; }
.cl-form input:focus { border-color: var(--accent); }
.cl-slug { display: flex; align-items: stretch; } .cl-slug em { font-style: normal; display: flex; align-items: center; padding: 0 8px 0 12px; border: 1px solid var(--rule); border-right: 0;
  border-radius: 10px 0 0 10px; background: var(--notice); color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-weight: 400; font-size: 14px; }
.cl-slug input { flex: 1; border-radius: 0 10px 10px 0; font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.cl-spec { display: flex; flex-wrap: wrap; gap: 6px; } .cl-spec span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.cl-form.cl-inline { flex-direction: row; padding: 0; } .cl-form.cl-inline input { width: 120px; }
.cl-err { color: #b42318; font-size: 13px; margin: 4px 0 0; }
.cl-warn { color: #a15c00; }
.cl-progress { padding: 4px 16px 16px; }
.cl-modal .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cl-modal .kpi .kv { font-size: 24px; }
.cl-modal .kpi .ks .cl-meter { width: 46px; }
@media (max-width: 600px) {
  .cl-modal { padding: 0; align-items: stretch; }
  .cl-sheet.cl-wide, .cl-sheet.cl-small { max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .cl-hero b { font-size: 23px; }
  .cl-modal .kpis { grid-template-columns: 1fr 1fr; }
  .cl-row2 { flex-direction: column; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cl-pill.ok, :root:not([data-theme="light"]) .cl-js.ok, :root:not([data-theme="light"]) .cl-res.ok { background: #12392a; color: #6fe0a8; }
  :root:not([data-theme="light"]) .cl-pill.bad, :root:not([data-theme="light"]) .cl-js.bad, :root:not([data-theme="light"]) .cl-res.bad { background: #3a1416; color: #fca5a5; }
  :root:not([data-theme="light"]) .cl-pill.warn, :root:not([data-theme="light"]) .cl-js.warn, :root:not([data-theme="light"]) .cl-res.warn,
  :root:not([data-theme="light"]) .cl-upd { background: #3a2a10; color: #f5c46b; }
  :root:not([data-theme="light"]) .cl-logs { background: #07080d; }
}

/* ───── Desktop (28 Oct 2026): dense admin tables; a pod opens in a right-hand drawer, small forms stay centred.
   Below 1024px is untouched. ───── */
@media (min-width: 1024px) {
  #view-cloud .dash-inner { gap: 16px; }
  .cl-hero { padding: 18px 22px; }
  .cl-head, .cl-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1.5fr); gap: 14px; }
  .cl-head { padding: 0 10px 8px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
  .cl-row { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
  .cl-row:hover { background: var(--accent-soft); }
  .cl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .cl-c3 { flex-direction: row; gap: 14px; flex-wrap: wrap; }
  .cl-job { padding: 6px 0; }
  .cl-arow { grid-template-columns: 128px 64px 120px minmax(0, 180px) minmax(0, 1fr) auto; padding: 6px 4px; }
  .cl-arow small { grid-column: 5; grid-row: 1; }
  .cl-arow .cl-res { grid-column: 6; grid-row: 1; }
  .cl-arow:hover { background: var(--bg); }
  .cl-btn { min-height: 36px; padding: 7px 14px; cursor: pointer; }
  .cl-btn:focus-visible, .cl-modal button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* a pod (and the factory) as a full-height drawer on the right; the dimmed page beside it closes it */
  .cl-modal { justify-content: flex-end; align-items: stretch; padding: 0; }
  .cl-sheet.cl-wide { width: min(760px, 62vw); max-width: none; height: 100dvh; border-radius: 0; border-width: 0 0 0 1px; box-shadow: -24px 0 60px rgba(0, 0, 0, .25); }
  .cl-modal .cl-sheet.cl-small { align-self: center; margin: 0 auto; width: 100%; max-width: 520px; height: auto; border-radius: 18px; border-width: 1px; }
  .cl-modal .pod-top { padding: 14px 18px; }
  .cl-modal .pod-x { border-radius: 8px; }
  .cl-modal .pod-x:hover { background: var(--notice); color: var(--ink); }
  .cl-actions { padding: 10px 18px; }
  .cl-tabs { margin: 10px 18px 0; }
  .cl-body { padding: 14px 18px 22px; }
  .cl-logs { max-height: calc(100dvh - 300px); }
  .cl-modal .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
  .cl-head, .cl-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.6fr); }
}

/* Products (28 Oct 2026): a badge on every pod, and the choice in the New pod sheet */
.cl-pill.prod { margin-left: 4px; font-weight: 500; }
.cl-pill.prod.bo { background: var(--accent-soft); color: var(--accent); }
.cl-pill.prod.social { background: #f3e8ff; color: #6b21a8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cl-pill.prod.social { background: #2e1a47; color: #d8b4fe; } }
.cl-prodpick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-prodpick legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.cl-form .cl-opt { flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.cl-opt input { margin-top: 3px; }
.cl-opt span { display: flex; flex-direction: column; gap: 2px; }
.cl-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.cl-linkrow { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.cl-linkrow input { flex: 1 1 240px; min-width: 0; font: 13px ui-monospace, Menlo, monospace; padding: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: inherit; }
