/* ═══════════════════════════════════════════════════════════════════════════
   PM2 - Hawkeye   Main stylesheet (imports per-component partials)
   ═══════════════════════════════════════════════════════════════════════════ */
/* Foundation */
/* ═══════════════════════════════════════════════════════════════════════════
   PM2 - Hawkeye   Design tokens & CSS custom properties

   Three locks are enforced across every partial:
     1. Accent lock  - coral is the only accent. Green/amber/red are semantic
                       status colours, never decoration.
     2. Shape lock   - exactly two radii. --r-1 for controls, --r-2 for
                       surfaces. Nothing else.
     3. Space lock   - a 4px scale. No arbitrary paddings.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  /* ── Backgrounds ─────────────────────────────────────────────────────── */
  --bg-0: #0b0b0d;
  /* app ground */
  --bg-1: #111114;
  /* panels / chrome */
  --bg-2: #17171b;
  /* raised rows, inputs */
  --bg-3: #1e1e23;
  /* hover / active rows */
  /* ── Borders ─────────────────────────────────────────────────────────── */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  /* ── Text ────────────────────────────────────────────────────────────── */
  --text: #ededf0;
  --text-dim: #a7a7ae;
  /* 5.5:1 on --bg-1 and 5.2:1 on --bg-2. The old #77777f had 4.2:1 on
     --bg-1, below the 4.5:1 minimum for body text. */
  --muted: #8a8a92;
  /* ── Accent (coral) - the only accent on the page ────────────────────── */
  --accent: #fd8c66;
  /* Hover brightens the coral. It used to darken into #f8494d, a red that made
     every primary confirm button look like a destructive one. */
  --accent-hover: #ffa383;
  --accent-soft: rgba(253, 140, 102, 0.12);
  --accent-line: rgba(253, 140, 102, 0.34);
  --on-accent: #1a0d07;
  /* text on a filled coral surface, 11.4:1 */
  /* ── Semantic status ─────────────────────────────────────────────────── */
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.13);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.13);
  --critical: #f87171;
  --critical-soft: rgba(248, 113, 113, 0.13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.13);
  /* Callouts: a faint fill with a stronger line, for boxes that ask the user
     to decide (local changes) or report a failure that blocks the page. */
  --warning-callout: rgba(251, 191, 36, 0.06);
  --warning-callout-line: rgba(251, 191, 36, 0.34);
  --critical-callout: rgba(248, 113, 113, 0.06);
  --critical-callout-line: rgba(248, 113, 113, 0.34);
  /* ── Log level colours ───────────────────────────────────────────────── */
  --log-error: #f87171;
  --log-warn: #fbbf24;
  --log-info: #60a5fa;
  --log-default: #c4c4cc;
  --log-error-tint: rgba(248, 113, 113, 0.06);
  /* background of an error row */
  /* ── Charts ──────────────────────────────────────────────────────────── */
  --chart-hairline: rgba(255, 255, 255, 0.05);
  /* gridlines above zero */
  --chart-baseline: rgba(255, 255, 255, 0.1);
  /* the zero line */
  --chart-crosshair: rgba(255, 255, 255, 0.28);
  /* hover / focus marker */
  --chart-threshold: rgba(248, 113, 113, 0.7);
  /* a limit such as max_memory_restart */
  /* ── Shape lock: two radii only ──────────────────────────────────────── */
  --r-1: 0.25rem;
  /* controls: buttons, inputs, pills, chips */
  --r-2: 0.5rem;
  /* surfaces: panels, modals, popovers */
  /* ── Space lock: 4px scale ───────────────────────────────────────────── */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  /* ── Elevation - tinted to the ground, never pure black ──────────────── */
  --shadow-1: 0 0.0625rem 0.125rem rgba(6, 6, 8, 0.6);
  --shadow-2: 0 1rem 2.5rem rgba(6, 6, 8, 0.55);
  /* Chart tooltips float over dense marks, so they lift further than rows. */
  --shadow-tooltip: 0 0.375rem 1rem rgba(6, 6, 8, 0.6);
  /* Backdrop behind modals and the mobile drawer. */
  --scrim: rgba(6, 6, 8, 0.72);
  /* ── Type ────────────────────────────────────────────────────────────── */
  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  /* ── Fixed chrome heights ────────────────────────────────────────────── */
  --topbar-h: 3rem;
  --sidebar-w: 15rem;
  --footer-h: 2rem;
}
/* ── Reset & base typography ────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
@media (max-width: 45rem) {
  html,
  body {
    height: auto;
    overflow: auto;
  }
}
@media (min-width: 45.0625rem) and (max-height: 40rem) {
  html,
  body {
    height: auto;
    overflow-y: auto;
  }
}
body {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-hover);
}
h1,
h2,
h3,
h4 {
  letter-spacing: -0.015em;
  font-weight: 600;
}
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
/* ── Shared text helpers ────────────────────────────────────────────────── */
.section-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.subtle {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.55;
}
.hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}
/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  padding: var(--s-8) var(--s-4);
  color: var(--muted);
  text-align: center;
}
.empty-note strong {
  color: var(--text-dim);
  font-weight: 600;
}
.empty-note p {
  margin: 0;
  font-size: 0.8125rem;
  max-width: 32rem;
}
/* ── Focus ──────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.125rem;
  border-radius: var(--r-1);
}
/* ── Scrollbars ─────────────────────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: var(--r-1);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}
::-webkit-scrollbar-track {
  background: transparent;
}
/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(0.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fade-in 140ms ease both;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ── Buttons ────────────────────────────────────────────────────────────────
   One button system for the whole app. Three intents (default / primary /
   danger) and two sizes (default / sm). Every other ad-hoc button class in the
   codebase maps onto these.
   ───────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 2rem;
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 60ms ease;
}
.btn:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: var(--border-strong);
}
.btn:active:not(:disabled) {
  transform: translateY(0.0625rem);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn svg {
  flex-shrink: 0;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn--danger {
  color: var(--critical);
  border-color: var(--border-strong);
}
.btn--danger:hover:not(:disabled) {
  background: var(--critical-soft);
  border-color: var(--critical);
}
.btn--sunken {
  background: var(--bg-1);
}
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
.btn--quiet:hover:not(:disabled) {
  background: var(--bg-2);
  color: var(--text);
}
.btn--sm {
  height: 1.625rem;
  padding: 0 var(--s-2);
  font-size: 0.75rem;
}
.btn--icon {
  width: 2rem;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn--icon:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text);
}
.btn--icon[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn--block {
  width: 100%;
}
/* ── Inline confirm ─────────────────────────────────────────────────────────
   The single confirmation idiom used everywhere a destructive or disruptive
   action is triggered. Replaces the four different patterns the app used to
   mix (inline yes/no, strip confirm, window.confirm, modal confirm box).
   ───────────────────────────────────────────────────────────────────────── */
.confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 2rem;
  padding: 0 var(--s-1) 0 var(--s-3);
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--accent-line);
  background: var(--accent-soft);
  animation: fade-in 120ms ease both;
}
.confirm-label {
  font-size: 0.8125rem;
  color: var(--text);
  white-space: nowrap;
}
.confirm-actions {
  display: flex;
  gap: var(--s-1);
}
/* ── Form controls ──────────────────────────────────────────────────────── */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0 var(--s-3);
  height: 2.125rem;
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--border-strong);
  background: var(--bg-0);
  color: var(--text);
  font-size: 0.8125rem;
  transition: border-color 120ms ease;
}
.input::placeholder,
.select::placeholder,
.textarea::placeholder {
  color: var(--muted);
}
.input:hover:not(:disabled):not([readonly]),
.select:hover:not(:disabled):not([readonly]),
.textarea:hover:not(:disabled):not([readonly]) {
  border-color: var(--border-strong);
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.input:disabled,
.select:disabled,
.textarea:disabled,
.input[readonly],
.select[readonly],
.textarea[readonly] {
  opacity: 0.55;
  cursor: not-allowed;
}
.textarea {
  height: auto;
  padding: var(--s-2) var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: var(--s-8);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1rem) 55%, calc(100% - 0.7rem) 55%;
  background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
  background-repeat: no-repeat;
  cursor: pointer;
}
/* Label above input, hint below. Never placeholder-as-label. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field > label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}
.field .hint {
  margin-top: calc(var(--s-1) * -1);
}
.field-req {
  color: var(--accent);
  margin-left: 0.125rem;
}
/* ── Toggle switch ──────────────────────────────────────────────────────── */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  cursor: pointer;
  user-select: none;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle .toggle-track {
  position: relative;
  width: 1.875rem;
  height: 1.0625rem;
  flex-shrink: 0;
  border-radius: 0.53125rem;
  background: var(--bg-3);
  border: 0.0625rem solid var(--border-strong);
  transition: background-color 130ms ease, border-color 130ms ease;
}
.toggle .toggle-track::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 130ms ease, background-color 130ms ease;
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle input:checked + .toggle-track::after {
  transform: translateX(0.8125rem);
  background: var(--on-accent);
}
.toggle input:focus-visible + .toggle-track {
  outline: 0.125rem solid var(--accent);
  outline-offset: 0.125rem;
}
.toggle .toggle-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
}
/* ── Status vocabulary ──────────────────────────────────────────────────────
   One source of truth for how process state is drawn. Every surface (sidebar
   row, process header, offline list) uses these, so "online" looks identical
   wherever it appears.
   ───────────────────────────────────────────────────────────────────────── */
.status-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.status-dot[data-status='online'] {
  background: var(--success);
}
.status-dot[data-status='stopped'] {
  background: var(--muted);
}
.status-dot[data-status='stopping'],
.status-dot[data-status='launching'],
.status-dot[data-status='one-launch-status'] {
  background: var(--warning);
}
.status-dot[data-status='errored'],
.status-dot[data-status='error'] {
  background: var(--critical);
}
.status-dot[data-status='deploying'] {
  background: var(--accent);
}
.status-text {
  font-size: 0.75rem;
  color: var(--muted);
}
.status-text[data-status='online'] {
  color: var(--success);
}
.status-text[data-status='stopping'],
.status-text[data-status='launching'],
.status-text[data-status='one-launch-status'] {
  color: var(--warning);
}
.status-text[data-status='errored'],
.status-text[data-status='error'],
.status-text[data-status='broken'] {
  color: var(--critical);
}
.status-text[data-status='deploying'] {
  color: var(--accent);
}
/* ── Tags ───────────────────────────────────────────────────────────────────
   Small non-interactive labels. Semantic colour only, never decoration.
   ───────────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  height: 1.125rem;
  padding: 0 var(--s-2);
  border-radius: var(--r-1);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--bg-3);
  color: var(--text-dim);
}
.tag--accent {
  background: var(--accent-soft);
  color: var(--accent);
}
.tag--warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.tag--critical {
  background: var(--critical-soft);
  color: var(--critical);
}
.tag--mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}
/* ── Cards ──────────────────────────────────────────────────────────────────
   The raised surface of the Overview, Manage and Deploy screens: a title with
   an optional hint, then rows separated by hairlines. One shape everywhere,
   so a card reads the same whatever it holds.
   ───────────────────────────────────────────────────────────────────────── */
.card {
  min-width: 0;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-2);
  background: var(--bg-2);
}
.card-head {
  padding: var(--s-4) var(--s-4) var(--s-3);
}
.card-head--actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding: var(--s-4);
}
.card-head-text {
  flex: 1 1 15rem;
  min-width: 0;
}
.card-head-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.card-head--side {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-4) var(--s-2);
}
.card-head--side .card-link {
  margin-left: auto;
}
.card-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.card-hint {
  margin: var(--s-1) 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.card-hint--tight {
  margin-top: 0.125rem;
}
.card--danger .card-title {
  color: var(--critical);
}
.card-link {
  font-size: 0.75rem;
  text-decoration: none;
}
/* ── Rows: text on the left, the control on the right ───────────────────── */
.card-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
}
.card-row-text {
  flex: 1 1 20rem;
  min-width: 0;
}
.card-row-text--narrow {
  flex-basis: 12.5rem;
}
.card-row-label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.card-row-hint {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
/* ── Definition lists ───────────────────────────────────────────────────── */
.card-dl {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr);
  margin: 0;
  font-size: 0.8125rem;
}
.card-dl dt {
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}
.card-dl dd {
  min-width: 0;
  margin: 0;
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  border-top: 0.0625rem solid var(--border);
  color: var(--text);
}
.card-dl--side {
  grid-template-columns: auto minmax(0, 1fr);
  font-size: 0.75rem;
}
.card-dl--side dt {
  padding: var(--s-2) var(--s-4);
}
.card-dl--side dd {
  padding: var(--s-2) var(--s-4) var(--s-2) 0;
  font-family: var(--font-mono);
  text-align: right;
}
.card-dl-break {
  font-size: 0.75rem;
  word-break: break-all;
}
.card-dl-dim {
  color: var(--text-dim);
}
.card-dl-muted {
  color: var(--muted);
}
.card-dl-bad {
  color: var(--critical);
}
.card-dl-ok {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.card-dl-ok svg {
  color: var(--success);
}
.card-side-text {
  margin: 0;
  padding: 0 var(--s-4) var(--s-3);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.card-side-text--muted {
  color: var(--muted);
}
.card-side-text--last {
  padding-bottom: var(--s-4);
}
.card-warning {
  display: flex;
  gap: var(--s-2);
  margin: 0 var(--s-4) var(--s-4);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-1);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.75rem;
}
.card-warning svg {
  flex-shrink: 0;
  margin-top: 0.0625rem;
}
/* ── Code ───────────────────────────────────────────────────────────────── */
.code-chip {
  padding: 0.0625rem var(--s-2);
  border-radius: var(--r-1);
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
}
.code-chip--dim {
  color: var(--text-dim);
}
.code-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-1);
}
.code-block {
  margin: 0;
  padding: var(--s-2) var(--s-3);
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.125rem;
  color: var(--log-default);
  white-space: pre-wrap;
  word-break: break-all;
}
/* ── Section heads outside cards ────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-3);
}
/* ── Callouts ───────────────────────────────────────────────────────────────
   A box that needs a decision or reports a state that blocks the page. The
   warning and critical variants use a faint fill with a stronger line.
   ───────────────────────────────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--r-2);
}
.callout--row {
  align-items: flex-start;
  flex-wrap: wrap;
}
.callout--stack {
  flex-direction: column;
}
.callout--warning {
  border-color: var(--warning-callout-line);
  background: var(--warning-callout);
}
.callout--critical {
  border-color: var(--critical-callout-line);
  background: var(--critical-callout);
}
.callout--critical .callout-icon {
  color: var(--critical);
}
.callout-icon {
  flex-shrink: 0;
  margin-top: 0.0625rem;
  color: var(--muted);
}
.callout-body {
  flex: 1 1 22.5rem;
  min-width: 0;
}
.callout-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.callout-text {
  margin: var(--s-1) 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.callout--stack .callout-text {
  margin: 0;
}
.callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
/* ── Time-series chart ──────────────────────────────────────────────────────
   One chart idiom for the Overview and the Metrics tab: hairline grid, step
   lines, a dot on the newest sample, and one tooltip that reads every series
   at the hovered time. Gridlines are never dashed; dashes mean a comparison
   series or a limit.
   ───────────────────────────────────────────────────────────────────────── */
