:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16181d;
  --muted: #5d6470;
  --line: #dfe3ea;
  --accent: #2f5bea;
  --accent-text: #ffffff;
  --ok: #16794a;
  --warn: #9a6500;
  --bad: #b3261e;
  --code: #eef1f6;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a21;
    --text: #e7e9ee;
    --muted: #9aa2b1;
    --line: #2a2f3a;
    --accent: #6d8dff;
    --accent-text: #0f1115;
    --ok: #4cc38a;
    --warn: #e0a83a;
    --bad: #ff6b60;
    --code: #222733;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header, nav, main, footer { max-width: 880px; margin: 0 auto; padding: 0 16px; }

header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.brand span { color: var(--accent); }
.net { color: var(--muted); font-size: 13px; }

nav { display: flex; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
nav button {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 10px 12px; font: inherit; cursor: pointer; white-space: nowrap;
}
nav button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

main { padding-top: 16px; padding-bottom: 24px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 10px; }

label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }

button, .button {
  display: inline-block; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  color: var(--accent-text); background: var(--accent); border: 1px solid var(--accent); border-radius: 7px;
}
button:disabled { opacity: 0.5; cursor: progress; }
button.secondary, .button.secondary { color: var(--text); background: transparent; border-color: var(--line); }
button.link { padding: 0; background: none; border: 0; color: var(--accent); font-weight: 400; }
button.danger { color: var(--bad); }

.row { display: flex; gap: 8px; }
.row input { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .split { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }

code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: 13px; word-break: break-all; }
code.wrap { display: block; padding: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.balances td:first-child { font-weight: 600; }
#country-list { max-height: 460px; overflow: auto; margin-top: 10px; }
#pool-list, #listings { overflow-x: auto; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.quote { margin: 4px 0 14px; padding: 10px 12px; background: var(--code); border-radius: 7px; }

.pill { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; }
.pill.active { color: var(--ok); }
.pill.testnet { color: var(--accent); }
.pill.paused { color: var(--warn); }
.pill.deprecated { color: var(--bad); }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--card); }
.notice.ok { border-color: var(--ok); }
.notice.error { border-color: var(--bad); color: var(--bad); }

footer { color: var(--muted); font-size: 13px; padding-bottom: 28px; }
footer a { color: var(--muted); }
