:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --elevated: #1a1a2e;
  --primary: #7c3aed;
  --accent: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --border: #2a2a3e;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h1 span { color: var(--primary); }
.meta { color: var(--muted); font-size: 0.85rem; }
main { padding: 1.25rem 1.5rem 2rem; max-width: 1400px; margin: 0 auto; }
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
section h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-non_teste { background: #374151; color: #d1d5db; }
.badge-en_cours { background: #78350f; color: #fde68a; }
.badge-valide { background: #064e3b; color: #6ee7b7; }
.badge-casse { background: #7f1d1d; color: #fca5a5; }
.badge-preview { background: #312e81; color: #c4b5fd; }
.badge-applied { background: #1e3a5f; color: #93c5fd; }
.badge-verified { background: #064e3b; color: #6ee7b7; }
.badge-rolled_back { background: #44403c; color: #d6d3d1; }
.badge-failed { background: #7f1d1d; color: #fca5a5; }
.empty { color: var(--muted); font-style: italic; padding: 0.5rem 0; }
#journal li {
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
  color: #cbd5e1;
}
#journal time { color: var(--accent); margin-right: 0.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
pre.audit {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  overflow: auto;
  max-height: 280px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #cbd5e1;
  margin: 0;
}
.error-banner {
  display: none;
  background: #7f1d1d;
  color: #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
