:root {
  color-scheme: light;
  --ink: #18263b;
  --muted: #52647b;
  --field: #edf2f7;
  --line: #d7e0e9;
  --blue: #163659;
  --accent: #10675c;
  --surface: #fff;
  --rail: #e8eef5;
  --warn: #8b460b;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
}

.edit-panel {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.edit-panel summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}
.edit-panel form,
.edit-panel label {
  display: grid;
  gap: 8px;
}
.edit-panel form {
  margin-top: 13px;
}
.edit-panel textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid #bbcbdc;
  border-radius: 6px;
  padding: 8px 10px;
  resize: vertical;
}
.edit-panel button {
  justify-self: start;
}
.edit-error {
  color: #793b10;
}
.edit-saved {
  color: var(--accent);
  font-weight: 700;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 13px;
  white-space: nowrap;
}
button:hover:not(:disabled) {
  background: #e8f0f9;
}
button:disabled {
  color: #748195;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #3777b7;
  outline-offset: 3px;
}
input,
select {
  border: 1px solid #bbcbdc;
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  min-height: 39px;
}
.workspace {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  background: var(--rail);
  padding: 30px 16px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.035em;
}
.rail .brand {
  padding: 0 8px;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: white;
  background: var(--blue);
  font-size: 18px;
  font-weight: 800;
  border-radius: 6px;
}
nav {
  display: grid;
  gap: 6px;
  margin-top: 42px;
}
nav button {
  text-align: left;
  background: transparent;
  border-color: transparent;
  padding: 11px 12px;
  font-weight: 650;
}
nav button[aria-current] {
  color: #13345a;
  background: #d6e4f4;
  border-color: #c5d8ee;
}
.nav-icon {
  display: inline-block;
  width: 26px;
  color: #315d89;
  font-size: 17px;
}
.rail-bottom {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: auto;
  padding: 25px 8px 0;
  color: var(--muted);
  font-size: 12px;
}
.connection,
.environment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36a28e;
  flex: none;
}
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #365876;
}
main {
  width: 100%;
  max-width: 1530px;
  padding: 28px clamp(18px, 3.2vw, 48px) 36px;
  margin-inline: auto;
}
.masthead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  padding: 25px 30px 28px;
}
.masthead-content {
  position: relative;
  z-index: 1;
}
.environment {
  font-size: 12px;
  color: #d4e2f2;
}
h1,
h2,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: clamp(28px, 3.1vw, 41px);
  letter-spacing: -0.045em;
  line-height: 1.16;
  margin: 13px 0 9px;
}
.masthead p {
  color: #dae7f4;
  line-height: 1.55;
}
.court {
  position: absolute;
  inset: 20px -45px 20px auto;
  width: 46%;
  min-width: 290px;
  border: 2px solid #86a6c052;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  transform: skewX(-17deg);
  pointer-events: none;
}
.court > div {
  position: relative;
  border-left: 2px solid #86a6c052;
}
.court > div:first-child {
  border-left: 0;
}
.court > div::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 2px solid #86a6c052;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}
.metrics > div {
  padding: 14px 19px;
  border-right: 1px solid var(--line);
}
.metrics > div:last-child {
  border: 0;
}
dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
dd {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 720;
  margin-top: 5px;
  line-height: 1.1;
}
.catalog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.catalog-head,
.filters,
.pager {
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.catalog-head {
  padding-top: 19px;
  padding-bottom: 11px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
}
.catalog-head p,
.refresh span,
.pager span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.catalog-head p {
  margin-top: 4px;
}
.refresh,
.pager > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filters {
  justify-content: flex-start;
  padding-top: 5px;
}
.filters input {
  width: min(400px, 100%);
}
.table-scroll {
  overflow: auto;
  min-height: 125px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 610px;
  text-align: left;
}
th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid #e4eaf1;
}
th {
  background: #edf3fa;
  color: #3c536d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
td {
  font-size: 13px;
  line-height: 1.5;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f4f8fc;
}
.record {
  padding: 0;
  border: 0;
  color: #204975;
  background: transparent;
  text-align: left;
  font-weight: 740;
  white-space: normal;
}
.sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  background: #edf1f6;
  color: #4d5f73;
  padding: 3px 7px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.good {
  background: #e1f1eb;
  color: #17604d;
}
.badge.wait {
  background: #e7effb;
  color: #285d94;
}
.badge.bad {
  background: #fff0e3;
  color: var(--warn);
}
.pager {
  border-top: 1px solid var(--line);
}
.empty {
  padding: 26px 18px;
  color: var(--muted);
}
.error {
  background: #fff0e3;
  color: #793b10;
  padding: 10px 12px;
  margin: 6px 18px;
  border-radius: 5px;
}
.login {
  max-width: 435px;
  margin: 12vh auto 0;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login h1 {
  font-size: 29px;
  margin-top: 24px;
}
.login p {
  color: var(--muted);
  line-height: 1.6;
}
.login form {
  display: grid;
  gap: 10px;
  margin-top: 23px;
}
.login .error {
  margin: 0;
  color: #793b10;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}
.primary:hover:not(:disabled) {
  background: #234f7a;
}
dialog {
  margin: 0 0 0 auto;
  width: min(490px, 100%);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 22px;
  color: var(--ink);
  background: #f9fbfd;
  overflow: auto;
}
dialog::backdrop {
  background: #152b4260;
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 20px;
}
dialog dl {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) minmax(0, 2.6fr);
  gap: 0;
  margin: 14px 0;
}
dialog dt,
dialog dd {
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}
dialog dd {
  font-weight: 500;
  overflow-wrap: anywhere;
}
dialog video {
  display: block;
  width: 100%;
  max-height: 270px;
  background: #12253a;
  border-radius: 7px;
  margin: 12px 0;
}
.related {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 15px 0;
}
.related h3 {
  font-size: 14px;
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 10px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0;
  }
  .rail-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
  }
  main {
    padding-top: 16px;
  }
}
@media (max-width: 520px) {
  .masthead {
    padding: 20px 18px;
  }
  .court {
    opacity: 0.37;
  }
  .metrics > div {
    padding: 12px 8px;
  }
  .metrics dt {
    font-size: 11px;
  }
  .metrics dd {
    font-size: 20px;
  }
  .catalog-head {
    align-items: flex-start;
  }
  .refresh {
    justify-content: flex-end;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters input {
    width: 100%;
  }
  .login {
    margin: 10vh 12px 0;
  }
}
