/* ============================================
   TEMPO CREATOR PORTAL — DESIGN SYSTEM
   Extends ../shared/css/main.css
   ============================================ */

/* ---- CSS Variable Overrides (shared → Tempo) ---- */
:root {
  /* Tempo palette */
  --pink: #FF4D8D;
  --pink-light: #FF6FA3;
  --pink-glow: rgba(255, 77, 141, 0.15);
  --pink-subtle: rgba(255, 77, 141, 0.08);
  --navy: #1A1B3A;
  --navy-light: #252750;
  --navy-mid: #2E3060;
  --violet: #7C5CFC;
  --violet-glow: rgba(124, 92, 252, 0.15);
  --mint: #34D399;
  --mint-glow: rgba(52, 211, 153, 0.15);
  --yellow: #FBBF24;
  --red: #EF4444;
  --bg: #0F1023;
  --surface: #171835;
  --surface-hover: #1E1F42;
  --surface-elevated: #222350;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --font: 'General Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  /* Map shared CSS variable names → Tempo values */
  --bg-primary: #0F1023;
  --bg-card: #171835;
  --bg-secondary: #1E1F42;
  --text-primary: #FFFFFF;
  --accent: #FF4D8D;
  --accent-dim: rgba(255, 77, 141, 0.15);
  --success: #34D399;
  --success-dim: rgba(52, 211, 153, 0.15);
  --danger: #EF4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --warning: #FBBF24;
  --warning-dim: rgba(251, 191, 36, 0.12);
  --info: #7C5CFC;
  --info-dim: rgba(124, 92, 252, 0.15);
  --purple: #7C5CFC;
  --purple-dim: rgba(124, 92, 252, 0.15);
}

/* ---- Base Overrides ---- */
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  position: relative;
  z-index: 2000;
  background: var(--bg);
  overflow: hidden;
}

/* Ambient background glows */
.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.4;
}

.login-glow-pink {
  width: 500px;
  height: 500px;
  background: var(--pink);
  top: -15%;
  right: -10%;
  animation: loginGlowFloat 8s ease-in-out infinite;
}

.login-glow-violet {
  width: 400px;
  height: 400px;
  background: var(--violet);
  bottom: -10%;
  left: -10%;
  animation: loginGlowFloat 8s ease-in-out infinite reverse;
}

@keyframes loginGlowFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

/* Content container */
.login-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: loginFadeIn 0.8s ease;
}

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

/* Logo mark removed — O-mark in wordmark serves as the logo */

/* Wordmark */
.login-wordmark {
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font);
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1;
}

.login-wordmark-o {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 2px;
}

.login-o-mark {
  width: 0.78em;
  height: 0.78em;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 0.04em;
  border-radius: 50%;
  overflow: hidden;
}

/* Tagline */
.login-tagline {
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 32px;
  letter-spacing: 0.3px;
  opacity: 0.75;
}

/* In-app browser warning */
.login-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--yellow);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  max-width: 340px;
  text-align: left;
}

.login-warning-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.login-warning-text {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 14px;
  opacity: 0.85;
}

.login-warning-btn {
  width: 100%;
  padding: 12px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--yellow);
  border-radius: 10px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}

.login-warning-btn:hover {
  background: rgba(251, 191, 36, 0.3);
}

.login-warning-confirm {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--mint);
}

/* Discord login button */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 40px;
  background: #5865F2;
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: rgba(88, 101, 242, 0.5);
  touch-action: manipulation;
  user-select: none;
  min-height: 58px;
  min-width: 300px;
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(88, 101, 242, 0.3);
}

.login-btn:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(88, 101, 242, 0.4);
}

.login-btn:active {
  transform: scale(0.97);
  background: #3C45A5;
}

/* Feature preview pills */
.login-features {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.login-feature-icon {
  font-size: 1rem;
}

.login-feature-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* Social proof with avatars */
.login-social-proof {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-avatars {
  display: flex;
  align-items: center;
}

.login-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  border: 2px solid var(--bg);
  margin-left: -8px;
  letter-spacing: -0.3px;
}

.login-avatar-circle:first-child {
  margin-left: 0;
}

.login-avatar-count {
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
  font-size: 9px;
  font-family: var(--mono);
  font-weight: 600;
  border: 2px solid var(--border-hover);
}

.login-social-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Mobile adjustments for new elements */
@media (max-width: 480px) {
  .login-features {
    gap: 8px;
  }

  .login-feature {
    font-size: 0.78rem;
  }
}

/* Decorative dot grid */
.login-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .login-logo-mark {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    margin-bottom: 24px;
  }

  .login-logo-mark svg {
    width: 40px;
    height: 40px;
  }

  .login-wordmark {
    font-size: 2.75rem;
  }

  .login-tagline {
    font-size: 1rem;
    margin-bottom: 40px;
  }

  .login-btn {
    min-width: 260px;
    padding: 16px 32px;
  }

  .login-glow-pink {
    width: 300px;
    height: 300px;
  }

  .login-glow-violet {
    width: 250px;
    height: 250px;
  }
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#loadingScreen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  gap: 20px;
  background: var(--bg);
}

