:root {
  --bg-deep: #07111f;
  --bg-surface: #0e1c30;
  --bg-card: #12233b;
  --bg-elevated: #182e4d;
  --border: rgba(148, 184, 224, 0.16);
  --border-strong: rgba(148, 184, 224, 0.32);

  --text-main: #f0f6fc;
  --text-muted: #94aec9;
  --text-dim: #6581a0;

  --accent: #22d3a5;
  --accent-hover: #19bc92;
  --accent-glow: rgba(34, 211, 165, 0.22);
  --blue: #38bdf8;
  --amber: #f59e0b;
  --coral: #f43f5e;
  --purple: #a78bfa;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.16), transparent),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(34, 211, 165, 0.10), transparent),
    var(--bg-deep);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

/* ================= TOPBAR ================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: rgba(14, 28, 48, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

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

.brand-globe {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
}

.brand-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.mode-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-pill.active {
  color: #04131c;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ================= VIEWS & CARDS ================= */
.view {
  display: none;
  animation: fadeIn 0.22s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.setup-header {
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 10px;
}

.setup-header h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.setup-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 680px;
}

/* ================= OPTIONS ================= */
.option-group {
  margin-bottom: 22px;
}

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

.group-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tier-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.tier-card.active {
  border-color: var(--accent);
  background: rgba(34, 211, 165, 0.09);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tier-card strong {
  font-size: 1.02rem;
}

.tier-card small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tier-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 4px;
}
.tier-dot.easy { background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); }
.tier-dot.medium { background: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
.tier-dot.hard { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.tier-dot.very-hard { background: #f43f5e; box-shadow: 0 0 10px rgba(244, 63, 94, 0.6); }

/* Continent Grid */
.continent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.scope-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.scope-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.scope-card.active {
  border-color: var(--accent);
  background: rgba(34, 211, 165, 0.10);
  box-shadow: 0 0 0 1px var(--accent);
}

.scope-emoji {
  font-size: 1.65rem;
  margin-bottom: 2px;
}

.scope-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Segmented & Select */
.segmented {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--bg-elevated);
  color: var(--text-main);
}

.select-input {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 190px;
}

.setup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.best-score-chip {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 7px 14px;
  border-radius: 999px;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
}

.btn-primary {
  background: var(--accent);
  color: #031518;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* ================= HUD & PROGRESS ================= */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hud-left, .hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(34, 211, 165, 0.15);
  color: var(--accent);
}

.hud-tag.subtle {
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue);
}

.hud-stats {
  display: flex;
  gap: 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.progress-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  transition: width 0.3s ease;
}

/* ================= TRIVIA & CHOICES ================= */
.question-box {
  padding: 20px 8px 26px;
  text-align: center;
}

.question-box h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  line-height: 1.35;
}

.choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.choice-btn:disabled {
  cursor: default;
}

.choice-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.choice-btn.correct {
  border-color: var(--accent);
  background: rgba(34, 211, 165, 0.18);
  color: #a7f3d0;
}

.choice-btn.wrong {
  border-color: var(--coral);
  background: rgba(244, 63, 94, 0.18);
  color: #fecdd3;
}

.feedback-box {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.feedback-box.correct {
  border-color: rgba(34, 211, 165, 0.45);
  background: rgba(34, 211, 165, 0.08);
}

.feedback-box.wrong {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.08);
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.feedback-box p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ================= VISUAL STAGE (SHAPE & FLAG) ================= */
.visual-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.10), transparent 70%),
    var(--bg-surface);
  border: 1px solid var(--border);
}

.shape-svg {
  width: 100%;
  max-width: 380px;
  height: 250px;
  filter: drop-shadow(0 8px 22px rgba(34, 211, 165, 0.25));
}

.shape-silhouette {
  fill: var(--accent);
  stroke: #a7f3d0;
  stroke-linejoin: round;
  transition: fill 0.25s ease;
}

.flag-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 12px;
}

.flag-img {
  max-width: 300px;
  max-height: 185px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.flag-emoji-fallback {
  font-size: 7.5rem;
  line-height: 1;
}

.hint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  min-height: 34px;
}

.hint-text {
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 600;
}

.type-answer-form {
  display: flex;
  gap: 10px;
}

/* ================= NAME COUNTRIES MAP & INPUT ================= */
.typing-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.country-input {
  flex: 1;
  min-width: 240px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.country-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.recent-toast {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 140px;
}

.map-stage {
  position: relative;
  width: 100%;
  background: #081526;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 31, 0.8);
  font-weight: 600;
  color: var(--blue);
  z-index: 4;
}

.world-map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
}