.ts-chart {
  display: grid;
  column-gap: var(--s-2);
  row-gap: var(--s-2);
}
.ts-plot-wrap {
  position: relative;
  min-width: 0;
}
.ts-chart--compact .ts-plot-wrap {
  margin-right: var(--s-1);
}
.ts-plot {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}
.ts-plot svg {
  display: block;
  overflow: visible;
}
.ts-plot:focus-visible {
  outline: 0.125rem solid var(--accent-line);
  outline-offset: var(--s-1);
  border-radius: 0;
}
.ts-grid {
  stroke: var(--chart-hairline);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.ts-grid--base {
  stroke: var(--chart-baseline);
}
.ts-area {
  fill-opacity: 0.1;
}
.ts-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.ts-dot {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  margin: -0.25rem 0 0 -0.25rem;
  border-radius: 50%;
  box-shadow: 0 0 0 0.125rem var(--bg-2);
  pointer-events: none;
}
.ts-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.0625rem;
  background: var(--chart-crosshair);
  pointer-events: none;
}
.ts-threshold {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 0.0625rem dashed var(--chart-threshold);
  pointer-events: none;
}
.ts-threshold-label {
  position: absolute;
  right: 0;
  bottom: var(--s-1);
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--text-dim);
  white-space: nowrap;
}
/* ── Tooltip ────────────────────────────────────────────────────────────── */
.ts-tooltip {
  position: absolute;
  top: 0;
  z-index: 2;
  padding: var(--s-2) var(--s-3);
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--r-1);
  background: var(--bg-0);
  box-shadow: var(--shadow-tooltip);
  white-space: nowrap;
  pointer-events: none;
}
.ts-tooltip--above {
  top: auto;
  bottom: calc(100% + var(--s-2));
}
.ts-tooltip-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  line-height: 1.125rem;
}
.ts-key {
  width: 0.625rem;
  height: 0;
  border-top-width: 0.125rem;
}
.ts-tooltip-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.125rem;
  color: var(--text);
}
.ts-tooltip-name {
  font-size: 0.6875rem;
  color: var(--muted);
}
.ts-tooltip-time {
  margin-top: 0.125rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  color: var(--muted);
}
/* ── Axes ───────────────────────────────────────────────────────────────── */
.ts-y,
.ts-x {
  position: relative;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.625rem;
  line-height: 1;
  color: var(--muted);
}
.ts-y span,
.ts-x span {
  position: absolute;
  white-space: nowrap;
}
.ts-y span {
  left: 0;
  transform: translateY(-50%);
}
.ts-x {
  height: 0.875rem;
}
.ts-x span {
  top: 0;
  transform: translateX(-50%);
}
.ts-x span[data-align='end'] {
  transform: translateX(-100%);
}
/* Placeholder with the chart's height, so a card does not reflow when its
   history arrives. */
.ts-nodata {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  border: 0.0625rem dashed var(--border);
  border-radius: var(--r-1);
}
/* Shell */
/* ── Layout shell ───────────────────────────────────────────────────────────
   Three fixed regions: topbar (global), sidebar (choose an object), content
   (act on it). Predictable grid, DESIGN_VARIANCE 3 - an ops tool must never
   move its furniture.
   ───────────────────────────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--footer-h);
  height: 100vh;
  background: var(--bg-0);
}
/* ── Top bar ────────────────────────────────────────────────────────────── */
.app-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
  height: var(--topbar-h);
  padding: 0 var(--s-4);
  background: var(--bg-1);
  border-bottom: 0.0625rem solid var(--border);
  z-index: 20;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.topbar-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: var(--r-1);
  background: var(--accent-soft);
}
.topbar-brand-logo svg {
  display: block;
}
.topbar-brand-wordmark {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.topbar-brand-wordmark .brand-pm2 {
  color: var(--accent);
}
.topbar-brand-wordmark .brand-hawkeye {
  color: var(--text);
}
.topbar-spacer {
  flex: 1;
  min-width: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}
.topbar-divider {
  width: 0.0625rem;
  height: 1.25rem;
  background: var(--border);
  flex-shrink: 0;
}
.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.topbar-menu-btn:hover {
  background: var(--bg-2);
  color: var(--text);
}
.topbar-drawer-overlay {
  display: none;
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  background: var(--scrim);
  z-index: 40;
}
/* ── Connection state ───────────────────────────────────────────────────────
   The websocket is the app's single transport. When it drops, every number on
   screen is stale, so the state is stated rather than hidden.
   ───────────────────────────────────────────────────────────────────────── */
.conn-state {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-2);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.conn-state[data-connected='false'] {
  color: var(--warning);
}
.conn-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--success);
}
.conn-state[data-connected='false'] .conn-dot {
  background: var(--warning);
}
/* ── Content column ─────────────────────────────────────────────────────── */
.content {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-1);
}
/* ── Footer ─────────────────────────────────────────────────────────────── */
.app-footer {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--footer-h);
  padding: 0 var(--s-4);
  background: var(--bg-1);
  border-top: 0.0625rem solid var(--border);
  color: var(--muted);
  font-size: 0.6875rem;
  z-index: 10;
}
.app-footer-version {
  font-family: var(--font-mono);
}
.app-footer-credit a {
  color: var(--text-dim);
  text-decoration: none;
}
.app-footer-credit a:hover {
  color: var(--accent);
}
/* ── Responsive: mobile (<= 45rem / 720 px) ─────────────────────────────── */
@media (max-width: 45rem) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100dvh;
  }
  .topbar-menu-btn {
    display: flex;
  }
  .topbar-drawer-overlay {
    display: block;
  }
  .app-topbar {
    position: sticky;
    top: 0;
    gap: var(--s-2);
    padding: 0 var(--s-2);
  }
  .content {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
  .topbar-actions .btn--primary span,
  .topbar-brand-wordmark,
  .topbar-divider {
    display: none;
  }
  .conn-state {
    padding: 0;
  }
  .conn-state span:not(.conn-dot) {
    display: none;
  }
  .app-footer {
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
    height: auto;
    padding: var(--s-2) var(--s-4);
  }
}
/* ── Short desktop viewports ────────────────────────────────────────────── */
@media (min-width: 45.0625rem) and (max-height: 40rem) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: var(--topbar-h) auto var(--footer-h);
  }
}
/* ── Host health readout ────────────────────────────────────────────────────
   States the numbers and nothing else. The whole readout is one link to the
   host charts on the Overview, from every screen.
   ───────────────────────────────────────────────────────────────────────── */