.loading-logo-mark {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loadingPulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 40px rgba(255, 77, 141, 0.3);
}

.loading-logo-mark svg {
  margin-left: 1px; /* optical center for play triangle */
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-family: var(--font);
  font-weight: 500;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

/* ============================================
   LAYOUT — APP SHELL
   ============================================ */
#appContainer {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

#appContainer.hidden { display: none; }
#appContainer.show { display: flex; }

/* ============================================
   SIDEBAR — DESKTOP
   ============================================ */
.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font);
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin: 0;
}

.sidebar-wordmark-o {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 2px;
}

.sidebar-o-mark {
  width: 0.78em;
  height: 0.78em;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 0.04em;
  border-radius: 50%;
}

/* Brand switcher in sidebar */
.sidebar-brand-switcher {
  padding: 8px;
  margin-bottom: 16px;
}

.sidebar-brand-switcher select {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.sidebar-brand-switcher select:hover {
  border-color: var(--border-hover);
}

.sidebar-brand-switcher select option {
  background: var(--surface);
  color: var(--text);
}

.nav-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  list-style: none;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--pink-glow);
  color: var(--pink);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--pink);
  border-radius: 0 3px 3px 0;
}

.nav-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.nav-item .nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--pink);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--mono);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.user-card:hover { background: var(--surface-hover); }

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-tier { font-size: 12px; color: var(--pink); font-weight: 500; }

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main {
  flex: 1;
  margin-left: 240px;
  padding: 32px 40px 120px;
  max-width: 1200px;
}

/* When admin banner is visible, push content down */
.admin-active .main {
  padding-top: 72px;
}

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
  display: none;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 16, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  border-bottom: 1px solid var(--border);
}

.mobile-header .logo-mark {
  display: flex;
  align-items: center;
}

.mobile-wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font);
  letter-spacing: -0.8px;
  color: var(--text);
  line-height: 1;
}

.mobile-wordmark-o {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 2px;
}

.mobile-o-mark {
  width: 0.78em;
  height: 0.78em;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: 0.04em;
  border-radius: 50%;
}

.mobile-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-header .mobile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
  cursor: pointer;
}

.mobile-header .mobile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hamburger-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.hamburger-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* ============================================
   MOBILE SLIDE-OUT MENU
   ============================================ */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu.open { right: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-user .menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
}

.mobile-menu-user .menu-user-name {
  font-weight: 600;
  font-size: 15px;
}

.mobile-menu-user .menu-user-tier {
  font-size: 12px;
  color: var(--pink);
  font-weight: 500;
}

.mobile-menu-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s;
}

.mobile-menu-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.mobile-menu-item.active {
  background: var(--pink-glow);
  color: var(--pink);
}

.mobile-menu-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.mobile-menu-item .menu-icon {
  font-size: 22px;
  width: 28px;
  text-align: center;
}

.mobile-menu-item .menu-badge {
  margin-left: auto;
  background: var(--violet);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--mono);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mobile-menu-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--red);
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font);
}

.mobile-menu-logout:hover {
  background: var(--danger-dim);
}

/* ============================================
   PAGE SWITCHING
   ============================================ */
.view-section { display: none; }
.view-section.active { display: block; }

/* Backward compat: .page class */
.page { display: none; }
.page.active { display: block; }

/* ============================================
   GREETING
   ============================================ */
.greeting { margin-bottom: 32px; }

.greeting h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.greeting h1 .wave {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-8deg); }
  40% { transform: rotate(14deg); }
  50% { transform: rotate(-4deg); }
  60% { transform: rotate(10deg); }
  70% { transform: rotate(0deg); }
}

.greeting .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 400;
}

.greeting .subtitle .brand-tag {
  color: var(--pink);
  font-weight: 600;
}

