/* ============================================
   Quest2Offer — B2B Overview: RPG Gamified
   ============================================ */

/* ── Color tokens ───────────────────────────── */
:root {
  --go-gold: #FFD700;
  --go-silver: #C0C0C0;
  --go-bronze: #CD7F32;
  --go-xp-start: #6366f1;
  --go-xp-end: #a855f7;
  --go-streak: #f97316;
  --go-active: #22c55e;
  --go-warn: #eab308;
  --go-inactive: #9ca3af;
}

/* ── Section title ──────────────────────────── */
.go-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 28px 0 14px;
}

.go-section-title:first-child { margin-top: 0; }

/* ── A. Team Header ─────────────────────────── */
.go-team-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 8px;
}

.go-team-header__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.go-team-header__castle { font-size: 24px; line-height: 1; }

.go-team-header__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.go-team-header__level {
  font-size: 13px;
  font-weight: 600;
  color: var(--go-xp-end);
  background: rgba(168, 85, 247, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.go-team-header__xp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.go-team-header__xp-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.go-team-header__xp-text {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.go-team-header__stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

/* ── XP bar fill (shared) ───────────────────── */
.go-xp-fill {
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--go-xp-start), var(--go-xp-end));
  transition: width 0.8s ease;
}

/* ── B. Leaderboard ─────────────────────────── */
.go-lb {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.go-lb__card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.go-lb__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.go-lb__card--gold {
  border-color: var(--go-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.go-lb__card--silver {
  border-color: var(--go-silver);
  box-shadow: 0 0 8px rgba(192, 192, 192, 0.15);
}

.go-lb__card--bronze {
  border-color: var(--go-bronze);
  box-shadow: 0 0 8px rgba(205, 127, 50, 0.15);
}

.go-lb__medal { font-size: 28px; line-height: 1; margin-bottom: 8px; }

.go-lb__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--go-xp-start), var(--go-xp-end));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.go-lb__level {
  font-size: 12px;
  font-weight: 600;
  color: var(--go-xp-end);
  margin-bottom: 2px;
}

.go-lb__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.go-lb__xp {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.go-lb__bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

/* ── C. Member Cards Grid ───────────────────── */
.go-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.go-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.go-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.go-card--gold  { border-color: var(--go-gold); }
.go-card--silver { border-color: var(--go-silver); }
.go-card--bronze { border-color: var(--go-bronze); }

.go-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.go-card__avatar-wrap { position: relative; }

.go-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Avatar color palette (6 hues) */
.go-avatar-color-0 { background: #6366f1; }
.go-avatar-color-1 { background: #ec4899; }
.go-avatar-color-2 { background: #14b8a6; }
.go-avatar-color-3 { background: #f97316; }
.go-avatar-color-4 { background: #8b5cf6; }
.go-avatar-color-5 { background: #0ea5e9; }

.go-card__level-badge {
  position: absolute;
  bottom: -4px;
  right: -6px;
  background: var(--surface);
  border: 2px solid var(--go-xp-end);
  color: var(--go-xp-end);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
}

.go-card__role {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.go-role--owner  { background: rgba(168, 85, 247, 0.14); color: #a855f7; }
.go-role--admin  { background: rgba(99, 102, 241, 0.14); color: #6366f1; }
.go-role--member { background: rgba(156, 163, 175, 0.14); color: var(--text-muted); }

.go-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.go-card__xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.go-card__xp-bar {
  flex: 1;
  height: 7px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.go-card__xp-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.go-card__stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.go-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.go-card__streak--active {
  color: var(--go-streak);
  animation: flame-pulse 2s infinite;
}

.go-card__activity { font-size: 10px; }

/* ── D. Stat Rings ──────────────────────────── */
.go-rings {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.go-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.go-ring__svg { display: block; }

.go-stat-ring__progress {
  transition: stroke-dashoffset 1s ease;
}

.go-ring__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  /* offset for the label below svg */
  margin-top: -10px;
}

.go-ring__pct {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.go-ring__sub {
  font-size: 11px;
  color: var(--text-muted);
}

.go-ring__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* ── E. Activity Feed ───────────────────────── */
.go-feed { margin-bottom: 24px; }

.go-feed__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.go-feed__item:last-child { border-bottom: none; }

.go-feed__icon { font-size: 16px; flex-shrink: 0; line-height: 1; }

.go-feed__body {
  flex: 1;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.go-feed__body strong {
  color: var(--text);
  font-weight: 600;
}

.go-feed__time {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Animations ─────────────────────────────── */
@keyframes flame-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .go-cards { grid-template-columns: repeat(2, 1fr); }
  .go-lb { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .go-cards { grid-template-columns: 1fr; }
  .go-lb { grid-template-columns: 1fr; gap: 12px; }
  .go-rings { gap: 24px; }
  .go-team-header__stats { flex-direction: column; gap: 6px; }
}

@media (max-width: 480px) {
  .go-team-header { padding: 16px; }
  .go-card { padding: 16px; }
  .go-rings { gap: 16px; }
}
