/* ===== Base ===== */
body {
  background: #0a0f1e;
  background-image: radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  color: #e2e8f0;
  min-height: 100vh;
}

/* ===== Navigation ===== */
.nav-bar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}
.nav-brand:hover { color: white; }

.nav-link {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.nav-link:hover { color: #e2e8f0; background: rgba(51, 65, 85, 0.5); }
.nav-link.active { color: #e2e8f0; background: rgba(51, 65, 85, 0.7); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-weight: 600;
}
.nav-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}

.btn-ghost {
  background: none;
  border: 1px solid #475569;
  color: #94a3b8;
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.btn-ghost:hover { border-color: #94a3b8; color: #e2e8f0; }

/* ===== Cards ===== */
.card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-left: 4px solid transparent;
}
.stat-card.stat-blue  { border-left-color: #3b82f6; }
.stat-card.stat-green { border-left-color: #22c55e; }
.stat-card.stat-amber { border-left-color: #f59e0b; }
.stat-card.stat-red   { border-left-color: #ef4444; }

.stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}
tbody tr { transition: background 0.1s; }
tbody tr:hover td { background: rgba(51, 65, 85, 0.2); }
tbody tr:nth-child(even) td { background: rgba(15, 23, 42, 0.2); }
tbody tr:nth-child(even):hover td { background: rgba(51, 65, 85, 0.2); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-size: 0.875rem;
}
.btn-blue { background: #3b82f6; color: white; }
.btn-blue:hover { background: #2563eb; box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
.btn-green { background: #22c55e; color: white; }
.btn-green:hover { background: #16a34a; box-shadow: 0 0 20px rgba(34, 197, 94, 0.3); }
.btn-red { background: #ef4444; color: white; }
.btn-red:hover { background: #dc2626; box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
.btn-amber { background: #f59e0b; color: white; }
.btn-amber:hover { background: #d97706; box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
a.btn { text-decoration: none; }

/* ===== Inputs & Selects ===== */
input, textarea, select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem !important;
  color: #e2e8f0;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
select option {
  background: #1e293b;
  color: #e2e8f0;
}

/* ===== Utility ===== */
.positive { color: #22c55e; }
.negative { color: #ef4444; }
.neutral  { color: #94a3b8; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}
.breadcrumb a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: #e2e8f0; }
.breadcrumb span { color: #475569; }

/* ===== Search Filter ===== */
.search-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  color: #e2e8f0;
  width: 100%;
  max-width: 280px;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.search-wrapper {
  position: relative;
}
.search-wrapper svg {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

/* ===== Avatar ===== */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #334155;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 80px; height: 80px; }

/* ===== Badges ===== */
.badge-mod {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-gp {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
  white-space: nowrap;
}

/* ===== Login page ===== */
.login-glow {
  position: relative;
}
.login-glow::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ===== Payout form highlight ===== */
.card-highlight {
  border-color: rgba(34, 197, 94, 0.3);
}
.card-highlight:hover {
  border-color: rgba(34, 197, 94, 0.5);
}

/* ===== Edit button ===== */
.btn-edit {
  background: none;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.btn-edit:hover {
  color: #e2e8f0;
  border-color: #475569;
  background: rgba(51, 65, 85, 0.3);
}

/* ===== Recent Lookups ===== */
.recent-user-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 9999px;
  padding: 0.375rem 0.875rem 0.375rem 0.375rem;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.recent-user-card:hover {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(59, 130, 246, 0.4);
}
.recent-user-card img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ===== Partner rows (settings) ===== */
.partner-row {
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .stat-card, .card { padding: 1rem; }
  th, td { padding: 0.5rem; font-size: 0.8rem; }
}