.host-readout {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 1.75rem;
  min-width: 0;
  padding: 0 var(--s-2);
  border-radius: var(--r-1);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}
.host-readout:hover {
  background: var(--bg-2);
}
.host-readout-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.host-stat {
  display: flex;
  align-items: baseline;
  gap: var(--s-1);
}
.host-stat-label {
  font-size: 0.6875rem;
  color: var(--muted);
}
.host-stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  /* Pressure is a real signal, so it is allowed to colour the number. */
}
.host-stat-value[data-level='warn'] {
  color: var(--warning);
}
.host-stat-value[data-level='critical'] {
  color: var(--critical);
}
@media (max-width: 60rem) {
  .host-readout-label {
    display: none;
  }
  .host-readout {
    gap: var(--s-3);
  }
}
@media (max-width: 45rem) {
  .host-readout {
    display: none;
  }
}
/* ── Sidebar: the object picker ─────────────────────────────────────────────
   One job: choose a process. Rows are grouped by state so a stopped or broken
   app cannot hide in the middle of a long running list.
   ───────────────────────────────────────────────────────────────────────── */
.app-sidebar {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 0.0625rem solid var(--border);
  background: var(--bg-1);
}
/* ── Navigation ─────────────────────────────────────────────────────────────
   The Overview is the home: nothing selected. Its row carries the number of
   attention items so a problem is visible from any screen.
   ───────────────────────────────────────────────────────────────────────── */
.sidebar-nav {
  flex-shrink: 0;
  padding: var(--s-2) var(--s-1);
  border-bottom: 0.0625rem solid var(--border);
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  height: 2rem;
  padding: 0 var(--s-2);
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}
.sidebar-nav-item:hover {
  background: var(--bg-3);
  color: var(--text);
}
.sidebar-nav-item.active {
  background: var(--bg-3);
  color: var(--text);
}
.sidebar-nav-item.active svg {
  color: var(--accent);
}
.sidebar-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.125rem;
  min-width: 1.125rem;
  margin-left: auto;
  padding: 0 var(--s-2);
  border-radius: var(--r-1);
  background: var(--critical-soft);
  color: var(--critical);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* ── Processes header and filter ────────────────────────────────────────── */
.sidebar-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex-shrink: 0;
  padding: var(--s-3) var(--s-3) var(--s-1);
}
.sidebar-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
}
.sidebar-search {
  position: relative;
  display: block;
}
.sidebar-search .input {
  height: 1.875rem;
  padding: 0 var(--s-2) 0 1.875rem;
  border-color: var(--border);
  font-size: 0.75rem;
  background: var(--bg-2);
}
.sidebar-search-icon {
  position: absolute;
  left: var(--s-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.process-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: var(--s-3);
}
.process-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-3) var(--s-2);
}
.process-group + .process-group .process-group-head {
  padding-top: var(--s-4);
}
.process-group-count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
}
/* ── Row ────────────────────────────────────────────────────────────────── */
.process-item {
  display: grid;
  grid-template-columns: 0.4375rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-2);
  width: calc(100% - var(--s-2));
  height: 2rem;
  margin: 0 var(--s-1) 0.0625rem;
  padding: 0 var(--s-2);
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--text-dim);
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease;
}
.process-item[data-running='true'] {
  color: var(--text);
}
.process-item:hover,
.process-item.active {
  background: var(--bg-3);
}
.process-item-name {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 500;
}
.process-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.process-item-deployed {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--muted);
}
.process-item-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
}
/* Recording indicator: real semantic state (history is being persisted). */
.process-item-rec {
  display: flex;
  align-items: center;
  color: var(--accent);
}
.sidebar-empty {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}
/* ── Mobile drawer ──────────────────────────────────────────────────────── */
@media (max-width: 45rem) {
  .app-sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    width: min(17rem, 82vw);
    z-index: 50;
    transform: translateX(-100%);
    /* Hidden once it has slid out, so keyboard focus and screen readers skip
       the rows of a closed drawer. */
    visibility: hidden;
    transition: transform 160ms ease, visibility 0s linear 160ms;
    box-shadow: var(--shadow-2);
  }
  .app-sidebar[data-open='true'] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 160ms ease;
  }
}
/* Home */
/* ── Overview ───────────────────────────────────────────────────────────────
   The home screen while nothing is selected: what needs attention, then the
   host. No process table; the sidebar is the only process list.
   ───────────────────────────────────────────────────────────────────────── */
.overview {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-5);
}
.overview-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5rem;
}
.overview-sub {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
/* ── Needs attention ────────────────────────────────────────────────────── */
.attention-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
}
.attention-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.attention-row {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
}
.attention-icon[data-level='critical'] {
  color: var(--critical);
}
.attention-icon[data-level='warning'] {
  color: var(--warning);
}
.attention-icon[data-level='ok'] {
  color: var(--success);
}
.attention-text {
  min-width: 0;
}
.attention-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
.attention-detail {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
/* ── Host ───────────────────────────────────────────────────────────────── */
.overview-host {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  scroll-margin-top: var(--s-5);
}
.host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17.5rem, 100%), 1fr));
  gap: var(--s-3);
}
@media (max-width: 45rem) {
  .overview {
    padding: var(--s-4);
  }
}
/* Process workspace */
/* ── Process header ─────────────────────────────────────────────────────────
   States which object you are acting on, and carries only the two controls
   that are used continuously (Restart, Stop/Start). Everything else lives in
   the Manage tab, one keystroke away, instead of crowding this row.
   ───────────────────────────────────────────────────────────────────────── */
.process-header {
  flex-shrink: 0;
  padding: var(--s-4) var(--s-5) 0;
  border-bottom: 0.0625rem solid var(--border);
}
.process-header-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  min-height: 2rem;
}
.process-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* ── Deployment identity ────────────────────────────────────────────────────
   States that Hawkeye deployed this process, and from where. Nothing in the
   app said so before: a deployed process looked exactly like one started by
   hand on the command line. Clicking it opens the Deploy tab.
   ───────────────────────────────────────────────────────────────────────── */