.map-graticule line {
  stroke: rgba(148, 184, 224, 0.06);
  stroke-width: 0.6px;
}

.map-country.out-of-scope {
  fill: #0f2035;
  stroke: #172e4a;
}

.map-country.in-scope {
  fill: #1b3454;
  stroke: #2c4e78;
  transition: fill 0.25s ease;
}

.map-country.in-scope:hover {
  fill: #24456e;
}

.map-country.found {
  fill: var(--accent) !important;
  stroke: #064e3b !important;
}

.map-country.missed {
  fill: var(--coral) !important;
  stroke: #4c0519 !important;
}

.map-dot {
  fill: #2c4e78;
  stroke: #081526;
  transition: fill 0.25s ease, r 0.2s ease;
}

.map-dot.found {
  fill: var(--accent);
}

.map-dot.missed {
  fill: var(--coral);
}

.map-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  padding: 6px 11px;
  border-radius: 7px;
  background: rgba(7, 17, 31, 0.94);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* Checklist */
.checklist-wrapper {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

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

.checklist-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.checklist-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.countries-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.check-item {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.check-item.found {
  color: #a7f3d0;
  border-color: rgba(34, 211, 165, 0.4);
  background: rgba(34, 211, 165, 0.12);
  font-weight: 600;
}

.check-item.missed {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.12);
}

/* ================= MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-trophy {
  font-size: 3.4rem;
  margin-bottom: 8px;
}

.modal-card h2 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
}

.modal-subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.metric {
  padding: 14px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.metric-val {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ================= ACCOUNT & ADMIN PILLS ================= */
.account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-pill.signed-in {
  border-color: rgba(34, 211, 165, 0.45);
  background: rgba(34, 211, 165, 0.12);
  color: #a7f3d0;
}

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

/* ================= LEADERBOARD ================= */
.lb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.lb-header h2 {
  margin: 0 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
}

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

.lb-tabs {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.lb-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 640px) {
  .lb-podium {
    grid-template-columns: 1fr;
  }
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.podium-card.rank-1 {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(14, 28, 48, 0.9));
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.14);
}

.podium-card.rank-2 {
  border-color: rgba(148, 163, 184, 0.45);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(14, 28, 48, 0.9));
}

.podium-card.rank-3 {
  border-color: rgba(217, 119, 6, 0.45);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.12), rgba(14, 28, 48, 0.9));
}

.podium-medal {
  font-size: 2rem;
  margin-bottom: 6px;
}

.podium-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.podium-pts {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.podium-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.lb-table-wrap, .admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.admin-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.lb-table th, .lb-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.lb-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.lb-table tbody tr:last-child td {
  border-bottom: none;
}

.lb-table tbody tr.is-me {
  background: rgba(34, 211, 165, 0.09);
}

.lb-pts-cell {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
}

.lb-empty {
  text-align: center;
  padding: 40px 20px;
}

.lb-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.lb-empty h3 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
}

.lb-empty p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

/* ================= POINTS BANNER & MODALS ================= */
.points-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(34, 211, 165, 0.14);
  border: 1px solid rgba(34, 211, 165, 0.4);
  color: #a7f3d0;
}

.points-banner.guest {
  background: rgba(56, 189, 248, 0.10);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--blue);
  font-weight: 500;
}

.modal-left {
  text-align: left;
}

.modal-wide {
  max-width: 760px;
}

.modal-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-top-row h2 {
  margin: 0;
  font-size: 1.4rem;
}

.btn-icon-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

.btn-icon-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.modal-desc {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.code-input {
  font-family: "Space Grotesk", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.form-error {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  font-size: 0.85rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.profile-avatar {
  font-size: 2rem;
}

.profile-code {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-code code, .code-chip {
  font-family: "Space Grotesk", monospace;
  background: rgba(56, 189, 248, 0.14);
  color: var(--blue);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ================= ADMIN PANEL ================= */
.dev-warning {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.admin-gen-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.compact-select {
  min-width: 110px;
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-badge.joined {
  background: rgba(34, 211, 165, 0.15);
  color: var(--accent);
}

.status-badge.pending {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue);
}

.status-badge.revoked {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
}

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

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-footer-actions {
  display: flex;
  gap: 8px;
}

.storage-pill {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: monospace;
}
