:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --blue: #1769e0;
  --blue-dark: #0f3e8c;
  --teal: #0891b2;
  --green: #16a34a;
  --amber: #d97706;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #e8f0fb 0, rgba(232, 240, 251, 0) 360px),
    var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px 24px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(170px, auto);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand small,
.panel-head p,
.hero p,
.metric small,
.table-list small,
.address-card span {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid rgba(216, 224, 234, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 6px;
  color: #334155;
  font-size: 14px;
}

.nav a:hover {
  background: #eef4ff;
  color: var(--blue);
}

.network-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.13);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 24px;
  align-items: end;
  margin-top: 14px;
  padding: 30px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 20%, rgba(8, 145, 178, 0.15), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #edf5ff 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  max-width: 680px;
  font-size: 42px;
  line-height: 1.12;
}

.hero-copy > p:last-child {
  max-width: 640px;
  margin-top: 12px;
  line-height: 1.7;
}

.search-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.search-card label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.search-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.1);
}

.search-row button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.search-row button {
  min-height: 46px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.search-row button:hover {
  background: var(--blue-dark);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 17px;
  overflow: hidden;
}

.metric span {
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric.primary {
  background: #102039;
}

.metric.primary span,
.metric.primary small {
  color: #b7c6dc;
}

.metric.primary strong {
  color: #fff;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.lower {
  margin-top: 18px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.panel-head h2 {
  font-size: 17px;
  line-height: 1.25;
}

.panel-head p {
  margin-top: 4px;
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 18px;
}

.icon-button:hover {
  background: #dbeafe;
}

.table-list {
  display: grid;
}

.row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.row:hover {
  background: #f8fbff;
}

.row:last-child {
  border-bottom: 0;
}

.row strong,
.hash {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row strong {
  display: block;
  color: var(--blue);
  font-size: 15px;
}

.row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.hash {
  color: #334155;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.allocation {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.allocation-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 56px minmax(140px, 220px);
  gap: 12px;
  align-items: center;
}

.allocation-row span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) var(--w), #e8edf4 var(--w));
}

.allocation-row.major span {
  height: 14px;
}

.allocation-row b {
  color: var(--blue);
}

.allocation-row em {
  color: var(--muted);
  font-style: normal;
}

.address-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.address-card strong {
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 15px;
}

.address-card dl {
  display: grid;
  gap: 10px;
}

.address-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.address-card dt {
  color: #334155;
  font-weight: 700;
}

.address-card dd {
  color: var(--muted);
  text-align: right;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 12px 14px 24px;
  }

  .topbar,
  .metrics {
    grid-template-columns: 1fr;
  }

  .network-pill {
    justify-content: flex-start;
  }

  .hero {
    padding: 20px;
  }

  h1 {
    font-size: 30px;
  }

  .search-row,
  .row,
  .allocation-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    min-height: 44px;
  }

  .row {
    gap: 6px;
  }

  .badge {
    justify-self: start;
  }

  .address-card dl div {
    display: grid;
  }

  .address-card dd {
    text-align: left;
  }
}
