:root {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #152c27;
  background: #f6f7f2;
  font-synthesis: none;
  --line: #dce3db;
  --green: #183d34;
  --muted: #586c63;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
select,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #c6d2c9;
  border-radius: 6px;
  padding: 8px 13px;
  background: #fff;
  color: #213e34;
  font-weight: 600;
}
button:hover {
  background: #ecf2e9;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b18425;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #285545;
}
.danger {
  color: #a03e3e;
}
#shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
aside {
  background: #16352f;
  color: #f5f6ec;
  display: flex;
  flex-direction: column;
  padding: 32px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 45px;
}
.brand strong {
  font-size: 20px;
  line-height: 1.15;
}
.brand small {
  font-size: 13px;
  color: #becdc1;
  font-weight: 500;
}
.mark {
  background: #e7b543;
  color: #233c2f;
  font: 700 23px/44px serif;
  text-align: center;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: inline-block;
}
nav {
  display: grid;
  gap: 5px;
}
aside button {
  background: none;
  color: #d5e1d7;
  border: 0;
  text-align: left;
  padding: 12px 16px;
}
aside button:hover,
aside button.active {
  background: #2e5145;
  color: #fff;
}
aside button.active {
  box-shadow: inset 3px 0 #e7b543;
}
#logout {
  margin-top: auto;
}
main {
  width: 100%;
  max-width: 1580px;
  padding: 38px clamp(20px, 4vw, 64px);
}
header,
.bar,
footer,
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
header {
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
h1 {
  font-size: clamp(25px, 3vw, 35px);
  letter-spacing: -0.04em;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0;
}
p {
  line-height: 1.6;
}
#notice {
  background: #fff4cf;
  border-left: 3px solid #c9972c;
  padding: 8px 14px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat {
  padding: 22px;
}
.stat span {
  color: var(--muted);
  font-size: 14px;
}
.stat strong {
  display: block;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  margin-top: 9px;
}
.panel {
  padding: 20px;
  margin-bottom: 20px;
  overflow: auto;
}
.bar {
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.actions button {
  padding: 5px 9px;
  font-size: 13px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 12px 9px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
th {
  font-weight: 600;
  color: #52685e;
  background: #f3f6ef;
  white-space: nowrap;
}
tr:last-child td {
  border: 0;
}
.empty {
  color: var(--muted);
  padding: 28px 8px;
  text-align: center;
}
.pill {
  background: #e6f1e8;
  color: #315944;
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
}
.bad {
  background: #f8e8e1;
  color: #863d2a;
}
.pager {
  margin-top: 14px;
  font-size: 13px;
}
.mono {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9em;
}
.note {
  color: var(--muted);
  font-size: 14px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  margin: 14px 0;
}
input,
textarea,
select {
  border: 1px solid #bccabf;
  border-radius: 6px;
  padding: 9px 10px;
  background: white;
  color: #20382f;
  max-width: 100%;
}
label input,
label textarea,
label select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
textarea {
  resize: vertical;
}
dialog,
#login form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  background: white;
  color: inherit;
  width: min(460px, 94vw);
  box-shadow: 0 15px 60px #192e2318;
}
dialog::backdrop {
  background: #14392e66;
}
dialog footer {
  justify-content: flex-end;
  margin-top: 20px;
}
#formError,
#loginError {
  color: #9b3533;
  overflow-wrap: anywhere;
}
#login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(125deg, #e6ede3, #fbfaf4);
}
#login h1 {
  font-size: 25px;
  margin: 18px 0 26px;
}
#login .primary {
  width: 100%;
  margin-top: 9px;
}
@media (max-width: 800px) {
  #shell {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 12px;
    gap: 8px;
  }
  .brand {
    margin: 0;
  }
  .brand br,
  .brand small {
    display: none;
  }
  .brand .mark {
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 19px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
  }
  aside button {
    font-size: 13px;
    padding: 6px 9px;
  }
  #logout {
    position: absolute;
    right: 16px;
    top: 15px;
  }
  main {
    padding: 20px 12px;
  }
  .stats {
    gap: 6px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 27px;
  }
  .panel {
    padding: 12px;
  }
}
