:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #121a2f;
  --panel-2: #0f1628;
  --border: #243049;
  --text: #e8edf7;
  --muted: #93a0b8;
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --surface-glass: rgba(18, 26, 47, 0.95);
  --sidebar-bg: rgba(15, 22, 40, 0.92);
  --card-bg: rgba(18, 26, 47, 0.92);
  --btn-secondary: #243049;
  --btn-secondary-hover: #2f3f5c;
  --msg-bg: #0b1120;
  --msg-text: #cbd5e1;
  --code-bg: #1e293b;
  --code-text: #cbd5e1;
  --pre-text: #dbe4f3;
  --pill-bg: #243049;
  --pill-text: #cbd5e1;
  --progress-bg: #1e293b;
  --ok-text: #86efac;
  --warn-text: #fcd34d;
  --bad-text: #fca5a5;
  --run-text: #93c5fd;
  --error-inline: #fca5a5;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --accent-soft-2: rgba(91, 140, 255, 0.18);
  --accent-border: rgba(91, 140, 255, 0.4);
  --chat-badge-text: #bfdbfe;
  --chat-badge-bg: rgba(59, 130, 246, 0.18);
  --chat-badge-border: rgba(96, 165, 250, 0.45);
  --bg-gradient-1: rgba(91, 140, 255, 0.12);
  --bg-gradient-2: rgba(124, 92, 255, 0.10);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f8;
  --panel: #ffffff;
  --panel-2: #f6f8fc;
  --border: #d2dbe8;
  --text: #152033;
  --muted: #5f6f86;
  --accent: #3b6eea;
  --accent-2: #6a4fe0;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 14px 36px rgba(21, 32, 51, 0.08);
  --surface-glass: rgba(255, 255, 255, 0.96);
  --sidebar-bg: rgba(255, 255, 255, 0.96);
  --card-bg: rgba(255, 255, 255, 0.98);
  --btn-secondary: #e8eef7;
  --btn-secondary-hover: #dbe5f3;
  --msg-bg: #f8fafc;
  --msg-text: #334155;
  --code-bg: #eef2f8;
  --code-text: #334155;
  --pre-text: #1e293b;
  --pill-bg: #e8eef7;
  --pill-text: #334155;
  --progress-bg: #dbe5f3;
  --ok-text: #15803d;
  --warn-text: #b45309;
  --bad-text: #b91c1c;
  --run-text: #1d4ed8;
  --error-inline: #b91c1c;
  --accent-soft: rgba(59, 110, 234, 0.10);
  --accent-soft-2: rgba(59, 110, 234, 0.16);
  --accent-border: rgba(59, 110, 234, 0.35);
  --chat-badge-text: #1e3a8a;
  --chat-badge-bg: rgba(59, 110, 234, 0.14);
  --chat-badge-border: rgba(59, 110, 234, 0.32);
  --bg-gradient-1: rgba(59, 110, 234, 0.08);
  --bg-gradient-2: rgba(106, 79, 224, 0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background:
    radial-gradient(circle at top left, var(--bg-gradient-1), transparent 28%),
    radial-gradient(circle at top right, var(--bg-gradient-2), transparent 24%),
    var(--bg);
  color: var(--text);
}

.hidden { display: none !important; }

#loginScreen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card p { margin: 0 0 20px; color: var(--muted); }

#appShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.sidebar {
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  border-radius: 12px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.brand:hover {
  background: var(--accent-soft);
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
}
.brand h1 { margin: 0; font-size: 18px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.nav { display: grid; gap: 8px; }
.nav button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.nav button:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.nav button.active {
  background: var(--accent-soft-2);
  border-color: var(--accent-border);
}
.nav button:active {
  transform: scale(0.99);
}

.content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}
main.content > .page:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.page-workspace {
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  align-items: stretch;
}
.workspace-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.workspace-scroll {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.workspace-detail {
  flex: 1;
  min-height: 280px;
  max-height: none;
  overflow-y: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h2 { margin: 0; font-size: 28px; }
.topbar .meta { color: var(--muted); font-size: 13px; }
.live-processing-bar {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.live-processing-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: var(--text);
  font-size: 12px;
}
.live-processing-chip.queued {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  width: min(440px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal-card h3 { margin: 0 0 8px; }
.catchup-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.catchup-dates label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.catchup-dates input[type="date"] {
  width: 100%;
}
.login-error {
  color: #fca5a5;
  font-size: 13px;
  min-height: 1.2em;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.two { grid-template-columns: 1.2fr 0.8fr; }

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 16px; }
.card-static { cursor: default; }

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.card-header-row h3 { margin: 0; }

.settings-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.settings-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.settings-note code {
  color: var(--code-text);
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}
.settings-pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--pre-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  cursor: text;
  user-select: text;
}
.health-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.health-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 15px;
}
.health-item .name { font-weight: 600; }
.health-item .value { color: var(--muted); text-align: right; }
.health-item .value.ok { color: var(--ok-text); }
.health-item .value.bad { color: var(--bad-text); }

.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 6px; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

input, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}
input:focus { border-color: var(--accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
button.primary, button.secondary, button.danger {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, filter 0.15s ease;
}
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: 1px solid transparent;
}
button.primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(91, 140, 255, 0.35);
}
button.secondary {
  background: var(--btn-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover {
  background: var(--btn-secondary-hover);
  border-color: var(--accent-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
button.danger { background: #9a3412; color: white; }
button.danger:hover { filter: brightness(1.1); }
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}
button:focus-visible {
  outline: 2px solid rgba(91, 140, 255, 0.65);
  outline-offset: 2px;
}

.btn-toolbar {
  min-width: 120px;
  font-size: 14px;
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--pill-bg);
}
.badge.ok { background: rgba(34, 197, 94, 0.15); color: var(--ok-text); }
.badge.warn { background: rgba(245, 158, 11, 0.15); color: var(--warn-text); }
.badge.bad { background: rgba(239, 68, 68, 0.15); color: var(--bad-text); }
.badge.run { background: rgba(91, 140, 255, 0.15); color: var(--run-text); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  background: var(--panel-2);
  position: sticky;
  top: 0;
}
tr[data-clickable="true"] { cursor: pointer; }
tr[data-clickable="true"]:hover td {
  background: var(--accent-soft);
}
tr[data-clickable="true"]:active td {
  background: var(--accent-soft-2);
}
tr.active td { background: var(--accent-soft-2); }

.stat { cursor: default; }
.stat:hover { transform: none; }

label.clickable {
  cursor: pointer;
  transition: color 0.15s ease;
}
label.clickable:hover { color: var(--text); }
select:hover { border-color: rgba(91, 140, 255, 0.35); }
input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
  cursor: pointer;
  accent-color: var(--accent);
}

.progress {
  height: 10px;
  background: var(--progress-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}

.job-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-2);
  margin-bottom: 12px;
}
.job-card.clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.job-card.clickable:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.job-card.clickable:active {
  transform: scale(0.995);
}
.section-head-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.toolbar-row {
  margin: 0;
  align-items: center;
}
.toolbar-select {
  width: auto;
  min-width: 170px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
}
.danger-btn {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}
.danger-btn:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.55);
}
.chat-group-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--chat-badge-text);
  background: var(--chat-badge-bg);
  border: 1px solid var(--chat-badge-border);
}
.chat-group-badge.in-head {
  margin-top: 0;
}
.execution-subtitle {
  display: none;
}
.execution-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.execution-stats.job-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
.msg-sender {
  margin-top: 6px;
  color: var(--text);
  font-weight: 600;
}
.job-card.active-card {
  border-color: var(--accent-border);
  background: var(--accent-soft-2);
  box-shadow: 0 0 0 1px var(--accent-border);
}
.job-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.job-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.history-card-delete {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.history-card-delete:hover {
  color: var(--bad-text);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}
.job-title { font-weight: 700; }
.job-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
}

