:root {
  --bg: #f4f6f8;
  --ink: #192b38;
  --muted: #6e7c87;
  --line: #e6ebef;
  --primary: #14776d;
  --soft: #edf7f4;
  --red: #b84444;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button {
  cursor: pointer;
  background: #fff;
  border: 1px solid #d9e1e5;
  border-radius: 7px;
  padding: 7px 13px;
  color: var(--ink);
  white-space: nowrap;
}
button:hover {
  background: #f3f7f8;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.primary:hover {
  background: #10675f;
}
.danger {
  color: var(--red);
}
input,
select,
textarea {
  border: 1px solid #d6dfe4;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  min-width: 0;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
textarea {
  resize: vertical;
  min-height: 100px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #8a99a2;
}
.logo {
  display: grid;
  place-items: center;
  background: var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
}
#shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 224px;
  flex: none;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 29px 17px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 30px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.9px;
  color: #8b9aa4;
  margin-top: -3px;
}
.nav-label {
  font-size: 11px;
  color: #91a0aa;
  padding: 14px 14px 7px;
}
nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin: 3px 0;
  color: #596b77;
  border-radius: 7px;
}
nav a.active {
  color: var(--primary);
  background: var(--soft);
  font-weight: 600;
}
nav a:hover {
  background: #f4f7f8;
}
nav a span {
  font-size: 11px;
  color: #8a9ba6;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #81909a;
  padding: 18px 10px 0;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #36a385;
  margin-right: 7px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 12px;
}
main {
  margin-left: 224px;
  padding: 36px 40px 24px;
  width: calc(100% - 224px);
  max-width: 2000px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
h1 {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 5px 0;
}
h2 {
  font-size: 19px;
  margin: 0;
}
p {
  margin: 5px 0 12px;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 27px;
}
.metric {
  padding: 17px 21px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.metric small {
  color: var(--muted);
  display: block;
}
.metric strong {
  display: block;
  font-size: 25px;
  font-weight: 600;
  margin-top: 6px;
}
.tabs {
  display: flex;
  gap: 24px;
  min-height: 43px;
}
.tabs button {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 2px 12px;
  color: var(--muted);
}
.tabs button.active {
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.filters input {
  width: 260px;
}
.filters select {
  max-width: 205px;
}
.filters .result-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  min-height: 270px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
th {
  color: #83929c;
  font-size: 11px;
  font-weight: 500;
  background: #fafcfd;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f4;
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfdfd;
}
td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
th.num {
  text-align: right;
}
.sort-button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.sort-button:hover {
  background: transparent;
  color: var(--primary);
}
.sort-button.active {
  color: var(--primary);
}
.sort-arrow {
  font-size: 11px;
  margin-left: 4px;
}
.sub {
  display: block;
  color: #92a0aa;
  font-size: 11px;
  margin-top: 3px;
}
.cell-name {
  font-weight: 550;
}
.note-cell {
  min-width: 170px;
  max-width: 280px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #6b7d88;
}
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f3f5;
  color: #70818d;
  white-space: nowrap;
}
.badge.good {
  background: #eaf6ef;
  color: #2e8a59;
}
.badge.warn {
  background: #fff5e5;
  color: #b48838;
}
.badge.bad {
  background: #fceeee;
  color: #b75353;
}
.actions {
  display: flex;
  gap: 7px;
  white-space: nowrap;
}
.actions button {
  font-size: 12px;
  padding: 4px 9px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  font-size: 16px;
  color: #5d717e;
  margin-bottom: 10px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pager .buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footnote {
  font-size: 12px;
  margin-top: 14px;
}
dialog {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 80px #0b283344;
  padding: 24px;
  width: min(700px, calc(100vw - 32px));
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #102b3b66;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.icon-button {
  border: 0;
  background: none;
  font-size: 24px;
  padding: 0 8px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #607480;
  font-size: 12px;
}
.wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 20px;
}
.detail-grid div {
  overflow-wrap: anywhere;
}
.detail-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-grid strong {
  font-size: 13px;
  font-weight: 500;
  white-space: pre-wrap;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.record-list {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.link-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.link-controls input {
  flex: 1;
  min-width: 170px;
}
.link-controls select {
  flex: 2;
  min-width: 200px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card {
  width: 370px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 38px;
}
.login-card .logo {
  margin-bottom: 25px;
}
.login-card label {
  display: grid;
  gap: 7px;
  margin: 28px 0 15px;
  font-size: 12px;
}
.login-card .primary {
  width: 100%;
}
#login-error {
  font-size: 12px;
  color: var(--red);
  margin: 14px 0 0;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #213c47;
  color: #fff;
  padding: 11px 23px;
  border-radius: 8px;
  box-shadow: 0 4px 20px #1233;
  max-width: 90vw;
  z-index: 10;
}
body [hidden] {
  display: none !important;
}
.loading {
  opacity: 0.6;
  pointer-events: none;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
}
@media (max-width: 1000px) {
  aside {
    width: 185px;
  }
  main {
    margin-left: 185px;
    width: calc(100% - 185px);
    padding: 26px 22px;
  }
  .overview {
    gap: 8px;
  }
  .metric {
    padding: 12px;
  }
}
@media (max-width: 720px) {
  #shell {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    padding: 14px;
    display: block;
  }
  .brand {
    margin: 0 0 10px;
    font-size: 16px;
  }
  .brand .logo {
    width: 30px;
    height: 30px;
  }
  aside > .nav-label,
  .sidebar-bottom,
  nav .nav-label {
    display: none;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  nav a {
    padding: 6px 9px;
    font-size: 12px;
  }
  nav a span {
    margin-left: 6px;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 22px 14px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .overview {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    padding: 12px;
  }
  .filters input {
    width: 100%;
  }
  .result-count {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  h1 {
    font-size: 24px;
  }
}
