:root {
  --tiffany: #81d8d0;
  --tiffany-2: #a8ebe5;
  --prussian: #003153;
  --prussian-2: #06263d;
  --bg: #f3f7f7;
  --surface: #ffffff;
  --surface-2: #e9f8f6;
  --ink: #102334;
  --muted: #5f7080;
  --line: #c9ddde;
  --accent: var(--tiffany);
  --accent-ink: var(--prussian);
  --blue: var(--prussian);
  --amber: #a86413;
  --red: #a33a31;
  --shadow: 0 18px 60px rgba(0, 49, 83, 0.12);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(129, 216, 208, 0.2), rgba(129, 216, 208, 0) 230px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--prussian);
  color: #e9fbf9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: var(--tiffany);
  color: var(--prussian);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: #a8c6d0;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
  color: #d9f3f0;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(129, 216, 208, 0.5);
  background: rgba(129, 216, 208, 0.14);
}

.section-kicker,
.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .section-kicker {
  color: #a8c6d0;
}

.project-list {
  min-height: 0;
  overflow: auto;
}

.project-item {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid rgba(129, 216, 208, 0.22);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: rgba(129, 216, 208, 0.08);
  color: #e9fbf9;
  text-align: left;
  cursor: pointer;
}

.project-item span {
  display: block;
  margin-top: 4px;
  color: #a8c6d0;
  font-size: 12px;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  color: #a8c6d0;
  font-size: 12px;
}

.health-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #f3b23c;
}

.health-dot.ok::before {
  background: var(--tiffany);
}

.health-dot.bad::before {
  background: #df695f;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
}

.top-actions,
.input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 49, 83, 0.14);
}

.button.primary {
  border-color: #4bb9b2;
  background: var(--tiffany);
  color: var(--prussian);
  font-weight: 800;
}

.button.secondary {
  border-color: #9bcfd0;
  background: #eefcfb;
  color: var(--prussian);
}

.button.ghost {
  background: transparent;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.status-strip div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.status-strip span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.status-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.work-status,
.alpha-gate-panel,
.hosted-runner-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.work-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.work-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.work-status-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.work-status-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--prussian);
}

.work-status-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.alpha-gate-grid {
  display: grid;
  gap: 14px;
}

.alpha-gate-summary,
.hosted-runner-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.alpha-gate-summary div,
.hosted-runner-summary div {
  min-width: 0;
  padding: 11px;
  background: #fbffff;
}

.alpha-gate-summary span,
.alpha-gate-check span,
.hosted-runner-summary span,
.hosted-runner-stages span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hosted-runner-grid {
  display: grid;
  gap: 14px;
}

.hosted-runner-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.hosted-runner-stages article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.hosted-runner-stages article.pass {
  border-color: rgba(129, 216, 208, 0.88);
}

.hosted-runner-stages article.fail {
  border-color: #efc1a2;
  background: #fffaf4;
}

.hosted-runner-stages article.pending {
  border-color: #e2d5b6;
  background: #fffdf6;
}

.hosted-runner-stages article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hosted-runner-stages strong,
.hosted-runner-stages p,
.hosted-runner-stages small {
  overflow-wrap: anywhere;
}

.hosted-runner-stages p {
  margin: 8px 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
}

.hosted-runner-stages small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.hosting-paths {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f3fbfb;
}

.hosting-paths-header,
.hosting-paths article div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hosting-paths-header span,
.hosting-paths article span {
  color: var(--muted);
  font-size: 12px;
}

