:root {
  /* ClarityASM tokens — mirrors easm frontend/tailwind.config.ts */
  --bg: #0B0F0E;
  --panel: rgba(17, 23, 22, 0.88);
  --panel-strong: #182120;
  --border: rgba(155, 232, 90, 0.16);
  --text: #EAF0ED;
  --muted: #A6B3AE;
  --accent: #9BE85A;
  --accent-strong: #7CDB46;
  --ai: #B6A6FF;
  --danger: #FF4D6D;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Segoe UI Variable Display", "Aptos Display", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI Variable", "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 219, 70, 0.22), transparent 28%),
    radial-gradient(circle at bottom right, rgba(182, 166, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #070A09 0%, #0B0F0E 42%, #111716 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 85%);
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  padding: 28px;
  border-right: 1px solid var(--border);
  background: rgba(3, 11, 18, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand h1,
.panel-header h2,
.auth-panel h2 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: 0.02em;
}

.brand p,
.status-card p,
.eyebrow,
.muted {
  margin: 0;
  color: var(--muted);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(155, 232, 90, 0.2), rgba(182, 166, 255, 0.25));
  border: 1px solid rgba(155, 232, 90, 0.32);
  color: var(--accent);
  font-weight: 700;
}

.status-card {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(11, 27, 42, 0.82);
  box-shadow: var(--shadow);
}

.status-card.compact {
  margin-top: auto;
}

.main {
  padding: 28px;
}

.panel,
.auth-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.auth-panel {
  max-width: 760px;
  padding: 28px;
}

.portal-grid {
  display: grid;
  gap: 22px;
}

.tab-view {
  display: grid;
  gap: 22px;
}

.jobs-layout {
  grid-template-columns: 1.15fr 0.95fr;
}

.jobs-workspace {
  grid-template-columns: 1fr;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 22px;
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.infra-layout {
  grid-template-columns: 1fr;
}

.tabs-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.subtabs-bar {
  margin-bottom: 0;
}

.infra-subtabs {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.12);
}

.infra-subtab-panel.hidden {
  display: none;
}

.infra-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
  align-items: start;
}

.tab-button {
  background: rgba(142, 165, 188, 0.08);
  color: var(--muted);
  border: 1px solid rgba(142, 165, 188, 0.16);
}

.tab-button.active {
  color: var(--text);
  background: rgba(155, 232, 90, 0.12);
  border-color: rgba(155, 232, 90, 0.34);
}

.wide-panel {
  grid-column: 1 / -1;
}

.infra-panel {
  padding: 24px;
}

.infra-stage-stack,
.infra-stage-column,
.infra-stage-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.infra-sequence-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 20px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at top right, rgba(155, 232, 90, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(9, 24, 34, 0.92), rgba(3, 11, 18, 0.82));
  border-color: rgba(155, 232, 90, 0.2);
}

.infra-sequence-copy {
  align-self: start;
}

.infra-sequence-copy h3 {
  margin-bottom: 10px;
}

.infra-sequence-copy p:last-child {
  margin-bottom: 0;
}

.infra-sequence-list {
  display: grid;
  gap: 10px;
}

.infra-sequence-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background: rgba(3, 11, 18, 0.42);
}

.infra-sequence-item h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.infra-sequence-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.84rem;
}

.infra-sequence-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(155, 232, 90, 0.12);
  border: 1px solid rgba(155, 232, 90, 0.24);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}

.infra-stage-panel {
  padding: 18px;
  background: linear-gradient(180deg, rgba(7, 18, 28, 0.9), rgba(3, 11, 18, 0.8));
}

.infra-stage-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.infra-stage-header h3 {
  margin: 0 0 4px;
}

.infra-stage-header p {
  margin: 0;
}

.infra-stage-kicker {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(155, 232, 90, 0.24);
  background: rgba(155, 232, 90, 0.1);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.infra-stage-grid {
  display: grid;
  gap: 16px;
}

.infra-stage-grid-planning {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.infra-stage-grid-reach {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
}

.infra-stage-section {
  background: rgba(4, 14, 22, 0.68);
}

.infra-overview-shell,
.infra-operations-card,
.infra-relay-download-card,
.infra-selected-region-card {
  padding: 18px;
}

.infra-overview-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.infra-overview-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background: linear-gradient(180deg, rgba(8, 18, 29, 0.92), rgba(3, 11, 18, 0.74));
}

.infra-overview-card.good {
  border-color: rgba(155, 232, 90, 0.24);
}

.infra-overview-card.warn {
  border-color: rgba(255, 209, 132, 0.26);
}

.infra-overview-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.infra-overview-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.05;
}

