.table-region.job-monitor-view .table-wrap {
  max-height: none;
  overflow: hidden;
}

.job-monitor-shell {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  grid-template-rows: minmax(390px, calc(100vh - 590px)) minmax(230px, 34vh);
  min-height: 650px;
}

.job-monitor-nav {
  grid-row: 1 / 3;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(2, 8, 4, 0.62);
}

.job-monitor-nav > header,
.job-monitor-runs > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.job-monitor-nav > header span,
.job-monitor-runs > header span,
.job-monitor-log-heading span {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-monitor-nav > header small,
.job-monitor-runs > header em,
.job-monitor-log-heading em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.job-monitor-group {
  border-bottom: 1px solid rgba(39, 248, 107, 0.12);
}

.job-monitor-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 950;
  list-style: none;
}

.job-monitor-group summary::-webkit-details-marker { display: none; }
.job-monitor-group summary span::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--muted); }
.job-monitor-group[open] summary span::before { transform: rotate(90deg); color: var(--accent-strong); }
.job-monitor-group summary em { color: var(--muted); font-size: 10px; font-style: normal; }

.job-monitor-job-list { padding: 0 8px 10px; }

.job-monitor-job-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  overflow: hidden;
}

.job-monitor-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.job-monitor-job-row:hover { background: rgba(39, 248, 107, 0.07); }
.job-monitor-job-row:hover .job-monitor-job { color: var(--text); }
.job-monitor-job-row.is-selected { background: var(--accent); }
.job-monitor-job-row.is-selected .job-monitor-job { color: #001607; }
.job-monitor-job em { font-size: 9px; font-style: normal; opacity: 0.72; }

.job-monitor-job-run {
  flex: none;
  width: 34px;
  min-height: 36px;
  border: 0;
  border-left: 1px solid rgba(0, 22, 7, .22);
  background: rgba(0, 22, 7, .12);
  color: #001607;
  font-size: 20px;
  font-weight: 900;
}

.job-monitor-job-run:hover { background: rgba(0, 22, 7, .23); }

.job-monitor-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #010402;
}

.job-monitor-actionbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 46px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
  background: #061008;
}

.job-monitor-action-summary {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 14px;
}

.job-monitor-queue-counts { display: flex; flex: none; align-items: stretch; gap: 6px; }

.job-monitor-queue-counts > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, .025);
}