.hosting-paths article {
  min-width: 0;
  border: 1px solid #d5e7e8;
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.hosting-paths article.recommended {
  border-color: rgba(129, 216, 208, 0.9);
  box-shadow: inset 3px 0 0 var(--tiffany);
}

.hosting-paths article.blocked {
  border-color: #e2d5b6;
  background: #fffdf6;
}

.hosting-paths p,
.hosting-paths li,
.hosting-paths code {
  overflow-wrap: anywhere;
}

.hosting-paths p,
.hosting-paths ul {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hosting-paths ul {
  padding-left: 18px;
}

.hosting-paths code {
  display: block;
  margin-top: 8px;
  border-radius: var(--radius);
  padding: 8px;
  background: var(--prussian);
  color: #d8fffb;
  font-size: 12px;
  line-height: 1.35;
}

.attach-checklist {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f7ffff;
}

.attach-checklist-header,
.attach-checklist article div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attach-checklist-header span,
.attach-checklist article span {
  color: var(--muted);
  font-size: 12px;
}

.attach-checklist article {
  min-width: 0;
  border: 1px solid #d5e7e8;
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.attach-checklist article.pass {
  border-color: rgba(129, 216, 208, 0.9);
}

.attach-checklist article.pending {
  border-color: #e2d5b6;
  background: #fffdf6;
}

.attach-checklist p,
.attach-checklist code {
  overflow-wrap: anywhere;
}

.attach-checklist p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.attach-checklist code {
  display: block;
  margin-top: 8px;
  border-radius: var(--radius);
  padding: 8px;
  background: var(--prussian);
  color: #d8fffb;
  font-size: 12px;
  line-height: 1.35;
}

.hosted-runner-handoff {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.hosted-runner-handoff > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.hosted-runner-handoff > .commercial-acceptance {
  border-color: rgba(129, 216, 208, 0.9);
  background: #f4fffd;
}

.hosted-runner-handoff strong,
.hosted-runner-handoff code,
.hosted-runner-handoff p,
.hosted-runner-handoff li,
.hosted-runner-handoff small {
  overflow-wrap: anywhere;
}

.hosted-runner-handoff code {
  display: block;
  margin-top: 8px;
  border-radius: var(--radius);
  padding: 8px;
  background: var(--prussian);
  color: #d8fffb;
  font-size: 12px;
  line-height: 1.35;
}

.hosted-runner-handoff p,
.hosted-runner-handoff ul {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.operator-proof-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 0.8fr);
  gap: 12px;
}

.operator-proof-card,
.operator-proof-result {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.operator-proof-card strong,
.operator-proof-result strong {
  display: block;
  margin-bottom: 8px;
}

.operator-proof-card p,
.operator-proof-result p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.operator-proof-card textarea {
  width: 100%;
  min-height: 170px;
  border: 1px solid #cbd3ca;
  border-radius: var(--radius);
  padding: 10px;
  background: #f7ffff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.operator-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.operator-proof-metrics {
  display: grid;
  gap: 8px;
}

.operator-proof-metrics span {
  display: block;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface-2);
  color: var(--prussian);
  font-size: 12px;
}

.alpha-gate-summary strong,
.hosted-runner-summary strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--prussian);
  font-size: 13px;
}

.alpha-gate-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.alpha-gate-check {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tiffany);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.alpha-gate-check.fail {
  border-left-color: var(--red);
  background: #fff7f6;
}

.alpha-gate-check div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.alpha-gate-check strong {
  overflow-wrap: anywhere;
  color: var(--prussian);
}

.alpha-gate-check p,
.alpha-gate-gaps p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.alpha-gate-gaps {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.alpha-gate-gaps.ready {
  background: var(--surface-2);
}

.alpha-gate-gaps strong {
  color: var(--prussian);
}

.alpha-gate-gaps ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gap-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.gap-columns div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.gap-columns span {
  color: var(--prussian);
  font-size: 12px;
  font-weight: 800;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.panel-actions .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: #d9f6f3;
  color: var(--prussian);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.quiet {
  background: #e8f0f2;
  color: var(--muted);
}

.badge.fail {
  background: #f8dfdb;
  color: var(--red);
}

.badge.warn {
  background: #faead3;
  color: var(--amber);
}

.field,
.field-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd3ca;
  border-radius: var(--radius);
  padding: 11px 12px;
  background: #fbffff;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
}

.upload-zone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  border: 1px dashed #79c4c1;
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone::before {
  content: "CSV";
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--prussian);
  color: var(--tiffany);
  font-size: 13px;
  font-weight: 800;
}

.upload-zone strong,
.upload-zone span {
  display: block;
}

.upload-zone span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.stack-list,
.timeline,
.check-list,
.feedback-list,
.report-canvas {
  display: grid;
  gap: 10px;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbffff;
  color: var(--muted);
}

.clarification-item,
.timeline-item,
.check-item,
.feedback-item,
.report-section,
.delivery-evidence,
.native-delivery-contract {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fbffff;
}

.clarification-item {
  display: grid;
  gap: 7px;
}

.product-path {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 12px;
  background: #f8ffff;
}

.product-path-copy,
.product-path-recommendation {
  display: grid;
  gap: 6px;
}

.product-path-copy strong,
.product-path-recommendation strong {
  color: var(--prussian);
  overflow-wrap: anywhere;
}

.product-path-copy p,
.product-path-copy small,
.product-path-recommendation p,
.product-path-recommendation span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.product-path-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-control {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #f8ffff;
}

.decision-control-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.decision-control-header strong,
.decision-control-header p,
.decision-control-header small {
  display: block;
}

.decision-control-header strong {
  margin-top: 7px;
}

.decision-control-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.decision-control-header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.decision-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.decision-option {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.decision-option:hover,
.decision-option.selected {
  border-color: #44bbb4;
  background: #e8fbf9;
}

.decision-option span,
.decision-option strong,
.decision-option small,
.decision-option em {
  display: block;
  overflow-wrap: anywhere;
}

.decision-option span {
  color: var(--prussian);
  font-size: 13px;
  font-weight: 800;
}

.decision-option strong {
  font-size: 13px;
  line-height: 1.35;
}

.decision-option small,
.decision-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.clarification-item strong,
.timeline-item strong,
.check-item strong {
  display: block;
  margin-bottom: 4px;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
}

.delivery-contract {
  display: grid;
  gap: 12px;
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.delivery-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f4fffe;
}

.delivery-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.delivery-evidence-list {
  display: grid;
  gap: 10px;
}

.delivery-testcases {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.delivery-testcases-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--prussian);
}

.delivery-testcases-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.delivery-testcase {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(120px, 0.35fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}

.delivery-testcase span,
.delivery-testcase div {
  color: var(--muted);
}

.delivery-testcase.fail strong {
  color: var(--red);
}

.delivery-evidence,
.native-delivery-contract {
  display: grid;
  gap: 7px;
}

.native-delivery-contract span {
  color: var(--muted);
  font-size: 13px;
}

.timeline-item {
  position: relative;
  padding-left: 34px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.mission-console {
  display: grid;
  gap: 12px;
}

.mission-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mission-summary div,
.decision-gate-card,
.agent-node {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbffff;
}

.mission-summary div {
  padding: 12px;
}

.mission-summary span,
.mission-summary small,
.agent-node span,
.agent-node small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mission-summary strong,
.agent-node strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.decision-gate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  background: #f4fffe;
}

.decision-gate-card.blocked {
  border-color: #efc1a2;
  background: #fffaf4;
}

.decision-gate-card strong {
  display: block;
  font-size: 17px;
}

.decision-gate-card p,
.decision-gate-card ul {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.decision-gate-card ul {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.agent-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-node {
  position: relative;
  padding: 12px 12px 12px 16px;
}

.agent-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--tiffany);
}

.agent-node.blocked {
  background: #fffaf4;
}

.agent-node.blocked::before,
.agent-node.cancelled::before {
  background: var(--amber);
}

.agent-node.queued::before,
.agent-node.running::before {
  background: #2f86c5;
}

.agent-node.completed::before {
  background: #2f9e72;
}

.native-monitor {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 0.58fr);
  gap: 14px;
}

.provider-health {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.provider-health.blocked {
  border-color: #efc1a2;
  background: #fffaf4;
}

.provider-gate-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f4fffe;
}

.provider-gate-card.blocked {
  border-color: #efc1a2;
  background: #fffaf4;
}

.provider-gate-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.provider-gate-main strong {
  display: block;
  font-size: 16px;
}

.provider-health-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.provider-health-main strong {
  display: block;
  font-size: 16px;
}

.provider-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.provider-health-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.provider-health-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.provider-health-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.provider-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.provider-missing span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8dfdb;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.provider-missing.neutral span {
  background: rgba(129, 216, 208, 0.2);
  color: var(--ink);
}

.native-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.native-ops-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.native-ops-panel.blocked {
  border-color: #efc1a2;
  background: #fffaf4;
}

.native-ops-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.native-ops-header strong {
  display: block;
  overflow-wrap: anywhere;
}

.native-ops-list {
  display: grid;
  gap: 8px;
}

.native-ops-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.native-ops-list article.warn {
  border-color: #efc1a2;
  background: #fffaf4;
}

.native-ops-list strong,
.native-ops-list span {
  display: block;
  overflow-wrap: anywhere;
}

.native-ops-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.queue-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.queue-health-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.queue-health-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.queue-health-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.scheduler-events {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.scheduler-events article {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(0, 49, 83, 0.08);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(129, 216, 208, 0.08);
}

.scheduler-events strong,
.scheduler-events span,
.scheduler-events small {
  display: block;
  overflow-wrap: anywhere;
}

.scheduler-events strong {
  color: var(--ink);
  font-size: 12px;
}

.scheduler-events span,
.scheduler-events small {
  color: var(--muted);
  font-size: 12px;
}

.native-task-list,
.native-task-detail {
  min-width: 0;
}

.native-task-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.native-task-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: #fbffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.native-task-card:hover,
.native-task-card.active {
  border-color: #58c4bd;
  background: #e9fbf9;
}

.native-task-card .badge {
  justify-self: start;
}

.native-task-card strong,
.native-task-card small {
  display: block;
  overflow-wrap: anywhere;
}

.native-task-card small {
  color: var(--muted);
  font-size: 12px;
}

.native-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.native-detail-header h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.native-lease-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.native-lease-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fbffff;
}

.native-lease-grid span,
.native-event span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.native-lease-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.native-event-stream {
  display: grid;
  gap: 8px;
}

.native-event {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 10px 30px;
  background: #fbffff;
}

.native-event::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tiffany);
}

