* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #1a1a2e;
  color: #eaeaea;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #333;
}

h1 {
  font-size: 24px;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ff4444;
}

.status-dot.connected {
  background-color: #00cc66;
}

.back-link {
  color: #4ea8de;
  text-decoration: none;
  font-size: 14px;
  margin-right: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #16213e;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background-color: #0f3460;
}

th, td {
  padding: 14px 16px;
  text-align: left;
}

th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0a0a0;
}

tbody tr {
  border-bottom: 1px solid #1a1a2e;
  transition: background-color 0.2s;
}

tbody tr:hover {
  background-color: #1f3a5c;
}

tbody tr.clickable {
  cursor: pointer;
}

td {
  font-size: 14px;
}

.token-address, .af-address {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #4ea8de;
}

.number {
  font-family: 'Courier New', monospace;
  text-align: right;
}

.positive {
  color: #00cc66;
}

.negative {
  color: #ff4444;
}

.date {
  color: #a0a0a0;
  font-size: 13px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state p {
  font-size: 16px;
}

.controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-size: 12px;
  color: #a0a0a0;
}

input, select, button {
  padding: 8px 12px;
  border: 1px solid #404040;
  border-radius: 6px;
  background: #222222;
  color: #e8e8e8;
  font-size: 14px;
}

input:focus, select:focus {
  outline: none;
  border-color: #4a9eff;
}

button {
  background: #4a9eff;
  border: none;
  cursor: pointer;
  font-weight: 500;
  padding: 8px 24px;
}

button:hover { background: #3a8eef; }

button:disabled {
  background: #404040;
  cursor: not-allowed;
}

@keyframes highlight {
  0% { background-color: rgba(78, 168, 222, 0.3); }
  100% { background-color: transparent; }
}

.row-updated {
  animation: highlight 1s ease-out;
}

/* ── badges (공통) ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge-ok { background: rgba(0, 204, 102, 0.15); color: #00cc66; }
.badge-error { background: rgba(255, 68, 68, 0.15); color: #ff6b6b; }
.badge-neutral { background: rgba(160, 160, 160, 0.15); color: #a0a0a0; }
.badge-depth0 { background: rgba(74, 158, 255, 0.18); color: #4ea8de; }
.badge-depth1 { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
