* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7f8;
  color: #182026;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 0 14px;
}

button.secondary {
  background: #334155;
}

button.danger {
  background: #b42318;
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

.login-shell {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 20px;
}

.login-panel {
  max-width: 380px;
  width: 100%;
}

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

.topbar strong {
  display: block;
  font-size: 24px;
}

.topbar span,
small {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.metrics,
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.metric,
.panel {
  background: #fff;
  border: 1px solid #d7dee3;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.metric {
  padding: 16px;
}

.metric span {
  color: #64748b;
  display: block;
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 4px;
}

.panel {
  padding: 16px;
}

.panel h1,
.panel h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

label {
  color: #334155;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

input,
select {
  background: #fff;
  border: 1px solid #b9c3ca;
  border-radius: 6px;
  display: block;
  margin-top: 6px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.stack {
  display: grid;
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.alert {
  border-radius: 8px;
  font-weight: 700;
  margin: 0 0 14px;
  padding: 12px 14px;
}

.alert-ok {
  background: #dcfce7;
  color: #166534;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-running {
  background: #fff4cc;
  color: #704b00;
}

.workflow {
  margin-bottom: 24px;
}

.workflow-head {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.workflow-head h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 2px 0 0;
}

.eyebrow {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-state {
  border-left: 4px solid #0f766e;
  font-weight: 800;
  padding: 8px 12px;
}

.workflow-steps {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-step {
  background: #fff;
  border: 1px solid #d7dee3;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 16px;
}

.workflow-step.is-current {
  border-color: #0f766e;
  box-shadow: inset 4px 0 0 #0f766e;
}

.workflow-step.is-locked {
  background: #f8fafc;
  color: #64748b;
}

.step-number {
  align-items: center;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.is-done .step-number {
  background: #d1fae5;
  color: #065f46;
}

.is-current .step-number {
  background: #0f766e;
  color: #fff;
}

.step-title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.step-title h2 {
  font-size: 17px;
  letter-spacing: 0;
  margin: 0;
}

.step-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.step-content p {
  margin: 8px 0 12px;
}

.step-ok {
  color: #067647;
  font-weight: 800;
}

.step-stop {
  color: #b42318;
  font-weight: 800;
}

.inline-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form label {
  margin: 0;
  min-width: 220px;
}

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

.approval-form button {
  align-self: end;
}

pre {
  background: #111827;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
  overflow-x: auto;
  padding: 12px;
}

.dry-run-result {
  border-left: 4px solid #b42318;
  margin: 12px 0;
  padding: 8px 12px;
}

.dry-run-result.is-safe {
  border-color: #067647;
}

.dry-run-result > span {
  color: #64748b;
  display: block;
  font-size: 12px;
}

.dry-run-result dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0 0;
}

.dry-run-result dl div {
  background: #f1f5f9;
  padding: 8px;
}

.dry-run-result dt {
  color: #64748b;
  font-size: 11px;
}

.dry-run-result dd {
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 0;
}

.technical {
  margin-top: 16px;
}

.technical > summary {
  cursor: pointer;
  font-weight: 800;
  padding: 12px 0;
}

@media (max-width: 820px) {
  .shell {
    padding: 14px;
  }

  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-step {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px;
  }

  .approval-form,
  .dry-run-result dl {
    grid-template-columns: 1fr;
  }
}
