:root {
  --purple: #33139F;
  --purple-light: #EFEAFB;
  --ink: #0B111C;
  --muted: #667085;
  --border: #D5D9E4;
  --bg: #F7F8FB;
  --green: #1B7F4D;
  --red: #B42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: var(--purple);
  color: white;
}
.topbar .brand { color: white; font-weight: 700; text-decoration: none; font-size: 18px; }
.topbar nav a { color: #E5E0FF; text-decoration: none; margin-right: 16px; }
.topbar nav a:hover { color: white; }

main { max-width: 960px; margin: 0 auto; padding: 32px 24px; }

h1 { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
code { background: var(--purple-light); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

.page-header { display: flex; align-items: center; justify-content: space-between; }

button, .primary {
  background: var(--purple);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { opacity: 0.9; }

table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--purple-light); font-weight: 600; }
tr:last-child td { border-bottom: none; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: #E3F5EA; color: var(--green); }
.badge-partial_failure { background: #FFF3E0; color: #B45309; }
.badge-running { background: var(--purple-light); color: var(--purple); }
.badge-error { background: #FDE8E7; color: var(--red); }

.chip { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--purple-light); color: var(--purple); }

.row-malformed { background: #FFF8F0; }

.status-banner { padding: 10px 16px; border-radius: 8px; background: var(--purple-light); color: var(--purple); font-weight: 600; margin-bottom: 16px; display: inline-block; }
.status-banner.status-success { background: #E3F5EA; color: var(--green); }
.status-banner.status-partial_failure { background: #FFF3E0; color: #B45309; }

.stage-list { list-style: none; padding: 0; }
.stage-list li { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; }
.stage-list pre { background: var(--bg); padding: 8px; border-radius: 6px; font-size: 12px; overflow-x: auto; }

.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--purple); }
.login-card { background: white; padding: 40px; border-radius: 16px; width: 320px; text-align: center; }
.login-card input { width: 100%; padding: 10px; margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; }
.login-card button { width: 100%; }
.error { color: var(--red); font-size: 14px; }
