:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1d2a3b;
  background: #f6f8fb;
  font-synthesis: none;
  font-size: 14px;
  --blue: #244a7e;
  --line: #e6eaf0;
  --muted: #7a8798;
  --green: #278263;
  --red: #be4a51;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button svg,
a svg {
  width: 17px;
  height: 17px;
  flex: none;
  stroke-width: 1.7;
}
button {
  border: 0;
  background: none;
}
input,
select {
  border: 1px solid #dce2eb;
  border-radius: 8px;
  padding: 10px 12px;
  color: #26374e;
  background: #fff;
  min-width: 0;
}
input:focus,
select:focus {
  border-color: #668bbd;
  outline: 3px solid #e6edf7;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
label {
  display: grid;
  gap: 9px;
  font-size: 13px;
  color: #59677a;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
h2 {
  font-size: 16px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.mono {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.initial-loading {
  height: 100vh;
  display: grid;
  place-items: center;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #b8c6da;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
  min-height: 38px;
}
.btn:hover {
  background: #f5f7fa;
}
.btn.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn.primary:hover {
  background: #1a3c6c;
}
.btn.danger {
  color: var(--red);
  border-color: #e9c6c9;
}
.btn.sm {
  padding: 6px 10px;
  min-height: 30px;
  font-size: 12px;
}
.btn.quiet {
  background: none;
  border-color: transparent;
  padding: 6px 8px;
  color: #63748b;
}
.btn.quiet:hover {
  background: #edf1f7;
}
.btn .spinner {
  border-top-color: currentColor;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8a97a9;
  font-weight: 650;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 218px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 29px 17px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 11px 31px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #1c3458;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
}
.brand-name {
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.7px;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #8a96a5;
  margin-top: 2px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #a0aab7;
  padding: 13px 13px 12px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #7b8798;
  margin: 3px 0;
}
.nav svg {
  width: 18px;
  height: 18px;
}
.nav:hover {
  background: #f7f9fc;
  color: #334d70;
}
.nav.active {
  background: #eef3fa;
  color: #254b7e;
  font-weight: 600;
}
.nav.active:after {
  content: "";
  margin-left: auto;
  width: 5px;
  height: 5px;
  background: #4d719f;
  border-radius: 50%;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 18px 10px 0;
  border-top: 1px solid var(--line);
}
.region {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #6c7b8f;
}
.region .flag {
  font-size: 19px;
}
.region small {
  display: block;
  font-size: 10px;
  color: #a2abb6;
  letter-spacing: 1px;
  margin-top: 3px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #64748a;
}
.avatar {
  width: 31px;
  height: 31px;
  border: 1px solid #dfe5ee;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #4a6489;
  background: #f6f8fb;
}
.account button {
  margin-left: auto;
  color: #93a0b2;
}
.main {
  margin-left: 218px;
  padding: 0 36px 34px;
  max-width: 1920px;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.breadcrumb {
  font-size: 12px;
  color: #8b97a6;
}
.breadcrumb span {
  color: #42516a;
  margin-left: 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #8995a6;
}
.clock {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: #77b799;
  border-radius: 50%;
  margin-right: 6px;
}
.dot.warn {
  background: #d6a769;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.page-heading p {
  color: #8a96a5;
  font-size: 12px;
  margin-top: 8px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 21px 22px;
  box-shadow: 0 2px 3px #24395602;
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #758398;
  font-size: 12px;
}
.metric-label svg {
  width: 17px;
  height: 17px;
  color: #9aabc0;
}
.metric-number {
  font-size: 31px;
  font-weight: 610;
  letter-spacing: -1.2px;
  margin-top: 17px;
  line-height: 1.1;
}
.metric-foot {
  font-size: 11px;
  color: #9aa5b3;
  margin-top: 13px;
}
.metric-foot b {
  color: #56718e;
  font-weight: 500;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 23px;
}
.panel-head p {
  font-size: 11px;
  color: #929ead;
  margin-top: 6px;
}
.panel-head .range {
  font-size: 11px;
  color: #8d9aab;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}
.chart {
  height: 205px;
  margin: 0 25px 17px;
  position: relative;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart text {
  font-size: 10px;
  fill: #9aa7b6;
}
.chart-empty {
  display: grid;
  place-items: center;
  height: 190px;
  color: #a0aab8;
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}
.search {
  width: 260px;
  position: relative;
}
.search svg {
  position: absolute;
  top: 11px;
  left: 12px;
  width: 15px;
  height: 15px;
  color: #9da9b8;
}
.search input {
  width: 100%;
  padding-left: 35px;
  font-size: 12px;
  background: #fbfcfe;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 0.3px;
  color: #8a97a8;
  font-weight: 500;
  padding: 13px 22px;
  background: #fbfcfe;
  border-bottom: 1px solid #edf0f4;
}
td {
  padding: 17px 22px;
  border-bottom: 1px solid #f0f3f7;
  font-size: 12px;
  color: #516177;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfdff;
}
td.strong {
  color: #273b55;
  font-weight: 550;
}
.shop-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shop-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #e7ecf2;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #7891b1;
  background: #f7f9fc;
}
.shop-icon svg {
  width: 19px;
  height: 19px;
}
.shop-name {
  color: #2b3f5c;
  font-size: 12px;
  font-weight: 550;
}
.shop-id {
  margin-top: 5px;
  color: #a0aab8;
  font-size: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  padding: 5px 8px;
  background: #f0f4f8;
  color: #7a8ba0;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.badge.good {
  background: #edf7f1;
  color: #478b6b;
}
.badge.bad {
  background: #fdf0ef;
  color: #bc6c64;
}
.badge.busy {
  background: #edf3fd;
  color: #688bbd;
}
.badge.paused {
  background: #f2f3f6;
  color: #929ca9;
}
.badge .spinner {
  width: 10px;
  height: 10px;
  border-width: 1px;
}
.empty {
  padding: 70px 20px;
  text-align: center;
  color: #95a1b1;
}
.empty svg {
  width: 32px;
  height: 32px;
  display: block;
  margin: 0 auto 15px;
  color: #b5c0cf;
}
.empty h3 {
  font-size: 13px;
  font-weight: 500;
}
.empty .btn {
  margin-top: 20px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #9aa5b4;
}
.footer {
  font-size: 10px;
  color: #a5aebb;
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  letter-spacing: 0.3px;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 350px;
}
.product-cell img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid #edf0f5;
  border-radius: 7px;
  flex: none;
}
.product-title {
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #40536d;
}
.product-link:hover {
  text-decoration: underline;
}
.positive {
  color: #38856b;
}
.negative {
  color: #bb6a64;
}
.node-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 22px 22px;
}
.node {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.node.selected {
  border-color: #7c9bc2;
  background: #f5f8fc;
}
.node h3 {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.node p {
  font-size: 10px;
  color: #9aa6b5;
  margin-top: 7px;
}
.node .btn {
  padding: 6px 9px;
  font-size: 11px;
}
.network-hero {
  padding: 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.network-current {
  display: flex;
  align-items: center;
  gap: 13px;
}
.network-current > .circle {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  background: #edf5f0;
  border-radius: 50%;
  color: #51856d;
}
.network-current svg {
  width: 21px;
  height: 21px;
}
.network-current p {
  font-size: 11px;
  color: #929eae;
  margin-top: 7px;
}
.probe-result {
  font-size: 12px;
  color: #57826d;
  margin-top: 15px;
}
.error-box {
  padding: 14px;
  background: #fcf4f3;
  border: 1px solid #f0deda;
  border-radius: 7px;
  color: #a15b55;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
  line-height: 1.6;
}
.form-grid {
  display: grid;
  gap: 19px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-help {
  font-size: 11px;
  color: #9a8a7b;
  margin-top: -7px;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.dialog-title h2 {
  font-size: 18px;
}
.dialog-title button {
  padding: 3px;
  color: #8a97a8;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  padding: 27px;
  border-radius: 13px;
  width: min(580px, calc(100vw - 32px));
  max-height: 85vh;
  box-shadow: 0 24px 100px #1e304b30;
  color: #26384f;
}
dialog.wide {
  width: min(1050px, calc(100vw - 32px));
}
dialog::backdrop {
  background: #23304760;
  backdrop-filter: blur(3px);
}
dialog .table-wrap {
  max-height: 48vh;
  overflow: auto;
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
dialog table th,
dialog table td {
  padding: 12px 14px;
}
dialog .dialog-note {
  font-size: 12px;
  color: #7d8b9d;
  line-height: 1.8;
  margin-bottom: 20px;
}
.select-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: #687c98;
}
.select-summary .search {
  margin-left: auto;
}
.selection-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 15%, #e5edf8 0, transparent 60%), #f6f8fb;
}
.auth-card {
  width: 390px;
  max-width: 100%;
  background: white;
  border: 1px solid var(--line);
  padding: 37px;
  border-radius: 15px;
  box-shadow: 0 20px 80px #3c577614;
}
.auth-card .brand {
  padding: 0 0 33px;
}
.auth-card h1 {
  font-size: 23px;
  margin-bottom: 9px;
}
.auth-card > p {
  font-size: 12px;
  color: #91a0b4;
  margin-bottom: 28px;
}
.auth-card .btn {
  width: 100%;
  margin-top: 5px;
}
.auth-card .error-box {
  margin-top: 16px;
}
.auth-bottom {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-align: center;
  color: #9ca8b7;
  margin-top: 25px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 100px);
  transform: translateX(-50%);
  background: #243b5c;
  color: #fff;
  padding: 12px 22px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #243b5c26;
  font-size: 12px;
  z-index: 99;
  max-width: 80vw;
  white-space: pre-wrap;
}
#toast[hidden] {
  display: none;
}
.page-error {
  margin-bottom: 20px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1650px) {
  .main {
    padding-left: 48px;
    padding-right: 48px;
  }
  .cards {
    gap: 23px;
  }
  .card {
    padding: 25px;
  }
  .chart {
    height: 230px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 184px;
    padding-left: 11px;
    padding-right: 11px;
  }
  .brand {
    padding-left: 10px;
    gap: 9px;
  }
  .brand-name {
    font-size: 18px;
  }
  .main {
    margin-left: 184px;
    padding: 0 24px 25px;
  }
  .node-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  td,
  th {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cards {
    gap: 12px;
  }
  .card {
    padding: 18px;
  }
  .metric-number {
    font-size: 27px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 66px;
    padding: 22px 8px;
  }
  .brand {
    padding: 0 7px 25px;
  }
  .brand > div:last-child,
  .nav > span,
  .nav-label,
  .sidebar-bottom,
  .nav.active:after {
    display: none;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex: none;
  }
  .nav {
    justify-content: center;
    padding: 13px 0;
  }
  .main {
    margin-left: 66px;
    padding: 0 18px 22px;
  }
  .topbar {
    height: 64px;
    margin-bottom: 22px;
  }
  .topbar-right {
    gap: 10px;
  }
  .clock {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading > .actions .btn {
    padding: 9px 10px;
  }
  .footer span:last-child {
    display: none;
  }
  .node-list {
    grid-template-columns: 1fr;
  }
  .network-hero {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
  .search {
    width: 210px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  #toast {
    left: 55%;
  }
  .panel-head,
  .toolbar {
    padding-left: 17px;
    padding-right: 17px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .topbar-right .status-text {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.5s;
  }
}
