/* Task-oriented Jobs workspace; inherits the dashboard's theme. */
.jobs-host { container-type: inline-size; padding: 0 14px 20px; }
.jobs-head { padding: 18px 0 0; }
.jobs-titlebar, .jobs-source, .jobs-health, .jobs-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jobs-titlebar h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
.jobs-titlebar .jobs-add-btn { min-height: 34px; padding: 6px 12px; background: var(--accent, #6e8caf); color: var(--bg); border: 0; border-radius: 6px; }
.jobs-source { justify-content: flex-start; flex-wrap: wrap; margin: 12px 0; font-size: 12px; color: var(--text-muted); }
.jobs-source label { display: flex; align-items: center; gap: 6px; }
.jobs-source select { max-width: 180px; }
.jobs-host select, .jobs-host input { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 7px 9px; min-width: 0; }
.jobs-refresh, .jobs-more { color: var(--accent, #6e8caf); background: transparent; border: 0; font: inherit; cursor: pointer; padding: 8px 0; text-align: left; }
.jobs-refresh { margin-left: auto; }
.jobs-health { align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0 14px; font-size: 12px; color: var(--text-muted); }
.jobs-health > :first-child { color: var(--text); font-weight: 600; }
.jobs-health > .needs-attention { color: var(--orange); }
.jobs-views { display: flex; border-bottom: 1px solid var(--border); gap: 18px; }
.jobs-views button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); padding: 10px 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.jobs-views button.is-active { color: var(--text); border-bottom-color: var(--accent, #6e8caf); }
.jobs-views button:hover, .jobs-refresh:hover, .jobs-more:hover { color: var(--text); }
.jobs-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; font-size: 12px; }
.jobs-tools input { flex: 1 1 150px; width: 0; }
.jobs-tools select { flex: 0 1 160px; max-width: 45%; text-overflow: ellipsis; }
.jobs-tools input::placeholder { color: var(--text-muted); opacity: 1; }
.jobs-host :is(button, input, select):focus-visible { outline: 2px solid var(--accent, #6e8caf); outline-offset: 3px; }
.jobs-notice { padding: 10px 0; color: var(--orange); font-size: 13px; line-height: 1.5; }
.jobs-section { margin-top: 24px; }
.jobs-section:first-child { margin-top: 10px; }
.jobs-section-heading { justify-content: flex-start; gap: 8px; }
.jobs-section-heading h3 { margin: 0; font-size: 15px; font-weight: 650; }
.jobs-section-heading > span { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.jobs-section-hint { margin: 5px 0 12px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.jobs-clear { display: flex; flex-direction: column; gap: 5px; padding: 18px 0 4px; }
.jobs-clear strong { font-size: 15px; font-weight: 600; }
.jobs-clear span { font-size: 12px; color: var(--text-muted); }
.jobs-host .job-row { padding: 0; border-radius: 0; border-bottom: 1px solid var(--border); cursor: default; }
.jobs-host .job-row.st-disabled { opacity: 1; }
.jobs-host .job-row:hover { background: transparent; }
.job-toggle { display: block; width: 100%; padding: 14px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.job-toggle:hover, .is-open > .job-toggle { background: var(--surface-2); }
.jobs-host .job-name { max-width: none; flex: 1 1 auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; font-size: 14px; font-weight: 600; }
.job-status { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.st-failed .job-status { color: var(--red); }
.st-stale .job-status { color: var(--orange); }
.st-running .job-status { color: var(--accent, #6e8caf); }
.job-chevron { flex: 0 0 12px; text-align: center; color: var(--text-muted); }
.job-purpose { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--text-muted); overflow-wrap: anywhere; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.job-meta > span { overflow-wrap: anywhere; }
.job-timing { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.job-timing > :last-child { color: var(--text); }
.job-result { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.jobs-host .job-detail { margin: 0; padding: 12px 8px 16px; gap: 10px; }
.jobs-host .job-facts { display: block; line-height: 1.6; }
.job-log-title { font-size: 12px; font-weight: 600; margin: 4px 0 0; }
.jobs-host .job-log { padding: 12px; }
.jobs-empty strong { display: block; color: var(--text); font-weight: 600; }
.jobs-empty p { font-size: 13px; }
@container (max-width: 380px) {
  .jobs-views { gap: 0; justify-content: space-between; }
  .jobs-views button { font-size: 12px; }
  .jobs-titlebar h2 { font-size: 18px; }
  .job-toggle { padding: 12px 2px; }
  .job-line1 { flex-wrap: wrap; gap: 5px; }
  .jobs-host .job-name { flex-basis: 65%; }
  .jobs-source { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .jobs-host .job-live i, .jobs-host .job-livenote i { animation: none; }
}

.jobs-source label { font-size: 0; gap: 0; }
.jobs-source select { font-size: 12px; max-width: 140px; }
.jobs-host .job-event { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; margin-top: 8px; }
.job-event time { display: block; color: var(--text-muted); }