/* Data freshness badge */
.data-freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Tier badge */
.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.tier-unranked { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.tier-bronze { background: rgba(205, 127, 50, 0.15); color: #CD7F32; }
.tier-silver { background: rgba(192, 192, 192, 0.15); color: #C0C0C0; }
.tier-gold { background: rgba(255, 215, 0, 0.15); color: #FFD700; }
.tier-platinum { background: rgba(229, 228, 226, 0.15); color: #E5E4E2; }
.tier-diamond { background: rgba(185, 242, 255, 0.15); color: #B9F2FF; }
.tier-obsidian { background: rgba(255, 77, 141, 0.15); color: var(--pink); }

/* ============================================
   PERIOD SELECTOR
   ============================================ */
.period-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.period-selector {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
}

.period-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: var(--font);
}

.period-btn:hover { color: var(--text); }
.period-btn.active { background: var(--pink); color: white; }

.date-range-text {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ============================================
   PACE CARD (Retainer Pacing)
   ============================================ */
.pace-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.pace-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--pink-glow) 0%, transparent 70%);
  pointer-events: none;
}

.pace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.pace-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pace-period {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 6px;
}

.pace-content {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}

.pace-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.pace-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.pace-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 8; }
.pace-ring-fill {
  fill: none;
  stroke: url(#paceGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pace-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.pace-count { font-size: 32px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.pace-total { font-size: 13px; color: var(--text-muted); font-family: var(--mono); }

.pace-details { flex: 1; }
.pace-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pace-stat-row:last-child { border-bottom: none; }
.pace-stat-label { font-size: 14px; color: var(--text-secondary); }
.pace-stat-value { font-family: var(--mono); font-weight: 600; font-size: 15px; }
.pace-stat-value.on-track { color: var(--mint); }
.pace-stat-value.behind { color: var(--yellow); }
.pace-stat-value.slightly-behind { color: var(--yellow); }
.pace-stat-value.complete { color: var(--mint); }

.pace-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.pace-status.good { background: var(--mint-glow); color: var(--mint); }
.pace-status.warning { background: rgba(251, 191, 36, 0.12); color: var(--yellow); }
.pace-status.behind, .pace-status.bad { background: var(--danger-dim); color: var(--red); }

/* ============================================
   STATS STRIP (4-column grid)
   ============================================ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.stat-card.inactive { opacity: 0.5; }

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1.1;
}

.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
}

.stat-change.up { color: var(--mint); }
.stat-change.down { color: var(--red); }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-action {
  font-size: 13px;
  color: var(--pink);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.section-action:hover { opacity: 0.8; }

/* ============================================
   WHAT'S WINNING — HORIZONTAL SCROLL
   ============================================ */
.winning-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 32px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.winning-scroll::-webkit-scrollbar { height: 4px; }
.winning-scroll::-webkit-scrollbar-track { background: transparent; }
.winning-scroll::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.winning-card {
  min-width: 280px;
  max-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.winning-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.winning-thumb {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.winning-thumb .play-overlay {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s;
  z-index: 2;
}

.winning-card:hover .play-overlay {
  transform: scale(1.1);
  background: rgba(255,255,255,0.25);
}

.winning-thumb .rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--pink);
  color: white;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.winning-thumb .gmv-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: var(--mint);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.winning-thumb.t1 { background: linear-gradient(135deg, #2a1a3e, #1a2a4e, #1a3a3e); }
.winning-thumb.t2 { background: linear-gradient(135deg, #3a1a2e, #2a1a4e, #1a2a3e); }
.winning-thumb.t3 { background: linear-gradient(135deg, #1a2a3e, #2a3a2e, #1a3a4e); }
.winning-thumb.t4 { background: linear-gradient(135deg, #2a2a1e, #3a1a2e, #2a1a4e); }

.winning-body { padding: 16px; }

.winning-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.winning-creator-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.winning-creator-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.winning-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.winning-stats { display: flex; gap: 16px; }
.winning-stat { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.winning-stat strong { color: var(--text); font-weight: 600; }

/* ============================================
   ACTION ITEMS
   ============================================ */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.action-card:hover {
  border-color: var(--pink);
  background: var(--surface-hover);
  transform: translateX(4px);
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.action-icon.content { background: var(--pink-glow); }
.action-icon.strategy { background: var(--violet-glow); }
.action-icon.engage { background: var(--mint-glow); }
.action-icon.learn { background: rgba(251, 191, 36, 0.12); }

.action-content h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.action-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; margin: 0; }
.action-content .action-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   SPOTLIGHT / PEER TOP 5
   ============================================ */
.spotlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.spotlight-card::after {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--violet-glow) 0%, transparent 70%);
  pointer-events: none;
}

.spotlight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.spotlight-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.spotlight-row:hover { background: rgba(255,255,255,0.06); }

.spotlight-row.you {
  background: var(--pink-subtle);
  border: 1px solid rgba(255, 77, 141, 0.2);
}

.spotlight-rank {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  width: 28px;
  text-align: center;
  color: var(--text-muted);
}

.spotlight-row:first-child .spotlight-rank { color: var(--yellow); }
.spotlight-row:nth-child(2) .spotlight-rank { color: var(--text-secondary); }
.spotlight-row:nth-child(3) .spotlight-rank { color: #CD7F32; }

.spotlight-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.spotlight-row.you .spotlight-avatar {
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.spotlight-info { flex: 1; }
.spotlight-name { font-weight: 600; font-size: 14px; }
.spotlight-row.you .spotlight-name { color: var(--pink); }
.spotlight-tier { font-size: 12px; color: var(--text-muted); }
.spotlight-gmv { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.spotlight-change { font-size: 11px; color: var(--mint); font-family: var(--mono); }

/* ============================================
   INSIGHT CARD
   ============================================ */
.insight-card {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.1), rgba(255, 77, 141, 0.08));
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.insight-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--violet);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.insight-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.insight-text strong { color: var(--pink); }

/* ============================================
   PENDING STATUS CARD
   ============================================ */
.pending-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.pending-card.hidden { display: none; }

.pending-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.pending-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pending-message {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.pending-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pending-step {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
}

.pending-step.complete { background: var(--mint); }
.pending-step.current { background: var(--pink); }

/* ============================================
   JOURNAL CARD
   ============================================ */
.journal-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

/* ============================================
   CARD — generic container
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
}

.mb-16 { margin-bottom: 16px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }

.btn-small {
  padding: 6px 14px;
  background: var(--pink);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.btn-small:hover { background: var(--pink-light); }

.btn-link {
  background: none;
  border: none;
  color: var(--pink);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
}

/* ============================================
   PAGE: DISCOVER
   ============================================ */
.discover-hero {
  background: linear-gradient(135deg, var(--surface), var(--surface-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 32px;
  text-align: center;
}

.discover-hero h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.discover-hero p { color: var(--text-secondary); font-size: 15px; margin: 0; }

.discover-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.filter-pill:hover { border-color: var(--border-hover); color: var(--text); }
.filter-pill.active { background: var(--pink); border-color: var(--pink); color: white; }

.discover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.discover-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.discover-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.discover-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discover-card .thumb .views-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.discover-card .d-body { padding: 16px; }
.discover-card .d-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.discover-card .d-meta { display: flex; justify-content: space-between; align-items: center; }
.discover-card .d-creator { font-size: 12px; color: var(--text-secondary); }
.discover-card .d-gmv { font-family: var(--mono); font-size: 13px; color: var(--mint); font-weight: 600; }

.why-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 4px 10px;
  background: var(--violet-glow);
  color: var(--violet);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}

/* ============================================
   PAGE: STATS
   ============================================ */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.stats-grid .stat-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--surface), rgba(255, 77, 141, 0.05));
  border-color: rgba(255, 77, 141, 0.2);
}

.big-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.big-stat-card .big-value {
  font-size: 40px;
  font-weight: 800;
  font-family: var(--mono);
  margin-bottom: 4px;
}

.big-stat-card .big-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.big-stat-card .big-change,
.big-stat-card .stat-change {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chart-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

/* Chart toggle */
.chart-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface-hover);
  border-radius: 8px;
  padding: 2px;
}

.chart-toggle-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: var(--font);
}

.chart-toggle-btn.active { background: var(--pink); color: white; }

/* Stats chart container */
.card canvas {
  max-height: 200px;
}

/* Video list (stats page) */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.2s;
  cursor: pointer;
}

.video-list-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-elevated);
}

.video-list-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.video-list-info { flex: 1; min-width: 0; }
.video-list-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-list-meta { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.video-list-stats { text-align: right; flex-shrink: 0; }
.video-list-gmv { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--mint); }
.video-list-orders { font-size: 12px; color: var(--text-muted); }

/* Video row (prototype stats style) */
.video-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.2s;
  cursor: pointer;
}

.video-row:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.video-row .v-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.video-row .v-info { flex: 1; min-width: 0; }
.video-row .v-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-row .v-date {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.video-row .v-stats {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-shrink: 0;
}

.video-row .v-stat {
  text-align: right;
}
.video-row .v-stat-value {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
}
.video-row .v-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Product breakdown */
.product-bar { margin-bottom: 14px; }
.product-bar:last-child { margin-bottom: 0; }
.product-bar-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.product-bar-name { font-size: 13px; color: var(--text-secondary); }
.product-bar-value { font-size: 13px; font-weight: 700; font-family: var(--mono); }
.product-bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.product-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }

/* ============================================
   PAGE: RANK
   ============================================ */
.rank-hero {
  text-align: center;
  padding: 40px 0 32px;
}

.rank-position-display {
  font-size: 72px;
  font-weight: 800;
  font-family: var(--mono);
  background: linear-gradient(135deg, var(--pink), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.rank-label { font-size: 16px; color: var(--text-secondary); margin-bottom: 4px; }
.rank-change-hero { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--mint); }

/* Leaderboard rows (prototype lb-row style) */
.lb-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  margin-bottom: 8px;
}

.lb-row:hover { background: var(--surface-hover); }

.lb-row.you {
  background: var(--pink-subtle);
  border-color: rgba(255, 77, 141, 0.2);
}

.lb-rank {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  width: 32px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.lb-row:first-child .lb-rank { color: var(--yellow); font-size: 22px; }
.lb-row:nth-child(2) .lb-rank { color: #C0C0C0; }
.lb-row:nth-child(3) .lb-rank { color: #CD7F32; }

.lb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.lb-row.you .lb-avatar {
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.lb-info { flex: 1; min-width: 0; }
.lb-name { font-weight: 600; font-size: 15px; }
.lb-row.you .lb-name { color: var(--pink); }
.lb-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; margin-top: 2px; }

.lb-value { text-align: right; flex-shrink: 0; }
.lb-gmv { font-family: var(--mono); font-weight: 800; font-size: 18px; }
.lb-change { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.lb-change.up { color: var(--mint); }

.rank-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.rank-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: var(--font);
}

.rank-tab.active { background: var(--pink); color: white; }

/* Leaderboard */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Rank position card */
.rank-position-card {
  background: linear-gradient(135deg, var(--surface), rgba(255, 77, 141, 0.05));
  border: 1px solid rgba(255, 77, 141, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.rank-position-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.rank-position-rank {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--mono);
  background: linear-gradient(135deg, var(--pink), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rank-position-info { flex: 1; }
.rank-position-label { font-size: 14px; color: var(--text-secondary); font-weight: 600; }
.rank-position-total { font-size: 12px; color: var(--text-muted); }
.rank-position-gmv { font-family: var(--mono); font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.rank-position-movement { font-family: var(--mono); font-size: 13px; font-weight: 600; }

.rank-progress-section { margin-bottom: 8px; }
.rank-progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); }
.rank-progress-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.rank-progress-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); border-radius: 3px; transition: width 1s ease; }
.rank-motivation { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* Leaderboard tabs (existing) */
.leaderboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.leaderboard-tab {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: var(--font);
}

.leaderboard-tab:hover { border-color: var(--border-hover); color: var(--text); }
.leaderboard-tab.active { background: var(--pink); border-color: var(--pink); color: white; }

/* Leaderboard items (dynamically generated by rank.js) */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
  animation: fadeInUp 0.3s ease forwards;
  animation-delay: calc(var(--index, 0) * 0.05s);
}

.leaderboard-item:hover { background: var(--surface-hover); }
.leaderboard-item:last-child { border-bottom: none; }

.leaderboard-item.highlight {
  background: var(--pink-subtle);
  border-bottom-color: rgba(255, 77, 141, 0.1);
}

.leaderboard-rank {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 16px;
  width: 40px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.leaderboard-item:first-child .leaderboard-rank { color: var(--yellow); }
.leaderboard-item:nth-child(2) .leaderboard-rank { color: #C0C0C0; }
.leaderboard-item:nth-child(3) .leaderboard-rank { color: #CD7F32; }

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-tier { font-size: 11px; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; }
.leaderboard-stats { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.leaderboard-gmv { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.leaderboard-arrow { color: var(--text-muted); font-size: 14px; }

.leaderboard-separator {
  text-align: center;
  padding: 8px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Podium */
.rank-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px 16px;
}

.podium-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  min-width: 120px;
}

.podium-item:hover { transform: translateY(-4px); }
.podium-item.highlight { border-color: rgba(255, 77, 141, 0.3); background: var(--pink-subtle); }

.podium-item.first { transform: translateY(-12px); }
.podium-item.first:hover { transform: translateY(-16px); }

.podium-medal { font-size: 28px; margin-bottom: 8px; }
.podium-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.podium-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.podium-name.long-name { font-size: 11px; }
.podium-name.very-long-name { font-size: 10px; }
.podium-gmv { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--mint); margin-bottom: 4px; }
.podium-tier { font-size: 14px; }
.podium-base {
  margin-top: 8px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-muted);
  display: none;
}

/* Creator modal (rank page) */
.creator-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.creator-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  border: 1px solid var(--border);
}

.creator-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.creator-modal-header h3 { font-size: 18px; font-weight: 700; }

.creator-modal-close {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creator-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.creator-account-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.creator-account-link:hover { border-color: var(--pink); transform: translateX(4px); }
.creator-account-icon { font-size: 18px; }
.creator-account-handle { flex: 1; font-weight: 500; }
.creator-account-arrow { color: var(--pink); }

/* ============================================
   PAGE: COACH — AI CONTENT STRATEGIST
   ============================================ */
.coach-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  height: calc(100vh - 100px);
  max-height: 800px;
}

.coach-chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.coach-chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.coach-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
}

.coach-avatar::after {
  content: '';
  position: absolute;
  bottom: -2px; right: -2px;
  width: 12px; height: 12px;
  background: var(--mint);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.coach-name { font-weight: 700; font-size: 16px; }
.coach-status {
  font-size: 12px;
  color: var(--mint);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coach-messages::-webkit-scrollbar { width: 4px; }
.coach-messages::-webkit-scrollbar-track { background: transparent; }
.coach-messages::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.msg { max-width: 85%; display: flex; flex-direction: column; gap: 6px; }
.msg.ai { align-self: flex-start; }
.msg.user { align-self: flex-end; }

.msg-bubble { padding: 14px 18px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.msg.ai .msg-bubble { background: var(--surface-elevated); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: linear-gradient(135deg, var(--pink), #e0438a); border-bottom-right-radius: 4px; }
.msg-time { font-size: 11px; color: var(--text-muted); font-family: var(--mono); padding: 0 4px; }
.msg.user .msg-time { text-align: right; }
.msg-bubble strong { color: var(--pink); }
.msg.user .msg-bubble strong { color: white; }

.msg-bubble .hook-list {
  margin: 10px 0 6px; padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}

.msg-bubble .hook-item {
  background: rgba(255,255,255,0.05);
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--pink);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.msg-bubble .hook-item:hover { background: rgba(255,255,255,0.08); transform: translateX(4px); }
.msg-bubble .hook-item .hook-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); display: block; margin-bottom: 4px; font-family: var(--mono);
}

.msg-bubble .script-block {
  margin: 12px 0 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  position: relative;
}

.msg-bubble .script-block .copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.1); border: none;
  color: var(--text-secondary); padding: 4px 10px;
  border-radius: 6px; font-size: 11px; cursor: pointer; font-family: var(--mono);
}

.msg-bubble .script-block .copy-btn:hover { background: rgba(255,255,255,0.15); }

.typing-indicator {
  display: flex; gap: 4px; padding: 14px 18px;
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: 16px; border-bottom-left-radius: 4px;
  align-self: flex-start; width: fit-content;
}

.typing-dot {
  width: 8px; height: 8px; background: var(--text-muted);
  border-radius: 50%; animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.coach-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.coach-input {
  flex: 1;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 48px;
  max-height: 120px;
  transition: border-color 0.2s;
}

.coach-input::placeholder { color: var(--text-muted); }
.coach-input:focus { border-color: var(--pink); }

.coach-send {
  width: 48px; height: 48px;
  background: var(--pink); border: none; border-radius: 14px;
  color: white; font-size: 20px; cursor: pointer;
  transition: all 0.2s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.coach-send:hover { background: var(--pink-light); transform: scale(1.05); }

.coach-sidebar { display: flex; flex-direction: column; gap: 16px; }

.quick-actions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.quick-actions h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}

.quick-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; margin-bottom: 8px; text-align: left;
}

.quick-btn:last-child { margin-bottom: 0; }
.quick-btn:hover { background: var(--pink-subtle); border-color: rgba(255, 77, 141, 0.2); transform: translateX(4px); }
.quick-btn .qb-icon { font-size: 18px; width: 24px; text-align: center; }

.coach-context {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.coach-context h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}

.context-item {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}

.context-item:last-child { border-bottom: none; }
.context-label { color: var(--text-secondary); }
.context-value { font-weight: 600; font-family: var(--mono); font-size: 12px; }

.coach-knowledge {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.08), rgba(255, 77, 141, 0.05));
  border: 1px solid rgba(124, 92, 252, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.coach-knowledge h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 10px;
  color: var(--violet); display: flex; align-items: center; gap: 6px;
}

.knowledge-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.knowledge-tag {
  padding: 5px 10px; background: rgba(255,255,255,0.05);
  border-radius: 6px; font-size: 11px; color: var(--text-secondary); font-weight: 500;
}

/* ============================================
   PAGE: LEARN
   ============================================ */
.learn-tracks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.track-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }

.track-icon { font-size: 36px; margin-bottom: 16px; }
.track-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.track-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; }

.track-progress { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.track-progress-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); border-radius: 2px; transition: width 1s ease; }
.track-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

/* Training cards */
.training-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.training-card:hover { border-color: var(--border-hover); transform: translateX(4px); }
.training-card:last-child { margin-bottom: 0; }

.training-icon { font-size: 24px; flex-shrink: 0; }
.training-info { flex: 1; min-width: 0; }
.training-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.training-desc { font-size: 12px; color: var(--text-secondary); }
.training-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.training-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--pink); color: white; text-transform: uppercase; letter-spacing: 0.5px; }
.training-new { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--mint); color: var(--bg); margin-left: 6px; }
.training-duration { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.training-play { font-size: 18px; flex-shrink: 0; }

/* Tips */
.tips-nav { display: flex; align-items: center; gap: 8px; }
.tips-nav-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font); }
.tips-counter { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.tips-container { position: relative; min-height: 80px; }
.tip-card { display: none; }
.tip-card.active { display: block; }
.tip-category { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.tip-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Quick links */
.quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.quick-link:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.quick-link-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.quick-link-text { flex: 1; }
.quick-link-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.quick-link-desc { font-size: 12px; color: var(--text-secondary); }
.quick-link-arrow { color: var(--pink); font-weight: 600; }

/* Campaign cards */
.campaign-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.campaign-logo { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.campaign-info { flex: 1; min-width: 0; }
.campaign-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.campaign-desc { font-size: 12px; color: var(--text-secondary); }
.campaign-commission { font-size: 11px; color: var(--mint); font-weight: 600; margin-top: 4px; }
.campaign-apply-btn { padding: 8px 16px; background: var(--pink); border: none; border-radius: 8px; color: white; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0; font-family: var(--font); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-weight: 600;
  font-size: 14px;
}

.faq-toggle {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
}

.faq-answer {
  display: none;
  padding: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.faq-item.open .faq-answer,
.faq-item.active .faq-answer {
  display: block;
}

/* Coming soon */
.coming-soon-section { text-align: center; padding: 24px; }
.coming-soon-icon { font-size: 2rem; margin-bottom: 8px; }
.coming-soon-text { font-weight: 600; margin-bottom: 4px; }
.coming-soon-desc { font-size: 13px; color: var(--text-secondary); }

/* ============================================
   PAGE: PROFILE
   ============================================ */
.profile-hero-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 16px;
}

.profile-hero-bg {
  height: 80px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.profile-hero-content {
  text-align: center;
  padding: 0 24px 24px;
  margin-top: -40px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  margin: 0 auto 12px;
  border: 4px solid var(--surface);
  overflow: hidden;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-name-large { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-handle-large { font-size: 14px; color: var(--text-secondary); }
.profile-member-since { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Tier progress */
.tier-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tier-progress-current { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.tier-progress-emoji { font-size: 20px; }
.tier-progress-next { font-size: 13px; color: var(--text-secondary); }
.tier-progress-next-name { color: var(--pink); font-weight: 600; }

.tier-progress-bar-container { margin-bottom: 8px; }
.tier-progress-bar { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.tier-progress-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); border-radius: 4px; transition: width 1s ease; }
.tier-progress-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.tier-progress-remaining { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.tier-progress-amount { color: var(--pink); font-weight: 700; }

/* Brand cards */
.profile-brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.brand-card-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.brand-card-info { flex: 1; }
.brand-card-name { font-weight: 600; font-size: 13px; }
.brand-card-status { font-size: 11px; font-weight: 600; margin-top: 2px; }
.brand-card-status.active { color: var(--mint); }
.brand-card-status.pending { color: var(--yellow); }
.brand-card-status.inactive { color: var(--text-muted); }

/* Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.achievement-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.achievement-item.unlocked {
  border-color: rgba(255, 77, 141, 0.2);
  background: var(--pink-subtle);
}

.achievement-item.locked { opacity: 0.4; }

.achievement-icon { font-size: 24px; margin-bottom: 6px; }
.achievement-name { font-size: 11px; font-weight: 600; line-height: 1.3; }
.achievement-progress { font-size: 10px; color: var(--text-muted); font-family: var(--mono); margin-top: 4px; }

/* Account items */
.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.account-item:last-child { border-bottom: none; }
.account-info { display: flex; align-items: center; gap: 12px; }
.account-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.account-handle { font-weight: 600; font-size: 14px; }
.account-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; }
.account-status.status-active { background: var(--mint-glow); color: var(--mint); }
.account-remove { background: none; border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 8px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Notification prefs */
.notification-prefs { display: flex; flex-direction: column; gap: 4px; }
.notification-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notification-pref-item:last-child { border-bottom: none; }
.notification-pref-info { flex: 1; }
.notification-pref-title { font-weight: 600; font-size: 14px; display: block; margin-bottom: 2px; }
.notification-pref-desc { font-size: 12px; color: var(--text-secondary); display: block; }
.notification-pref-item input[type="checkbox"] { width: 44px; height: 24px; appearance: none; -webkit-appearance: none; background: rgba(255,255,255,0.1); border-radius: 12px; position: relative; cursor: pointer; outline: none; flex-shrink: 0; }
.notification-pref-item input[type="checkbox"]::before { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform 0.2s; }
.notification-pref-item input[type="checkbox"]:checked { background: var(--pink); }
.notification-pref-item input[type="checkbox"]:checked::before { transform: translateX(20px); }

/* Profile items */
.profile-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.profile-item:last-child, .profile-item.mb-0 { border-bottom: none; }
.profile-item-label { color: var(--text-secondary); font-size: 14px; }
.profile-item-value { font-weight: 600; font-size: 14px; }

/* Payment */
.payment-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.payment-summary-item { text-align: center; }
.payment-summary-label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.payment-summary-value { font-family: var(--mono); font-weight: 700; font-size: 18px; }
.payment-summary-value.paid { color: var(--mint); }
.payment-summary-value.pending { color: var(--yellow); }

/* Support links */
.profile-support-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
}
.profile-support-link:hover { border-color: var(--border-hover); background: var(--surface-hover); }

/* Logout button */
.logout-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--red);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  margin-top: 16px;
}
.logout-btn:hover { background: var(--danger-dim); border-color: var(--red); }

.profile-footer { text-align: center; padding: 24px 0; }

/* Best video */
.best-video-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
}
.best-video-product { font-weight: 600; }
.best-video-stat-value { font-family: var(--mono); font-weight: 700; color: var(--mint); }
.best-video-date { font-size: 12px; color: var(--text-muted); }

/* ============================================
   STAT VALUE ANIMATIONS
   ============================================ */

/* Smooth count-up: subtle glow during counting */
.stat-value-changing {
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

/* Pop effect when count finishes */
.stat-value-pop {
  animation: statPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes statPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Card-level pulse when a value updates */
.stat-updating {
  animation: cardPulse 0.6s ease;
}

@keyframes cardPulse {
  0% { background: var(--surface); }
  30% { background: var(--surface-hover); box-shadow: 0 0 20px rgba(255, 77, 141, 0.08); }
  100% { background: var(--surface); }
}

/* Staggered card entrance on period switch */
.stat-card-enter {
  animation: cardSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardSlideIn {
  0% {
    opacity: 0.4;
    transform: translateY(8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Change indicator pop-in */
.change-updating {
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}

.change-pop {
  animation: changePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes changePop {
  0% { opacity: 0; transform: translateY(6px); }
  60% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Period button active transition */
.period-btn {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.period-btn.active {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ============================================
   ADMIN BANNER
   ============================================ */
.admin-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-bottom: 2px solid var(--pink);
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 150;
}

.admin-banner.show,
.admin-banner[style*="display: flex"] {
  display: flex;
}

.admin-badge {
  background: var(--pink);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  letter-spacing: 0.5px;
}

.admin-viewing {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-creator-search,
.admin-creator-select {
  padding: 6px 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}

.admin-creator-search { flex: 1; max-width: 200px; }
.admin-creator-select { flex: 1; max-width: 300px; }

.admin-exit-btn {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  transition: all 0.2s;
}

.admin-exit-btn:hover { background: var(--danger-dim); border-color: var(--red); color: var(--red); }

/* ============================================
   VIDEO MODAL
   ============================================ */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  padding: 40px 20px;
  flex-direction: column;
  align-items: center;
}

.video-modal.active,
.video-modal.show {
  display: flex;
}

.video-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.video-modal-title {
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.video-modal-content {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
}

.video-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
}

/* ============================================
   VIDEO CARDS (home.js dynamically generates)
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

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

.video-card-thumb {
  height: 100px;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card-play { font-size: 24px; opacity: 0.7; }
.video-card-rank { position: absolute; top: 8px; left: 8px; background: var(--pink); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; font-family: var(--mono); }
.video-card-gmv { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.6); color: var(--mint); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; font-family: var(--mono); }

.video-card-info { padding: 10px; }
.video-card-creator { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.video-card-product { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================
   EMPTY STATES & LOADING
   ============================================ */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-secondary);
}

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

/* spinner defined above in loading screen section */

.hidden { display: none !important; }

/* ============================================
   STREAK CARD (standalone, hidden in new design)
   ============================================ */
.streak-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.streak-card.inactive { opacity: 0.5; }

.streak-emoji { font-size: 32px; }
.streak-count { font-size: 24px; font-weight: 800; font-family: var(--mono); }
.streak-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.streak-message { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ============================================
   MILESTONE CARD
   ============================================ */
.milestone-card {
  background: linear-gradient(135deg, var(--surface), var(--purple-dim));
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* Fake chart bars */
.fake-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 0 40px;
  width: 100%;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--pink), var(--violet));
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: barGrow 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes barGrow {
  to { opacity: 1; transform: scaleY(1); }
}

/* Count-up */
.count-up { display: inline-block; }

/* Pulse dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Stat value animation */
.animate {
  animation: fadeInUp 0.3s ease;
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .mobile-menu-overlay { display: block; pointer-events: none; opacity: 0; }
  .mobile-menu-overlay.open { pointer-events: auto; }

  .main {
    margin-left: 0;
    padding: 70px 16px 40px;
    max-width: 100%;
  }

  .admin-banner { left: 0; top: 56px; }
  .admin-active .main { padding-top: 110px; }

  .greeting h1 { font-size: 24px; }
  .greeting .subtitle { font-size: 14px; }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 22px; }

  .pace-content { flex-direction: column; gap: 20px; }
  .pace-ring-container { width: 100px; height: 100px; }
  .pace-ring { width: 100px; height: 100px; }
  .pace-count { font-size: 26px; }

  .actions-grid { grid-template-columns: 1fr; }

  .winning-card { min-width: 240px; max-width: 240px; }

  .discover-grid { grid-template-columns: 1fr; }
  .stats-overview { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid-secondary { grid-template-columns: 1fr; }
  .big-stat-card .big-value { font-size: 32px; }

  .learn-tracks { grid-template-columns: 1fr; }

  .video-row .v-stats {
    flex-direction: column;
    gap: 4px;
  }

  .rank-position-display { font-size: 56px; }

  .video-list-item .video-list-stats { min-width: 70px; }
  .video-grid { grid-template-columns: 1fr; }

  .rank-position-display { font-size: 56px; }
  .rank-podium { flex-wrap: wrap; gap: 8px; }
  .podium-item { min-width: 90px; }

  .coach-container { grid-template-columns: 1fr; height: auto; max-height: none; }
  .coach-chat { height: calc(100vh - 180px); min-height: 500px; }
  .coach-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .coach-knowledge { grid-column: 1 / -1; }

  .achievements-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-brands-grid { grid-template-columns: 1fr; }

  .period-selector-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .coach-sidebar { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   RESPONSIVE — TABLET (769px – 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: 72px; padding: 16px 8px; }
  .sidebar-wordmark { display: none; }
  .sidebar-brand-switcher { display: none; }
  .nav-item .nav-label { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item .nav-badge { display: none; }
  .sidebar-footer .user-info { display: none; }
  .sidebar-footer { padding: 8px 0 0; }
  .user-card { justify-content: center; padding: 10px; }
  .main { margin-left: 72px; padding: 24px; }
  .admin-banner { left: 72px; }
  .admin-active .main { padding-top: 64px; }
  .discover-grid { grid-template-columns: repeat(2, 1fr); }
}