.infra-overview-detail {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.infra-priority-intro {
  align-self: start;
  height: fit-content;
  padding: 16px 18px;
  background:
    radial-gradient(circle at top right, rgba(155, 232, 90, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(9, 24, 34, 0.92), rgba(3, 11, 18, 0.82));
  border-color: rgba(155, 232, 90, 0.2);
}

.infra-priority-intro h3 {
  margin-bottom: 8px;
}

.infra-priority-intro p:last-child {
  margin-bottom: 0;
}

.infra-priority-grid {
  display: grid;
  gap: 16px;
}

.infra-section-lead {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.infra-primary-section {
  padding: 16px;
}

.infra-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.infra-secondary-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.infra-section-stack {
  display: grid;
  gap: 16px;
}

.infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.infra-top-grid {
  align-items: start;
}

.infra-controls {
  margin-bottom: 16px;
  align-items: end;
}

.infra-compact-controls {
  gap: 14px;
}

.infra-action-row {
  justify-content: flex-start;
  align-items: end;
  flex-wrap: wrap;
}

.infra-button-stack {
  align-items: stretch;
  gap: 10px;
}

.infra-button-stack .ghost-button,
.infra-button-stack .primary-button {
  min-width: 0;
}

.compact-summary-grid {
  gap: 10px;
}

.compact-summary-grid .summary-card {
  padding: 12px 14px;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-action input {
  flex: 1;
  min-width: 0;
}

.input-with-action .primary-button {
  flex-shrink: 0;
  white-space: nowrap;
}

.region-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-table-shell {
  max-height: 360px;
}

.infra-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.infra-primary-section .infra-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.infra-resource-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background: rgba(3, 11, 18, 0.62);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.infra-resource-card[data-select-region] {
  cursor: pointer;
}

.infra-resource-card[data-select-region]:focus-visible {
  outline: 2px solid rgba(155, 232, 90, 0.45);
  outline-offset: 2px;
}

.infra-resource-card:hover {
  transform: translateY(-1px);
}

.infra-resource-card.is-good {
  border-color: rgba(155, 232, 90, 0.28);
  background: linear-gradient(180deg, rgba(8, 34, 30, 0.92), rgba(3, 11, 18, 0.72));
}

.infra-resource-card.is-warn {
  border-color: rgba(255, 209, 132, 0.26);
  background: linear-gradient(180deg, rgba(42, 30, 10, 0.92), rgba(3, 11, 18, 0.72));
}

.infra-resource-card.is-bad {
  border-color: rgba(255, 123, 114, 0.28);
  background: linear-gradient(180deg, rgba(44, 18, 18, 0.92), rgba(3, 11, 18, 0.72));
}

.infra-resource-card.is-selected {
  box-shadow: inset 0 0 0 1px rgba(155, 232, 90, 0.34);
}

.infra-card-top {
  display: grid;
  gap: 10px;
}

.infra-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.infra-card-visual {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  gap: 3px;
  background: rgba(142, 165, 188, 0.08);
  border: 1px solid rgba(142, 165, 188, 0.16);
}

.infra-card-visual.is-good {
  background: rgba(155, 232, 90, 0.1);
  border-color: rgba(155, 232, 90, 0.28);
}

.infra-card-visual.is-bad {
  background: rgba(255, 123, 114, 0.1);
  border-color: rgba(255, 123, 114, 0.28);
}

.infra-card-visual.is-warn {
  background: rgba(255, 209, 132, 0.1);
  border-color: rgba(255, 209, 132, 0.28);
}

.infra-card-visual-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.infra-card-visual-signals {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 10px;
}

.infra-card-visual-signal {
  width: 4px;
  border-radius: 999px;
  background: rgba(142, 165, 188, 0.26);
}

.infra-card-visual-signal:nth-child(1) {
  height: 5px;
}

.infra-card-visual-signal:nth-child(2) {
  height: 7px;
}

.infra-card-visual-signal:nth-child(3) {
  height: 10px;
}

.infra-card-visual-signal.is-on {
  background: var(--accent);
}

.infra-card-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.infra-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}

.infra-card-subtitle {
  color: var(--muted);
  font-size: 0.8rem;
  word-break: break-word;
}

.infra-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.infra-card-state-line {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: -2px;
}

.infra-card-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.infra-card-meta {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.infra-card-meta-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(142, 165, 188, 0.12);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.infra-card-meta-copy {
  min-width: 0;
}

.infra-card-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}

.infra-card-meta-value {
  font-size: 0.84rem;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.infra-card-alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 123, 114, 0.22);
  background: rgba(70, 24, 24, 0.42);
  color: rgba(255, 212, 208, 0.96);
  font-size: 0.8rem;
  line-height: 1.45;
}

.infra-card-footer {
  display: grid;
  gap: 6px;
}

.infra-card-footer-hint {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.infra-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.infra-card-actions button,
.infra-card-actions a {
  min-width: 0;
  width: 100%;
}

.infra-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.infra-relay-card-grid .infra-resource-card {
  background: linear-gradient(180deg, rgba(7, 22, 31, 0.92), rgba(3, 11, 18, 0.78));
}

.infra-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.infra-card-stat {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.infra-card-stat-label {
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.infra-card-stat-value {
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
}

.infra-region-modal-panel {
  width: min(980px, calc(100vw - 48px));
}

/* Live-activity popup (Active Engagement card → mission-control activity).
   Two stacked panels (activity + findings) need extra width and a scrollable
   body so long event lists don't overflow the viewport. */
.mc-popup-modal-panel {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.mc-popup-modal-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  overflow: auto;
  padding-top: 8px;
}

@media (max-width: 860px) {
  .mc-popup-modal-body {
    grid-template-columns: 1fr;
  }
}

.infra-region-modal-content {
  display: grid;
  gap: 16px;
}

.infra-region-modal-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(142, 165, 188, 0.16);
  background: rgba(3, 11, 18, 0.72);
}

.infra-region-modal-hero.is-good {
  border-color: rgba(155, 232, 90, 0.28);
  background: linear-gradient(180deg, rgba(8, 34, 30, 0.92), rgba(3, 11, 18, 0.8));
}

.infra-region-modal-hero.is-bad {
  border-color: rgba(255, 123, 114, 0.28);
  background: linear-gradient(180deg, rgba(44, 18, 18, 0.92), rgba(3, 11, 18, 0.8));
}

.infra-region-modal-hero.is-warn {
  border-color: rgba(255, 209, 132, 0.28);
  background: linear-gradient(180deg, rgba(42, 30, 10, 0.92), rgba(3, 11, 18, 0.8));
}

.infra-region-modal-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.infra-region-modal-identity {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.infra-region-modal-heading h3 {
  margin: 0 0 6px;
}

.infra-region-modal-heading p {
  margin: 0;
}

.infra-region-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.infra-region-modal-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.infra-wide {
  grid-column: 1 / -1;
}

.form-panel,
.jobs-panel,
.detail-panel,
.wizard-shell,
.wizard-side-panel,
.results-group-panel,
.results-detail-panel {
  padding: 24px;
}

.form-panel {
  grid-row: span 2;
}

.detail-panel {
  grid-column: 2;
}

.results-detail-panel {
  min-height: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.field-hint {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(142, 165, 188, 0.24);
  background: rgba(3, 11, 18, 0.64);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 160px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(155, 232, 90, 0.35);
  border-color: rgba(155, 232, 90, 0.6);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #042217;
  font-weight: 700;
}

.primary-button:disabled,
.primary-button.is-loading {
  background: linear-gradient(135deg, rgba(127, 141, 160, 0.44), rgba(87, 102, 121, 0.72));
  color: rgba(233, 240, 248, 0.92);
  box-shadow: none;
  opacity: 0.92;
}

.primary-button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(233, 240, 248, 0.28);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.ghost-button {
  background: rgba(142, 165, 188, 0.12);
  color: var(--text);
  border: 1px solid rgba(142, 165, 188, 0.18);
}

.danger-button {
  background: rgba(255, 123, 114, 0.14);
  color: #ffd1ce;
  border: 1px solid rgba(255, 123, 114, 0.28);
}

.jobs-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.job-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(3, 11, 18, 0.52);
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  line-height: 1;
  border: 1px solid rgba(142, 165, 188, 0.18);
  color: var(--muted);
  background: rgba(142, 165, 188, 0.08);
}

.status-chip.succeeded,
.status-chip.running,
.status-chip.dispatched,
.status-chip.ready,
.status-chip.online,
.status-chip.polling,
.status-chip.active,
.status-chip.dispatchable {
  color: #c8fff0;
  border-color: rgba(155, 232, 90, 0.32);
  background: rgba(155, 232, 90, 0.12);
}

.status-chip.paused,
.status-chip.deploying {
  color: #ffe5a3;
  border-color: rgba(255, 209, 132, 0.3);
  background: rgba(255, 209, 132, 0.14);
}

.status-chip.failed,
.status-chip.timed_out,
.status-chip.stale,
.status-chip.offline,
.status-chip.error,
.status-chip.blocked,
.status-chip.not-deployed,
.status-chip.not-ready {
  color: #ffd1ce;
  border-color: rgba(255, 123, 114, 0.3);
  background: rgba(255, 123, 114, 0.12);
}

.status-chip.stopped {
  color: #ffe2a7;
  border-color: rgba(255, 209, 132, 0.3);
  background: rgba(255, 209, 132, 0.12);
}

.job-card.active {
  border-color: rgba(155, 232, 90, 0.55);
  background: rgba(7, 29, 33, 0.72);
}

.job-card h3,
.job-card p,
.detail-body pre {
  margin: 0;
}

.job-card button {
  margin-top: 10px;
}

.detail-body {
  display: grid;
  gap: 16px;
}

.summary-grid {
  display: grid;
  gap: 12px;
}

.summary-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-chip {
  padding: 6px 10px;
  min-width: 0;
  border-radius: 999px;
  font-size: 0.8rem;
}

.template-panel {
  display: grid;
  gap: 14px;
}

.compact-template-panel {
  gap: 10px;
  padding: 14px;
}

.compact-template-panel h3 {
  margin-bottom: 4px;
}

.compact-template-panel .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.template-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-guidance-grid {
  margin-top: 0;
}

.guidance-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(155, 232, 90, 0.16);
  background: rgba(7, 18, 29, 0.7);
}

.guidance-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.guidance-card p {
  margin: 0;
  line-height: 1.5;
}

.guidance-callout {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(155, 232, 90, 0.12);
  border: 1px solid rgba(155, 232, 90, 0.24);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.template-summary-lead {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  line-height: 1.45;
}

.prompt-preview {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(155, 232, 90, 0.16);
  background: rgba(3, 11, 18, 0.52);
  line-height: 1.65;
}

.wizard-review-shell {
  display: grid;
  gap: 16px;
}

.wizard-review-card {
  display: grid;
  gap: 14px;
  border-radius: 22px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background:
    radial-gradient(circle at top right, rgba(155, 232, 90, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(8, 20, 32, 0.92), rgba(3, 11, 18, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.wizard-review-card-accent {
  border-color: rgba(155, 232, 90, 0.18);
  background:
    radial-gradient(circle at top right, rgba(155, 232, 90, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(8, 28, 34, 0.94), rgba(4, 12, 19, 0.88));
}

.wizard-card-heading {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.1);
}

.wizard-card-heading h3,
.wizard-card-heading p {
  margin: 0;
}

.wizard-card-heading .muted {
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 62ch;
}

.wizard-review-hero-copy {
  display: grid;
  gap: 6px;
  max-width: 56ch;
}

.wizard-notes-field {
  display: grid;
  gap: 10px;
}

.wizard-notes-textarea {
  min-height: 220px;
  max-height: 360px;
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: rgba(2, 9, 15, 0.74);
  border-color: rgba(155, 232, 90, 0.12);
  line-height: 1.6;
}

.wizard-preview-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.wizard-preview-surface {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 18px 18px 20px;
  border-radius: 20px;
  border-color: rgba(155, 232, 90, 0.14);
  background:
    linear-gradient(180deg, rgba(6, 18, 29, 0.92), rgba(3, 11, 18, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.wizard-advanced-panel {
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(6, 16, 25, 0.84), rgba(3, 11, 18, 0.64));
}

.template-studio-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
}

.template-library-panel,
.template-editor-panel {
  padding: 24px;
}

.template-library-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.template-library-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  text-align: left;
  color: var(--text);
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background: rgba(3, 11, 18, 0.44);
}

.template-library-card.active {
  border-color: rgba(155, 232, 90, 0.4);
  background: rgba(7, 29, 33, 0.78);
}

.template-library-card h3,
.template-library-card p {
  margin: 0;
}

.template-library-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-source-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.76rem;
  border: 1px solid rgba(155, 232, 90, 0.2);
  background: rgba(155, 232, 90, 0.08);
  color: var(--accent);
}

.template-source-chip.override {
  color: #ffe2a7;
  border-color: rgba(255, 209, 132, 0.24);
  background: rgba(255, 209, 132, 0.12);
}

.template-source-chip.custom {
  color: #c8d7ff;
  border-color: rgba(155, 232, 90, 0.24);
  background: rgba(155, 232, 90, 0.12);
}

.template-editor-section {
  display: grid;
  gap: 14px;
}

.template-diff-header {
  margin-bottom: 0;
}

.template-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.template-diff-column {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.14);
  background: rgba(3, 11, 18, 0.44);
}

.template-diff-column h4,
.template-diff-field h5,
.template-diff-field p {
  margin: 0;
}

.template-diff-field {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 18, 29, 0.7);
  border: 1px solid rgba(142, 165, 188, 0.1);
}

.template-diff-field.changed {
  border-color: rgba(155, 232, 90, 0.26);
  background: rgba(7, 29, 33, 0.76);
}

.template-diff-value {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.quickstart-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(155, 232, 90, 0.08), rgba(182, 166, 255, 0.14));
  border: 1px solid rgba(155, 232, 90, 0.18);
}

.quickstart-panel h3,
.quickstart-panel p {
  margin: 0;
}

.compact-quickstart-panel {
  padding: 14px 16px;
  border-radius: 16px;
}

.compact-quickstart-panel h3 {
  margin-bottom: 4px;
}

.wizard-review-hero {
  align-items: stretch;
  padding: 18px 20px;
  border-radius: 22px;
}

.wizard-launch-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.wizard-launch-target {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.wizard-launch-pill {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(5, 14, 23, 0.62);
  border: 1px solid rgba(142, 165, 188, 0.14);
}

.wizard-launch-pill.is-azure {
  border-color: rgba(155, 232, 90, 0.24);
  background: rgba(7, 29, 33, 0.78);
}

.wizard-launch-pill.is-lan {
  border-color: rgba(155, 232, 90, 0.24);
  background: rgba(11, 22, 42, 0.78);
}

.wizard-launch-pill-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
}

.wizard-launch-pill-value {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.wizard-execute-button {
  min-width: 160px;
  align-self: stretch;
  padding-inline: 26px;
  box-shadow: 0 18px 36px rgba(75, 215, 176, 0.18);
}

.wizard-review-grid {
  display: grid;
  gap: 16px;
}

.wizard-review-primary-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
}

.wizard-review-secondary-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.compact-detail-section {
  padding: 18px 20px;
}

.wizard-review-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wizard-allowlist-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-prompt-preview {
  min-height: 220px;
  max-height: 360px;
}

.target-step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.compact-target-step-grid {
  grid-template-columns: 1fr;
}

.target-primary-panel,
.target-guidance-panel,
.compact-evidence-panel {
  padding: 16px 18px;
  border-radius: 18px;
}

.target-primary-panel h3,
.target-guidance-panel h3,
.compact-evidence-panel h3 {
  margin: 0 0 10px;
}

.structured-operator-inputs {
  display: grid;
  gap: 12px;
}

.structured-operator-inputs label {
  display: grid;
  gap: 6px;
}

#wizard-auth-context-panel .toggle-field {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: start;
}

#wizard-auth-context-panel .toggle-field input[type="checkbox"] {
  margin-top: 4px;
}

#wizard-auth-context-panel .toggle-field > span:first-of-type {
  font-weight: 600;
}

#wizard-auth-context-panel .toggle-field > span.field-hint {
  grid-column: 2;
}

.auth-material-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.auth-material-field textarea {
  width: 100%;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.88rem;
  background: rgba(11, 15, 23, 0.55);
  color: var(--text);
  border: 1px solid rgba(142, 165, 188, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 96px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.wizard-step {
  border-radius: 18px;
  padding: 14px 16px;
  text-align: left;
  background: rgba(142, 165, 188, 0.08);
  border: 1px solid rgba(142, 165, 188, 0.16);
  color: var(--muted);
}

.wizard-step.active {
  color: var(--text);
  background: rgba(155, 232, 90, 0.12);
  border-color: rgba(155, 232, 90, 0.34);
}

.wizard-form,
.wizard-panel {
  display: grid;
  gap: 14px;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.wizard-actions.split {
  justify-content: space-between;
  align-items: center;
}

.compact-target-actions {
  margin-top: -4px;
}

.compact-target-evidence-drawer {
  margin-top: 0;
}

.results-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
  gap: 12px;
  margin-bottom: 12px;
}

.results-toolbar label {
  gap: 6px;
  font-size: 0.86rem;
}

.results-summary {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.group-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.results-groups {
  display: grid;
  gap: 16px;
}

.result-group {
  padding: 18px;
  border-radius: 20px;
  background: rgba(3, 11, 18, 0.42);
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.result-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.result-group-header h3,
.result-group-header p,
.result-run-card h4 {
  margin: 0;
}

.result-run-list {
  display: grid;
  gap: 12px;
}

.result-run-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  text-align: left;
  background: rgba(7, 29, 33, 0.42);
  border: 1px solid rgba(142, 165, 188, 0.12);
  color: var(--text);
}

.result-run-card.active {
  border-color: rgba(155, 232, 90, 0.55);
  background: rgba(7, 29, 33, 0.72);
}

.advanced-panel {
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.16);
  background: rgba(3, 11, 18, 0.42);
  padding: 16px;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.advanced-grid {
  margin-top: 16px;
}

.advanced-grid .toggle-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 4px;
  align-items: start;
}

.advanced-grid .toggle-field input[type="checkbox"] {
  margin-top: 4px;
}

.advanced-grid .toggle-field > span:first-of-type {
  font-weight: 600;
}

.advanced-grid .toggle-field .field-hint {
  grid-column: 2 / -1;
}

.evidence-drawer {
  padding: 14px 16px;
}

.evidence-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.evidence-drawer summary::-webkit-details-marker {
  display: none;
}

.evidence-drawer-chevron {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.evidence-drawer[open] .evidence-drawer-chevron {
  transform: rotate(180deg);
  color: var(--text);
}

.evidence-drawer-copy {
  margin-top: 10px;
  font-size: 0.88rem;
}

.evidence-drawer-panel {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.evidence-panel {
  display: grid;
  gap: 14px;
}

.compact-evidence-panel {
  gap: 12px;
}

.evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.evidence-header p {
  margin: 6px 0 0;
}

.compact-evidence-header {
  gap: 10px;
}

.compact-evidence-header .ghost-button {
  padding-inline: 14px;
}

.evidence-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.compact-evidence-actions {
  gap: 10px;
}

.compact-evidence-actions .ghost-button {
  min-width: 0;
}

.evidence-file-field {
  flex: 1 1 280px;
}

.evidence-actions input[type="file"] {
  flex: 1 1 280px;
}

.evidence-list {
  display: grid;
  gap: 12px;
}

.compact-evidence-list {
  gap: 10px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.evidence-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(3, 11, 18, 0.42);
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.evidence-card h4,
.evidence-card p {
  margin: 0;
}

.artifact-list,
.timeline-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.artifact-card,
.timeline-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(3, 11, 18, 0.42);
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.timeline-item summary {
  cursor: pointer;
  list-style: none;
}

.timeline-item summary::-webkit-details-marker {
  display: none;
}

.timeline-title {
  color: var(--text);
  font-weight: 600;
}

.timeline-preview {
  margin-top: 6px;
}

.evidence-link {
  font-size: 0.84rem;
  color: var(--accent);
  word-break: break-word;
}

.summary-item {
  display: grid;
  gap: 4px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  color: var(--text);
  border: 1px solid rgba(155, 232, 90, 0.16);
  background: rgba(155, 232, 90, 0.08);
}

.summary-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.summary-value {
  color: var(--text);
  word-break: break-word;
}

.summary-link {
  color: var(--accent);
  text-decoration: none;
}

.summary-link:hover {
  text-decoration: underline;
}

.table-shell {
  overflow: auto;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-header-select {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.table-selection-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.table-leading-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.table-leading-copy {
  min-width: 0;
}

.table-leading-child {
  padding-left: 1.5rem;
}

.table-toggle-button {
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.table-toggle-button:hover,
.table-toggle-button:focus-visible {
  color: var(--text);
}

.results-table {
  table-layout: fixed;
}

.results-table th:nth-child(1) {
  width: 22%;
}

.results-table th:nth-child(2) {
  width: 16%;
}

.results-table th:nth-child(3) {
  width: 10%;
}

.results-table th:nth-child(4) {
  width: 18%;
}

.results-table th:nth-child(5) {
  width: 14%;
}

.results-table th:nth-child(6) {
  width: 20%;
}

/* Executions tab table — 7 columns: Job, Execution, Template, Status, Target, Updated, Actions */
.executions-table {
  table-layout: fixed;
}

.executions-table th:nth-child(1) {
  width: 17%;
}

.executions-table th:nth-child(2) {
  width: 15%;
}

.executions-table th:nth-child(3) {
  width: 14%;
}

.executions-table th:nth-child(4) {
  width: 8%;
}

.executions-table th:nth-child(5) {
  width: 15%;
}

.executions-table th:nth-child(6) {
  width: 13%;
}

.executions-table th:nth-child(7) {
  width: 18%;
}

.table-sort-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.table-sort-button::after {
  content: "";
  margin-left: 6px;
}

.table-sort-button[data-direction="asc"]::after {
  content: "↑";
}

.table-sort-button[data-direction="desc"]::after {
  content: "↓";
}

.results-row {
  cursor: pointer;
}

.results-row:hover,
.results-row:focus-visible {
  background: rgba(155, 232, 90, 0.06);
  outline: none;
}

.results-row.active {
  background: rgba(155, 232, 90, 0.1);
}

.child-run-row {
  background: rgba(155, 232, 90, 0.03);
}

.results-actions-cell {
  min-width: 220px;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.compact-action-button {
  min-width: 0;
  padding: 0.42rem 0.58rem;
  font-size: 0.72rem;
  line-height: 1;
}

.compact-action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: rgba(3, 11, 18, 0.96);
  border: 1px solid rgba(142, 165, 188, 0.18);
  box-shadow: var(--shadow);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 16px;
  margin-bottom: 16px;
  background: rgba(3, 11, 18, 0.96);
}

body.modal-open {
  overflow: hidden;
}

.table-primary,
.table-secondary {
  display: block;
}

.table-primary {
  color: var(--text);
}

.table-secondary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.table-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.12);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-copy {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.55;
}

.markdown-copy {
  white-space: normal;
  display: grid;
  gap: 12px;
}

.markdown-copy > :first-child {
  margin-top: 0;
}

.markdown-copy > :last-child {
  margin-bottom: 0;
}

.markdown-heading,
.markdown-paragraph,
.markdown-list,
.markdown-copy hr,
.markdown-table {
  margin: 0;
}

.markdown-heading {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.markdown-copy h2.markdown-heading {
  font-size: 1.15rem;
}

.markdown-copy h3.markdown-heading {
  font-size: 1.05rem;
}

.markdown-paragraph {
  line-height: 1.65;
}

.markdown-list {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.markdown-copy hr {
  border: 0;
  border-top: 1px solid rgba(142, 165, 188, 0.2);
}

.markdown-copy code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(142, 165, 188, 0.12);
  font-size: 0.92em;
}

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.markdown-table th,
.markdown-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(142, 165, 188, 0.12);
}

.markdown-table th {
  color: var(--text);
  background: rgba(155, 232, 90, 0.08);
}

.markdown-table tr:last-child td {
  border-bottom: 0;
}

.detail-section {
  padding: 16px;
  border-radius: 18px;
  background: rgba(3, 11, 18, 0.5);
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.detail-section h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.infra-selected-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-section-header h3 {
  margin-bottom: 0;
}

.transcript-actions {
  justify-content: flex-end;
}

.transcript-full {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(142, 165, 188, 0.12);
}

.transcript-unavailable {
  margin-top: 12px;
}

.detail-section pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(3, 11, 18, 0.42);
}

.playbooks-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
}

.playbooks-flow-panel,
.playbook-memory-panel {
  grid-column: 1 / -1;
}

.playbook-memory-bridge {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.playbook-memory-bridge-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(155, 232, 90, 0.16);
  background:
    linear-gradient(135deg, rgba(155, 232, 90, 0.12), rgba(57, 129, 112, 0.08)),
    rgba(3, 11, 18, 0.52);
}

.playbooks-flow-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) repeat(3, minmax(0, 0.72fr));
  gap: 16px;
  align-items: stretch;
}

.playbooks-flow-intro {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(155, 232, 90, 0.14);
  background:
    radial-gradient(circle at top right, rgba(155, 232, 90, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(9, 24, 34, 0.92), rgba(3, 11, 18, 0.82));
}

.playbooks-flow-intro h2 {
  margin: 8px 0 12px;
}

.playbooks-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.playbooks-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(3, 11, 18, 0.42);
}

.playbooks-stat-card strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.playbooks-stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.playbooks-stage-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(3, 11, 18, 0.42);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.playbooks-stage-card h3 {
  margin: 0 0 6px;
}

.playbooks-stage-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.playbooks-stage-card.is-active,
.playbooks-stage-card.is-complete {
  border-color: rgba(155, 232, 90, 0.24);
  background: linear-gradient(180deg, rgba(8, 34, 30, 0.92), rgba(3, 11, 18, 0.72));
}

.playbooks-stage-card.is-complete {
  box-shadow: inset 0 0 0 1px rgba(155, 232, 90, 0.14);
}

.playbooks-stage-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(155, 232, 90, 0.24);
  background: rgba(155, 232, 90, 0.1);
  font-family: var(--font-display);
  font-size: 1.1rem;
}


.playbook-detail-lead {
  margin-bottom: 16px;
  line-height: 1.55;
}

.playbook-autoselect-banner {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(155, 232, 90, 0.2);
  background:
    linear-gradient(135deg, rgba(155, 232, 90, 0.12), rgba(57, 129, 112, 0.08)),
    rgba(3, 11, 18, 0.52);
}

.playbook-autoselect-banner[hidden],
.playbook-autoselect-banner.hidden {
  display: none;
}

.playbook-autoselect-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.playbook-autoselect-banner-title strong {
  font-size: 0.98rem;
}

.playbook-autoselect-banner-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.playbook-autoselect-banner-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.playbooks-library-list,
.playbook-findings-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  max-height: 560px;
  overflow: auto;
}

.playbook-card,
.playbook-memory-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(3, 11, 18, 0.42);
  color: var(--text);
  cursor: pointer;
}

.playbook-card {
  gap: 10px;
}

.playbook-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playbook-card-title {
  display: grid;
  gap: 4px;
}

.playbook-card-title strong {
  font-size: 0.98rem;
}

.playbook-card-kicker,
.playbook-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(155, 232, 90, 0.16);
  background: rgba(155, 232, 90, 0.08);
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.playbook-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.playbook-card-note {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.playbook-detail-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.playbook-detail-flow-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(3, 11, 18, 0.42);
}

.playbook-detail-flow-card h4 {
  margin: 0;
}

.playbook-detail-flow-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.playbook-flow-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(155, 232, 90, 0.24);
  background: rgba(155, 232, 90, 0.1);
  font-family: var(--font-display);
}

.playbook-card:hover,
.playbook-card.active,
.playbook-memory-card:hover,
.playbook-memory-card.active {
  border-color: rgba(155, 232, 90, 0.26);
  background: rgba(155, 232, 90, 0.08);
}

.playbook-detail-panel #playbook-detail-body {
  display: grid;
  gap: 16px;
  max-height: 760px;
  overflow: auto;
}

