/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0f1117;
  color: #e0e0e0;
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  background: #1a1d27;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid #2196F3;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
header h1 { font-size: 1.4rem; color: #2196F3; flex: 1; }
.subtitle  { font-size: 0.8rem; color: #888; width: 100%; margin-top: -0.75rem; }
.address   { font-size: 0.75rem; color: #4CAF50; font-family: monospace; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
nav {
  background: #12141e;
  padding: 0.5rem 2rem;
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #222;
}
nav a { color: #aaa; text-decoration: none; font-size: 0.9rem; }
nav a:hover { color: #2196F3; }

/* ── Main ───────────────────────────────────────────────────────────────── */
main   { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
section { margin-bottom: 2.5rem; }
h2  { color: #2196F3; margin-bottom: 1rem; font-size: 1.1rem; border-bottom: 1px solid #222; padding-bottom: 0.4rem; }
h3  { color: #ccc; margin-bottom: 0.75rem; font-size: 0.95rem; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card + .card { margin-top: 0; }

/* ── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat { background: #12141e; padding: 0.75rem; border-radius: 6px; }
.stat-label { display: block; font-size: 0.72rem; color: #777; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { display: block; font-size: 1.15rem; font-weight: 600; color: #fff; margin-top: 0.2rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
input[type="number"] {
  background: #12141e;
  border: 1px solid #333;
  color: #e0e0e0;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
label { display: block; font-size: 0.85rem; color: #aaa; margin-bottom: 0.25rem; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
button {
  background: #2196F3;
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  margin-right: 0.5rem;
  transition: background 0.2s;
}
button:hover  { background: #1976D2; }
button.danger { background: #F44336; }
button.danger:hover { background: #C62828; }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  font-size: 0.65rem;
  background: #FF9800;
  color: #000;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  vertical-align: middle;
}

/* ── Table ──────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #222; }
th { color: #777; font-weight: 600; text-transform: uppercase; font-size: 0.72rem; }
td a { color: #2196F3; text-decoration: none; font-family: monospace; font-size: 0.8rem; }
td a:hover { text-decoration: underline; }

/* ── Transaction Log ────────────────────────────────────────────────────── */
#tx-log { list-style: none; font-size: 0.82rem; max-height: 200px; overflow-y: auto; }
#tx-log li { padding: 0.3rem 0; border-bottom: 1px solid #1a1d27; color: #ccc; }
#tx-log li a { color: #4CAF50; font-family: monospace; }

/* ── Hints ──────────────────────────────────────────────────────────────── */
.hint { font-size: 0.78rem; color: #666; margin: 0.3rem 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: #444;
  border-top: 1px solid #222;
  margin-top: 3rem;
}