.deploy-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 1.375rem;
  padding: 0 var(--s-2);
  flex-shrink: 0;
  max-width: 22rem;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: transparent;
  color: var(--muted);
  font-size: 0.6875rem;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.deploy-chip:hover {
  background: var(--bg-3);
  border-color: var(--border-strong);
  color: var(--text-dim);
}
.deploy-chip svg {
  flex-shrink: 0;
}
.deploy-chip--static {
  cursor: default;
}
.deploy-chip--static:hover {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.deploy-chip-repo {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deploy-chip-branch {
  flex-shrink: 0;
  padding: 0 var(--s-1);
  border-radius: var(--r-1);
  background: var(--bg-3);
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.process-header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
  flex-shrink: 0;
}
/* ── Inline stat strip ──────────────────────────────────────────────────────
   VISUAL_DENSITY 7: numbers breathe in plain layout with hairlines, no card
   boxes. Always visible, so CPU and memory are readable while reading logs.
   ───────────────────────────────────────────────────────────────────────── */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-1) var(--s-5);
  padding: var(--s-2) 0 var(--s-3);
  font-size: 0.75rem;
}
.stat-strip-item {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  white-space: nowrap;
}
/* cpu and mem are shortcuts into the Metrics tab, so they are real buttons.
   They must not read as buttons: same type, one quiet hover cue. */
.stat-strip-item--link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.stat-strip-item--link .stat-strip-value {
  text-decoration: underline dotted var(--accent-line);
  text-underline-offset: 0.1875rem;
}
.stat-strip-item--link:hover .stat-strip-value,
.stat-strip-item--link:focus-visible .stat-strip-value {
  color: var(--text);
  text-decoration-color: var(--accent-line);
}
.stat-strip-label {
  color: var(--muted);
}
.stat-strip-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.stat-strip-empty {
  margin: 0;
  padding: var(--s-2) 0 var(--s-3);
  font-size: 0.75rem;
  color: var(--muted);
}
/* ── Header empty state ─────────────────────────────────────────────────── */
/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 62rem) {
  .process-header-row {
    flex-wrap: wrap;
  }
  .deploy-chip {
    order: 3;
  }
}
@media (max-width: 45rem) {
  .process-header {
    padding: var(--s-3) var(--s-4) 0;
  }
  .process-name {
    flex: 1;
  }
  .process-header-actions {
    flex-basis: 100%;
  }
  .process-header-actions .btn {
    flex: 1;
  }
  .deploy-chip {
    max-width: 100%;
  }
  .stat-strip {
    gap: var(--s-4);
  }
  .process-header-actions .confirm {
    flex-basis: 100%;
    flex-wrap: wrap;
    height: auto;
    padding: var(--s-2);
  }
  .tabs {
    overflow-x: auto;
  }
}
/* ── Tabs ───────────────────────────────────────────────────────────────────
   The spine of the process screen. Every process-scoped function sits behind
   exactly one of these, so there is a single place to look for each:
     Logs    - what is it saying
     Metrics - how is it behaving
     Deploy  - how Hawkeye deploys it (only for processes it deployed)
     Manage  - change it
   ───────────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-bottom: -0.0625rem;
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 2.125rem;
  padding: 0 var(--s-3);
  border: 0;
  border-bottom: 0.125rem solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.tab:hover {
  color: var(--text-dim);
}
.tab[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  color: var(--muted);
}
/* Attention marker on the Manage tab when a process is unmonitored, so the
   feature is discoverable without a permanent banner taking up a row. */
.tab-flag {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--accent);
}
/* State of the deployment on the Deploy tab: running, waiting for the user
   or a failed auto-deploy check, or a failed run. */
.tab-dot {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
}
.tab-dot[data-tone='accent'] {
  background: var(--accent);
}
.tab-dot[data-tone='warning'] {
  background: var(--warning);
}
.tab-dot[data-tone='critical'] {
  background: var(--critical);
}
/* ── Tab panel ──────────────────────────────────────────────────────────── */
.tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tab-panel--scroll {
  overflow-y: auto;
  padding: var(--s-5);
}
@media (max-width: 45rem) {
  .tab-panel {
    overflow: visible;
  }
  .tab-panel--scroll {
    padding: var(--s-4);
  }
}
/* ── Log stream ─────────────────────────────────────────────────────────────
   The panel had two bars of chrome around it: a toolbar on top (filters,
   search, icon buttons) and a status footer below (live dot, counts, a fake
   `tail -f` string). Both are now one toolbar, and the stream gets the rest of
   the height.
   ───────────────────────────────────────────────────────────────────────── */
.log-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.log-toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-5);
  border-bottom: 0.0625rem solid var(--border);
  flex-shrink: 0;
}
/* ── Level filters ──────────────────────────────────────────────────────── */
.log-filters {
  display: flex;
  gap: 0.125rem;
  padding: 0.125rem;
  border-radius: var(--r-1);
  background: var(--bg-2);
  flex-shrink: 0;
}
.log-filter {
  height: 1.5rem;
  padding: 0 var(--s-2);
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}
.log-filter:hover {
  color: var(--text-dim);
}
.log-filter[aria-pressed='true'] {
  background: var(--bg-0);
  color: var(--text);
}
.log-filter[aria-pressed='true'][data-level='info'] {
  color: var(--log-info);
}
.log-filter[aria-pressed='true'][data-level='warn'] {
  color: var(--log-warn);
}
.log-filter[aria-pressed='true'][data-level='error'] {
  color: var(--log-error);
}
/* ── Search ─────────────────────────────────────────────────────────────── */
.log-search {
  position: relative;
  flex: 1;
  max-width: 22rem;
  min-width: 6rem;
}
.log-search .input {
  height: 1.75rem;
  padding-left: 1.875rem;
  font-size: 0.75rem;
  background: var(--bg-2);
}
.log-search-icon {
  position: absolute;
  left: var(--s-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
/* ── Status + actions on the right of the same bar ──────────────────────── */
.log-toolbar-status {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
}
.log-status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--success);
}
.log-status-dot[data-paused='true'] {
  background: var(--warning);
}
.log-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.log-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}
/* ── Stream ─────────────────────────────────────────────────────────────── */
.log-stream-wrapper {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}
.log-stream {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--s-2) 0;
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.65;
}
.log-line {
  display: grid;
  grid-template-columns: 4rem 2.25rem minmax(0, 1fr);
  gap: var(--s-2);
  padding: 0 var(--s-5) 0 var(--s-4);
  border-left: 0.125rem solid transparent;
  content-visibility: auto;
  contain-intrinsic-size: auto 1.25rem;
}
.log-line:hover {
  background: var(--bg-1);
}
.log-line.level-error {
  border-left-color: var(--log-error);
  background: var(--log-error-tint);
}
.log-line.level-error .log-text {
  color: var(--log-error);
}
.log-line.level-warn {
  border-left-color: var(--log-warn);
}
.log-line.level-warn .log-text {
  color: var(--log-warn);
}
.log-line.level-info .log-text {
  color: var(--log-default);
}
.log-load-older {
  display: flex;
  justify-content: center;
  padding: var(--s-2) var(--s-4) var(--s-3);
}
.log-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: none;
}
.log-level-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  align-self: center;
  border-radius: var(--r-1);
  color: var(--muted);
  user-select: none;
}
.log-level-badge--info {
  color: var(--log-info);
}
.log-level-badge--warn {
  color: var(--log-warn);
}
.log-level-badge--error {
  color: var(--log-error);
}
.log-level-badge--spacer {
  visibility: hidden;
}
.log-text {
  color: var(--log-default);
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
}
/* ── New lines pill ─────────────────────────────────────────────────────── */
.new-logs-pill {
  position: absolute;
  bottom: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 1.75rem;
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--accent-line);
  background: var(--bg-2);
  box-shadow: var(--shadow-2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 3;
}
.new-logs-pill:hover {
  background: var(--accent-soft);
}
.log-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
}
@media (max-width: 45rem) {
  .log-toolbar {
    flex-wrap: wrap;
    padding: var(--s-2) var(--s-4);
  }
  .log-search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }
  .log-line {
    grid-template-columns: 3.75rem 2rem minmax(0, 1fr);
    padding: 0 var(--s-3) 0 var(--s-2);
  }
  .log-stream {
    max-height: 60vh;
  }
}
/* ── Chart cards ────────────────────────────────────────────────────────────
   One card shape for every chart, on the Overview and in the Metrics tab:
   label, the current value in large tabular figures, the peak of the stored
   window, then the chart. Charts are always drawn, never behind a click.
   ───────────────────────────────────────────────────────────────────────── */