.playbook-step-list {
  display: grid;
  gap: 12px;
}

.playbook-step-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(3, 11, 18, 0.42);
  border: 1px solid rgba(142, 165, 188, 0.12);
}

.playbook-step-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.playbook-step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(155, 232, 90, 0.24);
  background: rgba(155, 232, 90, 0.1);
  font-family: var(--font-display);
  font-size: 1rem;
}

.playbook-step-heading {
  display: grid;
  gap: 4px;
}

.playbook-step-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.playbook-step-card h4 {
  margin: 0;
}

/* ----------------------------------------------------------------------
 * IA refactor (2026-04-25): persistent agent status pill + 2-level nav
 *
 * Append-only additions for the new chrome elements. No existing rules
 * were modified; if anything here looks redundant with a class above,
 * the cascade is intentional (we want the existing styling AND these
 * additions to apply).
 * -------------------------------------------------------------------- */

.portal-nav {
  display: grid;
  gap: 12px;
}

.destinations-bar {
  /* Top-level destinations: slightly heavier visual weight than sub-tabs */
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.destination-button.active {
  /* The destination row uses the same .tab-button base; emphasize the
     active destination so the 2-level hierarchy reads cleanly. */
  background: linear-gradient(135deg, rgba(155, 232, 90, 0.18), rgba(182, 166, 255, 0.18));
  border-color: rgba(155, 232, 90, 0.4);
}

.destination-subtabs {
  /* Sub-tab row sits below its destination; lighter background to
     subordinate it visually without changing layout primitives. */
  background: rgba(9, 24, 38, 0.55);
  border-radius: 14px;
}

.agent-status-pill {
  /* Inherit .status-card.compact look but make it interactive. */
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  font: inherit;
  color: inherit;
  padding: 14px 18px;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  transition: border-color 120ms ease, transform 120ms ease;
}

.agent-status-pill:hover,
.agent-status-pill:focus-visible {
  border-color: rgba(155, 232, 90, 0.45);
  transform: translateY(-1px);
}

.agent-status-pill .eyebrow {
  margin: 0;
}

.agent-status-pill p {
  margin: 0;
}

.agent-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  background: rgba(142, 165, 188, 0.55);
  box-shadow: 0 0 0 2px rgba(7, 17, 26, 0.6);
}

.agent-status-dot-online {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(7, 17, 26, 0.6), 0 0 12px rgba(155, 232, 90, 0.6);
}

.agent-status-dot-offline {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(7, 17, 26, 0.6);
}

.agent-status-dot-unknown {
  background: rgba(142, 165, 188, 0.55);
}

/* ----------------------------------------------------------------------
 * Mission Control (Phase 2A, 2026-04-25)
 *
 * The live engagement view. 4 regions: chrome strip (top), activity feed
 * (left), findings feed (right), hint bar (bottom). Inspector panel
 * slides in over the right side when an event card is opened.
 * -------------------------------------------------------------------- */

.mission-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  position: relative;
}

.mc-chrome-panel {
  grid-column: 1 / -1;
  padding: 18px 24px;
}

.mc-chrome {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 24px;
  align-items: center;
}

.mc-chrome-identity h2 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  word-break: break-all;
}

.mc-chrome-identity p {
  margin: 0;
}

.mc-chrome-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(80px, max-content);
  gap: 18px;
  align-items: center;
}

.mc-stat {
  display: grid;
  gap: 4px;
  text-align: left;
}

.mc-stat .eyebrow {
  margin: 0;
}

.mc-stat span:not(.eyebrow):not(.status-pill) {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.mc-chrome-actions {
  display: flex;
  gap: 8px;
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(142, 165, 188, 0.25);
  background: rgba(142, 165, 188, 0.08);
}

.status-pill-running {
  color: var(--accent);
  border-color: rgba(155, 232, 90, 0.4);
  background: rgba(155, 232, 90, 0.1);
}

.status-pill-success {
  color: var(--accent-strong);
  border-color: rgba(124, 219, 70, 0.5);
  background: rgba(124, 219, 70, 0.12);
}

.status-pill-failed {
  color: var(--danger);
  border-color: rgba(255, 123, 114, 0.4);
  background: rgba(255, 123, 114, 0.1);
}

.status-pill-paused,
.status-pill-stopped {
  color: #ffd078;
  border-color: rgba(255, 208, 120, 0.4);
  background: rgba(255, 208, 120, 0.1);
}

.status-pill-unknown {
  color: var(--muted);
}

.mc-activity-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-findings-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-filter-label {
  display: grid;
  gap: 4px;
}

.mc-activity-feed,
.mc-findings-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 4px;
}

.mc-event-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(9, 24, 38, 0.6);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
  display: grid;
  gap: 6px;
}

.mc-event-card:hover,
.mc-event-card:focus-visible {
  border-color: rgba(155, 232, 90, 0.4);
  background: rgba(9, 24, 38, 0.85);
  transform: translateY(-1px);
}

.mc-event-tool {
  border-left: 3px solid rgba(155, 232, 90, 0.55);
}

.mc-event-message {
  border-left: 3px solid rgba(155, 232, 90, 0.45);
}

.mc-event-flag {
  border-left: 3px solid rgba(255, 208, 120, 0.6);
}

.mc-event-state {
  border-left: 3px solid rgba(142, 165, 188, 0.45);
}

.mc-event-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.mc-event-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: rgba(7, 17, 26, 0.5);
}

.mc-event-badge-tool {
  color: var(--accent);
  border-color: rgba(155, 232, 90, 0.4);
}

.mc-event-badge-message {
  color: #87b7ff;
  border-color: rgba(155, 232, 90, 0.4);
}

.mc-event-badge-flag {
  color: #ffd078;
  border-color: rgba(255, 208, 120, 0.5);
  background: rgba(255, 208, 120, 0.08);
}

.mc-event-badge-state {
  color: var(--muted);
}

.mc-event-badge-hint {
  color: #4ECDC4;
  border-color: rgba(78, 205, 196, 0.5);
  background: rgba(78, 205, 196, 0.10);
  font-weight: 600;
}

.kbd {
  display: inline-block;
  padding: 0 0.35rem;
  margin: 0 0.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono, "SF Mono", Consolas, monospace);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(232, 238, 244, 0.85);
  line-height: 1.4;
}

.mc-hint-counter {
  align-self: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  min-width: 5.5rem;
  text-align: right;
}

/* ============================================================
   Pre-auth surface tightening (Bio-Rad landing)
   ============================================================ */
body.unauthenticated .reveal-after-auth {
  display: none !important;
}
body:not(.unauthenticated) .hide-after-auth {
  display: none !important;
}

.landing-panel {
  max-width: 460px;
  margin: 4rem auto;
  padding: 2.25rem 2rem 1.75rem;
  text-align: center;
}

.landing-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.landing-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f3a4d, #0f1b25);
  color: #4ECDC4;
  font-family: var(--font-display, "Aptos", sans-serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  border: 1px solid rgba(78, 205, 196, 0.3);
  margin-bottom: 0.4rem;
}

.landing-panel #login-title {
  margin: 0;
  font-size: 1.5rem;
}

.landing-panel #login-help {
  margin: 0;
  font-size: 0.9rem;
}

.landing-panel .form-grid {
  text-align: left;
}

.landing-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-footer p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.mc-event-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  flex: 1;
  word-break: break-word;
}

