:root {
  --bg: #0d141c;
  --surface: #131c26;
  --surface-2: #16212c;
  --surface-3: #0f1820;
  --line: #2c3b4c;
  --text: #d7dee6;
  --muted: #8fa3b5;
  --accent: #569cd6;
  --accent-2: #4ec9b0;
  --accent-dark: #1f6f95;
  --sheen-ice: rgba(156, 220, 254, 0.065);
  --sheen-pearl: rgba(120, 160, 220, 0.052);
  --edge-light: rgba(190, 225, 255, 0.16);
  --grid-bg: #0c141d;
  --cell-tint: rgba(140, 200, 255, 0.045);
  --cell-tint-alt: rgba(140, 200, 255, 0.075);
  --input-tint: #19293a;
  --select-bg: #16344a;
  --select-bg-hover: #1d4560;
  --select-bg-bright: #1e4c66;
  --select-bg-bright-hover: #245a78;
  --chrome-dark-bg: linear-gradient(165deg, rgba(156, 220, 254, 0.08) 0%, transparent 50%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 45%),
    linear-gradient(90deg, var(--section-accent-medium), rgba(31, 111, 149, 0.045)),
    var(--surface-2);
  --chrome-dark-bg-hover: linear-gradient(165deg, rgba(156, 220, 254, 0.1) 0%, transparent 50%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 45%),
    linear-gradient(90deg, var(--section-accent-medium), rgba(31, 111, 149, 0.11)),
    var(--surface-2);
  --section-accent-bg: rgba(31, 111, 149, 0.22);
  --section-accent-weak: rgba(31, 111, 149, 0.11);
  --section-accent-medium: rgba(31, 111, 149, 0.18);
  --detail-row-line: rgba(156, 220, 254, 0.12);
  --success: #6a9955;
  --danger: #f14c4c;
  --warning: #dcdcaa;
  --control: #1c2936;
  --terminal: #0a1016;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0e1722 0%, #0d141c 38%, #0c1219 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: Consolas, "Cascadia Mono", "Segoe UI", monospace;
  font-size: 14px;
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px max(14px, calc((100vw - 1680px) / 2));
  background: #101923;
  background-image: linear-gradient(180deg, rgba(156, 220, 254, 0.06), transparent 70%);
  color: var(--text);
  border-bottom: 1px solid #2a4a66;
}

.brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.nav a,
.logout-form button,
.button-link,
button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 10px;
  background: var(--control);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.nav a {
  color: var(--text);
  background: var(--chrome-dark-bg);
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.logout-form button {
  background: var(--chrome-dark-bg);
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.nav a:hover,
button:hover,
.button-link:hover {
  border-color: var(--accent);
}

.logout-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.user-chip {
  color: var(--muted);
  white-space: nowrap;
}

.page {
  width: min(1680px, calc(100vw - 28px));
  margin: 18px auto 30px;
}

.section-head {
  border: 1px solid rgba(86, 156, 214, 0.45);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 36%),
    linear-gradient(90deg, var(--section-accent-bg), rgba(31, 111, 149, 0.08));
  box-shadow: inset 0 1px 0 var(--edge-light);
  margin-bottom: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: #fff;
  font-size: 26px;
  margin-bottom: 5px;
}

h2 {
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 9px;
}

h3 {
  color: #9cdcfe;
  font-size: 13px;
  margin-bottom: 8px;
}

.muted,
.section-head p {
  color: var(--muted);
}

.section-head p {
  margin-bottom: 0;
}

.login-shell {
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
}

.login-panel,
.audit-card,
.run-panel,
.status-panel,
.result-panel,
.registry-panel,
.workbench-panel {
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 36%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.login-panel {
  width: min(430px, 100%);
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 9px;
  color: var(--text);
  font: inherit;
}

input,
textarea {
  border-color: #34516b;
  background: var(--input-tint);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

textarea {
  min-height: 58px;
  resize: vertical;
}

select,
.searchable-toggle {
  min-height: 32px;
  border-color: var(--line);
  background: var(--chrome-dark-bg);
  box-shadow: inset 0 1px 0 var(--edge-light);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

select:hover,
.searchable-toggle:hover {
  background: var(--chrome-dark-bg-hover);
}

.operator-toolbar select {
  border-color: var(--accent);
  background: var(--select-bg-bright);
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.operator-toolbar select:hover {
  background: var(--select-bg-bright-hover);
}

[data-refresh-scope],
[data-refresh-results],
[data-refresh-history] {
  border-color: var(--accent);
  background: var(--select-bg-bright);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 var(--edge-light);
}

[data-refresh-scope]:hover,
[data-refresh-results]:hover,
[data-refresh-history]:hover {
  background: var(--select-bg-bright-hover);
}

.primary,
.button-link {
  background: var(--accent-dark);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.secondary {
  background: #203040;
  color: var(--text);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.error {
  margin: 10px 0;
  border: 1px solid #a34f4f;
  border-radius: 5px;
  padding: 9px 10px;
  color: #ffd7d7;
  background: #402020;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-console {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.audit-rail {
  display: grid;
  gap: 12px;
}

.compact-audit-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
}

.compact-audit-card .card-head {
  justify-content: center;
  flex-wrap: wrap;
}

.compact-audit-card .button-link {
  justify-self: center;
}

.compact-audit-card p {
  min-height: 42px;
  margin-bottom: 0;
  color: var(--muted);
}

.registry-panel {
  min-width: 0;
}

.registry-table-wrap {
  max-height: 620px;
}

.registry-table td:nth-child(2) {
  font-weight: 700;
}

.card-head,
.action-row,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head {
  margin-bottom: 10px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.results-head-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  gap: 6px 24px;
  align-items: center;
}

.results-head-row h2 {
  grid-column: 1;
  justify-self: start;
}

.results-run-summary[hidden] {
  display: none;
}

.results-run-summary {
  display: grid;
  gap: 3px;
  grid-column: 2;
  min-width: 0;
  justify-self: start;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.results-progress-row[hidden] {
  display: none;
}

.results-progress-row {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.results-status-line {
  display: grid;
  min-width: 0;
}

.results-context-title {
  min-width: 0;
  overflow: hidden;
  color: #e6f4ff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}

.results-context-progress {
  display: block;
  min-width: 0;
}

.results-context-progress .history-progress {
  width: 100%;
}

.results-context-progress .history-progress-track {
  height: 8px;
}

.results-progress.is-running-progress .history-progress-track {
  border-color: rgba(156, 220, 254, 0.32);
  box-shadow: 0 0 12px rgba(86, 156, 214, 0.16), inset 0 1px 0 rgba(190, 225, 255, 0.14);
}

.results-progress.is-running-progress .history-progress-fill::after {
  animation: historyProgressShimmer 2.2s linear infinite;
}

.results-progress .history-progress-count.progress-count-bump {
  color: #d9f2ff;
  border-radius: 4px;
  animation: progressCounterBump 1.2s ease-out;
}

.results-context-fields {
  display: grid;
  grid-template-columns: repeat(3, max-content minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, auto));
  grid-auto-rows: 0;
  gap: 2px 7px;
  align-items: baseline;
  justify-content: start;
  min-width: 0;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.25;
  text-align: left;
}

.results-context-fields .history-field-label,
.results-context-fields .history-field-value {
  white-space: nowrap;
}

.results-actions {
  grid-column: 3;
  flex: 0 0 auto;
  justify-self: end;
  justify-content: flex-end;
}

.results-actions [data-run-status] {
  max-width: 220px;
  text-align: right;
}

.compact-head {
  margin-bottom: 5px;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.status.online {
  color: #c4f2ce;
  background: #16331f;
}

.status.offline {
  color: #ffd7d7;
  background: #402020;
}

dl {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 14px 0 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

pre {
  min-height: 120px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background: var(--terminal);
  color: #dce8ee;
  white-space: pre-wrap;
}

.audit-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.operator-title-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.operator-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
}

.compact-select {
  width: 240px;
  margin: 0;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(320px, 380px);
  gap: 14px;
  align-items: stretch;
}

.operator-workbench {
  min-height: calc(100vh - 160px);
}

.workbench-left {
  min-width: 0;
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(220px, 280px);
  gap: 12px;
  align-items: stretch;
}

.filter-rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.operator-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr);
  gap: 12px;
}

.activity-rail {
  min-width: 0;
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto minmax(220px, 280px);
  gap: 12px;
  overflow: hidden;
}

.output-panel {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.scope-form {
  display: grid;
  gap: 2px;
}

.scope-primary-fields,
.scope-secondary-fields,
.scope-date-grid {
  display: grid;
  gap: 2px;
}

.scope-date-box {
  display: grid;
  gap: 6px;
  margin: 6px 0 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(165deg, rgba(156, 220, 254, 0.08), transparent 44%),
    rgba(11, 19, 27, 0.42);
}

.scope-date-box legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.searchable-combo-field {
  position: relative;
}

.searchable-select {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.searchable-select > select {
  display: none;
}

.searchable-toggle {
  display: block;
  width: 100%;
  height: auto;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  text-align: left;
  overflow: hidden;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.searchable-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1200;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.searchable-menu.open {
  display: block;
}

.searchable-search {
  width: 100%;
  height: 34px;
  margin-bottom: 6px;
}

.searchable-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-3);
}

.searchable-item {
  padding: 6px 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.25;
  user-select: none;
  overflow-wrap: anywhere;
}

.searchable-item:hover,
.searchable-item.active {
  color: #fff;
  background: #21333f;
}

.searchable-empty {
  padding: 6px 7px;
  color: var(--muted);
  font-size: 13px;
}

.check-field {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  color: var(--text);
}

.check-field input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.run-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 5px;
}

.compact-meta {
  grid-template-columns: 70px minmax(0, 1fr);
  font-size: 12px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  justify-content: center;
  gap: 9px;
}

.kpi-card {
  min-height: 72px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  text-align: center;
  background: var(--chrome-dark-bg);
  border-color: rgba(86, 156, 214, 0.4);
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.kpi-card span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-card strong {
  color: #fff;
  font-size: 24px;
}

.kpi-card.pass strong {
  color: var(--success);
}

.kpi-card.fail strong {
  color: var(--danger);
}

.kpi-card.review strong {
  color: var(--warning);
}

.kpi-card.active {
  border-color: var(--accent);
  background:
    linear-gradient(165deg, rgba(156, 220, 254, 0.1) 0%, transparent 50%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 45%),
    linear-gradient(90deg, var(--section-accent-medium), rgba(31, 111, 149, 0.12)),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent), inset 0 1px 0 var(--edge-light);
}

.slicer-grid {
  display: grid;
  grid-template-columns: 170px 170px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.slicer-grid label {
  margin: 0;
}

.slicer-grid label > span {
  font-size: 11px;
}

.slicer-grid select,
.slicer-grid input,
.slicer-grid .searchable-toggle {
  min-height: 32px;
  font-size: 12px;
}

.summary-strip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.summary-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-2);
  background-image: linear-gradient(180deg, rgba(156, 220, 254, 0.07), transparent 62%);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 34%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 42%),
    linear-gradient(90deg, var(--section-accent-weak), rgba(31, 111, 149, 0.035)),
    rgba(15, 24, 32, 0.48);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.summary-card .panel-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.mini-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  max-height: 160px;
  background: var(--grid-bg);
}

.results-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 34%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 42%),
    linear-gradient(90deg, var(--section-accent-weak), rgba(31, 111, 149, 0.035)),
    rgba(15, 24, 32, 0.48);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding-right: 0;
  background: var(--grid-bg);
  scrollbar-gutter: auto;
}

.result-table-wrap {
  max-height: 620px;
}

.operator-workbench.has-expanded-result .workbench-left {
  grid-template-rows: auto minmax(220px, 280px);
}

.operator-workbench.has-expanded-flag-matrix .workbench-left {
  grid-template-rows: auto minmax(220px, 280px);
}

.operator-workbench.has-expanded-result .operator-main {
  grid-template-rows: auto auto auto auto;
}

.operator-workbench.has-expanded-flag-matrix .operator-main {
  grid-template-rows: auto auto auto auto;
}

.operator-workbench.has-expanded-result .results-shell {
  min-height: max-content;
}

.operator-workbench.has-expanded-result .result-table-wrap {
  max-height: var(--results-expanded-height, 480px);
}

.summary-card[data-summary-card="flag"] .mini-table-wrap {
  max-height: none;
  overflow: visible;
}

.operator-workbench.has-expanded-flag-matrix .summary-card[data-summary-card="flag"] .mini-table-wrap {
  max-height: none;
  overflow: visible;
}

.result-table-wrap.has-scrollbar {
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: var(--grid-bg);
}

.results-table th,
.results-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  padding: 7px 8px;
  text-align: center;
  vertical-align: top;
}

.results-table td.text-cell,
.detail-card,
.detail-card td {
  text-align: left;
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.table-wrap > .results-table > thead > tr > th,
.mini-table-wrap > .results-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #9cdcfe;
  background:
    linear-gradient(170deg, rgba(156, 220, 254, 0.085) 0%, transparent 56%),
    linear-gradient(180deg, #13202b, var(--grid-bg));
  box-shadow: inset 0 1px 0 var(--edge-light), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.operator-results-table > thead > tr > th {
  z-index: 3;
}

.mini-table > thead > tr > th {
  z-index: 1;
}

.mini-table {
  font-size: 11px;
}

.mini-table td {
  line-height: 1.25;
}

.powerbi-table {
  border: 1px solid var(--line);
}

.powerbi-table th {
  color: #c8d4dc;
  background: #16222e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.powerbi-table th,
.powerbi-table td {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.powerbi-table th + th,
.powerbi-table td + td {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.powerbi-table th.num-col,
.powerbi-table td.num-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mini-table tbody tr,
.operator-results-table tbody tr:not(.detail-row) {
  background: var(--cell-tint);
}

.mini-table tbody tr:nth-child(even),
.operator-results-table tbody tr:nth-child(even):not(.detail-row) {
  background: var(--cell-tint-alt);
}

.mini-table tbody tr {
  cursor: pointer;
}

.mini-table tbody tr:hover {
  background: rgba(86, 156, 214, 0.12);
}

.operator-results-table tbody tr.is-selected,
.mini-table tbody tr.is-selected,
[data-project-filter].is-selected,
[data-flag-filter].is-selected {
  background: #1d3247;
  box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.mini-table.has-filter tbody tr:not(.is-selected) {
  opacity: 0.58;
}

.mini-table.has-filter tbody tr:not(.is-selected):hover {
  opacity: 1;
}

.operator-results-table tbody tr:not(.detail-row) {
  cursor: pointer;
}

.operator-results-table tbody tr:not(.detail-row):hover,
.operator-results-table tr.expanded {
  background: #22313c;
}

.operator-results-table tbody tr.review-required:not(.detail-row) {
  background: rgba(255, 213, 79, 0.10);
  box-shadow: inset 3px 0 0 rgba(255, 213, 79, 0.72), inset 0 1px 0 rgba(255, 236, 160, 0.08);
}

.operator-results-table tbody tr.review-required:not(.detail-row):hover,
.operator-results-table tbody tr.review-required.expanded {
  background: rgba(255, 213, 79, 0.16);
}

.operator-results-table tbody tr.is-selected,
.operator-results-table tbody tr.is-selected:hover,
.operator-results-table tr.expanded.is-selected {
  background: #1d3247;
  box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.row-expander {
  width: 28px;
  min-height: 28px;
  padding: 0;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  border: 1px solid rgba(156, 220, 254, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-pill.pass {
  color: #a7e89a;
  border-color: rgba(106, 153, 85, 0.62);
  background: rgba(106, 153, 85, 0.18);
}

.status-pill.fail {
  color: #ffb0b0;
  border-color: rgba(241, 76, 76, 0.62);
  background: rgba(241, 76, 76, 0.16);
}

.status-pill.error {
  color: #ffe0a0;
  border-color: rgba(220, 220, 170, 0.58);
  background: rgba(220, 220, 170, 0.14);
}

.status-pill.unknown {
  color: var(--muted);
  border-color: rgba(156, 220, 254, 0.24);
  background: rgba(156, 220, 254, 0.08);
}

.review-marker {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-inline: auto;
  color: transparent;
}

.review-marker.required {
  color: #1f1600;
  border: 1px solid rgba(255, 206, 84, 0.9);
  border-radius: 999px;
  background: #ffce54;
  box-shadow: 0 0 0 2px rgba(255, 206, 84, 0.16), 0 0 14px rgba(255, 206, 84, 0.28);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.review-marker.resolved {
  color: #e7fbe4;
  border: 1px solid rgba(106, 153, 85, 0.72);
  border-radius: 999px;
  background: rgba(106, 153, 85, 0.32);
  box-shadow: 0 0 0 2px rgba(106, 153, 85, 0.14), 0 0 12px rgba(106, 153, 85, 0.24);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.detail-row td {
  padding: 0;
  background: var(--surface-3);
}

.inline-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
}

.detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  text-align: left;
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 34%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 42%),
    rgba(25, 35, 45, 0.66);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.detail-card-head {
  display: block;
  margin-bottom: 8px;
}

.detail-card-head h3 {
  flex-shrink: 0;
  margin-bottom: 0;
  white-space: nowrap;
}

.audit-comparison-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin-bottom: 10px;
}

.compare-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 1px 5px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(156, 220, 254, 0.22);
  border-radius: 5px;
  padding: 5px 6px;
  color: var(--text);
  text-align: center;
  background: rgba(156, 220, 254, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.compare-chip strong {
  font-size: 12px;
  line-height: 1.1;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.compare-chip small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delta-compare-chip {
  min-width: 0;
  overflow: visible;
  border-color: hsl(var(--delta-hue) 78% 58% / 0.68);
  background:
    radial-gradient(circle at 28% 0%, hsl(var(--delta-hue) 86% 70% / 0.18), transparent 42%),
    hsl(var(--delta-hue) 72% 38% / var(--delta-alpha));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 var(--delta-glow) hsl(var(--delta-hue) 80% 58% / 0.15);
}

.delta-compare-chip strong {
  overflow: visible;
  text-overflow: clip;
}

.delta-compare-chip small {
  min-width: 0;
}

.images-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  border-color: #4a5664;
  background: #101820;
}

.images-card h3,
.images-card .missing-evidence {
  text-align: center;
}

.inline-payload {
  max-height: 220px;
  min-height: 140px;
  font-size: 11px;
}

.detail-field-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 12px;
}

.detail-field-table th,
.detail-field-table td {
  border-top: 1px solid var(--detail-row-line);
  border-bottom: 1px solid var(--detail-row-line);
  border-right: 1px solid rgba(156, 220, 254, 0.06);
  padding: 6px 7px;
  text-align: left;
  vertical-align: top;
}

.detail-field-table tr > :first-child {
  border-left: 1px solid var(--detail-row-line);
  border-radius: 4px 0 0 4px;
}

.detail-field-table tr > :last-child {
  border-right: 1px solid var(--detail-row-line);
  border-radius: 0 4px 4px 0;
}

.detail-field-table th {
  position: static;
  z-index: auto;
  width: 132px;
  color: #9cdcfe;
  font-weight: 700;
  background: rgba(156, 220, 254, 0.055);
}

.detail-field-table th[data-detail-copy] {
  cursor: copy;
}

.detail-field-table th[data-detail-copy]:hover {
  color: #fff;
  background: rgba(156, 220, 254, 0.13);
}

.detail-field-table td {
  color: var(--text);
  overflow-wrap: anywhere;
}

.flag-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--detail-row-line);
  margin-bottom: 8px;
}

.flag-pill {
  min-height: 28px;
  color: #ffd7d7;
  background: #43242a;
  border-color: #7c3940;
}

.inline-full-image {
  display: grid;
  place-items: center;
  min-height: 260px;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #080b0f;
  overflow: auto;
}

.inline-full-image img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.human-feedback-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border: 1px solid rgba(156, 220, 254, 0.14);
  border-radius: 5px;
  padding: 12px 8px 8px;
  background: rgba(11, 18, 27, 0.66);
}

.feedback-toggle {
  width: auto;
  min-width: 170px;
  max-width: min(100%, 230px);
  min-height: 30px;
  padding: 7px 20px;
  color: #d7edff;
  background: rgba(32, 48, 64, 0.92);
  border-color: rgba(156, 220, 254, 0.24);
}

.human-feedback-panel.open .feedback-toggle {
  border-color: rgba(156, 220, 254, 0.42);
  background: rgba(31, 70, 102, 0.78);
}

.feedback-toggle.needs-review {
  border-color: rgba(255, 213, 79, 0.7);
  color: #fff2bd;
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 236, 160, 0.22), transparent 48%),
    rgba(88, 66, 20, 0.72);
  animation: reviewActionPulse 1.65s ease-in-out infinite;
}

.feedback-decision-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  width: 100%;
  margin-top: 8px;
}

.feedback-choice {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.feedback-choice.agree {
  color: #d8ffd0;
  border-color: rgba(106, 153, 85, 0.56);
  background: rgba(60, 94, 47, 0.35);
}

.feedback-choice.disagree {
  color: #ffe0a0;
  border-color: rgba(255, 213, 79, 0.42);
  background: rgba(88, 66, 20, 0.38);
}

.feedback-form {
  display: grid;
  grid-template-columns: minmax(88px, 0.28fr) minmax(180px, 0.47fr) minmax(92px, 0.25fr);
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.feedback-form label {
  margin-bottom: 0;
  color: #9cdcfe;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  min-height: 30px;
  padding: 6px 7px;
  font-size: 12px;
  text-transform: none;
}

.feedback-load-input {
  text-align: center;
  font-weight: 800;
}

.feedback-notes-field,
.feedback-actions {
  grid-column: 1 / -1;
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback-submit {
  min-height: 30px;
  padding-inline: 12px;
}

.feedback-message {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.feedback-message.success {
  color: #a7e89a;
}

.feedback-message.error {
  margin: 0;
  border: 0;
  padding: 0;
  color: #ffb0b0;
  background: transparent;
}

.feedback-message.pending {
  color: #9cdcfe;
}

.missing-evidence {
  border: 1px solid #6c5a2e;
  border-radius: 5px;
  padding: 10px;
  color: var(--warning);
  background: #332d18;
}

.photo-strip {
  display: flex;
  gap: 8px;
  min-height: 108px;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px;
  background: var(--surface-3);
}

.photo-thumb {
  width: 124px;
  min-width: 124px;
  display: grid;
  grid-template-rows: 68px 28px;
  justify-items: center;
  gap: 5px;
  padding: 5px;
  text-align: center;
  overflow: hidden;
}

.photo-thumb img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
}

.photo-thumb span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.photo-thumb.active {
  border-color: var(--accent);
}

.image-stage {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #080b0f;
  color: var(--muted);
  overflow: auto;
}

.image-stage img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  transform-origin: center;
}

.image-actions,
.image-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.image-preview-head h2,
.detail-heading {
  margin: 0;
}

.image-toolbar button {
  min-width: 42px;
}

.detail-output {
  min-height: 160px;
  max-height: 230px;
  font-size: 11px;
}

.history-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background:
    linear-gradient(165deg, var(--sheen-ice) 0%, transparent 34%),
    linear-gradient(345deg, var(--sheen-pearl) 0%, transparent 42%),
    rgba(15, 24, 32, 0.54);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.history-panel .panel-head,
.summary-panel .panel-head {
  margin-bottom: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.summary-panel {
  min-height: 0;
}

.project-summary-panel {
  min-height: 220px;
}

.flag-summary-panel {
  min-height: 0;
  grid-template-rows: auto auto;
}

.run-history-panel {
  min-height: 220px;
  max-height: 280px;
}

.history-list,
.summary-list {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 20px;
  max-height: none;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
}

.flag-summary-panel .summary-list {
  padding-top: 10px;
  overflow: visible;
}

.history-item,
.summary-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
  overflow: visible;
  cursor: pointer;
}

.summary-empty {
  color: var(--muted);
  font-size: 12px;
}

.summary-item-title {
  color: var(--text);
  font-weight: 700;
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.summary-stats.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-stat {
  min-width: 0;
  border: 1px solid rgba(156, 220, 254, 0.1);
  border-radius: 4px;
  padding: 4px 5px;
  background: rgba(7, 14, 20, 0.28);
  text-align: center;
}

.summary-stat span {
  display: block;
  color: #9cdcfe;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.summary-stat strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.summary-stat.pass strong {
  color: #b7e5ad;
}

.summary-stat.fail strong {
  color: #ffb3b3;
}

.summary-stat.review strong {
  color: #ffe08a;
}

.flag-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(156, 220, 254, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  color: #d9f2ff;
  background: rgba(86, 156, 214, 0.18);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.flag-pill.fail {
  color: #ffd7d7;
  border-color: rgba(241, 76, 76, 0.58);
  background: rgba(241, 76, 76, 0.2);
}

.flag-pill.needs-review {
  color: #fff1bd;
  border-color: rgba(220, 220, 170, 0.58);
  background: rgba(220, 220, 170, 0.16);
}

.flag-pill.neutral {
  color: #d9f2ff;
  border-color: rgba(86, 156, 214, 0.54);
  background: rgba(86, 156, 214, 0.18);
}

.compact-flag-item {
  --flag-accent: #569cd6;
  gap: 4px;
  align-items: center;
  border-left: 3px solid var(--flag-accent);
  padding: 7px 8px 8px;
  text-align: center;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--flag-accent) 15%, transparent), transparent 48%),
    var(--surface-2);
}

.flag-card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  color: #b9d9ea;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.flag-card-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: var(--flag-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--flag-accent) 36%, transparent);
}

.flag-card-count {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.flag-card-underfilled {
  --flag-accent: #f14c4c;
}

.flag-card-overfilled {
  --flag-accent: #ce9178;
}

.flag-card-needs-review {
  --flag-accent: #dcdcaa;
}

.history-item.is-running {
  border-color: rgba(86, 156, 214, 0.64);
  background:
    linear-gradient(165deg, rgba(156, 220, 254, 0.12), transparent 48%),
    linear-gradient(90deg, rgba(86, 156, 214, 0.13), rgba(86, 156, 214, 0.035)),
    var(--surface-2);
  box-shadow:
    inset 3px 0 0 var(--accent),
    inset 0 1px 0 var(--edge-light),
    0 0 0 1px rgba(86, 156, 214, 0.08);
  animation: historyRunPulse 2.6s ease-in-out infinite;
}

.history-item.is-complete {
  border-color: rgba(106, 153, 85, 0.34);
}

.history-item.is-paused {
  border-color: rgba(220, 220, 170, 0.42);
}

.history-item.is-failed {
  border-color: rgba(241, 76, 76, 0.44);
}

.history-item:hover,
.history-item.selected,
.summary-item:hover,
.summary-item.is-selected {
  border-color: var(--accent);
  background: #1d3247;
}

.history-item.selected,
.summary-item.is-selected {
  box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 rgba(190, 225, 255, 0.1);
}

.history-main {
  color: var(--text);
  font-weight: 700;
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.history-status {
  flex: 0 0 auto;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  background: #22313c;
  background-image: linear-gradient(180deg, rgba(156, 220, 254, 0.07), transparent 62%);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.1);
  font-size: 10px;
  text-transform: uppercase;
}

.history-status.running {
  color: #d9f2ff;
  border-color: rgba(86, 156, 214, 0.78);
  background:
    linear-gradient(180deg, rgba(156, 220, 254, 0.22), transparent 66%),
    rgba(86, 156, 214, 0.28);
  box-shadow: inset 0 1px 0 rgba(190, 225, 255, 0.18), 0 0 12px rgba(86, 156, 214, 0.2);
  animation: historyRunPulse 2.6s ease-in-out infinite;
}

.history-status.complete {
  color: #d8f5d2;
  border-color: rgba(106, 153, 85, 0.62);
  background: rgba(106, 153, 85, 0.22);
}

.history-status.paused {
  color: #fff1bd;
  border-color: rgba(220, 220, 170, 0.58);
  background: rgba(220, 220, 170, 0.16);
}

.history-status.failed {
  color: #ffd7d7;
  border-color: rgba(241, 76, 76, 0.62);
  background: rgba(241, 76, 76, 0.18);
}

.history-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 3px 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.history-fields {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
  gap: 2px 7px;
  min-width: 0;
  align-items: baseline;
  font-size: 10.5px;
  line-height: 1.25;
}

.history-field-label {
  color: #9cdcfe;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.history-field-value {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-meta-grid span,
.history-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.history-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--detail-row-line);
}

.history-progress {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-progress-track {
  position: relative;
  height: 5px;
  border: 1px solid rgba(86, 156, 214, 0.16);
  border-radius: 999px;
  background: rgba(140, 200, 255, 0.11);
  overflow: hidden;
}

.history-progress-fill {
  position: relative;
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e4c66, #569cd6, #9cdcfe);
  box-shadow: 0 0 9px rgba(86, 156, 214, 0.38);
  transition: width 600ms ease;
  overflow: hidden;
}

.history-item.is-running .history-progress-fill {
  background: linear-gradient(90deg, #1e4c66, #569cd6, #9cdcfe);
}

.history-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(190, 225, 255, 0.24) 50%, transparent 70%);
  transform: translateX(-100%);
}

.history-item.is-running .history-progress-fill::after {
  animation: historyProgressShimmer 2.2s linear infinite;
}

.fetched-progress .history-progress-track {
  background:
    repeating-linear-gradient(90deg, rgba(156, 220, 254, 0.12) 0 8px, rgba(156, 220, 254, 0.04) 8px 16px),
    rgba(140, 200, 255, 0.08);
}

.history-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-eta {
  flex: 0 0 auto;
  color: #9cdcfe;
  font-variant-numeric: tabular-nums;
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

@keyframes historyRunPulse {
  0%, 100% {
    box-shadow:
      inset 3px 0 0 var(--accent),
      inset 0 1px 0 var(--edge-light),
      0 0 0 1px rgba(86, 156, 214, 0.08),
      0 0 0 0 rgba(86, 156, 214, 0);
  }
  50% {
    box-shadow:
      inset 3px 0 0 var(--accent),
      inset 0 1px 0 var(--edge-light),
      0 0 0 1px rgba(86, 156, 214, 0.08),
      0 0 14px 1px rgba(86, 156, 214, 0.28);
  }
}

@keyframes historyProgressShimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes progressCounterBump {
  0% {
    color: #ffffff;
    background: rgba(86, 156, 214, 0.3);
    box-shadow: 0 0 0 rgba(86, 156, 214, 0);
  }
  34% {
    color: #ffffff;
    background: rgba(86, 156, 214, 0.24);
    box-shadow: 0 0 14px rgba(86, 156, 214, 0.42);
  }
  100% {
    color: #9cdcfe;
    background: transparent;
    box-shadow: 0 0 0 rgba(86, 156, 214, 0);
  }
}

@keyframes reviewActionPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 213, 79, 0), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  45% {
    box-shadow: 0 0 18px rgba(255, 213, 79, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-item.is-running,
  .history-status.running,
  .history-item.is-running .history-progress-fill::after,
  .results-progress.is-running-progress .history-progress-fill::after,
  .results-progress .history-progress-count.progress-count-bump,
  .feedback-toggle.needs-review {
    animation: none;
  }
}

.history-action {
  min-height: 28px;
  padding: 4px 9px;
  border-color: var(--line);
  background: var(--chrome-dark-bg);
  color: var(--text);
  font-size: 11px;
  box-shadow: inset 0 1px 0 var(--edge-light);
}

.history-action.primary-action {
  border-color: var(--accent);
  background: var(--select-bg-bright);
  color: #fff;
}

.history-action:hover {
  background: var(--chrome-dark-bg-hover);
}

.history-action.primary-action:hover {
  background: var(--select-bg-bright-hover);
}

.danger-action {
  border-color: #7c3940;
  color: #ffd7d7;
  background: #43242a;
}

.history-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.run-output {
  min-height: 0;
  max-height: none;
  height: 100%;
  font-size: 10px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 3px;
  border-color: rgba(86, 156, 214, 0.45);
  background:
    linear-gradient(180deg, rgba(106, 153, 85, 0.035), transparent 28%),
    linear-gradient(165deg, rgba(156, 220, 254, 0.06) 0%, transparent 42%),
    #071018;
  color: #dce8d2;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  scroll-snap-type: y proximity;
  scrollbar-gutter: stable;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px rgba(106, 153, 85, 0.08), inset 0 1px 0 rgba(190, 225, 255, 0.12);
}

.log-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  min-height: 1.45em;
  border-left: 3px solid transparent;
  padding: 1px 5px 1px 7px;
  color: #cfdae3;
  scroll-snap-align: start;
}

.log-time {
  color: #7c8fa0;
  font-size: 10px;
  white-space: nowrap;
}

.log-line:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.log-line.context-line {
  color: #9cdcfe;
  border-left-color: rgba(86, 156, 214, 0.35);
}

.log-line.pass-line {
  color: #a7e89a;
  border-left-color: rgba(106, 153, 85, 0.7);
  background: rgba(106, 153, 85, 0.075);
}

.log-line.fail-line {
  color: #ffb0b0;
  border-left-color: rgba(241, 76, 76, 0.76);
  background: rgba(241, 76, 76, 0.08);
}

.log-line.warn-line {
  color: #ffe0a0;
  border-left-color: rgba(220, 220, 170, 0.66);
  background: rgba(220, 220, 170, 0.07);
}

.log-key {
  color: #9cdcfe;
}

.log-op {
  color: #7c8fa0;
}

.log-value {
  color: #d7dee6;
}

.log-value.number-value {
  color: #b5cea8;
}

.log-value.pass-value {
  color: #a7e89a;
  font-weight: 700;
}

.log-value.fail-value {
  color: #ffb0b0;
  font-weight: 700;
}

.log-value.warn-value {
  color: #ffe0a0;
}

@media (max-width: 1320px) {
  .workbench {
    grid-template-columns: 1fr;
  }

  .workbench-left {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .filter-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .operator-main {
    grid-column: 2;
    grid-row: 1;
  }

  .activity-rail {
    min-height: 420px;
  }

  .output-panel {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 900px) {
  .topbar,
  .logout-form,
  .audit-title-row,
  .operator-toolbar {
    align-items: stretch;
  }

  .topbar,
  .audit-title-row,
  .operator-toolbar {
    display: grid;
  }

  .dashboard-console,
  .audit-grid,
  .workbench,
  .workbench-left,
  .summary-grid,
  .inline-detail-grid,
  .slicer-grid {
    grid-template-columns: 1fr;
  }

  .filter-rail,
  .operator-main,
  .activity-rail,
  .output-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-select {
    width: 100%;
  }
}
