
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-hover: #243044;
  --border: #2a3a4e;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --orange: #f97316;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-logo h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-logo p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav-item.active { color: var(--accent); background: rgba(59,130,246,0.1); border-right: 3px solid var(--accent); }
.nav-icon { width: 18px; text-align: center; }

.main {
  margin-left: 240px;
  flex: 1;
  padding: 32px;
  max-width: 1200px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
}
.stat-card .sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tr:hover td { background: var(--bg-hover); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-tier-0 { background: rgba(100,116,139,0.2); color: #94a3b8; }
.badge-tier-1 { background: rgba(59,130,246,0.2); color: #60a5fa; }
.badge-tier-2 { background: rgba(16,185,129,0.2); color: #34d399; }
.badge-tier-3 { background: rgba(139,92,246,0.2); color: #a78bfa; }
.badge-tier-4 { background: rgba(249,115,22,0.2); color: #fb923c; }
.badge-tier-5 { background: rgba(236,72,153,0.2); color: #f472b6; }
.badge-tier-6 { background: rgba(220,38,38,0.2); color: #f87171; }

.badge-active { background: rgba(16,185,129,0.2); color: var(--green); }
.badge-quarantined { background: rgba(245,158,11,0.2); color: var(--yellow); }
.badge-banned { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-pending { background: rgba(59,130,246,0.2); color: var(--accent); }
.badge-open { background: rgba(59,130,246,0.2); color: var(--accent); }
.badge-passed { background: rgba(16,185,129,0.2); color: var(--green); }
.badge-failed { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-patron { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-founding { background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(245,158,11,0.15)); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.badge-founding-pending { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.35); }
.badge-founding-expired { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid var(--border); }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.search-box {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 16px;
}
.search-box:focus { outline: none; border-color: var(--accent); }

.filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-row select, .filter-row input {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
}

.progress-bar {
  background: var(--bg-secondary);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.radar-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.post-author { font-weight: 600; font-size: 14px; }
.post-time { font-size: 12px; color: var(--text-muted); }
.post-content { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.post-footer { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 380px;
  text-align: center;
}
.auth-box h2 { margin-bottom: 8px; font-size: 20px; }
.auth-box p { color: var(--text-secondary); font-size: 13px; margin-bottom: 20px; }
.auth-box input {
  width: 100%;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 12px;
}
.auth-box .error { color: var(--red); font-size: 13px; display: none; margin-bottom: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.tier-label { font-weight: 600; }

.xrp-wallet {
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 20px 0;
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
  color: var(--yellow);
}

.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }

.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 13px; z-index: 2000; display: none;
  box-shadow: var(--shadow);
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
