:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --sub: #475569;
  --brand: #1f8f63;
  --brand-soft: #d8f3e8;
  --warn: #9a6500;
  --warn-soft: rgba(232, 163, 23, 0.14);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0%, var(--bg) 42%, #eef2f7 100%);
  color: var(--text);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.08);
  margin-bottom: 16px;
}

.hero {
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

h3 {
  margin: 20px 0 8px;
  font-size: 16px;
}

p {
  margin: 6px 0;
}

.subcopy,
.hint {
  color: var(--sub);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.row.compact {
  grid-template-columns: 1fr 1fr auto;
}

.actions {
  display: flex;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  font-size: 13px;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select,
textarea,
button {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  font: inherit;
  box-sizing: border-box;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
}

button {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.compact-card p {
  margin: 6px 0;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.inline-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.key-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  background: var(--warn-soft);
  color: var(--warn);
}

.badge + .badge {
  margin-left: 6px;
}

.badge.status-approved,
.badge.status-succeeded,
.badge.status-passed,
.badge.status-available,
.badge.status-captured {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge.status-needs_confirmation,
.badge.status-pending,
.badge.status-completed_with_failures {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.status-rejected,
.badge.status-failed,
.badge.status-blocked,
.badge.status-invalid,
.badge.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

#logs {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  background: #0b1220;
  color: #dbeafe;
  border-radius: 12px;
  padding: 10px;
}

@media (max-width: 760px) {
  .row,
  .row.compact,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