.chart-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--s-4) var(--s-4) var(--s-3);
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-2);
  background: var(--bg-2);
}
.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 1.125rem;
}
.chart-card-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}
.chart-card-reading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: 0.125rem;
}
.chart-card-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2rem;
  color: var(--text);
}
.chart-card-value--small {
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: nowrap;
}
.chart-card-peak {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.chart-card-peak .num {
  color: var(--text-dim);
}
.chart-card-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-1);
  font-size: 0.6875rem;
  color: var(--muted);
}
.chart-card-legend > span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.chart-card-legend-key {
  width: 0.75rem;
  height: 0;
  border-top-width: 0.125rem;
}
.chart-card-plot {
  margin-top: var(--s-4);
}
.chart-card--small {
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
}
/* ── Metrics panel ──────────────────────────────────────────────────────── */
.metrics-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.metrics-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(23.75rem, 100%), 1fr));
  gap: var(--s-3);
}
.metrics-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
}
.metrics-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) var(--s-3);
  border: 0.0625rem solid var(--accent-line);
  border-radius: var(--r-2);
  background: var(--accent-soft);
}
.metrics-host-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
/* ── Manage panel ───────────────────────────────────────────────────────────
   The single home for every function that changes a process: history,
   alerting, log level, PM2 custom actions and removal, one card each.
   Deployment has its own tab.
   ───────────────────────────────────────────────────────────────────────── */
.manage-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 52.5rem;
}
/* ── What monitoring buys you ───────────────────────────────────────────────
   Stated once, in the place where the switch lives, instead of a permanent
   banner above the logs.
   ───────────────────────────────────────────────────────────────────────── */
.manage-benefits {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-3) 0 0;
  padding: var(--s-3) var(--s-4);
  list-style: none;
  border-radius: var(--r-2);
  background: var(--bg-1);
}
.manage-benefits li {
  display: grid;
  grid-template-columns: 0.875rem 1fr;
  gap: var(--s-2);
  align-items: start;
  font-size: 0.75rem;
  color: var(--muted);
}
.manage-benefits svg {
  margin-top: 0.1875rem;
  color: var(--accent);
}
/* ── PM2 custom actions ─────────────────────────────────────────────────────
   Rendered as a list of named buttons. The old design hid them inside a
   <select>, the only dropdown in the app, which read as a filter rather than
   as a set of triggers.
   ───────────────────────────────────────────────────────────────────────── */
.action-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
}
.action-row-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.input.action-row-input {
  width: 12.5rem;
  height: 1.625rem;
  padding: 0 var(--s-2);
  border-color: var(--border);
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.action-result {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-1);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.75rem;
}
.action-result[data-ok='false'] {
  background: var(--critical-soft);
  color: var(--critical);
}
.action-result--card {
  margin: 0 var(--s-4) var(--s-3);
}
/* ── Segmented control ──────────────────────────────────────────────────────
   The log level picker: every level visible without opening anything, the
   active one in accent. `silent` is dimmed because it stops output entirely.
   ───────────────────────────────────────────────────────────────────────── */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  padding: 0.125rem;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-1);
}
.segmented-item {
  height: 1.625rem;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}
