:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #18272b;
  background: #f1f5f1;
  --surface: #fff;
  --border: #d9e2de;
  --muted: #526468;
  --accent: #145849;
  --danger: #a5232c;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.3rem); line-height: 1.12; }
.brand { font-size: 1rem; font-weight: 750; color: var(--accent); }
.login {
  max-width: 28rem;
  padding: clamp(1.4rem, 5vw, 2.6rem);
  margin: min(12vh, 7rem) auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
}
form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; }
input, button, select { font: inherit; }
input, select {
  width: 100%;
  color: inherit;
  background: var(--surface);
  border: 1px solid #849792;
  border-radius: .35rem;
  padding: .65rem .7rem;
}
button {
  cursor: pointer;
  padding: .65rem 1rem;
  background: var(--accent);
  color: white;
  border: 1px solid transparent;
  border-radius: .35rem;
  font-weight: 650;
}
button:hover { background: #0b4135; }
details { margin: .6rem 0 1rem; }
summary { cursor: pointer; }
.error { color: var(--danger); }
code { overflow-wrap: anywhere; }

@media (max-width: 32rem) { .login { margin: 1rem; } }

.shell { width: min(72rem, calc(100% - 3rem)); margin: 0 auto; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner, .account, .metadata { display: flex; gap: 1rem; align-items: center; }
.topbar-inner { min-height: 4rem; justify-content: space-between; }
.topbar a { text-decoration: none; }
.account { color: var(--muted); font-size: .875rem; }
.secondary { color: var(--accent); border-color: #a9bcb5; background: var(--surface); white-space: nowrap; }
.secondary:hover { background: #e4eee9; }
.dashboard { padding: 2.4rem 0 4rem; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.page-header h1 { margin-bottom: 0; }
.filter { grid-template-columns: auto minmax(12rem, 1fr) auto; align-items: center; gap: .6rem; }
.filter label { font-size: .875rem; }
.table-card, .empty, .logs { background: var(--surface); border: 1px solid var(--border); border-radius: .65rem; }
.table-card { overflow: auto; }
.empty { padding: 2rem 1.2rem; color: var(--muted); }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; font-size: .92rem; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
thead th { background: #e7eeea; color: #30484a; font-weight: 650; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #f6f9f7; }
tbody th { font-weight: 600; }
.run-link { font-weight: 650; }
.date, .duration { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.status { display: inline-block; background: #e9edeb; color: #394a4e; padding: .22rem .53rem; border-radius: .35rem; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.status-success { background: #dcefe4; color: #125846; }
.status-failure, .status-timed_out { background: #f8e7ea; color: #8a2832; }
.status-running, .status-queued { background: #f5ecd7; color: #725018; }
.pagination { display: flex; gap: 1.25rem; justify-content: end; margin-top: 1rem; }
.back { display: inline-block; margin-bottom: 1.15rem; font-size: .9rem; }
.run-header h1 { margin-bottom: .6rem; overflow-wrap: anywhere; }
.run-header h1 span { color: var(--muted); font-weight: 500; }
.metadata { margin-bottom: .65rem; flex-wrap: wrap; }
section { margin-top: 2rem; }
section h2 { font-size: 1.25rem; margin-bottom: .75rem; }
.log-panel { margin: 0; border-bottom: 1px solid var(--border); }
.log-panel:last-child { border: 0; }
.log-panel summary { padding: .8rem 1rem; }
.step-name { display: inline-block; min-width: 10rem; font-weight: 650; }
.log-panel .duration { margin-left: .6rem; }
pre { padding: 1rem; margin: 0; max-height: 28rem; overflow: auto; color: #edf3f0; background: #203236; font-size: .83rem; line-height: 1.5; }
@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .page-header { align-items: stretch; flex-direction: column; }
  .filter { grid-template-columns: 1fr auto; }
  .filter label { grid-column: 1 / -1; }
  .account span { display: none; }
  .step-name { min-width: 0; margin-right: .4rem; }
}
