:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #222923;
  background: #f5f5f0;
  font-synthesis: none;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid #d2d7cb;
  border-radius: 6px;
  padding: 9px 13px;
  background: #fff;
  color: inherit;
}
button:hover {
  background: #eef0e8;
}
button.primary {
  background: #244b39;
  border-color: #244b39;
  color: white;
}
button.danger {
  color: #9b3b30;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd2c6;
  border-radius: 5px;
  background: #fff;
  color: inherit;
}
input:focus {
  outline: 2px solid #8ba98e;
  outline-offset: 1px;
}
label {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  color: #566052;
}
header {
  padding: 25px 4vw;
  border-bottom: 1px solid #dce0d4;
  display: flex;
  align-items: center;
  gap: 32px;
  background: #fafbf6;
}
.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand span {
  font-weight: 400;
  color: #798370;
  margin-left: 8px;
}
nav {
  display: flex;
  gap: 8px;
}
nav button {
  border: 0;
  background: none;
  color: #65705e;
}
nav button.selected {
  background: #e4e9db;
  color: #253d29;
}
.spacer {
  flex: 1;
}
.health {
  font-size: 12px;
  color: #61745d;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 40px 4vw;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 20px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 0 0 8px;
  font-weight: 600;
}
h2 {
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 18px;
}
p {
  line-height: 1.6;
  color: #6a7463;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #dce0d4;
  border: 1px solid #dce0d4;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}
.stat {
  padding: 22px;
  background: #fafbf6;
}
.stat strong {
  font-size: 28px;
  font-weight: 500;
  display: block;
  margin: 8px 0 0;
}
.muted {
  color: #74806c;
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar input {
  max-width: 330px;
}
.table-wrap {
  background: #fff;
  border: 1px solid #dce0d4;
  border-radius: 8px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 12px;
  font-weight: 500;
  color: #7b856f;
  background: #fafbf7;
  padding: 14px 18px;
  border-bottom: 1px solid #e4e7de;
}
td {
  padding: 17px 18px;
  border-bottom: 1px solid #ecefe6;
}
tr:last-child td {
  border: 0;
}
td small {
  display: block;
  color: #859078;
  margin-top: 5px;
  font-size: 11px;
}
.pill {
  padding: 4px 8px;
  border-radius: 4px;
  background: #edf1e7;
  color: #55704c;
  font-size: 12px;
}
.pill.off {
  background: #f3e9dc;
  color: #987546;
}
.pill.bad {
  background: #f8e9e6;
  color: #a05c4f;
}
.actions {
  display: flex;
  gap: 6px;
}
.actions button {
  padding: 6px 10px;
  font-size: 12px;
}
.empty {
  text-align: center;
  padding: 50px;
  color: #7c8671;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: #7c8671;
  font-size: 12px;
}
.foot button {
  padding: 6px 12px;
}
dialog {
  width: min(620px, 94vw);
  max-height: 90vh;
  border: 1px solid #c8d1be;
  border-radius: 9px;
  padding: 28px;
  background: #fafbf6;
  color: inherit;
  box-shadow: 0 20px 90px #14211633;
}
dialog::backdrop {
  background: #14211670;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
.login {
  width: 360px;
  max-width: 90vw;
  margin: 16vh auto;
}
.login .brand {
  margin-bottom: 36px;
}
.login h1 {
  font-size: 25px;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #243f2d;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  display: none;
  z-index: 9;
  max-width: 90vw;
}
.detail {
  padding: 14px 0;
  border-bottom: 1px solid #e0e5d8;
}
.detail code {
  display: block;
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin-top: 10px;
  color: #4c6144;
}
.detail .error {
  color: #9c5547;
  font-size: 12px;
  margin-top: 6px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
a {
  color: #345f3e;
}
.note {
  padding: 13px;
  background: #eef1e7;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: #6b775f;
  margin: 15px 0;
}
.error {
  color: #a04d40;
}
.loading {
  padding: 15vh 5vw;
  color: #798370;
}
@media (max-width: 700px) {
  header {
    padding: 18px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 17px;
  }
  main {
    padding: 26px 16px;
  }
  .health {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 24px;
  }
  th,
  td {
    padding: 12px;
  }
  .page-head {
    align-items: flex-start;
  }
  h1 {
    font-size: 26px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