.native-event strong {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.native-event div {
  margin-bottom: 4px;
}

.native-failure {
  margin-top: 12px;
  border: 1px solid #efb6b0;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff7f6;
}

.native-failure.compact {
  margin-top: 0;
  border-left-width: 3px;
}

.native-failure p {
  margin-bottom: 0;
  color: var(--muted);
}

.check-item {
  border-left: 4px solid var(--tiffany);
}

.check-item.fail {
  border-left-color: var(--red);
}

.report-canvas {
  padding: 0;
}

.report-canvas.empty-state {
  padding: 14px;
}

.report-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--prussian);
  color: #effffe;
}

.report-summary p {
  color: #bfe4e7;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbffff;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.bar-list {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr minmax(70px, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #dcebed;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--tiffany);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--prussian);
  color: #effffe;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.access-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.access-modal.open {
  display: grid;
}

.access-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 49, 83, 0.42);
  backdrop-filter: blur(5px);
}

.access-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid rgba(129, 216, 208, 0.45);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.access-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.access-copy {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.access-field input {
  width: 100%;
}

.access-error {
  min-height: 20px;
  margin-top: 8px;
  color: var(--red);
  font-size: 13px;
}

.access-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .status-strip,
  .work-grid,
  .work-status-grid,
  .alpha-gate-summary,
  .alpha-gate-checks,
  .operator-proof-grid,
  .hosted-runner-handoff,
  .hosted-runner-stages,
  .native-monitor,
  .native-ops-grid,
  .provider-health-grid,
  .queue-health-grid,
  .mission-summary,
  .agent-chain,
  .decision-options,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-header,
  .decision-control-header {
    display: grid;
  }

  .field-row,
  .bar-row,
  .native-lease-grid {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .input-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: 100%;
  }

  .access-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