.segmented-item[data-quiet='true'] {
  color: var(--muted);
}
.segmented-item:hover:not(:disabled) {
  color: var(--text);
}
.segmented-item[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.segmented-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Overlays */
/* ── Overlays ───────────────────────────────────────────────────────────────
   One overlay and one modal shell shared by Settings and Deploy. Both used to
   ship their own backdrop, header and close button at different sizes.
   ───────────────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: var(--scrim);
  animation: fade-in 120ms ease both;
}
.modal {
  display: flex;
  width: 100%;
  max-width: 60rem;
  max-height: min(46rem, 100%);
  min-height: 0;
  overflow: hidden;
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--r-2);
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-shrink: 0;
  height: 3rem;
  padding: 0 var(--s-3) 0 var(--s-5);
  border-bottom: 0.0625rem solid var(--border);
}
.modal-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
/* ── Settings ───────────────────────────────────────────────────────────── */
.modal--settings {
  flex-direction: row;
}
.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  width: 13rem;
  flex-shrink: 0;
  padding: var(--s-3);
  border-right: 0.0625rem solid var(--border);
  background: var(--bg-0);
}
.settings-sidebar-title {
  padding: var(--s-2) var(--s-2) var(--s-3);
}
.settings-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease;
}
.settings-nav-item:hover {
  background: var(--bg-2);
}
.settings-nav-item.active {
  background: var(--bg-3);
}
.settings-nav-item.active .settings-nav-label {
  color: var(--text);
}
.settings-nav-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dim);
}
.settings-nav-desc {
  font-size: 0.6875rem;
  color: var(--muted);
}
.settings-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--s-5);
}
/* ── Settings page content ──────────────────────────────────────────────── */
.settings-page {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  max-width: 36rem;
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.settings-group-title {
  margin: 0;
  padding-bottom: var(--s-2);
  border-bottom: 0.0625rem solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-group-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
/* The raw env key stays visible so the file on disk is still findable, but as
   secondary information rather than as the label. */
.settings-group-fields code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  background: var(--bg-2);
  padding: 0.0625rem 0.25rem;
  border-radius: var(--r-1);
}
.settings-unit {
  margin-left: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted);
}
.settings-actions {
  display: flex;
  gap: var(--s-2);
  padding-top: var(--s-2);
}
.settings-notice {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--border);
  background: var(--bg-2);
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.settings-notice--success {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success);
}
.settings-notice--error {
  border-color: transparent;
  background: var(--critical-soft);
  color: var(--critical);
}
.settings-skeleton {
  height: 3.25rem;
  border-radius: var(--r-1);
  background: var(--bg-2);
}
/* ── Choices ────────────────────────────────────────────────────────────── */
.choice-list {
  display: grid;
  gap: var(--s-2);
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-2);
  cursor: pointer;
}
.choice:hover {
  border-color: var(--border-strong);
}
.choice:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.choice input {
  margin-top: 0.1875rem;
  accent-color: var(--accent);
}
.choice strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 1.875rem;
  padding: 0 var(--s-3);
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-2);
  font-size: 0.8125rem;
  cursor: pointer;
}
.checkbox input {
  accent-color: var(--accent);
}
.checkbox:has(input:checked) {
  border-color: var(--accent-line);
  color: var(--text);
}
/* ── Key/value editors ──────────────────────────────────────────────────── */
.kv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 1.75rem;
  gap: var(--s-2);
  align-items: center;
}
.input-suffix {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.input-suffix .input {
  flex: 1;
}
.input-suffix > span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.template-vars {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-3);
  margin: 0;
  padding: var(--s-3);
  border-radius: var(--r-1);
  background: var(--bg-2);
  font-size: 0.75rem;
}
.template-vars dt {
  margin: 0;
}
.template-vars dd {
  margin: 0;
  color: var(--muted);
}
.code-preview {
  margin: 0;
  padding: var(--s-3);
  overflow-x: auto;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre;
}
.reporter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.reporter-head .settings-group-title {
  flex: 1;
}
.test-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.test-row .action-result {
  margin-top: 0;
}
/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 45rem) {
  .overlay {
    padding: 0;
  }
  .modal {
    max-width: none;
    max-height: none;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .modal--settings {
    flex-direction: column;
  }
  .settings-sidebar {
    flex-direction: row;
    width: auto;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 0.0625rem solid var(--border);
  }
  .settings-sidebar-title,
  .settings-nav-desc {
    display: none;
  }
  .settings-body {
    padding: var(--s-4);
  }
  .kv-row {
    grid-template-columns: minmax(0, 1fr) 1.75rem;
  }
  .kv-row .input:first-child {
    grid-column: 1 / -1;
  }
}
/* ── Deploy modal ───────────────────────────────────────────────────────────
   A form only: where the code comes from, how to build and start it, then the
   optional groups folded behind a summary of their current value. Next to it
   a live preview of what the deployment will run. The run itself shows in the
   Deploy tab, not here.
   ───────────────────────────────────────────────────────────────────────── */
.overlay--top {
  align-items: flex-start;
  padding: var(--s-10) var(--s-4);
}
.modal--deploy {
  flex-direction: column;
  max-width: 65rem;
  max-height: 100%;
}
.modal--deploy .field {
  gap: var(--s-2);
}
.modal--deploy .field > label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
}
.modal--deploy .field .hint {
  margin-top: 0;
}
.modal--deploy .input,
.modal--deploy .select,
.modal--deploy .textarea {
  height: 2rem;
  padding: 0 var(--s-3);
  border-color: var(--border);
  background-color: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.modal--deploy .input:focus,
.modal--deploy .select:focus,
.modal--deploy .textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 0.1875rem var(--accent-soft);
}
.modal--deploy .select {
  padding-right: var(--s-8);
}
.modal--deploy .textarea {
  height: auto;
  padding: var(--s-2) var(--s-3);
}
.modal--deploy .input[readonly] {
  opacity: 1;
  cursor: default;
  background-color: var(--bg-1);
  color: var(--muted);
}
.modal-header--stacked {
  height: auto;
  padding: var(--s-4) var(--s-5);
}
.modal-heading {
  flex: 1;
  min-width: 0;
}
.modal-heading .hint {
  margin-top: 0.125rem;
}
.deploy-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
}
.deploy-form {
  flex: 999 1 32.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-5);
}
.deploy-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.deploy-section > legend {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.deploy-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}
.deploy-section-number[data-quiet='true'] {
  background: var(--bg-3);
  color: var(--text-dim);
}
.deploy-section-note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: var(--s-4);
}
/* ── Options list ───────────────────────────────────────────────────────── */
.deploy-options {
  overflow: hidden;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-2);
}
.deploy-option {
  border-bottom: 0.0625rem solid var(--border);
}
.deploy-option:last-child {
  border-bottom: 0;
}
.deploy-option > summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 2.75rem;
  padding: 0 var(--s-3);
  list-style: none;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 100ms ease;
}
.deploy-option > summary::-webkit-details-marker {
  display: none;
}
.deploy-option > summary:hover {
  background: var(--bg-3);
}
.deploy-option[open] .deploy-option-caret {
  transform: rotate(90deg);
}
.deploy-option-caret {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 120ms ease;
}
.deploy-option-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}
.deploy-option-summary {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}
.deploy-option-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-1) var(--s-3) var(--s-4) var(--s-8);
}
.deploy-toggle-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
/* ── Preview column ─────────────────────────────────────────────────────── */
.deploy-preview {
  flex: 1 1 20rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  border-left: 0.0625rem solid var(--border);
  background: var(--bg-0);
}
.deploy-preview-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
.deploy-preview-after {
  margin: 0;
  padding-top: var(--s-3);
  border-top: 0.0625rem solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
}
/* ── Modal footer: the action bar is always visible ─────────────────────── */
.modal-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  flex-shrink: 0;
  padding: var(--s-3) var(--s-5);
  border-top: 0.0625rem solid var(--border);
  background: var(--bg-1);
}
.modal-footer-text {
  flex: 1 1 15rem;
  margin: 0;
}
/* ── Deploy tab ─────────────────────────────────────────────────────────────
   Every deployment action in one place: the configuration, what a redeploy
   runs, auto-deploy and the environment, and the run panel above them while
   a deployment runs.
   ───────────────────────────────────────────────────────────────────────── */
