﻿:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #657184;
  --line: #dbe1ea;
  --accent: #0f7a66;
  --accent-soft: #e1f3ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

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

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}

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

.metrics article {
  padding: 18px;
}

.metrics strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metrics span,
.empty,
.item span,
.muted {
  color: var(--muted);
}

.metrics span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.item + .item {
  margin-top: 10px;
}

.item strong,
.item span,
.item code {
  display: block;
}

.item code {
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  margin: 0;
}

.chain-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.chain-strip > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.chain-strip span,
.chain-strip strong,
.chain-strip code {
  display: block;
}

.chain-strip span {
  color: var(--muted);
  font-size: 12px;
}

.chain-strip strong {
  margin-top: 4px;
  font-size: 20px;
}

.chain-strip code {
  overflow: hidden;
  margin-top: 6px;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-list {
  display: grid;
  gap: 8px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.stat-row span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-row strong {
  color: var(--accent);
  font-size: 18px;
}

@media (max-width: 760px) {
  .topbar,
  .grid,
  .metrics,
  .chain-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-ok {
  background: #dff4e8;
  color: #0a6f3c;
}

.badge-warn {
  background: #fff3d7;
  color: #946000;
}

.service-filter {
  margin-bottom: 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.7);
}

.filter-pill:hover {
  color: var(--text);
  border-color: #9fb2c9;
}

.filter-pill.active {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.muted {
  color: var(--muted);
}

.testnet-panel {
  border-color: #b9d8ee;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.testnet-strip {
  margin-bottom: 14px;
}

.testnet-checks .stat-row span {
  white-space: normal;
}

.testnet-checks small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ok-text {
  color: #0a6f3c !important;
}

.warn-text {
  color: #946000 !important;
}

.explorer-shell {
  width: min(1480px, calc(100% - 32px));
}

.explorer-grid {
  align-items: start;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-button:hover {
  border-color: #9fb2c9;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-button,
.inline-form button,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.search-form,
.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.search-form input,
.inline-form input {
  min-height: 38px;
  min-width: 180px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.search-form input {
  min-width: min(360px, 45vw);
}

.address-code {
  display: block;
  overflow: hidden;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

a {
  color: var(--accent);
}

.wallet-strip {
  margin-top: 14px;
}

.inline-form select {
  min-height: 38px;
  max-width: 280px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