.mc-event-ts {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.mc-event-preview {
  font-size: 0.85rem;
  word-break: break-word;
}

.mc-finding-card {
  border: 1px solid rgba(255, 208, 120, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 208, 120, 0.05);
  display: grid;
  gap: 6px;
}

.mc-finding-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.mc-finding-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  word-break: break-all;
}

.mc-finding-ts {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.mc-hint-panel {
  grid-column: 1 / -1;
  padding: 16px 20px;
}

.mc-hint-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.mc-hint-input-wrap {
  display: grid;
  gap: 4px;
}

.mc-hint-input-wrap input {
  width: 100%;
}

.mc-inspector {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 60%);
  z-index: 4;
  pointer-events: auto;
}

.mc-inspector-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(3, 11, 18, 0.97);
  border-left: 1px solid rgba(155, 232, 90, 0.25);
  border-radius: 18px 0 0 18px;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
  padding: 20px 22px;
  overflow: auto;
}

.mc-inspector-body {
  flex: 1;
  overflow: auto;
}

.mc-inspector-body pre.detail-copy {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
}

@media (max-width: 1080px) {
  .mission-control-layout {
    grid-template-columns: 1fr;
  }
  .mc-chrome {
    grid-template-columns: 1fr;
  }
  .mc-chrome-stats {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mc-inspector {
    position: fixed;
    width: min(420px, 100vw);
  }
}

.playbook-step-meta {
  font-size: 0.84rem;
}

.playbook-command-block,
.playbook-json {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(1, 7, 12, 0.72);
  border: 1px solid rgba(142, 165, 188, 0.1);
}

.playbook-memory-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.passive-db-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.passive-db-summary-panel,
.passive-db-editor-panel {
  min-width: 0;
}

.passive-db-toolbar {
  margin-bottom: 16px;
}

.passive-db-table-shell {
  display: grid;
  gap: 12px;
}

.passive-db-table td,
.passive-db-table th,
.passive-db-child-table td,
.passive-db-child-table th {
  vertical-align: top;
}

.passive-db-domain-row td {
  background: rgba(3, 11, 18, 0.32);
}

.passive-db-domain-cell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.passive-db-domain-meta {
  display: grid;
  gap: 4px;
}

.passive-db-toggle-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(155, 232, 90, 0.18);
  background: rgba(155, 232, 90, 0.08);
  color: var(--text);
}

.passive-db-toggle-button:hover {
  border-color: rgba(155, 232, 90, 0.3);
  background: rgba(155, 232, 90, 0.14);
}

.passive-db-detail-row td {
  padding: 0;
  border-top: none;
}

.passive-db-child-shell {
  padding: 0 18px 18px 54px;
  background: rgba(1, 7, 12, 0.42);
}

.passive-db-child-table {
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}

.passive-db-result-row {
  cursor: pointer;
}

.passive-db-result-row td:first-child a {
  word-break: break-all;
}

.passive-db-result-row.active td,
.passive-db-result-row:hover td,
.passive-db-result-row:focus-visible td {
  background: rgba(155, 232, 90, 0.08);
}

.passive-db-result-row strong {
  display: block;
  margin-bottom: 4px;
}

.playbook-finding-editor {
  display: grid;
  gap: 16px;
}

.playbook-finding-artifacts-panel {
  display: grid;
  gap: 14px;
}

.playbook-finding-artifact-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.playbook-finding-artifact-picker {
  display: grid;
  gap: 8px;
}

.playbook-finding-artifacts-list {
  display: grid;
  gap: 10px;
}

.playbook-finding-artifact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(142, 165, 188, 0.12);
  background: rgba(3, 11, 18, 0.42);
}

.playbook-finding-artifact-meta {
  display: grid;
  gap: 4px;
}

.playbook-finding-artifact-meta strong {
  font-size: 0.94rem;
}