.deploy-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.deploy-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--s-4);
}
.deploy-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.deploy-column--main {
  flex: 999 1 32.5rem;
}
.deploy-column--side {
  flex: 1 1 18.75rem;
}
/* ── Step list: what a deploy runs ──────────────────────────────────────── */
.step-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.step-list-item {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
}
.step-list-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}
.step-list-item[data-skipped='true'] .step-list-number {
  background: var(--bg-3);
  color: var(--muted);
}
.step-list-item[data-skipped='true'] .step-list-title {
  color: var(--muted);
}
.step-list-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.step-list-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0;
}
.step-list-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.step-list-note {
  font-size: 0.75rem;
  color: var(--muted);
}
.step-list-code {
  display: block;
  padding: var(--s-2) var(--s-3);
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-1);
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.125rem;
  color: var(--log-default);
  white-space: pre-wrap;
  word-break: break-all;
}
.step-list--compact .step-list-item {
  grid-template-columns: 1.25rem minmax(0, 1fr);
  padding: 0 0 var(--s-4);
  border-top: 0;
}
.step-list--compact .step-list-number {
  width: 1.25rem;
  height: 1.25rem;
}
.step-list--compact .step-list-code {
  background: var(--bg-1);
}
/* ── Run panel ──────────────────────────────────────────────────────────── */
.deploy-run-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding: var(--s-4);
  border-bottom: 0.0625rem solid var(--border);
}
.deploy-run-icon {
  display: flex;
  margin-top: 0.125rem;
}
.deploy-run[data-outcome='running'] .deploy-run-icon {
  color: var(--accent);
}
.deploy-run[data-outcome='confirm'] .deploy-run-icon {
  color: var(--warning);
}
.deploy-run[data-outcome='failed'] .deploy-run-icon {
  color: var(--critical);
}
.deploy-run[data-outcome='success'] .deploy-run-icon {
  color: var(--success);
}
.deploy-run-heading {
  flex: 1 1 18.75rem;
  min-width: 0;
}
.deploy-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.deploy-run-body {
  display: flex;
  flex-wrap: wrap;
}
.run-steps {
  flex: 1 1 13.75rem;
  max-width: 100%;
  margin: 0;
  padding: var(--s-3) var(--s-2);
  list-style: none;
  border-right: 0.0625rem solid var(--border);
}
.run-step {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  align-items: start;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--r-1);
}
.run-step[data-state='active'],
.run-step[data-state='wait'],
.run-step[data-state='fail'] {
  background: var(--bg-3);
}
.run-step-icon {
  display: flex;
  margin-top: 0.0625rem;
  color: var(--muted);
}
.run-step[data-state='done'] .run-step-icon {
  color: var(--success);
}
.run-step[data-state='active'] .run-step-icon {
  color: var(--accent);
}
.run-step[data-state='wait'] .run-step-icon {
  color: var(--warning);
}
.run-step[data-state='fail'] .run-step-icon {
  color: var(--critical);
}
.run-step-ring {
  width: 0.625rem;
  height: 0.625rem;
  margin: 0.1875rem;
  border: 0.09375rem solid currentColor;
  border-radius: 50%;
}
.run-step-text {
  min-width: 0;
}
.run-step-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.run-step[data-state='pending'] .run-step-title,
.run-step[data-state='skip'] .run-step-title {
  color: var(--muted);
}
.run-step-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-word;
}
.deploy-run-main {
  flex: 999 1 26.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
}
.output-box {
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-2);
  background: var(--bg-0);
}
.output-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-bottom: 0.0625rem solid var(--border);
  font-size: 0.6875rem;
  color: var(--muted);
}
.output-box-title {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.output-box-body {
  min-height: 12.5rem;
  max-height: 28rem;
  overflow-y: auto;
  padding: var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.25rem;
}
.output-line {
  color: var(--log-default);
  white-space: pre-wrap;
  word-break: break-word;
}
.output-line[data-tone='detail'] {
  color: var(--muted);
}
.output-line[data-tone='confirm'] {
  color: var(--warning);
}
.output-line[data-tone='error'] {
  color: var(--critical);
}
.output-line[data-tone='success'] {
  color: var(--success);
}
.spin {
  animation: spin 900ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 45rem) {
  .overlay--top {
    padding: 0;
  }
  .deploy-form,
  .deploy-preview {
    padding: var(--s-4);
  }
  .deploy-preview {
    border-left: 0;
    border-top: 0.0625rem solid var(--border);
  }
  .modal-footer {
    padding: var(--s-3) var(--s-4);
  }
  .run-steps {
    border-right: 0;
    border-bottom: 0.0625rem solid var(--border);
  }
}
/* ── Update banner ──────────────────────────────────────────────────────────
   Pill anchored to the bottom-right that expands into the release notes.
   The pill used to carry a triple outer glow and an infinitely pulsing dot,
   which pulled the eye away from live log output for a notice that is never
   urgent.
   ────────────────────────────────────────────────────────────────────────── */
.update-root {
  position: fixed;
  bottom: calc(var(--footer-h) + var(--s-3));
  right: var(--s-4);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
}
.update-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 1.875rem;
  padding: 0 var(--s-3);
  border-radius: var(--r-1);
  border: 0.0625rem solid var(--accent-line);
  background: var(--bg-2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: background-color 120ms ease, border-color 120ms ease;
}
.update-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.update-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.update-panel {
  width: 26rem;
  max-width: calc(100vw - var(--s-8));
  max-height: min(32rem, 70vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-2);
  border: 0.0625rem solid var(--border-strong);
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
  animation: fade-in 140ms ease both;
}
.update-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-shrink: 0;
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.0625rem solid var(--border);
}
.update-panel-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}
.update-panel-tag {
  display: inline-flex;
  align-items: center;
  height: 1.125rem;
  padding: 0 var(--s-2);
  border-radius: var(--r-1);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}
.update-panel-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.6875rem;
  color: var(--muted);
}
.update-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-4);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.update-panel-body h4,
.update-panel-body h5 {
  margin: var(--s-4) 0 var(--s-2);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.update-panel-body h4:first-child,
.update-panel-body h5:first-child {
  margin-top: 0;
}
.update-panel-body ul {
  margin: var(--s-1) 0 var(--s-3);
  padding-left: var(--s-5);
}
.update-panel-body li {
  margin-bottom: var(--s-1);
}
.update-panel-body p {
  margin: 0 0 var(--s-2);
}
.update-panel-body p:last-child {
  margin-bottom: 0;
}
.update-panel-body code {
  padding: 0.0625rem 0.25rem;
  border-radius: var(--r-1);
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}
.update-panel-body a {
  color: var(--accent);
  text-decoration: none;
}
.update-panel-body a:hover {
  text-decoration: underline;
}
.update-panel-body strong {
  font-weight: 600;
  color: var(--text);
}
.update-empty {
  color: var(--muted);
}
.update-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  flex-shrink: 0;
  padding: var(--s-3) var(--s-4);
  border-top: 0.0625rem solid var(--border);
}
.update-cta {
  text-decoration: none;
}
@media (max-width: 45rem) {
  .update-root {
    right: var(--s-3);
    bottom: var(--s-3);
  }
}
/* Standalone pages */
/* ── Sign-in page ───────────────────────────────────────────────────────── */
.login-page {
  min-height: 100dvh;
  background: var(--bg-0);
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--s-6);
}
.login-panel {
  width: min(100%, 50rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 0.0625rem solid var(--border);
  border-radius: var(--r-2);
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
  animation: fade-in 180ms ease both;
}
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-10) var(--s-8);
  background: var(--bg-2);
  border-right: 0.0625rem solid var(--border);
}
.login-brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
}
.login-brand .brand-pm2 {
  color: var(--accent);
}
.login-brand .brand-hawkeye {
  color: var(--text);
}
.login-brand .subtle {
  font-size: 0.8125rem;
}
.login-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-1);
  background: var(--accent-soft);
}
.login-form-side {
  padding: var(--s-10) var(--s-8);
}
.login-form-side h2 {
  margin: 0 0 var(--s-1);
  font-size: 1.125rem;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-top: var(--s-6);
}
.login-submit {
  height: 2.375rem;
  margin-top: var(--s-1);
}
.login-message {
  margin: 0;
  min-height: 2.5em;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}
.login-message--error {
  color: var(--critical);
}
.login-message--success {
  color: var(--success);
}
@media (max-width: 43.75rem) {
  .login-shell {
    padding: var(--s-4);
  }
  .login-panel {
    grid-template-columns: 1fr;
  }
  .login-brand {
    border-right: 0;
    border-bottom: 0.0625rem solid var(--border);
    padding: var(--s-6);
  }
  .login-form-side {
    padding: var(--s-6);
  }
}
