:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --panel: #ffffff;
  --ink: #17201a;
  --muted: #667166;
  --line: #dfe5db;
  --ok: #1f7a4d;
  --warn: #a76512;
  --fail: #b42318;
  --accent: #245c73;
  --accent-2: #6f7d38;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  font-weight: 760;
}

.topbar p,
.section-head span,
dt {
  color: var(--muted);
}

button,
.open {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

button[type="submit"],
#refresh-all {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.band {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.instances {
  margin-bottom: 28px;
}

.jobs-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.provision {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr) 160px minmax(190px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

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

h2 {
  font-size: 18px;
}

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

.client {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.domain {
  color: var(--accent);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  background: #edf4ef;
  color: var(--ok);
  font-size: 12px;
  font-weight: 760;
}

.pill.fail {
  background: #fff1f0;
  color: var(--fail);
}

.pill.pending {
  background: #fff7e8;
  color: var(--warn);
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

dt {
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.checks {
  display: grid;
  gap: 6px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}

.check.fail .dot {
  background: var(--fail);
}

.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

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

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

.job strong {
  font-size: 13px;
}

.job span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}

.job code {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #17201a;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .provision {
    grid-template-columns: 1fr;
  }

  main {
    padding: 18px;
  }
}