.playbook-finding-artifact-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .playbooks-flow-grid,
  .playbook-detail-flow,
  .infra-sequence-intro,
  .infra-stage-grid-planning,
  .infra-stage-grid-reach,
  .infra-overview-grid,
  .infra-secondary-overview-grid {
    grid-template-columns: 1fr;
  }

  .playbooks-workspace,
  .playbook-memory-grid,
  .passive-db-layout,
  .playbook-memory-bridge {
    grid-template-columns: 1fr;
  }

  .playbooks-stat-grid {
    grid-template-columns: 1fr;
  }

  .playbook-finding-artifact-actions {
    grid-template-columns: 1fr;
  }

  .passive-db-child-shell {
    padding: 0 12px 12px 12px;
  }

  .infra-stage-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .infra-selected-region-card {
    grid-column: 1 / -1;
  }

  .wizard-review-primary-grid,
  .wizard-review-secondary-grid {
    grid-template-columns: 1fr;
  }

  .wizard-launch-bar,
  .wizard-launch-target,
  .wizard-review-summary-grid,
  .wizard-allowlist-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-header .actions {
    width: 100%;
  }

  .panel-header .actions button {
    width: 100%;
  }

  .infra-card-stats {
    grid-template-columns: 1fr;
  }

  .infra-sequence-list,
  .infra-stage-sidebar {
    grid-template-columns: 1fr;
  }

  .infra-overview-grid-cards,
  .infra-selected-summary,
  .infra-secondary-overview-grid,
  .infra-card-grid,
  .infra-primary-section .infra-card-grid {
    grid-template-columns: 1fr;
  }

  .wizard-execute-button {
    width: 100%;
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(3, 11, 18, 0.9);
  border: 1px solid rgba(155, 232, 90, 0.28);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .template-studio-grid,
  .template-diff-grid {
    grid-template-columns: 1fr;
  }

  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .jobs-layout,
  .wizard-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .infra-grid {
    grid-template-columns: 1fr;
  }

  .form-panel,
  .detail-panel,
  .results-detail-panel {
    grid-row: auto;
    grid-column: auto;
  }

  .target-step-grid {
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-shell {
    padding: 16px;
  }

  .modal-panel {
    width: min(100vw - 32px, 1120px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 720px) {
  .infra-panel {
    padding: 16px;
  }

  .infra-overview-shell,
  .infra-operations-card,
  .infra-relay-download-card,
  .infra-selected-region-card,
  .infra-primary-section,
  .infra-priority-intro {
    padding: 14px;
  }

  .infra-primary-section .detail-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .infra-stage-header {
    grid-template-columns: 1fr;
  }

  .infra-card-top {
    flex-direction: column;
  }

  .infra-card-chips {
    justify-content: flex-start;
  }

  .infra-action-row,
  .infra-button-stack {
    display: grid;
    grid-template-columns: 1fr;
  }

  .infra-button-stack .ghost-button,
  .infra-button-stack .primary-button,
  .infra-button-stack .danger-button {
    width: 100%;
  }

  .main,
  .rail {
    padding: 18px;
  }

  .tabs-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }

  .quickstart-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .wizard-launch-bar,
  .wizard-launch-target {
    width: 100%;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .wizard-actions.split,
  .result-group-header {
    flex-direction: column;
    align-items: stretch;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .compact-template-panel .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-guidance-grid {
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    grid-template-columns: 1fr;
  }

  .compact-table-shell {
    max-height: none;
  }

  .selection-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .results-table,
  .executions-table {
    table-layout: auto;
  }

  .results-table thead,
  .executions-table thead {
    display: none;
  }

  .results-table,
  .results-table tbody,
  .executions-table,
  .executions-table tbody {
    display: grid;
    gap: 12px;
  }

  .results-table tr,
  .executions-table tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(3, 11, 18, 0.42);
    border: 1px solid rgba(142, 165, 188, 0.12);
  }

  .results-table td,
  .executions-table td {
    display: grid;
    gap: 6px;
    padding: 0;
    border-bottom: 0;
  }

  .results-table td::before,
  .executions-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .results-actions-cell {
    min-width: 0;
    white-space: normal;
  }

  .row-actions {
    gap: 0.5rem;
  }

  .table-leading-child {
    padding-left: 0.75rem;
  }

  .modal-shell {
    padding: 8px;
  }

  .modal-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 18px;
    border-radius: 18px;
  }
}

/* ============================================================
   Phase 3 — Engagements list redesign
   ============================================================ */

/* --- Active Engagements strip ---------------------------------- */
.active-engagements-panel {
  border: 1px solid rgba(78, 205, 196, 0.45);
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.06), rgba(20, 28, 36, 0.85));
  box-shadow: 0 0 0 1px rgba(78, 205, 196, 0.12) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Subhead under panel headings — clarifies the page's purpose so
   operators understand what they're looking at without bouncing between
   pages. Cross-references to sibling views render in accent. */
.page-subhead {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 720px;
}
.page-subhead em {
  font-style: normal;
  color: #4ECDC4;
}

/* Segmented control under the Job History page header. Operators flip
   between By-Job (parent summary + downloads) and By-Execution (one row
   per worker attempt). The two underlying panels are separate top-level
   tabs — segmented buttons proxy navigation to setJobsSubview /
   setActiveTab respectively. */
.job-history-segments {
  display: inline-flex;
  gap: 0;
  padding: 0.2rem;
  margin-top: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 22, 30, 0.6);
}
.job-history-segment {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(232, 238, 244, 0.7);
  font-size: 0.84rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.job-history-segment:hover:not(.job-history-segment-active) {
  color: #e8eef4;
  background: rgba(255, 255, 255, 0.05);
}
.job-history-segment-active {
  background: rgba(78, 205, 196, 0.18);
  color: #c8efeb;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(78, 205, 196, 0.4) inset;
}
@media (max-width: 600px) {
  .job-history-segments { width: 100%; }
  .job-history-segment { flex: 1; text-align: center; }
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.5rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: rgba(78, 205, 196, 0.18);
  color: #4ECDC4;
  font-size: 0.85rem;
  font-weight: 600;
}

.active-engagements-grid {
  display: grid;
  /* Slightly tighter min so 3 cards fit a 1280px viewport, drops to 2
     and then 1 on smaller screens via auto-fit. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .active-engagements-grid {
    /* Single column on phones so the long target URL has room to wrap
       without compressing the meta row. */
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.active-engagement-card {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.85rem 1.15rem;  /* extra left for accent bar */
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 28, 36, 0.78), rgba(15, 22, 30, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  text-align: left;
  color: inherit;
  overflow: hidden;
}

.active-engagement-card:hover,
.active-engagement-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(78, 205, 196, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(78, 205, 196, 0.18) inset;
  outline: none;
}

/* Status-colored accent bar on the left edge — quick scan signal. */
.active-engagement-card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(255, 255, 255, 0.12);
}
.active-engagement-card-running .active-engagement-card-accent {
  background: linear-gradient(180deg, #4ECDC4, #2ea3ad);
  box-shadow: 0 0 12px rgba(78, 205, 196, 0.55);
}
.active-engagement-card-pending .active-engagement-card-accent {
  background: linear-gradient(180deg, #f5c451, #d99e1e);
}
.active-engagement-card-succeeded .active-engagement-card-accent {
  background: linear-gradient(180deg, #6ee7b7, #2cb47b);
}
.active-engagement-card-failed .active-engagement-card-accent {
  background: linear-gradient(180deg, #f97374, #c0454a);
}
.active-engagement-card-stopped .active-engagement-card-accent {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* Top row: status pill (left) + runtime (right). */
.active-engagement-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.active-engagement-card-runtime {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: rgba(232, 238, 244, 0.7);
  white-space: nowrap;
}
.active-engagement-card-runtime::before {
  content: "⏱ ";
  opacity: 0.55;
}

/* Target URL — host bold + path muted, both share a 2-line clamp so a
   monster URL can't blow out the card. word-break-word lets the
   browser hyphenate inside long unbroken hostnames. Full URL on title. */
.active-engagement-card-target {
  font-size: 0.95rem;
  color: #e8eef4;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.active-engagement-card-target-host {
  font-weight: 600;
}
.active-engagement-card-target-rest {
  font-weight: 400;
  color: rgba(232, 238, 244, 0.62);
}
.active-engagement-card-target-rest::before {
  content: "";
}

/* Meta row: template chip + compact job id. Wraps cleanly on mobile. */
.active-engagement-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.76rem;
  color: rgba(232, 238, 244, 0.7);
}
.active-engagement-card-template {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.25);
  color: #c8efeb;
  font-size: 0.72rem;
  font-weight: 500;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-engagement-card-job-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: rgba(232, 238, 244, 0.55);
  white-space: nowrap;
}

/* Footer with stop action. Aligned right on desktop, full-width on
   small cards so the tap target stays comfortable. */
.active-engagement-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.active-engagement-card-stop {
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  min-height: 32px;  /* mobile-friendly tap target */
}

@media (max-width: 480px) {
  .active-engagement-card {
    padding: 0.75rem 0.85rem 0.75rem 1rem;
  }
  .active-engagement-card-footer {
    justify-content: stretch;
  }
  .active-engagement-card-stop {
    flex: 1;
    min-height: 38px;
  }
  .active-engagement-card-target {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

.mc-active-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.mc-active-job-tile {
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(15, 22, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  text-align: left;
  color: inherit;
}

.mc-active-job-tile:hover,
.mc-active-job-tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(78, 205, 196, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  outline: none;
}

.mc-active-job-tile-selected {
  border-color: rgba(78, 205, 196, 0.85);
  background: rgba(20, 50, 50, 0.55);
}

.mc-active-job-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.mc-active-job-tile-target {
  font-weight: 600;
  font-size: 0.9rem;
  color: #e8eef4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-active-job-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  font-size: 0.74rem;
  color: rgba(232, 238, 244, 0.65);
}

.mc-active-job-tile-runtime {
  font-variant-numeric: tabular-nums;
}

.template-history-modal-panel {
  max-width: 720px;
  width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.template-history-body {
  overflow-y: auto;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.template-history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.85rem;
  align-items: start;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  background: rgba(15, 22, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.template-history-row.template-history-row-deleted {
  opacity: 0.65;
  border-style: dashed;
}

.template-history-rev-number {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
}

.template-history-rev-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: rgba(232, 238, 244, 0.78);
}

.template-history-rev-meta .template-history-rev-actor {
  font-size: 0.74rem;
  color: rgba(232, 238, 244, 0.55);
}

.template-history-actor-pill {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 0.4rem;
  background: rgba(155, 232, 90, 0.12);
  color: var(--accent);
}
.template-history-actor-pill.template-history-actor-agent {
  background: rgba(255, 175, 95, 0.16);
  color: #ffaf5f;
}
.template-history-actor-pill.template-history-actor-restore {
  background: rgba(140, 180, 255, 0.16);
  color: #8cb4ff;
}
.template-history-actor-pill.template-history-actor-system {
  background: rgba(180, 180, 180, 0.16);
  color: rgba(232, 238, 244, 0.7);
}

.template-history-restore-button {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
}

.template-playbooks-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.template-playbook-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.85rem;
  align-items: start;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(15, 22, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.template-playbook-row:hover {
  border-color: rgba(78, 205, 196, 0.4);
}

.template-playbook-row input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.template-playbook-row-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #e8eef4;
}

.template-playbook-row-summary {
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.template-playbook-row-id {
  font-size: 0.7rem;
  margin-top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.65;
}

.status-pill-pulse {
  position: relative;
}

.status-pill-pulse::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
  animation: status-pulse 1.4s ease-in-out infinite;
  opacity: 0.85;
}

.status-pill-pulse {
  padding-left: 1.45rem;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.8); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.15); }
}

/* --- Compare modal --------------------------------------------- */
.compare-modal-panel {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.compare-body {
  overflow: auto;
  padding-right: 0.25rem;
}

.compare-target-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.compare-target-banner.match {
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.45);
  color: #4ECDC4;
}

.compare-target-banner.mismatch {
  background: rgba(255, 184, 76, 0.12);
  border: 1px solid rgba(255, 184, 76, 0.45);
  color: #ffb84c;
}

.compare-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.compare-grid > div {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.compare-grid > div:nth-last-child(-n+3) {
  border-bottom: none;
}

.compare-grid-header {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: #cfe2f3;
}

.compare-grid-label {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(232, 238, 244, 0.65);
  font-weight: 500;
  font-size: 0.82rem;
}

.compare-grid-cell {
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.compare-grid-cell.diff {
  background: rgba(255, 184, 76, 0.06);
  color: #ffd289;
}

.compare-grid-cell.same {
  color: rgba(232, 238, 244, 0.85);
}

@media (max-width: 720px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-grid-label {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* ---------------------------------------------------------------------------
 * V2 — Sidebar IA + design refresh (2026-04-26)
 *
 * Append-only. Overrides earlier rules via cascade order. Goals:
 *   • Move primary nav into the rail as a vertical link list with sections.
 *   • Sticky rail with brand pinned top, status cards pinned bottom.
 *   • Add a topbar in main with breadcrumb + mobile hamburger.
 *   • Tighten spacing, refine cards/tables/forms.
 *   • Responsive: rail collapses to icons <1180px, drawer <860px.
 * --------------------------------------------------------------------------- */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --rail-w: 264px;
  --rail-w-collapsed: 76px;
  --topbar-h: 56px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --ring: 0 0 0 1px rgba(155, 232, 90, 0.35);
  --row-hover: rgba(155, 232, 90, 0.06);
}

/* Layout shell ------------------------------------------------------------- */
.shell {
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(3, 11, 18, 0.92), rgba(3, 11, 18, 0.78));
}

.rail-top {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.rail-top::-webkit-scrollbar { width: 6px; }
.rail-top::-webkit-scrollbar-thumb { background: rgba(142, 165, 188, 0.18); border-radius: 6px; }

.rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.rail-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rail-status-row .agent-status-pill {
  padding: 10px 12px;
  border-radius: 14px;
  gap: 4px;
  min-width: 0;
}

.rail-status-row .agent-status-pill .eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-status-row .agent-status-pill p {
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-status-row .agent-status-pill .field-hint {
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-bottom .status-card {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}
.rail-bottom .status-card h2 {
  font-size: 0.98rem;
  margin: 4px 0 2px;
  line-height: 1.25;
}
.rail-bottom .status-card .eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rail-bottom .status-card p {
  font-size: 0.82rem;
  line-height: 1.35;
}
.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.session-card > div { min-width: 0; }
.session-card #session-state {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.session-card .ghost-button {
  padding: 4px 10px;
  font-size: 0.78rem;
}

/* Brand inside the rail ---------------------------------------------------- */
.rail .brand {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.12);
  position: relative;
}
.rail .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.95rem;
  flex: 0 0 auto;
}
.rail .brand h1 {
  font-size: 1.05rem;
  line-height: 1.1;
}
.rail .brand p {
  font-size: 0.78rem;
  margin-top: 2px;
}
.rail-close {
  display: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.rail-close:hover { color: var(--text); background: rgba(142, 165, 188, 0.1); }

/* Vertical nav ------------------------------------------------------------- */
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 6px;
}
.rail-section + .rail-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(142, 165, 188, 0.08);
}

.rail-link {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.rail-link:hover {
  color: var(--text);
  background: rgba(142, 165, 188, 0.08);
}
.rail-link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.rail-link .rail-icon {
  flex: 0 0 auto;
  color: currentColor;
  opacity: 0.85;
}
.rail-link .rail-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-destination {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.rail-destination.active {
  background: linear-gradient(135deg, rgba(155, 232, 90, 0.14), rgba(182, 166, 255, 0.10));
  border-color: rgba(155, 232, 90, 0.32);
  color: var(--text);
}
.rail-destination.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.rail-sublinks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  margin-top: 2px;
}
.rail-sublink {
  font-size: 0.86rem;
  padding: 7px 10px;
  border-radius: 8px;
}
.rail-sublink.active {
  background: rgba(155, 232, 90, 0.10);
  border-color: rgba(155, 232, 90, 0.22);
  color: var(--text);
}
.rail-sublink.active .rail-icon { opacity: 1; color: var(--accent); }

/* Hide the .hidden helper used by JS for sublink rows */
.rail-sublinks.hidden { display: none; }

/* Deeper-nested sublinks (e.g. Infrastructure → Azure Workers / LAN Workers).
   Indented further than rail-sublink so the hierarchy is visually obvious. */
.rail-sublinks-nested {
  padding-left: 22px;
  gap: 1px;
  margin-top: 1px;
}
.rail-sublink-deep {
  font-size: 0.8rem;
  padding: 5px 9px;
  opacity: 0.92;
}
.rail-sublink-deep.active {
  background: rgba(155, 232, 90, 0.10);
  border-color: rgba(155, 232, 90, 0.22);
  color: var(--text);
  opacity: 1;
}
.rail-sublink-deep.active .rail-icon { opacity: 1; color: var(--accent); }

/* Main column + topbar ---------------------------------------------------- */
.main {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main > .panel,
.main > #portal-panel,
.main > #login-panel {
  margin: 0 28px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 28px;
  background: rgba(3, 11, 18, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(142, 165, 188, 0.10);
  margin-bottom: 22px;
}
.rail-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rail-toggle:hover { background: rgba(142, 165, 188, 0.08); }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 0;
}
.breadcrumb-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-display);
}
.breadcrumb-sep { color: rgba(142, 165, 188, 0.5); }

/* Scrim for mobile drawer */
.rail-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 13, 0.6);
  z-index: 40;
}
body.rail-open .rail-scrim { display: block; }

/* Cards / panels refinements --------------------------------------------- */
.panel { padding: 22px; }
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.10);
}
.panel-header h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 4px 0 0;
}
.panel-header .eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons ---------------------------------------------------------------- */
.primary-button,
.ghost-button {
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 100ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.primary-button:hover { transform: translateY(-1px); }
.primary-button:focus-visible,
.ghost-button:focus-visible { outline: none; box-shadow: var(--ring); }

/* Forms ------------------------------------------------------------------ */
.form-grid label > span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
select,
textarea {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(3, 11, 18, 0.55);
  border: 1px solid rgba(142, 165, 188, 0.18);
  color: var(--text);
  font: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(155, 232, 90, 0.45);
  box-shadow: 0 0 0 3px rgba(155, 232, 90, 0.15);
  background: rgba(3, 11, 18, 0.72);
}

/* Tables ----------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(9, 24, 38, 0.95);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.18);
}
.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(142, 165, 188, 0.08);
  vertical-align: middle;
}
.data-table tbody tr:hover td {
  background: var(--row-hover);
}
.data-table tbody tr:last-child td { border-bottom: 0; }

.table-shell {
  border-radius: var(--radius-md);
  border: 1px solid rgba(142, 165, 188, 0.12);
  overflow: hidden;
  background: rgba(3, 11, 18, 0.42);
}
.table-shell.muted { padding: 14px 16px; color: var(--muted); }

/* Empty states ----------------------------------------------------------- */
.empty-state {
  border: 1px dashed rgba(142, 165, 188, 0.22);
  background: rgba(3, 11, 18, 0.32);
  padding: 22px;
  border-radius: var(--radius-md);
  text-align: center;
}

/* Make the legacy top destinations bar a no-op if anything still renders it */
.destinations-bar { display: none !important; }

/* Subtab rows in old top position (now nested in rail) keep working as
   sublink containers; if any remain at top they should be hidden. */
.subtabs-bar:not(.rail-sublinks) { display: none !important; }

/* Responsive: collapse rail to icons --------------------------------------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--rail-w-collapsed) minmax(0, 1fr); }
  .rail { padding: 18px 8px; }
  .rail .brand h1,
  .rail .brand p,
  .rail-bottom,
  .rail-link .rail-label,
  .rail-sublinks { display: none; }
  .rail-link {
    justify-content: center;
    padding: 10px;
  }
  .rail-destination.active::before { left: -8px; }
  .rail .brand { justify-content: center; padding-bottom: 10px; }
}

/* Mobile drawer ---------------------------------------------------------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    padding: 22px 18px;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    z-index: 50;
    border-right: 1px solid var(--border);
  }
  body.rail-open .rail { transform: translateX(0); }
  .rail .brand h1,
  .rail .brand p,
  .rail-bottom,
  .rail-link .rail-label { display: revert; }
  .rail-sublinks:not(.hidden) { display: flex; }
  .rail-link { justify-content: flex-start; padding: 9px 12px; }
  .rail-close { display: inline-flex; margin-left: auto; }
  .rail-toggle { display: inline-flex; }
  .main > .panel,
  .main > #portal-panel,
  .main > #login-panel { margin: 0 16px 16px; }
  .topbar { padding: 0 16px; }
}

@media (min-width: 861px) {
  .rail-toggle { display: none !important; }
}

/* =====================================================================
   Bundle 9 — Live Terminal: real-time SSE telemetry feed
   ===================================================================== */
.live-terminal-section {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: #05080c;
  border: 1px solid rgba(155, 232, 90, 0.18);
}

.live-terminal-section.hidden {
  display: none;
}

.live-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.live-terminal-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.live-terminal-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-terminal-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.live-terminal-status--disconnected {
  color: #ff7b72;
  background: rgba(255, 123, 114, 0.1);
}
.live-terminal-status--disconnected .live-terminal-status-dot {
  background: #ff4747;
}

.live-terminal-status--connecting {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}
.live-terminal-status--connecting .live-terminal-status-dot {
  background: #f5c542;
  animation: live-terminal-pulse 1.2s ease-in-out infinite;
}

.live-terminal-status--live {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}
.live-terminal-status--live .live-terminal-status-dot {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

@keyframes live-terminal-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.live-terminal-body {
  background: #000;
  color: #d8e1eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.live-terminal-body::-webkit-scrollbar { width: 8px; }
.live-terminal-body::-webkit-scrollbar-track { background: transparent; }
.live-terminal-body::-webkit-scrollbar-thumb {
  background: rgba(155, 232, 90, 0.18);
  border-radius: 4px;
}

.live-terminal-empty {
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

.live-terminal-event {
  margin: 0;
  padding: 0.18rem 0;
  white-space: pre-wrap;
  word-break: break-word;
  border-left: 2px solid transparent;
  padding-left: 0.55rem;
}

.live-terminal-event-time {
  color: #6b7280;
  margin-right: 0.55rem;
}

.live-terminal-event-type {
  color: #9aa6b8;
  margin-right: 0.55rem;
  font-weight: 600;
}

.live-terminal-event-message {
  color: #d8e1eb;
}

/* Bundle 9 Task 3: per-event-type colour coding. The class names
   match the canonical event_type strings (Bundle 8 EVENT_TYPE_*
   constants) so a future event-type rename fails loudly here. */
.live-terminal-event--reasoning_step {
  border-left-color: #4b5563;
}

.live-terminal-event--tool_execution,
.live-terminal-event--daemon_heartbeat {
  border-left-color: #38bdf8;
}
.live-terminal-event--tool_execution .live-terminal-event-type,
.live-terminal-event--daemon_heartbeat .live-terminal-event-type {
  color: #38bdf8;
}

.live-terminal-event--circuit_breaker_tripped,
.live-terminal-event--security_boundary_violation {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.05);
}
.live-terminal-event--circuit_breaker_tripped .live-terminal-event-type,
.live-terminal-event--security_boundary_violation .live-terminal-event-type {
  color: #fca5a5;
  font-weight: 700;
}

.live-terminal-event--execution_timeout,
.live-terminal-event--wal_recovery {
  border-left-color: #fbbf24;
}
.live-terminal-event--execution_timeout .live-terminal-event-type,
.live-terminal-event--wal_recovery .live-terminal-event-type {
  color: #fbbf24;
}

/* Bundle 13 / Epic 3 � asset inventory layout */
.assets-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.assets-filter-panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.assets-filter-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.assets-filter-list .layer-block { display: flex; flex-direction: column; gap: 4px; }
.assets-filter-list .layer-block label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8aa1c1; }
.assets-filter-list .layer-block input { width: 100%; }
.assets-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #1c2740; margin-bottom: 4px; }
.assets-severity-summary { margin-bottom: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.assets-severity-summary .sev-pill { padding: 2px 8px; border-radius: 999px; border: 1px solid #1c2740; font-size: 11px; }
.assets-severity-summary .sev-critical { color: #ff6b6b; border-color: #5a1a1a; }
.assets-severity-summary .sev-high { color: #ffa86b; border-color: #5a3a1a; }
.assets-severity-summary .sev-medium { color: #ffe66b; border-color: #5a5a1a; }
.assets-severity-summary .sev-low { color: #6bd6ff; border-color: #1a3a5a; }
.assets-severity-summary .sev-info { color: #8aa1c1; }
.assets-techstack-fieldset { border: 1px solid #1c2740; border-radius: 6px; padding: 10px; }
.assets-techstack-fieldset legend { padding: 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8aa1c1; }
.modal { position: fixed; inset: 0; background: rgba(7, 11, 22, 0.85); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal.hidden { display: none; }
.modal-card { background: #0b0f17; color: #d6e1f5; border: 1px solid #1c2740; border-radius: 8px; padding: 18px; min-width: 480px; max-width: 720px; max-height: 90vh; overflow-y: auto; font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; }

/* =====================================================================
   Bundle 18 — Burp Suite Workbench: human peer review of LLM findings
   ===================================================================== */
.burp-workbench-layout { display: block; }

.burp-workbench-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.burp-workbench-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.burp-workbench-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.burp-workbench-toolbar label > span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.burp-workbench-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.burp-finding-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(155, 232, 90, 0.18);
  background: rgba(7, 17, 26, 0.82);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.burp-finding-card[data-review="verified"] {
  border-color: rgba(155, 232, 90, 0.55);
  box-shadow: 0 0 0 1px rgba(155, 232, 90, 0.18) inset;
}

.burp-finding-card[data-review="false_positive"] {
  border-color: rgba(255, 123, 114, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 123, 114, 0.18) inset;
  opacity: 0.86;
}

.burp-finding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.burp-finding-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 320px;
}

.burp-finding-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.25;
}

.burp-finding-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.burp-finding-meta code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  background: rgba(3, 11, 18, 0.6);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(155, 232, 90, 0.15);
}

.burp-severity-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(142, 165, 188, 0.25);
  color: var(--muted);
  background: rgba(3, 11, 18, 0.55);
}

.burp-severity-pill.sev-critical { color: #ff7b72; border-color: rgba(255, 123, 114, 0.55); background: rgba(255, 123, 114, 0.08); }
.burp-severity-pill.sev-high     { color: #ffa86b; border-color: rgba(255, 168, 107, 0.55); background: rgba(255, 168, 107, 0.08); }
.burp-severity-pill.sev-medium   { color: #ffe66b; border-color: rgba(255, 230, 107, 0.55); background: rgba(255, 230, 107, 0.08); }
.burp-severity-pill.sev-low      { color: #6bd6ff; border-color: rgba(107, 214, 255, 0.55); background: rgba(107, 214, 255, 0.08); }
.burp-severity-pill.sev-info     { color: #8aa1c1; }

.burp-review-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(142, 165, 188, 0.25);
  color: var(--muted);
}

.burp-review-pill.review-unreviewed     { color: #8aa1c1; }
.burp-review-pill.review-verified       { color: #34d399; border-color: rgba(52, 211, 153, 0.55); background: rgba(52, 211, 153, 0.08); }
.burp-review-pill.review-false_positive { color: #ff7b72; border-color: rgba(255, 123, 114, 0.55); background: rgba(255, 123, 114, 0.08); }

.burp-finding-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.burp-finding-section h3 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.burp-finding-description {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.burp-finding-instructions {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.burp-finding-instructions li + li { margin-top: 4px; }

.burp-http-block-wrap {
  position: relative;
  border: 1px solid rgba(155, 232, 90, 0.22);
  border-radius: 10px;
  background: #02060a;
  overflow: hidden;
}

.burp-http-block-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(9, 24, 38, 0.85);
  border-bottom: 1px solid rgba(155, 232, 90, 0.16);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.burp-http-block {
  margin: 0;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d8e1eb;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}

.burp-http-block::-webkit-scrollbar { height: 8px; }
.burp-http-block::-webkit-scrollbar-thumb {
  background: rgba(155, 232, 90, 0.22);
  border-radius: 4px;
}

.burp-http-method   { color: #9BE85A; font-weight: 700; }
.burp-http-path     { color: #f1c889; }
.burp-http-version  { color: #8aa1c1; }
.burp-http-header   { color: #9ec3ff; }
.burp-http-value    { color: #d8e1eb; }
.burp-http-body     { color: #EAF0ED; }

.burp-finding-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(142, 165, 188, 0.12);
}

.burp-action-button {
  appearance: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid rgba(142, 165, 188, 0.28);
  background: rgba(9, 24, 38, 0.55);
  color: var(--text);
  transition: transform 100ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.burp-action-button:hover { transform: translateY(-1px); }
.burp-action-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.burp-action-button.burp-confirm-button {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.18);
  color: #d6fff0;
}
.burp-action-button.burp-confirm-button:hover {
  background: rgba(52, 211, 153, 0.28);
  border-color: rgba(52, 211, 153, 0.85);
}

.burp-action-button.burp-falsepositive-button {
  border-color: rgba(255, 123, 114, 0.55);
  background: rgba(255, 123, 114, 0.16);
  color: #ffd6d2;
}
.burp-action-button.burp-falsepositive-button:hover {
  background: rgba(255, 123, 114, 0.26);
  border-color: rgba(255, 123, 114, 0.85);
}

.burp-action-button.burp-copy-button {
  border-color: rgba(155, 232, 90, 0.4);
  background: rgba(155, 232, 90, 0.10);
  color: #d6f9ec;
}
.burp-action-button.burp-copy-button:hover {
  background: rgba(155, 232, 90, 0.18);
  border-color: rgba(155, 232, 90, 0.7);
}

.burp-action-button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.burp-action-status {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

.burp-action-status.is-success { color: #34d399; }
.burp-action-status.is-error   { color: #ff7b72; }

@media (max-width: 900px) {
  .burp-workbench-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .burp-workbench-toolbar > button { grid-column: span 2; justify-self: start; }
}

/* =====================================================================
   Bundle 19 â€” The Glass Cockpit
   Three-pane tactical console with persistent Global HUD.
   Solid background colors per pane (#050505 terminal, #0b0f17 sidebars);
   borders intentionally minimal â€” region color is the divider.
   ===================================================================== */

:root {
  --cockpit-hud-h: 48px;
  --cockpit-sidebar-bg: #0b0f17;
  --cockpit-terminal-bg: #050505;
  --cockpit-divider: rgba(155, 232, 90, 0.08);
  --cockpit-mono: 'JetBrains Mono', 'Fira Code', Consolas, ui-monospace, monospace;
  --cockpit-text-dim: #6b7280;
  --cockpit-text: #d8e1eb;
}

/* ------- Global HUD ------- */
.global-hud {
  position: sticky;
  top: 0;
  z-index: 60;
  display: none; /* shown by JS after sign-in via .reveal-after-auth */
  align-items: center;
  gap: 16px;
  height: var(--cockpit-hud-h);
  padding: 0 16px;
  background: linear-gradient(180deg, #070A09 0%, #05101a 100%);
  border-bottom: 1px solid var(--cockpit-divider);
  font-size: 0.85rem;
  color: var(--cockpit-text);
}
body.is-authed .global-hud { display: flex; }

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid var(--cockpit-divider);
}
.hud-brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(155, 232, 90, 0.22), rgba(182, 166, 255, 0.25));
  border: 1px solid rgba(155, 232, 90, 0.32);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}
.hud-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.hud-brand-sub {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hud-status-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.hud-status-group::-webkit-scrollbar { display: none; }

.hud-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(155, 232, 90, 0.12);
  color: var(--cockpit-text);
  font: inherit;
  font-size: 0.78rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 120ms ease, background 120ms ease;
}
.hud-pill:hover {
  border-color: rgba(155, 232, 90, 0.35);
  background: rgba(15, 30, 45, 0.9);
}
.hud-pill-static { cursor: default; }
.hud-pill-static:hover {
  border-color: rgba(155, 232, 90, 0.12);
  background: rgba(11, 15, 23, 0.85);
}
.hud-pill-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud-pill-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cockpit-text);
}
.hud-pill-value.mono,
.mono { font-family: var(--cockpit-mono); }
.hud-pill .agent-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid var(--cockpit-divider);
}
.hud-action-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(155, 232, 90, 0.18);
  background: rgba(11, 15, 23, 0.85);
  color: var(--cockpit-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 100ms ease;
}
.hud-action-button:hover {
  border-color: rgba(155, 232, 90, 0.45);
  background: rgba(20, 40, 55, 0.9);
}
.hud-action-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.hud-action-button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}
.hud-action-primary {
  border-color: rgba(155, 232, 90, 0.55);
  background: rgba(155, 232, 90, 0.15);
  color: #d6f9ec;
}
.hud-action-primary:hover {
  background: rgba(155, 232, 90, 0.28);
  border-color: rgba(155, 232, 90, 0.85);
}

/* ------- Cockpit shell ------- */
.cockpit-tab {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--cockpit-hud-h));
  margin: 0;
  padding: 0;
}

.cockpit-grid {
  display: grid;
  grid-template-columns: 15% 55% 30%;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--cockpit-terminal-bg);
}

.cockpit-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.cockpit-pane-left,
.cockpit-pane-right {
  background: var(--cockpit-sidebar-bg);
}
.cockpit-pane-left { border-right: 1px solid var(--cockpit-divider); }
.cockpit-pane-right { border-left: 1px solid var(--cockpit-divider); }

.cockpit-pane-center {
  background: var(--cockpit-terminal-bg);
}

.cockpit-eyebrow {
  font-family: var(--cockpit-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cockpit-pane-head {
  padding: 14px 16px 10px;
}
.cockpit-pane-title {
  font-family: var(--font-display);
  font-size: 1.0rem;
  margin: 4px 0 2px;
  letter-spacing: 0.01em;
}
.cockpit-pane-sub {
  font-size: 0.78rem;
  margin: 0;
}

.cockpit-target-tree {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 8px 12px;
  font-family: var(--cockpit-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}
.cockpit-target-tree::-webkit-scrollbar { width: 6px; }
.cockpit-target-tree::-webkit-scrollbar-thumb { background: rgba(155, 232, 90, 0.16); border-radius: 3px; }

.cockpit-tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--cockpit-text);
  cursor: default;
}
.cockpit-tree-node:hover { background: rgba(155, 232, 90, 0.08); }
.cockpit-tree-node-root { color: var(--accent); font-weight: 600; }
.cockpit-tree-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--cockpit-mono);
  padding: 0;
  width: 12px;
}
.cockpit-tree-children {
  padding-left: 16px;
  border-left: 1px dashed rgba(155, 232, 90, 0.12);
  margin-left: 6px;
}
.cockpit-tree-children.collapsed { display: none; }
.cockpit-tree-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-tree-badge {
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0 6px;
  border: 1px solid rgba(155, 232, 90, 0.18);
  border-radius: 999px;
}

.cockpit-pane-foot {
  border-top: 1px solid var(--cockpit-divider);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 30%;
  overflow-y: auto;
}
.cockpit-active-jobs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cockpit-active-job {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(7, 17, 26, 0.6);
  border: 1px solid rgba(155, 232, 90, 0.12);
  color: var(--cockpit-text);
  font: inherit;
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--cockpit-mono);
}
.cockpit-active-job:hover { border-color: rgba(155, 232, 90, 0.45); }
.cockpit-active-job.active {
  background: rgba(155, 232, 90, 0.10);
  border-color: rgba(155, 232, 90, 0.45);
}
.cockpit-active-job-target { display: block; color: var(--muted); font-size: 0.7rem; }

/* ------- Center pane: terminal-first command stream ------- */
.cockpit-stream-head {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: #0B0F0E;
  border-bottom: 1px solid var(--cockpit-divider);
}
.cockpit-stream-identity { display: flex; flex-direction: column; gap: 2px; }
.cockpit-job-id {
  font-size: 0.92rem;
  color: var(--cockpit-text);
  font-weight: 600;
}
.cockpit-stream-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.cockpit-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cockpit-stat .cockpit-eyebrow { font-size: 0.6rem; }
.cockpit-stream-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cockpit-stream-actions select {
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(155, 232, 90, 0.18);
  color: var(--cockpit-text);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-family: inherit;
}

.cockpit-terminal {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--cockpit-terminal-bg);
}
.cockpit-terminal-log {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 12px 20px 12px;
  font-family: var(--cockpit-mono);
  font-size: 0.85em;
  line-height: 1.45;
  color: var(--cockpit-text);
  outline: none;
}
.cockpit-terminal-log::-webkit-scrollbar { width: 8px; }
.cockpit-terminal-log::-webkit-scrollbar-track { background: transparent; }
.cockpit-terminal-log::-webkit-scrollbar-thumb { background: rgba(155, 232, 90, 0.20); border-radius: 4px; }

.cockpit-terminal-empty {
  color: var(--cockpit-text-dim);
  font-style: italic;
  padding: 24px 0;
}

.cockpit-log-line {
  display: grid;
  grid-template-columns: 90px 90px 1fr;
  gap: 10px;
  padding: 1px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.cockpit-log-line:hover { background: rgba(155, 232, 90, 0.04); }
.cockpit-log-time { color: var(--cockpit-text-dim); font-size: 0.78em; }
.cockpit-log-kind {
  color: var(--muted);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cockpit-log-msg { color: var(--cockpit-text); }

.cockpit-log-line[data-kind="tool"]    .cockpit-log-kind { color: #38bdf8; }
.cockpit-log-line[data-kind="message"] .cockpit-log-kind { color: #9ec3ff; }
.cockpit-log-line[data-kind="state"]   .cockpit-log-kind { color: #fbbf24; }
.cockpit-log-line[data-kind="flag"]    .cockpit-log-kind { color: #34d399; font-weight: 700; }
.cockpit-log-line[data-kind="flag"]    .cockpit-log-msg  { color: #d6fff0; font-weight: 600; }
.cockpit-log-line[data-kind="error"]   .cockpit-log-kind { color: #ff7b72; }
.cockpit-log-line[data-kind="hint"]    .cockpit-log-kind { color: #c084fc; }
.cockpit-log-line[data-kind="hint"]    .cockpit-log-msg  { color: #e9d5ff; }

.cockpit-jump-bottom {
  position: absolute;
  bottom: 14px;
  right: 22px;
  appearance: none;
  background: rgba(155, 232, 90, 0.18);
  color: #d6f9ec;
  border: 1px solid rgba(155, 232, 90, 0.55);
  border-radius: 999px;
  font-family: var(--cockpit-mono);
  font-size: 0.78rem;
  padding: 6px 14px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.cockpit-jump-bottom:hover { background: rgba(155, 232, 90, 0.28); }
.cockpit-jump-bottom.hidden { display: none; }

.cockpit-prompt-bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  background: #0B0F0E;
  border-top: 1px solid var(--cockpit-divider);
}
.cockpit-prompt-glyph {
  font-family: var(--cockpit-mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.cockpit-prompt-input {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--cockpit-text);
  font-family: var(--cockpit-mono);
  font-size: 0.92rem;
  padding: 6px 0;
  width: 100%;
  outline: none;
}
.cockpit-prompt-input::placeholder { color: var(--cockpit-text-dim); }
.cockpit-prompt-counter {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
}
.cockpit-prompt-status {
  margin: 0;
  padding: 6px 18px 10px;
  background: #0B0F0E;
  font-size: 0.72rem;
  border-bottom: 1px solid var(--cockpit-divider);
}

/* ------- Right pane: intelligence stack ------- */
.cockpit-stack-tabs {
  display: flex;
  gap: 0;
  background: #0B0F0E;
  border-bottom: 1px solid var(--cockpit-divider);
}
.cockpit-stack-tab {
  appearance: none;
  flex: 1 1 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-family: var(--cockpit-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 4px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.cockpit-stack-tab:hover { color: var(--cockpit-text); }
.cockpit-stack-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cockpit-stack-panel {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 14px 18px;
  min-height: 0;
}
.cockpit-stack-panel.hidden { display: none; }
.cockpit-stack-panel::-webkit-scrollbar { width: 6px; }
.cockpit-stack-panel::-webkit-scrollbar-thumb { background: rgba(155, 232, 90, 0.18); border-radius: 3px; }

.cockpit-stack-summary {
  font-family: var(--cockpit-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 4px 0 10px;
}

.cockpit-stack-empty {
  border: 1px dashed rgba(155, 232, 90, 0.18);
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-radius: 4px;
}
.cockpit-stack-empty.hidden { display: none; }

.cockpit-findings-ticker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--cockpit-mono);
  font-size: 0.82rem;
}
.cockpit-finding-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: rgba(7, 17, 26, 0.6);
  border-left: 2px solid rgba(155, 232, 90, 0.22);
}
.cockpit-finding-row.sev-critical { border-left-color: #ff7b72; }
.cockpit-finding-row.sev-high     { border-left-color: #ffa86b; }
.cockpit-finding-row.sev-medium   { border-left-color: #ffe66b; }
.cockpit-finding-row.sev-low      { border-left-color: #6bd6ff; }
.cockpit-finding-row.sev-info     { border-left-color: var(--cockpit-text-dim); }
.cockpit-finding-sev {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cockpit-text-dim);
}
.cockpit-finding-row.sev-critical .cockpit-finding-sev { color: #ff7b72; }
.cockpit-finding-row.sev-high .cockpit-finding-sev     { color: #ffa86b; }
.cockpit-finding-row.sev-medium .cockpit-finding-sev   { color: #ffe66b; }
.cockpit-finding-row.sev-low .cockpit-finding-sev      { color: #6bd6ff; }
.cockpit-finding-title { color: var(--cockpit-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-finding-time  { color: var(--cockpit-text-dim); font-size: 0.7rem; }

/* Burp Workbench cards inside cockpit â€” denser than the full Workbench tab. */
.cockpit-burp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cockpit-burp-card {
  background: rgba(7, 17, 26, 0.7);
  border-left: 2px solid rgba(155, 232, 90, 0.45);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cockpit-burp-card[data-review="verified"]       { border-left-color: #34d399; }
.cockpit-burp-card[data-review="false_positive"] { border-left-color: #ff7b72; opacity: 0.78; }

.cockpit-burp-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.cockpit-burp-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
}
.cockpit-burp-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--cockpit-mono);
}
.cockpit-burp-http {
  margin: 0;
  background: var(--cockpit-terminal-bg);
  color: #d8e1eb;
  font-family: var(--cockpit-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 6px 8px;
  white-space: pre;
  overflow-x: auto;
  border-radius: 2px;
  max-height: 160px;
}
.cockpit-burp-http::-webkit-scrollbar { height: 6px; width: 6px; }
.cockpit-burp-http::-webkit-scrollbar-thumb { background: rgba(155, 232, 90, 0.2); }
.cockpit-burp-instructions {
  margin: 0;
  padding-left: 16px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--cockpit-text);
}
.cockpit-burp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cockpit-burp-actions .burp-action-button {
  font-size: 0.75rem;
  padding: 4px 10px;
}
.cockpit-burp-status {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.cockpit-burp-status.is-success { color: #34d399; }
.cockpit-burp-status.is-error   { color: #ff7b72; }

/* History (retained context) cards. Same density as Burp cards. */
.cockpit-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cockpit-history-card {
  background: rgba(7, 17, 26, 0.7);
  border-left: 2px solid rgba(155, 232, 90, 0.24);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.cockpit-history-card:hover {
  border-left-color: var(--accent);
  background: rgba(7, 17, 26, 0.92);
}
.cockpit-history-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin: 0;
  color: var(--cockpit-text);
}
.cockpit-history-meta {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.cockpit-history-desc {
  font-size: 0.78rem;
  color: var(--cockpit-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------- Launch Control overlay ------- */
.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 4vw 4vh;
  animation: launch-overlay-in 180ms cubic-bezier(.2,.8,.2,1);
}
.launch-overlay.hidden { display: none; }
.launch-overlay.slide-out { animation: launch-overlay-out 220ms cubic-bezier(.4,0,.6,1) forwards; }

@keyframes launch-overlay-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes launch-overlay-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-24px); pointer-events: none; }
}

.launch-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 13, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.launch-overlay-card {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  background: #0b0f17;
  border: 1px solid rgba(155, 232, 90, 0.22);
  border-radius: 6px;
  padding: 22px 26px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  font-family: var(--cockpit-mono);
}
.launch-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cockpit-divider);
}
.launch-overlay-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 4px 0 0;
  letter-spacing: 0.01em;
}

.launch-overlay-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.launch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.launch-row-primary { grid-template-columns: 1.4fr 1fr; }
.launch-row:has(.launch-field:nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }

.launch-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.launch-field > span:first-child {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.launch-field input,
.launch-field select,
.launch-field textarea {
  background: #050a12;
  border: 1px solid rgba(155, 232, 90, 0.18);
  color: var(--cockpit-text);
  font: inherit;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 4px;
  font-family: var(--cockpit-mono);
}
.launch-field input:focus,
.launch-field select:focus,
.launch-field textarea:focus {
  outline: none;
  border-color: rgba(155, 232, 90, 0.55);
  box-shadow: 0 0 0 2px rgba(155, 232, 90, 0.12);
}
.launch-field textarea {
  resize: vertical;
  min-height: 72px;
}
.launch-field .field-hint {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
}
.launch-field-target input { font-size: 1rem; }

.launch-field-toggle {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.launch-field-toggle > span:first-child { display: none; }
.launch-field-toggle input { width: 16px; height: 16px; }
.launch-field-toggle span { font-size: 0.82rem; color: var(--cockpit-text); }

.launch-advanced {
  border: 1px solid rgba(155, 232, 90, 0.14);
  border-radius: 4px;
  padding: 0;
  margin-top: 4px;
}
.launch-advanced > summary {
  cursor: pointer;
  padding: 8px 12px;
  list-style: none;
  font-family: var(--cockpit-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(5, 10, 18, 0.6);
}
.launch-advanced > summary::-webkit-details-marker { display: none; }
.launch-advanced[open] > summary {
  border-bottom: 1px solid var(--cockpit-divider);
  color: var(--accent);
}
.launch-advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}

.launch-overlay-error {
  background: rgba(255, 123, 114, 0.12);
  border: 1px solid rgba(255, 123, 114, 0.45);
  color: #ffd6d2;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
}
.launch-overlay-error.hidden { display: none; }

.launch-overlay-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--cockpit-divider);
}
.launch-execute {
  font-size: 0.95rem;
  padding: 8px 18px;
}

@media (max-width: 1080px) {
  .launch-advanced-grid { grid-template-columns: 1fr 1fr; }
  .cockpit-grid { grid-template-columns: 18% 52% 30%; }
}

@media (max-width: 860px) {
  .cockpit-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .cockpit-pane-left,
  .cockpit-pane-right { max-height: 240px; }
  .launch-overlay { padding: 4vh 4vw; }
  .launch-row,
  .launch-row-primary,
  .launch-advanced-grid { grid-template-columns: 1fr !important; }
}


/* Bundle 19 — When the global HUD is mounted, push the rail down to
   sit below it so the brand block and top nav don't overlap. */
body.is-authed .rail {
  top: var(--cockpit-hud-h);
  height: calc(100vh - var(--cockpit-hud-h));
}

/* The cockpit pane already fills the viewport minus the HUD; hide the
   inline topbar breadcrumb when cockpit-mode is active so the operator
   gets maximum stream height. The HUD itself replaces the breadcrumb's
   purpose (state + actions). */
body.cockpit-mode .topbar { display: none; }
body.cockpit-mode .main > .panel,
body.cockpit-mode .main > #portal-panel { margin: 0; }
body.cockpit-mode #portal-panel { padding: 0; }

/* =====================================================================
   Bundle 20 — Enterprise DAST Orchestration
   Hybrid-engagement toggle (Launch Overlay), Burp DAST pill (HUD),
   and source-badge styling for Live Findings.
   ===================================================================== */

/* Hybrid toggle — emphasized variant of the existing launch-field-toggle */
.launch-hybrid-toggle {
  border: 1px dashed rgba(155, 232, 90, 0.45);
  border-radius: 4px;
  padding: 10px 12px;
  background: rgba(155, 232, 90, 0.06);
  align-items: flex-start;
  gap: 12px;
}
.launch-hybrid-toggle.hidden { display: none; }
.launch-hybrid-toggle input { margin-top: 4px; }
.launch-hybrid-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.86rem;
  font-family: var(--font-body);
}
.launch-hybrid-label strong {
  color: #d6f9ec;
  font-family: var(--cockpit-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.launch-hybrid-label .launch-hybrid-sub {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.launch-hybrid-label code {
  font-family: var(--cockpit-mono);
  background: rgba(3, 11, 18, 0.6);
  padding: 0 4px;
  border-radius: 3px;
  color: #f1c889;
}

/* Burp DAST pill — sits in the HUD between LAN and Model. States are
   driven by JS via data-burp-state="idle|running|succeeded|failed". */
#hud-burp-pill { transition: border-color 120ms ease, background 120ms ease; }
#hud-burp-pill.hidden { display: none; }
#hud-burp-pill[data-burp-state="running"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.10);
}
#hud-burp-pill[data-burp-state="running"] .hud-pill-text {
  color: #7dd3fc;
}
#hud-burp-pill[data-burp-state="running"] .agent-status-dot {
  background: #38bdf8;
  animation: live-terminal-pulse 1.2s ease-in-out infinite;
}
#hud-burp-pill[data-burp-state="succeeded"] {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.10);
}
#hud-burp-pill[data-burp-state="succeeded"] .hud-pill-text { color: #34d399; }
#hud-burp-pill[data-burp-state="succeeded"] .agent-status-dot { background: #34d399; }
#hud-burp-pill[data-burp-state="failed"] {
  border-color: rgba(255, 123, 114, 0.55);
  background: rgba(255, 123, 114, 0.10);
}
#hud-burp-pill[data-burp-state="failed"] .hud-pill-text { color: #ff7b72; }
#hud-burp-pill[data-burp-state="failed"] .agent-status-dot { background: #ff7b72; }

/* Source badges on the cockpit Live Findings ticker. AI vs DAST tag. */
.cockpit-finding-source {
  display: inline-flex;
  align-items: center;
  font-family: var(--cockpit-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid rgba(155, 232, 90, 0.22);
  color: var(--muted);
  background: rgba(3, 11, 18, 0.5);
  margin-right: 6px;
  white-space: nowrap;
}
.cockpit-finding-source.source-burp_dast {
  color: #f1c889;
  border-color: rgba(241, 200, 137, 0.45);
  background: rgba(241, 200, 137, 0.10);
}
.cockpit-finding-source.source-ai_discovery {
  color: #9ec3ff;
  border-color: rgba(158, 195, 255, 0.45);
  background: rgba(158, 195, 255, 0.10);
}
.cockpit-finding-source.source-flag {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.10);
}

/* The Live Findings row grid already declares 3 columns (sev / title /
   time). When a source badge is present, the title column absorbs it
   inline so we don't need to re-do the grid. */
.cockpit-finding-row .cockpit-finding-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* =====================================================================
   Bundle 22 — Remediation Loop UI.
   Proposed Remediation sub-section inside the Burp Workbench cards
   (cockpit pane + standalone tab). JetBrains Mono code block + a
   Confirm & Push Remediation button that supersedes the bare Confirm.
   ===================================================================== */

.burp-remediation-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(155, 232, 90, 0.10);
}

.burp-remediation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.burp-remediation-label {
  font-family: var(--cockpit-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.burp-remediation-flavor {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 2px;
  border: 1px solid rgba(155, 232, 90, 0.45);
  background: rgba(155, 232, 90, 0.08);
  color: #d6f9ec;
  font-family: var(--cockpit-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.burp-remediation-block {
  margin: 0;
  padding: 8px 10px;
  background: var(--cockpit-terminal-bg);
  color: #d8e1eb;
  font-family: var(--cockpit-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  border-radius: 2px;
  border-left: 2px solid rgba(155, 232, 90, 0.45);
  white-space: pre;
  overflow-x: auto;
  max-height: 220px;
}

.burp-remediation-block::-webkit-scrollbar { height: 6px; width: 6px; }
.burp-remediation-block::-webkit-scrollbar-thumb { background: rgba(155, 232, 90, 0.22); }

.burp-remediation-meta {
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  color: var(--cockpit-text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.burp-remediation-empty {
  font-family: var(--cockpit-mono);
  font-size: 0.72rem;
  color: var(--cockpit-text-dim);
  font-style: italic;
}

/* Push-status pill rendered next to the Confirm button when a push
   transitions through PENDING / PUSHED / FAILED. */
.burp-remediation-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--cockpit-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid rgba(155, 232, 90, 0.18);
  color: var(--muted);
}
.burp-remediation-status[data-state="pending"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.08);
}
.burp-remediation-status[data-state="pushed"] {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.08);
}
.burp-remediation-status[data-state="failed"] {
  color: #ff7b72;
  border-color: rgba(255, 123, 114, 0.55);
  background: rgba(255, 123, 114, 0.08);
}
.burp-remediation-status[data-state="skipped"] {
  color: var(--cockpit-text-dim);
}

/* Confirm & Push button — same visual family as burp-confirm-button but
   slightly wider and carrying the push affordance icon. */
.burp-confirm-push-button {
  /* inherits the existing burp-confirm-button styling via JS-applied class */
}

/* =====================================================================
   Bundle 22.5 — Portal-managed integration credentials.
   The Integrations panel lives inside the Settings tab and is shown
   only when the signed-in user has admin privileges. Visual rules
   inherit from the existing .panel / .form-grid / .hud-pill conventions
   so we don't duplicate styling.
   ===================================================================== */
.admin-only.hidden { display: none; }

#integrations-burp-status-value .hud-pill-text {
  font-family: var(--cockpit-mono);
}

/* Status pill state colors mirror the HUD Burp DAST pill so a single
   "configured" signal looks the same wherever it appears. */
#integrations-burp-status-pill[data-state="portal"],
#integrations-burp-status-pill[data-state="environment"] {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.10);
}
#integrations-burp-status-pill[data-state="portal"] .hud-pill-text,
#integrations-burp-status-pill[data-state="environment"] .hud-pill-text {
  color: #34d399;
}
#integrations-burp-status-pill[data-state="portal"] .agent-status-dot,
#integrations-burp-status-pill[data-state="environment"] .agent-status-dot {
  background: #34d399;
}
#integrations-burp-status-pill[data-state="none"] .hud-pill-text {
  color: var(--cockpit-text-dim);
}

/* Audit-line: who set it, when, and which source wins. */
#integrations-burp-meta {
  font-family: var(--cockpit-mono);
  font-size: 0.78rem;
  padding: 8px 12px;
  border-left: 2px solid rgba(155, 232, 90, 0.18);
  background: rgba(7, 17, 26, 0.4);
  margin: 8px 0 12px;
}

/* =====================================================================
   Burp Suite Enterprise DAST console (2026-05-24).
   Top-level Burp destination — modern, pentest-ready control surface.
   ===================================================================== */

/* Sidebar "ENT" badge on the Burp destination when validated. */
.rail-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04241a;
}
.rail-badge.hidden { display: none; }

/* Header chip mirroring the badge inside the console title. */
.ent-chip {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04241a;
  vertical-align: middle;
}
.ent-chip.hidden { display: none; }

.burp-enterprise-panel { display: flex; flex-direction: column; gap: 16px; }

/* Locked state — shown until a validated Enterprise key is present. */
.burp-ent-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px dashed rgba(155, 232, 90, 0.28);
  border-radius: var(--radius);
  background: rgba(7, 17, 26, 0.4);
}
.burp-ent-locked.hidden { display: none; }
.burp-ent-locked-icon { color: var(--muted); }
.burp-ent-locked h3 { margin: 0; font-family: var(--font-display); }
.burp-ent-locked p { max-width: 52ch; margin: 0; }
.burp-ent-locked-actions { display: flex; gap: 10px; margin-top: 8px; }

.burp-ent-console { display: flex; flex-direction: column; gap: 14px; }
.burp-ent-console.hidden { display: none; }

/* Validation status bar. */
.burp-ent-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-md, 14px);
  background: rgba(7, 17, 26, 0.55);
  border: 1px solid var(--border);
}
.burp-ent-stat { display: flex; flex-direction: column; gap: 2px; }
.burp-ent-stat .eyebrow { font-size: 0.6rem; }
.burp-ent-stat .mono { font-size: 0.82rem; color: var(--text); }

/* Console sub-navigation pills. */
.burp-ent-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.burp-ent-pill {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 16px;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.burp-ent-pill:hover { color: var(--text); }
.burp-ent-pill.active {
  color: #04241a;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  font-weight: 600;
}

.burp-ent-console-panel { display: flex; flex-direction: column; gap: 12px; }
.burp-ent-console-panel.hidden { display: none; }
.burp-ent-panel-head { display: flex; flex-direction: column; gap: 2px; }
.burp-ent-panel-head h3 { margin: 0; font-family: var(--font-display); }
.burp-ent-panel-head p { margin: 0; font-size: 0.82rem; }
#burp-ent-console-status.is-error { color: var(--danger); }

/* Tables (scans, schedules). */
.burp-ent-table-wrap { overflow-x: auto; }
.burp-ent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.burp-ent-table th {
  text-align: left;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.burp-ent-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(155, 232, 90, 0.08);
  vertical-align: middle;
  color: var(--text);
}
.burp-ent-table tbody tr:hover { background: rgba(155, 232, 90, 0.04); }
.burp-ent-table .mono { font-family: var(--cockpit-mono); font-size: 0.78rem; }

/* Status pill for scans. */
.burp-ent-status {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: capitalize;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.burp-ent-status-succeeded { color: #34d399; border-color: rgba(52, 211, 153, 0.5); }
.burp-ent-status-running,
.burp-ent-status-auditing,
.burp-ent-status-crawling { color: #6bd6ff; border-color: rgba(107, 214, 255, 0.5); }
.burp-ent-status-queued,
.burp-ent-status-paused { color: #ffe66b; border-color: rgba(255, 230, 107, 0.5); }
.burp-ent-status-failed,
.burp-ent-status-cancelled,
.burp-ent-status-aborted { color: #ff7b72; border-color: rgba(255, 123, 114, 0.5); }

/* Severity chips. */
.burp-ent-sev { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.burp-sev-chip {
  font-family: var(--cockpit-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #04140f;
}
.burp-sev-crit { background: #ff7b72; }
.burp-sev-high { background: #ffa86b; }
.burp-sev-med  { background: #ffe66b; }
.burp-sev-low  { background: #6bd6ff; }
.burp-sev-info { background: #A6B3AE; }

/* Card grids (scan configs, agents). */
.burp-ent-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.burp-ent-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--border);
  background: rgba(7, 17, 26, 0.55);
}
.burp-ent-card-title { font-family: var(--font-display); font-size: 0.92rem; color: var(--text); }
.burp-ent-card-sub { font-size: 0.74rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.burp-ent-card .ghost-button { align-self: flex-start; margin-top: 4px; }

/* Site tree / scope rows. */
.burp-ent-tree { display: flex; flex-direction: column; gap: 8px; }
.burp-ent-site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--border);
  background: rgba(7, 17, 26, 0.55);
}
.burp-ent-site-row:hover { border-color: rgba(155, 232, 90, 0.35); }
.burp-ent-site-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.burp-ent-site-title { font-family: var(--font-display); font-size: 0.92rem; color: var(--text); }
.burp-ent-site-meta { font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; }

/* Launch / inline form bar. */
.burp-ent-launch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 14px);
  background: rgba(7, 17, 26, 0.4);
  border: 1px solid var(--border);
}
.burp-ent-inline-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.74rem; color: var(--muted); }
.burp-ent-inline-field select,
.burp-ent-inline-field input {
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.85rem;
}
.burp-ent-inline-grow { flex: 1 1 240px; }
.burp-ent-inline-grow input { width: 100%; }

/* Small button modifier reused across the console. */
.btn-sm { font-size: 0.76rem !important; padding: 5px 12px !important; }

/* Report iframe. */
.burp-ent-report-output { margin-top: 8px; }
.burp-ent-report-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  background: #fff;
}

.burp-ent-empty {
  padding: 28px;
  text-align: center;
  border: 1px dashed rgba(155, 232, 90, 0.22);
  border-radius: var(--radius-md, 14px);
  font-size: 0.86rem;
}

/* =====================================================================
   Burp Workbench interactive tools — Repeater / Intruder / Export.
   ===================================================================== */
.burp-wb-transportbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 12px 14px;
  border-radius: var(--radius-md, 14px);
  background: rgba(7, 17, 26, 0.5);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.burp-wb-transportbar .burp-ent-inline-field { min-width: 140px; }
.burp-wb-transportbar #burp-wb-timeout { width: 90px; }

.burp-wb-panel { display: flex; flex-direction: column; gap: 12px; }
.burp-wb-panel.hidden { display: none; }
.burp-wb-panel code {
  font-family: var(--cockpit-mono);
  background: rgba(155, 232, 90, 0.12);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
}

.burp-wb-repeater-grid,
.burp-wb-intruder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .burp-wb-repeater-grid,
  .burp-wb-intruder-grid { grid-template-columns: 1fr; }
}
.burp-wb-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.burp-wb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.burp-wb-col-actions { display: flex; gap: 6px; }
.burp-wb-resp-meta { font-size: 0.74rem; color: var(--accent); }

.burp-wb-editor {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  background: var(--cockpit-terminal-bg, #06101a);
  color: #d8e1eb;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}
.burp-wb-editor:focus { outline: none; border-color: rgba(155, 232, 90, 0.5); }

.burp-wb-response {
  margin: 0;
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  background: var(--cockpit-terminal-bg, #06101a);
  color: #d8e1eb;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.burp-wb-intruder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.burp-wb-intruder-bar .burp-ent-inline-field input { width: 140px; }

.burp-wb-export-bar { display: flex; gap: 12px; }
.burp-wb-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#burp-wb-rep-status.is-error,
#burp-wb-int-status.is-error { color: var(--danger); }

/* DLQ cost-control banner (2026-06-02). Sits in the topbar; appears only
   when there are dead-lettered messages so operators don't miss silent
   worker failures before they balloon into a cost spike. */
.dlq-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 123, 114, 0.16);
  color: #ffd0cc;
  border: 1px solid rgba(255, 123, 114, 0.45);
  font-size: 0.78rem;
  font-family: var(--font-body);
}
.dlq-banner.hidden { display: none; }
.dlq-banner svg { color: var(--danger); flex-shrink: 0; }
