:root {
  --bg-1: #050806;
  --bg-2: #0b1210;
  --ink: #dff6ea;
  --muted: #7b9b8b;
  --accent: #2ed47a;
  --accent-2: #1b8f54;
  --line: rgba(46, 212, 122, 0.18);
  --panel: #0d1512;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(46, 212, 122, 0.08), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(46, 212, 122, 0.05), transparent 45%),
    linear-gradient(120deg, var(--bg-1), var(--bg-2)),
    repeating-linear-gradient(0deg, rgba(46, 212, 122, 0.06) 0, rgba(46, 212, 122, 0.06) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(46, 212, 122, 0.05) 0, rgba(46, 212, 122, 0.05) 1px, transparent 1px, transparent 28px);
}

.shell {
  max-width: 1200px;
  margin: 32px auto 48px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px var(--shadow);
  animation: rise 0.4s ease-out;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.controls input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b120f;
  color: var(--ink);
  min-width: 260px;
  font-family: inherit;
}

.controls button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #05120a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(46, 212, 122, 0.3);
}

.controls .ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}

.meta {
  margin-top: 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.status {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(46, 212, 122, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.status.ok {
  color: var(--accent);
}

.status.error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.totals {
  font-size: 12px;
  color: var(--muted);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b120f;
}

.summary {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.summary th,
.summary td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
}

.summary th {
  background: rgba(46, 212, 122, 0.08);
  font-weight: 600;
  color: var(--ink);
}

.summary tr.wallet-row {
  cursor: pointer;
  transition: background 0.2s ease;
}

.summary tr.wallet-row:hover {
  background: rgba(46, 212, 122, 0.08);
}

.summary tr.wallet-row.active {
  background: rgba(46, 212, 122, 0.16);
}

.summary tr.detail-row td {
  background: #0b120f;
  padding: 0;
}

.detail-panel {
  padding: 14px 16px 18px;
  animation: fade 0.25s ease-out;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.detail-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.detail-list th,
.detail-list td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.detail-list th {
  background: rgba(46, 212, 122, 0.08);
}

.hint {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.action-btns {
  display: inline-flex;
  gap: 6px;
}

.action-btns button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.action-btns button.primary {
  background: var(--accent);
  color: #05120a;
  border-color: var(--accent);
}

.action-btns button:hover {
  background: rgba(46, 212, 122, 0.2);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .controls input {
    min-width: 180px;
  }

  .shell {
    margin: 20px 14px 36px;
    padding: 18px;
  }

  .summary th,
  .summary td {
    padding: 10px 8px;
  }
}
