:root {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-2: #182134;
  --border: #25314d;
  --text: #e6edf7;
  --muted: #8ea0c0;
  --accent: #38bdf8;
  --green: #22c55e;
  --red: #f43f5e;
  --amber: #f59e0b;
  --pro: #a855f7;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: radial-gradient(circle at top right, #131c31 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 23, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--pro));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
}

.subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
}

.pill-live {
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--green);
}

.pill-fallback {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--amber);
}

.pill-loading {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
}

.btn-pro {
  background: linear-gradient(135deg, #2563eb, var(--pro));
  border-color: transparent;
  color: #fff;
}

.btn-copy {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
  padding: 0.75rem 1rem;
}

.toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.4rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

.kpi-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.input,
.select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}

.input {
  min-width: 240px;
  flex: 1;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
}

tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

.mono {
  font-family: var(--font-mono);
}

.pos {
  color: var(--green);
  font-weight: 600;
}

.neg {
  color: var(--red);
  font-weight: 600;
}

.warn {
  color: var(--amber);
  font-weight: 600;
}

.question-cell {
  white-space: normal;
  min-width: 260px;
  max-width: 420px;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.badge-venue {
  font-size: 0.75rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pro-section {
  margin-top: 2.5rem;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 16px;
  padding: 1.75rem;
}

.pro-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  margin-bottom: 0.75rem;
}

.pro-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 860px) {
  .pro-grid {
    grid-template-columns: 1fr;
  }
}

.pro-copy h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.price-tag {
  color: var(--green);
}

.pro-features {
  padding-left: 1.2rem;
  color: var(--muted);
}

.pro-features li {
  margin-bottom: 0.45rem;
}

.pro-features strong {
  color: var(--text);
}

.pro-checkout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.pro-checkout h3 {
  margin-top: 0;
}

.checkout-step {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.75rem 0 0.4rem;
}

.wallet-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.wallet-box code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--accent);
}

.copy-feedback {
  display: block;
  min-height: 1.1rem;
  font-size: 0.78rem;
  color: var(--green);
  margin-top: 0.25rem;
}

.checkout-note {
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0;
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