.job-monitor-queue-counts strong { color: var(--text); font-size: 14px; line-height: 1; }
.job-monitor-queue-counts em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.job-monitor-queue-counts .is-active strong { color: var(--accent-strong); }
.job-monitor-queue-counts .is-queued strong { color: #f4d35e; }

.job-monitor-actionbar-notice {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-monitor-actionbar button {
  flex: none;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 104, 119, .55);
  border-radius: 5px;
  background: rgba(255, 104, 119, .08);
  color: #ff9aa4;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.job-monitor-actionbar button:hover { background: rgba(255, 104, 119, .15); }
.job-monitor-actionbar button:disabled { cursor: wait; opacity: .55; }
.job-monitor-detail { min-width: 0; min-height: 0; overflow: hidden; }
.job-monitor-detail > * { height: 100%; }

.job-monitor-detail-empty {
  display: grid;
  align-content: center;
  min-height: 100%;
  max-width: 580px;
}

.job-monitor-detail-empty { padding: 24px; }

.job-monitor-detail-empty span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.job-monitor-detail-empty h3 { margin: 8px 0 4px; font-size: 22px; }
.job-monitor-detail-empty p { color: var(--muted); line-height: 1.55; }

.job-monitor-console {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.job-monitor-console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #061008;
}

.job-monitor-console-bar div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.job-monitor-console-bar strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.job-monitor-console-bar code { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.job-monitor-console-bar > span { flex: none; margin-left: 12px; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }

.job-monitor-transcript {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 18px 20px 28px;
  background: #010402;
  color: #c8d5cb;
  font: 11px/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
}

.job-monitor-transcript:focus { outline: 1px solid rgba(39, 248, 107, .45); outline-offset: -1px; }

.job-monitor-runs {
  min-width: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: rgba(2, 8, 4, 0.42);
}

.job-monitor-runs > header { position: sticky; top: 0; z-index: 2; background: rgba(4, 12, 5, 0.98); }
.job-monitor-runs > header div { display: flex; align-items: baseline; gap: 10px; }
.job-monitor-runs > header strong { color: var(--muted); font-size: 12px; }
.job-monitor-run-table { min-width: 760px; }
.job-monitor-run-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 1.4fr) minmax(120px, .75fr) minmax(100px, .65fr) minmax(100px, .65fr); align-items: center; width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.055); background: transparent; color: var(--text); font-size: 11px; text-align: left; }
.job-monitor-run-row:not(.job-monitor-run-header):hover { background: rgba(39, 248, 107, 0.06); }
.job-monitor-run-row.is-selected { background: rgba(39, 248, 107, 0.13); box-shadow: inset 3px 0 var(--accent); }
.job-monitor-run-header { min-height: 32px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.job-monitor-run-row > span:nth-child(3) { display: flex; align-items: center; gap: 7px; }
.job-monitor-status { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.job-monitor-status.status-running { background: var(--accent); box-shadow: 0 0 0 4px rgba(39, 248, 107, 0.1); }
.job-monitor-status.status-queued { background: #f4d35e; }
.job-monitor-status.status-failed { background: var(--bad); }
.job-monitor-status.status-completed { background: #7ebd92; }
.job-monitor-status.status-cancelled { background: #8e98a0; }
.job-monitor-empty { padding: 24px 16px; color: var(--muted); font-size: 12px; }

.job-monitor-console-bar .status-running { color: var(--accent-strong); }
.job-monitor-console-bar .status-queued { color: #f4d35e; }
.job-monitor-console-bar .status-failed { color: #ff9aa4; }
.job-monitor-console-bar .status-completed { color: #9bd4aa; }
.job-monitor-console-bar .status-cancelled { color: #aab0b4; }

.job-trigger-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 4, 1, .78);
  backdrop-filter: blur(3px);
}

.job-trigger-modal {
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(39, 248, 107, .38);
  border-radius: 10px;
  background: #071009;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .56);
}

.job-trigger-modal > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 9, .98);
}

.job-trigger-modal > header span { color: var(--accent-strong); font-size: 10px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.job-trigger-modal > header h3 { margin: 4px 0 0; color: var(--text); font-size: 21px; }
.job-trigger-modal > header button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: 20px; }
.job-trigger-modal > header button:hover { border-color: var(--accent); color: var(--text); }
.job-trigger-modal form { padding: 18px 20px 20px; }
.job-trigger-modal form > p { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.job-trigger-warning {
  display: grid;
  gap: 2px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-left: 3px solid #f4d35e;
  background: rgba(244, 211, 94, .07);
}

.job-trigger-warning strong { color: #f6db76; font-size: 11px; text-transform: uppercase; }
.job-trigger-warning span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.job-trigger-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.job-trigger-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.job-trigger-field > span { display: flex; justify-content: space-between; gap: 10px; color: var(--text); font-size: 11px; font-weight: 900; }
.job-trigger-field em, .job-trigger-check em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.job-trigger-field input, .job-trigger-field select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #0c160e; color: var(--text); font-family: inherit; font-size: 12px; line-height: 1.2; }
.job-trigger-field input:focus, .job-trigger-field select:focus { border-color: var(--accent); outline: 0; }
.job-trigger-field small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.job-trigger-confirmation { grid-column: 1 / -1; }
.job-trigger-confirmation input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.job-trigger-check { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; min-height: 39px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 11px; font-weight: 850; }
.job-trigger-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.job-trigger-message { min-height: 20px; padding-top: 11px; color: #ff9aa4; font-size: 11px; font-weight: 800; }
.job-trigger-modal footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.job-trigger-modal footer button { min-width: 96px; min-height: 39px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 950; }
.job-trigger-cancel { background: transparent; color: var(--muted); }
.job-trigger-submit { border-color: var(--accent) !important; background: var(--accent); color: #001607; }
.job-trigger-submit:disabled { cursor: wait; opacity: .55; }

@media (max-width: 840px), (pointer: coarse) and (max-width: 1024px) {
  .table-region.job-monitor-view .table-wrap { overflow: visible; }
  .job-monitor-shell { display: flex; flex-direction: column; min-height: 0; }
  .job-monitor-nav { max-height: 310px; border-right: 0; border-bottom: 1px solid var(--line); }
  .job-monitor-main { flex: none; width: 100%; height: clamp(300px, 52dvh, 460px); min-height: 0; max-height: 460px; }
  .job-monitor-actionbar { justify-content: space-between; padding: 7px 10px; }
  .job-monitor-action-summary { gap: 8px; }
  .job-monitor-actionbar-notice { display: none; }
  .job-monitor-queue-counts > span { display: grid; gap: 2px; min-width: 58px; padding: 4px 7px; }
  .job-monitor-runs { order: 3; max-height: none; }
  .job-monitor-run-table > .job-monitor-run-row:nth-child(n + 12) { display: none; }
  .job-monitor-console-bar code { display: none; }
  .job-monitor-transcript { overflow-y: auto; overscroll-behavior: contain; padding: 14px; font-size: 10px; -webkit-overflow-scrolling: touch; }
  .job-trigger-backdrop { align-items: end; padding: 10px; }
  .job-trigger-modal { max-height: calc(100vh - 20px); }
  .job-trigger-modal > header, .job-trigger-modal form { padding-left: 15px; padding-right: 15px; }
  .job-trigger-fields { grid-template-columns: 1fr; }
  .job-trigger-confirmation, .job-trigger-check { grid-column: auto; }
}