.detail-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}
.job-detail-panel {
  min-height: 280px;
}
.job-detail-panel.workspace-detail {
  min-height: 280px;
}
.job-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.job-detail-head h3 {
  margin: 0;
  font-size: 18px;
}
.job-detail-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.job-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.job-stat {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-align: center;
}
.job-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.job-stat-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.job-stat.ok .job-stat-value { color: var(--ok-text); }
.job-stat.warn .job-stat-value { color: var(--warn-text); }
.job-stat.bad .job-stat-value { color: var(--bad-text); }
.job-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.job-time-chip {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.job-time-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.job-time-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.job-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
  color: var(--error-inline);
  font-size: 13px;
}
.job-messages-head {
  margin: 16px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.job-row-detail {
  color: var(--error-inline) !important;
}
.msg-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  background: var(--msg-bg);
}
.msg-row .text { color: var(--msg-text); margin-top: 8px; line-height: 1.45; }

.chat-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.chat-detail-head h3 { margin: 0; }

.section-head {
  margin-bottom: 12px;
}
.section-head h3 {
  margin: 0;
}
.section-lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.page-hint {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--accent-soft);
  overflow: hidden;
}
.page-hint summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.page-hint summary::-webkit-details-marker { display: none; }
.page-hint summary::before {
  content: "i";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--accent-soft-2);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}
.page-hint summary::after {
  content: "?";
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.15s ease;
}
.page-hint[open] summary::after {
  transform: rotate(180deg);
}
.page-hint .hint-body {
  padding: 0 16px 14px;
}
.hint-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hint-col {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.hint-col strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 14px;
}
.hint-col p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.hint-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--pill-bg);
  color: var(--pill-text);
}
.hint-tag-live {
  background: rgba(91, 140, 255, 0.14);
  color: var(--run-text);
}

.empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
}

.hint-divider {
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-toggle-login {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
}

.view-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 14px;
}

.scroll-panel {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.chat-history-panel {
  max-height: min(72vh, 860px);
  min-height: 560px;
}
.detail-panel.scroll-panel {
  max-height: 520px;
}
.job-msg-list {
  max-height: min(36vh, 480px);
  min-height: 180px;
}

@media (min-height: 900px) {
  .workspace-scroll,
  .workspace-detail.job-detail-panel {
    min-height: calc(100vh - 300px);
  }
  .journal-list-panel {
    min-height: calc(100vh - 260px);
  }
  .dashboard-workspace .workspace-scroll {
    min-height: calc(100vh - 320px);
  }
  .job-msg-list {
    max-height: min(42vh, 620px);
    min-height: 240px;
  }
}

@media (min-height: 1080px) and (min-width: 1600px) {
  .workspace-scroll,
  .workspace-detail.job-detail-panel {
    min-height: calc(100vh - 280px);
  }
  .journal-list-panel {
    min-height: calc(100vh - 240px);
  }
  .dashboard-workspace .workspace-scroll {
    min-height: calc(100vh - 300px);
  }
  .job-msg-list {
    max-height: min(48vh, 760px);
    min-height: 280px;
  }
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: var(--muted);
}
.status-dot.ok { background: var(--ok); }
.status-dot.bad { background: var(--bad); }

@media (max-width: 960px) {
  #appShell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .grid.two { grid-template-columns: 1fr; }
  .hint-cols { grid-template-columns: 1fr; }
  .job-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-timeline { grid-template-columns: 1fr; }
}
