:root {
  --bg: #07090f;
  --surface: #101422;
  --surface-2: #171c2f;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 16px var(--primary);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.auth-card {
  max-width: 480px;
  margin: 32px auto;
  width: 100%;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 13px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 140px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

input,
select {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-mini {
  padding: 5px 9px;
  font-size: 11.5px;
  border-radius: 8px;
}

.badge {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
}

.stat-value.small {
  font-size: 14px;
}

.accent {
  color: #c4b5fd;
}

.success {
  color: #86efac;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.pill-pro,
.pill-paid {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.pill-free,
.pill-expired {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.pill-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.pill-failed {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.output-box {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #05070c;
  border: 1px solid var(--border);
  color: #a7f3d0;
  font-size: 12.5px;
  overflow-x: auto;
}

.error {
  color: #fca5a5;
  font-size: 13px;
  margin: 0;
}

.status-msg {
  color: #86efac;
  font-size: 13px;
  margin: 0;
}
