:root {
  font:
    16px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #20372d;
  background: #f3f6f4;
  --ink: #19352b;
  --green: #275b45;
  --muted: #53665b;
  --line: #dce5de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1rem;
}
a {
  color: var(--green);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  background: #eaf1ec;
}
button.primary,
.primary.button {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.danger {
  color: #8b2424;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7d59b8;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: white;
  padding: 1rem;
}
.layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: white;
  border-right: 1px solid var(--line);
  padding: 2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.07em;
}
.brand span {
  color: #638c6e;
}
.brand small {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}
nav {
  display: grid;
  gap: 0.35rem;
}
nav button {
  border: 0;
  text-align: left;
  background: none;
}
nav button.active {
  background: #e8f0e9;
  font-weight: 650;
  color: var(--green);
}
.identity {
  margin-top: auto;
  display: grid;
  gap: 0.6rem;
  font-size: 0.875rem;
}
.identity strong {
  font-size: 1rem;
}
main {
  max-width: 1450px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  align-self: start;
}
.top {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.top p,
.muted {
  color: var(--muted);
}
.top h1 {
  margin-bottom: 0.5rem;
}
.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat,
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: white;
  padding: 1.4rem;
}
.stat strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.3rem;
}
.stat span {
  font-size: 0.875rem;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.stack {
  display: grid;
  gap: 1rem;
}
.panel {
  margin-bottom: 1.2rem;
}
.card h3 {
  font-size: 1.15rem;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .actions {
  margin-top: 1rem;
}
.tag {
  display: inline-block;
  font-size: 0.875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  background: #e9f1eb;
  color: #26523d;
  margin: 0.15rem 0.25rem 0.15rem 0;
}
.tag.warn {
  background: #fff1d8;
  color: #805318;
}
.tag.bad {
  background: #fbe8e6;
  color: #852b28;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border: 0;
}
.row p {
  margin: 0;
}
.notice {
  background: #eef3ed;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 3px solid #709472;
  margin-bottom: 1rem;
}
.notice.error,
.error {
  color: #8c2020;
}
.notice.error {
  border-color: #a23838;
  background: #fff2f0;
}
.empty {
  color: var(--muted);
  padding: 1rem 0;
}
small,
.small {
  font-size: 0.875rem;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 0.875rem;
  background: #f3f6f4;
}
td,
th {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td .actions {
  min-width: 130px;
}
td small {
  display: block;
  color: var(--muted);
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 1rem;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #b9c9bd;
  border-radius: 0.4rem;
  padding: 0.65rem;
  margin-top: 0.35rem;
  color: var(--ink);
  background: white;
  font-weight: 400;
}
select[multiple] {
  min-height: 7rem;
}
textarea {
  min-height: 6rem;
  resize: vertical;
}
input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-help {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
}
.auth {
  max-width: 500px;
  margin: 6vh auto;
  padding: 2rem;
}
.auth .brand {
  margin-bottom: 2rem;
}
.auth h1 {
  font-size: 1.6rem;
}
.auth button {
  width: 100%;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 1.5rem;
  max-width: 740px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #142c2580;
}
dialog header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
dialog header h2 {
  margin: 0;
}
dialog header button {
  padding: 0.3rem 0.7rem;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.secret {
  font:
    1rem/1.8 ui-monospace,
    monospace;
  word-break: break-all;
  background: #f1f5f2;
  padding: 1rem;
}
.search {
  max-width: 450px;
  margin-bottom: 1.2rem;
}
.reasons {
  color: #805318;
  padding-left: 1.2rem;
  font-size: 0.875rem;
}
.hero {
  background: var(--ink);
  color: white;
  padding: 1.7rem;
  border-radius: 0.7rem;
  margin-bottom: 1.5rem;
}
.hero p {
  color: #d7e4db;
  margin-bottom: 0;
}
#toast:not(:empty) {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  z-index: 1000;
  box-shadow: 0 8px 30px #0002;
  max-width: 90vw;
}
.loading {
  padding: 3rem;
  text-align: center;
}
.break {
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  main {
    padding: 1.5rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .layout {
    display: block;
  }
  aside {
    padding: 1rem;
    gap: 1rem;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  .identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .identity small {
    flex: 1;
  }
  .identity button {
    padding: 0.35rem 0.6rem;
  }
  main {
    padding: 1rem;
  }
  .top {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 1.65rem;
  }
  .stats {
    gap: 0.6rem;
  }
  .stat {
    padding: 1rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .auth {
    margin: 1rem auto;
  }
  .row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media print {
  aside,
  .actions,
  .skip,
  #toast {
    display: none;
  }
  .layout {
    display: block;
  }
  main {
    padding: 0;
  }
  .panel,
  .card {
    break-inside: avoid;
  }
}

.error {
  white-space: pre-line;
}
