:root {
  color-scheme: light;
  --page: #f5f7fb;
  --white: #fff;
  --ink: #17243a;
  --muted: #596980;
  --line: #e4eaf2;
  --blue: #2259d7;
  --radius: 13px;
  --green: #087e62;
  --amber: #9a5907;
  --red: #b83041;
  --slate: #58667c;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #80a8fb;
  outline-offset: 2px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
h2 {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-glyph {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 10px;
  background: #3271ec;
  color: white;
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 15px;
  letter-spacing: -0.018em;
  white-space: nowrap;
}
.brand small {
  font-size: 11px;
  color: #9badc8;
  margin-top: 2px;
  letter-spacing: 0.08em;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1536px;
  margin: auto;
  height: 64px;
  padding: 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.top-actions,
.admin {
  display: flex;
  align-items: center;
  gap: 11px;
}
.top-actions {
  gap: 17px;
}
.admin {
  gap: 8px;
  font-weight: 650;
}
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eaf0ff;
  color: #285ecf;
  font-weight: 700;
  font-size: 12px;
}
.demo-tag,
.panel-tag {
  color: #53647e;
  background: #eff3f8;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.demo-tag {
  background: #eaf1ff;
  color: #275abe;
}
.quiet {
  border: none;
  background: none;
  color: var(--muted);
  padding: 5px 0;
  white-space: nowrap;
}
.quiet:hover {
  color: #1645ab;
}
.main {
  max-width: 1536px;
  margin: auto;
  padding: 29px 34px 40px;
}
.panel-heading p,
.dialog-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.updated {
  font-size: 12px;
  color: var(--muted);
  margin-right: 3px;
  white-space: nowrap;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--ink);
  border: 1px solid #dce4ef;
  border-radius: 7px;
  min-height: 36px;
  padding: 6px 12px;
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
}
.button:hover {
  background: #f3f7fc;
  border-color: #acbed6;
}
.refresh-button span {
  font-size: 17px;
  line-height: 1;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.primary:hover {
  background: #184cbf;
  border-color: #184cbf;
}
.summary {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(262px, 1fr);
  gap: 15px;
  margin-bottom: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px 12px;
  color: var(--ink);
  box-shadow: 0 1px 2px #14284908;
}
.stat:hover {
  border-color: #a6b9d5;
}
.stat[aria-pressed="true"] {
  border-color: var(--blue);
  background: #f8faff;
}
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #445671;
  font-weight: 650;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
}
.stat-value {
  display: block;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.13;
  margin: 6px 0;
}
.stat-caption {
  font-size: 12px;
  color: var(--muted);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px #14284908;
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 17px 0;
}
.distribution #distribution-body {
  padding: 8px 17px 14px;
}
.distribution-number {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1;
}
.distribution-unit {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.distribution-bar {
  display: flex;
  gap: 3px;
  margin: 9px 0 8px;
}
.distribution-bar span {
  height: 9px;
  border-radius: 3px;
  min-width: 4px;
}
.distribution-bar .online {
  background: #23a785;
}
.distribution-bar .delayed {
  background: #e5a034;
}
.distribution-bar .offline {
  background: #dd5d6d;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  column-gap: 17px;
  row-gap: 6px;
  font-size: 12px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend b {
  color: var(--ink);
}
.legend [data-color="online"] {
  color: var(--green);
}
.legend [data-color="delayed"] {
  color: #c78321;
}
.legend [data-color="offline"] {
  color: var(--red);
}
.table-panel {
  overflow: hidden;
}
.list-heading {
  align-items: center;
  padding-bottom: 13px;
}
.filters {
  display: grid;
  grid-template-columns: minmax(0, 340px) repeat(2, minmax(0, 152px));
  align-items: center;
  gap: 10px;
  padding: 0 17px 15px;
}
.search,
.filter-select select {
  min-height: 42px;
  border: 1px solid #d6e0ed;
  border-radius: 9px;
  background: #fbfcfe;
}
.search:hover,
.filter-select select:hover {
  border-color: #adbfda;
  background: white;
}
.search:focus-within,
.filter-select select:focus-visible {
  border-color: var(--blue);
  outline: 2px solid #d4e3ff;
  outline-offset: 1px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 12px;
  min-width: 0;
}
.search-icon {
  position: relative;
  width: 12px;
  height: 12px;
  margin-right: 3px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  flex: none;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.6px;
  background: currentColor;
  top: 8px;
  left: 8px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.search input {
  border: 0;
  border-radius: 0;
  background: none;
  outline: 0;
  padding: 9px 0;
  min-width: 0;
}
.search input::-webkit-search-cancel-button {
  appearance: none;
}
.search input::placeholder {
  color: var(--muted);
}
.clear-search {
  flex: 0 0 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #edf2fa;
  font-size: 19px;
  line-height: 1;
  color: var(--muted);
}
.clear-search:hover {
  background: #e4ecfa;
  color: var(--ink);
}
.filter-select {
  position: relative;
  min-width: 0;
}
.filter-select::after {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  right: 14px;
  height: 7px;
  width: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.filter-select select {
  appearance: none;
  padding: 8px 34px 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 9px 12px;
  color: #4c5e76;
  font-size: 12px;
  background: #f3f6fa;
  font-weight: 650;
  border-top: 1px solid #eaf0f6;
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid #edf1f5;
  font-size: 13px;
}
th:first-child,
td:first-child {
  padding-left: 17px;
}
th:last-child,
td:last-child {
  padding-right: 17px;
}
tr:hover td {
  background: #fafcff;
}
td small,
.secondary {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}
.site-name {
  font-size: 13px;
  font-weight: 700;
}
.instance-subtitle {
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 650;
  font-size: 12px;
  white-space: nowrap;
}
.online {
  color: var(--green);
  background: #e7f7f1;
}
.delayed {
  color: var(--amber);
  background: #fff2da;
}
.offline {
  color: var(--red);
  background: #ffedf0;
}
.disabled {
  color: var(--slate);
  background: #edf1f6;
}
.version {
  color: #31599d;
  background: #edf3ff;
  border-radius: 5px;
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.license-valid {
  color: var(--green);
}
.license-expired {
  color: var(--red);
}
.link-button {
  padding: 3px 0;
  color: #2459c9;
  background: none;
  border: 0;
  font-weight: 650;
  white-space: nowrap;
  font-size: 13px;
}
.link-button:hover {
  color: #1645ab;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.delete-link {
  color: var(--red);
}
.delete-link:hover {
  color: #922534;
}
.button.danger {
  color: white;
  background: var(--red);
  border-color: var(--red);
}
.button.danger:hover {
  background: #922534;
  border-color: #922534;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  padding: 10px 17px;
}
.pagination-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination .button {
  min-height: 29px;
  padding: 3px 8px;
  font-size: 12px;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 22px 12px;
}
.error-banner {
  margin-bottom: 15px;
  padding: 9px 13px;
  background: #ffedf0;
  color: #a52b3a;
  border-radius: 8px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #0f1f37, #203f72);
}
.login-card {
  width: min(100%, 400px);
  padding: 32px;
  display: grid;
  gap: 15px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 45px #08162b55;
}
.login-brand {
  padding: 0;
  margin-bottom: 9px;
}
.login-brand small {
  color: var(--muted);
}
.login-card h1 {
  font-size: 24px;
}
label {
  font-weight: 650;
}
label > span {
  color: var(--muted);
  font-weight: 400;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 7px 9px;
}
label input,
label textarea {
  display: block;
  margin-top: 5px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
}
.form-error:empty {
  display: none;
}
dialog {
  width: min(530px, calc(100vw - 26px));
  max-height: 90vh;
  background: white;
  color: var(--ink);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 18px 75px #0e215650;
}
dialog::backdrop {
  background: #101e37a6;
}
.dialog-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 18px 21px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.dialog-body {
  padding: 17px 21px;
  display: grid;
  gap: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.dialog-heading p {
  overflow-wrap: anywhere;
}
.icon-button {
  background: #f2f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 29px;
  height: 29px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
  color: var(--muted);
}
.detail-dialog {
  width: min(780px, calc(100vw - 26px));
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
  padding: 12px;
  background: var(--page);
  border-radius: 8px;
}
.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
}
.detail-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}
.detail-grid dd small {
  margin-left: 7px;
  color: var(--muted);
}
.mono {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}
.detail-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.detail-tabs button {
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: white;
  padding: 7px 9px;
  font-weight: 650;
}
.detail-tabs .selected {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.detail-error {
  background: #ffedf0;
  color: var(--red);
  padding: 9px;
  border-radius: 6px;
}
@media (max-width: 1110px) {
  .topbar-inner {
    padding: 0 21px;
  }
  .main {
    padding-right: 21px;
    padding-left: 21px;
  }
  .brand {
    gap: 7px;
  }
  .brand strong {
    font-size: 13px;
  }
  .brand-glyph {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 760px) {
  .summary {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 11px;
  }
  .table-panel :is(th, td):nth-child(n + 3):nth-child(-n + 5) {
    display: none;
  }
  .table-panel :is(th, td)[colspan] {
    display: table-cell;
  }
  .table-panel td:first-child {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .row-actions {
    gap: 8px;
  }
  .topbar-inner {
    height: 52px;
    padding: 0 13px;
  }
  .main {
    padding: 16px 13px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 10px;
  }
  .stat-value {
    font-size: 25px;
  }
  .top-actions {
    gap: 8px;
  }
  .top-actions .updated,
  .topbar .avatar {
    display: none;
  }
  .refresh-button {
    min-height: 32px;
    padding: 4px 8px;
  }
}
@media (max-width: 520px) {
  .topbar .admin {
    display: none;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters .search {
    grid-column: 1 / -1;
  }
}
@media (max-width: 376px) {
  .topbar-inner {
    gap: 8px;
  }
  .top-actions {
    gap: 6px;
  }
  .brand strong {
    font-size: 11px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
