* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a0a;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 2rem 3rem;
}

/* ── Logo ── */
.logo {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 2.5rem;
}

/* ── Nav ── */
.nav {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid #161616;
  padding-bottom: 1rem;
}
.nav a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3a3a3a;
  text-decoration: none;
}
.nav a:hover { color: #888; }
.nav a.active { color: #fff; }

/* ── Links ── */
a { color: #5b8af5; text-decoration: none; }
a:hover { color: #fff; }

.back {
  font-size: 0.7rem;
  color: #333;
  margin-bottom: 2rem;
  display: inline-block;
  letter-spacing: 0.05em;
}
.back:hover { color: #888; }

/* ── Section ── */
.section { margin-bottom: 3rem; }
.section h2 {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #161616;
}

/* ── Section header with button ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #161616;
}
.section-header h2 {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #333;
  margin: 0;
  border: none;
  padding: 0;
}

/* ── Detail block ── */
.detail {
  margin-bottom: 2.5rem;
  max-width: 720px;
  border: 1px solid #161616;
  border-radius: 6px;
  overflow: hidden;
}
.detail .row {
  display: flex;
  border-bottom: 1px solid #161616;
}
.detail .row:last-child { border-bottom: none; }
.detail .row .key {
  width: 160px;
  flex-shrink: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  padding: 0.65rem 1rem;
  background: #0d0d0d;
}
.detail .row .val {
  flex: 1;
  color: #ccc;
  padding: 0.65rem 1rem;
  background: #111;
  font-size: 0.82rem;
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
thead tr { border-bottom: 1px solid #161616; }
th {
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  padding: 0.5rem 0.75rem;
  font-weight: 400;
}
td {
  padding: 0.7rem 0.75rem;
  color: #aaa;
  border-bottom: 1px solid #0f0f0f;
}
tr:hover td { background: #111; color: #fff; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.badge.pending      { background: #2d1a00; color: #f59e0b; }
.badge.running      { background: #0d1f35; color: #3b82f6; }
.badge.done         { background: #022c20; color: #10b981; }
.badge.failed       { background: #2d0707; color: #ef4444; }
.badge.assembling   { background: #13102e; color: #818cf8; }
.badge.ready        { background: #022c20; color: #10b981; }
.badge.not_rendered { background: #161616; color: #444; }
.badge.stale        { background: #2d1a00; color: #f59e0b; }
.badge.rendered     { background: #022c20; color: #10b981; }
.badge.active       { background: #022c20; color: #10b981; }
.badge.draft        { background: #161616; color: #444; }
.badge.review       { background: #0d1f35; color: #3b82f6; }
.badge.approved     { background: #022c20; color: #10b981; }
.badge.rejected     { background: #2d0707; color: #ef4444; }
.badge.inactive     { background: #161616; color: #444; }

/* ── Stat cards ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}
.stat {
  background: #0d0d0d;
  border: 1px solid #161616;
  border-radius: 6px;
  padding: 1.5rem;
}
.stat .num {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #333;
}
.stat.pending .num { color: #f59e0b; }
.stat.running .num { color: #3b82f6; }
.stat.done    .num { color: #10b981; }
.stat.failed  .num { color: #ef4444; }

/* ── Forms ── */
.form {
  background: #0d0d0d;
  border: 1px solid #161616;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-width: 720px;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row label {
  width: 140px;
  flex-shrink: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
}
.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  background: #111;
  border: 1px solid #1a1a1a;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: inherit;
}
.form-row textarea { height: 80px; resize: vertical; }
.form-row select option { background: #111; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* ── Buttons ── */
.btn {
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #ccc; }
.btn-warning { background: #2d1a00; color: #f59e0b; border: 1px solid #f59e0b; }
.btn-warning:hover { background: #f59e0b; color: #000; }
.btn-success { background: #022c20; color: #10b981; border: 1px solid #10b981; }
.btn-success:hover { background: #10b981; color: #000; }
.btn-danger  { background: #2d0707; color: #ef4444; border: 1px solid #ef4444; }
.btn-danger:hover  { background: #ef4444; color: #000; }
.btn-sm { padding: 0.2rem 0.6rem; font-size: 0.72rem; }

/* ── Pre ── */
pre {
  background: #0d0d0d;
  border: 1px solid #161616;
  padding: 1.25rem;
  border-radius: 6px;
  font-size: 0.75rem;
  overflow-x: auto;
  color: #555;
  line-height: 1.6;
}

/* ── Page header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page-header h2 {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff;
}