:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --line: #d8deea;
  --text: #1d2440;
  --muted: #5b6482;
  /* Previous accent (keep for quick rollback): --accent: #0d9488; */
  --accent: #f6b93b;
  --accent-ink: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, #fff4d9 0, transparent 45%),
    radial-gradient(circle at 88% 88%, #e8ecfb 0, transparent 42%),
    var(--bg);
  min-height: 100vh;
  padding-bottom: 56px;
}

h1, h2, h3 { margin-top: 0; }

.testnet-banner {
  background: #dff4ff;
  border-bottom: 1px solid #7cc4f2;
  color: #0b4f7a;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}

.maintenance-banner {
  background: #fff4cc;
  border-bottom: 1px solid #f6b93b;
  color: #6b4f00;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}

.center-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}

.btn {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn-secondary {
  background: #0d9488;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer-left {
  position: fixed;
  left: 16px;
  bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.page-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px;
}

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

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.table-wrap {
  margin-top: 20px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th { color: var(--muted); font-weight: 600; }

code {
  background: #f2f4fb;
  border-radius: 6px;
  padding: 1px 6px;
}

.code-block {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f6f8ff;
  overflow-x: auto;
}

.code-block code {
  background: transparent;
  padding: 0;
  white-space: pre;
}

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

.mini-btn {
  border: 1px solid var(--line);
  background: #f7f9ff;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.mini-btn:hover {
  background: #eef2ff;
}

.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.action-menu {
  position: relative;
}

.action-menu summary {
  list-style: none;
  display: inline-block;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 72px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(29, 36, 64, 0.12);
}

.danger-btn {
  background: #fff1f1;
  border-color: #f2c9c5;
  color: #b42318;
}

.danger-btn:hover {
  background: #ffe4e4;
}

.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  max-width: 420px;
  width: calc(100% - 32px);
  color: var(--text);
}

.confirm-dialog::backdrop {
  background: rgba(29, 36, 64, 0.35);
}

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

.mini-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--text);
}

.stack-gap {
  display: grid;
  gap: 10px;
}

.status-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.status-ok {
  background: #eefbf7;
  border: 1px solid #b9ead8;
}

.status-error {
  background: #fff4f3;
  border: 1px solid #f2c9c5;
}

.status-good-text {
  color: #0f7a4b;
}

.status-bad-text {
  color: #b42318;
}

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .hero-actions { width: 100%; }
}
