:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #5a6875;
  --line: #d9e1e8;
  --accent: #176b87;
  --accent-dark: #0f4e63;
  --soft: #e8f3f6;
  --warn: #9a5b00;
  --bad: #a33434;
  --good: #147247;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.subhead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.status-pill,
.section-head span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(10, 20, 30, .04);
}

.grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr);
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 16px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #33414f;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5de;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(23, 107, 135, .18);
  border-color: var(--accent);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
}

button.secondary:hover {
  background: var(--soft);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  padding: 9px 12px;
  font-weight: 700;
  text-decoration: none;
}

.button-link:hover {
  background: var(--soft);
}

.button-link.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button-link.primary:hover {
  background: var(--accent-dark);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(460px, 1.2fr);
  gap: 18px;
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.jobs {
  display: grid;
  gap: 10px;
}

.job-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fbfcfd;
  text-align: left;
  cursor: pointer;
}

.job-card.active {
  border-color: var(--accent);
  background: var(--soft);
}

.job-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.job-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e7ecf0;
  color: #33414f;
  font-size: 12px;
  font-weight: 700;
}

.badge.good {
  background: #dff2e9;
  color: var(--good);
}

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

.badge.bad {
  background: #fde4e4;
  color: var(--bad);
}

.detail.empty {
  color: var(--muted);
}

.message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.progress-wrap {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-label {
  color: var(--text);
  font-weight: 700;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf0;
}

.progress-bar.mini {
  height: 6px;
  margin-top: 9px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #49a6a6);
  transition: width .35s ease;
}

.progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 12px;
  margin: 14px 0;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.artifact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.artifact {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.artifact a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.artifact span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.review-panel {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #c8dce4;
  border-radius: 7px;
  background: #f7fbfc;
}

.review-panel h3 {
  margin: 0 0 10px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.image-preview {
  margin: 14px 0;
}

.image-preview h3 {
  margin: 0 0 10px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.image-card {
  display: grid;
  gap: 6px;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.image-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef3f6;
}

.image-card span {
  overflow-wrap: anywhere;
}

.approval {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #f0d7a8;
  border-radius: 7px;
  background: #fff8e9;
}

.approval p {
  margin: 0 0 10px;
}

.logs {
  margin-top: 16px;
}

.logs summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .hero,
  .two-col,
  .grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-pill {
    justify-self: start;
  }
}
